PHP Класс WeightShippingModifier, silvershop-core

ASSUMPTION: The total order weight can be at maximum the last item in the $shippingCosts array.
Наследование: extends ShippingModifier
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$weight
$weight_cost array Should be an associative array, with the weight as key (KG) and the corresponding price as value. Can be set via Config API, eg. WeightShippingModifier: weight_cost: '0.5': 12 '1.0': 15 '2.0': 20

Открытые методы

Метод Описание
TableTitle ( )
Weight ( ) : number Calculate the total weight of the order
value ( $subtotal ) Calculates shipping cost based on Product Weight.

Описание методов

TableTitle() публичный Метод

public TableTitle ( )

Weight() публичный Метод

Calculate the total weight of the order
public Weight ( ) : number
Результат number

value() публичный Метод

Calculates shipping cost based on Product Weight.
public value ( $subtotal )

Описание свойств

$weight защищенное свойство

protected $weight

$weight_cost защищенное статическое свойство

Should be an associative array, with the weight as key (KG) and the corresponding price as value. Can be set via Config API, eg. WeightShippingModifier: weight_cost: '0.5': 12 '1.0': 15 '2.0': 20
protected static array $weight_cost
Результат array