NO BUG: "stock management not enabled for this product." showing up event when its enabled

Browser: Chrome 114
OS: macOS

If the product status is set to “in stock” without “track stock quantity for this product” we still get the “stock management not enabled for this product.” message and the “in stock” won’t show up.

image

[Please describe this bug in as much detail as possible so we can replicate & debug this bug]

Hi,
Thanks so much for your report!

#1: I don’t see this as a bug because the message is correct if stock management is not activated for the product (the checkmark next to “Stock Management” is not set).

#2: “In Stock” is generally not displayed - neither in Bricks, nor in TwentyTwentyThree, nor Astra if the stock management is not enabled. If it is enabled, it shows “x in stock”, or the custom message provided within the product stock element.

Best regards,
timmse

I didn’t even know this. I’ve been using my own custom code for this for a long time that “fixes” this

Can you move this to the feature request section since it’s not a bug?

No Problem. The question is how it should behave and what it should show, and what not.

From my point of view, it doesn’t make any sense to show an “In Stock” message by default because you can expect from an online store that you can buy its products - if they are available.

However, if you decide to display a custom “In Stock” message, I think it should always be displayed - regardless of whether stock management is enabled, as long as the product is set to “In stock”.

What do you think about it?

Well, there is an inventory setting in WooCommerce to change how it should display.

Real-life use cases for this would be situations where the stock balance is not known for some products, while for some products it is known.

One solution could be to add a crazy big stock amount like 9999999 for those products.

After thinking about this this might be a too project specific thing to add to bricks so it’s best to not continue with it.

Ok, let’s not consider this a bug or a suggestion for improvement.

Generally, stock management in WooCommerce can be relatively confusing. As far as I understand, the settings in your screenshot refer only to the stock quantity, not to “in stock” in general.

Okay, great.

I will open a bigger thread in the “how to” section that includes some improvements and problems of WooCommerce. This could be a good source of ideas to develop WooCommerce elements for Bricks.

2 Likes

Just came across this issue.

we set the “in stock” custom text, I am expecting it will show the text, if the product has “in stock” selected. we use other systems to manage the stock and just want to show some text, if the product is in stock.

unfortunately it does not work out-of-the-box for “in stock”.

Hi Maxi,
What type of product is it? The custom text is not supported for variable products.

Hi Stefan, it is a simple product. If we set stock status to “in stock”, we see nothing in the frontend. If we change it to “out of stock”, then we see the text.

I cannot detect any problem in my installation. Would you be so kind as to send temporary login credentials, information on where we can see the issue, and a link to this thread to help@bricksbuilder.io using the email address you used during the purchase?

with “out of stock” like this:

we have this in frontend, works as expected:

with “in stock” like this:

we have only the title:

maybe we misunderstood something here …

As far as I can see, that’s the default behavior of WooCommerce: if you don’t “Track stock quantity for this product,” nothing is shown if it’s in stock, but of course, an out-of-stock message, if it’s out of stock.

You’ll get the same behavior with any other default Theme, e.g. twentytwentyfour.

thanks for the clarification.

Follow-up Post & Solution:

Bricksultimate has just released the final WooCommerce condition needed to fix this issue. I created an identical element to the stock status element, and now it works “as it should.”

These are the conditions: