HomeHome Product Discus... Product Discus...SmithCartSmithCartCan I get the current category from the product page?Can I get the current category from the product page?
Previous
 
Next
New Post
7/27/2011 9:46 AM
 

Hey all

 

On Product detail, does anyone know how to get the current categoryid?  I am not using the stock cat/subcat browser, I had to roll my own for a customer requirement.  I sniffed around the output, I see ProductID is in session.  I don't see categoryid. 

From another post, I see that tvCatMenuSelected is a sessvar that can contain it, but as I am not using the cat/subcat browser it won't work for me.

 
New Post
7/27/2011 6:29 PM
 
Hi David,

If you are not using the SmithCategoryMenu module you will not be able to capture the categoryids.

May i ask what you are trying to achieve?

Thanks,
 
New Post
7/28/2011 6:39 AM
 
I wish I could use your cat browser, customer has a requirement that the left menu show like this:

Category 1
-----------> Item 1
-----------> Item 2
Category 2
-----------> Item 3
-----------> Item 4

I have it working through a very clever Razor report module against category/product associative tables. My issue was that depending upon how they land on the product, I need to "open" a category and show other items. I did this by using HTTP_Referrer in my razor syntax, but if they land on a product I cannot link it in the side menus properly.

Again, no big deal at this point, but I thought if you could expose the product object to template or binding <% %> syntax we could make some nice custom pages.
 
Previous
 
Next
HomeHome Product Discus... Product Discus...SmithCartSmithCartCan I get the current category from the product page?Can I get the current category from the product page?