<?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>Code Stash</title>
	<atom:link href="http://www.codestash.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.codestash.com</link>
	<description>A blog with a different twist</description>
	<lastBuildDate>Thu, 15 Oct 2009 04:49:11 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Redirect Magento from non-www to www</title>
		<link>http://www.codestash.com/2009/10/redirect-magento-from-non-www-to-www/</link>
		<comments>http://www.codestash.com/2009/10/redirect-magento-from-non-www-to-www/#comments</comments>
		<pubDate>Thu, 15 Oct 2009 04:43:34 +0000</pubDate>
		<dc:creator>raven</dc:creator>
				<category><![CDATA[Headline]]></category>
		<category><![CDATA[Magento]]></category>
		<category><![CDATA[redirect magento non-www to www]]></category>

		<guid isPermaLink="false">http://www.codestash.com/?p=338</guid>
		<description><![CDATA[
If you want to redirect your Magento site from a non-www, ex. http://yoursite.com to http://www.yoursite.com. There is a trick there.

Enable Url rewriting (Admin Panel → System → Configuration → Web → Url Options → Use Web Server Rewrites → Yes).
Now go to your .htaccess file on your Magento folder, (you might need to back up your .htaccess before making your changes.)

below the line # 123 code:
#RewriteBase /magento/
Add these codes, to make it:


#RewriteBase /magento/
RewriteCond %{HTTP_HOST} !^www\.yoursite\.com$ [NC]
RewriteRule ^(.*)$ http://www.yoursite.com/$1 [L,R=301]

Replace yoursite.com with your own domain. Then, save your changes on your ...]]></description>
			<content:encoded><![CDATA[<p><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br />
If you want to redirect your Magento site from a non-www, ex. <em><strong>http://yoursite.com</strong></em> to <em><strong>http://www.yoursite.com</strong></em>. There is a trick there.</p>
<ol>
<li>Enable Url rewriting <em>(Admin Panel → System → Configuration → Web → Url Options → Use Web Server Rewrites → Yes)</em>.</li>
<li>Now go to your .htaccess file on your Magento folder, (you might need to back up your .htaccess before making your changes.)</li>
</ol>
<p style="padding-left: 30px;">below the line # 123 code:</p>
<p style="padding-left: 30px;">#RewriteBase /magento/</p>
<p style="padding-left: 30px;">Add these codes, to make it:</p>
<p style="padding-left: 30px;">
<pre class="brush: php;">
#RewriteBase /magento/
RewriteCond %{HTTP_HOST} !^www\.yoursite\.com$ [NC]
RewriteRule ^(.*)$ http://www.yoursite.com/$1 [L,R=301]
</pre>
<p>Replace <em><strong>yoursite.com</strong></em> with your own domain. Then, save your changes on your .htaccess</p>
]]></content:encoded>
			<wfw:commentRss>http://www.codestash.com/2009/10/redirect-magento-from-non-www-to-www/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Fix scratched laptop screen</title>
		<link>http://www.codestash.com/2009/09/fix-laptop-scratched-laptop-screen/</link>
		<comments>http://www.codestash.com/2009/09/fix-laptop-scratched-laptop-screen/#comments</comments>
		<pubDate>Mon, 14 Sep 2009 03:11:28 +0000</pubDate>
		<dc:creator>raven</dc:creator>
				<category><![CDATA[Headline]]></category>
		<category><![CDATA[Tech Tips]]></category>
		<category><![CDATA[Fix scratched laptop screen]]></category>
		<category><![CDATA[scratched laptop]]></category>
		<category><![CDATA[scratched laptop screen]]></category>

		<guid isPermaLink="false">http://www.codestash.com/?p=332</guid>
		<description><![CDATA[Hey Guys,
Ever wonder if you can fix those scratches on your laptop screens?
Laptop Scratches
The notebook screen shown above has one deep scratch and several smaller ones.
Remedy is to gently rub toothpaste in a circular motion over the scratches for a few seconds, then wipe the screen clean with a soft cloth. After this treatment, the smaller scratches are gone, and while the larger one remains, it&#8217;s less noticeable than before.
source: pcworld.com
]]></description>
			<content:encoded><![CDATA[<p>Hey Guys,</p>
<p>Ever wonder if you can fix those scratches on your laptop screens?</p>
<div id="attachment_333" class="wp-caption aligncenter" style="width: 585px"><img class="size-full wp-image-333" title="Laptop Scratches" src="http://www.codestash.com/wp-content/uploads/2009/09/171754-5quick_scratch_715_slide.jpg" alt="Laptop Scratches" width="575" height="380" /><p class="wp-caption-text">Laptop Scratches</p></div>
<p>The notebook screen shown above has one deep scratch and several smaller ones.</p>
<p>Remedy is to gently rub toothpaste in a circular motion over the scratches for a few seconds, then wipe the screen clean with a soft cloth. After this treatment, the smaller scratches are gone, and while the larger one remains, it&#8217;s less noticeable than before.</p>
<p>source: pcworld.com</p>
]]></content:encoded>
			<wfw:commentRss>http://www.codestash.com/2009/09/fix-laptop-scratched-laptop-screen/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Magento Delete Orders Extension</title>
		<link>http://www.codestash.com/2009/07/magento-delete-orders-extension/</link>
		<comments>http://www.codestash.com/2009/07/magento-delete-orders-extension/#comments</comments>
		<pubDate>Wed, 22 Jul 2009 15:03:26 +0000</pubDate>
		<dc:creator>raven</dc:creator>
				<category><![CDATA[Magento]]></category>
		<category><![CDATA[delete orders]]></category>
		<category><![CDATA[delete orders magento]]></category>

		<guid isPermaLink="false">http://www.codestash.com/?p=278</guid>
		<description><![CDATA[I have found a Magento extension (or module if some might call it) that allows you to delete orders and it is totally free.
The catch? This module/extension only orders that are without Invoice, Shippment or Creditmemo could be deleted. You can only delete Cancelled Orders. So~ you still have to cancel the order before deleting it or it will prompt an error &#8220;Please cancel your order before delete it&#8220;. Why only Cancelled Orders? Because deleting a complete order breaks links with invoices and shipments and could create problems along the ...]]></description>
			<content:encoded><![CDATA[<p>I have found a Magento extension (or module if some might call it) that allows you to delete orders and it is totally free.</p>
<p>The catch? This module/extension only orders that are without Invoice, Shippment or Creditmemo could be deleted. You can only delete <strong>Cancelled Order</strong><strong>s</strong>. So~ you still have to cancel the order before deleting it or it will prompt an error &#8220;<em>Please cancel your order before delete it</em>&#8220;. Why only Cancelled Orders? Because deleting a complete order breaks links with invoices and shipments and could create problems along the way.<br />
<br/><br/><br/><br/></p>
<p><img class="aligncenter size-full wp-image-279" title="delete order interface" src="http://www.codestash.com/wp-content/uploads/2009/07/BoutikCircus_DeleteOrders_724c03861b05bbb0af4201bd74c869e1_DeleteOrders.png" alt="delete order interface" width="350" height="350" /></p>
<p>I know almost all of you knows how to add a new module for Magento using the Magento Connect Manager.  The extension key is:</p>
<pre class="brush: php;">

magento-community/BoutikCircus_DeleteOrders
</pre>
<p><strong>what to do</strong>:</p>
<ol>
<li>Sign into your Magento store admin</li>
<li>Navigate to System &gt; Magento Connect &gt; Magento Connect Manager.</li>
<li>Paste in the extension key and click &#8220;Install&#8221;.</li>
</ol>
<p>You can also visit the  <a href="http://www.magentocommerce.com/extension/873/delete-orders" target="_blank">delete orders</a> extension in the magento site.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.codestash.com/2009/07/magento-delete-orders-extension/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Export Order Hack for Magento</title>
		<link>http://www.codestash.com/2009/07/export-order-hack-for-magento/</link>
		<comments>http://www.codestash.com/2009/07/export-order-hack-for-magento/#comments</comments>
		<pubDate>Tue, 14 Jul 2009 15:54:14 +0000</pubDate>
		<dc:creator>raven</dc:creator>
				<category><![CDATA[Headline]]></category>
		<category><![CDATA[Magento]]></category>
		<category><![CDATA[Export Order for Magento]]></category>

		<guid isPermaLink="false">http://www.codestash.com/?p=265</guid>
		<description><![CDATA[I think most of you are not surprise when I say that Magento does have a built-in export module.

I've locked myself trying to find a way to export my orders for my Magento 1.1.1 set up. And then I found it, szotyi from the Magento Forums posted this great solution to export orders for Magento. 

Features includes:

A simple interface on the Sales -> Order page, Orders are exported in XML files, You can export all or only selected orders, Configurable/Customizable XML output]]></description>
			<content:encoded><![CDATA[<p>I think most of you are not surprise when I say that Magento doesn&#8217;t have a built-in export module.</p>
<p>(&#8221;Gimme a break~..&#8221; -&#8221;No it&#8217;s true.&#8221;)</p>
<p>I&#8217;ve locked myself trying to find a way to export my orders for my Magento 1.1.1 set up. And then I found it, <strong>szotyi </strong>from the Magento Forums posted this great solution to export orders for Magento.</p>
<p>Features includes:</p>
<ul>
<li>A simple interface on the Sales -&gt; Order page</li>
<li>Orders are exported in XML files</li>
<li>You can export all or only selected orders</li>
<li>Configurable/Customizable XML output</li>
</ul>
<p>I have made some changes myself on <strong>szotyi</strong>&#8217;s<strong> </strong>code, and got some ideas from the others who also contributed posts on the thread.</p>
<p>How to do it:</p>
<p><strong>Step 1</strong>:</p>
<p>in the &#8220;app/design/adminhtml/default/default/template/widget/grid/massaction.phtml&#8221;</p>
<p>between the first two lines insert:</p>
<pre class="brush: php;">&lt;?php include('export.php'); ?&gt;</pre>
<p>so you&#8217;ll get:</p>
<pre class="brush: xml;">
&lt;div id=&quot;&lt;?php echo $this-&gt;getHtmlId() ?&gt;&quot;&gt;
&lt;?php include('export.php'); ?&gt;
&lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; class=&quot;massaction&quot;&gt;
 </pre>
<p><strong>Step 2</strong>:</p>
<p>copy the files ‘samples.php’, ‘includes.php’, ‘export.php’ files to &#8220;<strong>app/design/adminhtml/default/default/template/widget/grid/</strong>&#8221; (<a href="http://www.codestash.com/etc/export_order_magento.zip" target="_blank">get files here</a>)</p>
<p><strong>Step 3</strong>:</p>
<p>create a folder named ‘export’ in your Magento root folder</p>
<p><strong>Step 4</strong>:</p>
<p>to check if you got it right. Go to your admin of your store,  <strong>Sales</strong> -&gt; <strong>Order page</strong>.</p>
<p><strong>Notes</strong>:</p>
<p>the XML output files are customizable. To configure its XML format, you need to edit the <strong>sample.php</strong>, this is where the XML format are stored. In <strong>szotyi</strong>&#8217;s original file you can find 4 different samples (Default, Advanced, Simple, Custom).</p>
<p>The string before the ‘:’ means the tagname that will be shown in the xml.. you can change that to whatever you wish.</p>
<p>The string after the ‘:’ refers to the value (the value is located in the includes.php function getValue&#8230;)</p>
<p><strong>PS</strong>:</p>
<p>If you want to add another value on the XML file.</p>
<p><strong>Step 1</strong>:</p>
<p>Let say we want to add another value: <em>the quantity how much has invoiced</em>.  <strong>szotyi </strong>provided a list (<a href="http://www.codestash.com/etc/list.txt" target="_blank">get it here</a>)where you can find all the attributes of the order information.</p>
<p>Go to the includes.php file to getValue() the <em>quantity how much has invoiced</em>.</p>
<pre class="brush: php;">
...
case &quot;examplegetqtyinvoiced&quot;:

return $item-&gt;getQtyInvoiced();
...
</pre>
<p><strong>Step 2</strong>:</p>
<p>then add the below code for the <strong>sample.php</strong> so you can reach the value:</p>
<pre class="brush: php;">
...
invoiced: examplegetqtyinvoiced,
...
</pre>
<p>I am waiting for your comments guys.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.codestash.com/2009/07/export-order-hack-for-magento/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Magento hack to manually change order status in Admin panel</title>
		<link>http://www.codestash.com/2009/06/magento-hack-to-manually-change-order-status-in-admin-panel/</link>
		<comments>http://www.codestash.com/2009/06/magento-hack-to-manually-change-order-status-in-admin-panel/#comments</comments>
		<pubDate>Wed, 24 Jun 2009 06:44:55 +0000</pubDate>
		<dc:creator>raven</dc:creator>
				<category><![CDATA[Featured]]></category>
		<category><![CDATA[Magento]]></category>
		<category><![CDATA[change order status]]></category>
		<category><![CDATA[Magento change order status]]></category>
		<category><![CDATA[Magento hack]]></category>

		<guid isPermaLink="false">http://www.codestash.com/?p=258</guid>
		<description><![CDATA[We want to change the status of an order without going thru the process of Shipping and Invoicing. There are instances that Magento will lock the status of an order to pending until the order finishes its shipment.
This hack will activate all the order status on all states. What I mean is the Status dropdown in the Comment History, by choosing the desired status and Submitting the Comment. We can change the status of the order to Complete or Closed or any available status for that matter.
All we have to ...]]></description>
			<content:encoded><![CDATA[<p>We want to change the status of an order without going thru the process of Shipping and Invoicing. There are instances that Magento will lock the status of an order to <strong>pending</strong> until the order finishes its shipment.</p>
<p>This hack will activate all the order status on all states. What I mean is the Status dropdown in the Comment History, by choosing the desired status and Submitting the Comment. We can change the status of the order to Complete or Closed or any available status for that matter.</p>
<p>All we have to do is edit the config.xml under the <strong>magento_folder\app\code\core\Mage\Sales\etc\</strong>.</p>
<p>Then find the &lt;states&gt;code block. That&#8217;ll look like:</p>
<pre class="brush: xml;">
&lt;states&gt;
&lt;new translate=&quot;label&quot;&gt;
&lt;label&gt;New&lt;/label&gt;
&lt;statuses&gt;
&lt;pending/&gt;
&lt;/statuses&gt;
&lt;/new&gt;
&lt;processing translate=&quot;label&quot;&gt;
&lt;label&gt;Processing&lt;/label&gt;
&lt;statuses&gt;
&lt;processing/&gt;
&lt;/statuses&gt;
&lt;/processing&gt;
&lt;complete translate=&quot;label&quot;&gt;
&lt;label&gt;Complete&lt;/label&gt;
&lt;statuses&gt;
&lt;complete/&gt;
&lt;/statuses&gt;
&lt;/complete&gt;
&lt;closed translate=&quot;label&quot;&gt;
&lt;label&gt;Closed&lt;/label&gt;
&lt;statuses&gt;
&lt;closed/&gt;
&lt;/statuses&gt;
&lt;/closed&gt;
&lt;canceled translate=&quot;label&quot;&gt;
&lt;label&gt;Canceled&lt;/label&gt;
&lt;statuses&gt;
&lt;canceled/&gt;
&lt;/statuses&gt;
&lt;/canceled&gt;
&lt;holded translate=&quot;label&quot;&gt;
&lt;label&gt;On Hold&lt;/label&gt;
&lt;statuses&gt;
&lt;holded/&gt;
&lt;/statuses&gt;
&lt;/holded&gt;
&lt;/states&gt;
</pre>
<p>And change this with the code below:</p>
<pre class="brush: xml;">
&lt;states&gt;
&lt;new translate=&quot;label&quot;&gt;
&lt;label&gt;New&lt;/label&gt;
&lt;statuses&gt;
&lt;pending/&gt;
&lt;processing/&gt;
&lt;holded/&gt;
&lt;complete/&gt;
&lt;closed/&gt;
&lt;canceled/&gt;
&lt;/statuses&gt;
&lt;/new&gt;
&lt;pending translate=&quot;label&quot;&gt;
&lt;label&gt;Pending&lt;/label&gt;
&lt;statuses&gt;
&lt;pending/&gt;
&lt;processing/&gt;
&lt;holded/&gt;
&lt;complete/&gt;
&lt;closed/&gt;
&lt;canceled/&gt;
&lt;/statuses&gt;
&lt;/pending&gt;
&lt;processing translate=&quot;label&quot;&gt;
&lt;label&gt;Processing&lt;/label&gt;
&lt;statuses&gt;
&lt;pending/&gt;
&lt;processing/&gt;
&lt;holded/&gt;
&lt;complete/&gt;
&lt;closed/&gt;
&lt;canceled/&gt;
&lt;/statuses&gt;
&lt;/processing&gt;
&lt;complete translate=&quot;label&quot;&gt;
&lt;label&gt;Complete&lt;/label&gt;
&lt;statuses&gt;
&lt;complete/&gt;
&lt;pending/&gt;
&lt;processing/&gt;
&lt;holded/&gt;
&lt;closed/&gt;
&lt;canceled/&gt;
&lt;/statuses&gt;
&lt;/complete&gt;
&lt;closed translate=&quot;label&quot;&gt;
&lt;label&gt;Closed&lt;/label&gt;
&lt;statuses&gt;
&lt;pending/&gt;
&lt;processing/&gt;
&lt;holded/&gt;
&lt;complete/&gt;
&lt;closed/&gt;
&lt;canceled/&gt;
&lt;/statuses&gt;
&lt;/closed&gt;
&lt;canceled translate=&quot;label&quot;&gt;
&lt;label&gt;Canceled&lt;/label&gt;
&lt;statuses&gt;
&lt;pending/&gt;
&lt;processing/&gt;
&lt;holded/&gt;
&lt;complete/&gt;
&lt;closed/&gt;
&lt;canceled/&gt;
&lt;/statuses&gt;
&lt;/canceled&gt;
&lt;holded translate=&quot;label&quot;&gt;
&lt;label&gt;On Hold&lt;/label&gt;
&lt;statuses&gt;
&lt;pending/&gt;
&lt;processing/&gt;
&lt;holded/&gt;
&lt;complete/&gt;
&lt;closed/&gt;
&lt;canceled/&gt;
&lt;/statuses&gt;
&lt;/holded&gt;
&lt;/states&gt;
</pre>
<p>After that, It is important to refresh your cache.</p>
<p>this hack was taken from Magento Forum&#8217;s <strong>atlasit</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.codestash.com/2009/06/magento-hack-to-manually-change-order-status-in-admin-panel/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Convert HTML code to post as Blog examples</title>
		<link>http://www.codestash.com/2009/06/convert-html-code-to-post-as-blog-examples/</link>
		<comments>http://www.codestash.com/2009/06/convert-html-code-to-post-as-blog-examples/#comments</comments>
		<pubDate>Tue, 23 Jun 2009 07:07:51 +0000</pubDate>
		<dc:creator>raven</dc:creator>
				<category><![CDATA[Headline]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Convert tags]]></category>
		<category><![CDATA[escape characters]]></category>
		<category><![CDATA[HTML code converter]]></category>
		<category><![CDATA[HTML convert]]></category>

		<guid isPermaLink="false">http://www.codestash.com/?p=251</guid>
		<description><![CDATA[We want to post HTML codes on our posts for code examples, but this would create problems because the browser converts the HTML codes to tags.This is where the Online HTML escape tool comes in. this tool converts HTML tags with the correct  HTML entities escape characters so that it will be displayed as is.
    
&#60;!DOCTYPE html PUBLIC &#8220;-//W3C//DTD XHTML 1.0 Transitional//EN&#8221; &#8220;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&#8221;&#62;
&#60;html xmlns=&#8221;http://www.w3.org/1999/xhtml&#8221; xml:lang=&#8221;en&#8221; lang=&#8221;en&#8221;&#62;
&#60;head&#62;
&#60;meta http-equiv=&#8221;content-type&#8221; content=&#8221;text/html; charset=iso-8859-1&#8243; /&#62;
&#60;meta name=&#8221;author&#8221; content=&#8221;raven&#8221; /&#62;
&#60;title&#62;My Page&#60;/title&#62;
&#60;/head&#62;
&#60;body&#62;
&#60;/body&#62;
&#60;/html&#62;
]]></description>
			<content:encoded><![CDATA[<p>We want to post HTML codes on our posts for code examples, but this would create problems because the browser converts the HTML codes to tags.This is where the <a href="http://www.htmlescape.net/htmlescape_tool.html" target="_blank">Online HTML escape tool</a> comes in. this tool converts HTML tags with the correct  HTML entities escape characters so that it will be displayed as is.<br />
<br/> <br/> <br/> <br/> <br/></p>
<blockquote><p>&lt;!DOCTYPE html PUBLIC &#8220;-//W3C//DTD XHTML 1.0 Transitional//EN&#8221; &#8220;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&#8221;&gt;</p>
<p>&lt;html xmlns=&#8221;http://www.w3.org/1999/xhtml&#8221; xml:lang=&#8221;en&#8221; lang=&#8221;en&#8221;&gt;</p>
<p>&lt;head&gt;</p>
<p>&lt;meta http-equiv=&#8221;content-type&#8221; content=&#8221;text/html; charset=iso-8859-1&#8243; /&gt;</p>
<p>&lt;meta name=&#8221;author&#8221; content=&#8221;raven&#8221; /&gt;</p>
<p>&lt;title&gt;My Page&lt;/title&gt;</p>
<p>&lt;/head&gt;</p>
<p>&lt;body&gt;</p>
<p>&lt;/body&gt;</p>
<p>&lt;/html&gt;</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.codestash.com/2009/06/convert-html-code-to-post-as-blog-examples/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Initialize a Javascript Associative Array</title>
		<link>http://www.codestash.com/2009/05/initialize-javascript-associative-array/</link>
		<comments>http://www.codestash.com/2009/05/initialize-javascript-associative-array/#comments</comments>
		<pubDate>Thu, 28 May 2009 14:40:00 +0000</pubDate>
		<dc:creator>raven</dc:creator>
				<category><![CDATA[javascript]]></category>
		<category><![CDATA[associative array]]></category>
		<category><![CDATA[foreach loop]]></category>
		<category><![CDATA[javascript associative array]]></category>
		<category><![CDATA[javascript foreach loop]]></category>

		<guid isPermaLink="false">http://www.codestash.com/?p=245</guid>
		<description><![CDATA[There are a few thoughts we have to take note about Javascript Associative Arrays:

Arrays (which act as hash tables) have nothing to do with the built-in Array object. They simply rely on the fact that object.property is the same as object["property"]. This means that the length property is not used, nor do any Array methods (such as join) do anything.
The way to iterate over the items in an associate array is to use the for (value in array) construct, allowing you to access each item&#8217;s value via array[value].

Initialize a Javascript ...]]></description>
			<content:encoded><![CDATA[<p>There are a few thoughts we have to take note about Javascript Associative Arrays:</p>
<ul>
<li>Arrays (which act as hash tables) have nothing to do with the built-in <code>Array</code> object. They simply rely on the fact that <code>object.property</code> is the same as <code>object["property"]</code>. This means that the <code>length</code> property is not used, nor do any <code>Array</code> methods (such as <code>join</code>) do anything.</li>
<li>The way to iterate over the items in an associate array is to use the <code>for (value in array)</code> construct, allowing you to access each item&#8217;s value via <code>array[value].</code></li>
</ul>
<p>Initialize a Javascript Associative Array:</p>
<pre class="brush: jscript;">
var animals = {&quot;cat&quot;: 0,  &quot;dog&quot;: 1, &quot;mouse&quot;: 2, &quot;cow&quot;: 3, &quot;horse&quot;: 4, &quot;pig&quot;: 5,
&quot;duck&quot;: 6, &quot;goat&quot;: 7, &quot;sheep&quot;: 8, &quot;lion&quot;: 9};
</pre>
<p>Here&#8217;s a short example of doing the For Each loop equivalent in JavaScript:</p>
<pre class="brush: jscript;">
for( var animals in names )
{
alert( names[i] );
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.codestash.com/2009/05/initialize-javascript-associative-array/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Edit pdf Invoice printout</title>
		<link>http://www.codestash.com/2009/05/edit-pdf-invoice-printout/</link>
		<comments>http://www.codestash.com/2009/05/edit-pdf-invoice-printout/#comments</comments>
		<pubDate>Tue, 26 May 2009 09:14:50 +0000</pubDate>
		<dc:creator>raven</dc:creator>
				<category><![CDATA[Magento]]></category>
		<category><![CDATA[PDF Invoice printout]]></category>

		<guid isPermaLink="false">http://www.codestash.com/2009/05/edit-pdf-invoice-printout/</guid>
		<description><![CDATA[Got this from the Magento Forum. Here are the downsides for this method
1. These modifications WILL be overwritten if you try to upgrade.
2. This is a pain to do&#8211; and a bit mathy.
3 files in question to customize the invoice PDF are:
/app/code/core/Mage/Sales/Model/Order/Pdf/Invoice.php
/app/code/core/Mage/Sales/Model/Order/Pdf/Abstract.php
/app/code/core/Mage/Sales/Model/Order/Pdf/Items/Abstract.php
If ALL you want to do is change the font size, then it’s quite easy. If, however, you want to change the font (I changed it to helvetica for a smaller PDF file size since Helvetica does not have to be embedded) or change the paper size to US ...]]></description>
			<content:encoded><![CDATA[<p>Got this from the Magento Forum. Here are the downsides for this method</p>
<p>1. These modifications WILL be overwritten if you try to upgrade.<br />
2. This is a pain to do&#8211; and a bit mathy.</p>
<p>3 files in question to customize the invoice PDF are:</p>
<p>/app/code/core/Mage/Sales/Model/Order/Pdf/Invoice.php<br />
/app/code/core/Mage/Sales/Model/Order/Pdf/Abstract.php<br />
/app/code/core/Mage/Sales/Model/Order/Pdf/Items/Abstract.php</p>
<p>If ALL you want to do is change the font size, then it’s quite easy. If, however, you want to change the font (I changed it to helvetica for a smaller PDF file size since Helvetica does not have to be embedded) or change the paper size to US Letter, then you have a lot of tweaking to do.</p>
<p>The PDFs are creating using Zend_Pdf. So it may be useful to look through http://framework.zend.com/apidoc/core/ (Select Zend_Pdf from the dropdown in the top right corner).</p>
<p>Let’s start with the font and/or font size. Start with /app/code/core/Mage/Sales/Model/Order/Pdf/Abstract.php. There are 3 private methods called _setFontRegular(), _setFontBold(), and _setFontItalic() which are used through Abstract.php as well as Invoice.php. Anytime you see a call to one of these 3 methods, that is where the font is being set for a particular bit of text. The second parameter is the size (default is 7pt). So, to change the font size, find the call you want and change the second parameter. For example, the insertAddress() method could be changed to $this->_setFontBold($page, 9) if you wanted a 9pt font. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.codestash.com/2009/05/edit-pdf-invoice-printout/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Delete Orders in Magento Admin Panel</title>
		<link>http://www.codestash.com/2009/05/delete-order-magento-admin-panel/</link>
		<comments>http://www.codestash.com/2009/05/delete-order-magento-admin-panel/#comments</comments>
		<pubDate>Thu, 14 May 2009 07:00:32 +0000</pubDate>
		<dc:creator>raven</dc:creator>
				<category><![CDATA[Featured]]></category>
		<category><![CDATA[Magento]]></category>
		<category><![CDATA[delete order backend]]></category>
		<category><![CDATA[Magento delete order]]></category>

		<guid isPermaLink="false">http://www.codestash.com/?p=234</guid>
		<description><![CDATA[By default, Magento doesn&#8217;t allow you to delete Orders on the backend.  Well, there is no option in the admin for now.  But guess what? there is a work around (yeah~ I know you&#8217;ve already expected this.).  Boutik Circus created this &#8220;Delete Orders&#8221; extension which allows you to delete cancelled orders.
Why can we delete cancel order only?
That&#8217;s because deleting a complete order breaks links with invoices and shipments and could creates a lot of troubles.
Go to Delete Orders Extension.
Install this extension via Magento Connect Manager.
Magento Connect -&#62; Magento Connect Manager
]]></description>
			<content:encoded><![CDATA[<p>By default, Magento doesn&#8217;t allow you to delete Orders on the backend.  Well, there is no option in the admin for now.  But guess what? there is a work around (yeah~ I know you&#8217;ve already expected this.).  Boutik Circus created this &#8220;<strong>Delete Orders</strong>&#8221; extension which allows you to delete <strong>cancelled orders</strong>.</p>
<p>Why can we delete cancel order only?<br />
That&#8217;s because deleting a complete order breaks links with invoices and shipments and could creates a lot of troubles.</p>
<p>Go to <a href="http://www.magentocommerce.com/extension/873/delete-orders" target="_blank">Delete Orders Extension</a>.</p>
<p>Install this extension via Magento Connect Manager.</p>
<p>Magento Connect -&gt; Magento Connect Manager</p>
]]></content:encoded>
			<wfw:commentRss>http://www.codestash.com/2009/05/delete-order-magento-admin-panel/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Iloilo City an Outsourcing Hotspot</title>
		<link>http://www.codestash.com/2009/05/iloilo-city-an-outsourcing-hotspot/</link>
		<comments>http://www.codestash.com/2009/05/iloilo-city-an-outsourcing-hotspot/#comments</comments>
		<pubDate>Tue, 12 May 2009 04:00:36 +0000</pubDate>
		<dc:creator>raven</dc:creator>
				<category><![CDATA[Headline]]></category>
		<category><![CDATA[IT News]]></category>
		<category><![CDATA[Iloilo]]></category>
		<category><![CDATA[Iloilo City]]></category>
		<category><![CDATA[IT outsourcing Iloilo]]></category>

		<guid isPermaLink="false">http://www.codestash.com/2009/05/iloilo-city-an-outsourcing-hotspot/</guid>
		<description><![CDATA[Companies outsource mainly to cut cost. There is an imbalanced supply and demand of IT talent in top IT countries like the United States and it is driving many corporations to rely on offshore outsourcing as the solution. This cost-effective and quality pool of IT talent from offshore outsourcing services provides a much better value in terms of flexibility and scalability.
With dozens of areas around the world that are trying to grab a slice of the outsourcing business. Iloilo City, Philippines is popularly considered a Hot Spot for Outsourcing Companies. ...]]></description>
			<content:encoded><![CDATA[<p>Companies outsource mainly to cut cost. There is an imbalanced supply and demand of IT talent in top IT countries like the United States and it is driving many corporations to rely on offshore outsourcing as the solution. This cost-effective and quality pool of IT talent from offshore outsourcing services provides a much better value in terms of flexibility and scalability.</p>
<p>With dozens of areas around the world that are trying to grab a slice of the outsourcing business. Iloilo City, Philippines is popularly considered a Hot Spot for Outsourcing Companies. Already identified by Philippine authorities as one of the next wave of IT outsourcing centers. The well-trained, English-speaking population makes the city an ideal option for companies looking for a cheap alternative for U.S. consumer support.</p>
<p>Other popular choices to outsource are:</p>
<p><strong>Buenos Aires, Argentina</strong><br />
Population: 12.6 million<br />
Ease of Doing Business Rank (Argentina): 113 (out of 181 countries)<br />
Rigidity of Employment Index (Argentina): 35 (out of 100—the lower the figure, the more flexible the workforce)</p>
<p><strong>Winnipeg, Canada</strong><br />
Population: 719,000<br />
Ease of Doing Business Rank (Canada): 8<br />
Rigidity of Employment Index (Canada): 4</p>
<p><strong>Boise, Idaho</strong><br />
Population: 568,000<br />
Ease of Doing Business Rank (U.S.): 3<br />
Rigidity of Employment Index (U.S.): 0</p>
<p><strong>Indianapolis, Ind.</strong><br />
Population: 797,000<br />
Ease of Doing Business Rank (U.S.): 3<br />
Rigidity of Employment Index (U.S.): 0</p>
<p><strong>Belfast, United Kingdom</strong><br />
Population: 267,000<br />
Ease of Doing Business Rank (U.K.): 6<br />
Rigidity of Employment Index (U.K.): 14</p>
<p><strong>Cairo, Egypt</strong><br />
Population: 18 million<br />
Ease of Doing Business Rank (Egypt): 114<br />
Rigidity of Employment Index (Egypt): 27</p>
<p><strong>Cluj-Napoca, Romania</strong><br />
Population: 310,000<br />
Ease of Doing Business Rank (Romania): 47<br />
Rigidity of Employment Index (Romania): 62</p>
<p><strong>Hangzhou, China</strong><br />
Population: 6.7 million<br />
Ease of Doing Business Rank (China): 83<br />
Rigidity of Employment Index (China): 27</p>
<p><strong>Ahmedabad, India</strong><br />
Population: 5.8 million<br />
Ease of Doing Business Rank (India): 122<br />
Rigidity of Employment Index (India): 30</p>
<p><strong>Iloilo City, Philippines</strong><br />
Population: 419,000<br />
Ease of Doing Business Rank (Philippines): 140<br />
Rigidity of Employment Index (Philippines): 35</p>
<p>With usual destinations of the IT sector becoming expensive than they used to be, Companies resort to these outsourcing places.</p>
<p>Source:<a title="Where Your Job Could Be Outsourced" href="http://finance.yahoo.com/career-work/article/107048/Where-Your-Job-Could-Be-Outsourced" target="_blank"> Yahoo Finance</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.codestash.com/2009/05/iloilo-city-an-outsourcing-hotspot/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
