Jump to content

Edit History

MarioCM

MarioCM

On 9/14/2017 at 5:33 PM, metal1616 said:

Hi!

 

To make this work in Prestashop 1.7 only need to change the method to create the url in the tpl template to this:

    {if $prev_product}
        <a title="{$prev_product.name}" class="btn btn-default" href="{url entity='product' id=$prev_product.id_product}">{l s='Previous Product' d='Shop.Theme.Catalog'}</a>
    {/if}
    {if $next_product}
        <a title="{$next_product.name}" class="btn btn-default" style="float:right"href="{url entity='product' id=$next_product.id_product}">{l s='Next Product' d='Shop.Theme.Catalog'}</a>
    {/if}

Put it in the file: "/themes/[name_of_your_theme]/templates/catalog/product.tpl.

 

In the new version the method "{$link->getProductLink()}" it's deprecated by "{url}".

 

Here you have a tutorial to know how to use this:

https://webkul.com/blog/links-creation-on-tpl-files-in-prestashop-1-7-using-url/

 

Thank you so much for the tutorial NemoPS!

 

Bye.

Thanks for your help!
Works fine!!

I am using version 1.7.8.3

MarioCM

MarioCM

On 9/14/2017 at 5:33 PM, metal1616 said:

Hi!

 

To make this work in Prestashop 1.7 only need to change the method to create the url in the tpl template to this:

    {if $prev_product}
        <a title="{$prev_product.name}" class="btn btn-default" href="{url entity='product' id=$prev_product.id_product}">{l s='Previous Product' d='Shop.Theme.Catalog'}</a>
    {/if}
    {if $next_product}
        <a title="{$next_product.name}" class="btn btn-default" style="float:right"href="{url entity='product' id=$next_product.id_product}">{l s='Next Product' d='Shop.Theme.Catalog'}</a>
    {/if}

Put it in the file: "/themes/[name_of_your_theme]/templates/catalog/product.tpl.

 

In the new version the method "{$link->getProductLink()}" it's deprecated by "{url}".

 

Here you have a tutorial to know how to use this:

https://webkul.com/blog/links-creation-on-tpl-files-in-prestashop-1-7-using-url/

 

Thank you so much for the tutorial NemoPS!

 

Bye.

Thanks for your help!
I have added the new code {URL} to the tpl, but I can't make it work in the product sheet, in the overrides there is no need to modify anything?

I am using version 1.7.8.3

×
×
  • Create New...