• Resolved Argentum

    (@argentum)


    Hi,
    I am trying to hide the Add to cart buttons for every user role except Administrator. I am lost trying to figure out the semantics of the Module settings. The settings use ‘Disable’ in both the checkbox label and in the checkbox action string. It is confusing. It looks like this:

    Add to cart button visibility module settings
    Add to cart button visibility [] Activate module
    Enable/disable Add to Cart button globally or on per product basis.
    >> Understandable so far.

    Heading All products

    All products [] Activate section
    >> Ok, so here I disable all the Add to cart buttons everywhere? Or do I need to disable the button in the settings under All products [] Enable section?
    Disable Buttons on Category/Archives Pages [] Disable
    >> What does this mean? Does it mean that I can override the All products [] checkbox and disable the global ‘All products’ disabling setting above = thus enabling the Add to cart button on Category/Archives Pages? I.e. the setting could be interpreted as disable the disabling.

    Your documentation has this confusing use of “disable” too. You write:
    Disable buttons on category/archives pages [] Disable.
    Default: no.
    Yes or no isn’t values you can select. And the opposite of disable isn’t yes.

    Apart from that, I can’t get the hiding to work as I want. What checkboxes should I have selected in “Add to cart visibility settings” combined with “Modules By User Roles” if I want to hide the Add to cart buttons to all user roles beside “Administrator” and a custom role called “AF”?

    Regards
    Magnus

Viewing 7 replies - 1 through 7 (of 7 total)
  • Hi Magnus,

    All products [] Activate section

    When section is enabled, all options below in this section (up until Per Product) are functioning. In other words, it helps to quickly enable/disable multiple option (whole section) at once. You should leave this enabled.

    Disable Buttons on Category/Archives Pages []

    This is the option that now actually disables the add to cart button on category and archive pages. You should also leave this enabled.

    If I understand you correctly, you would also want to enable “Disable Buttons on Single Product Pages” option.

    Then in “Modules by User Roles” you would add this module to “Enable Modules” section for Administrator.

    Hope that clears things up.

    • This reply was modified 5 years, 3 months ago by RokasJ.
    Thread Starter Argentum

    (@argentum)

    Hi, Rokasj
    Would it not be a good thing if the GUI components in the section
    All products [] Activate section
    would be greyed out until you activate the section? Like for autoptimize that has three sections; javascript, css and html.

    View post on imgur.com


    As it is now you can enable ‘Disable Buttons on Category/Archives Pages’ though the section All products [] Activate section is not checked.

    Modules per User Role
    I want to hide the Add to cart for everybody but role ‘administrator’ and role ‘af’. Does that mean that I in module ‘Modules per User Role’ should enable module ‘Add to cart button visibility’ for every existing role but ‘administrator’ and ‘af’? Or/and disable module ‘Add to cart button visibility’ for ‘administrator’ and ‘af’?

    Hi,

    Yes, you’re right, you should add the module to disable section of these 2 user roles.

    Regarding making these options greyed out, I will forward this to our development team. However, making some fields greyed out could confuse users of the free version, as paid options are greyed out as well.

    Thread Starter Argentum

    (@argentum)

    Hi again,

    I still don’t understand what the activate section is for, when you can check the two sub items (Disable on Category/Archives Pages and Disable for Single products). It looks like this:
    All products
    All products [] Activate
    Disable on Category/Archives Pages [] Disable.
    Disable buttons on single product pages [] Disable.

    1. What is the result if I have this setting?
    All products [X] Activate
    Disable buttons on Category/Archives Pages [] Disable.
    Disable buttons on single product pages [] Disable.

    2. What is the result if I have this setting?
    All products [] Activate
    Disable buttons on Category/Archives Pages [X] Disable.
    Disable buttons on single product pages [] Disable.

    3. What is the result if I have this setting?
    All products [X] Activate
    Disable buttons on Category/Archives Pages [X] Disable.
    Disable buttons on single product pages [X] Disable.

    4 Is (3) different from having this setting?
    All products [X] Activate
    Disable buttons on Category/Archives Pages [] Disable.
    Disable buttons on single product pages [] Disable.

    The thing that confuses me is the double negatives in this:
    Disable buttons on Category/Archives Pages [] Disable.
    Why not just have it like this?
    Disable buttons on Category/Archives Pages []

    Best regards
    Magnus

    • This reply was modified 5 years, 2 months ago by Argentum.
    • This reply was modified 5 years, 2 months ago by Argentum.

    Hi,

    1. None of the settings in this section are active, that is, add to cart button is visible. This is because individual options are not enabled.
    2. None of the settings in this section are active. This is because the whole section is not enabled.
    3. All options are active, add to cart button is not visible.
    4. This is a duplicate of 1. Individual options are not enabled, therefore add to cart button is visible.

    Here is a better way to look at it – the module changes default behavior of Woocommerce. If some options are disabled, that behavior is not being changed.

    The first option in every section affects all the options below it – if it’s enabled, options below will work depending on whether they are enabled or not. If it’s disabled, none of the settings below work.

    Disabling/enabling these options affect whether they work or not. So, enabling an option (checking a checkbox) called “Disable buttons on Category/Archives Pages” turns on this option, and therefore buttons are being disabled. If the option is not enabled, default behavior is not being changed, add to cart buttons are visible, option is not doing anything.

    Thread Starter Argentum

    (@argentum)

    Yeah, well. I did my best. I can’t get it to work so I’ll leave it here and go for some other solution. Perhaps there is flaws in the logic between Add to Cart visibility and Modules per User. Or I am flawed.

    All the best
    Magnus

    Hi Magnus,

    Maybe your configuration is correct but there is some other issue. For example, if you are using any caching plugins, not clearing the cache might make the changes not appear at first.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Add to cart visibility and by role’ is closed to new replies.