Microdata Incorrectly OutofStock on Grouped Product with Don't Track Inventory

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
2 года назад
We're running nopCommerce 4.40.4. I think I have found an issue similar to the bug reported here:

https://www.nopcommerce.com/en/boards/topic/88443/nopcommerce-430-microdata-is-incorrectly-set-to-outofstock

All our products are grouped products with two child variants, sample and main product. If I set the variants to "Don't track inventory," all the microdata for the entire product is set to:

<meta itemprop="availability" content="http://schema.org/OutOfStock">

It then shows up on Google Images (and I imagine other places) with a big red "Out of Stock" message.

I'm still testing, but I think the work around is to "Track Inventory" in the variants and then the individual variant microdata will change to "InStock." However, the parent product is still set to "OutOfStock."

When I compare our parent product with the demo cart grouped product (Nikon D5500 DSLR), I see at the very bottom of the demo parent page (editing) there is an option for "Stock Quantity History" (last option on the page). However, our parent product page has no such option. It doesn't exist. I'm hoping if I could find how to turn that on, I'm might be able to create a complete work around. I'll keep trying to find that.

I was trying to recreate the situation on the demo site too, but seems the admin and front end are not talking to one another.

All that in a nutshell, if we're not tracking any inventory, shouldn't all the microdata always be set to "InStock?"
2 года назад
I figured out how to get the Stock Quantity History to show up in the parent product and it seems unrelated thus far, and therefore no work around on the parent product yet.
2 года назад
Sorry guys, too many tabs open and I'm lagging on the edit mode for these posts. The Stock Quantity History is not in the parent product. It's in the variants as you probably already know (but I understand it better and seems not the issue).

I've tried multiple inventory settings in the variants which comes with resetting the site multiple times, cleared cache multiple times, tried different computers, different browsers and I don't know what the issue is. The parent will not switch to "InStock" under the first Offers metadata setting.

It seems if you have inventory set and tracking it on both variants, the parent should "know."

I've run out of things to try for now. I might dive into the code tomorrow. I'm really hoping someone knows what I'm doing wrong as it seems to be working on the demo site.
2 года назад
After some sleep and regroup, I notice on the demo cart that all three products (parent and two child variants) have Stock Quantity History.

On our cart, only the child variants have that metric (and only if I manually change the inventory). I don't see where you can even manage inventory or stock on the parent product. This is the only difference between our cart and the demo cart and since tracking inventory was the work around on the child variants to get them to show InStock, I'm still leaning towards this being the work around on the parent.

I appreciate anyone who can enlighten me.
2 года назад
The work around so far is to go into the nopCommerce database and change ManageInventoryMethodId from 0 to any other option, on the Parent product. In my case, we changed it to 1 to match the child variants, then restarted the application.

As already mentioned, I don't know how to find this option in the admin UI for the parent product. It seems it doesn't exist?

Therefore, the immediate fix is to parse through the db and change all the ManageInventoryMethodIds from 0 to 1. Then, keep an eye on StockQuantityHistory to see how customer purchases affect that table, if any. Then modify any import, etc. mechanisms to handle that to keep them in sync.

The ideal fix is if ManageInventoryMethodId equals zero, the product is InStock.

Thanks.
2 года назад
I just tested this on a separate newer site (more fresh install) with a "Simple product" and the result is the same, so it should be straight forward to reproduce. In case I wasn't clear with all the verbosity before, the bug is reproduced by:

1) On any product Manage page, set "Inventory method" to "Don't track inventory." If it's a "Grouped product," the parent will need to be modified in the database (ManageInventoryMethodId = 0).

2) Check the microdata "Availability" on the webpage. You will see:

<meta itemprop="availability" content="http://schema.org/OutOfStock">

Thanks again.
2 года назад
Thanks for the info, here is a work item for this.
2 года назад
RomanovM wrote:
Thanks for the info, here is a work item for this.


Can you tell me if the calculation for Stock Quantities has changed between 4.2 & 4.4?  Could this be related?  We have a ribbon that works on Stock Quantity. In 4.2 the quantity for a grouped product seems to be a sum of the variants stock quantities.  In 4.4 it seems to always = 0 on grouped products.

Thanks
2 года назад
Wurzel wrote:

Can you tell me if the calculation for Stock Quantities has changed between 4.2 & 4.4?  


There were some minor issues related to inventory, but no major changes in stock calculations. Anyway, you can look at the release notes to check.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.