Unleash the Full Potential of Your PrestaShop Store

Welcome to MyPresta.eu – Your reliable partner in the e-commerce world. Find innovative modules that will take your business to a new level.

Manufacturer name with link on product page

In this short tutorial i want to show you how to add link to manufacturer page. This code is for product page, this simple snippet will display link with manufacturer name associated with product. Guide is based on prestashop 1.6 and 1.5.

 

manufacturer link product page

 

Link to manufacturer on product page

We are able to add link to manufacturer without touching prestashop core. In this case we will edit only template file named product.tpl. File is located in your theme directory. For default prestashop template: default-bootstrap location of file is: /themes/default-bootstrap/product.tpl. So, please open it.

 

There where you want to display link to manufacturer (an anchor with manufacturer name) just use this code:

<a href="{$link->getManufacturerLink($product->id_manufacturer)}">
    {$product->manufacturer_name|escape:'htmlall':'UTF-8'}
</a>

After that - just save changes. Then refresh your website. If you don't see link anywhere on product page - it probably means that you have to recompile theme / clear smarty cache.

 

Zdjęcie autora: Milosz Myszczuk

Artykuł napisany przez Milosza Myszczuka, eksperta PrestaShop i oficjalnego moderatora społeczności PrestaShop. CEO i założyciel agencji interaktywnej VEKIA. Dowiedz się więcej.

If you like this article, support our work!

Comments