Source of file ShippingMethod.php
Size: 0,781 Bytes - Last Modified: 2021-12-23T10:55:58+00:00
/var/www/docs.ssmods.com/process/src/code/model/ShippingMethod.php
1234567891011121314151617181920212223242526272829303132333435363738394041 | <?php /** * ShippingMethod is a base class for providing shipping options to customers. * * @package shop * @subpackage shipping */ class ShippingMethod extends DataObject{ static $db = array( "Name" => "Varchar", "Description" => "Varchar", "Enabled" => "Boolean", //TODO //"WeightMin" => "Decimal", //"WeightMax" => "Decimal", //"HandlingFee" => "Currency", //adds extra handling cost to use this method ); static $casting = array( 'Rate' => 'Currency' ); function calculateRate(ShippingPackage $package, Address $address){ return null; } function getRate(){ return $this->CalculatedRate; } function Title(){ return implode(" - ",array_filter(array( $this->CalculatedRate, $this->Name, $this->Description ))); } } |