How to upgrade magento version from 1.9 to 2.0

You can’t really upgrade from 1.9 to 2.0. What you can do is migrate the installation from 1.9 to 2.0 You can find every detail you need in the official documentation here: http://devdocs.magento.com/guides/v2.0/migration/bk-migration-guide.html Here’s a workflow diagram that will give you a good idea of what to do:  

Read More »

How to set up multiple store in Magento

This tutorial is going to show you how to add and and manage Multiple Stores on your Magento website. Multiple Stores functionality allows you to power any number of stores or websites within a single Magento installation. It can be useful if you are going to sell products on different domains sharing the same admin panel […]

Read More »

cart subtotal and quantity in Magento

Hello FriendsIf you want to get cart subtotal and quantity in Magento then you can use my below script$items = Mage::getSingleton(‘checkout/session’)->getQuote()->getAllItems(); foreach($items as $item) {echo ‘ID: ‘.$item->getProductId().’‘;echo ‘Name: ‘.$item->getName().’‘;echo ‘Sku: ‘.$item->getSku().’‘;echo ‘Quantity: ‘.$item->getQty().’‘;echo ‘Price: ‘.$item->getPrice().’‘;echo ““;} Get total items and total quantity in cart :- $totalQuantity = Mage::getModel(‘checkout/cart’)->getQuote()->getItemsQty();Get subtotal and grand total price of cart […]

Read More »

Remove .html from URL in Magento

Hello FriendsIf 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 […]

Read More »

change the page tittle in Magento

Hello FriendsIf you want to change the page tittle in Magento then you can use my below method,Which are given as follows: (1) CMS page: Go to backend and open CMS > Manage Pages. Select page to edit and you can set title in ‘Page Title’ field. (2) In frontend and any module, you can […]

Read More »

call a phtml file from controller in magento

Hello FriendsIf you want to call phtml file from controller in magento then use my below script<?phpclass Namespace_Module_DisplayController extends Mage_Core_Controller_Front_Action{public function popupAction(){$block = $this->getLayout()->createBlock(‘core/template’)->setTemplate(‘zipcode/popup.phtml’);$this->getResponse()->setBody($block->toHtml());}}?>

Read More »

Get database connection details Magento

Hello FriendsIf you want to get database details in magento then you can use my below script $config  = Mage::getConfig()->getResourceConnectionConfig(“default_setup”);        $_host = $config->host;        $_uname = $config->username;        $_pass = $config->password;        $_dbname = $config->dbname;        echo $_host;  Let me know if you have any query

Read More »

Get customer order count in Magento

Hello FriendsIf you want to get order count of particular customer in magento from customer id then you can use my below script$customer_id = 5;$_orders = Mage::getModel(‘sales/order’)->getCollection()->addFieldToFilter(‘customer_id’,$customer_id);                       $_orderCnt = $_orders->count(); //orders countecho ‘Customer with ID ‘.$customer_id.’ has ‘.$_orderCnt.’ orders’;Let me know if you have any query

Read More »

get admin path in magento

Hello FriendsIf you want to get admin path name then use my below codeecho (string)Mage::getConfig()->getNode(‘admin/routers/adminhtml/args/frontName’);It will return admin or your admin custom path nameLet me know your comment if its not work for you

Read More »

Read config XML magento

Hello Friends Here, I will be showing you how you can read XML nodes from config.xml file of your module. It’s through the Magento way with Mage::getConfig()->getNode() function. 🙂Here is the XML code of my config.xml file. I will be reading the nodes of this XML file.<default>    <catalog>        <mypage>            <name>myname</name>            <age>100</age>            <address_one>earth</address_one>        </mypage>    </catalog></default>Here is […]

Read More »