View Single Post
  #12  
Old 07-29-2014, 09:48 AM
  mcanitano's Avatar 
mcanitano mcanitano is offline
 

eXpert
  
Join Date: Feb 2006
Location: Melbourne, FL
Posts: 216
 

Question Re: Display product extra field data on Invoice

We're trying to get our extra fields values to show in the admin product list so we can quickly edit the value (like you can with price and inventory). We created a new extra field for cost since we are a dealer of products.

I've added the following code to a new TPL file:

Code:
{foreach from=$products item=product name=prod} {*this gets the product array*} {if $smarty.section.prod.index eq $smarty.foreach.prod.index} {*this makes sure the product array from /common_files/main/products.tpl *} testing products {foreach from=$product.extra_fields item=v} {* gets product extra field array *} testing extra fields {if $v.service_name eq "Cost" and $v.field_value}} testing extra field of 'Cost' <input type="text" size="9" maxlength="15" name="efields[{$v.fieldid}]" value="{if $v.is_value eq 'Y'}{$v.field_value|escape:html}{else}{$v.value|escape:html}{/if}"/> {else} {/if} {/foreach} {/if} {/foreach}

It seems as if the product extra field array is not working, since it is not printing anything.
Attached Thumbnails
Click image for larger version

Name:	cost.png
Views:	394
Size:	10.7 KB
ID:	3847  
__________________
Marcello Canitano
New Site: X-Cart v4.5.5 GOLD
X-Cart Mobile v1.4.3
X-Payments v1.0.6
CDSEO Pro v2
Total Server Solutions xCDN

www.silverhorseracing.com
Reply With Quote