fbpx
Want To Add Extra Images Per Product Variation For Free? Download Now

It shows variations that are not available

Alan Lustron

Some variations that do not have stock are shown.

We attach image and link of the problem.
The variation is size L in the color Lead gray.
The ID or SKU of the variation is 296013.
We also attach an image showing the sold out stock of the variation.

https://deliverind.com.ar/producto/hoodie-4/

Captura de Pantalla 2022-10-03 a la(s) 11.39.02.png

Captura de Pantalla 2022-10-03 a la(s) 12.21.13.png

Rezwan Shiblu

Hi Alan,

Thanks for reaching us.

Please try to add the below snippet using the Code Snippets plugin or theme functions.php file:

add_filter( 'woo_variation_swatches_global_ajax_variation_threshold_max', 'woo_variation_swatches_global_ajax_variation_threshold_max_edit', 10, 2 );
function woo_variation_swatches_global_ajax_variation_threshold_max_edit( $size, $product ){
return 700;
}

Hopefully, this will work.

Thank You

Alan Lustron

Hi! Thank you for the replay. Currently it is like this

add_filter( ‘woo_variation_swatches_global_ajax_variation_threshold_max’, ‘woo_variation_swatches_global_ajax_variation_threshold_max_edit’, 10, 2 );
function woo_variation_swatches_global_ajax_variation_threshold_max_edit( $size, $product ){
return 2200;
}

And still doesn’t work

Rezwan Shiblu

Hi Alan,

Please add return 700 instead of retun 2200.

Let me know if you still face this issue.

Thanks.

Alan Lustron

Hi! It didn’t work, and now it also shows every color that exist even if it does not have stock available and it’s so difficult to our customers to buy like this because you have to click on every size and every colour to see if it is available or not.

So we leave it as it was before and this issue was solved.

But the first one, but the first one persists. The variation still shows and it’s not available.

 

Rezwan Shiblu

Hi Alan,

Please kindly do a plugin compatibility check by doing these steps to identify the error :

=> Deactivate all of your additional plugins except WooCommerce and WooCommerce Variation Swatches Plugin.
=> See if the problem persists. If the issue is resolved, you can tell which plugin might be the culprit of this error by activating your additional plugins one by one.

Thanks.

 

Alan Lustron

Hi!!! Sorry for the delay, we just tried what you suggested, and the problem persists. The only active plugins are the one for woocommerce and yours. How can we solve it?
Attached image of the active plugins and the error it shows. Since the black L variation in that article does not have stock but it is shown as available.

Rezwan Shiblu

Hi there,

Sorry for the inconvenience

Could you enable the default theme of WooCommerce, Storefront, and check if it is happening there or not?

Looking forward to hearing from you.

Alan Lustron

Hi! We already tried it, and still shows an error on the variation L Black of the Hoodie Classic, we’ll attach an image

Alan Lustron

Hi! Yes in the product that you make it works but the error that I’ve been mentioning you since the beginning stills there. Could you please check that particular error? It is for example on the L black variation of the product “Hoodie Classic”, I’ll leave the link of the product.

https://deliverind.com.ar/producto/hoodie-classic/

It does not have stock but it is shown available and when you want to add to the cart this error shows up. And sometimes it lets you add it, but when the order is printed to send it, it appears bugged.

 

 

Alan Lustron

Oh and if you have to do some test like that product, could you leave them on private? Because our customer were confused since the website is working 24/7. Thank you

Rezwan Shiblu

Hi there,

I understood you concern as well as checked your mentioned product link (L black variation).

And my test product working properly except your mentioned product.

Can you please temporarily deactivate our Swatches plugin and check if it happens without our plugin or not?

Looking forward to hearing from you.

Rezwan Shiblu

Did you use any import plugin for importing 900 variations on your mentioned product?

Alan Lustron

Hi! no, we dindt use any plugin fot importing variations

Rezwan Shiblu

Hi there,

I think you/your developer imported product data by using an import plugin or migrated this site from another site. So out of stock 0 fields are not updating on the database so It shows variations that are not available.

Please check the following screenshot –

https://prnt.sc/FMPnbLpYDH5d

https://prnt.sc/7jqTl8PINCB3

https://prnt.sc/UOggmzBmLuxz

And I have shown in my previous response that the variation plugin is working properly by creating a test product on your site – https://prnt.sc/Hff0tm6xNwyr

You may tell that the issue is caused for our plugin if this arises for a manually created product. As I have checked manually created product is working fine – https://www.loom.com/share/44af69d4015f4e099662fa30169a4070

Thanks.