diff --git a/src/upload/admin/controller/extension/feed/ps_google_base.php b/src/upload/admin/controller/extension/feed/ps_google_base.php index cb22f9e..831ed5c 100644 --- a/src/upload/admin/controller/extension/feed/ps_google_base.php +++ b/src/upload/admin/controller/extension/feed/ps_google_base.php @@ -153,13 +153,13 @@ public function index() $data['store_id'] = $store_id; - $data['stores'] = []; + $data['stores'] = array(); - $data['stores'][] = [ + $data['stores'][] = array( 'store_id' => 0, 'name' => $this->config->get('config_name') . ' ' . $this->language->get('text_default'), 'href' => $this->url->link('extension/feed/ps_google_base', 'user_token=' . $this->session->data['user_token'] . '&store_id=0'), - ]; + ); $this->load->model('setting/store'); @@ -168,18 +168,18 @@ public function index() $store_url = HTTP_CATALOG; foreach ($stores as $store) { - $data['stores'][] = [ + $data['stores'][] = array( 'store_id' => $store['store_id'], 'name' => $store['name'], 'href' => $this->url->link('extension/feed/ps_google_base', 'user_token=' . $this->session->data['user_token'] . '&store_id=' . $store['store_id']), - ]; + ); if ((int) $store['store_id'] === $store_id) { $store_url = $store['url']; } } - $data['data_feed_urls'] = []; + $data['data_feed_urls'] = array(); foreach ($languages as $language) { $data['data_feed_urls'][$language['language_id']] = rtrim($store_url, '/') . '/index.php?route=extension/feed/ps_google_base&language=' . $language['code']; @@ -190,10 +190,10 @@ public function index() $tax_rates = $this->model_localisation_tax_rate->getTaxRates(); foreach ($tax_rates as $tax_rate) { - $data['tax_rates'][] = [ + $data['tax_rates'][] = array( 'tax_rate_id' => $tax_rate['tax_rate_id'], 'name' => $tax_rate['name'], - ]; + ); } $data['text_contact'] = sprintf($this->language->get('text_contact'), self::EXTENSION_EMAIL, self::EXTENSION_EMAIL, self::EXTENSION_DOC); @@ -539,7 +539,7 @@ public function autocomplete() */ public function countryautocomplete() { - $json = []; + $json = array(); if (isset($this->request->get['filter_name'])) { $filter_name = trim($this->request->get['filter_name']); @@ -550,19 +550,19 @@ public function countryautocomplete() if (utf8_strlen($filter_name) > 0) { $this->load->model('extension/feed/ps_google_base'); - $filter_data = [ + $filter_data = array( 'filter_name' => $filter_name, 'start' => 0, 'limit' => 5, - ]; + ); $results = $this->model_extension_feed_ps_google_base->getCountries($filter_data); foreach ($results as $key => $value) { - $json[] = [ + $json[] = array( 'name' => $value['name'], 'iso_code_2' => $value['iso_code_2'], - ]; + ); } } diff --git a/src/upload/admin/model/extension/feed/ps_google_base.php b/src/upload/admin/model/extension/feed/ps_google_base.php index cd55034..0bc1d99 100644 --- a/src/upload/admin/model/extension/feed/ps_google_base.php +++ b/src/upload/admin/model/extension/feed/ps_google_base.php @@ -189,11 +189,11 @@ public function getTotalCategories() return $query->row['total']; } - public function getCountries(array $data = []): array + public function getCountries(array $data = array()): array { $sql = "SELECT * FROM `" . DB_PREFIX . "country`"; - $implode = []; + $implode = array(); if (!empty($data['filter_name'])) { $implode[] = "`name` LIKE '" . $this->db->escape((string) $data['filter_name'] . '%') . "'"; @@ -203,11 +203,11 @@ public function getCountries(array $data = []): array $sql .= " WHERE " . implode(" AND ", $implode); } - $sort_data = [ + $sort_data = array( 'name', 'iso_code_2', 'iso_code_3' - ]; + ); if (isset($data['sort']) && in_array($data['sort'], $sort_data)) { $sql .= " ORDER BY " . $data['sort']; diff --git a/src/upload/catalog/controller/extension/feed/ps_google_base.php b/src/upload/catalog/controller/extension/feed/ps_google_base.php index 8c8523d..8ed71d2 100644 --- a/src/upload/catalog/controller/extension/feed/ps_google_base.php +++ b/src/upload/catalog/controller/extension/feed/ps_google_base.php @@ -76,32 +76,32 @@ public function index() $link = $this->url->link('common/home'); $xml->writeElement('link', str_replace('&', '&', $link)); - $taxes = []; + $taxes = array(); if (is_array($base_tax_definitions)) { foreach ($base_tax_definitions as $base_tax_definition) { $tax_rate_info = $this->model_extension_feed_ps_google_base->getTaxRate($base_tax_definition['tax_rate_id']); if ($tax_rate_info) { - $taxes[] = [ + $taxes[] = array( 'country_id' => $base_tax_definition['country_id'], 'region' => $base_tax_definition['region'], 'tax_rate' => $tax_rate_info['rate'], 'tax_ship' => $base_tax_definition['tax_ship'], - ]; + ); } } } - $product_data = []; + $product_data = array(); $google_base_categories = $this->model_extension_feed_ps_google_base->getCategories(); foreach ($google_base_categories as $google_base_category) { - $filter_data = [ + $filter_data = array( 'filter_category_id' => $google_base_category['category_id'], 'filter_filter' => false - ]; + ); $products = $this->model_catalog_product->getProducts($filter_data);