Post by harryo40 » Thu Oct 25, 2012 3:44 pm

Running OC1.5.1.3

Hi,
This is not the first time its happened but 2 customers have checked out with the same product in there cart & both paid with paypal, but there was only 1 of these products available which leaves the stock quantity on -1.

The time the orders were added in the database, there is 26 seconds between them.

On a previous ocasssion, the same thing happened but one paid with paypal & the other with card, but there was just over 2 minutes difference between the orders being added to the database.

Is there some way of avoiding this or can something be changed in the coding in order to prevent this from happening? Because having to contact one of the customers & explain to them that the item is no longer available, is not ideal or the best way to run an ecommerce store?
regards

Add To Cart Confirm Ajax Popup for OC 1.5.1.3 --> 1.5.5.1 - Add to Cart Confirmation Popup
Image Map Banner Module - Image Map Banner Module
----------------------------------------------------------------------
Womens Famous Name Fashion Clothing at bargain prices - Next2nowt.com


Active Member

Posts

Joined
Wed Oct 21, 2009 3:37 am
Location - Blackburn, Lancashire

Post by pedro1993 » Thu Oct 25, 2012 10:19 pm

When a user is at the checkout page the level is verified (for the last time) when they reach the confirm order section. Once they press order they are obviously directed to PayPal/the other payment method.

The only way I can think this happened is the users both got to PayPal at the same time. Once they are on PayPal's website there is no way of actually checking the stock before payment because they are temporily on another site. I can't be sure without trying it myself.

When they are returned to your website the payment has already been taken and that is when the order is placed on your database, despite your stock levels. At that point you can't check the stock level and deny the order because the customer has technically paid.

There are work arounds which I can think of:

1. For each product, add 2 less to your quantity. For example if you had 10 pencils in stock, add 8 to OpenCart that way you have 2 on standby if anything goes wrong.

2. I am not sure if this has been done on OpenCart. But some websites (like ticket websites) change the stock whilst the user at the checkout. For example, when if I try buy 5 pencils, the stock will be changed then. This gives OpenCart enough time to check if the item is actually in stock before the user reaches the checkout. This also means any other users trying to order the same might get an error saying that the product is now unavailable.

Peter :)

For OpenCart & PHP/MySQL support feel free to PM me :)
Click here for my extentions
Did I help you? Donate here to show support


Active Member

Posts

Joined
Tue Oct 18, 2011 4:31 am
Location - Glasgow, Scotland

Post by Avvici » Fri Oct 26, 2012 12:31 am

I agree, there needs to me a "temporary" hold on an item if in that particular session there is a customer wanting certain items. However, the hold cannot last too long and needs to have conditions because someone could keep their browser window open for 5 hours on the checkout page which would lose you sales due to a lack of stock "which in reality is actually there." It's an interesting point however.

User avatar
Expert Member

Posts

Joined
Tue Apr 05, 2011 12:09 pm
Location - Asheville, NC

Post by harryo40 » Fri Oct 26, 2012 12:52 am

pedro1993 wrote:2. I am not sure if this has been done on OpenCart. But some websites (like ticket websites) change the stock whilst the user at the checkout. For example, when if I try buy 5 pencils, the stock will be changed then. This gives OpenCart enough time to check if the item is actually in stock before the user reaches the checkout. This also means any other users trying to order the same might get an error saying that the product is now unavailable.
Peter :)
I agree with this part but your first point would not work for us as most products are one offs meaning we do not have quantities of them.

Having the cart deduct the item from the total stock as soon as its added to cart sounds like a good idea & would solve the problem but like you both say, it needs to be only for a certain time, such as 1 hour.
If the customer has not checked out in one hour or they logout of there account or they simply leave there computer for hours, the item would then show back on the site for others to purchase, but implementing this would mean changing quite a bit I would have thought, but it would certainly solve the problem we have had on more than one occasion.
Other people may not experience this problem because they probably have quantities per product but when 98% of your products have a quantity of 1, then its starting to create problems for us.

