Monday 24 October 2011

How to create multi store in magento



The only changes you have to do which is not given in this video is as follows
Open the index.php file that you have copied to new folder
find the below line:
$mageRunCode = isset($_SERVER['MAGE_RUN_CODE']) ? $_SERVER['MAGE_RUN_CODE'] : '';
Replace this line by
$mageRunCode = isset($_SERVER['MAGE_RUN_CODE']) ? $_SERVER['MAGE_RUN_CODE'] : 'shoestore';
It will automatically take the MageRunCode of shoestore
Similaarly find the following line:
$mageRunType = isset($_SERVER['MAGE_RUN_TYPE']) ? $_SERVER['MAGE_RUN_TYPE'] : '';
Replace this line by
$mageRunType = isset($_SERVER['MAGE_RUN_TYPE']) ? $_SERVER['MAGE_RUN_TYPE'] : 'store';
Save the changes and refresh the index.php file in browser
You are done with Multistore in magento


For any magento customization contact :
Company : Parsys Media
Mumbai Office :
Mobile No : +91-8123481528(Ashish Khadpe)

Sunday 16 October 2011

How to remove decimal price in magento

Hello Everyone,

                 Today I’m going to tell you how to remove decimal price in magento.In simple words, This tutorial will tell to change the price from Rs. 121.00 to Rs . 121 for example.
                For this, you need to edit code/core/Mage/Directory/Model/Currency.php


  • Open  code/core/Mage/Directory/Model/Currency.php
  •  Find the following :-
 public function format($price$options=array(), $includeContainer = true, $addBrackets = false)
    {
        return $this->formatPrecision($price, 2, $options$includeContainer, $addBrackets);
    }


on line no 194
change this code to:-

 public function format($price$options=array(), $includeContainer = true, $addBrackets = false)
    {
        return $this->formatPrecision($price, 0, $options$includeContainer, $addBrackets);
    }

0 - Denotes the precision point for price..

But wait, you are still not done. The most important thing is still left.
- Clear the Cache.
- Go to System –> Cache Management
- Refreh Cache.
- If you have not enabled the Cache OR if it didn’t work even after refreshing the cache, then
- delete the cache folder present inside var (var/cache)


You can also refer to the video showing how it actually works


For any magento customization contact :
Company : Parsys Media
Mumbai Office :
Mobile No : +91-8123481528(Ashish Khadpe)





Tuesday 11 October 2011

Problem while login into the Admin Panel of Magento

Hello People,
Today after installing magento on my local computer i came across a new problem. The Problem was 'i was unable to login the admin panel of magento. It was redirecting me to the same admin login page. If any one of you are facing this problem the here's the solution:

Problem:
I was entering the URL as 'loclahost/magento/admin' after entering the username and password, it was redirecting me on the same page.

Solution:
I replaced 'localhost' in the URL with '127.0.0.1' and so my URL was '127.0.0.1/magento/admin' and after entering the username and password, i was redirected to the admin panel of magento.

hope this helps you.


For any magento customization contact :
Company : Parsys Media
Mumbai Office :
Mobile No : +91-8123481528(Ashish Khadpe)

Sunday 9 October 2011

Insert rupee symbol instead of Rs in magento

Hello Everyone,

                 Today I’m going to tell you how to change Currency symbol in magento.In simple words, This tutorial will tell to change the currency symbol of rupee (from Rs to an rupee image). By default, the currency symbol for rupee is Rs.
                 For this, you need to edit app\design\frontend\base\default\template\catalog\product\new.phtml
 if you want to change rupee symbol in new arrival page
Go to line no 38
 wherever you see the following code

<?
php echo $this->getPriceHtml($_product, true, '-new'); ?>


replace it by 


<?php
$string = $this->getPriceHtml($_product, true, '-new');
$string = str_replace("Rs", "<img src='http://www.myiris.com/insurance/images/rupee_icon.gif'>", $string);
echo $string; 
?>


You can also refer to the video showing how it actually works





Alternate Solution:


We have previously posted the solution for INR symbol. But that was playing with code, finally we were able to solve that problem in easy way. Here it goes:

Step 1: Goto: lib/Zend/Locale/Data/root.xml
  Make changes in root.xml
  find <currency type=”INR”> replace next line with this <symbol>Rs. </symbol>
save the page as rupee.js and save it inside /js folder of the root.
Step 3: Goto: \app\design\frontend\default\your-theme\layout edit page.xml
After this <block type=”page/html_head” name=”head” as=”head”>
add <action method=”addJs”><script>rupee.js</script></action>
Step 4 : Clear cache by deleting all the files and folder inside /var/cache folder. Clear cache from back-end as well.
All done, u have just replaced Rs. with INR new symbol, which was designed by an IIT Graduate.  


For any magento customization contact :
Company : Parsys Media
Mumbai Office :
Mobile No : +91-8123481528(Ashish Khadpe)

Sunday 2 October 2011

Magento Installation problems

Hello Everyone,

Today I’m going to tell you how to tackle different problems faced by the developer during the installation of magento.Magento Installation process is different for localhost & for online web hosting.In this article we are going to tackle basic problems as follows:

  1. Internal server error  - 500 
  2. Some extensions are missing like mcrypt,curl,PDO_MySQL.
  3. No input file specified (mostly projects hosted on GoDaddy domain) 
Problem No 1 : Internal server error  - 500
Solution : This problem generally occurs when we don't have correct permission on files during installation Magento Expects that Each and Every folder and File  with permissions 755. So to avoid this problem you need to change permission of Magento Folder and index.php to 755. Sometimes it is also required to change the permission of .htaccess to 755.






    Problem No 3 : No input file specified (mostly projects hosted on GoDaddy domain)
    Solution : A common error which usually comes up if you’re hosted by GoDaddy, is the no input file specified error.
    If you do not have Magento setup in the root of your server, make sure to add the following to your .htaccess file.

    RewriteBase /yourbasepath/
    Once that is verified, there are a couple things you can do to fix this, but we’ll start with the one that usually works.
    In your web root directory, there should be a file called php.ini. Rename this to php5.ini.
    If there is no php5.ini file. Create the file and upload it to your root directory.
    If that doesn’t work, add the following to the end of your newly renamed php5.ini file:

    cgi.fix_pathinfo = 1
    And if you’re still getting the error, add the following to the top of your .htaccess file:

    Options -MultiViews
    The first one usually does the trick. If you don’t see this file in there, then create a blank php5.ini file add add the line listed on the second suggestion.
    If all of the above has not worked, KEEP your changes, wait exactly 24 hours. Go back to youraddress.tld/downloader and try again. You may just be cached and for some reason it takes a bit longer then I was used to. Keep your chin up!
    If nothing above worked, call GoDaddy up and have them either rename this for you, or make sure you’re on PHP 5.


    For any magento customization contact :
    Company : Parsys Media
    Mumbai Office :
    Mobile No : +91-8123481528(Ashish Khadpe)