Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Calling an extra field on the invoice

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #11  
Old 12-14-2008, 09:04 AM
 
cycloneuk cycloneuk is offline
 

Advanced Member
  
Join Date: Apr 2008
Posts: 54
 

Default 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.
__________________
X-Cart Gold 4.1.12
Reply With Quote
  #12  
Old 01-07-2009, 03:55 PM
 
diode diode is offline
 

Newbie
  
Join Date: Jan 2008
Posts: 1
 

Default 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.
__________________
x-cart gold v.4.1.9
Reply With Quote
  #13  
Old 01-10-2009, 07:33 AM
 
Motive Motive is offline
 

Member
  
Join Date: Jan 2008
Posts: 20
 

Default 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
__________________
Brainwaves Educational Toys
Live X-Cart 4.1.9
Linux 2.6.9, Apache 1.3.41, PHP 4.4.8
Upgraded from X-Cart 4.0.13
Reply With Quote
  #14  
Old 01-19-2009, 02:01 PM
 
jaimwolfe jaimwolfe is offline
 

Advanced Member
  
Join Date: Jan 2007
Posts: 57
 

Default 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,
__________________
http://premiumpowersports.com
Xcart gold Version 4.1.6
Reply With Quote
  #15  
Old 01-26-2009, 07:37 AM
 
ChristineP ChristineP is offline
 

eXpert
  
Join Date: Jul 2008
Posts: 310
 

Default 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}
__________________
______________
version 4.1.9 Gold
Reply With Quote
  #16  
Old 02-04-2009, 10:46 AM
 
Motive Motive is offline
 

Member
  
Join Date: Jan 2008
Posts: 20
 

Default 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
__________________
Brainwaves Educational Toys
Live X-Cart 4.1.9
Linux 2.6.9, Apache 1.3.41, PHP 4.4.8
Upgraded from X-Cart 4.0.13
Reply With Quote
  #17  
Old 02-24-2009, 05:17 AM
 
ChristineP ChristineP is offline
 

eXpert
  
Join Date: Jul 2008
Posts: 310
 

Default 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
__________________
______________
version 4.1.9 Gold
Reply With Quote
  #18  
Old 04-27-2009, 09:52 AM
  WhiteDoveGifts's Avatar 
WhiteDoveGifts WhiteDoveGifts is offline
 

X-Adept
  
Join Date: Oct 2006
Location: Maarssen, The Netherlands
Posts: 474
 

Default 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?
__________________
____________________________
X-Cart Gold 4.1.10

EWD Hosting | CDSEO Pro | One Page Checkout | Smart Search | Telafirma Dynamic Images | X-AOM | Product Importer Pro and many custom mods and tweaks found here...
Reply With Quote
  #19  
Old 12-03-2009, 08:51 AM
 
qrichou qrichou is offline
 

Advanced Member
  
Join Date: Oct 2007
Posts: 39
 

Default 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
Reply With Quote
  #20  
Old 07-21-2010, 07:45 AM
  ARW VISIONS's Avatar 
ARW VISIONS ARW VISIONS is offline
 

X-Man
  
Join Date: Jan 2007
Location: Pensacola, FL
Posts: 2,536
 

Default Re: Calling an extra field on the invoice

anyone have an idea for 4.2? Please!!!
__________________
xcart 5.1.2
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 03:09 AM.

   

 
X-Cart forums © 2001-2020