Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

2 Main Category Sections...how?

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 03-01-2006, 09:23 PM
  rkdiddy's Avatar 
rkdiddy rkdiddy is offline
 

Advanced Member
  
Join Date: Mar 2005
Posts: 60
 

Default 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!

X-cart 4.0.17
__________________
Stealth Cords - Discrete Power Cords for Automotive Enthusiasts
www.stealthcords.com
X-Cart version: 4.1.9
Reply With Quote
  #2  
Old 03-02-2006, 03:16 AM
  shan's Avatar 
shan shan is offline
 

X-Guru
  
Join Date: Sep 2002
Location: Birmingham, UK
Posts: 6,163
 

Default

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
__________________
Looking for a reliable X-cart host ?
You wont go wrong with either of these.

EWD Hosting
Hands On Hosting
Reply With Quote
  #3  
Old 03-02-2006, 06:51 AM
  rkdiddy's Avatar 
rkdiddy rkdiddy is offline
 

Advanced Member
  
Join Date: Mar 2005
Posts: 60
 

Default

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!
__________________
Stealth Cords - Discrete Power Cords for Automotive Enthusiasts
www.stealthcords.com
X-Cart version: 4.1.9
Reply With Quote
  #4  
Old 03-15-2006, 11:00 AM
 
webtron webtron is offline
 

Advanced Member
  
Join Date: Jul 2005
Posts: 64
 

Default

rkdiddy,

you got a screenshot of how it came out?
__________________
Thanks to for your comments/help.
X-cart Version 4.0.17
Reply With Quote
  #5  
Old 03-15-2006, 09:41 PM
 
pcarcare pcarcare is offline
 

eXpert
  
Join Date: Jun 2004
Location: Salt Lake City, Utah
Posts: 230
 

Default

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
__________________
X-cart gold 4.5.2 (live)
X-payments 1.0.5

http://www.professionalcarcare.com
Your online source for all your car care needs
Reply With Quote
  #6  
Old 03-16-2006, 09:19 AM
 
webtron webtron is offline
 

Advanced Member
  
Join Date: Jul 2005
Posts: 64
 

Default

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
__________________
Thanks to for your comments/help.
X-cart Version 4.0.17
Reply With Quote
  #7  
Old 09-13-2006, 10:36 PM
 
justme justme is offline
 

Member
  
Join Date: Jul 2004
Location: Western New York State, USA
Posts: 28
 

Default 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.
Reply With Quote
  #8  
Old 09-13-2006, 10:45 PM
 
inebriate inebriate is offline
 

eXpert
  
Join Date: May 2006
Posts: 301
 

Default 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}
__________________
x-cart pro 4.0.18
linux
www.fabric8d.com (currently undergoing construction)
Reply With Quote
  #9  
Old 09-13-2006, 10:54 PM
 
justme justme is offline
 

Member
  
Join Date: Jul 2004
Location: Western New York State, USA
Posts: 28
 

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

Perfect, thank you so much!!
Reply With Quote
  #10  
Old 12-21-2006, 12:19 PM
 
sohaibkhan sohaibkhan is offline
 

Advanced Member
  
Join Date: Apr 2006
Posts: 78
 

Default 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.
__________________
Current version: 4.1.5 Centos 4x
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 07:52 PM.

   

 
X-Cart forums © 2001-2020