3

I moved terms and condition functionality in checkout order summary block.

But, There are no any validation working before click on place order button.

I also added agreement validation code in my custom module checkout_index_index.xml

checkout_index_index.xml :

<item name="agreements" xsi:type="array">
    <item name="component" xsi:type="string">Magento_CheckoutAgreements/js/view/checkout-agreements</item>
    <item name="sortOrder" xsi:type="string">100</item>
    <item name="displayArea" xsi:type="string">before-place-order</item>
    <item name="dataScope" xsi:type="string">checkoutAgreements</item>
    <item name="provider" xsi:type="string">checkoutProvider</item>
</item>
<item name="agreements-validator" xsi:type="array">
    <item name="component" xsi:type="string">Magento_CheckoutAgreements/js/view/agreement-validation</item>
</item>

enter image description here

How to do it ?

Please help me.

Thanks.

6
  • How'd you manage to place the order and checkout button in the sidebar? I've followed some Stack topics about that, but unfortunately no luck (my question: magento.stackexchange.com/questions/220895/…)
    – Condor
    Apr 12, 2018 at 9:37
  • 1
    Yes. My code also same as like your code. But, not getting any solution. Do you have any idea about it? Apr 12, 2018 at 9:38
  • My code isn't even working unfortunately (maybe you have any ideas why is doesn't?) I did not come to the point where I could look into the validation function. Maybe this is something of use? magento.stackexchange.com/questions/110643/…
    – Condor
    Apr 12, 2018 at 9:45
  • I've managed to replace the place order button and t&c checkbox. Now also searching for a solution to this
    – Condor
    Apr 13, 2018 at 8:53
  • I've found out (I think) why this happens, but not how to fix it: magento.stackexchange.com/questions/222416/…
    – Condor
    Apr 19, 2018 at 6:00

1 Answer 1

0

Check my following answer regarding the same issue you were facing:

Validation of the terms and conditions (custom module)

Hope it helps you.

1
  • hi @Bram, here you are trying with custom module, for me default is not working, can you please update me the fix Dec 11, 2018 at 8:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.