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.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


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
Expert 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

My Github OC Site: https://github.com/IP-CAM
5'200 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.


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

Upgrade Service | OC 2.3.0.2 PHP 8 | My Custom OC 3.0.3.8 | Buy me a beer


User avatar
Expert Member

Posts

Joined
Tue Jul 17, 2012 10:35 pm
Location - România
Who is online

Users browsing this forum: No registered users and 273 guests