Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
ShippingMethodRouteRequestEvent example
$page
->
setHeader
(
$this
->headerLoader->
load
(
$request
,
$context
)
)
;
$page
->
setFooter
(
$this
->footerLoader->
load
(
$request
,
$context
)
)
;
$criteria
=
new
Criteria
(
)
;
$criteria
->
setTitle
(
'generic-page::shipping-methods'
)
;
$event
=
new
ShippingMethodRouteRequestEvent
(
$request
,
new
Request
(
)
,
$context
,
$criteria
)
;
$this
->eventDispatcher->
dispatch
(
$event
)
;
$shippingMethods
=
$this
->shippingMethodRoute
->
load
(
$event
->
getStoreApiRequest
(
)
,
$context
,
$event
->
getCriteria
(
)
)
->
getShippingMethods
(
)
;
$page
->
setSalesChannelShippingMethods
(
$shippingMethods
)
;
$criteria
=
new
Criteria
(
)
;
$criteria
->
setTitle
(
'generic-page::payment-methods'
)
;