![]() |
getting the parent category Id |
Post Reply
|
| Author | |
gjk2701
Newbie
Joined: 12-April-2007 Location: Canada Status: Offline Points: 0 |
Post Options
Thanks(0)
Quote Reply
Topic: getting the parent category IdPosted: 18-September-2007 at 10:58am |
|
Hi, I am working on customizing product cart to work with my site - just starting out. My left navigation is dependent on the current category and/or parent category - I am able to access the category id using the variable intIdCategory but can't see how to get at the parent category. thanks in advance for any help. gjk |
|
![]() |
|
Jackalope
Groupie
Joined: 07-July-2006 Status: Offline Points: 0 |
Post Options
Thanks(0)
Quote Reply
Posted: 18-September-2007 at 12:30pm |
|
I believe that when you click the link to the "child" category and the page is displayed, right below the category heading is the navigation (somthing like "Our Products:...". You should be able to click the category just before the "child" category that is currently being displayed and get the link for the "parent" category. If anyone knows of a better way, let us know. |
|
![]() |
|
netprofits
Certified ProductCart Developers
Joined: 05-January-2006 Location: United States Status: Offline Points: 22 |
Post Options
Thanks(0)
Quote Reply
Posted: 18-September-2007 at 12:56pm |
|
If you are creating a custom list of categories and not using the default list built into product cart, you can read the record in the categories table for the category ID you are currently working with (intIdCategory) and get the idParentCategory field from that record. Something like this: "Select idParentCategory From categories Where idCategory =" & intIdCategory |
|
![]() |
|
gjk2701
Newbie
Joined: 12-April-2007 Location: Canada Status: Offline Points: 0 |
Post Options
Thanks(0)
Quote Reply
Posted: 18-September-2007 at 1:41pm |
|
Thanks, I will do that. I was wondering if I could avoid a database hit - i.e if it might already be done and assigned to a variable I could access similar to the intIdCategory. It would be nice to have a list of the variables that are available based on the standard code...
appreciate the help. |
|
![]() |
|
Post Reply
|
|
|
Tweet
|
| Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |