labeshops wrote:You could edit the admin/view/template/sale/order_invoice.tpl file and format the options section however you want - add a line break, change the font size, etc. The templates use pretty basic html for formatting, just leave the php portions of it as is.
Yep, I can see the section.
Code: Select all
</table>
<table class="product">
<tr class="heading">
<td><b><?php echo $column_product; ?></b></td>
<td><b><?php echo $column_model; ?></b></td>
<td align="right"><b><?php echo $column_quantity; ?></b></td>
<td align="right"><b><?php echo $column_price; ?></b></td>
<td align="right"><b><?php echo $column_total; ?></b></td>
</tr>
<?php foreach ($order['product'] as $product) { ?>
<tr>
<td><?php echo $product['name']; ?>
<?php foreach ($product['option'] as $option) { ?>
<br />
<small> - <?php echo $option['name']; ?>: <?php echo $option['value']; ?></small>
<?php } ?></td>
<td><?php echo $product['model']; ?></td>
<td align="right"><?php echo $product['quantity']; ?></td>
<td align="right"><?php echo $product['price']; ?></td>
<td align="right"><?php echo $product['total']; ?></td>
</tr>
I am assuming this bit is the critical bit for formatting?
Code: Select all
<td><?php echo $product['name']; ?>
<?php foreach ($product['option'] as $option) { ?>
<br />
<small> - <?php echo $option['name']; ?>: <?php echo $option['value']; ?></small>
<?php } ?></td>
<td><?php echo $product['model']; ?></td>
<td align="right"><?php echo $product['quantity']; ?></td>
<td align="right"><?php echo $product['price']; ?></td>
<td align="right"><?php echo $product['total']; ?></td>
</tr>
And I assume this specific bit is the option formatting?
Code: Select all
<small> - <?php echo $option['name']; ?>: <?php echo $option['value']; ?></small>
My questions is, why does this not display the option value in the price column?
I though this bit did that?
Code: Select all
?php echo $option['value']; ?></small>
In essence I'd simply like a sub heading under the main product saying 'Supply These Options' and then the options to each display their price in the 'price' column. As there is no product number associated with Options I guess we leave that as is.
Any suggestions on the exact syntax would be helpful, and of course appreciated
