ModelCarts module

Message

A model in the Carts module, with 15 members for templates, 12 API properties and 15 members for admin templates.

Carts\Models\Frontend\Message Carts\Models\Api\Message Carts\Models\Backend\Message Also in Carts: Cart Item
View
What Smarty and Twig templates receive. Properties in REST API responses and job payloads. What admin screen templates receive when you override them.

Templates view

Properties 15

Take no arguments.

# getId()
?int
# getStatus()
?string
# isInfo()
bool
Returns if it is the info message
# isWarning()
bool
Returns if it is the warning message
# isError()
bool
Returns if it is the error message
# getText()
?string
# getData()
?array
# getExpiry()
?DateTime
# isExpired()
bool
Checks if the message is expired.
# getCreated()
?DateTime
Date the record was created.
# getCart()
?Cart
# getItem()
?Item
# isNewRecord() Not in API & Jobs
bool
Check if the record is a new record
# isHierarchicalModel() Not in API & Jobs
bool
Check whether a model is a hierarchical model, i.e. can have children
# isVersionedModel() Not in API & Jobs
bool
Check whether a model is versioned

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 12

Read-only values on the record.

# id
?int
# status
?string
# info
bool
Returns if it is the info message
# warning
bool
Returns if it is the warning message
# error
bool
Returns if it is the error message
# text
?string
# data
?array
# expiry
?DateTime
# expired
bool
Checks if the message is expired.
# created
?DateTime
Date the record was created.
# cart
?Cart
# item
?Item

Admin view

AdminAvailable in cdna-admin templates. Copy an admin template into your site repository to change how this record is edited.

Properties 15

Take no arguments.

# getId()
?int
# getStatus()
?string
# isInfo()
bool
Returns if it is the info message
# isWarning()
bool
Returns if it is the warning message
# isError()
bool
Returns if it is the error message
# getText()
?string
# getData()
?array
# getExpiry()
?DateTime
# isExpired()
bool
Checks if the message is expired.
# getCreated()
?DateTime
Date the record was created.
# getCart()
?Cart
# getItem()
?Item
# isNewRecord() Not in API & Jobs
bool
Check if the record is a new record
# isHierarchicalModel() Not in API & Jobs
bool
Check whether a model is a hierarchical model, i.e. can have children
# isVersionedModel() Not in API & Jobs
bool
Check whether a model is versioned