Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
CheckoutFinishPageLoadedEvent example
Profiler::
trace
(
'finish-page-order-loading',
function
D
)
use
(
$page
,
$request
,
$salesChannelContext
)
: void
{
$page
->
setOrder
(
$this
->
getOrder
(
$request
,
$salesChannelContext
)
)
;
}
)
;
$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
;
}