We are having issues with inventory on products created in Merchello. It seems that when creating and saving a product, the inventory is not saved correctly in the database.
At some point, ie. when the first purchase of the product have been made, the editing of inventory count seems to work fine. The error is only occuring when a new product is created.
We still have no clue on what causes the error, so I hope some smart Merchello-dude can lend me a hand. We are running Merchello 2.1.0 with Bazaar on top.
To reproduce the error, we do the following:
We create a product with the content-type of "Bazaar Product"
We check the "Track inventory for this product", to activate the inventor-fields on the product
We enter ie. Location: T1, Stock: 5, Low Count: 2
Press save
Now I would suppose, that everything is saved correctly. If i hit "refresh", it still has the correct values.
When a customer buys the product - and we full-fill the order under "Sales" i Merchello, the inventory count have been changed to the negative value, of the amount sold to the customer. Ie. the customer buys 2, then the inventory for the product will be -2.
We have tracked following "errors?":
When at first when we create the product and update it with the inventory-count, the product is not present in the "merchCatalogInventory" (by looking up the productVariantKey for the product).
If we look at the from looking up the product in the backoffice: /umbraco/backoffice/Merchello/ProductApi/GetProductFromService?id=74845110-f237-40f4-9b50-39060392e60a - the object in the catalogInventories array will return:
I'll try to replicate the issue - but have not seen it before myself.
The relation is initially made when a product variant is created - so first with the main product creation (on the master variant and when variants are generated in the case where options are present).
Items are removed from inventory in the shipment builder task:
Error with setting Invetory count on products
Hi!
We are having issues with inventory on products created in Merchello. It seems that when creating and saving a product, the inventory is not saved correctly in the database.
At some point, ie. when the first purchase of the product have been made, the editing of inventory count seems to work fine. The error is only occuring when a new product is created.
We still have no clue on what causes the error, so I hope some smart Merchello-dude can lend me a hand. We are running Merchello 2.1.0 with Bazaar on top.
To reproduce the error, we do the following:
Now I would suppose, that everything is saved correctly. If i hit "refresh", it still has the correct values.
When a customer buys the product - and we full-fill the order under "Sales" i Merchello, the inventory count have been changed to the negative value, of the amount sold to the customer. Ie. the customer buys 2, then the inventory for the product will be -2.
We have tracked following "errors?": When at first when we create the product and update it with the inventory-count, the product is not present in the "merchCatalogInventory" (by looking up the productVariantKey for the product).
If we look at the from looking up the product in the backoffice: /umbraco/backoffice/Merchello/ProductApi/GetProductFromService?id=74845110-f237-40f4-9b50-39060392e60a - the object in the catalogInventories array will return:
catalogKey: "b25c2b00-578e-49b9-bea2-bf3712053c63"
count: 10
location:"2"
lowCount:0
productVariantKey:"00000000-0000-0000-0000-000000000000"
updateDate:"2017-01-20T15:27:26.9287367+01:00"
So it seems the productVariantKey is not saved correctly?
If i recycle the application-pool, then when i call the above mentioned service, it returns the product with the correct values.
We have tried rebuilding the Examince indexes, but with no luck..
Does anyone have a clue on where we can continue our search for the solution for this issue?
Best regards, Peter
In relation to the above issue.
When in the creation process of a product is it created in the merchCatalogInventory - table?
Hi Peter,
I'll try to replicate the issue - but have not seen it before myself.
The relation is initially made when a product variant is created - so first with the main product creation (on the master variant and when variants are generated in the case where options are present).
Items are removed from inventory in the shipment builder task:
https://github.com/Merchello/Merchello/blob/merchello-dev/src/Merchello.Core/Chains/ShipmentCreation/RemoveShipmentOrderItemsFromInventoryAndPersistShipmentTask.cs#L66
is working on a reply...