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)
-   -   2 Main Category Sections...how? (https://forum.x-cart.com/showthread.php?t=20262)

rkdiddy 03-01-2006 09:23 PM

2 Main Category Sections...how?
 
Ok I did some searching and couldn't find anything on this. FYI: I'm a total newb...so any help would be very appreciated!

What I'm looking to do is have two main category sections/boxes.

For Instance:

<CATEGORY BOX #1>
Systems (category name)
Xbox (sub category)
Nintendo
Xbox 360

<CATEGORY BOX #2>
Accessories
Controllers
Games
Cables

IAlso, by doing the above how do I control what goes in each categories fall under each main category?

Please help! :D

X-cart 4.0.17

shan 03-02-2006 03:16 AM

set the pos field on categories for section 1 below say 500 and section 2 above 500 then within the categories loop do something like

Code:

{section name=cat_num loop=$categories}
{if $categories[cat_num].order_by < 500}

blah blah

{/if}
{/section}


then create a new tpl for categories2 with similar code but > 500

now include the new categories2 tpl file below the std one in home.tpl

rkdiddy 03-02-2006 06:51 AM

THANK YOU SO MUCH!

To be honest when I first read your post I was lost...but walked through the steps and BAM it worked!

Thanks! :D

webtron 03-15-2006 11:00 AM

rkdiddy,

you got a screenshot of how it came out?

pcarcare 03-15-2006 09:41 PM

I did this for one of my clients. I created a new menu box with the categories links, then changed the code so the links wouldn't show in the main (default) category box. I can't remember what I changed in the code, but I can find if for you if needed.

You can see this as http://www.starvingpilotshop.com/shop/home.php

webtron 03-16-2006 09:19 AM

pcarcare,

I like what you did. I'm good for now.
I'll be sure to contact you if I can't figure it out.

Note to all:
I found a freebie code from BSCE (Carrie) that allows
you to group categories and put a heading on each group.

Heading 1
-abc
-def

Heading 2
-ghi
-xyz

justme 09-13-2006 10:36 PM

Re: 2 Main Category Sections...how?
 
Quote:

Originally Posted by shan
set the pos field on categories for section 1 below say 500 and section 2 above 500 then within the categories loop do something like

Code:

{section name=cat_num loop=$categories}
{if $categories[cat_num].order_by < 500}

blah blah

{/if}
{/section}


then create a new tpl for categories2 with similar code but > 500

now include the new categories2 tpl file below the std one in home.tpl


This is just what I was looking for! Thanks!

What is the code for a categories3 box, such as
{if $categories[cat_num].order_by > 300 but <500}

I've been searching, so far I haven't found what works.

Thanks in advance for your help.

inebriate 09-13-2006 10:45 PM

Re: 2 Main Category Sections...how?
 
Quote:

Originally Posted by justme
This is just what I was looking for! Thanks!

What is the code for a categories3 box, such as
{if $categories[cat_num].order_by > 300 but <500}

I've been searching, so far I haven't found what works.

Thanks in advance for your help.


{if $categories[cat_num].order_by > 300 and $categories[cat_num].order_by < 500}

justme 09-13-2006 10:54 PM

Re: 2 Main Category Sections...how?
 
Perfect, thank you so much!!

sohaibkhan 12-21-2006 12:19 PM

Re: 2 Main Category Sections...how?
 
I am newbie, could you please explain which file you have edit... In order to get two categories boxes.


All times are GMT -8. The time now is 01:18 PM.

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