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 post counters are caused by redundancies of the same solutions that were already provided prior.


Regards,
Straightlight
Opencart.com Administrator / Quality Assurance Analyst / Programmer


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

Attachments

admin_order_status_notify_comment_xml.jpg

admin_order_status_notify_comment_xml.jpg (77.31 KiB) Viewed 259 times


I don't use Forum Mail, to reach me, contact: jti@jacob.ch
-
Server Q & A Basic Information on Code + Settings
http://www.everyauction.info/serverinfo.html
Demoversion OpenCart LIGHT v.1.5.6.5
http://www.jti.li/shop/
1'400+ FREE OC Extensions - from OC v.1.5.x up,
on the world's largest OC-related 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

Opencart 2.3.0.2 Bugs Fix Added | Opencart 2.3.0.2 Custom Version | Opencart 3.0.3.1 Bugs Fix Added


Active Member

Posts

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

Users browsing this forum: No registered users and 38 guests