ModelCarts module
Cart
A model in the Carts module, with 26 members for templates, 23 API properties and 26 members for admin templates.
Templates view
Properties 26
Take no arguments.
-
#
getCurrency() -
Model - Gets the cart's currency, falling back to the site's default currency when the cart has none.
-
#
getItemTotalAsMoney() -
Money - Gets the item total as a Money object. Represents the sum of all items' Amount values.
-
#
getTaxTotalAsMoney() -
Money - Gets the tax total as a Money object. Represents the sum of tax values across all line items, including shipping, handling, etc.
-
#
getDiscountTotalAsMoney() -
Money - Gets the discount total as a Money object. Represents the sum of discount values across all line items, including shipping, handling, etc.
-
#
getTotalAsMoney() -
Money - Gets the grand total as a Money object. Represents the final value calculated as
Item Total - Discount Total + Tax Total. Item Total is a sum of all *available* items' Amount values. -
#
getId() -
?int -
#
getUuid() -
?string -
#
getTaxTotal() -
?string - Represents the sum of tax values across all line items, including shipping, handling, etc.
-
#
getDiscountTotal() -
?string - Represents the sum of discount values across all line items, including shipping, handling, etc.
-
#
getTotal() -
?string - Represents the final value calculated as
Item Total - Discount Total + Tax Total. Item Total is a sum of all _available_ items' Amount values. -
#
getItems() -
?Collection<Item> -
#
getMessages() -
?Collection<Message> -
#
isHierarchicalModel()Not in API & Jobs -
bool - Check whether a model is a hierarchical model, i.e. can have children
No members match the filter.
API & Jobs view
API & JobsEach property is a key in REST API responses and job payloads. Its name is the template getter without get, is or has. Methods that need arguments are not available here.
Properties 23
Read-only values on the record.
-
#
itemTotalAsMoney -
Money - Gets the item total as a Money object. Represents the sum of all items' Amount values.
-
#
taxTotalAsMoney -
Money - Gets the tax total as a Money object. Represents the sum of tax values across all line items, including shipping, handling, etc.
-
#
discountTotalAsMoney -
Money - Gets the discount total as a Money object. Represents the sum of discount values across all line items, including shipping, handling, etc.
-
#
totalAsMoney -
Money - Gets the grand total as a Money object. Represents the final value calculated as
Item Total - Discount Total + Tax Total. Item Total is a sum of all *available* items' Amount values. -
#
id -
?int -
#
uuid -
?string -
#
taxTotal -
?string - Represents the sum of tax values across all line items, including shipping, handling, etc.
-
#
discountTotal -
?string - Represents the sum of discount values across all line items, including shipping, handling, etc.
-
#
total -
?string - Represents the final value calculated as
Item Total - Discount Total + Tax Total. Item Total is a sum of all _available_ items' Amount values. -
#
currency -
?Currency - Gets the currency if it's set. If there is any item in the cart, the currency is set. Clearing the cart also clears its currency.
-
#
items -
?Collection<Item> -
#
messages -
?Collection<Message>
No members match the filter.
Admin view
AdminAvailable in cdna-admin templates. Copy an admin template into your site repository to change how this record is edited.
Properties 26
Take no arguments.
-
#
getItemTotalAsMoney() -
Money - Gets the item total as a Money object. Represents the sum of all items' Amount values.
-
#
getTaxTotalAsMoney() -
Money - Gets the tax total as a Money object. Represents the sum of tax values across all line items, including shipping, handling, etc.
-
#
getDiscountTotalAsMoney() -
Money - Gets the discount total as a Money object. Represents the sum of discount values across all line items, including shipping, handling, etc.
-
#
getTotalAsMoney() -
Money - Gets the grand total as a Money object. Represents the final value calculated as
Item Total - Discount Total + Tax Total. Item Total is a sum of all *available* items' Amount values. -
#
getId() -
?int -
#
getUuid() -
?string -
#
getTaxTotal() -
?string - Represents the sum of tax values across all line items, including shipping, handling, etc.
-
#
getDiscountTotal() -
?string - Represents the sum of discount values across all line items, including shipping, handling, etc.
-
#
getTotal() -
?string - Represents the final value calculated as
Item Total - Discount Total + Tax Total. Item Total is a sum of all _available_ items' Amount values. -
#
getCurrency() -
?Currency - Gets the currency if it's set. If there is any item in the cart, the currency is set. Clearing the cart also clears its currency.
-
#
getItems() -
?Collection<Item> -
#
getMessages() -
?Collection<Message> -
#
isHierarchicalModel()Not in API & Jobs -
bool - Check whether a model is a hierarchical model, i.e. can have children
No members match the filter.