Post by GazzaBJ » Fri Oct 08, 2021 7:09 pm

Hi,
We've just upgraded to OC3.0.3.7 and have only just spotted an issue when editing an order.
I have managed to trace the code as far as making the call to the API to edit the order, but why it deducts the quantity from the product again, I am not sure.
Also, another odd one is that it changes the Customer Group to the default value, but only for the order, not for the customer. Maybe this is why the quantity is deducted again?
Unfortunately, this has occurred after we have gone live following testing and this one slipped through the testing net!

Has anyone had any experience with this or possibly point me in the right direction for debugging?

We have about 20+ mods installed so I guess removing these one by one may be the starting point?

Any help always appreciated.

Thanks.

Newbie

Posts

Joined
Fri Feb 21, 2020 10:47 pm

Post by ADD Creative » Sat Oct 09, 2021 12:05 am

You could do a clean install of 3.0.3.7 on a test server and try to recreate your issues using the same settings. That way you know if the problem was with OpenCart or your extensions.

www.add-creative.co.uk


Expert Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by by mona » Sun Oct 10, 2021 1:44 am

Default OC deducts stock and stuff like vouchers and rewards etc. when the order changes status from any status which is not part of the selected processing and completed statuses to a status which is. Those sets are set in admin.

So if you have "processing" status selected in the "processing statuses" set and your order status moves from

"pending" to "processing", the reduction takes place as "pending" is not a part of the set and "processing" is.
"missing" to "pending", no reduction takes place as neither is part of the set.
etc.

The reverse is also true, moving from "processing" to "pending" replenishes the stock.

Not entirely sure if this also applies when editing orders in admin but I suspect it does as this is done in the addOrderHistory method.

so check your processing and completed order statuses sets.

(substract stock has to be set of course)

DISCLAIMER:
You should not modify core files .. if you would like to donate a cup of coffee I will write it in a modification for you.


https://www.youtube.com/watch?v=zXIxDoCRc84


User avatar
Expert Member

Posts

Joined
Mon Jun 10, 2019 9:31 am

Post by GazzaBJ » Wed Oct 20, 2021 4:04 pm

Thanks for the replies, did a fresh install and that was working, narrowed it down to a bug in a modification which has since been resolved.

Cheers all!

Newbie

Posts

Joined
Fri Feb 21, 2020 10:47 pm
Who is online

Users browsing this forum: fordprobeparts, RoyT, Semrush [Bot], supak111 and 259 guests