Bewitching Posted July 31, 2011 Share Posted July 31, 2011 When an email is sent to customer, after they have created a wish list, the greeting just says "Hi," with no name after the Hi. I'd like it to say Hi "customer first name", I've added {firstname} to the HTML and the text file in modules/blockwishlist/mails/en, but the letter sent still doesn't include the customers first name. Is there something else I need to modify the get the customers first name to show up in this e-mail ? Thanks in advance, Kathleen Link to comment Share on other sites More sharing options...
vivek tripathi Posted August 4, 2011 Share Posted August 4, 2011 You have to make few minimal changes to display customer name in email greeting module->blockwishlist->wishlink.txt add {firstname} {lastname} after Hi module->blockwishlist->wishlink.html add {firstname} {lastname} after Hi, Replace module->blockwishlist->wishlist.php if(!sizeof($errors)) { $wishlist = new WishList(); $wishlist->name = $name; $wishlist->id_customer = (int)$cookie->id_customer; list($us, $s) = explode(' ', microtime()); srand($s * $us); $wishlist->token = strtoupper(substr(sha1(uniqid(rand(), true)._COOKIE_KEY_.$cookie->id_customer), 0, 16)); $wishlist->add(); Mail::Send((int)($cookie->id_lang), 'wishlink', Mail::l('Your wishlist\'s link'), array( '{wishlist}' => $wishlist->name, '{message}' => Tools::getProtocol().htmlentities($_SERVER['HTTP_HOST'], ENT_COMPAT, 'UTF-8').__PS_BASE_URI__.'modules/blockwishlist/view.php?token='.$wishlist->token), $cookie->email, $cookie->firstname.' '.$cookie->lastname, NULL, strval(Configuration::get('PS_SHOP_NAME')), NULL, NULL, dirname(__FILE__).'/mails/'); } with the following code if(!sizeof($errors)) { $wishlist = new WishList(); $wishlist->name = $name; $wishlist->id_customer = (int)$cookie->id_customer; list($us, $s) = explode(' ', microtime()); srand($s * $us); $wishlist->token = strtoupper(substr(sha1(uniqid(rand(), true)._COOKIE_KEY_.$cookie->id_customer), 0, 16)); $wishlist->add(); $customer= $wishlist->getByToken($wishlist->token); $wishlist->add(); Mail::Send((int)($cookie->id_lang), 'wishlink', Mail::l('Your wishlist\'s link'), array( '{wishlist}' => $wishlist->name, '{firstname}' => $customer['firstname'], '{firstname}' => $customer['lastname'], '{message}' => Tools::getProtocol().htmlentities($_SERVER['HTTP_HOST'], ENT_COMPAT, 'UTF-8').__PS_BASE_URI__.'modules/blockwishlist/view.php?token='.$wishlist->token), $cookie->email, $cookie->firstname.' '.$cookie->lastname, NULL, strval(Configuration::get('PS_SHOP_NAME')), NULL, NULL, dirname(__FILE__).'/mails/'); } for shake of convenience I attached mywishlist.php code in text file below mywishlist.txt Link to comment Share on other sites More sharing options...
Bewitching Posted August 5, 2011 Author Share Posted August 5, 2011 Thank you Vivek ! It was the php part I was missing. You rock !!! Thanks again, Kathleen Link to comment Share on other sites More sharing options...
kamaaina Posted November 18, 2015 Share Posted November 18, 2015 The wishlist link in my emails are not working have tried the following but none work, need correct link to add to emails - help! <a href="{wishlist_link}" style="color:#337ff1;">{wishlist}</a> <a href="{wishlist_url}" style="color:#337ff1;">{wishlist}</a> <a href="{wishlist}" style="color:#337ff1;">{wishlist}</a> <a href="{wishlink}" style="color:#337ff1;">{wishlist}</a> Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now