Tip's on Magento, Web Development & Other Stuff

How to enable template path hints in magento admin

As you may know, Magento provides template path hints function to help you debug your template. However, this function is only available in front-end. Sometimes, you need to debug the template in back-end. How should you do? I have a tip to enable template path hints for magento admin. In the configuration file (config.xml) of…

Read More

How to validate form in magento

As you know, Magento uses Prototype as javascript library.  It provides a simple way to validate html form values. Below is an example: <form name=”my-form” id=”my-form” method=”post”> <label for=”firstname”> < ?php echo $this->__(‘First name’) ?> <span>*</span></label><br /> <input  id=”firstname” name=”firstname” class=”input-text required-entry”/> <label for=”lastname”> < ?php echo $this->__(‘Last name’) ?> <span>*</span></label><br /> <input  id=”lastname” name=”lastname”…

Read More

Magento templates and layout files location

It’s a bit late already, but I wanted to make sure I put at least one thing today so we’re going to go over the next question in the Magento Certification Study Guide. Here’s the question from the guide — lets get to it! Describe Magento templates and layout files location A theme consists of…

Read More

How to enable demo store notice in magento

During the development phase of the store it is necessary to put the notice so the customers can aware about that and not to place any order. You should also block your demo site for robots to crawl so that it won’t crawl your dummy content under that domain. Magento provides the setting in admin…

Read More

How to call block in phtml file in magento

It is sometime really needed to show the custom block or any static block in the PHML file. Generally on the magento websites home page or any other pages uses one column layout and it is needed to show the left of right sidebar blocks like compare products, poll, cart block which are there in…

Read More

How to display Newsletter form in Header / Footer

How to display Newsletter form in Footer 1. Go to app/design/frontend/default/your_theme/layout/ open newsletter.xml you will see code block like this : … <default> <!– Mage_Newsletter –> <reference name=”left”> <block type=”newsletter/subscribe” name=”left.newsletter” template=”newsletter/subscribe.phtml”/> </reference> </default> … 2. Add following code there like this : … <default> <!– Mage_Newsletter –> <reference name=”footer”> <block type=”newsletter/subscribe” name=”footer.newsletter” template=”newsletter/subscribe.phtml”/> </reference>…

Read More