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)
-   -   direct link to subcategories (https://forum.x-cart.com/showthread.php?t=19363)

yoshitoshi 01-19-2006 03:59 PM

direct link to subcategories
 
Great product, finally understanding the templates, though i would ask this question right away and see if you can help me save some time.

Check out www.pooltradeshop.com/home.php
yes i know, a mess still :)
Instead of direct linking to the categories on the front page, i've set them as static images and want the subcategories to show up in the list underneath. That way i dont have to build a direct link for each new brand, etc.

Now i've just barely tapped into this, but found the code that brings up the categories, no problem:

Code:

{assign var="tmp" value="0"}
{section name=cat_num loop=$subcategories}
{if $subcategories[cat_num].category}{assign var="tmp" value="1"}{/if}
{/section}
{if $subcategories}
<TABLE border="0" cellspacing="5" width="100%">
{foreach from=$subcategories item=subcat}
<TR>
{if $tmp and $first_subcat ne "Y"}
{assign var="first_subcat" value="Y"}
{/if}
        <TD align="left" width="95%"><FONT class="ItemsList">{ $subcat.category|escape }</FONT>
</TD>
</TR>
{/foreach}
</TABLE>
{/if}


So what line(s) do i need to change so it brings up lets say, the subcategories to cat=3? If I figure it out first, I'll be sure to post the answer. Thank you for your time!

yoshitoshi

balinor 01-20-2006 04:14 AM

Not sure I follow what you are trying to achieve? Also, if you could please put your X-Cart version in your signature per the forum rules that would be great. Thanks!

yoshitoshi 01-20-2006 08:23 AM

sure thing. For the time being, I am manually inputting the subcategories under the categories. For my site the categories are:
Brands
Womens
Mens
Music
Home

Under Brands, I have additional sub-categories, like Brand1, brand2, brand3, etc. I would like to have that part dynamically change with whatever i do in the admin panel. Instead of using static links like i will to start off with, I'd like for the subcategories to be automatically inserted underneath the brands menu. I messed around with this for some time last night and got nowhere unfortunately. Thanks again for any help.

balinor 01-20-2006 08:53 AM

Ahh...you want this mod:

http://forum.x-cart.com/viewtopic.php?t=12058

Read through it, it gets better the further you go :)

yoshitoshi 01-20-2006 09:02 AM

sounds exactly what i was looking for. Thank you!


All times are GMT -8. The time now is 11:28 AM.

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