check "accept the Terms and Conditions" on the client side

  • Posts: 114
  • Thank you received: 4
7 years 5 months ago #270626

-- HikaShop version -- : 3.1
-- Joomla version -- : 3.7
-- PHP version -- : 7.1

Where can I switch on client side validation for "accept the Terms and Conditions" in the checkout so the page does not reload when the user forgets to tick the T&C box?

PS: I do not want to switch off the server side validation but the additional client side validation gives a way better UX.

Last edit: 7 years 5 months ago by peteo.

Please Log in or Create an account to join the conversation.

  • Posts: 82906
  • Thank you received: 13378
  • MODERATOR
7 years 5 months ago #270628

Supposing that you're using the new checkout, and supposing that you're clicking on the finish button, you want to edit the file show_block_buttons via the menu Display>Views and add your javascript check on the onclick attribute of the finish button.

Please Log in or Create an account to join the conversation.

  • Posts: 114
  • Thank you received: 4
7 years 5 months ago #270655

Thanks. So you dont offer client side validation out of the box? That is kinda strange nowadays ...

How do I know whether I use the old or the new checkout?

Please Log in or Create an account to join the conversation.

  • Posts: 82906
  • Thank you received: 13378
  • MODERATOR
7 years 5 months ago #270674

Hi,

We had many issues with the old checkout system with the client side validation.
Most of the time, that was because other extensions or the template breaking the javascript on the page and because of that our javascript didn't work. Merchants were then asking us for help for something not comeing from our end.
Also, since there are many ways the checkout can be configured, the client side checks were quite messy and it didn't work well.
To avoid these issues, and because server side checks are necessary regardless of the client side checks, we focused on the server-side checks for the new checkout.
With the ajax system of the new checkout, the client-side checks are also less needed so we decided to not do them for now.
So far, everyone was happy with the change. We'll see. If we get more feedback on that, we might reintroduce part or all of them in the future.
Since the new checkout is still quite young, we need more feedbacks in the coming months before we can judge on whether that would be necessary.

The old/new checkout switch is controlled by the "checkout legacy" setting of the HikaShop configuration.

Please Log in or Create an account to join the conversation.

Time to create page: 0.059 seconds
Powered by Kunena Forum