<?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>Paul Donnelly - Website Designer and Developer from Northern Ireland</title>
	<atom:link href="http://www.pauldonnellydesigns.com/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.pauldonnellydesigns.com/blog</link>
	<description>Weblog of Paul Donnelly - Northern Ireland</description>
	<lastBuildDate>Sat, 24 Mar 2012 18:29:52 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.3</generator>
		<item>
		<title>Add Order Status to Last 5 Orders on Magento Admin Dashboard</title>
		<link>http://www.pauldonnellydesigns.com/blog/add-order-status-to-last-5-orders-on-magento-admin-dashboard/</link>
		<comments>http://www.pauldonnellydesigns.com/blog/add-order-status-to-last-5-orders-on-magento-admin-dashboard/#comments</comments>
		<pubDate>Sat, 24 Mar 2012 17:44:03 +0000</pubDate>
		<dc:creator>Paul Donnelly</dc:creator>
				<category><![CDATA[Magento E-commerce]]></category>
		<category><![CDATA[Magento Snippets]]></category>
		<category><![CDATA[Snippets]]></category>

		<guid isPermaLink="false">http://www.pauldonnellydesigns.com/blog/?p=697</guid>
		<description><![CDATA[It&#8217;s happened to us all folks, you log onto the admin dashboard you see an new order in the last 5 orders list and automatically think to yourself, &#8220;Nice, I have a new order!&#8221;. Well hold on a minute, this is not always the case, the order could have be ...]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s happened to us all folks, you log onto the admin dashboard you see an new order in the last 5 orders list and automatically think to yourself, &#8220;Nice, I have a new order!&#8221;. Well hold on a minute, this is not always the case, the order could have be abandoned or pending payment. This has happened to me a few too many times this week so I decided, I NEED to have the order status along with the Customer Name, Items &amp; Grand Total.</p>
<p>If you follow the instructions below, I will show you how to add Status to the Last 5 Orders grid.</p>
<p><strong>Standard Grid</strong></p>
<p><img class="aligncenter size-full wp-image-699" title="last-5-orders-standard" src="http://www.pauldonnellydesigns.com/blog/wp-content/uploads/2012/03/last-5-orders-standard.jpg" alt="" width="494" height="127" /><strong>Modified Grid</strong></p>
<p>First of all, and this is a must when modifying any core files, create a local copy of the following file:</p>
<p>Copy app/code/core/Mage/Adminhtml/Block/Dashboard/Orders/Grid.php</p>
<p>To app/code/local/Mage/Adminhtml/Block/Dashboard/Orders/Grid.php</p>
<p>Open your local copy of Grid.php and around line 114 add the following:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">addColumn</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'status'</span><span style="color: #339933;">,</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
<span style="color: #0000ff;">'header'</span> <span style="color: #339933;">=&gt;</span> Mage<span style="color: #339933;">::</span><span style="color: #004000;">helper</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'sales'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span>__<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Status'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
<span style="color: #0000ff;">'index'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'status'</span><span style="color: #339933;">,</span>
<span style="color: #0000ff;">'type'</span>  <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'options'</span><span style="color: #339933;">,</span>
<span style="color: #0000ff;">'width'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'70px'</span><span style="color: #339933;">,</span>
<span style="color: #0000ff;">'sortable'</span>  <span style="color: #339933;">=&gt;</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #339933;">,</span>
<span style="color: #0000ff;">'options'</span> <span style="color: #339933;">=&gt;</span> Mage<span style="color: #339933;">::</span><span style="color: #004000;">getSingleton</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'sales/order_config'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getStatuses</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Save and upload the local  copy and you should now have a column called Status in your Last 5 Orders.</p>
<p><img class="aligncenter size-full wp-image-701" title="last-5-orders-modified" src="http://www.pauldonnellydesigns.com/blog/wp-content/uploads/2012/03/last-5-orders-modified.jpg" alt="" width="494" height="127" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.pauldonnellydesigns.com/blog/add-order-status-to-last-5-orders-on-magento-admin-dashboard/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Magento &#8211; Get Store Email Addresses</title>
		<link>http://www.pauldonnellydesigns.com/blog/magento-get-store-email-addresses/</link>
		<comments>http://www.pauldonnellydesigns.com/blog/magento-get-store-email-addresses/#comments</comments>
		<pubDate>Sat, 18 Feb 2012 15:44:12 +0000</pubDate>
		<dc:creator>Paul Donnelly</dc:creator>
				<category><![CDATA[Magento E-commerce]]></category>
		<category><![CDATA[Magento Snippets]]></category>
		<category><![CDATA[Snippets]]></category>

		<guid isPermaLink="false">http://www.pauldonnellydesigns.com/blog/?p=692</guid>
		<description><![CDATA[
General Contact

/* Sender Name */
Mage::getStoreConfig&#40;'trans_email/ident_general/name'&#41;; 
/* Sender Email */
Mage::getStoreConfig&#40;'trans_email/ident_general/email'&#41;;


Sales Representative

/* Sender Name */
Mage::getStoreConfig&#40;'trans_email/ident_sales/name'&#41;; 
/* Sender Email */
Mage::getStoreConfig&#40;'trans_email/ident_sales/email'&#41;;

Customer Support

/* Sender Name */
Mage::getStoreConfig&#40;'trans_email/ident_support/name'&#41;; 
/* Sender Email */
Mage::getStoreConfig&#40;'trans_email/ident_support/email'&#41;;

Custom Email 1

/* Sender Name */
Mage::getStoreConfig&#40;'trans_email/ident_custom1/name'&#41;; 
/* Sender Email */
Mage::getStoreConfig&#40;'trans_email/ident_custom1/email'&#41;;

Custom Email 2

&#160;
/* Sender Name */
Mage::getStoreConfig&#40;'trans_email/ident_custom2/name'&#41;; 
/* Sender Email */
Mage::getStoreConfig&#40;'trans_email/ident_custom2/email'&#41;;

]]></description>
			<content:encoded><![CDATA[
<p><strong>General Contact</strong></p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">/* Sender Name */</span>
Mage<span style="color: #339933;">::</span><span style="color: #004000;">getStoreConfig</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'trans_email/ident_general/name'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
<span style="color: #666666; font-style: italic;">/* Sender Email */</span>
Mage<span style="color: #339933;">::</span><span style="color: #004000;">getStoreConfig</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'trans_email/ident_general/email'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p><span id="more-692"></span></p>
<p><strong>Sales Representative</strong></p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">/* Sender Name */</span>
Mage<span style="color: #339933;">::</span><span style="color: #004000;">getStoreConfig</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'trans_email/ident_sales/name'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
<span style="color: #666666; font-style: italic;">/* Sender Email */</span>
Mage<span style="color: #339933;">::</span><span style="color: #004000;">getStoreConfig</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'trans_email/ident_sales/email'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p><strong>Customer Support</strong></p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">/* Sender Name */</span>
Mage<span style="color: #339933;">::</span><span style="color: #004000;">getStoreConfig</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'trans_email/ident_support/name'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
<span style="color: #666666; font-style: italic;">/* Sender Email */</span>
Mage<span style="color: #339933;">::</span><span style="color: #004000;">getStoreConfig</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'trans_email/ident_support/email'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p><strong>Custom Email 1</strong></p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">/* Sender Name */</span>
Mage<span style="color: #339933;">::</span><span style="color: #004000;">getStoreConfig</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'trans_email/ident_custom1/name'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
<span style="color: #666666; font-style: italic;">/* Sender Email */</span>
Mage<span style="color: #339933;">::</span><span style="color: #004000;">getStoreConfig</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'trans_email/ident_custom1/email'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p><strong>Custom Email 2</strong></p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">&nbsp;
<span style="color: #666666; font-style: italic;">/* Sender Name */</span>
Mage<span style="color: #339933;">::</span><span style="color: #004000;">getStoreConfig</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'trans_email/ident_custom2/name'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
<span style="color: #666666; font-style: italic;">/* Sender Email */</span>
Mage<span style="color: #339933;">::</span><span style="color: #004000;">getStoreConfig</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'trans_email/ident_custom2/email'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.pauldonnellydesigns.com/blog/magento-get-store-email-addresses/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Magento Fix &#8211; Transactional Email Preview Showing HTML only</title>
		<link>http://www.pauldonnellydesigns.com/blog/magento-fix-transactional-email-preview-showing-html-only/</link>
		<comments>http://www.pauldonnellydesigns.com/blog/magento-fix-transactional-email-preview-showing-html-only/#comments</comments>
		<pubDate>Sun, 22 Jan 2012 15:43:55 +0000</pubDate>
		<dc:creator>Paul Donnelly</dc:creator>
				<category><![CDATA[Magento E-commerce]]></category>
		<category><![CDATA[Magento Snippets]]></category>
		<category><![CDATA[Snippets]]></category>

		<guid isPermaLink="false">http://www.pauldonnellydesigns.com/blog/?p=670</guid>
		<description><![CDATA[In Magento version 1.6.1.0, I noticed when previewing a transactional email it displayed in html only. Obviously this isnt right so I come up with this little fix.
Copy: app/code/core/Mage/Adminhtml/Block/System/Email/Template/preview.php
To: app/code/local/Mage/Adminhtml/Block/System/Email/Template/preview.php
Change (Line:49):
$template-&#62;setTemplateText(
$this-&#62;escapeHtml($template-&#62;getTemplateText())
);
To:
//$template-&#62;setTemplateText(
//$this-&#62;escapeHtml($template-&#62;getTemplateText())
//);
Upload and it should display properly.
]]></description>
			<content:encoded><![CDATA[<p>In Magento version 1.6.1.0, I noticed when previewing a transactional email it displayed in html only. Obviously this isnt right so I come up with this little fix.<span id="more-670"></span></p>
<p><strong>Copy: </strong>app/code/core/Mage/Adminhtml/Block/System/Email/Template/preview.php</p>
<p><strong>To:</strong> app/code/local/Mage/Adminhtml/Block/System/Email/Template/preview.php</p>
<p><strong>Change (Line:49):</strong></p>
<pre>$template-&gt;setTemplateText(
$this-&gt;escapeHtml($template-&gt;getTemplateText())
);</pre>
<p><strong>To:</strong></p>
<pre>//$template-&gt;setTemplateText(
//$this-&gt;escapeHtml($template-&gt;getTemplateText())
//);</pre>
<p>Upload and it should display properly.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.pauldonnellydesigns.com/blog/magento-fix-transactional-email-preview-showing-html-only/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Stop Magento Redirecting to Empty Cart on Success.phtml</title>
		<link>http://www.pauldonnellydesigns.com/blog/stop-magento-redirecting-to-empty-cart-on-success-phtml/</link>
		<comments>http://www.pauldonnellydesigns.com/blog/stop-magento-redirecting-to-empty-cart-on-success-phtml/#comments</comments>
		<pubDate>Sun, 22 Jan 2012 15:34:01 +0000</pubDate>
		<dc:creator>Paul Donnelly</dc:creator>
				<category><![CDATA[Magento E-commerce]]></category>
		<category><![CDATA[Magento Snippets]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Snippets]]></category>

		<guid isPermaLink="false">http://www.pauldonnellydesigns.com/blog/?p=665</guid>
		<description><![CDATA[Recently when trying to modify the success.phtml section in magento, I found it very frustrating the fact you had to make new fake orders to see your modified file. Of course I could have used firebug or some extension like that but I much prefer making modifications and hitting refresh.
After ...]]></description>
			<content:encoded><![CDATA[<p>Recently when trying to modify the success.phtml section in magento, I found it very frustrating the fact you had to make new fake orders to see your modified file. Of course I could have used firebug or some extension like that but I much prefer making modifications and hitting refresh.</p>
<p>After a little digging into the core files, I managed to find a solution.</p>
<p><strong>Open:</strong> app/code/core/Mage/Checkout/controllers/OnepageController.php</p>
<p>There is no need to move this file to local (unless you have already modified this file, so use the local version instead) as it’s only a temporary modification, obviously you don’t want this on the live site so *<strong>remember to undo this change when finished</strong>*.</p>
<p><strong>Change: (Line:227 in 1.6.1.0)</strong></p>

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

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">//$session-&gt;clear();</span></pre></div></div>

<p>Simple as that, hope this helps.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.pauldonnellydesigns.com/blog/stop-magento-redirecting-to-empty-cart-on-success-phtml/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Quick Magento Tip: Logo / Images in Transactional Emails Not Appearing</title>
		<link>http://www.pauldonnellydesigns.com/blog/quick-magento-tip-logo-images-in-transactional-emails-not-appearing/</link>
		<comments>http://www.pauldonnellydesigns.com/blog/quick-magento-tip-logo-images-in-transactional-emails-not-appearing/#comments</comments>
		<pubDate>Tue, 13 Sep 2011 08:48:45 +0000</pubDate>
		<dc:creator>Paul Donnelly</dc:creator>
				<category><![CDATA[Magento Snippets]]></category>
		<category><![CDATA[Snippets]]></category>

		<guid isPermaLink="false">http://www.pauldonnellydesigns.com/blog/?p=657</guid>
		<description><![CDATA[Magento by default will choose the logo_email.gif from the default package and default theme. To force it to use the logo_email.gif or any other image from your custom package or theme add the following snippets to your skin url.

&#160;
_package=&#34;MyPackageName&#34; _theme=&#34;MyCustomThemeName&#34;

Example:

&#160;
&#123;&#123;skin url=&#34;images/logo_email.gif&#34; _area='frontend' _package=&#34;MyPackageName&#34; _theme=&#34;MyCustomThemeName&#34;&#125;&#125;

]]></description>
			<content:encoded><![CDATA[<p>Magento by default will choose the logo_email.gif from the default package and default theme. To force it to use the logo_email.gif or any other image from your custom package or theme add the following snippets to your skin url.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">&nbsp;
_package<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;MyPackageName&quot;</span> _theme<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;MyCustomThemeName&quot;</span></pre></div></div>

<p>Example:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">&nbsp;
<span style="color: #009900;">&#123;</span><span style="color: #009900;">&#123;</span>skin url<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;images/logo_email.gif&quot;</span> _area<span style="color: #339933;">=</span><span style="color: #0000ff;">'frontend'</span> _package<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;MyPackageName&quot;</span> _theme<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;MyCustomThemeName&quot;</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#125;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.pauldonnellydesigns.com/blog/quick-magento-tip-logo-images-in-transactional-emails-not-appearing/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Magento Issue Fix &#8211; &#8220;El is NULL&#8221;</title>
		<link>http://www.pauldonnellydesigns.com/blog/magento-issue-fix-el-is-null/</link>
		<comments>http://www.pauldonnellydesigns.com/blog/magento-issue-fix-el-is-null/#comments</comments>
		<pubDate>Thu, 01 Sep 2011 12:39:22 +0000</pubDate>
		<dc:creator>Paul Donnelly</dc:creator>
				<category><![CDATA[Magento E-commerce]]></category>
		<category><![CDATA[Magento Snippets]]></category>
		<category><![CDATA[Snippets]]></category>

		<guid isPermaLink="false">http://www.pauldonnellydesigns.com/blog/?p=644</guid>
		<description><![CDATA[I have recently come across an issue when trying to add a Widget to a CMS page.
When clicking &#8220;Insert Widget&#8221; a javascript alert appeared shouting El is NULL.
The reason for this is a missing forward slash from Lib/Varien/Data/Form/Element/Editor.php Line 202.
To fix this error copy Lib/Varien/Data/Form/Element/Editor.php to app/code/local/Lib/Varien/Data/Form/Element/Editor.php
app/code/local/Lib/Varien/Data/Form/Element/Editor.php
Line 202 &#8211; Replace

'onclick' ...]]></description>
			<content:encoded><![CDATA[<p>I have recently come across an issue when trying to add a Widget to a CMS page.</p>
<p>When clicking &#8220;Insert Widget&#8221; a javascript alert appeared shouting <strong>El is NULL</strong>.</p>
<p>The reason for this is a missing forward slash from Lib/Varien/Data/Form/Element/Editor.php Line 202.</p>
<p>To fix this error copy Lib/Varien/Data/Form/Element/Editor.php to app/code/local/Lib/Varien/Data/Form/Element/Editor.php</p>
<p>app/code/local/Lib/Varien/Data/Form/Element/Editor.php</p>
<p>Line 202 &#8211; Replace</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #0000ff;">'onclick'</span>   <span style="color: #339933;">=&amp;</span>gt<span style="color: #339933;">;</span> <span style="color: #0000ff;">&quot;widgetTools.openDialog('&quot;</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&amp;</span>gt<span style="color: #339933;">;</span>getConfig<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'widget_window_url'</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;widget_target_id &quot;</span></pre></div></div>

<p>(Notice the space at the end of widget_target_id, this is error by magento when refactoring the code, they left out the forward slash)</p>
<p>with</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #0000ff;">'onclick'</span>   <span style="color: #339933;">=&amp;</span>gt<span style="color: #339933;">;</span> <span style="color: #0000ff;">&quot;widgetTools.openDialog('&quot;</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&amp;</span>gt<span style="color: #339933;">;</span>getConfig<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'widget_window_url'</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;widget_target_id/&quot;</span></pre></div></div>

<p><strong>Please note, change</strong></p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #339933;">&amp;</span>gt<span style="color: #339933;">;</span></pre></div></div>

<p>to &gt;</p>
<p>Ensure you<strong> clear the cache</strong> and it should work</p>
]]></content:encoded>
			<wfw:commentRss>http://www.pauldonnellydesigns.com/blog/magento-issue-fix-el-is-null/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CSV to HTML using PHP</title>
		<link>http://www.pauldonnellydesigns.com/blog/csv-to-html-using-php/</link>
		<comments>http://www.pauldonnellydesigns.com/blog/csv-to-html-using-php/#comments</comments>
		<pubDate>Tue, 05 Jul 2011 19:52:24 +0000</pubDate>
		<dc:creator>Paul Donnelly</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Snippets]]></category>

		<guid isPermaLink="false">http://www.pauldonnellydesigns.com/blog/?p=636</guid>
		<description><![CDATA[
&#60;?php
&#160;
$file_handle = fopen&#40;&#34;path/to/file/Book2.csv&#34;, &#34;r&#34;&#41;;
&#160;
while &#40;!feof&#40;$file_handle&#41; &#41; &#123;
&#160;
$line_of_text = fgetcsv&#40;$file_handle, 1024&#41;;
&#160;
print &#34;&#60;p&#62;&#34; . $line_of_text&#91;0&#93; . &#34;&#60;/p&#62;&#34;;
print &#34;&#60;p&#62;&#34; . $line_of_text&#91;1&#93; . &#34;&#60;/p&#62;&#34;;
print &#34;&#60;p&#62;&#34; . $line_of_text&#91;2&#93; . &#34;&#60;/p&#62;&#34;;
&#160;
&#125;
&#160;
fclose&#40;$file_handle&#41;;
&#160;
?&#62;

&#187; Sample CSV File
]]></description>
			<content:encoded><![CDATA[
<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
&nbsp;
<span style="color: #000088;">$file_handle</span> <span style="color: #339933;">=</span> <span style="color: #990000;">fopen</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;path/to/file/Book2.csv&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;r&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #b1b100;">while</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #990000;">feof</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$file_handle</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
&nbsp;
<span style="color: #000088;">$line_of_text</span> <span style="color: #339933;">=</span> <span style="color: #990000;">fgetcsv</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$file_handle</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">1024</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #b1b100;">print</span> <span style="color: #0000ff;">&quot;&lt;p&gt;&quot;</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$line_of_text</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;&lt;/p&gt;&quot;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">print</span> <span style="color: #0000ff;">&quot;&lt;p&gt;&quot;</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$line_of_text</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;&lt;/p&gt;&quot;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">print</span> <span style="color: #0000ff;">&quot;&lt;p&gt;&quot;</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$line_of_text</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">2</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;&lt;/p&gt;&quot;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #990000;">fclose</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$file_handle</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p><a href='http://www.pauldonnellydesigns.com/blog/wp-content/uploads/2011/07/Book2.csv'>&raquo; Sample CSV File</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.pauldonnellydesigns.com/blog/csv-to-html-using-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Magento &#8211; Get Cart Quantity Within A Session</title>
		<link>http://www.pauldonnellydesigns.com/blog/magento-get-cart-quantity-within-a-session/</link>
		<comments>http://www.pauldonnellydesigns.com/blog/magento-get-cart-quantity-within-a-session/#comments</comments>
		<pubDate>Fri, 24 Jun 2011 08:11:40 +0000</pubDate>
		<dc:creator>Paul Donnelly</dc:creator>
				<category><![CDATA[Magento E-commerce]]></category>
		<category><![CDATA[Magento Snippets]]></category>
		<category><![CDATA[Snippets]]></category>

		<guid isPermaLink="false">http://www.pauldonnellydesigns.com/blog/?p=606</guid>
		<description><![CDATA[
&#60;?php 
  function getCartQuantity &#40;&#41; &#123;
	  $cart = Mage::getModel&#40;'checkout/cart'&#41;-&#62;getQuote&#40;&#41;-&#62;getData&#40;&#41;;
	  if &#40;isset&#40;$cart&#91;'items_qty'&#93;&#41;&#41;
	 	return &#40;int&#41;$cart&#91;'items_qty'&#93;;
	  else
	  	return 0;
  &#125;
  echo getCartQuantity &#40;&#41;.' Item(s)'; 
?&#62;

]]></description>
			<content:encoded><![CDATA[
<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> 
  <span style="color: #000000; font-weight: bold;">function</span> getCartQuantity <span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	  <span style="color: #000088;">$cart</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;">'checkout/cart'</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;">getData</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	  <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">isset</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$cart</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'items_qty'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
	 	<span style="color: #b1b100;">return</span> <span style="color: #009900;">&#40;</span>int<span style="color: #009900;">&#41;</span><span style="color: #000088;">$cart</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'items_qty'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
	  <span style="color: #b1b100;">else</span>
	  	<span style="color: #b1b100;">return</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
  <span style="color: #b1b100;">echo</span> getCartQuantity <span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">' Item(s)'</span><span style="color: #339933;">;</span> 
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.pauldonnellydesigns.com/blog/magento-get-cart-quantity-within-a-session/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Magento &#8211; Show Firstname or Lastname Only In Welcome Message</title>
		<link>http://www.pauldonnellydesigns.com/blog/show-firstname-or-lastname-only-in-welcome-message/</link>
		<comments>http://www.pauldonnellydesigns.com/blog/show-firstname-or-lastname-only-in-welcome-message/#comments</comments>
		<pubDate>Thu, 23 Jun 2011 16:11:48 +0000</pubDate>
		<dc:creator>Paul Donnelly</dc:creator>
				<category><![CDATA[Magento E-commerce]]></category>
		<category><![CDATA[Magento Snippets]]></category>
		<category><![CDATA[Snippets]]></category>

		<guid isPermaLink="false">http://www.pauldonnellydesigns.com/blog/?p=599</guid>
		<description><![CDATA[If you would like to change the default welcome message in magento from &#8220;Welcome, Paul Donnelly&#8221; to &#8220;Hi Paul&#8221; or &#8220;Hello Mr Donnelly&#8221;, use the following snippets within
app\design\frontend\default\default\template\page\html\header.phtml 
Firstname

&#60;?php echo $this-&#62;__&#40;'Hi %s', Mage::getSingleton&#40;'customer/session'&#41;-&#62;getCustomer&#40;&#41;-&#62;getFirstname&#40;&#41;&#41;; ?&#62;

Lastname

&#60;?php echo $this-&#62;__&#40;'Hello Mr %s', Mage::getSingleton&#40;'customer/session'&#41;-&#62;getCustomer&#40;&#41;-&#62;getLastname&#40;&#41;&#41;; ?&#62;

]]></description>
			<content:encoded><![CDATA[<p>If you would like to change the default welcome message in magento from &#8220;Welcome, Paul Donnelly&#8221; to &#8220;Hi Paul&#8221; or &#8220;Hello Mr Donnelly&#8221;, use the following snippets within<br />
<em>app\design\frontend\default\default\template\page\html\header.phtml </em><span id="more-599"></span></p>
<p><strong>Firstname</strong></p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span>__<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Hi %s'</span><span style="color: #339933;">,</span> Mage<span style="color: #339933;">::</span><span style="color: #004000;">getSingleton</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'customer/session'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getCustomer</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getFirstname</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p><strong>Lastname</strong></p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span>__<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Hello Mr %s'</span><span style="color: #339933;">,</span> Mage<span style="color: #339933;">::</span><span style="color: #004000;">getSingleton</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'customer/session'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getCustomer</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getLastname</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.pauldonnellydesigns.com/blog/show-firstname-or-lastname-only-in-welcome-message/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Magento &#8211; Display Address Fields on Create an Account</title>
		<link>http://www.pauldonnellydesigns.com/blog/magento-display-address-fields-in-create-an-account/</link>
		<comments>http://www.pauldonnellydesigns.com/blog/magento-display-address-fields-in-create-an-account/#comments</comments>
		<pubDate>Thu, 23 Jun 2011 15:05:57 +0000</pubDate>
		<dc:creator>Paul Donnelly</dc:creator>
				<category><![CDATA[Magento E-commerce]]></category>
		<category><![CDATA[Magento Snippets]]></category>
		<category><![CDATA[Snippets]]></category>

		<guid isPermaLink="false">http://www.pauldonnellydesigns.com/blog/?p=591</guid>
		<description><![CDATA[By default Magento doesnt show the address fields within &#8220;Create an Account&#8221;. To make the sign up process more user friendly you can enable the address fields by adding the following:
Open app/design/frontend/default/default/template/customer/form/register.phtml
Around line 78
Before

&#60;?php if&#40;$this-&#62;getShowAddressFields&#40;&#41;&#41;: ?&#62;

Add

&#60;?php $this-&#62;setShowAddressFields&#40;true&#41;; ?&#62;

]]></description>
			<content:encoded><![CDATA[<p>By default Magento doesnt show the address fields within &#8220;Create an Account&#8221;. To make the sign up process more user friendly you can enable the address fields by adding the following:</p>
<p><strong>Open</strong> <em>app/design/frontend/default/default/template/customer/form/register.phtml</em></p>
<p>Around line 78<br />
Before</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getShowAddressFields</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">:</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p>Add</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">setShowAddressFields</span><span style="color: #009900;">&#40;</span><span style="color: #009900; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.pauldonnellydesigns.com/blog/magento-display-address-fields-in-create-an-account/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>

