Step One: Modify the (interface)/(theme)/template/contacts/form.phtml file.
Say we would like to add a field called ‘Test’ in between e-mail and telephone on the default field.
="input-box">
Say we would like to add a field called ‘Test’ in between e-mail and telephone on the default field.
- class
<input name="email" id="email" title="__('Email') ?>" value="htmlEscape($this->helper('contacts')->getUserEmail()) ?>" class="required-entry input-text validate-email" type="text"/>
class
class
<input name="telephone" id="telephone" title="__('Telephone') ?>" value="" class="input-text" type="text"/>
Here is the new field:
- class
<input name="email" id="email" title="__('Email') ?>" value="htmlEscape($this->helper('contacts')->getUserEmail()) ?>" class="required-entry input-text validate-email" type="text"/>
class
class
<input name="test" id="test" title="__('Test') ?>" value="" class="input-text" type="text"/>
class
<input name="telephone" id="telephone" title="__('Telephone') ?>" value="" class="input-text" type="text"/>
Step Two: Create the new Transactional E-Mail form.
1) Go to System→Transactional E-mails in the Magento Admin section. 2) Click ‘Add New Template’ 3) From the ‘Template’ dropdown box select ‘Contact Form’ 4) Click ‘Load Template’ 5) Under template content you will see:
1) Go to System→Transactional E-mails in the Magento Admin section. 2) Click ‘Add New Template’ 3) From the ‘Template’ dropdown box select ‘Contact Form’ 4) Click ‘Load Template’ 5) Under template content you will see:
- Name: {{var data.name}}
- E-mail: {{var data.email}}
- Telephone: {{var data.telephone}}
- Comment: {{var data.comment}}Add your new field in between E-mail and Telephone:
- Name: {{var data.name}}
- E-mail: {{var data.email}}
- Test: {{var data.test}}
- Telephone: {{var data.telephone}}
- Comment: {{var data.comment}}
No comments:
Post a Comment