[Skip to main content](#vessel-content)

#   Out of Stock Items

##

- **[mohairbears](/forum/user/916-mohairbears "View mohairbears's Profile")**
- [![mohairbears's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/916-mohairbears "View mohairbears's Profile") Topic Author
- [ Offline](/forum/user/916-mohairbears)

Less More

- Posts: 610
- Thank you received: 13
-

1 year 2 months ago [\#368332](#368332) by [mohairbears](/forum/user/916-mohairbears "View mohairbears's Profile")  *[Out of Stock Items](/forum/3-bug-report/909680-out-of-stock-items#368332 "-- HikaShop version -- : 6.2 -- Joomla version -- : 5.2 -- PHP version -- : 8.2.29 -- Browser(s) name and version -- : Googlr Chrome  Hi, I appears to have found an error.  Sometimes the customers payment fails. They come back to pay using the same order, but, an item that has gone out of stock during the time taken to pay is still processed? surely if the product stock level is then 0 it should not allow this?  Rgds")* was created by *[mohairbears](/forum/user/916-mohairbears "View mohairbears's Profile")*

-- HikaShop version -- : 6.2
-- Joomla version -- : 5.2
-- PHP version -- : 8.2.29
-- Browser(s) name and version -- : Googlr Chrome

Hi, I appears to have found an error.

Sometimes the customers payment fails. They come back to pay using the same order, but, an item that has gone out of stock during the time taken to pay is still processed? surely if the product stock level is then 0 it should not allow this?

Rgds

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC85MDk2ODAtb3V0LW9mLXN0b2NrLWl0ZW1zP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86564
- Thank you received: 14311
-
-

1 year 2 months ago [\#368333](#368333) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Out of Stock Items](/forum/3-bug-report/909680-out-of-stock-items#368333 "-- HikaShop version -- : 6.2 -- Joomla version -- : 5.2 -- PHP version -- : 8.2.29 -- Browser(s) name and version -- : Googlr Chrome  Hi, I appears to have found an error.  Sometimes the customers payment fails. They come back to pay using the same order, but, an item that has gone out of stock during the time taken to pay is still processed? surely if the product stock level is then 0 it should not allow this?  Rgds")*

Hi,

The stock check is done during the add to cart, the checkout, and when the order is created.
If the "Update stock when order is" setting of the HikaShop configuration is set to "confirmed", then the stock won't be reserved until the order is paid. So, this case can happen and we cant do anything about it in HikaShop. Suppose you have 2 users with the same product in the cart with a stock of 1. Both create their order and are redirected to the payment gateway at roughly the same time. Since you want the stock to be updated only after the payment, it is normal that this is allowed.
Once one user pays for his order on the payment gateway, his order is confirmed and the stock goes to 0. However, the other user is already on the payment gateway. And thus there is no way for HikaShop to prevent him from finishing his payment.

However, if you set the setting to "created", then the stock is reserved when the order is created, before the payment. And so this case can't happen. Once one user creates an order, the stock will be decremented, and if it goes to 0, then no other user will be able to create an order.
In such case however, you want to configure the HikaShop order auto cancel plugin so that created orders that have not been paid are automatically cancelled after a while in order to liberate the stock.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC85MDk2ODAtb3V0LW9mLXN0b2NrLWl0ZW1zP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.080 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
