Jump to content

Cart cannot be loaded or an order has already been placed using this cart


Recommended Posts

I have installed PS 1.6.1.0, I've got everything setup and working however I am facing an odd problem.  When an order is placed and payment is taken the order confirmation via email and back office shows no product information in the order.  All pricing, shipping and taxes are shown but there are no product details.

 

If i go in to the BO and view Customers > Shopping Carts, the product information is visible here.

 

I am using Realex payment module and to make sure it's not the module that's causing the problem I switched the payment option to COD (cash on delivery) and I experienced the exact same problem.

 

The customer order confirmation (HTML) DOES show the product information and seems to be working fine but the PDF generated invoice does not show any product information at all.

 

 

After viewing the error logs in the BO I get the following error:

 

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

 

Can anyone shed some light on this issue?

 

UPDATE - I just installed the PayPal module and I am getting the same problem although payment is still going through.

Edited by delvedesign (see edit history)
  • Like 2
Link to comment
Share on other sites

You're not the only one that's getting this error. I'd like to know a fix for this too! This is also happening 1.6.1.1

 

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

 

I re-installed PS and managed to get it working with Realex.  Now I have another problem with Realex not redirecting me back to the confirmation page.  So no payment is being taken and no orders are being recorded in the BO.

 

Spoken to Realex who have said that they can see a server overload error.  So I increased mem limit to 320M !  and I'm still having the same problem.

Link to comment
Share on other sites

I re-installed PS and managed to get it working with Realex.  Now I have another problem with Realex not redirecting me back to the confirmation page.  So no payment is being taken and no orders are being recorded in the BO.

 

Spoken to Realex who have said that they can see a server overload error.  So I increased mem limit to 320M !  and I'm still having the same problem.

Thanks for the respond.

 

Did you have to reinstall the whole thing and do everything all over again? The problem is, there are over 2,000 products, 700 customers, and everything so I don't want to redo everything all over!

Link to comment
Share on other sites

Thanks for the respond.

 

Did you have to reinstall the whole thing and do everything all over again? The problem is, there are over 2,000 products, 700 customers, and everything so I don't want to redo everything all over!

 

 

Hi Terry

 

I backed up everything beforehand so it wasn't a huge job getting it all back up again.  There must be a better solution to the problem, I would get in touch with Realex and see what they say about it.

Link to comment
Share on other sites

Hi Terry

 

I backed up everything beforehand so it wasn't a huge job getting it all back up again.  There must be a better solution to the problem, I would get in touch with Realex and see what they say about it.

Thanks for the respond,

 

I just looked up Realex, I'm in USA but the issue isn't with Realex. It's Prestashop itself. Realex module isn't installed on that prestashop

Link to comment
Share on other sites

There are a few things going on in this topic, so before you reply and say "i have the same issue", please clarify what issue you have

 

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

This happens with many payment modules (not just realex, paypal or cod)

 

I personally see this message in Logs, but my orders, emails and invoices are fine.  So if this is the only issue you have, then probably safe to ignore.  The best thing you can do is report the issue to the forge, not the forums...
 

2) When an order is placed and payment is taken the order confirmation via email and back office shows no product information in the order.  All pricing, shipping and taxes are shown but there are no product details. 

 

The customer order confirmation (HTML) DOES show the product information and seems to be working fine but the PDF generated invoice does not show any product information at all.

 

This happens with many payment modules (not just realex, paypal or cod)

 

If you have this issue, confirm the issue exists on a clean installation of prestashop with either the bankwire or check module.  If you can reproduce the issue, open a forge ticket with steps to reproduce.

 

3) Spoken to Realex who have said that they can see a server overload error.  So I increased mem limit to 320M !  and I'm still having the same problem.

 

How can realex support possible see a server overload error on your server?  Did they actually log into your server?  If so, then report the issue to your hosting provider...

Link to comment
Share on other sites

  • 1 month later...

I got the same issue and i use multistore on 1.6.1.1.

 

I think the issue only occurs on mutlistores.

 

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

This happens with many payment modules (not just realex, paypal or cod)

 


 

2) When an order is placed and payment is taken the order confirmation via email and back office shows no product information in the order.  All pricing, shipping and taxes are shown but there are no product details. 

 

 

The customer order confirmation (HTML) DOES show the product information and seems to be working fine but the PDF generated invoice does not show any product information at all.

 

