<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Delete test orders in Magento</title>
	<atom:link href="http://inchoo.net/ecommerce/magento/delete-test-orders-in-magento/feed/" rel="self" type="application/rss+xml" />
	<link>http://inchoo.net/ecommerce/magento/delete-test-orders-in-magento/</link>
	<description>Magento Design and Magento Development Professionals - Inchoo</description>
	<lastBuildDate>Fri, 10 Feb 2012 05:35:25 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: Neo</title>
		<link>http://inchoo.net/ecommerce/magento/delete-test-orders-in-magento/comment-page-3/#comment-26191</link>
		<dc:creator>Neo</dc:creator>
		<pubDate>Thu, 09 Feb 2012 02:54:59 +0000</pubDate>
		<guid isPermaLink="false">http://inchoo.net/?p=250#comment-26191</guid>
		<description>Thank you. It helps me a lots.
I see some error when running the script but all orders are gone.</description>
		<content:encoded><![CDATA[<p>Thank you. It helps me a lots.<br />
I see some error when running the script but all orders are gone.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jack</title>
		<link>http://inchoo.net/ecommerce/magento/delete-test-orders-in-magento/comment-page-3/#comment-26054</link>
		<dc:creator>jack</dc:creator>
		<pubDate>Sun, 05 Feb 2012 00:40:00 +0000</pubDate>
		<guid isPermaLink="false">http://inchoo.net/?p=250#comment-26054</guid>
		<description>thanks for the script, worked perfect in ver 1.6.0.0 - i installed and ran wee_deleteorders from magento connect but it still left details of orders on the sales/orders page / your script got rid of everything

cheers again, jack</description>
		<content:encoded><![CDATA[<p>thanks for the script, worked perfect in ver 1.6.0.0 &#8211; i installed and ran wee_deleteorders from magento connect but it still left details of orders on the sales/orders page / your script got rid of everything</p>
<p>cheers again, jack</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael</title>
		<link>http://inchoo.net/ecommerce/magento/delete-test-orders-in-magento/comment-page-2/#comment-25646</link>
		<dc:creator>Michael</dc:creator>
		<pubDate>Thu, 12 Jan 2012 17:57:00 +0000</pubDate>
		<guid isPermaLink="false">http://inchoo.net/?p=250#comment-25646</guid>
		<description>Great post and great script. This was tremendously helpful. The only action missing is starting the order/invoice numbers from 0 again. I did this through phpMyAdmin by running:
[code]TRUNCATE `eav_entity_store`;
ALTER TABLE  `eav_entity_store` AUTO_INCREMENT=1;[/code]
I hope this helps anyone having the same issue. Thanks again!</description>
		<content:encoded><![CDATA[<p>Great post and great script. This was tremendously helpful. The only action missing is starting the order/invoice numbers from 0 again. I did this through phpMyAdmin by running:</p>
<pre class="brush: plain; title: ; notranslate">TRUNCATE `eav_entity_store`;
ALTER TABLE  `eav_entity_store` AUTO_INCREMENT=1;</pre>
<p>I hope this helps anyone having the same issue. Thanks again!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael</title>
		<link>http://inchoo.net/ecommerce/magento/delete-test-orders-in-magento/comment-page-2/#comment-25645</link>
		<dc:creator>Michael</dc:creator>
		<pubDate>Thu, 12 Jan 2012 17:55:59 +0000</pubDate>
		<guid isPermaLink="false">http://inchoo.net/?p=250#comment-25645</guid>
		<description>Great post and great script. This was tremendously helpful. The only thing I thing is missing would be a way to start the order/invoice numbers from 0 again. I did this through phpMyAdmin by running:
[code]TRUNCATE `eav_entity_store`;
ALTER TABLE  `eav_entity_store` AUTO_INCREMENT=1;[/code]
I hope this helps anyone having the same issue. Thanks again!</description>
		<content:encoded><![CDATA[<p>Great post and great script. This was tremendously helpful. The only thing I thing is missing would be a way to start the order/invoice numbers from 0 again. I did this through phpMyAdmin by running:</p>
<pre class="brush: plain; title: ; notranslate">TRUNCATE `eav_entity_store`;
ALTER TABLE  `eav_entity_store` AUTO_INCREMENT=1;</pre>
<p>I hope this helps anyone having the same issue. Thanks again!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Thanks</title>
		<link>http://inchoo.net/ecommerce/magento/delete-test-orders-in-magento/comment-page-2/#comment-25456</link>
		<dc:creator>Thanks</dc:creator>
		<pubDate>Sun, 08 Jan 2012 02:00:29 +0000</pubDate>
		<guid isPermaLink="false">http://inchoo.net/?p=250#comment-25456</guid>
		<description>AMAZING! Great script worked!</description>
		<content:encoded><![CDATA[<p>AMAZING! Great script worked!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Billy</title>
		<link>http://inchoo.net/ecommerce/magento/delete-test-orders-in-magento/comment-page-2/#comment-25163</link>
		<dc:creator>Billy</dc:creator>
		<pubDate>Sun, 01 Jan 2012 20:32:38 +0000</pubDate>
		<guid isPermaLink="false">http://inchoo.net/?p=250#comment-25163</guid>
		<description>Yup, these is a very helpful script.

There is also a query you can use directly to the MySQL database.

Take a look here

http://wabism.com/magento-clear-all-orders-and-customers/</description>
		<content:encoded><![CDATA[<p>Yup, these is a very helpful script.</p>
<p>There is also a query you can use directly to the MySQL database.</p>
<p>Take a look here</p>
<p><a href="http://wabism.com/magento-clear-all-orders-and-customers/" rel="nofollow">http://wabism.com/magento-clear-all-orders-and-customers/</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jeyam</title>
		<link>http://inchoo.net/ecommerce/magento/delete-test-orders-in-magento/comment-page-2/#comment-25008</link>
		<dc:creator>jeyam</dc:creator>
		<pubDate>Thu, 29 Dec 2011 13:21:25 +0000</pubDate>
		<guid isPermaLink="false">http://inchoo.net/?p=250#comment-25008</guid>
		<description>Worked for me.. thank youu :)</description>
		<content:encoded><![CDATA[<p>Worked for me.. thank youu <img src='http://inchoo.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: James</title>
		<link>http://inchoo.net/ecommerce/magento/delete-test-orders-in-magento/comment-page-2/#comment-24515</link>
		<dc:creator>James</dc:creator>
		<pubDate>Tue, 20 Dec 2011 23:09:43 +0000</pubDate>
		<guid isPermaLink="false">http://inchoo.net/?p=250#comment-24515</guid>
		<description>What about the sales_tax_item table? I have received duplicate key errors if I don&#039;t remove all items from this table too.</description>
		<content:encoded><![CDATA[<p>What about the sales_tax_item table? I have received duplicate key errors if I don&#8217;t remove all items from this table too.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pascal</title>
		<link>http://inchoo.net/ecommerce/magento/delete-test-orders-in-magento/comment-page-2/#comment-24203</link>
		<dc:creator>Pascal</dc:creator>
		<pubDate>Fri, 09 Dec 2011 15:36:52 +0000</pubDate>
		<guid isPermaLink="false">http://inchoo.net/?p=250#comment-24203</guid>
		<description>This doesn&#039;t work on Magento Version 1.5.1.0. Use this script http://www.exanto.de/magento-testbestellungen-loschen.html instead.</description>
		<content:encoded><![CDATA[<p>This doesn&#8217;t work on Magento Version 1.5.1.0. Use this script <a href="http://www.exanto.de/magento-testbestellungen-loschen.html" rel="nofollow">http://www.exanto.de/magento-testbestellungen-loschen.html</a> instead.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ian</title>
		<link>http://inchoo.net/ecommerce/magento/delete-test-orders-in-magento/comment-page-2/#comment-23200</link>
		<dc:creator>Ian</dc:creator>
		<pubDate>Sat, 22 Oct 2011 09:23:21 +0000</pubDate>
		<guid isPermaLink="false">http://inchoo.net/?p=250#comment-23200</guid>
		<description>Something like this seemed to work for me.

[code]
$order = Mage::getModel(&#039;sales/order&#039;)-&gt;loadByIncrementId(100001436);
$order-&gt;delete();
[/code]</description>
		<content:encoded><![CDATA[<p>Something like this seemed to work for me.</p>
<pre class="brush: plain; title: ; notranslate">
$order = Mage::getModel('sales/order')-&gt;loadByIncrementId(100001436);
$order-&gt;delete();
</pre>
]]></content:encoded>
	</item>
	<item>
		<title>By: Robbie</title>
		<link>http://inchoo.net/ecommerce/magento/delete-test-orders-in-magento/comment-page-2/#comment-22627</link>
		<dc:creator>Robbie</dc:creator>
		<pubDate>Fri, 09 Sep 2011 15:02:22 +0000</pubDate>
		<guid isPermaLink="false">http://inchoo.net/?p=250#comment-22627</guid>
		<description>@Jordi Bos thanks this solution works for 1.4.2.0 also.</description>
		<content:encoded><![CDATA[<p>@Jordi Bos thanks this solution works for 1.4.2.0 also.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Deleting Orders in Magento – Extension Roundup &#124; www.ecommerceoffice.com</title>
		<link>http://inchoo.net/ecommerce/magento/delete-test-orders-in-magento/comment-page-2/#comment-22225</link>
		<dc:creator>Deleting Orders in Magento – Extension Roundup &#124; www.ecommerceoffice.com</dc:creator>
		<pubDate>Sun, 07 Aug 2011 01:12:02 +0000</pubDate>
		<guid isPermaLink="false">http://inchoo.net/?p=250#comment-22225</guid>
		<description>[...] and increments + resets inventory informationManipulate DB directlysee for example posts here, here and here - no selective delete - required mysql is potentially different for every Magento version [...]</description>
		<content:encoded><![CDATA[<p>[...] and increments + resets inventory informationManipulate DB directlysee for example posts here, here and here &#8211; no selective delete &#8211; required mysql is potentially different for every Magento version [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Laurent</title>
		<link>http://inchoo.net/ecommerce/magento/delete-test-orders-in-magento/comment-page-2/#comment-22206</link>
		<dc:creator>Laurent</dc:creator>
		<pubDate>Fri, 05 Aug 2011 10:34:23 +0000</pubDate>
		<guid isPermaLink="false">http://inchoo.net/?p=250#comment-22206</guid>
		<description>Hi, 

Did anyone found a way to delete best seller module statistics on the dashboard for 1.5.0.1 ?
That would be very helpful, 

Many thanks.</description>
		<content:encoded><![CDATA[<p>Hi, </p>
<p>Did anyone found a way to delete best seller module statistics on the dashboard for 1.5.0.1 ?<br />
That would be very helpful, </p>
<p>Many thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: wshqq</title>
		<link>http://inchoo.net/ecommerce/magento/delete-test-orders-in-magento/comment-page-2/#comment-21926</link>
		<dc:creator>wshqq</dc:creator>
		<pubDate>Sat, 16 Jul 2011 10:00:45 +0000</pubDate>
		<guid isPermaLink="false">http://inchoo.net/?p=250#comment-21926</guid>
		<description>Why are you disabeling  the foreign keys? If they are you, you only have to TRUNCATE sales_order, to delete all Invoices , order, creditmemo, shipments tables.
Be carefully, it is very important to TRUNCATE the sales_order_tax table. If you don&#039;t truncate this table and you reset the AUTO_INCREMENT and create an new order, the old tax entries will be assigned to the new order.
In think there is a missing foreign key constraint on sales_order_tax table, because there is only a foreign key to sales_order. 
You can delete this stuff, by magento model too. 
If you want to delete all customers with an action, call 
[code]Mage::getModel(&#039;customer/customer&#039;)-&gt;getCollection()-&gt;delete()[/code]

If you want to delete all orders,invoices, and so on call:
[code]foreach(Mage::getModel(&#039;sales/order&#039;)-&gt;getCollection() as $order)
{ $order-&gt;delete()}[/code]

This code can beused for backend actions.</description>
		<content:encoded><![CDATA[<p>Why are you disabeling  the foreign keys? If they are you, you only have to TRUNCATE sales_order, to delete all Invoices , order, creditmemo, shipments tables.<br />
Be carefully, it is very important to TRUNCATE the sales_order_tax table. If you don&#8217;t truncate this table and you reset the AUTO_INCREMENT and create an new order, the old tax entries will be assigned to the new order.<br />
In think there is a missing foreign key constraint on sales_order_tax table, because there is only a foreign key to sales_order.<br />
You can delete this stuff, by magento model too.<br />
If you want to delete all customers with an action, call </p>
<pre class="brush: plain; title: ; notranslate">Mage::getModel('customer/customer')-&gt;getCollection()-&gt;delete()</pre>
<p>If you want to delete all orders,invoices, and so on call:</p>
<pre class="brush: plain; title: ; notranslate">foreach(Mage::getModel('sales/order')-&gt;getCollection() as $order)
{ $order-&gt;delete()}</pre>
<p>This code can beused for backend actions.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sonice</title>
		<link>http://inchoo.net/ecommerce/magento/delete-test-orders-in-magento/comment-page-2/#comment-21893</link>
		<dc:creator>Sonice</dc:creator>
		<pubDate>Thu, 14 Jul 2011 07:59:08 +0000</pubDate>
		<guid isPermaLink="false">http://inchoo.net/?p=250#comment-21893</guid>
		<description>@Cherie
this is a bug in magento. We have the same issue and we found that on the dashbord magento stores all guest order under one customer (guest or not). Couse magento can not find information about this customer he send you to &quot;Create Customer&quot; Page. Don&#039;t worry this has nothing to do with the query</description>
		<content:encoded><![CDATA[<p>@Cherie<br />
this is a bug in magento. We have the same issue and we found that on the dashbord magento stores all guest order under one customer (guest or not). Couse magento can not find information about this customer he send you to &#8220;Create Customer&#8221; Page. Don&#8217;t worry this has nothing to do with the query</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Clocks</title>
		<link>http://inchoo.net/ecommerce/magento/delete-test-orders-in-magento/comment-page-2/#comment-21488</link>
		<dc:creator>Clocks</dc:creator>
		<pubDate>Mon, 13 Jun 2011 14:14:17 +0000</pubDate>
		<guid isPermaLink="false">http://inchoo.net/?p=250#comment-21488</guid>
		<description>Thanks for the query. My test site is getting filled with hundreds of test orders and it&#039;s so annoying! 

I&#039;ll be running this script and hopefully, no more annoying test orders and a faster site :)</description>
		<content:encoded><![CDATA[<p>Thanks for the query. My test site is getting filled with hundreds of test orders and it&#8217;s so annoying! </p>
<p>I&#8217;ll be running this script and hopefully, no more annoying test orders and a faster site <img src='http://inchoo.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Cherie</title>
		<link>http://inchoo.net/ecommerce/magento/delete-test-orders-in-magento/comment-page-2/#comment-21317</link>
		<dc:creator>Cherie</dc:creator>
		<pubDate>Thu, 02 Jun 2011 22:55:49 +0000</pubDate>
		<guid isPermaLink="false">http://inchoo.net/?p=250#comment-21317</guid>
		<description>Hey Inchoo, 
We ran this query and we are having some very strange behavior attached to the first customer to place an order in our store.

Dashboard shows Brandon Bannerman: 
Number of Orders: 2597 
Average Order Amount: $22.25 
Total Order Amount: $57,774.49

Click on his name from the customer tab on the dash board and it opens the screen to create a new customer.

When you search for him he only has four orders associated with his name: 
April 27th - Grand Total $30.59 (Order #1) 
May 15th - Grand Total $32.59 
May 21st - Grand Total $35.78 
May 30th - Grand Total $50.00

Magento will not create an account for him. He has tried 3-4 times and then when he goes back to log in Magento reports there is no user associated with that email address.

And when you search customers on the admin side there is no one with his name or email address.

Do you think it has anything to do with the query?</description>
		<content:encoded><![CDATA[<p>Hey Inchoo,<br />
We ran this query and we are having some very strange behavior attached to the first customer to place an order in our store.</p>
<p>Dashboard shows Brandon Bannerman:<br />
Number of Orders: 2597<br />
Average Order Amount: $22.25<br />
Total Order Amount: $57,774.49</p>
<p>Click on his name from the customer tab on the dash board and it opens the screen to create a new customer.</p>
<p>When you search for him he only has four orders associated with his name:<br />
April 27th &#8211; Grand Total $30.59 (Order #1)<br />
May 15th &#8211; Grand Total $32.59<br />
May 21st &#8211; Grand Total $35.78<br />
May 30th &#8211; Grand Total $50.00</p>
<p>Magento will not create an account for him. He has tried 3-4 times and then when he goes back to log in Magento reports there is no user associated with that email address.</p>
<p>And when you search customers on the admin side there is no one with his name or email address.</p>
<p>Do you think it has anything to do with the query?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mark</title>
		<link>http://inchoo.net/ecommerce/magento/delete-test-orders-in-magento/comment-page-2/#comment-21291</link>
		<dc:creator>Mark</dc:creator>
		<pubDate>Wed, 01 Jun 2011 11:43:57 +0000</pubDate>
		<guid isPermaLink="false">http://inchoo.net/?p=250#comment-21291</guid>
		<description>managed to rid the credit invoices by adding the following lines:

[code]
TRUNCATE `sales_flat_creditmemo`;
TRUNCATE `sales_flat_creditmemo_comment`;
TRUNCATE `sales_flat_creditmemo_grid`;
TRUNCATE `sales_flat_creditmemo_item`;


ALTER TABLE `sales_flat_creditmemo` AUTO_INCREMENT=1;
ALTER TABLE `sales_flat_creditmemo_comment` AUTO_INCREMENT=1;
ALTER TABLE `sales_flat_creditmemo_grid` AUTO_INCREMENT=1;
ALTER TABLE `sales_flat_creditmemo_item` AUTO_INCREMENT=1;
[/code]</description>
		<content:encoded><![CDATA[<p>managed to rid the credit invoices by adding the following lines:</p>
<pre class="brush: plain; title: ; notranslate">
TRUNCATE `sales_flat_creditmemo`;
TRUNCATE `sales_flat_creditmemo_comment`;
TRUNCATE `sales_flat_creditmemo_grid`;
TRUNCATE `sales_flat_creditmemo_item`;

ALTER TABLE `sales_flat_creditmemo` AUTO_INCREMENT=1;
ALTER TABLE `sales_flat_creditmemo_comment` AUTO_INCREMENT=1;
ALTER TABLE `sales_flat_creditmemo_grid` AUTO_INCREMENT=1;
ALTER TABLE `sales_flat_creditmemo_item` AUTO_INCREMENT=1;
</pre>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mark</title>
		<link>http://inchoo.net/ecommerce/magento/delete-test-orders-in-magento/comment-page-2/#comment-21288</link>
		<dc:creator>Mark</dc:creator>
		<pubDate>Wed, 01 Jun 2011 10:37:08 +0000</pubDate>
		<guid isPermaLink="false">http://inchoo.net/?p=250#comment-21288</guid>
		<description>The script worked like a charm but it left the return invoices untouched and when I try top open those it results in a long list of errors (since it cannot find the originating order data).</description>
		<content:encoded><![CDATA[<p>The script worked like a charm but it left the return invoices untouched and when I try top open those it results in a long list of errors (since it cannot find the originating order data).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: year</title>
		<link>http://inchoo.net/ecommerce/magento/delete-test-orders-in-magento/comment-page-2/#comment-21054</link>
		<dc:creator>year</dc:creator>
		<pubDate>Wed, 18 May 2011 03:35:25 +0000</pubDate>
		<guid isPermaLink="false">http://inchoo.net/?p=250#comment-21054</guid>
		<description>It’s looking for ‘sales_order’ which doesn’t exist after 1.4.1.0 version? Where is it?</description>
		<content:encoded><![CDATA[<p>It’s looking for ‘sales_order’ which doesn’t exist after 1.4.1.0 version? Where is it?</p>
]]></content:encoded>
	</item>
</channel>
</rss>

