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

Rearranging and reconfiguring categories problem

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #21  
Old 08-03-2004, 04:46 AM
  BCSE's Avatar 
BCSE BCSE is offline
 

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

Default

I see what's going on. You didn't put my code in the right spot. Maybe it would be better explained to say to put it infront of this code:

Code:
# # Put subcategory_count to $subcategories array # if (!empty($subcategories)) foreach($subcategories as $key =>$subcategory) { $subcategory["subcategory_count"]=0; foreach($all_categories as $all_category) { if ($all_category["categoryid"]==$subcategory["categoryid"]) { $cur_dir_len = strlen($all_category["category"]); $current_subcategory=$all_category["category"]; } }

The code depends on the subcategories being created (or not created). So it has to go below the subcategory creation.

Otherwise, it looks like you have it if you notice browsing down the categories to say here:
http://www.solutionsforliving.biz/customer/home.php?cat=131
you have the parent's subcategories on the left side.

Also, since you have the root categories across the top, I have fixed my code to allow for that. So recopy the php code in my original fix so you don't have 2 copies of the root categories at the top.

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
  #22  
Old 08-03-2004, 07:51 AM
 
mikea93449 mikea93449 is offline
 

Member
  
Join Date: Jul 2004
Posts: 22
 

Default

CARRIE YOU'RE A GENIUS!!! Everything works perfectly. Thank you so much for taking time out to solve this problem and for your patience in dealing with my lack of php experience. You're very nice to do so.

I don't mean to take advantage of your generosity, but I do have one last issue. When a main category is clicked on across the top, in the center section of the page the subcategories are listed in addition to the subcategories now being listed on the left. What I would like is for featured products to be displayed in the center of the page instead of the subcategory listings. I'm assuming this is an easy fix and I only need to be pointed in the right direction, but what do I know? Also, I'm thinking that the word "description" that appears at the top of the center section can be changed by editing a file in the languages section. Am I close?

I promise I won't take up any more of your time after this.

Thanks again for your kindness in helping me out!

Mike
Reply With Quote
  #23  
Old 08-04-2004, 07:45 AM
  BCSE's Avatar 
BCSE BCSE is offline
 

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

Default

Glad you got it working!

I don't know about the genious part! LOL Many would argue on that one!

As far as getting rid of the categories in the middle, edit skin1/customer/main/subcategories.tpl and comment out much of the top that displays sub categories. Then it should just show featured products and/or products.

You'd want to start the commenting on this line:
Code:
{section name=cat_num loop=$subcategories}

And would probably want to end the commenting after:
Code:
{ if %cat_num.last% } </table> {/if} {/section}

I hope that makes sense!

To change the "description" word, try going into your categories and editing them. You will probably see the word "description" in the description section. I hope that makes sense when you look at it.

Good luck with the site! I think it looks nice and clean!

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
  #24  
Old 08-04-2004, 07:50 AM
  shan's Avatar 
shan shan is offline
 

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

Default

heres a similar thread for doing this in V4

http://forum.x-cart.com/viewtopic.php?t=12058
__________________
Looking for a reliable X-cart host ?
You wont go wrong with either of these.

EWD Hosting
Hands On Hosting
Reply With Quote
  #25  
Old 08-04-2004, 05:17 PM
 
mikea93449 mikea93449 is offline
 

Member
  
Join Date: Jul 2004
Posts: 22
 

Default

Thank you again Carrie & Shan... you've both been very helpful and without your advice I would never be as far along with this as I am. Thanks again... now I just have to figure out the back end stuff... stay tuned for more posts in the future.

Mike
Reply With Quote
  #26  
Old 10-22-2004, 12:00 PM
 
johnnydos johnnydos is offline
 

Member
  
Join Date: Apr 2004
Posts: 10
 

Default thanks for the code

Carrie,

I second mikea93449's sentiments. Works very nicely. Being able to access sibling categories is key.

Thanks
__________________
X-Cart version - 3.5.10
Operating System - FreeBSD
PHP - 4.3.3
MySQL server - 4.0.17
MySQL client - 3.23.56
Reply With Quote
  #27  
Old 03-20-2005, 06:17 AM
  BCSE's Avatar 
BCSE BCSE is offline
 

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

Default

You can see an example of the mod discussed here on:
http://www.purpleturtlekids.com

It's an old site I did a long time ago (2 years?) that I have revisited and made the look a bit fresher (within their budget).

If you click on the category tabs you will notice when you get to the end of a category tree branch (where there's no more subcategories) it will still show the previous set of subcategories in the purple bar.

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
  #28  
Old 04-11-2005, 10:00 AM
  Hyperdelicious's Avatar 
Hyperdelicious Hyperdelicious is offline
 

Senior Member
  
Join Date: Sep 2002
Location: In the Middle of Nowhere
Posts: 138
 

Default only show sub categories

Quote:
Originally Posted by shan
heres a similar thread for doing this in V4

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


The link Shan provided works great for me in 4.0.13 ... however, unlike what is mentioned here it does not discuss showing only the sub categories.
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 04:06 AM.

   

 
X-Cart forums © 2001-2020