![]() |
Adding information to the invoice
Hi,
I have an extra field (called Qty Per Pack) which I would like to add to the invoice as a separate column. How would I go about doing that? Actually, that is only the first part of what I need to do. The next bit would be to multiply the content of the 'Qty Per Pack' field with the quantity to get the total amount of products ordered. Any help with this would be greatly appreciated. All the best, Steve -- EDIT -- This is for version 4.1.12 by the way. |
Re: Adding information to the invoice
I found what I was after. Here's my solution:
In order_data.tpl I found the following code Code:
<th nowrap="nowrap" width="100" bgcolor="#cccccc" align="center">{$lng.lbl_item_price}</th> and added a line below it: Code:
<th width="40" bgcolor="#cccccc">{$lng.lbl_items}</th> That gave me the heading for the table but (of course) not the data. Now, the client in this case is a wholesaler and so wanted the quantity field to be the amount of 'packs' and the Item field to be the total number of items. As well as that, some of the items could be sold separately, so they just needed to show the quantity. I searched for ages for this (just took that long to get my head around Smarty as it's the first time I've used it) Code:
<td align="center">{$product.amount}</td> and I added this underneath: Code:
<td align="center"> So any product where the first extra field exists, the amount is multiplied by the amount of products in the cart. Anything else and it just shows the normal quantity. |
All times are GMT -8. The time now is 08:51 AM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.