Your SlideShare is downloading. ×
Tutorial about create custom contact form in magento
Tutorial about create custom contact form in magento
Tutorial about create custom contact form in magento
Tutorial about create custom contact form in magento
Tutorial about create custom contact form in magento
Tutorial about create custom contact form in magento
Tutorial about create custom contact form in magento
Tutorial about create custom contact form in magento
Tutorial about create custom contact form in magento
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Tutorial about create custom contact form in magento

10,676

Published on

Magento Extension Development | Magento Development India | Magento Development Company

Magento Extension Development | Magento Development India | Magento Development Company

Published in: Design, Technology
2 Comments
1 Like
Statistics
Notes
  • What a filthy copy and paste job!

    For those looking for the original posting of this content see the following link:

    http://www.crearecommerce.co.uk/blog/magento-tutorials/create-a-custom-contact-form-in-magento.php

    Not even a mention of the original creator... You should be ashamed.
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • http://www.slideshare.net/bhupendrarajput/wordpress-developers-new-york
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
No Downloads
Views
Total Views
10,676
On Slideshare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
31
Comments
2
Likes
1
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Tutorial about Create Custom Contact Form inMagento
  • 2. sql/customcontacts_setup/mysql4-install-0.1.0.phpManually inserting a custom email template straight into the database.This isn’t really a necessary step because you could just create onemanually by going to System > Transactional Emails. To save you a bit oftime I’ve set up a really basic one which is very similar to the standardcontact form email template.
  • 3. 1 | <?php2 | $installer = $this;3 | $installer->startSetup();4 |5 | $installer->run("6 | INSERT INTO {$this->getTable(core_email_template)}(`template_code`, `template_text`, `template_type`, `template_subject`, `template_sender_name`, `template_sender_email`, `added_at`, `modified_at`) VALUES7 | (Custom Contact Form, Name: {{var data.name}}rnSubject: {{var data.subject}}rnE-mail: {{var data.email}}rnTelephone: {{var data.telephone}}rnComment: {{vardata.comment}}, 1, Custom Contact Form, NULL, NULL, NOW(), NOW());8 | ");9 | $installer->endSetup();
  • 4. etc/config.xmlWhen creating frontend router, specified it as ‘custom-contact’. You can change thisto something more appropriate.1 | <routers>2 | <customcontacts>3 | <use>standard</use>4 | <args>5 | <module>Creare_Customcontacts</module>6 | <frontName>custom-contact</frontName>7 | </args>8 | </customcontacts>9 | </routers>
  • 5. During the setup script, create a transactional email template, but it’s notpossible to set this as a default with your form. So, you have to set a defaultform from the locale unless you want to go and create your own html form inthe locale. The following goes within the global node:1 | <template>2 | <email>3 | <contacts_customemail_email_template translate="label">4 | <label>Contacts</label>5 | <file>contact_form.html</file>6 | <type>text</type>7 | </contacts_customemail_email_template>8 | </email>9 | </template>
  • 6. Following goes within the default node. This is just the process of assigning defaults tothe new config fields.1<default>2 <contacts>3 <customcontacts>4 <enabled>1</enabled>5 </customcontacts>6 <customemail>7 <recipient_email><![CDATA[hello@example.com]]></recipient_email>8 <sender_email_identity>custom2</sender_email_identity>9 <email_template>contacts_customemail_email_template</email_template>10 </customemail>11 </contacts>12</default>
  • 7. ConfigurationOnce uploaded you need to set the custom email template to the new form: System >Configuration > Contacts.
  • 8. If you leave the config.xml settings as default you will be able to go toyourdomain.com/custom-contacts to view your form. It will look identical to thenormal contact form. Now you can add as many extra fields as you want to thetemplate file without effecting the standard contact form. It can be found in thebase/default theme at customcontacts/form.
  • 9. KGN Technologies is a one-stop solution for any of your Magento ecommerce webdevelopment requirements. Our team of expert Magento developers is well trained andcapable to develop most complex Magento websites. We can convert PSDs to pixel perfectMagento theme including developing Responsive Magento websites, custom Magentodevelopment, Integrating third party Systems with Magento, Payment Gatewayimplementation, maintenance and support work.Please contact us to know more about our price, examples and hiring models. We have agood strong portfolio to share and proven offshore Magento development methodologywhich can help you in reduction of development cost.Contact details :Email_id : info@kgntechnologies.comWebsite : www.kgntechnologies.com

×