Jump to content

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  :)

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

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 :)

Share this post


Link to post
Share on other sites

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!

Share this post


Link to post
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>

Share this post


Link to post
Share on other sites

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. 

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
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...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More