$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'
);
$event =
new PaymentMethodRouteRequestEvent($request,
new Request(),
$context,
$criteria);
$this->eventDispatcher->
dispatch($event);
$paymentMethods =
$this->paymentMethodRoute
->
load($event->
getStoreApiRequest(),
$context,
$event->
getCriteria()) ->
getPaymentMethods();