Source of file TableShippingRate.php
Size: 1,375 Bytes - Last Modified: 2021-12-23T10:25:09+00:00
/var/www/docs.ssmods.com/process/src/src/Model/TableShippingRate.php
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 | <?php namespace SilverShop\Shipping\Model; use SilverShop\Shipping\Model\TableShippingMethod; use SilverShop\Shipping\Model\RegionRestriction; /** * Adds extra metric ranges to restrict with, rather than just region. */ class TableShippingRate extends RegionRestriction { private static $db = [ "WeightMin" => "Decimal", "WeightMax" => "Decimal", "VolumeMin" => "Decimal", "VolumeMax" => "Decimal", "ValueMin" => "Currency", "ValueMax" => "Currency", "QuantityMin" => "Int", "QuantityMax" => "Int", "Rate" => "Currency" ]; private static $has_one = [ "ShippingMethod" => TableShippingMethod::class ]; private static $summary_fields = [ 'Country', 'State', 'City', 'PostalCode', 'WeightMin', 'WeightMax', 'VolumeMin', 'VolumeMax', 'ValueMin', 'ValueMax', 'QuantityMin', 'QuantityMax', 'Rate' ]; private static $default_sort = "\"Country\" ASC, \"State\" ASC, \"City\" ASC, \"PostalCode\" ASC, \"Rate\" ASC"; private static $table_name = 'SilverShop_TableShippingRate'; public function getCMSFields() { $fields = parent::getCMSFields(); $fields->removeByName('ShippingMethodID'); return $fields; } } |