first commit
This commit is contained in:
29
class/deliveries/class.UPS.php
Normal file
29
class/deliveries/class.UPS.php
Normal file
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
use KupShop\KupShopBundle\Util\Delivery\RestrictionParams;
|
||||
use KupShop\OrderingBundle\Entity\Purchase\PurchaseState;
|
||||
|
||||
class UPS extends Delivery
|
||||
{
|
||||
public static $className = 'UPS';
|
||||
|
||||
protected $heureka_delivery_id = 'UPS';
|
||||
protected $zbozi_delivery_id = 'UPS';
|
||||
|
||||
protected $track_and_trace = 'https://wwwapps.ups.com/tracking/tracking.cgi?loc=cs_CZ&tracknum=[PACKAGE_ID]';
|
||||
|
||||
public $defaultIcon = '../../common/static/deliveries/ups.svg';
|
||||
|
||||
protected function getRestrictionParams(PurchaseState $purchaseState): RestrictionParams
|
||||
{
|
||||
$rParams = clone parent::getRestrictionParams($purchaseState);
|
||||
|
||||
// UPS ma vypocet obvodu stejnej jako PPL nebo GLS
|
||||
Delivery::includeClass('PPL');
|
||||
$rParams->setMaxSumOfDimensions(
|
||||
PPL::calculateMaxSumOfDimensions($rParams)
|
||||
);
|
||||
|
||||
return $rParams;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user