Jump to content
Sign in to follow this  
karakym

Отправка статуса заказа на Email клиента

Recommended Posts

Дана функция из admin/view/template/sale/order_form.tpl:

function history() {
$.ajax({
  type: 'POST',
  url: 'index.php?route=sale/order/history&token=<?php echo $token; ?>&order_id=<?php echo $order_id; ?>',
  dataType: 'json',
  data: 'order_status_id=' + encodeURIComponent($('select[name='order_status_id']').val()) + '&notify=' + encodeURIComponent($('input[name='notify']').attr('checked') ? 1 : 0) + '&append=' + encodeURIComponent($('input[name='append']').attr('checked') ? 1 : 0) + '&comment=' + encodeURIComponent($('textarea[name='comment']').val()),
  beforeSend: function() {
   $('.success, .warning').remove();
   $('#history_button').attr('disabled', 'disabled');
   $('#tab_history .form').before('<div class="attention"><img src="view/image/loading_1.gif" alt="" /> <?php echo $text_wait; ?></div>');
  },
  complete: function() {
   $('#history_button').attr('disabled', '');
   $('.attention').remove();
  },
  success: function(data) {
   if (data.error) {
	$('#tab_history .form').before('<div class="warning">' + data.error + '</div>');
   }
   if (data.success && $('input[name='append']').attr('checked')) {
	html  = '<div class="history" style="display: none;">';
	html += '  <table class="list">';
	html += '	<thead>';
	html += '	  <tr>';
	html += '		<td class="left" width="33.3%"><b><?php echo $column_date_added; ?></b></td>';
	html += '		<td class="left" width="33.3%"><b><?php echo $column_status; ?></b></td>';
	html += '		<td class="left" width="33.3%"><b><?php echo $column_notify; ?></b></td>';
	html += '	  </tr>';
	html += '	</thead>';
	html += '	<tbody>';
	html += '	  <tr>';
	html += '		<td class="left">' + data.date_added + '</td>';
	html += '		<td class="left">' + data.order_status + '</td>';
	html += '		<td class="left">' + data.notify + '</td>';
	html += '	  </tr>';
	html += '	</tbody>';
	if (data.comment) {
	 html += '	<thead>';
	 html += '	  <tr>';
	 html += '		<td class="left" colspan="3"><b><?php echo $column_comment; ?></b></td>';
	 html += '	  </tr>';
	 html += '	</thead>';
	 html += '	<tbody>';
	 html += '	  <tr>';
	 html += '		<td class="left" colspan="3">' + data.comment + '</td>';
	 html += '	  </tr>';
	 html += '	</tbody>';
	}
	html += '  </table>';
	html += '</div>';
	$('#order_status').html(data.status);
	$('#tab_history .form').before(html);
	$('#tab_history .history').slideDown();
	$('#tab_history .form').before('<div class="success">' + data.success + '</div>');
	$('textarea[name='comment']').val('');
   }
  }
});
}
Перед отправкой по почте в переменную comment записываются комментарии с ссылками с помощью CKEditor,

но на email приходит голимый текст.

Что необходимо поправить в этой функции, чтобы клиенту приходили ссылки?

Share this post


Link to post
Share on other sites

Ну помогите плз, мне это нужно для отправки покупателям ссылку на отзыв

Share this post


Link to post
Share on other sites

Что Вы подразумеваете под

приходит голимый текст

буквы крякозябрами?

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
You are posting as a guest. If you have an account, please sign in.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×

Important Information

On our site, cookies are used and personal data is processed to improve the user interface. To find out what and what personal data we are processing, please go to the link. If you click "I agree," it means that you understand and accept all the conditions specified in this Privacy Notice.