Jump to content

(Solved) Customer Contact Form


calgaryx

Recommended Posts

1 hour ago, webprog said:

You can use similar example but for prestashop 1.7 and for captcha in contact form:

https://webproggi.com/en/prestashop-category/installation-google-recaptcha-v3-to-contact-form-prestashop-1-7.html

 

Thanks for your replay.

I have installed module Google recaptcha v3. It works good. But with current customer contact module anybody can send you a letter...spam you.. You can not do anything about it. But if if you have their ip address at list you can block (ban) that person.

Link to comment
Share on other sites

@calgaryx

To add an IP address in the email please install the below module and make some changes in a mail template file.

Please attached module.


Modify your contact.html and contact.txt templates to include the {customer_ip} placeholder.

contact.html

Syntax:

<tr>
    <td align="left" style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; font-size: 0px; padding: 10px 25px; padding-top: 0px; word-break: break-word;">
        <div style="font-family:Open sans, arial, sans-serif;font-size:16px;line-height:25px;text-align:left;color:#363A41;" align="left">
            <span class="label" style="font-weight: 700;">Customer IP:</span>
            <span> {customer_ip}</span>
        </div>
    </td>
</tr>

Screenshot: https://prnt.sc/hFzKNpK88Qt0

contact.txt

Syntax:
Customer IP: {customer_ip}
Screenshot: https://prnt.sc/WmZNikADQz1q

Clear your PrestaShop cache from the back office (Advanced Parameters > Performance > Clear Cache).

Submit the contact form and verify that the emails now include the Customer IP.

ps_contact_form_ip.zip

Link to comment
Share on other sites

9 hours ago, WebDesk Solution said:

@calgaryx

To add an IP address in the email please install the below module and make some changes in a mail template file.

Please attached module.


Modify your contact.html and contact.txt templates to include the {customer_ip} placeholder.

contact.html

Syntax:

<tr>
    <td align="left" style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; font-size: 0px; padding: 10px 25px; padding-top: 0px; word-break: break-word;">
        <div style="font-family:Open sans, arial, sans-serif;font-size:16px;line-height:25px;text-align:left;color:#363A41;" align="left">
            <span class="label" style="font-weight: 700;">Customer IP:</span>
            <span> {customer_ip}</span>
        </div>
    </td>
</tr>

Screenshot: https://prnt.sc/hFzKNpK88Qt0

contact.txt

Syntax:
Customer IP: {customer_ip}
Screenshot: https://prnt.sc/WmZNikADQz1q

Clear your PrestaShop cache from the back office (Advanced Parameters > Performance > Clear Cache).

Submit the contact form and verify that the emails now include the Customer IP.

ps_contact_form_ip.zip 10.21 kB · 1 download

It works like a charm. 

Thank you very much.

Link to comment
Share on other sites

  • calgaryx changed the title to (Solved) Customer Contact Form
On 11/26/2024 at 8:27 AM, WebDesk Solution said:

@calgaryx

To add an IP address in the email please install the below module and make some changes in a mail template file.

Please attached module.


Modify your contact.html and contact.txt templates to include the {customer_ip} placeholder.

contact.html

Syntax:

<tr>
    <td align="left" style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; font-size: 0px; padding: 10px 25px; padding-top: 0px; word-break: break-word;">
        <div style="font-family:Open sans, arial, sans-serif;font-size:16px;line-height:25px;text-align:left;color:#363A41;" align="left">
            <span class="label" style="font-weight: 700;">Customer IP:</span>
            <span> {customer_ip}</span>
        </div>
    </td>
</tr>

Screenshot: https://prnt.sc/hFzKNpK88Qt0

contact.txt

Syntax:
Customer IP: {customer_ip}
Screenshot: https://prnt.sc/WmZNikADQz1q

Clear your PrestaShop cache from the back office (Advanced Parameters > Performance > Clear Cache).

Submit the contact form and verify that the emails now include the Customer IP.

ps_contact_form_ip.zip 10.21 kB · 3 downloads

Hi there.

It's me again. 

I have two domain. Two webshop installation.

Like i mention before on first i setup without problems.

It worked like a charm.

I try to setup on my another webshop installation. 

Follow same proceeders. Basicaly copied already working contact.html and contact.txt files. Cleared cache.

But nothing happened.  No efect. 

Any idea why....?

Could Cloudfare caching or something else?

Thanks

 

Link to comment
Share on other sites

On 12/2/2024 at 6:17 AM, WebDesk Solution said:

@calgaryx

Okay, as per your last comment, I have made the changes in both files, but it had no effect. Please check the files located in this directory: themes/{{your_theme}}/mails/{{your_language_code}}, and apply the same changes to those files.

 

Thanks for your help. I really apricate.

It working now.

Thanks again.

Link to comment
Share on other sites

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...