<?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; search</title>
	<atom:link href="http://www.nvncbl.com/tagged/search/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>Mon, 17 May 2010 21:39:17 +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>Refresh Magento Cache Programmatically</title>
		<link>http://www.nvncbl.com/2010/03/refresh-magento-cache-programmatically/</link>
		<comments>http://www.nvncbl.com/2010/03/refresh-magento-cache-programmatically/#comments</comments>
		<pubDate>Sat, 06 Mar 2010 04:16:45 +0000</pubDate>
		<dc:creator>Antonio</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Resources]]></category>
		<category><![CDATA[automation]]></category>
		<category><![CDATA[cache]]></category>
		<category><![CDATA[catalog]]></category>
		<category><![CDATA[index]]></category>
		<category><![CDATA[inventory]]></category>
		<category><![CDATA[layered navigation]]></category>
		<category><![CDATA[magento]]></category>
		<category><![CDATA[rebuild]]></category>
		<category><![CDATA[refresh]]></category>
		<category><![CDATA[search]]></category>

		<guid isPermaLink="false">http://www.nvncbl.com/?p=488</guid>
		<description><![CDATA[When writing processes to automate some of Magento&#8217;s normally laborious tasks, perhaps for a product-import script, a mass attribute update script, category import, or inventory adjustment, keep in mind that you may have to refresh some kind of cache &#8212; especially when working with attributes.  If you are encountering quirks or inconsistencies with your [...]]]></description>
			<content:encoded><![CDATA[<p>When writing processes to automate some of Magento&#8217;s normally laborious tasks, perhaps for a product-import script, a mass attribute update script, category import, or inventory adjustment, keep in mind that you may have to refresh some kind of cache &#8212; especially when working with attributes.  If you are encountering quirks or inconsistencies with your data, try these:</p>
<ul>
<li>Rebuild Catalog Index

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">Mage<span style="color: #339933;">::</span><span style="color: #004000;">getSingleton</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'catalog/index'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">rebuild</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

</li>
<li>Rebuild Flat Catalog Product

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">Mage<span style="color: #339933;">::</span><span style="color: #004000;">getResourceModel</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'catalog/product_flat_indexer'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">rebuild</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

</li>
<li>Inventory Stock

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">Mage<span style="color: #339933;">::</span><span style="color: #004000;">getSingleton</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'cataloginventory/stock_status'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">rebuild</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

</li>
</ul>
<p>For more cache refreshes, such as:</p>
<ul>
<li>Catalog Rewrites</li>
<li>Layered Navigation Indices</li>
<li>Product Image</li>
<li>Search Index</li>
</ul>
<p>&#8230; please refer to the source of this knowledge <a class="external" title="Magento Refresh Cache" href="http://www.magentocommerce.com/boards/viewthread/43238/#t156277" target="_blank">http://www.magentocommerce.com/boards/viewthread/43238/#t156277</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.nvncbl.com/2010/03/refresh-magento-cache-programmatically/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<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>
