Product Sold Despite Quantity Reaching Zero

  • Posts: 10
  • Thank you received: 0
1 year 1 week ago #350921

-- HikaShop version -- : 4.7.2
-- Joomla version -- : 4.2.9
-- Browser(s) name and version -- : Chrome
-- Error-message(debug-mod must be tuned on) -- : n.a

This has happened right after the most recent update. I had a product with two variants. One variant (A) was limited to 20 and one ( B ) was unlimited. The overall quantity was set to 30. The product sold out, but then someone was able to purchase an item from variant A, which still had some quantity despite the fact that the overall quantity limit had been reached. I went and checked the product once I realized this order had happened and I was also able to access Variant A despite overall quantity on the product being zero. Variant B, originally set to unlimited, was not available.

Is this a bug or a setting that changed with the update? This is very important to my business as I cannot have items sell once the overall quantity has reached zero. I have used the set up multiple times in the past to allow buyers to purchase an optional but limited item and this has never happened. In the past when overall quantity on a product reaches zero, sales close, and variants do not override overall quantity.

Attachments:
Last edit: 1 year 1 week ago by YACOps.

Please Log in or Create an account to join the conversation.

  • Posts: 81508
  • Thank you received: 13064
  • MODERATOR
1 year 1 week ago #350923

Hi,

As far as I know, it has always been like that.
The quantity of the variant is what is taken into account by the system, if provided. The quantity of the main product is only taken into account if the quantity of the variant is unlimited. In that case, the system considers that it's the main product quantity which should be taken into account.

In the past when overall quantity on a product reaches zero, sales close, and variants do not override overall quantity.

I don't think this was ever the case. This would only be the case if the quantity of the variants is unlimited.
So if you want the main quantity to be taken into account for all the variants, then you need to set the quantity of all the variants to "unlimited".
As far as I understand, you were just lucky this never happened so far.
To make the system work like you want, it would require the development of a plugin implementing the onAfterProductQuantityCheck event to add a check on the main product quantity.

Please Log in or Create an account to join the conversation.

Time to create page: 0.053 seconds
Powered by Kunena Forum