| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
Calling an extra field on the invoice | ||||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
Calling an extra field on the invoice
Quick one that I can't seem to track down in the forum - client wants to add an extra field to the invoice. Just calling the extra field code as you would in the products template or product template doesn't cut it, as I'm sure I have to add extra fields to the order array. Can someone direct me to the spot, or even better, get me a chunk of code? Thanks!
__________________
Padraic Ryan Ryan Design Studio Professional E-Commerce Development |
|||||||
#2
|
|||||||||
|
|||||||||
Re: Calling an extra field on the invoice
Hi Balinor,
I might have got this totally wrong so I do apologise. For 4.1.9 it appears it is there under the orders_data array which contains $order and $products, for instance... {$products.0.extra_fields.0.value} Sends out okay in email. I don't think I've modified it anywhere? func_order_data($orderid) is the function called and it appears in func.order.php Hope this helps.
__________________
Doms kube v4.1.9 |
|||||||||
#3
|
|||||||
|
|||||||
Re: Calling an extra field on the invoice
Thanks Kube, you are correct, that gets called without any modification necessary! Just couldn't get the right syntax I guess. Thanks for the help!!
__________________
Padraic Ryan Ryan Design Studio Professional E-Commerce Development |
|||||||
#4
|
|||||||
|
|||||||
Re: Calling an extra field on the invoice
Well, this is close, but what ends up happening is that on orders with multiple products it simply repeats the first value down the list. Need to play around with it a bit more I guess...
__________________
Padraic Ryan Ryan Design Studio Professional E-Commerce Development |
|||||||
#5
|
|||||||
|
|||||||
Re: Calling an extra field on the invoice
Figured it out, use this value to call extra fields on the invoice:
{$product.extra_fields.0.value}
__________________
Padraic Ryan Ryan Design Studio Professional E-Commerce Development |
|||||||
#6
|
|||||||
|
|||||||
Re: Calling an extra field on the invoice
Hi Balinor,
I first tried {$products.0.extra_fields.0.value} to call the Extra Field, but like you said, if a customer buys several products, the first Extra Field called is repeated for each product. I then tried {$product.extra_fields.0.value} but that just comes up empty with no extra field values showing... can you verify the syntax and/or offer any other suggestions? Thanks, Robert
__________________
X-cart 4.1.10 |
|||||||
#7
|
|||||||
|
|||||||
Re: Calling an extra field on the invoice
You need to change the value of 0 to the number of the field you want to display.
__________________
Padraic Ryan Ryan Design Studio Professional E-Commerce Development |
|||||||
#8
|
|||||||||
|
|||||||||
Re: Calling an extra field on the invoice
Can the extra fields be also outputted within the Checkout page for each product?
I'm unable to locate the extra fields values within the Smarty Debug Window ... Shafiq
__________________
Developing in 4.7.x now (Dipping into v5 - Slowly!) Have used 4.1.x, 4.2.x, 4.4.x, 4.5.x, 4.6.x & 4.7.x Multiple Instances of X-Cart MySQL 5.6.37 CentOS 7.4 Chamber Internet - Lancashire, United Kingdom http://www.chamberelancs.co.uk |
|||||||||
#9
|
|||||||
|
|||||||
Re: Calling an extra field on the invoice
is there anyway someone could post a little code (a little hand holding ) to show this...
i just want to check an extra field for any of the products on the invoice and if it is checked (true) to display the label that on the invoice...basically a special order mod in a way... any help with coming up with this is appreciated...i just want some leads to come up with this...the above is not cutting it for this noob.... thanks
__________________
4.5.2 |
|||||||
#10
|
|||||||
|
|||||||
Re: Calling an extra field on the invoice
well...i'll ask again...who knows...
i put this in the /main/order_info.tpl i copied the provider info and changed it to this... should this add the extra field indicated to the invoice??? it shows the label but no value for the extra field...am i missing something...this is the only change i have done, except of adding the extra field...i have changed the # on the extra_field from 0 to 5...no luck... Quote:
__________________
4.5.2 |
|||||||
|
|||
X-Cart forums © 2001-2020
|