<?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; magento</title>
	<atom:link href="http://www.nvncbl.com/tagged/magento/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>Magento Custom Module Block, Controller, Model, etc. Not Working</title>
		<link>http://www.nvncbl.com/2010/05/magento-custom-module-block-controller-model-etc-not-working/</link>
		<comments>http://www.nvncbl.com/2010/05/magento-custom-module-block-controller-model-etc-not-working/#comments</comments>
		<pubDate>Mon, 17 May 2010 21:39:17 +0000</pubDate>
		<dc:creator>Antonio</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[block]]></category>
		<category><![CDATA[controllers]]></category>
		<category><![CDATA[custom module]]></category>
		<category><![CDATA[magento]]></category>
		<category><![CDATA[model]]></category>
		<category><![CDATA[permissions]]></category>

		<guid isPermaLink="false">http://www.nvncbl.com/?p=566</guid>
		<description><![CDATA[Just a little tip.  When you&#8217;re frustrated as to why Magento isn&#8217;t loading your Company/Module/Block/*, Company/Module/Model/*, Company/Module/controllers/*, etc. files for some strange reason:
Make sure the file permissions are set correctly.
(0777 might be too generous, but we don&#8217;t have time to figure these things out for sure).
This happened to me today.  Turns out my [...]]]></description>
			<content:encoded><![CDATA[<p>Just a little tip.  When you&#8217;re frustrated as to why Magento isn&#8217;t loading your Company/Module/Block/*, Company/Module/Model/*, Company/Module/controllers/*, etc. files for some strange reason:</p>
<blockquote><p>Make sure the file permissions are set correctly.</p></blockquote>
<p>(0777 might be too generous, but we don&#8217;t have time to figure these things out for sure).</p>
<p>This happened to me today.  Turns out my IDE (NuSphere&#8217;s PhpEd, an excellent PHP IDE by the way) has a setting for default folder/file permissions when creating new files.  Insufficient file permissions were manifesting themselves as &#8220;Invalid block type &#8230;&#8221; errors.  I&#8217;m sure it could be responsible for other quirkiness when doing custom work.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.nvncbl.com/2010/05/magento-custom-module-block-controller-model-etc-not-working/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>You Know You&#8217;re Deep in Magento When..</title>
		<link>http://www.nvncbl.com/2010/05/you-know-youre-deep-in-magento-when/</link>
		<comments>http://www.nvncbl.com/2010/05/you-know-youre-deep-in-magento-when/#comments</comments>
		<pubDate>Thu, 13 May 2010 17:23:03 +0000</pubDate>
		<dc:creator>Antonio</dc:creator>
				<category><![CDATA[Geek / Humor]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[abstract.php]]></category>
		<category><![CDATA[magento]]></category>

		<guid isPermaLink="false">http://www.nvncbl.com/?p=562</guid>
		<description><![CDATA[You know you&#8217;re deep in Magento when you have a file an Abstract.php open.  Or in a Mysql4 folder.
Or when one of your eyes starts twitching.
*sigh*
]]></description>
			<content:encoded><![CDATA[<p>You know you&#8217;re deep in Magento when you have a file an Abstract.php open.  Or in a Mysql4 folder.</p>
<p>Or when one of your eyes starts twitching.</p>
<p>*sigh*</p>
]]></content:encoded>
			<wfw:commentRss>http://www.nvncbl.com/2010/05/you-know-youre-deep-in-magento-when/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Magento &#8211; Accept Payments via Authorize.net</title>
		<link>http://www.nvncbl.com/2010/03/magento-accept-payments-via-authorize-net/</link>
		<comments>http://www.nvncbl.com/2010/03/magento-accept-payments-via-authorize-net/#comments</comments>
		<pubDate>Tue, 30 Mar 2010 18:59:14 +0000</pubDate>
		<dc:creator>Antonio</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[API]]></category>
		<category><![CDATA[authorize.net]]></category>
		<category><![CDATA[magento]]></category>
		<category><![CDATA[payment gateway]]></category>
		<category><![CDATA[payment module]]></category>
		<category><![CDATA[redstage]]></category>
		<category><![CDATA[transaction]]></category>

		<guid isPermaLink="false">http://www.nvncbl.com/?p=555</guid>
		<description><![CDATA[Use this resource “How to Set Up Authorize.net Payment Gateway” at Redstage&#8217;s Magento Blog for more information on how to set up the Authorize.net payment module in Magento.  The article shows where to get the API and Transaction Keys, as well as where to enter them into Magento.
As with most payment gateways, the steps [...]]]></description>
			<content:encoded><![CDATA[<p>Use this resource “<a href="http://www.redstage.com/magento/blog/2010/03/29/how-to-set-up-authorize-net-payment-gateway/" class="external">How to Set Up Authorize.net Payment Gateway</a>” at Redstage&#8217;s <a href="http://www.redstage.com/magento/blog/" class="external">Magento Blog</a> for more information on how to set up the <a href="http://www.authorize.net/" class="external">Authorize.net</a> payment module in Magento.  The article shows where to get the API and Transaction Keys, as well as where to enter them into Magento.</p>
<p>As with most payment gateways, the steps involved are a matter of:</p>
<ol>
<li>Gathering the appropriate information (provided by the gateway service)</li>
<li>Enter the information into the Magento Admin Panel</li>
<li>Activate the payment module</li>
</ol>
<p><a href="http://www.redstage.com/magento/blog/2010/03/29/how-to-set-up-authorize-net-payment-gateway/" class="external">Full procedure</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.nvncbl.com/2010/03/magento-accept-payments-via-authorize-net/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Magento &#8211; Add Custom Category Attributes</title>
		<link>http://www.nvncbl.com/2010/03/magento-add-custom-category-attributes/</link>
		<comments>http://www.nvncbl.com/2010/03/magento-add-custom-category-attributes/#comments</comments>
		<pubDate>Sun, 28 Mar 2010 02:54:58 +0000</pubDate>
		<dc:creator>Antonio</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Resources]]></category>
		<category><![CDATA[attribute]]></category>
		<category><![CDATA[category]]></category>
		<category><![CDATA[custom]]></category>
		<category><![CDATA[magento]]></category>
		<category><![CDATA[phpMyAdmin]]></category>

		<guid isPermaLink="false">http://www.nvncbl.com/?p=527</guid>
		<description><![CDATA[A client wanted to add a description to each of his product categories, such that the first built-in description would be above the product listing, and the second description would be below the product listing.  Rather than have them create static blocks for every category, it was obvious that I&#8217;d have to create a new [...]]]></description>
			<content:encoded><![CDATA[<p>A client wanted to add a description to each of his product categories, such that the first built-in description would be above the product listing, and the second description would be below the product listing.  Rather than have them create static blocks for every category, it was obvious that I&#8217;d have to create a new category attribute.</p>
<p>Fortunately, I stumbled upon one possible solution.  The method doesn&#8217;t involve creating a full-blown module, rather, just a few database modifications using phpMyAdmin.</p>
<p>Summarized, the process comes down to:</p>
<ol>
<li>Create a new row in the eav_attribute table, one that mimics a category&#8217;s meta-description attribute with everything being the same except for a unique identifier and a label.</li>
<li>Create a new row in the eav_entity_attribute table, to provide a sort order for your newly created attribute, following in the format footsteps of the existing rows.</li>
</ol>
<p>For the fully detailed procedure, see <a class="external" title="Create Custom Category Attributes with phpMyAdmin" href="http://www.knowmagento.com/2009/06/19/custom-category-attributes-with-phpmyadmin/">Create Custom Category Attributes with phpMyAdmin</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.nvncbl.com/2010/03/magento-add-custom-category-attributes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<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 &#8211; Set Product Dropdown and Multiselect Values Programmatically</title>
		<link>http://www.nvncbl.com/2010/03/magento-set-product-dropdown-and-multiselect-values-programmatically/</link>
		<comments>http://www.nvncbl.com/2010/03/magento-set-product-dropdown-and-multiselect-values-programmatically/#comments</comments>
		<pubDate>Tue, 09 Mar 2010 01:02:17 +0000</pubDate>
		<dc:creator>Antonio</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[addData]]></category>
		<category><![CDATA[attribute]]></category>
		<category><![CDATA[automated]]></category>
		<category><![CDATA[dropdown]]></category>
		<category><![CDATA[magento]]></category>
		<category><![CDATA[multiple]]></category>
		<category><![CDATA[multiselect]]></category>
		<category><![CDATA[programmatically]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[values]]></category>

		<guid isPermaLink="false">http://www.nvncbl.com/?p=513</guid>
		<description><![CDATA[Here&#8217;s how to programmatically, meaning through code, set a product&#8217;s attribute value when the attribute is of type Dropdown or Multiselect.  For dropdown, we&#8217;ll be interested in setting only a single value.  And obviously for multiselect, we&#8217;ll be interested in setting multiple values.
With Text attributes such as Name and Description, you can do something like:

$product-&#62;setName&#40; [...]]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s how to programmatically, meaning through code, set a product&#8217;s attribute value when the attribute is of type Dropdown or Multiselect.  For dropdown, we&#8217;ll be interested in setting only a single value.  And obviously for multiselect, we&#8217;ll be interested in setting multiple values.</p>
<p>With Text attributes such as Name and Description, you can do something like:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$product</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">setName</span><span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'My Sweet Shirt'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$product</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">setDescription</span><span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'This shirt will make you look good, thus impressing girls.'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Unfortunately, this won&#8217;t work for attributes whose values are predefined.  Instead of cursing Magento, think of it as a data-integrity/validation measure.</p>
<p>Anyway, assuming you already have a $product object, our overall process will be to:</p>
<ol>
<li>Load an attribute object for the attribute you want to work on</li>
<li>Load the collection of that attribute&#8217;s values</li>
<li>Make your choices (different for Dropdown and Multiselect)</li>
<li>Save the product</li>
</ol>
<p><strong>1. Load an attribute object for the attribute you want to work on</strong></p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$attribute</span> <span style="color: #339933;">=</span> Mage<span style="color: #339933;">::</span><span style="color: #004000;">getModel</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'eav/entity_attribute'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$attribute</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">loadByCode</span><span style="color: #009900;">&#40;</span> <span style="color: #cc66cc;">4</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'color'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p><strong>2. Load the collection of that attribute&#8217;s values</strong></p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$values</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$valuesCollection</span> <span style="color: #339933;">=</span> Mage<span style="color: #339933;">::</span><span style="color: #004000;">getResourceModel</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'eav/entity_attribute_option_collection'</span><span style="color: #009900;">&#41;</span>
	<span style="color: #339933;">-&gt;</span><span style="color: #004000;">setAttributeFilter</span><span style="color: #009900;">&#40;</span> <span style="color: #000088;">$attribute</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;">setStoreFilter</span><span style="color: #009900;">&#40;</span> Mage_Core_Model_App<span style="color: #339933;">::</span><span style="color: #004000;">ADMIN_STORE_ID</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #009900;">&#41;</span>
	<span style="color: #339933;">-&gt;</span><span style="color: #004000;">load</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #b1b100;">foreach</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$valuesCollection</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>
	<span style="color: #000088;">$values</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$item</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getValue</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</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: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p><strong>3. Make your choice &#8211; DROPDOWN</strong></p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$product</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">setColor</span><span style="color: #009900;">&#40;</span> <span style="color: #000088;">$values</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'Blue'</span><span style="color: #009900;">&#93;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// just do whatever you need to code 'Blue' instead of hard-coding it</span></pre></div></div>

<p><strong>3. Make your choices &#8211; MULTISELECT</strong></p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$product</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">addData</span><span style="color: #009900;">&#40;</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
	<span style="color: #0000ff;">'color'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000088;">$values</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'Blue'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">.</span><span style="color: #0000ff;">','</span><span style="color: #339933;">.</span> <span style="color: #000088;">$values</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'Red'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">.</span><span style="color: #0000ff;">','</span><span style="color: #339933;">.</span> <span style="color: #000088;">$values</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'Black'</span><span style="color: #009900;">&#93;</span>  <span style="color: #666666; font-style: italic;">// just putting together a comma-separated list of values</span>
<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p><strong>4. Save the product</strong></p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$product</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></pre></div></div>

<p>This builds off the solution posted by member &#8220;icvu&#8221; here: <a href="http://www.magentocommerce.com/boards/main.php/viewthread/69925/" class="external">http://www.magentocommerce.com/boards/main.php/viewthread/69925/</a> &#8212; specifically the addData() part.</p>
<p>Thanks, and have fun setting attribute values.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.nvncbl.com/2010/03/magento-set-product-dropdown-and-multiselect-values-programmatically/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<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>Magento $this-&gt;getSkinUrl() Wrong Template</title>
		<link>http://www.nvncbl.com/2009/10/magento-this-getskinurl-wrong-template/</link>
		<comments>http://www.nvncbl.com/2009/10/magento-this-getskinurl-wrong-template/#comments</comments>
		<pubDate>Mon, 26 Oct 2009 15:39:08 +0000</pubDate>
		<dc:creator>Antonio</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[magento]]></category>
		<category><![CDATA[template]]></category>

		<guid isPermaLink="false">http://www.nvncbl.com/?p=463</guid>
		<description><![CDATA[When using $this-&#62;getSkinUrl(&#8216;path/to/yourfile.html&#8217;) inside view (.phtml) code, and you&#8217;re getting /default/default/ instead of /default/yourtheme, this isn&#8217;t Magento working incorrectly.  Check the $argument you send and verify that the target file actually exists.
getSkinUrl() does more than just generate the proper URL, it also verifies that the file exists.  If it doesn&#8217;t find the file within the [...]]]></description>
			<content:encoded><![CDATA[<p>When using $this-&gt;getSkinUrl(&#8216;path/to/yourfile.html&#8217;) inside view (.phtml) code, and you&#8217;re getting /default/default/ instead of /default/yourtheme, this isn&#8217;t Magento working incorrectly.  Check the $argument you send and verify that the target file actually exists.</p>
<p>getSkinUrl() does more than just generate the proper URL, it also verifies that the file exists.  If it doesn&#8217;t find the file within the store&#8217;s /yourtheme folder, it will revert to /default.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.nvncbl.com/2009/10/magento-this-getskinurl-wrong-template/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Introducing Magento Widgets</title>
		<link>http://www.nvncbl.com/2009/10/introducing-magento-widgets/</link>
		<comments>http://www.nvncbl.com/2009/10/introducing-magento-widgets/#comments</comments>
		<pubDate>Mon, 12 Oct 2009 14:19:12 +0000</pubDate>
		<dc:creator>Antonio</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[magento]]></category>
		<category><![CDATA[widgets]]></category>

		<guid isPermaLink="false">http://www.nvncbl.com/?p=451</guid>
		<description><![CDATA[Magento Widgets allow business users with no technical knowledge to easily add dynamic content (including product data, for example) to pages in Magento Stores.  This allows for greater control and flexibility in creating informational and marketing content through administrator tools, enabling intuitive and efficient control of content such as:

Dynamic product data in Marketing Campaign Landing [...]]]></description>
			<content:encoded><![CDATA[<p>Magento Widgets allow business users with no technical knowledge to easily add dynamic content (including product data, for example) to pages in Magento Stores.  This allows for greater control and flexibility in creating informational and marketing content through administrator tools, enabling intuitive and efficient control of content<span id="more-451"></span> such as:</p>
<ul>
<li>Dynamic product data in Marketing Campaign Landing Pages</li>
<li>Dynamic Information such as Recently Viewed Items into Content Pages</li>
<li>Promotional images to position in different blocks, side columns and other locations throughout the storefront</li>
<li>Interactive elements and action blocks (external review systems, video chats, voting and subscription forms)</li>
<li>Alternative navigation elements (tag clouds, catalog image sliders)</li>
<li>Create interactive and dynamic flash elements easily configured and embedded within content pages for enhanced user experience</li>
</ul>
<p>Originally posted on the <a class="external" href="http://www.magentocommerce.com/blog/comments/introducing-magento-widgets/">official Magento Blog</a>.  Continue reading for more on:</p>
<ul>
<li>What are Widgets?</li>
<li>How to Develop a Widget</li>
<li>Terminology</li>
<li>Widget Examples in Magento CE 1.4, EE 1.6</li>
</ul>
<p>Widget ideas anyone?  What should I work on?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.nvncbl.com/2009/10/introducing-magento-widgets/feed/</wfw:commentRss>
		<slash:comments>1</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>3</slash:comments>
		</item>
		<item>
		<title>Magento Skip Login/Registration at Checkout</title>
		<link>http://www.nvncbl.com/2009/09/magento-skip-loginregistration-at-checkout/</link>
		<comments>http://www.nvncbl.com/2009/09/magento-skip-loginregistration-at-checkout/#comments</comments>
		<pubDate>Wed, 02 Sep 2009 19:05:13 +0000</pubDate>
		<dc:creator>Antonio</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[checkout]]></category>
		<category><![CDATA[login]]></category>
		<category><![CDATA[magento]]></category>
		<category><![CDATA[onepage]]></category>
		<category><![CDATA[register]]></category>

		<guid isPermaLink="false">http://www.nvncbl.com/?p=397</guid>
		<description><![CDATA[A client wanted every checkout on his site to be a guest checkout.  He was selling a very niche product and wanted to avoid hassling potential customers with a user log-in or registration form.  The goal was to modify Magento&#8217;s One Page Checkout to completely skip Step 1: Login/Register and show Step 2: [...]]]></description>
			<content:encoded><![CDATA[<p>A client wanted every checkout on his site to be a guest checkout.  He was selling a very niche product and wanted to avoid hassling potential customers with a user log-in or registration form.  The goal was to modify Magento&#8217;s One Page Checkout to completely skip Step 1: Login/Register and show Step 2: Billing Information.</p>
<p><span id="more-397"></span>We are going to:</p>
<ol>
<li>Hide Step 1</li>
<li>Tell Magento that Step 1 was &#8220;completed&#8221; as Guest</li>
<li>Have Step 2 appear as Step 1</li>
</ol>
<p>Here goes:</p>
<p><strong>1. Hiding Step 1 &#8211; Login/Register</strong></p>
<p>Open /app/design/frontend/&lt;your_company&gt;/&lt;your_company&gt;/template/checkout/onepage.phtml</p>
<p>Find:</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">li</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;opc-&lt;?php echo $_stepId ?&gt;</span></span>&quot; {...}</pre></div></div>

<p>And replace it with:</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">li</span> &lt;?php echo $i<span style="color: #66cc66;">==</span><span style="color: #cc66cc;">1</span> ? <span style="color: #ff0000;">'style=&quot;display:none;&quot;'</span> : <span style="color: #ff0000;">''</span> ?&gt;</span> id=&quot;opc-<span style="color: #009900;">&lt;?php echo $_stepId ?&gt;</span>&quot;  {...}</pre></div></div>

<p><strong>2. Set Step 1 to equal Guest</strong></p>
<p>Open /app/design/frontend/&lt;your_company&gt;/&lt;your_company&gt;/template/checkout/onepage/login.phtml</p>
<p>Basically, comment everything out and insert:</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">input</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;hidden&quot;</span> <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;checkout_method&quot;</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;login:guest&quot;</span> <span style="color: #000066;">value</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;guest&quot;</span> <span style="color: #000066;">checked</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;checked&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">script</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/javascript&quot;</span>&gt;</span>
Event.observe(window, 'load', function() {
checkout.setMethod();
});
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">script</span>&gt;</span></pre></div></div>

<p><strong>3. Make Step 2 look like Step 1</strong></p>
<p>Open /app/design/frontend/&lt;your_company&gt;/&lt;your_company&gt;/template/checkout/onepage.phtml</p>
<p>Find:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$i</span><span style="color: #339933;">=</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span> <span style="color: #b1b100;">foreach</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getSteps</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$_stepId</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000088;">$_stepInfo</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">:</span></pre></div></div>

<p>And replace it with:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$i</span><span style="color: #339933;">=-</span><span style="color: #cc66cc;">1</span><span style="color: #339933;">;</span> <span style="color: #b1b100;">foreach</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getSteps</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$_stepId</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000088;">$_stepInfo</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">:</span></pre></div></div>

<p>Finally, in the same file, change this snippet that we added in step 1:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">echo</span> <span style="color: #000088;">$i</span><span style="color: #339933;">==</span><span style="color: #cc66cc;">1</span></pre></div></div>

<p>to:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">echo</span> <span style="color: #000088;">$i</span><span style="color: #339933;">===</span><span style="color: #cc66cc;">0</span></pre></div></div>

<p>And there you have it.  Credit goes to poster <a class="external" href="http://www.imagebox.com">imagebox</a> on this particular Magento <a class="external" href="http://www.magentocommerce.com/boards/viewthread/17873/#t116490">how-to thread</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.nvncbl.com/2009/09/magento-skip-loginregistration-at-checkout/feed/</wfw:commentRss>
		<slash:comments>4</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>1</slash:comments>
		</item>
		<item>
		<title>Magento Configurable Product Pricing</title>
		<link>http://www.nvncbl.com/2009/08/magento-configurable-product-pricing/</link>
		<comments>http://www.nvncbl.com/2009/08/magento-configurable-product-pricing/#comments</comments>
		<pubDate>Tue, 18 Aug 2009 18:04:54 +0000</pubDate>
		<dc:creator>Antonio</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[configurable]]></category>
		<category><![CDATA[extension]]></category>
		<category><![CDATA[magento]]></category>
		<category><![CDATA[prices]]></category>
		<category><![CDATA[simple]]></category>

		<guid isPermaLink="false">http://www.nvncbl.com/?p=356</guid>
		<description><![CDATA[Let&#8217;s say for example that configurable product A is defined to have 2 attributes &#8220;color&#8221; and &#8220;size&#8221;.  Values for color may be: Black, White, Chrome while values for size may be: 1&#8243;, 2&#8243;, 3&#8243;, and 4&#8243;.
One would expect that there should be a price matrix that might look like:




1&#8243;
2&#8243;
3&#8243;
4&#8243;


Black
$1.00
$1.20
$1.40
$1.60


White
$1.05
$1.25
$1.45
$1.65


Chrome
$1.15
$1.35
$1.55
$1.75



But if you only have simple products:
Black [...]]]></description>
			<content:encoded><![CDATA[<p>Let&#8217;s say for example that configurable product A is defined to have 2 attributes &#8220;color&#8221; and &#8220;size&#8221;.  Values for color may be: <strong>Black</strong>, <strong>White</strong>, <strong>Chrome</strong> while values for size may be: <strong>1&#8243;</strong>, <strong>2&#8243;</strong>, <strong>3&#8243;</strong>, and <strong>4&#8243;</strong>.</p>
<p>One would expect that there should be a price matrix that might look like:</p>
<table border="0">
<tbody>
<tr>
<th></th>
<th>1&#8243;</th>
<th>2&#8243;</th>
<th>3&#8243;</th>
<th>4&#8243;</th>
</tr>
<tr>
<th>Black</th>
<td>$1.00</td>
<td>$1.20</td>
<td>$1.40</td>
<td>$1.60</td>
</tr>
<tr>
<th>White</th>
<td>$1.05</td>
<td>$1.25</td>
<td>$1.45</td>
<td>$1.65</td>
</tr>
<tr>
<th>Chrome</th>
<td>$1.15</td>
<td>$1.35</td>
<td>$1.55</td>
<td>$1.75</td>
</tr>
</tbody>
</table>
<p><span id="more-356"></span>But if you only have simple products:</p>
<p>Black + 1&#8243; = $1.00<br />
Black + 3&#8243; = $1.40<br />
White + 1&#8243; = $1.05<br />
White + 2&#8243; = $1.25<br />
Chrome + 3&#8243; = $1.55<br />
Chrome + 4&#8243; = $1.75</p>
<p>&#8230; then you don&#8217;t need the full matrix.  Even if you did need the full matrix, how do you set up simple/configurable product pricing in Magento?</p>
<p><strong>Solution:</strong></p>
<p>This <a title="Simple Configurable Products" href="http://www.magentocommerce.com/extension/596/simple-configurable-products" class="external">Simple Configurable Products</a> extension by Matt Dean.  From the extension page:</p>
<blockquote><p>This extension changes the way that the pricing of configurable products works in Magento. With this extension enabled, a configurable product&#8217;s own price is never used. Instead, the price used is that of the appropriate associated simple product.</p>
<p>This gives site owners direct control to set the price of every configuration of a product, while still giving users the flexibility they usually get with configurable products. (There&#8217;s no more having to set rules such as: +20% for blue, -£10 for small, +15% for leather. You just price the underlying small-blue-leather product at £199.99 and that&#8217;s what the user pays.)</p></blockquote>
<p>You still have to create the configurable products and set certain attributes to be the configurable ones ( e.g. &#8220;Color&#8221; and &#8220;Size&#8221; in the previous example ).  Set the prices of simple products (no need to set the price of configurable products), and the extension takes care of the rest.  In the front-end, users will still be specifying Color and Size, and prices will change accordingly.</p>
<p>Happy pricing!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.nvncbl.com/2009/08/magento-configurable-product-pricing/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Magento Platform Revisited</title>
		<link>http://www.nvncbl.com/2009/01/magento-platform-revisited/</link>
		<comments>http://www.nvncbl.com/2009/01/magento-platform-revisited/#comments</comments>
		<pubDate>Sat, 17 Jan 2009 18:59:27 +0000</pubDate>
		<dc:creator>Antonio</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[e-commerce]]></category>
		<category><![CDATA[magento]]></category>
		<category><![CDATA[xml]]></category>

		<guid isPermaLink="false">http://www.nvncbl.com/?p=196</guid>
		<description><![CDATA[It&#8217;s been almost three weeks now since I&#8217;ve started learning the Magento ecommerce platform.  With an impressive array of features, like product comparisons and a web services API, the platform sounds promising.  I had hoped that by the time I&#8217;d revisit this topic, I&#8217;d be able to say I&#8217;ve successfully implemented the software.  Instead I&#8217;m [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s been almost three weeks now since I&#8217;ve started learning the <a title="Magento - eCommerce Software" href="http://www.magentocommerce.com/" class="external">Magento ecommerce platform</a>.  With an impressive array of features, like product comparisons and a web services API, the platform sounds promising.  I had hoped that by the time I&#8217;d revisit this topic, I&#8217;d be able to say I&#8217;ve successfully implemented the software.  Instead I&#8217;m having trouble setting up my product catalog (it involves importing).  And how can I forget to mention the overall issue of speed?</p>
<p>Let&#8217;s start at the beginning, at installation.  Your web server likely has capable hardware, so you need to be sure that your <a title="Magento - System Requirements" href="http://www.magentocommerce.com/system-requirements" class="external">software configuration meets requirements</a>.  Luckily the host I&#8217;m on was set up just fine the way it was.  Obviously you need to download the software &#8211; I chose to download the Full Release (version 1.1.8 at the time).  <span id="more-196"></span>The zipped package contains 6k+ files so you may want to look into an &#8220;<a title="Unzip on server" href="http://www.3scriptz.com/snippets/unzip-on-server-using-php.html" class="external">unzip on the server</a>&#8221; solution or you&#8217;ll have to wait a <em>long</em> time like I did.  If you decide to wait, take the time to read through the User Guide and the Designer Guide.</p>
<p><strong>Setting up Magento<br />
</strong></p>
<p>Once you have the files uploaded, CHMOD the directory (where you dropped those files) to 777.  Then navigate to the installer script &#8211; http://www.yourdomain.com/your-magento-folder/.  The script is very simple, and the most important part of it is inputting database connection information.  Proceed to create an admin account and log in to the administration panel.</p>
<p>I easily set up a &#8220;website&#8221;, &#8220;store&#8221;, and &#8220;store view&#8221;.  For my purposes, just one of each was necessary so I named them &#8220;clientname_website&#8221;, &#8220;clientname_store&#8221;, and &#8220;clientname_storeview&#8221;.  I haven&#8217;t set up any roles other than Administrators yet, since for now it&#8217;s just myself and another developer .</p>
<p>My two main tasks to work on:</p>
<ol>
<li>Style the front-end to look like our client&#8217;s existing storefront</li>
<li>Import the client&#8217;s existing product catalog data (including manufacturer and category data)</li>
</ol>
<p>I decided to work on styling the front-end first, since it seemed to be the more difficult task.  I imagined thousands of CSS declarations I&#8217;d have to modify, not to mention figuring out the XML-based layout system.  As for the catalog import, I imagined it would simply be the mapping of data fields into the Magento model.  I prefer to tackle more difficult tasks first, for peace-of-mind reasons.</p>
<p><strong>Theming Magento</strong></p>
<p>As I predicted, getting Magento to look the way I needed proved to be a very difficult task.  I was hoping for a more <a title="Wordpress" href="http://www.wordpress.org" class="external">Wordpress</a> style header/content/left+right/footer type of deal, but what I saw was something much more complicated.  To make the simplest of changes took many hours, with my development process being something like:</p>
<ol>
<li>Figure out which file(s) contains the code (HTML, XML)  I need to edit.</li>
<li>Verify I have the right files.  Make a small test change and see if output is affected.</li>
<li>Remind self of what &#8220;block, layout, and template&#8221; mean.</li>
<li>( trial/error, server timeout ) x 10</li>
<li>Break.  Resume. Now, what was I doing? /MyCompany/MyCompany/?  Oh right.</li>
<li>Search Google on how to solve the problem.  Search is fruitless.  Try Experts-Exchange.</li>
<li>( trial/error, server timeout ) x 10</li>
<li>Almost there.</li>
<li>Major revelation! Break.</li>
</ol>
<p>All in all, theming was/is very complicated.  It&#8217;s hard to determine what references what, and how to go about making changes to get the desired effect.  My impression is that the Magento team would have us use their system in one way, and only that way.  The whole hierarchical system seems like a good idea, but in practice it&#8217;s cumbersome and difficult to master.</p>
<p><strong>Importing the Product Catalog</strong></p>
<p>After walking barefoot over hot coals, or theming Magento, I was really hoping that importing the product catalog would be a no-brainer &#8211; just map fields in my existing database to fields in the Magento database.  I couldn&#8217;t have been more wrong.  Magento&#8217;s database model is an instance of the <a title="Entity Attribute Value Model" href="http://en.wikipedia.org/wiki/Entity-Attribute-Value_model" class="external">entity-attribute-value model</a> (EAV).  The difference between EAV and conventional modeling is that table records don&#8217;t represent an instance of a data object.  Instead, the data object&#8217;s values are spread out over multiple tables, making manipulating the delicate database directly incredibly complex.</p>
<p>The route I decided to take, as recommended on several sites, was to:</p>
<ol>
<li>Create a single category (under &#8220;root category&#8221; or &#8220;Default Category&#8221; of course)</li>
<li>Create and assign a single product to that category.</li>
<li>Run the &#8220;Export All Products&#8221; profile to generate a CSV file</li>
<li>Export existing data to CSV according to the exported CSV&#8217;s column format</li>
<li>Upload the new CSV using the &#8220;Import All Products&#8221; profile.</li>
</ol>
<p>When exporting existing data to the Magento format, be sure to use the category ID values for category instead of the category names.  You can find out a category&#8217;s ID by navigating to its &#8220;edit category&#8221; page and looking at the URL.  The ID is in the URL.</p>
<p>When running the &#8220;Import All Products&#8221; profile, you might have to limit the number of records that you import at a time.  If that doesn&#8217;t work, (as in my case) try reducing the number of rows that are in the CSV file.  You would have to upload many many CSV files and run the profile over and over again for those files.  I don&#8217;t understand why adding records to just a few tables should consume a large share of server resources.  Import crashes for me a lot, which isn&#8217;t good because I&#8217;m unclear of whether all products have been imported or not.</p>
<p><strong>Speed and Performance</strong></p>
<p>I&#8217;ve decided to dedicate a section to speed and performance, because Magento&#8217;s slowness was a huge distraction during the development process.  It would be nice if at the very least that the system didn&#8217;t crash every 1/5 page loads.  It would also be nice if I could see the results of a few CSS declarations quickly.  There seems to be a LOT of overhead in Magento, I could go on forever about it.</p>
<p>Based on what I&#8217;ve read, you should go with a dedicated or a virtual-private-server (VPS) if you choose to run Magento.  A lot of developers working on a shared hosting solution seem to have huge speed issues.  Trust me, save yourself a lot of headaches and upgrade your hosting.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.nvncbl.com/2009/01/magento-platform-revisited/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Magento &#8211; eCommerce Platform for Growth</title>
		<link>http://www.nvncbl.com/2008/12/magento-ecommerce-platform-for-growth/</link>
		<comments>http://www.nvncbl.com/2008/12/magento-ecommerce-platform-for-growth/#comments</comments>
		<pubDate>Tue, 30 Dec 2008 01:12:42 +0000</pubDate>
		<dc:creator>Antonio</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[e-commerce]]></category>
		<category><![CDATA[magento]]></category>

		<guid isPermaLink="false">http://www.nvncbl.com/?p=81</guid>
		<description><![CDATA[One of our clients is using an in-house system for maintaining product catalogs, customers, inventory, shopping carts, etc.  Being an in-house system, it isn&#8217;t very scaleable and changes to the system take a long time to implement.  So for them, we are going to be installing and setting up Magento.
Now I&#8217;ve only just started to [...]]]></description>
			<content:encoded><![CDATA[<p>One of our clients is using an in-house system for maintaining product catalogs, customers, inventory, shopping carts, etc.  Being an in-house system, it isn&#8217;t very scaleable and changes to the system take a <em>long</em> time to implement.  So for them, we are going to be installing and setting up <a title="Magento" href="http://www.magentocommerce.com" class="external">Magento</a>.</p>
<p>Now I&#8217;ve only just started to become familiar with the platform.  I should also mention that I have no experience working with other eCommerce platforms like OSCommerce or anything, but the talk-of-the-town is that Magento <a title="9 kick ass Open source E-commerce platforms reviewed" href="http://blog.webdistortion.com/2008/05/03/9-kick-ass-open-source-e-commerce-platforms-reviewed/" class="external">blows everything else out of the water</a>.  More importantly, based on what I&#8217;ve read in their comprehensive <a title="Magento User Guide" href="http://www.magentocommerce.com/support/magento_user_guide" class="external">User Guide</a>, the software can handle <strong>(1)</strong> everything our client needs, <strong>(2) </strong>everything they&#8217;ve requested, and <strong>(3)</strong> everything our client hasn&#8217;t even thought of yet.</p>
<p><span id="more-81"></span>Some of the cool stuff includes:</p>
<ul>
<li>Automatic product comparisons page (based on product attributes that you define)</li>
<li>&#8220;Layered navigation&#8221; &#8211; when browsing through a category of products, the layered navigation offers nifty drill-down filters so shoppers can easily find products that are within their budget/needs/tastes.</li>
<li>Related products, upselling, and cross-sellling (important to know the distinction between the three)</li>
<li>URL rewrites (very very very <a title="mod_rewrite and SEO" href="http://www.htmlist.com/how-to/a-simplemod_rewrite-tutorial/" class="external">important for SEO</a>)</li>
<li>Support for UPS, UPS XML, FedEx, USPS, and DHL</li>
<li>Multiple images per product and slick zoom-in capability</li>
</ul>
<p>For the full feature list, go <a title="Magento Features" href="http://www.magentocommerce.com/features" class="external">here</a>.</p>
<p>Expect more posts regarding Magento to come as I journey through deployment.  This post was just kind of like a trailer.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.nvncbl.com/2008/12/magento-ecommerce-platform-for-growth/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
