<?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; reset</title>
	<atom:link href="http://www.nvncbl.com/tagged/reset/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>Magento &#8211; Resetting Admin Password</title>
		<link>http://www.nvncbl.com/2010/03/magento-resetting-admin-password/</link>
		<comments>http://www.nvncbl.com/2010/03/magento-resetting-admin-password/#comments</comments>
		<pubDate>Fri, 12 Mar 2010 17:52:30 +0000</pubDate>
		<dc:creator>Antonio</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[admin]]></category>
		<category><![CDATA[administrator]]></category>
		<category><![CDATA[magento]]></category>
		<category><![CDATA[md5]]></category>
		<category><![CDATA[password]]></category>
		<category><![CDATA[phpMyAdmin]]></category>
		<category><![CDATA[redstage]]></category>
		<category><![CDATA[reset]]></category>
		<category><![CDATA[sql]]></category>

		<guid isPermaLink="false">http://www.nvncbl.com/?p=536</guid>
		<description><![CDATA[Handy if you (or a client) is locked out, here&#8217;s how to reset the admin password, posted on Redstage&#8217;s Magento Blog.
Basically, the procedure involves going into the database, finding the appropriate row that contains the password, and assigning the new password using MD5.
]]></description>
			<content:encoded><![CDATA[<p>Handy if you (or a client) is locked out, here&#8217;s <a title="How to Reset the Admin Password" href="http://www.redstage.com/magento/blog/2010/03/11/magento-how-to-reset-the-admin-password/">how to reset the admin password</a>, posted on Redstage&#8217;s <a title="Redstage Magento Blog" href="http://www.redstage.com/magento/blog">Magento Blog</a>.</p>
<p>Basically, the procedure involves going into the database, finding the appropriate row that contains the password, and assigning the new password using MD5.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.nvncbl.com/2010/03/magento-resetting-admin-password/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Magento Clear Shopping Cart and Session</title>
		<link>http://www.nvncbl.com/2009/09/magento-clear-shopping-cart-and-session/</link>
		<comments>http://www.nvncbl.com/2009/09/magento-clear-shopping-cart-and-session/#comments</comments>
		<pubDate>Tue, 08 Sep 2009 04:29:21 +0000</pubDate>
		<dc:creator>Antonio</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[checkout]]></category>
		<category><![CDATA[clear]]></category>
		<category><![CDATA[magento]]></category>
		<category><![CDATA[reset]]></category>
		<category><![CDATA[session]]></category>
		<category><![CDATA[shopping cart]]></category>

		<guid isPermaLink="false">http://www.nvncbl.com/?p=410</guid>
		<description><![CDATA[If you ever need to programmatically clear Magento&#8217;s shopping cart, use the snippet of code below.  If you need to clear the user&#8217;s entire session, including the shopping cart, shipping information, billing information and chosen payment methods, please refer to the snippet further below.
Clear shopping cart

foreach&#40; Mage::getSingleton&#40;'checkout/session'&#41;-&#62;getQuote&#40;&#41;-&#62;getItemsCollection&#40;&#41; as $item &#41;&#123;
    Mage::getSingleton&#40;'checkout/cart'&#41;-&#62;removeItem&#40; [...]]]></description>
			<content:encoded><![CDATA[<p>If you ever need to programmatically clear Magento&#8217;s shopping cart, use the snippet of code below.  If you need to clear the user&#8217;s entire session, including the shopping cart, shipping information, billing information and chosen payment methods, please refer to the snippet further below.</p>
<p><span id="more-410"></span><strong>Clear shopping cart</strong></p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">foreach</span><span style="color: #009900;">&#40;</span> Mage<span style="color: #339933;">::</span><span style="color: #004000;">getSingleton</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'checkout/session'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getQuote</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getItemsCollection</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$item</span> <span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
    Mage<span style="color: #339933;">::</span><span style="color: #004000;">getSingleton</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'checkout/cart'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">removeItem</span><span style="color: #009900;">&#40;</span> <span style="color: #000088;">$item</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getId</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">save</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p><strong>Clear entire session</strong></p>

<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>‘checkout<span style="color: #339933;">/</span>session’<span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">clear</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Happy coding!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.nvncbl.com/2009/09/magento-clear-shopping-cart-and-session/feed/</wfw:commentRss>
		<slash:comments>11</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>