This happens with many payment modules (not just realex, paypal or cod) happens with sisowideal to

  • Like 1
Link to comment
Share on other sites

  • 3 weeks later...

OMFG I finally found the problem and fixed it!

 

you came here seeking help, why not document your fix so others looking for help would benefit from it

 

@bellini13 prestashop should read this forum. I dont know forge and never heard of it.

Well they don't, you could try reading the forum rules and the community to learn how to report issues

  • Like 1
Link to comment
Share on other sites

Hello to all,
I use 1.6.1.2 there has the same problem!
@Polystore, please share with us, how to fix this problem?

 

I can delete all availabilities of the products with external software, but that doesn't solve the problem-already tried. When I import quantities, the issue is once again on the site.

 

Please, if anyone else knows how-let me tell everyone.
Thanks
  • Like 1
Link to comment
Share on other sites

Hello,

 

Same problem with my store. I use v1.6.1.1 in multistore mode.

 

Any solution ?

 

The problem is in the stock availbe tabel. It has multiple entries for the same products. Delete the old entries en every thing works untill the next bug will pop up.

@polystore: could you be more precise ?

 

Thks.

Link to comment
Share on other sites

Come on guys. I was very precise. Take a good look at the table stock_availble. Look at the shoplocation and see if it has the right value. Make a new product and you will see that this product works fine. So compare the new product with the old product.

 

 

Everything is working fine now on my website. I think i had to do with an upgraded prestashop tot multistore. 

  • Like 2
Link to comment
Share on other sites

Come on guys. I was very precise. Take a good look at the table stock_availble. Look at the shoplocation and see if it has the right value. Make a new product and you will see that this product works fine. So compare the new product with the old product.

 

 

Everything is working fine now on my website. I think i had to do with an upgraded prestashop tot multistore. 

 

 

Hello,

 

Same problem with my store. I use v1.6.1.1 in multistore mode.

 

Any solution ?

 

@polystore: could you be more precise ?

 

Thks.

 

Hi,

I the same problem, but i have checked my stock_available table and i don't have duplicate entries.

And @polystore, what do you mean for shoplocation? I don't have any fields with this name.

So please be more clear about this solution because documentation sucks.

Thanks

Marco

Link to comment
Share on other sites

Same problem, especially with orders that are paid via HiPay module -> no product details on invoice or packing slip... 

Other paymethods are working without a problem, but are also flagged in the logfiles with 'Frontcontroller::init - Cart cannot be loaded or an order has already been placed using this cart'

Link to comment
Share on other sites

I found the solution here: https://goo.gl/haxMTy

Hope to help all of you

I have changed the Core_Business_Stock_StockManager.php file, but i still get in the log "Frontcontroller::init - Cart cannot be loaded or an order has already been placed using this cart" and all the hooks of my module aren't working.

So this doesn't solve my problem.

 

WHERE IS PRESTAHOP OFFICIAL SUPPORT???

Link to comment
Share on other sites

  • 1 month later...

I have also this problem, after confirmation of the order randomly can see "Cart cannot be loaded or an order has already been placed using this cart" and in Presta log "Frontcontroller::init - Cart cannot be loaded or an order has already been placed using this cart" from Cart object.

 

Any solution to prevent this?... - Prestashop 1.6.1.1

Edited by zolwix (see edit history)
Link to comment
Share on other sites

I am having the same problem with all of my payment methods (COD, bankwire, paypal) : it's eather blank page or cart cannot be loaded after order confirmation. And these issue appeared out of nowhere, it just stopped working one day. I've tried EVERY possible solution that I could find on the internet but no luck.

And these is my error:

Fatal error: Uncaught --> Smarty Compiler: Syntax error in template "/var/www/vhosts/mywebsite/httpdocs/themes/default-bootstrap/mails/si/order_conf_product_list.txt" on line 2 "{$product[\'reference\']}" - Unexpected "\" <-- thrown in /var/www/vhosts/mywebsite/httpdocs/tools/smarty/sysplugins/smarty_internal_templatecompilerbase.php on line 2

 

Please someone help!

 

Thanks

Link to comment
Share on other sites

things don't just stop working out of no where. 

 

The error is because your email templates have been recently changed via the back office (which is defective). 

 

You have likely changed this recently, and the defect is that Prestashop inadvertently adds back slashes \

 

Edit the following file using FTP or Filemanager

