Post by greendragon2020 » Tue Jun 16, 2020 4:06 am

When a customer send us and email (through the Contact us), the subject line is "Your Store" how can i change that to their name? Version. 3.0.3.3


Posts

Joined
Fri May 22, 2020 7:22 am

Post by opencartmart » Tue Jun 16, 2020 2:35 pm

greendragon2020 wrote:
Tue Jun 16, 2020 4:06 am
When a customer send us and email (through the Contact us), the subject line is "Your Store" how can i change that to their name? Version. 3.0.3.3
The default subject line of the contact-email is `Enquiry {senderName}`. Not sure how you get such an email subject.

You can change the subject in the file catalog/controller/information/contact.php and the following code is responsible for the subject

Code: Select all

$mail->setSubject(html_entity_decode(sprintf($this->language->get('email_subject'), $this->request->post['name']), ENT_QUOTES, 'UTF-8'));
Disclaimers: It is recommended using ocmod to modify any files instead of modifying the file directly

XForm - Opencart Form Builder
Xshippingpro - An advanced Shipping Module
Need Professional support? Skype: opencartmart


Active Member

Posts

Joined
Wed Oct 02, 2013 3:59 am

Post by greendragon2020 » Sat Jun 20, 2020 3:25 am

opencartmart wrote:
Tue Jun 16, 2020 2:35 pm
greendragon2020 wrote:
Tue Jun 16, 2020 4:06 am
When a customer send us and email (through the Contact us), the subject line is "Your Store" how can i change that to their name? Version. 3.0.3.3
The default subject line of the contact-email is `Enquiry {senderName}`. Not sure how you get such an email subject.

You can change the subject in the file catalog/controller/information/contact.php and the following code is responsible for the subject

Code: Select all

$mail->setSubject(html_entity_decode(sprintf($this->language->get('email_subject'), $this->request->post['name']), ENT_QUOTES, 'UTF-8'));
Disclaimers: It is recommended using ocmod to modify any files instead of modifying the file directly
Thank you for your reply, it has to do with the Journal theme, it works fine with the default theme. I have contacted them on this.


Posts

Joined
Fri May 22, 2020 7:22 am

Post by WayneOB » Thu Jun 24, 2021 10:47 pm

In Version: 3.0.2.0 (maybe other versions too) you can edit core language file.
Go to: catalog\language\en-gb\information\contact.php

Look for:

Code: Select all

// Email
$_['email_subject']  = 'Enquiry: %s';
Change to:

Code: Select all

// Email
$_['email_subject']  = 'My Website - Enquiry: %s';
Subject header will now be: My Website - Enquiry: Customer Name

As mentioned above, it is best to do via ocmod or custom theme language files as core updates updates will override.

New member

Posts

Joined
Tue Feb 09, 2016 6:33 pm

Post by kuochinwu » Fri May 06, 2022 10:46 pm

greendragon2020 wrote:
Sat Jun 20, 2020 3:25 am
opencartmart wrote:
Tue Jun 16, 2020 2:35 pm
greendragon2020 wrote:
Tue Jun 16, 2020 4:06 am
When a customer send us and email (through the Contact us), the subject line is "Your Store" how can i change that to their name? Version. 3.0.3.3
The default subject line of the contact-email is `Enquiry {senderName}`. Not sure how you get such an email subject.

You can change the subject in the file catalog/controller/information/contact.php and the following code is responsible for the subject

Code: Select all

$mail->setSubject(html_entity_decode(sprintf($this->language->get('email_subject'), $this->request->post['name']), ENT_QUOTES, 'UTF-8'));
Disclaimers: It is recommended using ocmod to modify any files instead of modifying the file directly
Thank you for your reply, it has to do with the Journal theme, it works fine with the default theme. I have contacted them on this.
Hello,
Have you found the way to change the email subject from the Jounal theme? I am having the same question too. So far it only shows the store name at the email subject but I like also to add the enquiry subject to the email subject too.

Newbie

Posts

Joined
Fri Oct 28, 2016 12:48 am

Post by straightlight » Sat May 07, 2022 4:35 am

kuochinwu wrote:
Fri May 06, 2022 10:46 pm
greendragon2020 wrote:
Sat Jun 20, 2020 3:25 am
opencartmart wrote:
Tue Jun 16, 2020 2:35 pm


The default subject line of the contact-email is `Enquiry {senderName}`. Not sure how you get such an email subject.

You can change the subject in the file catalog/controller/information/contact.php and the following code is responsible for the subject

Code: Select all

$mail->setSubject(html_entity_decode(sprintf($this->language->get('email_subject'), $this->request->post['name']), ENT_QUOTES, 'UTF-8'));
Disclaimers: It is recommended using ocmod to modify any files instead of modifying the file directly
Thank you for your reply, it has to do with the Journal theme, it works fine with the default theme. I have contacted them on this.
Hello,
Have you found the way to change the email subject from the Jounal theme? I am having the same question too. So far it only shows the store name at the email subject but I like also to add the enquiry subject to the email subject too.
Journal is not supported on the forum.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON
Who is online

Users browsing this forum: No registered users and 21 guests