Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
convertDeliveries example
$cart
->
addExtension
(
self::ORIGINAL_ORDER_NUMBER,
new
IdStruct
(
$orderNumber
)
)
;
/* NEXT-708 support: - transactions */
$lineItems
= LineItemTransformer::
transformFlatToNested
(
$order
->
getLineItems
(
)
)
;
$cart
->
addLineItems
(
$lineItems
)
;
$cart
->
setDeliveries
(
$this
->
convertDeliveries
(
$order
->
getDeliveries
(
)
,
$lineItems
)
)
;
$event
=
new
OrderConvertedEvent
(
$order
,
$cart
,
$context
)
;
$this
->eventDispatcher->
dispatch
(
$event
)
;
return
$event
->
getConvertedCart
(
)
;
}
/** * @param array<string, array<string, bool>|string> $overrideOptions * * @throws InconsistentCriteriaIdsException */