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

Grouping Categories for better viewing

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions
 
Thread Tools Search this Thread
  #11  
Old 04-28-2005, 12:10 PM
 
WPOO WPOO is offline
 

Advanced Member
  
Join Date: May 2004
Location: Delft - Netherlands -
Posts: 31
 

Default Does anyone know if it is possible.

I trying to get all my products under a cateory in a list. does anyone know how to do this?

Example:

Computers Shuttle:

Product Price Information
-------------------------------------------------------------------------------
product 1 100 yes
-------------------------------------------------------------------------------
product 2 184 yes
-------------------------------------------------------------------------------product 3 190 yes
-------------------------------------------------------------------------------



is this possible?

Thanks in advance for any answers.

WP
__________________
X-Cart Gold 4.13
X-Configurator
X-ROM
Easy Checkout
Reply With Quote
  #12  
Old 05-01-2005, 12:55 PM
  BCSE's Avatar 
BCSE BCSE is offline
 

X-Guru
  
Join Date: Apr 2003
Location: Ohio - bcsengineering.com
Posts: 3,070
 

Default

I'm not sure what you mean as the products in X-cart are listed under a category. ??

Maybe picture would be helpful of what you want it to look like?

Carrie
__________________
Custom Development, Custom Coding and Pre-built modules for X-cart since 2002!

We support X-cart versions 3.x through 5.x!

Home of the famous Authorize.net DPM & CIM Modules, Reward Points Module, Point of Sale module, Speed Booster modules and more!


Over 200 X-cart Mods available & Thousands of Customizations Since 2002 - bcsengineering.com

Please E-Mail us for questions/support!
Reply With Quote
  #13  
Old 05-03-2005, 08:54 PM
 
artinion artinion is offline
 

Advanced Member
  
Join Date: Feb 2005
Location: Bangkok, Thailand
Posts: 37
 

Default

I liked the example on the reffered web site.. Is there a way to create separate category listings in separate boxes? The example shows separate category listings but are grouped together in one box.

I am developing our new look on 4.0.12. Has anyone tried using the sample code on 4.0.12 with success? How was your mileage?

ainion
__________________
X-Cart v. 4.0.12 Gold
Linux, Apache, MySQL, PHP 4
Reply With Quote
  #14  
Old 05-16-2005, 09:39 PM
  BCSE's Avatar 
BCSE BCSE is offline
 

X-Guru
  
Join Date: Apr 2003
Location: Ohio - bcsengineering.com
Posts: 3,070
 

Default

Yes you should be able to do that. Would be a bit trickier. Did you get it figured out? I realize I"m responding quite a bit after you last posted.

Carrie
__________________
Custom Development, Custom Coding and Pre-built modules for X-cart since 2002!

We support X-cart versions 3.x through 5.x!

Home of the famous Authorize.net DPM & CIM Modules, Reward Points Module, Point of Sale module, Speed Booster modules and more!


Over 200 X-cart Mods available & Thousands of Customizations Since 2002 - bcsengineering.com

Please E-Mail us for questions/support!
Reply With Quote
  #15  
Old 05-21-2005, 02:40 AM
 
IndieDepot IndieDepot is offline
 

Advanced Member
  
Join Date: May 2005
Posts: 30
 

Default

Carrie,

I get the same "Blank Box" that 01bodyjewellery clamined to have gotten.

I backed up my original and copy/pasted your code above exactly as you instructed us to. After refresh, categories box comes back blank. Here is my entire modified categories.tpl file that i modified according to your instructions above:


Code:
{* $Id: categories.tpl,v 1.23 2004/06/24 09:53:29 max Exp $ *} {capture name=menu} {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].order_by eq 50 || $categories[cat_num].order_by eq 100 || $categories[cat_num].order_by eq 150} {* NOTE: CHANGE THIS TO BE WHAT EVER YOU WANT TO DIVIDE THE CATEGORIES *} {/if} <font class=CategoriesList>{ $categories[cat_num].category_name|escape }</font> {/section} {else} {section name=cat_num loop=$subcategories} <FONT class="CategoriesList">{$subcategories[cat_num].category}</FONT> {/section} {/if} {/if} {/capture} { include file="menu.tpl" dingbats="dingbats_categorie.gif" menu_title=$lng.lbl_categories menu_content=$smarty.capture.menu }

Using the above code, i get a blank categories box.

