MatrixRate
extends BaseShippingMethod
in package
Table of Contents
Methods
- calculateShipping() : array<string|int, mixed>
- return array must contain the following properties
- evaluateShippingCosts() : float
- formSubmitted() : void
- {@inheritdoc}
- getCode() : string
- getConfigurationForm() : Form
- getName() : string
- getShippingFormFieldset() : FieldsContainerInterface
- isActive() : bool
- isApplicable() : bool
- matrixrateFormCallback() : mixed
- showEvenIfNotCheapest() : bool
- this function is used to determine if applicable shipping method must be shown even if another which is cheaper is found
- getSavedRules() : array<string|int, mixed>
Methods
calculateShipping()
return array must contain the following properties
public
calculateShipping(FormValues|null $values, Cart $cart) : array<string|int, mixed>
Parameters
- $values : FormValues|null
- $cart : Cart
Return values
array<string|int, mixed>evaluateShippingCosts()
public
evaluateShippingCosts(Address $shippingAddress, Cart $cart) : float
Parameters
Return values
floatformSubmitted()
{@inheritdoc}
public
formSubmitted(Form $form, array<string|int, mixed> &$form_state) : void
Parameters
- $form : Form
- $form_state : array<string|int, mixed>
getCode()
public
getCode() : string
Return values
stringgetConfigurationForm()
public
getConfigurationForm(Form $form, array<string|int, mixed> &$form_state) : Form
Parameters
- $form : Form
- $form_state : array<string|int, mixed>
Return values
FormgetName()
public
getName() : string
Return values
stringgetShippingFormFieldset()
public
getShippingFormFieldset(Cart $cart, Form $form, array<string|int, mixed> &$form_state) : FieldsContainerInterface
Parameters
- $cart : Cart
- $form : Form
- $form_state : array<string|int, mixed>
Return values
FieldsContainerInterfaceisActive()
public
isActive(Cart $cart) : bool
Parameters
- $cart : Cart
Return values
boolisApplicable()
public
isApplicable(Cart $cart) : bool
Parameters
- $cart : Cart
Return values
boolmatrixrateFormCallback()
public
static matrixrateFormCallback(Form $form) : mixed
Parameters
- $form : Form
showEvenIfNotCheapest()
this function is used to determine if applicable shipping method must be shown even if another which is cheaper is found
public
showEvenIfNotCheapest() : bool
Return values
boolgetSavedRules()
protected
getSavedRules() : array<string|int, mixed>