Author Topic: Terms of Service not validated despite set to mandatory  (Read 284 times)

whizzzwebdesign

  • Beginner
  • *
  • Posts: 5
  • A beginner
Terms of Service not validated despite set to mandatory
« on: October 01, 2017, 14:26:45 pm »
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

  • UK Web Developer & Consultant
  • Global Moderator
  • Super Hero
  • *
  • Posts: 26314
  • Always on vacation
    • Jenkin Hill Internet
Re: Terms of Service not validated despite set to mandatory
« Reply #1 on: October 01, 2017, 15:07:22 pm »
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

Jenkin Hill Internet,
Keswick, Lake District

Unsolicited PMs/emails will be ignored.

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

Currently using VM3.2.4 on Joomla 3.8 PHP 7.0.23

Testing VM3.2.5.9653 on J!3.8

whizzzwebdesign

  • Beginner
  • *
  • Posts: 5
  • A beginner
Re: Terms of Service not validated despite set to mandatory
« Reply #2 on: October 03, 2017, 00:00:36 am »
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

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 7590
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 2.6.22 & 3.2.2
Re: Terms of Service not validated despite set to mandatory
« Reply #3 on: October 03, 2017, 23:44:48 pm »
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 http://www.gjcwebdesign.com
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 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
http://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

whizzzwebdesign

  • Beginner
  • *
  • Posts: 5
  • A beginner
Re: Terms of Service not validated despite set to mandatory
« Reply #4 on: October 04, 2017, 10:08:57 am »
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

  • UK Web Developer & Consultant
  • Global Moderator
  • Super Hero
  • *
  • Posts: 26314
  • Always on vacation
    • Jenkin Hill Internet
Re: Terms of Service not validated despite set to mandatory
« Reply #5 on: October 04, 2017, 12:31:51 pm »
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

Jenkin Hill Internet,
Keswick, Lake District

Unsolicited PMs/emails will be ignored.

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

Currently using VM3.2.4 on Joomla 3.8 PHP 7.0.23

Testing VM3.2.5.9653 on J!3.8

whizzzwebdesign

  • Beginner
  • *
  • Posts: 5
  • A beginner
Re: Terms of Service not validated despite set to mandatory
« Reply #6 on: October 04, 2017, 14:02:45 pm »
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

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 7590
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 2.6.22 & 3.2.2
Re: Terms of Service not validated despite set to mandatory
« Reply #7 on: October 04, 2017, 20:58:44 pm »
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 http://www.gjcwebdesign.com
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 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
http://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

whizzzwebdesign

  • Beginner
  • *
  • Posts: 5
  • A beginner
Re: Terms of Service not validated despite set to mandatory
« Reply #8 on: October 08, 2017, 18:37:27 pm »
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.
 :)