...
Method Name | Signature | Returns | Example | |
---|---|---|---|---|
getReturnLink |
| a bitly url useful for directing a customer back to their checkout. |
| |
getReturnLink | getReturnLink(String returnUrl, String tokenParameter)
| a bitly url useful for directing a customer back to their custom checkout. | #if("$!{cart}" != "") ## <-- this is a better way to check for nulls instead of #if($cart) Please complete your order! Here's a 20% off coupon that is good for the next 48 hours! #set($cCode = $coupon.generateCode('MY_20_OFF', '48')) $cart.addUniqueCouponCode($cCode) #set($returnLink = $cart.getReturnLink("www.myjavascriptcheckout.com/checkout.html", "returnCode")) <a href="${returnLink}">Your Order</a> #end | |
addUniqueCouponCode |
| true if successful, else false. If false, $cart.getErrors() will contain a list of errors. | see getReturnLink for example | |
setReturnUrl | alternative way to use custom return link | if you setReturnUrl and setTokenParameterName, then the getReturnLink() with empty parameters will also return a custom link. This is mainly going to be used with External Integrations such as Lyris. If you're not using Lyris, then getReturnLink(returnUrl, tokenName) is simpler and preferred. | ||
setTokenParameterName | alternative way to use custom return link |
The above example uses the return link, and tacks on a coupon to the url, which will automatically apply it to the customer's cart.
...
Method Name | Signature | Returns | Example | ||
---|---|---|---|---|---|
getCampaignHistory |
| a list of the recipient's history in this campaign |
| ||
getCountOfPurchasesInLastDays |
| a count of purchases made |
| ||
getCountOfShipmentsInLastDays |
| a count of shipments made |
| ||
getDisplayName |
| the name of the recipient, or if that wasn't collected, their email address | Welcome | ||
getDisplayFirstName | $customer.getDisplayFirstName() | the first name of the recipient, or if that wasn't collect an empty string | Welcome $customer.getDisplayFirstName() , here's a coupon... | ||
getDisplayLastName | $customer.getDisplayLastName() | the last name of the recipient, or if that wasn't collect an empty string | |||
getEmail |
| them email address of the recipient | This email was address to: | ||
getEnrollmentDts | #set($timestamp = $customer.getEnrollmentDts()) | this returns back a Java Timestamp object. | |||
getEnrollmentOrder | #set($enrollmentOrder = $customer.getEnrollmentOrder() | returns the order that triggered enrollment. If enrollment was not based on a purchase, this will be a null value. | |||
getEnrollmentOrderId | #set($orderId = $customer.getEnrollmentOrderId()) | ||||
getEnrollmentSource | #set($source = $customer.getEnrollmentSource()) | returns a string showing what the enrollment source is. Possible values:
| |||
getLastOrder |
| Retrieves the last order the customer made. You may wish to check if they've ordered anything first (hasPurchasedEver, etc) |
| ||
getOrderId | #set($orderId = $customer.getOrderId()) | returns the order id that triggered enrollment. If enrollment was not based on a purchase, this will be a null value. | |||
getOrders |
| Retrieves a list of orders for the customer. |
| ||
getRecurringInformation |
| returns the customer's meta information related to the recurring order (also known as 'auto order' or trial order). Always call |
| ||
getTotalForAllOrders | $customer.getTotalForAllOrders() | Total dollars the customer has ever spent. Useful to check for spending thresholds This returns a BigDecimal object. |
| ||
getTotalForAllPurchasesInLastDays |
| Same as above, but filters on purchases within the last XX days. This returns a BigDecimal object. |
| ||
getTotalForAllShipmentsInLastDays |
| Same as above, but filters on shipments within the last XX days. This returns a BigDecimal object. |
| ||
hasPricingTier | $customer.hasPricingTier("Wholesale") | returns true if the customer has an established customer profile in the UltraCart system and has the specified pricing tier. |
| ||
hasPurchasedEver |
| return true if the customer has ever purchased the item. |
| ||
hasPurchasedEver | $customer.hasPurchasedEver([itemId1, itemId2, itemId3]) | Same as above, but with a list. |
| ||
hasPurchasedInLastDays |
| Same as above, but with a days argument. |
| ||
hasPurchasedInLastDays |
| Same as above, but with a days argument. |
| ||
hasReviewedItem |
| returns true if the customer has already completed a review for the specified item. |
exit the 'please review this item campaign.
send the customer to an step sending them a reminder email
| ||
hasShipmentInLastDays |
| see similar 'purchased' method. Some merchants prefer shipment dates over purchase dates. |
| ||
hasShipmentInLastDays |
| see similar 'purchased' method. Some merchants prefer shipment dates over purchase dates. |
| ||
hasShipmentInLastDays |
| see similar 'purchased' method. Some merchants prefer shipment dates over purchase dates. |
| ||
isRecurring |
| returns true if the customer's underlying order was a recurring order (also known as 'auto order' or trial order). If this is true, then you may call |
| ||
lastOrderContains |
| checks to see if the last order contained a specific item. |
| ||
lastOrderContains |
| checks to see if the last order contains one of the items in the list |
|
...