Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
AccountEditOrderPageLoadedEvent example
if
(
$this
->
isOrderPaid
(
$order
)
)
{
throw
OrderException::
orderAlreadyPaid
(
$order
->
getId
(
)
)
;
}
$page
->
setOrder
(
$order
)
;
$page
->
setPaymentChangeable
(
$this
->
isPaymentChangeable
(
$orderRouteResponse
,
$page
)
)
;
$page
->
setPaymentMethods
(
$this
->
getPaymentMethods
(
$salesChannelContext
,
$request
,
$order
)
)
;
$page
->
setDeepLinkCode
(
$request
->
get
(
'deepLinkCode'
)
)
;
$this
->eventDispatcher->
dispatch
(
new
AccountEditOrderPageLoadedEvent
(
$page
,
$salesChannelContext
,
$request
)
)
;
return
$page
;
}
private
function
getOrder
(
Request
$request
, SalesChannelContext
$context
)
: OrderRouteResponse
{
$criteria
=
$this
->
createCriteria
(
$request
,
$context
)
;
$apiRequest
=
new
Request
(
)
;
$apiRequest
->query->
set
(
'checkPromotion', 'true'
)
;