ProductCart E-Commerce Solutions Homepage
Forum Home Forum Home > ProductCart > Customizing ProductCart
  New Posts New Posts RSS Feed - getting the parent category Id
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

getting the parent category Id

 Post Reply Post Reply
Author
Message
gjk2701 View Drop Down
Newbie
Newbie


Joined: 12-April-2007
Location: Canada
Status: Offline
Points: 0
Post Options Post Options   Thanks (0) Thanks(0)   Quote gjk2701 Quote  Post ReplyReply Direct Link To This Post Topic: getting the parent category Id
    Posted: 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
Back to Top
Jackalope View Drop Down
Groupie
Groupie


Joined: 07-July-2006
Status: Offline
Points: 0
Post Options Post Options   Thanks (0) Thanks(0)   Quote Jackalope Quote  Post ReplyReply Direct Link To This Post 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.

Back to Top
netprofits View Drop Down
Certified ProductCart Developers
Certified ProductCart Developers


Joined: 05-January-2006
Location: United States
Status: Offline
Points: 22
Post Options Post Options   Thanks (0) Thanks(0)   Quote netprofits Quote  Post ReplyReply Direct Link To This Post 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

NetProfits Internet Consulting

Certified ProductCart Developer

Our Site
Back to Top
gjk2701 View Drop Down
Newbie
Newbie


Joined: 12-April-2007
Location: Canada
Status: Offline
Points: 0
Post Options Post Options   Thanks (0) Thanks(0)   Quote gjk2701 Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.078 seconds.