Swatches not being crossed when out of stock

Solved10 replies4 participantsUpdated by Jennifer

  • Avatar: Jennifer
    Jennifer
    Participant

    Hi there,

    We have an issue with our variation swatches.
    When a product is out of stock, the variation and attributes are not being crossed.
    We tried using a 3party plugin but it doesnt work either., but at least it tells when a product is out of stock.
    We tried activating the variation swatches from the xStore theme.
    Some products that are out of stock are being crossed, and others not.

    Can you give us a hand? We only activated the 3 party plugin because at least with that one, even thou it is not crossed, it tells you when its out of stock.

    regards,

    Please, contact administrator
    for this information.
    Files is visible for topic creator and
    support staff only.

    10 Answers

    Avatar: Alex Carter
    Alex Carter
    Support staff

    Hello,

    Thank you for reaching out to us.

    Please try the next:
    WooCommerce > Settings > Products > Inventory > Out of stock visibility > Hide out-of-stock items from the catalog. Clear cache and check the result.

    If this doesn’t help, provide URLs of products from your screenshots.

    Warm Regards,
    The 8Theme Team

    Avatar: Jennifer
    Jennifer
    Participant

    Hello,

    Thank you, now more products are showing crossed but not all.
    Here are some links to products:
    https://happyness.com.ar/product/pantalon-sastrero-sport/
    https://happyness.com.ar/product/pantalon-sastrero-new-york/

    Regards,

    Avatar: Alex Carter
    Alex Carter
    Support staff

    Hello, Jennifer

    To ensure you get the best support, we’re escalating your request to another specialist from our team, who will take a closer look at the issue.

    They will update you as soon as possible, and we’ll make sure to keep you posted. If you have any additional details that might help, feel free to reply here.

    Thank you for your cooperation!

    Best Regards,
    The 8Theme Team

    Avatar: Justin
    Luca Rossi
    Support staff

    Dear @Jennifer,

    We hope this message finds you well.

    We would like to kindly ask if your website is utilizing any caching systems. If so, could you please assist us by purging all caches once again?

    We are currently unable to reproduce the issue on our end, and clearing the cache may help in resolving the matter.

    Thank you very much for your support and cooperation.

    Best regards,
    The 8Theme Team

    Avatar: Jennifer
    Jennifer
    Participant

    Hello,
    Hope you are doing well too.

    We are not using ant caching plugin. We have deactivated LiteSpeed Cache when the issue started.
    Here is video of the issue. When Out of Stock there isnt any crossed variation. It just wont let you add to cart and the message appears after you clic the add to cart button on a out of stock variation.

    Hope this video helps reproduce the issue.

    Thank you,
    Best regards,

    Files is visible for topic creator and
    support staff only.
    Avatar: Jennifer
    Jennifer
    Participant

    Hi there,

    Were you able to reproduce the issue?
    The thing is that, when a variation is out of stock in some productos, the variations do not appear crossed.
    For example, this product: https://happyness.com.ar/product/pantalon-sastrero-new-york/

    It is out of stock on Beige size 1, but it doesnt appear crossed (and you cant tell which variation is selected). Other products do, but some others, dont.

    Please, let me know if you were able to reproduce it.
    Best regards,

    Files is visible for topic creator and
    support staff only.
    Avatar: Andrew Mitchell
    Andrew Mitchell
    Support staff

    Hello, Jennifer,

    Thank you for providing access. We have made some changes—please review them at your convenience. These updates will also be included in the next theme release.

    Best regards,
    The 8Theme Team

    Avatar: Jennifer
    Jennifer
    Participant

    Great, thank you! We checked and everything seems to be working correctly.

    We also wanted to make the selected variation more noticeable, so we are using this CSS:
    li.type-label.subtype-square.selected {
    border: 2px solid #000;
    box-sizing: border-box;
    }

    What we also want to achieve is to make the out-of-stock variation readable. When it gets crossed out, we can’t read which attribute is out of stock because the text color changes to white.
    Do you know how we can change the opacity so that, when disabled, we can still read the attribute?

    And lastly, should we do something before updating the theme next time?

    Thank you!
    Best regards

    Avatar: Andrew Mitchell
    Andrew Mitchell
    Support staff

    Hello, Jennifer,

    To improve the readability of the attribute, we kindly suggest adding the following CSS code:

    .st-swatch-preview li.sten-li-disabled span:after {
        background: transparent;
    }

    Regarding the theme update, we recommend following these steps to ensure a smooth and successful process:

    1. Create a full backup of your website, including all files and the database.
    2. Take note of any customizations made directly to the theme files. (For future updates, we recommend using a child theme to preserve your changes.)
    3. If you are already using a child theme, please ensure that all custom CSS and functions are stored within it.
    4. After completing the update, clear both your site and browser cache to ensure all changes are properly applied.

    Best regards,
    The 8Theme Team

    Avatar: Jennifer
    Jennifer
    Participant

    Thanks for the support! My topic “Swatches not being crossed when out of stock” has been successfully resolved.

The issue related to '‘Swatches not being crossed when out of stock’' has been successfully resolved, and the topic is now closed for further responses