Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
All Data Structures Namespaces Files Functions Variables Pages
Billing.php
Go to the documentation of this file.
1 <?php
8 
11 
13 {
19  protected function _validateBilling()
20  {
21  if (!$this->_getCheckout()->getQuote()->getBillingAddress()->getFirstname()) {
22  $this->_redirect('*/checkout_address/selectBilling');
23  return false;
24  }
25  return true;
26  }
27 
33  public function execute()
34  {
35  if (!$this->_validateBilling()) {
36  return;
37  }
38 
39  if (!$this->_validateMinimumAmount()) {
40  return;
41  }
42 
43  if (!$this->_getState()->getCompleteStep(State::STEP_SHIPPING)) {
44  return $this->_redirect('*/*/shipping');
45  }
46 
47  $this->_getState()->setActiveStep(State::STEP_BILLING);
48  $this->_view->loadLayout();
49  $this->_view->renderLayout();
50  }
51 }
_redirect($path, $arguments=[])
Definition: Action.php:167