1. create a new Smarty modifier plugin -> "include/templater/plugins/modifier.getcatnamebyid.php" with the following content:
PHP Code:
<?php
if (!defined('XCART_START')) { header("Location: ../../../"); die("Access denied"); }
function smarty_modifier_getcatnamebyid($categoryid) {
global $sql_tbl;
x_load("category");
$category = func_get_category_data($categoryid);
return isset($category["category"]) ? $category["category"] : "";
}
?>
2. add something like this:
Code:
{$smarty.get.cat|getcatnamebyid}
into the "skin/common_files/customer/main/product.tpl" template.