Print Page | Close Window

Expanding menu code

Printed From: ProductCart E-Commerce Solutions
Category: ProductCart
Forum Name: Customizing ProductCart
Forum Description: Exchange messages with other users that are customizing ProductCart.
URL: https://forum.productcart.com/forum_posts.asp?TID=52
Printed Date: 21-November-2024 at 12:48pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Expanding menu code
Posted By: lelady
Subject: Expanding menu code
Date Posted: 24-November-2005 at 12:33am
I've been using the expanding menu code located in the developers corner for sometime with good results. However,  I would like to "exclude" a catagory or two from being displayed. Has anyone had any luck modifying this code or would any of the developers be interested in doing this?



Replies:
Posted By: bkats
Date Posted: 24-November-2005 at 7:59pm

Can you use the "Hide Category" feature?



Posted By: lelady
Date Posted: 02-December-2005 at 12:09pm

I did try that.

Unfortunately, if I use the hide catagory option, and I place a link to this specific catagory in another area, when you click on it you receive an error message that the catagory does not exist.

 



Posted By: Nothing
Date Posted: 05-December-2005 at 4:11am
Hi

The below code removed an item from the menu on my site. I’m using ProductCart v2.75g12a16. Without getting too deep into the matter, I would think that you might run into many other issues around your site. The menu item(s) would still appear on ‘generating a static site index’… the search results would still display items in the hidden categories.. etc etc. etc.

Find the file “inc_catsmenuA.asp” in the /pc/ folder

Go to line 109

I wanted to remove category 3 so I changed line 109 from this:

query="select idcategory,categorydesc from categories where idParentCategory=1 and idCategory>1 and iBTOhide=0 " & pcv_strTemp & " ORDER BY priority, categoryDesc ASC"

to this:

query="select idcategory,categorydesc from categories where idParentCategory=1 and idCategory<>3 and idCategory>1 and iBTOhide=0 " & pcv_strTemp & " ORDER BY priority, categoryDesc ASC"

to remove category 3 and 7 you could try:

query="select idcategory,categorydesc from categories where idParentCategory=1 and idCategory<>3 and idCategory<>7 and idCategory>1 and iBTOhide=0 " & pcv_strTemp & " ORDER BY priority, categoryDesc ASC"

you might also want to check the latest version of Product Cart. Maybe it addresses your issues? also, if any database techies can see a reason NOT to use the above code please speak up!

hope it helps

nothing



Posted By: lelady
Date Posted: 05-December-2005 at 10:39am

I don't want the category hidden from customers in general, just from a particular menu I have on the site- this way I can create a couple of different expanding menus for different types of things.

I did a quick test on my local server and it appears to be exactly what I was looking for!

Thank you!!! I love these forums!!!!

 

 




Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net