This topic has 2 replies, 2 voices, and was last updated 1 years, 9 months ago ago by Tony Rodriguez
Hi, i would like to ask if there is a possibility to hide swatches for products out of stock on product page?
For example i have a variable product with variation attribute color , in 20 different colors , on shop page it shows all colors in a circle nicely, but trouble comes when i have just lets say 2 colors on stock and rest is out of stock , so all circles down the product image are greyed and i would like to hide them. Any help? Thanks
Hello, @Sofija886,
Thank you so much for purchasing our theme and contacting our support center.
1) In order to solve your issue, there is only one possible way to display a product variant that is out of stock on the pages. Product variation that is ”Out of stock” can be displayed http://prntscr.com/t21xou with our variation swatches under Xstore > Theme Options > Woocommerce (Shop) > Shop Element > Variation Swatches > Swatch Out Of Stock (in case “Hide out of stock products from the catalog” option is enabled in WooCommerce > Settings > Products > Inventory). Please refer to the provided image: https://ibb.co/dc8b4Kk
OR
2) If you would like to hide the out-of-stock color circles, please copy and paste the following CSS code into XStore >> Theme Options >> Theme Custom CSS >> Global CSS. After clearing your browser cache, please check back to your site.
.woocommerce-shop li.type-color.sten-li-disabled {
display: none !important;
}
Best Regards,
8Theme’s Team.
The issue related to '‘Variation swatches on shop page for out of stock products’' has been successfully resolved, and the topic is now closed for further responses