Order SFO

Properties

Methods

Method

Signature

Comments/Sample

getAdvertistingSourcestring getAdvertisingSource()
getBaseCurrencyCodestring getBaseCurrencyCode()the base currency code of the merchant. useful only when doing currency conversions. rarely explicitly used in pages or emails

getBillingAddress1

string getBillingAddress1()

 

getBillingAddress2

string getBillingAddress2()

 

getBillingCity

string getBillingCity()

 

getBillingCompany

string getBillingCompany()

 

getBillingCountry

string getBillingCountry()

 

getBillingCountry3LetterCode

string getBillingCountry3LetterCode()

 

getBillToDayPhonestring getBillToDayPhone()alias getBillingDayPhone()

getBillingFirstName

string getBillingFirstName()

 

getBillingLastName

string getBillingLastName()

 

getBillingPostalCode

string getBillingPostalCode()

 

getBillingState

string getBillingState()

 

getBuysafeCostBigDecimal getBuysafeCost() 
getBuysafeCostFormattedstring getBuysafeCostFormatted() 
getBuysafeRefundedBigDecimal  getBuysafeRefunded() 
getBuysafeRefundedFormattedstring getBuysafeRefundedFormatted() 
getCcEmailsstring[ ] getCcEmails()

getCouponCodes

string[ ] getCouponCodes()

 

getCouponsCoupons[ ] getCoupons()
getCommentsstring[ ] getComments()

getCreationDate

Date getCreationDate()

 

getCurrencyCode

string getCurrencyCode()

 

getCustomField1

string getCustomField1()

 

getCustomField2

string getCustomField2()

 

getCustomField3

string getCustomField3()

 

getCustomField4

string getCustomField4()

 

getCustomField5

string getCustomField5()

 

getCustomField6

string getCustomField6()

 

getCustomField7

string getCustomField7()

 

getDeliveryDate

Date getDeliveryDate()

 

getDirectTrackProducts

string getDirectTrackProducts()

 

getDirectTrackProducts2

string getDirectTrackProducts2()

 

getDirectTrackProducts3

string getDirectTrackProducts3()

 

getDiscountBigDecimal  getDiscount()this is the subtotal discount
getDiscountFormattedstring getDiscountFormatted

getEmail

string getEmail()

 

getGiftCertificateAmountBigDecimal getGiftCertificateAmount()
getGiftCertificateAmountFormattedstring getGiftCertificateAmountFormatted()
getGiftChargeBigDecimal getGiftCharge()
getGiftChargeFormattedstring getGiftChargeFormatted()
getGiftWrapCostBigDecimal getGiftWrapCost()
getGiftWrapCostFormattedstring getGiftWrapCostFormatted()

getGiftEmail

string getGiftEmail()

 

getGiftMessagestring[] getGiftMessage()returns an array of the gift message. Each line of the gift message is a maximum of 80 characters long.

getItemDescriptions

string getItemDescriptions()

returns a csv delimited string of item descriptions

getItemIds

string getItemIds()

returns a csv delimited string of item ids

getItemIdsAsJsonstring getItemIdsAsJson()returns a json array of item ids. very useful if you need the cart item ids in a javascript array.

getItemQuantities

string getItemQuantities()

returns a csv delimited string of item quantities

getItems

OrderItem[] getItems()

 

getMerchantId

string getMerchantId()

 

getOmnitureProducts

string getOmnitureProducts()

 

getOmnitureProductsWithShipping

string getOmnitureProductsWithShipping()

 

getorderHash

string getorderHash()

 

getOrderId

string getOrderId()

 

getPaymentDate

Date getPaymentDate()

 

getReceiptEmail

string getReceiptEmail()

 

getShippingAddress1

string getShippingAddress1()

 

getShippingAddress2

string getShippingAddress2()

 

getShippingCity

string getShippingCity()

 

getShippingCompany

string getShippingCompany()

 

getShippingCountry

string getShippingCountry()

 

getShippingCountry3LetterCode

string getShippingCountry3LetterCode()

 

getShippingDate

Date getShippingDate()

 

getShippingFirstName

string getShippingFirstName()

 

getShippingHandlingDiscountBigDecimal getShippingHandlingDiscount()
getShippingHandlingDiscountFormattedstring getShippingHandlingDiscountFormatted()
getShippingHandlingBigDecimal getShippingHandling()
getShippingHandlingFormattedstring getShippingHandlingFormatted()
getShippingHandlingRefundedBigDecimal getShippingHandlingRefunded()
getShippingHandlingRefundedFormattedstring getShippingHandlingRefundedFormatted()

getShippingLastName

string getShippingLastName()

 

getShippingPostalCode

string getShippingPostalCode()

 

getShippingState

string getShippingState()

 

getSpecialInstructionsstring[ ] getSpecialInstructions()

getSubtotal

BigDecimal getSubtotal()

 

getSubtotalFormattedstring getSubtotalFormatted()
getSubtotalBeforeDiscountBigDecimal getSubtotalBeforeDiscount()
getSubtotalBeforeDiscountFormattedstring getSubtotalBeforeDiscountFormatted()

getTax

