All about Magento E-commerce Store.......MagentoForum: July 2011

Thursday, July 28, 2011


At Ionata we've been using Magento for quite a while now and the more sites we added, the slower our server seemed to become. Magento is quite a big chunk of software and can take up a lot of resources. However after doing some research and carefully tweaking our server configurations, we were pretty amazed to find performance gains of several hundred percent only by changing some settings.
In this post you'll find a summary of settings that can boost the speed and responsiveness of your Magento installation. Optimisation can be done for PHP, MySQL, Apache and Magento itself.

Is Magento For Me?

Stories are told far and yonder about the greatness of the FREE and mighty Magento e-commerce platform. Town criers carry the news across the lands and the folk listen intently, with baited breath, mouths gaping wide, thinking: "I too can haz a MagNEto store!!! It's FREE and fabulous. My $$$ will have lot's of children, har – har!" … they grab a FREE copy of Magento from town crier, hands rubbing.
Surely, most seasoned Magento developers have seen it. The Magento promise is fantastic but the reality is another, often frustrating and unforgiving beast. People sometimes realize the implications of using Magneto for their e-commerce platform a tad too late, when they are already knee-deep in implementation or deployment:
  • The site on their favorite shared hosting account is too slow
  • The shop looks like a gang of school kids had their way with it
  • Or, worse, it looks like the Modern/Default theme with a different logo and maybe a color change
  • Usability is poor since all the bells and whistles have been enabled and a heap of extensions installed
  • The web developer has struggled with customizing Magento and it shows (without changing core files)
  • The last upgrade seemed to work but suddenly the store is playing up
  • The attempted upgrade fails repeatedly
  • The newly installed extension crashes the site; uninstalling doesn't help
  • The site suffers from extension bloat or conflicts
  • The default Magento favicon is still showing
  • The standard PHP gal/guy can't help and experienced Magento developers are expensive (and busy)
  • etc…
My favorite analogy to downloading the 'free' installation of Magento is like winning a Ferrari! It's a fabulous car, one you're proud to own and you love the idea of driving it, however your joy is quickly squashed by the 'real cost' of owning it. There's the insurance, the high fuel costs and regular servicing – it all quickly adds up. Unless you have the financial means to run and maintain your FREE Ferrari, you won't be going very far!

Big Addthis script problems – security warning and slow down website loading

Addthis is not something new to all webmasters and this bookmarking widget service seems to be one of most famous/best provider in comparison with other bookmarking toolbars services. Almost US government websites use addthis. But they have a problem? Surprising?
But yes, their service is great and no complaint but they have two big problems with their include scripts which they give Webmasters to include websites

Magento Connect and Facebook Extension Series (P1)

First of all, if you don't want to waste time with "draft" code published somewhere on community. Please look at these package – everything you need and work perfectly
Facebook Shop Publisher
Facebook Store Pro
Magento Enterprise Partners Optaros have recently released a Magento Connect extension called Facebook Connect Social Shopping which allows you to integrate social shopping via Facebook with your Magento storefront. Ever seen a cool item and wished you could ask your friends what they thought before you went ahead an decided to buy? Then this extension is definitely for you! Check out this video for a quick run through.

Magento Reference Name List in layout XML for Template Designer

Magento use layout XML to define page layout structure and indicate how blocks included and access to predefined position called reference area (either place holder). You can modify the layout by editing specific XML file for each module or from yourMagento Extension (magento module) via reference name and reference attributes
Here is a list of references which you can use anywhere (global references) because these reference are used on almost pages/layouts

Understanding about Magento Block in Magento MVC pattern

