How do I add a variable subject line to my emails?

Broadleaf Commerce Discussion Forum

Moderator: jocanas

joebahoe
Newbie
Newbie
Posts: 1
Joined: Fri Jun 17, 2016 3:17 pm

How do I add a variable subject line to my emails?

Postby joebahoe » Fri Jun 17, 2016 3:24 pm

I'm trying to add the customer's first name to the subject line of our emails.

Code: Select all

<bean id="blOrderConfirmationEmailInfo" parent="blEmailInfo">
        <property name="subject" value="CustomerFirstName, your order is on its way!"/>
        <property name="emailTemplate" value="shop-order-confirmation"/>
</bean>


I have not seen an example of this in the forums or anywhere else. Please help!

Thanks,

-- Joe

benhenda89
Newbie
Newbie
Posts: 7
Joined: Wed Nov 19, 2014 7:25 am

Re: How do I add a variable subject line to my emails?

Postby benhenda89 » Wed Nov 02, 2016 12:52 pm

Greeting,
use EmailInfo.java

Code: Select all

<bean id="blOrderConfirmationEmailInfo" parent="blEmailInfo">
        <property name="emailTemplate" value="shop-order-confirmation"/>
</bean>


Code: Select all

@Resource("blOrderConfirmationEmailInfo)
 protected EmailInfo emailInfo;

emailInfo.setSubject(customer.getFirstName() + ", your order is on its way!");


Return to “Broadleaf Commerce”

Who is online

Users browsing this forum: No registered users and 2 guests