OroCommerce Forums

Covering OroCommerce topics, including community updates and company announcements.

Forums OroCommerce Category Visibility

This topic contains 8 replies, has 3 voices, and was last updated by  marius.negoescu 2 months, 3 weeks ago.

  • Creator
    Topic
  • #38899

    marius.negoescu
    Participant

    Hi, guys

    We have a bit of a situation with visibility.

    At the Category level there are 3 tabs:

    Visibility to All
    Visibility to Customer Groups
    Visibility To Customers

    If I set the Visibility to All to Parent Category and the Non-Authenticated Visitors group in the Visibility To Customer Groups to Visibility to All, does this mean it will inherit the visibility from Visibility to All tab, so the Parent Category or it will be visible for all ?

    Cheers, Marius

Viewing 8 replies - 1 through 8 (of 8 total)
  • Author
    Replies
  • #38904
    Andrey Yatsenko
    Andrey Yatsenko
    Moderator

    Hi Marius,

    It is described at the documentation in details
    https://github.com/oroinc/orocommerce/blob/master/src/Oro/Bundle/VisibilityBundle/Resources/doc/category-visibility.md

    Visibility to All means it will inherit the visibility from Visibility to All tab.

    #38905

    marius.negoescu
    Participant

    Well, it’s not working.

    I have tried it on the demo site and also on a local version and it’s not inheriting the visibility.

    Cheers, Marius

    #38906
    Andrey Yatsenko
    Andrey Yatsenko
    Moderator

    Please describe steps to reproduce. What settings do you have for a parent and the child category and how do you check the visibility for products in the category.

    #38911

    marius.negoescu
    Participant

    It’s actually pretty simple.

    On the demo site here: https://demo.orocommerce.com, I am looking at this product:

    https://demo.orocommerce.com/desktop/medical-tag-sterling-silver-rhodium-plated as a non authenticated user.

    In the admin everything on the product visibility level is pointing to the category level.

    The category level for this product is: All Products / Medical / Patient Identification

    In the Patient Identification the category visibility level is pointing to the parent category, which is Medical.

    I then edited the Medical Visibility to Customer Groups from Visible to All to Hidden for Non-Authenticated Visitors, this should have not allowed me to view the product in question if i was non authenticated, yet I was able to view it.

    Cheers, Marius

    #38913
    Michael
    Michael
    Keymaster

    Hello Marius,

    Visibility “inheritance” always works

    • from a more specific setting to a less specific setting of the same entity, or
    • from the setting of the current entity to the same setting of the parent entity.

    For example, “Visibility to Customer Groups Non-Authenticated Visitors can be “inherited” from:

    • “Visibility to All” of the product itself
    • “Visibility to Customer Groups Non-Authenticated Visitors” of the category that the product belongs to

    Same applies to categories – 1) more specific to less specific of the same category, or 2) the same setting of the parent category.

    In your case the full path is as follows:

    • product TAG3 – Visibility to Customer Groups – Non-Authenticated Visitors = Current Product
    • product TAG3 – Visibility to All = Category
    • category Patient Identification – Visibility to All = Parent Category
    • category Medical – Visibility to All = Parent Category
    • category All Products – Visibility to All = Config
    • System Configuration – Category Visibility to Customers = Use Default
    • default value in the configuration file = Visible

    As you can see, once we switched from the more specific (visibility to customer groups) to less specific (visibility to all) setting at some point – we can never go back from less specific (visibility to all) to more specific (visibility to customer groups).

    So, if you want to manage visibility to specific customer group of some products in a category on a category level, you need to make sure that the “Visibility to Customer Groups – Non-Authenticated Visitors” = Category, and that each “intermediate” category up to the levels where you will actually define visibility is also set “Visibility to Customer Groups – Non-Authenticated Visitors” = Parent Category.

    In your example this would mean:

    • product TAG3 – Visibility to Customer Groups – Non-Authenticated Visitors = Category
    • category Patient Identification – Visibility to Customer Groups – Non-Authenticated Visitors = Parent Category
    • category Medical – Visibility to Customer Groups – Non-Authenticated Visitors = Hidden
    #38914

    marius.negoescu
    Participant

    So, if I set:

    product TAG3 – Visibility to Customer Groups – Non-Authenticated Visitors = Visibility to All
    product TAG3 – Visibility to All = Category
    category Patient Identification – Visibility to Customer Groups – Non-Authenticated Visitors = Visibility to All
    category Patient Identification – Visibility to All = Parent Category
    category Medical – Visibility to Customer Groups – Non-Authenticated Visitors = Hidden

    This will not make it hidden, right ?

    Cheers, Marius

    #38925
    Michael
    Michael
    Keymaster

    Right.

    • product TAG3 – Visibility to Customer Groups – Non-Authenticated Visitors = Visibility to All ← here you switched from more specific to less specific setting
    • product TAG3 – Visibility to All = Category
    • category Patient Identification – Visibility to Customer Groups – Non-Authenticated Visitors = Visibility to All ← more specific setting is not considered anymore
    • category Patient Identification – Visibility to All = Parent Category
    • category Medical – Visibility to Customer Groups – Non-Authenticated Visitors = Hidden ← more specific setting is not considered anymore
    #38961

    marius.negoescu
    Participant

    Any idea how we could setup the visibility so products Visibility To Customer Groups is set as default to Category instead of the Current Product ?

    Cheers< Marius

Viewing 8 replies - 1 through 8 (of 8 total)

You must be logged in to reply to this topic.

You will be redirected to [title]. Would you like to continue?

Yes No