View Single Post
  #1  
Old 04-17-2012, 01:18 PM
 
tartaglia tartaglia is offline
 

X-Adept
  
Join Date: May 2006
Location: Dallas, TX
Posts: 575
 

Default Display product extra field data on Invoice

We have a music store where about 2/3 of all products are sheet music. Each piece of sheet music has been sucessfully set up in X-cart 4.4.5 with extra fields for things like Orchestration, Publisher, etc. I need the ability to display some of these extra fields on the invoice (with each sheet music product ordered) so that the Admin can print it and that the customer can see it. I have gotten very close on my own but can't seem to get it to work.

Here is what I have done....

Modified: skin/common_files/mail/html/order_data.tpl to add the following lines...(inside the foreach loop that displays the product lines for each ordered product)

{*BEGIN display extra field data DAC*}
{if $active_modules.Extra_Fields}
{include file="modules/Extra_Fields/product_orchestration_invoice.tpl"}
{/if}
{*END display extra field data DAC*}

Obviously I created the file: skin/common_files/modules/Extra_Fields/product_orchestration_invoice.tpl which looks like.

{foreach from=$product.extra_fields item=v}
{*{if $v.field eq "Orchestration" and $v.active eq "Y" and $v.field_value}*}
<div>
<span>{$v.field}:{$v.field_value}</span>
</div>
{*{/if}*}
{/foreach}

Notice that I commented out the {if} statement because I was getting nothing output. Now at least I get all the Extra Field names (Orchestration, Publisher, Genre, etc.) showing under each line item of the invoice, but the field values don't display (see screenshot XC8635.pdf). (yes, I have confirmed that the products on the example invoice have values for these extra fields)

Can someone please help, I'm guessing that for some reason the names are available but not the values.

David Coggan
Carolyn Nussbaum Music Company
(getting ready to launch X-cart 4.4.5 or 4.5.0)
Attached Files
File Type: pdf XC8635.pdf (25.0 KB, 439 views)
__________________
David Coggan
Carolyn Nussbaum Music Company
X-Cart v4.5.4 Gold +
LiteCommerce v2.2.41 (previous 6 years)
Reply With Quote