logo
Welcome to our new AbleCommerce forums. As a guest, you may view the information here. To post to this forum, you must have a registered account with us, either as a new user evaluating AbleCommerce or an existing user of the application. For all questions related to the older version of Gold and earlier, please go to AbleCommerce Gold forum. Please use your AbleCommerce username and password to Login. New Registrations are disabled.

Notification

Icon
Error

Options
Go to last post Go to first unread
mbartens26403835  
#1 Posted : Wednesday, October 4, 2023 9:29:52 AM(UTC)
mbartens26403835

Rank: Newbie

Groups: Registered, Developers
Joined: 8/11/2021(UTC)
Posts: 6

Thanks: 2 times
Hi,
We have AbleCommerce Version: 9.0.5.6938. There was a sale last night and the cart received over 200 orders in 2 hours, mostly for the same product. About 50 of those orders were within 2 minutes. Payments were made with PayPal or Authorize.Net CIM.
I have placed test orders and the inventory control does seem to work, it appears to be an issue that when there is a large volume of orders it does not work. Is there a limit to the amount of orders that can be handled while working with inventory control?

Below is the relevant error I find in the log:


2023-10-03 19:00:56,445 ERROR lushingEventListener Could not synchronize database state with session
NHibernate.StaleObjectStateException: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect): [CommerceBuilder.Products.Product#27]
at NHibernate.Persister.Entity.AbstractEntityPersister.Update(Object id, Object[] fields, Object[] oldFields, Object rowId, Boolean[] includeProperty, Int32 j, Object oldVersion, Object obj, SqlCommandInfo sql, ISessionImplementor session)
at NHibernate.Persister.Entity.AbstractEntityPersister.UpdateOrInsert(Object id, Object[] fields, Object[] oldFields, Object rowId, Boolean[] includeProperty, Int32 j, Object oldVersion, Object obj, SqlCommandInfo sql, ISessionImplementor session)
at NHibernate.Persister.Entity.AbstractEntityPersister.Update(Object id, Object[] fields, Int32[] dirtyFields, Boolean hasDirtyCollection, Object[] oldFields, Object oldVersion, Object obj, Object rowId, ISessionImplementor session)
at NHibernate.Action.EntityUpdateAction.Execute()
at NHibernate.Engine.ActionQueue.Execute(IExecutable executable)
at NHibernate.Engine.ActionQueue.ExecuteActions(IList list)
at NHibernate.Engine.ActionQueue.ExecuteActions()
at NHibernate.Event.Default.AbstractFlushingEventListener.PerformExecutions(IEventSource session)

Wanna join the discussion?! Login to your AbleCommerce Forums forum account. New Registrations are disabled.

mbartens26403835  
#2 Posted : Monday, October 30, 2023 8:42:34 AM(UTC)
mbartens26403835

Rank: Newbie

Groups: Registered, Developers
Joined: 8/11/2021(UTC)
Posts: 6

Thanks: 2 times
Has anyone looked at this? We have another sale and this will probably happen again unless there is a resolution. Thank you
Katie S  
#3 Posted : Monday, October 30, 2023 1:22:03 PM(UTC)
Katie S

Rank: Advanced Member

Groups: System, Administrators, Developers, Registered, HelpDesk
Joined: 10/29/2018(UTC)
Posts: 470

Thanks: 4 times
Was thanked: 34 time(s) in 33 post(s)
Hi,

I'm sorry, but the bug report missed our cut-off for the last release. We have not had a chance to look into this issue. This scenario with inventory control along with a massive influx of new orders could be problematic but let me ask a few questions first.

Paypal - are you using PayPal Instant Payment Notification?

Authorize.net CIM - are payments captured at time of sale?

Is your inventory setting set to destock on paid orders?

Unfortunately, our software doesn't have advanced features where there is a lock on a product that is added to someone's shopping cart. For example, we've seen, in cases of specials sales where you can put that item in the cart and have some x time to checkout.

For AbleCommerce, it is more like a race to the checkout. I am not sure if we do one final check on inventory right before accepting payment. I need to get the devs input on this.

Thanks for your support!

Katie
Secure eCommerce Software and Hosting
mbartens26403835  
#4 Posted : Wednesday, November 1, 2023 9:21:32 AM(UTC)
mbartens26403835

Rank: Newbie

Groups: Registered, Developers
Joined: 8/11/2021(UTC)
Posts: 6

Thanks: 2 times
Hi,
Thank you for responding. Yes, we are using PayPal Instant Payment Notification and for Authorize.net CIM payments are captured at time of sale.
Yes, inventory is setting to destock on paid orders.
Originally Posted by: Katie S Go to Quoted Post
Hi,

I'm sorry, but the bug report missed our cut-off for the last release. We have not had a chance to look into this issue. This scenario with inventory control along with a massive influx of new orders could be problematic but let me ask a few questions first.

Paypal - are you using PayPal Instant Payment Notification?

Authorize.net CIM - are payments captured at time of sale?

Is your inventory setting set to destock on paid orders?

Unfortunately, our software doesn't have advanced features where there is a lock on a product that is added to someone's shopping cart. For example, we've seen, in cases of specials sales where you can put that item in the cart and have some x time to checkout.

For AbleCommerce, it is more like a race to the checkout. I am not sure if we do one final check on inventory right before accepting payment. I need to get the devs input on this.



Katie S  
#5 Posted : Monday, November 6, 2023 3:42:19 PM(UTC)
Katie S

Rank: Advanced Member

Groups: System, Administrators, Developers, Registered, HelpDesk
Joined: 10/29/2018(UTC)
Posts: 470

Thanks: 4 times
Was thanked: 34 time(s) in 33 post(s)
Hi,

This is the information given to me from our team:

Quote:
I have inspected the code and here are the findings:
- We only allow the final checkout if the item is in stock.
- Inventory is updated on order status change.
- If a user enters final checkout the payment will be accepted, and inventory will be updated when order status is updated to paid.
- It seems that the orders are so quick that after accepting payment for O#1 and before updating inventory, O#2 is placed and payment accepted.


I just wanted to add that PayPal IPN can take longer than the traditional gateway. My thought is that perhaps the PayPal IPN orders have a slight delay over the payment gateway.

I don't know that there anything we can do to prevent this from happening, unless there was a new feature where inventory can be reserved on add to basket. Removing Paypal IPN might be a work-around, if that is something you can test for.
Thanks for your support!

Katie
Secure eCommerce Software and Hosting
Users browsing this topic
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.