Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
setChangedPayment example
$page
= CheckoutFinishPage::
createFrom
(
$page
)
;
if
(
$page
->
getMetaInformation
(
)
)
{
$page
->
getMetaInformation
(
)
->
setRobots
(
'noindex,follow'
)
;
}
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
(
)
)
;
}