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)
-   -   1 Extra Field in products.tpl? (https://forum.x-cart.com/showthread.php?t=36431)

MOC 12-30-2007 06:07 PM

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

balinor 12-31-2007 08:53 AM

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

MOC 01-03-2008 06:11 PM

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

balinor 01-03-2008 06:12 PM

Re: 1 Extra Field in products.tpl?
 
Interesting, will have to check it out!

7thdesire 02-05-2008 04:01 PM

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

kube 02-05-2008 04:29 PM

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}

MOC 02-05-2008 05:42 PM

Re: 1 Extra Field in products.tpl?
 
@7th: replace the 0 with 7


All times are GMT -8. The time now is 02:11 PM.

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