![]() |
Showing a products subcat on the products page
Hi guys.
How can I show the subcategory of a product on the products page? |
|
Thanks that is helping me understand things but no it didnt work for me.
Every product has a category - All I need is the variable for the all of its subcats and I'll be away! I can't seem to find it. |
Firgured this out myself. Damn Im on a roll today!
Create a new page called 'sub_cat_fields_array.php' in modules/Sub_Cats Code:
<?php Then include the file in products.php Code:
include $xcart_dir."/modules/Sub_Cats/sub_cat_fields_array.php"; Then in your products.tpl you can view the items subcats. Code:
{assign var="subtcat" value=$sub_cats[$pid][0].categoryid} This is for a product with one subcat. If your product has more then you need to loop through this. |
All times are GMT -8. The time now is 09:24 PM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.