Post by ronnieb » Wed Jun 15, 2011 5:23 pm

Can this be intergrated into 1.5

the admin order confirmation doesn't show any addresses

Thanks
Last edited by ronnieb on Sat Jun 18, 2011 11:57 pm, edited 1 time in total.

New member

Posts

Joined
Tue May 24, 2011 3:44 pm

Post by opencart-templates » Wed Jun 15, 2011 7:09 pm

This extension may be of interest to you: http://www.opencart.com/index.php?route ... on_id=2221

Includes
  • - Customer Registers HTML Email
    - Order Email to Customer and Admin
    - Update Order notify Customer
    - Newsletter HTML layout/background

Advanced Professional Email Template
Customers Pre-Sale. Inc abandoned cart email
Order Follow-Up Email. Inc request review
Email Validation with ZeroBounce


User avatar
Active Member

Posts

Joined
Mon May 16, 2011 7:24 pm
Location - UK

Post by Qphoria » Wed Jun 15, 2011 11:01 pm

To make 1.5.x work more like 1.4.x that sends the same email to the admin as the customer.
Do the following....

(1.5.x ONLY!)
1. EDIT: catalog/model/checkout/order.php

2. FIND (~LINES 475 - 488) (Be sure its under the "// Admin Alert Mail" line)

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($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();
3. REPLACE WITH:

Code: Select all

// HTML
$template->data['text_greeting'] = $language->get('text_new_received') . "\n\n";
$template->data['invoice_no'] = '';
$template->data['text_invoice_no'] = '';
if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/mail/order.tpl')) {
	$html = $template->fetch($this->config->get('config_template') . '/template/mail/order.tpl');
} else {
	$html = $template->fetch('default/template/mail/order.tpl');
}
$subject = sprintf($language->get('text_new_subject'), html_entity_decode($this->config->get('config_name'), ENT_QUOTES, 'UTF-8'), $order_id . ' (' . $order_total . ')');
$mail->setSubject($subject);
$mail->setTo($this->config->get('config_email'));
$mail->setHtml($html);
$mail->send();

Image
Donate!|OpenCart Basics|GeoZones
Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by i2Paq » Thu Jun 16, 2011 2:33 am

Thanks! and bookmarked!

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 ronnieb » Thu Jun 16, 2011 5:24 am

Thankyou
Perfect !!


Ronnie

New member

Posts

Joined
Tue May 24, 2011 3:44 pm

Post by ronnieb » Sat Jun 18, 2011 6:59 pm

One other question ...

Changing the above code means that there isn't any comments added to the email (admin or customer)

what do i need to add to get them included ?

Thanks
Ronnie

New member

Posts

Joined
Tue May 24, 2011 3:44 pm

Post by ronnieb » Sat Jun 18, 2011 11:26 pm

OK
Spent ages figuring it out - Im not a programmer so please backup your files if you use this method.

I have attached the 2 files that have been changed

1) catalog/model/checkout/order.php

2) catalog/view/theme/default/template/mail/order.tpl

this will add the comments to your admin order email and the customers order email.

The fix above by qphoria is included in the catalog/model/checkout/order.php.
so by overwriting the files, no further action needs to be taken.

Ronnie

New member

Posts

Joined
Tue May 24, 2011 3:44 pm

Post by peterman » Fri Aug 12, 2011 8:55 am

this works well!!

Thanks

Peter Sesselmann
Acoustic Stompboxes and Guitar Pickups, Art
http://www.peterman.com.au


User avatar
Newbie

Posts

Joined
Sat Jun 19, 2010 7:14 am
Location - Australia

Post by onlinemarketer » Sun Aug 14, 2011 1:48 pm

is it possible to get a VQMod of this enhancement, or can VQMod not be used for entire files? (dont shoot! im new to php and vqmod!)

Active Member

Posts

Joined
Sat May 14, 2011 8:21 pm

Post by rampitt » Wed Aug 17, 2011 12:00 am

ronnieb wrote:OK
Spent ages figuring it out - Im not a programmer so please backup your files if you use this method.

I have attached the 2 files that have been changed

1) catalog/model/checkout/order.php

2) catalog/view/theme/default/template/mail/order.tpl

this will add the comments to your admin order email and the customers order email.

The fix above by qphoria is included in the catalog/model/checkout/order.php.
so by overwriting the files, no further action needs to be taken.

Ronnie

Thanks so much Ronnie!! You saved me from my "harassing" client who can't understand why I can't fix it :crazy:

Newbie

Posts

Joined
Tue Aug 16, 2011 11:57 pm

Post by onlinemarketer » Sun Sep 11, 2011 11:29 am

Is it just me? I seem to be getting the default store logo appearing on sub store order confirmation emails!

Active Member

Posts

Joined
Sat May 14, 2011 8:21 pm

Post by onlinemarketer » Sun Sep 11, 2011 6:58 pm

This is weird, the order email from a sub store uses it's own logo banner if the order is in gbp but reverts to the default store logo if the order us in usd!

Active Member

Posts

Joined
Sat May 14, 2011 8:21 pm

Post by feed » Wed Oct 12, 2011 7:27 pm

Qphoria wrote:For the 1.4.x version that sends the same email to the admin as the customer.
(1.5.x ONLY!)
1. EDIT: catalog/model/checkout/order.php

