How to get current currency in Magento

We know Magento support multiple currency. I have found the solution to check current currency in the Magento site frontend   To get Current Currency <?php echo $currency_code = Mage::app()->getStore()->getCurrentCurrencyCode(); ?>   If you looking for current currency symbol use : <?php echo Mage::app()->getLocale()->currency(Mage::app()->getStore()->getCurrentCurrencyCode())->getSymbol(); ?>


How to get product quantity : Magento

Sometimes we want to show remaining quantity of a product in our magento shop. Simple method to get product quantity is:   <?php (int) Mage::getModel(‘cataloginventory/stock_item’)->loadByProduct($_product)->getQty(); ?> It can be helpful to show an alert message like below:   <?php $product_qty=(int) Mage::getModel(‘cataloginventory/stock_item’)->loadByProduct($_product)->getQty(); if($product_qty<5) echo “Hurry up $product_qty quantity remaining”; ?>  


ERROR: failed to mkdir : Magento Problem

All the website developer (who works on Magento) know how to install the magento extension. We use magento downloader   to install extension. But sometimes we receive the an error “ERROR: failed to mkdir”. Generally you get the problem after moving the site from one host to another host. I just found the solution for [...]


Can not login into admin in localhost : Magento Problem

this is the most common problem we face when we install the magento in localhost. This is because of  session parameter. Really simple solution to commenting a single line. Below is the solution 1) go to root/app/code/core/Mage/Core/Model/Session/Abstract/ 2) Open the file Varien.php 3) go to line no. 100 4) you will get call_user_func_array(‘session_set_cookie_params’, $cookieParams); 5) [...]


Apache does not start – Xampp Problem

This is the most common problem which we face. We try to start but every time we get a warning “Warning : Terminating worker thread 0″ It is because Apache use port 80. So you need to check some program which use port no. 80. Normally skype use the port no. 80. Here is the [...]


XAMPP Installation

Xampp is really useful application for PHP programmer. As you know, we need  Apache server to run php programs. Most of the PHP  programmer know their own experience that it is not easy to install Apache server. Xampp is really easy to install containing MySQL, PHP and Perl. Download –> Extract –> Start You can [...]


Best Quote

A successful man is one who makes more money than his wife can spend. A successful woman is one who can find such a man. — Lana Turner The best way to make your dreams come true is to wake up. — Paul Valery Any intelligent fool can make things bigger and more complex… It [...]


Where to start Website Development?

Really big question for beginner who want to learn website development.  They go for learning PHP/MySQL, HTML, ASP, ASP.NET etc etc. The real fact is in this field we should have knowledge of Photoshop. I never said to become master, but my biggest concern is that learn some basic knowledge of Photoshop. After that we can start with HTML and [...]