Important Notice from AspDotNetStorefront
It is with dismay that we report that we have been forced, through the action of hackers, to shut off write-access to this forum. We are keen to leave the wealth of material available to you for research. We have opened a new forum from which our community of users can seek help, support and advice from us and from each other. To post a new question to our community, please visit: http://forums.vortx.com
Results 1 to 7 of 7

Thread: Hide Categories to Customer Levels

  1. #1
    netprocity is offline Member
    Join Date
    Dec 2008
    Posts
    80

    Default Hide Categories to Customer Levels

    Hello,

    I am setting this website up for B2B, with lots of products and categories. Obviously one business is going to see some categories and products while another will see other categories and products.

    I can see how to associate a product to a customer level, but I can't see how to associate a category to a customer level. This would be absolutely necessary for any large scale B2B website.

    I did find a forum post that had someone who specified a particular customer level and simply showed the entire category level or not. In our case that would not work, as we will want to show certain categories to certain level and other categories to others.

    Here was the posting:
    http://forums.aspdotnetstorefront.co...?t=7535&page=2

    Can someone tell me if there is somewhere to do this in the newest version of ASPDNSF. AspDotNetStorefront ML 9.0.1.3/9.0.1.2?

    Or how any other B2B people manage to do this?

    Thanks
    James

  2. #2
    cjbarth is offline Senior Member
    Join Date
    Oct 2008
    Posts
    392

    Default

    You can put logic in the routine that builds the menu to filter based on Customer Level. Or you can put logic in the MasterPageBase to remove all category menu items that have no children and then just use Customer Level to filter the individual products, which would then result in some empty categories that you could remove.

    The second option would allow a great deal of future flexibility without having to constantly modify code based on new Customer Levels being added.
    ML9.3.1.1
    SQL 2012 Express
    VS 2010
    Azure VM

  3. #3
    netprocity is offline Member
    Join Date
    Dec 2008
    Posts
    80

    Default

    Thank you for your answer.

    I don't think altering the MasterPageBase will work as you suggested because the categories I want to hide have subcategories as well. I just want to hide some of the root categories so that all of their subcategories will not show.

    I want to do as you said:::

    You can put logic in the routine that builds the menu to filter based on Customer Level

    Where would I go about doing this in v9? I have read through lots of forum posts trying to find this answer, but there seems to be a lot of confusion out there about it.

    Can you directly me (pretty specifically) to where I find this logic and how I would filter out a specific customer level?

    Thanks so much for your help. I think this answer may help many others as well. I think it would be excellent in a future version that you add two things to your category administration. One of them being "hide category", and the other being a dropdown of customer levels so you could choose one show the category to only that level.

    Thanks
    James

  4. #4
    sduffy77 is offline Senior Member
    Join Date
    Feb 2010
    Location
    Lancaster, PA
    Posts
    142

    Default

    I was able to achieve this by filtering in the /admin/controls/AdminMenu.ascx.cs

  5. #5
    netprocity is offline Member
    Join Date
    Dec 2008
    Posts
    80

    Default

    Hi,

    Thanks for the comment. I looked at that file but it seems to be the menu items in administration that are affected by it. Maybe I just missed something? I am looking for the logic for the category menu navigation on the front end.

    More ideas?
    Thanks
    James

  6. #6
    cjbarth is offline Senior Member
    Join Date
    Oct 2008
    Posts
    392

    Default

    Look at App_Code/SiteMapProviderFactory.vb in the Public Shared Function GetSiteMap.
    ML9.3.1.1
    SQL 2012 Express
    VS 2010
    Azure VM

  7. #7
    johndonne47 is offline Junior Member
    Join Date
    Nov 2010
    Location
    USA
    Posts
    1

    Default

    Quote Originally Posted by cjbarth View Post
    Look at App_Code/SiteMapProviderFactory.vb in the Public Shared Function GetSiteMap.
    Tried with this and found solution for my little problem. thanks!