News:

Support the VirtueMart project and become a member

Main Menu

Terms of Service not validated despite set to mandatory

Started by whizzzwebdesign, October 01, 2017, 14:26:45 PM

Previous topic - Next topic

whizzzwebdesign

Hi there,

On our live page schenkelvermessungen.ch (Joomla 3.7.5 / VM 3.2.4 / PHP 7.0.23) we've set the TOS field to mandatory for all check-outs. However, if the user "forgets" to click the checkbox, there is no error message shown and the order is immediately accepted. In Swiss law, the vendor has to proof that the user indeed has accepted TOS. Unfortunately, this is not possible here.

We've found quite a bit of same issues on the forum, but they are rather old and referring to previous VM versions.

Thanks for your help. Any tip how to solve this is highly appreciated.

Best regards from Switzerland
Fabian

jenkinhill

First check if it is a template issue by testing with Protostar.

If still an issue then check in shopper fields that the agreed (checkbox) and tos (custom) are both set to required, and "Must agree to Terms of Service on EVERY ORDER" is selected in VM Configuration/Checkout.
Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

whizzzwebdesign

Dear Kelvyn,

Thank you very much for your help. I confirm that we've now set both fields (agreed checkbox and tos custom) to required and the "must accept... on EVERY ORDER" is also activated. Now, the field get's indeed validated. But, and that was a remark from our customer, the message "please accept the terms of service" appears already when the shop customer clicks on the cart. Actually, the message should only be shown if she/he clicks on the "buy" button and not already at the very beginning. We've tested that with the transform template as well as with the Protostar (same behaviour).

Do you have an advise how we have to set up VM that the TOS validation (and therefore also the message) only takes place when the user clicks on "buy"?

Thank you and best regards
Fabian

GJC Web Design

what do u mean by "buy" .. as in confirm the order?

why is it a problem that the message is shown during the cart transaction.. I think this is for every cart the same?

There is a var available that is set by the cart confirm (last stage) to hide the T&C till then (and disable validation?)  you can use JS triggered by this var or the state of the confirm button etc
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

whizzzwebdesign

Thank you very, very much for your anser.

Yes, we mean "confirm the order". The template that we use ("transform" from virtuemarttemplates.net) shows this notification in an overlay box (hiding the content below). Thus, usability is not satisfying enough for our customer and they want to see the "error" message only if the enduser forgets to click the TOS checkbox.

Do you mind giving us a short instruction where and how we can adapt or setup the var you've mentioned?

jenkinhill

So this is related to your template layout not to VirtueMart function. In that case you should edit the template overrides to fix the issue or maybe use css to change the layout. You can ask virtuemarttemplates.net about this, maybe you need an update of that template.  http://forum.virtuemart.net/index.php?topic=108212.0
Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

whizzzwebdesign

Thanks Kelvyn,

We're already using the most recent version of that template (issued on 20th September 2017). However, we have the same situation if we switch back to the protostar template. As initially mentioned, there is either no validation of TOS (if "agreed" and "TOS" is not set as required) or (if both are set as required) the message appears always on the cart checkout page (also on protostar). Both ways are not accepted by our customer, the first one is a real legal issue in Switzerland, the second one is a pure usability issue. We still believe that TOS should only be validated if the user clicks on the confirm order button, not earlier.

It would be great if somebody could give us a tip where and how we can adjust the "var" as mentioned by GJC Web Design.

GJC Web Design

cannot advise from afar as i have no idea how your template triggers the modal etc

the var is from memory  $this->checkout_task  think its state is either confirm or check_out

just echo it out
use this to prevent the modal
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

whizzzwebdesign

Thank you all for the contribution on that topic.

We've been able to solve that issue with the installation of the "VP One Page Checkout" plugin provided by virtueplanet.com.
:)