Now I will say this....
You told us to "Look for a section of code in skin1/customer/categories.tpl that looks like this: " and i find that my code is not exactly the same as the code you told us to look for. It is identical except for the a href link code.

The code you told us to look for:
Code:
<font class=CategoriesList>{ $categories[cat_num].category_name|escape }</font>

The code of my original file:
Code:
<FONT class="CategoriesList">{$categories[cat_num].category}</FONT>

Notice Carrie the difference towards the end of my code and how it's missing a few things. Welp, that's the way it came from the factory. Maybe 4.0.13 has a totally different categories.tpl file that will not work with your cool mod.

Hopefully you can check it out for us. *smile*

I am going back to FunkyCategories for the time being.

- Shannon
__________________
- www.TheShotList.com
X-Cart version 4.0.13
PHP 4.3.10
MySQL 4.0.23
Web server Apache
Operation system Linux
Perl 5.008004
XML parser (expat) 1.95.6
Reply With Quote
  #16  
Old 05-21-2005, 07:13 PM
  BCSE's Avatar 
BCSE BCSE is offline
 

X-Guru
  
Join Date: Apr 2003
Location: Ohio - bcsengineering.com
Posts: 3,070
 

Default

My code was for version 3.x Looks like version 4 needs a slight change. Try this:

Code:
{* $Id: categories.tpl,v 1.23 2004/06/24 09:53:29 max Exp $ *} {capture name=menu} {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].order_by eq 50 || $categories[cat_num].order_by eq 100 || $categories[cat_num].order_by eq 150} {* NOTE: CHANGE THIS TO BE WHAT EVER YOU WANT TO DIVIDE THE CATEGORIES *} {/if} <font class=CategoriesList>{ $categories[cat_num].category_name|escape }</font> {/section} {else} {section name=cat_num loop=$subcategories} <FONT class="CategoriesList">{$subcategories[cat_num].category}</FONT> {/section} {/if} {/if} {/capture} { include file="menu.tpl" dingbats="dingbats_categorie.gif" menu_title=$lng.lbl_categories menu_content=$smarty.capture.menu }

Let me know if that works and I'll include both in my free mod. Should work fine.

Thanks!

Carrie
__________________
Custom Development, Custom Coding and Pre-built modules for X-cart since 2002!

We support X-cart versions 3.x through 5.x!

Home of the famous Authorize.net DPM & CIM Modules, Reward Points Module, Point of Sale module, Speed Booster modules and more!


Over 200 X-cart Mods available & Thousands of Customizations Since 2002 - bcsengineering.com

Please E-Mail us for questions/support!
Reply With Quote
  #17  
Old 05-21-2005, 08:00 PM
  AgileMolecule's Avatar 
AgileMolecule AgileMolecule is offline
 

Member
  
Join Date: May 2005
Posts: 28
 

Default

Carrie-

This is exactly what I need but as I am an XCart virgin I really need a bit of guidance here if you have the time. Thanks in advance!

I am not understanding how the categories populate the menu area once this code is put in place. I can insert for example text or a line where you have directed us and it does show up fine but I just don't see any of the actual categories rendering.

I am obviously missing something here. Can you advise?
__________________
\"We have only scratched the surface of Mars\"...

Jim Garvin

X-Cart version 4.0.13
Reply With Quote
  #18  
Old 05-21-2005, 08:53 PM
  AgileMolecule's Avatar 
AgileMolecule AgileMolecule is offline
 

Member
  
Join Date: May 2005
Posts: 28
 

Default

Got it to work- two of the classes did not have quotations and what do I know but when I took out the "return" it worked so hopefully this helps someone out- Thanks for the work on your end Carrie this has really helped me out.

Code:
{* $Id: categories.tpl,v 1.23 2004/06/24 09:53:29 max Exp $ *} {capture name=menu} {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].order_by eq 50 || $categories[cat_num].order_by eq 100 || $categories[cat_num].order_by eq 150} --------------------{* NOTE: CHANGE THE LINES TO BE WHAT EVER YOU WANT TO DIVIDE THE CATEGORIES *} {/if} <FONT class="CategoriesList">{$categories[cat_num].category}</FONT> {/section} {else} {section name=cat_num loop=$subcategories} <FONT class="CategoriesList">{$subcategories[cat_num].category}</FONT> {/section} {/if} {/if} {/capture} { include file="menu.tpl" dingbats="dingbats_categorie.gif" menu_title=$lng.lbl_categories menu_content=$smarty.capture.menu }
__________________
\"We have only scratched the surface of Mars\"...

