3 replies [Last post]
Neco's picture
Offline
Joined: 03/04/2013
Juice: 13
Was this information Helpful?

Hi all,

Is there a way for Ubercart to send out different invoices to customers that buy different products or is their a way to add a message on an invoice if a customer purchase "Product B" that would not be on the Invoice if that purchased "Product A" ?

Thanks.

DanZ's picture
Offline
Joined: 08/07/2011
Juice: 1738
Re: Send a user an email after purchasing certain product

Yes, this is possible without module programming.

Assuming Ubercart 3 (Drupal 7).

First, install Ubercart Register Invoice Templates. Use it to set up multiple different invoice templates.

Then, set up your rules to send the e-mail. You'll be replacing the built-in "E-mail customer checkout notification" rule. (Which you may want to disable.)

Start at admin/config/workflow/rules and create a new rule. (Or clone and modify the "E-mail customer checkout notification" rule.)

The event is "Customer completes checkout".

Add a condition: "Check an order's products". Configure the condition to include the appropriate products.

Add an action: "E-mail an order invoice". Configure this action to use the appropriate template you set up earlier.

That's it. Add a rule like this for each custom invoice template you wish to use.

Neco's picture
Offline
Joined: 03/04/2013
Juice: 13
Re: Send a user an email after purchasing certain product

This works! Thank you for your help!

DanZ's picture
Offline
Joined: 08/07/2011
Juice: 1738
Re: Re: Send a user an email after purchasing certain product

You're welcome! I'm glad it solved your problem.

If this if valuable enough to you, please "pay it forward" to the Ubercart community by answering questions here or by helping with the Ubercart issues queue at https://drupal.org/project/issues/ubercart?categories=All. (Both coding and answering of questions are much appreciated there.)