Jump to content

Associated categories in a product tab


Recommended Posts

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

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

  • 2 weeks later...

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

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

  • 1 year later...
  • 3 years later...
  • 1 year later...

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...