Hello!
Joomla!3.9.13
VM v3.6.8.10202
I added a link for Register to my cart layout override.
After finishing Register, I want the user to land in the cart again automatically.
How can I achieve that?
Thank you for any useful hint!
Kind regards,
Gerald
In the standard install they do..
and there is a register link in the cart anyway -> Add/Edit Billing details so not sure what your asking
after reg in the user controller there is:
function saveUser(){
if (!class_exists('VirtueMartCart')) require(VMPATH_SITE . DS . 'helpers' . DS . 'cart.php');
$cart = VirtueMartCart::getCart();
$layout = vRequest::getCmd('layout','edit');
if($cart->_fromCart or $cart->getInCheckOut()){
$msg = $this->saveData($cart);
$task = '';
vmdebug('saveUser _fromCart',(int)$cart->_fromCart,(int)$msg);
if(!$msg){
$this->setRedirect(JRoute::_('index.php?option=com_virtuemart&view=user&task=editaddresscart&addrtype=BT'.$task, FALSE) );
} else {
if ($cart->getInCheckOut()){
$task = '&task=checkout';
}
$this->setRedirect(JRoute::_('index.php?option=com_virtuemart&view=cart'.$task, FALSE) );
}
} else {
$msg = $this->saveData(false);
$this->setRedirect( JRoute::_('index.php?option=com_virtuemart&view=user&layout='.$layout, FALSE) );
}
}
Thank you!