View Single Post
  #2  
Old 01-22-2010, 08:46 AM
  Jon's Avatar 
Jon Jon is offline
 

X-Guru
  
Join Date: Oct 2002
Location: Vancouver, Canada
Posts: 4,200
 

Default Re: Link to parent/root cat

To link to a products root category based on the location variable you can...

Open product.php

FIND:

Code:
$smarty->assign("product",$product_info);

BEFORE ADD:

Code:
// WCM - Assign Root Category $product_info['root_category'] = $location[1][0]; $product_info['root_category_link'] = $location[1][1]; // / WCM - Assign Root Category

In skin1/customer/main/product.tpl use:

Code:
{if $product.root_category_link} <strong>Root Category:</strong> <a href="{$product.root_category_link}" title="{$product.root_category}">{$product.root_category}</a> {/if}
Reply With Quote