X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   show subcats with product list (https://forum.x-cart.com/showthread.php?t=42086)

alla 08-30-2008 12:53 PM

show subcats with product list
 
Hi,

I want to display the list of subcategories on this page
http://demo.x-cart.com/demo/home.php?cat=23

In this case they are: Internet and Software

Is there a variable that has that kind of data

Similar to $allcategories

I would build my one php code bt I am not sure where to put it.

Thank you

alla 08-31-2008 12:36 PM

Re: show subcats with product list
 
i've done it

made my own array

$_allsubcategories = func_get_categories_list($current_category['parentid'], true, "level");
$smarty->assign("allsubcategories", $_allsubcategories['subcategories']);

in categories.php


+


{foreach from=$allsubcategories item=subcat}
<a href="home.php?cat={ $subcat.categoryid }" class="subcategoryList">{ $subcat.category|escape }</a>
{/foreach}


in subcategories.tpl

SMS 09-25-2008 12:46 PM

Re: show subcats with product list
 
Hey Alla.. any chance you can post a sample or PM me, if I am understanding you this displays each of the subcats when the lowest cat is selected.

Computers/Mac/Macbooks
This would display all the categories at the MAC level even though I was on the Macbook product category.

Thanks

rafaes18 09-26-2008 01:35 AM

Re: show subcats with product list
 
I am having the same problem and can't find the solution, any help would be appreciated.


All times are GMT -8. The time now is 10:16 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.