Page 1 of 1

Stock not auto-updating after upgrade to 2.3.0.2

Posted: Thu Jun 08, 2017 9:56 pm
by rhorne
We've just upgraded our Opencart installation from 1.5.X to 2.3.0.2. Now obviously this was quite a leap in versions and we've had countless other issues I've managed to fix, but one I can't get to the bottom is that stock is not automatically being deducted after orders are placed.

I've checked SETTINGS > CHECKOUT > PROCESSING ORDER STATUS and it is set to PROCESSING.

In addition to this I've also checked that my payment methods all change the status of an order to PROCESSING after checkout, too, but something is still awry.

The only stock-related extensions I have is one that allows customers to register for notifications when a product goes out of stock and shouldn't have any bearing on stock levels.

Any suggestions?

Re: Stock not auto-updating after upgrade to 2.3.0.2

Posted: Thu Jun 08, 2017 10:03 pm
by rhorne
I can also confirm that all products have SUBTRACT STOCK set to YES. This was working fine before the update.

Re: Stock not auto-updating after upgrade to 2.3.0.2

Posted: Fri Jun 09, 2017 5:27 am
by sculptex
I would set up a fresh test store with 2.3.0.2 in a sub folder to make sure everything works on your server. Also try it with/without that stock mod.
Then I would try copying all the product related tables across to the test store and see if that breaks it and go from there.

Re: Stock not auto-updating after upgrade to 2.3.0.2

Posted: Fri Jun 09, 2017 5:45 am
by zedrally
Hah, it's never worked for me. I just thought it was an Open Cart thing.

Re: Stock not auto-updating after upgrade to 2.3.0.2

Posted: Fri Jun 09, 2017 4:15 pm
by sculptex
It works on 2.0.3.1 (my live store). I cant imagine its broken in 2.3.0.2 as there would be a lot more about it on these forums.
In this case, I suspect there may be some remenant/difference in the database from the upgrade causing this issue. By following my steps above this should prove/disprove my theory. The next step would be to compare the tables between updated database and the fresh install. In particular, if there was a stock related mod on the old site db, it may have affected the upgrade.
I've not done any 1.x to 2.x upgrades so I am happy to defer to anyone else with more experience on this.

Re: Stock not auto-updating after upgrade to 2.3.0.2

Posted: Fri Jun 09, 2017 5:56 pm
by rhorne
I've found quite a few other people who have had this issue after upgrading their OpenCart installation so I don't think it's isolated but it's proving difficult to troubleshoot.

I will setup a second installation of 2.3.0.2 but I'm sure this will work and won't really help troubleshoot my issue.

Re: Stock not auto-updating after upgrade to 2.3.0.2

Posted: Fri Jun 09, 2017 6:21 pm
by rhorne
OK - update.

It seems that stock is only being deducted for one of my two payment methods. PayPal pro works fine, but PayPal Standard isn't deducting stock. I've no idea why but I'm getting closer.

Re: Stock not auto-updating after upgrade to 2.3.0.2

Posted: Fri Jun 09, 2017 8:08 pm
by sculptex
Well if from mysql admin you dump table structure only for tables starting oc_product, we could compare for differences vs fresh install.
Howver, if it works fine for other payment gateway though, its probably payment gateway related instead.
I'm on mobile at moment so can't investigate.

Re: Stock not auto-updating after upgrade to 2.3.0.2

Posted: Sat Jun 10, 2017 8:53 am
by zedrally
I wouldn't think it would be payment gateway related.
I find that even if I do a COD transaction or Bank Transfer stock doesn't decrease.
OC version 2.0.3.1
I'll live with it as we only have a small stock inventory, it may become a problem in a few years to come but by then I'll most probably migrate Stock & Sales to a custom program leaving OC for web based sales with limited stock.

Re: Stock not auto-updating after upgrade to 2.3.0.2

Posted: Tue Jun 13, 2017 9:47 pm
by rhorne
We have hundreds of products in our shop and so this is not really ideal.

I've tried troubleshooting the best I can but I'm drawing a blank now. Orders placed using PayPal Pro deduct just fine but PayPal Standard ones don't. Does anyone have any tips on how I could possibly troubleshoot this further?

Re: Stock not auto-updating after upgrade to 2.3.0.2

Posted: Thu Jun 15, 2017 4:32 pm
by sculptex
As per my earlier post, if you set up a test store on same server, then note precise steps taken to recreate problem.
This will determine if problem exists on fresh install or just upgrade.

Then we can go from there.

Re: Stock not auto-updating after upgrade to 2.3.0.2

Posted: Thu Jun 15, 2017 4:35 pm
by sculptex
zedrally wrote:
Sat Jun 10, 2017 8:53 am
I wouldn't think it would be payment gateway related.
I find that even if I do a COD transaction or Bank Transfer stock doesn't decrease.
OC version 2.0.3.1
I'll live with it as we only have a small stock inventory, it may become a problem in a few years to come but by then I'll most probably migrate Stock & Sales to a custom program leaving OC for web based sales with limited stock.
It works for me on 2.0.3.1 so its either config or server problem.