Customer Order Notifcation Email Template

For general questions and discussions specific to the AbleCommerce 7.0 Asp.Net product.
Post Reply
SkylineTech
Lieutenant, Jr. Grade (LT JG)
Lieutenant, Jr. Grade (LT JG)
Posts: 22
Joined: Tue Jul 13, 2010 9:12 am

Customer Order Notifcation Email Template

Post by SkylineTech » Tue Jul 13, 2010 9:18 am

At the bottom of this email, I am trying to display the amount of the order that was paid for by Gift Certificate, the amount paid for by Credit Card, and the remaining balance of the Gift Certificate. Is this possible? If so, any sample code would be appreciated.

Thank you

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: Customer Order Notifcation Email Template

Post by mazhar » Tue Jul 13, 2010 11:21 am

This could be something like

Code: Select all

#set($gcamount=0)
#foreach($payment in $order.Payments)
#if ( ($payment.PaymentMethodName == "Gift Certificate") && ($payment.PaymentStatus=="Captured") )
#set($gcamount =  $gcamount+ $payment.Amount.ToDecimal(null))
#end
#end
Gift Certificate Payments:$gcamount

SkylineTech
Lieutenant, Jr. Grade (LT JG)
Lieutenant, Jr. Grade (LT JG)
Posts: 22
Joined: Tue Jul 13, 2010 9:12 am

Re: Customer Order Notifcation Email Template

Post by SkylineTech » Tue Jul 13, 2010 11:29 am

Thank you!

One more thing, is there a way to get the remaining Gift Certificate balance?

Thanks again!

SkylineTech
Lieutenant, Jr. Grade (LT JG)
Lieutenant, Jr. Grade (LT JG)
Posts: 22
Joined: Tue Jul 13, 2010 9:12 am

Re: Customer Order Notifcation Email Template

Post by SkylineTech » Tue Jul 13, 2010 12:36 pm

Looks like I can do something like this:

Code: Select all

#set($gcID = 0)
#foreach($gcTrans in $order.GiftCertificateTransactions)
#if($gcTrans.GiftCertificateId != $gcID)
$gcTrans.GiftCertificate.SerialNumber&nbsp;&nbsp;-&nbsp;&nbsp;$gcTrans.GiftCertificate.Balance.ToString("C")<br />
#set($gcID = $gcTrans.GiftCertificateId)
#end
#end

Post Reply