Hiding categories?
Hiding categories?
We have certain custom printed materials that we only want to make available to certain users who we've certified. It looks like it would be easy enough to make a group then assign permissions to that group, but is there any to hide that whole category of products so that I doesn't appear on any search for regular users?
- jmestep
- AbleCommerce Angel
- Posts: 8164
- Joined: Sun Feb 29, 2004 8:04 pm
- Location: Dayton, OH
- Contact:
Re: Hiding categories?
You should be able to set it to private (the ghost icon). Then it is accessible only by direct link.
Judy Estep
Web Developer
jestep@web2market.com
http://www.web2market.com
708-653-3100 x209
New search report plugin for business intelligence:
http://www.web2market.com/Search-Report ... -P154.aspx
Web Developer
jestep@web2market.com
http://www.web2market.com
708-653-3100 x209
New search report plugin for business intelligence:
http://www.web2market.com/Search-Report ... -P154.aspx
Re: Hiding categories?
Public, Private and Hidden categories
Re: Hiding categories?
With a couple of small tweaks, you can place your "hidden" category as a link on the left nav, and reveal it for only certain groups (the alternative is sending those users a direct link).
First, make a small change in SimpleCategoryList.ascx.cs from this:
to this:
Then, wrap an entry point to your hidden category with some Velocity markup in your sidebar.htm scriplet:
CAVEATS:
Changing the SimpleCategoryList control will affect your site globally. If you use this control elsewhere, you'll also have to ensure that your hidden categories can't be descended to in the category tree by normal nav items. The easiest way of doing this would be to branch all hidden categories off a single top-tier category, and don't make an entry point below (i.e. don't use [[ConLib:Custom\SimpleCategoryList CategoryId="0" ]])
First, make a small change in SimpleCategoryList.ascx.cs from this:
Code: Select all
CategoryList.DataSource = CategoryDataSource.LoadForParent(_CategoryId, true);
Code: Select all
CategoryList.DataSource = CategoryDataSource.LoadForParent(_CategoryId, false);
Code: Select all
#if ($customer.IsInGroup(2))
[[ConLib:Custom\SimpleCategoryList CategoryId="39" HeaderText="Consumer"]]
#end
Changing the SimpleCategoryList control will affect your site globally. If you use this control elsewhere, you'll also have to ensure that your hidden categories can't be descended to in the category tree by normal nav items. The easiest way of doing this would be to branch all hidden categories off a single top-tier category, and don't make an entry point below (i.e. don't use [[ConLib:Custom\SimpleCategoryList CategoryId="0" ]])
Nick Cole
http://www.ethofy.com
http://www.ethofy.com
Re: Hiding categories?
Great input-- thanks to all! I'll be back the office where I can try this stuff out on the dev site. Looks like just what we need.
-
- Ensign (ENS)
- Posts: 5
- Joined: Mon Jul 14, 2008 3:14 pm
Re: Hiding categories?
Could this be applied to individual products inside of a category in a similar fashion?
Re: Hiding categories?
Yes, but it would be ugly to maintain; category pages are rendered using repeaters, so logic would be better to be databound. Without knowing how many user groups, how many products... The "best" solution would be to establish 2 new properties in the Product class: a collection of user groups for which the product should be visible, a boolean property to determine if the product's visibility is user-bound; and a Product class method for inspecting the current state given Product id and User Id.
Nick Cole
http://www.ethofy.com
http://www.ethofy.com
-
- Ensign (ENS)
- Posts: 5
- Joined: Mon Jul 14, 2008 3:14 pm
Re: Hiding categories?
Current I only have 1 group and good chance that's all I will have. Current situation calls for the quickest/easiest way to implement "product" level visibility/security as controlled by "user groups", but ideally it would be setup similar to how products can have different prices based on a user group.
That said, your explanation calls for creating new properties and a new class. Can you provide me with more detail on where exactly to start? Are there any examples out there of this being done before? I've searched through the API, WIKI, and Forums. Conceptually I understand the idea, but not how to implement within the AbleCommerce framework without requiring the modification of the source code.
Thanks!
That said, your explanation calls for creating new properties and a new class. Can you provide me with more detail on where exactly to start? Are there any examples out there of this being done before? I've searched through the API, WIKI, and Forums. Conceptually I understand the idea, but not how to implement within the AbleCommerce framework without requiring the modification of the source code.
Thanks!
Re: Hiding categories?
I am doing something similar with my site. Is it possible to not have hidden products show up in searches?
Thanks!
Thanks!
Re: Hiding categories?
Hidden products don't appear in searches but accessible via a direct URL. For example if there is a product A having access URL www.xyz.xyz/a1.apx and its visibility is hidden. Then this will not appear in store searches or in category listing. But if some one supplies its direct link www.xyz.xyz/a1.apx then it will be displayed. In order to fully block the product turn its visibility to private.