Post by norspeed » Fri Jan 29, 2021 10:36 pm

How do you edit the mail template / file / twigg, to add a "cc"( admin email address ) to the mail template / file in order to send the same information in the same format to the seller and buyer in version 3.0.3.6 ?, i have done it before in older versions, but the template is not the same in the newer versions.

New member

Posts

Joined
Sat Apr 25, 2020 5:13 pm

Post by mikeinterserv » Fri Jan 29, 2021 11:49 pm

norspeed wrote:
Fri Jan 29, 2021 10:36 pm
How do you edit the mail template / file / twigg, to add a "cc"( admin email address ) to the mail template / file in order to send the same information in the same format to the seller and buyer in version 3.0.3.6 ?, i have done it before in older versions, but the template is not the same in the newer versions.
You can't do that with the TWIG with 3..0.3.6.
probably simplist way to try is this

Change line 270 to this
Code: Select all

Code: Select all

$mail->setTo($order_info['email'].','.$this->config->get('config_email'));
See if that does what you want
This has been edited and this line of code is in place of a less optimal piece of code.
Last edited by mikeinterserv on Sun Jan 31, 2021 6:46 am, edited 1 time in total.

Active Member

Posts

Joined
Thu May 28, 2020 6:55 am
Location - Wales

Post by norspeed » Sat Jan 30, 2021 1:50 am

Did already try that, placed into line 271 in catalog>controller>mail>order.php, it resolves to "Internal Server Error"
Any other ideas ?

New member

Posts

Joined
Sat Apr 25, 2020 5:13 pm

Post by sw!tch » Sat Jan 30, 2021 2:12 am

Try the steps listed here - viewtopic.php?t=215662#p774260

Backup and learn how to recover before you make any changes!


Active Member

Posts

Joined
Sat Apr 28, 2012 2:32 pm

Post by mikeinterserv » Sat Jan 30, 2021 2:12 am

norspeed wrote:
Sat Jan 30, 2021 1:50 am
Did already try that, placed into line 271 in catalog>controller>mail>order.php, it resolves to "Internal Server Error"
Any other ideas ?
I will fix it and come back to you. I will test it thoroughly first a :-)
Check you don't have a syntax error

Active Member

Posts

Joined
Thu May 28, 2020 6:55 am
Location - Wales

Post by straightlight » Sat Jan 30, 2021 3:16 am

norspeed wrote:
Sat Jan 30, 2021 1:50 am
Did already try that, placed into line 271 in catalog>controller>mail>order.php, it resolves to "Internal Server Error"
Any other ideas ?
Error logs.

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

Post by mikeinterserv » Sat Jan 30, 2021 3:49 am

change line 270 to this

Code: Select all

$mail->setTo($order_info['email'].','.$this->config->get('config_email'));

Active Member

Posts

Joined
Thu May 28, 2020 6:55 am
Location - Wales

Post by norspeed » Sat Jan 30, 2021 7:14 pm

Can`t get that to work either, no errors coming up, but there is a "cc" to the admin e-mail address on the received customer e-mail header, but it has not sent the email to the admin e-mail address.

New member

Posts

Joined
Sat Apr 25, 2020 5:13 pm

Post by mikeinterserv » Sat Jan 30, 2021 9:21 pm

norspeed wrote:
Sat Jan 30, 2021 7:14 pm
Can`t get that to work either, no errors coming up, but there is a "cc" to the admin e-mail address on the received customer e-mail header, but it has not sent the email to the admin e-mail address.
Attach your php file so i can have a look

Active Member

Posts

Joined
Thu May 28, 2020 6:55 am
Location - Wales

Post by norspeed » Sat Jan 30, 2021 10:03 pm

-----
Last edited by norspeed on Sun Jan 31, 2021 12:13 am, edited 1 time in total.

New member

Posts

Joined
Sat Apr 25, 2020 5:13 pm

Post by norspeed » Sat Jan 30, 2021 10:05 pm

Just to mention i am not using the SMTP to send e-mails, just the mail function, if that makes any difference ?

New member

Posts

Joined
Sat Apr 25, 2020 5:13 pm

Post by mikeinterserv » Sat Jan 30, 2021 10:13 pm

norspeed wrote:
Sat Jan 30, 2021 10:05 pm
Just to mention i am not using the SMTP to send e-mails, just the mail function, if that makes any difference ?
Thats OK it works fine with both.
There is something wrong with your file
Just upload THIS one and you should be good

Active Member

Posts

Joined
Thu May 28, 2020 6:55 am
Location - Wales

Post by norspeed » Sat Jan 30, 2021 10:44 pm

It is still the same.

I am still getting the same admin e-mail.
---------------------
You have received an order.

Order ID: 94
Date Added: 30/01/2021
Order Status: Pending

Products

1x Petrol Generator 7500W Startup Power For Hire (7500W Startup Power) £650.00

