@@ -26,7 +26,7 @@ discard block |
||
| 26 | 26 | { |
| 27 | 27 | $this->load->language('checkout/success'); |
| 28 | 28 | |
| 29 | - if (isset($this->session->data['order_id']) && (! empty($this->session->data['order_id']))) { |
|
| 29 | + if (isset($this->session->data['order_id']) && (!empty($this->session->data['order_id']))) { |
|
| 30 | 30 | $this->session->data['last_order_id'] = $this->session->data['order_id']; |
| 31 | 31 | } |
| 32 | 32 | |
@@ -44,7 +44,7 @@ discard block |
||
| 44 | 44 | unset($this->session->data['totals']); |
| 45 | 45 | } |
| 46 | 46 | |
| 47 | - if (! empty($this->session->data['last_order_id'])) { |
|
| 47 | + if (!empty($this->session->data['last_order_id'])) { |
|
| 48 | 48 | $this->document->setTitle(sprintf($this->language->get('heading_title_customer'), $this->session->data['last_order_id'])); |
| 49 | 49 | } else { |
| 50 | 50 | $this->document->setTitle($this->language->get('heading_title')); |
@@ -72,7 +72,7 @@ discard block |
||
| 72 | 72 | 'href' => $this->url->link('checkout/success') |
| 73 | 73 | ); |
| 74 | 74 | |
| 75 | - if (! empty($this->session->data['last_order_id'])) { |
|
| 75 | + if (!empty($this->session->data['last_order_id'])) { |
|
| 76 | 76 | $data['heading_title'] = sprintf($this->language->get('heading_title_customer'), $this->session->data['last_order_id']); |
| 77 | 77 | } else { |
| 78 | 78 | $data['heading_title'] = $this->language->get('heading_title'); |
@@ -59,7 +59,7 @@ |
||
| 59 | 59 | if (isset($this->request->get['manufacturer_id'])) { |
| 60 | 60 | $manufacturer_id = ($this->request->get['manufacturer_id']); |
| 61 | 61 | } else { |
| 62 | - $manufacturer_id = null; |
|
| 62 | + $manufacturer_id = null; |
|
| 63 | 63 | } |
| 64 | 64 | |
| 65 | 65 | $filter_data = array( |
@@ -66,7 +66,7 @@ |
||
| 66 | 66 | if (isset($this->request->get['manufacturer_id'])) { |
| 67 | 67 | $manufacturer_id = ($this->request->get['manufacturer_id']); |
| 68 | 68 | } else { |
| 69 | - $manufacturer_id = null; |
|
| 69 | + $manufacturer_id = null; |
|
| 70 | 70 | } |
| 71 | 71 | |
| 72 | 72 | |
@@ -67,7 +67,7 @@ discard block |
||
| 67 | 67 | } |
| 68 | 68 | |
| 69 | 69 | if (isset($this->request->get['limit'])) { |
| 70 | - $limit = ((int) $this->request->get['limit'] > 100 ? 100 : (int) $this->request->get['limit']); |
|
| 70 | + $limit = ((int)$this->request->get['limit'] > 100 ? 100 : (int)$this->request->get['limit']); |
|
| 71 | 71 | $this->document->setRobots('noindex,follow'); |
| 72 | 72 | } else { |
| 73 | 73 | $limit = $this->config->get('config_limit_store'); |
@@ -97,15 +97,15 @@ discard block |
||
| 97 | 97 | |
| 98 | 98 | $path = ''; |
| 99 | 99 | |
| 100 | - $parts = explode('_', (string) $this->request->get['path']); |
|
| 100 | + $parts = explode('_', (string)$this->request->get['path']); |
|
| 101 | 101 | |
| 102 | - $category_id = (int) array_pop($parts); |
|
| 102 | + $category_id = (int)array_pop($parts); |
|
| 103 | 103 | |
| 104 | 104 | foreach ($parts as $path_id) { |
| 105 | 105 | if (!$path) { |
| 106 | - $path = (int) $path_id; |
|
| 106 | + $path = (int)$path_id; |
|
| 107 | 107 | } else { |
| 108 | - $path .= '_' . (int) $path_id; |
|
| 108 | + $path .= '_' . (int)$path_id; |
|
| 109 | 109 | } |
| 110 | 110 | |
| 111 | 111 | $category_info = $this->model_catalog_category->getCategory($path_id); |
@@ -241,7 +241,7 @@ discard block |
||
| 241 | 241 | $price = false; |
| 242 | 242 | } |
| 243 | 243 | |
| 244 | - if ((float) $result['special']) { |
|
| 244 | + if ((float)$result['special']) { |
|
| 245 | 245 | $special = $this->currency->format($result['special'], $this->session->data['currency']); |
| 246 | 246 | } else { |
| 247 | 247 | $special = false; |
@@ -253,7 +253,7 @@ discard block |
||
| 253 | 253 | $description = \voku\helper\UTF8::substr(strip_tags(html_entity_decode($result['description'], ENT_QUOTES, 'UTF-8')), 0, $this->config->get($this->config->get('config_theme') . '_product_description_length')) . '..'; |
| 254 | 254 | } |
| 255 | 255 | |
| 256 | - if ((float) $result['special']) { |
|
| 256 | + if ((float)$result['special']) { |
|
| 257 | 257 | $yousave_percent = round(((($result['price'] - $result['special']) / $result['price']) * 100), 0); |
| 258 | 258 | } else { |
| 259 | 259 | $yousave_percent = false; |
@@ -51,9 +51,9 @@ discard block |
||
| 51 | 51 | if (isset($this->request->get['path'])) { |
| 52 | 52 | $path = ''; |
| 53 | 53 | |
| 54 | - $parts = explode('_', (string) $this->request->get['path']); |
|
| 54 | + $parts = explode('_', (string)$this->request->get['path']); |
|
| 55 | 55 | |
| 56 | - $category_id = (int) array_pop($parts); |
|
| 56 | + $category_id = (int)array_pop($parts); |
|
| 57 | 57 | |
| 58 | 58 | foreach ($parts as $path_id) { |
| 59 | 59 | if (!$path) { |
@@ -186,7 +186,7 @@ discard block |
||
| 186 | 186 | |
| 187 | 187 | // product_id |
| 188 | 188 | if (isset($this->request->get['product_id'])) { |
| 189 | - $product_id = (int) $this->request->get['product_id']; |
|
| 189 | + $product_id = (int)$this->request->get['product_id']; |
|
| 190 | 190 | } else { |
| 191 | 191 | $product_id = 0; |
| 192 | 192 | } |
@@ -325,7 +325,7 @@ discard block |
||
| 325 | 325 | $data['tab_attribute'] = $this->language->get('tab_attribute'); |
| 326 | 326 | $data['tab_review'] = sprintf($this->language->get('tab_review'), $product_info['reviews']); |
| 327 | 327 | |
| 328 | - $data['product_id'] = (int) $this->request->get['product_id']; |
|
| 328 | + $data['product_id'] = (int)$this->request->get['product_id']; |
|
| 329 | 329 | $data['manufacturer'] = $product_info['manufacturer']; |
| 330 | 330 | |
| 331 | 331 | // +++ category-in-the-product-page | All linked categories |
@@ -378,19 +378,19 @@ discard block |
||
| 378 | 378 | $data['price'] = false; |
| 379 | 379 | } |
| 380 | 380 | |
| 381 | - if ((float) $product_info['special']) { |
|
| 381 | + if ((float)$product_info['special']) { |
|
| 382 | 382 | $data['special'] = $this->currency->format($product_info['special'], $this->session->data['currency']); |
| 383 | 383 | } else { |
| 384 | 384 | $data['special'] = false; |
| 385 | 385 | } |
| 386 | 386 | |
| 387 | - if ((float) $product_info['special']) { |
|
| 387 | + if ((float)$product_info['special']) { |
|
| 388 | 388 | $data['yousave_money'] = $this->currency->format(($product_info['price'] - $product_info['special']), $this->session->data['currency']); |
| 389 | 389 | } else { |
| 390 | 390 | $data['yousave_money'] = false; |
| 391 | 391 | } |
| 392 | 392 | |
| 393 | - if ((float) $product_info['special']) { |
|
| 393 | + if ((float)$product_info['special']) { |
|
| 394 | 394 | $data['yousave_percent'] = round(((($product_info['price'] - $product_info['special']) / $product_info['price']) * 100), 0); |
| 395 | 395 | } else { |
| 396 | 396 | $data['yousave_percent'] = false; |
@@ -442,7 +442,7 @@ discard block |
||
| 442 | 442 | |
| 443 | 443 | foreach ($option['product_option_value'] as $option_value) { |
| 444 | 444 | if (!$option_value['subtract'] || ($option_value['quantity'] > 0)) { |
| 445 | - if ((($this->config->get('config_customer_price') && $this->customer->isLogged()) || !$this->config->get('config_customer_price')) && (float) $option_value['price']) { |
|
| 445 | + if ((($this->config->get('config_customer_price') && $this->customer->isLogged()) || !$this->config->get('config_customer_price')) && (float)$option_value['price']) { |
|
| 446 | 446 | $price = $this->currency->format($option_value['price'], $this->session->data['currency']); |
| 447 | 447 | } else { |
| 448 | 448 | $price = false; |
@@ -492,7 +492,7 @@ discard block |
||
| 492 | 492 | $data['customer_name'] = ''; |
| 493 | 493 | } |
| 494 | 494 | |
| 495 | - $data['reviews'] = sprintf($this->language->get('text_reviews'), (int) $product_info['reviews']); |
|
| 495 | + $data['reviews'] = sprintf($this->language->get('text_reviews'), (int)$product_info['reviews']); |
|
| 496 | 496 | |
| 497 | 497 | $data['attribute_groups'] = $this->model_catalog_product->getProductAttributes($this->request->get['product_id']); |
| 498 | 498 | |
@@ -513,13 +513,13 @@ discard block |
||
| 513 | 513 | $price = false; |
| 514 | 514 | } |
| 515 | 515 | |
| 516 | - if ((float) $result['special']) { |
|
| 516 | + if ((float)$result['special']) { |
|
| 517 | 517 | $special = $this->currency->format($result['special'], $this->session->data['currency']); |
| 518 | 518 | } else { |
| 519 | 519 | $special = false; |
| 520 | 520 | } |
| 521 | 521 | |
| 522 | - if ((float) $result['special']) { |
|
| 522 | + if ((float)$result['special']) { |
|
| 523 | 523 | $yousave_percent = round(((($result['price'] - $result['special']) / $result['price']) * 100), 0); |
| 524 | 524 | } else { |
| 525 | 525 | $yousave_percent = false; |
@@ -95,7 +95,7 @@ discard block |
||
| 95 | 95 | |
| 96 | 96 | |
| 97 | 97 | if (isset($this->request->get['manufacturer_id'])) { |
| 98 | - $manufacturer_id = (int) $this->request->get['manufacturer_id']; |
|
| 98 | + $manufacturer_id = (int)$this->request->get['manufacturer_id']; |
|
| 99 | 99 | } else { |
| 100 | 100 | $manufacturer_id = 0; |
| 101 | 101 | } |
@@ -121,10 +121,10 @@ discard block |
||
| 121 | 121 | } |
| 122 | 122 | |
| 123 | 123 | if (isset($this->request->get['limit'])) { |
| 124 | - $limit = ((int) $this->request->get['limit'] > 100 ? 100 : (int) $this->request->get['limit']); |
|
| 124 | + $limit = ((int)$this->request->get['limit'] > 100 ? 100 : (int)$this->request->get['limit']); |
|
| 125 | 125 | $this->document->setRobots('noindex,follow'); |
| 126 | 126 | } else { |
| 127 | - $limit = (int) $this->config->get('config_limit_store'); |
|
| 127 | + $limit = (int)$this->config->get('config_limit_store'); |
|
| 128 | 128 | } |
| 129 | 129 | |
| 130 | 130 | $data['breadcrumbs'] = array(); |
@@ -234,7 +234,7 @@ discard block |
||
| 234 | 234 | $price = false; |
| 235 | 235 | } |
| 236 | 236 | |
| 237 | - if ((float) $result['special']) { |
|
| 237 | + if ((float)$result['special']) { |
|
| 238 | 238 | $special = $this->currency->format($result['special'], $this->session->data['currency']); |
| 239 | 239 | } else { |
| 240 | 240 | $special = false; |
@@ -353,7 +353,7 @@ discard block |
||
| 353 | 353 | $pagination->total = $product_total; |
| 354 | 354 | $pagination->page = $page; |
| 355 | 355 | $pagination->limit = $limit; |
| 356 | - $pagination->url = $this->url->link('product/manufacturer/info', 'manufacturer_id=' . $this->request->get['manufacturer_id'] . $url . '&page={page}'); |
|
| 356 | + $pagination->url = $this->url->link('product/manufacturer/info', 'manufacturer_id=' . $this->request->get['manufacturer_id'] . $url . '&page={page}'); |
|
| 357 | 357 | |
| 358 | 358 | $data['pagination'] = $pagination->render(); |
| 359 | 359 | |
@@ -91,9 +91,9 @@ discard block |
||
| 91 | 91 | } |
| 92 | 92 | |
| 93 | 93 | if (isset($this->request->get['search'])) { |
| 94 | - $this->document->setTitle($this->language->get('heading_title') . ' - ' . $this->request->get['search']); |
|
| 94 | + $this->document->setTitle($this->language->get('heading_title') . ' - ' . $this->request->get['search']); |
|
| 95 | 95 | } elseif (isset($this->request->get['tag'])) { |
| 96 | - $this->document->setTitle($this->language->get('heading_title') . ' - ' . $this->language->get('heading_tag') . $this->request->get['tag']); |
|
| 96 | + $this->document->setTitle($this->language->get('heading_title') . ' - ' . $this->language->get('heading_tag') . $this->request->get['tag']); |
|
| 97 | 97 | } else { |
| 98 | 98 | $this->document->setTitle($this->language->get('heading_title')); |
| 99 | 99 | } |
@@ -151,7 +151,7 @@ discard block |
||
| 151 | 151 | ); |
| 152 | 152 | |
| 153 | 153 | if (isset($this->request->get['search'])) { |
| 154 | - $data['heading_title'] = $this->language->get('heading_title') . ' - ' . $this->request->get['search']; |
|
| 154 | + $data['heading_title'] = $this->language->get('heading_title') . ' - ' . $this->request->get['search']; |
|
| 155 | 155 | } else { |
| 156 | 156 | $data['heading_title'] = $this->language->get('heading_title'); |
| 157 | 157 | } |
@@ -103,7 +103,7 @@ discard block |
||
| 103 | 103 | SET order_id = '" . (int)$order_id . "', |
| 104 | 104 | code = 'total', |
| 105 | 105 | title = 'Total', |
| 106 | - `value` = '" . (float)$data['cart_total']."', |
|
| 106 | + `value` = '" . (float)$data['cart_total'] . "', |
|
| 107 | 107 | sort_order = '' |
| 108 | 108 | "); |
| 109 | 109 | $this->db->query(" |
@@ -111,7 +111,7 @@ discard block |
||
| 111 | 111 | SET order_id = '" . (int)$order_id . "', |
| 112 | 112 | code = 'sub_total', |
| 113 | 113 | title = 'Total', |
| 114 | - `value` = '" . (float)$data['cart_total']."', |
|
| 114 | + `value` = '" . (float)$data['cart_total'] . "', |
|
| 115 | 115 | sort_order = '' |
| 116 | 116 | "); |
| 117 | 117 | } |
@@ -152,18 +152,18 @@ discard block |
||
| 152 | 152 | $this->db->query(" |
| 153 | 153 | INSERT INTO order_total |
| 154 | 154 | SET order_id = '" . (int)$order_id . "', |
| 155 | - code = '".$total['code']."', |
|
| 156 | - title = '".$total['title']."', |
|
| 157 | - `value` = '" . (float)$total['value']."', |
|
| 158 | - sort_order = '".$i."' |
|
| 155 | + code = '".$total['code'] . "', |
|
| 156 | + title = '".$total['title'] . "', |
|
| 157 | + `value` = '" . (float)$total['value'] . "', |
|
| 158 | + sort_order = '".$i . "' |
|
| 159 | 159 | "); |
| 160 | 160 | $i += 10; |
| 161 | - $total_sum = $total['value']; |
|
| 161 | + $total_sum = $total['value']; |
|
| 162 | 162 | } |
| 163 | 163 | // Last row in totals should be final sum... |
| 164 | 164 | $this->db->query(" |
| 165 | 165 | UPDATE order |
| 166 | - SET total='".$total_sum."' |
|
| 166 | + SET total='".$total_sum . "' |
|
| 167 | 167 | WHERE order_id = '" . (int)$order_id . "' |
| 168 | 168 | "); |
| 169 | 169 | |
@@ -117,7 +117,7 @@ |
||
| 117 | 117 | $message .= $this->language->get('text_firstname') . ' ' . $data['firstname'] . "\n"; |
| 118 | 118 | $message .= $this->language->get('text_lastname') . ' ' . $data['lastname'] . "\n"; |
| 119 | 119 | $message .= $this->language->get('text_customer_group') . ' ' . $customer_group_info['name'] . "\n"; |
| 120 | - $message .= $this->language->get('text_email') . ' ' . $data['email'] . "\n"; |
|
| 120 | + $message .= $this->language->get('text_email') . ' ' . $data['email'] . "\n"; |
|
| 121 | 121 | $message .= $this->language->get('text_telephone') . ' ' . $data['telephone'] . "\n"; |
| 122 | 122 | |
| 123 | 123 | $mail = new \Sunrise\Engine\Library\Mail(); |