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

fanatic

Users
  • Posts

    4,905
  • Joined

  • Last visited

Everything posted by fanatic

  1. ошибка где-то выше по коду. скорей всего пропущены скобки, или больше чем нужно
  2. $data['text_items'] = sprintf($this->language->get('text_items'), $this->currency->format($total, $this->session->data['currency'],1,false), $this->cart->countProducts() + (isset($this->session->data['vouchers']) ? count($this->session->data['vouchers']) : 0)); а так?
  3. catalog/controller/checuot/cart.php метод add $json['total'] = sprintf($this->language->get('text_items'), $this->cart->countProducts() + (isset($this->session->data['vouchers']) ? count($this->session->data['vouchers']) : 0),$this->currency->format($total, $this->session->data['currency']));
  4. естественно, вы жестко прописали сортировку. в коде, из вашего первого сообщения, все сделано для того, чтобы по умолчанию была сортировка по цене код 100% рабочий в смысле обновили?
  5. foreach ($categories as $category) { $children_data = array(); if ($category['category_id'] != тут идентификатор категории) { if ($category['category_id'] == $data['category_id']) { $children = $this->model_catalog_category->getCategories($category['category_id']); foreach ($children as $child) { $children_data_1 = array(); $children_1 = $this->model_catalog_category->getCategories($child['category_id']); foreach ($children_1 as $child_1) { $filter_data_1 = array('filter_category_id' => $child_1['category_id'], 'filter_sub_category' => true); $children_data_1[] = array( 'category_id' => $child_1['category_id'], 'name' => $child_1['name'] . ($this->config->get('config_product_count') ? ' (' . $this->model_catalog_product->getTotalProducts($filter_data_1) . ')' : ''), 'href' => $this->url->link('product/category', 'path=' . $category['category_id'] . '_' . $child['category_id'] . '_' . $child_1['category_id']) ); } $filter_data = array('filter_category_id' => $child['category_id'], 'filter_sub_category' => true); $children_data[] = array( 'children' => $children_data_1, 'category_id' => $child['category_id'], 'name' => $child['name'] . ($this->config->get('config_product_count') ? ' (' . $this->model_catalog_product->getTotalProducts($filter_data) . ')' : ''), 'href' => $this->url->link('product/category', 'path=' . $category['category_id'] . '_' . $child['category_id']) ); } } } $filter_data = array( 'filter_category_id' => $category['category_id'], 'filter_sub_category' => true ); $data['categories'][] = array( 'category_id' => $category['category_id'], 'name' => $category['name'] . ($this->config->get('config_product_count') ? ' (' . $this->model_catalog_product->getTotalProducts($filter_data) . ')' : ''), 'children' => $children_data, 'href' => $this->url->link('product/category', 'path=' . $category['category_id']) ); }
  6. может модуль адаптировать под 2.2.?
  7. в шаблоне, отличном от дефолта, может быть другая html разметка корзины. поэтому и не добавляет. корректировать либо html корзины или js/
  8. обновление корзины происходит в файле catalog/view/javascript/common.js var cart = { 'add': function(product_id, quantity) { $.ajax({ url: 'index.php?route=checkout/cart/add', type: 'post', data: 'product_id=' + product_id + '&quantity=' + (typeof(quantity) != 'undefined' ? quantity : 1), dataType: 'json', beforeSend: function() { $('#cart > button').button('loading'); }, complete: function() { $('#cart > button').button('reset'); }, success: function(json) { $('.alert, .text-danger').remove(); if (json['redirect']) { location = json['redirect']; } if (json['success']) { $('#content').parent().before('<div class="alert alert-success"><i class="fa fa-check-circle"></i> ' + json['success'] + ' <button type="button" class="close" data-dismiss="alert">×</button></div>'); // Need to set timeout otherwise it wont update the total setTimeout(function () { // далее идет добавление. в кнопку(button) c идентификаторо #cart вставляются обновленные данные. $('#cart > button').html('<span id="cart-total"><i class="fa fa-shopping-cart"></i> ' + json['total'] + '</span>');//вот это }, 100); $('html, body').animate({ scrollTop: 0 }, 'slow'); $('#cart > ul').load('index.php?route=common/cart/info ul li'); } }, error: function(xhr, ajaxOptions, thrownError) { alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText); } }); },
  9. но стикер то, откуда то берется. может доработан модуль рекомендуемых посмотрите в catalog\language\ru-ru\extension\module\featured.php
  10. контроллер + класс Url в контроллере $this->url->link('extension/module/xds_callback', 'token=' . $this->session->data['token']. '&type=module', true)); метод link класса url public function link($route, $args = '', $secure = false) { if ($this->ssl && $secure) { $url = $this->ssl . 'index.php?route=' . $route; } else { $url = $this->url . 'index.php?route=' . $route; } if ($args) { if (is_array($args)) { $url .= '&amp;' . http_build_query($args); } else { $url .= str_replace('&', '&amp;', '&' . ltrim($args, '&')); } } foreach ($this->rewrite as $rewrite) { $url = $rewrite->rewrite($url); } return $url; }
  11. исходный код движка
  12. и не найдете. какую работу? эту? что значит привязать в вашем понимании?
  13. можно глянуть макеты можно об этом подробней о ньюансах подробней
  14. для начала, посмотреть логи ocmod_error. смотрим какие строки не были найдены, ищем подобные у себя в контроллере или шаблоне. если в ваших файлах строка немного измененная, заменяем ею строку поиска в модификаторе, обновляем модификаторы. как-то так. p.s, если вы далеки от программирования, лучше не лезть.
  15. файл catalog/controller/product/category.php формируются данные для товаров $data['products'][] = array( 'manufacturer' => $result['manufacturer'],// добавили производителя 'product_id' => $result['product_id'], 'thumb' => $image, 'name' => $result['name'], 'description' => utf8_substr(strip_tags(html_entity_decode($result['description'], ENT_QUOTES, 'UTF-8')), 0, $this->config->get($this->config->get('config_theme') . '_product_description_length')) . '..', 'price' => $price, 'special' => $special, 'tax' => $tax, 'minimum' => $result['minimum'] > 0 ? $result['minimum'] : 1, 'rating' => $result['rating'], 'href' => $this->url->link('product/product', 'path=' . $this->request->get['path'] . '&product_id=' . $result['product_id'] . $url) ); в шаблоне <?php echo $product['manufacturer']; ?>
  16. доступ к базе есть? если да, открываем таблицу ваш_префикс_user и заменяем salt: OZaOuYlgDpassword: 247fe24fbd604df9a645cb7d0e22ebe6c4f6a318 пароль будет 12345 p.s. для версии 2.3
  17. запись с id = 1 уже есть. а вы пытаетесь добавить еще одну(что не возможно, так как значение id должно быть уникальным) как вариант, убрать из дампа добавление id. тогда он будет формироваться автоматом
×
×
  • 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.