X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Calling an extra field on the invoice (https://forum.x-cart.com/showthread.php?t=39045)

cycloneuk 12-14-2008 09:04 AM

Re: Calling an extra field on the invoice
 
Quote:

Originally Posted by balinor
You need to change the value of 0 to the number of the field you want to display.


I have tried that but it dosn't output anything for some reason.

diode 01-07-2009 03:55 PM

Re: Calling an extra field on the invoice
 
I was able to get this working on 4.1.9

File location: skin1 > mail > html > order_data.tpl

You can display your extra fields using this code:

{$product.extra_fields.0.value}


where 0 is the id of the extra field. The first extra field for your store is 0, if you haven't deleted anything. Then count from there if necessary to display the correct one.

Motive 01-10-2009 07:33 AM

Re: Calling an extra field on the invoice
 
Quote:

Originally Posted by kube
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.


Kube, Balinor, Diode, It's a great lead for me. Thanks.

When you say

{$products.0.extra_fields.0.value} Sends out okay in email.

Would this equate to putting {$products.0.extra_fields.0.value} in the product loop in (4.1.9) mail/order_data.tpl ?

To test, I currently have
{section name=prod_num loop=$products}
{$products.0.extra_fields.0.value}
{$products.0.extra_fields.1.value}
{$products.1.extra_fields.0.value}
{$product.extra_fields.0.value}
{$product.extra_fields.1.value}
{$product.extra_fields.2.value}
... etc

In mail/order_data.tpl. Though the extra fields are set and appear in other pages, this section in the order notification email is blank.

Can you share how you got {$products.0.extra_fields.0.value} OR {$product.extra_fields.0.value} to show up in an email?

Many thanks,

-Michael

jaimwolfe 01-19-2009 02:01 PM

Re: Calling an extra field on the invoice
 
I have been following this and trying to get an extra field I have in my database to show up on the admin side under the order status page (where the customers order is shown. I have added the
Quote:

<td valign="top">{$lng.lbl_provider}</td> <td valign="top"> {$product.extra_fields.3.value}
to my skin1>main>order_info.tpl but as the others are stating, nothing populates for the value.

Basically I added a typicalprice extra field to program the typical price we pay for a product, and would like it to show when the customer places the order (on admin side only) so we know what our typical price is.

Thanks,

ChristineP 01-26-2009 07:37 AM

Re: Calling an extra field on the invoice
 
I tried this as well for v4.1.9, but it doesn't show the designated extra field. I've added {$product.extra_fields.0.value} to the mail/html/order_invoice.tpl. How did you get the extra field to work?

Christine

Quote:

Originally Posted by balinor
Figured it out, use this value to call extra fields on the invoice:

{$product.extra_fields.0.value}


Motive 02-04-2009 10:46 AM

Re: Calling an extra field on the invoice (Bump)
 
Balinor, Diode,

Any chance you can give us hints as to how you made it work?

-Michael

ChristineP 02-24-2009 05:17 AM

Re: Calling an extra field on the invoice (Bump)
 
Have you had any luck with getting the loop through to work for order_data.tpl?

Christine

Quote:

Originally Posted by Motive
Balinor, Diode,

Any chance you can give us hints as to how you made it work?

-Michael


WhiteDoveGifts 04-27-2009 09:52 AM

Re: Calling an extra field on the invoice
 
I would like to have this working as well but slightly different. I need be able to add a unique Invoicenumber manually to every order that have status "shipped".

So for initally placed orders I don't want to show the Invoicenumber. Right now I have created a label "lbl_invoicenumber" to order_invoice.tpl and it shows up but don't know how to proceed further...

Anyone knows how to manage that?

qrichou 12-03-2009 08:51 AM

Re: Calling an extra field on the invoice
 
Im trying to get this to work in 4.2 /skin1/mail/html/order_data.tpl with no luck. I have used {$product.extra_fields.6.value}. Did anyone get an answer on this?

Many Thanks

ARW VISIONS 07-21-2010 07:45 AM

Re: Calling an extra field on the invoice
 
anyone have an idea for 4.2? Please!!!


All times are GMT -8. The time now is 10:52 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.