Post by nick5000 » Tue Apr 17, 2012 12:48 am

The VQmod makes it sending out duplicate emails to both customer and admin. I'm on 1.5.2.1. What to check?

New member

Posts

Joined
Fri Apr 13, 2012 2:25 pm

Post by fearworksmedia » Tue Apr 17, 2012 2:23 am

Hi there,

I'm using 1.5.2.1. How can I do a similar thing and include the original order info in the emails that are sent when I update an order status? I often get people who have received the order status update message, which contains a few lines of text, and they reply to it asking "remind me what this order was for??". I'd rather have a way to send the original order details (a copy of the information table they will have been sent in the original order confirmation email) along with the status update text - anyone here know how I can do this?

Thanks everyone.


Posts

Joined
Mon Jan 02, 2012 2:50 am

Post by jty » Tue Apr 17, 2012 3:57 am

nick5000 wrote:The VQmod makes it sending out duplicate emails to both customer and admin. I'm on 1.5.2.1. What to check?
I thought I was the only one getting this problem in 1.5.2
I used jim_jay's code from here http://forum.opencart.com/viewtopic.php ... 9&p=270476
Look for the one line of code

Code: Select all

$mail->setHtml($html);
I just put that one line of code in and all is happy
fearworksmedia wrote: I'm using 1.5.2.1. How can I do a similar thing and include the original order info in the emails that are sent when I update an order status? I often get people who have received the order status update message,
you need to pull the code out of the order confirmation and stick it into the code into the code for updating order history.
It's harder and time restricts me from giving instructions here

jty
Active Member

Posts

Joined
Sat Aug 30, 2008 8:19 am

Post by robster » Fri Aug 10, 2012 6:00 pm

I am trying to implement this on 1.5.3.1 in it's vQmod version but I find that admin is receiving the email three times!!

I see that catalog/model/checkout/order.php is different though and this may be the issue but am not sure how to modify this code to fit the newer file.

Any suggestions?

I have tried this on two different opencart installations and it is the same issue on both sites.

Thanks

Robster

I know my place...!


User avatar
Active Member

Posts

Joined
Tue Jul 13, 2010 8:08 pm
Location - North Yorkshire, UK

Post by trueblue » Mon Nov 25, 2013 7:20 pm

Could you please update this code for Opencart 1.5.6

Newbie

Posts

Joined
Thu Dec 06, 2012 10:14 am

Post by marzz » Fri Feb 28, 2014 5:23 am

We're talking about this extension right:
http://www.opencart.com/index.php?route ... n_id=11365

Opencart upgraded to 1.5.6 for me (and thank you Opencart)
but does it have to be turned on? Where do i find the settings? Or does it work autom?

I didn't notice anything different, maybe the folder of VQmod needs to be on 777? Now it is on 755!
What if i cannot get it working with 755? Can i leave it on 777?

Newbie

Posts

Joined
Wed Mar 27, 2013 11:37 pm

Post by marzz » Tue Mar 04, 2014 11:34 pm

does it have to be turned on? Where do i find the settings? Or does it work autom?
Anybody? ???

Newbie

Posts

Joined
Wed Mar 27, 2013 11:37 pm

Post by macaya » Wed May 21, 2014 3:43 am

After adding in the xml, it now sends duplicate e-mails to both the customers and the admin. Any ideas how to fix this?

Newbie

Posts

Joined
Sat May 10, 2014 8:01 am

Post by mavies33 » Thu Nov 06, 2014 2:05 pm

Anybody knows how to put product stock status in the email notification ?

please anyone ?

Newbie

Posts

Joined
Wed Aug 06, 2014 12:06 pm

Post by mirlatman » Mon Jun 18, 2018 4:43 am

Greeting UKSitebuilder, am in need of urgent help. Currently am trying to get this part done on my side, but am currently using opencart 3.x. the code that you metioned to find>to replace, it is not shown in my order.php file. Your reply is highly appreciated :,((((
uksitebuilder wrote:
Fri Oct 14, 2011 4:53 pm
The easiest solution if for you to receive an exact copy of the customers email.

open catalog/model/checkout/order.php

find

Code: Select all

$mail->setTo($this->config->get('config_email'));			// Admin Alert Mail
			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);
				
				// Text 
				$text  = $language->get('text_new_received') . "\n\n";
				$text .= $language->get('text_new_order_id') . ' ' . $order_id . "\n";
				$text .= $language->get('text_new_date_added') . ' ' . date($language->get('date_format_short'), strtotime($order_info['date_added'])) . "\n";
				$text .= $language->get('text_new_order_status') . ' ' . $order_status . "\n\n";
				$text .= $language->get('text_new_products') . "\n";
				
				foreach ($order_product_query->rows as $result) {
					$text .= $result['quantity'] . 'x ' . $result['name'] . ' (' . $result['model'] . ') ' . html_entity_decode($this->currency->format($result['total'], $order_info['currency_code'], $order_info['currency_value']), ENT_NOQUOTES, 'UTF-8') . "\n";
					
					$order_option_query = $this->db->query("SELECT * FROM " . DB_PREFIX . "order_option WHERE order_id = '" . (int)$order_id . "' AND order_product_id = '" . $result['order_product_id'] . "'");
					
					foreach ($order_option_query->rows as $option) {
						$text .= chr(9) . '-' . $option['name'] . (strlen($option['value']) > 20 ? substr($option['value'], 0, 20) . '..' : $option['value']) . "\n";
					}
				}
				
				$text .= "\n";

				$text.= $language->get('text_new_order_total') . "\n";
				
				foreach ($order_total_query->rows as $result) {
					$text .= $result['title'] . ' ' . html_entity_decode($result['text'], ENT_NOQUOTES, 'UTF-8') . "\n";
				}			
				
				$text .= "\n";
				
				if ($order_info['comment'] != '') {
					$comment = ($order_info['comment'] .  "\n\n" . $comment);
				}
				
				if ($comment) {
					$text .= $language->get('text_new_comment') . "\n\n";
					$text .= $comment . "\n\n";
				}
			
				$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($this->config->get('config_email'));
				$mail->setFrom($this->config->get('config_email'));
				$mail->setSender($order_info['store_name']);
				$mail->setSubject($subject);
				$mail->setText($text);
				$mail->send();
				
				// Send to additional alert emails
				$emails = explode(',', $this->config->get('config_alert_emails'));
				
				foreach ($emails as $email) {
					if ($email && preg_match('/^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$/i', $email)) {
						$mail->setTo($email);
						$mail->send();
					}
				}				
			}		
change to

Code: Select all

			$mail->setTo($this->config->get('config_email'));
			$mail->send();
			// Admin Alert Mail
			if ($this->config->get('config_alert_mail')) {
				$emails = explode(',', $this->config->get('config_alert_emails'));
				
				foreach ($emails as $email) {
					if ($email && preg_match('/^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$/i', $email)) {
						$mail->setTo($email);
						$mail->send();
					}
				}				
			}		

Newbie

Posts

Joined
Sat Jun 16, 2018 9:12 pm
Who is online

Users browsing this forum: No registered users and 57 guests