Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
ShippingPost.php
Go to the documentation of this file.
1 <?php
8 
10 
12 {
16  public function execute()
17  {
18  $shippingMethods = $this->getRequest()->getPost('shipping_method');
19  try {
20  $this->_eventManager->dispatch(
21  'checkout_controller_multishipping_shipping_post',
22  ['request' => $this->getRequest(), 'quote' => $this->_getCheckout()->getQuote()]
23  );
24  $this->_getCheckout()->setShippingMethods($shippingMethods);
25  $this->_getState()->setActiveStep(State::STEP_BILLING);
26  $this->_getState()->setCompleteStep(State::STEP_SHIPPING);
27  $this->_redirect('*/*/billing');
28  } catch (\Exception $e) {
29  $this->messageManager->addError($e->getMessage());
30  $this->_redirect('*/*/shipping');
31  }
32  }
33 }
_redirect($path, $arguments=[])
Definition: Action.php:167
execute()