Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
resetDataTimestamps example
}
$delivery
->
getShippingMethod
(
)
->
setPrices
(
new
ShippingMethodPriceCollection
(
)
)
;
}
foreach
(
$cart
->
getLineItems
(
)
->
getFlat
(
)
as
$lineItem
)
{
$lineItem
->
setDeliveryInformation
(
null
)
;
$lineItem
->
setQuantityInformation
(
null
)
;
}
$this
->
resetDataTimestamps
(
$cart
->
getLineItems
(
)
)
;
foreach
(
$cart
->
getDeliveries
(
)
as
$delivery
)
{
$this
->
resetDataTimestamps
(
$delivery
->
getPositions
(
)
->
getLineItems
(
)
)
;
}
$cart
->
setRuleIds
(
[
]
)
;
// The behaviour will be set during the process, therefore we remove it here
$cart
->
setBehavior
(
null
)
;
// unique identifier is set at runtime to be random uuid
foreach
(
$convertedCart
->
getLineItems
(
)
->
getFlat
(
)
as
$lineItem
)
{
$lineItem
->
assign
(
[
'uniqueIdentifier' => 'foo'
]
)
;
}