ModelShipping module

BaseMethod

Method

A model in the Shipping module, with 22 members for templates, 22 API properties and 26 members for admin templates.

Shipping\Models\Frontend\BaseMethod Shipping\Models\Api\BaseMethod Shipping\Models\Backend\BaseMethod Also in Shipping: Category Group Location MethodZoneRule Rate Shipment ShipmentLog TemplateMethod Zone
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 21

Take no arguments.

# getDisplayType()
string
Returns the nice name of a method type
# getType()
string
Returns the type of condition
# getSnakeType()
string
Returns the type of condition in the snake case format: lowercase and connected by underline
# getSlugType()
string
Returns the type of condition in the slug format: lowercase and connected by hyphen
# getId()
?int
# getName()
?string
# getConfiguration()
?array
# getCreated()
?DateTime
Date the record was created.
# getModified()
?DateTime
Last modification date for the record.
# isActive()
bool
# isNothingToShip()
bool
# getRequestHook()
?Hook
# getResponseHook()
?Hook
# getGroup()
?Group
# getSite()
?Site
# getCategories()
?Collection<ategory>
# getWarehouses()
?Collection<Warehouse>
# getZones()
?Collection<one>
# 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

Methods 1

Take arguments. The API serialises only getters that need none.

# isApplicable(Fulfillment $fulfillment)
bool
Checks if a shipping method is applicable for fulfillment.

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 22

Read-only values on the record.

# displayType
string
Returns the nice name of a method type
# editUrl Not in Templates
?string
Get the url for editing the record.
# deleteUrl Not in Templates
?string
Get the url for deleting the record.
# manageUrl Not in Templates
?string
Get the url for managing records.
# type
string
Returns the type of condition
# snakeType
string
Returns the type of condition in the snake case format: lowercase and connected by underline
# slugType
string
Returns the type of condition in the slug format: lowercase and connected by hyphen
# id
?int
# name
?string
# configuration
?array
# created
?DateTime
Date the record was created.
# modified
?DateTime
Last modification date for the record.
# active
bool
# nothingToShip
bool
# requestHook
?Hook
# responseHook
?Hook
# group
?Group
# site
?Site
# categories
?Collection<ategory>
# warehouses
?Collection<Warehouse>
# zones
?Collection<one>

Admin view

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

Properties 25

Take no arguments.

# getDisplayType()
string
Returns the nice name of a method type
# getEditUrl() Not in Templates
?string
Get the url for editing the record.
# getDeleteUrl() Not in Templates
?string
Get the url for deleting the record.
# getManageUrl() Not in Templates
?string
Get the url for managing records.
# getType()
string
Returns the type of condition
# getSnakeType()
string
Returns the type of condition in the snake case format: lowercase and connected by underline
# getSlugType()
string
Returns the type of condition in the slug format: lowercase and connected by hyphen
# getId()
?int
# getName()
?string
# getConfiguration()
?array
# getCreated()
?DateTime
Date the record was created.
# getModified()
?DateTime
Last modification date for the record.
# isActive()
bool
# isNothingToShip()
bool
# getRequestHook()
?Hook
# getResponseHook()
?Hook
# getGroup()
?Group
# getSite()
?Site
# getCategories()
?Collection<ategory>
# getWarehouses()
?Collection<Warehouse>
# getZones()
?Collection<one>
# 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

Methods 1

Take arguments. The API serialises only getters that need none.

# isApplicable(Fulfillment $fulfillment)
bool
Checks if a shipping method is applicable for fulfillment.