Hide specific variations from product page

This topic has 6 replies, 3 voices, and was last updated 4 months, 2 weeks ago ago by Andrew Mitchell

  • Avatar: DM661
    DM661
    Participant
    August 1, 2024 at 22:33

    Is there a way to completely hide specific variations from the product pages? For example, I have 4 sizes of the product, each with 10 colors available. I want to completely hide 3 of the 4 sizes but keep all the colors.

    I’ve tried editing the products csv and I’ve chosen ‘hidden’ for catalog visibility and also made the products out of stock, but they still show up and allow the buyer to choose the variation, but gets a message saying “Sorry, this product is unavailable. Please choose a different combination.” but instead I’d like for the variation to not appear at all as an option.

    5 Answers
    Avatar: Justin
    Luca Rossi
    Support staff
    August 2, 2024 at 10:06

    Hi @DM661,

    Can you please with this custom CSS:

    
    .postid-448 option[value="green"]{
        display: none;
    }
    

    The 448 number is your product ID and green is the value of variation:

    https://prnt.sc/bVqQ2i67Ok4e

    Hope it helps!

    Avatar: DM661
    DM661
    Participant
    August 2, 2024 at 16:25

    Code does not work.

    See comments in private area.

    Please contact administrator
    for this information.
    Avatar: Justin
    Luca Rossi
    Support staff
    August 3, 2024 at 05:39

    Hi @DM661,

    Please try with this custom CSS codes instead:

    
    .postid-752 ul[data-attribute="pa_size"] li {
        border: none;
    }
    
    .postid-752 ul[data-attribute="pa_size"] li span {
        border: 1px solid var(--et_border-color)
    }
    
    .postid-752 span.st-custom-attribute[data-value="small"] {
        display: none;
    }
    

    Hope it helps!

    Avatar: DM661
    DM661
    Participant
    August 6, 2024 at 17:18

    That works, thank you!

    Avatar: Andrew Mitchell
    Andrew Mitchell
    Support staff
    August 6, 2024 at 17:18

    Dear DM661,

    As we continue our mission to exceed expectations, your insights become increasingly valuable. Could we, with all due respect, request your thoughtful feedback by giving our theme a deserved 5-star rating on ThemeForest?

    Click here to share your valuable perspective: https://themeforest.net/downloads

    Your time and trust are highly appreciated!

    Best Regards,
    The 8Theme Team

  • Viewing 6 results - 1 through 6 (of 6 total)

The issue related to '‘Hide specific variations from product page’' has been successfully resolved, and the topic is now closed for further responses

We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.