applecart_girl Posted November 21, 2011 Share Posted November 21, 2011 Hi there! I have just managed to add a new 'field' for a phone number on my contact form, however I can't get the code to send it through along with the other ones when I get a notification email when a customer contacts me via the form. This is what I've got so far ... can anyone tell me what I need to put in?? Thanks! </p> <p id="desc_contact0" class="desc_contact"> </p> {foreach from=$contacts item=contact} <p id="desc_contact{$contact.id_contact|intval}" class="desc_contact" style="display:none;"> <label> </label>{$contact.description|escape:'htmlall':'UTF-8'}</p> {/foreach} <p class="text"> <label for="email">{l s='E-mail address'}</label> <input type="text" id="email" name="from" value="{$email}" /> </p> <p class="text"> <label for="phone">{l s='Phone number'}</label> <input type="text" /> </p> <p class="textarea"> <label for="message">{l s='Message'}</label> <textarea id="message" name="message" rows="7" cols="35">{if isset($smarty.post.message)}{$smarty.post.message|escape:'htmlall':'UTF-8'|stripslashes}{/if}</textarea> </p> <p class="submit"> Link to comment Share on other sites More sharing options...
Rhapsody Posted November 21, 2011 Share Posted November 21, 2011 I'm not sure if this helps, but it describes how to add new data fields in an email template. Perhaps the contact form email uses the same approach. http://www.addons-modules.com/prestashop-tips/2010/10/prestashop-tips-how-to-add-new-data-fields-in-email-template/ Link to comment Share on other sites More sharing options...
musicmaster Posted December 13, 2011 Share Posted December 13, 2011 Did you have a look at ContactController.php in the controllers directory? 1 Link to comment Share on other sites More sharing options...
Dave L Posted December 13, 2011 Share Posted December 13, 2011 Do do this you need to edit contact-form.tpl and ContactController.php Then you need to edit contact.html contact.txt contact_form.html & contact_form.txt in your /mails language folder. If you are using more than one language you would need to do the edits there too. More info HERE If it's just the phone number you want to add just do that part and ignore the others. If you check my post #12 I have included the files if you don't want to do the edit yourself. 1 Link to comment Share on other sites More sharing options...
Recommended Posts