@@ -109,9 +109,11 @@ |
||
109 | 109 | } |
110 | 110 | |
111 | 111 | // Validate cart has products and has stock. |
112 | - if (!$this->cart->hasProducts()) || (!$this->cart->hasStock() && !$this->config->get('config_stock_checkout'))) { |
|
112 | + if (!$this->cart->hasProducts()) { |
|
113 | + || (!$this->cart->hasStock() && !$this->config->get('config_stock_checkout'))) { |
|
113 | 114 | $json['redirect'] = $this->url->link('checkout/cart'); |
114 | 115 | } |
116 | + } |
|
115 | 117 | |
116 | 118 | // Validate minimum quantity requirements. |
117 | 119 | $products = $this->cart->getProducts(); |
@@ -23,9 +23,11 @@ |
||
23 | 23 | class ControllerCheckoutCheckout extends \Sunrise\Engine\Core\Controller { |
24 | 24 | public function index() { |
25 | 25 | // Validate cart has products and has stock. |
26 | - if (!$this->cart->hasProducts()) || (!$this->cart->hasStock() && !$this->config->get('config_stock_checkout'))) { |
|
26 | + if (!$this->cart->hasProducts()) { |
|
27 | + || (!$this->cart->hasStock() && !$this->config->get('config_stock_checkout'))) { |
|
27 | 28 | $this->response->redirect($this->url->link('checkout/cart')); |
28 | 29 | } |
30 | + } |
|
29 | 31 | |
30 | 32 | // Validate minimum quantity requirements. |
31 | 33 | $products = $this->cart->getProducts(); |
@@ -124,9 +124,11 @@ |
||
124 | 124 | } |
125 | 125 | |
126 | 126 | // Validate cart has products and has stock. |
127 | - if (!$this->cart->hasProducts()) || (!$this->cart->hasStock() && !$this->config->get('config_stock_checkout'))) { |
|
127 | + if (!$this->cart->hasProducts()) { |
|
128 | + || (!$this->cart->hasStock() && !$this->config->get('config_stock_checkout'))) { |
|
128 | 129 | $json['redirect'] = $this->url->link('checkout/cart'); |
129 | 130 | } |
131 | + } |
|
130 | 132 | |
131 | 133 | // Check if guest checkout is available. |
132 | 134 | if (!$this->config->get('config_checkout_guest') || $this->config->get('config_customer_price') || $this->cart->hasDownload()) { |