I am using OC 3.0.3.8
I am trying to create a printable shipping label for local delivery and I need to print only the order total without sub-total, discounts etc.
The format would be something like: Total: XX€ (the amount should be formatted according to the order total, including taxes and everything)
The general template is based on the invoice twig template.
I have located the parts that need to be changed but I don't get how can I receive only the total without all the other sub-totals, discounts, etc.
So my current code is:
For the twig:
Code: Select all
{% for total in order.total %}
<table class="table table-bordered">
<tbody>
<tr>
<td class="text-right"><b>{{ total.title }}</b></td>
<td class="text-right">{{ total.text }}</td>
</tr>
{% endfor %}
Code: Select all
$total_data = array();
$totals = $this->model_sale_order->getOrderTotals($order_id);
foreach ($totals as $total) {
$total_data[] = array(
'title' => $total['title'],
'text' => $this->currency->format($total['value'], $order_info['currency_code'], $order_info['currency_value']),
);
}
So how could I get only the order total? What part should I modify?
Thanks, everyone in advance.