News:

Support the VirtueMart project and become a member

Main Menu

How to return to cart after Register

Started by gba, November 14, 2019, 17:27:31 PM

Previous topic - Next topic

gba

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

GJC Web Design

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) );
}

}


GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation