Post by v1ppers0nn » Thu Sep 28, 2017 2:54 pm

Hi, i want to add to any email the first name of the buyer. Can someone help me? I try with this: http://forum.opencart.com/viewtopic.php?f=20&t=41057 but not is working. I am with 2.3.0.2.

Newbie

Posts

Joined
Fri Feb 03, 2017 5:33 pm

Post by paulfeakins » Thu Sep 28, 2017 6:17 pm

It's not really an easy thing to explain in a forum post, but you need to decide on a string to be replaced with the first name, something like {first_name}. Then you need to find the bit of code where emails are sent and run the content of the email through a php funtion like str_replace and replace {first_name} with the content of the variable that contains the customer name.

Unless you're happy doing this coding you're best finding a developer from the Commercial Support Forum to do this, or looking for a Mail Merge extension in the marketplace.

UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk


User avatar
Legendary Member
Online

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - London Gatwick, United Kingdom

Post by v1ppers0nn » Fri Sep 29, 2017 2:44 pm

I think not is hard to make this, just 1-2 lines of code to add on the language/email and on the function. I want to get the first name of the order and add it on the begin, like Hello "firstname", ....

Newbie

Posts

Joined
Fri Feb 03, 2017 5:33 pm
Who is online

Users browsing this forum: No registered users and 101 guests