This topic has 10 replies, 3 voices, and was last updated 2 months, 4 weeks ago ago by Andrew Mitchell
Can I click on a product swatch on archive pages, to see the color, even if the color is unavailable?
https://i.imgur.com/b9gi7Vi.png
https://dev.ergo-vision.eu/pisarniski-stoli/#ergonomski-pisarniski
Hello @ziga32
Thank you for reaching out to us with your query. We understand that you would like to know if it is possible to click on a product swatch on archive pages to preview the color, even when the color option is currently unavailable.
We would like to inform you that our theme is designed to show the available color swatches for quick reference. However, if a color is not available, it typically cannot be selected or previewed. This is to ensure a clear and accurate shopping experience for our customers, helping to avoid any confusion regarding the availability of products.
If you want to hide the out-of-stock product swatches, please navigate to WooCommerce > Settings > Products > Inventory > check on Hide out of stock items from the catalog:
If you have any further questions or if there is anything else we can assist you with, please do not hesitate to contact us. We are here to help!
Best Regards,
8Theme’s Team
I would just luke to be able to click on this color which is out of stock
https://i.imgur.com/dilYlpj.png
Same as I can click here
https://i.imgur.com/zmrdgi8.png
But to my understanding nowt, this is impossible?
Dear @ziga32,
We would like to suggest that you insert the following snippet of code into the functions.php file located within your child theme:
function n2t_custom_js() {
?>
<script>
jQuery(document).ready(function($){
$('.st-swatch-preview li').removeClass('sten-li-disabled');
$('.st-swatch-preview li span').removeClass('sten-disabled');
$(document).on('click', '.st-swatch-preview li', function(){
$('.st-swatch-preview li').removeClass('sten-li-disabled');
$('.st-swatch-preview li span').removeClass('sten-disabled');
})
});
</script>
<?php
}
add_action( 'wp_footer', 'n2t_custom_js', 999 );
We trust that this code will be beneficial for your needs. Should you require any further assistance, please do not hesitate to reach out.
Best Regards,
The 8Theme Team
Thank you very much
I put the code in
https://i.imgur.com/uDQrT9M.png
But still can’t click on the color
https://www.dropbox.com/scl/fi/py6bc3itntfpi6zwlsy4w/screenshot-02-16-01-18-33.mp4?rlkey=7ndgxdgwiu4f1odqzbqtyv5qr&dl=0
Hi @ziga32,
We tried to login with this admin account but it didn’t work anymore.
Can you please double check?
Thank you!
i just reseted the pw
Dear @ziga32,
We are pleased to inform you that we have made some updates to the custom codes, resulting in the functionality of the swatch colors being restored.
Kindly take a moment to review the changes at your earliest convenience.
Warm regards,
The 8Theme Team
Works beautifuly, thank you very much!
Dear ziga32,
In the spirit of gratitude, we want to express our appreciation for your trust in our products. As a valued customer, your experience matters greatly. Would you consider sharing it by giving our theme a deserving 5-star rating on ThemeForest?
Click here to share your thoughts: https://themeforest.net/downloads
Being part of our community means a lot, and your feedback contributes immensely.
Best Regards,
The 8Theme Team
The issue related to '‘Click on a product swatch on archive pages if out of stock’' has been successfully resolved, and the topic is now closed for further responses