Skip to main content
Reference

Order SFO

Properties

Methods

MethodSignatureComments/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
getBillingAddress1string getBillingAddress1()
getBillingAddress2string getBillingAddress2()
getBillingCitystring getBillingCity()
getBillingCompanystring getBillingCompany()
getBillingCountrystring getBillingCountry()
getBillingCountry3LetterCodestring getBillingCountry3LetterCode()
getBillToDayPhonestring getBillToDayPhone()alias getBillingDayPhone()
getBillingFirstNamestring getBillingFirstName()
getBillingLastNamestring getBillingLastName()
getBillingPostalCodestring getBillingPostalCode()
getBillingStatestring getBillingState()
getCcEmailsstring[ ] getCcEmails()
getCouponCodesstring[ ] getCouponCodes()
getCouponsCoupons[ ] getCoupons()
getCommentsstring[ ] getComments()
getCreationDateDate getCreationDate()
getCurrencyCodestring getCurrencyCode()
getCustomField1string getCustomField1()
getCustomField2string getCustomField2()
getCustomField3string getCustomField3()
getCustomField4string getCustomField4()
getCustomField5string getCustomField5()
getCustomField6string getCustomField6()
getCustomField7string getCustomField7()
getDeliveryDateDate getDeliveryDate()
getDirectTrackProductsstring getDirectTrackProducts()
getDirectTrackProducts2string getDirectTrackProducts2()
getDirectTrackProducts3string getDirectTrackProducts3()
getDiscountBigDecimal  getDiscount()this is the subtotal discount
getDiscountFormattedstring getDiscountFormatted
getEmailstring getEmail()
getGiftCertificateAmountBigDecimal getGiftCertificateAmount()
getGiftCertificateAmountFormattedstring getGiftCertificateAmountFormatted()
getGiftChargeBigDecimal getGiftCharge()
getGiftChargeFormattedstring getGiftChargeFormatted()
getGiftWrapCostBigDecimal getGiftWrapCost()
getGiftWrapCostFormattedstring getGiftWrapCostFormatted()
getGiftEmailstring getGiftEmail()
getGiftMessagestring[] getGiftMessage()returns an array of the gift message. Each line of the gift message is a maximum of 80 characters long.
getItemDescriptionsstring getItemDescriptions()returns a csv delimited string of item descriptions
getItemIdsstring 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.
getItemQuantitiesstring getItemQuantities()returns a csv delimited string of item quantities
getItemsOrderItem[] getItems()
getMerchantIdstring getMerchantId()
getOmnitureProductsstring getOmnitureProducts()
getOmnitureProductsWithShippingstring getOmnitureProductsWithShipping()
getorderHashstring getorderHash()
getOrderIdstring getOrderId()
getPaymentDateDate getPaymentDate()
getReceiptEmailstring getReceiptEmail()
getShippingAddress1string getShippingAddress1()
getShippingAddress2string getShippingAddress2()
getShippingCitystring getShippingCity()
getShippingCompanystring getShippingCompany()
getShippingCountrystring getShippingCountry()
getShippingCountry3LetterCodestring getShippingCountry3LetterCode()
getShippingDateDate getShippingDate()
getShippingFirstNamestring getShippingFirstName()
getShippingHandlingDiscountBigDecimal getShippingHandlingDiscount()
getShippingHandlingDiscountFormattedstring getShippingHandlingDiscountFormatted()
getShippingHandlingBigDecimal getShippingHandling()
getShippingHandlingFormattedstring getShippingHandlingFormatted()
getShippingHandlingRefundedBigDecimal getShippingHandlingRefunded()
getShippingHandlingRefundedFormattedstring getShippingHandlingRefundedFormatted()
getShippingLastNamestring getShippingLastName()
getShippingPostalCodestring getShippingPostalCode()
getShippingStatestring getShippingState()
getSpecialInstructionsstring[ ] getSpecialInstructions()
getSubtotalBigDecimal getSubtotal()
getSubtotalFormattedstring getSubtotalFormatted()
getSubtotalBeforeDiscountBigDecimal getSubtotalBeforeDiscount()
getSubtotalBeforeDiscountFormattedstring getSubtotalBeforeDiscountFormatted()
getTaxBigDecimal getTax()
getTaxFormattedstring getTaxFormatted()
getTaxRateBigDecimal getTaxRate()
getTaxRateFormattedstring getTaxRateFormatted()
getTier1AffiliateIdinteger getTier1AffiliateId()
getTotalBigDecimal 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.
hasItemWithOptionboolean hasItemWithOption(string itemId, string optionName, string optionValue)
ifPurchasedboolean 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
isCouponCodeUsedboolean 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
isMailingListOptInboolean 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
isPaymentMethodboolean isPaymentMethod(string paymentMethod)
isPrepaidCreditCardboolean isPrepaidCreditCard()
isPurchasedboolean isPurchased(string itemId)
isPurchasedAnyItemInFolderboolean 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()
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
isTestOrderboolean isTestOrder()
isUnreviewedItemsboolean isUnreviewedItems()true if one or more items has not been reviewed by the purchasing customer.
:::warning
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)
prorateItemCostBigDecimal prorateItemCost(string itemId, integer expirationDays)
setCustomField1void setCustomField1(value)this actually updates the order
setCustomField2void setCustomField2(value)this actually updates the order
setCustomField3void setCustomField3(value)this actually updates the order
setCustomField4void setCustomField4(value)this actually updates the order
setCustomField5void setCustomField5(value)this actually updates the order
setCustomField6void setCustomField6(value)this actually updates the order
setCustomField7void setCustomField7(value)this actually updates the order

See Also

Was this page helpful?