how to change grid value in specfic category

  1. In the Magento Admin, go to Catalog->Manage Categories.
  2. Select the desired category.
  3. Select the Custom Design tab.
  4. Change the Custom Design drop-down (optional).
  5. Select 2 columns with left bar from the Page Layout drop-down.
  6. Add the following the the Custom Layout Update textarea
<reference name="product_list">
    <action method="setColumnCount"><columns>2</columns></action>

How to Add New Field Contact Form in magento

Step 1: Add field to phtml file

Go to app -> design -> frontend -> yourpackage -> yourtheme -> template -> contacts -> form.phtml

If you want to add required field:

    <label for="email"><em>*</em><?php echo Mage::helper('contacts')->__('Company Name') ?></label>
    <div class="input-box"><input name="company" id="company" title="<?php echo Mage::helper('contacts')->__('Company Name') ?>" class="input-text required-entry validate-email" type="text" /></div>

If you want to add non-required field:

    <label for="telephone"><?php echo Mage::helper('contacts')->__('Company Name') ?></label>
<div><input name="company" id="company" title="<?php echo Mage::helper('contacts')->__('Company Name') ?>" value="" type="text" /></div>

Magento Contact us Form

Step 2: Add new field detail in email

Open admin panel and go to System -> Transactional E-mails -> Add New Template
Then From the ‘Template’ dropdown menu choose ‘Contact Form’ and then click on ‘Load Template’. You’ll see the current email content, so you’ll simply need to add your new piece of data:

Name: {{var}}
E-mail: {{var}}
Telephone: {{var data.telephone}}
Company Name: {{var}}
Comment: {{var data.comment}}

Magento Contact Form Template

Step 3: Apply nwe template to contact email

Go to System -> Configuration -> Contacts. In the ‘Email Options’ section, choose your new template under the ‘Email Template’ dropdown menu and save.

Contactus Form Magento


particular search result in magento


Now Go to the following function in this file

public function prepareResult($object, $queryText, $query)

You have to change the following line

$likeCond = '(' . join(' OR ', $like) . ')';


$likeCond = '(' . join(' AND ', $like) . ')';

Now change the Search Type to “LIKE” from catalog search section in admin.

Magento: Add a custom field to the Contact Us Form

Update the Contact Us form template

Firstly you need to edit the contact form template.
If using the default theme, this code will be located in

Add the following markup to the template in the desired position:

<div class="input-box">
    <label for="where-hear"><?php echo Mage::helper('contacts')->__('Where did you hear about us?') ?> <span class="required">*</span></label><br />
    <select name="where-hear" id="where-hear" style="width:300px" class="required-entry">
        <option value="" selected>Please select...</option>
        <option value="Google">Google</option>
        <option value="Magazine">Magazine</option>
        <option value="Word of Mouth">Word of Mouth</option>
        <option value="Other">Other</option>

Note the use of class=”required-entry” on the select element.. This tells the default javascript validation that this field is required. If the user tries to submit the form without choosing an option, then it will throw an error and highlight the field.

So that takes care of the form, now you need to set up a custom email template that includes the new field.

Create a custom transactional email template

Navigate to the following screen in your Magento admin:
System > Transactional Emails

  1. Click Add New Template
  2. In the top block (Load default template), select “Contact Form” from the drop box and click Load Template
  3. In the Template Information block, set the Template Name to “Custom Contact Form”
  4. In the Template Content field, add the following line where you want it to appear in the email:
    Where did you hear about us?: {{var data.where-hear}}

Assign the custom email template

Navigate to the following screen in your Magento admin:
System > Configuration > General > Contacts

In the Email Options block, set the Email Template to “Custom Contact Form”.

Click Save Config and you’re all done.