Post by mystifier » Fri Aug 03, 2012 10:10 pm

v1.5.1.3

I want store owner to receive a copy of the confirmation email that shoppers receive rather than the crappy one they get instead.

In model\checkout\order.php:

Code: Select all

$mail->setTo($order_info['email']);
$mail->setFrom($this->config->get('config_email'));
$mail->setSubject($subject);
Can anyone tell me how to add something like:

Code: Select all

$mail->setBcc($this->config->get('config_email'));
Thanks.

Free v1.4.9 Extensions: Default Specials | Improved Search | Customer Activity Report | Customer Groups | Royal Mail With Handling | Improved Product Page | Random Products | Stock Report | All Products


User avatar
Active Member

Posts

Joined
Tue May 18, 2010 5:15 pm

Post by mystifier » Fri Aug 03, 2012 10:19 pm

I tried duplicating the whole block:

Code: Select all

$mail = new Mail();
$mail->protocol = $this->config->get('config_mail_protocol');
$mail->parameter = $this->config->get('config_mail_parameter');
$mail->hostname = $this->config->get('config_smtp_host');
$mail->username = $this->config->get('config_smtp_username');
$mail->password = $this->config->get('config_smtp_password');
$mail->port = $this->config->get('config_smtp_port');
$mail->timeout = $this->config->get('config_smtp_timeout');
$mail->setTo($order_info['email']);
$mail->setFrom($this->config->get('config_email'));
$mail->setSender($order_info['store_name']);
$mail->setSubject($subject);
$mail->setHtml($html);
$mail->setText(html_entity_decode($text, ENT_QUOTES, 'UTF-8'));
$mail->addAttachment(DIR_IMAGE . $this->config->get('config_logo'), md5(basename($this->config->get('config_logo'))));
$mail->send();
Changing

Code: Select all

$mail->setTo($order_info['email']);
to

Code: Select all

$mail->setTo($this->config->get('config_email'));
But the owner still receives the scruffy text version.

Their email is definitely set-up to receive HTML email. Any ideas?

Free v1.4.9 Extensions: Default Specials | Improved Search | Customer Activity Report | Customer Groups | Royal Mail With Handling | Improved Product Page | Random Products | Stock Report | All Products


User avatar
Active Member

Posts

Joined
Tue May 18, 2010 5:15 pm

Post by upl8t » Sat Aug 04, 2012 5:30 am

Try this vqmod it should do everything you need.

http://www.opencart.com/index.php?route ... on_id=6371

New member

Posts

Joined
Fri Aug 03, 2012 7:36 pm

Post by mystifier » Sat Aug 04, 2012 4:21 pm

Thanks upl8t, it doesn't include v5.1 unfortunately, and I can't easily use vqmod.

The shopping cart is actually a very small part of the project but they wanted one on a website based on Joomla so I used AceShop plugin because I used Opencart in v1.4.9 days. I was hoping that Opencart would be an unaltered separate folder within it so that I could update independently and use vqmod, but it isn't; most files are modded and it is not the latest version.

I made another mod:

Code: Select all

if ($this->config->get('config_alert_mail')) {
  $subject = sprintf($language->get('text_new_subject'), html_entity_decode($this->config->get('config_name'), ENT_QUOTES, 'UTF-8'), $order_id);
  $mail->setTo($this->config->get('config_email')); 
  $mail->send();
}
but I have to wait for them to test it on Monday.

php is not my strong suit so I will try to disassemble the vqmod to see if it does anything different.

Free v1.4.9 Extensions: Default Specials | Improved Search | Customer Activity Report | Customer Groups | Royal Mail With Handling | Improved Product Page | Random Products | Stock Report | All Products


User avatar
Active Member

Posts

Joined
Tue May 18, 2010 5:15 pm

Post by mystifier » Wed Aug 22, 2012 4:16 am

Can't believe that I haven't solved this and it is getting very embarrassing now.

As a desparado, in catalog\model\checkout\order.php ... confirm() function, I replaced everything from
// Admin Alert Mail
with:

