Jump to content

Random problem - Order totals doubled


Eutanasio

Recommended Posts

Hi,
I don't know why, but sometimes the system has this strange behavior (very frequent), it doubles the totals of the orders. As you may know, in Prestashop there are several attributes within the ps_orders table that set the total price of an order, and there is a formula for that but I don't really know how it's done exactly.

The thing is that, as you can see in the example image attached, for some orders, sometimes, the totals are doubled and I have to manually access the DB and correct that manually.

What I need is a little code to be developed and added to an override of AdminOrders controller, so every time an employee opens an order in the admin page, this code must check if the totals are OK or they must be corrected, and this correction is done automatically.

I hope I've been clear enough, a savvy Prestashop programmer should easily understand the problem and find a quick solution Thanks!

PS: no cron tasks please

error 15.50.35.jpg

Link to comment
Share on other sites

5 minutes ago, Nickz said:

Actually the amounts are not double 3800 x 2 is 7600 and 2 times 3166 is 6332

What is the total of each, if you want you can give me more details over PM.

 

If you take into account how Prestashop calculates all those prices, you'll see that indeed it's double, as:

Total_paid = total_wrapping + total_shipping + tota_products - total_discounts

So, 3.800 + 50 = 3.850 * 2 = 7.700

Link to comment
Share on other sites

7 hours ago, Nickz said:

There is shipping incl 50 plus shipping excluded 50 that should cancel itself out.  When adding the total shipping you are still 50 short.

What modules are you using? What is the item price?

I think you don't actually really understand how this works... I'd appreciate if you could let other users with more technical knowledge to intervene in this thread to actually help me find a solution... if they ever do

Link to comment
Share on other sites

40 minutes ago, Crezzur said:

First off all it sounds like a weird issue, is this something that happens with all prestashop versions? does this happen when people buy 2 artikels?

Second if you just need an override with a simple sql query than we can do this for you. We charge one hour of work.

Kind regards

Jaimy Aerts

https://crezzur.com

Thanks for answering, this happens randomly in my case on PS v1.7.6 on manual orders we process on BO (doesn't happen in FO).

This issue affects, let's say about 2-5% of the orders we process. We haven't seen any correlation on the orders that have this issue. They can be orders using any kind of payment/shipping method, containing, 1 or more products, from 1 or different warehouses... so seems totally random.

Can you please @Crezzursend me a PM with your proposal? how will you approach this problem and what would be the cost for the solution. For you to try on your side if your solution really works, try to replicate this doubling issue on an order directly on the Database of a PS installation you have, and then see if your automation detects it and fixes the doubling.

Regards 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...