Jump to content

Strange problem with adding order from back-office


simplyyourself

Recommended Posts

Hello!

I have strange problem with adding order from back-office.

 

1) I'm going to Orders > Add new order,

2) I'm selecting client,

3) I'm looking for a product (totally random),

4) I'm selecting product (random),

5) I'm clicking Add to cart

6) I'm getting error: An order has already placed with this cart. This product cannot be added to cart.

7) I'm opening new tab and going to Customers > Shopping Carts. 

8) There is new shopping cart, but it is connected with order #1417 (now I have 8411) from year 2015.

9) I'm going again to Orders > Add new order and I repeat steps from 2) to 5) and I'm getting error from step 6) but this time shopping cart is connected with order #1418.

10) I'm going again to Orders > add new order and I repeat steps from 2) to 5) and I'm getting *NO ERROR*. Shopping cart is added but it is not connected with any previous orders.

11) I repeat adding new order few times and I'm able to add product to cart without error.

12) Then, after repeating few times placing new order without error, I'm getting the same situation like described in 8), 9).

13) Then after repeating few times placing new order with error, I'm able to place new order without error.

 

Situation is totally random. What is worse – clients can reproduce this error randomly and randomly can place orders.

I can reproduce this error even with fresh installation of PrestaShop connected to primary database, so I guess that problem lies in database.

One more thing. When this error happens, in Advanced Parameters > Logs appears error with Severity = 1, Object type = Cart, Error code = 0x0 and value of error: 

Frontcontroller::init - Cart cannot be loaded or an order has already been placed using this cart,

 

 

Guys, honestly, I don't have fckng idea, what to do. I change values of AUTO_INCREMENT for ps_orders and ps_carts to higher values. Nope. I was trying with cache, with overrides, disabling overrides and non-presta modules – nothing works. error_log show *nothing* about this.

 

There is another problem. I can't place here link to shop because... There is a chance that my client will go to court with company that made this shop because they fckd up work for a lot of cash and they don't want to hear that a lot of things are broken. I'm doing an audit and list of non-working things, bad code, modifying core files (not using overrides) are disaster. Please don't ask question what company from here did this.

 

What else can I do to fix this problem?

 

Best regards, Milosz

Link to comment
Share on other sites

  • 2 weeks later...

I think You should hire someone from this forum with good aknowledgment in relations between orders structure in database to see what might be a reason. In my opinion someone tried to remove some orders but he did it with bad luck and now database lost is strong structure and everything went random. There are some good companies like @Daresh, @vekia, @endriu107, @e_com and @xirus 

You told that there some orders from 2015 so this version of Prestashop is pretty old isn't it? They changed core files so upgrade is impossible. Maybe try to start all over again?

Quote

There is a chance that my client will go to court with company that made this shop because they fckd up work for a lot of cash and they don't want to hear that a lot of things are broken

 

Well, actually - they should go to court because they hired some incompetent company and they're right.
I had my lesson when I changed core files and I have to update shop manually, file by file, changelog by changelog for 2 weeks to be up to date and clean all the mess what I've done from past 2 years when I started Prestashop store.
 

  • Like 1
Link to comment
Share on other sites

  • 2 weeks later...

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...