Jump to content

How to add a new option under the terms of service to the Payment Page? - SOLVED


Serdar Hakan

Recommended Posts

The best and proper way to achieve it is by a module. PrestaShop has a special hook there, that allows you to attach new terms that are required for the customer to proceed.

I made a module like this for various needs of my customers (some with unconditional additonal terms, some displayed only under some conditions) so if you won't find any free solution, you can contact me.

Link to comment
Share on other sites

Hi,

./themes/your_theme/templates/checkout/_partials/steps/payment.tpl

1. find

{foreach from=$conditions_to_approve item="condition" key="condition_name"}
...
...
...
{/foreach}

 

Add after:

          <li>
            <div class="float-xs-left">
              <span class="custom-checkbox">
                <input  id    = "conditions_to_approve_my_custom_condition"
                        name  = "conditions_to_approve_my_custom_condition"
                        required
                        type  = "checkbox"
                        value = "1"
                        class = "ps-shown-by-js"
                >
                <span><i class="material-icons rtl-no-flip checkbox-checked">&#xE5CA;</i></span>
              </span>
            </div>
            <div class="condition-label">
              <label class="js-terms" for="conditions_to_approve_my_custom_condition">
                {l s='Here is my checkbox' d='Shop.Theme.Checkout'}
                <a href="{url entity='cms' id=3 id_lang=$language.id}"> {l s='read the contents of the CMS page' d='Shop.Theme.Checkout'} </a>
                {l s='and then confirm to complete the order' d='Shop.Theme.Checkout'}
              </label>
            </div>
          </li>

 

Preview changes:

obrazek.thumb.png.f3de9d5c892370b242d3047efbcc33bf.png

 

Result:

obrazek.png.94578bfc6211eeedf568116eca7b772e.png

  • Like 1
Link to comment
Share on other sites

5 hours ago, prestashopfree.com said:

Hi,

./themes/your_theme/templates/checkout/_partials/steps/payment.tpl

1. find

{foreach from=$conditions_to_approve item="condition" key="condition_name"}
...
...
...
{/foreach}

 

Add after:

          <li>
            <div class="float-xs-left">
              <span class="custom-checkbox">
                <input  id    = "conditions_to_approve_my_custom_condition"
                        name  = "conditions_to_approve_my_custom_condition"
                        required
                        type  = "checkbox"
                        value = "1"
                        class = "ps-shown-by-js"
                >
                <span><i class="material-icons rtl-no-flip checkbox-checked">&#xE5CA;</i></span>
              </span>
            </div>
            <div class="condition-label">
              <label class="js-terms" for="conditions_to_approve_my_custom_condition">
                {l s='Here is my checkbox' d='Shop.Theme.Checkout'}
                <a href="{url entity='cms' id=3 id_lang=$language.id}"> {l s='read the contents of the CMS page' d='Shop.Theme.Checkout'} </a>
                {l s='and then confirm to complete the order' d='Shop.Theme.Checkout'}
              </label>
            </div>
          </li>

 

Preview changes:

obrazek.thumb.png.f3de9d5c892370b242d3047efbcc33bf.png

 

Result:

obrazek.png.94578bfc6211eeedf568116eca7b772e.png

Thank you very much for your help, when I added the codes it worked, but I could not edit, the edits I made did not appear. I have attached the payment.tpl file, can you make the edits? The text to be changed needs to write "Ön Bilgilendirme Formu" ID number of the CMS page 6

payment.tpl

Link to comment
Share on other sites

  • Serdar Hakan changed the title to How to add a new option under the terms of service to the Payment Page? - SOLVED

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...