Icons module on list of products in prestashop 1.7

Hi I have purchased now your module Tag icons, and my question is....for showing the icons in product-list.tpl (right to the image of the product) or in the porduct.tpl using the custom hook, where exactly I have to put the code of the hook?????? I am using PS 1.7


Hello,

To display icons on list of products module uses also default prestashop's positions. The custom hook is an optional feature, thanks to this you can personalize the icons appearance to meet your exact requirements.

So, if you want to disply icons on list of products:

  • Firstly try to use default hooks
    Maybe the way of how these hooks are implemented to your theme will meet your requirements so you will not have to use custom hook.
    • Open module configuration page,
    • from list of positions select one from these two: 

      1. displayProductListReviews
      2. displayProductDeliveryTime (its a non default hook in prestashop 1.7, but many themes still uses it)

  • if default position does not meet your requirementsb
    As i already mentioned - if default hooks that are implemented to your theme fill not meet your requirements - you can use custom hook execution code:
    {hook h='ShowIcons' product=$product}

    Thanks to this you can point where exactly icons will appear. 

    • Firstly please activate this position on module configuration page: 

    • Then it is required to add the code to template. 
      Usually the file that is responsible for product on list of products is: /themes/your-theme/templates/catalog/_partials/miniatures/product.tpl
      just insert the hook execution there. After save file contents it might be required to "clear shop cache" under adv. parameters > performance to see the changes on your website immediately.



So, as you can see, you can display icons on list of products in a 3 ways:

- with default hook displayProductListReviews

- with default hook displayProductDeliveryTime

- with custom hook ShowIcons


the method you will use depends on you and your requirements.


If you will have some doubts - please let me know, i will try to help :-)



best regards

milos

0 komentarze:

Publikowanie komentarza