Site logo

Archived topic

How to stop non-enabled stock items from appearing on the product page

14 replies · Started by Travis on November 30, 2021

Viewing posts 1–15 of 15

Hello.

I have recently changed over from a theme to GeneratePress Premium and have noticed that product variations that were not marked 'enabled' are now being made available to select in the attribute drop-down lists. Previously this would only happen if at least one of the variations in that attribute was available/enabled. This now results in users being able to select the item attribute from the drop-down, but then getting the message that it is not available after the 'final' attribute selection.

Is there a way that GeneratePress can ignore non-enabled product variations and have the intelligence to recognise that if there are no variations enabled for a particular attribute, then don't make the attribute available in the drop-down?

Best Regards

Travis

Hi there,

thats a core Woocommerce function, GP doesn't interfere with that.
I would begin by clearing any caches, including Woocommerces, and then check for plugin conflicts.

David,

Thanks for the quick reply.

So are you saying that the products should not be displaying in the attribute drop-down list using GeneratePress theme if they are not enabled?

Best Regards

Travis

Thats correct - i maintain a couple of Woo sites that use attributes/variations. I even set up a quick test site to make sure woo 5.9 hadn't thrown any funny business:

https://www.screencast.com/t/PIH0wrAVcMJv

its a 3 attribute variation with only 2 of them enabled.

David,

Just to clarify, when I say the attribute is not enabled, what I mean is that all of the variations with that attribute are marked as not enabled (or at least Enabled is deselected). I have also removed all of the pricing details and it still shows the stock 'variation'.

Screenshot

David,

OK, thanks for confirming. I have even removed a specific variation and the attribute drop-down still displays for the removed variation. I originally thought this was due to a variation swatch plugin, but I disabled that and no change, even after clearing caches. Frustrating.

Thanks for your help.

Travis

Have you tried clearing the various caches / transients in Woocommerce > Status > Tools ? Then just to be damn sure that localStorage has removed them, add and removes something from the cart.

David,

I have cleared the transients, product lookups, customer sessions, orphaned variations and caches, both WP and Local. I am also running in a new incognito window to test. The removed variations still displays in the attribute drop lists and only says it is not available when you select the combination.

I will try deactivating every plugin and see if anything makes a difference.

Thanks again for your suggestions.

Travis

David,

Just an update. The only way I could make it stop appearing in the attribute drop list was to remove the attribute entirely. The variations still exist and I will just meed to update when those become available. This was after deactivating all plugins one by one, clearing caches and then testing.

Travis

Very odd ... out of interest how many attribute/variations exist on the product? I wonder if a large list of them would cause a problem like that.

David,

I have A LOT unfortunately. Three attributes... 4 x 3 x 75 to be specific. My concern is that this was working prior to changing from the previous theme over to GeneratePress.

Travis

David,

That was it. I had the limit changed using the same function previously and didn't add it back in when I changed over to GeneratePress.

Thanks again for your help.

Travis

Awesome - glad to hear that!!

This archived topic is closed to new replies.