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

Category design....

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 08-11-2004, 08:21 AM
 
TonyD TonyD is offline
 

eXpert
  
Join Date: Mar 2004
Location: Okc
Posts: 288
 

Default Category design....

I want to seperate my categories like this...and the bullet would be great as well....I cant seem to get this to work right, any suggestions?

http://2.6Liter.com/./userfiles/MrBoost/category.JPG
__________________
X-Cart v 4.7.8(live)
Reply With Quote
  #2  
Old 08-15-2004, 11:23 PM
 
Yang Xu Yang Xu is offline
 

Senior Member
  
Join Date: May 2004
Location: Portland, Oregon
Posts: 175
 

Default

Hi, Tony:

As the XCart suports unlimited levels of categories, it seems that it is hard to fit multi levels in the area. Unless you limit the category with only two levels, but I don't think it is a good idea. You can use the java or javascript to create dynamic category. It unfolds when your mouse moves over it.

Have fun.
__________________
Carts n Tools.com
- New Root HTML Generator
- Templates | Add-Ons | Services
- XCart 4.0.x
Reply With Quote
  #3  
Old 08-16-2004, 03:19 AM
 
mikebo mikebo is offline
 

Advanced Member
  
Join Date: Feb 2004
Location: Ohio
Posts: 72
 

Default

Hi Tony,

I did a similar category list on my site. Here's what I'd suggest.

A.
Based on your list of categories, create the following categories in XCart Admin with the position as I listed. The categories "Office Equipment", "Phones", and "Cameras" would not have any products in them. The importance of the positions is just so you can have the categories line up as you want. Of course the numbers can be whatever you want as long as they are incremented for display.

1 Office Equipment
2 Printers
3 Fax Machines
4 Copiers
5 Toner and Supplies

6 Phones
7 Corded
8 Cordless
9 Office Phones
10 Hotel/Motel
11 Answering Machines
12 Caller Id Boxes
13 Phone Accessories
14 Cellular Accessories

15 Cameras
16 35 mm
17 Digital

B.
Create a new class in your css file and name it "CategoriesListHead". It will be used for the "Office Equipment", "Phones", and "Cameras" heading in your menu list. You can style it anyway you like.

C.
Go to your SQL Database and browse the xcart_categories table. Note the categoryid numbers for "Office Equipment", "Phones", and "Cameras". You could also get these categoryid numbers by clicking on the category in XCart admin and getting the categoryid from your browser address bar.
Let's say you found the categoryid numbers were 230 for "Office Equipment", 240 for "Phones", and 250 for "Cameras".

D.
Go to the skin1\customer\categories.tpl file and change this:
Code:
{if $active_modules.Fancy_Categories ne ""} {include file="`$fancycategories_config.modules_path`/fancy_categories.tpl"} {else} {if $config.General.root_categories eq "Y"} {section name=cat_num loop=$categories} <font class=CategoriesList>{$categories[cat_num].category_name}</font> {/section} {else} {section name=cat_num loop=$subcategories} <font class=CategoriesList>{$subcategories[cat_num].category_name}</font> {/section} {/if} {/if}

to this:

Code:
{if $active_modules.Fancy_Categories ne ""} {include file="`$fancycategories_config.modules_path`/fancy_categories.tpl"} {else} {if $config.General.root_categories eq "Y"} {section name=cat_num loop=$categories} {if $categories[cat_num].categoryid eq 230 or $categories[cat_num].categoryid eq 240 or $categories[cat_num].categoryid eq 250} <font class=CategoriesListHead>{$categories[cat_num].category_name|escape }</font> {else} <font class=CategoriesList>{ $categories[cat_num].category_name|escape }</font> {/if} {/section} {else} {section name=cat_num loop=$subcategories} <font class=CategoriesList>{$subcategories[cat_num].category_name}</font> {/section} {/if} {/if}

Once you've made these changes, you'll be able to play around with the bullet listing and format it however you want.

Hope this helps,
Mike
__________________
Mike
X-Cart Gold
Version 4.6.0 PHP 5.2.17
Reply With Quote
  #4  
Old 08-16-2004, 08:21 AM
 
TonyD TonyD is offline
 

eXpert
  
Join Date: Mar 2004
Location: Okc
Posts: 288
 

Default

Mike, it sounds like you are gettin me where i want to be with this...but i have no clue about creating the new style for the css...
__________________
X-Cart v 4.7.8(live)
Reply With Quote
  #5  
Old 08-16-2004, 08:58 AM
 
mikebo mikebo is offline
 

Advanced Member
  
Join Date: Feb 2004
Location: Ohio
Posts: 72
 

Default

Hi Tony

To add a class to your css file, go to your XCart admin area and click on the "Edit Templates" link which is located on the right side of the page under "Administration".

Under the "Browse Templates" section, click on the skin1.css file to open it. The skin1.css template file will be opened up in a editing pane.

Scroll down the file in the pane until you find this:

Code:
.CategoriesList { FONT-SIZE: 12px; }

and change it to:

Code:
.CategoriesList { FONT-SIZE: 12px; } .CategoriesListHead { FONT-SIZE: 12px; COLOR: #894142; FONT-WEIGHT: bold; }

Click the "Save File" button to save the file.

This will add a new class to your css file so you can style the heading of the category list. You can change the color or style to whatever you want.

Hope this helps,
__________________
Mike
X-Cart Gold
Version 4.6.0 PHP 5.2.17
Reply With Quote
  #6  
Old 08-16-2004, 09:11 AM
 
TonyD TonyD is offline
 

eXpert
  
Join Date: Mar 2004
Location: Okc
Posts: 288
 

Default

heh, i feel like such a newbie....now my category list is blank.....doh! the space is still there, but you can see anything or click any categories...
__________________
X-Cart v 4.7.8(live)
Reply With Quote
  #7  
Old 08-16-2004, 10:04 AM
 
mikebo mikebo is offline
 

Advanced Member
  
Join Date: Feb 2004
Location: Ohio
Posts: 72
 

Default

Hi Tony,

I'm not sure why you category list would be blank at this point.

Did you change the categoryid numbers in the code I posted to the categoryid numbers you got from your SQL table? I did not make this real clear in my post.

They should have been changed in this section of the code I posted above:

Code:
{if $categories[cat_num].categoryid eq 230 or $categories[cat_num].categoryid eq 240 or $categories[cat_num].categoryid eq 250}

These should be the categoryid numbers for your categories "Office Equipment", "Phones", and "Cameras".

If this is unclear to you, you should probably revert to your original files.

Hope this helps,
Mike
__________________
Mike
X-Cart Gold
Version 4.6.0 PHP 5.2.17
Reply With Quote
  #8  
Old 08-16-2004, 10:12 AM
 
TonyD TonyD is offline
 

eXpert
  
Join Date: Mar 2004
Location: Okc
Posts: 288
 

Default

i changed em...lookin over things to see what i may have missed....
__________________
X-Cart v 4.7.8(live)
Reply With Quote
  #9  
Old 08-16-2004, 10:58 AM
 
mikebo mikebo is offline
 

Advanced Member
  
Join Date: Feb 2004
Location: Ohio
Posts: 72
 

Default

One or two more thoughts Tony,

I do not have any subcategories. I'm not sure how this would work if you have subcategories. I read a few other posts on the topic and it seems this may be a issue.

You could check the source in your browser once the page has loaded. Check the area where the categories should appear and see if this gives you any leads.

Just a few thoughts,
__________________
Mike
X-Cart Gold
Version 4.6.0 PHP 5.2.17
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 06:05 AM.

   

 
X-Cart forums © 2001-2020