Extension, Module, Plugin

Archived
Forum
(read-only)

Postmaster

ExpressionEngine 2

Back to this add-on's main page
View Other Add-ons From Objective HTML

     

Cartthrob - Digital Giftcard Email

Support Request

Greg Wineman
Greg Wineman

I’m using cartThrob and allowing customers to purchase a virtual product for a friend (gift cards). I’m NOT using the cartThrob gift cards for this project.

As of now… when a user wants to send a product to a friend - it’s added as a item option when they add it to their cart with the friend’s email address.

When the order is complete… I’d like to send an email/gift card to any recipients in the item:options.

I’m already using the cartthrob hook for order notifications/etc….  but these emails need to be initiated from either

1: within the normal customer notification template in Postmaster
OR
2: from the order confirmation page

One the surface, it seems like I should initiate the emails from the order confirmation page and use the postmaster trigger tag. I would need to pass along the gift recipients email addresses.

The logic on the confirmation page would be….

{order_items}
{if 
"{product_options_other}" == "email_friend"}

 {exp
:postmaster:trigger
  subject
="You've received a gift"
  
entry_id="{entry_id}"
                
recipient="{item:mail_email}"
 
}
  {hook
:entry_id}<br>
  
{hook:title}<br>
  
{hook:url_title} 
 {
/exp:postmaster:trigger}

 
{
/if}
{
/order_items} 

Is this the right idea? How can I define which hook to call… I may have multiple trigger hooks in this project. Or… maybe I’m misunderstaing the trigger hook all-together.

Any help/insight appreciated.

Thanks!

Rowan
# 1
Rowan

I am hoping to accomplish something very similar to you. I want my customers to be able:
1. to buy a digital product as a gift
2. enter in email of recipient & short message
3. create a coupon code for recipient
4. send email (using postmaster seems like a good option?) to recipient with custom message, coupon code & redemption instructions

Greg- if you have solved this I’d love to know how you did it. It might save me some time :)