Post by WKDesigns » Wed Apr 04, 2018 3:20 am

Hello all,

Opencart Version: 3.0.2.0
Journal Theme

It's not a secret that people want more information on the Admin Customer Order Notification/Confirmation. Can anyone supply the PHP that should be used to send the more detailed customer order confirmation to the admin address? For now, id like to stay away from any mods.

New member

Posts

Joined
Fri Nov 10, 2017 3:09 am

Post by straightlight » Wed Apr 04, 2018 3:49 am

Sure, by editing the catalog/controller/mail/order.php file and by editing the catalog/view/theme/<your_theme>/template/mail/order_alert.twig file.

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.


Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by WKDesigns » Wed Apr 04, 2018 8:13 pm

Straightlight - I think I saw an XML file that you have released on another post. Do you recall a simple solution like that, that you could share with me?

New member

Posts

Joined
Fri Nov 10, 2017 3:09 am

Post by straightlight » Wed Apr 04, 2018 10:12 pm

BCIadmin wrote:
Wed Apr 04, 2018 8:13 pm
Straightlight - I think I saw an XML file that you have released on another post. Do you recall a simple solution like that, that you could share with me?
Which topic are you referring to?

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.


Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by WKDesigns » Wed Apr 04, 2018 11:01 pm

straightlight wrote:
Wed Apr 04, 2018 10:12 pm
BCIadmin wrote:
Wed Apr 04, 2018 8:13 pm
Straightlight - I think I saw an XML file that you have released on another post. Do you recall a simple solution like that, that you could share with me?
Which topic are you referring to?
Sending Customer Order Email dublicate to Store/Admin Email Address

New member

Posts

Joined
Fri Nov 10, 2017 3:09 am

Post by straightlight » Wed Apr 04, 2018 11:03 pm

Any URL you could provide to that topic?

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.


Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by WKDesigns » Wed Apr 04, 2018 11:05 pm

Even better - would this send out the duplicate?

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
<modification>
	<id>UKSB Admin HTML Order Email with Status and Comments </id>
	<version>1.0.0</version>
	<vqmver>2.1.1</vqmver>
	<author>http://www.opencart-extensions.co.uk</author>
	<file name="catalog/model/checkout/order.php">
		<operation>
			<search position="before"><![CDATA[$template->data['text_footer'] = $language->get('text_new_footer');]]></search>
			<add><![CDATA[$template->data['text_new_order_status'] = $language->get('text_new_order_status');
$template->data['text_update_comment'] = $language->get('text_update_comment');]]></add>
		</operation>
		<operation>
			<search position="after"><![CDATA[$template->data['ip'] = $order_info['ip'];]]></search>
			<add><![CDATA[$template->data['order_status'] = $order_status;
$template->data['order_comment'] = $order_info['comment'];]]></add>
		</operation>
		<operation>
			<search position="replace" offset="51"><![CDATA[$subject = sprintf($language->get('text_new_subject'), html_entity_decode($this->config->get('config_name'), ENT_QUOTES, 'UTF-8'), $order_id);]]></search>
			<add><![CDATA[			$mail->setTo($this->config->get('config_email'));
			$mail->send();]]></add>
		</operation>
	</file>
	<file name="catalog/view/theme/default/template/mail/order.tpl">
		<operation>
			<search position="replace"><![CDATA[<b><?php echo $text_ip; ?></b> <?php echo $ip; ?><br /></td>]]></search>
			<add><![CDATA[<b><?php echo $text_ip; ?></b> <?php echo $ip; ?><br />
			<b><?php echo $text_new_order_status; ?></b> <?php echo $order_status; ?><br /></td>]]></add>
		</operation>
		<operation>
			<search position="replace"><![CDATA[<p><?php echo $text_footer; ?></p>]]></search>
			<add><![CDATA[<?php if($order_comment!=''){ ?>  <table class="list">
    <thead>
      <tr>
        <td class="left"><?php echo $text_update_comment; ?></td>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td class="left"><?php echo nl2br($order_comment); ?></td>
      </tr>
    </tbody>
  </table><?php } ?>
  <p><?php echo $text_footer; ?></p>]]></add>
		</operation>
	</file>
</modification>

New member

Posts

Joined
Fri Nov 10, 2017 3:09 am

Post by ostechnologies » Thu Apr 05, 2018 1:56 pm

Yes, By customizing controller code you can add additional details for order.
Under catalog/controller/mail/order.php file

For additional field name to display under view file you need to add that field text under /catalog/language/en-gb/mail/order_add.php file.