Totals

Refundable Deposit: £50.00
Sub-Total: £650.00
Flat Delivery Rate: £10.00
Total: £710.00

New member

Posts

Joined
Sat Apr 25, 2020 5:13 pm

Post by khnaz35 » Sat Jan 30, 2021 10:49 pm

norspeed wrote:
Sat Jan 30, 2021 10:44 pm
It is still the same.

I am still getting the same admin e-mail.
---------------------
You have received an order.

Order ID: 94
Date Added: 30/01/2021
Order Status: Pending

Products

1x Petrol Generator 7500W Startup Power For Hire (7500W Startup Power) £650.00

Totals

Refundable Deposit: £50.00
Sub-Total: £650.00
Flat Delivery Rate: £10.00
Total: £710.00
Have you refresh modifications, clear themes cache etc?

Got a burning question at 3 AM that even Google shrugs at? There’s a not-so-secret inbox that might just have your answer: khnaz35@gmail.com
Breathe in some nature while you're at it. It’s cheaper than therapy. :-*

Feel free to sling a bear my way via PayPal @ khnaz35@gmail.com


User avatar
Active Member

Posts

Joined
Mon Aug 27, 2018 11:30 pm
Location - Malaysia

Post by mikeinterserv » Sat Jan 30, 2021 10:53 pm

You can turn off the standard email from email alerts in settings
You SHOULD now get I email to CUSTOMER HTML ORDER CONFIRMATION
and IDENTICAL HTML ORDER CONFIRMATION to the STORE ADDRESS
IF that file is NOT working there is a config issue of your EMAIL
I have tested it on 3 different servers
In MAIL parameters in shop setting add this
-f yourshopemail@yourdomain.com - MUST be the STORE EMAIL ADDRESS
WHAT HOSTING are you using
AND make sure your not using the SAME email for STORE and customer when testing

Active Member

Posts

Joined
Thu May 28, 2020 6:55 am
Location - Wales

Post by norspeed » Sat Jan 30, 2021 11:29 pm

No matter what e-mail address i use as a sender, or receiver, it still dosen`t work.
I have my own VPS, and many sites on it, so i am my own host.

I have worked with the OpenCart system many times in the past 10 years or so, and have probably edited more files that i have had hot dinners, and also the mail files before to make this work, but it has me beaten this time, it is probably just a simple error on my part, but i can`t find it.

New member

Posts

Joined
Sat Apr 25, 2020 5:13 pm

Post by mikeinterserv » Sat Jan 30, 2021 11:40 pm

No worries it happens to all of us at some time or other.
Does it send the CUSTOMER confirmation when you do an order
We need to see the Complete original source for the email, in the To field there SHOULD be 2 email addresses separated by a comma
How are your emails sent through your own SMTP on the VPS or through your hosts mail system or a third party
Last edited by mikeinterserv on Sat Jan 30, 2021 11:48 pm, edited 1 time in total.

Active Member

Posts

Joined
Thu May 28, 2020 6:55 am
Location - Wales

Post by norspeed » Sat Jan 30, 2021 11:48 pm

Customer confirmation is ok, sending no problem, admin / seller confirmation, sending no problem, but the admin/ seller confirmation is still just the same, just the basic text, not the same as the customer confirmation.

New member

Posts

Joined
Sat Apr 25, 2020 5:13 pm

Post by mikeinterserv » Sat Jan 30, 2021 11:51 pm

norspeed wrote:
Sat Jan 30, 2021 11:48 pm
Customer confirmation is ok, sending no problem, admin / seller confirmation, sending no problem, but the admin/ seller confirmation is still just the same, just the basic text, not the same as the customer confirmation.
Look at the source of the customer email
Do you see 2 addresses in the To field
ie
To: youremail@gmail.com, shopemail@shopdomaincom
Subject: Your Shop - Order 21
MIME-Version: 1.0
Date: Sat, 30 Jan 2021 15:45:44 +0000
From: Your Shop <shopemail@shopdomaincom>
Reply-To: Your Shopt <shopemail@shopdomaincom>
X-Mailer: PHP/7.4.13

AND - what version of PHP are you on
You could delete that php code if you want, shorten the page

Active Member

Posts

Joined
Thu May 28, 2020 6:55 am
Location - Wales

Post by norspeed » Sat Jan 30, 2021 11:58 pm

It dosent seem to make any difference what e-mail address i use, the site is http://generators-for-hire-iom.com no matter what i change the admin e-mail address to, ( i have even tried an "outside of the server / private " e-mail address ) it still wont send the same e-mail to that e-mail address, as sent to the customer e-mail.

But i cant understand why, something is wrong, but i dont know what.

New member

Posts

Joined
Sat Apr 25, 2020 5:13 pm
Who is online

Users browsing this forum: Google [Bot] and 30 guests