Jump to content

How to send message order to customer with add Attachment File


Recommended Posts

Hello,

 

Does anyone know to add attacment file to send a message to the customer.

I think it's very necessary. We can send picture messages to customers following written messages related to items in the message by the customer from the back office.

I have tried to add the file: / public_html / admin / themes / default / templates / controllers / orders / helpers / view / view.tpl

 

<div style="float: left">

<form action="{$smarty.server.REQUEST_URI}&token={$smarty.get.token}" method="post" onsubmit="if (getE('visibility').checked == true) return confirm('{l s='Do you want to send this message to the customer?'}');">

<fieldset style="width: 1209px;">

<legend style="cursor: pointer;" onclick="$('#message').slideToggle();$('#message_m').slideToggle();return false"><img src="../img/admin/email_edit.gif" /> {l s='New message'}</legend>

<div id="message_m" style="display: {if Tools::getValue('message')}none{else}block{/if}; overflow: auto; width: 400px;">

<a href="#" onclick="$('#message').slideToggle();$('#message_m').slideToggle();return false"><b>{l s='Click here'}</b> {l s='to add a comment or send a message to the customer.'}</a>

</div>

<a href="{$link->getAdminLink('AdminCustomerThreads')|escape:'htmlall':'UTF-8'}"><b>{l s='Click here'}</b> {l s='to see all messages.'}</a><br>

<div id="message" style="display: {if Tools::getValue('message')}block{else}none{/if}">

<select name="order_message" id="order_message" onchange="orderOverwriteMessage(this, '{l s='Do you want to overwrite your existing message?'}')">

<option value="0" selected="selected">-- {l s='Choose a standard message'} --</option>

{foreach from=$orderMessages item=orderMessage}

<option value="{$orderMessage['message']|escape:'htmlall':'UTF-8'}">{$orderMessage['name']}</option>

{/foreach}

</select><br /><br />

<b>{l s='Display to customer?'}</b>

<input type="radio" name="visibility" id="visibility" value="0" /> {l s='Yes'}

<input type="radio" name="visibility" value="1" checked="checked" /> {l s='No'}

<p id="nbchars" style="display:inline;font-size:10px;color:#666;"></p><br /><br />

<textarea id="txt_msg" name="message" cols="236" rows="8" onKeyUp="var length = document.getElementById('txt_msg').value.length; if (length > 600) length = '600+'; document.getElementById('nbchars').innerHTML = '{l s='600 characters, max.'} (' + length + ')';">{Tools::getValue('message')|escape:'htmlall':'UTF-8'}</textarea><br /><br />

<input type="hidden" name="id_order" value="{$order->id}" />

<input type="hidden" name="id_customer" value="{$order->id_customer}" />

 

<p class="text">

<label for="fileUpload">{l s='Attach File'}</label>

<input type="hidden" name="MAX_FILE_SIZE" value="2000000">

<input type="file" name="fileUpload" id="fileUpload">

</p>

 

 

<input type="submit" class="button" name="submitMessage" value="{l s='Send'}" style="margin-left: 578px"/>

</div>

</fieldset>

</form>

 

{if (sizeof($messages))}

<br />

<fieldset style="width: 400px;">

<legend><img src="../img/admin/email.gif" /> {l s='Messages'}</legend>

{foreach from=$messages item=message}

<div style="overflow:auto; width:400px;" {if $message['is_new_for_me']}class="new_message"{/if}>

{if ($message['is_new_for_me'])}

<a class="new_message" title="{l s='Mark this message as \'viewed\''}" href="{$smarty.server.REQUEST_URI}&token={$smarty.get.token}&messageReaded={$message['id_message']}"><img src="../img/admin/enabled.gif" alt="" /></a>

{/if}

{l s='At'} <i>{dateFormat date=$message['date_add']}

</i> {l s='from'} <b>{if ($message['elastname']|escape:'htmlall':'UTF-8')}{$message['efirstname']|escape:'htmlall':'UTF-8'} {$message['elastname']|escape:'htmlall':'UTF-8'}{else}{$message['cfirstname']|escape:'htmlall':'UTF-8'} {$message['clastname']|escape:'htmlall':'UTF-8'}{/if}</b>

{if ($message['private'] == 1)}<span style="color:red; font-weight:bold;">{l s='Private'}</span>{/if}

<p>{$message['message']|escape:'htmlall':'UTF-8'|nl2br}</p>

</div>

<br />

{/foreach}

</fieldset>

{/if}

</div>

 

 

In my screen back office (orders) is apparent, but the email you received regular customers not appear.

 

Someone help me, please?

post-21873-0-98197400-1373074990_thumb.png

Edited by TEMON (see edit history)
  • Like 1
Link to comment
Share on other sites

  • 2 weeks later...
  • 3 weeks later...
  • 3 months later...
  • 9 months later...

Hello,

 

Does anyone know to add attacment file to send a message to the customer.

I think it's very necessary. We can send picture messages to customers following written messages related to items in the message by the customer from the back office.

I have tried to add the file: / public_html / admin / themes / default / templates / controllers / orders / helpers / view / view.tpl

 

<div style="float: left">

<form action="{$smarty.server.REQUEST_URI}&token={$smarty.get.token}" method="post" onsubmit="if (getE('visibility').checked == true) return confirm('{l s='Do you want to send this message to the customer?'}');">

<fieldset style="width: 1209px;">

<legend style="cursor: pointer;" onclick="$('#message').slideToggle();$('#message_m').slideToggle();return false"><img src="../img/admin/email_edit.gif" /> {l s='New message'}</legend>

<div id="message_m" style="display: {if Tools::getValue('message')}none{else}block{/if}; overflow: auto; width: 400px;">

<a href="#" onclick="$('#message').slideToggle();$('#message_m').slideToggle();return false"><b>{l s='Click here'}</b> {l s='to add a comment or send a message to the customer.'}</a>

</div>

<a href="{$link->getAdminLink('AdminCustomerThreads')|escape:'htmlall':'UTF-8'}"><b>{l s='Click here'}</b> {l s='to see all messages.'}</a><br>

<div id="message" style="display: {if Tools::getValue('message')}block{else}none{/if}">

<select name="order_message" id="order_message" onchange="orderOverwriteMessage(this, '{l s='Do you want to overwrite your existing message?'}')">

<option value="0" selected="selected">-- {l s='Choose a standard message'} --</option>

{foreach from=$orderMessages item=orderMessage}

<option value="{$orderMessage['message']|escape:'htmlall':'UTF-8'}">{$orderMessage['name']}</option>

{/foreach}

</select><br /><br />

<b>{l s='Display to customer?'}</b>

<input type="radio" name="visibility" id="visibility" value="0" /> {l s='Yes'}

<input type="radio" name="visibility" value="1" checked="checked" /> {l s='No'}

<p id="nbchars" style="display:inline;font-size:10px;color:#666;"></p><br /><br />

<textarea id="txt_msg" name="message" cols="236" rows="8" onKeyUp="var length = document.getElementById('txt_msg').value.length; if (length > 600) length = '600+'; document.getElementById('nbchars').innerHTML = '{l s='600 characters, max.'} (' + length + ')';">{Tools::getValue('message')|escape:'htmlall':'UTF-8'}</textarea><br /><br />

<input type="hidden" name="id_order" value="{$order->id}" />

<input type="hidden" name="id_customer" value="{$order->id_customer}" />

 

<p class="text">

<label for="fileUpload">{l s='Attach File'}</label>

<input type="hidden" name="MAX_FILE_SIZE" value="2000000">

<input type="file" name="fileUpload" id="fileUpload">

</p>

 

 

<input type="submit" class="button" name="submitMessage" value="{l s='Send'}" style="margin-left: 578px"/>

</div>

</fieldset>

</form>

 

{if (sizeof($messages))}

<br />

<fieldset style="width: 400px;">

<legend><img src="../img/admin/email.gif" /> {l s='Messages'}</legend>

{foreach from=$messages item=message}

<div style="overflow:auto; width:400px;" {if $message['is_new_for_me']}class="new_message"{/if}>

{if ($message['is_new_for_me'])}

<a class="new_message" title="{l s='Mark this message as \'viewed\''}" href="{$smarty.server.REQUEST_URI}&token={$smarty.get.token}&messageReaded={$message['id_message']}"><img src="../img/admin/enabled.gif" alt="" /></a>

{/if}

{l s='At'} <i>{dateFormat date=$message['date_add']}

</i> {l s='from'} <b>{if ($message['elastname']|escape:'htmlall':'UTF-8')}{$message['efirstname']|escape:'htmlall':'UTF-8'} {$message['elastname']|escape:'htmlall':'UTF-8'}{else}{$message['cfirstname']|escape:'htmlall':'UTF-8'} {$message['clastname']|escape:'htmlall':'UTF-8'}{/if}</b>

{if ($message['private'] == 1)}<span style="color:red; font-weight:bold;">{l s='Private'}</span>{/if}

<p>{$message['message']|escape:'htmlall':'UTF-8'|nl2br}</p>

</div>

<br />

{/foreach}

</fieldset>

{/if}

</div>

 

 

In my screen back office (orders) is apparent, but the email you received regular customers not appear.

 

Someone help me, please?

I am looking for something similar , actually this thing can put load on server and website peroframce to some extent I think thats why features or module not available yet

Link to comment
Share on other sites

  • 2 months later...
×
×
  • Create New...