Showing a product custom field in an email template

For general questions and discussions specific to the AbleCommerce 7.0 Asp.Net product.
Post Reply
Mark.Boyer
Ensign (ENS)
Ensign (ENS)
Posts: 5
Joined: Sun Mar 08, 2009 10:59 am

Showing a product custom field in an email template

Post by Mark.Boyer » Thu Jun 04, 2009 8:34 pm

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?

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: Showing a product custom field in an email template

Post by mazhar » Fri Jun 05, 2009 6:40 am

try following

Code: Select all

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

Post Reply