For a better experience please change your browser to CHROME, FIREFOX, OPERA or Internet Explorer.

Custom Magento CMS page layout

Add new custom layout for few cms pages in one Magento shop. It’s really useful for different static pages of your shop. First create extension with only config file in it: app/code/local/Inchoo/AdditionalCmsPageLayouts/etc/config.xml <?xml version="1.0"?> <config> <global> <page> <layouts> <custom_static_page_one> <label>Custom static page 1</label> <template>page/custom-static-page-1.phtml</template> </custom_static_page_one> </layouts> </page> </global> </config> Then activate it: app/etc/modules/Inchoo_AdditionalCmsPageLayouts.xml <?xml version="1.0"?> […] Read More

product image change on mouse hover magento

If you want to change product image on mouse hover of more view image then you can use my below script Step1. open file on location given below app/design/frontend/default/default/template/catalog/product/view/media.phtml Step2. Search the code in media.phtml file <a href=”#” onclick=”popWin(‘<?php echo $this->getGalleryUrl($_image) ?>’, ‘gallery’, ‘width=300,height=300,left=50,top=50,location=no,status=yes,scrollbars=yes,resizable=yes’); return false;”> <!–nested img tag stays the same–> </a> Step 3. […] Read More

Remove .html from URL in Magento

If you want to Remove .html from URL in Magento then you can use my below method If you want to remove .html from all Magento’s category URL then Follow the below steps Go to System -> Config -> Catalog -> Search Engine Optimizations tab Delete “.html” from Category URL Suffix. Go to System->Index Management […] Read More

How to get parent category Id in Magento

To get Parent Category Id you must know the current category Id, for that you need to write <?php $_cat = new Mage_Catalog_Block_Navigation(); $curent_cat = $_cat->getCurrentCategory(); $curent_cat_id = $curent_cat->getId();?> Now you can get Parent Category Id. write the code given below to get the Id   <?php $parentId=Mage::getModel('catalog/category')->load($curent_cat_id)->getParentId(); echo $parentId; // $parentId will print your […] Read More

Display Products in shopping cart in a drop down format

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 the below steps to build one for you 1) If you would have observed our […] Read More

Replace filter links in layered navigation with checkbox

The layered navigation in Magento help to filter products with in catelog with attributes, price & categories etc. In default layered navigation, Magento use anchor link to filter products. Yesterday, I want to make checkbox instead of these anchor links. Makeing checkbox from anchor link is too easier than I think. I just want to […] Read More

Import Product Images via CSV in Magento

Step 1) Create the Data Flow profile The solution is to create a custom import profile (System > Import/Export > Dataflow – Profiles). You only need to include the attributes that are required, which is just the SKU. Plus the appropiate image attributes. Plus labels if you want to go all out. Setting according to […] Read More

How to remove wishlist in Magento

How to remove wishlist in Magento Process1 You just need to edit all cart and cart item templates to remove the wishlist column. You can remove wishlist column in the following files: checkout/cart.phtml checkout/cart/item/default.phtml downloadable/checkout/cart/item/default.phtml   Read More

Get Particular Category Product in magento

<?php $_productCollection = Mage::getModel(‘catalog/category’)->load(‘3’) ->getProductCollection() ->addAttributeToSelect(‘*’) ->addAttributeToFilter(‘status’, 1) ->addAttributeToFilter(‘visibility’, 4) ->setOrder(‘price’, ‘ASC’); ?> <div class=”home_right_bottom_product”> <ul> <?php $i = 0; ?> <?php foreach ($_productCollection as $_product): ?> <?php //print_r( $_product); exit;?> <?php if($i++ == 3) break; ?> // display only 3 product <li class=”item”> <a class=”product-image” href=”<?php echo $_product->getProductUrl() ?>”> <img src=”<?php echo $this->helper(‘catalog/image’)->init($_product, ‘small_image’)->resize(170,150); […] Read More

Display Cart Quantity & Total price in magento

<?php $count = $this->helper(‘checkout/cart’)->getSummaryCount();  //get total items in cart $total = $this->helper(‘checkout/cart’)->getQuote()->getGrandTotal(); //get total price if($count==0) { echo $this->__(‘<a href=”/checkout/cart” >(0 ITEMS)</a>’,$count); } if($count==1) { echo $this->__(‘<a href=”/checkout/cart” >(1 ITEM)</a>’,$count); } if($count>1) { echo $this->__(‘<a href=”/checkout/cart” >(%s ITMES)</a>’,$count); } echo $this->__(‘Total: %s’, $this->helper(‘core’)->formatPrice($total, false)); ?>   Read More

Display Product Attribute in product view page in magento

Open your theme view.phtml file and past this code where you want to display custom attribute   <?php if ($_product->getResource()->getAttribute(‘product_dimensions’)->getFrontend()->getValue($_product)):?> <?php echo $_product->getResource()->getAttribute(‘product_dimensions’)->getFrontend()->getValue($_product);?>   <?php endif; ?> Read More

Product Details View Page Layout change in magento

Open your theme local.xml file and past following code  <catalog_product_view> <reference name=”root”> <action method=”setTemplate”><template>page/1column.phtml</template></action> </reference> </catalog_product_view> Read More

Category Page Layout Change in magento

Open your theme local.xml file and past following code <!–  code start here –> <catalog_category_default> <reference name=”root”> <action method=”setTemplate”> <template>page/2columns-left.phtml</template> </action> </reference> </catalog_category_default> <catalog_category_layered> <reference name=”root”> <action method=”setTemplate”> <template>page/2columns-left.phtml</template> </action> </reference> </catalog_category_layered>   <!–  code End here –> Read More

is Home page condition in magento

<?php $routeName = Mage::app()->getRequest()->getRouteName(); $identifier = Mage::getSingleton(‘cms/page’)->getIdentifier(); if($routeName == ‘cms’ && $identifier == ‘home’) { ?> You Are on Home Page <?php  } else { You Are Not on Home Page } ?>     Read More

Magento Quesition & Answer

16. How to get product information from product Id?. $productid    = 3; $_ProductInfo = Mage::getModel(‘catalog/product’)->load($productid); $_ProductArr  = $_ProductInfo->getData(); 17. How to get total items and total price in shopping cart of magento. $cartQuantity  =  Mage::getSingleton(‘checkout/cart’)->getItemsCount(); $TotalPrice      =  Mage::getSingleton(‘checkout/cart’)->getQuote()->getGrandTotal();   18. What are handles in magento. In Magento Handles(layout) are used to maintain the structure of the […] Read More

Magento Questions

1. What is Magento. Magento is an open source-ecommerce web application developed by Varien, launched on 31st March 2008. Magento was built by using the part of Zend Framework and using the EAV (entity-attribute-value) database model to save the data. Now Magento is divison of eBay. On June 6 2011 eBay owns 100% of Magento. 2. How […] Read More

Top