Filters by Attribute

Is there a small piece of code which I can drop in for the filter by an attribute which would only show the available attributes for the category I'm viewing in?


For example, in this screenshot, I am in my store looking at the handbags category, which is showing all the attributes on the system rather than the ones available in that category.



Likewise, I have a filter by occasion and a filter by size showing all but some are not available in that category.


Mant Thanks in advance

Chris

Comments

  • Hi,

    Please always attach a link to your website so we can check it out. If the page is offline(localhost), then our help will be limited. You will have to contact us when the page is online. Also, please make sure that the page is not under maintenance before you provide us with the link.


    Thanks

  • Hi Phil

    Apologies missed that off the website is www.lappella.com and the page displayed is [Links visible only for registered users]

    Many Thanks Chris

  • You can use CSS code like this one:

    .term-handbags .tooltip[data-tooltip="Trade Pack"]{
     display: none!important;
    }
    

    The first class indicates the category in which you are currently.

    Later you inspect the element which you want to hide and copy the data-tooltip name.

    Best regards

  • Hi thanks for that although that's not exactly what I meant.

    For example if you go to bucket bags: [Links visible only for registered users]

    There are only 2 options available a black and a tan yet all the colours are displayed. So what I mean is using Bucket Bags as an example is if only Black and Tan are available in that category. Then it would only display Black and Tan swatches to allow you to filter.


    Best Regards

    Chris ?

  • Do you mean this display?:

    If yes, it can be done with the CSS I posted above, or by this one:

    .term-bucketbags #widget_mfn_woo_attributes-6 .tooltip:not([data-tooltip="Black"]):not([data-tooltip="Tan"]){
     display: none!important;
    }
    

    Best regards

Sign In or Register to comment.
This website uses cookies

We use cookies to personalise content and ads, to provide social media features and to analyse our traffic. We also share information about your use of our site with our social media, advertising and analytics partners who may combine it with other information that you’ve provided to them or that they’ve collected from your use of their services.

Cookies are small text files that can be used by websites to make a user's experience more efficient.

The law states that we can store cookies on your device if they are strictly necessary for the operation of this site. For all other types of cookies we need your permission. This means that cookies which are categorized as necessary, are processed based on GDPR Art. 6 (1) (f). All other cookies, meaning those from the categories preferences and marketing, are processed based on GDPR Art. 6 (1) (a) GDPR.

This site uses different types of cookies. Some cookies are placed by third party services that appear on our pages.

You can at any time change or withdraw your consent from the Cookie Declaration on our website.

Learn more about who we are, how you can contact us and how we process personal data in our Privacy Policy.

Please state your consent ID and date when you contact us regarding your consent.