News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

Agree to ToS required checkout problem

Started by remeedella, January 24, 2013, 02:23:21 AM

Previous topic - Next topic

remeedella

Hello,

I`ve been looking for this solution for several days and finally got help to come across a solution. Agree to Terms of Service requirement in virtuemart settings, require user to be registered to checkout and show terms of service on checkout are all enabled.

This problem exists on the latest virtuemart on a clean install. Some people encounter the problem where you do not put a checkmark in the box checking out from your cart and you can still continue to step 2.. Why is that? It makes me think that `require` setting doesnt work at all. It actually does, you are only prompted an error to agree to ToS at the end of checkout steps confirming your order. That, or if you have your shipping method (step 2) , your payment method (step 3) and your billing address all filled out and you haven`t agreed to Tos yet then you will be prompted. That seems confusing and inaccurate.

Users should be prompted immediately to agree to ToS or it should be written `by clicking check out now you have confirmed to the Terms of Service.` I would strongly recommend adjusting this on a future release of virtuemart or offering us the option as a setting in back-end. I looked like crazy for a solution to this problem that I don't think used to happen in in virtuemart 1 or older versions of Joomla, nobody had an answer.

Solution:

components/com_virtuemart/helpers/cart.php

move line 896

   if ($this->tosAccepted == 0) {

$userFieldsModel = VmModel::getModel('Userfields');

$required = $userFieldsModel->getIfRequired('agreed');
if(!empty($required)){
$redirectMsg = JText::_('COM_VIRTUEMART_CART_PLEASE_ACCEPT_TOS');
return $this->redirecter('index.php?option=com_virtuemart&view=cart' , $redirectMsg);
}
}

all that should be moved to line 770. Voila, ToS takes priority when trying to checkout, no need to be at the last step of checkout and confirming your purchase to be prompted, you are prompted immediately.

remeedella

no one ran into this? :O I'd be surprised

Milbo

There is another post already exactly pointing out the same thing.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

remeedella

Okay thanks Milbo. I literally searched the forum, joomla forum, google like crazy. There were no examples or fixes for this problem and I couldnt find the post you suggested. It took me days lol so I dont want anyone to have trouble with this either. I already showed this to Val. Thanks!

Milbo

Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/