Email - Subject line
Posted: 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
OpenCart Community Forum - Discuss shopping cart and e-commerce solutions.
https://forum.opencart.com/
The default subject line of the contact-email is `Enquiry {senderName}`. Not sure how you get such an email subject.greendragon2020 wrote: ↑Tue Jun 16, 2020 4:06 amWhen 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
Code: Select all
$mail->setSubject(html_entity_decode(sprintf($this->language->get('email_subject'), $this->request->post['name']), ENT_QUOTES, 'UTF-8'));
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.opencartmart wrote: ↑Tue Jun 16, 2020 2:35 pmThe default subject line of the contact-email is `Enquiry {senderName}`. Not sure how you get such an email subject.greendragon2020 wrote: ↑Tue Jun 16, 2020 4:06 amWhen 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
You can change the subject in the file catalog/controller/information/contact.php and the following code is responsible for the subject
Disclaimers: It is recommended using ocmod to modify any files instead of modifying the file directlyCode: Select all
$mail->setSubject(html_entity_decode(sprintf($this->language->get('email_subject'), $this->request->post['name']), ENT_QUOTES, 'UTF-8'));
Code: Select all
// Email
$_['email_subject'] = 'Enquiry: %s';
Code: Select all
// Email
$_['email_subject'] = 'My Website - Enquiry: %s';
Hello,greendragon2020 wrote: ↑Sat Jun 20, 2020 3:25 amThank 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.opencartmart wrote: ↑Tue Jun 16, 2020 2:35 pmThe default subject line of the contact-email is `Enquiry {senderName}`. Not sure how you get such an email subject.greendragon2020 wrote: ↑Tue Jun 16, 2020 4:06 amWhen 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
You can change the subject in the file catalog/controller/information/contact.php and the following code is responsible for the subject
Disclaimers: It is recommended using ocmod to modify any files instead of modifying the file directlyCode: Select all
$mail->setSubject(html_entity_decode(sprintf($this->language->get('email_subject'), $this->request->post['name']), ENT_QUOTES, 'UTF-8'));
Journal is not supported on the forum.kuochinwu wrote: ↑Fri May 06, 2022 10:46 pmHello,greendragon2020 wrote: ↑Sat Jun 20, 2020 3:25 amThank 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.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
Disclaimers: It is recommended using ocmod to modify any files instead of modifying the file directlyCode: Select all
$mail->setSubject(html_entity_decode(sprintf($this->language->get('email_subject'), $this->request->post['name']), ENT_QUOTES, 'UTF-8'));
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.