Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
hasDeliveryWithOnlyShippingFreeItems example
$context
,
$manualShippingCost
)
;
$delivery
->
setShippingCosts
(
$costs
)
;
return
;
}
if
(
$this
->
hasDeliveryPriceRecalculationSkipWithZeroUnitPrice
(
$cart
->
getBehavior
(
)
,
$delivery
->
getShippingCosts
(
)
->
getUnitPrice
(
)
)
||
$this
->
hasDeliveryWithOnlyShippingFreeItems
(
$delivery
)
)
{
$costs
=
$this
->
calculateShippingCosts
(
$delivery
->
getShippingMethod
(
)
,
new
PriceCollection
(
[
new
Price
(
Defaults::CURRENCY, 0, 0, false
)
]
)
,
$delivery
->
getPositions
(
)
->
getLineItems
(
)
,
$context
)
;
$delivery
->
setShippingCosts
(
$costs
)
;
return
;
}