Thomahawk, I needed something similar and found that the simplest way was to call the Cart2 template directly in the html email template rather than using the IncludeCart field.
Penny
Data from Cart2 into FormBuilder and into Email
- polodesign
- Forum Members
- Posts: 55
- Joined: Sun Jan 03, 2010 1:58 am
Re: Data from Cart2 into FormBuilder and into Email
A little late to this party. I've just done this. I just drop the cart2 call into the email template that gets sent. So for example my full email template in the 'Email results to set addresses' template is...
<h1>A order request has been submitted to you from the ES Rowing Services Website</h1>
<hr />
{if $fld_31 != "" && $fld_31 != "[unspecified]" }<strong>Name</strong>: {$fld_31}<br />{/if}
{if $fld_30 != "" && $fld_30 != "[unspecified]" }<strong>Email Address</strong>: {$fld_30}<br />{/if}
{if $message != "" && $message != "[unspecified]" }<strong>Message</strong>: {$message}<br />{/if}
{if $fld_31 != "" && $fld_31 != "[unspecified]" }<strong>Phone</strong>: {$fld_31}<br />{/if}
<hr />
{Cart2 action='viewcart' viewcarttemplate='mailcart'}
This works fine.
<h1>A order request has been submitted to you from the ES Rowing Services Website</h1>
<hr />
{if $fld_31 != "" && $fld_31 != "[unspecified]" }<strong>Name</strong>: {$fld_31}<br />{/if}
{if $fld_30 != "" && $fld_30 != "[unspecified]" }<strong>Email Address</strong>: {$fld_30}<br />{/if}
{if $message != "" && $message != "[unspecified]" }<strong>Message</strong>: {$message}<br />{/if}
{if $fld_31 != "" && $fld_31 != "[unspecified]" }<strong>Phone</strong>: {$fld_31}<br />{/if}
<hr />
{Cart2 action='viewcart' viewcarttemplate='mailcart'}
This works fine.
Re: Data from Cart2 into FormBuilder and into Email
One thing I am struggling with is how to empty the cart after the mail gets sent. When I did this with cart rather than cart2 a few years back the following worked as a udt...
$cart = cge_utils::get_module('Cart'); $cart->EraseCart();
Thus I was hoping...
$cart2 = cge_utils::get_module('Cart2'); $cart2->EraseCart();
...Might work . But no such luck. What are other people using to clear the cart?
$cart = cge_utils::get_module('Cart'); $cart->EraseCart();
Thus I was hoping...
$cart2 = cge_utils::get_module('Cart2'); $cart2->EraseCart();
...Might work . But no such luck. What are other people using to clear the cart?
Re: Data from Cart2 into FormBuilder and into Email
There is a bug in it, but {cgecomm_erasecart} should do the trick. Already told CG about it.
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
Migrating Company Directory module to LISE
- + - + - + - + - + - + -