<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Solution Log &#124; Antonio David - NVNCBL &#187; orders</title>
	<atom:link href="http://www.nvncbl.com/tagged/orders/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.nvncbl.com</link>
	<description>A place to log my programming solutions for future reference</description>
	<lastBuildDate>Sun, 28 Aug 2011 01:20:57 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Clear Magento Customers, Orders, Searches, and Tags</title>
		<link>http://www.nvncbl.com/2009/08/clear-magento-customers-orders-searches-and-tags/</link>
		<comments>http://www.nvncbl.com/2009/08/clear-magento-customers-orders-searches-and-tags/#comments</comments>
		<pubDate>Thu, 20 Aug 2009 15:55:07 +0000</pubDate>
		<dc:creator>Antonio</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[clear]]></category>
		<category><![CDATA[customers]]></category>
		<category><![CDATA[magento]]></category>
		<category><![CDATA[orders]]></category>
		<category><![CDATA[reset]]></category>
		<category><![CDATA[search]]></category>

		<guid isPermaLink="false">http://www.nvncbl.com/?p=370</guid>
		<description><![CDATA[From the Magento dashboard, there is no intuitive way of deleting/clearing/resetting customer, order, search, or tag data.  As developers, we have to test the various functions of our specific Magento setup before presenting it to the client.  Before the site can go live, all of the test data has to be removed so [...]]]></description>
			<content:encoded><![CDATA[<p>From the Magento dashboard, there is no intuitive way of deleting/clearing/resetting customer, order, search, or tag data.  As developers, we have to test the various functions of our specific Magento setup before presenting it to the client.  Before the site can go live, all of the test data has to be removed so it doesn&#8217;t interfere with the client&#8217;s other business functions such as accounting and inventory.</p>
<p><span id="more-370"></span>Fortunately, removing test data is as easy as running SQL queries:</p>
<p><strong>Clear customers:</strong></p>

<div class="wp_syntax"><div class="code"><pre class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">TRUNCATE</span> <span style="color: #993333; font-weight: bold;">TABLE</span> <span style="color: #ff0000;">`customer_entity`</span></pre></div></div>

<p><strong>Clear orders:</strong></p>

<div class="wp_syntax"><div class="code"><pre class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">TRUNCATE</span> <span style="color: #993333; font-weight: bold;">TABLE</span> <span style="color: #ff0000;">`sales_order`</span></pre></div></div>

<p><strong>Clear searches:</strong></p>

<div class="wp_syntax"><div class="code"><pre class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">TRUNCATE</span> <span style="color: #993333; font-weight: bold;">TABLE</span> <span style="color: #ff0000;">`catalogsearch_query`</span></pre></div></div>

<p><strong>Clear tags:</strong></p>

<div class="wp_syntax"><div class="code"><pre class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">TRUNCATE</span> <span style="color: #993333; font-weight: bold;">TABLE</span> <span style="color: #ff0000;">`tag`</span>
<span style="color: #993333; font-weight: bold;">TRUNCATE</span> <span style="color: #993333; font-weight: bold;">TABLE</span> <span style="color: #ff0000;">`tag_relation`</span></pre></div></div>

<p>You might have expected to meddle with other tables, like all the `sales_order_*` or `customer_entity_*` tables.  However, thanks to the database&#8217;s various constraints, any related rows are automatically deleted thus preventing orphan data.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.nvncbl.com/2009/08/clear-magento-customers-orders-searches-and-tags/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

