Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
shouldIncludeDeliveries example
throw
CartException::
customerNotLoggedIn
(
)
;
}
$data
[
'orderCustomer'
]
= CustomerTransformer::
transform
(
$customer
)
;
}
$data
[
'languageId'
]
=
$context
->
getLanguageId
(
)
;
$convertedLineItems
= LineItemTransformer::
transformCollection
(
$cart
->
getLineItems
(
)
)
;
$shippingAddresses
=
[
]
;
if
(
$conversionContext
->
shouldIncludeDeliveries
(
)
)
{
$shippingAddresses
= AddressTransformer::
transformCollection
(
$cart
->
getDeliveries
(
)
->
getAddresses
(
)
, true
)
;
$data
[
'deliveries'
]
= DeliveryTransformer::
transformCollection
(
$cart
->
getDeliveries
(
)
,
$convertedLineItems
,
$this
->initialStateIdLoader->
get
(
OrderDeliveryStates::STATE_MACHINE
)
,
$context
->
getContext
(
)
,
$shippingAddresses
)
;
}
if
(
$conversionContext
->
shouldIncludeBillingAddress
(
)
)
{