Home Pass value to JSON upon submit
Reply: 0

Pass value to JSON upon submit

user953 Published in April 19, 2018, 9:59 am

I have made a custom module in Magento 2 (my issue is not per se Magento 2 bound!). In this module I have moved the Terms and Conditions checkbox in the checkout to another place:

Checkout page

Now, unfortunately when selecting a payment method and checking the box (which is required), I get a 400 error. When I look at the payload (payment-information), I see that the value passed to agreement_ids is empty:


This stops me from placing the order. When using the 'normal' checkout procedure, the argreement_ids key get's passed the value 1 (one).

Is there a way using Javascript/jQuery to pass the value 1 to the payload upon submitting the order? I have searched for some similar posts but they are a litte vague to me since my knowledge of this stuff (JSON / parsing values etc.) isn't that advanced.

Thank you in advance.

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.392133 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO