Jump to content

Add customer comments to delivery-slip.tpl


maestrosombrita

Recommended Posts

Hi,

 

I'm trying to add customer comments at delivery-slip.tpl but I cannot. I prestashop 1.6.0.8

 

The following code but did not show me anything. Any solution??

 

/pdf/delivery-slip.tpl

Después de la línea 128: <!– / PRODUCTS TAB –>

<table>

<tr><td style=”line-height: 8px”> </td></tr>

</table>

{if isset($client_comment)}

<div style=”line-height: 1pt”> </div>

<table style=”width: 100%”>

<tr>

<td style=”width: 22%; padding-right: 7px; text-align: right; vertical-align: top”><b>Comentario del cliente:</b></td>

<td style=”width: 78%”>

{$client_comment}

</td>

</tr>

</table>

{/if}

/classes/pdf/HTMLTemplateDeliverySlip.php

A partir de la línea 63:

$carrier = new Carrier($this->order->id_carrier);
$carrier->name = ($carrier->name == ‘0’ ? Configuration::get(‘PS_SHOP_NAME’) : $carrier->name);

// Código afectado –>
$messages = Message::getMessagesByOrderId($this->order->id, false);

$this->smarty->assign(array(
‘order’ => $this->order,
‘order_details’ => $this->order_invoice->getProducts(),
‘delivery_address’ => $formatted_delivery_address,
‘invoice_address’ => $formatted_invoice_address,
‘order_invoice’ => $this->order_invoice,
‘carrier’ => $carrier,
‘client_comment’ => $messages[0][‘message’]
));
// <– Código afectado

return $this->smarty->fetch($this->getTemplate(‘delivery-slip’));

 

 

Link to comment
Share on other sites

  • 6 months later...
  • 1 year later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...