Jump to content

nico.r

Members
  • Posts

    2
  • Joined

  • Last visited

Profile Information

  • Location
    Buenos Aires
  • Activity
    Freelancer

nico.r's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Thanks! But that only seems to give me the ID of the parent of the product's default category. I need something that I can put inside a foreach and get the parents of all the subcategories the product is in.
  2. I'm making a site that sells comics, with the following category tree structure: - PARENT CATEGORY -- SUBCATEGORY -- SUBCATEGORY -- SUBCATEGORY Like this: - Publisher -- Marvel -- DC -- Dark Horse - Genre -- Horror -- Crime -- Comedy - Writer -- Grant Morrison -- Joss Whedon -- Mark Millar Every book is tied to several subcategories. For example: Publisher: Dark Horse Genre: Horror Writer: Mark Millar I have the following code that gives me a list of the subcategories that every book is in: {foreach from=Product::getProductCategoriesFull(Tools::getValue('id_product')) item=cat} <li>{$cat.name}</li> {/foreach} It returns something like this: <li>Marvel</li> <li>Horror</li> <li>Mark Millar</li> But I want to be able to show the name of the parent category before each subcategory. <li>Publisher: Marvel</li> <li>Genre: Horror</li> <li>Writer: Mark Millar</li> How can I do that? Is there a way to get the id or the name of the parent category inside a foreach in product.tpl?
×
×
  • Create New...

Important Information

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