Not Rocket Science
Our client received a new order, which reserved 3 of the same product. The order ended up being cancelled, then permanently deleted from the Order Manager. The 3 products are still in "reserved",. which needs to be 0. "On Hand" shows 6, (which is wrong, it's supposed 3) and "Available For Sale" shows 3 (which is correct). Can this be reset? Thank you!
Will Strohl
Just to recap, here's what we understand to have caused this issue:

  1. A product was created with inventory set to "When out of stock, show but don't allow purchases"
  2. The "On Hand" and "Available for Sale" values were set to 15
  3. A customer placed an order and canceled it (presumably due to a payment issue?)
  4. A merchant delete the order
  5. The reserved value did not change

For the version you're on (01.10.01), there are additional checks that were added several versions earlier to help a merchant to adjust the inventory levels during times like this. In our testing, it appears that this is ignored in your version of Hotcakes in the case of canceled orders. This is indeed a bug, but unfortunately, this is a bug in an unsupported version of Hotcakes. We won't be able to apply a fix to version 01.xx.

We realize that this presents you with an undesirable challenge. How can you reset the reserved value in these situations? There are two answers really. First, you can run a simple SQL query and an example is below, but this is obviously not a reasonable solution to present to the merchants responsible for maintaining the store.

DECLARE @Bvin uniqueidentifier, @Sku NVARCHAR(50), @NewReservedValue INT;

SET @Sku = '[SKU Goes Here]';
SET @NewReservedValue = 0; -- potentially change this value, per instance

SELECT @Bvin = p.[bvin] FROM [dbo].[hcc_Product] p WHERE p.[SKU] = @Sku;

UPDATE [dbo].[hcc_ProductInventory] 
SET [QuantityReserved] = @NewReservedValue
WHERE [ProductBvin] = @Bvin;

In the interest of providing a good customer service experience, we've put together a quick example of an administration module that could help you resolve edge cases such as this one. You'll find the link to that project below. Please note that this example module is built against version 07.04.02 of the CMS, and not 07.04.00 (which your site is on). This is intentional, as the latter version is known to be vulnerable to very high-risk security exploits. Unfortunately, due to the nature of e-commerce, we're unable to fully support your version of the CMS. We apologize for any inconvenience that this may cause you.

Please review both solutions and let us know what you think.
Will Strohl, Upendo Ventures
Hotcakes Cloud  | Get Support  | Code Support 
Official Cloud & Support provider for Hotcakes
  •  Adrian
  • 89.5% (Honored)
  • Advanced Member
Quick tip: Heads up! In the admin portal on the control bar of CMS click on Host > SQL so that you can plop that update code script in...
  • Sign-up for the Hotcakes Community Newsletter: