freddobloggs
Forum Replies Created
-
Forum: Plugins
In reply to: [WooCommerce] Can you get a race condition with Paypal?Will. That’s exactly the problem, perfectly described. If I think of anything else relevant I’ll pop over there and add to the thread. Many thanks
- This reply was modified 7 years, 6 months ago by freddobloggs.
Forum: Plugins
In reply to: [WooCommerce] Can you get a race condition with Paypal?Gerhard, can you clarify did you try this with a variable product? Because my testing seems to show hold is not working at all for variable products in latest wp/wc versions..
- This reply was modified 7 years, 6 months ago by freddobloggs.
Forum: Plugins
In reply to: [WooCommerce] Can you get a race condition with Paypal?I’ve set up a brand new test installation of wordpress (4.9.8), woocommerce (3.5.1), NO other plugins active. I’ve even tried reverting to the Twenty-Seventeen theme.
Created a variable product with 3 variants, 1 in stock of each. The problem persists. Hold stock does not seem to work for me for variable products.
Is there some key thing I need to set up in these products for hold stock to work? I’ve experimented with manage stock at product level as well as at variant level, but I definitely need to manage it at variant level.
Forum: Plugins
In reply to: [WooCommerce] Can you get a race condition with Paypal?Many thanks for taking a look at this for me.
I’ve done a bit more testing today, in my test copy of the site I’ve disabled ALL plugins apart from Woocommerce, and updated to the latest version of wc, the update appeared to work fine. It also prompted me to update the woocommerce data so I did that and again no apparent issues.
But the issue still persists with Variable products not being put on hold when the user is forwarded to paypal.
I am currently managing stock levels in the variants, not in the main product, but I’ve tried with both levels set to manage stock and I just cannot make this work for variable products.
Is there a particular way I should manage stock with variable products to make the “Hold” work?
Can you think of anything else that might cause this, database entries, esoteric woocommerce settings combinations, anything? I’d really prefer to avoid having to set up the whole store from scratch! Thanks again!
Forum: Plugins
In reply to: [WooCommerce] Can you get a race condition with Paypal?Sorry I’d add this to previous comment if I could but there appears to be no way to edit.
Further testing shows this is only happening for variable products, a simple product didn’t show the issue.
Forum: Plugins
In reply to: [WooCommerce] Can you get a race condition with Paypal?Further testing. Created a couple of variable products with one each in stock. I was able to put both items in cart in one browser, go to cart, checkout, PayPal, leave that browser sitting in PayPal. Repeat in another browser, nothing stopped me from getting through to PayPal with same two items in cart.. Hold for X minutes setting seems to be entirely broken in my environment. Any thoughts? I have tested with no cache at all and issue persists.
Forum: Plugins
In reply to: [WooCommerce] Can you get a race condition with Paypal?Sorry for so many questions but I’m doing a bunch of analysis and testing today and I’m getting some weird results.
I have a test copy of the site which had the issue, which I’m testing on so real users don’t interfere with my stock.
I have WC set to manage stock in main settings and on individual items and variants. I have “Hold Stock” set to 5 minutes. I don’t have any caching enabled.
I have a variable product with 3 variants, v1 has 4 in stock, v2 has 3 in stock, v3 has 2 in stock.
So in a browser I go to that page and add one of each variant to my cart. As expected I do not see the available stock numbers go down at this point. I click through to checkout. Again as expected stock numbers stay the same (I’m checking stock levels in front end product page in incognito window and in back end looking at stock on product and variants).
However according to your comment above, when I click on the “Proceed to Paypal” button, I would expect the stock to be reserved at that point, however I do not see stock levels decrease in back end and in incognito window looking at front end I still see 4, 3 and 2 in stock, same as I initially setup.
Would you expect those numbers to go down at that point or does this “Reservation” take place somewhere else which doesn’t affect the stock count display??
Forum: Plugins
In reply to: [WooCommerce] Can you get a race condition with Paypal?Can you clarify, at what point is the stock finally deducted, or perhaps better description, confirmed deducted? I have hold set to 5 minutes. I only have Paypal payment.
So assuming a user checks out with Paypal within 5 minutes and returns to the site correctly. Does woocommerce finalise the order and stock deduction on that page where they return to the site?
Does it occur when the IPN comes back from Paypal?
Can it happen on either of those?
Many thanks!
Forum: Plugins
In reply to: [W3 Total Cache] Can cache plugin cause overselling in woocommerce?I am also in conversation with woocommerce support on this. FYI I’m by no means sure the cache is causing this but apparently overselling has never been an issue before and the cache is the only major change I’ve made to the site.
Forum: Plugins
In reply to: [WooCommerce] Can you get a race condition with Paypal?Many thanks for the reply, it’s very helpful to know at what point the stock is reserved, that was previously quite unclear.
I’m wondering, the site did collapse a bit under the load, I assume the order is sort of confirmed in wc when the user returns to the site from PayPal, what if that page load were to fail, the order would be in a sort of pending state until PP sent the Ipn notification. With a hold timeout of 5 minutes, perhaps that is occurring and the stock is being incremented after 5 minutes, allowing a window for another purchase of the same item before the Ipn notification permanently allocates that stock? Does that sound feasible?
Forum: Plugins
In reply to: [W3 Total Cache] Can cache plugin cause overselling in woocommerce?Many thanks for the reply, sorry with hindsight I should have mentioned, I checked that guide before contacting you. Woocommerce is a recent version so according to the guide I don’t have to manually exclude those pages, and indeed I cannot see them in the cache files at all.
At this time I have the db cache disabled, in fact I’m only using the enhanced page cache and browser caching.
According to woocommerce support, stock is reserved at the point the user clicks pay in checkout, just before they are forwarded to PayPal. With current settings it is reserved for 5 minutes, which should be enough to get back from PayPal.
I’m wondering. Even with the cache, the site did collapse a bit under the load during that sale. So I’m wondering if when people returned to the site after payment, if that page load failed, perhaps the stock then returned to available (after the 5 minute timeout) before PayPal sent the Ipn back, or something along those lines.