30 lines
874 B
PHP
30 lines
874 B
PHP
<?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;
|
|
}
|
|
}
|