Jim Garvin

X-Cart version 4.0.13
Reply With Quote
  #19  
Old 05-21-2005, 09:08 PM
  AgileMolecule's Avatar 
AgileMolecule AgileMolecule is offline
 

Member
  
Join Date: May 2005
Posts: 28
 

Default

More lame coding from an XCart virgin.....

I imagine you pros can rip this to shreds but maybe it will help someone out-

Try this one out:

Remember to set your initial category numbers in the admin side according to what is in original Carrie's code- I just tweaked it a tad more here as an example.

Code:
{* $Id: categories.tpl,v 1.23 2004/06/24 09:53:29 max Exp $ *} {capture name=menu} {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].order_by eq 5} COOL STUFF AAA {/if} {if $categories[cat_num].order_by eq 50} COOL STUFF BBB {/if} {if $categories[cat_num].order_by eq 100} COOL STUFF CCC {/if} {if $categories[cat_num].order_by eq 150} COOL STUFF DDD {/if} <FONT class="CategoriesList">{$categories[cat_num].category}</FONT> {/section} {else} {section name=cat_num loop=$subcategories} <FONT class="CategoriesList">{$subcategories[cat_num].category}</FONT> {/section} {/if} {/if} {/capture} { include file="menu.tpl" dingbats="dingbats_categorie.gif" menu_title=$lng.lbl_categories menu_content=$smarty.capture.menu }
__________________
\"We have only scratched the surface of Mars\"...

Jim Garvin

X-Cart version 4.0.13
Reply With Quote
  #20  
Old 05-22-2005, 12:21 PM
 
IndieDepot IndieDepot is offline
 

Advanced Member
  
Join Date: May 2005
Posts: 30
 

Default

Carrie,
Thanks, but it did not work again. However AgileMolecule must have done something different. I guess the quotes on the classes did the trick.

Thanks BCSE & AgileMolecule for getting this to work with 4.0.13:

Carrie this would be a great addition to your FREE area on your wonderful website.

To end this discussion here's the code for everybody using 4.0.13 X-Cart. This should replace your entire /customer/categories.tpl file:

this works fine in 4.0.13 written by BCSE:

Code:
{* $Id: categories.tpl,v 1.23 2004/06/24 09:53:29 max Exp $ *} {capture name=menu} {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].order_by eq 50 || $categories[cat_num].order_by eq 100 || $categories[cat_num].order_by eq 150} --------------------{* NOTE: CHANGE THE LINES TO BE WHAT EVER YOU WANT TO DIVIDE THE CATEGORIES *} {/if} <FONT class="CategoriesList">{$categories[cat_num].category}</FONT> {/section} {else} {section name=cat_num loop=$subcategories} <FONT class="CategoriesList">{$subcategories[cat_num].category}</FONT> {/section} {/if} {/if} {/capture} { include file="menu.tpl" dingbats="dingbats_categorie.gif" menu_title=$lng.lbl_categories menu_content=$smarty.capture.menu }

this is a fancier version with custom headings for each section for 4.0.13 created by BCSE & upgraded by AgileMolecule:

Code:
{* $Id: categories.tpl,v 1.23 2004/06/24 09:53:29 max Exp $ *} {capture name=menu} {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].order_by eq 5} COOL STUFF AAA {/if} {if $categories[cat_num].order_by eq 50} COOL STUFF BBB {/if} {if $categories[cat_num].order_by eq 100} COOL STUFF CCC {/if} {if $categories[cat_num].order_by eq 150} COOL STUFF DDD {/if} <FONT class="CategoriesList">{$categories[cat_num].category}</FONT> {/section} {else} {section name=cat_num loop=$subcategories} <FONT class="CategoriesList">{$subcategories[cat_num].category}</FONT> {/section} {/if} {/if} {/capture} { include file="menu.tpl" dingbats="dingbats_categorie.gif" menu_title=$lng.lbl_categories menu_content=$smarty.capture.menu }

- Shannon
__________________
- www.TheShotList.com
X-Cart version 4.0.13
PHP 4.3.10
MySQL 4.0.23
Web server Apache
Operation system Linux
Perl 5.008004
XML parser (expat) 1.95.6
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions



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 05:07 AM.

   

 
X-Cart forums © 2001-2020