Home › Forums › WoodMart support forum › swatch-enabled class stayes but should be disabled
swatch-enabled class stayes but should be disabled
- This topic has 6 replies, 2 voices, and was last updated 3 years, 5 months ago by Elise Noromit.
-
AuthorPosts
-
June 20, 2021 at 1:25 pm #300883
morena_swimParticipantI have two configurable products, however swatch-enabled is not working propperly for both products. In the set and top – the swatch stay enabled, although out of stock / not existing.
all stay enabled:
https://morenad.co.il/product/set-bikini-triangular-ties-32-2031-1991/
https://morenad.co.il/product/top-bikini-swimsuit-triangular-32-2031/
in the bottom, the swatched do change to swatch disabled.
works good:
https://morenad.co.il/product/bottom-ties-brazilian-swimsuit-32-1991-sale/
how to it so all products variation do become disabled so i can apply css to them?June 20, 2021 at 9:30 pm #300937
Elise NoromitMemberHello,
Thank you very much for choosing our theme and for contacting us.
Please make the full backup of your site as well as the Theme settings export and check if you can choose the variation on the Storefront theme to detect if our theme causes the problem. Storefront is a free theme developed by WooСommerce.
You have configured swatches, the problem in a variable product configuration.
Best Regards
June 21, 2021 at 8:26 am #301022
morena_swimParticipantbefore we make such drastic changes, this is a test product with only two color variations:
https://morenad.co.il/product/%d7%98%d7%95%d7%a4-%d7%91%d7%92%d7%93-%d7%99%d7%9d-%d7%91%d7%99%d7%a7%d7%99%d7%a0%d7%99-%d7%9e%d7%a9%d7%95%d7%9c%d7%a9%d7%99%d7%9d-%d7%a7%d7%9c%d7%90%d7%a1%d7%99-%d7%a8%d7%95%d7%a7%d7%90%d7%9c/
This is the original product:
https://morenad.co.il/product/top-bikini-swimsuit-triangular-32-2031/
There is a difference in the function, although the test product is a copy, just with less color variations.June 21, 2021 at 8:53 am #301027
morena_swimParticipantfrom testing i have made, up to 30 variations, the swatches is working propperly.
If i add any variation more than 1 the functionality changes and the swatches stay enabled although not in stock.June 21, 2021 at 11:10 am #301067
Elise NoromitMemberHello,
Try to add the following PHP code snippet to the child theme functions.php
function custom_wc_ajax_variation_threshold( $qty, $product ) { return 150; } add_filter( 'woocommerce_ajax_variation_threshold', 'custom_wc_ajax_variation_threshold', 10, 2 );
This will increase the standard WooCommerce variations number to be loaded with AJAX from 150.
Kind Regards
June 22, 2021 at 8:09 am #301311
morena_swimParticipantyes, it worked, thank you very much.
solvedJune 22, 2021 at 10:55 am #301360
Elise NoromitMemberWe are always happy to help you, write to us when you have any difficulties or issues with our theme.
We would be grateful for 5 stars rate on http://themeforest.net/downloads in case you are satisfied with our theme and customer service
Thank you in advance
-
AuthorPosts
Tagged: swatch-enabled
- You must be logged in to create new topics. Login / Register