FlatRate
extends BaseShippingMethod
in package
Table of Contents
Methods
- calculateShipping() : array<string|int, mixed>
- return array must contain the following properties
- evaluateShippingCosts() : float
- getCode() : string
- getConfigurationForm() : Form
- getName() : string
- getShippingFormFieldset() : FieldsContainerInterface
- isActive() : bool
- isApplicable() : bool
- showEvenIfNotCheapest() : bool
- this function is used to determine if applicable shipping method must be shown even if another which is cheaper is found
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
floatgetCode()
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
boolshowEvenIfNotCheapest()
this function is used to determine if applicable shipping method must be shown even if another which is cheaper is found
public
showEvenIfNotCheapest() : bool