Code: Select all

$mail2 = new Mail(); 
$mail2->protocol = $this->config->get('config_mail_protocol');
$mail2->parameter = $this->config->get('config_mail_parameter');
$mail2->hostname = $this->config->get('config_smtp_host');
$mail2->username = $this->config->get('config_smtp_username');
$mail2->password = $this->config->get('config_smtp_password');
$mail2->port = $this->config->get('config_smtp_port');
$mail2->timeout = $this->config->get('config_smtp_timeout'); 
$mail2->setTo($this->config->get('config_email')); 
$mail2->setFrom($this->config->get('config_email'));
$mail2->setSender($order_info['store_name']);
$subject2 = 'Website Order';
$mail2->setSubject($subject2);
$mail2->setHtml($html);
$mail2->setText(html_entity_decode($text, ENT_QUOTES, 'UTF-8'));
$mail2->addAttachment(DIR_IMAGE . $this->config->get('config_logo'), md5(basename($this->config->get('config_logo'))));
$mail2->send();
but they are still receiving the short text email with no shipping details etc., which is causing them real problems.

Any help much appreciated.

Free v1.4.9 Extensions: Default Specials | Improved Search | Customer Activity Report | Customer Groups | Royal Mail With Handling | Improved Product Page | Random Products | Stock Report | All Products


User avatar
Active Member

Posts

Joined
Tue May 18, 2010 5:15 pm

Post by i2Paq » Wed Aug 22, 2012 2:07 pm

I will look tonight as I know Qphoria made a mod somewhere on these forums and I have bookmarked this on my home Pc.

Norman in 't Veldt
Moderator OpenCart Forums

_________________ READ and Search BEFORE POSTING _________________

Our FREE search: Find your answer FAST!.

[How to] BTW + Verzend + betaal setup.


User avatar
Global Moderator

Posts

Joined
Mon Nov 09, 2009 7:00 pm
Location - Winkel - The Netherlands

Post by mystifier » Wed Aug 22, 2012 2:29 pm

Thanks i2Paq, nice to see that you are still around. I haven't seen Opencart in a long time.

I did look at a vqmod but it didn't seem to do anything different. I have commented out the $mail2->setText line in the hope that it will show the html email but they have to test it with a credit card order. I just can't see why they don't receive the same html email rather than the simple text one which has no shipping details - they receive other html email without a problem.

Since there doesn't seem to be a $mail->setCC, I don't know if I can amend the customer email
from:

Code: Select all

$mail->setTo($order_info['email']);
To something like:

Code: Select all

$mail->setTo($order_info['email'].';'.$this->config->get('config_email')); 
or if it would even solve the problem if it was possible.

It has caused much embarrassment and I can't ask them to try many more times without it working!

Free v1.4.9 Extensions: Default Specials | Improved Search | Customer Activity Report | Customer Groups | Royal Mail With Handling | Improved Product Page | Random Products | Stock Report | All Products


User avatar
Active Member

Posts

Joined
Tue May 18, 2010 5:15 pm

Post by i2Paq » Thu Aug 23, 2012 12:14 am

Enhanced Order Email 1.5, hope this helps :)

Norman in 't Veldt
Moderator OpenCart Forums

_________________ READ and Search BEFORE POSTING _________________

Our FREE search: Find your answer FAST!.

[How to] BTW + Verzend + betaal setup.


User avatar
Global Moderator

Posts

Joined
Mon Nov 09, 2009 7:00 pm
Location - Winkel - The Netherlands

Post by mystifier » Thu Aug 23, 2012 2:13 am

Thank-you,

I have appplied it and asked them to test it - fingers-crossed.

Free v1.4.9 Extensions: Default Specials | Improved Search | Customer Activity Report | Customer Groups | Royal Mail With Handling | Improved Product Page | Random Products | Stock Report | All Products


User avatar
Active Member

Posts

Joined
Tue May 18, 2010 5:15 pm

