oc-mall-plugin icon indicating copy to clipboard operation
oc-mall-plugin copied to clipboard

Checkout : Terms & conditions not required when user is logged

Open PubliAlex opened this issue 4 years ago • 1 comments

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

PubliAlex avatar Dec 22 '20 11:12 PubliAlex

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.

tobias-kuendig avatar Dec 22 '20 12:12 tobias-kuendig