Add To Cart Confirm Ajax Popup for OC 1.5.1.3 --> 1.5.5.1 - Add to Cart Confirmation Popup
Image Map Banner Module - Image Map Banner Module
----------------------------------------------------------------------
Womens Famous Name Fashion Clothing at bargain prices - Next2nowt.com


Active Member

Posts

Joined
Wed Oct 21, 2009 3:37 am
Location - Blackburn, Lancashire

Post by Avvici » Fri Oct 26, 2012 1:24 am

I think you would benefit from a little custom work on your store to make sure this doesn't happen. Lots of good developers on the forum that would be willing to help you out. That is, if there isn't already an extension for it. (probably not)

User avatar
Expert Member

Posts

Joined
Tue Apr 05, 2011 12:09 pm
Location - Asheville, NC

Post by harryo40 » Fri Oct 26, 2012 1:50 am

I doesn't happen often but I do know it has happened on at least 3 occasions & the 3rd time was yesterday. I know there was only 26 seconds between when they were added into the database but the last time, which was around 4 weeks ago, there was over 2 minutes between them & one paid with paypal & the other using a credit / debit card.
As for tons of shoppers, no matter how many you have, you could always do with more lol

Add To Cart Confirm Ajax Popup for OC 1.5.1.3 --> 1.5.5.1 - Add to Cart Confirmation Popup
Image Map Banner Module - Image Map Banner Module
----------------------------------------------------------------------
Womens Famous Name Fashion Clothing at bargain prices - Next2nowt.com


Active Member

Posts

Joined
Wed Oct 21, 2009 3:37 am
Location - Blackburn, Lancashire

Post by pedro1993 » Fri Oct 26, 2012 2:43 am

harryo40 wrote:I doesn't happen often but I do know it has happened on at least 3 occasions & the 3rd time was yesterday. I know there was only 26 seconds between when they were added into the database but the last time, which was around 4 weeks ago, there was over 2 minutes between them & one paid with paypal & the other using a credit / debit card.
As for tons of shoppers, no matter how many you have, you could always do with more lol
I think it is ticket master in the UK who have a system like this. It is really clear and helpfull for the user because it has a five minute countdown showing. The countdown is reset to 5 minutes each time the user completes a stage at the checkout, so the only way it reaches 0 is if the user leaves or does nothing on the website. Of course the timer is not a must have. I'd imagine some website operate link this without the user knowing

This is something I can do, or as avvici said, pop on to the commercial forums :)

For OpenCart & PHP/MySQL support feel free to PM me :)
Click here for my extentions
Did I help you? Donate here to show support


Active Member

Posts

Joined
Tue Oct 18, 2011 4:31 am
Location - Glasgow, Scotland

Post by harryo40 » Fri Oct 26, 2012 4:18 am

pedro1993 wrote:The countdown is reset to 5 minutes each time the user completes a stage at the checkout, so the only way it reaches 0 is if the user leaves or does nothing on the website. Of course the timer is not a must have. I'd imagine some website operate link this without the user knowing

This is something I can do, or as avvici said, pop on to the commercial forums :)
Sound like it will stop people being able to check out with the same products.
I am away for 2 weeks very soon but is it ok for me to PM you when I return & we can discuss this more?
thanks for the help by the way ;)

Add To Cart Confirm Ajax Popup for OC 1.5.1.3 --> 1.5.5.1 - Add to Cart Confirmation Popup
Image Map Banner Module - Image Map Banner Module
----------------------------------------------------------------------
Womens Famous Name Fashion Clothing at bargain prices - Next2nowt.com


Active Member

Posts

Joined
Wed Oct 21, 2009 3:37 am
Location - Blackburn, Lancashire

Post by pedro1993 » Fri Oct 26, 2012 6:14 am

Lucky for some, I wish I was away for a few weeks! :P Yeah sure, not a problem :)

For OpenCart & PHP/MySQL support feel free to PM me :)
Click here for my extentions
Did I help you? Donate here to show support


Active Member

Posts

Joined
Tue Oct 18, 2011 4:31 am
Location - Glasgow, Scotland
Who is online

Users browsing this forum: stefansmith129 and 198 guests