Post by mystifier » Thu Aug 23, 2012 3:23 pm

Still exactly the same :-\

Customer receives Order Confirmation, Store Owner receives small text email with no details of who ordered.

The store is a very small part of the project but it has turned the whole thing sour >:D

Desperate to recover things but I just can't see it. Any help greatly appreciated.

Even adding Customer/Shipping details to text email would at last let them operate as they want to but I want to understand the problem.

Free v1.4.9 Extensions: Default Specials | Improved Search | Customer Activity Report | Customer Groups | Royal Mail With Handling | Improved Product Page | Random Products | Stock Report | All Products


User avatar
Active Member

Posts

Joined
Tue May 18, 2010 5:15 pm

Post by mystifier » Thu Aug 23, 2012 4:42 pm

Okay, all sorted.

I am using Aceshop (a bad idea!!) and it turns out that they use a vQmod version of the file; I was changing the core file and wondering why I wasn't having any effect which I only realised when I changed the text email and the old one still appeared.

I have now applied the very first mod I tried and it is working.

Doh!!!

Free v1.4.9 Extensions: Default Specials | Improved Search | Customer Activity Report | Customer Groups | Royal Mail With Handling | Improved Product Page | Random Products | Stock Report | All Products


User avatar
Active Member

Posts

Joined
Tue May 18, 2010 5:15 pm

Post by i2Paq » Thu Aug 23, 2012 7:57 pm

mystifier wrote:Okay, all sorted.

I am using Aceshop (a bad idea!!) and it turns out that they use a vQmod version of the file; I was changing the core file and wondering why I wasn't having any effect which I only realised when I changed the text email and the old one still appeared.

I have now applied the very first mod I tried and it is working.

Doh!!!
Aceshop is for Joomla!

That is a "fork", you should have mentioned that ;)

Norman in 't Veldt
Moderator OpenCart Forums

_________________ READ and Search BEFORE POSTING _________________

Our FREE search: Find your answer FAST!.

[How to] BTW + Verzend + betaal setup.


User avatar
Global Moderator

Posts

Joined
Mon Nov 09, 2009 7:00 pm
Location - Winkel - The Netherlands

Post by mystifier » Thu Aug 23, 2012 8:31 pm

Hi i2Paq,

I did mention at the beginning of the thread that it was AceShop for Joolma as the reason I was stuck with v1.5.1.3 and not easy to use vQmod.

AceShop has itself just forked so support is weaker than ever and now chargeable for even basic known fixes. It was a bad choice but a Joomla website and AceShop (Opencart) shop were quick answers in a much larger project (thankfully asp.net!). I was hoping that OpenCart would be embedded unchanged using fallback so that version could be updated but it can't. I wouldn't recommend my choice to anyone.

Free v1.4.9 Extensions: Default Specials | Improved Search | Customer Activity Report | Customer Groups | Royal Mail With Handling | Improved Product Page | Random Products | Stock Report | All Products


User avatar
Active Member

Posts

Joined
Tue May 18, 2010 5:15 pm

Post by i2Paq » Thu Aug 23, 2012 9:02 pm

Well it was the 5th or so reply you did in this topic and I completely missed that :D

I'm in the middle of moving from 1.4.9.x to 1.5.4.x and use a vQmod to get the same e-mail as the customer.

Got to love vQmod(s)! ;D

Norman in 't Veldt
Moderator OpenCart Forums

_________________ READ and Search BEFORE POSTING _________________

Our FREE search: Find your answer FAST!.

[How to] BTW + Verzend + betaal setup.


User avatar
Global Moderator

Posts

Joined
Mon Nov 09, 2009 7:00 pm
Location - Winkel - The Netherlands

Post by juhulius » Thu Jan 17, 2013 6:16 am

I didnt go through the whole thread, but I guess, this does what you're looking for:
http://www.opencart.com/index.php?route ... on_id=6371

Newbie

Posts

Joined
Wed Sep 19, 2012 6:35 pm
Who is online

Users browsing this forum: No registered users and 35 guests