Currently browsing

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 …

Magento: Track Visitor’s Information

Here, I will show you how to track visitor’s data information in Magento. By visitor’s information, I mean information like remote address, http host, user agent (browser), referer url, first visit date time, last visit date time, etc. Looking for improvement for your Magento Store? Facebook Connector Extension Product related …

Magento: Join, filter, select and sort attributes, fields and tables

In my previous article (Magento: Very Useful Collection Functions), I had written about database interaction functions present in class Varien_Data_Collection_Db. Here, I am going to explain some database interaction functions present in the class Mage_Eav_Model_Entity_Collection_Abstract. These collection functions are very useful to select data from Magento database. We need them …

Magento: Showing Store Selector / Switcher in header and footer

Here, I will show you how to show the store selector (store switcher) in header. By default, the store selector is present in footer. Create a new phtml file (template/page/switch/stores-top.phtml) and write the following code in it :- <?php if(count($this->getGroups())>1): ?> <div class=”language-switcher” style=”margin-left:15px”> <label for=”select-store”><?php echo $this->__(‘Select Store’) ?>: …

Magento: Show Currency Selector in header

Here, I will show you how you can change the location of currency selector to header in Magento. By default, the currency selector is displayed in the left sidebar. Here, I will show you how you can show it in header just below the language selector. Looking for improvement for …

Magento: Get height and width of Image

Image functions are defined in catalog/image helper. getOriginalWidth gives width of image. getOriginalHeigh gives height of image. It is not getOriginalHeight(). Spelling mistake from Magento : getOriginalSizeArray gives the height and width of an image in array. $_product = $this->getProduct(); $imageWidth = $this->helper(‘catalog/image’)->init($_product, ‘image’)->getOriginalWidth(); if($imageWidth > 600) { $lightboxImage = …