Print Page | Close Window

Hiding a category from menu

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=5896
Printed Date: 28-September-2024 at 11:38am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Hiding a category from menu
Posted By: lcameron
Subject: Hiding a category from menu
Date Posted: 19-June-2014 at 7:25am
We have created a category "Shop by Color" but have built a special button for our site for this category and don't want it to appear in our main menu. Anyone know a way of generating the category/menus and leaving out a single category from it? 



Replies:
Posted By: Greg Dinger
Date Posted: 19-June-2014 at 10:08am
add a flag to the category admin to hide the category in all circumstances (versus the hide flag that is already there) and then code the nav generator to enforce that flag.

-------------
GreyBeard Design Group

Certified ProductCart Developer

Web Design/Development/Hosting

http://tinyurl.com/5c8t4t" rel="nofollow - Add-Ons & Custom Code |


Posted By: lcameron
Date Posted: 19-June-2014 at 10:52pm
Thanks for the reply Greg. I assume you mean to tick the "Hide this category in the storefront" under Other Settings in the category which I tried and when I generate the navigation menu it disappears which is what we wanted, however if I try to link to the category I get a message that the category cannot be viewed.. I assume I am not doing something correctly when linking to the category, would you be able to explain a bit more what you mean by the flags?


Posted By: Greg Dinger
Date Posted: 19-June-2014 at 11:57pm

When I said "add a flag to the category admin", I meant that literally.  We encounter the requirement you are describing frequently, and stock functionality fails to address it. 

So we add a flag to the category table, alter the category admin to support that flag, and then make alterations to the category page and category navigation generator that cause flagged categories to vanish.  That overcomes the issue you describe in your latest post.



-------------
GreyBeard Design Group

Certified ProductCart Developer

Web Design/Development/Hosting

http://tinyurl.com/5c8t4t" rel="nofollow - Add-Ons & Custom Code |


Posted By: lcameron
Date Posted: 20-June-2014 at 12:23am
Sorry, still unsure about where I am putting the "flag" sounds like outside the control panel?


Posted By: Greg Dinger
Date Posted: 20-June-2014 at 1:14am

I'm proposing that the answer to your request is custom programming.

We, or one of the other developers should be able to do this in a few hours.  For a programmer familiar with the code this is a fairly easy mod.



-------------
GreyBeard Design Group

Certified ProductCart Developer

Web Design/Development/Hosting

http://tinyurl.com/5c8t4t" rel="nofollow - Add-Ons & Custom Code |


Posted By: DebbieID
Date Posted: 02-August-2014 at 3:15pm

I think we do the same thing with a bit of a "cheat" procedure.  We have a couple of categories that we don't want to appear in the navigation.  So I hide the categories, generate the navigation, then go and unhide them again.  This way, they don't show up in the navigation, but if there is a button or link somewhere on the site, it will still go to the page without returning the error message.  Note:  The link will still show up on the main view categories page - we have made it go to the bottom so it's not mixed in with the rest of the categories.

The main trick with this method is to remember to hide the category before generating the navigation, and then remembering to unhide it after.




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