Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>I got this error after programmatically creating a quote with a different store id to the default store id.</p> <p>Fix was to run this sql (after backing up all sales_flat_quote tables, of course):</p> <pre><code>DELETE FROM sales_flat_quote_item; </code></pre> <p>Note that TRUNCATE sales_flat_quote_item won't work due to referential integrity, and that the above command will remove the linked records from some of the other sales_flat_quote tables as well.</p> <p>In reply to the comment - if you don't have access to the database then <del>ask your hosting provider to give it to you (most give you some sort of access - eg phpmyadmin)</del> you can run it as a code snippet, I guess:</p> <pre><code>&lt;?php // Save this in Magento root directory. require_once( dirname(__FILE__) . ' /app/Mage.php'); umask(0); Mage::app()-&gt;setCurrentStore(0); $resource = Mage::getSingleton('core/resource'); $dbw = $resource-&gt;getConnection('core_write'); $query = "DELETE FROM sales_flat_quote_item;"; $dbw-&gt;query($query); </code></pre> <p>It's not a good idea to run that on a live production system - existing customers will lose all the items in their carts - though if your site is broken and you've nothing left to lose, maybe give it a go! </p> <p>To backup the database without access to it, <a href="https://www.phpmyadmin.net/" rel="nofollow noreferrer">https://www.phpmyadmin.net/</a> or a similar tool will help there. You can also run the above query directly using that.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload