Redirecting after login

06.06.2014 13:04
#1
yaro8
Joomshopping forum user no avatar
Name: Jaroslav
06.06.2014
Posts: 6
Quote
Redirecting after login

How can I redirect page after login to cart or to step2 for users which already have some items in their cart?

 
06.06.2014 16:26
#2
webdesigner
(Support Team)
User webdesigner
Name: Admin
05.08.2010
Posts: 16487
Quote
Aw: Redirecting after login

url?
test login?


Letzte Ă„nderung: 06.06.2014 16:26
 
11.06.2014 00:12
#3
yaro8
Joomshopping forum user no avatar
Name: Jaroslav
06.06.2014
Posts: 6
Quote
Aw: Redirecting after login

I tried this, but it always redirects to main page. What should I change to redirect to step2, when cart is not empty?

in com_jshopping/controllers/user.php

function loginsave()
.
.
.
.
.
if ((!JError::isError($error)) && ($error !== FALSE)){
if ( ! $return ) {
$return = JURI::base();
}
$dispatcher->trigger( 'onAfterLogin', array() );

$countprod = count($this->products);
if ($countprod>0)
{
$mainframe->redirect( SEFLink('index.php?option=com_jshopping&controller=checkout&task=step2',0,1,$jshopConfig->use_ssl));
}
else
{

$mainframe->redirect( $return );
}

}else{
$dispatcher->trigger( 'onAfterLoginEror', array() );
$mainframe->redirect( SEFLink('index.php?option=com_jshopping&controller=user&task=login&return='.base64_encode($return),0,1,$jshopConfig->use_ssl) );
}
}

 
18.06.2014 11:38
#4
ingnino
User ingnino
Name: Adrian
02.02.2012
Posts: 23
Quote
Aw: Redirecting after login

Hello,

Im working with the joomla Login module, everything looks to be good, but when clients login or logout in the product view page, they get redirect to a blank page. I have set the module to redirect the user after login and logout to the same page he's on.

This is an url from the blank page after login or logout in the product view page: http://www.smakandow.pl/sklep/owoce-egzotyczne/pulpa-owocowa-jezyna-andyjska-mora-250g/product/2/31.html?manufacturer_id=&label_id=&vendor_id=&page=&price_from=&price_to=

And this is a url from the prodcut view page without login or logut: http://www.smakandow.pl/sklep/owoce-egzotyczne/pulpa-owocowa-jezyna-andyjska-mora-250g.html

Can you help me with this? please.

Kind regards.


Joomla: 2.5.18
JoomShopping: 3.16.2
PHP: 5.3.8
MySQL: 5.0.32
Website Url: www.smakandow.pl
 
08.08.2016 07:36
#5
Bata_Ns
Joomshopping forum user no avatar
Name: Bata_Ns
16.02.2011
Posts: 10
Quote
Aw: Redirecting after login

I have a similar problem at moment...

After login on the first checkout step it redirects to homepage instead to step2. Does anyone know how to solve this?

-------------------

EDIT: Solved by updating JoomShop to the latest - 4.12.2.!


Joomla: 3,6,1,
JoomShopping: 4.14.2

Letzte Ă„nderung: 08.08.2016 07:41
 
Copyrights MAXXmarketing GmbH. All Rights Reserved