Hi all!
I found a bug regarding the checkout and registration process. When I enter all the data in the registration fields but make a mistake in the "Confirm Password" field or the username is already used, I've got the error message, but if now i go straight to the cart, all the data I had entered are displayed and i can proceed to the checkout process. Same things in the cart, after clicking "Register And Checkout" I've got the error message and I'm asked for the shipping method.
I've replicated the same things on the demo site.
Thank you for your hard work
Bye
Joomla! 2.5.11 - Virtuemart 2.0.20b
Interesting. It is intended that it works that way as long you allow unregistered users. But in fact it must be prevented if only registered users are allowed to checkout.
Is there a solution for this problem? I allow only registered users to checkout on my site.
Thanks
Please try in the FE controller user.php around line 212
instead this
if (is_array($ret) and $ret['success'] and !$useractivation) {
// Username and password must be passed in an array
$credentials = array('username' => $ret['user']->username,
'password' => $ret['user']->password_clear
);
$return = $mainframe->login($credentials);
}
this here
if (is_array($ret) and $ret['success'] and !$useractivation) {
// Username and password must be passed in an array
$credentials = array('username' => $ret['user']->username,
'password' => $ret['user']->password_clear
);
$return = $mainframe->login($credentials);
} else if(VmConfig::get('oncheckout_only_registered',0)){
$layout = JRequest::getWord('layout','edit');
$this->redirect( JRoute::_('index.php?option=com_virtuemart&view=user&layout='.$layout), $msg );
}
sorry for the late reply, I've tried with your fix but does not change anything. I've found a workaround that does what I want, I've added this:
if($currentUser->guest!=1){
$this->saveToCart($data);
}
instead of:
$this->saveToCart($data);
in the same user.php file under the function saveData and with this the data are stored only if the validation passes. The only downside is that all the field are empty if an error occurred, there is a solution for this last problem?
Thank you!
Please use the latest release candidate 2.0.21a http://forum.virtuemart.net/index.php?topic=115877.0