Currency switcher in magento left or right sidebar


Need to show the drop down of currency in the sidebar ?

Below code will displays the currency drop down on left and right sidebar.
Open the directory.xml file in the layout folder (app/design/frontend/default/default/layout/directory.xml) and add the following code to it.

<default>
<!– Mage_Catalog –>
<reference name=”left”>
<block type=”directory/currency” name=”currency” before=”cart_sidebar” template=”directory/currency.phtml”/>
</reference>
<reference name=”right”>
<block type=”directory/currency” name=”currency” before=”cart_sidebar” template=”directory/currency.phtml”/>
</reference>
</default>

Comment the other node as show below Continue reading

Advertisements

Creating A Magento Module


A lot of community extensions (or modules) are available for the feature-rich open-source e-commerce solution Magento, but what if they don’t quite work as you want them to? Want to write your own module?

In this tutorial, we will introduce the coding of Magento in the form of a “Hello World”-style module. The goal of the module will be simply to write some information to a log file every time a product is saved. This very basic module will allow us to cover a number of interesting topics, including: Continue reading

How to edit footer in magento?


To edit footer’s in Magento follow these steps:

For the frontend: 
app\design\frontend\default\default\template\page\html\footer.phtml
or
app\design\frontend\your-interface\your-theme\template\page\html\footer.phtml

For the backend: 
(If you want to edit footer in back end):
app\design\adminhtml\default\default\template\page\footer.phtm
or
app\design\adminhtml\your-interface\your-theme\template\page\footer.phtm

How to remove index.php from url in magento


In Magento if you are getting the url as http://website.com/index.php/electronics/cell-phones.html and you want that index.php is not written on the url i.e. http://website.com/electronics/cell-phones.html.

Then use the following steps:

1) Login to admin section by using the URL
http://website.com/index.php/admin/

2) Then go to “System >>  Configuration >>Web >> Search Engines Optimization”
Use Web Server Rewrites : YES

3) Go to “System >>  Configuration >>Web >>Secure”
Use secure URL Frontend: YES

Toggling Default Value of Textbox on Focus


When you click on the textbox, the dafault value disappears and when the focus loses, the default value appears in the text box.
 
<div><input type=”text” name=”firstname” id=”firstname” value=”eg. Siddharth Jain” onfocus=”if(this.value==’eg. Siddharth Jain’){this.value=”;}” onblur=”if(this.value==”){this.value=’eg. Siddharth Jain’;}” /></div>