private isShippingRangeZonesSatisfiedByCart ( Elcodi\Component\Cart\Entity\Interfaces\CartInterface $cart, Elcodi\Plugin\CustomShippingBundle\Entity\Interfaces\ShippingRangeInterface $shippingRange ) : boolean | ||
$cart | Elcodi\Component\Cart\Entity\Interfaces\CartInterface | Cart |
$shippingRange | Elcodi\Plugin\CustomShippingBundle\Entity\Interfaces\ShippingRangeInterface | Carrier Range |
Результат | boolean | ShippingRange is satisfied by cart |
private function isShippingRangeZonesSatisfiedByCart(CartInterface $cart, ShippingRangeInterface $shippingRange)
{
$deliveryAddress = $cart->getDeliveryAddress();
$shippingRange->getToZone()->getName();
return $deliveryAddress === null || $this->zoneMatcher->isAddressContainedInZone($deliveryAddress, $shippingRange->getToZone());
}