This issue has been migrated from the Forge. Read the original ticket here.
Frontcontroller::init - Cart cannot be loaded or an order has already been placed using this cart
This happens whenever an order is placed using any payment module. However, everything is working fine, orders are getting placed and nothing is missing.
I thought that this whole ordeal was fixed since the creation of this topic:
..but I guess I was wrong. Just thought I'd raise awareness so the devs can get to fixing this once and for all.
Place an order using check
This comment has been migrated from the Forge. Read the original comment here.
Hi Marion F,
I manage to reproduce the issue with the last version 1.7.4.2.
I attached a video record.
Aug 17 2018 10_31 AM.webm
Best regards, Khouloud
I have the same issue on 1.7.4.2 but with 2 commands for this order. It happened twice with Paygreen payment. It does not happen every time but randomly. It's embarrassing because we have two invoices generated.
Hi @bestmomo ,
The issue is added to our bug roadmap.
There are some major issues to solve before this one.
But PrestaShop is an open source project, so it can be solved before if someone submits a pull request to solve it.
Best regards, Khouloud
Hi,
I encounter the same issue on version 1.6 and 1.7. It occurs when a customer double clicks on the payment method (1.6) or on the 'order with an obligation to pay' button.
A solution would be to prevent clicking the button twice with javascript/jquery.
To reproduce:
Hi @LDrewes,
For the PS1.7, here's the PR: https://github.com/PrestaShop/PrestaShop/pull/9373 to prevent users from double-click on Payment button, it is added in the 1.7.5.0.
But in the 1750beta1, I have this error in my log
So, it could be another issue.
Thanks!
I'm experiencing the same error in logs.
I'm still on 1.7.4.2.
Hi @masiorama,
I manage to reproduce the issue with PS1.7.5.0
It is not fixed yet.
There are some major issues to solve before this one.
PrestaShop is an open source project, so it can be solved before if someone submits a pull request to solve it.
Thanks for your understanding!
Thanks, I totally understand, was just giving my exp about the matter.
I'm on a tight schedule on these weeks, and though I already have planned a couple of pulls for other little bugs I experienced, I really cannot find spare time to investigate and fix. I hope to manage to be able to contribute soon.
Thanks!
@khouloudbelguith Could you try to reproduce it with 1.7.6.0 ?
@marionf, yes, I have the same issue with PS1.7.6.0beta1
Thanks!
Hi,
I have the same issue on prestashop 1.7.6.1
Hi @imaging04,
I have the same issue with PS1.7.6.1.
It is not fixed yet.
Sorry not yet.
There are some major issues to solve before this one.
But PrestaShop is an open-source project, so it can be solved before if someone submits a pull request to solve it.
Thanks!
I think that the problem is that cookie->id_cart is not unset in the ValidateOrder function and so in the next page FrontController is trying to access a cart validated as an order.
Hi @cedricfontaine,
If you have already fixed it on your end or if you think you can do it, please do send us a pull request!
Thanks!
No, we didn't fix it, but we look up to find if it's a bug in our code or a core bug.
I got this error by migration of product from prestashop to an other prestashop using MigrationPro.
i fix it by using ETS Migrator.
same issue with 1.7.6.3 with every order is placed
Same problem prestashop with 1.7.6.2
For every order
Any update about this ?
Can add prestashop 1.7.6.3 that have the same problem
Same issue with PS1.7.6.4.
Thanks!
Version 1.7.5.1
The log is written by classes/controller/FrontController.php line 368
if (Validate::isLoadedObject($cart) && $cart->orderExists()) {
PrestaShopLogger::addLog('Frontcontroller::init - Cart cannot be loaded or an order has already been placed using this cart', 1, null, 'Cart', (int) $this->context->cookie->id_cart, true);
unset($this->context->cookie->id_cart, $cart, $this->context->cookie->checkedTOS);
$this->context->cookie->check_cgv = false;
} elseif ...
Version 1.7.5.1
The log is written by classes/controller/FrontController.php line 368
if (Validate::isLoadedObject($cart) && $cart->orderExists()) { PrestaShopLogger::addLog('Frontcontroller::init - Cart cannot be loaded or an order has already been placed using this cart', 1, null, 'Cart', (int) $this->context->cookie->id_cart, true); unset($this->context->cookie->id_cart, $cart, $this->context->cookie->checkedTOS); $this->context->cookie->check_cgv = false; } elseif ...
Hello Sanctusmob,
Thank you for your reply, and what is the next step for this issue ?
Thank you in advance for help
Hello Sanctusmob,
Thank you for your reply, and what is the next step for this issue ?Thank you in advance for help
I haven't figured out.
Its supposed id cart to be unset when the order is place? (i haven't find any code for this)
Is obvious that is checking if an order have been placed with cookies id cart.
Same problem here with 1.7.6.2 ...
@khouloudbelguith Could you try to reproduce it with 1.7.7.x branch ?
Hi @marionf,
Yes, the same issue with branch 1.7.7.x
Thanks!
The problem seems not to come from presahop, but from an installed module. for my case it's a payment module
this link explains well why
https://eligeunaweb.es/como-arreglar-el-error-frontcontrollerinit-cart-cannot-be-loaded-or-an-order-has-already-been-placed-using-this-cart/
The problem seems not to come from presahop, but from an installed module. for my case it's a payment module
this link explains well why
https://eligeunaweb.es/como-arreglar-el-error-frontcontrollerinit-cart-cannot-be-loaded-or-an-order-has-already-been-placed-using-this-cart/
Is not a module problem it'a prestashop problem, and the solution in the page you indicated is a workaround not a fix.
Hello, any news about this ?
The problem is also present in PS 1.7.6.5
Problem still present in prestashop 1.7.6.6
Has anyone found how to correct the problem? and still present in prestashop 1.7.6.7
I have the same issue, nobody can solve it?
i found an interesting thread in the forum but was for the old 1.6 version.
https://www.prestashop.com/forums/topic/597807-bug-on-frontcontrollerinit/
Hi same issue with just one client.
also same problem in 1.7.6.7 .. But I don't know where it comes from..
Hi There,
we have also the same issues with several customers. Some of them are getting split orders (x2) with payment gateways issues due to the split generated by Prestashop in 1.6.1.24. This is generating wrong payments and then wrong invoices at the end. Any chance to get a fix soon?
Most helpful comment
Version 1.7.5.1
The log is written by classes/controller/FrontController.php line 368