Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

spectre

Users
  • Posts

    6,043
  • Joined

  • Last visited

Everything posted by spectre

  1. Запрос не сломается думаю, но какой смысл в равенстве чему-то по возрастанию?
  2. Ну то есть так это нормально по-вашему? ) order by image = '' ASC
  3. а базе у вас не пустое значение а пробел update oc_url_alias set keyword = '' where query = 'common/home'
  4. Да какой asc Могу за несколько пив сделать, вижу вы пытаетесь сделать то в чем сами не понимаете
  5. либо через js либо в контроллере модуля меню, по id категории, либо в шаблоне тоже по id категории
  6. у вас же нет сортировки по изображениям, можете так сделать if (isset($data['sort']) && in_array($data['sort'], $sort_data)) { if ($data['sort'] == 'pd.name' || $data['sort'] == 'p.model') { $sql .= " ORDER BY p.image = '', LCASE(" . $data['sort'] . ")"; } elseif ($data['sort'] == 'p.price') { $sql .= " ORDER BY p.image = '', (CASE WHEN special IS NOT NULL THEN special WHEN discount IS NOT NULL THEN discount ELSE p.price END)"; } else { $sql .= " ORDER BY p.image = '', " . $data['sort']; } } else { $sql .= " ORDER BY p.image = '', p.sort_order"; }
  7. www и без www сайт доступен
  8. +100 Меня когда просят ускорить сайт, первый вопрос для людей или для гугла, ибо это совершенно разные вещи
  9. Главное неграмотных юзеров запугать) Вон за пейджспид же до сих бешеные деньги платят, хотя влияние его микроскопическое
  10. У меня просто, как говорят сейчас по-модному, бомбануло, когда увидел Fast page speed loading Top 3 KEPT Best Features Fast page speed loading. View Scores Five types of products grid and list display. View “Display” Settings Extended product gallery with actions and reviews. View Product Gallery
  11. Я просто не могу не поделиться с вами творением мастера с themeforest https://themeforest.net/item/kept-responsive-opencart-theme/19982236 Я читал этот файл как хороший детектив на ночь. Угадайте куда он цепляется? Правильно! К common/menu! в Opencart 3! Для тех кто не хочет читать и восхищаться - спойлер <?php /* Project - "KEPT" - Responsive OpenCart Premium Theme -------------------------------------------------------------------------------- BUY LICENCE: https://themeforest.net/user/0808web/portfolio Author: ROBERT from 0808web Website: 0808web.com Theme Version: 1.5.0.0 Compatible: OpenCart 3.0.2.0 or higher -------------------------------------------------------------------------------- COPYRIGHT 2017 ROBERT MIRCIOI ALL RIGHTS RESERVED */ if ($this->config->get('config_theme') == 'kept') { if (isset($this->request->get['path'])) { $parts = explode('_', (string)$this->request->get['path']); } else { $parts = array(); } if (isset($parts[0])) { $data['category_1_id'] = $parts[0]; } else { $data['category_1_id'] = 0; } if (isset($parts[1])) { $data['category_2_id'] = $parts[1]; } else { $data['category_2_id'] = 0; } if (isset($parts[2])) { $data['category_3_id'] = $parts[2]; } else { $data['category_3_id'] = 0; } if (isset($parts[3])) { $data['category_4_id'] = $parts[3]; } else { $data['category_4_id'] = 0; } $this->load->model('catalog/category'); $this->load->model('catalog/product'); $data['kept_categories'] = array(); $kept_categories = $this->model_catalog_category->getCategories(0); foreach ($kept_categories as $category_1) { if ($category_1['top']) { $level_2_data = array(); $categories_2 = $this->model_catalog_category->getCategories($category_1['category_id']); foreach ($categories_2 as $category_2) { $level_3_data = array(); $categories_3 = $this->model_catalog_category->getCategories($category_2['category_id']); foreach ($categories_3 as $category_3) { $level_4_data = array(); $categories_4 = $this->model_catalog_category->getCategories($category_3['category_id']); foreach ($categories_4 as $category_4) { $data_category_4 = array('filter_category_id' => $category_4['category_id'], 'filter_sub_category' => false); $product_total_category_4 = $this->model_catalog_product->getTotalProducts($data_category_4); $level_4_data[] = array( 'name' => $category_4['name'] . ($this->config->get('config_product_count') ? '<sup>' . $product_total_category_4 . '</sup>' : ''), 'id' => $category_4['category_id'], 'href' => $this->url->link('product/category', 'path=' . $category_1['category_id'] . '_' . $category_2['category_id'] . '_' . $category_3['category_id'] . '_' . $category_4['category_id']) ); } $data_category_3 = array('filter_category_id' => $category_3['category_id'], 'filter_sub_category' => false); $product_total_category_3 = $this->model_catalog_product->getTotalProducts($data_category_3); $level_3_data[] = array( 'name' => $category_3['name'] . ($this->config->get('config_product_count') ? '<sup>' . $product_total_category_3 . '</sup>' : ''), 'id' => $category_3['category_id'], 'children' => $level_4_data, 'href' => $this->url->link('product/category', 'path=' . $category_1['category_id'] . '_' . $category_2['category_id'] . '_' . $category_3['category_id']) ); } $data_category_2 = array('filter_category_id' => $category_2['category_id'], 'filter_sub_category' => false); $product_total_category_2 = $this->model_catalog_product->getTotalProducts($data_category_2); $level_2_data[] = array( 'name' => $category_2['name'] . ($this->config->get('config_product_count') ? '<sup>' . $product_total_category_2 . '</sup>' : ''), 'id' => $category_2['category_id'], 'children' => $level_3_data, 'href' => $this->url->link('product/category', 'path=' . $category_1['category_id'] . '_' . $category_2['category_id']) ); } $data_category_1 = array('filter_category_id' => $category_1['category_id'], 'filter_sub_category' => true); $product_total_category_1 = $this->model_catalog_product->getTotalProducts($data_category_1); $data['kept_categories'][] = array( 'name' => $category_1['name'], 'name_count' => $category_1['name'] . ($this->config->get('config_product_count') ? '<sup>' . $product_total_category_1 . '</sup>' : ''), 'id' => $category_1['category_id'], 'children' => $level_2_data, 'href' => $this->url->link('product/category', 'path=' . $category_1['category_id']) ); } } $data['kept_sidebar_categories'] = array(); $kept_sidebar_categories = $this->model_catalog_category->getCategories(0); foreach ($kept_sidebar_categories as $category_1) { $level_2_data = array(); $categories_2 = $this->model_catalog_category->getCategories($category_1['category_id']); foreach ($categories_2 as $category_2) { $level_3_data = array(); $categories_3 = $this->model_catalog_category->getCategories($category_2['category_id']); foreach ($categories_3 as $category_3) { $level_4_data = array(); $categories_4 = $this->model_catalog_category->getCategories($category_3['category_id']); foreach ($categories_4 as $category_4) { $data_category_4 = array('filter_category_id' => $category_4['category_id'], 'filter_sub_category' => false); $product_total_category_4 = $this->model_catalog_product->getTotalProducts($data_category_4); $level_4_data[] = array( 'name' => $category_4['name'] . ($this->config->get('config_product_count') ? '<sup>' . $product_total_category_4 . '</sup>' : ''), 'id' => $category_4['category_id'], 'href' => $this->url->link('product/category', 'path=' . $category_1['category_id'] . '_' . $category_2['category_id'] . '_' . $category_3['category_id'] . '_' . $category_4['category_id']) ); } $data_category_3 = array('filter_category_id' => $category_3['category_id'], 'filter_sub_category' => false); $product_total_category_3 = $this->model_catalog_product->getTotalProducts($data_category_3); $level_3_data[] = array( 'name' => $category_3['name'] . ($this->config->get('config_product_count') ? '<sup>' . $product_total_category_3 . '</sup>' : ''), 'id' => $category_3['category_id'], 'children' => $level_4_data, 'href' => $this->url->link('product/category', 'path=' . $category_1['category_id'] . '_' . $category_2['category_id'] . '_' . $category_3['category_id']) ); } $data_category_2 = array('filter_category_id' => $category_2['category_id'], 'filter_sub_category' => false); $product_total_category_2 = $this->model_catalog_product->getTotalProducts($data_category_2); $level_2_data[] = array( 'name' => $category_2['name'] . ($this->config->get('config_product_count') ? '<sup>' . $product_total_category_2 . '</sup>' : ''), 'id' => $category_2['category_id'], 'children' => $level_3_data, 'href' => $this->url->link('product/category', 'path=' . $category_1['category_id'] . '_' . $category_2['category_id']) ); } $data_category_1 = array('filter_category_id' => $category_1['category_id'], 'filter_sub_category' => true); $product_total_category_1 = $this->model_catalog_product->getTotalProducts($data_category_1); $data['kept_sidebar_categories'][] = array( 'name' => $category_1['name'], 'name_count' => $category_1['name'] . ($this->config->get('config_product_count') ? '<sup>' . $product_total_category_1 . '</sup>' : ''), 'id' => $category_1['category_id'], 'children' => $level_2_data, 'href' => $this->url->link('product/category', 'path=' . $category_1['category_id']) ); } $data['code'] = $this->session->data['language']; $this->load->model('localisation/language'); $results = $this->model_localisation_language->getLanguages(); foreach ($results as $result) { if ($data['code'] == $result['code']) { $data['t08_kept_language'] = $result['language_id']; } } $data['t08_kept_text'] = $this->config->get('theme_kept_text'); $data['t08_kept_header'] = $this->config->get('theme_kept_header'); $data['t08_kept_header_urls'] = $this->config->get('theme_kept_header_url'); }
  12. position:absolute; left:-10000 либо append после загрузки страницы, в любом случае без js не обойтись
  13. сделайте вместо <?php echo $coupon; ?> <?php var_dump($coupon_product); ?> и многое прояснится
  14. oc_country+oc_zone с оригинального опенкарта взять
×
×
  • Create New...

Important Information

On our site, cookies are used and personal data is processed to improve the user interface. To find out what and what personal data we are processing, please go to the link. If you click "I agree," it means that you understand and accept all the conditions specified in this Privacy Notice.