PHP 클래스 WeightShippingModifier, silvershop-core

ASSUMPTION: The total order weight can be at maximum the last item in the $shippingCosts array.
상속: extends ShippingModifier
파일 보기 프로젝트 열기: burnbright/silverstripe-shop 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$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