Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
setRounding example
$page
->
setChangedPayment
(
(bool)
$request
->
get
(
'changedPayment', false
)
)
;
$page
->
setPaymentFailed
(
(bool)
$request
->
get
(
'paymentFailed', false
)
)
;
$this
->eventDispatcher->
dispatch
(
new
CheckoutFinishPageLoadedEvent
(
$page
,
$salesChannelContext
,
$request
)
)
;
if
(
$page
->
getOrder
(
)
->
getItemRounding
(
)
)
{
$salesChannelContext
->
setItemRounding
(
$page
->
getOrder
(
)
->
getItemRounding
(
)
)
;
$salesChannelContext
->
getContext
(
)
->
setRounding
(
$page
->
getOrder
(
)
->
getItemRounding
(
)
)
;
}
if
(
$page
->
getOrder
(
)
->
getTotalRounding
(
)
)
{
$salesChannelContext
->
setTotalRounding
(
$page
->
getOrder
(
)
->
getTotalRounding
(
)
)
;
}
return
$page
;
}
/** * @throws CustomerNotLoggedInException * @throws InconsistentCriteriaIdsException * @throws RoutingException * @throws OrderException */