mobilehardware Posted March 7, 2014 Share Posted March 7, 2014 Hi, I found a prestashop website where they have all categories wich the product belongs to, displayed in a product tab: (click on "Geschikt voor:") http://www.computersall.nl/620-asus-a52-a53-k52-k53-k72-x52-x53-u52-dc-power-jack-pj033-25mm.html Since I only found an old module wich isn't working for me, I would like to know if there's any other solution. http://www.prestashop.com/forums/topic/182657-module%C2%A0display-the-categories-to-which-a-product-belongs/ Hope someone can help me changing or adding the right tpl or mabey php files? A working module would also be nice. Thank you Link to comment Share on other sites More sharing options...
vekia Posted March 7, 2014 Share Posted March 7, 2014 a long time ago i created guide for 1.5.x released: categories links on product page Link to comment Share on other sites More sharing options...
mobilehardware Posted March 7, 2014 Author Share Posted March 7, 2014 a long time ago i created guide for 1.5.x released: categories links on product page I found that guide yesterday, but it is not exactly what I'm looking for. For Example: I added 3 laptops as categories: Acer, Asus and HP. 1 Product fits in all 3 categories, so I want the categories to show up in a tab called "Fits in:". Image for example: http://i.imgur.com/0l7HP3y.png Link to comment Share on other sites More sharing options...
vekia Posted March 19, 2014 Share Posted March 19, 2014 this guide is exactly what you're looking for. But you have to create also additional tab in product.tpl as a tab contents use my guide, will work as you expect Link to comment Share on other sites More sharing options...
mobilehardware Posted March 19, 2014 Author Share Posted March 19, 2014 Sorry. I had to look better. I managed to get the categories in a product tab. Thank you Will it still have a positive effect for SEO when the category links are in a tab now? Just wondering... Is it possible to exclude/remove a category from the list? Like the "home" category? Thanks again! Link to comment Share on other sites More sharing options...
vekia Posted March 21, 2014 Share Posted March 21, 2014 it is possible with if condition <ul class="productcats"> {foreach from=Product::getProductCategoriesFull(Tools::getValue('id_product')) item=cat} {if $cat.id_category!=2} <li><a href="{$link->getCategoryLink({$cat.id_category})}" title="{$cat.name}">{$cat.name}</a></li> {/if} {/foreach} </ul> Link to comment Share on other sites More sharing options...
DJPhill Posted January 15, 2016 Share Posted January 15, 2016 Hello Is this possible in 1.6 please? Thanks. Link to comment Share on other sites More sharing options...
miszozon Posted October 28, 2019 Share Posted October 28, 2019 Hello, Is it possible to display a tree with the assigned categories, but keeping the parent-child relationship? The code given by Vekia works, but displays all categories sequentially one after the other, but not in order. Link to comment Share on other sites More sharing options...
Norben Posted November 18, 2020 Share Posted November 18, 2020 Hi, For this code: <ul class="productcats"> {foreach from=Product::getProductCategoriesFull(Tools::getValue('id_product')) item=cat} {if $cat.id_category!=2} <li><a href="{$link->getCategoryLink({$cat.id_category})}" title="{$cat.name}">{$cat.name}</a></li> {/if} {/foreach} </ul> In my case I want to display only category depth level 3 Thank you for your help. 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