/var/www/vhosts/mywebsite/httpdocs/themes/default-bootstrap/mails/si/order_conf_product_list.txt

 

And change this

{$product[\'reference\']}

to this...

{$product['reference']}
Link to comment
Share on other sites

And these is for my paypal payment confirmation:

Warning: Missing argument 1 for PayPal::getTrackingCode(), called in /var/www/vhosts/mywebsite/httpdocs/modules/paypal/express_checkout/process.php on line 242 and defined in /var/www/vhosts/mywebsite/httpdocs/modules/paypal/paypal.php on line 879

Notice: Undefined variable: method in /var/www/vhosts/mywebsite/httpdocs/modules/paypal/paypal.php on line 902

Notice: Undefined variable: method in /var/www/vhosts/mywebsite/httpdocs/modules/paypal/paypal.php on line 909

Notice: Undefined variable: method in /var/www/vhosts/mywebsite/httpdocs/modules/paypal/paypal.php on line 911

Notice: Undefined index: RedirectRequired in /var/www/vhosts/mywebsite/httpdocs/modules/paypal/express_checkout/payment.php on line 312

Fatal error: Uncaught --> Smarty Compiler: Syntax error in template "/var/www/vhosts/mywebsite/httpdocs/themes/default-bootstrap/mails/si/order_conf_product_list.txt" on line 2 "{$product[\'reference\']}" - Unexpected "\" <-- thrown in /var/www/vhosts/mywebsite/httpdocs/tools/smarty/sysplugins/smarty_internal_templatecompilerbase.php on line 2

Edited by tanse (see edit history)
Link to comment
Share on other sites

Fatal error: Uncaught --> Smarty Compiler: Syntax error in template "/var/www/vhosts/mywebsite/httpdocs/themes/default-bootstrap/mails/si/order_conf_product_list.txt" on line 2 "{$product[\'reference\']}" - Unexpected "\" <-- thrown in /var/www/vhosts/mywebsite/httpdocs/tools/smarty/sysplugins/smarty_internal_templatecompilerbase.php on line 2

 

then you have not properly fixed this file

/var/www/vhosts/mywebsite/httpdocs/themes/default-bootstrap/mails/si/order_conf_product_list.txt

Link to comment
Share on other sites

I am on Prestashop 1.6.1.4 and it seems to happen on and off  Only with PayPay payment that the order didn't update that the payment was received. My store, I have Amazon, Paypal and Authorize.net payments enabled. I had upgraded form 1.4 and didn't have any issues. I went to 1.6.1.4 a few weeks ago (Using the Auto Upgrade) and i get this issue in my logs everyday for some orders.  The buyers cart in Prestashop is connected to the user but didn't update that the payment was received for the user. So in the back office, there is no order from that customer. The only way i knew that a payment was received is the email from Paypal. I then have to "manually" convert the shopping cart to an order. 

 

If it helps I am using the PayPal "PayPal Payments Standard" mode with version v1.3.9, I am not running in multi shop mode. 

 

I don't see any error in my Apache logs so it seems that it is not an access issues for PayPal. 

 

If there is anything I can do to maybe log the error or what is causing the issue ?

 

I hope that someone can help find out what the issue is. It is very worrisome and has upset a few of the customers that are concern because the order didn't show up. 

 

Thank you

Link to comment
Share on other sites

How about 1.6.1.4? I am on 1.6.1.0 and I have many smarty errors in php error log and many 

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

 

 

errors in presta logs. Now I am really scared to push "1 click update" button on live server where we have more than 2000 products and at least 60 people a day. It´s not our maximum, we just started, but when new customer will see blank page.... worse when it´s over PPC...

Link to comment
Share on other sites

Hi!

 

We looked into this in our own shop and found a solution. Hopeful it can solve anyone else problem aswell.

 

So the problem we found is that at the order-confirmation page the id_cart cookie was still set. So in FrontController init() it then checks if that cookie is set and then checks if the cart already been used for an order, which it then has. Then it will write out the error in the log.

 

The fix is very easy.

 

Override the OrderConfirmationController.php and add this code:

public function init()
    {
        if ((int)$this->context->cookie->id_cart) {
            $this->context->cookie->__unset('id_cart');
        }
        
        parent::init();
    }

Hopefully it will help and keep your logs free :)

 

EDIT: Just noticed that this will only work if you get to order-confirmation page :P (Which one of our payment modules didn't  <_< )

 

EDIT 2: As bellini13 mentioned here below you can do the same in validateOrder() in PaymentModel.php. That way it should work for any payment solution. So override that and call parent and then unset the cookie like above.

Edited by kalle@makewebo (see edit history)
  • Like 2
Link to comment
Share on other sites

  • 3 weeks later...

I'm struggling with the same "order has already been placed using this cart" issue.

 

My bank payment module (a PayBox solution) does not work as expected. The customer doesn't receive his email order confirmation and he's redirected to his cart instead of the order confirmation page. And the PayPal module doesn't work at all (not sure if it's related though).

 

I tried different things with no luck so far :

- kalle@makewebo's solution didn't work for me : my cart remains empty when I add a product in it

- zmacedoni's didn't work either (see https://www.prestashop.com/forums/topic/483630-bug-161-1-1612-classesstockstockavailablephp/?p=2238722)

- trying to replace classes/stock/StockAvailable.php with file from v1.6.1.0 didn't work

 

Any helps is more than welcome

Link to comment
Share on other sites

Hi!

 

We looked into this in our own shop and found a solution. Hopeful it can solve anyone else problem aswell.

 

So the problem we found is that at the order-confirmation page the id_cart cookie was still set. So in FrontController init() it then checks if that cookie is set and then checks if the cart already been used for an order, which it then has. Then it will write out the error in the log.

 

The fix is very easy.

 

Override the OrderConfirmationController.php and add this code:

public function init()
    {
        if ((int)$this->context->cookie->id_cart) {
            $this->context->cookie->__unset('id_cart');
        }
        
        parent::init();
    }

Hopefully it will help and keep your logs free :)

 

EDIT: Just noticed that this will only work if you get to order-confirmation page :P (Which one of our payment modules didn't  <_< )

 

EDIT 2: As bellini13 mentioned here below you can do the same in validateOrder() in PaymentModel.php. That way it should work for any payment solution. So override that and call parent and then unset the cookie like above.

Could you please tell me how to add this code exactly? in which line? after which code? Thank you.

i used PS 1.6.1.4 and it happens randomly with bank wire.

  • Like 1
Link to comment
Share on other sites

Could you please tell me how to add this code exactly? in which line? after which code? Thank you.

i used PS 1.6.1.4 and it happens randomly with bank wire.

 

If you use bankwire the above code will work. 

 

But a better solution should be to add PaymentModule.php in override/classes/

class PaymentModule extends PaymentModuleCore {
    public function validateOrder($id_cart, $id_order_state, $amount_paid, $payment_method = 'Unknown', $message = null, $extra_vars = array(), $currency_special = null, $dont_touch_amount = false, $secure_key = false, Shop $shop = null) 
    {
        if(parent::validateOrder($id_cart, $id_order_state, $amount_paid, $payment_method, $message, $extra_vars, $currency_special, $dont_touch_amount, $secure_key, $shop) 
        {
            if ((int)$this->context->cookie->id_cart > 0) 
            {
                $this->context->cookie->__unset('id_cart');
            }
        }
    }
}

I hope it helps, let me know. We had to override some more behaviour in our validateOrder so haven't tested that code, but should work.

 

Don't forget to remove the class_index.php file inside /cache folder.

Edited by kalle@makewebo (see edit history)
  • Like 1
Link to comment
Share on other sites

I'm getting this same error in 1.6.2 but my PaymentModule.php looks nothing like the above. I'm assuming it's changed from 1.6.2 to 1.6.4. Can you please help me with where I add your snippet of code in 1.6.2? I've included my PaymentModule.php file in this post.

 

My snippet of code is an override of the PaymentModule.php not the Core file. Just add the attached file in /override/classes/ folder and if cache_files.php exists under /cache/ folder remove it.

PaymentModule.php

Edited by kalle@makewebo (see edit history)
  • Like 2
Link to comment
Share on other sites

I already have the attached file in my override folder though. Probably from some custom work I've gotten done. Can you add your code to this file for me? I'd appreciate it.

 

I can't do that since we have our own logic in our ValidateOrder function.

 

But just add this 

if ((int)$this->context->cookie->id_cart > 0) 
{
    $this->context->cookie->__unset('id_cart');
}

Before the return true; at the end of the function.

  • Like 1
Link to comment
Share on other sites

  • 2 weeks later...

Hi, 

 

@kallemakewebo

 

Into which file I have to add the "if code"?

 

Can you reassume me when I can fix "Frontcontroller::init - Cart cannot be loaded or an order has already been placed using this cart"

 

I noticed that the error is inserted into log some time an order is placed.....and I have 2 identical orders

Edited by Silicon Valley (see edit history)
Link to comment
Share on other sites

Hi, 

 

@kallemakewebo

 

Into which file I have to add the "if code"?

 

Can you reassume me when I can fix "Frontcontroller::init - Cart cannot be loaded or an order has already been placed using this cart"

 

I noticed that the error is inserted into log some time an order is placed.....and I have 2 identical orders

 

In an override of the PaymentModule.php that you put under /override/classes/ folder. If you haven't overwritten the file you can download my script in post #47.

 

Not sure what you are asking secondly about identical orders, but that might be a different issue.

Link to comment
Share on other sites

  • 4 weeks later...

In an override of the PaymentModule.php that you put under /override/classes/ folder. If you haven't overwritten the file you can download my script in post #47.

 

Not sure what you are asking secondly about identical orders, but that might be a different issue.

I currently have the same error and also noticed lots of bugs in PS 1.6

 

Done that and my site crashed...luckely that I did some back-up before.

 

"Cart cannot be loaded or an order has already been placed using this cart"

Edited by stanciu.cosmin7 (see edit history)
Link to comment
Share on other sites

I finally solved my issue by deleting public_html/themes/default-bootstrap/mails folder and clearing booth browser and PS cache.

 

My error_log was something like this:

.....

PHP Fatal error:  Uncaught  --> Smarty Compiler: Syntax error in template "/home/wwwmbind/public_html/site_name/themes/default-bootstrap/mails/ro/order_conf_product_list.txt"  on line 2 "{$product[\'reference\']}"  - Unexpected "\" <--
  thrown in /home/wwwmbind/public_html/site_name/tools/smarty/sysplugins/smarty_internal_templatecompilerbase.php on line 2

 

Thank you.

Link to comment
Share on other sites

  • 4 weeks later...
Hi guys,

I cannot solve this issue.

Please help!! Emergent!!

 

 

Customers can purchase products and make payment,

but the products in cart are still exist after confirmation payment

and the order is not place on my back office.

 

I received the payment but did not see order placed.

 

 

Please help me to solve this issue. 

Emergent!

Link to comment
Share on other sites

for us, this has solved the issue: https://www.prestashop.com/forums/topic/483630-bug-161-1-1612-classesstockstockavailablephp/

 

It is a bug in file Core/Business/Stock/Core_Business_Stock_StockManager.php at line 126
 
you should have like this:


$stockAvailable->quantity = $stockAvailable->quantity + $delta_quantity;
$stockAvailable->id_product = (int)$product->id;
$stockAvailable->id_product_attribute = (int)$id_product_attribute;
$stockAvailable->update();

Link to comment
Share on other sites

for us, this has solved the issue: https://www.prestashop.com/forums/topic/483630-bug-161-1-1612-classesstockstockavailablephp/

 

It is a bug in file Core/Business/Stock/Core_Business_Stock_StockManager.php at line 126

 

you should have like this:

 

 

$stockAvailable->quantity = $stockAvailable->quantity + $delta_quantity;

$stockAvailable->id_product = (int)$product->id;

$stockAvailable->id_product_attribute = (int)$id_product_attribute;

$stockAvailable->update();

Hi, I add the code line but, the issue is still exist. I paid but order still is not placed.....

Link to comment
Share on other sites

  • 4 weeks later...
  • 4 weeks later...
  • 1 month later...
  • 1 month later...

Bonjour,

 

J'avais le même soucis depuis peu avec paybox, et renseignements pris auprès de leur service, cela venait du fait qu'ils avaient changé leurs adresses IP ; j'ai demandé au développeur du module paybox une mise à jour, et tout est rentré dans l'ordre. En espérant que cela puisse aider ceux qui comme moi n'ont pas trouvé le remède avec les solutions envisagées dans ce topic.

 

Bonne journée.

Link to comment
Share on other sites

  • 3 weeks later...
  • 2 weeks later...

Hi Folks,

 

In my case, sometime order was stored, but no products, with error : Frontcontroller::init - Cart cannot be loaded or an order has already been placed using this cart with Prestashop 1.6.1.6.

 

Payment Module use parent validateOrder method, which try to load a cart throw cache tool.

 

Try to disable cache, and check if problem still occurs.

 

Link to comment
Share on other sites

I have now literally tried everything above and I still have the same problem on our install of Prestashop v1.6.1.7

 

We recently upgraded to 1.6.1.7 and have been having problems since.

The main concern is that sometimes when a customer places an order, the order comes through as a blank order without any products and no product status. The products can then still be found in the customer's cart, and the order can be done manually through the back office. This does not happen for every order, or for every customer, but happens sporadically. 

 

Originally this only happened with orders placed using the PayFast payment module, so we uninstalled that, but after trying to re-install it, were unable to re-install the PayFast module. When we tried to re-install PayFast, we got the error: This module is already installed. (When I tried to install it again the next day to get the error message to post here on the forums, however, the module installed as per normal, without any modifications made to the system at all!)

 

After having problems installing PayFast, we then decided to go over to a new payment module to accept credit cards, but while we are waiting for the new details on that profile to be registered, we got a few new orders placed via Bank Wire, and it now has the same problem of the order being placed by the customer, but in back office it shows up with an order number and no products associated to it. I have contacted these customers and it seems that these three all use the ios operating system. (Perhaps a coincidence though!).

The customers also never get the email from Prestashop stating that their orders are complete and in their customer profiles, they see the order with the correct total, but no items on it. 

In our back office Logs, I get the error:

 

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

This error's severity is a 4 for all of the orders that are placed with this problem, but a 1 for every other order being placed.

 

Installation type: Update
PrestaShop version1.6.1.7
Theme: Default Bootstrap
CodeAll original, only modifications: HomeCategories and PayFast modules installed
HostingAfrihost
PHP version5.6.24

MySQL version5.6.33
Browser(s) concernedChrome / Mozilla / Edge / Chrome Mobile (Only browsers tested)

 

If anyone has any answers as to why we are getting blank orders placed, and a way to fix it, I would be very grateful! Currently I have disabled all non-Prestashop modules and overrides as another member has suggested on my original thread.

 

Our website URL is: http://www.jizni.co.za

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

Link to comment
Share on other sites

  • 2 weeks later...

in 1.6.1.9 see in logs

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

 

helps for me:

 

creating file 
/override/classes/PaymentModule.php 

 

with content:

 

<?php
 
abstract class PaymentModule extends PaymentModuleCore {
    public function validateOrder($id_cart, $id_order_state, $amount_paid, $payment_method = 'Unknown', $message = null, $extra_vars = array(), $currency_special = null, $dont_touch_amount = false, $secure_key = false, Shop $shop = null) {
        if (parent::validateOrder($id_cart, $id_order_state, $amount_paid, $payment_method, $message, $extra_vars, $currency_special, $dont_touch_amount, $secure_key, $shop)) {
            if ((int) $this->context->cookie->id_cart > 0) {
                $this->context->cookie->__unset('id_cart');
            }
        }
    }
 
}
 
and delete file
/cache/class_index.php 
Link to comment
Share on other sites

i am using payumoney prestashop 1.6.1.9 , it didnt show success or failure or cancel payment confirmation when return after payment window it shows Cart cannot be loaded or an order has already been placed using this cart  

 

And also user is loged out 

 

please help in this regard

Link to comment
Share on other sites

 

in 1.6.1.9 see in logs

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

 

helps for me:

 

creating file ...

 

 I have tried doing this, but to no avail. I am still getting orders that are placed with no items in the order, and the order status not being updated.

This is so frustrating. 

Link to comment
Share on other sites

my issues with this...

 

I noticed that orders with this issue come with an id_carrier DELETED...  :D

 

this is a BIG bug...

 

eg. from ps_order_carrier table

 

209 209 22 0 4.482000 30.740000 30.740000   2016-11-25 21:30:51

 

in this case "22" is the id_carrier

 

BUT it's NOT activated and DELETED...

 

so, it should NOT be selected for the order... hence the cart cannot be loaded...

 

that is...

Edited by am79 (see edit history)
Link to comment
Share on other sites

 I have tried doing this, but to no avail. I am still getting orders that are placed with no items in the order, and the order status not being updated.

This is so frustrating. 

 

I don't have this kind of problem...

the real issue is when transaction is refused and your payment module calls the validateorder to register the order with errors and so on...

 

if you bypass that step, indeed, it redirects when you want...

so, anyway, it means that the transaction wasn't good...

 

different when credit card circuits accept the transaction and the order is registered as usual

definitely it's an issue with the payment modules and it's a design issue rather than technical

cause the user should see a good error message to understand what's the problem...instead of that white crashed page with "Cart cannot be loaded..."

 

OR you can bypass the validateorder, redirect to the cart and alert a message to the user with the error message inside... so the user knows about the issue and you don't register anything in the orders list... you can choose

 

I will try the override method and let you know...

Link to comment
Share on other sites

I have the same problem as everyone! People are placing orders online and in the bank end its an empty status. It says credit card, no status and i have no products. This is not for everyone. I have ppl calling the business and saying they cant check out. Also when they pay with paypal i get an email from paypal that money is being sent. I then have to go into the customers cart to create the order manually.

 

when i check the lgs i get this

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

 

 

how do i fix this please

Link to comment
Share on other sites

  • 3 weeks later...

Hi,

 

My customers regularly place and order then realize they forgot to order something. 

 

Unfortunately i have this error when they try to place a second order.

 

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

 

I guess that my prestashop is keeping the customers cart id in their cookie. (or something lol!)

 

Will placing the following code in my PaymentModule.php override resolve this issue for me?

 

 

 
if ((int)$this->context->cookie->id_cart > 0) 
{
    $this->context->cookie->__unset('id_cart');
}
 
 
 
Thanks in advance!
 
Mike
Link to comment
Share on other sites

  • 1 month later...
  • 3 weeks later...
  • 2 weeks later...

My fix with version 1.6.1.11 after a fresh update was a broken defines.inc.php.

After activating the DEV mode, it showed some broken characters instead of "<?php..." it was something like "<(/§$§#...".

I fixed the first line, then everything worked fine again.

It seems if some file is broken, the whole system does'nt run fluid any more.

Link to comment
Share on other sites

  • 4 weeks later...
  • 3 weeks later...

PS 1.6.1.12,

 

tried :

  • going to PHP mail
  • disable Paypal module

my log still displays :
Frontcontroller::init - Cart cannot be loaded or an order has already been placed using this cart

but amazingly it seems not to disturb functions... false positive ?
Confirmation emails and cart conversion-to-order are doing well.

Did a last test by overriding PaymentModule.php

nothing changes my log still displays the error...

Any idea on how to solve this ?
 

Edited by D-fox (see edit history)
Link to comment
Share on other sites

  • 1 month later...

Hi There,

 

I had the same problem with the PrestaShop webshop of a customer from me en I found the fix.

 

The problem is that the id_cart is already used in the orders table in the column id_cart. So you have a duplicated id_cart, so automatically the cart will be cleared by PrestaShop.

 

To fix this:

 

- Check in the orders table what the highest id_cart is. For example 10045.

- Do an update to your database by resetting the Auto-increment value of the cart table to 10045 + 1 by executing this query :  ALTER TABLE `ps_cart` AUTO_INCREMENT = 10046;

 

PS: ps_ in the query should be changed with your store database prefix

 

Now the problem should be fixed.

 

Good luck for you all!!

Link to comment
Share on other sites

My snippet of code is an override of the PaymentModule.php not the Core file. Just add the attached file in /override/classes/ folder and if cache_files.php exists under /cache/ folder remove it.

 

Thanks ;)  ;);)

 

 

works for me . version 1.7.1.1

Link to comment
Share on other sites

In all honesty none of these solutions have worked for me to date...

I did, however, manage to find a different solution to allow me to live with it all. 

 

I turned off the cache in Prestashop totally. 

 

As long as the cache is off, I have no problems, orders are placed as normal, products can be edited, edits are not re-written and nothing is wrong. But the moment I turn this back on again, I get the exact same set of problems and Prestashop goes to all hell. My site is now much slower, but at least the customers are not beating down my door, furious about problems with orders! 

Link to comment
Share on other sites

  • 3 months later...

PS 1.6.1.16

 

I still have this problem. log message

 

It seems that orders are coming. The payment method works fine and confirms the payment.

 

The log message shows up what's going on?

it is simply poor programming by Prestashop developers.  it is just a warning message, you really can just ignore it.  the alternative is try apply one of several solutions that have been posted to the forums.

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