Get Product Image based on its Position – Magento

Blog Archives

Get Product Image based on its Position – Magento

You might have seen website where the product images changes when you move mouse on it. In this tutorial i’ll show you how to do it with Magento. You need to create a small module to achieve this. We will

Posted in Blog, Magento Tagged with: , ,

Magento – Install and Upgrade Database script

I struggled a lot to find a method to install a simple database script in Magento for creating a table or upgrading field or column. In the end I thought why not write one for reference. This post is mainly

Posted in Blog, Magento Tagged with: , , , , ,

Passing values and parameters to template file using XML and ShortCode from Magento Admin

At times there is a need to pass some parameters to template file in Magento. Some of the conditions are as follow: 1) Category Id is needed to be passed to display all the products of that particular category 2)

Posted in Blog, Magento Tagged with: , ,

Reset Order id after clearing dummy Orders in Magento

After developing a website, Developers delete all the dummy order placed using either a SQL script or using one of the free extension available on Magento Connect. After deleting orders, the Order Id still continues to be in the previous

Posted in Blog, Magento Tagged with: , ,

Display special priced products on your Magento homepage

Step 1: Open your homepage CMS page and click on the content tab. Paste the following: {{block type=”catalog/product” name=”home.new” alias=”product” template=”catalog/product/special.phtml”}}   Step 2: First of all this is the code were that we’re going to be using to do

Posted in Blog, Magento Tagged with: , , ,

How to install/setup language pack in Magento

Are you confused with installing language pack in Magento? Don’t be its too easy 😉 In this post we will go through Installing language pack in Magento Step 1 : Select the language you want to set on your website.

Posted in Blog, Magento Tagged with: ,

Display magento products by category ID

<?php $categoryIds = array(18);//category id $collection = Mage::getModel(‘catalog/product’) ->getCollection() ->joinField(‘category_id’, ‘catalog/category_product’, ‘category_id’, ‘product_id = entity_id’, null, ‘left’) ->addAttributeToSelect(‘*’) ->addAttributeToFilter(‘category_id’, array(‘in’ => $categoryIds)) $_collectionSize = $collection->count() ?> Get detail of products <ul> <?php $i=0; foreach ($collection as $_product):  ?> <?php $i++;?>

Posted in Blog, Magento Tagged with: , , ,

Display Products in shopping cart in a drop down format in Magento

You might have seen the cart summary drop down in many websites as shown in the image below. Making such a drop down is pretty easy using Magento. You just need to know little bit of jquery for it. Follow

Posted in Blog, Magento Tagged with: ,

Registration Mobile number validation In Magento

Some time in account registration we need validate mobile no, for that use this code <input type=”text” name=”telephone” id=”telephone” value=”<?php echo $this->htmlEscape($this->getFormData()->getTelephone()) ?>” title=”<?php echo $this->__(‘Telephone’) ?>” class=”input-text validate-mobileno” /> Replace script  <script type=”text/javascript”> //<![CDATA[  var dataForm = new VarienForm(‘form-validate’,

Posted in Blog, Magento Tagged with: , , ,

Export the database table as CSV format using PHP

This code need some files those files are, 1.db.php 2.export.php 3.index.php as in the db.php file, make this. database name –> wallstreet table name–> export_table column names –> id,name,place and as you, here i just declare what i have given

Posted in Blog, PHP Tagged with: , , ,