By using catalog/view/theme/*/template/mail/order_alert.twig file. You can display the changes in front store.

Opencart Expert | sales[at]ost.agency
Skype - manish.osuniverse | Gtalk - manishmt

Extensions for Opencart @ https://www.ost.agency/product/product- ... extensions
ost.agency - ecommerce website design, development and digital company


User avatar
Active Member

Posts

Joined
Mon Apr 06, 2015 1:30 pm

Post by fabius » Mon Dec 31, 2018 12:26 am

Use this free extension, "Customer order confirmation email for store owner":
https://www.opencart.com/index.php?rout ... n_id=35844

Newbie

Posts

Joined
Mon Sep 09, 2013 1:51 am

Post by Oritur » Mon Dec 31, 2018 1:54 am

fabius wrote:
Mon Dec 31, 2018 12:26 am
Use this free extension, "Customer order confirmation email for store owner":
https://www.opencart.com/index.php?rout ... n_id=35844
Great,
I just downloaded and installed it. A very useful option.
Thanks

Newbie

Posts

Joined
Sat Feb 03, 2018 4:58 am

Post by Oritur » Mon Dec 31, 2018 1:55 am

I also have a question in this field. I'd appreciate it if it helped.

here:
viewtopic.php?f=202&t=209133

Newbie

Posts

Joined
Sat Feb 03, 2018 4:58 am

Post by psycmos » Thu Jan 03, 2019 7:15 am

Oritur wrote:
Mon Dec 31, 2018 1:55 am
I also have a question in this field. I'd appreciate it if it helped.

here:
viewtopic.php?f=202&t=209133
Works!! :D

New member

Posts

Joined
Mon Nov 26, 2012 7:31 pm

Post by tingwing » Sat Nov 21, 2020 9:41 pm

fabius wrote:
Mon Dec 31, 2018 12:26 am
Use this free extension, "Customer order confirmation email for store owner":
https://www.opencart.com/index.php?rout ... n_id=35844
nice extension,but not works for me ,opencart Version 3.0.3.1,

my extension:https://www.opencart.com/index.php?rout ... estshop24h
email :support@bestshop24h.com
site:http://www.bestshop24h.com


Active Member

Posts

Joined
Tue Aug 02, 2016 9:01 pm

Post by straightlight » Sat Nov 21, 2020 10:19 pm

tingwing wrote:
Sat Nov 21, 2020 9:41 pm
fabius wrote:
Mon Dec 31, 2018 12:26 am
Use this free extension, "Customer order confirmation email for store owner":
https://www.opencart.com/index.php?rout ... n_id=35844
nice extension,but not works for me ,opencart Version 3.0.3.1,
Old codes. These changes could be easily accomplished with Events nowadays.

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.


Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by sw!tch » Sun Nov 22, 2020 2:10 am

Can be done in 2 lines of code - viewtopic.php?f=202&t=215662#p774260

Full Stack Web Developer :: Send a PM for Custom Work.
Backup and learn how to recover before you make any changes!


Active Member

Posts

Joined
Sat Apr 28, 2012 2:32 pm
Location - USA

Post by straightlight » Sun Nov 22, 2020 3:21 am

sw!tch wrote:
Sun Nov 22, 2020 2:10 am
Can be done in 2 lines of code - viewtopic.php?f=202&t=215662#p774260
However, it still encourages people to edit core files.

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.


Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by tingwing » Sun Nov 22, 2020 11:37 am

fabius wrote:
Mon Dec 31, 2018 12:26 am
Use this free extension, "Customer order confirmation email for store owner":
https://www.opencart.com/index.php?rout ... n_id=35844
excellent reply,but it doesnot work for me,is there an commercial extension ,
by the way ,I think this should become a default function of opencart

my extension:https://www.opencart.com/index.php?rout ... estshop24h
email :support@bestshop24h.com
site:http://www.bestshop24h.com


Active Member

Posts

Joined
Tue Aug 02, 2016 9:01 pm

Post by sw!tch » Sun Nov 22, 2020 1:55 pm

tingwing wrote:
Sun Nov 22, 2020 11:37 am
fabius wrote:
Mon Dec 31, 2018 12:26 am
Use this free extension, "Customer order confirmation email for store owner":
https://www.opencart.com/index.php?rout ... n_id=35844
excellent reply,but it doesnot work for me,is there an commercial extension ,
by the way ,I think this should become a default function of opencart
You don't need a commercial extension if you follow the post I linked. viewtopic.php?f=202&t=215662#p774260

If you don't want to edit the core, you can easily build an .ocmod.

Full Stack Web Developer :: Send a PM for Custom Work.
Backup and learn how to recover before you make any changes!


Active Member

Posts

Joined
Sat Apr 28, 2012 2:32 pm
Location - USA

Post by straightlight » Sun Nov 22, 2020 8:22 pm

sw!tch wrote:
Sun Nov 22, 2020 1:55 pm
tingwing wrote:
Sun Nov 22, 2020 11:37 am
fabius wrote:
Mon Dec 31, 2018 12:26 am
Use this free extension, "Customer order confirmation email for store owner":
https://www.opencart.com/index.php?rout ... n_id=35844
excellent reply,but it doesnot work for me,is there an commercial extension ,
by the way ,I think this should become a default function of opencart
You don't need a commercial extension if you follow the post I linked. viewtopic.php?f=202&t=215662#p774260

If you don't want to edit the core, you can easily build an .ocmod.
Or an event.

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.


Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by tingwing » Sun Nov 22, 2020 8:27 pm

thanks,much better solution.
now ,I guess the reason is that it is limited by hosting.

my extension:https://www.opencart.com/index.php?rout ... estshop24h
email :support@bestshop24h.com
site:http://www.bestshop24h.com


Active Member

Posts

Joined
Tue Aug 02, 2016 9:01 pm
Who is online

Users browsing this forum: No registered users and 3 guests