oc-mall-plugin
oc-mall-plugin copied to clipboard
Checkout : Terms & conditions not required when user is logged
Hello,
I noticed a small bug during checkout, can be reproduced on the demo theme offline.swiss.
When the user is logged on checkout, the submit checkout button is disabled until you accept terms, but there are no server side validation.
So if you just remove the disabled attribute on the button with developper tool, and click the submit order button, you order is accepted.
I think that the onSubmit() function of quickCheckout should check for the presence of post('terms_accepted') before continue.
Best regards,
Alex
Good point, the terms should be enforced. This was not done in the first place to be backwards compatible. The terms box was added later on, so adding server side validation would break those installations. The easiest fix is to add a show_terms_checkbox
property to the SignUp component that shows and validations the checkbox if set to true.