Quote:
<?php
for ($i = 0, $n = sizeof($order->totals); $i < $n; $i++) {
if ($order->totals[$i]['class'] == 'ot_shipping') {
$format_shipping = explode(" (", $order->totals[$i]['title'], 2);
$clean_shipping = rtrim($format_shipping[0], ":");
$display_title = $clean_shipping . ':';
}
else {
$display_title = $order->totals[$i]['title'];
}
echo ' <tr>' . "\n" .
' <td align="right" class="'. str_replace('_', '-', $order->totals[$i]['class']) . '-Text">' . $display_title . '</td>' . "\n" .
' <td align="right" class="'. str_replace('_', '-', $order->totals[$i]['class']) . '-Amount">' . $order->totals[$i]['text'] . '</td>' . "\n" .
' </tr>' . "\n";
$order_total = $order->totals[$i]['text'];
}
It seems to me that $display_title always equal to $clean_shipping.':'; rather than $order->totals[i]['title'];