CharlenePro Posted October 9, 2019 Share Posted October 9, 2019 Prestashop 1.7.3.4 I want to display custom content after short description in Quick View popup window for products under selected categories. Here's what I did. 1) Install contentbox module to create custom html content 2) Create a hook 'customtext' 3) Assign contentbox module to hook 'customtext' in Design - Position 4) Insert the hook to file (themes/classic/templates/catalog/_partials/quickview.tpl) {block name='product_description_short'} <div id="product-description-short" itemprop="description">{$product.description_short nofilter}</div> {/block} {hook h='customtext'} Everything looked fine, the custom content displayed after short description in all the Quick View popups. But I want it to show for products only in categories 3 and 10, so I changed it like this. {block name='product_description_short'} <div id="product-description-short" itemprop="description">{$product.description_short nofilter}</div> {/block} {if $category->id == 3} {hook h='customtext'} {/if} {if $category->id == 10} {hook h='customtext'} {/if} Then the custom contents didn't show up. Is there anything else I need to change? I added the same code for product page (themes/classic/templates/catalog/product.tpl), it worked fine with selected categories, but just not working in quick view. Thanks a lot for any help! Link to comment Share on other sites More sharing options...
CharlenePro Posted October 14, 2019 Author Share Posted October 14, 2019 {if $category->id == X} My Code {/if} It didn't work for quickview.tpl, What change should I make? (It works fine for product.tpl) Any help? Thank you! Link to comment Share on other sites More sharing options...
remyyyyy Posted April 27, 2020 Share Posted April 27, 2020 {if $product.id_category_default == X} My Code {/if} Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now