Email to Friend

The Email to Friend email is old functionality that has been bypassed by the introduction of social sharing, such as via Facebook.  It is rare anyone uses this anymore, but it still exists in Aurora.  

This article describes how to enable this.

Introduction

The email must be created under Orders > Emails and be assigned the "Use" of "Email to Friend".  

Templates

You can call the form via

$.get('/ajax/Ajax_Products/getEmailToAFriendForm', { }, function (response) {

And submit the form via

$.post('/ajax/Ajax_Products/emailToAFriend', { all_fields: $(this).serialize() }, function(responseJson) {

Once this has been validated and passed spam checks, it will send the email.  

Placeholders

Below is a list of available placeholders that can be used in this email templates.

PlaceholderTypeCurrencyValue
$productArrayThe product information
$sender_nameStringThe name of the sender, as determined based on the form input
$sender_messageStringThe sender's message, as determined based on the form input

Templates

products/ajax-email-to-friend.tpl.html

_js/productdetails.js