Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Addresses.php
Go to the documentation of this file.
1 <?php
8 
9 use Magento\Framework\App\Action\HttpGetActionInterface as HttpGetActionInterface;
11 
12 class Addresses extends \Magento\Multishipping\Controller\Checkout implements HttpGetActionInterface
13 {
19  public function execute()
20  {
21  // If customer do not have addresses
22  if (!$this->_getCheckout()->getCustomerDefaultShippingAddress()) {
23  $this->_redirect('*/checkout_address/newShipping');
24  return;
25  }
26 
27  $this->_getState()->unsCompleteStep(State::STEP_SHIPPING);
28 
29  $this->_getState()->setActiveStep(State::STEP_SELECT_ADDRESSES);
30  if (!$this->_getCheckout()->validateMinimumAmount()) {
31  $message = $this->_getCheckout()->getMinimumAmountDescription();
32  $this->messageManager->addNotice($message);
33  }
34  $this->_view->loadLayout();
35  $this->_view->renderLayout();
36  }
37 }
_redirect($path, $arguments=[])
Definition: Action.php:167
$message