2. FIND (~LINES 475 - 488) (Be sure its under the "// Admin Alert Mail" line)

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($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();
3. REPLACE WITH:

Code: Select all

// HTML
$template->data['text_greeting'] = $language->get('text_new_received') . "\n\n";
$template->data['invoice_no'] = '';
$template->data['text_invoice_no'] = '';
if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/mail/order.tpl')) {
	$html = $template->fetch($this->config->get('config_template') . '/template/mail/order.tpl');
} else {
	$html = $template->fetch('default/template/mail/order.tpl');
}
$subject = sprintf($language->get('text_new_subject'), html_entity_decode($this->config->get('config_name'), ENT_QUOTES, 'UTF-8'), $order_id . ' (' . $order_total . ')');
$mail->setSubject($subject);
$mail->setTo($this->config->get('config_email'));
$mail->setHtml($html);
$mail->send();
Yes, It works but then the email title is:
SHOP NAME - Order XX (Array)
How do I remove that (Array) in the email tittle since it does not make any sense?
;)

Please try my Free and real time web translator made with Google API. and let me know what ya think :)


User avatar
New member

Posts

Joined
Fri Jun 11, 2010 5:21 am

Post by aide2001 » Wed Oct 19, 2011 6:22 pm

Hi there people, the code that was posted works well, I would like to know how to get the customers name on the subject line instead of maybe the total price?

Live long my friends
visit our website now at http://www.less2websites.com


Newbie

Posts

Joined
Wed Mar 30, 2011 5:11 pm

Post by joy » Wed Oct 19, 2011 11:43 pm

Another easier solution is to have an exact copy of the customer email on new order. On the same thread also have solutions for adding the Order Status and Customer Comments to the email too.

OC version 1.5.1.3


joy
New member

Posts

Joined
Fri Oct 14, 2011 9:18 am

Post by aide2001 » Thu Oct 20, 2011 4:02 pm

Yes that works too, but I still would like the customers name in the subject line instead of the total order, or maybe both name and total. The name is more important to me than the total order, anyone got any ideas on the php scripting of mod catalog/model/checkout/order.php
Cheers

Live long my friends
visit our website now at http://www.less2websites.com


Newbie

Posts

Joined
Wed Mar 30, 2011 5:11 pm

Post by opencart-templates » Thu Oct 20, 2011 5:35 pm

aide2001 wrote:Yes that works too, but I still would like the customers name in the subject line instead of the total order, or maybe both name and total. The name is more important to me than the total order, anyone got any ideas on the php scripting of mod catalog/model/checkout/order.php
Cheers
This should work and change the subject to "Ben Smith, thank you for your order(ID:11) with Your Store"

FILE: catalog/language/english/mail/order.php
FIND:
$_['text_new_subject'] = '%s - Order %s';
REPLACE:
$_['text_new_subject'] = '%s thank you for your order(ID:%s) with %s';

Code: Select all

<operation>
            <search position="after"><![CDATA[
            $subject = sprintf($language->get('text_new_subject'), $order_info['store_name'], $order_id);
            ]]></search>
            <add><![CDATA[
            // Load customer
			$this->load->model('account/customer');
			$customer = $this->module_account_customer->getCustomer($order_info['customer_id']);
			
			// Merge first and last name
			$full_name = $customer['firstname'] . ' ' . $customer['lastname'];
			
			$subject = sprintf($language->get('text_new_subject'), $full_name, $order_id, $order_info['store_name']);
            ]]></add>
        </operation>

Advanced Professional Email Template
Customers Pre-Sale. Inc abandoned cart email
Order Follow-Up Email. Inc request review
Email Validation with ZeroBounce


User avatar
Active Member

Posts

Joined
Mon May 16, 2011 7:24 pm
Location - UK

Post by aide2001 » Thu Oct 20, 2011 7:54 pm

Thank you for that, one more question, do I remove the 1st
$subject = sprintf($language->get('text_new_subject'), $order_info['store_name'], $order_id);
and replace with all the other php script??

Okay tried both ways, and no email admin comes through, so put back to normal for now and to see if anyone else can come up with the script
Last edited by aide2001 on Sat Dec 17, 2011 11:33 pm, edited 1 time in total.

Live long my friends
visit our website now at http://www.less2websites.com


Newbie

Posts

Joined
Wed Mar 30, 2011 5:11 pm

Post by wizardhomefitness. » Tue Dec 06, 2011 4:01 pm

Yes, It works but then the email title is:
SHOP NAME - Order XX (Array)
How do I remove that (Array) in the email tittle since it does not make any sense?
;)
I am having this same problem, the HTML email confirmation is working great apart from the fact that '(Array)' is being added to the end of the subject line. Is there any way to change this?

Gym Equipment Online Store
http://www.wizardhomefitness.com.au
----------------------------------------------------
Fresh Kicks Online Sneaker & Clothing Store
http://www.freshkicks.com.au


New member

Posts

Joined
Tue Aug 03, 2010 2:53 pm

Post by notaprogrammer » Tue Dec 06, 2011 11:27 pm

THANK YOU!!


Posts

Joined
Sat Dec 03, 2011 6:33 am
Who is online

Users browsing this forum: No registered users and 10 guests