Hello, how to put ribbon like in this video with the new HTML BOX PRO module for Prestashop 1.7 please? https://www.youtube....h?v=Pq52Aw3le5M Regards,
Public support for most advanced custom contents module for PrestaShop. With our html box module you can add your contents to all available positions in prestashop, even non-default hooks. Our addon has many appearance conditions and support of smarty templates language. Its definitely one from the most powerful custom contents addon for prestashop

ribbon on list of products in prestashop 1.7 ?
Started by
apps
, Sep 03 2022 06:53 AM
1 reply to this topic
#2
Posted 03 September 2022 - 06:55 AM
Hello
case is theme-related,
anyway, usually it is enough to add this code:
<div style="position:absolute; top:0px; right:0px;">{hook h='MyRibbon' product=$product}</div>
to file:
themes/your-theme/templates/catalog/_partials/miniatures/product.tpl
add it after this code:
{block name='product_thumbnail'} {if $product.cover} <a href="{$product.url}" class="thumbnail product-thumbnail"> <img src="{$product.cover.bySize.home_default.url}" alt="{if !empty($product.cover.legend)}{$product.cover.legend}{else}{$product.name|truncate:30:'...'}{/if}" loading="lazy" data-full-size-image-url="{$product.cover.large.url}" width="{$product.cover.bySize.home_default.width}" height="{$product.cover.bySize.home_default.height}" /> </a> {else} <a href="{$product.url}" class="thumbnail product-thumbnail"> <img src="{$urls.no_picture_image.bySize.home_default.url}" loading="lazy" width="{$urls.no_picture_image.bySize.home_default.width}" height="{$urls.no_picture_image.bySize.home_default.height}" /> </a> {/if} {/block}
as i mentioned - your theme may have a little different code, so exact position where it is required to add this code is theme-related.
anyway, once you will save your new code, you can go to html box pro and create custom hook "myRibbon", activate it and create custom blocks there, these blocks should appear as in guide - if not - it will be required to personalize css styles of theme (i can suggest changes but i need to see your website)
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users