BigDecimal getTax()

 

getTaxFormatted

string getTaxFormatted()

 

getTaxRateBigDecimal getTaxRate()
getTaxRateFormattedstring getTaxRateFormatted()

getTier1AffiliateId

integer getTier1AffiliateId()

 

getTotal

BigDecimal getTotal()

 

getTotalFormattedstring getTotalFormatted()
getTotalRefundedBigDecimal getTotalRefunded()
getTotalRefundedFormattedstring getTotalRefundFormatted()
getTrackingNumbersstring[] getTrackingNumbers()Returns the tracking numbers that are available on the order.
getTrackingUrlstring getTrackingUrl(string trackingNumber)Returns the URL that the customer can click to track the given tracking number. Use this in a loop of getTrackingNumbers to output tracking information for the customer on the shipment notification.
getUnshippedItemsItem[] getUnshippedItems()Returns the items that have not been shipped on the order. Useful in the shipment notification email.

hasItemWithOption

boolean hasItemWithOption(string itemId, string optionName, string optionValue)

 

ifPurchased

boolean ifPurchased(string itemIds)

itemIds is a csv string of item ids

isContainsDigitalDeliveryboolean isContainsDigitalDelivery()
isContainsPreorderboolean isContainsPreorder()
isDeclinedboolean isDeclined()

if true, payment was declined. a more thorough check for a good payment is isPaymentProcessed. If that boolean is true, then successful payment has been made. Otherwise, payment is pending or declined. See isPaymentProcessed for a good example of how to show a warning to a customer that payment was not successful.

this property is most useful from within the customer portal

isCouponCodeUsed

boolean isCouponCodeUsed(string code)

 

isGiftboolean isGift()
isHasDiscountboolean isHasDiscount()
isHasRefundboolean isHasRefund()
isHidePaymentInformationboolean isHidePaymentInformation()this will be true if cost was zero AND gift certificates were used
isInShippingboolean isInShipping()true if the order is in the shipping department
isLiftGateboolean isLiftGate()true if the customer has requested a lift gate for a heavy delivery

isMailingListOptIn

boolean isMailingListOptIn()

 

isNeedShippingboolean isNeedShipping()
isPaymentProcessedboolean isPaymentProcessed()

true if the customer has finalized payment. this is a very important method if you are embedded download links or codes within your receipt using the $order.isPurchased('ITEM') calls.

this method should always wrap those calls to ensure a customer with declined payment does not receive digital goods.

#if($order.isPaymentProcessed())
 #if($order.isPurchased('ItemA')
 Here is your download code: ABCDEFG
 #end
#else
 There was a problem verifying your payment information, please contact our customer support. Thank you.
#end

isPaymentMethod

boolean isPaymentMethod(string paymentMethod)

 

isPrepaidCreditCard

boolean isPrepaidCreditCard()

 

isPurchased

boolean isPurchased(string itemId)

 

isPurchasedAnyItemInFolder
boolean isPurchasedAnyItemInFolder(String folderPath, boolean includeSubFolders)
Checks to see if any of the items on the order were located in the specified folderPath. The folderPath should start and end with / to make sure it's a complete item management folder path. The includeSubFolders parameter is optional and will default to false.
isRefundPresentboolean isRefundPresent()

true if some form of refund is present in the order. this is useful for deciding whether to show refund line items or summary items

useful for customer portal

isRejectedboolean isRejected()

true if order was rejected (either automatically by fraud rules or manually by merchant)'

useful for customer portal

isSaturdayDeliveryboolean isSaturdayDelivery()
isShipmentCompleteboolean isShipmentComplete()Returns true once the order is completely shipped and moved to the completed orders stage.
isShipToResidentialboolean isShipToResidential()
isShowBuysafeboolean isShowBuysafe()Returns true if the order is bonded with buySAFE.
isShowCurrencyWarningboolean isShowCurrencyWarning()true if $order.getCurrencyWarning() should be shown somewhere on the page/email.
isTaxGiftChargeboolean isTaxGiftCharge()true if the merchant is collecting tax on gift charges
isTaxGiftWrapboolean isTaxGiftWrap()true if the merchant is collecting tax on gift wrap
isTaxShippingboolean isTaxShipping()true if the merchant is collecting tax on shipping

isTestOrder

boolean isTestOrder()

 

isUnreviewedItemsboolean isUnreviewedItems()

true if one or more items has not been reviewed by the purchasing customer.

This property is only available within the MyAccount customer portal. It is never available on receipt pages/emails or other forms of communication.

isVoidedboolean isVoided()true if the order has been voided (useful for customer portal)

prorateItemCost

BigDecimal prorateItemCost(string itemId, integer expirationDays)

 

setCustomField1

void setCustomField1(value)

this actually updates the order

setCustomField2

void setCustomField2(value)

this actually updates the order

setCustomField3

void setCustomField3(value)

this actually updates the order

setCustomField4

void setCustomField4(value)

this actually updates the order

setCustomField5

void setCustomField5(value)

this actually updates the order

setCustomField6

void setCustomField6(value)

this actually updates the order

setCustomField7

void setCustomField7(value)

this actually updates the order

See Also