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

1 Extra Field in products.tpl?

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 12-30-2007, 06:07 PM
 
MOC MOC is offline
 

Senior Member
  
Join Date: Oct 2002
Posts: 171
 

Default 1 Extra Field in products.tpl?

Hi there,
i wanna display one extra field in products.tpl. what do i have to add to let an extra field show up?

in my 3.5.14 shop it was very easy. i just needed to add {$products[product].param00}

in 4.1.9 i tried {$extra_fields[product][0].field_value} but nothing. can someone tell me the correct code?

tia
saskia
__________________
X-Cart Gold Version 3.5.14 (Live)
X-Cart Gold Version 4.1.10 (in dev)

Modification for 4.1.10
Run with 1 License, 1 Database up to 5 Shops with different domains, config, categories and more. click here for informations
Reply With Quote
  #2  
Old 12-31-2007, 08:53 AM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default Re: 1 Extra Field in products.tpl?

Doesn't work that way I'm afraid, you'll want to read this:

http://forum.x-cart.com/showthread.php?t=9540
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #3  
Old 01-03-2008, 06:11 PM
 
MOC MOC is offline
 

Senior Member
  
Join Date: Oct 2002
Posts: 171
 

Default Re: 1 Extra Field in products.tpl?

No true (anymore).
I asked the support and they send me this code and it's working in my 4.1.9

{$products[product].extra_fields.0.value}

0 is for field param00
__________________
X-Cart Gold Version 3.5.14 (Live)
X-Cart Gold Version 4.1.10 (in dev)

Modification for 4.1.10
Run with 1 License, 1 Database up to 5 Shops with different domains, config, categories and more. click here for informations
Reply With Quote
  #4  
Old 01-03-2008, 06:12 PM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default Re: 1 Extra Field in products.tpl?

Interesting, will have to check it out!
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #5  
Old 02-05-2008, 04:01 PM
 
7thdesire 7thdesire is offline
 

Senior Member
  
Join Date: Sep 2006
Posts: 115
 

Default Re: 1 Extra Field in products.tpl?

does this work in 4.1.9

i have a extra called Sale ie 07 what should i use it dont seem to work
__________________
X-cart - 4.3.2 loads of mods and custom code
Reply With Quote
  #6  
Old 02-05-2008, 04:29 PM
  kube's Avatar 
kube kube is offline
 

X-Adept
  
Join Date: Sep 2005
Location: London: a small place East of Wales
Posts: 529
 

Default Re: 1 Extra Field in products.tpl?

It seems the array only gets defined within the product and subcategory pages.

For 4.1.9 this appears to work for me referencing the first item in the array...

{$extra_fields.0.field_value}

Edit: I think I may have to reread this post again, getting mixed up with products.tpl. The above is for the product item page.

Edit again: Yes, MOC's post appears correct. Extra fields are referenced in the array for products.tpl (subcats) with {$products[product].extra_fields.0.value}
__________________
Doms
kube v4.1.9
Reply With Quote
  #7  
Old 02-05-2008, 05:42 PM
 
MOC MOC is offline
 

Senior Member
  
Join Date: Oct 2002
Posts: 171
 

Default Re: 1 Extra Field in products.tpl?

@7th: replace the 0 with 7
__________________
X-Cart Gold Version 3.5.14 (Live)
X-Cart Gold Version 4.1.10 (in dev)

Modification for 4.1.10
Run with 1 License, 1 Database up to 5 Shops with different domains, config, categories and more. click here for informations
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 02:24 PM.

   

 
X-Cart forums © 2001-2020