diff --git a/upload/admin/controller/catalog/information.php b/upload/admin/controller/catalog/information.php index 88abb801..bbc212ff 100644 --- a/upload/admin/controller/catalog/information.php +++ b/upload/admin/controller/catalog/information.php @@ -145,39 +145,39 @@ protected function getList() { $data['breadcrumbs'] = array(); - $data['breadcrumbs'][] = [ + $data['breadcrumbs'][] = array( 'text' => $this->language->get('text_home'), 'href' => $this->url->link('common/dashboard', 'token=' . $this->session->data['token'], true) - ]; + ); - $data['breadcrumbs'][] = [ + $data['breadcrumbs'][] = array( 'text' => $this->language->get('heading_title'), 'href' => $this->url->link('catalog/information', 'token=' . $this->session->data['token'] . $url, true) - ]; + ); $data['add'] = $this->url->link('catalog/information/add', 'token=' . $this->session->data['token'] . $url, true); $data['delete'] = $this->url->link('catalog/information/delete', 'token=' . $this->session->data['token'] . $url, true); $data['informations'] = array(); - $filter_data = [ + $filter_data = array( 'sort' => $sort, 'order' => $order, 'start' => ($page - 1) * $this->config->get('config_limit_admin'), 'limit' => $this->config->get('config_limit_admin') - ]; + ); $information_total = $this->model_catalog_information->getTotalInformations(); $results = $this->model_catalog_information->getInformations($filter_data); foreach ($results as $result) { - $data['informations'][] = [ + $data['informations'][] = array( 'information_id' => $result['information_id'], 'title' => $result['title'], 'sort_order' => $result['sort_order'], 'edit' => $this->url->link('catalog/information/edit', 'token=' . $this->session->data['token'] . '&information_id=' . $result['information_id'] . $url, true) - ]; + ); } $data['heading_title'] = $this->language->get('heading_title'); @@ -350,15 +350,15 @@ protected function getForm() { $data['breadcrumbs'] = array(); - $data['breadcrumbs'][] = [ + $data['breadcrumbs'][] = array( 'text' => $this->language->get('text_home'), 'href' => $this->url->link('common/dashboard', 'token=' . $this->session->data['token'], true) - ]; + ); - $data['breadcrumbs'][] = [ + $data['breadcrumbs'][] = array( 'text' => $this->language->get('heading_title'), 'href' => $this->url->link('catalog/information', 'token=' . $this->session->data['token'] . $url, true) - ]; + ); if (!isset($this->request->get['information_id'])) { $data['action'] = $this->url->link('catalog/information/add', 'token=' . $this->session->data['token'] . $url, true); @@ -397,7 +397,7 @@ protected function getForm() { } elseif (!empty($information_info)) { $data['information_store'] = $this->model_catalog_information->getInformationStores($this->request->get['information_id']); } else { - $data['information_store'] = [0]; + $data['information_store'] = array(0); } if (isset($this->request->post['keyword'])) { diff --git a/upload/admin/controller/catalog/manufacturer.php b/upload/admin/controller/catalog/manufacturer.php index 8f4e0e19..181bcd68 100644 --- a/upload/admin/controller/catalog/manufacturer.php +++ b/upload/admin/controller/catalog/manufacturer.php @@ -145,39 +145,39 @@ protected function getList() { $data['breadcrumbs'] = array(); - $data['breadcrumbs'][] = [ + $data['breadcrumbs'][] = array( 'text' => $this->language->get('text_home'), 'href' => $this->url->link('common/dashboard', 'token=' . $this->session->data['token'], true) - ]; + ); - $data['breadcrumbs'][] = [ + $data['breadcrumbs'][] = array( 'text' => $this->language->get('heading_title'), 'href' => $this->url->link('catalog/manufacturer', 'token=' . $this->session->data['token'] . $url, true) - ]; + ); $data['add'] = $this->url->link('catalog/manufacturer/add', 'token=' . $this->session->data['token'] . $url, true); $data['delete'] = $this->url->link('catalog/manufacturer/delete', 'token=' . $this->session->data['token'] . $url, true); $data['manufacturers'] = array(); - $filter_data = [ + $filter_data = array( 'sort' => $sort, 'order' => $order, 'start' => ($page - 1) * $this->config->get('config_limit_admin'), 'limit' => $this->config->get('config_limit_admin') - ]; + ); $manufacturer_total = $this->model_catalog_manufacturer->getTotalManufacturers(); $results = $this->model_catalog_manufacturer->getManufacturers($filter_data); foreach ($results as $result) { - $data['manufacturers'][] = [ + $data['manufacturers'][] = array( 'manufacturer_id' => $result['manufacturer_id'], 'name' => $result['name'], 'sort_order' => $result['sort_order'], 'edit' => $this->url->link('catalog/manufacturer/edit', 'token=' . $this->session->data['token'] . '&manufacturer_id=' . $result['manufacturer_id'] . $url, true) - ]; + ); } $data['heading_title'] = $this->language->get('heading_title'); @@ -315,15 +315,15 @@ protected function getForm() { $data['breadcrumbs'] = array(); - $data['breadcrumbs'][] = [ + $data['breadcrumbs'][] = array( 'text' => $this->language->get('text_home'), 'href' => $this->url->link('common/dashboard', 'token=' . $this->session->data['token'], true) - ]; + ); - $data['breadcrumbs'][] = [ + $data['breadcrumbs'][] = array( 'text' => $this->language->get('heading_title'), 'href' => $this->url->link('catalog/manufacturer', 'token=' . $this->session->data['token'] . $url, true) - ]; + ); if (!isset($this->request->get['manufacturer_id'])) { $data['action'] = $this->url->link('catalog/manufacturer/add', 'token=' . $this->session->data['token'] . $url, true); @@ -356,7 +356,7 @@ protected function getForm() { } elseif (!empty($manufacturer_info)) { $data['manufacturer_store'] = $this->model_catalog_manufacturer->getManufacturerStores($this->request->get['manufacturer_id']); } else { - $data['manufacturer_store'] = [0]; + $data['manufacturer_store'] = array(0); } if (isset($this->request->post['keyword'])) { @@ -454,19 +454,19 @@ public function autocomplete() { if (isset($this->request->get['filter_name'])) { $this->load->model('catalog/manufacturer'); - $filter_data = [ + $filter_data = array( 'filter_name' => $this->request->get['filter_name'], 'start' => 0, 'limit' => 5 - ]; + ); $results = $this->model_catalog_manufacturer->getManufacturers($filter_data); foreach ($results as $result) { - $json[] = [ + $json[] = array( 'manufacturer_id' => $result['manufacturer_id'], 'name' => strip_tags(html_entity_decode($result['name'], ENT_QUOTES, 'UTF-8')) - ]; + ); } } diff --git a/upload/admin/controller/catalog/option.php b/upload/admin/controller/catalog/option.php index b2dd2a87..cc07b60a 100644 --- a/upload/admin/controller/catalog/option.php +++ b/upload/admin/controller/catalog/option.php @@ -145,39 +145,39 @@ protected function getList() { $data['breadcrumbs'] = array(); - $data['breadcrumbs'][] = [ + $data['breadcrumbs'][] = array( 'text' => $this->language->get('text_home'), 'href' => $this->url->link('common/dashboard', 'token=' . $this->session->data['token'], true) - ]; + ); - $data['breadcrumbs'][] = [ + $data['breadcrumbs'][] = array( 'text' => $this->language->get('heading_title'), 'href' => $this->url->link('catalog/option', 'token=' . $this->session->data['token'] . $url, true) - ]; + ); $data['add'] = $this->url->link('catalog/option/add', 'token=' . $this->session->data['token'] . $url, true); $data['delete'] = $this->url->link('catalog/option/delete', 'token=' . $this->session->data['token'] . $url, true); $data['options'] = array(); - $filter_data = [ + $filter_data = array( 'sort' => $sort, 'order' => $order, 'start' => ($page - 1) * $this->config->get('config_limit_admin'), 'limit' => $this->config->get('config_limit_admin') - ]; + ); $option_total = $this->model_catalog_option->getTotalOptions(); $results = $this->model_catalog_option->getOptions($filter_data); foreach ($results as $result) { - $data['options'][] = [ + $data['options'][] = array( 'option_id' => $result['option_id'], 'name' => $result['name'], 'sort_order' => $result['sort_order'], 'edit' => $this->url->link('catalog/option/edit', 'token=' . $this->session->data['token'] . '&option_id=' . $result['option_id'] . $url, true) - ]; + ); } $data['heading_title'] = $this->language->get('heading_title'); @@ -320,15 +320,15 @@ protected function getForm() { $data['breadcrumbs'] = array(); - $data['breadcrumbs'][] = [ + $data['breadcrumbs'][] = array( 'text' => $this->language->get('text_home'), 'href' => $this->url->link('common/dashboard', 'token=' . $this->session->data['token'], true) - ]; + ); - $data['breadcrumbs'][] = [ + $data['breadcrumbs'][] = array( 'text' => $this->language->get('heading_title'), 'href' => $this->url->link('catalog/option', 'token=' . $this->session->data['token'] . $url, true) - ]; + ); if (!isset($this->request->get['option_id'])) { $data['action'] = $this->url->link('catalog/option/add', 'token=' . $this->session->data['token'] . $url, true); @@ -393,13 +393,13 @@ protected function getForm() { $thumb = 'no_image.png'; } - $data['option_values'][] = [ + $data['option_values'][] = array( 'option_value_id' => $option_value['option_value_id'], 'option_value_description' => $option_value['option_value_description'], 'image' => $image, 'thumb' => $this->model_tool_image->resize($thumb, 100, 100), 'sort_order' => $option_value['sort_order'] - ]; + ); } $data['placeholder'] = $this->model_tool_image->resize('no_image.png', 100, 100); @@ -471,11 +471,11 @@ public function autocomplete() { $this->load->model('tool/image'); - $filter_data = [ + $filter_data = array( 'filter_name' => $this->request->get['filter_name'], 'start' => 0, 'limit' => 5 - ]; + ); $options = $this->model_catalog_option->getOptions($filter_data); @@ -492,11 +492,11 @@ public function autocomplete() { $image = $this->model_tool_image->resize('no_image.png', 50, 50); } - $option_value_data[] = [ + $option_value_data[] = array( 'option_value_id' => $option_value['option_value_id'], 'name' => strip_tags(html_entity_decode($option_value['name'], ENT_QUOTES, 'UTF-8')), 'image' => $image - ]; + ); } $sort_order = array(); @@ -526,13 +526,13 @@ public function autocomplete() { $type = $this->language->get('text_date'); } - $json[] = [ + $json[] = array( 'option_id' => $option['option_id'], 'name' => strip_tags(html_entity_decode($option['name'], ENT_QUOTES, 'UTF-8')), 'category' => $type, 'type' => $option['type'], 'option_value' => $option_value_data - ]; + ); } } diff --git a/upload/admin/controller/catalog/product.php b/upload/admin/controller/catalog/product.php index b1c1d567..f489993f 100644 --- a/upload/admin/controller/catalog/product.php +++ b/upload/admin/controller/catalog/product.php @@ -319,15 +319,15 @@ protected function getList() { $data['breadcrumbs'] = array(); - $data['breadcrumbs'][] = [ + $data['breadcrumbs'][] = array( 'text' => $this->language->get('text_home'), 'href' => $this->url->link('common/dashboard', 'token=' . $this->session->data['token'], true) - ]; + ); - $data['breadcrumbs'][] = [ + $data['breadcrumbs'][] = array( 'text' => $this->language->get('heading_title'), 'href' => $this->url->link('catalog/product', 'token=' . $this->session->data['token'] . $url, true) - ]; + ); $data['add'] = $this->url->link('catalog/product/add', 'token=' . $this->session->data['token'] . $url, true); $data['copy'] = $this->url->link('catalog/product/copy', 'token=' . $this->session->data['token'] . $url, true); @@ -335,7 +335,7 @@ protected function getList() { $data['products'] = array(); - $filter_data = [ + $filter_data = array( 'filter_name' => $filter_name, 'filter_model' => $filter_model, 'filter_price' => $filter_price, @@ -346,7 +346,7 @@ protected function getList() { 'order' => $order, 'start' => ($page - 1) * $this->config->get('config_limit_admin'), 'limit' => $this->config->get('config_limit_admin') - ]; + ); $this->load->model('tool/image'); @@ -373,7 +373,7 @@ protected function getList() { } } - $data['products'][] = [ + $data['products'][] = array( 'product_id' => $result['product_id'], 'image' => $image, 'name' => $result['name'], @@ -383,7 +383,7 @@ protected function getList() { 'quantity' => $result['quantity'], 'status' => $result['status'] ? $this->language->get('text_enabled') : $this->language->get('text_disabled'), 'edit' => $this->url->link('catalog/product/edit', 'token=' . $this->session->data['token'] . '&product_id=' . $result['product_id'] . $url, true) - ]; + ); } $data['heading_title'] = $this->language->get('heading_title'); @@ -735,15 +735,15 @@ protected function getForm() { $data['breadcrumbs'] = array(); - $data['breadcrumbs'][] = [ + $data['breadcrumbs'][] = array( 'text' => $this->language->get('text_home'), 'href' => $this->url->link('common/dashboard', 'token=' . $this->session->data['token'], true) - ]; + ); - $data['breadcrumbs'][] = [ + $data['breadcrumbs'][] = array( 'text' => $this->language->get('heading_title'), 'href' => $this->url->link('catalog/product', 'token=' . $this->session->data['token'] . $url, true) - ]; + ); if (!isset($this->request->get['product_id'])) { $data['action'] = $this->url->link('catalog/product/add', 'token=' . $this->session->data['token'] . $url, true); @@ -847,7 +847,7 @@ protected function getForm() { } elseif (!empty($product_info)) { $data['product_store'] = $this->model_catalog_product->getProductStores($this->request->get['product_id']); } else { - $data['product_store'] = [0]; + $data['product_store'] = array(0); } if (isset($this->request->post['keyword'])) { @@ -1061,10 +1061,10 @@ protected function getForm() { $category_info = $this->model_catalog_category->getCategory($category_id); if ($category_info) { - $data['product_categories'][] = [ + $data['product_categories'][] = array( 'category_id' => $category_info['category_id'], 'name' => ($category_info['path']) ? $category_info['path'] . ' > ' . $category_info['name'] : $category_info['name'] - ]; + ); } } @@ -1085,10 +1085,10 @@ protected function getForm() { $filter_info = $this->model_catalog_filter->getFilter($filter_id); if ($filter_info) { - $data['product_filters'][] = [ + $data['product_filters'][] = array( 'filter_id' => $filter_info['filter_id'], 'name' => $filter_info['group'] . ' > ' . $filter_info['name'] - ]; + ); } } @@ -1109,11 +1109,11 @@ protected function getForm() { $attribute_info = $this->model_catalog_attribute->getAttribute($product_attribute['attribute_id']); if ($attribute_info) { - $data['product_attributes'][] = [ + $data['product_attributes'][] = array( 'attribute_id' => $product_attribute['attribute_id'], 'name' => $attribute_info['name'], 'product_attribute_description' => $product_attribute['product_attribute_description'] - ]; + ); } } @@ -1135,7 +1135,7 @@ protected function getForm() { if (isset($product_option['product_option_value'])) { foreach ($product_option['product_option_value'] as $product_option_value) { - $product_option_value_data[] = [ + $product_option_value_data[] = array( 'product_option_value_id' => $product_option_value['product_option_value_id'], 'option_value_id' => $product_option_value['option_value_id'], 'quantity' => $product_option_value['quantity'], @@ -1146,11 +1146,11 @@ protected function getForm() { 'points_prefix' => $product_option_value['points_prefix'], 'weight' => $product_option_value['weight'], 'weight_prefix' => $product_option_value['weight_prefix'] - ]; + ); } } - $data['product_options'][] = [ + $data['product_options'][] = array( 'product_option_id' => $product_option['product_option_id'], 'product_option_value' => $product_option_value_data, 'option_id' => $product_option['option_id'], @@ -1158,7 +1158,7 @@ protected function getForm() { 'type' => $product_option['type'], 'value' => $product_option['value'] ?? '', 'required' => $product_option['required'] - ]; + ); } $data['option_values'] = array(); @@ -1188,14 +1188,14 @@ protected function getForm() { $data['product_discounts'] = array(); foreach ($product_discounts as $product_discount) { - $data['product_discounts'][] = [ + $data['product_discounts'][] = array( 'customer_group_id' => $product_discount['customer_group_id'], 'quantity' => $product_discount['quantity'], 'priority' => $product_discount['priority'], 'price' => $product_discount['price'], 'date_start' => ($product_discount['date_start'] != '0000-00-00') ? $product_discount['date_start'] : '', 'date_end' => ($product_discount['date_end'] != '0000-00-00') ? $product_discount['date_end'] : '' - ]; + ); } // Product Specials @@ -1210,13 +1210,13 @@ protected function getForm() { $data['product_specials'] = array(); foreach ($product_specials as $product_special) { - $data['product_specials'][] = [ + $data['product_specials'][] = array( 'customer_group_id' => $product_special['customer_group_id'], 'priority' => $product_special['priority'], 'price' => $product_special['price'], 'date_start' => ($product_special['date_start'] != '0000-00-00') ? $product_special['date_start'] : '', 'date_end' => ($product_special['date_end'] != '0000-00-00') ? $product_special['date_end'] : '' - ]; + ); } // Image @@ -1258,11 +1258,11 @@ protected function getForm() { $thumb = 'no_image.png'; } - $data['product_images'][] = [ + $data['product_images'][] = array( 'image' => $image, 'thumb' => $this->model_tool_image->resize(html_entity_decode($thumb, ENT_QUOTES, 'UTF-8'), 100, 100), 'sort_order' => $product_image['sort_order'] - ]; + ); } // Downloads @@ -1282,10 +1282,10 @@ protected function getForm() { $download_info = $this->model_catalog_download->getDownload($download_id); if ($download_info) { - $data['product_downloads'][] = [ + $data['product_downloads'][] = array( 'download_id' => $download_info['download_id'], 'name' => $download_info['name'] - ]; + ); } } @@ -1304,10 +1304,10 @@ protected function getForm() { $related_info = $this->model_catalog_product->getProduct($product_id); if ($related_info) { - $data['product_relateds'][] = [ + $data['product_relateds'][] = array( 'product_id' => $related_info['product_id'], 'name' => $related_info['name'] - ]; + ); } } @@ -1430,12 +1430,12 @@ public function autocomplete() { $limit = 5; } - $filter_data = [ + $filter_data = array( 'filter_name' => $filter_name, 'filter_model' => $filter_model, 'start' => 0, 'limit' => $limit - ]; + ); $results = $this->model_catalog_product->getProducts($filter_data); @@ -1454,17 +1454,17 @@ public function autocomplete() { $option_value_info = $this->model_catalog_option->getOptionValue($product_option_value['option_value_id']); if ($option_value_info) { - $product_option_value_data[] = [ + $product_option_value_data[] = array( 'product_option_value_id' => $product_option_value['product_option_value_id'], 'option_value_id' => $product_option_value['option_value_id'], 'name' => $option_value_info['name'], 'price' => (float)$product_option_value['price'] ? $this->currency->format($product_option_value['price'], $this->config->get('config_currency')) : false, 'price_prefix' => $product_option_value['price_prefix'] - ]; + ); } } - $option_data[] = [ + $option_data[] = array( 'product_option_id' => $product_option['product_option_id'], 'product_option_value' => $product_option_value_data, 'option_id' => $product_option['option_id'], @@ -1472,17 +1472,17 @@ public function autocomplete() { 'type' => $option_info['type'], 'value' => $product_option['value'], 'required' => $product_option['required'] - ]; + ); } } - $json[] = [ + $json[] = array( 'product_id' => $result['product_id'], 'name' => strip_tags(html_entity_decode($result['name'], ENT_QUOTES, 'UTF-8')), 'model' => $result['model'], 'option' => $option_data, 'price' => $result['price'] - ]; + ); } } diff --git a/upload/admin/controller/catalog/recurring.php b/upload/admin/controller/catalog/recurring.php index fe127267..d1ad4063 100644 --- a/upload/admin/controller/catalog/recurring.php +++ b/upload/admin/controller/catalog/recurring.php @@ -179,15 +179,15 @@ protected function getList() { $data['breadcrumbs'] = array(); - $data['breadcrumbs'][] = [ + $data['breadcrumbs'][] = array( 'text' => $this->language->get('text_home'), 'href' => $this->url->link('common/dashboard', 'token=' . $this->session->data['token'], true) - ]; + ); - $data['breadcrumbs'][] = [ + $data['breadcrumbs'][] = array( 'text' => $this->language->get('heading_title'), 'href' => $this->url->link('catalog/recurring', 'token=' . $this->session->data['token'] . $url, true) - ]; + ); $data['add'] = $this->url->link('catalog/recurring/add', 'token=' . $this->session->data['token'] . $url, true); $data['copy'] = $this->url->link('catalog/recurring/copy', 'token=' . $this->session->data['token'] . $url, true); @@ -195,24 +195,24 @@ protected function getList() { $data['recurrings'] = array(); - $filter_data = [ + $filter_data = array( 'sort' => $sort, 'order' => $order, 'start' => ($page - 1) * $this->config->get('config_limit_admin'), 'limit' => $this->config->get('config_limit_admin') - ]; + ); $recurring_total = $this->model_catalog_recurring->getTotalRecurrings(); $results = $this->model_catalog_recurring->getRecurrings($filter_data); foreach ($results as $result) { - $data['recurrings'][] = [ + $data['recurrings'][] = array( 'recurring_id' => $result['recurring_id'], 'name' => $result['name'], 'sort_order' => $result['sort_order'], 'edit' => $this->url->link('catalog/recurring/edit', 'token=' . $this->session->data['token'] . '&recurring_id=' . $result['recurring_id'] . $url, true) - ]; + ); } $data['heading_title'] = $this->language->get('heading_title'); @@ -349,15 +349,15 @@ protected function getForm() { $data['breadcrumbs'] = array(); - $data['breadcrumbs'][] = [ + $data['breadcrumbs'][] = array( 'text' => $this->language->get('text_home'), 'href' => $this->url->link('common/dashboard', 'token=' . $this->session->data['token'], true) - ]; + ); - $data['breadcrumbs'][] = [ + $data['breadcrumbs'][] = array( 'text' => $this->language->get('heading_title'), 'href' => $this->url->link('catalog/recurring', 'token=' . $this->session->data['token'] . $url, true) - ]; + ); if (!isset($this->request->get['recurring_id'])) { $data['action'] = $this->url->link('catalog/recurring/add', 'token=' . $this->session->data['token'] . $url, true); @@ -395,30 +395,30 @@ protected function getForm() { $data['frequencies'] = array(); - $data['frequencies'][] = [ + $data['frequencies'][] = array( 'text' => $this->language->get('text_day'), 'value' => 'day' - ]; + ); - $data['frequencies'][] = [ + $data['frequencies'][] = array( 'text' => $this->language->get('text_week'), 'value' => 'week' - ]; + ); - $data['frequencies'][] = [ + $data['frequencies'][] = array( 'text' => $this->language->get('text_semi_month'), 'value' => 'semi_month' - ]; + ); - $data['frequencies'][] = [ + $data['frequencies'][] = array( 'text' => $this->language->get('text_month'), 'value' => 'month' - ]; + ); - $data['frequencies'][] = [ + $data['frequencies'][] = array( 'text' => $this->language->get('text_year'), 'value' => 'year' - ]; + ); if (isset($this->request->post['frequency'])) { $data['frequency'] = $this->request->post['frequency']; diff --git a/upload/admin/controller/catalog/review.php b/upload/admin/controller/catalog/review.php index bcce6bd3..b3e76736 100644 --- a/upload/admin/controller/catalog/review.php +++ b/upload/admin/controller/catalog/review.php @@ -233,22 +233,22 @@ protected function getList() { $data['breadcrumbs'] = array(); - $data['breadcrumbs'][] = [ + $data['breadcrumbs'][] = array( 'text' => $this->language->get('text_home'), 'href' => $this->url->link('common/dashboard', 'token=' . $this->session->data['token'], true) - ]; + ); - $data['breadcrumbs'][] = [ + $data['breadcrumbs'][] = array( 'text' => $this->language->get('heading_title'), 'href' => $this->url->link('catalog/review', 'token=' . $this->session->data['token'] . $url, true) - ]; + ); $data['add'] = $this->url->link('catalog/review/add', 'token=' . $this->session->data['token'] . $url, true); $data['delete'] = $this->url->link('catalog/review/delete', 'token=' . $this->session->data['token'] . $url, true); $data['reviews'] = array(); - $filter_data = [ + $filter_data = array( 'filter_product' => $filter_product, 'filter_author' => $filter_author, 'filter_status' => $filter_status, @@ -257,14 +257,14 @@ protected function getList() { 'order' => $order, 'start' => ($page - 1) * $this->config->get('config_limit_admin'), 'limit' => $this->config->get('config_limit_admin') - ]; + ); $review_total = $this->model_catalog_review->getTotalReviews($filter_data); $results = $this->model_catalog_review->getReviews($filter_data); foreach ($results as $result) { - $data['reviews'][] = [ + $data['reviews'][] = array( 'review_id' => $result['review_id'], 'name' => $result['name'], 'author' => $result['author'], @@ -272,7 +272,7 @@ protected function getList() { 'status' => $result['status'] ? $this->language->get('text_enabled') : $this->language->get('text_disabled'), 'date_added' => date($this->language->get('date_format_short'), strtotime($result['date_added'])), 'edit' => $this->url->link('catalog/review/edit', 'token=' . $this->session->data['token'] . '&review_id=' . $result['review_id'] . $url, true) - ]; + ); } $data['heading_title'] = $this->language->get('heading_title'); @@ -489,15 +489,15 @@ protected function getForm() { $data['breadcrumbs'] = array(); - $data['breadcrumbs'][] = [ + $data['breadcrumbs'][] = array( 'text' => $this->language->get('text_home'), 'href' => $this->url->link('common/dashboard', 'token=' . $this->session->data['token'], true) - ]; + ); - $data['breadcrumbs'][] = [ + $data['breadcrumbs'][] = array( 'text' => $this->language->get('heading_title'), 'href' => $this->url->link('catalog/review', 'token=' . $this->session->data['token'] . $url, true) - ]; + ); if (!isset($this->request->get['review_id'])) { $data['action'] = $this->url->link('catalog/review/add', 'token=' . $this->session->data['token'] . $url, true); diff --git a/upload/admin/controller/common/column_left.php b/upload/admin/controller/common/column_left.php index 049d47b5..38726ca4 100644 --- a/upload/admin/controller/common/column_left.php +++ b/upload/admin/controller/common/column_left.php @@ -1,6 +1,6 @@ request->get['token']) && isset($this->session->data['token']) && ($this->request->get['token'] == $this->session->data['token'])) { $this->load->language('common/column_left'); @@ -8,596 +8,596 @@ public function index(): string { // Level 2 can not have children // Menu - $data['menus'][] = [ + $data['menus'][] = array( 'id' => 'menu-dashboard', 'icon' => 'fa-dashboard', 'name' => $this->language->get('text_dashboard'), 'href' => $this->url->link('common/dashboard', 'token=' . $this->session->data['token'], true), - 'children' => [] - ]; + 'children' => array() + ); // Catalog $catalog = array(); if ($this->user->hasPermission('access', 'catalog/category')) { - $catalog[] = [ + $catalog[] = array( 'name' => $this->language->get('text_category'), 'href' => $this->url->link('catalog/category', 'token=' . $this->session->data['token'], true), - 'children' => [] - ]; + 'children' => array() + ); } if ($this->user->hasPermission('access', 'catalog/product')) { - $catalog[] = [ + $catalog[] = array( 'name' => $this->language->get('text_product'), 'href' => $this->url->link('catalog/product', 'token=' . $this->session->data['token'], true), - 'children' => [] - ]; + 'children' => array() + ); } if ($this->user->hasPermission('access', 'catalog/recurring')) { - $catalog[] = [ + $catalog[] = array( 'name' => $this->language->get('text_recurring'), 'href' => $this->url->link('catalog/recurring', 'token=' . $this->session->data['token'], true), - 'children' => [] - ]; + 'children' => array() + ); } if ($this->user->hasPermission('access', 'catalog/filter')) { - $catalog[] = [ + $catalog[] = array( 'name' => $this->language->get('text_filter'), 'href' => $this->url->link('catalog/filter', 'token=' . $this->session->data['token'], true), - 'children' => [] - ]; + 'children' => array() + ); } // Attributes $attribute = array(); if ($this->user->hasPermission('access', 'catalog/attribute')) { - $attribute[] = [ + $attribute[] = array( 'name' => $this->language->get('text_attribute'), 'href' => $this->url->link('catalog/attribute', 'token=' . $this->session->data['token'], true), - 'children' => [] - ]; + 'children' => array() + ); } if ($this->user->hasPermission('access', 'catalog/attribute_group')) { - $attribute[] = [ + $attribute[] = array( 'name' => $this->language->get('text_attribute_group'), 'href' => $this->url->link('catalog/attribute_group', 'token=' . $this->session->data['token'], true), - 'children' => [] - ]; + 'children' => array() + ); } if ($attribute) { - $catalog[] = [ + $catalog[] = array( 'name' => $this->language->get('text_attribute'), 'href' => '', 'children' => $attribute - ]; + ); } if ($this->user->hasPermission('access', 'catalog/option')) { - $catalog[] = [ + $catalog[] = array( 'name' => $this->language->get('text_option'), 'href' => $this->url->link('catalog/option', 'token=' . $this->session->data['token'], true), - 'children' => [] - ]; + 'children' => array() + ); } if ($this->user->hasPermission('access', 'catalog/manufacturer')) { - $catalog[] = [ + $catalog[] = array( 'name' => $this->language->get('text_manufacturer'), 'href' => $this->url->link('catalog/manufacturer', 'token=' . $this->session->data['token'], true), - 'children' => [] - ]; + 'children' => array() + ); } if ($this->user->hasPermission('access', 'catalog/download')) { - $catalog[] = [ + $catalog[] = array( 'name' => $this->language->get('text_download'), 'href' => $this->url->link('catalog/download', 'token=' . $this->session->data['token'], true), - 'children' => [] - ]; + 'children' => array() + ); } if ($this->user->hasPermission('access', 'catalog/review')) { - $catalog[] = [ + $catalog[] = array( 'name' => $this->language->get('text_review'), 'href' => $this->url->link('catalog/review', 'token=' . $this->session->data['token'], true), - 'children' => [] - ]; + 'children' => array() + ); } if ($this->user->hasPermission('access', 'catalog/information')) { - $catalog[] = [ + $catalog[] = array( 'name' => $this->language->get('text_information'), 'href' => $this->url->link('catalog/information', 'token=' . $this->session->data['token'], true), - 'children' => [] - ]; + 'children' => array() + ); } if ($catalog) { - $data['menus'][] = [ + $data['menus'][] = array( 'id' => 'menu-catalog', 'icon' => 'fa-tags', 'name' => $this->language->get('text_catalog'), 'href' => '', 'children' => $catalog - ]; + ); } // Extension $extension = array(); if ($this->user->hasPermission('access', 'extension/installer')) { - $extension[] = [ + $extension[] = array( 'name' => $this->language->get('text_installer'), 'href' => $this->url->link('extension/installer', 'token=' . $this->session->data['token'], true), - 'children' => [] - ]; + 'children' => array() + ); } if ($this->user->hasPermission('access', 'extension/extension')) { - $extension[] = [ + $extension[] = array( 'name' => $this->language->get('text_extension'), 'href' => $this->url->link('extension/extension', 'token=' . $this->session->data['token'], true), - 'children' => [] - ]; + 'children' => array() + ); } if ($this->user->hasPermission('access', 'extension/modification')) { - $extension[] = [ + $extension[] = array( 'name' => $this->language->get('text_modification'), 'href' => $this->url->link('extension/modification', 'token=' . $this->session->data['token'], true), - 'children' => [] - ]; + 'children' => array() + ); } if ($this->user->hasPermission('access', 'extension/event')) { - $extension[] = [ + $extension[] = array( 'name' => $this->language->get('text_event'), 'href' => $this->url->link('extension/event', 'token=' . $this->session->data['token'], true), - 'children' => [] - ]; + 'children' => array() + ); } if ($extension) { - $data['menus'][] = [ + $data['menus'][] = array( 'id' => 'menu-extension', 'icon' => 'fa-puzzle-piece', 'name' => $this->language->get('text_extension'), 'href' => '', 'children' => $extension - ]; + ); } // Design $design = array(); if ($this->user->hasPermission('access', 'design/layout')) { - $design[] = [ + $design[] = array( 'name' => $this->language->get('text_layout'), 'href' => $this->url->link('design/layout', 'token=' . $this->session->data['token'], true), - 'children' => [] - ]; + 'children' => array() + ); } if ($this->user->hasPermission('access', 'design/banner')) { - $design[] = [ + $design[] = array( 'name' => $this->language->get('text_banner'), 'href' => $this->url->link('design/banner', 'token=' . $this->session->data['token'], true), - 'children' => [] - ]; + 'children' => array() + ); } if ($this->user->hasPermission('access', 'design/seo_url')) { - $design[] = [ + $design[] = array( 'name' => $this->language->get('text_seo_url'), 'href' => $this->url->link('design/seo_url', 'token=' . $this->session->data['token'], true), - 'children' => [] - ]; + 'children' => array() + ); } if ($design) { - $data['menus'][] = [ + $data['menus'][] = array( 'id' => 'menu-design', 'icon' => 'fa-television', 'name' => $this->language->get('text_design'), 'href' => '', 'children' => $design - ]; + ); } // Sales $sale = array(); if ($this->user->hasPermission('access', 'sale/order')) { - $sale[] = [ + $sale[] = array( 'name' => $this->language->get('text_order'), 'href' => $this->url->link('sale/order', 'token=' . $this->session->data['token'], true), - 'children' => [] - ]; + 'children' => array() + ); } if ($this->user->hasPermission('access', 'sale/recurring')) { - $sale[] = [ + $sale[] = array( 'name' => $this->language->get('text_order_recurring'), 'href' => $this->url->link('sale/recurring', 'token=' . $this->session->data['token'], true), - 'children' => [] - ]; + 'children' => array() + ); } if ($this->user->hasPermission('access', 'sale/return')) { - $sale[] = [ + $sale[] = array( 'name' => $this->language->get('text_return'), 'href' => $this->url->link('sale/return', 'token=' . $this->session->data['token'], true), - 'children' => [] - ]; + 'children' => array() + ); } // Voucher $voucher = array(); if ($this->user->hasPermission('access', 'sale/voucher')) { - $voucher[] = [ + $voucher[] = array( 'name' => $this->language->get('text_voucher'), 'href' => $this->url->link('sale/voucher', 'token=' . $this->session->data['token'], true), - 'children' => [] - ]; + 'children' => array() + ); } if ($this->user->hasPermission('access', 'sale/voucher_theme')) { - $voucher[] = [ + $voucher[] = array( 'name' => $this->language->get('text_voucher_theme'), 'href' => $this->url->link('sale/voucher_theme', 'token=' . $this->session->data['token'], true), - 'children' => [] - ]; + 'children' => array() + ); } if ($voucher) { - $sale[] = [ + $sale[] = array( 'name' => $this->language->get('text_voucher'), 'href' => '', 'children' => $voucher - ]; + ); } if ($sale) { - $data['menus'][] = [ + $data['menus'][] = array( 'id' => 'menu-sale', 'icon' => 'fa-shopping-cart', 'name' => $this->language->get('text_sale'), 'href' => '', 'children' => $sale - ]; + ); } // Customer $customer = array(); if ($this->user->hasPermission('access', 'customer/customer')) { - $customer[] = [ + $customer[] = array( 'name' => $this->language->get('text_customer'), 'href' => $this->url->link('customer/customer', 'token=' . $this->session->data['token'], true), - 'children' => [] - ]; + 'children' => array() + ); } if ($this->user->hasPermission('access', 'customer/customer_group')) { - $customer[] = [ + $customer[] = array( 'name' => $this->language->get('text_customer_group'), 'href' => $this->url->link('customer/customer_group', 'token=' . $this->session->data['token'], true), - 'children' => [] - ]; + 'children' => array() + ); } if ($this->user->hasPermission('access', 'customer/custom_field')) { - $customer[] = [ + $customer[] = array( 'name' => $this->language->get('text_custom_field'), 'href' => $this->url->link('customer/custom_field', 'token=' . $this->session->data['token'], true), - 'children' => [] - ]; + 'children' => array() + ); } if ($customer) { - $data['menus'][] = [ + $data['menus'][] = array( 'id' => 'menu-customer', 'icon' => 'fa-user', 'name' => $this->language->get('text_customer'), 'href' => '', 'children' => $customer - ]; + ); } // Marketing $marketing = array(); if ($this->user->hasPermission('access', 'marketing/marketing')) { - $marketing[] = [ + $marketing[] = array( 'name' => $this->language->get('text_marketing'), 'href' => $this->url->link('marketing/marketing', 'token=' . $this->session->data['token'], true), - 'children' => [] - ]; + 'children' => array() + ); } if ($this->user->hasPermission('access', 'marketing/affiliate')) { - $marketing[] = [ + $marketing[] = array( 'name' => $this->language->get('text_affiliate'), 'href' => $this->url->link('marketing/affiliate', 'token=' . $this->session->data['token'], true), - 'children' => [] - ]; + 'children' => array() + ); } if ($this->user->hasPermission('access', 'marketing/coupon')) { - $marketing[] = [ + $marketing[] = array( 'name' => $this->language->get('text_coupon'), 'href' => $this->url->link('marketing/coupon', 'token=' . $this->session->data['token'], true), - 'children' => [] - ]; + 'children' => array() + ); } if ($this->user->hasPermission('access', 'marketing/contact')) { - $marketing[] = [ + $marketing[] = array( 'name' => $this->language->get('text_contact'), 'href' => $this->url->link('marketing/contact', 'token=' . $this->session->data['token'], true), - 'children' => [] - ]; + 'children' => array() + ); } if ($marketing) { - $data['menus'][] = [ + $data['menus'][] = array( 'id' => 'menu-marketing', 'icon' => 'fa-share-alt', 'name' => $this->language->get('text_marketing'), 'href' => '', 'children' => $marketing - ]; + ); } // System $system = array(); if ($this->user->hasPermission('access', 'setting/setting')) { - $system[] = [ + $system[] = array( 'name' => $this->language->get('text_setting'), 'href' => $this->url->link('setting/store', 'token=' . $this->session->data['token'], true), - 'children' => [] - ]; + 'children' => array() + ); } // Users $user = array(); if ($this->user->hasPermission('access', 'user/user')) { - $user[] = [ + $user[] = array( 'name' => $this->language->get('text_users'), 'href' => $this->url->link('user/user', 'token=' . $this->session->data['token'], true), - 'children' => [] - ]; + 'children' => array() + ); } if ($this->user->hasPermission('access', 'user/user_permission')) { - $user[] = [ + $user[] = array( 'name' => $this->language->get('text_user_group'), 'href' => $this->url->link('user/user_permission', 'token=' . $this->session->data['token'], true), - 'children' => [] - ]; + 'children' => array() + ); } if ($this->user->hasPermission('access', 'user/api')) { - $user[] = [ + $user[] = array( 'name' => $this->language->get('text_api'), 'href' => $this->url->link('user/api', 'token=' . $this->session->data['token'], true), - 'children' => [] - ]; + 'children' => array() + ); } if ($user) { - $system[] = [ + $system[] = array( 'name' => $this->language->get('text_users'), 'href' => '', 'children' => $user - ]; + ); } // Localisation $localisation = array(); if ($this->user->hasPermission('access', 'localisation/location')) { - $localisation[] = [ + $localisation[] = array( 'name' => $this->language->get('text_location'), 'href' => $this->url->link('localisation/location', 'token=' . $this->session->data['token'], true), - 'children' => [] - ]; + 'children' => array() + ); } if ($this->user->hasPermission('access', 'localisation/language')) { - $localisation[] = [ + $localisation[] = array( 'name' => $this->language->get('text_language'), 'href' => $this->url->link('localisation/language', 'token=' . $this->session->data['token'], true), - 'children' => [] - ]; + 'children' => array() + ); } if ($this->user->hasPermission('access', 'localisation/currency')) { - $localisation[] = [ + $localisation[] = array( 'name' => $this->language->get('text_currency'), 'href' => $this->url->link('localisation/currency', 'token=' . $this->session->data['token'], true), - 'children' => [] - ]; + 'children' => array() + ); } if ($this->user->hasPermission('access', 'localisation/stock_status')) { - $localisation[] = [ + $localisation[] = array( 'name' => $this->language->get('text_stock_status'), 'href' => $this->url->link('localisation/stock_status', 'token=' . $this->session->data['token'], true), - 'children' => [] - ]; + 'children' => array() + ); } if ($this->user->hasPermission('access', 'localisation/order_status')) { - $localisation[] = [ + $localisation[] = array( 'name' => $this->language->get('text_order_status'), 'href' => $this->url->link('localisation/order_status', 'token=' . $this->session->data['token'], true), - 'children' => [] - ]; + 'children' => array() + ); } // Returns $return = array(); if ($this->user->hasPermission('access', 'localisation/return_status')) { - $return[] = [ + $return[] = array( 'name' => $this->language->get('text_return_status'), 'href' => $this->url->link('localisation/return_status', 'token=' . $this->session->data['token'], true), - 'children' => [] - ]; + 'children' => array() + ); } if ($this->user->hasPermission('access', 'localisation/return_action')) { - $return[] = [ + $return[] = array( 'name' => $this->language->get('text_return_action'), 'href' => $this->url->link('localisation/return_action', 'token=' . $this->session->data['token'], true), - 'children' => [] - ]; + 'children' => array() + ); } if ($this->user->hasPermission('access', 'localisation/return_reason')) { - $return[] = [ + $return[] = array( 'name' => $this->language->get('text_return_reason'), 'href' => $this->url->link('localisation/return_reason', 'token=' . $this->session->data['token'], true), - 'children' => [] - ]; + 'children' => array() + ); } if ($return) { - $localisation[] = [ + $localisation[] = array( 'name' => $this->language->get('text_return'), 'href' => '', 'children' => $return - ]; + ); } if ($this->user->hasPermission('access', 'localisation/country')) { - $localisation[] = [ + $localisation[] = array( 'name' => $this->language->get('text_country'), 'href' => $this->url->link('localisation/country', 'token=' . $this->session->data['token'], true), - 'children' => [] - ]; + 'children' => array() + ); } if ($this->user->hasPermission('access', 'localisation/zone')) { - $localisation[] = [ + $localisation[] = array( 'name' => $this->language->get('text_zone'), 'href' => $this->url->link('localisation/zone', 'token=' . $this->session->data['token'], true), - 'children' => [] - ]; + 'children' => array() + ); } if ($this->user->hasPermission('access', 'localisation/geo_zone')) { - $localisation[] = [ + $localisation[] = array( 'name' => $this->language->get('text_geo_zone'), 'href' => $this->url->link('localisation/geo_zone', 'token=' . $this->session->data['token'], true), - 'children' => [] - ]; + 'children' => array() + ); } // Tax $tax = array(); if ($this->user->hasPermission('access', 'localisation/tax_class')) { - $tax[] = [ + $tax[] = array( 'name' => $this->language->get('text_tax_class'), 'href' => $this->url->link('localisation/tax_class', 'token=' . $this->session->data['token'], true), - 'children' => [] - ]; + 'children' => array() + ); } if ($this->user->hasPermission('access', 'localisation/tax_rate')) { - $tax[] = [ + $tax[] = array( 'name' => $this->language->get('text_tax_rate'), 'href' => $this->url->link('localisation/tax_rate', 'token=' . $this->session->data['token'], true), - 'children' => [] - ]; + 'children' => array() + ); } if ($tax) { - $localisation[] = [ + $localisation[] = array( 'name' => $this->language->get('text_tax'), 'href' => '', 'children' => $tax - ]; + ); } if ($this->user->hasPermission('access', 'localisation/length_class')) { - $localisation[] = [ + $localisation[] = array( 'name' => $this->language->get('text_length_class'), 'href' => $this->url->link('localisation/length_class', 'token=' . $this->session->data['token'], true), - 'children' => [] - ]; + 'children' => array() + ); } if ($this->user->hasPermission('access', 'localisation/weight_class')) { - $localisation[] = [ + $localisation[] = array( 'name' => $this->language->get('text_weight_class'), 'href' => $this->url->link('localisation/weight_class', 'token=' . $this->session->data['token'], true), - 'children' => [] - ]; + 'children' => array() + ); } if ($localisation) { - $system[] = [ + $system[] = array( 'name' => $this->language->get('text_localisation'), 'href' => '', 'children' => $localisation - ]; + ); } // Tools $tool = array(); if ($this->user->hasPermission('access', 'tool/upload')) { - $tool[] = [ + $tool[] = array( 'name' => $this->language->get('text_upload'), 'href' => $this->url->link('tool/upload', 'token=' . $this->session->data['token'], true), - 'children' => [] - ]; + 'children' => array() + ); } if ($this->user->hasPermission('access', 'tool/backup')) { - $tool[] = [ + $tool[] = array( 'name' => $this->language->get('text_backup'), 'href' => $this->url->link('tool/backup', 'token=' . $this->session->data['token'], true), - 'children' => [] - ]; + 'children' => array() + ); } if ($this->user->hasPermission('access', 'tool/log')) { - $tool[] = [ + $tool[] = array( 'name' => $this->language->get('text_log'), 'href' => $this->url->link('tool/log', 'token=' . $this->session->data['token'], true), - 'children' => [] - ]; + 'children' => array() + ); } if ($tool) { - $system[] = [ + $system[] = array( 'name' => $this->language->get('text_tools'), 'href' => '', 'children' => $tool - ]; + ); } if ($system) { - $data['menus'][] = [ + $data['menus'][] = array( 'id' => 'menu-system', 'icon' => 'fa-cog', 'name' => $this->language->get('text_system'), 'href' => '', 'children' => $system - ]; + ); } // Report @@ -607,182 +607,182 @@ public function index(): string { $report_sale = array(); if ($this->user->hasPermission('access', 'report/sale_order')) { - $report_sale[] = [ + $report_sale[] = array( 'name' => $this->language->get('text_report_sale_order'), 'href' => $this->url->link('report/sale_order', 'token=' . $this->session->data['token'], true), - 'children' => [] - ]; + 'children' => array() + ); } if ($this->user->hasPermission('access', 'report/sale_tax')) { - $report_sale[] = [ + $report_sale[] = array( 'name' => $this->language->get('text_report_sale_tax'), 'href' => $this->url->link('report/sale_tax', 'token=' . $this->session->data['token'], true), - 'children' => [] - ]; + 'children' => array() + ); } if ($this->user->hasPermission('access', 'report/sale_shipping')) { - $report_sale[] = [ + $report_sale[] = array( 'name' => $this->language->get('text_report_sale_shipping'), 'href' => $this->url->link('report/sale_shipping', 'token=' . $this->session->data['token'], true), - 'children' => [] - ]; + 'children' => array() + ); } if ($this->user->hasPermission('access', 'report/sale_return')) { - $report_sale[] = [ + $report_sale[] = array( 'name' => $this->language->get('text_report_sale_return'), 'href' => $this->url->link('report/sale_return', 'token=' . $this->session->data['token'], true), - 'children' => [] - ]; + 'children' => array() + ); } if ($this->user->hasPermission('access', 'report/sale_coupon')) { - $report_sale[] = [ + $report_sale[] = array( 'name' => $this->language->get('text_report_sale_coupon'), 'href' => $this->url->link('report/sale_coupon', 'token=' . $this->session->data['token'], true), - 'children' => [] - ]; + 'children' => array() + ); } if ($report_sale) { - $report[] = [ + $report[] = array( 'name' => $this->language->get('text_report_sale'), 'href' => '', 'children' => $report_sale - ]; + ); } // Report Products $report_product = array(); if ($this->user->hasPermission('access', 'report/product_viewed')) { - $report_product[] = [ + $report_product[] = array( 'name' => $this->language->get('text_report_product_viewed'), 'href' => $this->url->link('report/product_viewed', 'token=' . $this->session->data['token'], true), - 'children' => [] - ]; + 'children' => array() + ); } if ($this->user->hasPermission('access', 'report/product_purchased')) { - $report_product[] = [ + $report_product[] = array( 'name' => $this->language->get('text_report_product_purchased'), 'href' => $this->url->link('report/product_purchased', 'token=' . $this->session->data['token'], true), - 'children' => [] - ]; + 'children' => array() + ); } if ($report_product) { - $report[] = [ + $report[] = array( 'name' => $this->language->get('text_report_product'), 'href' => '', 'children' => $report_product - ]; + ); } // Report Customers $report_customer = array(); if ($this->user->hasPermission('access', 'report/customer_online')) { - $report_customer[] = [ + $report_customer[] = array( 'name' => $this->language->get('text_report_customer_online'), 'href' => $this->url->link('report/customer_online', 'token=' . $this->session->data['token'], true), - 'children' => [] - ]; + 'children' => array() + ); } if ($this->user->hasPermission('access', 'report/customer_activity')) { - $report_customer[] = [ + $report_customer[] = array( 'name' => $this->language->get('text_report_customer_activity'), 'href' => $this->url->link('report/customer_activity', 'token=' . $this->session->data['token'], true), - 'children' => [] - ]; + 'children' => array() + ); } if ($this->user->hasPermission('access', 'report/customer_search')) { - $report_customer[] = [ + $report_customer[] = array( 'name' => $this->language->get('text_report_customer_search'), 'href' => $this->url->link('report/customer_search', 'token=' . $this->session->data['token'], true), - 'children' => [] - ]; + 'children' => array() + ); } if ($this->user->hasPermission('access', 'report/customer_order')) { - $report_customer[] = [ + $report_customer[] = array( 'name' => $this->language->get('text_report_customer_order'), 'href' => $this->url->link('report/customer_order', 'token=' . $this->session->data['token'], true), - 'children' => [] - ]; + 'children' => array() + ); } if ($this->user->hasPermission('access', 'report/customer_reward')) { - $report_customer[] = [ + $report_customer[] = array( 'name' => $this->language->get('text_report_customer_reward'), 'href' => $this->url->link('report/customer_reward', 'token=' . $this->session->data['token'], true), - 'children' => [] - ]; + 'children' => array() + ); } if ($this->user->hasPermission('access', 'report/customer_credit')) { - $report_customer[] = [ + $report_customer[] = array( 'name' => $this->language->get('text_report_customer_credit'), 'href' => $this->url->link('report/customer_credit', 'token=' . $this->session->data['token'], true), - 'children' => [] - ]; + 'children' => array() + ); } if ($report_customer) { - $report[] = [ + $report[] = array( 'name' => $this->language->get('text_report_customer'), 'href' => '', 'children' => $report_customer - ]; + ); } // Report Marketing $report_marketing = array(); if ($this->user->hasPermission('access', 'report/marketing')) { - $report_marketing[] = [ + $report_marketing[] = array( 'name' => $this->language->get('text_report_marketing'), 'href' => $this->url->link('report/marketing', 'token=' . $this->session->data['token'], true), - 'children' => [] - ]; + 'children' => array() + ); } if ($this->user->hasPermission('access', 'report/affiliate')) { - $report_marketing[] = [ + $report_marketing[] = array( 'name' => $this->language->get('text_report_affiliate'), 'href' => $this->url->link('report/affiliate', 'token=' . $this->session->data['token'], true), - 'children' => [] - ]; + 'children' => array() + ); } if ($this->user->hasPermission('access', 'report/affiliate_activity')) { - $report_marketing[] = [ + $report_marketing[] = array( 'name' => $this->language->get('text_report_affiliate_activity'), 'href' => $this->url->link('report/affiliate_activity', 'token=' . $this->session->data['token'], true), - 'children' => [] - ]; + 'children' => array() + ); } if ($report_marketing) { - $report[] = [ + $report[] = array( 'name' => $this->language->get('text_report_marketing'), 'href' => '', 'children' => $report_marketing - ]; + ); } if ($report) { - $data['menus'][] = [ + $data['menus'][] = array( 'id' => 'menu-report', 'icon' => 'fa-bar-chart-o', 'name' => $this->language->get('text_reports'), 'href' => '', 'children' => $report - ]; + ); } // Stats @@ -794,7 +794,7 @@ public function index(): string { $order_total = $this->model_sale_order->getTotalOrders(); - $complete_total = $this->model_sale_order->getTotalOrders(['filter_order_status' => implode(',', $this->config->get('config_complete_status'))]); + $complete_total = $this->model_sale_order->getTotalOrders(array('filter_order_status' => implode(',', $this->config->get('config_complete_status')))); if ($complete_total) { $data['complete_status'] = round(($complete_total / $order_total) * 100); @@ -802,7 +802,7 @@ public function index(): string { $data['complete_status'] = 0; } - $processing_total = $this->model_sale_order->getTotalOrders(['filter_order_status' => implode(',', $this->config->get('config_processing_status'))]); + $processing_total = $this->model_sale_order->getTotalOrders(array('filter_order_status' => implode(',', $this->config->get('config_processing_status')))); if ($processing_total) { $data['processing_status'] = round(($processing_total / $order_total) * 100); @@ -822,7 +822,7 @@ public function index(): string { } } - $other_total = $this->model_sale_order->getTotalOrders(['filter_order_status' => implode(',', $order_status_data)]); + $other_total = $this->model_sale_order->getTotalOrders(array('filter_order_status' => implode(',', $order_status_data))); if ($other_total) { $data['other_status'] = round(($other_total / $order_total) * 100); diff --git a/upload/admin/controller/common/dashboard.php b/upload/admin/controller/common/dashboard.php index 4bc67b08..6f8dbb63 100644 --- a/upload/admin/controller/common/dashboard.php +++ b/upload/admin/controller/common/dashboard.php @@ -11,15 +11,15 @@ public function index() { $data['breadcrumbs'] = array(); - $data['breadcrumbs'][] = [ + $data['breadcrumbs'][] = array( 'text' => $this->language->get('text_home'), 'href' => $this->url->link('common/dashboard', 'token=' . $this->session->data['token'], true) - ]; + ); - $data['breadcrumbs'][] = [ + $data['breadcrumbs'][] = array( 'text' => $this->language->get('heading_title'), 'href' => $this->url->link('common/dashboard', 'token=' . $this->session->data['token'], true) - ]; + ); // Check install directory exists if (is_dir(dirname(DIR_APPLICATION) . '/install')) { @@ -42,12 +42,12 @@ public function index() { $output = $this->load->controller('extension/dashboard/' . $code . '/dashboard'); if ($output) { - $dashboards[] = [ + $dashboards[] = array( 'code' => $code, 'width' => $this->config->get('dashboard_' . $code . '_width'), 'sort_order' => $this->config->get('dashboard_' . $code . '_sort_order'), 'output' => $output - ]; + ); } } } diff --git a/upload/admin/controller/common/filemanager.php b/upload/admin/controller/common/filemanager.php index 3d6ec662..63eec4e4 100644 --- a/upload/admin/controller/common/filemanager.php +++ b/upload/admin/controller/common/filemanager.php @@ -68,21 +68,21 @@ public function index() { $url .= '&thumb=' . $this->request->get['thumb']; } - $data['images'][] = [ + $data['images'][] = array( 'thumb' => '', 'name' => $name, 'type' => 'directory', 'path' => utf8_substr($image, utf8_strlen(DIR_IMAGE)), 'href' => $this->url->link('common/filemanager', 'token=' . $this->session->data['token'] . '&directory=' . urlencode(utf8_substr($image, utf8_strlen(DIR_IMAGE . 'catalog/'))) . $url, true) - ]; + ); } elseif (is_file($image)) { - $data['images'][] = [ + $data['images'][] = array( 'thumb' => $this->model_tool_image->resize(utf8_substr($image, utf8_strlen(DIR_IMAGE)), 100, 100), 'name' => $name, 'type' => 'image', 'path' => utf8_substr($image, utf8_strlen(DIR_IMAGE)), 'href' => HTTP_CATALOG . 'image/' . utf8_substr($image, utf8_strlen(DIR_IMAGE)) - ]; + ); } } @@ -224,13 +224,13 @@ public function upload() { if (!empty($this->request->files['file']['name']) && is_array($this->request->files['file']['name'])) { foreach (array_keys($this->request->files['file']['name']) as $key) { - $files[] = [ + $files[] = array( 'name' => $this->request->files['file']['name'][$key], 'type' => $this->request->files['file']['type'][$key], 'tmp_name' => $this->request->files['file']['tmp_name'][$key], 'error' => $this->request->files['file']['error'][$key], 'size' => $this->request->files['file']['size'][$key] - ]; + ); } } @@ -245,7 +245,7 @@ public function upload() { } // Allowed file extension types - $allowed = [ + $allowed = array( 'ico', 'jpg', 'jpeg', @@ -254,14 +254,14 @@ public function upload() { 'svg', 'svgz', 'webp' - ]; + ); if (!in_array(utf8_strtolower(utf8_substr(strrchr($filename, '.'), 1)), $allowed)) { $json['error'] = $this->language->get('error_filetype'); } // Allowed file mime types - $allowed = [ + $allowed = array( 'image/x-icon', 'image/jpeg', 'image/pjpeg', @@ -271,7 +271,7 @@ public function upload() { 'image/svg+xml', 'image/svg+xml-compressed', 'image/webp' - ]; + ); if (!in_array($file['type'], $allowed)) { $json['error'] = $this->language->get('error_filetype'); @@ -392,7 +392,7 @@ public function delete() { $files = array(); // Make path into an array - $path = [$path]; + $path = array($path); // While the path array is still populated keep looping through while (count($path) != 0) { @@ -417,7 +417,7 @@ public function delete() { if (is_file($file)) { unlink($file); - // If directory use the remove directory function + // If directory use the remove directory function } elseif (is_dir($file)) { rmdir($file); } diff --git a/upload/admin/controller/common/footer.php b/upload/admin/controller/common/footer.php index 1e4b00e0..2b16f8ca 100644 --- a/upload/admin/controller/common/footer.php +++ b/upload/admin/controller/common/footer.php @@ -1,6 +1,6 @@ load->language('common/footer'); $data['text_footer'] = $this->language->get('text_footer'); diff --git a/upload/admin/controller/common/forgotten.php b/upload/admin/controller/common/forgotten.php index ecc1e57e..9c2e74fa 100644 --- a/upload/admin/controller/common/forgotten.php +++ b/upload/admin/controller/common/forgotten.php @@ -70,15 +70,15 @@ public function index() { $data['breadcrumbs'] = array(); - $data['breadcrumbs'][] = [ + $data['breadcrumbs'][] = array( 'text' => $this->language->get('text_home'), 'href' => $this->url->link('common/dashboard', '', true) - ]; + ); - $data['breadcrumbs'][] = [ + $data['breadcrumbs'][] = array( 'text' => $this->language->get('heading_title'), 'href' => $this->url->link('common/forgotten', 'token=' . '', true) - ]; + ); $data['action'] = $this->url->link('common/forgotten', '', true); diff --git a/upload/admin/controller/common/header.php b/upload/admin/controller/common/header.php index f1f782a2..cb404bda 100644 --- a/upload/admin/controller/common/header.php +++ b/upload/admin/controller/common/header.php @@ -1,6 +1,6 @@ document->getTitle(); $data['base'] = HTTP_SERVER; @@ -40,7 +40,7 @@ public function index(): string { if (!isset($this->request->get['token']) || !isset($this->session->data['token']) || ($this->request->get['token'] != $this->session->data['token'])) { $data['logged'] = ''; - $data['home'] = $this->url->link('common/dashboard', '', true); + $data['home'] = $this->url->link('common/login', '', true); } else { $data['logged'] = true; @@ -74,17 +74,17 @@ public function index(): string { $this->load->model('sale/order'); // Processing Orders - $data['processing_status_total'] = $this->model_sale_order->getTotalOrders(['filter_order_status' => implode(',', $this->config->get('config_processing_status'))]); + $data['processing_status_total'] = $this->model_sale_order->getTotalOrders(array('filter_order_status' => implode(',', $this->config->get('config_processing_status')))); $data['processing_status'] = $this->url->link('sale/order', 'token=' . $this->session->data['token'] . '&filter_order_status=' . implode(',', $this->config->get('config_processing_status')), true); // Complete Orders - $data['complete_status_total'] = $this->model_sale_order->getTotalOrders(['filter_order_status' => implode(',', $this->config->get('config_complete_status'))]); + $data['complete_status_total'] = $this->model_sale_order->getTotalOrders(array('filter_order_status' => implode(',', $this->config->get('config_complete_status')))); $data['complete_status'] = $this->url->link('sale/order', 'token=' . $this->session->data['token'] . '&filter_order_status=' . implode(',', $this->config->get('config_complete_status')), true); // Returns $this->load->model('sale/return'); - $return_total = $this->model_sale_return->getTotalReturns(['filter_return_status_id' => $this->config->get('config_return_status_id')]); + $return_total = $this->model_sale_return->getTotalReturns(array('filter_return_status_id' => $this->config->get('config_return_status_id'))); $data['return_total'] = $return_total; @@ -99,7 +99,7 @@ public function index(): string { $this->load->model('customer/customer'); - $customer_total = $this->model_customer_customer->getTotalCustomers(['filter_approved' => false]); + $customer_total = $this->model_customer_customer->getTotalCustomers(array('filter_approved' => false)); $data['customer_total'] = $customer_total; $data['customer_approval'] = $this->url->link('customer/customer', 'token=' . $this->session->data['token'] . '&filter_approved=0', true); @@ -107,7 +107,7 @@ public function index(): string { // Products $this->load->model('catalog/product'); - $product_total = $this->model_catalog_product->getTotalProducts(['filter_quantity' => 0]); + $product_total = $this->model_catalog_product->getTotalProducts(array('filter_quantity' => 0)); $data['product_total'] = $product_total; @@ -116,7 +116,7 @@ public function index(): string { // Reviews $this->load->model('catalog/review'); - $review_total = $this->model_catalog_review->getTotalReviews(['filter_status' => 0]); + $review_total = $this->model_catalog_review->getTotalReviews(array('filter_status' => 0)); $data['review_total'] = $review_total; @@ -125,7 +125,7 @@ public function index(): string { // Affiliate $this->load->model('marketing/affiliate'); - $affiliate_total = $this->model_marketing_affiliate->getTotalAffiliates(['filter_approved' => false]); + $affiliate_total = $this->model_marketing_affiliate->getTotalAffiliates(array('filter_approved' => false)); $data['affiliate_total'] = $affiliate_total; $data['affiliate_approval'] = $this->url->link('marketing/affiliate', 'token=' . $this->session->data['token'] . '&filter_approved=1', true); @@ -135,20 +135,20 @@ public function index(): string { // Online Stores $data['stores'] = array(); - $data['stores'][] = [ + $data['stores'][] = array( 'name' => $this->config->get('config_name'), 'href' => HTTP_CATALOG - ]; + ); $this->load->model('setting/store'); $results = $this->model_setting_store->getStores(); foreach ($results as $result) { - $data['stores'][] = [ + $data['stores'][] = array( 'name' => $result['name'], 'href' => $result['url'] - ]; + ); } } diff --git a/upload/admin/controller/common/reset.php b/upload/admin/controller/common/reset.php index 91470f47..ef06d212 100644 --- a/upload/admin/controller/common/reset.php +++ b/upload/admin/controller/common/reset.php @@ -2,7 +2,7 @@ class ControllerCommonReset extends Controller { private $error = array(); - public function index(): ?object { + public function index() { if ($this->user->isLogged() && isset($this->request->get['token']) && ($this->request->get['token'] == $this->session->data['token'])) { $this->response->redirect($this->url->link('common/dashboard', '', true)); } @@ -48,15 +48,15 @@ public function index(): ?object { $data['breadcrumbs'] = array(); - $data['breadcrumbs'][] = [ + $data['breadcrumbs'][] = array( 'text' => $this->language->get('text_home'), 'href' => $this->url->link('common/dashboard', '', true) - ]; + ); - $data['breadcrumbs'][] = [ + $data['breadcrumbs'][] = array( 'text' => $this->language->get('heading_title'), 'href' => $this->url->link('common/reset', '', true) - ]; + ); if (isset($this->error['password'])) { $data['error_password'] = $this->error['password']; diff --git a/upload/admin/controller/common/security.php b/upload/admin/controller/common/security.php index 612bd842..9ff184c7 100644 --- a/upload/admin/controller/common/security.php +++ b/upload/admin/controller/common/security.php @@ -1,6 +1,6 @@ load->language('common/security'); $data['heading_title'] = $this->language->get('heading_title'); diff --git a/upload/admin/controller/customer/custom_field.php b/upload/admin/controller/customer/custom_field.php index 41e3408c..7a00bbc2 100644 --- a/upload/admin/controller/customer/custom_field.php +++ b/upload/admin/controller/customer/custom_field.php @@ -145,27 +145,27 @@ protected function getList() { $data['breadcrumbs'] = array(); - $data['breadcrumbs'][] = [ + $data['breadcrumbs'][] = array( 'text' => $this->language->get('text_home'), 'href' => $this->url->link('common/dashboard', 'token=' . $this->session->data['token'], true) - ]; + ); - $data['breadcrumbs'][] = [ + $data['breadcrumbs'][] = array( 'text' => $this->language->get('heading_title'), 'href' => $this->url->link('customer/custom_field', 'token=' . $this->session->data['token'] . $url, true) - ]; + ); $data['add'] = $this->url->link('customer/custom_field/add', 'token=' . $this->session->data['token'] . $url, true); $data['delete'] = $this->url->link('customer/custom_field/delete', 'token=' . $this->session->data['token'] . $url, true); $data['custom_fields'] = array(); - $filter_data = [ + $filter_data = array( 'sort' => $sort, 'order' => $order, 'start' => ($page - 1) * $this->config->get('config_limit_admin'), 'limit' => $this->config->get('config_limit_admin') - ]; + ); $custom_field_total = $this->model_customer_custom_field->getTotalCustomFields(); @@ -207,7 +207,7 @@ protected function getList() { break; } - $data['custom_fields'][] = [ + $data['custom_fields'][] = array( 'custom_field_id' => $result['custom_field_id'], 'name' => $result['name'], 'location' => $this->language->get('text_' . $result['location']), @@ -215,7 +215,7 @@ protected function getList() { 'status' => $result['status'], 'sort_order' => $result['sort_order'], 'edit' => $this->url->link('customer/custom_field/edit', 'token=' . $this->session->data['token'] . '&custom_field_id=' . $result['custom_field_id'] . $url, true) - ]; + ); } $data['heading_title'] = $this->language->get('heading_title'); @@ -377,15 +377,15 @@ protected function getForm() { $data['breadcrumbs'] = array(); - $data['breadcrumbs'][] = [ + $data['breadcrumbs'][] = array( 'text' => $this->language->get('text_home'), 'href' => $this->url->link('common/dashboard', 'token=' . $this->session->data['token'], true) - ]; + ); - $data['breadcrumbs'][] = [ + $data['breadcrumbs'][] = array( 'text' => $this->language->get('heading_title'), 'href' => $this->url->link('customer/custom_field', 'token=' . $this->session->data['token'] . $url, true) - ]; + ); if (!isset($this->request->get['custom_field_id'])) { $data['action'] = $this->url->link('customer/custom_field/add', 'token=' . $this->session->data['token'] . $url, true); @@ -472,11 +472,11 @@ protected function getForm() { $data['custom_field_values'] = array(); foreach ($custom_field_values as $custom_field_value) { - $data['custom_field_values'][] = [ + $data['custom_field_values'][] = array( 'custom_field_value_id' => $custom_field_value['custom_field_value_id'], 'custom_field_value_description' => $custom_field_value['custom_field_value_description'], 'sort_order' => $custom_field_value['sort_order'] - ]; + ); } if (isset($this->request->post['custom_field_customer_group'])) { diff --git a/upload/admin/controller/customer/customer.php b/upload/admin/controller/customer/customer.php index 072dae88..584965be 100644 --- a/upload/admin/controller/customer/customer.php +++ b/upload/admin/controller/customer/customer.php @@ -427,22 +427,22 @@ protected function getList() { $data['breadcrumbs'] = array(); - $data['breadcrumbs'][] = [ + $data['breadcrumbs'][] = array( 'text' => $this->language->get('text_home'), 'href' => $this->url->link('common/dashboard', 'token=' . $this->session->data['token'], true) - ]; + ); - $data['breadcrumbs'][] = [ + $data['breadcrumbs'][] = array( 'text' => $this->language->get('heading_title'), 'href' => $this->url->link('customer/customer', 'token=' . $this->session->data['token'] . $url, true) - ]; + ); $data['add'] = $this->url->link('customer/customer/add', 'token=' . $this->session->data['token'] . $url, true); $data['delete'] = $this->url->link('customer/customer/delete', 'token=' . $this->session->data['token'] . $url, true); $data['customers'] = array(); - $filter_data = [ + $filter_data = array( 'filter_name' => $filter_name, 'filter_email' => $filter_email, 'filter_customer_group_id' => $filter_customer_group_id, @@ -454,7 +454,7 @@ protected function getList() { 'order' => $order, 'start' => ($page - 1) * $this->config->get('config_limit_admin'), 'limit' => $this->config->get('config_limit_admin') - ]; + ); $customer_total = $this->model_customer_customer->getTotalCustomers($filter_data); @@ -475,7 +475,7 @@ protected function getList() { $unlock = ''; } - $data['customers'][] = [ + $data['customers'][] = array( 'customer_id' => $result['customer_id'], 'name' => $result['name'], 'email' => $result['email'], @@ -486,7 +486,7 @@ protected function getList() { 'approve' => $approve, 'unlock' => $unlock, 'edit' => $this->url->link('customer/customer/edit', 'token=' . $this->session->data['token'] . '&customer_id=' . $result['customer_id'] . $url, true) - ]; + ); } $data['heading_title'] = $this->language->get('heading_title'); @@ -832,15 +832,15 @@ protected function getForm() { $data['breadcrumbs'] = array(); - $data['breadcrumbs'][] = [ + $data['breadcrumbs'][] = array( 'text' => $this->language->get('text_home'), 'href' => $this->url->link('common/dashboard', 'token=' . $this->session->data['token'], true) - ]; + ); - $data['breadcrumbs'][] = [ + $data['breadcrumbs'][] = array( 'text' => $this->language->get('heading_title'), 'href' => $this->url->link('customer/customer', 'token=' . $this->session->data['token'] . $url, true) - ]; + ); if (!isset($this->request->get['customer_id'])) { $data['action'] = $this->url->link('customer/customer/add', 'token=' . $this->session->data['token'] . $url, true); @@ -911,15 +911,15 @@ protected function getForm() { $data['custom_fields'] = array(); - $filter_data = [ + $filter_data = array( 'sort' => 'cf.sort_order', 'order' => 'ASC' - ]; + ); $custom_fields = $this->model_customer_custom_field->getCustomFields($filter_data); foreach ($custom_fields as $custom_field) { - $data['custom_fields'][] = [ + $data['custom_fields'][] = array( 'custom_field_id' => $custom_field['custom_field_id'], 'custom_field_value' => $this->model_customer_custom_field->getCustomFieldValues($custom_field['custom_field_id']), 'name' => $custom_field['name'], @@ -927,7 +927,7 @@ protected function getForm() { 'type' => $custom_field['type'], 'location' => $custom_field['location'], 'sort_order' => $custom_field['sort_order'] - ]; + ); } if (isset($this->request->post['custom_field'])) { @@ -1140,7 +1140,7 @@ protected function validateUnlock() { return !$this->error; } - public function login(): ?object { + public function login() { if (isset($this->request->get['customer_id'])) { $customer_id = (int)$this->request->get['customer_id']; } else { @@ -1200,10 +1200,10 @@ public function history() { $results = $this->model_customer_customer->getHistories($this->request->get['customer_id'], ($page - 1) * 10, 10); foreach ($results as $result) { - $data['histories'][] = [ + $data['histories'][] = array( 'comment' => $result['comment'], 'date_added' => date($this->language->get('date_format_short'), strtotime($result['date_added'])) - ]; + ); } $history_total = $this->model_customer_customer->getTotalHistories($this->request->get['customer_id']); @@ -1263,11 +1263,11 @@ public function transaction() { $results = $this->model_customer_customer->getTransactions($this->request->get['customer_id'], ($page - 1) * 10, 10); foreach ($results as $result) { - $data['transactions'][] = [ + $data['transactions'][] = array( 'amount' => $this->currency->format($result['amount'], $this->config->get('config_currency')), 'description' => $result['description'], 'date_added' => date($this->language->get('date_format_short'), strtotime($result['date_added'])) - ]; + ); } $data['balance'] = $this->currency->format($this->model_customer_customer->getTransactionTotal($this->request->get['customer_id']), $this->config->get('config_currency')); @@ -1329,11 +1329,11 @@ public function reward() { $results = $this->model_customer_customer->getRewards($this->request->get['customer_id'], ($page - 1) * 10, 10); foreach ($results as $result) { - $data['rewards'][] = [ + $data['rewards'][] = array( 'points' => $result['points'], 'description' => $result['description'], 'date_added' => date($this->language->get('date_format_short'), strtotime($result['date_added'])) - ]; + ); } $data['balance'] = $this->model_customer_customer->getRewardTotal($this->request->get['customer_id']); @@ -1394,12 +1394,12 @@ public function ip() { $results = $this->model_customer_customer->getIps($this->request->get['customer_id'], ($page - 1) * 10, 10); foreach ($results as $result) { - $data['ips'][] = [ + $data['ips'][] = array( 'ip' => $result['ip'], 'total' => $this->model_customer_customer->getTotalCustomersByIp($result['ip']), 'date_added' => date('d/m/y', strtotime($result['date_added'])), 'filter_ip' => $this->url->link('customer/customer', 'token=' . $this->session->data['token'] . '&filter_ip=' . $result['ip'], true) - ]; + ); } $ip_total = $this->model_customer_customer->getTotalIps($this->request->get['customer_id']); @@ -1435,17 +1435,17 @@ public function autocomplete() { $this->load->model('customer/customer'); - $filter_data = [ + $filter_data = array( 'filter_name' => $filter_name, 'filter_email' => $filter_email, 'start' => 0, 'limit' => 5 - ]; + ); $results = $this->model_customer_customer->getCustomers($filter_data); foreach ($results as $result) { - $json[] = [ + $json[] = array( 'customer_id' => $result['customer_id'], 'customer_group_id' => $result['customer_group_id'], 'name' => strip_tags(html_entity_decode($result['name'], ENT_QUOTES, 'UTF-8')), @@ -1457,7 +1457,7 @@ public function autocomplete() { 'fax' => $result['fax'], 'custom_field' => json_decode($result['custom_field'], true), 'address' => $this->model_customer_customer->getAddresses($result['customer_id']) - ]; + ); } } @@ -1488,10 +1488,10 @@ public function customfield() { $custom_fields = $this->model_customer_custom_field->getCustomFields(['filter_customer_group_id' => $customer_group_id]); foreach ($custom_fields as $custom_field) { - $json[] = [ + $json[] = array( 'custom_field_id' => $custom_field['custom_field_id'], 'required' => empty($custom_field['required']) || $custom_field['required'] == 0 ? false : true - ]; + ); } $this->response->addHeader('Content-Type: application/json'); diff --git a/upload/admin/controller/customer/customer_group.php b/upload/admin/controller/customer/customer_group.php index 234591c6..8386c883 100644 --- a/upload/admin/controller/customer/customer_group.php +++ b/upload/admin/controller/customer/customer_group.php @@ -145,39 +145,39 @@ protected function getList() { $data['breadcrumbs'] = array(); - $data['breadcrumbs'][] = [ + $data['breadcrumbs'][] = array( 'text' => $this->language->get('text_home'), 'href' => $this->url->link('common/dashboard', 'token=' . $this->session->data['token'], true) - ]; + ); - $data['breadcrumbs'][] = [ + $data['breadcrumbs'][] = array( 'text' => $this->language->get('heading_title'), 'href' => $this->url->link('customer/customer_group', 'token=' . $this->session->data['token'] . $url, true) - ]; + ); $data['add'] = $this->url->link('customer/customer_group/add', 'token=' . $this->session->data['token'] . $url, true); $data['delete'] = $this->url->link('customer/customer_group/delete', 'token=' . $this->session->data['token'] . $url, true); $data['customer_groups'] = array(); - $filter_data = [ + $filter_data = array( 'sort' => $sort, 'order' => $order, 'start' => ($page - 1) * $this->config->get('config_limit_admin'), 'limit' => $this->config->get('config_limit_admin') - ]; + ); $customer_group_total = $this->model_customer_customer_group->getTotalCustomerGroups(); $results = $this->model_customer_customer_group->getCustomerGroups($filter_data); foreach ($results as $result) { - $data['customer_groups'][] = [ + $data['customer_groups'][] = array( 'customer_group_id' => $result['customer_group_id'], 'name' => $result['name'] . (($result['customer_group_id'] == $this->config->get('config_customer_group_id')) ? $this->language->get('text_default') : null), 'sort_order' => $result['sort_order'], 'edit' => $this->url->link('customer/customer_group/edit', 'token=' . $this->session->data['token'] . '&customer_group_id=' . $result['customer_group_id'] . $url, true) - ]; + ); } $data['heading_title'] = $this->language->get('heading_title'); @@ -304,15 +304,15 @@ protected function getForm() { $data['breadcrumbs'] = array(); - $data['breadcrumbs'][] = [ + $data['breadcrumbs'][] = array( 'text' => $this->language->get('text_home'), 'href' => $this->url->link('common/dashboard', 'token=' . $this->session->data['token'], true) - ]; + ); - $data['breadcrumbs'][] = [ + $data['breadcrumbs'][] = array( 'text' => $this->language->get('heading_title'), 'href' => $this->url->link('customer/customer_group', 'token=' . $this->session->data['token'] . $url, true) - ]; + ); if (!isset($this->request->get['customer_group_id'])) { $data['action'] = $this->url->link('customer/customer_group/add', 'token=' . $this->session->data['token'] . $url, true); diff --git a/upload/admin/controller/design/banner.php b/upload/admin/controller/design/banner.php index 7d55473e..b750c3c5 100644 --- a/upload/admin/controller/design/banner.php +++ b/upload/admin/controller/design/banner.php @@ -145,39 +145,39 @@ protected function getList() { $data['breadcrumbs'] = array(); - $data['breadcrumbs'][] = [ + $data['breadcrumbs'][] = array( 'text' => $this->language->get('text_home'), 'href' => $this->url->link('common/dashboard', 'token=' . $this->session->data['token'], true) - ]; + ); - $data['breadcrumbs'][] = [ + $data['breadcrumbs'][] = array( 'text' => $this->language->get('heading_title'), 'href' => $this->url->link('design/banner', 'token=' . $this->session->data['token'] . $url, true) - ]; + ); $data['add'] = $this->url->link('design/banner/add', 'token=' . $this->session->data['token'] . $url, true); $data['delete'] = $this->url->link('design/banner/delete', 'token=' . $this->session->data['token'] . $url, true); $data['banners'] = array(); - $filter_data = [ + $filter_data = array( 'sort' => $sort, 'order' => $order, 'start' => ($page - 1) * $this->config->get('config_limit_admin'), 'limit' => $this->config->get('config_limit_admin') - ]; + ); $banner_total = $this->model_design_banner->getTotalBanners(); $results = $this->model_design_banner->getBanners($filter_data); foreach ($results as $result) { - $data['banners'][] = [ + $data['banners'][] = array( 'banner_id' => $result['banner_id'], 'name' => $result['name'], 'status' => ($result['status'] ? $this->language->get('text_enabled') : $this->language->get('text_disabled')), 'edit' => $this->url->link('design/banner/edit', 'token=' . $this->session->data['token'] . '&banner_id=' . $result['banner_id'] . $url, true) - ]; + ); } $data['heading_title'] = $this->language->get('heading_title'); @@ -313,15 +313,15 @@ protected function getForm() { $data['breadcrumbs'] = array(); - $data['breadcrumbs'][] = [ + $data['breadcrumbs'][] = array( 'text' => $this->language->get('text_home'), 'href' => $this->url->link('common/dashboard', 'token=' . $this->session->data['token'], true) - ]; + ); - $data['breadcrumbs'][] = [ + $data['breadcrumbs'][] = array( 'text' => $this->language->get('heading_title'), 'href' => $this->url->link('design/banner', 'token=' . $this->session->data['token'] . $url, true) - ]; + ); if (!isset($this->request->get['banner_id'])) { $data['action'] = $this->url->link('design/banner/add', 'token=' . $this->session->data['token'] . $url, true); @@ -379,13 +379,13 @@ protected function getForm() { $thumb = 'no_image.png'; } - $data['banner_images'][$key][] = [ + $data['banner_images'][$key][] = array( 'title' => $banner_image['title'], 'link' => $banner_image['link'], 'image' => $image, 'thumb' => $this->model_tool_image->resize($thumb, 100, 100), 'sort_order' => $banner_image['sort_order'] - ]; + ); } } diff --git a/upload/admin/controller/design/layout.php b/upload/admin/controller/design/layout.php index 5f8d6e1e..8fe10708 100644 --- a/upload/admin/controller/design/layout.php +++ b/upload/admin/controller/design/layout.php @@ -145,38 +145,38 @@ protected function getList() { $data['breadcrumbs'] = array(); - $data['breadcrumbs'][] = [ + $data['breadcrumbs'][] = array( 'text' => $this->language->get('text_home'), 'href' => $this->url->link('common/dashboard', 'token=' . $this->session->data['token'], true) - ]; + ); - $data['breadcrumbs'][] = [ + $data['breadcrumbs'][] = array( 'text' => $this->language->get('heading_title'), 'href' => $this->url->link('design/layout', 'token=' . $this->session->data['token'] . $url, true) - ]; + ); $data['add'] = $this->url->link('design/layout/add', 'token=' . $this->session->data['token'] . $url, true); $data['delete'] = $this->url->link('design/layout/delete', 'token=' . $this->session->data['token'] . $url, true); $data['layouts'] = array(); - $filter_data = [ + $filter_data = array( 'sort' => $sort, 'order' => $order, 'start' => ($page - 1) * $this->config->get('config_limit_admin'), 'limit' => $this->config->get('config_limit_admin') - ]; + ); $layout_total = $this->model_design_layout->getTotalLayouts(); $results = $this->model_design_layout->getLayouts($filter_data); foreach ($results as $result) { - $data['layouts'][] = [ + $data['layouts'][] = array( 'layout_id' => $result['layout_id'], 'name' => $result['name'], 'edit' => $this->url->link('design/layout/edit', 'token=' . $this->session->data['token'] . '&layout_id=' . $result['layout_id'] . $url, true) - ]; + ); } $data['heading_title'] = $this->language->get('heading_title'); @@ -310,15 +310,15 @@ protected function getForm() { $data['breadcrumbs'] = array(); - $data['breadcrumbs'][] = [ + $data['breadcrumbs'][] = array( 'text' => $this->language->get('text_home'), 'href' => $this->url->link('common/dashboard', 'token=' . $this->session->data['token'], true) - ]; + ); - $data['breadcrumbs'][] = [ + $data['breadcrumbs'][] = array( 'text' => $this->language->get('heading_title'), 'href' => $this->url->link('design/layout', 'token=' . $this->session->data['token'] . $url, true) - ]; + ); if (!isset($this->request->get['layout_id'])) { $data['action'] = $this->url->link('design/layout/add', 'token=' . $this->session->data['token'] . $url, true); @@ -372,18 +372,18 @@ protected function getForm() { $modules = $this->model_extension_module->getModulesByCode($code); foreach ($modules as $module) { - $module_data[] = [ + $module_data[] = array( 'name' => strip_tags($module['name']), 'code' => $code . '.' . $module['module_id'] - ]; + ); } if ($this->config->has($code . '_status') || $module_data) { - $data['extensions'][] = [ + $data['extensions'][] = array( 'name' => strip_tags($this->language->get('heading_title')), 'code' => $code, 'module' => $module_data - ]; + ); } } @@ -405,24 +405,24 @@ protected function getForm() { $this->load->language('extension/module/' . $part[0]); if (!isset($part[1])) { - $data['layout_modules'][] = [ + $data['layout_modules'][] = array( 'name' => strip_tags($this->language->get('heading_title')), 'code' => $layout_module['code'], 'edit' => $this->url->link('extension/module/' . $part[0], 'token=' . $this->session->data['token'], true), 'position' => $layout_module['position'], 'sort_order' => $layout_module['sort_order'] - ]; + ); } else { $module_info = $this->model_extension_module->getModule($part[1]); if ($module_info) { - $data['layout_modules'][] = [ + $data['layout_modules'][] = array( 'name' => strip_tags($module_info['name']), 'code' => $layout_module['code'], 'edit' => $this->url->link('extension/module/' . $part[0], 'token=' . $this->session->data['token'] . '&module_id=' . $part[1], true), 'position' => $layout_module['position'], 'sort_order' => $layout_module['sort_order'] - ]; + ); } } } diff --git a/upload/admin/controller/design/seo_url.php b/upload/admin/controller/design/seo_url.php index f0f08899..e2910209 100644 --- a/upload/admin/controller/design/seo_url.php +++ b/upload/admin/controller/design/seo_url.php @@ -189,41 +189,41 @@ protected function getList() { $data['breadcrumbs'] = array(); - $data['breadcrumbs'][] = [ + $data['breadcrumbs'][] = array( 'text' => $this->language->get('text_home'), 'href' => $this->url->link('common/dashboard', 'token=' . $this->session->data['token'], true) - ]; + ); - $data['breadcrumbs'][] = [ + $data['breadcrumbs'][] = array( 'text' => $this->language->get('heading_title'), 'href' => $this->url->link('design/seo_url', 'token=' . $this->session->data['token'] . $url, true) - ]; + ); $data['add'] = $this->url->link('design/seo_url/add', 'token=' . $this->session->data['token'] . $url, true); $data['delete'] = $this->url->link('design/seo_url/delete', 'token=' . $this->session->data['token'] . $url, true); $data['seo_urls'] = array(); - $filter_data = [ + $filter_data = array( 'filter_query' => $filter_query, 'filter_keyword' => $filter_keyword, 'sort' => $sort, 'order' => $order, 'start' => ($page - 1) * $this->config->get('config_limit_admin'), 'limit' => $this->config->get('config_limit_admin') - ]; + ); $seo_url_total = $this->model_design_seo_url->getTotalSeoUrls($filter_data); $results = $this->model_design_seo_url->getSeoUrls($filter_data); foreach ($results as $result) { - $data['seo_urls'][] = [ + $data['seo_urls'][] = array( 'url_alias_id' => $result['url_alias_id'], 'query' => $result['query'], 'keyword' => $result['keyword'], 'edit' => $this->url->link('design/seo_url/edit', 'token=' . $this->session->data['token'] . '&url_alias_id=' . $result['url_alias_id'] . $url, true) - ]; + ); } $data['heading_title'] = $this->language->get('heading_title'); @@ -375,15 +375,15 @@ protected function getForm() { $data['breadcrumbs'] = array(); - $data['breadcrumbs'][] = [ + $data['breadcrumbs'][] = array( 'text' => $this->language->get('text_home'), 'href' => $this->url->link('common/dashboard', 'token=' . $this->session->data['token'], true) - ]; + ); - $data['breadcrumbs'][] = [ + $data['breadcrumbs'][] = array( 'text' => $this->language->get('heading_title'), 'href' => $this->url->link('design/seo_url', 'token=' . $this->session->data['token'] . $url, true) - ]; + ); if (!isset($this->request->get['url_alias_id'])) { $data['action'] = $this->url->link('design/seo_url/add', 'token=' . $this->session->data['token'] . $url, true); diff --git a/upload/admin/controller/error/not_found.php b/upload/admin/controller/error/not_found.php index 9a1a9ab8..111f236f 100644 --- a/upload/admin/controller/error/not_found.php +++ b/upload/admin/controller/error/not_found.php @@ -11,15 +11,15 @@ public function index() { $data['breadcrumbs'] = array(); - $data['breadcrumbs'][] = [ + $data['breadcrumbs'][] = array( 'text' => $this->language->get('text_home'), 'href' => $this->url->link('common/dashboard', 'token=' . $this->session->data['token'], true) - ]; + ); - $data['breadcrumbs'][] = [ + $data['breadcrumbs'][] = array( 'text' => $this->language->get('heading_title'), 'href' => $this->url->link('error/not_found', 'token=' . $this->session->data['token'], true) - ]; + ); $data['header'] = $this->load->controller('common/header'); $data['column_left'] = $this->load->controller('common/column_left'); diff --git a/upload/admin/controller/error/permission.php b/upload/admin/controller/error/permission.php index b6337cd2..aec64dde 100644 --- a/upload/admin/controller/error/permission.php +++ b/upload/admin/controller/error/permission.php @@ -11,15 +11,15 @@ public function index() { $data['breadcrumbs'] = array(); - $data['breadcrumbs'][] = [ + $data['breadcrumbs'][] = array( 'text' => $this->language->get('text_home'), 'href' => $this->url->link('common/dashboard', 'token=' . $this->session->data['token'], true) - ]; + ); - $data['breadcrumbs'][] = [ + $data['breadcrumbs'][] = array( 'text' => $this->language->get('heading_title'), 'href' => $this->url->link($this->request->get['route'], 'token=' . $this->session->data['token'], true) - ]; + ); $data['header'] = $this->load->controller('common/header'); $data['column_left'] = $this->load->controller('common/column_left'); diff --git a/upload/admin/controller/event/compatibility.php b/upload/admin/controller/event/compatibility.php index b7c5a962..97a008ca 100644 --- a/upload/admin/controller/event/compatibility.php +++ b/upload/admin/controller/event/compatibility.php @@ -1,7 +1,7 @@ $this->language->get('text_home'), 'href' => $this->url->link('common/dashboard', 'token=' . $this->session->data['token'], true) - ]; + ); - $data['breadcrumbs'][] = [ + $data['breadcrumbs'][] = array( 'text' => $this->language->get('text_extension'), 'href' => $this->url->link('extension/extension', 'token=' . $this->session->data['token'] . '&type=analytics', true) - ]; + ); - $data['breadcrumbs'][] = [ + $data['breadcrumbs'][] = array( 'text' => $this->language->get('heading_title'), 'href' => $this->url->link('extension/analytics/google_analytics', 'token=' . $this->session->data['token'] . '&store_id=' . $this->request->get['store_id'], true) - ]; + ); $data['action'] = $this->url->link('extension/analytics/google_analytics', 'token=' . $this->session->data['token'] . '&store_id=' . $this->request->get['store_id'], true); diff --git a/upload/admin/controller/extension/captcha/basic_captcha.php b/upload/admin/controller/extension/captcha/basic_captcha.php index 6498885d..b198db74 100644 --- a/upload/admin/controller/extension/captcha/basic_captcha.php +++ b/upload/admin/controller/extension/captcha/basic_captcha.php @@ -36,20 +36,20 @@ public function index() { $data['breadcrumbs'] = array(); - $data['breadcrumbs'][] = [ + $data['breadcrumbs'][] = array( 'text' => $this->language->get('text_home'), 'href' => $this->url->link('common/dashboard', 'token=' . $this->session->data['token'], true) - ]; + ); - $data['breadcrumbs'][] = [ + $data['breadcrumbs'][] = array( 'text' => $this->language->get('text_extension'), 'href' => $this->url->link('extension/extension', 'token=' . $this->session->data['token'] . '&type=captcha', true) - ]; + ); - $data['breadcrumbs'][] = [ + $data['breadcrumbs'][] = array( 'text' => $this->language->get('heading_title'), 'href' => $this->url->link('extension/captcha/basic_captcha', 'token=' . $this->session->data['token'], true) - ]; + ); $data['action'] = $this->url->link('extension/captcha/basic_captcha', 'token=' . $this->session->data['token'], true); diff --git a/upload/admin/controller/extension/captcha/google_captcha.php b/upload/admin/controller/extension/captcha/google_captcha.php index 43205aa9..a55f2cff 100644 --- a/upload/admin/controller/extension/captcha/google_captcha.php +++ b/upload/admin/controller/extension/captcha/google_captcha.php @@ -51,20 +51,20 @@ public function index() { $data['breadcrumbs'] = array(); - $data['breadcrumbs'][] = [ + $data['breadcrumbs'][] = array( 'text' => $this->language->get('text_home'), 'href' => $this->url->link('common/dashboard', 'token=' . $this->session->data['token'], true) - ]; + ); - $data['breadcrumbs'][] = [ + $data['breadcrumbs'][] = array( 'text' => $this->language->get('text_extension'), 'href' => $this->url->link('extension/extension', 'token=' . $this->session->data['token'] . '&type=captcha', true) - ]; + ); - $data['breadcrumbs'][] = [ + $data['breadcrumbs'][] = array( 'text' => $this->language->get('heading_title'), 'href' => $this->url->link('extension/captcha/google_captcha', 'token=' . $this->session->data['token'], true) - ]; + ); $data['action'] = $this->url->link('extension/captcha/google_captcha', 'token=' . $this->session->data['token'], true); diff --git a/upload/admin/controller/extension/dashboard/activity.php b/upload/admin/controller/extension/dashboard/activity.php index 9f31e307..9a9c0ebd 100644 --- a/upload/admin/controller/extension/dashboard/activity.php +++ b/upload/admin/controller/extension/dashboard/activity.php @@ -38,20 +38,20 @@ public function index() { $data['breadcrumbs'] = array(); - $data['breadcrumbs'][] = [ + $data['breadcrumbs'][] = array( 'text' => $this->language->get('text_home'), 'href' => $this->url->link('common/dashboard', 'token=' . $this->session->data['token'], true) - ]; + ); - $data['breadcrumbs'][] = [ + $data['breadcrumbs'][] = array( 'text' => $this->language->get('text_extension'), 'href' => $this->url->link('extension/extension', 'token=' . $this->session->data['token'] . '&type=dashboard', true) - ]; + ); - $data['breadcrumbs'][] = [ + $data['breadcrumbs'][] = array( 'text' => $this->language->get('heading_title'), 'href' => $this->url->link('extension/dashboard/activity', 'token=' . $this->session->data['token'], true) - ]; + ); $data['action'] = $this->url->link('extension/dashboard/activity', 'token=' . $this->session->data['token'], true); @@ -96,7 +96,7 @@ protected function validate() { return !$this->error; } - public function dashboard(): string { + public function dashboard() { $this->load->language('extension/dashboard/activity'); $data['heading_title'] = $this->language->get('heading_title'); @@ -114,24 +114,24 @@ public function dashboard(): string { foreach ($results as $result) { $comment = vsprintf($this->language->get('text_' . $result['key']), json_decode($result['data'], true)); - $find = [ + $find = array( 'customer_id=', 'order_id=', 'affiliate_id=', 'return_id=' - ]; + ); - $replace = [ + $replace = array( $this->url->link('customer/customer/edit', 'token=' . $this->session->data['token'] . '&customer_id=', true), $this->url->link('sale/order/info', 'token=' . $this->session->data['token'] . '&order_id=', true), $this->url->link('marketing/affiliate/edit', 'token=' . $this->session->data['token'] . '&affiliate_id=', true), $this->url->link('sale/return/edit', 'token=' . $this->session->data['token'] . '&return_id=', true) - ]; + ); - $data['activities'][] = [ + $data['activities'][] = array( 'comment' => str_replace($find, $replace, $comment), 'date_added' => date($this->language->get('datetime_format'), strtotime($result['date_added'])) - ]; + ); } return $this->load->view('extension/dashboard/activity_info', $data); diff --git a/upload/admin/controller/extension/dashboard/chart.php b/upload/admin/controller/extension/dashboard/chart.php index 6e914e41..0b4fca65 100644 --- a/upload/admin/controller/extension/dashboard/chart.php +++ b/upload/admin/controller/extension/dashboard/chart.php @@ -38,20 +38,20 @@ public function index() { $data['breadcrumbs'] = array(); - $data['breadcrumbs'][] = [ + $data['breadcrumbs'][] = array( 'text' => $this->language->get('text_home'), 'href' => $this->url->link('common/dashboard', 'token=' . $this->session->data['token'], true) - ]; + ); - $data['breadcrumbs'][] = [ + $data['breadcrumbs'][] = array( 'text' => $this->language->get('text_extension'), 'href' => $this->url->link('extension/extension', 'token=' . $this->session->data['token'] . '&type=dashboard', true) - ]; + ); - $data['breadcrumbs'][] = [ + $data['breadcrumbs'][] = array( 'text' => $this->language->get('heading_title'), 'href' => $this->url->link('extension/dashboard/chart', 'token=' . $this->session->data['token'], true) - ]; + ); $data['action'] = $this->url->link('extension/dashboard/chart', 'token=' . $this->session->data['token'], true); @@ -96,7 +96,7 @@ protected function validate() { return !$this->error; } - public function dashboard(): string { + public function dashboard() { $this->load->language('extension/dashboard/chart'); $data['heading_title'] = $this->language->get('heading_title'); @@ -141,30 +141,30 @@ public function chart() { $results = $this->model_report_sale->getTotalOrdersByDay(); foreach ($results as $key => $value) { - $json['order']['data'][] = [$key, $value['total']]; + $json['order']['data'][] = array($key, $value['total']); } $results = $this->model_report_customer->getTotalCustomersByDay(); foreach ($results as $key => $value) { - $json['customer']['data'][] = [$key, $value['total']]; + $json['customer']['data'][] = array($key, $value['total']); } for ($i = 0; $i < 24; $i++) { - $json['xaxis'][] = [$i, $i]; + $json['xaxis'][] = array($i, $i); } break; case 'week': $results = $this->model_report_sale->getTotalOrdersByWeek(); foreach ($results as $key => $value) { - $json['order']['data'][] = [$key, $value['total']]; + $json['order']['data'][] = array($key, $value['total']); } $results = $this->model_report_customer->getTotalCustomersByWeek(); foreach ($results as $key => $value) { - $json['customer']['data'][] = [$key, $value['total']]; + $json['customer']['data'][] = array($key, $value['total']); } $date_start = strtotime('-' . date('w') . ' days'); @@ -172,43 +172,43 @@ public function chart() { for ($i = 0; $i < 7; $i++) { $date = date('Y-m-d', $date_start + ($i * 86400)); - $json['xaxis'][] = [date('w', strtotime($date)), date('D', strtotime($date))]; + $json['xaxis'][] = array(date('w', strtotime($date)), date('D', strtotime($date))); } break; case 'month': $results = $this->model_report_sale->getTotalOrdersByMonth(); foreach ($results as $key => $value) { - $json['order']['data'][] = [$key, $value['total']]; + $json['order']['data'][] = array($key, $value['total']); } $results = $this->model_report_customer->getTotalCustomersByMonth(); foreach ($results as $key => $value) { - $json['customer']['data'][] = [$key, $value['total']]; + $json['customer']['data'][] = array($key, $value['total']); } for ($i = 1; $i <= date('t'); $i++) { $date = date('Y') . '-' . date('m') . '-' . $i; - $json['xaxis'][] = [date('j', strtotime($date)), date('d', strtotime($date))]; + $json['xaxis'][] = array(date('j', strtotime($date)), date('d', strtotime($date))); } break; case 'year': $results = $this->model_report_sale->getTotalOrdersByYear(); foreach ($results as $key => $value) { - $json['order']['data'][] = [$key, $value['total']]; + $json['order']['data'][] = array($key, $value['total']); } $results = $this->model_report_customer->getTotalCustomersByYear(); foreach ($results as $key => $value) { - $json['customer']['data'][] = [$key, $value['total']]; + $json['customer']['data'][] = array($key, $value['total']); } for ($i = 1; $i <= 12; $i++) { - $json['xaxis'][] = [$i, date('M', mktime(0, 0, 0, $i))]; + $json['xaxis'][] = array($i, date('M', mktime(0, 0, 0, $i))); } break; } diff --git a/upload/admin/controller/extension/dashboard/customer.php b/upload/admin/controller/extension/dashboard/customer.php index 4123a2f8..aa5f7841 100644 --- a/upload/admin/controller/extension/dashboard/customer.php +++ b/upload/admin/controller/extension/dashboard/customer.php @@ -96,7 +96,7 @@ protected function validate() { return !$this->error; } - public function dashboard(): string { + public function dashboard() { $this->load->language('extension/dashboard/customer'); $data['heading_title'] = $this->language->get('heading_title'); diff --git a/upload/admin/controller/extension/dashboard/map.php b/upload/admin/controller/extension/dashboard/map.php index 237b8192..d0373eed 100644 --- a/upload/admin/controller/extension/dashboard/map.php +++ b/upload/admin/controller/extension/dashboard/map.php @@ -96,7 +96,7 @@ protected function validate() { return !$this->error; } - public function dashboard(): string { + public function dashboard() { $this->load->language('extension/dashboard/map'); $data['heading_title'] = $this->language->get('heading_title'); diff --git a/upload/admin/controller/extension/dashboard/online.php b/upload/admin/controller/extension/dashboard/online.php index 2994b07b..f8f40f0e 100644 --- a/upload/admin/controller/extension/dashboard/online.php +++ b/upload/admin/controller/extension/dashboard/online.php @@ -96,7 +96,7 @@ protected function validate() { return !$this->error; } - public function dashboard(): string { + public function dashboard() { $this->load->language('extension/dashboard/online'); $data['heading_title'] = $this->language->get('heading_title'); diff --git a/upload/admin/controller/extension/dashboard/order.php b/upload/admin/controller/extension/dashboard/order.php index 57388da3..03ffc919 100644 --- a/upload/admin/controller/extension/dashboard/order.php +++ b/upload/admin/controller/extension/dashboard/order.php @@ -96,7 +96,7 @@ protected function validate() { return !$this->error; } - public function dashboard(): string { + public function dashboard() { $this->load->language('extension/dashboard/order'); $data['heading_title'] = $this->language->get('heading_title'); diff --git a/upload/admin/controller/extension/dashboard/recent.php b/upload/admin/controller/extension/dashboard/recent.php index 9a953339..dd93a37f 100644 --- a/upload/admin/controller/extension/dashboard/recent.php +++ b/upload/admin/controller/extension/dashboard/recent.php @@ -96,7 +96,7 @@ protected function validate() { return !$this->error; } - public function dashboard(): string { + public function dashboard() { $this->load->language('extension/dashboard/recent'); $data['heading_title'] = $this->language->get('heading_title'); diff --git a/upload/admin/controller/extension/dashboard/sale.php b/upload/admin/controller/extension/dashboard/sale.php index 5c0bb9a8..f9740d0a 100644 --- a/upload/admin/controller/extension/dashboard/sale.php +++ b/upload/admin/controller/extension/dashboard/sale.php @@ -96,7 +96,7 @@ protected function validate() { return !$this->error; } - public function dashboard(): string { + public function dashboard() { $this->load->language('extension/dashboard/sale'); $data['heading_title'] = $this->language->get('heading_title'); diff --git a/upload/admin/controller/extension/event.php b/upload/admin/controller/extension/event.php index 640fe7c3..0b053010 100644 --- a/upload/admin/controller/extension/event.php +++ b/upload/admin/controller/extension/event.php @@ -111,31 +111,31 @@ public function getList() { $data['breadcrumbs'] = array(); - $data['breadcrumbs'][] = [ + $data['breadcrumbs'][] = array( 'text' => $this->language->get('text_home'), 'href' => $this->url->link('common/dashboard', 'token=' . $this->session->data['token'], true) - ]; + ); - $data['breadcrumbs'][] = [ + $data['breadcrumbs'][] = array( 'text' => $this->language->get('heading_title'), 'href' => $this->url->link('extension/event', 'token=' . $this->session->data['token'] . $url, true) - ]; + ); $data['events'] = array(); - $filter_data = [ + $filter_data = array( 'sort' => $sort, 'order' => $order, 'start' => ($page - 1) * $this->config->get('config_limit_admin'), 'limit' => $this->config->get('config_limit_admin') - ]; + ); $event_total = $this->model_extension_event->getTotalEvents(); $results = $this->model_extension_event->getEvents($filter_data); foreach ($results as $result) { - $data['events'][] = [ + $data['events'][] = array( 'event_id' => $result['event_id'], 'code' => $result['code'], 'trigger' => $result['trigger'], @@ -145,7 +145,7 @@ public function getList() { 'enable' => $this->url->link('extension/event/enable', 'token=' . $this->session->data['token'] . '&event_id=' . $result['event_id'], true), 'disable' => $this->url->link('extension/event/disable', 'token=' . $this->session->data['token'] . '&event_id=' . $result['event_id'], true), 'enabled' => $result['status'] - ]; + ); } $data['heading_title'] = $this->language->get('heading_title'); diff --git a/upload/admin/controller/extension/extension.php b/upload/admin/controller/extension/extension.php index b7f0c3c0..722cd4f6 100644 --- a/upload/admin/controller/extension/extension.php +++ b/upload/admin/controller/extension/extension.php @@ -9,15 +9,15 @@ public function index() { $data['breadcrumbs'] = array(); - $data['breadcrumbs'][] = [ + $data['breadcrumbs'][] = array( 'text' => $this->language->get('text_home'), 'href' => $this->url->link('common/dashboard', 'token=' . $this->session->data['token'], true) - ]; + ); - $data['breadcrumbs'][] = [ + $data['breadcrumbs'][] = array( 'text' => $this->language->get('heading_title'), 'href' => $this->url->link('extension/extension', 'token=' . $this->session->data['token'], true) - ]; + ); $data['heading_title'] = $this->language->get('heading_title'); @@ -48,11 +48,11 @@ public function index() { if ($this->user->hasPermission('access', 'extension/extension/' . $extension)) { $files = glob(DIR_APPLICATION . 'controller/{extension/' . $extension . ',' . $extension . '}/*.php', GLOB_BRACE); - $data['categories'][] = [ + $data['categories'][] = array( 'code' => $extension, 'text' => $this->language->get('heading_title') . ' (' . count($files) . ')', 'href' => $this->url->link('extension/extension/' . $extension, 'token=' . $this->session->data['token'], true) - ]; + ); } } diff --git a/upload/admin/controller/extension/fraud/fraudlabspro.php b/upload/admin/controller/extension/fraud/fraudlabspro.php index c101ca2f..f3dcd0d5 100644 --- a/upload/admin/controller/extension/fraud/fraudlabspro.php +++ b/upload/admin/controller/extension/fraud/fraudlabspro.php @@ -161,7 +161,7 @@ protected function validate() { return !$this->error; } - public function order(): string { + public function order() { $this->load->language('extension/fraud/fraudlabspro'); $this->load->model('extension/fraud/fraudlabspro'); diff --git a/upload/admin/controller/extension/fraud/maxmind.php b/upload/admin/controller/extension/fraud/maxmind.php index 606de76c..52245707 100644 --- a/upload/admin/controller/extension/fraud/maxmind.php +++ b/upload/admin/controller/extension/fraud/maxmind.php @@ -129,7 +129,7 @@ protected function validate() { return !$this->error; } - public function order(): string { + public function order() { $this->load->language('extension/fraud/maxmind'); $this->load->model('extension/fraud/maxmind'); diff --git a/upload/admin/controller/extension/installer.php b/upload/admin/controller/extension/installer.php index 9bff46be..2e739d08 100644 --- a/upload/admin/controller/extension/installer.php +++ b/upload/admin/controller/extension/installer.php @@ -7,15 +7,15 @@ public function index() { $data['breadcrumbs'] = array(); - $data['breadcrumbs'][] = [ + $data['breadcrumbs'][] = array( 'text' => $this->language->get('text_home'), 'href' => $this->url->link('common/dashboard', 'token=' . $this->session->data['token'], true) - ]; + ); - $data['breadcrumbs'][] = [ + $data['breadcrumbs'][] = array( 'text' => $this->language->get('heading_title'), 'href' => $this->url->link('extension/installer', 'token=' . $this->session->data['token'], true) - ]; + ); $data['heading_title'] = $this->language->get('heading_title'); @@ -92,18 +92,18 @@ public function upload() { move_uploaded_file($this->request->files['file']['tmp_name'], $file); if (file_exists($file)) { - $json['step'][] = [ + $json['step'][] = array( 'text' => $this->language->get('text_xml'), 'url' => str_replace('&', '&', $this->url->link('extension/installer/xml', 'token=' . $this->session->data['token'], true)), 'path' => $path - ]; + ); // Clear temporary files - $json['step'][] = [ + $json['step'][] = array( 'text' => $this->language->get('text_remove'), 'url' => str_replace('&', '&', $this->url->link('extension/installer/remove', 'token=' . $this->session->data['token'], true)), 'path' => $path - ]; + ); } else { $json['error'] = $this->language->get('error_file'); } @@ -126,18 +126,18 @@ public function upload() { if ($zip->open($file, $flag)) { // Zip - $json['step'][] = [ + $json['step'][] = array( 'text' => $this->language->get('text_unzip'), 'url' => str_replace('&', '&', $this->url->link('extension/installer/unzip', 'token=' . $this->session->data['token'], true)), 'path' => $path - ]; + ); // FTP - $json['step'][] = [ + $json['step'][] = array( 'text' => $this->language->get('text_ftp'), 'url' => str_replace('&', '&', $this->url->link('extension/installer/no_ftp', 'token=' . $this->session->data['token'], true)), 'path' => $path - ]; + ); // Send make and array of actions to carry out for ($i = 0; $i < $zip->numFiles; $i++) { @@ -145,29 +145,29 @@ public function upload() { // SQL if (substr($zip_name, 0, 11) == 'install.sql') { - $json['step'][] = [ + $json['step'][] = array( 'text' => $this->language->get('text_sql'), 'url' => str_replace('&', '&', $this->url->link('extension/installer/sql', 'token=' . $this->session->data['token'], true)), 'path' => $path - ]; + ); } // XML if (substr($zip_name, 0, 11) == 'install.xml') { - $json['step'][] = [ + $json['step'][] = array( 'text' => $this->language->get('text_xml'), 'url' => str_replace('&', '&', $this->url->link('extension/installer/xml', 'token=' . $this->session->data['token'], true)), 'path' => $path - ]; + ); } // PHP if (substr($zip_name, 0, 11) == 'install.php') { - $json['step'][] = [ + $json['step'][] = array( 'text' => $this->language->get('text_php'), 'url' => str_replace('&', '&', $this->url->link('extension/installer/php', 'token=' . $this->session->data['token'], true)), 'path' => $path - ]; + ); } // Compare admin files @@ -200,11 +200,11 @@ public function upload() { } // Clear temporary files - $json['step'][] = [ + $json['step'][] = array( 'text' => $this->language->get('text_remove'), 'url' => str_replace('&', '&', $this->url->link('extension/installer/remove', 'token=' . $this->session->data['token'], true)), 'path' => $path - ]; + ); $zip->close(); } else { @@ -445,7 +445,7 @@ public function xml() { $link = ''; } - $modification_data = [ + $modification_data = array( 'name' => $name, 'code' => $code, 'author' => $author, @@ -453,7 +453,7 @@ public function xml() { 'link' => $link, 'xml' => $xml, 'status' => 1 - ]; + ); if (!$json) { $this->model_extension_modification->addModification($modification_data); diff --git a/upload/admin/controller/extension/modification.php b/upload/admin/controller/extension/modification.php index 6442c3cf..d60b69b6 100644 --- a/upload/admin/controller/extension/modification.php +++ b/upload/admin/controller/extension/modification.php @@ -51,7 +51,7 @@ public function delete() { $this->getList(); } - public function refresh(array $data = []) { + public function refresh($data = array()) { $this->load->language('extension/modification'); $this->document->setTitle($this->language->get('heading_title')); @@ -73,7 +73,7 @@ public function refresh(array $data = []) { $files = array(); // Make path into an array - $path = [DIR_MODIFICATION . '*']; + $path = array(DIR_MODIFICATION . '*'); // While the path array is still populated keep looping through while (count($path) != 0) { @@ -100,7 +100,7 @@ public function refresh(array $data = []) { if (is_file($file)) { unlink($file); - // If directory use the remove directory function + // If directory use the remove directory function } elseif (is_dir($file)) { rmdir($file); } @@ -158,7 +158,7 @@ public function refresh(array $data = []) { foreach ($files as $file) { $operations = $file->getElementsByTagName('operation'); - $files = explode('|', $file->getAttribute('path')); + $files = explode('|', str_replace("\\", '/', $file->getAttribute('path'))); foreach ($files as $file) { $path = ''; @@ -298,11 +298,11 @@ public function refresh(array $data = []) { $new_lines = explode("\n", $add); if ($offset < 0) { - array_splice($lines, $line_id + $offset, abs($offset) + 1, [str_replace($search, $add, $line)]); + array_splice($lines, $line_id + $offset, abs($offset) + 1, array(str_replace($search, $add, $line))); $line_id -= $offset; } else { - array_splice($lines, $line_id, $offset + 1, [str_replace($search, $add, $line)]); + array_splice($lines, $line_id, $offset + 1, array(str_replace($search, $add, $line))); } break; @@ -461,7 +461,7 @@ public function clear() { $files = array(); // Make path into an array - $path = [DIR_MODIFICATION . '*']; + $path = array(DIR_MODIFICATION . '*'); // While the path array is still populated keep looping through while (count($path) != 0) { @@ -650,15 +650,15 @@ protected function getList() { $data['breadcrumbs'] = array(); - $data['breadcrumbs'][] = [ + $data['breadcrumbs'][] = array( 'text' => $this->language->get('text_home'), 'href' => $this->url->link('common/dashboard', 'token=' . $this->session->data['token'], true) - ]; + ); - $data['breadcrumbs'][] = [ + $data['breadcrumbs'][] = array( 'text' => $this->language->get('heading_title'), 'href' => $this->url->link('extension/modification', 'token=' . $this->session->data['token'], true) - ]; + ); $data['refresh'] = $this->url->link('extension/modification/refresh', 'token=' . $this->session->data['token'] . $url, true); $data['clear'] = $this->url->link('extension/modification/clear', 'token=' . $this->session->data['token'] . $url, true); @@ -666,19 +666,19 @@ protected function getList() { $data['modifications'] = array(); - $filter_data = [ + $filter_data = array( 'sort' => $sort, 'order' => $order, 'start' => ($page - 1) * $this->config->get('config_limit_admin'), 'limit' => $this->config->get('config_limit_admin') - ]; + ); $modification_total = $this->model_extension_modification->getTotalModifications(); $results = $this->model_extension_modification->getModifications($filter_data); foreach ($results as $result) { - $data['modifications'][] = [ + $data['modifications'][] = array( 'modification_id' => $result['modification_id'], 'name' => $result['name'], 'author' => $result['author'], @@ -689,7 +689,7 @@ protected function getList() { 'enable' => $this->url->link('extension/modification/enable', 'token=' . $this->session->data['token'] . '&modification_id=' . $result['modification_id'], true), 'disable' => $this->url->link('extension/modification/disable', 'token=' . $this->session->data['token'] . '&modification_id=' . $result['modification_id'], true), 'enabled' => $result['status'] - ]; + ); } $data['heading_title'] = $this->language->get('heading_title'); diff --git a/upload/admin/controller/extension/payment/amazon_login_pay.php b/upload/admin/controller/extension/payment/amazon_login_pay.php index 2f03ba89..855836ca 100644 --- a/upload/admin/controller/extension/payment/amazon_login_pay.php +++ b/upload/admin/controller/extension/payment/amazon_login_pay.php @@ -392,7 +392,7 @@ public function uninstall() { $this->model_extension_event->deleteEvent('amazon_history_capture'); } - public function order(): string { + public function order() { if ($this->config->get('amazon_login_pay_status')) { $this->load->model('extension/payment/amazon_login_pay'); diff --git a/upload/admin/controller/extension/payment/bluepay_hosted.php b/upload/admin/controller/extension/payment/bluepay_hosted.php index 142d4227..a8fad69e 100644 --- a/upload/admin/controller/extension/payment/bluepay_hosted.php +++ b/upload/admin/controller/extension/payment/bluepay_hosted.php @@ -206,7 +206,7 @@ public function uninstall() { $this->model_extension_payment_bluepay_hosted->uninstall(); } - public function order(): string { + public function order() { if ($this->config->get('bluepay_hosted_status')) { $this->load->model('extension/payment/bluepay_hosted'); diff --git a/upload/admin/controller/extension/payment/bluepay_redirect.php b/upload/admin/controller/extension/payment/bluepay_redirect.php index 1f8456e1..7cb4d844 100644 --- a/upload/admin/controller/extension/payment/bluepay_redirect.php +++ b/upload/admin/controller/extension/payment/bluepay_redirect.php @@ -183,7 +183,7 @@ public function uninstall() { $this->model_extension_payment_bluepay_redirect->uninstall(); } - public function order(): string { + public function order() { if ($this->config->get('bluepay_redirect_status')) { $this->load->model('extension/payment/bluepay_redirect'); diff --git a/upload/admin/controller/extension/payment/cardconnect.php b/upload/admin/controller/extension/payment/cardconnect.php index 0b1aa45e..3735aafa 100644 --- a/upload/admin/controller/extension/payment/cardconnect.php +++ b/upload/admin/controller/extension/payment/cardconnect.php @@ -280,7 +280,7 @@ public function uninstall() { } } - public function order(): string { + public function order() { if ($this->config->get('cardconnect_status')) { $this->load->model('extension/payment/cardconnect'); diff --git a/upload/admin/controller/extension/payment/cardinity.php b/upload/admin/controller/extension/payment/cardinity.php index 0bcd0e48..5332cecf 100644 --- a/upload/admin/controller/extension/payment/cardinity.php +++ b/upload/admin/controller/extension/payment/cardinity.php @@ -143,7 +143,7 @@ public function index() { $this->response->setOutput($this->load->view('extension/payment/cardinity', $data)); } - public function order(): string { + public function order() { $this->load->language('extension/payment/cardinity'); $data['text_payment_info'] = $this->language->get('text_payment_info'); diff --git a/upload/admin/controller/extension/payment/eway.php b/upload/admin/controller/extension/payment/eway.php index b7289a90..ab96a383 100644 --- a/upload/admin/controller/extension/payment/eway.php +++ b/upload/admin/controller/extension/payment/eway.php @@ -227,7 +227,7 @@ public function action() { return $this->order(); } - public function order(): string { + public function order() { if ($this->config->get('eway_status')) { $this->load->model('extension/payment/eway'); diff --git a/upload/admin/controller/extension/payment/firstdata.php b/upload/admin/controller/extension/payment/firstdata.php index 4d7e5732..2cd3c6f2 100644 --- a/upload/admin/controller/extension/payment/firstdata.php +++ b/upload/admin/controller/extension/payment/firstdata.php @@ -254,7 +254,7 @@ public function uninstall() { $this->model_extension_payment_firstdata->uninstall(); } - public function order(): string { + public function order() { if ($this->config->get('firstdata_status')) { $this->load->model('extension/payment/firstdata'); diff --git a/upload/admin/controller/extension/payment/firstdata_remote.php b/upload/admin/controller/extension/payment/firstdata_remote.php index 15382dac..21373085 100644 --- a/upload/admin/controller/extension/payment/firstdata_remote.php +++ b/upload/admin/controller/extension/payment/firstdata_remote.php @@ -325,7 +325,7 @@ public function uninstall() { $this->model_extension_payment_firstdata_remote->uninstall(); } - public function order(): string { + public function order() { if ($this->config->get('firstdata_remote_status')) { $this->load->model('extension/payment/firstdata_remote'); diff --git a/upload/admin/controller/extension/payment/g2apay.php b/upload/admin/controller/extension/payment/g2apay.php index 11f13725..24ff69c3 100644 --- a/upload/admin/controller/extension/payment/g2apay.php +++ b/upload/admin/controller/extension/payment/g2apay.php @@ -234,7 +234,7 @@ public function index() { $this->response->setOutput($this->load->view('extension/payment/g2apay', $data)); } - public function order(): string { + public function order() { if ($this->config->get('g2apay_status')) { diff --git a/upload/admin/controller/extension/payment/globalpay.php b/upload/admin/controller/extension/payment/globalpay.php index 2898c658..fed5e779 100644 --- a/upload/admin/controller/extension/payment/globalpay.php +++ b/upload/admin/controller/extension/payment/globalpay.php @@ -294,7 +294,7 @@ public function install() { $this->model_extension_payment_globalpay->install(); } - public function order(): string { + public function order() { if ($this->config->get('globalpay_status')) { $this->load->model('extension/payment/globalpay'); diff --git a/upload/admin/controller/extension/payment/globalpay_remote.php b/upload/admin/controller/extension/payment/globalpay_remote.php index a49bd2ee..57d15a51 100644 --- a/upload/admin/controller/extension/payment/globalpay_remote.php +++ b/upload/admin/controller/extension/payment/globalpay_remote.php @@ -259,7 +259,7 @@ public function install() { $this->model_extension_payment_globalpay_remote->install(); } - public function order(): string { + public function order() { if ($this->config->get('globalpay_remote_status')) { $this->load->model('extension/payment/globalpay_remote'); diff --git a/upload/admin/controller/extension/payment/laybuy.php b/upload/admin/controller/extension/payment/laybuy.php index 8eab9ffb..7be461df 100644 --- a/upload/admin/controller/extension/payment/laybuy.php +++ b/upload/admin/controller/extension/payment/laybuy.php @@ -1217,7 +1217,7 @@ public function autocomplete() { $this->response->setOutput(json_encode($json)); } - public function order(): string { + public function order() { if ($this->config->get('laybuy_status')) { $this->load->language('extension/payment/laybuy'); diff --git a/upload/admin/controller/extension/payment/pilibaba.php b/upload/admin/controller/extension/payment/pilibaba.php index 12aee219..1145f097 100644 --- a/upload/admin/controller/extension/payment/pilibaba.php +++ b/upload/admin/controller/extension/payment/pilibaba.php @@ -282,7 +282,7 @@ public function register() { $this->response->setOutput(json_encode($json)); } - public function order(): string { + public function order() { if ($this->config->get('pilibaba_status')) { $this->load->model('extension/payment/pilibaba'); diff --git a/upload/admin/controller/extension/payment/realex.php b/upload/admin/controller/extension/payment/realex.php index 20a112c6..abcfa283 100644 --- a/upload/admin/controller/extension/payment/realex.php +++ b/upload/admin/controller/extension/payment/realex.php @@ -294,7 +294,7 @@ public function install() { $this->model_extension_payment_realex->install(); } - public function order(): string { + public function order() { if ($this->config->get('realex_status')) { $this->load->model('extension/payment/realex'); diff --git a/upload/admin/controller/extension/payment/realex_remote.php b/upload/admin/controller/extension/payment/realex_remote.php index 7790b55f..a62c979f 100644 --- a/upload/admin/controller/extension/payment/realex_remote.php +++ b/upload/admin/controller/extension/payment/realex_remote.php @@ -258,7 +258,7 @@ public function install() { $this->model_extension_payment_realex_remote->install(); } - public function order(): string { + public function order() { if ($this->config->get('realex_remote_status')) { $this->load->model('extension/payment/realex_remote'); diff --git a/upload/admin/controller/extension/payment/sagepay_direct.php b/upload/admin/controller/extension/payment/sagepay_direct.php index 74c5ff28..4f543738 100644 --- a/upload/admin/controller/extension/payment/sagepay_direct.php +++ b/upload/admin/controller/extension/payment/sagepay_direct.php @@ -193,7 +193,7 @@ public function uninstall() { $this->model_extension_payment_sagepay_direct->uninstall(); } - public function order(): string { + public function order() { if ($this->config->get('sagepay_direct_status')) { diff --git a/upload/admin/controller/extension/payment/sagepay_server.php b/upload/admin/controller/extension/payment/sagepay_server.php index 96e2a527..3912840b 100644 --- a/upload/admin/controller/extension/payment/sagepay_server.php +++ b/upload/admin/controller/extension/payment/sagepay_server.php @@ -194,7 +194,7 @@ public function uninstall() { $this->model_extension_payment_sagepay_server->uninstall(); } - public function order(): string { + public function order() { if ($this->config->get('sagepay_server_status')) { $this->load->model('extension/payment/sagepay_server'); diff --git a/upload/admin/controller/extension/payment/securetrading_pp.php b/upload/admin/controller/extension/payment/securetrading_pp.php index f5087ace..40f85a3e 100644 --- a/upload/admin/controller/extension/payment/securetrading_pp.php +++ b/upload/admin/controller/extension/payment/securetrading_pp.php @@ -307,7 +307,7 @@ public function uninstall() { $this->model_extension_payment_securetrading_pp->uninstall(); } - public function order(): string { + public function order() { if ($this->config->get('securetrading_pp_status')) { $this->load->model('extension/payment/securetrading_pp'); diff --git a/upload/admin/controller/extension/payment/securetrading_ws.php b/upload/admin/controller/extension/payment/securetrading_ws.php index 10e79f70..c6c32e4e 100644 --- a/upload/admin/controller/extension/payment/securetrading_ws.php +++ b/upload/admin/controller/extension/payment/securetrading_ws.php @@ -335,7 +335,7 @@ public function downloadTransactions() { exit(); } - public function showTransactions(): string { + public function showTransactions() { $this->load->model('extension/payment/securetrading_ws'); $this->load->language('extension/payment/securetrading_ws'); @@ -402,7 +402,7 @@ public function showTransactions(): string { return $this->load->view('extension/payment/securetrading_ws_transactions', $data); } - public function order(): string { + public function order() { if ($this->config->get('securetrading_ws_status')) { $this->load->model('extension/payment/securetrading_ws'); diff --git a/upload/admin/controller/extension/payment/worldpay.php b/upload/admin/controller/extension/payment/worldpay.php index f232249e..2f3b5120 100644 --- a/upload/admin/controller/extension/payment/worldpay.php +++ b/upload/admin/controller/extension/payment/worldpay.php @@ -255,7 +255,7 @@ public function uninstall() { $this->model_extension_payment_worldpay->uninstall(); } - public function order(): string { + public function order() { if ($this->config->get('worldpay_status')) { diff --git a/upload/admin/controller/sale/order.php b/upload/admin/controller/sale/order.php index 660b4249..967f4771 100644 --- a/upload/admin/controller/sale/order.php +++ b/upload/admin/controller/sale/order.php @@ -837,7 +837,7 @@ public function getForm() { $this->response->setOutput($this->load->view('sale/order_form', $data)); } - public function info(): ?object { + public function info() { $this->load->model('sale/order'); if (isset($this->request->get['order_id'])) { diff --git a/upload/admin/controller/sale/recurring.php b/upload/admin/controller/sale/recurring.php index e1ae57fe..c0850586 100644 --- a/upload/admin/controller/sale/recurring.php +++ b/upload/admin/controller/sale/recurring.php @@ -315,7 +315,7 @@ protected function getList() { $this->response->setOutput($this->load->view('sale/recurring_list', $data)); } - public function info(): ?object { + public function info() { $this->load->model('sale/recurring'); if (isset($this->request->get['order_recurring_id'])) { diff --git a/upload/admin/model/catalog/attribute.php b/upload/admin/model/catalog/attribute.php index bb340a4f..e0dfb289 100644 --- a/upload/admin/model/catalog/attribute.php +++ b/upload/admin/model/catalog/attribute.php @@ -1,6 +1,6 @@ db->query("INSERT INTO `" . DB_PREFIX . "attribute` SET `attribute_group_id` = '" . (int)$data['attribute_group_id'] . "', `sort_order` = '" . (int)$data['sort_order'] . "'"); $attribute_id = $this->db->getLastId(); @@ -12,7 +12,7 @@ public function addAttribute(array $data): int { return $attribute_id; } - public function editAttribute(int $attribute_id, array $data): void { + public function editAttribute($attribute_id, $data) { $this->db->query("UPDATE `" . DB_PREFIX . "attribute` SET `attribute_group_id` = '" . (int)$data['attribute_group_id'] . "', `sort_order` = '" . (int)$data['sort_order'] . "' WHERE `attribute_id` = '" . (int)$attribute_id . "'"); $this->db->query("DELETE FROM `" . DB_PREFIX . "attribute_description` WHERE `attribute_id` = '" . (int)$attribute_id . "'"); @@ -22,22 +22,22 @@ public function editAttribute(int $attribute_id, array $data): void { } } - public function deleteAttribute(int $attribute_id): void { + public function deleteAttribute($attribute_id) { $this->db->query("DELETE FROM `" . DB_PREFIX . "attribute` WHERE `attribute_id` = '" . (int)$attribute_id . "'"); $this->db->query("DELETE FROM `" . DB_PREFIX . "attribute_description` WHERE `attribute_id` = '" . (int)$attribute_id . "'"); } - public function getAttribute(int $attribute_id): array { + public function getAttribute($attribute_id) { $query = $this->db->query("SELECT * FROM `" . DB_PREFIX . "attribute` a LEFT JOIN `" . DB_PREFIX . "attribute_description` ad ON (a.`attribute_id` = ad.`attribute_id`) WHERE a.`attribute_id` = '" . (int)$attribute_id . "' AND ad.`language_id` = '" . (int)$this->config->get('config_language_id') . "'"); return $query->row; } - public function getAttributes(array $data = []): array { + public function getAttributes($data = array()) { $sql = "SELECT *, (SELECT agd.`name` FROM `" . DB_PREFIX . "attribute_group_description` agd WHERE agd.`attribute_group_id` = a.`attribute_group_id` AND agd.`language_id` = '" . (int)$this->config->get('config_language_id') . "') AS attribute_group FROM `" . DB_PREFIX . "attribute` a LEFT JOIN `" . DB_PREFIX . "attribute_description` ad ON (a.`attribute_id` = ad.`attribute_id`) WHERE ad.`language_id` = '" . (int)$this->config->get('config_language_id') . "'"; if (!empty($data['filter_name'])) { - $sql .= " AND ad.`name` LIKE '" . $this->db->escape((string)$data['filter_name']) . "%'"; + $sql .= " AND ad.`name` LIKE '" . $this->db->escape($data['filter_name']) . "%'"; } if (!empty($data['filter_attribute_group_id'])) { @@ -79,7 +79,7 @@ public function getAttributes(array $data = []): array { return $query->rows; } - public function getAttributeDescriptions(int $attribute_id): array { + public function getAttributeDescriptions($attribute_id) { $attribute_data = []; $query = $this->db->query("SELECT * FROM `" . DB_PREFIX . "attribute_description` WHERE `attribute_id` = '" . (int)$attribute_id . "'"); @@ -91,13 +91,13 @@ public function getAttributeDescriptions(int $attribute_id): array { return $attribute_data; } - public function getTotalAttributes(): int { + public function getTotalAttributes() { $query = $this->db->query("SELECT COUNT(*) AS `total` FROM `" . DB_PREFIX . "attribute`"); return (int)$query->row['total']; } - public function getTotalAttributesByAttributeGroupId(int $attribute_group_id): int { + public function getTotalAttributesByAttributeGroupId($attribute_group_id) { $query = $this->db->query("SELECT COUNT(*) AS `total` FROM `" . DB_PREFIX . "attribute` WHERE `attribute_group_id` = '" . (int)$attribute_group_id . "'"); return (int)$query->row['total']; diff --git a/upload/admin/model/catalog/attribute_group.php b/upload/admin/model/catalog/attribute_group.php index 902dc108..c58772eb 100644 --- a/upload/admin/model/catalog/attribute_group.php +++ b/upload/admin/model/catalog/attribute_group.php @@ -1,6 +1,6 @@ db->query("INSERT INTO `" . DB_PREFIX . "attribute_group` SET `sort_order` = '" . (int)$data['sort_order'] . "'"); $attribute_group_id = $this->db->getLastId(); @@ -12,7 +12,7 @@ public function addAttributeGroup(array $data): int { return $attribute_group_id; } - public function editAttributeGroup(int $attribute_group_id, array $data): void { + public function editAttributeGroup(int $attribute_group_id, array $data) { $this->db->query("UPDATE `" . DB_PREFIX . "attribute_group` SET `sort_order` = '" . (int)$data['sort_order'] . "' WHERE `attribute_group_id` = '" . (int)$attribute_group_id . "'"); $this->db->query("DELETE FROM `" . DB_PREFIX . "attribute_group_description` WHERE `attribute_group_id` = '" . (int)$attribute_group_id . "'"); @@ -22,18 +22,18 @@ public function editAttributeGroup(int $attribute_group_id, array $data): void { } } - public function deleteAttributeGroup(int $attribute_group_id): void { + public function deleteAttributeGroup(int $attribute_group_id) { $this->db->query("DELETE FROM `" . DB_PREFIX . "attribute_group` WHERE `attribute_group_id` = '" . (int)$attribute_group_id . "'"); $this->db->query("DELETE FROM `" . DB_PREFIX . "attribute_group_description` WHERE `attribute_group_id` = '" . (int)$attribute_group_id . "'"); } - public function getAttributeGroup(int $attribute_group_id): array { + public function getAttributeGroup(int $attribute_group_id) { $query = $this->db->query("SELECT * FROM `" . DB_PREFIX . "attribute_group` WHERE `attribute_group_id` = '" . (int)$attribute_group_id . "'"); return $query->row; } - public function getAttributeGroups(array $data = []): array { + public function getAttributeGroups(array $data = []) { $sql = "SELECT * FROM `" . DB_PREFIX . "attribute_group` ag LEFT JOIN `" . DB_PREFIX . "attribute_group_description` agd ON (ag.attribute_group_id = agd.attribute_group_id) WHERE agd.language_id = '" . (int)$this->config->get('config_language_id') . "'"; $sort_data = [ @@ -70,7 +70,7 @@ public function getAttributeGroups(array $data = []): array { return $query->rows; } - public function getAttributeGroupDescriptions(int $attribute_group_id): array { + public function getAttributeGroupDescriptions(int $attribute_group_id) { $attribute_group_data = []; $query = $this->db->query("SELECT * FROM `" . DB_PREFIX . "attribute_group_description` WHERE `attribute_group_id` = '" . (int)$attribute_group_id . "'"); @@ -82,7 +82,7 @@ public function getAttributeGroupDescriptions(int $attribute_group_id): array { return $attribute_group_data; } - public function getTotalAttributeGroups(): int { + public function getTotalAttributeGroups() { $query = $this->db->query("SELECT COUNT(*) AS `total` FROM `" . DB_PREFIX . "attribute_group`"); return (int)$query->row['total']; diff --git a/upload/admin/model/catalog/category.php b/upload/admin/model/catalog/category.php index 1d51f0c3..be7da5df 100644 --- a/upload/admin/model/catalog/category.php +++ b/upload/admin/model/catalog/category.php @@ -1,6 +1,6 @@ db->query("INSERT INTO `" . DB_PREFIX . "category` SET `parent_id` = '" . (int)$data['parent_id'] . "', `top` = '" . (isset($data['top']) ? (int)$data['top'] : 0) . "', `column` = '" . (int)$data['column'] . "', `sort_order` = '" . (int)$data['sort_order'] . "', `status` = '" . (bool)$data['status'] . "', `date_modified` = NOW(), `date_added` = NOW()"); $category_id = $this->db->getLastId(); @@ -54,7 +54,7 @@ public function addCategory(array $data): int { return $category_id; } - public function editCategory(int $category_id, array $data): void { + public function editCategory(int $category_id, array $data) { $this->db->query("UPDATE `" . DB_PREFIX . "category` SET `parent_id` = '" . (int)$data['parent_id'] . "', `top` = '" . (isset($data['top']) ? (int)$data['top'] : 0) . "', `column` = '" . (int)$data['column'] . "', `sort_order` = '" . (int)$data['sort_order'] . "', `status` = '" . (bool)$data['status'] . "', `date_modified` = NOW() WHERE `category_id` = '" . (int)$category_id . "'"); if (isset($data['image'])) { @@ -151,7 +151,7 @@ public function editCategory(int $category_id, array $data): void { $this->cache->delete('category'); } - public function deleteCategory(int $category_id): void { + public function deleteCategory(int $category_id) { $this->db->query("DELETE FROM `" . DB_PREFIX . "category_path` WHERE `category_id` = '" . (int)$category_id . "'"); $query = $this->db->query("SELECT * FROM `" . DB_PREFIX . "category_path` WHERE `path_id` = '" . (int)$category_id . "'"); @@ -172,7 +172,7 @@ public function deleteCategory(int $category_id): void { $this->cache->delete('category'); } - public function repairCategories(int $parent_id = 0): void { + public function repairCategories(int $parent_id = 0) { $query = $this->db->query("SELECT * FROM `" . DB_PREFIX . "category` WHERE `parent_id` = '" . (int)$parent_id . "'"); foreach ($query->rows as $category) { @@ -196,13 +196,13 @@ public function repairCategories(int $parent_id = 0): void { } } - public function getCategory(int $category_id): array { + public function getCategory(int $category_id) { $query = $this->db->query("SELECT DISTINCT *, (SELECT GROUP_CONCAT(cd1.`name` ORDER BY level SEPARATOR '  >  ') FROM `" . DB_PREFIX . "category_path` cp LEFT JOIN `" . DB_PREFIX . "category_description` cd1 ON (cp.`path_id` = cd1.`category_id` AND cp.`category_id` != cp.`path_id`) WHERE cp.`category_id` = c.`category_id` AND cd1.`language_id` = '" . (int)$this->config->get('config_language_id') . "' GROUP BY cp.`category_id`) AS path, (SELECT DISTINCT keyword FROM `" . DB_PREFIX . "url_alias` WHERE `query` = 'category_id=" . (int)$category_id . "') AS keyword FROM `" . DB_PREFIX . "category` c LEFT JOIN `" . DB_PREFIX . "category_description` cd2 ON (c.`category_id` = cd2.`category_id`) WHERE c.`category_id` = '" . (int)$category_id . "' AND cd2.`language_id` = '" . (int)$this->config->get('config_language_id') . "'"); return $query->row; } - public function getCategories(array $data = []): array { + public function getCategories(array $data = []) { $sql = "SELECT cp.`category_id` AS `category_id`, GROUP_CONCAT(cd1.`name` ORDER BY cp.`level` SEPARATOR '  >  ') AS name, c1.`parent_id`, c1.`sort_order` FROM `" . DB_PREFIX . "category_path` cp LEFT JOIN `" . DB_PREFIX . "category` c1 ON (cp.`category_id` = c1.`category_id`) LEFT JOIN `" . DB_PREFIX . "category` c2 ON (cp.`path_id` = c2.`category_id`) LEFT JOIN `" . DB_PREFIX . "category_description` cd1 ON (cp.`path_id` = cd1.`category_id`) LEFT JOIN `" . DB_PREFIX . "category_description` cd2 ON (cp.`category_id` = cd2.`category_id`) WHERE cd1.`language_id` = '" . (int)$this->config->get('config_language_id') . "' AND cd2.`language_id` = '" . (int)$this->config->get('config_language_id') . "'"; //if (!empty($data['filter_name'])) { @@ -274,7 +274,7 @@ public function getCategories(array $data = []): array { return $query->rows; } - public function getCategoryDescriptions(int $category_id): array { + public function getCategoryDescriptions(int $category_id) { $category_description_data = []; $query = $this->db->query("SELECT * FROM `" . DB_PREFIX . "category_description` WHERE `category_id` = '" . (int)$category_id . "'"); @@ -292,13 +292,13 @@ public function getCategoryDescriptions(int $category_id): array { return $category_description_data; } - public function getCategoryPath(int $category_id): array { + public function getCategoryPath(int $category_id) { $query = $this->db->query("SELECT `category_id`, `path_id`, `level` FROM `" . DB_PREFIX . "category_path` WHERE `category_id` = '" . (int)$category_id . "'"); return $query->rows; } - public function getCategoryFilters(int $category_id): array { + public function getCategoryFilters(int $category_id) { $category_filter_data = []; $query = $this->db->query("SELECT * FROM `" . DB_PREFIX . "category_filter` WHERE `category_id` = '" . (int)$category_id . "'"); @@ -310,7 +310,7 @@ public function getCategoryFilters(int $category_id): array { return $category_filter_data; } - public function getCategoryStores(int $category_id): array { + public function getCategoryStores(int $category_id) { $category_store_data = []; $query = $this->db->query("SELECT * FROM `" . DB_PREFIX . "category_to_store` WHERE `category_id` = '" . (int)$category_id . "'"); @@ -322,7 +322,7 @@ public function getCategoryStores(int $category_id): array { return $category_store_data; } - public function getCategoryLayouts(int $category_id): array { + public function getCategoryLayouts(int $category_id) { $category_layout_data = []; $query = $this->db->query("SELECT * FROM `" . DB_PREFIX . "category_to_layout` WHERE `category_id` = '" . (int)$category_id . "'"); @@ -334,7 +334,7 @@ public function getCategoryLayouts(int $category_id): array { return $category_layout_data; } - public function getTotalCategories(): int { + public function getTotalCategories() { if (!empty($data['filter_name'])) { // category path name filter "Components > Monitors > test 1" $data['start'] = 0; @@ -364,7 +364,7 @@ public function getTotalCategories(): int { } } - public function getTotalCategoriesByLayoutId(int $layout_id): int { + public function getTotalCategoriesByLayoutId(int $layout_id) { $query = $this->db->query("SELECT COUNT(*) AS `total` FROM `" . DB_PREFIX . "category_to_layout` WHERE `layout_id` = '" . (int)$layout_id . "'"); return (int)$query->row['total']; diff --git a/upload/admin/model/catalog/download.php b/upload/admin/model/catalog/download.php index 0b903377..e76a4c20 100644 --- a/upload/admin/model/catalog/download.php +++ b/upload/admin/model/catalog/download.php @@ -1,6 +1,6 @@ db->query("INSERT INTO `" . DB_PREFIX . "download` SET `filename` = '" . $this->db->escape((string)$data['filename']) . "', `mask` = '" . $this->db->escape((string)$data['mask']) . "', `date_added` = NOW()"); $download_id = $this->db->getLastId(); @@ -12,7 +12,7 @@ public function addDownload(array $data): int { return $download_id; } - public function editDownload(int $download_id, array $data): void { + public function editDownload(int $download_id, array $data) { $this->db->query("UPDATE `" . DB_PREFIX . "download` SET `filename` = '" . $this->db->escape((string)$data['filename']) . "', `mask` = '" . $this->db->escape((string)$data['mask']) . "' WHERE `download_id` = '" . (int)$download_id . "'"); $this->db->query("DELETE FROM `" . DB_PREFIX . "download_description` WHERE `download_id` = '" . (int)$download_id . "'"); @@ -22,18 +22,18 @@ public function editDownload(int $download_id, array $data): void { } } - public function deleteDownload(int $download_id): void { + public function deleteDownload(int $download_id) { $this->db->query("DELETE FROM `" . DB_PREFIX . "download` WHERE `download_id` = '" . (int)$download_id . "'"); $this->db->query("DELETE FROM `" . DB_PREFIX . "download_description` WHERE `download_id` = '" . (int)$download_id . "'"); } - public function getDownload(int $download_id): array { + public function getDownload(int $download_id) { $query = $this->db->query("SELECT DISTINCT * FROM `" . DB_PREFIX . "download` d LEFT JOIN `" . DB_PREFIX . "download_description` dd ON (d.`download_id` = dd.`download_id`) WHERE d.`download_id` = '" . (int)$download_id . "' AND dd.`language_id` = '" . (int)$this->config->get('config_language_id') . "'"); return $query->row; } - public function getDownloads(array $data = []): array { + public function getDownloads(array $data = []) { $sql = "SELECT * FROM `" . DB_PREFIX . "download` d LEFT JOIN `" . DB_PREFIX . "download_description` dd ON (d.`download_id` = dd.`download_id`) WHERE dd.`language_id` = '" . (int)$this->config->get('config_language_id') . "'"; if (!empty($data['filter_name'])) { @@ -74,7 +74,7 @@ public function getDownloads(array $data = []): array { return $query->rows; } - public function getDownloadDescriptions(int $download_id): array { + public function getDownloadDescriptions(int $download_id) { $download_description_data = []; $query = $this->db->query("SELECT * FROM `" . DB_PREFIX . "download_description` WHERE `download_id` = '" . (int)$download_id . "'"); @@ -86,7 +86,7 @@ public function getDownloadDescriptions(int $download_id): array { return $download_description_data; } - public function getTotalDownloads(): int { + public function getTotalDownloads() { $query = $this->db->query("SELECT COUNT(*) AS `total` FROM `" . DB_PREFIX . "download`"); return (int)$query->row['total']; diff --git a/upload/admin/model/catalog/filter.php b/upload/admin/model/catalog/filter.php index 4f55f6ba..f580dd11 100644 --- a/upload/admin/model/catalog/filter.php +++ b/upload/admin/model/catalog/filter.php @@ -1,6 +1,6 @@ db->query("INSERT INTO `" . DB_PREFIX . "filter_group` SET `sort_order` = '" . (int)$data['sort_order'] . "'"); $filter_group_id = $this->db->getLastId(); @@ -24,7 +24,7 @@ public function addFilter(array $data): int { return $filter_group_id; } - public function editFilter(int $filter_group_id, array $data): void { + public function editFilter(int $filter_group_id, array $data) { $this->db->query("UPDATE `" . DB_PREFIX . "filter_group` SET `sort_order` = '" . (int)$data['sort_order'] . "' WHERE `filter_group_id` = '" . (int)$filter_group_id . "'"); $this->db->query("DELETE FROM `" . DB_PREFIX . "filter_group_description` WHERE `filter_group_id` = '" . (int)$filter_group_id . "'"); @@ -53,20 +53,20 @@ public function editFilter(int $filter_group_id, array $data): void { } } - public function deleteFilter(int $filter_group_id): void { + public function deleteFilter(int $filter_group_id) { $this->db->query("DELETE FROM `" . DB_PREFIX . "filter_group` WHERE `filter_group_id` = '" . (int)$filter_group_id . "'"); $this->db->query("DELETE FROM `" . DB_PREFIX . "filter_group_description` WHERE `filter_group_id` = '" . (int)$filter_group_id . "'"); $this->db->query("DELETE FROM `" . DB_PREFIX . "filter` WHERE `filter_group_id` = '" . (int)$filter_group_id . "'"); $this->db->query("DELETE FROM `" . DB_PREFIX . "filter_description` WHERE `filter_group_id` = '" . (int)$filter_group_id . "'"); } - public function getFilterGroup(int $filter_group_id): array { + public function getFilterGroup(int $filter_group_id) { $query = $this->db->query("SELECT * FROM `" . DB_PREFIX . "filter_group` fg LEFT JOIN `" . DB_PREFIX . "filter_group_description` fgd ON (fg.`filter_group_id` = fgd.`filter_group_id`) WHERE fg.`filter_group_id` = '" . (int)$filter_group_id . "' AND fgd.`language_id` = '" . (int)$this->config->get('config_language_id') . "'"); return $query->row; } - public function getFilterGroups(array $data = []): array { + public function getFilterGroups(array $data = []) { $sql = "SELECT * FROM `" . DB_PREFIX . "filter_group` fg LEFT JOIN `" . DB_PREFIX . "filter_group_description` fgd ON (fg.`filter_group_id` = fgd.`filter_group_id`) WHERE fgd.`language_id` = '" . (int)$this->config->get('config_language_id') . "'"; $sort_data = [ @@ -103,7 +103,7 @@ public function getFilterGroups(array $data = []): array { return $query->rows; } - public function getFilterGroupDescriptions(int $filter_group_id): array { + public function getFilterGroupDescriptions(int $filter_group_id) { $filter_group_data = []; $query = $this->db->query("SELECT * FROM `" . DB_PREFIX . "filter_group_description` WHERE `filter_group_id` = '" . (int)$filter_group_id . "'"); @@ -115,13 +115,13 @@ public function getFilterGroupDescriptions(int $filter_group_id): array { return $filter_group_data; } - public function getFilter(int $filter_id): array { + public function getFilter(int $filter_id) { $query = $this->db->query("SELECT *, (SELECT `name` FROM `" . DB_PREFIX . "filter_group_description` fgd WHERE f.`filter_group_id` = fgd.`filter_group_id` AND fgd.`language_id` = '" . (int)$this->config->get('config_language_id') . "') AS `group` FROM `" . DB_PREFIX . "filter` f LEFT JOIN `" . DB_PREFIX . "filter_description` fd ON (f.`filter_id` = fd.`filter_id`) WHERE f.`filter_id` = '" . (int)$filter_id . "' AND fd.`language_id` = '" . (int)$this->config->get('config_language_id') . "'"); return $query->row; } - public function getFilters(array $data): array { + public function getFilters(array $data) { $sql = "SELECT *, (SELECT `name` FROM `" . DB_PREFIX . "filter_group_description` fgd WHERE f.`filter_group_id` = fgd.`filter_group_id` AND fgd.`language_id` = '" . (int)$this->config->get('config_language_id') . "') AS `group` FROM `" . DB_PREFIX . "filter` f LEFT JOIN `" . DB_PREFIX . "filter_description` fd ON (f.`filter_id` = fd.`filter_id`) WHERE fd.`language_id` = '" . (int)$this->config->get('config_language_id') . "'"; if (!empty($data['filter_name'])) { @@ -147,7 +147,7 @@ public function getFilters(array $data): array { return $query->rows; } - public function getFilterDescriptions(int $filter_group_id): array { + public function getFilterDescriptions(int $filter_group_id) { $filter_data = []; $filter_query = $this->db->query("SELECT * FROM `" . DB_PREFIX . "filter` WHERE `filter_group_id` = '" . (int)$filter_group_id . "'"); @@ -171,7 +171,7 @@ public function getFilterDescriptions(int $filter_group_id): array { return $filter_data; } - public function getTotalFilterGroups(): int { + public function getTotalFilterGroups() { $query = $this->db->query("SELECT COUNT(*) AS `total` FROM `" . DB_PREFIX . "filter_group`"); return (int)$query->row['total']; diff --git a/upload/admin/model/catalog/information.php b/upload/admin/model/catalog/information.php index b1e4007f..35bd39f2 100644 --- a/upload/admin/model/catalog/information.php +++ b/upload/admin/model/catalog/information.php @@ -1,6 +1,6 @@ db->query("INSERT INTO `" . DB_PREFIX . "information` SET `sort_order` = '" . (int)$data['sort_order'] . "', `bottom` = '" . (isset($data['bottom']) ? (int)$data['bottom'] : 0) . "', `status` = '" . (bool)$data['status'] . "'"); $information_id = $this->db->getLastId(); @@ -30,7 +30,7 @@ public function addInformation(array $data): int { return $information_id; } - public function editInformation(int $information_id, array $data): void { + public function editInformation(int $information_id, array $data) { $this->db->query("UPDATE `" . DB_PREFIX . "information` SET `sort_order` = '" . (int)$data['sort_order'] . "', `bottom` = '" . (isset($data['bottom']) ? (int)$data['bottom'] : 0) . "', `status` = '" . (bool)$data['status'] . "' WHERE `information_id` = '" . (int)$information_id . "'"); $this->db->query("DELETE FROM `" . DB_PREFIX . "information_description` WHERE `information_id` = '" . (int)$information_id . "'"); @@ -64,7 +64,7 @@ public function editInformation(int $information_id, array $data): void { $this->cache->delete('information'); } - public function deleteInformation(int $information_id): void { + public function deleteInformation(int $information_id) { $this->db->query("DELETE FROM `" . DB_PREFIX . "information` WHERE `information_id` = '" . (int)$information_id . "'"); $this->db->query("DELETE FROM `" . DB_PREFIX . "information_description` WHERE `information_id` = '" . (int)$information_id . "'"); $this->db->query("DELETE FROM `" . DB_PREFIX . "information_to_store` WHERE `information_id` = '" . (int)$information_id . "'"); @@ -74,13 +74,13 @@ public function deleteInformation(int $information_id): void { $this->cache->delete('information'); } - public function getInformation(int $information_id): array { + public function getInformation(int $information_id) { $query = $this->db->query("SELECT DISTINCT *, (SELECT `keyword` FROM `" . DB_PREFIX . "url_alias` WHERE `query` = 'information_id=" . (int)$information_id . "') AS `keyword` FROM `" . DB_PREFIX . "information` WHERE `information_id` = '" . (int)$information_id . "'"); return $query->row; } - public function getInformations(array $data = []): array { + public function getInformations(array $data = []) { if ($data) { $sql = "SELECT * FROM `" . DB_PREFIX . "information` i LEFT JOIN `" . DB_PREFIX . "information_description` id ON (i.`information_id` = id.`information_id`) WHERE id.`language_id` = '" . (int)$this->config->get('config_language_id') . "'"; @@ -131,7 +131,7 @@ public function getInformations(array $data = []): array { } } - public function getInformationDescriptions(int $information_id): array { + public function getInformationDescriptions(int $information_id) { $information_description_data = []; $query = $this->db->query("SELECT * FROM `" . DB_PREFIX . "information_description` WHERE `information_id` = '" . (int)$information_id . "'"); @@ -149,7 +149,7 @@ public function getInformationDescriptions(int $information_id): array { return $information_description_data; } - public function getInformationStores(int $information_id): array { + public function getInformationStores(int $information_id) { $information_store_data = []; $query = $this->db->query("SELECT * FROM `" . DB_PREFIX . "information_to_store` WHERE `information_id` = '" . (int)$information_id . "'"); @@ -161,7 +161,7 @@ public function getInformationStores(int $information_id): array { return $information_store_data; } - public function getInformationLayouts(int $information_id): array { + public function getInformationLayouts(int $information_id) { $information_layout_data = []; $query = $this->db->query("SELECT * FROM `" . DB_PREFIX . "information_to_layout` WHERE `information_id` = '" . (int)$information_id . "'"); @@ -173,13 +173,13 @@ public function getInformationLayouts(int $information_id): array { return $information_layout_data; } - public function getTotalInformations(): int { + public function getTotalInformations() { $query = $this->db->query("SELECT COUNT(*) AS `total` FROM `" . DB_PREFIX . "information`"); return (int)$query->row['total']; } - public function getTotalInformationsByLayoutId(int $layout_id): int { + public function getTotalInformationsByLayoutId(int $layout_id) { $query = $this->db->query("SELECT COUNT(*) AS `total` FROM `" . DB_PREFIX . "information_to_layout` WHERE `layout_id` = '" . (int)$layout_id . "'"); return (int)$query->row['total']; diff --git a/upload/admin/model/catalog/manufacturer.php b/upload/admin/model/catalog/manufacturer.php index d33a34f6..952e9088 100644 --- a/upload/admin/model/catalog/manufacturer.php +++ b/upload/admin/model/catalog/manufacturer.php @@ -1,6 +1,6 @@ db->query("INSERT INTO `" . DB_PREFIX . "manufacturer` SET `name` = '" . $this->db->escape((string)$data['name']) . "', `sort_order` = '" . (int)$data['sort_order'] . "'"); $manufacturer_id = $this->db->getLastId(); @@ -24,7 +24,7 @@ public function addManufacturer(array $data): int { return $manufacturer_id; } - public function editManufacturer(int $manufacturer_id, array $data): void { + public function editManufacturer(int $manufacturer_id, array $data) { $this->db->query("UPDATE `" . DB_PREFIX . "manufacturer` SET `name` = '" . $this->db->escape((string)$data['name']) . "', `sort_order` = '" . (int)$data['sort_order'] . "' WHERE `manufacturer_id` = '" . (int)$manufacturer_id . "'"); if (isset($data['image'])) { @@ -48,7 +48,7 @@ public function editManufacturer(int $manufacturer_id, array $data): void { $this->cache->delete('manufacturer'); } - public function deleteManufacturer(int $manufacturer_id): void { + public function deleteManufacturer(int $manufacturer_id) { $this->db->query("DELETE FROM `" . DB_PREFIX . "manufacturer` WHERE `manufacturer_id` = '" . (int)$manufacturer_id . "'"); $this->db->query("DELETE FROM `" . DB_PREFIX . "manufacturer_to_store` WHERE `manufacturer_id` = '" . (int)$manufacturer_id . "'"); $this->db->query("DELETE FROM `" . DB_PREFIX . "url_alias` WHERE `query` = 'manufacturer_id=" . (int)$manufacturer_id . "'"); @@ -56,13 +56,13 @@ public function deleteManufacturer(int $manufacturer_id): void { $this->cache->delete('manufacturer'); } - public function getManufacturer(int $manufacturer_id): array { + public function getManufacturer(int $manufacturer_id) { $query = $this->db->query("SELECT DISTINCT *, (SELECT `keyword` FROM `" . DB_PREFIX . "url_alias` WHERE `query` = 'manufacturer_id=" . (int)$manufacturer_id . "') AS `keyword` FROM `" . DB_PREFIX . "manufacturer` WHERE `manufacturer_id` = '" . (int)$manufacturer_id . "'"); return $query->row; } - public function getManufacturers(array $data = []): array { + public function getManufacturers(array $data = []) { $sql = "SELECT * FROM `" . DB_PREFIX . "manufacturer`"; if (!empty($data['filter_name'])) { @@ -103,7 +103,7 @@ public function getManufacturers(array $data = []): array { return $query->rows; } - public function getManufacturerStores(int $manufacturer_id): array { + public function getManufacturerStores(int $manufacturer_id) { $manufacturer_store_data = []; $query = $this->db->query("SELECT * FROM `" . DB_PREFIX . "manufacturer_to_store` WHERE `manufacturer_id` = '" . (int)$manufacturer_id . "'"); @@ -115,7 +115,7 @@ public function getManufacturerStores(int $manufacturer_id): array { return $manufacturer_store_data; } - public function getTotalManufacturers(): int { + public function getTotalManufacturers() { $query = $this->db->query("SELECT COUNT(*) AS `total` FROM `" . DB_PREFIX . "manufacturer`"); return (int)$query->row['total']; diff --git a/upload/admin/model/catalog/option.php b/upload/admin/model/catalog/option.php index b9273634..d4e37cf6 100644 --- a/upload/admin/model/catalog/option.php +++ b/upload/admin/model/catalog/option.php @@ -1,6 +1,6 @@ db->query("INSERT INTO `" . DB_PREFIX . "option` SET `type` = '" . $this->db->escape((string)$data['type']) . "', `sort_order` = '" . (int)$data['sort_order'] . "'"); $option_id = $this->db->getLastId(); @@ -24,7 +24,7 @@ public function addOption(array $data): int { return $option_id; } - public function editOption(int $option_id, array $data): void { + public function editOption(int $option_id, array $data) { $this->db->query("UPDATE `" . DB_PREFIX . "option` SET `type` = '" . $this->db->escape((string)$data['type']) . "', `sort_order` = '" . (int)$data['sort_order'] . "' WHERE `option_id` = '" . (int)$option_id . "'"); $this->db->query("DELETE FROM `" . DB_PREFIX . "option_description` WHERE `option_id` = '" . (int)$option_id . "'"); @@ -54,20 +54,20 @@ public function editOption(int $option_id, array $data): void { } } - public function deleteOption(int $option_id): void { + public function deleteOption(int $option_id) { $this->db->query("DELETE FROM `" . DB_PREFIX . "option` WHERE `option_id` = '" . (int)$option_id . "'"); $this->db->query("DELETE FROM `" . DB_PREFIX . "option_description` WHERE `option_id` = '" . (int)$option_id . "'"); $this->db->query("DELETE FROM `" . DB_PREFIX . "option_value` WHERE `option_id` = '" . (int)$option_id . "'"); $this->db->query("DELETE FROM `" . DB_PREFIX . "option_value_description` WHERE `option_id` = '" . (int)$option_id . "'"); } - public function getOption(int $option_id): array { + public function getOption(int $option_id) { $query = $this->db->query("SELECT * FROM `" . DB_PREFIX . "option` o LEFT JOIN `" . DB_PREFIX . "option_description` od ON (o.`option_id` = od.`option_id`) WHERE o.`option_id` = '" . (int)$option_id . "' AND od.`language_id` = '" . (int)$this->config->get('config_language_id') . "'"); return $query->row; } - public function getOptions(array $data = []): array { + public function getOptions(array $data = []) { $sql = "SELECT * FROM `" . DB_PREFIX . "option` o LEFT JOIN `" . DB_PREFIX . "option_description` od ON (o.`option_id` = od.`option_id`) WHERE od.`language_id` = '" . (int)$this->config->get('config_language_id') . "'"; if (!empty($data['filter_name'])) { @@ -109,7 +109,7 @@ public function getOptions(array $data = []): array { return $query->rows; } - public function getOptionDescriptions(int $option_id): array { + public function getOptionDescriptions(int $option_id) { $option_data = []; $query = $this->db->query("SELECT * FROM `" . DB_PREFIX . "option_description` WHERE `option_id` = '" . (int)$option_id . "'"); @@ -121,13 +121,13 @@ public function getOptionDescriptions(int $option_id): array { return $option_data; } - public function getOptionValue(int $option_value_id): array { + public function getOptionValue(int $option_value_id) { $query = $this->db->query("SELECT * FROM `" . DB_PREFIX . "option_value` ov LEFT JOIN `" . DB_PREFIX . "option_value_description` ovd ON (ov.`option_value_id` = ovd.`option_value_id`) WHERE ov.`option_value_id` = '" . (int)$option_value_id . "' AND ovd.`language_id` = '" . (int)$this->config->get('config_language_id') . "'"); return $query->row; } - public function getOptionValues(int $option_id): array { + public function getOptionValues(int $option_id) { $option_value_data = []; $option_value_query = $this->db->query("SELECT * FROM `" . DB_PREFIX . "option_value` ov LEFT JOIN `" . DB_PREFIX . "option_value_description` ovd ON (ov.`option_value_id` = ovd.`option_value_id`) WHERE ov.`option_id` = '" . (int)$option_id . "' AND ovd.`language_id` = '" . (int)$this->config->get('config_language_id') . "' ORDER BY ov.sort_order, ovd.name"); @@ -144,7 +144,7 @@ public function getOptionValues(int $option_id): array { return $option_value_data; } - public function getOptionValueDescriptions(int $option_id): array { + public function getOptionValueDescriptions(int $option_id) { $option_value_data = []; $option_value_query = $this->db->query("SELECT * FROM `" . DB_PREFIX . "option_value` WHERE `option_id` = '" . (int)$option_id . "' ORDER BY `sort_order`"); @@ -169,7 +169,7 @@ public function getOptionValueDescriptions(int $option_id): array { return $option_value_data; } - public function getTotalOptions(): int { + public function getTotalOptions() { $query = $this->db->query("SELECT COUNT(*) AS `total` FROM `" . DB_PREFIX . "option`"); return (int)$query->row['total']; diff --git a/upload/admin/model/catalog/product.php b/upload/admin/model/catalog/product.php index fc1271f3..3d571386 100644 --- a/upload/admin/model/catalog/product.php +++ b/upload/admin/model/catalog/product.php @@ -1,6 +1,6 @@ db->query("INSERT INTO `" . DB_PREFIX . "product` SET `model` = '" . $this->db->escape((string)$data['model']) . "', `sku` = '" . $this->db->escape((string)$data['sku']) . "', `upc` = '" . $this->db->escape((string)$data['upc']) . "', `ean` = '" . $this->db->escape((string)$data['ean']) . "', `jan` = '" . $this->db->escape((string)$data['jan']) . "', `isbn` = '" . $this->db->escape((string)$data['isbn']) . "', `mpn` = '" . $this->db->escape((string)$data['mpn']) . "', `location` = '" . $this->db->escape((string)$data['location']) . "', `quantity` = '" . (int)$data['quantity'] . "', `minimum` = '" . (int)$data['minimum'] . "', `subtract` = '" . (int)$data['subtract'] . "', `stock_status_id` = '" . (int)$data['stock_status_id'] . "', `date_available` = '" . $this->db->escape((string)$data['date_available']) . "', `manufacturer_id` = '" . (int)$data['manufacturer_id'] . "', `shipping` = '" . (int)$data['shipping'] . "', `price` = '" . (float)$data['price'] . "', `points` = '" . (int)$data['points'] . "', `weight` = '" . (float)$data['weight'] . "', `weight_class_id` = '" . (int)$data['weight_class_id'] . "', `length` = '" . (float)$data['length'] . "', `width` = '" . (float)$data['width'] . "', `height` = '" . (float)$data['height'] . "', `length_class_id` = '" . (int)$data['length_class_id'] . "', `status` = '" . (bool)$data['status'] . "', `tax_class_id` = '" . (int)$data['tax_class_id'] . "', `sort_order` = '" . (int)$data['sort_order'] . "', `date_added` = NOW(), `date_modified` = NOW()"); $product_id = $this->db->getLastId(); @@ -146,7 +146,7 @@ public function addProduct(array $data): int { return $product_id; } - public function editProduct(int $product_id, array $data): void { + public function editProduct(int $product_id, array $data) { $this->db->query("UPDATE `" . DB_PREFIX . "product` SET `model` = '" . $this->db->escape((string)$data['model']) . "', `sku` = '" . $this->db->escape((string)$data['sku']) . "', `upc` = '" . $this->db->escape((string)$data['upc']) . "', `ean` = '" . $this->db->escape((string)$data['ean']) . "', `jan` = '" . $this->db->escape((string)$data['jan']) . "', `isbn` = '" . $this->db->escape((string)$data['isbn']) . "', `mpn` = '" . $this->db->escape((string)$data['mpn']) . "', `location` = '" . $this->db->escape((string)$data['location']) . "', `quantity` = '" . (int)$data['quantity'] . "', `minimum` = '" . (int)$data['minimum'] . "', `subtract` = '" . (int)$data['subtract'] . "', `stock_status_id` = '" . (int)$data['stock_status_id'] . "', `date_available` = '" . $this->db->escape((string)$data['date_available']) . "', `manufacturer_id` = '" . (int)$data['manufacturer_id'] . "', `shipping` = '" . (int)$data['shipping'] . "', `price` = '" . (float)$data['price'] . "', `points` = '" . (int)$data['points'] . "', `weight` = '" . (float)$data['weight'] . "', `weight_class_id` = '" . (int)$data['weight_class_id'] . "', `length` = '" . (float)$data['length'] . "', `width` = '" . (float)$data['width'] . "', `height` = '" . (float)$data['height'] . "', `length_class_id` = '" . (int)$data['length_class_id'] . "', `status` = '" . (bool)$data['status'] . "', `tax_class_id` = '" . (int)$data['tax_class_id'] . "', `sort_order` = '" . (int)$data['sort_order'] . "', `date_modified` = NOW() WHERE `product_id` = '" . (int)$product_id . "'"); if ($data['image']) { @@ -317,7 +317,7 @@ public function editProduct(int $product_id, array $data): void { $this->cache->delete('product'); } - public function copyProduct(int $product_id): void { + public function copyProduct(int $product_id) { $query = $this->db->query("SELECT DISTINCT * FROM `" . DB_PREFIX . "product` p WHERE p.`product_id` = '" . (int)$product_id . "'"); if ($query->num_rows) { @@ -348,7 +348,7 @@ public function copyProduct(int $product_id): void { } } - public function deleteProduct(int $product_id): void { + public function deleteProduct(int $product_id) { $this->db->query("DELETE FROM `" . DB_PREFIX . "product` WHERE `product_id` = '" . (int)$product_id . "'"); $this->db->query("DELETE FROM `" . DB_PREFIX . "product_attribute` WHERE `product_id` = '" . (int)$product_id . "'"); $this->db->query("DELETE FROM `" . DB_PREFIX . "product_description` WHERE `product_id` = '" . (int)$product_id . "'"); @@ -373,13 +373,13 @@ public function deleteProduct(int $product_id): void { $this->cache->delete('product'); } - public function getProduct(int $product_id): array { + public function getProduct(int $product_id) { $query = $this->db->query("SELECT DISTINCT *, (SELECT `keyword` FROM `" . DB_PREFIX . "url_alias` WHERE `query` = 'product_id=" . (int)$product_id . "') AS keyword FROM `" . DB_PREFIX . "product` p LEFT JOIN `" . DB_PREFIX . "product_description` pd ON (p.`product_id` = pd.`product_id`) WHERE p.`product_id` = '" . (int)$product_id . "' AND pd.`language_id` = '" . (int)$this->config->get('config_language_id') . "'"); return $query->row; } - public function getProducts(array $data = []): array { + public function getProducts(array $data = []) { $sql = "SELECT * FROM `" . DB_PREFIX . "product` p LEFT JOIN `" . DB_PREFIX . "product_description` pd ON (p.`product_id` = pd.`product_id`) WHERE pd.`language_id` = '" . (int)$this->config->get('config_language_id') . "'"; if (!empty($data['filter_name'])) { @@ -450,13 +450,13 @@ public function getProducts(array $data = []): array { return $query->rows; } - public function getProductsByCategoryId(int $category_id): array { + public function getProductsByCategoryId(int $category_id) { $query = $this->db->query("SELECT * FROM `" . DB_PREFIX . "product` p LEFT JOIN `" . DB_PREFIX . "product_description` pd ON (p.`product_id` = pd.`product_id`) LEFT JOIN `" . DB_PREFIX . "product_to_category` p2c ON (p.`product_id` = p2c.`product_id`) WHERE pd.`language_id` = '" . (int)$this->config->get('config_language_id') . "' AND p2c.`category_id` = '" . (int)$category_id . "' ORDER BY pd.`name` ASC"); return $query->rows; } - public function getProductDescriptions(int $product_id): array { + public function getProductDescriptions(int $product_id) { $product_description_data = []; $query = $this->db->query("SELECT * FROM `" . DB_PREFIX . "product_description` WHERE `product_id` = '" . (int)$product_id . "'"); @@ -475,7 +475,7 @@ public function getProductDescriptions(int $product_id): array { return $product_description_data; } - public function getProductCategories(int $product_id): array { + public function getProductCategories(int $product_id) { $product_category_data = []; $query = $this->db->query("SELECT * FROM `" . DB_PREFIX . "product_to_category` WHERE `product_id` = '" . (int)$product_id . "'"); @@ -487,7 +487,7 @@ public function getProductCategories(int $product_id): array { return $product_category_data; } - public function getProductFilters(int $product_id): array { + public function getProductFilters(int $product_id) { $product_filter_data = []; $query = $this->db->query("SELECT * FROM `" . DB_PREFIX . "product_filter` WHERE `product_id` = '" . (int)$product_id . "'"); @@ -499,7 +499,7 @@ public function getProductFilters(int $product_id): array { return $product_filter_data; } - public function getProductAttributes(int $product_id): array { + public function getProductAttributes(int $product_id) { $product_attribute_data = []; $product_attribute_query = $this->db->query("SELECT `attribute_id` FROM `" . DB_PREFIX . "product_attribute` WHERE `product_id` = '" . (int)$product_id . "' GROUP BY `attribute_id`"); @@ -522,7 +522,7 @@ public function getProductAttributes(int $product_id): array { return $product_attribute_data; } - public function getProductOptions(int $product_id): array { + public function getProductOptions(int $product_id) { $product_option_data = []; $product_option_query = $this->db->query("SELECT * FROM `" . DB_PREFIX . "product_option` po LEFT JOIN `" . DB_PREFIX . "option` o ON (po.option_id = o.option_id) LEFT JOIN `" . DB_PREFIX . "option_description` od ON (o.option_id = od.option_id) WHERE po.product_id = '" . (int)$product_id . "' AND od.language_id = '" . (int)$this->config->get('config_language_id') . "' ORDER BY o.sort_order ASC"); @@ -561,31 +561,31 @@ public function getProductOptions(int $product_id): array { return $product_option_data; } - public function getProductOptionValue(int $product_id, int $product_option_value_id): array { + public function getProductOptionValue(int $product_id, int $product_option_value_id) { $query = $this->db->query("SELECT pov.`option_value_id`, ovd.`name`, pov.`quantity`, pov.`subtract`, pov.`price`, pov.`price_prefix`, pov.`points`, pov.`points_prefix`, pov.`weight`, pov.`weight_prefix` FROM `" . DB_PREFIX . "product_option_value` pov LEFT JOIN `" . DB_PREFIX . "option_value` ov ON (pov.`option_value_id` = ov.`option_value_id`) LEFT JOIN `" . DB_PREFIX . "option_value_description` ovd ON (ov.`option_value_id` = ovd.`option_value_id`) WHERE pov.`product_id` = '" . (int)$product_id . "' AND pov.`product_option_value_id` = '" . (int)$product_option_value_id . "' AND ovd.`language_id` = '" . (int)$this->config->get('config_language_id') . "'"); return $query->row; } - public function getProductImages(int $product_id): array { + public function getProductImages(int $product_id) { $query = $this->db->query("SELECT * FROM `" . DB_PREFIX . "product_image` WHERE `product_id` = '" . (int)$product_id . "' ORDER BY `sort_order` ASC"); return $query->rows; } - public function getProductDiscounts(int $product_id): array { + public function getProductDiscounts(int $product_id) { $query = $this->db->query("SELECT * FROM `" . DB_PREFIX . "product_discount` WHERE `product_id` = '" . (int)$product_id . "' ORDER BY `quantity`, `priority`, `price`"); return $query->rows; } - public function getProductSpecials(int $product_id): array { + public function getProductSpecials(int $product_id) { $query = $this->db->query("SELECT * FROM `" . DB_PREFIX . "product_special` WHERE `product_id` = '" . (int)$product_id . "' ORDER BY `priority`, `price`"); return $query->rows; } - public function getProductRewards(int $product_id): array { + public function getProductRewards(int $product_id) { $product_reward_data = []; $query = $this->db->query("SELECT * FROM `" . DB_PREFIX . "product_reward` WHERE `product_id` = '" . (int)$product_id . "'"); @@ -597,7 +597,7 @@ public function getProductRewards(int $product_id): array { return $product_reward_data; } - public function getProductDownloads(int $product_id): array { + public function getProductDownloads(int $product_id) { $product_download_data = []; $query = $this->db->query("SELECT * FROM `" . DB_PREFIX . "product_to_download` WHERE `product_id` = '" . (int)$product_id . "'"); @@ -609,7 +609,7 @@ public function getProductDownloads(int $product_id): array { return $product_download_data; } - public function getProductStores(int $product_id): array { + public function getProductStores(int $product_id) { $product_store_data = []; $query = $this->db->query("SELECT * FROM `" . DB_PREFIX . "product_to_store` WHERE `product_id` = '" . (int)$product_id . "'"); @@ -621,7 +621,7 @@ public function getProductStores(int $product_id): array { return $product_store_data; } - public function getProductLayouts(int $product_id): array { + public function getProductLayouts(int $product_id) { $product_layout_data = []; $query = $this->db->query("SELECT * FROM `" . DB_PREFIX . "product_to_layout` WHERE `product_id` = '" . (int)$product_id . "'"); @@ -633,7 +633,7 @@ public function getProductLayouts(int $product_id): array { return $product_layout_data; } - public function getProductRelated(int $product_id): array { + public function getProductRelated(int $product_id) { $product_related_data = []; $query = $this->db->query("SELECT * FROM `" . DB_PREFIX . "product_related` WHERE `product_id` = '" . (int)$product_id . "'"); @@ -645,13 +645,13 @@ public function getProductRelated(int $product_id): array { return $product_related_data; } - public function getRecurrings(int $product_id): array { + public function getRecurrings(int $product_id) { $query = $this->db->query("SELECT * FROM `" . DB_PREFIX . "product_recurring` WHERE `product_id` = '" . (int)$product_id . "'"); return $query->rows; } - public function getTotalProducts(array $data = []): int { + public function getTotalProducts(array $data = []) { $sql = "SELECT COUNT(DISTINCT p.`product_id`) AS total FROM `" . DB_PREFIX . "product` p LEFT JOIN `" . DB_PREFIX . "product_description` pd ON (p.`product_id` = pd.`product_id`)"; $sql .= " WHERE pd.`language_id` = '" . (int)$this->config->get('config_language_id') . "'"; @@ -689,61 +689,61 @@ public function getTotalProducts(array $data = []): int { return (int)$query->row['total']; } - public function getTotalProductsByTaxClassId(int $tax_class_id): int { + public function getTotalProductsByTaxClassId(int $tax_class_id) { $query = $this->db->query("SELECT COUNT(*) AS `total` FROM `" . DB_PREFIX . "product` WHERE `tax_class_id` = '" . (int)$tax_class_id . "'"); return (int)$query->row['total']; } - public function getTotalProductsByStockStatusId(int $stock_status_id): int { + public function getTotalProductsByStockStatusId(int $stock_status_id) { $query = $this->db->query("SELECT COUNT(*) AS `total` FROM `" . DB_PREFIX . "product` WHERE `stock_status_id` = '" . (int)$stock_status_id . "'"); return (int)$query->row['total']; } - public function getTotalProductsByWeightClassId(int $weight_class_id): int { + public function getTotalProductsByWeightClassId(int $weight_class_id) { $query = $this->db->query("SELECT COUNT(*) AS `total` FROM `" . DB_PREFIX . "product` WHERE `weight_class_id` = '" . (int)$weight_class_id . "'"); return (int)$query->row['total']; } - public function getTotalProductsByLengthClassId(int $length_class_id): int { + public function getTotalProductsByLengthClassId(int $length_class_id) { $query = $this->db->query("SELECT COUNT(*) AS `total` FROM `" . DB_PREFIX . "product` WHERE `length_class_id` = '" . (int)$length_class_id . "'"); return (int)$query->row['total']; } - public function getTotalProductsByDownloadId(int $download_id): int { + public function getTotalProductsByDownloadId(int $download_id) { $query = $this->db->query("SELECT COUNT(*) AS `total` FROM `" . DB_PREFIX . "product_to_download` WHERE `download_id` = '" . (int)$download_id . "'"); return (int)$query->row['total']; } - public function getTotalProductsByManufacturerId(int $manufacturer_id): int { + public function getTotalProductsByManufacturerId(int $manufacturer_id) { $query = $this->db->query("SELECT COUNT(*) AS `total` FROM `" . DB_PREFIX . "product` WHERE `manufacturer_id` = '" . (int)$manufacturer_id . "'"); return (int)$query->row['total']; } - public function getTotalProductsByAttributeId(int $attribute_id): int { + public function getTotalProductsByAttributeId(int $attribute_id) { $query = $this->db->query("SELECT COUNT(*) AS `total` FROM `" . DB_PREFIX . "product_attribute` WHERE `attribute_id` = '" . (int)$attribute_id . "'"); return (int)$query->row['total']; } - public function getTotalProductsByOptionId(int $option_id): int { + public function getTotalProductsByOptionId(int $option_id) { $query = $this->db->query("SELECT COUNT(*) AS `total` FROM `" . DB_PREFIX . "product_option` WHERE `option_id` = '" . (int)$option_id . "'"); return (int)$query->row['total']; } - public function getTotalProductsByProfileId(int $recurring_id): int { + public function getTotalProductsByProfileId(int $recurring_id) { $query = $this->db->query("SELECT COUNT(*) AS `total` FROM `" . DB_PREFIX . "product_recurring` WHERE `recurring_id` = '" . (int)$recurring_id . "'"); return (int)$query->row['total']; } - public function getTotalProductsByLayoutId(int $layout_id): int { + public function getTotalProductsByLayoutId(int $layout_id) { $query = $this->db->query("SELECT COUNT(*) AS `total` FROM `" . DB_PREFIX . "product_to_layout` WHERE `layout_id` = '" . (int)$layout_id . "'"); return (int)$query->row['total']; diff --git a/upload/admin/model/catalog/recurring.php b/upload/admin/model/catalog/recurring.php index 2bf4475b..f3e80b70 100644 --- a/upload/admin/model/catalog/recurring.php +++ b/upload/admin/model/catalog/recurring.php @@ -1,6 +1,6 @@ db->query("INSERT INTO `" . DB_PREFIX . "recurring` SET `sort_order` = '" . (int)$data['sort_order'] . "', `status` = '" . (bool)$data['status'] . "', `price` = '" . (float)$data['price'] . "', `frequency` = '" . $this->db->escape((string)$data['frequency']) . "', `duration` = '" . (int)$data['duration'] . "', `cycle` = '" . (int)$data['cycle'] . "', `trial_status` = '" . (int)$data['trial_status'] . "', `trial_price` = '" . (float)$data['trial_price'] . "', `trial_frequency` = '" . $this->db->escape((string)$data['trial_frequency']) . "', `trial_duration` = '" . (int)$data['trial_duration'] . "', `trial_cycle` = '" . (int)$data['trial_cycle'] . "'"); $recurring_id = $this->db->getLastId(); @@ -12,7 +12,7 @@ public function addRecurring(array $data): int { return $recurring_id; } - public function editRecurring(int $recurring_id, array $data): void { + public function editRecurring(int $recurring_id, array $data) { $this->db->query("DELETE FROM `" . DB_PREFIX . "recurring_description` WHERE `recurring_id` = '" . (int)$recurring_id . "'"); $this->db->query("UPDATE `" . DB_PREFIX . "recurring` SET `price` = '" . (float)$data['price'] . "', `frequency` = '" . $this->db->escape((string)$data['frequency']) . "', `duration` = '" . (int)$data['duration'] . "', `cycle` = '" . (int)$data['cycle'] . "', `sort_order` = '" . (int)$data['sort_order'] . "', `status` = '" . (bool)$data['status'] . "', `trial_price` = '" . (float)$data['trial_price'] . "', `trial_frequency` = '" . $this->db->escape((string)$data['trial_frequency']) . "', `trial_duration` = '" . (int)$data['trial_duration'] . "', `trial_cycle` = '" . (int)$data['trial_cycle'] . "', `trial_status` = '" . (int)$data['trial_status'] . "' WHERE `recurring_id` = '" . (int)$recurring_id . "'"); @@ -22,7 +22,7 @@ public function editRecurring(int $recurring_id, array $data): void { } } - public function copyRecurring(int $recurring_id): void { + public function copyRecurring(int $recurring_id) { $data = $this->getRecurring($recurring_id); $data['recurring_description'] = $this->getRecurringDescription($recurring_id); @@ -34,20 +34,20 @@ public function copyRecurring(int $recurring_id): void { $this->addRecurring($data); } - public function deleteRecurring(int $recurring_id): void { + public function deleteRecurring(int $recurring_id) { $this->db->query("DELETE FROM `" . DB_PREFIX . "recurring` WHERE `recurring_id` = '" . (int)$recurring_id . "'"); $this->db->query("DELETE FROM `" . DB_PREFIX . "recurring_description` WHERE `recurring_id` = '" . (int)$recurring_id . "'"); $this->db->query("DELETE FROM `" . DB_PREFIX . "product_recurring` WHERE `recurring_id` = '" . (int)$recurring_id . "'"); $this->db->query("UPDATE `" . DB_PREFIX . "order_recurring` SET `recurring_id` = 0 WHERE `recurring_id` = '" . (int)$recurring_id . "'"); } - public function getRecurring(int $recurring_id): array { + public function getRecurring(int $recurring_id) { $query = $this->db->query("SELECT * FROM `" . DB_PREFIX . "recurring` WHERE `recurring_id` = '" . (int)$recurring_id . "'"); return $query->row; } - public function getRecurringDescription(int $recurring_id): array { + public function getRecurringDescription(int $recurring_id) { $recurring_description_data = []; $query = $this->db->query("SELECT * FROM `" . DB_PREFIX . "recurring_description` WHERE `recurring_id` = '" . (int)$recurring_id . "'"); @@ -59,7 +59,7 @@ public function getRecurringDescription(int $recurring_id): array { return $recurring_description_data; } - public function getRecurrings(array $data = []): array { + public function getRecurrings(array $data = []) { $sql = "SELECT * FROM `" . DB_PREFIX . "recurring` r LEFT JOIN `" . DB_PREFIX . "recurring_description` rd ON (r.`recurring_id` = rd.`recurring_id`) WHERE rd.`language_id` = '" . (int)$this->config->get('config_language_id') . "'"; if (!empty($data['filter_name'])) { @@ -100,7 +100,7 @@ public function getRecurrings(array $data = []): array { return $query->rows; } - public function getTotalRecurrings(): int { + public function getTotalRecurrings() { $query = $this->db->query("SELECT COUNT(*) AS `total` FROM `" . DB_PREFIX . "recurring`"); return (int)$query->row['total']; diff --git a/upload/admin/model/catalog/review.php b/upload/admin/model/catalog/review.php index a2c5255e..c712f5f0 100644 --- a/upload/admin/model/catalog/review.php +++ b/upload/admin/model/catalog/review.php @@ -1,6 +1,6 @@ db->query("INSERT INTO `" . DB_PREFIX . "review` SET `author` = '" . $this->db->escape((string)$data['author']) . "', `product_id` = '" . (int)$data['product_id'] . "', `text` = '" . $this->db->escape(strip_tags((string)$data['text'])) . "', `rating` = '" . (int)$data['rating'] . "', `status` = '" . (bool)$data['status'] . "', `date_added` = '" . $this->db->escape((string)$data['date_added']) . "'"); $review_id = $this->db->getLastId(); @@ -10,25 +10,25 @@ public function addReview(array $data): int { return $review_id; } - public function editReview(int $review_id, array $data): void { + public function editReview(int $review_id, array $data) { $this->db->query("UPDATE `" . DB_PREFIX . "review` SET `author` = '" . $this->db->escape((string)$data['author']) . "', `product_id` = '" . (int)$data['product_id'] . "', `text` = '" . $this->db->escape(strip_tags((string)$data['text'])) . "', `rating` = '" . (int)$data['rating'] . "', `status` = '" . (bool)$data['status'] . "', `date_added` = '" . $this->db->escape((string)$data['date_added']) . "', `date_modified` = NOW() WHERE `review_id` = '" . (int)$review_id . "'"); $this->cache->delete('product'); } - public function deleteReview(int $review_id): void { + public function deleteReview(int $review_id) { $this->db->query("DELETE FROM `" . DB_PREFIX . "review` WHERE `review_id` = '" . (int)$review_id . "'"); $this->cache->delete('product'); } - public function getReview(int $review_id): array { + public function getReview(int $review_id) { $query = $this->db->query("SELECT DISTINCT *, (SELECT pd.`name` FROM `" . DB_PREFIX . "product_description` pd WHERE pd.`product_id` = r.`product_id` AND pd.`language_id` = '" . (int)$this->config->get('config_language_id') . "') AS product FROM `" . DB_PREFIX . "review` r WHERE r.`review_id` = '" . (int)$review_id . "'"); return $query->row; } - public function getReviews(array $data = []): array { + public function getReviews(array $data = []) { $sql = "SELECT r.`review_id`, pd.`name`, r.`author`, r.`rating`, r.`status`, r.`date_added` FROM `" . DB_PREFIX . "review` r LEFT JOIN `" . DB_PREFIX . "product_description` pd ON (r.`product_id` = pd.`product_id`) WHERE pd.`language_id` = '" . (int)$this->config->get('config_language_id') . "'"; if (!empty($data['filter_product'])) { @@ -84,7 +84,7 @@ public function getReviews(array $data = []): array { return $query->rows; } - public function getTotalReviews(array $data = []): int { + public function getTotalReviews(array $data = []) { $sql = "SELECT COUNT(*) AS `total` FROM `" . DB_PREFIX . "review` r LEFT JOIN `" . DB_PREFIX . "product_description` pd ON (r.`product_id` = pd.`product_id`) WHERE pd.`language_id` = '" . (int)$this->config->get('config_language_id') . "'"; if (!empty($data['filter_product'])) { @@ -108,7 +108,7 @@ public function getTotalReviews(array $data = []): int { return (int)$query->row['total']; } - public function getTotalReviewsAwaitingApproval(): int { + public function getTotalReviewsAwaitingApproval() { $query = $this->db->query("SELECT COUNT(*) AS `total` FROM `" . DB_PREFIX . "review` WHERE `status` = '0'"); return (int)$query->row['total']; diff --git a/upload/admin/model/catalog/url_alias.php b/upload/admin/model/catalog/url_alias.php index eebf5382..95ce7661 100644 --- a/upload/admin/model/catalog/url_alias.php +++ b/upload/admin/model/catalog/url_alias.php @@ -1,6 +1,6 @@ db->query("SELECT * FROM `" . DB_PREFIX . "url_alias` WHERE `keyword` = '" . $this->db->escape($keyword) . "'"); return $query->row; diff --git a/upload/admin/model/customer/custom_field.php b/upload/admin/model/customer/custom_field.php index 26c97c72..5057c36d 100644 --- a/upload/admin/model/customer/custom_field.php +++ b/upload/admin/model/customer/custom_field.php @@ -1,6 +1,6 @@ db->query("INSERT INTO `" . DB_PREFIX . "custom_field` SET type = '" . $this->db->escape($data['type']) . "', value = '" . $this->db->escape($data['value']) . "', validation = '" . $this->db->escape($data['validation']) . "', location = '" . $this->db->escape($data['location']) . "', status = '" . (bool)$data['status'] . "', sort_order = '" . (int)$data['sort_order'] . "'"); $custom_field_id = $this->db->getLastId(); @@ -32,7 +32,7 @@ public function addCustomField(array $data): int { return $custom_field_id; } - public function editCustomField(int $custom_field_id, array $data): void { + public function editCustomField(int $custom_field_id, array $data) { $this->db->query("UPDATE `" . DB_PREFIX . "custom_field` SET type = '" . $this->db->escape($data['type']) . "', value = '" . $this->db->escape($data['value']) . "', validation = '" . $this->db->escape($data['validation']) . "', location = '" . $this->db->escape($data['location']) . "', status = '" . (bool)$data['status'] . "', sort_order = '" . (int)$data['sort_order'] . "' WHERE custom_field_id = '" . (int)$custom_field_id . "'"); $this->db->query("DELETE FROM " . DB_PREFIX . "custom_field_description WHERE custom_field_id = '" . (int)$custom_field_id . "'"); @@ -71,7 +71,7 @@ public function editCustomField(int $custom_field_id, array $data): void { } } - public function deleteCustomField(int $custom_field_id): void { + public function deleteCustomField(int $custom_field_id) { $this->db->query("DELETE FROM `" . DB_PREFIX . "custom_field` WHERE custom_field_id = '" . (int)$custom_field_id . "'"); $this->db->query("DELETE FROM `" . DB_PREFIX . "custom_field_description` WHERE custom_field_id = '" . (int)$custom_field_id . "'"); $this->db->query("DELETE FROM `" . DB_PREFIX . "custom_field_customer_group` WHERE custom_field_id = '" . (int)$custom_field_id . "'"); @@ -79,13 +79,13 @@ public function deleteCustomField(int $custom_field_id): void { $this->db->query("DELETE FROM `" . DB_PREFIX . "custom_field_value_description` WHERE custom_field_id = '" . (int)$custom_field_id . "'"); } - public function getCustomField(int $custom_field_id): array { + public function getCustomField(int $custom_field_id) { $query = $this->db->query("SELECT * FROM `" . DB_PREFIX . "custom_field` cf LEFT JOIN " . DB_PREFIX . "custom_field_description cfd ON (cf.custom_field_id = cfd.custom_field_id) WHERE cf.custom_field_id = '" . (int)$custom_field_id . "' AND cfd.language_id = '" . (int)$this->config->get('config_language_id') . "'"); return $query->row; } - public function getCustomFields(array $data = []): array { + public function getCustomFields(array $data = []) { if (empty($data['filter_customer_group_id'])) { $sql = "SELECT * FROM `" . DB_PREFIX . "custom_field` cf LEFT JOIN " . DB_PREFIX . "custom_field_description cfd ON (cf.custom_field_id = cfd.custom_field_id) WHERE cfd.language_id = '" . (int)$this->config->get('config_language_id') . "'"; } else { @@ -137,7 +137,7 @@ public function getCustomFields(array $data = []): array { return $query->rows; } - public function getCustomFieldDescriptions(int $custom_field_id): array { + public function getCustomFieldDescriptions(int $custom_field_id) { $custom_field_data = []; $query = $this->db->query("SELECT * FROM " . DB_PREFIX . "custom_field_description WHERE custom_field_id = '" . (int)$custom_field_id . "'"); @@ -149,13 +149,13 @@ public function getCustomFieldDescriptions(int $custom_field_id): array { return $custom_field_data; } - public function getCustomFieldValue(int $custom_field_value_id): array { + public function getCustomFieldValue(int $custom_field_value_id) { $query = $this->db->query("SELECT * FROM " . DB_PREFIX . "custom_field_value cfv LEFT JOIN " . DB_PREFIX . "custom_field_value_description cfvd ON (cfv.custom_field_value_id = cfvd.custom_field_value_id) WHERE cfv.custom_field_value_id = '" . (int)$custom_field_value_id . "' AND cfvd.language_id = '" . (int)$this->config->get('config_language_id') . "'"); return $query->row; } - public function getCustomFieldValues(int $custom_field_id): array { + public function getCustomFieldValues(int $custom_field_id) { $custom_field_value_data = []; $custom_field_value_query = $this->db->query("SELECT * FROM " . DB_PREFIX . "custom_field_value cfv LEFT JOIN " . DB_PREFIX . "custom_field_value_description cfvd ON (cfv.custom_field_value_id = cfvd.custom_field_value_id) WHERE cfv.custom_field_id = '" . (int)$custom_field_id . "' AND cfvd.language_id = '" . (int)$this->config->get('config_language_id') . "' ORDER BY cfv.sort_order ASC"); @@ -170,13 +170,13 @@ public function getCustomFieldValues(int $custom_field_id): array { return $custom_field_value_data; } - public function getCustomFieldCustomerGroups(int $custom_field_id): array { + public function getCustomFieldCustomerGroups(int $custom_field_id) { $query = $this->db->query("SELECT * FROM `" . DB_PREFIX . "custom_field_customer_group` WHERE custom_field_id = '" . (int)$custom_field_id . "'"); return $query->rows; } - public function getCustomFieldValueDescriptions(int $custom_field_id): array { + public function getCustomFieldValueDescriptions(int $custom_field_id) { $custom_field_value_data = []; $custom_field_value_query = $this->db->query("SELECT * FROM " . DB_PREFIX . "custom_field_value WHERE custom_field_id = '" . (int)$custom_field_id . "'"); @@ -200,7 +200,7 @@ public function getCustomFieldValueDescriptions(int $custom_field_id): array { return $custom_field_value_data; } - public function getTotalCustomFields(): int { + public function getTotalCustomFields() { $query = $this->db->query("SELECT COUNT(*) AS total FROM `" . DB_PREFIX . "custom_field`"); return (int)$query->row['total']; diff --git a/upload/admin/model/customer/customer.php b/upload/admin/model/customer/customer.php index 4f7dece0..cbf5514a 100644 --- a/upload/admin/model/customer/customer.php +++ b/upload/admin/model/customer/customer.php @@ -1,6 +1,6 @@ db->query("INSERT INTO `" . DB_PREFIX . "customer` SET `customer_group_id` = '" . (int)$data['customer_group_id'] . "', `firstname` = '" . $this->db->escape($data['firstname']) . "', `lastname` = '" . $this->db->escape($data['lastname']) . "', `email` = '" . $this->db->escape($data['email']) . "', `telephone` = '" . $this->db->escape($data['telephone']) . "', `fax` = '" . $this->db->escape($data['fax']) . "', `custom_field` = '" . $this->db->escape(isset($data['custom_field']) ? json_encode($data['custom_field']) : '') . "', `newsletter` = '" . (int)$data['newsletter'] . "', `password` = '" . $this->db->escape(password_hash(html_entity_decode($data['password'], ENT_QUOTES, 'UTF-8'), PASSWORD_DEFAULT)) . "', `status` = '" . (bool)$data['status'] . "', `approved` = '" . (int)$data['approved'] . "', `safe` = '" . (int)$data['safe'] . "', `date_added` = NOW()"); $customer_id = $this->db->getLastId(); @@ -20,7 +20,7 @@ public function addCustomer(array $data): int { return (int)$customer_id; } - public function editCustomer(int $customer_id, array $data): void { + public function editCustomer(int $customer_id, array $data) { if (!isset($data['custom_field'])) { $data['custom_field'] = []; } @@ -50,11 +50,11 @@ public function editCustomer(int $customer_id, array $data): void { } } - public function editToken(int $customer_id, string $token): void { + public function editToken(int $customer_id, string $token) { $this->db->query("UPDATE `" . DB_PREFIX . "customer` SET `token` = '" . $this->db->escape($token) . "' WHERE `customer_id` = '" . (int)$customer_id . "'"); } - public function deleteCustomer(int $customer_id): void { + public function deleteCustomer(int $customer_id) { $this->db->query("DELETE FROM `" . DB_PREFIX . "customer` WHERE `customer_id` = '" . (int)$customer_id . "'"); $this->db->query("DELETE FROM `" . DB_PREFIX . "customer_activity` WHERE `customer_id` = '" . (int)$customer_id . "'"); $this->db->query("DELETE FROM `" . DB_PREFIX . "customer_reward` WHERE `customer_id` = '" . (int)$customer_id . "'"); @@ -64,19 +64,19 @@ public function deleteCustomer(int $customer_id): void { $this->db->query("DELETE FROM `" . DB_PREFIX . "address` WHERE `customer_id` = '" . (int)$customer_id . "'"); } - public function getCustomer(int $customer_id): array { + public function getCustomer(int $customer_id) { $query = $this->db->query("SELECT DISTINCT * FROM `" . DB_PREFIX . "customer` WHERE `customer_id` = '" . (int)$customer_id . "'"); return $query->row; } - public function getCustomerByEmail(string $email): array { + public function getCustomerByEmail(string $email) { $query = $this->db->query("SELECT DISTINCT * FROM `" . DB_PREFIX . "customer` WHERE LCASE(email) = '" . $this->db->escape(utf8_strtolower($email)) . "'"); return $query->row; } - public function getCustomers(array $data = []): array { + public function getCustomers(array $data = []) { $sql = "SELECT *, CONCAT(c.firstname, ' ', c.lastname) AS name, cgd.name AS customer_group FROM " . DB_PREFIX . "customer c LEFT JOIN " . DB_PREFIX . "customer_group_description cgd ON (c.customer_group_id = cgd.customer_group_id) WHERE cgd.language_id = '" . (int)$this->config->get('config_language_id') . "'"; if (!empty($data['filter_name'])) { @@ -150,7 +150,7 @@ public function getCustomers(array $data = []): array { return $query->rows; } - public function approve(int $customer_id): void { + public function approve(int $customer_id) { $customer_info = $this->getCustomer($customer_id); if ($customer_info) { @@ -207,7 +207,7 @@ public function approve(int $customer_id): void { } } - public function getAddress(int $address_id): array { + public function getAddress(int $address_id) { $address_query = $this->db->query("SELECT * FROM " . DB_PREFIX . "address WHERE address_id = '" . (int)$address_id . "'"); if ($address_query->num_rows) { @@ -260,7 +260,7 @@ public function getAddress(int $address_id): array { return []; } - public function getAddresses(int $customer_id): array { + public function getAddresses(int $customer_id) { $address_data = []; $query = $this->db->query("SELECT address_id FROM " . DB_PREFIX . "address WHERE customer_id = '" . (int)$customer_id . "'"); @@ -276,7 +276,7 @@ public function getAddresses(int $customer_id): array { return $address_data; } - public function getTotalCustomers(array $data = []): int { + public function getTotalCustomers(array $data = []) { $sql = "SELECT COUNT(*) AS total FROM " . DB_PREFIX . "customer c"; $implode = []; @@ -322,41 +322,41 @@ public function getTotalCustomers(array $data = []): int { return (int)$query->row['total']; } - public function getTotalCustomersAwaitingApproval(): int { + public function getTotalCustomersAwaitingApproval() { $query = $this->db->query("SELECT COUNT(*) AS total FROM " . DB_PREFIX . "customer WHERE status = '0' OR approved = '0'"); return (int)$query->row['total']; } - public function getTotalAddressesByCustomerId(int $customer_id): int { + public function getTotalAddressesByCustomerId(int $customer_id) { $query = $this->db->query("SELECT COUNT(*) AS total FROM " . DB_PREFIX . "address WHERE customer_id = '" . (int)$customer_id . "'"); return (int)$query->row['total']; } - public function getTotalAddressesByCountryId(int $country_id): int { + public function getTotalAddressesByCountryId(int $country_id) { $query = $this->db->query("SELECT COUNT(*) AS total FROM " . DB_PREFIX . "address WHERE country_id = '" . (int)$country_id . "'"); return (int)$query->row['total']; } - public function getTotalAddressesByZoneId(int $zone_id): int { + public function getTotalAddressesByZoneId(int $zone_id) { $query = $this->db->query("SELECT COUNT(*) AS total FROM " . DB_PREFIX . "address WHERE zone_id = '" . (int)$zone_id . "'"); return (int)$query->row['total']; } - public function getTotalCustomersByCustomerGroupId(int $customer_group_id): int { + public function getTotalCustomersByCustomerGroupId(int $customer_group_id) { $query = $this->db->query("SELECT COUNT(*) AS total FROM " . DB_PREFIX . "customer WHERE customer_group_id = '" . (int)$customer_group_id . "'"); return (int)$query->row['total']; } - public function addHistory(int $customer_id, string $comment): void { + public function addHistory(int $customer_id, string $comment) { $this->db->query("INSERT INTO " . DB_PREFIX . "customer_history SET customer_id = '" . (int)$customer_id . "', comment = '" . $this->db->escape(strip_tags($comment)) . "', date_added = NOW()"); } - public function getHistories(int $customer_id, int $start = 0, int $limit = 10): array { + public function getHistories(int $customer_id, int $start = 0, int $limit = 10) { if ($start < 0) { $start = 0; } @@ -370,13 +370,13 @@ public function getHistories(int $customer_id, int $start = 0, int $limit = 10): return $query->rows; } - public function getTotalHistories(int $customer_id): int { + public function getTotalHistories(int $customer_id) { $query = $this->db->query("SELECT COUNT(*) AS total FROM " . DB_PREFIX . "customer_history WHERE customer_id = '" . (int)$customer_id . "'"); return (int)$query->row['total']; } - public function addTransaction(int $customer_id, string $description = '', int $amount = 0, int $order_id = 0): void { + public function addTransaction(int $customer_id, string $description = '', int $amount = 0, int $order_id = 0) { $customer_info = $this->getCustomer($customer_id); if ($customer_info) { @@ -415,11 +415,11 @@ public function addTransaction(int $customer_id, string $description = '', int $ } } - public function deleteTransaction(int $order_id): void { + public function deleteTransaction(int $order_id) { $this->db->query("DELETE FROM " . DB_PREFIX . "customer_transaction WHERE order_id = '" . (int)$order_id . "'"); } - public function getTransactions(int $customer_id, int $start = 0, int $limit = 10): array { + public function getTransactions(int $customer_id, int $start = 0, int $limit = 10) { if ($start < 0) { $start = 0; } @@ -433,25 +433,25 @@ public function getTransactions(int $customer_id, int $start = 0, int $limit = 1 return $query->rows; } - public function getTotalTransactions(int $customer_id): int { + public function getTotalTransactions(int $customer_id) { $query = $this->db->query("SELECT COUNT(*) AS total FROM " . DB_PREFIX . "customer_transaction WHERE customer_id = '" . (int)$customer_id . "'"); return (int)$query->row['total']; } - public function getTransactionTotal(int $customer_id): float { + public function getTransactionTotal(int $customer_id) { $query = $this->db->query("SELECT SUM(amount) AS total FROM " . DB_PREFIX . "customer_transaction WHERE customer_id = '" . (int)$customer_id . "'"); return (float)$query->row['total']; } - public function getTotalTransactionsByOrderId(int $order_id): int { + public function getTotalTransactionsByOrderId(int $order_id) { $query = $this->db->query("SELECT COUNT(*) AS total FROM " . DB_PREFIX . "customer_transaction WHERE order_id = '" . (int)$order_id . "'"); return (int)$query->row['total']; } - public function addReward(int $customer_id, string $description = '', int $points = 0, int $order_id = 0): void { + public function addReward(int $customer_id, string $description = '', int $points = 0, int $order_id = 0) { $customer_info = $this->getCustomer($customer_id); if ($customer_info) { @@ -490,35 +490,35 @@ public function addReward(int $customer_id, string $description = '', int $point } } - public function deleteReward(int $order_id): void { + public function deleteReward(int $order_id) { $this->db->query("DELETE FROM " . DB_PREFIX . "customer_reward WHERE order_id = '" . (int)$order_id . "' AND points > 0"); } - public function getRewards(int $customer_id, int $start = 0, int $limit = 10): array { + public function getRewards(int $customer_id, int $start = 0, int $limit = 10) { $query = $this->db->query("SELECT * FROM " . DB_PREFIX . "customer_reward WHERE customer_id = '" . (int)$customer_id . "' ORDER BY date_added DESC LIMIT " . (int)$start . "," . (int)$limit); return $query->rows; } - public function getTotalRewards(int $customer_id): int { + public function getTotalRewards(int $customer_id) { $query = $this->db->query("SELECT COUNT(*) AS total FROM " . DB_PREFIX . "customer_reward WHERE customer_id = '" . (int)$customer_id . "'"); return (int)$query->row['total']; } - public function getRewardTotal(int $customer_id): int { + public function getRewardTotal(int $customer_id) { $query = $this->db->query("SELECT SUM(points) AS total FROM " . DB_PREFIX . "customer_reward WHERE customer_id = '" . (int)$customer_id . "'"); return (int)$query->row['total']; } - public function getTotalCustomerRewardsByOrderId(int $order_id): int { + public function getTotalCustomerRewardsByOrderId(int $order_id) { $query = $this->db->query("SELECT COUNT(*) AS total FROM " . DB_PREFIX . "customer_reward WHERE order_id = '" . (int)$order_id . "' AND points > 0"); return (int)$query->row['total']; } - public function getIps(int $customer_id, int $start = 0, int $limit = 10): array { + public function getIps(int $customer_id, int $start = 0, int $limit = 10) { if ($start < 0) { $start = 0; } @@ -531,25 +531,25 @@ public function getIps(int $customer_id, int $start = 0, int $limit = 10): array return $query->rows; } - public function getTotalIps(int $customer_id): int { + public function getTotalIps(int $customer_id) { $query = $this->db->query("SELECT COUNT(*) AS total FROM " . DB_PREFIX . "customer_ip WHERE customer_id = '" . (int)$customer_id . "'"); return (int)$query->row['total']; } - public function getTotalCustomersByIp(string $ip): int { + public function getTotalCustomersByIp(string $ip) { $query = $this->db->query("SELECT COUNT(*) AS total FROM " . DB_PREFIX . "customer_ip WHERE ip = '" . $this->db->escape($ip) . "'"); return (int)$query->row['total']; } - public function getTotalLoginAttempts(string $email): array { + public function getTotalLoginAttempts(string $email) { $query = $this->db->query("SELECT * FROM `" . DB_PREFIX . "customer_login` WHERE `email` = '" . $this->db->escape($email) . "'"); return $query->row; } - public function deleteLoginAttempts(string $email): void { + public function deleteLoginAttempts(string $email) { $this->db->query("DELETE FROM `" . DB_PREFIX . "customer_login` WHERE `email` = '" . $this->db->escape($email) . "'"); } } diff --git a/upload/admin/model/customer/customer_group.php b/upload/admin/model/customer/customer_group.php index 962ec27c..0bb07c83 100644 --- a/upload/admin/model/customer/customer_group.php +++ b/upload/admin/model/customer/customer_group.php @@ -1,6 +1,6 @@ db->query("INSERT INTO " . DB_PREFIX . "customer_group SET approval = '" . (int)$data['approval'] . "', sort_order = '" . (int)$data['sort_order'] . "'"); $customer_group_id = $this->db->getLastId(); @@ -12,7 +12,7 @@ public function addCustomerGroup(array $data): int { return $customer_group_id; } - public function editCustomerGroup(int $customer_group_id, array $data): void { + public function editCustomerGroup(int $customer_group_id, array $data) { $this->db->query("UPDATE " . DB_PREFIX . "customer_group SET approval = '" . (int)$data['approval'] . "', sort_order = '" . (int)$data['sort_order'] . "' WHERE customer_group_id = '" . (int)$customer_group_id . "'"); $this->db->query("DELETE FROM " . DB_PREFIX . "customer_group_description WHERE customer_group_id = '" . (int)$customer_group_id . "'"); @@ -22,7 +22,7 @@ public function editCustomerGroup(int $customer_group_id, array $data): void { } } - public function deleteCustomerGroup(int $customer_group_id): void { + public function deleteCustomerGroup(int $customer_group_id) { $this->db->query("DELETE FROM " . DB_PREFIX . "customer_group WHERE customer_group_id = '" . (int)$customer_group_id . "'"); $this->db->query("DELETE FROM " . DB_PREFIX . "customer_group_description WHERE customer_group_id = '" . (int)$customer_group_id . "'"); $this->db->query("DELETE FROM " . DB_PREFIX . "product_discount WHERE customer_group_id = '" . (int)$customer_group_id . "'"); @@ -31,13 +31,13 @@ public function deleteCustomerGroup(int $customer_group_id): void { $this->db->query("DELETE FROM " . DB_PREFIX . "tax_rate_to_customer_group WHERE customer_group_id = '" . (int)$customer_group_id . "'"); } - public function getCustomerGroup(int $customer_group_id): array { + public function getCustomerGroup(int $customer_group_id) { $query = $this->db->query("SELECT DISTINCT * FROM " . DB_PREFIX . "customer_group cg LEFT JOIN " . DB_PREFIX . "customer_group_description cgd ON (cg.customer_group_id = cgd.customer_group_id) WHERE cg.customer_group_id = '" . (int)$customer_group_id . "' AND cgd.language_id = '" . (int)$this->config->get('config_language_id') . "'"); return $query->row; } - public function getCustomerGroups(array $data = []): array { + public function getCustomerGroups(array $data = []) { $sql = "SELECT * FROM " . DB_PREFIX . "customer_group cg LEFT JOIN " . DB_PREFIX . "customer_group_description cgd ON (cg.customer_group_id = cgd.customer_group_id) WHERE cgd.language_id = '" . (int)$this->config->get('config_language_id') . "'"; $sort_data = [ @@ -74,7 +74,7 @@ public function getCustomerGroups(array $data = []): array { return $query->rows; } - public function getCustomerGroupDescriptions(int $customer_group_id): array { + public function getCustomerGroupDescriptions(int $customer_group_id) { $customer_group_data = []; $query = $this->db->query("SELECT * FROM " . DB_PREFIX . "customer_group_description WHERE customer_group_id = '" . (int)$customer_group_id . "'"); @@ -89,7 +89,7 @@ public function getCustomerGroupDescriptions(int $customer_group_id): array { return $customer_group_data; } - public function getTotalCustomerGroups(): int { + public function getTotalCustomerGroups() { $query = $this->db->query("SELECT COUNT(*) AS total FROM " . DB_PREFIX . "customer_group"); return (int)$query->row['total']; diff --git a/upload/admin/model/extension/payment/amazon_login_pay.php b/upload/admin/model/extension/payment/amazon_login_pay.php index c6593ab7..bd4fe65f 100644 --- a/upload/admin/model/extension/payment/amazon_login_pay.php +++ b/upload/admin/model/extension/payment/amazon_login_pay.php @@ -1,6 +1,6 @@ db->query(" CREATE TABLE `" . DB_PREFIX . "amazon_login_pay_order` ( `amazon_login_pay_order_id` INT(11) NOT NULL AUTO_INCREMENT, @@ -45,13 +45,13 @@ public function install(): void { "); } - public function uninstall(): void { + public function uninstall() { $this->db->query("DROP TABLE IF EXISTS `" . DB_PREFIX . "amazon_login_pay_order`;"); $this->db->query("DROP TABLE IF EXISTS `" . DB_PREFIX . "amazon_login_pay_order_total_tax`;"); $this->db->query("DROP TABLE IF EXISTS `" . DB_PREFIX . "amazon_login_pay_order_transaction`;"); } - public function getOrder(int $order_id): array { + public function getOrder(int $order_id) { $query = $this->db->query("SELECT * FROM `" . DB_PREFIX . "amazon_login_pay_order` WHERE `order_id` = '" . (int)$order_id . "' LIMIT 1"); @@ -65,7 +65,7 @@ public function getOrder(int $order_id): array { } } - public function cancel($amazon_login_pay_order): array { + public function cancel($amazon_login_pay_order) { $total_captured = $this->getTotalCaptured($amazon_login_pay_order['amazon_login_pay_order_id']); if (!empty($amazon_login_pay_order) && $total_captured == 0) { diff --git a/upload/admin/model/tool/backup.php b/upload/admin/model/tool/backup.php index e6d8623c..0bdf74ea 100644 --- a/upload/admin/model/tool/backup.php +++ b/upload/admin/model/tool/backup.php @@ -1,6 +1,6 @@ db->query("SHOW TABLES FROM `" . DB_DATABASE . "`"); @@ -15,7 +15,7 @@ public function getTables(): array { return $table_data; } - public function backup(array $tables): string { + public function backup(array $tables) { $output = ''; foreach ($tables as $table) { diff --git a/upload/admin/model/tool/image.php b/upload/admin/model/tool/image.php index 8b0262ce..80e4b2d8 100644 --- a/upload/admin/model/tool/image.php +++ b/upload/admin/model/tool/image.php @@ -1,6 +1,6 @@ db->query("INSERT INTO `" . DB_PREFIX . "upload` SET `name` = '" . $this->db->escape($name) . "', `filename` = '" . $this->db->escape($filename) . "', `code` = '" . $this->db->escape($code) . "', `date_added` = NOW()"); @@ -8,23 +8,23 @@ public function addUpload(string $name, string $filename): string { return $code; } - public function deleteUpload(int $upload_id): void { + public function deleteUpload(int $upload_id) { $this->db->query("DELETE FROM " . DB_PREFIX . "upload WHERE upload_id = '" . (int)$upload_id . "'"); } - public function getUpload(int $upload_id): array { + public function getUpload(int $upload_id) { $query = $this->db->query("SELECT * FROM `" . DB_PREFIX . "upload` WHERE upload_id = '" . (int)$upload_id . "'"); return $query->row; } - public function getUploadByCode(string $code): array { + public function getUploadByCode(string $code) { $query = $this->db->query("SELECT * FROM " . DB_PREFIX . "upload WHERE code = '" . $this->db->escape($code) . "'"); return $query->row; } - public function getUploads(array $data = []): array { + public function getUploads(array $data = []) { $sql = "SELECT * FROM " . DB_PREFIX . "upload"; $implode = []; @@ -80,7 +80,7 @@ public function getUploads(array $data = []): array { return $query->rows; } - public function getTotalUploads(array $data = []): int { + public function getTotalUploads(array $data = []) { $sql = "SELECT COUNT(*) AS total FROM " . DB_PREFIX . "upload"; $implode = []; diff --git a/upload/admin/model/user/api.php b/upload/admin/model/user/api.php index c2ba635e..1a9fd6b4 100644 --- a/upload/admin/model/user/api.php +++ b/upload/admin/model/user/api.php @@ -1,6 +1,6 @@ db->query("INSERT INTO `" . DB_PREFIX . "api` SET name = '" . $this->db->escape($data['name']) . "', `key` = '" . $this->db->escape($data['key']) . "', status = '" . (bool)$data['status'] . "', date_added = NOW(), date_modified = NOW()"); $api_id = $this->db->getLastId(); @@ -16,7 +16,7 @@ public function addApi(array $data): int { return $api_id; } - public function editApi(int $api_id, array $data): void { + public function editApi(int $api_id, array $data) { $this->db->query("UPDATE `" . DB_PREFIX . "api` SET name = '" . $this->db->escape($data['name']) . "', `key` = '" . $this->db->escape($data['key']) . "', status = '" . (bool)$data['status'] . "', date_modified = NOW() WHERE api_id = '" . (int)$api_id . "'"); $this->db->query("DELETE FROM " . DB_PREFIX . "api_ip WHERE api_id = '" . (int)$api_id . "'"); @@ -30,17 +30,17 @@ public function editApi(int $api_id, array $data): void { } } - public function deleteApi(int $api_id): void { + public function deleteApi(int $api_id) { $this->db->query("DELETE FROM `" . DB_PREFIX . "api` WHERE api_id = '" . (int)$api_id . "'"); } - public function getApi(int $api_id): array { + public function getApi(int $api_id) { $query = $this->db->query("SELECT * FROM `" . DB_PREFIX . "api` WHERE api_id = '" . (int)$api_id . "'"); return $query->row; } - public function getApis(array $data = []): array { + public function getApis(array $data = []) { $sql = "SELECT * FROM `" . DB_PREFIX . "api`"; $sort_data = [ @@ -79,33 +79,33 @@ public function getApis(array $data = []): array { return $query->rows; } - public function getTotalApis(): int { + public function getTotalApis() { $query = $this->db->query("SELECT COUNT(*) AS total FROM `" . DB_PREFIX . "api`"); return (int)$query->row['total']; } - public function addApiIp(int $api_id, string $ip): void { + public function addApiIp(int $api_id, string $ip) { $this->db->query("INSERT INTO `" . DB_PREFIX . "api_ip` SET `api_id` = '" . (int)$api_id . "', `ip` = '" . $this->db->escape($ip) . "'"); } - public function getApiIps(int $api_id): array { + public function getApiIps(int $api_id) { $query = $this->db->query("SELECT * FROM `" . DB_PREFIX . "api_ip` WHERE `api_id` = '" . (int)$api_id . "'"); return $query->rows; } - public function getApiSessions(int $api_id): array { + public function getApiSessions(int $api_id) { $query = $this->db->query("SELECT * FROM `" . DB_PREFIX . "api_session` WHERE `api_id` = '" . (int)$api_id . "'"); return $query->rows; } - public function addApiSession(int $api_id, array $data): void { + public function addApiSession(int $api_id, array $data) { $this->db->query("INSERT INTO `" . DB_PREFIX . "api_session` SET `api_id` = '" . (int)$api_id . "', `token` = '" . $this->db->escape($data['token']) . "', `date_added` = NOW(), `date_modified` = NOW()"); } - public function deleteApiSession(int $api_session_id): void { + public function deleteApiSession(int $api_session_id) { $this->db->query("DELETE FROM `" . DB_PREFIX . "api_session` WHERE `api_session_id` = '" . (int)$api_session_id . "'"); } } diff --git a/upload/catalog/controller/account/account.php b/upload/catalog/controller/account/account.php index f86819bc..f54c87a4 100644 --- a/upload/catalog/controller/account/account.php +++ b/upload/catalog/controller/account/account.php @@ -1,6 +1,6 @@ customer->isLogged()) { $this->session->data['redirect'] = $this->url->link('account/account', '', true); @@ -95,7 +95,7 @@ public function index(): void { $this->response->setOutput($this->load->view('account/account', $data)); } - public function country(): void { + public function country() { $json = []; $this->load->model('localisation/country'); diff --git a/upload/catalog/controller/account/address.php b/upload/catalog/controller/account/address.php index 77147251..4447bb52 100644 --- a/upload/catalog/controller/account/address.php +++ b/upload/catalog/controller/account/address.php @@ -2,7 +2,7 @@ class ControllerAccountAddress extends Controller { private $error = []; - public function index(): void { + public function index() { if (!$this->customer->isLogged()) { $this->session->data['redirect'] = $this->url->link('account/address', '', true); @@ -18,7 +18,7 @@ public function index(): void { $this->getList(); } - public function add(): void { + public function add() { if (!$this->customer->isLogged()) { $this->session->data['redirect'] = $this->url->link('account/address', '', true); @@ -59,7 +59,7 @@ public function add(): void { $this->getForm(); } - public function edit(): void { + public function edit() { if (!$this->customer->isLogged()) { $this->session->data['redirect'] = $this->url->link('account/address', '', true); @@ -116,7 +116,7 @@ public function edit(): void { $this->getForm(); } - public function delete(): void { + public function delete() { if (!$this->customer->isLogged()) { $this->session->data['redirect'] = $this->url->link('account/address', '', true); @@ -166,7 +166,7 @@ public function delete(): void { $this->getList(); } - protected function getList(): void { + protected function getList() { $data['breadcrumbs'][] = [ 'text' => $this->language->get('text_home'), 'href' => $this->url->link('common/home') @@ -264,7 +264,7 @@ protected function getList(): void { $this->response->setOutput($this->load->view('account/address_list', $data)); } - protected function getForm(): void { + protected function getForm() { $data['breadcrumbs'] = []; $data['breadcrumbs'][] = [ diff --git a/upload/catalog/controller/account/download.php b/upload/catalog/controller/account/download.php index 22806015..26e2b7ff 100644 --- a/upload/catalog/controller/account/download.php +++ b/upload/catalog/controller/account/download.php @@ -1,6 +1,6 @@ customer->isLogged()) { $this->session->data['redirect'] = $this->url->link('account/download', '', true); @@ -111,7 +111,7 @@ public function index(): void { $this->response->setOutput($this->load->view('account/download', $data)); } - public function download(): void { + public function download() { if (!$this->customer->isLogged()) { $this->session->data['redirect'] = $this->url->link('account/download', '', true); diff --git a/upload/catalog/controller/account/edit.php b/upload/catalog/controller/account/edit.php index 8259645b..b01a4929 100644 --- a/upload/catalog/controller/account/edit.php +++ b/upload/catalog/controller/account/edit.php @@ -2,7 +2,7 @@ class ControllerAccountEdit extends Controller { private $error = []; - public function index(): void { + public function index() { if (!$this->customer->isLogged()) { $this->session->data['redirect'] = $this->url->link('account/edit', '', true); diff --git a/upload/catalog/controller/account/forgotten.php b/upload/catalog/controller/account/forgotten.php index 6b447e69..738d9ca6 100644 --- a/upload/catalog/controller/account/forgotten.php +++ b/upload/catalog/controller/account/forgotten.php @@ -2,7 +2,7 @@ class ControllerAccountForgotten extends Controller { private $error = []; - public function index(): void { + public function index() { if ($this->customer->isLogged()) { $this->response->redirect($this->url->link('account/account', '', true)); } diff --git a/upload/catalog/controller/account/login.php b/upload/catalog/controller/account/login.php index 3aaa1c6b..6e31c28f 100644 --- a/upload/catalog/controller/account/login.php +++ b/upload/catalog/controller/account/login.php @@ -2,7 +2,7 @@ class ControllerAccountLogin extends Controller { private $error = []; - public function index(): void { + public function index() { $this->load->model('account/customer'); // Login override for admin users diff --git a/upload/catalog/controller/account/logout.php b/upload/catalog/controller/account/logout.php index ca3d07e9..3bcf43aa 100644 --- a/upload/catalog/controller/account/logout.php +++ b/upload/catalog/controller/account/logout.php @@ -1,6 +1,6 @@ customer->isLogged()) { $this->customer->logout(); diff --git a/upload/catalog/controller/account/newsletter.php b/upload/catalog/controller/account/newsletter.php index 4ff75a48..2a71d691 100644 --- a/upload/catalog/controller/account/newsletter.php +++ b/upload/catalog/controller/account/newsletter.php @@ -1,6 +1,6 @@ customer->isLogged()) { $this->session->data['redirect'] = $this->url->link('account/newsletter', '', true); diff --git a/upload/catalog/controller/account/order.php b/upload/catalog/controller/account/order.php index ff11064c..8cd5d745 100644 --- a/upload/catalog/controller/account/order.php +++ b/upload/catalog/controller/account/order.php @@ -1,6 +1,6 @@ customer->isLogged()) { $this->session->data['redirect'] = $this->url->link('account/order', '', true); @@ -101,7 +101,7 @@ public function index(): void { $this->response->setOutput($this->load->view('account/order_list', $data)); } - public function info(): ?object { + public function info() { $this->load->language('account/order'); if (isset($this->request->get['order_id'])) { @@ -384,7 +384,7 @@ public function info(): ?object { } } - public function reorder(): void { + public function reorder() { $this->load->language('account/order'); if (isset($this->request->get['order_id'])) { diff --git a/upload/catalog/controller/account/password.php b/upload/catalog/controller/account/password.php index e699205c..889d4508 100644 --- a/upload/catalog/controller/account/password.php +++ b/upload/catalog/controller/account/password.php @@ -2,7 +2,7 @@ class ControllerAccountPassword extends Controller { private $error = []; - public function index(): void { + public function index() { if (!$this->customer->isLogged()) { $this->session->data['redirect'] = $this->url->link('account/password', '', true); diff --git a/upload/catalog/controller/account/recurring.php b/upload/catalog/controller/account/recurring.php index c736fdee..4725be44 100644 --- a/upload/catalog/controller/account/recurring.php +++ b/upload/catalog/controller/account/recurring.php @@ -1,6 +1,6 @@ customer->isLogged()) { $this->session->data['redirect'] = $this->url->link('account/recurring', '', true); @@ -99,7 +99,7 @@ public function index(): void { $this->response->setOutput($this->load->view('account/recurring_list', $data)); } - public function info(): void { + public function info() { $this->load->language('account/recurring'); if (isset($this->request->get['order_recurring_id'])) { diff --git a/upload/catalog/controller/account/register.php b/upload/catalog/controller/account/register.php index 56cc3346..b6b38a54 100644 --- a/upload/catalog/controller/account/register.php +++ b/upload/catalog/controller/account/register.php @@ -2,7 +2,7 @@ class ControllerAccountRegister extends Controller { private $error = []; - public function index(): void { + public function index() { if ($this->customer->isLogged()) { $this->response->redirect($this->url->link('account/account', '', true)); } @@ -449,7 +449,7 @@ private function validate() { return !$this->error; } - public function customfield(): void { + public function customfield() { $json = []; $this->load->model('account/custom_field'); diff --git a/upload/catalog/controller/account/reset.php b/upload/catalog/controller/account/reset.php index 0a9cc764..d6fb7e3c 100644 --- a/upload/catalog/controller/account/reset.php +++ b/upload/catalog/controller/account/reset.php @@ -2,7 +2,7 @@ class ControllerAccountReset extends Controller { private $error = []; - public function index(): ?object { + public function index() { if ($this->customer->isLogged()) { $this->response->redirect($this->url->link('account/account', '', true)); } diff --git a/upload/catalog/controller/account/return.php b/upload/catalog/controller/account/return.php index 60549e82..72642377 100644 --- a/upload/catalog/controller/account/return.php +++ b/upload/catalog/controller/account/return.php @@ -2,7 +2,7 @@ class ControllerAccountReturn extends Controller { private $error = []; - public function index(): void { + public function index() { if (!$this->customer->isLogged()) { $this->session->data['redirect'] = $this->url->link('account/return', '', true); diff --git a/upload/catalog/controller/account/reward.php b/upload/catalog/controller/account/reward.php index 0e7d1cd6..b5d73d34 100644 --- a/upload/catalog/controller/account/reward.php +++ b/upload/catalog/controller/account/reward.php @@ -1,6 +1,6 @@ customer->isLogged()) { $this->session->data['redirect'] = $this->url->link('account/reward', '', true); diff --git a/upload/catalog/controller/account/success.php b/upload/catalog/controller/account/success.php index 7be2b746..2ec4bd24 100644 --- a/upload/catalog/controller/account/success.php +++ b/upload/catalog/controller/account/success.php @@ -1,6 +1,6 @@ load->language('account/success'); $this->document->setTitle($this->language->get('heading_title')); diff --git a/upload/catalog/controller/account/transaction.php b/upload/catalog/controller/account/transaction.php index 8fa54bad..ed27711e 100644 --- a/upload/catalog/controller/account/transaction.php +++ b/upload/catalog/controller/account/transaction.php @@ -1,6 +1,6 @@ customer->isLogged()) { $this->session->data['redirect'] = $this->url->link('account/transaction', '', true); diff --git a/upload/catalog/controller/account/voucher.php b/upload/catalog/controller/account/voucher.php index bd62dcd2..18070b56 100644 --- a/upload/catalog/controller/account/voucher.php +++ b/upload/catalog/controller/account/voucher.php @@ -2,7 +2,7 @@ class ControllerAccountVoucher extends Controller { private $error = []; - public function index(): void { + public function index() { $this->load->language('account/voucher'); $this->document->setTitle($this->language->get('heading_title')); @@ -171,7 +171,7 @@ public function index(): void { $this->response->setOutput($this->load->view('account/voucher', $data)); } - public function success(): void { + public function success() { $this->load->language('account/voucher'); $this->document->setTitle($this->language->get('heading_title')); diff --git a/upload/catalog/controller/account/wishlist.php b/upload/catalog/controller/account/wishlist.php index 1b5866aa..8ea478a1 100644 --- a/upload/catalog/controller/account/wishlist.php +++ b/upload/catalog/controller/account/wishlist.php @@ -1,6 +1,6 @@ customer->isLogged()) { $this->session->data['redirect'] = $this->url->link('account/wishlist', '', true); @@ -128,7 +128,7 @@ public function index(): void { $this->response->setOutput($this->load->view('account/wishlist', $data)); } - public function add(): void { + public function add() { $this->load->language('account/wishlist'); $json = []; diff --git a/upload/catalog/controller/affiliate/account.php b/upload/catalog/controller/affiliate/account.php index 679ddf53..6b6fc160 100644 --- a/upload/catalog/controller/affiliate/account.php +++ b/upload/catalog/controller/affiliate/account.php @@ -1,6 +1,6 @@ affiliate->isLogged()) { $this->session->data['redirect'] = $this->url->link('affiliate/account', '', true); diff --git a/upload/catalog/controller/affiliate/edit.php b/upload/catalog/controller/affiliate/edit.php index af60e131..9fe1eb3e 100644 --- a/upload/catalog/controller/affiliate/edit.php +++ b/upload/catalog/controller/affiliate/edit.php @@ -2,7 +2,7 @@ class ControllerAffiliateEdit extends Controller { private $error = []; - public function index(): void { + public function index() { if (!$this->affiliate->isLogged()) { $this->session->data['redirect'] = $this->url->link('affiliate/edit', '', true); diff --git a/upload/catalog/controller/affiliate/forgotten.php b/upload/catalog/controller/affiliate/forgotten.php index 60935b6d..485b0341 100644 --- a/upload/catalog/controller/affiliate/forgotten.php +++ b/upload/catalog/controller/affiliate/forgotten.php @@ -2,7 +2,7 @@ class ControllerAffiliateForgotten extends Controller { private $error = []; - public function index(): void { + public function index() { if ($this->affiliate->isLogged()) { $this->response->redirect($this->url->link('affiliate/account', '', true)); } diff --git a/upload/catalog/controller/affiliate/login.php b/upload/catalog/controller/affiliate/login.php index 48d83c04..e6de547e 100644 --- a/upload/catalog/controller/affiliate/login.php +++ b/upload/catalog/controller/affiliate/login.php @@ -2,7 +2,7 @@ class ControllerAffiliateLogin extends Controller { private $error = []; - public function index(): void { + public function index() { if ($this->affiliate->isLogged()) { $this->response->redirect($this->url->link('affiliate/account', '', true)); } diff --git a/upload/catalog/controller/affiliate/logout.php b/upload/catalog/controller/affiliate/logout.php index ce181783..f62a16de 100644 --- a/upload/catalog/controller/affiliate/logout.php +++ b/upload/catalog/controller/affiliate/logout.php @@ -1,6 +1,6 @@ affiliate->isLogged()) { $this->affiliate->logout(); diff --git a/upload/catalog/controller/affiliate/password.php b/upload/catalog/controller/affiliate/password.php index ab34467d..b9fc98f3 100644 --- a/upload/catalog/controller/affiliate/password.php +++ b/upload/catalog/controller/affiliate/password.php @@ -2,7 +2,7 @@ class ControllerAffiliatePassword extends Controller { private $error = []; - public function index(): void { + public function index() { if (!$this->affiliate->isLogged()) { $this->session->data['redirect'] = $this->url->link('affiliate/password', '', true); diff --git a/upload/catalog/controller/affiliate/payment.php b/upload/catalog/controller/affiliate/payment.php index af264657..185942b3 100644 --- a/upload/catalog/controller/affiliate/payment.php +++ b/upload/catalog/controller/affiliate/payment.php @@ -2,7 +2,7 @@ class ControllerAffiliatePayment extends Controller { private $error = []; - public function index(): void { + public function index() { if (!$this->affiliate->isLogged()) { $this->session->data['redirect'] = $this->url->link('affiliate/payment', '', true); diff --git a/upload/catalog/controller/affiliate/register.php b/upload/catalog/controller/affiliate/register.php index 18ec3392..46bbe176 100644 --- a/upload/catalog/controller/affiliate/register.php +++ b/upload/catalog/controller/affiliate/register.php @@ -2,7 +2,7 @@ class ControllerAffiliateRegister extends Controller { private $error = []; - public function index(): void { + public function index() { if ($this->affiliate->isLogged()) { $this->response->redirect($this->url->link('affiliate/account', '', true)); } @@ -429,7 +429,7 @@ protected function validate() { return !$this->error; } - public function country(): void { + public function country() { $json = []; $this->load->model('localisation/country'); diff --git a/upload/catalog/controller/affiliate/success.php b/upload/catalog/controller/affiliate/success.php index 41c547ea..17dd71b1 100644 --- a/upload/catalog/controller/affiliate/success.php +++ b/upload/catalog/controller/affiliate/success.php @@ -1,6 +1,6 @@ load->language('affiliate/success'); $this->document->setTitle($this->language->get('heading_title')); diff --git a/upload/catalog/controller/affiliate/tracking.php b/upload/catalog/controller/affiliate/tracking.php index a895d8c5..8979371c 100644 --- a/upload/catalog/controller/affiliate/tracking.php +++ b/upload/catalog/controller/affiliate/tracking.php @@ -1,6 +1,6 @@ affiliate->isLogged()) { $this->session->data['redirect'] = $this->url->link('affiliate/tracking', '', true); diff --git a/upload/catalog/controller/affiliate/transaction.php b/upload/catalog/controller/affiliate/transaction.php index 2e9b3f00..fee0abe7 100644 --- a/upload/catalog/controller/affiliate/transaction.php +++ b/upload/catalog/controller/affiliate/transaction.php @@ -1,6 +1,6 @@ affiliate->isLogged()) { $this->session->data['redirect'] = $this->url->link('affiliate/transaction', '', true); diff --git a/upload/catalog/controller/api/cart.php b/upload/catalog/controller/api/cart.php index 737d85e1..b45f801b 100644 --- a/upload/catalog/controller/api/cart.php +++ b/upload/catalog/controller/api/cart.php @@ -1,6 +1,6 @@ load->language('api/cart'); $json = []; @@ -80,7 +80,7 @@ public function add(): void { $this->response->setOutput(json_encode($json)); } - public function edit(): void { + public function edit() { $this->load->language('api/cart'); $json = []; @@ -110,7 +110,7 @@ public function edit(): void { $this->response->setOutput(json_encode($json)); } - public function remove(): void { + public function remove() { $this->load->language('api/cart'); $json = []; @@ -145,7 +145,7 @@ public function remove(): void { $this->response->setOutput(json_encode($json)); } - public function products(): void { + public function products() { $this->load->language('api/cart'); $json = []; diff --git a/upload/catalog/controller/api/coupon.php b/upload/catalog/controller/api/coupon.php index e7bf4b3c..d6d85e87 100644 --- a/upload/catalog/controller/api/coupon.php +++ b/upload/catalog/controller/api/coupon.php @@ -1,6 +1,6 @@ load->language('api/coupon'); // Delete past coupon in case there is an error diff --git a/upload/catalog/controller/api/currency.php b/upload/catalog/controller/api/currency.php index 6adeee54..861810b1 100644 --- a/upload/catalog/controller/api/currency.php +++ b/upload/catalog/controller/api/currency.php @@ -1,6 +1,6 @@ load->language('api/currency'); $json = []; diff --git a/upload/catalog/controller/api/customer.php b/upload/catalog/controller/api/customer.php index 69154e50..3c0bce65 100644 --- a/upload/catalog/controller/api/customer.php +++ b/upload/catalog/controller/api/customer.php @@ -1,6 +1,6 @@ load->language('api/customer'); // Delete past customer in case there is an error diff --git a/upload/catalog/controller/api/login.php b/upload/catalog/controller/api/login.php index 768fca68..003330a1 100644 --- a/upload/catalog/controller/api/login.php +++ b/upload/catalog/controller/api/login.php @@ -1,6 +1,6 @@ load->language('api/login'); $json = []; diff --git a/upload/catalog/controller/api/order.php b/upload/catalog/controller/api/order.php index fbc2456b..8db7ff59 100644 --- a/upload/catalog/controller/api/order.php +++ b/upload/catalog/controller/api/order.php @@ -1,6 +1,6 @@ load->language('api/order'); $json = []; @@ -368,7 +368,7 @@ public function add(): void { $this->response->setOutput(json_encode($json)); } - public function edit(): void { + public function edit() { $this->load->language('api/order'); $json = []; @@ -712,7 +712,7 @@ public function edit(): void { $this->response->setOutput(json_encode($json)); } - public function delete(): void { + public function delete() { $this->load->language('api/order'); $json = []; @@ -750,7 +750,7 @@ public function delete(): void { $this->response->setOutput(json_encode($json)); } - public function info(): void { + public function info() { $this->load->language('api/order'); $json = []; @@ -788,7 +788,7 @@ public function info(): void { $this->response->setOutput(json_encode($json)); } - public function history(): void { + public function history() { $this->load->language('api/order'); $json = []; diff --git a/upload/catalog/controller/api/payment.php b/upload/catalog/controller/api/payment.php index ff17dec1..e2cc3da5 100644 --- a/upload/catalog/controller/api/payment.php +++ b/upload/catalog/controller/api/payment.php @@ -1,6 +1,6 @@ load->language('api/payment'); // Delete old payment address, payment methods and method so not to cause any issues if there is an error @@ -143,7 +143,7 @@ public function address(): void { $this->response->setOutput(json_encode($json)); } - public function methods(): void { + public function methods() { $this->load->language('api/payment'); // Delete past shipping methods and method just in case there is an error @@ -248,7 +248,7 @@ public function methods(): void { $this->response->setOutput(json_encode($json)); } - public function method(): void { + public function method() { $this->load->language('api/payment'); // Delete old payment method so not to cause any issues if there is an error diff --git a/upload/catalog/controller/api/reward.php b/upload/catalog/controller/api/reward.php index 348fe694..43b0539b 100644 --- a/upload/catalog/controller/api/reward.php +++ b/upload/catalog/controller/api/reward.php @@ -1,6 +1,6 @@ load->language('api/reward'); // Delete past reward in case there is an error @@ -51,7 +51,7 @@ public function index(): void { $this->response->setOutput(json_encode($json)); } - public function maximum(): void { + public function maximum() { $this->load->language('api/reward'); $json = []; @@ -79,7 +79,7 @@ public function maximum(): void { $this->response->setOutput(json_encode($json)); } - public function available(): void { + public function available() { $this->load->language('api/reward'); $json = []; diff --git a/upload/catalog/controller/api/shipping.php b/upload/catalog/controller/api/shipping.php index c113c0ca..543fed53 100644 --- a/upload/catalog/controller/api/shipping.php +++ b/upload/catalog/controller/api/shipping.php @@ -1,6 +1,6 @@ load->language('api/shipping'); // Delete old shipping address, shipping methods and method so not to cause any issues if there is an error @@ -145,7 +145,7 @@ public function address(): void { $this->response->setOutput(json_encode($json)); } - public function methods(): void { + public function methods() { $this->load->language('api/shipping'); // Delete past shipping methods and method just in case there is an error @@ -215,7 +215,7 @@ public function methods(): void { $this->response->setOutput(json_encode($json)); } - public function method(): void { + public function method() { $this->load->language('api/shipping'); // Delete old shipping method so not to cause any issues if there is an error diff --git a/upload/catalog/controller/api/voucher.php b/upload/catalog/controller/api/voucher.php index ba96ff3a..27f7ae63 100644 --- a/upload/catalog/controller/api/voucher.php +++ b/upload/catalog/controller/api/voucher.php @@ -1,6 +1,6 @@ load->language('api/voucher'); // Delete past voucher in case there is an error @@ -41,7 +41,7 @@ public function index(): void { $this->response->setOutput(json_encode($json)); } - public function add(): void { + public function add() { $this->load->language('api/voucher'); $json = []; diff --git a/upload/catalog/controller/checkout/cart.php b/upload/catalog/controller/checkout/cart.php index e0e24c77..9e42c83d 100644 --- a/upload/catalog/controller/checkout/cart.php +++ b/upload/catalog/controller/checkout/cart.php @@ -1,6 +1,6 @@ load->language('checkout/cart'); $this->document->setTitle($this->language->get('heading_title')); @@ -281,7 +281,7 @@ public function index(): void { } } - public function add(): void { + public function add() { $this->load->language('checkout/cart'); $json = []; @@ -402,7 +402,7 @@ public function add(): void { $this->response->setOutput(json_encode($json)); } - public function edit(): void { + public function edit() { $this->load->language('checkout/cart'); $json = []; @@ -428,7 +428,7 @@ public function edit(): void { $this->response->setOutput(json_encode($json)); } - public function remove(): void { + public function remove() { $this->load->language('checkout/cart'); $json = []; diff --git a/upload/catalog/controller/checkout/checkout.php b/upload/catalog/controller/checkout/checkout.php index 71e017a1..f84b4481 100644 --- a/upload/catalog/controller/checkout/checkout.php +++ b/upload/catalog/controller/checkout/checkout.php @@ -1,6 +1,6 @@ cart->hasProducts() && empty($this->session->data['vouchers'])) || (!$this->cart->hasStock() && !$this->config->get('config_stock_checkout'))) { $this->response->redirect($this->url->link('checkout/cart')); @@ -92,7 +92,7 @@ public function index(): void { $this->response->setOutput($this->load->view('checkout/checkout', $data)); } - public function country(): void { + public function country() { $json = []; $this->load->model('localisation/country'); @@ -118,7 +118,7 @@ public function country(): void { $this->response->setOutput(json_encode($json)); } - public function customfield(): void { + public function customfield() { $json = []; $this->load->model('account/custom_field'); diff --git a/upload/catalog/controller/checkout/confirm.php b/upload/catalog/controller/checkout/confirm.php index 91d17a15..ebcf87d6 100644 --- a/upload/catalog/controller/checkout/confirm.php +++ b/upload/catalog/controller/checkout/confirm.php @@ -1,6 +1,6 @@ cart->hasShipping()) { diff --git a/upload/catalog/controller/checkout/failure.php b/upload/catalog/controller/checkout/failure.php index 2b2f9278..6f548392 100644 --- a/upload/catalog/controller/checkout/failure.php +++ b/upload/catalog/controller/checkout/failure.php @@ -1,6 +1,6 @@ load->language('checkout/failure'); $this->document->setTitle($this->language->get('heading_title')); diff --git a/upload/catalog/controller/checkout/guest.php b/upload/catalog/controller/checkout/guest.php index 814ad316..d2801d1d 100644 --- a/upload/catalog/controller/checkout/guest.php +++ b/upload/catalog/controller/checkout/guest.php @@ -1,6 +1,6 @@ load->language('checkout/checkout'); $data['text_select'] = $this->language->get('text_select'); @@ -171,7 +171,7 @@ public function index(): void { $this->response->setOutput($this->load->view('checkout/guest', $data)); } - public function save(): void { + public function save() { $this->load->language('checkout/checkout'); $json = []; diff --git a/upload/catalog/controller/checkout/guest_shipping.php b/upload/catalog/controller/checkout/guest_shipping.php index ffc5b2a7..7c4ef541 100644 --- a/upload/catalog/controller/checkout/guest_shipping.php +++ b/upload/catalog/controller/checkout/guest_shipping.php @@ -1,6 +1,6 @@ load->language('checkout/checkout'); $data['text_select'] = $this->language->get('text_select'); @@ -92,7 +92,7 @@ public function index(): void { $this->response->setOutput($this->load->view('checkout/guest_shipping', $data)); } - public function save(): void { + public function save() { $this->load->language('checkout/checkout'); $json = []; diff --git a/upload/catalog/controller/checkout/login.php b/upload/catalog/controller/checkout/login.php index af82769d..06053ac8 100644 --- a/upload/catalog/controller/checkout/login.php +++ b/upload/catalog/controller/checkout/login.php @@ -1,6 +1,6 @@ load->language('checkout/checkout'); $data['text_checkout_account'] = $this->language->get('text_checkout_account'); @@ -34,7 +34,7 @@ public function index(): void { $this->response->setOutput($this->load->view('checkout/login', $data)); } - public function save(): void { + public function save() { $this->load->language('checkout/checkout'); $json = []; diff --git a/upload/catalog/controller/checkout/payment_address.php b/upload/catalog/controller/checkout/payment_address.php index 7c189644..3e92bb84 100644 --- a/upload/catalog/controller/checkout/payment_address.php +++ b/upload/catalog/controller/checkout/payment_address.php @@ -1,6 +1,6 @@ load->language('checkout/checkout'); $data['text_address_existing'] = $this->language->get('text_address_existing'); @@ -62,7 +62,7 @@ public function index(): void { $this->response->setOutput($this->load->view('checkout/payment_address', $data)); } - public function save(): void { + public function save() { $this->load->language('checkout/checkout'); $json = []; diff --git a/upload/catalog/controller/checkout/payment_method.php b/upload/catalog/controller/checkout/payment_method.php index 18b35331..b8b9b8de 100644 --- a/upload/catalog/controller/checkout/payment_method.php +++ b/upload/catalog/controller/checkout/payment_method.php @@ -1,6 +1,6 @@ load->language('checkout/checkout'); if (isset($this->session->data['payment_address'])) { @@ -130,7 +130,7 @@ public function index(): void { $this->response->setOutput($this->load->view('checkout/payment_method', $data)); } - public function save(): void { + public function save() { $this->load->language('checkout/checkout'); $json = []; diff --git a/upload/catalog/controller/checkout/register.php b/upload/catalog/controller/checkout/register.php index 927fa58b..7a8ff721 100644 --- a/upload/catalog/controller/checkout/register.php +++ b/upload/catalog/controller/checkout/register.php @@ -1,6 +1,6 @@ load->language('checkout/checkout'); $data['text_checkout_payment_address'] = $this->language->get('text_checkout_payment_address'); @@ -101,7 +101,7 @@ public function index(): void { $this->response->setOutput($this->load->view('checkout/register', $data)); } - public function save(): void { + public function save() { $this->load->language('checkout/checkout'); $json = []; diff --git a/upload/catalog/controller/checkout/shipping_address.php b/upload/catalog/controller/checkout/shipping_address.php index 7bb67c25..dd433079 100644 --- a/upload/catalog/controller/checkout/shipping_address.php +++ b/upload/catalog/controller/checkout/shipping_address.php @@ -1,6 +1,6 @@ load->language('checkout/checkout'); $data['text_address_existing'] = $this->language->get('text_address_existing'); @@ -68,7 +68,7 @@ public function index(): void { $this->response->setOutput($this->load->view('checkout/shipping_address', $data)); } - public function save(): void { + public function save() { $this->load->language('checkout/checkout'); $json = []; diff --git a/upload/catalog/controller/checkout/shipping_method.php b/upload/catalog/controller/checkout/shipping_method.php index 4eb96b4d..3b61ad84 100644 --- a/upload/catalog/controller/checkout/shipping_method.php +++ b/upload/catalog/controller/checkout/shipping_method.php @@ -1,6 +1,6 @@ load->language('checkout/checkout'); if (isset($this->session->data['shipping_address'])) { @@ -72,7 +72,7 @@ public function index(): void { $this->response->setOutput($this->load->view('checkout/shipping_method', $data)); } - public function save(): void { + public function save() { $this->load->language('checkout/checkout'); $json = []; diff --git a/upload/catalog/controller/checkout/success.php b/upload/catalog/controller/checkout/success.php index 1d357bdf..f72a0043 100644 --- a/upload/catalog/controller/checkout/success.php +++ b/upload/catalog/controller/checkout/success.php @@ -1,6 +1,6 @@ load->language('checkout/success'); if (isset($this->session->data['order_id'])) { diff --git a/upload/catalog/controller/common/cart.php b/upload/catalog/controller/common/cart.php index 7347875e..a0ca8d1a 100644 --- a/upload/catalog/controller/common/cart.php +++ b/upload/catalog/controller/common/cart.php @@ -1,6 +1,6 @@ load->language('common/cart'); // Totals @@ -143,7 +143,7 @@ public function index(): string { return $this->load->view('common/cart', $data); } - public function info(): void { + public function info() { $this->response->setOutput($this->index()); } } diff --git a/upload/catalog/controller/common/column_left.php b/upload/catalog/controller/common/column_left.php index 5ea84f0a..1fe34ff9 100644 --- a/upload/catalog/controller/common/column_left.php +++ b/upload/catalog/controller/common/column_left.php @@ -1,6 +1,6 @@ load->model('design/layout'); if (isset($this->request->get['route'])) { diff --git a/upload/catalog/controller/common/column_right.php b/upload/catalog/controller/common/column_right.php index 4b5e6167..ee50d516 100644 --- a/upload/catalog/controller/common/column_right.php +++ b/upload/catalog/controller/common/column_right.php @@ -1,6 +1,6 @@ load->model('design/layout'); if (isset($this->request->get['route'])) { diff --git a/upload/catalog/controller/common/content_bottom.php b/upload/catalog/controller/common/content_bottom.php index 9b257160..3508f559 100644 --- a/upload/catalog/controller/common/content_bottom.php +++ b/upload/catalog/controller/common/content_bottom.php @@ -1,6 +1,6 @@ load->model('design/layout'); if (isset($this->request->get['route'])) { diff --git a/upload/catalog/controller/common/content_top.php b/upload/catalog/controller/common/content_top.php index 6fefa75f..53e459b7 100644 --- a/upload/catalog/controller/common/content_top.php +++ b/upload/catalog/controller/common/content_top.php @@ -1,6 +1,6 @@ load->model('design/layout'); if (isset($this->request->get['route'])) { diff --git a/upload/catalog/controller/common/currency.php b/upload/catalog/controller/common/currency.php index 7cb401ec..6959c227 100644 --- a/upload/catalog/controller/common/currency.php +++ b/upload/catalog/controller/common/currency.php @@ -1,6 +1,6 @@ load->language('common/currency'); $data['text_currency'] = $this->language->get('text_currency'); @@ -49,7 +49,7 @@ public function index(): string { return $this->load->view('common/currency', $data); } - public function currency(): void { + public function currency() { if (isset($this->request->post['code'])) { $this->session->data['currency'] = $this->request->post['code']; diff --git a/upload/catalog/controller/common/footer.php b/upload/catalog/controller/common/footer.php index 40b4f07a..b499e5fd 100644 --- a/upload/catalog/controller/common/footer.php +++ b/upload/catalog/controller/common/footer.php @@ -1,6 +1,6 @@ load->language('common/footer'); $data['scripts'] = $this->document->getScripts('footer'); diff --git a/upload/catalog/controller/common/header.php b/upload/catalog/controller/common/header.php index 705b69fb..84c04a6e 100644 --- a/upload/catalog/controller/common/header.php +++ b/upload/catalog/controller/common/header.php @@ -1,6 +1,6 @@ load->model('extension/extension'); diff --git a/upload/catalog/controller/common/home.php b/upload/catalog/controller/common/home.php index 4232a859..259156ba 100644 --- a/upload/catalog/controller/common/home.php +++ b/upload/catalog/controller/common/home.php @@ -1,6 +1,6 @@ document->setTitle($this->config->get('config_meta_title')); $this->document->setDescription($this->config->get('config_meta_description')); $this->document->setKeywords($this->config->get('config_meta_keyword')); diff --git a/upload/catalog/controller/common/language.php b/upload/catalog/controller/common/language.php index 9fda0809..31a2c34d 100644 --- a/upload/catalog/controller/common/language.php +++ b/upload/catalog/controller/common/language.php @@ -1,6 +1,6 @@ load->language('common/language'); $data['text_language'] = $this->language->get('text_language'); @@ -47,7 +47,7 @@ public function index(): string { return $this->load->view('common/language', $data); } - public function language(): void { + public function language() { if (isset($this->request->post['code'])) { $this->session->data['language'] = $this->request->post['code']; } diff --git a/upload/catalog/controller/common/maintenance.php b/upload/catalog/controller/common/maintenance.php index 141e9f22..3ffa11fe 100644 --- a/upload/catalog/controller/common/maintenance.php +++ b/upload/catalog/controller/common/maintenance.php @@ -1,6 +1,6 @@ load->language('common/maintenance'); $this->document->setTitle($this->language->get('heading_title')); diff --git a/upload/catalog/controller/common/search.php b/upload/catalog/controller/common/search.php index 1cc6c602..3c6dfda6 100644 --- a/upload/catalog/controller/common/search.php +++ b/upload/catalog/controller/common/search.php @@ -1,6 +1,6 @@ load->language('common/search'); $data['text_search'] = $this->language->get('text_search'); diff --git a/upload/catalog/controller/error/not_found.php b/upload/catalog/controller/error/not_found.php index d42ea668..f5876b61 100644 --- a/upload/catalog/controller/error/not_found.php +++ b/upload/catalog/controller/error/not_found.php @@ -1,6 +1,6 @@ load->language('error/not_found'); $this->document->setTitle($this->language->get('heading_title')); diff --git a/upload/catalog/controller/event/debug.php b/upload/catalog/controller/event/debug.php index 25aa4ff9..915066e9 100644 --- a/upload/catalog/controller/event/debug.php +++ b/upload/catalog/controller/event/debug.php @@ -1,13 +1,13 @@ session->data['debug'][$route] = microtime(); } } - public function after(string &$route, &$data, &$output): void { + public function after(string &$route, &$data, &$output) { if ($route == '') { // Add the route you want to test if (isset($this->session->data['debug'][$route])) { diff --git a/upload/catalog/controller/event/theme.php b/upload/catalog/controller/event/theme.php index 53cf2822..1fac5d7f 100644 --- a/upload/catalog/controller/event/theme.php +++ b/upload/catalog/controller/event/theme.php @@ -1,6 +1,6 @@ config->get($this->config->get('config_theme') . '_status')) { exit('Error: A theme has not been assigned to this store!'); } diff --git a/upload/catalog/controller/extension/analytics/google_analytics.php b/upload/catalog/controller/extension/analytics/google_analytics.php index 3f5d60fe..78e39d62 100644 --- a/upload/catalog/controller/extension/analytics/google_analytics.php +++ b/upload/catalog/controller/extension/analytics/google_analytics.php @@ -1,6 +1,6 @@ config->get('google_analytics_code'), ENT_QUOTES, 'UTF-8'); } } diff --git a/upload/catalog/controller/extension/credit_card/sagepay_direct.php b/upload/catalog/controller/extension/credit_card/sagepay_direct.php index 9a93ccc2..a3f87247 100644 --- a/upload/catalog/controller/extension/credit_card/sagepay_direct.php +++ b/upload/catalog/controller/extension/credit_card/sagepay_direct.php @@ -1,6 +1,6 @@ customer->isLogged()) { $this->session->data['redirect'] = $this->url->link('account/account', '', true); @@ -94,7 +94,7 @@ public function index(): void { $this->response->setOutput($this->load->view('extension/credit_card/sagepay_direct_list', $data)); } - public function add(): void { + public function add() { if (!$this->customer->isLogged()) { $this->session->data['redirect'] = $this->url->link('account/account', '', true); @@ -219,7 +219,7 @@ public function add(): void { $this->response->setOutput($this->load->view('extension/credit_card/sagepay_direct_form', $data)); } - public function delete(): void { + public function delete() { $this->load->language('extension/credit_card/sagepay_direct'); $this->load->model('extension/payment/sagepay_direct'); @@ -249,7 +249,7 @@ public function delete(): void { $this->response->redirect($this->url->link('acredit_card/sagepay_direct', '', true)); } - public function addCard(): void { + public function addCard() { $this->load->language('extension/credit_card/sagepay_direct'); $this->load->model('checkout/order'); $this->load->model('extension/payment/sagepay_direct'); diff --git a/upload/catalog/controller/extension/credit_card/sagepay_server.php b/upload/catalog/controller/extension/credit_card/sagepay_server.php index d80a5f32..d82ab4f1 100644 --- a/upload/catalog/controller/extension/credit_card/sagepay_server.php +++ b/upload/catalog/controller/extension/credit_card/sagepay_server.php @@ -1,6 +1,6 @@ customer->isLogged()) { $this->session->data['redirect'] = $this->url->link('account/account', '', true); @@ -95,7 +95,7 @@ public function index(): void { $this->response->setOutput($this->load->view('extension/credit_card/sagepay_server_list', $data)); } - public function delete(): void { + public function delete() { $this->load->language('extension/credit_card/sagepay_server'); $this->load->model('extension/payment/sagepay_server'); @@ -129,7 +129,7 @@ public function delete(): void { $this->response->redirect($this->url->link('extension/credit_card/sagepay_server', '', true)); } - public function addCard(): void { + public function addCard() { $this->load->language('extension/payment/sagepay_server'); $this->load->model('checkout/order'); @@ -175,7 +175,7 @@ public function addCard(): void { $this->response->setOutput(json_encode($json)); } - public function callback(): void { + public function callback() { $this->load->model('checkout/order'); $this->load->model('extension/payment/sagepay_server'); @@ -271,14 +271,14 @@ public function callback(): void { echo "RedirectURL=" . $success_page . $end_ln; } - public function success(): void { + public function success() { $this->load->model('extension/payment/sagepay_server'); $this->model_extension_payment_sagepay_server->logger('Success', ''); $this->session->data['success'] = 'Success'; $this->response->redirect($this->url->link('extension/credit_card/sagepay_server', '', true)); } - public function failure(): void { + public function failure() { $this->load->model('extension/payment/sagepay_server'); $this->model_extension_payment_sagepay_server->logger('Failure', ''); $this->session->data['error_warning'] = 'Failure'; diff --git a/upload/catalog/controller/extension/feed/google_base.php b/upload/catalog/controller/extension/feed/google_base.php index 9840c1bb..d2466490 100644 --- a/upload/catalog/controller/extension/feed/google_base.php +++ b/upload/catalog/controller/extension/feed/google_base.php @@ -1,6 +1,6 @@ config->get('google_base_status')) { $output = ''; $output .= ''; diff --git a/upload/catalog/controller/extension/feed/google_sitemap.php b/upload/catalog/controller/extension/feed/google_sitemap.php index 6d4dfca9..7d91c366 100644 --- a/upload/catalog/controller/extension/feed/google_sitemap.php +++ b/upload/catalog/controller/extension/feed/google_sitemap.php @@ -1,6 +1,6 @@ config->get('google_sitemap_status')) { $output = ''; $output .= ''; diff --git a/upload/catalog/controller/extension/module/account.php b/upload/catalog/controller/extension/module/account.php index dd4a1444..c6dcaa7d 100644 --- a/upload/catalog/controller/extension/module/account.php +++ b/upload/catalog/controller/extension/module/account.php @@ -1,6 +1,6 @@ load->language('extension/module/account'); $data['heading_title'] = $this->language->get('heading_title'); diff --git a/upload/catalog/controller/extension/module/affiliate.php b/upload/catalog/controller/extension/module/affiliate.php index 64a46547..c819e307 100644 --- a/upload/catalog/controller/extension/module/affiliate.php +++ b/upload/catalog/controller/extension/module/affiliate.php @@ -1,6 +1,6 @@ load->language('extension/module/affiliate'); $data['heading_title'] = $this->language->get('heading_title'); diff --git a/upload/catalog/controller/extension/module/amazon_login.php b/upload/catalog/controller/extension/module/amazon_login.php index 1224e414..e0c5827a 100644 --- a/upload/catalog/controller/extension/module/amazon_login.php +++ b/upload/catalog/controller/extension/module/amazon_login.php @@ -10,7 +10,7 @@ class ControllerExtensionModuleAmazonLogin extends Controller { /** * @return string */ - public function index(): string { + public function index() { $this->load->model('extension/payment/amazon_login_pay'); if ($this->config->get('amazon_login_pay_status') && $this->config->get('amazon_login_status') && !$this->customer->isLogged() && !empty($this->request->server['HTTPS'])) { @@ -58,7 +58,7 @@ public function index(): string { } } - public function login(): void { + public function login() { $this->load->model('extension/payment/amazon_login_pay'); $this->load->model('account/customer'); $this->load->model('account/customer_group'); @@ -197,7 +197,7 @@ public function login(): void { } } - public function logout(): void { + public function logout() { unset($this->session->data['lpa']); unset($this->session->data['access_token']); diff --git a/upload/catalog/controller/extension/module/amazon_pay.php b/upload/catalog/controller/extension/module/amazon_pay.php index 816f1e7a..b2965b69 100644 --- a/upload/catalog/controller/extension/module/amazon_pay.php +++ b/upload/catalog/controller/extension/module/amazon_pay.php @@ -10,7 +10,7 @@ class ControllerExtensionModuleAmazonPay extends Controller { /** * @return string */ - public function index(): string { + public function index() { $this->load->model('extension/payment/amazon_login_pay'); diff --git a/upload/catalog/controller/extension/module/banner.php b/upload/catalog/controller/extension/module/banner.php index d9661f0e..03f80358 100644 --- a/upload/catalog/controller/extension/module/banner.php +++ b/upload/catalog/controller/extension/module/banner.php @@ -1,6 +1,6 @@ load->model('design/banner'); diff --git a/upload/catalog/controller/extension/module/bestseller.php b/upload/catalog/controller/extension/module/bestseller.php index 5cfb59aa..10c7e515 100644 --- a/upload/catalog/controller/extension/module/bestseller.php +++ b/upload/catalog/controller/extension/module/bestseller.php @@ -1,6 +1,6 @@ load->language('extension/module/bestseller'); $data['heading_title'] = $this->language->get('heading_title'); diff --git a/upload/catalog/controller/extension/module/carousel.php b/upload/catalog/controller/extension/module/carousel.php index 6df291bb..8ddc8c34 100644 --- a/upload/catalog/controller/extension/module/carousel.php +++ b/upload/catalog/controller/extension/module/carousel.php @@ -1,6 +1,6 @@ load->model('design/banner'); diff --git a/upload/catalog/controller/extension/module/category.php b/upload/catalog/controller/extension/module/category.php index e47f3be7..4f711fa2 100644 --- a/upload/catalog/controller/extension/module/category.php +++ b/upload/catalog/controller/extension/module/category.php @@ -1,6 +1,6 @@ load->language('extension/module/category'); $data['heading_title'] = $this->language->get('heading_title'); diff --git a/upload/catalog/controller/extension/module/ebay_listing.php b/upload/catalog/controller/extension/module/ebay_listing.php index 596d3cf9..f89b904c 100644 --- a/upload/catalog/controller/extension/module/ebay_listing.php +++ b/upload/catalog/controller/extension/module/ebay_listing.php @@ -1,6 +1,6 @@ config->get('ebay_status') == 1) { $this->load->language('extension/module/ebay'); diff --git a/upload/catalog/controller/extension/module/featured.php b/upload/catalog/controller/extension/module/featured.php index 2dcd2633..32003327 100644 --- a/upload/catalog/controller/extension/module/featured.php +++ b/upload/catalog/controller/extension/module/featured.php @@ -1,6 +1,6 @@ load->language('extension/module/featured'); $data['heading_title'] = $setting['name']; diff --git a/upload/catalog/controller/extension/module/filter.php b/upload/catalog/controller/extension/module/filter.php index ddd1a934..78b7ce1c 100644 --- a/upload/catalog/controller/extension/module/filter.php +++ b/upload/catalog/controller/extension/module/filter.php @@ -1,6 +1,6 @@ request->get['path'])) { $parts = explode('_', (string)$this->request->get['path']); } else { diff --git a/upload/catalog/controller/extension/module/google_hangouts.php b/upload/catalog/controller/extension/module/google_hangouts.php index 66c9e137..4f8add53 100644 --- a/upload/catalog/controller/extension/module/google_hangouts.php +++ b/upload/catalog/controller/extension/module/google_hangouts.php @@ -1,6 +1,6 @@ load->language('extension/module/google_hangouts'); $data['heading_title'] = $this->language->get('heading_title'); diff --git a/upload/catalog/controller/extension/module/html.php b/upload/catalog/controller/extension/module/html.php index 96205370..9dcb7afd 100644 --- a/upload/catalog/controller/extension/module/html.php +++ b/upload/catalog/controller/extension/module/html.php @@ -1,6 +1,6 @@ config->get('config_language_id')])) { $data['heading_title'] = html_entity_decode($setting['module_description'][$this->config->get('config_language_id')]['title'], ENT_QUOTES, 'UTF-8'); $data['html'] = html_entity_decode($setting['module_description'][$this->config->get('config_language_id')]['description'], ENT_QUOTES, 'UTF-8'); diff --git a/upload/catalog/controller/extension/module/information.php b/upload/catalog/controller/extension/module/information.php index ee2442bc..6383dffa 100644 --- a/upload/catalog/controller/extension/module/information.php +++ b/upload/catalog/controller/extension/module/information.php @@ -1,6 +1,6 @@ load->language('extension/module/information'); $data['heading_title'] = $this->language->get('heading_title'); diff --git a/upload/catalog/controller/extension/module/latest.php b/upload/catalog/controller/extension/module/latest.php index 3a2bb619..18488472 100644 --- a/upload/catalog/controller/extension/module/latest.php +++ b/upload/catalog/controller/extension/module/latest.php @@ -1,6 +1,6 @@ load->language('extension/module/latest'); $data['heading_title'] = $this->language->get('heading_title'); diff --git a/upload/catalog/controller/extension/module/pilibaba_button.php b/upload/catalog/controller/extension/module/pilibaba_button.php index 627305be..973068a1 100644 --- a/upload/catalog/controller/extension/module/pilibaba_button.php +++ b/upload/catalog/controller/extension/module/pilibaba_button.php @@ -1,6 +1,6 @@ cart->hasProducts() || (!$this->cart->hasStock() && !$this->config->get('config_stock_checkout'))) { diff --git a/upload/catalog/controller/extension/module/slideshow.php b/upload/catalog/controller/extension/module/slideshow.php index e561a98f..bb6e3574 100644 --- a/upload/catalog/controller/extension/module/slideshow.php +++ b/upload/catalog/controller/extension/module/slideshow.php @@ -1,6 +1,6 @@ load->model('design/banner'); diff --git a/upload/catalog/controller/extension/module/special.php b/upload/catalog/controller/extension/module/special.php index bb0607ec..1d19b642 100644 --- a/upload/catalog/controller/extension/module/special.php +++ b/upload/catalog/controller/extension/module/special.php @@ -1,6 +1,6 @@ load->language('extension/module/special'); $data['heading_title'] = $this->language->get('heading_title'); diff --git a/upload/catalog/controller/extension/module/store.php b/upload/catalog/controller/extension/module/store.php index 06935397..1088d16e 100644 --- a/upload/catalog/controller/extension/module/store.php +++ b/upload/catalog/controller/extension/module/store.php @@ -1,6 +1,6 @@ config->get('store_admin')) { diff --git a/upload/catalog/controller/extension/payment/authorizenet_aim.php b/upload/catalog/controller/extension/payment/authorizenet_aim.php index 445d731f..066f512e 100644 --- a/upload/catalog/controller/extension/payment/authorizenet_aim.php +++ b/upload/catalog/controller/extension/payment/authorizenet_aim.php @@ -1,6 +1,6 @@ load->language('extension/payment/authorizenet_aim'); $data['text_credit_card'] = $this->language->get('text_credit_card'); diff --git a/upload/catalog/controller/extension/payment/authorizenet_sim.php b/upload/catalog/controller/extension/payment/authorizenet_sim.php index 15ddec9d..01158d32 100644 --- a/upload/catalog/controller/extension/payment/authorizenet_sim.php +++ b/upload/catalog/controller/extension/payment/authorizenet_sim.php @@ -1,6 +1,6 @@ load->language('extension/payment/authorizenet_sim'); $data['button_confirm'] = $this->language->get('button_confirm'); diff --git a/upload/catalog/controller/extension/payment/bank_transfer.php b/upload/catalog/controller/extension/payment/bank_transfer.php index 8e8797e1..3eff7fab 100644 --- a/upload/catalog/controller/extension/payment/bank_transfer.php +++ b/upload/catalog/controller/extension/payment/bank_transfer.php @@ -1,6 +1,6 @@ load->language('extension/payment/bank_transfer'); $data['text_instruction'] = $this->language->get('text_instruction'); diff --git a/upload/catalog/controller/extension/payment/bluepay_hosted.php b/upload/catalog/controller/extension/payment/bluepay_hosted.php index a8e2f81e..f86919fe 100644 --- a/upload/catalog/controller/extension/payment/bluepay_hosted.php +++ b/upload/catalog/controller/extension/payment/bluepay_hosted.php @@ -1,6 +1,6 @@ load->language('extension/payment/bluepay_hosted'); $this->load->model('checkout/order'); $this->load->model('extension/payment/bluepay_hosted'); diff --git a/upload/catalog/controller/extension/payment/bluepay_redirect.php b/upload/catalog/controller/extension/payment/bluepay_redirect.php index d95c60f7..879587ca 100644 --- a/upload/catalog/controller/extension/payment/bluepay_redirect.php +++ b/upload/catalog/controller/extension/payment/bluepay_redirect.php @@ -1,6 +1,6 @@ load->language('extension/payment/bluepay_redirect'); $data['text_credit_card'] = $this->language->get('text_credit_card'); diff --git a/upload/catalog/controller/extension/payment/cardconnect.php b/upload/catalog/controller/extension/payment/cardconnect.php index da2fb248..030e17b3 100644 --- a/upload/catalog/controller/extension/payment/cardconnect.php +++ b/upload/catalog/controller/extension/payment/cardconnect.php @@ -1,6 +1,6 @@ load->language('extension/payment/cardconnect'); $this->load->model('extension/payment/cardconnect'); @@ -55,7 +55,7 @@ public function index(): string { return $this->load->view('extension/payment/cardconnect', $data); } - public function send(): void { + public function send() { $this->load->language('extension/payment/cardconnect'); $this->load->model('extension/payment/cardconnect'); @@ -255,7 +255,7 @@ public function send(): void { $this->response->setOutput(json_encode($json)); } - public function delete(): void { + public function delete() { $this->load->language('extension/payment/cardconnect'); $this->load->model('extension/payment/cardconnect'); @@ -302,7 +302,7 @@ public function delete(): void { $this->response->setOutput(json_encode($json)); } - public function cron(): void { + public function cron() { $this->load->model('extension/payment/cardconnect'); $this->model_extension_payment_cardconnect->log('Running cron'); diff --git a/upload/catalog/controller/extension/payment/cardinity.php b/upload/catalog/controller/extension/payment/cardinity.php index 8c19a3c8..8d2b8118 100644 --- a/upload/catalog/controller/extension/payment/cardinity.php +++ b/upload/catalog/controller/extension/payment/cardinity.php @@ -1,6 +1,6 @@ load->language('extension/payment/cardinity'); $data['entry_holder'] = $this->language->get('entry_holder'); @@ -35,7 +35,7 @@ public function index(): string { return $this->load->view('extension/payment/cardinity', $data); } - public function send(): void { + public function send() { $this->load->model('checkout/order'); $this->load->model('extension/payment/cardinity'); @@ -133,7 +133,7 @@ public function send(): void { $this->response->setOutput(json_encode($json)); } - public function threeDSecureForm(): void { + public function threeDSecureForm() { $this->load->model('extension/payment/cardinity'); $this->load->language('extension/payment/cardinity'); @@ -167,7 +167,7 @@ public function threeDSecureForm(): void { $this->response->setOutput($this->load->view('extension/payment/cardinity_3ds', $data)); } - public function threeDSecureCallback(): void { + public function threeDSecureCallback() { $this->load->model('extension/payment/cardinity'); $this->load->language('extension/payment/cardinity'); @@ -212,7 +212,7 @@ public function threeDSecureCallback(): void { } } - private function finalizeOrder(string $payment): void { + private function finalizeOrder(string $payment) { $this->load->model('checkout/order'); $this->load->language('extension/payment/cardinity'); @@ -223,7 +223,7 @@ private function finalizeOrder(string $payment): void { $this->model_extension_payment_cardinity->log($payment); } - private function failedOrder($log = null, $alert = null): void { + private function failedOrder($log = null, $alert = null) { $this->load->language('extension/payment/cardinity'); $this->model_extension_payment_cardinity->log($this->language->get('text_payment_failed')); diff --git a/upload/catalog/controller/extension/payment/cheque.php b/upload/catalog/controller/extension/payment/cheque.php index ed2d6384..8e4d4522 100644 --- a/upload/catalog/controller/extension/payment/cheque.php +++ b/upload/catalog/controller/extension/payment/cheque.php @@ -1,6 +1,6 @@ load->language('extension/payment/cheque'); $data['text_instruction'] = $this->language->get('text_instruction'); @@ -19,7 +19,7 @@ public function index(): string { return $this->load->view('extension/payment/cheque', $data); } - public function confirm(): void { + public function confirm() { if ($this->session->data['payment_method']['code'] == 'cheque') { $this->load->language('extension/payment/cheque'); diff --git a/upload/catalog/controller/extension/payment/cod.php b/upload/catalog/controller/extension/payment/cod.php index 1b1182c3..bcf7809b 100644 --- a/upload/catalog/controller/extension/payment/cod.php +++ b/upload/catalog/controller/extension/payment/cod.php @@ -1,6 +1,6 @@ language->get('button_confirm'); $data['text_loading'] = $this->language->get('text_loading'); @@ -10,7 +10,7 @@ public function index(): string { return $this->load->view('extension/payment/cod', $data); } - public function confirm(): void { + public function confirm() { if ($this->session->data['payment_method']['code'] == 'cod') { $this->load->model('checkout/order'); diff --git a/upload/catalog/controller/extension/payment/eway.php b/upload/catalog/controller/extension/payment/eway.php index 35130555..a36cdfec 100644 --- a/upload/catalog/controller/extension/payment/eway.php +++ b/upload/catalog/controller/extension/payment/eway.php @@ -1,6 +1,6 @@ load->language('extension/payment/eway'); $data['button_confirm'] = $this->language->get('button_confirm'); @@ -181,7 +181,7 @@ public function index(): string { return $this->load->view('extension/payment/' . $template, $data); } - public function lowestDenomination(float $value, float $currency): float { + public function lowestDenomination($value, $currency) { $power = $this->currency->getDecimalPlace($currency); $value = (float)$value; @@ -189,7 +189,7 @@ public function lowestDenomination(float $value, float $currency): float { return (int)($value * 10 ** $power); } - public function ValidateDenomination(float $value, float $currency): float { + public function ValidateDenomination(float $value, float $currency) { $power = $this->currency->getDecimalPlace($currency); $value = (float)$value; @@ -197,7 +197,7 @@ public function ValidateDenomination(float $value, float $currency): float { return (int)($value * 10 ** ('-' . $power)); } - public function callback(): void { + public function callback() { $this->load->language('extension/payment/eway'); if (isset($this->request->get['AccessCode']) || isset($this->request->get['amp;AccessCode'])) { diff --git a/upload/catalog/controller/extension/payment/firstdata.php b/upload/catalog/controller/extension/payment/firstdata.php index 585e450f..69d1f878 100644 --- a/upload/catalog/controller/extension/payment/firstdata.php +++ b/upload/catalog/controller/extension/payment/firstdata.php @@ -1,6 +1,6 @@ load->language('extension/payment/firstdata'); $data['button_confirm'] = $this->language->get('button_confirm'); @@ -85,7 +85,7 @@ public function index(): string { return $this->load->view('extension/payment/firstdata', $data); } - public function notify(): void { + public function notify() { $this->load->model('extension/payment/firstdata'); $this->load->model('checkout/order'); @@ -233,7 +233,7 @@ public function notify(): void { } } - public function fail(): void { + public function fail() { $this->load->language('extension/payment/firstdata'); if (isset($this->request->post['fail_reason']) && !empty($this->request->post['fail_reason'])) { diff --git a/upload/catalog/controller/extension/payment/firstdata_remote.php b/upload/catalog/controller/extension/payment/firstdata_remote.php index 7e45fca1..bb831ba2 100644 --- a/upload/catalog/controller/extension/payment/firstdata_remote.php +++ b/upload/catalog/controller/extension/payment/firstdata_remote.php @@ -1,6 +1,6 @@ load->language('extension/payment/firstdata_remote'); $this->load->model('extension/payment/firstdata_remote'); @@ -58,7 +58,7 @@ public function index(): string { return $this->load->view('extension/payment/firstdata_remote', $data); } - public function send(): void { + public function send() { $this->load->model('checkout/order'); $this->load->model('extension/payment/firstdata_remote'); $this->load->language('extension/payment/firstdata_remote'); diff --git a/upload/catalog/controller/extension/payment/free_checkout.php b/upload/catalog/controller/extension/payment/free_checkout.php index 598e7d99..a58111a9 100644 --- a/upload/catalog/controller/extension/payment/free_checkout.php +++ b/upload/catalog/controller/extension/payment/free_checkout.php @@ -1,6 +1,6 @@ language->get('button_confirm'); $data['text_loading'] = $this->language->get('text_loading'); @@ -10,7 +10,7 @@ public function index(): string { return $this->load->view('extension/payment/free_checkout', $data); } - public function confirm(): void { + public function confirm() { if ($this->session->data['payment_method']['code'] == 'free_checkout') { $this->load->model('checkout/order'); diff --git a/upload/catalog/controller/extension/payment/g2apay.php b/upload/catalog/controller/extension/payment/g2apay.php index f024961f..878afc3c 100644 --- a/upload/catalog/controller/extension/payment/g2apay.php +++ b/upload/catalog/controller/extension/payment/g2apay.php @@ -1,6 +1,6 @@ load->language('extension/payment/g2apay'); $data['button_confirm'] = $this->language->get('button_confirm'); @@ -10,7 +10,7 @@ public function index(): string { return $this->load->view('extension/payment/g2apay', $data); } - public function checkout(): void { + public function checkout() { if (!isset($this->session->data['order_id'])) { return; } @@ -133,7 +133,7 @@ public function checkout(): void { } } - public function success(): void { + public function success() { $order_id = (int)$this->session->data['order_id']; if (isset($this->request->post['transaction_id'])) { @@ -161,7 +161,7 @@ public function success(): void { $this->response->redirect($this->url->link('checkout/success')); } - public function ipn(): void { + public function ipn() { $this->load->model('extension/payment/g2apay'); $this->load->model('checkout/order'); diff --git a/upload/catalog/controller/extension/payment/globalpay.php b/upload/catalog/controller/extension/payment/globalpay.php index 5834dc5e..29eb98ae 100644 --- a/upload/catalog/controller/extension/payment/globalpay.php +++ b/upload/catalog/controller/extension/payment/globalpay.php @@ -1,6 +1,6 @@ load->language('extension/payment/globalpay'); $data['entry_cc_type'] = $this->language->get('entry_cc_type'); @@ -85,7 +85,7 @@ public function index(): string { return $this->load->view('extension/payment/globalpay', $data); } - public function notify(): void { + public function notify() { $this->load->model('extension/payment/globalpay'); $this->model_extension_payment_globalpay->logger(print_r($this->request->post, 1)); diff --git a/upload/catalog/controller/extension/payment/globalpay_remote.php b/upload/catalog/controller/extension/payment/globalpay_remote.php index f35b53fb..3a0fd8ee 100644 --- a/upload/catalog/controller/extension/payment/globalpay_remote.php +++ b/upload/catalog/controller/extension/payment/globalpay_remote.php @@ -1,6 +1,6 @@ load->language('extension/payment/globalpay_remote'); $data['text_credit_card'] = $this->language->get('text_credit_card'); @@ -61,7 +61,7 @@ public function index(): string { return $this->load->view('extension/payment/globalpay_remote', $data); } - public function send(): void { + public function send() { $this->load->model('checkout/order'); $this->load->model('extension/payment/globalpay_remote'); diff --git a/upload/catalog/controller/extension/payment/laybuy.php b/upload/catalog/controller/extension/payment/laybuy.php index 7255866d..c3be0168 100644 --- a/upload/catalog/controller/extension/payment/laybuy.php +++ b/upload/catalog/controller/extension/payment/laybuy.php @@ -8,7 +8,7 @@ class ControllerExtensionPaymentLaybuy extends Controller { /** * @return string */ - public function index(): string { + public function index() { if (!isset($this->session->data['order_id'])) { return ''; } @@ -63,7 +63,7 @@ public function index(): string { * * @return void */ - public function postToLaybuy(): void { + public function postToLaybuy() { $this->load->model('extension/payment/laybuy'); $this->model_extension_payment_laybuy->log('Posting to Laybuy'); @@ -147,7 +147,7 @@ public function postToLaybuy(): void { * * @return void */ - public function callback(): void { + public function callback() { // Laybuy $this->load->model('extension/payment/laybuy'); @@ -207,7 +207,7 @@ public function callback(): void { } } - public function cancel(): void { + public function cancel() { $this->load->model('extension/payment/laybuy'); $this->model_extension_payment_laybuy->log('Transaction canceled by user. Redirecting to checkout/checkout.'); @@ -220,7 +220,7 @@ public function cancel(): void { * * @return void */ - public function reviseCallback(): void { + public function reviseCallback() { $this->load->model('extension/payment/laybuy'); // Laybuy @@ -357,7 +357,7 @@ public function reviseCallback(): void { } } - public function reviseCancel(): void { + public function reviseCancel() { $this->load->model('extension/payment/laybuy'); $this->model_extension_payment_laybuy->log('Revise canceled. Redirecting to checkout/checkout.'); @@ -377,7 +377,7 @@ public function deleteOrder($route = '', $output = '', $order_id = 0, $order_sta } } - public function cron(): void { + public function cron() { $this->load->model('extension/payment/laybuy'); $this->load->language('extension/payment/laybuy'); diff --git a/upload/catalog/controller/extension/payment/liqpay.php b/upload/catalog/controller/extension/payment/liqpay.php index 43e00cde..fcdf0bb5 100644 --- a/upload/catalog/controller/extension/payment/liqpay.php +++ b/upload/catalog/controller/extension/payment/liqpay.php @@ -1,6 +1,6 @@ language->get('button_confirm'); $this->load->model('checkout/order'); @@ -28,7 +28,7 @@ public function index(): string { return $this->load->view('extension/payment/liqpay', $data); } - public function callback(): void { + public function callback() { $xml = base64_decode($this->request->post['operation_xml']); $signature = base64_encode(sha1($this->config->get('liqpay_signature') . $xml . $this->config->get('liqpay_signature'), true)); diff --git a/upload/catalog/controller/extension/payment/nochex.php b/upload/catalog/controller/extension/payment/nochex.php index 56d76d0e..9ba52df2 100644 --- a/upload/catalog/controller/extension/payment/nochex.php +++ b/upload/catalog/controller/extension/payment/nochex.php @@ -2,7 +2,7 @@ // Nochex via form will work for both simple "Seller" account and "Merchant" account holders // Nochex via APC maybe only avaiable to "Merchant" account holders only - site docs a bit vague on this point class ControllerExtensionPaymentNochex extends Controller { - public function index(): string { + public function index() { $this->load->language('extension/payment/nochex'); $data['button_confirm'] = $this->language->get('button_confirm'); @@ -69,7 +69,7 @@ public function index(): string { return $this->load->view('extension/payment/nochex', $data); } - public function callback(): void { + public function callback() { $this->load->language('extension/payment/nochex'); if (isset($this->request->get['method']) && $this->request->get['method'] == 'decline') { diff --git a/upload/catalog/controller/extension/payment/paymate.php b/upload/catalog/controller/extension/payment/paymate.php index ecfeab01..e8f7165d 100644 --- a/upload/catalog/controller/extension/payment/paymate.php +++ b/upload/catalog/controller/extension/payment/paymate.php @@ -1,6 +1,6 @@ language->get('button_confirm'); if (!$this->config->get('paymate_test')) { @@ -36,7 +36,7 @@ public function index(): string { return $this->load->view('extension/payment/paymate', $data); } - public function callback(): void { + public function callback() { $this->load->language('extension/payment/paymate'); if (isset($this->request->post['ref'])) { diff --git a/upload/catalog/controller/extension/payment/paypoint.php b/upload/catalog/controller/extension/payment/paypoint.php index 5e84e79d..fc06b235 100644 --- a/upload/catalog/controller/extension/payment/paypoint.php +++ b/upload/catalog/controller/extension/payment/paypoint.php @@ -1,6 +1,6 @@ language->get('button_confirm'); $this->load->model('checkout/order'); @@ -66,7 +66,7 @@ public function index(): string { return $this->load->view('extension/payment/paypoint', $data); } - public function callback(): void { + public function callback() { if (isset($this->request->get['trans_id'])) { $order_id = (int)$this->request->get['trans_id']; } else { diff --git a/upload/catalog/controller/extension/payment/payza.php b/upload/catalog/controller/extension/payment/payza.php index 52594a79..94ed252f 100644 --- a/upload/catalog/controller/extension/payment/payza.php +++ b/upload/catalog/controller/extension/payment/payza.php @@ -1,6 +1,6 @@ language->get('button_confirm'); $this->load->model('checkout/order'); @@ -21,7 +21,7 @@ public function index(): string { return $this->load->view('extension/payment/payza', $data); } - public function callback(): void { + public function callback() { if (isset($this->request->post['ap_securitycode']) && ($this->request->post['ap_securitycode'] == $this->config->get('payza_security'))) { $this->load->model('checkout/order'); diff --git a/upload/catalog/controller/extension/payment/perpetual_payments.php b/upload/catalog/controller/extension/payment/perpetual_payments.php index 18a4d7cd..0711b1da 100644 --- a/upload/catalog/controller/extension/payment/perpetual_payments.php +++ b/upload/catalog/controller/extension/payment/perpetual_payments.php @@ -1,6 +1,6 @@ load->language('extension/payment/perpetual_payments'); $data['text_credit_card'] = $this->language->get('text_credit_card'); @@ -49,7 +49,7 @@ public function index(): string { return $this->load->view('extension/payment/perpetual_payments', $data); } - public function send(): void { + public function send() { if (!isset($this->session->data['order_id'])) { return; } diff --git a/upload/catalog/controller/extension/payment/pilibaba.php b/upload/catalog/controller/extension/payment/pilibaba.php index f0a0a906..8196d140 100644 --- a/upload/catalog/controller/extension/payment/pilibaba.php +++ b/upload/catalog/controller/extension/payment/pilibaba.php @@ -1,6 +1,6 @@ load->language('extension/payment/pilibaba'); $this->load->model('checkout/order'); @@ -66,7 +66,7 @@ public function index(): string { return $this->load->view('extension/payment/pilibaba', $data); } - public function express(): void { + public function express() { $this->load->language('extension/shipping/pilibaba'); $this->load->language('extension/payment/pilibaba'); @@ -366,7 +366,7 @@ public function express(): void { } } - public function callback(): void { + public function callback() { $this->load->language('extension/payment/pilibaba'); $this->load->model('checkout/order'); diff --git a/upload/catalog/controller/extension/payment/realex.php b/upload/catalog/controller/extension/payment/realex.php index fe8aa74b..bf19dce4 100644 --- a/upload/catalog/controller/extension/payment/realex.php +++ b/upload/catalog/controller/extension/payment/realex.php @@ -1,6 +1,6 @@ load->language('extension/payment/realex'); $data['entry_cc_type'] = $this->language->get('entry_cc_type'); @@ -85,7 +85,7 @@ public function index(): string { return $this->load->view('extension/payment/realex', $data); } - public function notify(): void { + public function notify() { $this->load->model('extension/payment/realex'); $this->model_extension_payment_realex->logger(print_r($this->request->post, 1)); diff --git a/upload/catalog/controller/extension/payment/realex_remote.php b/upload/catalog/controller/extension/payment/realex_remote.php index 722d24e6..94f6755d 100644 --- a/upload/catalog/controller/extension/payment/realex_remote.php +++ b/upload/catalog/controller/extension/payment/realex_remote.php @@ -1,6 +1,6 @@ load->language('extension/payment/realex_remote'); $data['text_credit_card'] = $this->language->get('text_credit_card'); @@ -61,7 +61,7 @@ public function index(): string { return $this->load->view('extension/payment/realex_remote', $data); } - public function send(): void { + public function send() { $this->load->model('checkout/order'); $this->load->model('extension/payment/realex_remote'); @@ -231,7 +231,7 @@ public function send(): void { $this->response->setOutput(json_encode($json)); } - public function acsReturn(): void { + public function acsReturn() { if (isset($this->session->data['order_id'])) { $this->load->model('checkout/order'); $this->load->model('extension/payment/realex_remote'); diff --git a/upload/catalog/controller/extension/payment/sagepay_direct.php b/upload/catalog/controller/extension/payment/sagepay_direct.php index 8c408754..80055c55 100644 --- a/upload/catalog/controller/extension/payment/sagepay_direct.php +++ b/upload/catalog/controller/extension/payment/sagepay_direct.php @@ -1,6 +1,6 @@ load->language('extension/payment/sagepay_direct'); $data['text_credit_card'] = $this->language->get('text_credit_card'); @@ -123,7 +123,7 @@ public function index(): string { return $this->load->view('extension/payment/sagepay_direct', $data); } - public function send(): void { + public function send() { $this->load->language('extension/payment/sagepay_direct'); $this->load->model('checkout/order'); $this->load->model('extension/payment/sagepay_direct'); @@ -366,7 +366,7 @@ public function send(): void { $this->response->setOutput(json_encode($json)); } - public function callback(): void { + public function callback() { $this->load->model('extension/payment/sagepay_direct'); $this->load->language('extension/payment/sagepay_direct'); $this->load->model('checkout/order'); @@ -453,7 +453,7 @@ public function callback(): void { } } - public function delete(): void { + public function delete() { $this->load->language('account/sagepay_direct_cards'); @@ -492,7 +492,7 @@ public function delete(): void { $this->response->setOutput(json_encode($json)); } - public function cron(): void { + public function cron() { if (isset($this->request->get['token']) && hash_equals($this->config->get('sagepay_direct_cron_job_token'), $this->request->get['token'])) { $this->load->model('extension/payment/sagepay_direct'); diff --git a/upload/catalog/controller/extension/payment/sagepay_server.php b/upload/catalog/controller/extension/payment/sagepay_server.php index 7d7925c2..486161a3 100644 --- a/upload/catalog/controller/extension/payment/sagepay_server.php +++ b/upload/catalog/controller/extension/payment/sagepay_server.php @@ -1,6 +1,6 @@ load->language('extension/payment/sagepay_server'); $data['text_credit_card'] = $this->language->get('text_credit_card'); $data['text_card_name'] = $this->language->get('text_card_name'); @@ -38,7 +38,7 @@ public function index(): string { return $this->load->view('extension/payment/sagepay_server', $data); } - public function send(): void { + public function send() { $payment_data = []; $url = ''; @@ -198,7 +198,7 @@ public function send(): void { $this->response->setOutput(json_encode($json)); } - public function callback(): void { + public function callback() { $this->load->model('checkout/order'); $this->load->model('extension/payment/sagepay_server'); @@ -426,7 +426,7 @@ public function callback(): void { echo "RedirectURL=" . $success_page . $end_ln; } - public function success(): void { + public function success() { $this->load->model('checkout/order'); $this->load->model('extension/payment/sagepay_server'); $this->load->model('checkout/recurring'); @@ -449,7 +449,7 @@ public function success(): void { } } - public function failure(): void { + public function failure() { $this->load->language('extension/payment/sagepay_server'); $this->session->data['error'] = $this->language->get('text_generic_error'); @@ -457,7 +457,7 @@ public function failure(): void { $this->response->redirect($this->url->link('checkout/checkout', '', true)); } - public function delete(): void { + public function delete() { $this->load->language('account/sagepay_server_cards'); $this->load->model('extension/payment/sagepay_server'); @@ -495,7 +495,7 @@ public function delete(): void { $this->response->setOutput(json_encode($json)); } - public function cron(): void { + public function cron() { if (isset($this->request->get['token']) && hash_equals($this->config->get('sagepay_server_cron_job_token'), $this->request->get['token'])) { $this->load->model('extension/payment/sagepay_server'); diff --git a/upload/catalog/controller/extension/payment/sagepay_us.php b/upload/catalog/controller/extension/payment/sagepay_us.php index eb663b00..14b5d726 100644 --- a/upload/catalog/controller/extension/payment/sagepay_us.php +++ b/upload/catalog/controller/extension/payment/sagepay_us.php @@ -1,6 +1,6 @@ load->language('extension/payment/sagepay_us'); $data['text_credit_card'] = $this->language->get('text_credit_card'); @@ -36,7 +36,7 @@ public function index(): string { return $this->load->view('extension/payment/sagepay_us', $data); } - public function send(): void { + public function send() { $this->load->model('checkout/order'); $order_info = $this->model_checkout_order->getOrder($this->session->data['order_id']); diff --git a/upload/catalog/controller/extension/payment/securetrading_pp.php b/upload/catalog/controller/extension/payment/securetrading_pp.php index 217d7707..ca5ce283 100644 --- a/upload/catalog/controller/extension/payment/securetrading_pp.php +++ b/upload/catalog/controller/extension/payment/securetrading_pp.php @@ -1,6 +1,6 @@ load->model('checkout/order'); $this->load->model('localisation/country'); $this->load->model('localisation/zone'); @@ -81,7 +81,7 @@ public function index(): string { } } - public function ipn(): void { + public function ipn() { $this->load->model('checkout/order'); $this->load->model('extension/payment/securetrading_pp'); $this->load->language('extension/payment/securetrading_pp'); diff --git a/upload/catalog/controller/extension/payment/securetrading_ws.php b/upload/catalog/controller/extension/payment/securetrading_ws.php index 260e2175..b46542f9 100644 --- a/upload/catalog/controller/extension/payment/securetrading_ws.php +++ b/upload/catalog/controller/extension/payment/securetrading_ws.php @@ -1,6 +1,6 @@ load->model('checkout/order'); $this->load->language('extension/payment/securetrading_ws'); @@ -60,7 +60,7 @@ public function index(): string { } } - public function process(): void { + public function process() { $this->load->model('checkout/order'); $this->load->model('localisation/country'); $this->load->model('extension/payment/securetrading_ws'); @@ -218,7 +218,7 @@ public function process(): void { } } - public function threedreturn(): void { + public function threedreturn() { $this->load->model('checkout/order'); $this->load->model('extension/payment/securetrading_ws'); $this->load->language('extension/payment/securetrading_ws'); diff --git a/upload/catalog/controller/extension/payment/skrill.php b/upload/catalog/controller/extension/payment/skrill.php index 2c68cb84..f8852129 100644 --- a/upload/catalog/controller/extension/payment/skrill.php +++ b/upload/catalog/controller/extension/payment/skrill.php @@ -1,6 +1,6 @@ session->data['order_id'])) { return ''; } @@ -51,7 +51,7 @@ public function index(): string { return $this->load->view('extension/payment/skrill', $data); } - public function callback(): void { + public function callback() { if (isset($this->request->post['order_id'])) { $order_id = (int)$this->request->post['order_id']; } else { diff --git a/upload/catalog/controller/extension/payment/twocheckout.php b/upload/catalog/controller/extension/payment/twocheckout.php index 26600051..3b17d2c3 100644 --- a/upload/catalog/controller/extension/payment/twocheckout.php +++ b/upload/catalog/controller/extension/payment/twocheckout.php @@ -1,6 +1,6 @@ language->get('button_confirm'); $this->load->model('checkout/order'); @@ -75,7 +75,7 @@ public function index(): string { return $this->load->view('extension/payment/twocheckout', $data); } - public function callback(): void { + public function callback() { $this->load->model('checkout/order'); $order_info = $this->model_checkout_order->getOrder($this->request->post['cart_order_id']); diff --git a/upload/catalog/controller/extension/payment/web_payment_software.php b/upload/catalog/controller/extension/payment/web_payment_software.php index 8dd68419..4f37829a 100644 --- a/upload/catalog/controller/extension/payment/web_payment_software.php +++ b/upload/catalog/controller/extension/payment/web_payment_software.php @@ -1,6 +1,6 @@ load->language('extension/payment/web_payment_software'); $data['text_credit_card'] = $this->language->get('text_credit_card'); @@ -37,7 +37,7 @@ public function index(): string { return $this->load->view('extension/payment/web_payment_software', $data); } - public function send(): void { + public function send() { $this->load->model('checkout/order'); $order_info = $this->model_checkout_order->getOrder($this->session->data['order_id']); diff --git a/upload/catalog/controller/extension/payment/worldpay.php b/upload/catalog/controller/extension/payment/worldpay.php index 0fea113a..9a4d9600 100644 --- a/upload/catalog/controller/extension/payment/worldpay.php +++ b/upload/catalog/controller/extension/payment/worldpay.php @@ -1,6 +1,6 @@ load->language('extension/payment/worldpay'); $data['text_credit_card'] = $this->language->get('text_credit_card'); @@ -48,7 +48,7 @@ public function index(): string { return $this->load->view('extension/payment/worldpay', $data); } - public function send(): void { + public function send() { $this->load->language('extension/payment/worldpay'); $this->load->model('checkout/order'); $this->load->model('localisation/country'); @@ -131,7 +131,7 @@ public function send(): void { } } - public function deleteCard(): void { + public function deleteCard() { $this->load->language('extension/payment/worldpay'); $this->load->model('extension/payment/worldpay'); @@ -153,7 +153,7 @@ public function deleteCard(): void { $this->response->setOutput(json_encode($json)); } - public function webhook(): void { + public function webhook() { if (isset($this->request->get['token']) && hash_equals($this->config->get('worldpay_secret_token'), $this->request->get['token'])) { $this->load->model('extension/payment/worldpay'); @@ -210,7 +210,7 @@ public function webhook(): void { $this->response->addHeader('Content-Type: application/json'); } - public function cron(): void { + public function cron() { if ($this->request->get['token'] == $this->config->get('worldpay_cron_job_token')) { $this->load->model('extension/payment/worldpay'); diff --git a/upload/catalog/controller/extension/total/coupon.php b/upload/catalog/controller/extension/total/coupon.php index 54e0cf0a..b576395f 100644 --- a/upload/catalog/controller/extension/total/coupon.php +++ b/upload/catalog/controller/extension/total/coupon.php @@ -1,6 +1,6 @@ config->get('coupon_status')) { $this->load->language('extension/total/coupon'); @@ -24,7 +24,7 @@ public function index(): string { return ''; } - public function coupon(): void { + public function coupon() { $this->load->language('extension/total/coupon'); $json = []; diff --git a/upload/catalog/controller/extension/total/reward.php b/upload/catalog/controller/extension/total/reward.php index ccafbcb1..86aec48f 100644 --- a/upload/catalog/controller/extension/total/reward.php +++ b/upload/catalog/controller/extension/total/reward.php @@ -1,6 +1,6 @@ customer->getRewardPoints(); $points_total = 0; @@ -34,7 +34,7 @@ public function index(): string { return ''; } - public function reward(): void { + public function reward() { $this->load->language('extension/total/reward'); $json = []; diff --git a/upload/catalog/controller/extension/total/shipping.php b/upload/catalog/controller/extension/total/shipping.php index 8f5f96ff..f5870348 100644 --- a/upload/catalog/controller/extension/total/shipping.php +++ b/upload/catalog/controller/extension/total/shipping.php @@ -1,6 +1,6 @@ config->get('shipping_status') && $this->config->get('shipping_estimator') && $this->cart->hasShipping()) { $this->load->language('extension/total/shipping'); @@ -54,7 +54,7 @@ public function index(): string { return ''; } - public function quote(): void { + public function quote() { $this->load->language('extension/total/shipping'); $json = []; @@ -178,7 +178,7 @@ public function quote(): void { $this->response->setOutput(json_encode($json)); } - public function shipping(): void { + public function shipping() { $this->load->language('extension/total/shipping'); $json = []; @@ -207,7 +207,7 @@ public function shipping(): void { $this->response->setOutput(json_encode($json)); } - public function country(): void { + public function country() { $json = []; $this->load->model('localisation/country'); diff --git a/upload/catalog/controller/extension/total/voucher.php b/upload/catalog/controller/extension/total/voucher.php index 43af31c4..22c65071 100644 --- a/upload/catalog/controller/extension/total/voucher.php +++ b/upload/catalog/controller/extension/total/voucher.php @@ -1,6 +1,6 @@ config->get('voucher_status')) { $this->load->language('extension/total/voucher'); @@ -24,7 +24,7 @@ public function index(): string { return ''; } - public function voucher(): void { + public function voucher() { $this->load->language('extension/total/voucher'); $json = []; @@ -55,7 +55,7 @@ public function voucher(): void { $this->response->setOutput(json_encode($json)); } - public function send($route, $output, $order_id, $order_status_id): void { + public function send($route, $output, $order_id, $order_status_id) { $this->load->model('checkout/order'); $order_info = $this->model_checkout_order->getOrder($order_id); diff --git a/upload/catalog/controller/information/contact.php b/upload/catalog/controller/information/contact.php index 537e64d1..03cc5eb0 100644 --- a/upload/catalog/controller/information/contact.php +++ b/upload/catalog/controller/information/contact.php @@ -2,7 +2,7 @@ class ControllerInformationContact extends Controller { private $error = []; - public function index(): void { + public function index() { $this->load->language('information/contact'); $this->document->setTitle($this->language->get('heading_title')); diff --git a/upload/catalog/controller/information/information.php b/upload/catalog/controller/information/information.php index 69ed7b34..68a8d5e4 100644 --- a/upload/catalog/controller/information/information.php +++ b/upload/catalog/controller/information/information.php @@ -1,6 +1,6 @@ load->language('information/information'); $this->load->model('catalog/information'); @@ -75,7 +75,7 @@ public function index(): void { } } - public function agree(): void { + public function agree() { $this->load->model('catalog/information'); if (isset($this->request->get['information_id'])) { diff --git a/upload/catalog/controller/information/sitemap.php b/upload/catalog/controller/information/sitemap.php index cd540246..2e178423 100644 --- a/upload/catalog/controller/information/sitemap.php +++ b/upload/catalog/controller/information/sitemap.php @@ -1,6 +1,6 @@ load->language('information/sitemap'); $this->document->setTitle($this->language->get('heading_title')); diff --git a/upload/catalog/controller/product/category.php b/upload/catalog/controller/product/category.php index 02af1b50..8867b2fa 100644 --- a/upload/catalog/controller/product/category.php +++ b/upload/catalog/controller/product/category.php @@ -1,6 +1,6 @@ load->language('product/category'); $this->load->model('catalog/category'); diff --git a/upload/catalog/controller/product/compare.php b/upload/catalog/controller/product/compare.php index 931f766f..182912b9 100644 --- a/upload/catalog/controller/product/compare.php +++ b/upload/catalog/controller/product/compare.php @@ -1,6 +1,6 @@ load->language('product/compare'); $this->load->model('catalog/product'); @@ -156,7 +156,7 @@ public function index(): void { $this->response->setOutput($this->load->view('product/compare', $data)); } - public function add(): void { + public function add() { $this->load->language('product/compare'); $json = []; diff --git a/upload/catalog/controller/product/manufacturer.php b/upload/catalog/controller/product/manufacturer.php index b6889075..462c37dc 100644 --- a/upload/catalog/controller/product/manufacturer.php +++ b/upload/catalog/controller/product/manufacturer.php @@ -1,6 +1,6 @@ load->language('product/manufacturer'); $this->load->model('catalog/manufacturer'); @@ -59,7 +59,7 @@ public function index(): void { $this->response->setOutput($this->load->view('product/manufacturer_list', $data)); } - public function info(): void { + public function info() { $this->load->language('product/manufacturer'); $this->load->model('catalog/manufacturer'); diff --git a/upload/catalog/controller/product/product.php b/upload/catalog/controller/product/product.php index fc719984..548b63e0 100644 --- a/upload/catalog/controller/product/product.php +++ b/upload/catalog/controller/product/product.php @@ -2,7 +2,7 @@ class ControllerProductProduct extends Controller { private $error = []; - public function index(): void { + public function index() { $this->load->language('product/product'); $data['breadcrumbs'] = []; @@ -564,7 +564,7 @@ public function index(): void { } } - public function review(): void { + public function review() { $this->load->language('product/product'); $this->load->model('catalog/review'); @@ -605,7 +605,7 @@ public function review(): void { $this->response->setOutput($this->load->view('product/review', $data)); } - public function write(): void { + public function write() { $this->load->language('product/product'); $json = []; diff --git a/upload/catalog/controller/product/search.php b/upload/catalog/controller/product/search.php index ae9518c3..54cab180 100644 --- a/upload/catalog/controller/product/search.php +++ b/upload/catalog/controller/product/search.php @@ -1,6 +1,6 @@ load->language('product/search'); $this->load->model('catalog/category'); diff --git a/upload/catalog/controller/product/special.php b/upload/catalog/controller/product/special.php index c476a1b4..9194148b 100644 --- a/upload/catalog/controller/product/special.php +++ b/upload/catalog/controller/product/special.php @@ -1,6 +1,6 @@ load->language('product/special'); $this->load->model('catalog/product'); diff --git a/upload/catalog/controller/tool/upload.php b/upload/catalog/controller/tool/upload.php index 69fd2c64..fffe4fef 100644 --- a/upload/catalog/controller/tool/upload.php +++ b/upload/catalog/controller/tool/upload.php @@ -1,6 +1,6 @@ load->language('tool/upload'); $json = []; diff --git a/upload/catalog/model/account/activity.php b/upload/catalog/model/account/activity.php index cf9a983d..5daf82bb 100644 --- a/upload/catalog/model/account/activity.php +++ b/upload/catalog/model/account/activity.php @@ -1,6 +1,6 @@ db->query("INSERT INTO `" . DB_PREFIX . "address` SET `customer_id` = '" . (int)$this->customer->getId() . "', `firstname` = '" . $this->db->escape($data['firstname']) . "', `lastname` = '" . $this->db->escape($data['lastname']) . "', `company` = '" . $this->db->escape($data['company']) . "', `address_1` = '" . $this->db->escape($data['address_1']) . "', `address_2` = '" . $this->db->escape($data['address_2']) . "', `postcode` = '" . $this->db->escape($data['postcode']) . "', `city` = '" . $this->db->escape($data['city']) . "', `zone_id` = '" . (int)$data['zone_id'] . "', `country_id` = '" . (int)$data['country_id'] . "', `custom_field` = '" . $this->db->escape(isset($data['custom_field']) ? json_encode($data['custom_field']) : '') . "'"); $address_id = $this->db->getLastId(); @@ -12,7 +12,7 @@ public function addAddress(array $data): int { return $address_id; } - public function editAddress(int $address_id, array $data): void { + public function editAddress(int $address_id, array $data) { $this->db->query("UPDATE `" . DB_PREFIX . "address` SET `firstname` = '" . $this->db->escape($data['firstname']) . "', `lastname` = '" . $this->db->escape($data['lastname']) . "', `company` = '" . $this->db->escape($data['company']) . "', `address_1` = '" . $this->db->escape($data['address_1']) . "', `address_2` = '" . $this->db->escape($data['address_2']) . "', `postcode` = '" . $this->db->escape($data['postcode']) . "', `city` = '" . $this->db->escape($data['city']) . "', `zone_id` = '" . (int)$data['zone_id'] . "', `country_id` = '" . (int)$data['country_id'] . "', `custom_field` = '" . $this->db->escape(isset($data['custom_field']) ? json_encode($data['custom_field']) : '') . "' WHERE `address_id` = '" . (int)$address_id . "' AND `customer_id` = '" . (int)$this->customer->getId() . "'"); if (!empty($data['default'])) { @@ -20,11 +20,11 @@ public function editAddress(int $address_id, array $data): void { } } - public function deleteAddress(int $address_id): void { + public function deleteAddress(int $address_id) { $this->db->query("DELETE FROM `" . DB_PREFIX . "address` WHERE `address_id` = '" . (int)$address_id . "' AND `customer_id` = '" . (int)$this->customer->getId() . "'"); } - public function getAddress(int $address_id): array { + public function getAddress(int $address_id) { $address_query = $this->db->query("SELECT DISTINCT * FROM `" . DB_PREFIX . "address` WHERE `address_id` = '" . (int)$address_id . "' AND `customer_id` = '" . (int)$this->customer->getId() . "'"); if ($address_query->num_rows) { @@ -76,7 +76,7 @@ public function getAddress(int $address_id): array { } } - public function getAddresses(): array { + public function getAddresses() { $address_data = []; $query = $this->db->query("SELECT * FROM `" . DB_PREFIX . "address` WHERE `customer_id` = '" . (int)$this->customer->getId() . "'"); @@ -131,7 +131,7 @@ public function getAddresses(): array { return $address_data; } - public function getTotalAddresses(): int { + public function getTotalAddresses() { $query = $this->db->query("SELECT COUNT(*) AS total FROM `" . DB_PREFIX . "address` WHERE `customer_id` = '" . (int)$this->customer->getId() . "'"); return (int)$query->row['total']; diff --git a/upload/catalog/model/account/api.php b/upload/catalog/model/account/api.php index f8c53ab0..9c9efb6a 100644 --- a/upload/catalog/model/account/api.php +++ b/upload/catalog/model/account/api.php @@ -1,12 +1,12 @@ db->query("SELECT * FROM `" . DB_PREFIX . "api` WHERE `key` = '" . $this->db->escape($key) . "' AND `status` = '1'"); return $query->row; } - public function addApiSession(int $api_id, string $session_id, string $ip): string { + public function addApiSession(int $api_id, string $session_id, string $ip) { $token = token(32); $this->db->query("INSERT INTO `" . DB_PREFIX . "api_session` SET `api_id` = '" . (int)$api_id . "', `token` = '" . $this->db->escape($token) . "', `session_id` = '" . $this->db->escape($session_id) . "', `ip` = '" . $this->db->escape($ip) . "', `date_added` = NOW(), `date_modified` = NOW()"); @@ -14,7 +14,7 @@ public function addApiSession(int $api_id, string $session_id, string $ip): stri return $token; } - public function getApiIps(int $api_id): array { + public function getApiIps(int $api_id) { $query = $this->db->query("SELECT * FROM `" . DB_PREFIX . "api_ip` WHERE `api_id` = '" . (int)$api_id . "'"); return $query->rows; diff --git a/upload/catalog/model/account/custom_field.php b/upload/catalog/model/account/custom_field.php index dcc45173..205bc760 100644 --- a/upload/catalog/model/account/custom_field.php +++ b/upload/catalog/model/account/custom_field.php @@ -1,12 +1,12 @@ db->query("SELECT * FROM `" . DB_PREFIX . "custom_field` cf LEFT JOIN `" . DB_PREFIX . "custom_field_description` cfd ON (cf.`custom_field_id` = cfd.`custom_field_id`) WHERE cf.`status` = '1' AND cf.`custom_field_id` = '" . (int)$custom_field_id . "' AND cfd.`language_id` = '" . (int)$this->config->get('config_language_id') . "'"); return $query->row; } - public function getCustomFields(int $customer_group_id = 0): array { + public function getCustomFields(int $customer_group_id = 0) { $custom_field_data = []; if (!$customer_group_id) { diff --git a/upload/catalog/model/account/customer.php b/upload/catalog/model/account/customer.php index e571c97d..73cfd0ec 100644 --- a/upload/catalog/model/account/customer.php +++ b/upload/catalog/model/account/customer.php @@ -1,6 +1,6 @@ config->get('config_customer_group_display')) && in_array($data['customer_group_id'], $this->config->get('config_customer_group_display'))) { $customer_group_id = $data['customer_group_id']; } else { @@ -94,21 +94,21 @@ public function addCustomer(array $data): int { return $customer_id; } - public function editCustomer(array $data): void { + public function editCustomer(array $data) { $customer_id = $this->customer->getId(); $this->db->query("UPDATE `" . DB_PREFIX . "customer` SET `firstname` = '" . $this->db->escape($data['firstname']) . "', `lastname` = '" . $this->db->escape($data['lastname']) . "', `email` = '" . $this->db->escape($data['email']) . "', `telephone` = '" . $this->db->escape($data['telephone']) . "', `fax` = '" . $this->db->escape($data['fax']) . "', `custom_field` = '" . $this->db->escape(isset($data['custom_field']) ? json_encode($data['custom_field']) : '') . "' WHERE `customer_id` = '" . (int)$customer_id . "'"); } - public function editPassword(string $email, string $password): void { + public function editPassword(string $email, string $password) { $this->db->query("UPDATE `" . DB_PREFIX . "customer` SET `password` = '" . $this->db->escape(password_hash(html_entity_decode($password, ENT_QUOTES, 'UTF-8'), PASSWORD_DEFAULT)) . "', `code` = '' WHERE LCASE(email) = '" . $this->db->escape(utf8_strtolower($email)) . "'"); } - public function editCode(string $email, string $code): void { + public function editCode(string $email, string $code) { $this->db->query("UPDATE `" . DB_PREFIX . "customer` SET `code` = '" . $this->db->escape($code) . "' WHERE LCASE(email) = '" . $this->db->escape(utf8_strtolower($email)) . "'"); } - public function editNewsletter(string $newsletter): void { + public function editNewsletter(string $newsletter) { $this->db->query("UPDATE `" . DB_PREFIX . "customer` SET `newsletter` = '" . (int)$newsletter . "' WHERE `customer_id` = '" . (int)$this->customer->getId() . "'"); } @@ -118,19 +118,19 @@ public function getCustomer($customer_id) { return $query->row; } - public function getCustomerByEmail(string $email): array { + public function getCustomerByEmail(string $email) { $query = $this->db->query("SELECT * FROM `" . DB_PREFIX . "customer` WHERE LCASE(email) = '" . $this->db->escape(utf8_strtolower($email)) . "'"); return $query->row; } - public function getCustomerByCode(string $code): array { + public function getCustomerByCode(string $code) { $query = $this->db->query("SELECT `customer_id`, `firstname`, `lastname`, `email` FROM `" . DB_PREFIX . "customer` WHERE `code` = '" . $this->db->escape($code) . "' AND `code` != ''"); return $query->row; } - public function getCustomerByToken(string $token): array { + public function getCustomerByToken(string $token) { $query = $this->db->query("SELECT * FROM `" . DB_PREFIX . "customer` WHERE `token` = '" . $this->db->escape($token) . "' AND `token` != ''"); $this->db->query("UPDATE `" . DB_PREFIX . "customer` SET `token` = ''"); @@ -138,25 +138,25 @@ public function getCustomerByToken(string $token): array { return $query->row; } - public function getTotalCustomersByEmail(string $email): int { + public function getTotalCustomersByEmail(string $email) { $query = $this->db->query("SELECT COUNT(*) AS total FROM `" . DB_PREFIX . "customer` WHERE LCASE(email) = '" . $this->db->escape(utf8_strtolower($email)) . "'"); return (int)$query->row['total']; } - public function getRewardTotal(int $customer_id): int { + public function getRewardTotal(int $customer_id) { $query = $this->db->query("SELECT SUM(`points`) AS total FROM `" . DB_PREFIX . "customer_reward` WHERE `customer_id` = '" . (int)$customer_id . "'"); return (int)$query->row['total']; } - public function getIps(int $customer_id): array { + public function getIps(int $customer_id) { $query = $this->db->query("SELECT * FROM `" . DB_PREFIX . "customer_ip` WHERE `customer_id` = '" . (int)$customer_id . "'"); return $query->rows; } - public function addLoginAttempt(string $email): void { + public function addLoginAttempt(string $email) { $query = $this->db->query("SELECT * FROM " . DB_PREFIX . "customer_login WHERE email = '" . $this->db->escape(utf8_strtolower((string)$email)) . "'"); if (!$query->num_rows) { @@ -166,13 +166,13 @@ public function addLoginAttempt(string $email): void { } } - public function getLoginAttempts(string $email): array { + public function getLoginAttempts(string $email) { $query = $this->db->query("SELECT * FROM `" . DB_PREFIX . "customer_login` WHERE LCASE(`email`) = '" . $this->db->escape(utf8_strtolower($email)) . "'"); return $query->row; } - public function deleteLoginAttempts(string $email): void { + public function deleteLoginAttempts(string $email) { $this->db->query("DELETE FROM `" . DB_PREFIX . "customer_login` WHERE LCASE(`email`) = '" . $this->db->escape(utf8_strtolower($email)) . "'"); } } diff --git a/upload/catalog/model/account/customer_group.php b/upload/catalog/model/account/customer_group.php index e0696f0a..d4b2f3e0 100644 --- a/upload/catalog/model/account/customer_group.php +++ b/upload/catalog/model/account/customer_group.php @@ -1,12 +1,12 @@ db->query("SELECT DISTINCT * FROM `" . DB_PREFIX . "customer_group` cg LEFT JOIN `" . DB_PREFIX . "customer_group_description` cgd ON (cg.`customer_group_id` = cgd.`customer_group_id`) WHERE cg.`customer_group_id` = '" . (int)$customer_group_id . "' AND cgd.`language_id` = '" . (int)$this->config->get('config_language_id') . "'"); return $query->row; } - public function getCustomerGroups(): array { + public function getCustomerGroups() { $query = $this->db->query("SELECT * FROM `" . DB_PREFIX . "customer_group` cg LEFT JOIN `" . DB_PREFIX . "customer_group_description` cgd ON (cg.`customer_group_id` = cgd.`customer_group_id`) WHERE cgd.`language_id` = '" . (int)$this->config->get('config_language_id') . "' ORDER BY cg.`sort_order` ASC, cgd.`name` ASC"); return $query->rows; diff --git a/upload/catalog/model/account/download.php b/upload/catalog/model/account/download.php index c266de3f..7038863e 100644 --- a/upload/catalog/model/account/download.php +++ b/upload/catalog/model/account/download.php @@ -1,6 +1,6 @@ config->get('config_complete_status'); @@ -18,7 +18,7 @@ public function getDownload(int $download_id): array { return []; } - public function getDownloads(int $start = 0, int $limit = 20): array { + public function getDownloads(int $start = 0, int $limit = 20) { if ($start < 0) { $start = 0; } @@ -44,7 +44,7 @@ public function getDownloads(int $start = 0, int $limit = 20): array { return []; } - public function getTotalDownloads(): int { + public function getTotalDownloads() { $implode = []; $order_statuses = (array)$this->config->get('config_complete_status'); diff --git a/upload/catalog/model/account/order.php b/upload/catalog/model/account/order.php index c6f04943..7ea94560 100644 --- a/upload/catalog/model/account/order.php +++ b/upload/catalog/model/account/order.php @@ -1,6 +1,6 @@ db->query("SELECT * FROM `" . DB_PREFIX . "order` WHERE `order_id` = '" . (int)$order_id . "' AND `customer_id` = '" . (int)$this->customer->getId() . "' AND `customer_id` != '0' AND `order_status_id` > '0'"); if ($order_query->num_rows) { @@ -101,7 +101,7 @@ public function getOrder(int $order_id): array { } } - public function getOrders(int $start = 0, int $limit = 20): array { + public function getOrders(int $start = 0, int $limit = 20) { if ($start < 0) { $start = 0; } @@ -115,43 +115,43 @@ public function getOrders(int $start = 0, int $limit = 20): array { return $query->rows; } - public function getOrderProduct(int $order_id, int $order_product_id): array { + public function getOrderProduct(int $order_id, int $order_product_id) { $query = $this->db->query("SELECT * FROM `" . DB_PREFIX . "order_product` WHERE `order_id` = '" . (int)$order_id . "' AND order_product_id = '" . (int)$order_product_id . "'"); return $query->row; } - public function getOrderProducts(int $order_id): array { + public function getOrderProducts(int $order_id) { $query = $this->db->query("SELECT * FROM `" . DB_PREFIX . "order_product` WHERE `order_id` = '" . (int)$order_id . "'"); return $query->rows; } - public function getOrderOptions(int $order_id, int $order_product_id): array { + public function getOrderOptions(int $order_id, int $order_product_id) { $query = $this->db->query("SELECT * FROM `" . DB_PREFIX . "order_option` WHERE `order_id` = '" . (int)$order_id . "' AND `order_product_id` = '" . (int)$order_product_id . "'"); return $query->rows; } - public function getOrderVouchers(int $order_id): array { + public function getOrderVouchers(int $order_id) { $query = $this->db->query("SELECT * FROM `" . DB_PREFIX . "order_voucher` WHERE `order_id` = '" . (int)$order_id . "'"); return $query->rows; } - public function getOrderTotals(int $order_id): array { + public function getOrderTotals(int $order_id) { $query = $this->db->query("SELECT * FROM " . DB_PREFIX . "order_total WHERE `order_id` = '" . (int)$order_id . "' ORDER BY `sort_order`"); return $query->rows; } - public function getOrderHistories(int $order_id): array { + public function getOrderHistories(int $order_id) { $query = $this->db->query("SELECT `date_added`, os.`name` AS status, oh.`comment`, oh.`notify` FROM `" . DB_PREFIX . "order_history` oh LEFT JOIN `" . DB_PREFIX . "order_status` os ON oh.`order_status_id` = os.`order_status_id` WHERE oh.`order_id` = '" . (int)$order_id . "' AND os.`language_id` = '" . (int)$this->config->get('config_language_id') . "' ORDER BY oh.`date_added`"); return $query->rows; } - public function getTotalOrders(): int { + public function getTotalOrders() { $query = $this->db->query("SELECT COUNT(*) AS total FROM `" . DB_PREFIX . "order` o WHERE `customer_id` = '" . (int)$this->customer->getId() . "' AND o.`order_status_id` > '0' AND o.`store_id` = '" . (int)$this->config->get('config_store_id') . "'"); if ($query->num_rows) { @@ -161,7 +161,7 @@ public function getTotalOrders(): int { } } - public function getTotalOrderProductsByOrderId(int $order_id): int { + public function getTotalOrderProductsByOrderId(int $order_id) { $query = $this->db->query("SELECT COUNT(*) AS total FROM `" . DB_PREFIX . "order_product` WHERE `order_id` = '" . (int)$order_id . "'"); if ($query->num_rows) { @@ -171,7 +171,7 @@ public function getTotalOrderProductsByOrderId(int $order_id): int { } } - public function getTotalOrderVouchersByOrderId(int $order_id): int { + public function getTotalOrderVouchersByOrderId(int $order_id) { $query = $this->db->query("SELECT COUNT(*) AS total FROM `" . DB_PREFIX . "order_voucher` WHERE `order_id` = '" . (int)$order_id . "'"); if ($query->num_rows) { diff --git a/upload/catalog/model/account/recurring.php b/upload/catalog/model/account/recurring.php index 5dbf5bba..15231a13 100644 --- a/upload/catalog/model/account/recurring.php +++ b/upload/catalog/model/account/recurring.php @@ -1,12 +1,12 @@ db->query("SELECT `or`.*,`o`.`payment_method`,`o`.`payment_code`,`o`.`currency_code` FROM `" . DB_PREFIX . "order_recurring` `or` LEFT JOIN `" . DB_PREFIX . "order` `o` ON `or`.`order_id` = `o`.`order_id` WHERE `or`.`order_recurring_id` = '" . (int)$order_recurring_id . "' AND `o`.`customer_id` = '" . (int)$this->customer->getId() . "'"); return $query->row; } - public function getOrderRecurrings(int $start = 0, int $limit = 20): array { + public function getOrderRecurrings(int $start = 0, int $limit = 20) { if ($start < 0) { $start = 0; } @@ -20,29 +20,29 @@ public function getOrderRecurrings(int $start = 0, int $limit = 20): array { return $query->rows; } - public function getOrderRecurringByReference(string $reference): array { + public function getOrderRecurringByReference(string $reference) { $query = $this->db->query("SELECT * FROM `" . DB_PREFIX . "order_recurring` WHERE `reference` = '" . $this->db->escape($reference) . "'"); return $query->row; } - public function getOrderRecurringTransactions(int $order_recurring_id): array { + public function getOrderRecurringTransactions(int $order_recurring_id) { $query = $this->db->query("SELECT * FROM `" . DB_PREFIX . "order_recurring_transaction` WHERE `order_recurring_id` = '" . (int)$order_recurring_id . "'"); return $query->rows; } - public function getTotalOrderRecurrings(): int { + public function getTotalOrderRecurrings() { $query = $this->db->query("SELECT COUNT(*) AS total FROM `" . DB_PREFIX . "order_recurring` `or` LEFT JOIN `" . DB_PREFIX . "order` `o` ON `or`.`order_id` = `o`.`order_id` WHERE `o`.`customer_id` = '" . (int)$this->customer->getId() . "'"); return (int)$query->row['total']; } - public function addOrderRecurringTransaction(int $order_recurring_id, string $type): void { + public function addOrderRecurringTransaction(int $order_recurring_id, string $type) { $this->db->query("INSERT INTO `" . DB_PREFIX . "order_recurring_transaction` SET `order_recurring_id` = '" . (int)$order_recurring_id . "', `date_added` = NOW(), `type` = '" . (int)$type . "'"); } - public function editOrderRecurringStatus(int $order_recurring_id, $status): void { + public function editOrderRecurringStatus(int $order_recurring_id, $status) { $this->db->query("UPDATE `" . DB_PREFIX . "order_recurring` SET `status` = '" . (bool)$status . "' WHERE `order_recurring_id` = '" . (int)$order_recurring_id . "'"); } } diff --git a/upload/catalog/model/account/return.php b/upload/catalog/model/account/return.php index eaadf750..d2cadd0f 100644 --- a/upload/catalog/model/account/return.php +++ b/upload/catalog/model/account/return.php @@ -1,18 +1,18 @@ db->query("INSERT INTO `" . DB_PREFIX . "return` SET `order_id` = '" . (int)$data['order_id'] . "', `product_id` = '" . (int)$data['product_id'] . "', `customer_id` = '" . (int)$this->customer->getId() . "', `firstname` = '" . $this->db->escape((string)$data['firstname']) . "', `lastname` = '" . $this->db->escape((string)$data['lastname']) . "', `email` = '" . $this->db->escape((string)$data['email']) . "', `telephone` = '" . $this->db->escape((string)$data['telephone']) . "', `product` = '" . $this->db->escape((string)$data['product']) . "', `model` = '" . $this->db->escape((string)$data['model']) . "', `quantity` = '" . (int)$data['quantity'] . "', `opened` = '" . (int)$data['opened'] . "', `return_reason_id` = '" . (int)$data['return_reason_id'] . "', `return_status_id` = '" . (int)$this->config->get('config_return_status_id') . "', `comment` = '" . $this->db->escape((string)$data['comment']) . "', `date_ordered` = '" . $this->db->escape((string)$data['date_ordered']) . "', `date_added` = NOW(), `date_modified` = NOW()"); return $this->db->getLastId(); } - public function getReturn(int $return_id): array { + public function getReturn(int $return_id) { $query = $this->db->query("SELECT r.`return_id`, r.`order_id`, r.`firstname`, r.`lastname`, r.`email`, r.`telephone`, r.`product`, r.`model`, r.`quantity`, r.`opened`, (SELECT rr.`name` FROM `" . DB_PREFIX . "return_reason` rr WHERE rr.`return_reason_id` = r.`return_reason_id` AND rr.`language_id` = '" . (int)$this->config->get('config_language_id') . "') AS reason, (SELECT ra.`name` FROM `" . DB_PREFIX . "return_action` ra WHERE ra.`return_action_id` = r.`return_action_id` AND ra.`language_id` = '" . (int)$this->config->get('config_language_id') . "') AS action, (SELECT rs.`name` FROM `" . DB_PREFIX . "return_status` rs WHERE rs.`return_status_id` = r.`return_status_id` AND rs.`language_id` = '" . (int)$this->config->get('config_language_id') . "') AS status, r.`comment`, r.`date_ordered`, r.`date_added`, r.`date_modified` FROM `" . DB_PREFIX . "return` r WHERE r.`return_id` = '" . (int)$return_id . "' AND r.`customer_id` = '" . $this->customer->getId() . "'"); return $query->row; } - public function getReturns(int $start = 0, int $limit = 20): array { + public function getReturns(int $start = 0, int $limit = 20) { if ($start < 0) { $start = 0; } @@ -26,13 +26,13 @@ public function getReturns(int $start = 0, int $limit = 20): array { return $query->rows; } - public function getTotalReturns(): int { + public function getTotalReturns() { $query = $this->db->query("SELECT COUNT(*) AS total FROM `" . DB_PREFIX . "return`WHERE `customer_id` = '" . $this->customer->getId() . "'"); return (int)$query->row['total']; } - public function getReturnHistories(int $return_id): array { + public function getReturnHistories(int $return_id) { $query = $this->db->query("SELECT rh.`date_added`, rs.`name` AS status, rh.`comment` FROM `" . DB_PREFIX . "return_history` rh LEFT JOIN `" . DB_PREFIX . "return_status` rs ON (rh.`return_status_id` = rs.`return_status_id`) WHERE rh.`return_id` = '" . (int)$return_id . "' AND rs.`language_id` = '" . (int)$this->config->get('config_language_id') . "' ORDER BY rh.`date_added` ASC"); return $query->rows; diff --git a/upload/catalog/model/account/search.php b/upload/catalog/model/account/search.php index ded196ef..b77475df 100644 --- a/upload/catalog/model/account/search.php +++ b/upload/catalog/model/account/search.php @@ -1,6 +1,6 @@ db->query("INSERT INTO `" . DB_PREFIX . "customer_search` SET `store_id` = '" . (int)$this->config->get('config_store_id') . "', `language_id` = '" . (int)$this->config->get('config_language_id') . "', `customer_id` = '" . (int)$data['customer_id'] . "', `keyword` = '" . $this->db->escape((string)$data['keyword']) . "', `category_id` = '" . (int)$data['category_id'] . "', `sub_category` = '" . (int)$data['sub_category'] . "', `description` = '" . (int)$data['description'] . "', `products` = '" . (int)$data['products'] . "', `ip` = '" . $this->db->escape((string)$data['ip']) . "', `date_added` = NOW()"); } } diff --git a/upload/catalog/model/account/transaction.php b/upload/catalog/model/account/transaction.php index 429e2876..16c16603 100644 --- a/upload/catalog/model/account/transaction.php +++ b/upload/catalog/model/account/transaction.php @@ -1,6 +1,6 @@ customer->getId() . "'"; $sort_data = [ @@ -38,13 +38,13 @@ public function getTransactions(array $data = []): array { return $query->rows; } - public function getTotalTransactions(): int { + public function getTotalTransactions() { $query = $this->db->query("SELECT COUNT(*) AS total FROM `" . DB_PREFIX . "customer_transaction` WHERE `customer_id` = '" . (int)$this->customer->getId() . "'"); return (int)$query->row['total']; } - public function getTotalAmount(): int { + public function getTotalAmount() { $query = $this->db->query("SELECT SUM(amount) AS total FROM `" . DB_PREFIX . "customer_transaction` WHERE `customer_id` = '" . (int)$this->customer->getId() . "' GROUP BY `customer_id`"); if ($query->num_rows) { diff --git a/upload/catalog/model/account/wishlist.php b/upload/catalog/model/account/wishlist.php index 12d047b8..48815834 100644 --- a/upload/catalog/model/account/wishlist.php +++ b/upload/catalog/model/account/wishlist.php @@ -1,22 +1,22 @@ db->query("DELETE FROM `" . DB_PREFIX . "customer_wishlist` WHERE `customer_id` = '" . (int)$this->customer->getId() . "' AND `product_id` = '" . (int)$product_id . "'"); $this->db->query("INSERT INTO `" . DB_PREFIX . "customer_wishlist` SET `customer_id` = '" . (int)$this->customer->getId() . "', `product_id` = '" . (int)$product_id . "', `date_added` = NOW()"); } - public function deleteWishlist(int $product_id): void { + public function deleteWishlist(int $product_id) { $this->db->query("DELETE FROM `" . DB_PREFIX . "customer_wishlist` WHERE `customer_id` = '" . (int)$this->customer->getId() . "' AND `product_id` = '" . (int)$product_id . "'"); } - public function getWishlist(): array { + public function getWishlist() { $query = $this->db->query("SELECT * FROM `" . DB_PREFIX . "customer_wishlist` WHERE `customer_id` = '" . (int)$this->customer->getId() . "'"); return $query->rows; } - public function getTotalWishlist(): int { + public function getTotalWishlist() { $query = $this->db->query("SELECT COUNT(*) AS total FROM `" . DB_PREFIX . "customer_wishlist` WHERE `customer_id` = '" . (int)$this->customer->getId() . "'"); return (int)$query->row['total']; diff --git a/upload/catalog/model/affiliate/affiliate.php b/upload/catalog/model/affiliate/affiliate.php index 06ff84cf..c90836a5 100644 --- a/upload/catalog/model/affiliate/affiliate.php +++ b/upload/catalog/model/affiliate/affiliate.php @@ -75,41 +75,41 @@ public function addAffiliate(array $data) { return $affiliate_id; } - public function editAffiliate(array $data): void { + public function editAffiliate(array $data) { $affiliate_id = $this->affiliate->getId(); $this->db->query("UPDATE " . DB_PREFIX . "affiliate SET firstname = '" . $this->db->escape($data['firstname']) . "', lastname = '" . $this->db->escape($data['lastname']) . "', email = '" . $this->db->escape($data['email']) . "', telephone = '" . $this->db->escape($data['telephone']) . "', fax = '" . $this->db->escape($data['fax']) . "', company = '" . $this->db->escape($data['company']) . "', website = '" . $this->db->escape($data['website']) . "', address_1 = '" . $this->db->escape($data['address_1']) . "', address_2 = '" . $this->db->escape($data['address_2']) . "', city = '" . $this->db->escape($data['city']) . "', postcode = '" . $this->db->escape($data['postcode']) . "', country_id = '" . (int)$data['country_id'] . "', zone_id = '" . (int)$data['zone_id'] . "' WHERE affiliate_id = '" . (int)$affiliate_id . "'"); } - public function editPayment(array $data): void { + public function editPayment(array $data) { $affiliate_id = $this->affiliate->getId(); $this->db->query("UPDATE " . DB_PREFIX . "affiliate SET tax = '" . $this->db->escape($data['tax']) . "', payment = '" . $this->db->escape($data['payment']) . "', cheque = '" . $this->db->escape($data['cheque']) . "', paypal = '" . $this->db->escape($data['paypal']) . "', bank_name = '" . $this->db->escape($data['bank_name']) . "', bank_branch_number = '" . $this->db->escape($data['bank_branch_number']) . "', bank_swift_code = '" . $this->db->escape($data['bank_swift_code']) . "', bank_account_name = '" . $this->db->escape($data['bank_account_name']) . "', bank_account_number = '" . $this->db->escape($data['bank_account_number']) . "' WHERE affiliate_id = '" . (int)$affiliate_id . "'"); } - public function editPassword(string $email, string $password): void { + public function editPassword(string $email, string $password) { $this->db->query("UPDATE " . DB_PREFIX . "affiliate SET password = '" . $this->db->escape(password_hash(html_entity_decode($password, ENT_QUOTES, 'UTF-8'), PASSWORD_DEFAULT)) . "' WHERE LCASE(email) = '" . $this->db->escape(utf8_strtolower($email)) . "'"); } - public function getAffiliate(int $affiliate_id): array { + public function getAffiliate(int $affiliate_id) { $query = $this->db->query("SELECT * FROM " . DB_PREFIX . "affiliate WHERE affiliate_id = '" . (int)$affiliate_id . "'"); return $query->row; } - public function getAffiliateByEmail(string $email): array { + public function getAffiliateByEmail(string $email) { $query = $this->db->query("SELECT * FROM " . DB_PREFIX . "affiliate WHERE LCASE(email) = '" . $this->db->escape(utf8_strtolower($email)) . "'"); return $query->row; } - public function getAffiliateByCode(string $code): array { + public function getAffiliateByCode(string $code) { $query = $this->db->query("SELECT * FROM " . DB_PREFIX . "affiliate WHERE code = '" . $this->db->escape($code) . "'"); return $query->row; } - public function getTotalAffiliatesByEmail(string $email): int { + public function getTotalAffiliatesByEmail(string $email) { $query = $this->db->query("SELECT COUNT(*) AS total FROM " . DB_PREFIX . "affiliate WHERE LCASE(email) = '" . $this->db->escape(utf8_strtolower($email)) . "'"); return (int)$query->row['total']; @@ -148,17 +148,17 @@ public function addTransaction(int $affiliate_id, int $amount = 0, int $order_id } } - public function deleteTransaction(int $order_id): void { + public function deleteTransaction(int $order_id) { $this->db->query("DELETE FROM " . DB_PREFIX . "affiliate_transaction WHERE order_id = '" . (int)$order_id . "'"); } - public function getTransactionTotal(int $affiliate_id): int { + public function getTransactionTotal(int $affiliate_id) { $query = $this->db->query("SELECT SUM(amount) AS total FROM " . DB_PREFIX . "affiliate_transaction WHERE affiliate_id = '" . (int)$affiliate_id . "'"); return (int)$query->row['total']; } - public function addLoginAttempt(string $email): void { + public function addLoginAttempt(string $email) { $query = $this->db->query("SELECT * FROM " . DB_PREFIX . "affiliate_login WHERE email = '" . $this->db->escape(utf8_strtolower((string)$email)) . "' AND ip = '" . $this->db->escape($this->request->server['REMOTE_ADDR']) . "'"); if (!$query->num_rows) { @@ -168,13 +168,13 @@ public function addLoginAttempt(string $email): void { } } - public function getLoginAttempts(string $email): array { + public function getLoginAttempts(string $email) { $query = $this->db->query("SELECT * FROM `" . DB_PREFIX . "affiliate_login` WHERE email = '" . $this->db->escape(utf8_strtolower($email)) . "'"); return $query->row; } - public function deleteLoginAttempts(string $email): void { + public function deleteLoginAttempts(string $email) { $this->db->query("DELETE FROM `" . DB_PREFIX . "affiliate_login` WHERE email = '" . $this->db->escape(utf8_strtolower($email)) . "'"); } } diff --git a/upload/catalog/model/affiliate/transaction.php b/upload/catalog/model/affiliate/transaction.php index 1192ffe8..ea155992 100644 --- a/upload/catalog/model/affiliate/transaction.php +++ b/upload/catalog/model/affiliate/transaction.php @@ -1,6 +1,6 @@ affiliate->getId() . "'"; $sort_data = [ @@ -38,13 +38,13 @@ public function getTransactions(array $data = []): array { return $query->rows; } - public function getTotalTransactions(): int { + public function getTotalTransactions() { $query = $this->db->query("SELECT COUNT(*) AS total FROM `" . DB_PREFIX . "affiliate_transaction` WHERE `affiliate_id` = '" . (int)$this->affiliate->getId() . "'"); return (int)$query->row['total']; } - public function getBalance(): int { + public function getBalance() { $query = $this->db->query("SELECT SUM(amount) AS total FROM `" . DB_PREFIX . "affiliate_transaction` WHERE `affiliate_id` = '" . (int)$this->affiliate->getId() . "' GROUP BY `affiliate_id`"); if ($query->num_rows) { diff --git a/upload/catalog/model/catalog/category.php b/upload/catalog/model/catalog/category.php index b7915be4..0f2c253b 100644 --- a/upload/catalog/model/catalog/category.php +++ b/upload/catalog/model/catalog/category.php @@ -1,18 +1,18 @@ db->query("SELECT DISTINCT * FROM " . DB_PREFIX . "category c LEFT JOIN " . DB_PREFIX . "category_description cd ON (c.category_id = cd.category_id) LEFT JOIN " . DB_PREFIX . "category_to_store c2s ON (c.category_id = c2s.category_id) WHERE c.category_id = '" . (int)$category_id . "' AND cd.language_id = '" . (int)$this->config->get('config_language_id') . "' AND c2s.store_id = '" . (int)$this->config->get('config_store_id') . "' AND c.status = '1'"); return $query->row; } - public function getCategories(int $parent_id = 0): array { + public function getCategories(int $parent_id = 0) { $query = $this->db->query("SELECT * FROM " . DB_PREFIX . "category c LEFT JOIN " . DB_PREFIX . "category_description cd ON (c.category_id = cd.category_id) LEFT JOIN " . DB_PREFIX . "category_to_store c2s ON (c.category_id = c2s.category_id) WHERE c.parent_id = '" . (int)$parent_id . "' AND cd.language_id = '" . (int)$this->config->get('config_language_id') . "' AND c2s.store_id = '" . (int)$this->config->get('config_store_id') . "' AND c.status = '1' ORDER BY c.sort_order, LCASE(cd.name)"); return $query->rows; } - public function getCategoryFilters(int $category_id): array { + public function getCategoryFilters(int $category_id) { $implode = []; $query = $this->db->query("SELECT filter_id FROM " . DB_PREFIX . "category_filter WHERE category_id = '" . (int)$category_id . "'"); @@ -51,7 +51,7 @@ public function getCategoryFilters(int $category_id): array { return $filter_group_data; } - public function getCategoryLayoutId(int $category_id): int { + public function getCategoryLayoutId(int $category_id) { $query = $this->db->query("SELECT * FROM " . DB_PREFIX . "category_to_layout WHERE category_id = '" . (int)$category_id . "' AND store_id = '" . (int)$this->config->get('config_store_id') . "'"); if ($query->num_rows) { @@ -61,7 +61,7 @@ public function getCategoryLayoutId(int $category_id): int { } } - public function getTotalCategoriesByCategoryId(int $parent_id = 0): int { + public function getTotalCategoriesByCategoryId(int $parent_id = 0) { $query = $this->db->query("SELECT COUNT(*) AS total FROM " . DB_PREFIX . "category c LEFT JOIN " . DB_PREFIX . "category_to_store c2s ON (c.category_id = c2s.category_id) WHERE c.parent_id = '" . (int)$parent_id . "' AND c2s.store_id = '" . (int)$this->config->get('config_store_id') . "' AND c.status = '1'"); return (int)$query->row['total']; diff --git a/upload/catalog/model/catalog/information.php b/upload/catalog/model/catalog/information.php index 7b397ce3..b8400867 100644 --- a/upload/catalog/model/catalog/information.php +++ b/upload/catalog/model/catalog/information.php @@ -1,18 +1,18 @@ db->query("SELECT DISTINCT * FROM " . DB_PREFIX . "information i LEFT JOIN " . DB_PREFIX . "information_description id ON (i.information_id = id.information_id) LEFT JOIN " . DB_PREFIX . "information_to_store i2s ON (i.information_id = i2s.information_id) WHERE i.information_id = '" . (int)$information_id . "' AND id.language_id = '" . (int)$this->config->get('config_language_id') . "' AND i2s.store_id = '" . (int)$this->config->get('config_store_id') . "' AND i.status = '1'"); return $query->row; } - public function getInformations(): array { + public function getInformations() { $query = $this->db->query("SELECT * FROM " . DB_PREFIX . "information i LEFT JOIN " . DB_PREFIX . "information_description id ON (i.information_id = id.information_id) LEFT JOIN " . DB_PREFIX . "information_to_store i2s ON (i.information_id = i2s.information_id) WHERE id.language_id = '" . (int)$this->config->get('config_language_id') . "' AND i2s.store_id = '" . (int)$this->config->get('config_store_id') . "' AND i.status = '1' ORDER BY i.sort_order, LCASE(id.title) ASC"); return $query->rows; } - public function getInformationLayoutId(int $information_id): int { + public function getInformationLayoutId(int $information_id) { $query = $this->db->query("SELECT * FROM " . DB_PREFIX . "information_to_layout WHERE information_id = '" . (int)$information_id . "' AND store_id = '" . (int)$this->config->get('config_store_id') . "'"); if ($query->num_rows) { diff --git a/upload/catalog/model/catalog/manufacturer.php b/upload/catalog/model/catalog/manufacturer.php index 27369398..47e12062 100644 --- a/upload/catalog/model/catalog/manufacturer.php +++ b/upload/catalog/model/catalog/manufacturer.php @@ -1,12 +1,12 @@ db->query("SELECT * FROM " . DB_PREFIX . "manufacturer m LEFT JOIN " . DB_PREFIX . "manufacturer_to_store m2s ON (m.manufacturer_id = m2s.manufacturer_id) WHERE m.manufacturer_id = '" . (int)$manufacturer_id . "' AND m2s.store_id = '" . (int)$this->config->get('config_store_id') . "'"); return $query->row; } - public function getManufacturers(array $data = []): array { + public function getManufacturers(array $data = []) { if ($data) { $sql = "SELECT * FROM " . DB_PREFIX . "manufacturer m LEFT JOIN " . DB_PREFIX . "manufacturer_to_store m2s ON (m.manufacturer_id = m2s.manufacturer_id) WHERE m2s.store_id = '" . (int)$this->config->get('config_store_id') . "'"; diff --git a/upload/catalog/model/catalog/product.php b/upload/catalog/model/catalog/product.php index 82bc430e..3ea8c575 100644 --- a/upload/catalog/model/catalog/product.php +++ b/upload/catalog/model/catalog/product.php @@ -1,10 +1,10 @@ db->query("UPDATE " . DB_PREFIX . "product SET viewed = (viewed + 1) WHERE product_id = '" . (int)$product_id . "'"); } - public function getProduct(int $product_id): array { + public function getProduct(int $product_id) { $query = $this->db->query("SELECT DISTINCT *, pd.name AS name, p.image, m.name AS manufacturer, (SELECT price FROM " . DB_PREFIX . "product_discount pd2 WHERE pd2.product_id = p.product_id AND pd2.customer_group_id = '" . (int)$this->config->get('config_customer_group_id') . "' AND pd2.quantity = '1' AND ((pd2.date_start = '0000-00-00' OR pd2.date_start < NOW()) AND (pd2.date_end = '0000-00-00' OR pd2.date_end > NOW())) ORDER BY pd2.priority ASC, pd2.price ASC LIMIT 1) AS discount, (SELECT price FROM " . DB_PREFIX . "product_special ps WHERE ps.product_id = p.product_id AND ps.customer_group_id = '" . (int)$this->config->get('config_customer_group_id') . "' AND ((ps.date_start = '0000-00-00' OR ps.date_start < NOW()) AND (ps.date_end = '0000-00-00' OR ps.date_end > NOW())) ORDER BY ps.priority ASC, ps.price ASC LIMIT 1) AS special, (SELECT points FROM " . DB_PREFIX . "product_reward pr WHERE pr.product_id = p.product_id AND pr.customer_group_id = '" . (int)$this->config->get('config_customer_group_id') . "') AS reward, (SELECT ss.name FROM " . DB_PREFIX . "stock_status ss WHERE ss.stock_status_id = p.stock_status_id AND ss.language_id = '" . (int)$this->config->get('config_language_id') . "') AS stock_status, (SELECT wcd.unit FROM " . DB_PREFIX . "weight_class_description wcd WHERE p.weight_class_id = wcd.weight_class_id AND wcd.language_id = '" . (int)$this->config->get('config_language_id') . "') AS weight_class, (SELECT lcd.unit FROM " . DB_PREFIX . "length_class_description lcd WHERE p.length_class_id = lcd.length_class_id AND lcd.language_id = '" . (int)$this->config->get('config_language_id') . "') AS length_class, (SELECT AVG(rating) AS total FROM " . DB_PREFIX . "review r1 WHERE r1.product_id = p.product_id AND r1.status = '1' GROUP BY r1.product_id) AS rating, (SELECT COUNT(*) AS total FROM " . DB_PREFIX . "review r2 WHERE r2.product_id = p.product_id AND r2.status = '1' GROUP BY r2.product_id) AS reviews, p.sort_order FROM " . DB_PREFIX . "product p LEFT JOIN " . DB_PREFIX . "product_description pd ON (p.product_id = pd.product_id) LEFT JOIN " . DB_PREFIX . "product_to_store p2s ON (p.product_id = p2s.product_id) LEFT JOIN " . DB_PREFIX . "manufacturer m ON (p.manufacturer_id = m.manufacturer_id) WHERE p.product_id = '" . (int)$product_id . "' AND pd.language_id = '" . (int)$this->config->get('config_language_id') . "' AND p.status = '1' AND p.date_available <= NOW() AND p2s.store_id = '" . (int)$this->config->get('config_store_id') . "'"); if ($query->num_rows) { @@ -56,7 +56,7 @@ public function getProduct(int $product_id): array { } } - public function getProducts(array $data = []): array { + public function getProducts(array $data = []) { $sql = "SELECT p.product_id, (SELECT AVG(rating) AS total FROM " . DB_PREFIX . "review r1 WHERE r1.product_id = p.product_id AND r1.status = '1' GROUP BY r1.product_id) AS rating, (SELECT price FROM " . DB_PREFIX . "product_discount pd2 WHERE pd2.product_id = p.product_id AND pd2.customer_group_id = '" . (int)$this->config->get('config_customer_group_id') . "' AND pd2.quantity = '1' AND ((pd2.date_start = '0000-00-00' OR pd2.date_start < NOW()) AND (pd2.date_end = '0000-00-00' OR pd2.date_end > NOW())) ORDER BY pd2.priority ASC, pd2.price ASC LIMIT 1) AS discount, (SELECT price FROM " . DB_PREFIX . "product_special ps WHERE ps.product_id = p.product_id AND ps.customer_group_id = '" . (int)$this->config->get('config_customer_group_id') . "' AND ((ps.date_start = '0000-00-00' OR ps.date_start < NOW()) AND (ps.date_end = '0000-00-00' OR ps.date_end > NOW())) ORDER BY ps.priority ASC, ps.price ASC LIMIT 1) AS special"; if (!empty($data['filter_category_id'])) { @@ -209,7 +209,7 @@ public function getProducts(array $data = []): array { return $product_data; } - public function getProductSpecials(array $data = []): array { + public function getProductSpecials(array $data = []) { $sql = "SELECT DISTINCT ps.product_id, (SELECT AVG(rating) FROM " . DB_PREFIX . "review r1 WHERE r1.product_id = ps.product_id AND r1.status = '1' GROUP BY r1.product_id) AS rating FROM " . DB_PREFIX . "product_special ps LEFT JOIN " . DB_PREFIX . "product p ON (ps.product_id = p.product_id) LEFT JOIN " . DB_PREFIX . "product_description pd ON (p.product_id = pd.product_id) LEFT JOIN " . DB_PREFIX . "product_to_store p2s ON (p.product_id = p2s.product_id) WHERE p.status = '1' AND p.date_available <= NOW() AND p2s.store_id = '" . (int)$this->config->get('config_store_id') . "' AND ps.customer_group_id = '" . (int)$this->config->get('config_customer_group_id') . "' AND ((ps.date_start = '0000-00-00' OR ps.date_start < NOW()) AND (ps.date_end = '0000-00-00' OR ps.date_end > NOW())) GROUP BY ps.product_id"; $sort_data = [ @@ -261,7 +261,7 @@ public function getProductSpecials(array $data = []): array { return $product_data; } - public function getLatestProducts(int $limit): array { + public function getLatestProducts(int $limit) { $product_data = $this->cache->get('product.latest.' . (int)$this->config->get('config_language_id') . '.' . (int)$this->config->get('config_store_id') . '.' . $this->config->get('config_customer_group_id') . '.' . (int)$limit); if (!$product_data) { @@ -280,7 +280,7 @@ public function getLatestProducts(int $limit): array { return $product_data; } - public function getPopularProducts(int $limit): array { + public function getPopularProducts(int $limit) { $product_data = $this->cache->get('product.popular.' . (int)$this->config->get('config_language_id') . '.' . (int)$this->config->get('config_store_id') . '.' . $this->config->get('config_customer_group_id') . '.' . (int)$limit); if (!$product_data) { @@ -299,7 +299,7 @@ public function getPopularProducts(int $limit): array { return $product_data; } - public function getBestSellerProducts(int $limit): array { + public function getBestSellerProducts(int $limit) { $product_data = $this->cache->get('product.bestseller.' . (int)$this->config->get('config_language_id') . '.' . (int)$this->config->get('config_store_id') . '.' . $this->config->get('config_customer_group_id') . '.' . (int)$limit); if (!$product_data) { @@ -318,7 +318,7 @@ public function getBestSellerProducts(int $limit): array { return $product_data; } - public function getProductAttributes(int $product_id): array { + public function getProductAttributes(int $product_id) { $product_attribute_group_data = []; $product_attribute_group_query = $this->db->query("SELECT ag.attribute_group_id, agd.name FROM " . DB_PREFIX . "product_attribute pa LEFT JOIN " . DB_PREFIX . "attribute a ON (pa.attribute_id = a.attribute_id) LEFT JOIN " . DB_PREFIX . "attribute_group ag ON (a.attribute_group_id = ag.attribute_group_id) LEFT JOIN " . DB_PREFIX . "attribute_group_description agd ON (ag.attribute_group_id = agd.attribute_group_id) WHERE pa.product_id = '" . (int)$product_id . "' AND agd.language_id = '" . (int)$this->config->get('config_language_id') . "' GROUP BY ag.attribute_group_id ORDER BY ag.sort_order, agd.name"); @@ -346,7 +346,7 @@ public function getProductAttributes(int $product_id): array { return $product_attribute_group_data; } - public function getProductOptions(int $product_id): array { + public function getProductOptions(int $product_id) { $product_option_data = []; $product_option_query = $this->db->query("SELECT * FROM " . DB_PREFIX . "product_option po LEFT JOIN `" . DB_PREFIX . "option` o ON (po.option_id = o.option_id) LEFT JOIN " . DB_PREFIX . "option_description od ON (o.option_id = od.option_id) WHERE po.product_id = '" . (int)$product_id . "' AND od.language_id = '" . (int)$this->config->get('config_language_id') . "' ORDER BY o.sort_order"); @@ -385,19 +385,19 @@ public function getProductOptions(int $product_id): array { return $product_option_data; } - public function getProductDiscounts(int $product_id): array { + public function getProductDiscounts(int $product_id) { $query = $this->db->query("SELECT * FROM " . DB_PREFIX . "product_discount WHERE product_id = '" . (int)$product_id . "' AND customer_group_id = '" . (int)$this->config->get('config_customer_group_id') . "' AND quantity > 1 AND ((date_start = '0000-00-00' OR date_start < NOW()) AND (date_end = '0000-00-00' OR date_end > NOW())) ORDER BY quantity ASC, priority ASC, price ASC"); return $query->rows; } - public function getProductImages(int $product_id): array { + public function getProductImages(int $product_id) { $query = $this->db->query("SELECT * FROM " . DB_PREFIX . "product_image WHERE product_id = '" . (int)$product_id . "' ORDER BY sort_order ASC"); return $query->rows; } - public function getProductRelated(int $product_id): array { + public function getProductRelated(int $product_id) { $product_data = []; $query = $this->db->query("SELECT * FROM " . DB_PREFIX . "product_related pr LEFT JOIN " . DB_PREFIX . "product p ON (pr.related_id = p.product_id) LEFT JOIN " . DB_PREFIX . "product_to_store p2s ON (p.product_id = p2s.product_id) WHERE pr.product_id = '" . (int)$product_id . "' AND p.status = '1' AND p.date_available <= NOW() AND p2s.store_id = '" . (int)$this->config->get('config_store_id') . "'"); @@ -409,7 +409,7 @@ public function getProductRelated(int $product_id): array { return $product_data; } - public function getProductLayoutId(int $product_id): int { + public function getProductLayoutId(int $product_id) { $query = $this->db->query("SELECT * FROM " . DB_PREFIX . "product_to_layout WHERE product_id = '" . (int)$product_id . "' AND store_id = '" . (int)$this->config->get('config_store_id') . "'"); if ($query->num_rows) { @@ -419,13 +419,13 @@ public function getProductLayoutId(int $product_id): int { } } - public function getCategories(int $product_id): array { + public function getCategories(int $product_id) { $query = $this->db->query("SELECT * FROM " . DB_PREFIX . "product_to_category WHERE product_id = '" . (int)$product_id . "'"); return $query->rows; } - public function getTotalProducts(array $data = []): int { + public function getTotalProducts(array $data = []) { $sql = "SELECT COUNT(DISTINCT p.product_id) AS total"; if (!empty($data['filter_category_id'])) { @@ -527,19 +527,19 @@ public function getTotalProducts(array $data = []): int { return (int)$query->row['total']; } - public function getProfile(int $product_id, int $recurring_id): array { + public function getProfile(int $product_id, int $recurring_id) { $query = $this->db->query("SELECT * FROM " . DB_PREFIX . "recurring r JOIN " . DB_PREFIX . "product_recurring pr ON (pr.recurring_id = r.recurring_id AND pr.product_id = '" . (int)$product_id . "') WHERE pr.recurring_id = '" . (int)$recurring_id . "' AND status = '1' AND pr.customer_group_id = '" . (int)$this->config->get('config_customer_group_id') . "'"); return $query->row; } - public function getProfiles(int $product_id): array { + public function getProfiles(int $product_id) { $query = $this->db->query("SELECT rd.* FROM " . DB_PREFIX . "product_recurring pr JOIN " . DB_PREFIX . "recurring_description rd ON (rd.language_id = " . (int)$this->config->get('config_language_id') . " AND rd.recurring_id = pr.recurring_id) JOIN " . DB_PREFIX . "recurring r ON r.recurring_id = rd.recurring_id WHERE pr.product_id = " . (int)$product_id . " AND status = '1' AND pr.customer_group_id = '" . (int)$this->config->get('config_customer_group_id') . "' ORDER BY sort_order ASC"); return $query->rows; } - public function getTotalProductSpecials(): int { + public function getTotalProductSpecials() { $query = $this->db->query("SELECT COUNT(DISTINCT ps.product_id) AS total FROM " . DB_PREFIX . "product_special ps LEFT JOIN " . DB_PREFIX . "product p ON (ps.product_id = p.product_id) LEFT JOIN " . DB_PREFIX . "product_to_store p2s ON (p.product_id = p2s.product_id) WHERE p.status = '1' AND p.date_available <= NOW() AND p2s.store_id = '" . (int)$this->config->get('config_store_id') . "' AND ps.customer_group_id = '" . (int)$this->config->get('config_customer_group_id') . "' AND ((ps.date_start = '0000-00-00' OR ps.date_start < NOW()) AND (ps.date_end = '0000-00-00' OR ps.date_end > NOW()))"); if (isset($query->row['total'])) { diff --git a/upload/catalog/model/catalog/review.php b/upload/catalog/model/catalog/review.php index fde1edfc..dfa3a35b 100644 --- a/upload/catalog/model/catalog/review.php +++ b/upload/catalog/model/catalog/review.php @@ -1,6 +1,6 @@ db->query("INSERT INTO " . DB_PREFIX . "review SET author = '" . $this->db->escape($data['name']) . "', customer_id = '" . (int)$this->customer->getId() . "', product_id = '" . (int)$product_id . "', text = '" . $this->db->escape($data['text']) . "', rating = '" . (int)$data['rating'] . "', date_added = NOW()"); $review_id = $this->db->getLastId(); @@ -48,7 +48,7 @@ public function addReview(int $product_id, array $data): void { } } - public function getReviewsByProductId(int $product_id, int $start = 0, int $limit = 20): array { + public function getReviewsByProductId(int $product_id, int $start = 0, int $limit = 20) { if ($start < 0) { $start = 0; } @@ -62,7 +62,7 @@ public function getReviewsByProductId(int $product_id, int $start = 0, int $limi return $query->rows; } - public function getTotalReviewsByProductId(int $product_id): int { + public function getTotalReviewsByProductId(int $product_id) { $query = $this->db->query("SELECT COUNT(*) AS total FROM " . DB_PREFIX . "review r LEFT JOIN " . DB_PREFIX . "product p ON (r.product_id = p.product_id) LEFT JOIN " . DB_PREFIX . "product_description pd ON (p.product_id = pd.product_id) WHERE p.product_id = '" . (int)$product_id . "' AND p.date_available <= NOW() AND p.status = '1' AND r.status = '1' AND pd.language_id = '" . (int)$this->config->get('config_language_id') . "'"); return (int)$query->row['total']; diff --git a/upload/catalog/model/checkout/marketing.php b/upload/catalog/model/checkout/marketing.php index b874afe1..c29f0414 100644 --- a/upload/catalog/model/checkout/marketing.php +++ b/upload/catalog/model/checkout/marketing.php @@ -1,6 +1,6 @@ db->query("SELECT * FROM `" . DB_PREFIX . "marketing` WHERE `code` = '" . $this->db->escape($code) . "'"); return $query->row; diff --git a/upload/catalog/model/checkout/order.php b/upload/catalog/model/checkout/order.php index 28723a7e..b66ed862 100644 --- a/upload/catalog/model/checkout/order.php +++ b/upload/catalog/model/checkout/order.php @@ -1,6 +1,6 @@ db->query("INSERT INTO `" . DB_PREFIX . "order` SET invoice_prefix = '" . $this->db->escape($data['invoice_prefix']) . "', store_id = '" . (int)$data['store_id'] . "', store_name = '" . $this->db->escape($data['store_name']) . "', store_url = '" . $this->db->escape($data['store_url']) . "', customer_id = '" . (int)$data['customer_id'] . "', customer_group_id = '" . (int)$data['customer_group_id'] . "', firstname = '" . $this->db->escape($data['firstname']) . "', lastname = '" . $this->db->escape($data['lastname']) . "', email = '" . $this->db->escape($data['email']) . "', telephone = '" . $this->db->escape($data['telephone']) . "', fax = '" . $this->db->escape($data['fax']) . "', custom_field = '" . $this->db->escape(isset($data['custom_field']) ? json_encode($data['custom_field']) : '') . "', payment_firstname = '" . $this->db->escape($data['payment_firstname']) . "', payment_lastname = '" . $this->db->escape($data['payment_lastname']) . "', payment_company = '" . $this->db->escape($data['payment_company']) . "', payment_address_1 = '" . $this->db->escape($data['payment_address_1']) . "', payment_address_2 = '" . $this->db->escape($data['payment_address_2']) . "', payment_city = '" . $this->db->escape($data['payment_city']) . "', payment_postcode = '" . $this->db->escape($data['payment_postcode']) . "', payment_country = '" . $this->db->escape($data['payment_country']) . "', payment_country_id = '" . (int)$data['payment_country_id'] . "', payment_zone = '" . $this->db->escape($data['payment_zone']) . "', payment_zone_id = '" . (int)$data['payment_zone_id'] . "', payment_address_format = '" . $this->db->escape($data['payment_address_format']) . "', payment_custom_field = '" . $this->db->escape(isset($data['payment_custom_field']) ? json_encode($data['payment_custom_field']) : '') . "', payment_method = '" . $this->db->escape($data['payment_method']) . "', payment_code = '" . $this->db->escape($data['payment_code']) . "', shipping_firstname = '" . $this->db->escape($data['shipping_firstname']) . "', shipping_lastname = '" . $this->db->escape($data['shipping_lastname']) . "', shipping_company = '" . $this->db->escape($data['shipping_company']) . "', shipping_address_1 = '" . $this->db->escape($data['shipping_address_1']) . "', shipping_address_2 = '" . $this->db->escape($data['shipping_address_2']) . "', shipping_city = '" . $this->db->escape($data['shipping_city']) . "', shipping_postcode = '" . $this->db->escape($data['shipping_postcode']) . "', shipping_country = '" . $this->db->escape($data['shipping_country']) . "', shipping_country_id = '" . (int)$data['shipping_country_id'] . "', shipping_zone = '" . $this->db->escape($data['shipping_zone']) . "', shipping_zone_id = '" . (int)$data['shipping_zone_id'] . "', shipping_address_format = '" . $this->db->escape($data['shipping_address_format']) . "', shipping_custom_field = '" . $this->db->escape(isset($data['shipping_custom_field']) ? json_encode($data['shipping_custom_field']) : '') . "', shipping_method = '" . $this->db->escape($data['shipping_method']) . "', shipping_code = '" . $this->db->escape($data['shipping_code']) . "', comment = '" . $this->db->escape($data['comment']) . "', total = '" . (float)$data['total'] . "', affiliate_id = '" . (int)$data['affiliate_id'] . "', commission = '" . (float)$data['commission'] . "', marketing_id = '" . (int)$data['marketing_id'] . "', tracking = '" . $this->db->escape($data['tracking']) . "', language_id = '" . (int)$data['language_id'] . "', currency_id = '" . (int)$data['currency_id'] . "', currency_code = '" . $this->db->escape($data['currency_code']) . "', currency_value = '" . (float)$data['currency_value'] . "', ip = '" . $this->db->escape($data['ip']) . "', forwarded_ip = '" . $this->db->escape($data['forwarded_ip']) . "', user_agent = '" . $this->db->escape($data['user_agent']) . "', accept_language = '" . $this->db->escape($data['accept_language']) . "', date_added = NOW(), date_modified = NOW()"); $order_id = $this->db->getLastId(); @@ -44,7 +44,7 @@ public function addOrder(array $data): int { return $order_id; } - public function editOrder(int $order_id, array $data): void { + public function editOrder(int $order_id, array $data) { // Void the order first $this->addOrderHistory($order_id, 0); @@ -96,7 +96,7 @@ public function editOrder(int $order_id, array $data): void { } } - public function deleteOrder(int $order_id): void { + public function deleteOrder(int $order_id) { // Void the order first $this->addOrderHistory($order_id, 0); @@ -115,7 +115,7 @@ public function deleteOrder(int $order_id): void { $this->model_extension_total_voucher->disableVoucher($order_id); } - public function getOrder(int $order_id): array { + public function getOrder(int $order_id) { $order_query = $this->db->query("SELECT *, (SELECT os.name FROM `" . DB_PREFIX . "order_status` os WHERE os.order_status_id = o.order_status_id AND os.language_id = o.language_id) AS order_status FROM `" . DB_PREFIX . "order` o WHERE o.order_id = '" . (int)$order_id . "'"); if ($order_query->num_rows) { diff --git a/upload/catalog/model/checkout/recurring.php b/upload/catalog/model/checkout/recurring.php index a60c747b..73f19a40 100644 --- a/upload/catalog/model/checkout/recurring.php +++ b/upload/catalog/model/checkout/recurring.php @@ -1,6 +1,6 @@ db->query("INSERT INTO `" . DB_PREFIX . "order_recurring` SET `order_id` = '" . (int)$order_id . "', `date_added` = NOW(), @@ -25,7 +25,7 @@ public function create(int $order_id, string $description, array $data): int { return $this->db->getLastId(); } - public function addReference(int $order_recurring_id, string $reference): void { + public function addReference(int $order_recurring_id, string $reference) { $this->db->query("REPLACE INTO `" . DB_PREFIX . "order_recurring` SET `reference` = '" . $this->db->escape($reference) . "', `order_recurring_id` = '" . (int)$order_recurring_id . "', `date_added` = NOW()"); } diff --git a/upload/catalog/model/design/banner.php b/upload/catalog/model/design/banner.php index 8e8e70c2..6cb58b16 100644 --- a/upload/catalog/model/design/banner.php +++ b/upload/catalog/model/design/banner.php @@ -1,6 +1,6 @@ db->query("SELECT * FROM `" . DB_PREFIX . "banner` b LEFT JOIN `" . DB_PREFIX . "banner_image` bi ON (b.`banner_id` = bi.`banner_id`) WHERE b.`banner_id` = '" . (int)$banner_id . "' AND b.`status` = '1' AND bi.`language_id` = '" . (int)$this->config->get('config_language_id') . "' ORDER BY bi.`sort_order` ASC"); return $query->rows; diff --git a/upload/catalog/model/design/layout.php b/upload/catalog/model/design/layout.php index 96b49938..336d7efa 100644 --- a/upload/catalog/model/design/layout.php +++ b/upload/catalog/model/design/layout.php @@ -1,6 +1,6 @@ db->query("SELECT * FROM `" . DB_PREFIX . "layout_route` WHERE '" . $this->db->escape($route) . "' LIKE `route` AND `store_id` = '" . (int)$this->config->get('config_store_id') . "' ORDER BY `route` DESC LIMIT 1"); if ($query->num_rows) { @@ -10,7 +10,7 @@ public function getLayout(string $route): int { } } - public function getLayoutModules(int $layout_id, string $position): array { + public function getLayoutModules(int $layout_id, string $position) { $query = $this->db->query("SELECT * FROM `" . DB_PREFIX . "layout_module` WHERE `layout_id` = '" . (int)$layout_id . "' AND `position` = '" . $this->db->escape($position) . "' ORDER BY `sort_order`"); return $query->rows; diff --git a/upload/catalog/model/extension/fraud/fraudlabspro.php b/upload/catalog/model/extension/fraud/fraudlabspro.php index e7d0ab3c..f52660ad 100644 --- a/upload/catalog/model/extension/fraud/fraudlabspro.php +++ b/upload/catalog/model/extension/fraud/fraudlabspro.php @@ -1,6 +1,6 @@ config->get('fraudlabspro_status') || !$this->config->get('fraudlabspro_key')) { return 0; diff --git a/upload/catalog/model/extension/fraud/ip.php b/upload/catalog/model/extension/fraud/ip.php index 98ff711e..c4f57ed5 100644 --- a/upload/catalog/model/extension/fraud/ip.php +++ b/upload/catalog/model/extension/fraud/ip.php @@ -1,6 +1,6 @@ load->model('account/customer'); $status = false; diff --git a/upload/catalog/model/extension/fraud/maxmind.php b/upload/catalog/model/extension/fraud/maxmind.php index 4bd33b99..13c0d6ca 100644 --- a/upload/catalog/model/extension/fraud/maxmind.php +++ b/upload/catalog/model/extension/fraud/maxmind.php @@ -1,6 +1,6 @@ db->query("SELECT * FROM `" . DB_PREFIX . "maxmind` WHERE order_id = '" . (int)$order_info['order_id'] . "'"); diff --git a/upload/catalog/model/extension/module/laybuy_layout.php b/upload/catalog/model/extension/module/laybuy_layout.php index 16d2c76b..369f4071 100644 --- a/upload/catalog/model/extension/module/laybuy_layout.php +++ b/upload/catalog/model/extension/module/laybuy_layout.php @@ -1,6 +1,6 @@ getTransactionStatuses(); foreach ($statuses as $status) { @@ -14,13 +14,13 @@ public function getStatusLabel(int $id): string { return $id; } - public function getTransactionByOrderId(int $order_id): array { + public function getTransactionByOrderId(int $order_id) { $query = $this->db->query("SELECT * FROM `" . DB_PREFIX . "laybuy_transaction` WHERE `order_id` = '" . (int)$order_id . "' ORDER BY `laybuy_ref_no` DESC LIMIT 1"); return $query->row; } - public function getTransactionStatuses(): array { + public function getTransactionStatuses() { $this->load->language('extension/payment/laybuy'); return [ @@ -48,7 +48,7 @@ public function getTransactionStatuses(): array { } - public function isLayBuyOrder(int $order_id): bool { + public function isLayBuyOrder(int $order_id) { $query = $this->db->query("SELECT * FROM `" . DB_PREFIX . "laybuy_transaction` WHERE `order_id` = '" . (int)$order_id . "'"); if ($query->num_rows) { diff --git a/upload/catalog/model/extension/payment/bank_transfer.php b/upload/catalog/model/extension/payment/bank_transfer.php index 532906ca..88bf2625 100644 --- a/upload/catalog/model/extension/payment/bank_transfer.php +++ b/upload/catalog/model/extension/payment/bank_transfer.php @@ -1,6 +1,6 @@ load->language('extension/payment/bank_transfer'); $query = $this->db->query("SELECT * FROM " . DB_PREFIX . "zone_to_geo_zone WHERE geo_zone_id = '" . (int)$this->config->get('bank_transfer_geo_zone_id') . "' AND country_id = '" . (int)$address['country_id'] . "' AND (zone_id = '" . (int)$address['zone_id'] . "' OR zone_id = '0')"); diff --git a/upload/catalog/model/extension/total/coupon.php b/upload/catalog/model/extension/total/coupon.php index f799a0c8..5c72d57e 100644 --- a/upload/catalog/model/extension/total/coupon.php +++ b/upload/catalog/model/extension/total/coupon.php @@ -1,6 +1,6 @@ db->query("SELECT * FROM `" . DB_PREFIX . "coupon` WHERE code = '" . $this->db->escape($code) . "' AND ((date_start = '0000-00-00' OR date_start < NOW()) AND (date_end = '0000-00-00' OR date_end > NOW())) AND status = '1'"); @@ -97,7 +97,7 @@ public function getCoupon(string $code): array { } } - public function getTotal(array $total): void { + public function getTotal(array $total) { if (isset($this->session->data['coupon'])) { $this->load->language('extension/total/coupon'); @@ -185,7 +185,7 @@ public function getTotal(array $total): void { } } - public function confirm(array $order_info, array $order_total): int { + public function confirm(array $order_info, array $order_total) { $code = ''; $start = strpos($order_total['title'], '('); @@ -229,17 +229,17 @@ public function confirm(array $order_info, array $order_total): int { return 0; } - public function unconfirm(int $order_id): void { + public function unconfirm(int $order_id) { $this->db->query("DELETE FROM `" . DB_PREFIX . "coupon_history` WHERE order_id = '" . (int)$order_id . "'"); } - public function getTotalCouponHistoriesByCoupon(string $coupon): int { + public function getTotalCouponHistoriesByCoupon(string $coupon) { $query = $this->db->query("SELECT COUNT(*) AS total FROM `" . DB_PREFIX . "coupon_history` ch LEFT JOIN `" . DB_PREFIX . "coupon` c ON (ch.coupon_id = c.coupon_id) WHERE c.code = '" . $this->db->escape($coupon) . "'"); return (int)$query->row['total']; } - public function getTotalCouponHistoriesByCustomerId(string $coupon, int $customer_id): int { + public function getTotalCouponHistoriesByCustomerId(string $coupon, int $customer_id) { $query = $this->db->query("SELECT COUNT(*) AS total FROM `" . DB_PREFIX . "coupon_history` ch LEFT JOIN `" . DB_PREFIX . "coupon` c ON (ch.coupon_id = c.coupon_id) WHERE c.code = '" . $this->db->escape($coupon) . "' AND ch.customer_id = '" . (int)$customer_id . "'"); return (int)$query->row['total']; diff --git a/upload/catalog/model/extension/total/credit.php b/upload/catalog/model/extension/total/credit.php index f7498f2b..13f3f1db 100644 --- a/upload/catalog/model/extension/total/credit.php +++ b/upload/catalog/model/extension/total/credit.php @@ -1,6 +1,6 @@ load->language('extension/total/credit'); $balance = $this->customer->getBalance(); @@ -21,7 +21,7 @@ public function getTotal(array $total): void { } } - public function confirm(array $order_info, array $order_total): void { + public function confirm(array $order_info, array $order_total) { $this->load->language('extension/total/credit'); if ($order_info['customer_id']) { @@ -29,7 +29,7 @@ public function confirm(array $order_info, array $order_total): void { } } - public function unconfirm(int $order_id): void { + public function unconfirm(int $order_id) { $this->db->query("DELETE FROM " . DB_PREFIX . "customer_transaction WHERE order_id = '" . (int)$order_id . "'"); } } diff --git a/upload/catalog/model/extension/total/handling.php b/upload/catalog/model/extension/total/handling.php index 50e50f86..74f12e6a 100644 --- a/upload/catalog/model/extension/total/handling.php +++ b/upload/catalog/model/extension/total/handling.php @@ -1,6 +1,6 @@ cart->getSubTotal() > $this->config->get('handling_total')) && ($this->cart->getSubTotal() > 0)) { $this->load->language('extension/total/handling'); diff --git a/upload/catalog/model/extension/total/low_order_fee.php b/upload/catalog/model/extension/total/low_order_fee.php index 76ae5ab0..60204e4c 100644 --- a/upload/catalog/model/extension/total/low_order_fee.php +++ b/upload/catalog/model/extension/total/low_order_fee.php @@ -1,6 +1,6 @@ cart->getSubTotal() && ($this->cart->getSubTotal() < $this->config->get('low_order_fee_total'))) { $this->load->language('extension/total/low_order_fee'); diff --git a/upload/catalog/model/extension/total/reward.php b/upload/catalog/model/extension/total/reward.php index c0031d84..334ee978 100644 --- a/upload/catalog/model/extension/total/reward.php +++ b/upload/catalog/model/extension/total/reward.php @@ -1,6 +1,6 @@ session->data['reward'])) { $this->load->language('extension/total/reward'); @@ -51,7 +51,7 @@ public function getTotal(array $total): void { } } - public function confirm(array $order_info, array $order_total): int { + public function confirm(array $order_info, array $order_total) { $this->load->language('extension/total/reward'); $points = 0; @@ -75,7 +75,7 @@ public function confirm(array $order_info, array $order_total): int { return 0; } - public function unconfirm(int $order_id): void { + public function unconfirm(int $order_id) { $this->db->query("DELETE FROM " . DB_PREFIX . "customer_reward WHERE order_id = '" . (int)$order_id . "' AND points < 0"); } } diff --git a/upload/catalog/model/extension/total/shipping.php b/upload/catalog/model/extension/total/shipping.php index cf3dbf5e..f2b7b7da 100644 --- a/upload/catalog/model/extension/total/shipping.php +++ b/upload/catalog/model/extension/total/shipping.php @@ -1,6 +1,6 @@ cart->hasShipping() && isset($this->session->data['shipping_method'])) { $total['totals'][] = [ 'code' => 'shipping', diff --git a/upload/catalog/model/extension/total/sub_total.php b/upload/catalog/model/extension/total/sub_total.php index ef1dfc30..ce183631 100644 --- a/upload/catalog/model/extension/total/sub_total.php +++ b/upload/catalog/model/extension/total/sub_total.php @@ -1,6 +1,6 @@ load->language('extension/total/sub_total'); $sub_total = $this->cart->getSubTotal(); diff --git a/upload/catalog/model/extension/total/tax.php b/upload/catalog/model/extension/total/tax.php index a9043448..60236caf 100644 --- a/upload/catalog/model/extension/total/tax.php +++ b/upload/catalog/model/extension/total/tax.php @@ -1,6 +1,6 @@ $value) { if ($value > 0) { $total['totals'][] = [ diff --git a/upload/catalog/model/extension/total/total.php b/upload/catalog/model/extension/total/total.php index efda8cd8..60714f6b 100644 --- a/upload/catalog/model/extension/total/total.php +++ b/upload/catalog/model/extension/total/total.php @@ -1,6 +1,6 @@ load->language('extension/total/total'); $total['totals'][] = [ diff --git a/upload/catalog/model/extension/total/voucher.php b/upload/catalog/model/extension/total/voucher.php index 7ade6824..020e9b0f 100644 --- a/upload/catalog/model/extension/total/voucher.php +++ b/upload/catalog/model/extension/total/voucher.php @@ -1,16 +1,16 @@ db->query("INSERT INTO " . DB_PREFIX . "voucher SET order_id = '" . (int)$order_id . "', code = '" . $this->db->escape($data['code']) . "', from_name = '" . $this->db->escape($data['from_name']) . "', from_email = '" . $this->db->escape($data['from_email']) . "', to_name = '" . $this->db->escape($data['to_name']) . "', to_email = '" . $this->db->escape($data['to_email']) . "', voucher_theme_id = '" . (int)$data['voucher_theme_id'] . "', message = '" . $this->db->escape($data['message']) . "', amount = '" . (float)$data['amount'] . "', status = '1', date_added = NOW()"); return $this->db->getLastId(); } - public function disableVoucher(int $order_id): void { + public function disableVoucher(int $order_id) { $this->db->query("UPDATE " . DB_PREFIX . "voucher SET status = '0' WHERE order_id = '" . (int)$order_id . "'"); } - public function getVoucher(string $code): array { + public function getVoucher(string $code) { $status = true; $voucher_query = $this->db->query("SELECT *, vtd.name AS theme FROM " . DB_PREFIX . "voucher v LEFT JOIN " . DB_PREFIX . "voucher_theme vt ON (v.voucher_theme_id = vt.voucher_theme_id) LEFT JOIN " . DB_PREFIX . "voucher_theme_description vtd ON (vt.voucher_theme_id = vtd.voucher_theme_id) WHERE v.code = '" . $this->db->escape($code) . "' AND vtd.language_id = '" . (int)$this->config->get('config_language_id') . "' AND v.status = '1'"); @@ -72,7 +72,7 @@ public function getVoucher(string $code): array { } } - public function getTotal(array $total): void { + public function getTotal(array $total) { if (isset($this->session->data['voucher'])) { $this->load->language('extension/total/voucher'); @@ -99,7 +99,7 @@ public function getTotal(array $total): void { } } - public function confirm(array $order_info, array $order_total): int { + public function confirm(array $order_info, array $order_total) { $code = ''; $start = strpos($order_total['title'], '('); @@ -123,7 +123,7 @@ public function confirm(array $order_info, array $order_total): int { return 0; } - public function unconfirm(int $order_id): void { + public function unconfirm(int $order_id) { $this->db->query("DELETE FROM `" . DB_PREFIX . "voucher_history` WHERE order_id = '" . (int)$order_id . "'"); } } diff --git a/upload/catalog/model/extension/total/voucher_theme.php b/upload/catalog/model/extension/total/voucher_theme.php index 00333192..3888ebac 100644 --- a/upload/catalog/model/extension/total/voucher_theme.php +++ b/upload/catalog/model/extension/total/voucher_theme.php @@ -1,12 +1,12 @@ db->query("SELECT * FROM " . DB_PREFIX . "voucher_theme vt LEFT JOIN " . DB_PREFIX . "voucher_theme_description vtd ON (vt.voucher_theme_id = vtd.voucher_theme_id) WHERE vt.voucher_theme_id = '" . (int)$voucher_theme_id . "' AND vtd.language_id = '" . (int)$this->config->get('config_language_id') . "'"); return $query->row; } - public function getVoucherThemes(array $data = []): array { + public function getVoucherThemes(array $data = []) { if ($data) { $sql = "SELECT * FROM " . DB_PREFIX . "voucher_theme vt LEFT JOIN " . DB_PREFIX . "voucher_theme_description vtd ON (vt.voucher_theme_id = vtd.voucher_theme_id) WHERE vtd.language_id = '" . (int)$this->config->get('config_language_id') . "' ORDER BY vtd.name"; diff --git a/upload/catalog/model/localisation/country.php b/upload/catalog/model/localisation/country.php index a1952cd6..cf28da7b 100644 --- a/upload/catalog/model/localisation/country.php +++ b/upload/catalog/model/localisation/country.php @@ -1,12 +1,12 @@ db->query("SELECT * FROM `" . DB_PREFIX . "country` WHERE `country_id` = '" . (int)$country_id . "' AND status = '1'"); return $query->row; } - public function getCountries(): array { + public function getCountries() { $country_data = $this->cache->get('country.catalog'); if (!$country_data) { diff --git a/upload/catalog/model/localisation/currency.php b/upload/catalog/model/localisation/currency.php index 68f0c0d0..e7e1d531 100644 --- a/upload/catalog/model/localisation/currency.php +++ b/upload/catalog/model/localisation/currency.php @@ -1,12 +1,12 @@ db->query("SELECT DISTINCT * FROM `" . DB_PREFIX . "currency` WHERE `code` = '" . $this->db->escape($currency) . "' AND `status` = '1'"); return $query->row; } - public function getCurrencies(): array { + public function getCurrencies() { $sql = "SELECT * FROM `" . DB_PREFIX . "currency` WHERE `status` = '1' ORDER BY `title` ASC"; $currency_data = $this->cache->get('currency.' . md5($sql)); diff --git a/upload/catalog/model/localisation/language.php b/upload/catalog/model/localisation/language.php index 7b7965b4..8cdd11f8 100644 --- a/upload/catalog/model/localisation/language.php +++ b/upload/catalog/model/localisation/language.php @@ -1,12 +1,12 @@ db->query("SELECT * FROM `" . DB_PREFIX . "language` WHERE `language_id` = '" . (int)$language_id . "'"); return $query->row; } - public function getLanguages(): array { + public function getLanguages() { $language_data = $this->cache->get('language'); if (!$language_data) { diff --git a/upload/catalog/model/localisation/location.php b/upload/catalog/model/localisation/location.php index bd257fef..20d794f9 100644 --- a/upload/catalog/model/localisation/location.php +++ b/upload/catalog/model/localisation/location.php @@ -1,6 +1,6 @@ db->query("SELECT `location_id`, `name`, `address`, `geocode`, `telephone`, `fax`, `image`, `open`, `comment` FROM `" . DB_PREFIX . "location` WHERE `location_id` = '" . (int)$location_id . "'"); return $query->row; diff --git a/upload/catalog/model/localisation/return_reason.php b/upload/catalog/model/localisation/return_reason.php index f5929999..5159b16e 100644 --- a/upload/catalog/model/localisation/return_reason.php +++ b/upload/catalog/model/localisation/return_reason.php @@ -1,6 +1,6 @@ config->get('config_language_id') . "'"; diff --git a/upload/catalog/model/localisation/zone.php b/upload/catalog/model/localisation/zone.php index 6c2969a4..b66d5c57 100644 --- a/upload/catalog/model/localisation/zone.php +++ b/upload/catalog/model/localisation/zone.php @@ -1,12 +1,12 @@ db->query("SELECT * FROM `" . DB_PREFIX . "zone` WHERE `zone_id` = '" . (int)$zone_id . "' AND `status` = '1'"); return $query->row; } - public function getZonesByCountryId(int $country_id): array { + public function getZonesByCountryId(int $country_id) { $zone_data = $this->cache->get('zone.' . (int)$country_id); if (!$zone_data) { diff --git a/upload/catalog/model/setting/api.php b/upload/catalog/model/setting/api.php index 09aa2874..2fe07639 100644 --- a/upload/catalog/model/setting/api.php +++ b/upload/catalog/model/setting/api.php @@ -1,6 +1,6 @@ db->query("SELECT * FROM `" . DB_PREFIX . "api` WHERE `username` = '" . $this->db->escape($username) . "' AND `password` = '" . $this->db->escape($password) . "'"); return $query->row; diff --git a/upload/catalog/model/setting/setting.php b/upload/catalog/model/setting/setting.php index 31a5635c..41851540 100644 --- a/upload/catalog/model/setting/setting.php +++ b/upload/catalog/model/setting/setting.php @@ -1,6 +1,6 @@ db->query("SELECT * FROM `" . DB_PREFIX . "setting` WHERE `store_id` = '" . (int)$store_id . "' AND `code` = '" . $this->db->escape($code) . "'"); diff --git a/upload/catalog/model/setting/store.php b/upload/catalog/model/setting/store.php index e565c324..a79189a6 100644 --- a/upload/catalog/model/setting/store.php +++ b/upload/catalog/model/setting/store.php @@ -1,6 +1,6 @@ cache->get('store'); if (!$store_data) { diff --git a/upload/catalog/model/tool/image.php b/upload/catalog/model/tool/image.php index e0b249d6..1b6c090d 100644 --- a/upload/catalog/model/tool/image.php +++ b/upload/catalog/model/tool/image.php @@ -1,6 +1,6 @@ db->query("DELETE FROM `" . DB_PREFIX . "customer_online` WHERE `date_added` < '" . date('Y-m-d H:i:s', strtotime('-1 hour')) . "'"); $this->db->query("REPLACE INTO `" . DB_PREFIX . "customer_online` SET `ip` = '" . $this->db->escape($ip) . "', `customer_id` = '" . (int)$customer_id . "', `url` = '" . $this->db->escape($url) . "', `referer` = '" . $this->db->escape($referer) . "', `date_added` = '" . $this->db->escape(date('Y-m-d H:i:s')) . "'"); diff --git a/upload/catalog/model/tool/upload.php b/upload/catalog/model/tool/upload.php index ff3ea743..750eeab9 100644 --- a/upload/catalog/model/tool/upload.php +++ b/upload/catalog/model/tool/upload.php @@ -1,6 +1,6 @@ db->query("INSERT INTO `" . DB_PREFIX . "upload` SET `name` = '" . $this->db->escape($name) . "', `filename` = '" . $this->db->escape($filename) . "', `code` = '" . $this->db->escape($code) . "', `date_added` = NOW()"); @@ -8,7 +8,7 @@ public function addUpload(string $name, string $filename): string { return $code; } - public function getUploadByCode(string $code): array { + public function getUploadByCode(string $code) { $query = $this->db->query("SELECT * FROM `" . DB_PREFIX . "upload` WHERE `code` = '" . $this->db->escape($code) . "'"); return $query->row;