Many developers are familiar with the MVC (Model View Controller) design pattern that is seemingly ubiquitous throughout web frameworks. Looking through the code in Magento, however, we see many other components besides the M's the V's and the C's.
Each module (a "module" meaning the separate directories within the "app/code/core/Mage" directory that comprise of Magento's different functional areas) contains the usual Controller and Model. You'll see that within each module, there are no Views (more on this later). You'll also see extra tidbits, such as "helper" , "etc" and "sql". These are (and are not) standard within the Zend Framework context and will not be discussed in this article. In these modules are also the sort of files which we work with very often. The all powerful block! This article will attempt to (hopefully accurately) describe just what a Block is and how it's used.

Wednesday, July 27, 2011

Magento: How to create extension package?

You have built a custom magento extension (magento module) and you want to package it and submit it to magento connect (magento extension directory).

This article shows how to create Magento extension package. I have included images for every step which I followed while creating extension package for my module (Auto Currency Switcher).

Auto Currency Switcher is a currency switcher extension which automatically switches store currency based on visitor's IP address. It is a FREE extension.

Lets move on with the step-by-step guide for packaging Magento extension.

Login to admin and go to System -> Magento Connect -> Package Extensions

1. Package Info

Name: YourNamespace_YourModuleName

Channel: (If you are using Magento version 1.4 and below)
Channel: community (If you are using Magento version 1.5 and above)

Supported releases: Pre- (Extension will be installed in all versions of Magento)
Supported releases: & later (Extension will only support 1.5 and higher versions of Magento)

package info

2. Release Info

Release Version: Your module's version as present in YourNamespace/YourModule/etc/config.xml

release info

3. Authors

Your name, email and Magento Commerce username.


4. Dependencies

I just added minimum and maximum PHP Version. I didn't do any changes in Packages and Extensions fields.


5. Contents

The Path is relative to Target directory.

Magento Local module file is relative to app/code/local/
Magento Community module file is relative to app/code/community/
Magento Core team module file is relative to app/code/core/
Magento User Interface (layouts, templates) is relative to app/design/
Magento Global Configuration is relative to app/etc/
Magento PHP Library file is relative to lib/
Magento Locale language file is relative to app/locale/
Magento Media library is relative to media/
Magento Theme Skin (Images, CSS, JS) is relative to skin/
Magento Other web accessible file is relative to /
Magento PHPUnit test is relative to tests/
Magento other is relative to /

You can see this path-target relationship in your magento installation file as well. It is located in downloader/target.xml file.


Save Data and Create Package after you fill up all these fields.

You have finally packaged your Magento extension. The package file is located at var/pear directory.

More more information on packaging extension in Magento:-

Packaging a Magento Extension

Packaging a Magento Extension in 1.5+

Hope this helps.

Anyone wants Auto Currency switcher comment me or mail me at

Saturday, July 16, 2011

Magento: How to change Currency symbol ?

Magento: How to change Currency symbol?

I had a hectic day changing the currency symbol in Magento. Though different blogs and magento forum helped me, I am writing this article for my reference. ;)

I had to change the currency symbol of Nepalese Rupee (from Nrs to Rs). By default, the currency symbol for Nepalese Rupee is Nrs.

For this, you need to editlib/Zend/Locale/Data/en.xml

Well, the xml file to edit depends upon your locale settings. My locale is set to English (United States). So, I will have to change en.xml file.

You can change your locale setting from
Admin Panel –> System –> Configuration –> GENERAL –> General –> Locale options –> Locale

If your locale is Japanese (Japan), you need to change lib/Zend/Locale/Data/ja.xml

If your locale is Hindi (India), you need to change lib/Zend/Locale/Data/ne.xml

It's similar for other locale settings. I have locale setting as English, so I will be editing en.xml file.

- Open lib/Zend/Locale/Data/en.xml

- Find the following :-

<currency type="NPR">
    <displayName>Nepalese Rupee</displayName>
    <displayName count="one">Nepalese rupee</displayName>
    <displayName count="other">Nepalese rupees</displayName>

- Change




- That's it.

But wait, you are still not done. The most important thing is still left.

- Clear the Cache.
- Go to System –> Cache Management
- Refreh Cache.

- If you have not enabled the Cache OR if it didn't work even after refreshing the cache, then
- delete the cache folder present inside var (var/cache)

Now, it should definitely work. :)

I changed the currency symbol for Nepalese Rupee. You can do similarly for your currency type.

Hope this helps. Thanks.

PS: Your changes will be gone when you upgrade Magento. You need to redo the above changes after upgrade.