I am using the Narrative theme and in order to use a third-party company, who processes payments in my country, I need to add a checkable button in the checkout/cart section. Namely the button must be tickable, with text: 'I agree with the terms and conditions'. Preferably, the button should have hyperlinks to the already existing Terms and conditions pages. Also, it must be so, that the client can not finish the order, without ticking the box.
I have tried various online tutorials, but have not had luck yet.
Any help is appreciated, thanks!
On which page do you want to add it, because there are 3 places you can checkout: product page, cart page and cart drawer.
You can refer to the steps:
- First you need to add disabled for the checkout button. Refer https://www.w3schools.com/tags/att_button_disabled.asp
- Add checkbox and text with message above checkout button. Refer https://www.w3schools.com/tags/att_input_type_checkbox.asp
At the label you can add a tag to link to the Terms and conditions pages.
- Use JS to catch the checkbox click condition and remove disabled button. Refer https://www.w3schools.com/howto/howto_js_display_checkbox_text.asp
Hope it helps!