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

i really need help please. $parentid and $categoryid

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 02-10-2005, 03:04 PM
 
mpj mpj is offline
 

Senior Member
  
Join Date: Feb 2005
Posts: 106
 

Default i really need help please. $parentid and $categoryid

First I want to say thanks html_sucks for this original code
http://forum.x-cart.com/viewtopic.php?t=14905&highlight=subcategories




I made a few changes using his code in order to display subcategories on top of the menu.


Here what is looks like:





Home page menu display
----------------------
- Books
- CD - DVD - Video
----------------------

// 1st tier




When you click on books, the menu changes to
----------------------
Categories in this section are:
Internet (6)
Software (4)

- Books
Internet (6)
Software (4)
- CD - DVD - Video
----------------------

// 2nd tier




But when I click on the Internet section of the subcategory, the menu changes back to
----------------------
- Books
- CD - DVD - Video
----------------------

// 3rd tier



I think X-cart uses {parentid} to display for the 1st and 2nd tiers and then uses {categoryid} for the 3rd tier.
They did this so that the 3rd tier would have a default category by its own.

for example.

Your Company Name :: Books :: Internet :: PHP book
{parentid} {parentid} {categoryid} {categoryid}

You can click on Internet and see a list of PHP books.


It's when I click on the 3rd tier, this code doesn't function.


Please help!



Here is the code:

In my categories.tpl

Code:
{capture name=menu} {section name=cat_num loop=$subcategories} {if $subcategories[cat_num].product_count eq "0" } <a href="home.php?cat={ $subcategories[cat_num].categoryid }" class="ProductTitle"> { $subcategories[cat_num].category|escape }</a> {elseif $subcategories[cat_num].subcategory_count gte "0"} <a href="home.php?cat={ $subcategories[cat_num].categoryid }" class="ProductTitle"> { $subcategories[cat_num].category|escape }</a> ({$subcategories[cat_num].product_count}) {/if} {/section}
__________________
X-Cart 4.0.11


{My simple mods}
Adding Market list and % save on product detail
Quantity input box
Reply With Quote
  #2  
Old 02-10-2005, 08:16 PM
 
4pawsdesign 4pawsdesign is offline
 

Newbie
  
Join Date: Jan 2005
Posts: 8
 

Default

I was thinking of doing the same thing as well, but I am going to look into it later.

I just wanted to get the site up and running, and will redo the menu later, so the they drop down under the categories.

My best suggestion is just to copy the original located in the shop/skin1_original directory and start again, which will at least give you something to get working.

I know this isn't much help.
Can you let me know how you get on?
Regards
Lindsay
__________________
Regards

Lindsay

X cart gold v4.0.11 [unix].
Reply With Quote
  #3  
Old 02-11-2005, 08:30 AM
 
mpj mpj is offline
 

Senior Member
  
Join Date: Feb 2005
Posts: 106
 

Default

Hi Lindsay

Thanks for the reply. I'm not sure I understand your question.


I'm still looking into this. If someone can explain the tiers of menu, categories and subcategories, maybe that would help.
__________________
X-Cart 4.0.11


{My simple mods}
Adding Market list and % save on product detail
Quantity input box
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:39 AM.

   

 
X-Cart forums © 2001-2020