Jump to content

Modify terms and conditions text showed on checkout (PS1.7.4)


Recommended Posts

Hello,

I would like to modify the terms and conditions text showed on checkout just before the confirmation button.

I would like to add one more link (2 instead of one).

This text can be modified from back office or the only way it's to edit the file "/themes/classic/templates/checkout/_partials/steps/payment.tpl"?

Link to comment
Share on other sites

I tried editing the payment.tpl but the link doesn't work correctly.

The default terms and conditions url it's opened in modal popup, but with my custom link it open an empty modal with no content in it.

I edited these lines:

<label class="js-terms" for="conditions_to_approve[{$condition_name}]">
     {$condition nofilter}
</label>

To this:

<label class="js-terms" for="conditions_to_approve[{$condition_name}]">
	Accetto senza riserve le <a href="/content/3-condizioni-di-vendita">Condizioni Generali di Vendita</a> e l'<a href="/content/6-informativa-sulla-privacy">Informativa sulla Privacy</a>
</label>

I also tried with the complete url but I still see the empy modal.

Link to comment
Share on other sites

  • 2 months later...
On 28.7.2018 at 12:48 AM, DARKF3D3 said:

I tried editing the payment.tpl but the link doesn't work correctly.

The default terms and conditions url it's opened in modal popup, but with my custom link it open an empty modal with no content in it.

I edited these lines:


<label class="js-terms" for="conditions_to_approve[{$condition_name}]">
     {$condition nofilter}
</label>

To this:


<label class="js-terms" for="conditions_to_approve[{$condition_name}]">
	Accetto senza riserve le <a href="/content/3-condizioni-di-vendita">Condizioni Generali di Vendita</a> e l'<a href="/content/6-informativa-sulla-privacy">Informativa sulla Privacy</a>
</label>

I also tried with the complete url but I still see the empy modal.

 

Hi,

 

same here, is there any solution for this?

Does this relate to the fancy box issue?

 

 

Link to comment
Share on other sites

  • 4 months later...

Hi,
I had the same problem. My solution is to edit the "templates/checkout/_partials/steps/payment.tpl" and remove the class of the label tag which triggers the modal window. 

Now I've inserted my own label instead of the "$condition nofilter" value, but if you have no language selection you can just add a normal html link here.

<div class="condition-label">
  <label for="conditions_to_approve[{$condition_name}]">
    {l s='agree to the terms of service'  d='Shop.Theme.Checkout'}
  </label>
</div>
Edited by s.kick (see edit history)
Link to comment
Share on other sites

classes/checkout/ConditionsToApproveFinder.php

    private function getDefaultTermsAndConditions()
    {
        $cms = new CMS(Configuration::get('PS_CONDITIONS_CMS_ID'), $this->context->language->id);
        $link = $this->context->link->getCMSLink($cms, $cms->link_rewrite, (bool) Configuration::get('PS_SSL_ENABLED'));

        $termsAndConditions = new TermsAndConditions();
        $termsAndConditions
            ->setText(
                $this->translator->trans('I agree to the [terms of service] and will adhere to them unconditionally.', array(), 'Shop.Theme.Checkout'),
                $link
            )
            ->setIdentifier('terms-and-conditions')
        ;

        return $termsAndConditions;
    }

This is unachanged example. In my clients case it could not be seen from the bo transaltion

I've also seen this string in Legalcompliance module

Link to comment
Share on other sites

  • 8 months later...

I found the solution as following link. The PS 1.7X ver has a module "psgdpr" by default, for guest check out.

https://github.com/PrestaShop/PrestaShop/issues/15923

And <label class="js-terms" for="conditions_to_approve[{$condition_name}]"> {$condition nofilter} </label> on payment.tpl is for regular customer check out

Edited by Jameh (see edit history)
Link to comment
Share on other sites

  • 5 months later...
  • 3 weeks later...

Solution in PS 1.7.6.5
When you edit templates/checkout/_partial/steps/payment.tpl replacing the smarty $condition with your custom sentence, you need to add target="_blank" to your links, only this way the modal is triggered.

<label class="js-terms" for="conditions_to_approve[{$condition_name}]">
{* $condition nofilter *}
Accetto senza riserve le <a href="/content/3-condizioni-generali-di-vendita" target="_blank">Condizioni Generali di Vendita</a> e l'<a href="/content/2-privacy-policy" target="_blank">Informativa sulla Privacy</a>
</label>

 

Link to comment
Share on other sites

  • 3 years later...
On 5/10/2020 at 12:17 PM, shapwill said:

I finally found the translation for this under BO–> International –>Translations –> Theme translations –> classic –> Shop–>Theme–>Checkout.

 

example.jpg

Done it for me thank you so much!

Link to comment
Share on other sites

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...