Google+

Pages

Wednesday, December 5, 2012

Magento: How to setup multiple currency shop

To setup Multiple currencies for magento store is very easy. To do so, just follow below steps:


1. Login to admin panel of your website.
2. Go to System --> Configuration, then select Currency Setup from General tab.



        Then select values for Base currency, Default display currency and Allowed currencies and Save Config button.



Note: Press Control key of key board while selecting multiple options from Allowed Currencies section.

Magento still does not know about currency rates for newly selected currencies. To let magento know about currency interchange rates, follow step #3.

3. Go to System --> Manage Currency --> Rates.



        Just click on Import button on top right side. Now click on Save Currency Rates button.



Note: You can provide values manually also, but it is recommended to import rates from web service.

That's all.. refresh magento cache and you are done. Now on frontend prices of products can be displayed in the currencies you configured.

Magento: How To Set Up Multiple Languages in Magento


In order to configure a different language for your store, you need to follow a simple procedure:

1. First go to http://www.magentocommerce.com/translations, where you will find various language translations packs for default Magento interface.
        Download the language pack for the desired language, extract and paste the extracted files to respective places in your Magento directory.
         or
You can install it directly by searching and installing through Magento Connect.

2. Now go to Admin Panel, then go to System --> Manage Stores.



        Click on Create Store View button.
Select Store, provide appropriate value for Name and code, and select Enabled from Status dropdown. Click on Save Store View button.

3. Now go to System --> Configuration and Select Store View (which you created in step #2).
Clicking on General tab (on left side), you will see Locale Options on right side. Select installed Language from Locale dropdown. Save Config.



and you are done. Just Clear Magento Cache Storage and see reflection on frontend of you website.

Monday, December 3, 2012

Magento: Upgrading mysql setup of module


Suppose, you are working on a module, and you need to:

* Add a new table, or
* Modify current tables, or
* Insert some default data in existing table, or
* Add/ modify some attributes

In every case, either you will
1. goto core_resource table
2. delete module's entry
3. and delete current tables of module

which is a poor solution, because sometimes, you don't have direct access to database, so you can't delete/ modify data in db in that case.
There is a simple solution for this. You can do it by simply upgrading you module version and write a new mysql upgrade file.


Suppose, you have a module named Mymodule. Its version is 0.1.1. You have the mysql setup file (mysql install file) mysql4-install-0.1.1.php in Mymodule/sql/mymodule_setup folder of your module.

You don’t need to make direct changes to database. To fulfill any of the above tasks in your module,


1) First create a new mysql upgrade file inside Mymodule/sql/mymodule_setup folder.

Let us suppose that you are going to change the version of your module from 0.1.1 to 0.1.2.

The name of mysql upgrade file should be mysql4-upgrade-0.1.1-0.1.2.php

2) Write necessary sql statements in this mysql upgrade file.

3) Now, you have to change the version in config.xml in Mymodule/etc folder as well.

Change the version like 0.1.2. Which is the new version for our module.

4) Reload your site. And you are done!


Note: The upgrade format is like mysql4-upgrade-CURRENT_VERSION-UPGRADED_VERSION.php


Enjoy.. :)