Page 1 of 1

Showing a product custom field in an email template

Posted: Thu Jun 04, 2009 8:34 pm
by Mark.Boyer
We added a Product Custom Field to support a custom Vendor Part Number that's different from the ModelNumber and SKU and would like to add it as a column on our vendor notification so they don't have to know our SKU or the ModelNumber, but we can't seem to get the email template to work.

We tried the following code:

#foreach( $CustomField in $orderItem.Product.CustomFields) #if($CustomField.FieldName = "VendorPartNo") $CustomField.FieldValue #end #end

Can anyone suggest a fix please?

Re: Showing a product custom field in an email template

Posted: Fri Jun 05, 2009 6:40 am
by mazhar
try following

Code: Select all

#foreach ($customField in $orderItem.Product.CustomFields)
#if ($customField.FieldName == "VendorPartNo")
$customField.FieldValue
#end
#end