| ||||||||||
![]() |
Shopping cart software Solutions for online shops and malls | |||||||||
![]() |
![]() |
|
X-Cart Home | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Adding information to the invoice | |||
![]() |
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
![]() 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.
__________________
Various: 4.2.2, 4.1.9 [Linux] |
|||||||
#2
|
|||||||
|
|||||||
![]() I found what I was after. Here's my solution:
In order_data.tpl I found the following code Code:
and added a line below it: Code:
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:
and I added this underneath: Code:
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.
__________________
Various: 4.2.2, 4.1.9 [Linux] |
|||||||
![]() |
|
Thread Tools | Search this Thread |
|
|
|
|||
X-Cart forums © 2001-2020
|