Jump to content

Adding Mobile Phone Number in Contact Form


Dave L

Recommended Posts

Hi,

 

Appreciate any help/advice. I'm not an expert by any means with coding although I am learning.

 

I sometimes get messages from customers using the Contact Us form where they have made an error when entering their email address which results in a bounce back when I reply to it..

I would like for them to include their mobile phone number on the form so that if the email gets bounced back I can follow up with a phone call.

 

In mytheme/contact-form.tpl I have added the following:

 

<p class="text">
<label for="phone_mobile">{l s='Mobile Phone:'}</label>
<input id="phone_mobile" class="text" type="text" value="" name="phone_mobile">
</p>

 

and in mails/en/contact.html I have added:

 

<td align="left">
E-mail address: <a href="mailto:{email}"><b>{email}</b></a>
<br><br>
Mobile Phone: {phone_mobile}
<br><br>
Message: {message}
  </td>

 

When I test this the email I receive from the customer is missing the phone number like this:

 

 

E-mail address: [email protected]
Mobile Phone: {phone_mobile}
Message: message from customer here.

 

Where have I gone wrong please.

 

Thanks.

Link to comment
Share on other sites

\modules\mailalerts\mailalerts.php

 

After:

 

'{delivery_phone}' => $delivery->phone,

 

Add this code:

 

'{delivery_phone_mobile}' => $delivery->phone_mobile,

 

After:

 

'{invoice_phone}' => $invoice->phone,

 

Add this code:

 

'{invoice_phone_mobile}' => $invoice->phone_mobile,

 

 

In file:

\modules\mailalerts\mails\ru\new_order.html

 

Add where you need: {delivery_phone_mobile} и {invoice_phone_mobile}

Link to comment
Share on other sites

  • 3 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...