No announcement yet.

Problem Displaying a Custom Customer Field in a Template Based Email

  • Filter
  • Time
  • Show
Clear All
new posts

  • Problem Displaying a Custom Customer Field in a Template Based Email


    I have a custom field on my signup page and I'd like to include the value of that custom field in the Email that gets sent to me when a new customer signs up. However, I'm having a hard time figuring out how to display the custom field in the Template Based Email.

    Here's my code so far:

    On the ACAD Page I have a dropdown menu with the name of "acquisition":
    How did you hear about us?
    <select name="acquisition">
         <option value="">Please Make a Selection</option>
         <option value="Email">Email</option>
         <option value="Web Search">Web Search</option>
         <option value="Referral">Referral</option>
    On the Landing Page (after signing up) I store the custom field:
    <mvt:if expr="g.Action EQ 'ICST' AND g.acquisition">
         <mvt:item name="customfields" param="Write_Customer_ID( g.Basket:cust_id, 'acquisition', g.acquisition )" />
    The custom field is stored, and I can successfully display the value on the Landing Page using the following code:
    <mvt:item name="customfields" param="Read_Customer_ID( g.Basket:cust_id, 'acquisition' )" />
    <p><strong>Acquisition:</strong> &mvt:customfields:acquisition;</p>
    However, when I use that same exact code to display the value within the Template Based Email, the value is blank.

    I have verified that the Custom Fields item is assigned to the Email Template.

    Can anyone shed any light on why this isn't working in the Email Template?


    It appears that rather than using the Custom Field, I can simply use the global variable in the Email Template:
    This should be enough to solve my issue.

    Maybe the Email Template doesn't have access to the Custom Fields?
    Or maybe the email is sent before the Custom Fields have been saved?
    If anyone has a definitive answer, I'd still love to hear it!

    Last edited by allclear; 03-12-19, 01:25 PM.

  • Customer, Order, Category custom fields are not automatically stated in any templates that I know of. They all have to be called manually.

    However, simple to do if you've got access to the 'key' variable (i.e., customer_id, order_id, cat_id). Also, if you do this:

     <mvt:item name="customfields" param="Read_Customer_ID( g.customer:id, '', g.customData )" />
    You'd get all custom fields based on their custom field codes. For example acquisition = g.customData:acquisition favColor = g.customData:favColo foodChoice = g.customData:foodChoice
    Bruce Golub
    Phosphor Media - "Your Success is our Business"

    Improve Your Customer Service | Get MORE Customers | Edit CSS/Javascript/HTML Easily | Make Your Site Faster | Get Indexed by Google | Free Modules | Follow Us on Facebook



    This website uses cookies to identify visitors, track visitors to our website, store login session information and to remember your user preferences. By continuing to use this site you agree to our use of cookies. Learn More.

    This website uses cookies. By continuing to use this site you agree to our use of cookies. Learn More.