| ||||||||||
![]() |
Shopping cart software Solutions for online shops and malls | |||||||||
![]() |
![]() |
|
X-Cart Home | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Display an extra field on products.tpl | ||||
![]() |
|
|
Thread Tools | Search this Thread |
#1
|
|||||||||
|
|||||||||
![]() Does anyone know if it's possible to display an extra field on the product listing page (products.tpl)? I'm using this code on the product detail page, but it doesn't work on the listing page.
{if $extra_fields.0.field_value ne ""}{$extra_fields.0.field_value}{/if} V 4.1.11 TIA! ![]()
__________________
~ Andrea Beight |
|||||||||
#2
|
|||||||
|
|||||||
![]() Here is the code to show an extra field on products.tpl in 4.1.xx. You just have to put the name of the extra field that you want to display in place of nameofextrafield.
Code:
__________________
4.1.9 (Linux) Live Store www.thecrackedbook.com Find used books and out of print books. |
|||||||
#3
|
|||||||||
|
|||||||||
![]() Thank you so much! That worked perfectly.
![]()
__________________
~ Andrea Beight |
|||||||||
#4
|
|||||||
|
|||||||
![]() No problem.
__________________
4.1.9 (Linux) Live Store www.thecrackedbook.com Find used books and out of print books. |
|||||||
#5
|
|||||||||
|
|||||||||
![]() Quote:
Hi, I am having difficulty getting an extra field to show on the product.tpl page not the products.tpl. I have created an extra field called CONTENTS which will display the contents of a book if there are any in the field. I've tried this code but it doesn't work. Any ideas??
__________________
Versions 4.1.11 to 4.6.4 ... when will the new versions end! ![]() Custom X-Cart driven e-commerce sites, skins and installations at www.samsonwebdesign.co.uk |
|||||||||
#6
|
|||||||
|
|||||||
![]() Thank you! I got this working on my product.tpl page as:
{if $product[product].extra_fields ne ''} {foreach from=$product[product].extra_fields item=extra_field} {if $extra_field.service_name eq "service_name goes here"} {if $extra_field.value eq "20"} {$extra_field.value} {/if} {/if} {/foreach} {/if} {if $product[product].extra_fields ne ''} {foreach from=$product[product].extra_fields item=extra_field} {if $extra_field.service_name eq "service _name goes here"} {if $extra_field.value eq "30"} {$extra_field.value} {/if} {/if} {/foreach} {/if} I've been trying to get this into 2 column (side by side) and I want to add a button to each extra field. Can someone point me in the right direction to achieve this? Quote:
__________________
______________ version 4.1.9 Gold |
|||||||
#7
|
|||||||
|
|||||||
![]() Longhorn180,
I have my extra fields showing on my products.tpl, though I want to add a custom button for a download to a specific extra field. How would I go about doing this? Christine Quote:
__________________
______________ version 4.1.9 Gold |
|||||||
#8
|
|||||||||
|
|||||||||
![]() try this..
{if $products[product].extra_fields ne ''} {foreach from=$products[product].extra_fields item=extra_field} {if $extra_field.service_name eq "nameofextrafield"} {if $extra_field.value ne ""} {$extra_field.value} {/if} {/if} {/foreach} {/if} {if $extra_field.service_name eq "nameofextrafield"}button code here{/if}
__________________
xcart 5.1.2 |
|||||||||
#9
|
|||||||
|
|||||||
![]() Is this to put an extra field the add product portion of the admin back end? If not, anyone know how that would be done?
Thx advance
__________________
CDSEO PRO 4.1.11 PRO Dynamic images by xcartmod.com X-Cart CSSTemplate/Skin for v4.1.11 PRO |
|||||||
#10
|
|||||||||
|
|||||||||
![]() extra fierlds are already there
__________________
xcart 5.1.2 |
|||||||||
![]() |
|
Thread Tools | Search this Thread |
|
|
|
|||
X-Cart forums © 2001-2020
|