<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>mandagreen.com</title>
	
	<link>http://mandagreen.com</link>
	<description>Refresh your vision</description>
	<lastBuildDate>Wed, 30 Nov 2011 15:22:56 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/mandagreen" /><feedburner:info uri="mandagreen" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>Prototype 1.6, Event.stop and IE9 – Quick patch</title>
		<link>http://feedproxy.google.com/~r/mandagreen/~3/qyyCBQlhWCc/</link>
		<comments>http://mandagreen.com/prototype-1-6-event-stop-ie9-quick-patch/#comments</comments>
		<pubDate>Wed, 30 Nov 2011 15:22:56 +0000</pubDate>
		<dc:creator>Cristi</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[js]]></category>
		<category><![CDATA[patch]]></category>
		<category><![CDATA[prototype]]></category>

		<guid isPermaLink="false">http://mandagreen.com/?p=290</guid>
		<description><![CDATA[For those of you using Prototype 1.6 (or Magento prior 1.6), you might wonder why event.stop() or Event.stop(event) doesn&#8217;t work in Internet Explorer 9. Here&#8217;s a quick explanation: IE 9 makes major changes to the event system. We had to rewrite the event code in 1.7 to support it. You can either (a) upgrade to [...]]]></description>
			<content:encoded><![CDATA[<p>For those of you using Prototype 1.6 (or Magento prior 1.6), you might wonder why event.stop() or Event.stop(event) doesn&#8217;t work in Internet Explorer 9. Here&#8217;s a quick explanation:</p>
<blockquote><p>IE 9 makes major changes to the event system. We had to rewrite the<br />
event code in 1.7 to support it. You can either (a) upgrade to 1.7;<br />
(b) force your site into compatibility mode [1]. </p></blockquote>
<p>So it&#8217;s been fixed in 1.7, but what if I can&#8217;t upgrade to 1.7 and don&#8217;t want to render my website in compatibility mode? Well, after a couple of hours trying to sort this out, here&#8217;s quick (and dirty) patch for Prototype 1.6.0.3. <a href="http://mandagreen.com/downloads/prototype.diff_.zip" title="Download - ">Download Prototype 1.6.0.3 Event.stop IE9 fix (448 bytes)</a></p>
<p>Also, for further reading, here are two external links that you might find useful for this issue.</p>
<ul>
<li><a href="https://prototype.lighthouseapp.com/projects/8886-prototype/tickets/1264">https://prototype.lighthouseapp.com/projects/8886-prototype/tickets/1264</a></li>
<li><a href="http://groups.google.com/group/prototype-scriptaculous/browse_thread/thread/475eddbc3decfd23/31af63a49ac77b8a">http://groups.google.com/group/prototype-scriptaculous/browse_thread/thread/475eddbc3decfd23/31af63a49ac77b8a</a></li>
</ul>
<p><strong>Note/Disclaimer: </strong> This has only been tested on Prototype 1.6.0.3. Use it at your own risk.</p>
<img src="http://feeds.feedburner.com/~r/mandagreen/~4/qyyCBQlhWCc" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://mandagreen.com/prototype-1-6-event-stop-ie9-quick-patch/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://mandagreen.com/prototype-1-6-event-stop-ie9-quick-patch/</feedburner:origLink></item>
		<item>
		<title>Strange Prototype Class.create behavior</title>
		<link>http://feedproxy.google.com/~r/mandagreen/~3/3a4qHOMIXjY/</link>
		<comments>http://mandagreen.com/strange-prototype-class-create-behavior/#comments</comments>
		<pubDate>Tue, 01 Nov 2011 15:59:39 +0000</pubDate>
		<dc:creator>Cristi</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[js]]></category>
		<category><![CDATA[prototype]]></category>

		<guid isPermaLink="false">http://mandagreen.com/?p=268</guid>
		<description><![CDATA[A few more months and it would&#8217;ve been a year since the last post. Worry not, this blog hasn&#8217;t died &#8211; and just to make sure I don&#8217;t forget what I want to write, I&#8217;ve already prepare a few articles. So stay tuned! But enough with the intro and let&#8217;s see what this article is [...]]]></description>
			<content:encoded><![CDATA[<p>A few more months and it would&#8217;ve been a year since the last post. Worry not, this blog hasn&#8217;t died &#8211; and just to make sure I don&#8217;t forget what I want to write, I&#8217;ve already prepare a few articles. So stay tuned!</p>
<p>But enough with the intro and let&#8217;s see what this article is about: Prototype (<a href="http://www.prototypejs.org/">http://www.prototypejs.org/</a>), not really my favorite javascript framework, but since Magento relies on it, I need to be able to use it and write proper code (I don&#8217;t believe in mixing frameworks either).</p>
<p>The scenario is rather simple &#8211; create a &#8220;class&#8221; called Stuff and then instantiate two objects of that class. </p>
<pre class="brush: jscript; title: ; notranslate">
var Stuff = Class.create({
	data: {},
	x: null,
	y: [],

	initialize: function() {}
});

var a = new Stuff();
var b = new Stuff();
</pre>
<p>So far so good, because the code does nothing, but let&#8217;s add the following:</p>
<pre class="brush: jscript; title: ; notranslate">
a.data.x = 1;
a.x = 5;
a.y.push(3);
</pre>
<p>What would you expect b to contain? From my (lack of) knowledge, I would say b.data is an empty object, b.x is null and b.y is an empty list/array. At least that&#8217;s how it goes in other programming languages, such as PHP. Well, this doesn&#8217;t happen here. If you do <code>console.log(b)</code> you&#8217;ll get:</p>
<pre class="brush: plain; title: ; notranslate">
data	Object { x=1}
x	null
y	[3]
</pre>
<p>In other words, object and array attributes have the same reference, or point to the same object. I would&#8217;ve said that the variables a and b are pointing to the same object, if a.x was the same as b.x, but b.x is still null, while a.x is 5. </p>
<p>Bug, feature or normal behavior, this can still be very annoying &#8211; I spent about an hour trying to figure out why two objects of the same &#8220;class&#8221; had the same settings when they were clearly configured differently. Hope this comes in handy at some point.</p>
<p>Tested on prototype v1.6.0.3 &#038; v1.6.1. </p>
<img src="http://feeds.feedburner.com/~r/mandagreen/~4/3a4qHOMIXjY" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://mandagreen.com/strange-prototype-class-create-behavior/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://mandagreen.com/strange-prototype-class-create-behavior/</feedburner:origLink></item>
		<item>
		<title>Patching the Magento USPS module</title>
		<link>http://feedproxy.google.com/~r/mandagreen/~3/1sp6uniAXXE/</link>
		<comments>http://mandagreen.com/patching-the-magento-usps-module/#comments</comments>
		<pubDate>Thu, 20 Jan 2011 10:30:52 +0000</pubDate>
		<dc:creator>Cristi</dc:creator>
				<category><![CDATA[Magento]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[patch]]></category>

		<guid isPermaLink="false">http://mandagreen.com/?p=253</guid>
		<description><![CDATA[Since their last update on Jan 3rd, 2011 USPS has stopped working on all of my Magento distro&#8217;s. The reason for that is a change in USPS&#8217; response XML values. Magento has its part of blame here, first for not patching it immediately (which again shows how much they care about the CE users) and [...]]]></description>
			<content:encoded><![CDATA[<p>Since their last update on Jan 3rd, 2011 USPS has stopped working on all of my Magento distro&#8217;s. The reason for that is a change in USPS&#8217; response XML values. Magento has its part of blame here, first for not patching it immediately (which again shows how much they care about the CE users) and second for not coding it properly in the first place &#8211; they&#8217;re using the method name (i.e. Express Mail) to see if that method is allowed from the admin, instead of using the CLASSID attribute. </p>
<p>This issue has been reported on magentocommerce.com <a href="http://www.magentocommerce.com/bug-tracking/issue?issue=10631">bug tracking system</a> and it&#8217;s also discussed in the <a href="http://www.magentocommerce.com/boards/viewthread/215963/">forum</a>. USPS makes it clear that they&#8217;ll discontinue all API versions prior RateV4 ad IntlRateV2:<br />
<em>&#8220;All Rate Calculator API integrators are encouraged to migrate to the latest API versions (RateV4, IntlRateV2):<br />
RateV4 and IntlRateV2 will be the only Rate Calculator API versions to offer the full range of new products and functionality<br />
Rate, RateV2, RateV3 and IntlRate will be retired in May 2011, requiring all integrators to migrate to the latest versions&#8221;</em></p>
<p>As explained on the forums, the fix is quite simple, as USPS only added the &amp;lt;sup&amp;gt;&amp;reg;&amp;lt;/sup&amp;gt; which is the encoded (twice <img src='http://mandagreen.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  ) version of the registered sign in a sup tag. Magento values are defined without those so when the code tries to match them it fails. All you have to do is clean that string and you&#8217;re good to go. I don&#8217;t like to modify core files so the fix involves copying <code>app/code/core/Mage/Usa/Model/Shipping/Carrier/Usps.php</code> to <code>app/code/local/Mage/Usa/Model/Shipping/Carrier/</code> and working on the local version of Usps.php. Strip the special chars:</p>
<pre class="brush: php; title: ; notranslate">
$mailService = str_replace('&amp;reg;', '', strip_tags(htmlspecialchars_decode(htmlspecialchars_decode((string)$postage-&gt;MailService))));
</pre>
<p>and </p>
<pre class="brush: php; title: ; notranslate">
$svcDescription = str_replace('&amp;reg;', '', strip_tags(htmlspecialchars_decode(htmlspecialchars_decode((string)$service-&gt;SvcDescription))));
</pre>
<p>&nbsp;</p>
<p>Here&#8217;s the archive with the patch. Just download it and unzip it in the root of your Magento distribution. <a href="http://mandagreen.com/downloads/usps-fix-mage1420.zip" title="Download - ">Download USPS patch for Magento 1.4.2.0 (8.59 kB)</a></p>
<p>&nbsp;</p>
<p><strong>Note:</strong> This patch applies to Magento CE 1.4.2.0. For all other versions you will have to do it manually as explained above.</p>
<p>&nbsp;</p>
<img src="http://feeds.feedburner.com/~r/mandagreen/~4/1sp6uniAXXE" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://mandagreen.com/patching-the-magento-usps-module/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		<feedburner:origLink>http://mandagreen.com/patching-the-magento-usps-module/</feedburner:origLink></item>
		<item>
		<title>Anatomy of a Magento extension</title>
		<link>http://feedproxy.google.com/~r/mandagreen/~3/1EoifWh5hMM/</link>
		<comments>http://mandagreen.com/anatomy-of-a-magento-extension/#comments</comments>
		<pubDate>Wed, 05 Jan 2011 12:35:54 +0000</pubDate>
		<dc:creator>Cristi</dc:creator>
				<category><![CDATA[Magento]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://mandagreen.com/?p=229</guid>
		<description><![CDATA[Magento Commerce has been on the OSS &#8220;market&#8221; for a while now and I see more and more developers, designers and of course store owners migrating their ecommerce sites to Magento or installing it for their new stores. I&#8217;ve been coding on Magento since its beta 0.6 version, actually my first integration was based on [...]]]></description>
			<content:encoded><![CDATA[<p>Magento Commerce has been on the OSS &#8220;market&#8221; for a while now and I see more and more developers, designers and of course store owners migrating their ecommerce sites to Magento or installing it for their new stores. I&#8217;ve been coding on Magento since its beta 0.6 version, actually my first integration was based on this beta. I&#8217;ve been advised not to use the beta and they were right. However, I had my reasons for recommending it, using it and somehow advocating for that fresh, promising open source piece of software. In the meanwhile, it turned out I was right &#8211; it&#8217;s one of the most complete, scalable &#038; feature-rich free ecommerce solution. Not the easiest to integrate or use, not the smoothest or lightweight, but it&#8217;s come a long way and it still have room for improvements. </p>
<p>One of the things I liked from the start (as a developer) was the ability to extend it in a very simple and loosely coupled way (unlike other solutions). Adding the OOP and design patterns made it perfect for my way of thinking. And I think this is the way to go for any major application, even if it might seem cluttered or with a steep learning curve at a first glance. I remember one of the first problems I faced was module creation &#8211; I was adding all my code in the core/Mage folder, I was overwriting a lot of the core code although I knew it was bad and so on. However, once I understood how to create a module, things became clearer and much simpler. So here&#8217;s a beginner&#8217;s guide to creating a new module. Although it&#8217;s meant for beginners, you should know the basic folder layout (skins, library, js, apps).<br />
<Br /></p>
<p>All Magento code resides in <code>app/code</code> and the <code>lib</code> folder. If you check <code>app/code</code> you&#8217;ll notice three subfolders: <code>community</code>, <code>core</code>, <code>local</code>. You should be adding your stuff in local or community (usually only when it is a community contribution). So let&#8217;s create our first module. I&#8217;ll use the namespace mandagreen and the module will be called HelloWorld. For this I need to create the following folders under <code>app/code/local</code>:<br />
<strong>Mandagreen/HelloWorld</strong></p>
<p>To keep things simple, in this example we&#8217;ll be creating one Block, one Helper and one Model &#8211; no controllers &#038; no Resource Models. Here&#8217;s where each of these will reside:<br />
blocks &#8211; <code>app/code/local/Mandagreen/HelloWorld/Block</code><br />
helpers &#8211; <code>app/code/local/Mandagreen/HelloWorld/Helper</code><br />
models &#8211; <code>app/code/local/Mandagreen/HelloWorld/Model</code></p>
<p>Create these three folders and then also create a new <code>etc</code> folder. The structure will then look like this:</p>
<pre class="brush: plain; title: ; notranslate">
    app/code/local/Mandagreen/HelloWorld/Block
    app/code/local/Mandagreen/HelloWorld/etc
    app/code/local/Mandagreen/HelloWorld/Helper
    app/code/local/Mandagreen/HelloWorld/Model
</pre>
<p>The <code>etc</code> folder holds configuration information &#8211; in this case we&#8217;ll focus only on the module configuration file, which is <code>config.xml</code>. Let&#8217;s create it and start adding some xml into it:</p>
<pre class="brush: xml; title: ; notranslate">
&lt;?xml version=&quot;1.0&quot;?&gt;
&lt;config&gt;
	&lt;modules&gt;
		&lt;Mandagreen_HelloWorld&gt;
			&lt;version&gt;0.0.1&lt;/version&gt;
		&lt;/Mandagreen_HelloWorld&gt;
	&lt;/modules&gt;

	&lt;global&gt;
		&lt;models&gt;
			&lt;helloworld&gt;
				&lt;class&gt;Mandagreen_HelloWorld_Model&lt;/class&gt;
			&lt;/helloworld&gt;
		&lt;/models&gt;

		&lt;blocks&gt;
			&lt;helloworld&gt;
				&lt;class&gt;Mandagreen_HelloWorld_Block&lt;/class&gt;
			&lt;/helloworld&gt;
		&lt;/blocks&gt;

		&lt;helpers&gt;
			&lt;helloworld&gt;
				&lt;class&gt;Mandagreen_HelloWorld_Helper&lt;/class&gt;
			&lt;/helloworld&gt;
		&lt;/helpers&gt;
	&lt;/global&gt;

	&lt;frontend&gt;
		&lt;layout&gt;
			&lt;updates&gt;
				&lt;helloworld&gt;
					&lt;file&gt;mg_helloworld.xml&lt;/file&gt;
				&lt;/helloworld&gt;
			&lt;/updates&gt;
		&lt;/layout&gt;

		&lt;translate&gt;
			&lt;modules&gt;
				&lt;Mandagreen_HelloWorld&gt;
					&lt;files&gt;
						&lt;default&gt;Mandagreen_HelloWorld.csv&lt;/default&gt;
					&lt;/files&gt;
				&lt;/Mandagreen_HelloWorld&gt;
			&lt;/modules&gt;
		&lt;/translate&gt;
	&lt;/frontend&gt;
&lt;/config&gt;
</pre>
<p>That&#8217;s a lot, isn&#8217;t it? <img src='http://mandagreen.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  No worries, I&#8217;ll explain. Under the main node (<code>config</code>), youll usually need the global node. The <code>modules</code> node is being used to hold mode info about the current module, maybe dependencies and so on. The <code>frontend</code> node is usually used for defining layout handlers and translation files, but they can do more than that. In this example, we&#8217;re gonna have our own layout file called mg_helloworld.xml &#8211; you can use any name on it (as long as it&#8217;s unique), but I prefer to namespace it as well. Also, I&#8217;ve defined a translation file <code>Mandagreen_HelloWorld.csv</code> which needs to be created in <code>app/locale/en_US</code> (or whatever your default locale is). </p>
<p>The <code>global</code> node defines all the classes you&#8217;ll be using, in this case helpers, models and blocks. You can see that they are defined the same way, but in different locations: &lt;helpers /&gt;, &lt;models /&gt; and &lt;blocks /&gt;. Let&#8217;s use the helpers node as an example.</p>
<pre class="brush: xml; title: ; notranslate">
		&lt;helpers&gt;
			&lt;helloworld&gt;
				&lt;class&gt;Mandagreen_HelloWorld_Helper&lt;/class&gt;
			&lt;/helloworld&gt;
		&lt;/helpers&gt;
</pre>
<p>The <code>helloworld</code> node defines a handle and you should be careful to always use unique names. If you&#8217;re not sure if a certain name exist, namespace it (mghelloworld for example). This handle will be used to instantiate models, call helpers or use blocks using the Magento factory. For example, for models, you&#8217;ll be using <code>Mage::getModel('helloworld/modelname');</code> instead of <code>new Mandagreen_HelloWorld_Model_Modelname();</code>. Same with helpers, inside a block template &#8211; <code>$this->helper('helloworld')->someMethod();</code>.<br />
The other node, <code>class</code> is being used to define the namespace of the class name. In the example above, the name of the Modelname class has to being with <code>Mandagreen_HelloWorld_Helper</code>. A few examples might help:</p>
<ul>
<li><code>Mandagreen_HelloWorld_Model_Salute</code>, will be found in <code>Mandagreen/HelloWorld/Model/Salute.php</code> and can be accessed via <code>Mage::getModel('helloworld/salute')</code></li>
<li><code>Mandagreen_HelloWorld_Model_Salute_Hi</code>, will be found in <code>Mandagreen/HelloWorld/Model/Salute/Hi.php</code> and can be accessed via <code>Mage::getModel('helloworld/salute_hi')</code></li>
<li><code>Mandagreen_HelloWorld_Helper_Help</code>, will be found in <code>Mandagreen/HelloWorld/Model/Help.php</code> and can be accessed via <code>Mage::helper('helloworld/help')</code></li>
</ul>
<p>Now that we explained the config file, let&#8217;s move on to actually creating the <strong>classes </strong>and code. I&#8217;ll use the example above and create the following files:</p>
<p><strong>Mandagreen/HelloWorld/Block/Standard.php</strong></p>
<pre class="brush: php; title: ; notranslate">
&lt;?php

class Mandagreen_HelloWorld_Block_Standard extends Mage_Core_Block_Template {
    function getSomething() {
          return Mage::getModel('helloworld/salute')-&gt;getName();
    }
}
</pre>
<p><strong>Mandagreen/HelloWorld/Helper/Help.php</strong></p>
<pre class="brush: php; title: ; notranslate">
&lt;?php

class Mandagreen_HelloWorld_Helper_Help extends Mage_Core_Helper_Abstract {
    function shouldSayHi() {
          return true;
    }
}
</pre>
<p><strong>Mandagreen/HelloWorld/Model/Salute.php</strong></p>
<pre class="brush: php; title: ; notranslate">
&lt;?php

class Mandagreen_HelloWorld_Model_Salute extends Mage_Core_Model_Abstract { //or Varien_Object or none
    function getName() {
          //do some heavy logic here
          return 'John';
    }
}
</pre>
<p>One more file is required for the translations to work with this module &#8211; a &#8220;default&#8221; Data helper, defined in <strong>Mandagreen/HelloWorld/Helper/Data.php</strong> like this:</p>
<pre class="brush: php; title: ; notranslate">
class Mandagreen_HelloWorld_Helper_Data extends Mage_Core_Helper_Abstract {}
</pre>
<p>We have the classes but we also need to use them in a template, so let&#8217;s create <code>standard.phtml</code> in <code>app/design/frontend/default/default/template/helloworld</code> (create all additional folders if needed). Also, create <code>mg_helloworld.xml</code> under <code>app/design/frontend/default/default/layout</code>.</p>
<p>For the template, things are very easy:</p>
<pre class="brush: php; title: ; notranslate">
&lt;div style=&quot;background: red; padding: 20px;&quot;&gt;
	&lt;?php if( $this-&gt;helper('helloworld/help')-&gt;shouldSayHi() ): ?&gt;
	Hello &lt;?php echo $this-&gt;getSomething(); ?&gt;
	&lt;?php else: ?&gt;
	Can't say anything...
	&lt;?php endif; ?&gt;
&lt;/div&gt;
</pre>
<p>while for the layout we&#8217;ll use this approach:</p>
<pre class="brush: xml; title: ; notranslate">
&lt;?xml version=&quot;1.0&quot;?&gt;
&lt;layout version=&quot;0.1.0&quot;&gt;
    &lt;default&gt;
        &lt;reference name=&quot;content&quot;&gt;
            &lt;block type=&quot;helloworld/standard&quot; name=&quot;helloworld&quot; template=&quot;helloworld/standard.phtml&quot; after=&quot;-&quot; /&gt;
        &lt;/reference&gt;
    &lt;/default&gt;
&lt;/layout&gt;
</pre>
<p>This should display &#8220;Hello John&#8221; at the end of the content area on most of the pages, including the homepage. But wait, before you try that you&#8217;ll have to enable the module in <code>app/etc/modules</code>. Create a file called <code>Mandagreen_HelloWorld.xml</code> with the following code:</p>
<pre class="brush: xml; title: ; notranslate">
&lt;?xml version=&quot;1.0&quot;?&gt;
&lt;config&gt;
    &lt;modules&gt;
        &lt;Mandagreen_HelloWorld&gt;
            &lt;active&gt;true&lt;/active&gt;
            &lt;codePool&gt;local&lt;/codePool&gt;
        &lt;/Mandagreen_HelloWorld&gt;
    &lt;/modules&gt;
&lt;/config&gt;
</pre>
<p>Clear all magento cache and refresh the page &#8211; your first module, up and running! And here&#8217;s the archive for this tutorial &#8211; <a href="http://mandagreen.com/downloads/helloworld.zip" title="Download - ">Download Hello World Magento Module (2.99 kB)</a></p>
<p>Further/recommended reads:</p>
<ul>
<li><a href="http://www.php.net/manual/en/language.namespaces.rationale.php">Namespaces Rationale</a></li>
<li><a href="http://www.magentocommerce.com/wiki/5_-_modules_and_development/0_-_module_development_in_magento/custom_module_with_custom_database_table">Custom Module with Custom Database Table</a></li>
<li><a href="http://unirgy.com/wiki/uscaffold">uScaffold extension by Unirgy</a></li>
</ul>
<img src="http://feeds.feedburner.com/~r/mandagreen/~4/1EoifWh5hMM" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://mandagreen.com/anatomy-of-a-magento-extension/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		<feedburner:origLink>http://mandagreen.com/anatomy-of-a-magento-extension/</feedburner:origLink></item>
		<item>
		<title>Adding Customer Comments as Order Status Comments using Magento &amp; OneStepCheckout</title>
		<link>http://feedproxy.google.com/~r/mandagreen/~3/R3_-5HMWByU/</link>
		<comments>http://mandagreen.com/customer-comments-as-order-status-comments-magento-onestepcheckout/#comments</comments>
		<pubDate>Sun, 24 Oct 2010 10:08:13 +0000</pubDate>
		<dc:creator>Cristi</dc:creator>
				<category><![CDATA[Magento]]></category>
		<category><![CDATA[onestepcheckout]]></category>

		<guid isPermaLink="false">http://mandagreen.com/?p=218</guid>
		<description><![CDATA[A few days ago I got an email from someone asking me about adding the default customer comments in OneStepCheckout (<a href="http://www.onestepcheckout.com/">www.onestepcheckout.com</a>) as regular order comments. I thought I'd share this quick &#038; simple hack with everyone, so here's what you have to d]]></description>
			<content:encoded><![CDATA[<p>A few days ago I got an email from someone asking me about adding the default customer comments in OneStepCheckout (<a href="http://www.onestepcheckout.com/">www.onestepcheckout.com</a>) as regular order comments. I thought I&#8217;d share this quick &#038; simple hack with everyone, so here&#8217;s what you have to do:<br />
Open app/code/local/Idev/OneStepCheckout/Helper/Data.php, and after </p>
<pre class="brush: php; title: ; notranslate">$observer-&gt;getEvent()-&gt;getOrder()-&gt;setOnestepcheckoutCustomercomment($orderComment);</pre>
<p>add this line:<br />
<del>$observer->getEvent()->getOrder()->setState( Mage_Sales_Model_Order::STATE_NEW, true, $orderComment, false );</del></p>
<pre class="brush: php; title: ; notranslate">$observer-&gt;getEvent()-&gt;getOrder()-&gt;setState(
    $observer-&gt;getEvent()-&gt;getOrder()-&gt;getStatus(),
    true,
    $orderComment,
    false
);</pre>
<p>This will add the comments on the regular comments/statuses thread, as well as a customer comment. If you want to disable customer comments, just comment the original code. </p>
<p>Actually, this approach should also work with the out-of-the-box Magento one step checkout. Add an input on the last step, create a listener for
<pre class="brush: plain; title: ; notranslate">checkout_type_onepage_save_order</pre>
<p> and use the same piece of code:</p>
<pre class="brush: php; title: ; notranslate">$observer-&gt;getEvent()-&gt;getOrder()-&gt;setState( $observer-&gt;getEvent()-&gt;getOrder()-&gt;getStatus(), true, $this-&gt;_getRequest()-&gt;getPost('order_comments'), false );</pre>
<p><ins><strong>Note: </strong>Tested on Magento 1.4.1.0 &#038; 1.4.1.1</ins></p>
<img src="http://feeds.feedburner.com/~r/mandagreen/~4/R3_-5HMWByU" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://mandagreen.com/customer-comments-as-order-status-comments-magento-onestepcheckout/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		<feedburner:origLink>http://mandagreen.com/customer-comments-as-order-status-comments-magento-onestepcheckout/</feedburner:origLink></item>
		<item>
		<title>Introducing Magento CSS &amp; JS Minifier</title>
		<link>http://feedproxy.google.com/~r/mandagreen/~3/vjkiIG0abDg/</link>
		<comments>http://mandagreen.com/introducing-magento-css-js-minifier/#comments</comments>
		<pubDate>Wed, 15 Sep 2010 11:24:28 +0000</pubDate>
		<dc:creator>Cristi</dc:creator>
				<category><![CDATA[Magento]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[js]]></category>
		<category><![CDATA[performance]]></category>

		<guid isPermaLink="false">http://mandagreen.com/?p=196</guid>
		<description><![CDATA[As the title says, I&#8217;m glad to announce my first public Magento extension (not yet added in the Connect repository). During my 3 years experience with Magento, I&#8217;ve worked on a lot of custom extensions, improvements &#38; fixes, but most of them were client-specific, plus they weren&#8217;t designed to have a backend interface (with a [...]]]></description>
			<content:encoded><![CDATA[<p>As the title says, I&#8217;m glad to announce my first public Magento extension (not yet added in the Connect repository). During my 3 years experience with Magento, I&#8217;ve worked on a lot of custom extensions, improvements &amp; fixes, but most of them were client-specific, plus they weren&#8217;t designed to have a backend interface (with a few exceptions). This one, however, is entirely configurable from the Admin and it&#8217;s both simple and effective.</p>
<p>&nbsp;</p>
<h2>What it does</h2>
<p>This quick optimizer parses all javascript &amp; css files included on a page and removes all unnecessary characters. The most simple step is to remove spaces, tabs and new lines &#8211; but there&#8217;s more than just that. Of course, for small files compression is insignificant, but when you work with almost 600KB and around 30 requests, you can save a lot. Here&#8217;s a quick math on one of my Magento installs:<br />
<a class="thickbox" href="http://mandagreen.com/download/minifier.png"><img class="alignright size-thumbnail wp-image-199" style="border: 1px solid #d0d0d0; margin-top: 5px;" title="minifier" src="http://mandagreen.com/download/minifier-150x150.png" alt="" width="150" height="150" /></a></p>
<p><strong>Javascript</strong> &#8211; 26 requests, 479 KB<br />
<strong>CSS</strong> &#8211; 4 requests, 102 KB</p>
<p><strong>With Magento&#8217;s default merging enabled:</strong><br />
<strong>Javascript</strong> &#8211; 1 request, 360 KB (not sure why this is smaller then the 26 summed up, but nvm)<br />
<strong>CSS</strong> &#8211; 1 request, 108.2 KB (same for this one too, but again, nvm)</p>
<p>We&#8217;ve already saved 28 requests, which means less overhead &#8211; quicker download times for user, less stress on the server.</p>
<p><strong>With the Minifier enabled:</strong><br />
<strong>Javascript</strong> is 255 KB, which means almost 47% compression<br />
<strong>CSS</strong> is 92 KB, which means almost 10% compression</p>
<p>&nbsp;</p>
<h2>Advantages</h2>
<ul>
<li>Faster loading times</li>
<li>Less stress on the server and on bandwith</li>
<li>Improving <a href="http://code.google.com/speed/page-speed/" target="_blank">PageSpeed</a> score with 4-8 points</li>
<li>Checking 4 to-do&#8217;s from the <a href="http://code.google.com/speed/page-speed/docs/rules_intro.html" target="_blank">Web Performance Best Practices Guide</a></li>
</ul>
<p>&nbsp;</p>
<h2>Disatvantages</h2>
<ul>
<li>Need to write javascripts very careful, adding a semicolon after almost everything</li>
<li>Have to rewrite of Mage_Core_Model file</li>
<li>Have to override two Magento methods</li>
<li>Additional processing time (insignificant in my opinion)</li>
</ul>
<p>&nbsp;</p>
<h2>Credits</h2>
<p>This plugin wouldn&#8217;t exist if it weren&#8217;t for these two outstanding PHP projects:<br />
Joe Scylla&#8217;s <a href="http://code.google.com/p/cssmin/" target="_blank">CssMin</a><br />
Ryan Grove&#8217;s <a href="http://wonko.com/post/a_faster_jsmin_library_for_php" target="_blank">JsMin</a><br />
Big thanks to both of them.</p>
<p>&nbsp;</p>
<h2>Download &amp; Install</h2>
<p><a class="thickbox" href="http://mandagreen.com/download/minifier-screenshot.png"><img class="alignright size-thumbnail wp-image-206" style="border: 1px solid #d0d0d0; margin-top: 5px;" title="minifier-screenshot" src="http://mandagreen.com/download/minifier-screenshot-150x150.png" alt="" width="150" height="150" /></a><br />
First, <a href="http://mandagreen.com/downloads/oxygen_minifier.zip" title="Download - Magento Minifier takes the merged javascript and css files and minifies them, removing white spaces, new lines and other chars, resulting in a smaller file. Compression is usually around 20% for javascripts and 15-25% for css.">Download Minifier for Magento (10.54 kB)</a>, then unzip it and copy the app/ folder to your Magento root folder.</p>
<p>Logout from the admin if you&#8217;re already logged in, then login. Go to Cache Management, click on the &#8220;Fulsh cache storage&#8221; button, then go to Configuration &gt; Developer and enable all the options, as shown in the attached screenshot. Go back to Cache Management and this time click on the &#8220;Flush Javascript/CSS cache&#8221;.</p>
<p>Go to your store frontend and behold, you&#8217;re now using compressed js&#8217;s and css&#8217;s.</p>
<p>Works on Magento 1.4+</p>
<p style="clear: both;">
<img src="http://feeds.feedburner.com/~r/mandagreen/~4/vjkiIG0abDg" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://mandagreen.com/introducing-magento-css-js-minifier/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		<feedburner:origLink>http://mandagreen.com/introducing-magento-css-js-minifier/</feedburner:origLink></item>
		<item>
		<title>How to export customers from orders between certain dates in Magento</title>
		<link>http://feedproxy.google.com/~r/mandagreen/~3/sAsWrCdXIKo/</link>
		<comments>http://mandagreen.com/how-to-export-customers-from-orders-between-certain-dates-in-magento/#comments</comments>
		<pubDate>Mon, 23 Aug 2010 21:54:28 +0000</pubDate>
		<dc:creator>Cristi</dc:creator>
				<category><![CDATA[Magento]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[sql]]></category>

		<guid isPermaLink="false">http://mandagreen.com/?p=189</guid>
		<description><![CDATA[Last week a client who runs his store on Magento Commerce asked me how he could export a list of customers who purchased between certain dates in August. Of course, I first went to the Administration area and tried several approaches (order reports, customer reports, data export). Unfortunately nothing worked, so I had to write [...]]]></description>
			<content:encoded><![CDATA[<p>Last week a client who runs his store on Magento Commerce asked me how he could export a list of customers who purchased between certain dates in August. Of course, I first went to the Administration area and tried several approaches (order reports, customer reports, data export). Unfortunately nothing worked, so I had to write a script or a plain SQL and run it from the CLI. I preferred a straight query, rather than a script, and I tried not to use sub-selects. Here&#8217;s the adapted part, where I&#8217;ve added some variables to keep all the attribute id&#8217;s:</p>
<pre class="brush: sql; title: ; notranslate">
SET @etID := (SELECT entity_type_id FROM eav_entity_type WHERE entity_type_code = 'order_address');
SET @atFn := (SELECT attribute_id FROM eav_attribute WHERE attribute_code = 'firstname' AND entity_type_id = @etID);
SET @atLn := (SELECT attribute_id FROM eav_attribute WHERE attribute_code = 'lastname' AND entity_type_id = @etID);
SET @atEmail := (SELECT attribute_id FROM eav_attribute WHERE attribute_code = 'customer_email');

SET @startDate := '2010-08-06 00:00:00';
SET @endDate := '2010-08-13 23:59:59';

SELECT o.increment_id, e.value as email, ln.value as lastname, fn.value as firstname
FROM sales_order o
INNER JOIN sales_order_varchar e ON e.entity_id = o.entity_id AND attribute_id = @atEmail
INNER JOIN sales_order_entity lne ON lne.parent_id = o.entity_id AND lne.entity_type_id = @etID
INNER JOIN sales_order_entity_varchar ln ON ln.entity_id = lne.entity_id AND ln.attribute_id = @atLn
INNER JOIN sales_order_entity_varchar fn ON fn.entity_id = lne.entity_id AND fn.attribute_id = @atFn
WHERE o.created_at BETWEEN @startDate AND @endDate
GROUP BY o.increment_id
ORDER BY o.increment_id DESC;
</pre>
<p>The only problem is when the Shipping Name is different than the Billing Name &#8211; there&#8217;s no control over that, as we&#8217;re grouping by increment_id. This could easily be fixed in a PHP script, but the approach there should be different (using collections). </p>
<p>Hope this helps anyone, as it did the trick for me.</p>
<p><em>Solution tested under Magento 1.4.0.1</em></p>
<img src="http://feeds.feedburner.com/~r/mandagreen/~4/sAsWrCdXIKo" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://mandagreen.com/how-to-export-customers-from-orders-between-certain-dates-in-magento/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://mandagreen.com/how-to-export-customers-from-orders-between-certain-dates-in-magento/</feedburner:origLink></item>
		<item>
		<title>Fixing “Catalog Price Rules” cart issue in Magento 1.4.1.0</title>
		<link>http://feedproxy.google.com/~r/mandagreen/~3/Z7AacFv4BOc/</link>
		<comments>http://mandagreen.com/fixing-catalog-price-rules-cart-issue-in-magento-1-4-1-0/#comments</comments>
		<pubDate>Tue, 29 Jun 2010 10:28:00 +0000</pubDate>
		<dc:creator>Cristi</dc:creator>
				<category><![CDATA[Magento]]></category>

		<guid isPermaLink="false">http://mandagreen.com/?p=185</guid>
		<description><![CDATA[After recently upgrading one of my stores running Magento Commerce I found out the the latest version (at this time 1.4.1.0) had a major bug. Don&#8217;t want to sound too harsh, but unfortunately Magento&#8217;s support was again awful &#8211; there have been one thread on the forum and one issue in their bug tracking system [...]]]></description>
			<content:encoded><![CDATA[<p>After recently upgrading one of my stores running Magento Commerce I found out the the latest version (at this time 1.4.1.0) had a major bug. Don&#8217;t want to sound too harsh, but unfortunately Magento&#8217;s support was again awful &#8211; there have been one <a href="http://www.magentocommerce.com/boards/viewthread/173429/">thread on the forum</a> and one <a href="http://www.magentocommerce.com/bug-tracking/issue/?issue=9382">issue in their bug tracking system</a> for a while now (almost two weeks if not more) and still no update, although as I said the bug has quite an impact &#8211; even tweet&#8217;ed the problem to <a href="http://twitter.com/magento">@magento</a> and haven&#8217;t gotten any reply (again it&#8217;s not the first time). Yes, the product is free, yes it&#8217;s open source, but I think a bit of transparency and better communication could come to their advantage.</p>
<h2>Bug details/behavior</h2>
<p>So, updated from 1.4.0.1 to 1.4.1.0, everything looks fine, catalog price rules are being applied in the catalog (categories and product pages), but when adding the product to the cart the quote item price was the regular price not the special one. </p>
<h2>Solution/Fix</h2>
<p>After a few hours playing with the rules, observer and other core elements I found the problem. A big &#8220;thank you&#8221; goes to &#8220;myself&#8221; who posted the second comment for the issue mentioned above. The problem was within the CatalogRule Observer, when fetching the ID of the Customer Group. Here&#8217;s how to fix it:</p>
<p>1 &#8211; create the following folders in your Magento distro: <code>app/code/local/Mage/CatalogRule/Model</code><br />
2 &#8211; copy <code>app/code/core/Mage/CatalogRule/Model/Observer.php</code> to <code>app/code/local/Mage/CatalogRule/Model</code><br />
3 &#8211; open the new/copied file and go to line 105. Change this code:</p>
<pre class="brush: php; title: ; notranslate">
        if ($observer-&gt;hasCustomerGroupId()) {
            $gId = $observer-&gt;getEvent()-&gt;getCustomerGroupId();
        } elseif ($product-&gt;hasCustomerGroupId()) {
            $gId = $product-&gt;hasCustomerGroupId();
        } else {
            $gId = Mage::getSingleton('customer/session')-&gt;getCustomerGroupId();
        }
</pre>
<p>to:</p>
<pre class="brush: php; title: ; notranslate">
        if ($observer-&gt;hasCustomerGroupId()) {
            $gId = $observer-&gt;getEvent()-&gt;getCustomerGroupId();
        } elseif ($product-&gt;hasCustomerGroupId()) {
            $gId = $product-&gt;getCustomerGroupId();
        } else {
            $gId = Mage::getSingleton('customer/session')-&gt;getCustomerGroupId();
        }
</pre>
<p>To be more precise, you have to change hasCustomerGroupId to getCustomerGroupId on line 105.</p>
<p>You can now enjoy your store again!</p>
<img src="http://feeds.feedburner.com/~r/mandagreen/~4/Z7AacFv4BOc" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://mandagreen.com/fixing-catalog-price-rules-cart-issue-in-magento-1-4-1-0/feed/</wfw:commentRss>
		<slash:comments>80</slash:comments>
		<feedburner:origLink>http://mandagreen.com/fixing-catalog-price-rules-cart-issue-in-magento-1-4-1-0/</feedburner:origLink></item>
		<item>
		<title>Adding Customer Comments on Invoice PDFs in Magento (using OneStepCheckout)</title>
		<link>http://feedproxy.google.com/~r/mandagreen/~3/k4CWp3Hx1Cc/</link>
		<comments>http://mandagreen.com/adding-customer-comments-invoice-pdf-magento/#comments</comments>
		<pubDate>Mon, 18 Jan 2010 15:35:54 +0000</pubDate>
		<dc:creator>Cristi</dc:creator>
				<category><![CDATA[Magento]]></category>
		<category><![CDATA[onestepcheckout]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://mandagreen.com/?p=123</guid>
		<description><![CDATA[I&#8217;ve recently installed OneStepCheckout (http://www.onestepcheckout.com/) on a couple of Magento installations. The extension is very nice, really simple to integrate and I expect to see better conversion rates on the checkout process. One cool thing is that it comes with the option of activating Customer Order Comments &#8211; it adds a textarea field on the [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve recently installed OneStepCheckout (<a href="http://www.onestepcheckout.com/">http://www.onestepcheckout.com/</a>) on a couple of  Magento installations. The extension is very nice, really simple to integrate and I expect to see better conversion rates on the checkout process. </p>
<p>One cool thing is that it comes with the option of activating Customer Order Comments &#8211; it adds a textarea field on the checkout page, and a box with the customer comments in the admin, when viewing the order.</p>
<p>However, one of my clients requested I added these comments in the invoice PDF&#8217;s. So, here&#8217;s how to do it:</p>
<p><strong>Step 1</strong><br />
Copy <code>app/code/core/Mage/Sales/Model/Order/Pdf/Invoice.php</code> to <code>app/code/local/Mage/Sales/Model/Order/Pdf/Invoice.php</code></p>
<p><strong>Step 2</strong><br />
Open the new file and create a new method:</p>
<pre class="brush: php; title: ; notranslate">
	function insertOscComments(&amp;$page, $order) {
		if( !$order-&gt;getOnestepcheckoutCustomercomment() ) { return; }
		$this-&gt;y -= 20;
		$page-&gt;setFillColor(new Zend_Pdf_Color_Rgb(0.93, 0.92, 0.92));
		$page-&gt;setLineColor(new Zend_Pdf_Color_GrayScale(0.5));
		$page-&gt;setLineWidth(0.5);
		$page-&gt;drawRectangle(25, $this-&gt;y, 570, $this-&gt;y - 20);
		$page-&gt;setFillColor(new Zend_Pdf_Color_Rgb(1, 1, 1));
		$page-&gt;drawRectangle(25, $this-&gt;y - 20, 570, $this-&gt;y - 40);

		$page-&gt;setFillColor(new Zend_Pdf_Color_RGB(0.1, 0.1, 0.1));
		$page-&gt;drawText(Mage::helper('onestepcheckout')-&gt;__('Customer Comments'), 35, $this-&gt;y - 13, 'UTF-8');
		$page-&gt;drawText($order-&gt;getOnestepcheckoutCustomercomment(), 33, $this-&gt;y - 33, 'UTF-8');
		$this-&gt;y -= 50;
	}
</pre>
<p><strong>Step 3</strong><br />
At the end of method <code>getPdf</code> add a call to the new method you created:</p>
<pre class="brush: php; title: ; notranslate">
  /* Add totals */
  $this-&gt;insertTotals($page, $invoice);

  /* Add OneStepCheckout Customer Comments */
  $this-&gt;insertOscComments($page, $order);
}
</pre>
<p>And that&#8217;s all you need.</p>
<img src="http://feeds.feedburner.com/~r/mandagreen/~4/k4CWp3Hx1Cc" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://mandagreen.com/adding-customer-comments-invoice-pdf-magento/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		<feedburner:origLink>http://mandagreen.com/adding-customer-comments-invoice-pdf-magento/</feedburner:origLink></item>
		<item>
		<title>Fixing PNG CSS backgrounds on IE6</title>
		<link>http://feedproxy.google.com/~r/mandagreen/~3/eAxA4UsekFc/</link>
		<comments>http://mandagreen.com/fixing-png-css-backgrounds-on-ie6/#comments</comments>
		<pubDate>Thu, 17 Dec 2009 11:22:28 +0000</pubDate>
		<dc:creator>Cristi</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[ie6]]></category>
		<category><![CDATA[png]]></category>
		<category><![CDATA[sprites]]></category>

		<guid isPermaLink="false">http://mandagreen.com/?p=110</guid>
		<description><![CDATA[Today I was stuck (again) on a really annoying IE6 glitch. In the photo, screenshot #1 is the correct display in IE6 after the fix (and all other &#8220;sane&#8221; browsers before the fix), while screenshot #2 shows the glitch. Basically, IE6 decided to replicate the beginning of the same image on all items. You might [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://mandagreen.com/download/ie6-png-problems.jpg" class="thickbox"><img class="alignright size-full wp-image-111" title="IE6 PNG CSS background problems" src="http://mandagreen.com/download/ie6-png-problems.jpg" alt="ie6-png-problems" width="300" /></a><br />
Today I was stuck (again) on a really annoying IE6 glitch. In the photo, screenshot #1 is the correct display in IE6 after the fix (and all other &#8220;sane&#8221; browsers before the fix), while screenshot #2 shows the glitch. Basically, IE6 decided to replicate the beginning of the same image on all items.</p>
<p>You might think the problem was in my HTML code, or maybe in my CSS code. The HTML is 100% valid and following all modern guidelines: only a&#8217;s, li&#8217;s, div&#8217;s and text nodes. So, the problem could be in the CSS file &#8211; which applied a single sprite sheet on all the li&#8217;s, div&#8217;s and a&#8217;s, through <code>background-position</code>. In case you&#8217;re wondering what css sprites are, have a quick look: <a href="http://www.google.com/search?q=css+sprites&#038;hl=en" target="_blank">http://www.google.com/search?q=css+sprites&#038;hl=en</a></p>
<p>So, after adding <code>zoom</code>, <code>z-index</code>, removing <code>position: relative;</code>, removing overriding classes, changing all <code>background</code> declarations to <code>background-image, background-repeat, background-position</code> declarations, the problem persisted. In other words, none of the regular methods worked. </p>
<p>After a quick-search on the internet, I found some articles discussing PNG overlaps and transparency on IE6, but also mentioning <code>background-position</code>&#8216;s (<a href="http://www.dillerdesign.com/experiment/DD_belatedPNG/" target="_blank">http://www.dillerdesign.com/experiment/DD_belatedPNG/</a>, <a href="http://www.hotscripts.com/forums/css/45733-solved-css-newb-overlap-issue-ie6-2-links-issue.html" target="_blank">http://www.hotscripts.com/forums/css/45733-solved-css-newb-overlap-issue-ie6-2-links-issue.html</a>). Just then I realized that the problem might be with the file format &#8211; stupid, in my opinion, but not in IE6&#8242;s opinion. </p>
<p>Changing the file from a regular 8-bit PNG to a GIF <strong>solved</strong> the entire overlapping problem. No CSS intervention (other than changing the reference to a .gif file), no HTML edits, just an image format change. </p>
<p>&nbsp;</p>
<h2>Conclusion</h2>
<p>If you don&#8217;t need images with an alpha channel and want to use <code>background-position</code>&#8216;s with those images, and want to make it work with IE6, <strong>stick to GIF files</strong>. If you don&#8217;t care about IE6, then this will definitely not be not a problem for you.</p>
<p>&nbsp;</p>
<img src="http://feeds.feedburner.com/~r/mandagreen/~4/eAxA4UsekFc" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://mandagreen.com/fixing-png-css-backgrounds-on-ie6/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://mandagreen.com/fixing-png-css-backgrounds-on-ie6/</feedburner:origLink></item>
	</channel>
</rss>

