Site logo

Archived topic

Grey out out of stock item

7 replies · Started by david on July 6, 2020

Viewing posts 1–8 of 8

Hi,

I was testing a product variation on my test site and it worked perfectly.

However when I moved it over to my main site it doesn't look the same.

When a product variation is out of stock it should remain as a variation but greyed out.

I didn't add any special code etc to get it working it just worked this way. But when i try it on my main site it doesn't work.

Example/ Demo site. https://davidstokes.com/lotto/product/lotto-test/
As you can see there are items greyed out with an X on them -

I've added the real site link as well - Item number 2 here is out of stock, But doesn't appear the same as it does on the demo site.

Do you have any idea why ?

Hi there,

None of the live site variations have the disabled class which is what greys out and blocks them from being selected.

Are the product settings identical ?

Yes I matched them

I don't have all the same plugin's installed so this might be a factor.

Is there a class I could add using custom CSS ?

It could be a plugin conflict.
Without the plugin adding the disabled class to the HTML - there is no way of targeting out of stock lines.

What do you mean by this
"Without the plugin add the disabled class to the HTML – there is no way of targeting out of stock lines."

I deactivated all the plugin.. and is didn't fix the issue.. I've no idea now..

I figured it out !!!

The Swatches plugin which made it possible to display the variations as images had an "Ajax variation threshold" which was set to 30 - I have 47 variations and this was causing it to not work.. so I increased the threshold and it worked !!

Thanks for your help.

Glad to hear you found the issue ! And thanks for letting us know the problem

This archived topic is closed to new replies.