Post by rhorne » Thu Jun 08, 2017 9:56 pm

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?

Active Member

Posts

Joined
Wed Jan 18, 2012 3:07 am

Post by rhorne » Thu Jun 08, 2017 10:03 pm

I can also confirm that all products have SUBTRACT STOCK set to YES. This was working fine before the update.

Active Member

Posts

Joined
Wed Jan 18, 2012 3:07 am

Post by sculptex » Fri Jun 09, 2017 5:27 am

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.

ImageImage


User avatar
Active Member

Posts

Joined
Tue Sep 13, 2011 3:07 am
Location - UK

Post by zedrally » Fri Jun 09, 2017 5:45 am

Hah, it's never worked for me. I just thought it was an Open Cart thing.

Active Member

Posts

Joined
Mon Sep 29, 2014 12:12 pm

Post by sculptex » Fri Jun 09, 2017 4:15 pm

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.

ImageImage


User avatar
Active Member

Posts

Joined
Tue Sep 13, 2011 3:07 am
Location - UK

Post by rhorne » Fri Jun 09, 2017 5:56 pm

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.

Active Member

Posts

Joined
Wed Jan 18, 2012 3:07 am

Post by rhorne » Fri Jun 09, 2017 6:21 pm

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.

Active Member

Posts

Joined
Wed Jan 18, 2012 3:07 am

Post by sculptex » Fri Jun 09, 2017 8:08 pm

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.

ImageImage


User avatar
Active Member

Posts

Joined
Tue Sep 13, 2011 3:07 am
Location - UK

Post by zedrally » 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.

Active Member

Posts

Joined
Mon Sep 29, 2014 12:12 pm

Post by rhorne » Tue Jun 13, 2017 9:47 pm

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?

Active Member

Posts

Joined
Wed Jan 18, 2012 3:07 am

Post by sculptex » Thu Jun 15, 2017 4:32 pm

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.

ImageImage


User avatar
Active Member

Posts

Joined
Tue Sep 13, 2011 3:07 am
Location - UK

Post by sculptex » Thu Jun 15, 2017 4:35 pm

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.

ImageImage


User avatar
Active Member

Posts

Joined
Tue Sep 13, 2011 3:07 am
Location - UK
Who is online

Users browsing this forum: julianashcroft and 283 guests