Post by urdubazaronline » Sun Nov 04, 2018 6:59 pm

Hello. I need to set a predefined comment on changing the order status. E.g I have an order status "Out for delivery" , so when i set this status, comment field should populate with a predefined comment.


Posts

Joined
Sun Nov 04, 2018 6:56 pm

Post by straightlight » Tue Nov 06, 2018 5:38 am

No OC version posted. Forum rules.

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

F. Rules:

- viewtopic.php?f=176&t=200480
- viewtopic.php?f=176&t=200804


Regards,
Straightlight


Legendary Member

Posts

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

Post by thekrotek » Tue Nov 06, 2018 6:04 am

By default there's no such functionality, so the only way to achieve this is with custom modification. For starters, Try to search the Marketplace for one. Task seems pretty trivial to me.

Professional OpenCart extensions, support and custom work.
Contact me via email or Skype by support@thekrotek.com


User avatar
Active Member

Posts

Joined
Sun Jul 03, 2016 12:24 am


Post by urdubazaronline » Tue Nov 06, 2018 11:12 am

Opencart version is 2.03


Posts

Joined
Sun Nov 04, 2018 6:56 pm

Post by IP_CAM » Tue Nov 06, 2018 12:35 pm

Well, for OC v.1.5.6.x Versions, this nice-n-easy VqMod achieved something like
this, and it could possibly be made work in your Version too, if you have a little
knowledge on such.
Good Luck! ;)
Ernie
---
admin_order_status_notify_comment.xml

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<modification>
<id><![CDATA[Admin Order Status Notify Comment]]></id>
<version><![CDATA[OS v.1.5.6.5]]></version>
<vqmver><![CDATA[2.4.1]]></vqmver>
<author><![CDATA[hakim_jz]]></author>

<file name="admin/view/template/sale/order_info.tpl">
<operation error="log">
<search position="after"><![CDATA[<td><textarea name="comment" cols="40" rows="8" style="width: 99%"></textarea>]]></search>
<add><![CDATA[			
<div style="margin-top: 10px;">
<a id="button-template-notify-a" class="button">A Comment</a>&nbsp;
<a id="button-template-notify-b" class="button">B Comment</a>&nbsp;
<a id="button-template-notify-c" class="button">C Comment</a>&nbsp;
<a id="button-template-notify-d" class="button">D Comment</a>&nbsp;
<a id="button-template-notify-e" class="button">E Comment</a>
<script type="text/javascript"><!--
	$('#button-template-notify-a').live('click', function() {
	var template_msg = 'Dear <?php echo $firstname; ?> <?php echo $lastname; ?>,\n\nThis is the  message A you need to replace\n\nThank You';
	$('textarea[name=\'comment\']').val(template_msg);
	});
						
	$('#button-template-notify-b').live('click', function() {
	var template_msg = 'Dear <?php echo $firstname; ?> <?php echo $lastname; ?>,\n\nThis is the  message B you need to replace\n\nThank You';
	$('textarea[name=\'comment\']').val(template_msg);
	});
					
	$('#button-template-notify-c').live('click', function() {
	var template_msg = 'Dear <?php echo $firstname; ?> <?php echo $lastname; ?>,\n\nThis is the  message C you need to replace\n\nThank You';
	$('textarea[name=\'comment\']').val(template_msg);
	});
					
	$('#button-template-notify-d').live('click', function() {
	var template_msg = 'Dear <?php echo $firstname; ?> <?php echo $lastname; ?>,\n\nThis is the  message D you need to replace\n\nThank You';
	$('textarea[name=\'comment\']').val(template_msg);
	});
				
	$('#button-template-notify-e').live('click', function() {
	var template_msg = 'Dear <?php echo $firstname; ?> <?php echo $lastname; ?>,\n\nThis is the  message E you need to replace\n\nThank You';
	$('textarea[name=\'comment\']').val(template_msg);
	});
//--></script>
</div>
]]></add>
</operation>	
</file>	
</modification>
---
Image

Attachments

admin_order_status_notify_comment_xml.jpg

admin_order_status_notify_comment_xml.jpg (77.31 KiB) Viewed 98 times


For Sale: Top URL's, including an OpenCart V-Pro Shop!
A wide range of matching Designs can be seen here: http://www.opencart.li
For Information on URL's offered, please contact me at: jti@jacob.ch
Hundreds of Mods in 380+ Repositories for OC v.1.5.x - v.2.3.x
to be found on my Github Site: https://github.com/IP-CAM
Image


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by xxvirusxx » Tue Nov 06, 2018 3:57 pm

And with small changes, work on 3.0.2.0

Attachments

Screenshot_2018-11-06_09-55-33.png

Screenshot_2018-11-06_09-55-33.png (28.07 KiB) Viewed 76 times


Free converted extensions


Active Member

Posts

Joined
Tue Jul 17, 2012 10:35 pm
Who is online

Users browsing this forum: No registered users and 20 guests