03-30-2006, 06:49 AM
|
|
| |
|
|
X-Man
|
|
Join Date: Apr 2003
Location: Firetanksoftware.com
Posts: 2,326
|
|
|
Quote:
Originally Posted by svowl
Quote:
Originally Posted by groovico
Can we display and access Extra fields in the products.tpl and cart pages in 4.1.X like we could with all pre 4.X releases?
|
Yes. Below is an example of code to display all extra fields in products.tpl
Code:
{if $products[product].extra_fields ne ''}
{foreach $products[product].extra_fields item=extra_field}
{$extra_field.field}: {$extra_field.value}
{/forach}
{/if}
...and to display the extra field with service name 'ISBN':
Code:
{if $products[product].extra_fields ne ''}
{foreach $products[product].extra_fields item=extra_field}
{if $extra_field.service_name eq "ISBN"}
{$extra_field.field}: {$extra_field.value}
{/if}
{/forach}
{/if}
Note: Extra fields are identified by service names because identifying them by extra field IDs is not usable enough. Identifying extra fields by their interface names ('field' column) is impossible, as these names may be defined in more than one languages.
|
Excellent!
__________________
Groovico
Used by X-carters the world over:
Marketing Manager Pro Bundle For X-cart
Featured Product Manager for X-cart
Feed manager pro for X-cart
http://www.firetanksoftware.com
Celebrating 7 Years of providing quality X-cart Add ons and X-cart Mods for x-cart 3.X to X-cart 4.4.X
|
|