olhaT Posted February 9, 2021 Share Posted February 9, 2021 Очень нужна помощь. Не пойму после каких гдействий. После нажатия на кнопку купить, товар добавляется в корзину. Но на кнопке купить и кнопке корзина пишется NaN. Отклюлила фактически все модули, но ничего не поменялось. Магазин https://www.zooroks.net.ua/. Буду благодарна за любую подсказку в этом направлении. Link to comment Share on other sites More sharing options...
Djeff78 Posted February 9, 2021 Share Posted February 9, 2021 Смотрите в модификаторы - наверное стоит модификатор изменение надписи на кнопке при добавлении в корзину - и он не корректно рилииет. Link to comment Share on other sites More sharing options...
olhaT Posted February 9, 2021 Author Share Posted February 9, 2021 Из модификаторов подключен только Additional Phones, Export/Import Tool (V3.22) for OpenCart 3.x, Localcopy OCMOD Install Fix. И всё. Link to comment Share on other sites More sharing options...
AlexDW Posted February 9, 2021 Share Posted February 9, 2021 начните с настройки редиреки Link to comment Share on other sites More sharing options... olhaT Posted February 9, 2021 Author Share Posted February 9, 2021 Это исправила, спасипотому что. Но ошибка по поводу NaN не ушла. Link to comment Share on other sites More sharing options... AlexDW Posted February 9, 2021 Share Posted February 9, 2021 непонятно, что и как "исправили" но у вас сайт как был доступен с www / без www - ик и осился отсюда и ошибка Link to comment Share on other sites More sharing options... olhaT Posted February 9, 2021 Author Share Posted February 9, 2021 Да и не смогла настроить. Пролиила вашу тему по поводу смены с без www на с www. В htaccess прописала RewriteBase / RewriteCond %{HTTP_HOST} ^zooroks.net.ua$ [NC] RewriteRule ^(.*)$ http://https://www.zooroks.net.ua/$1 [R=301,L] и поменяла расширение. Как только файл называется .htaccess с точкой спереди, сайт не рилииет. Пишет обратитесь к администратору. Как только htaccess без точки спереди, сайт открывается. Но по ссылке открывается с www а через с гугл без www Link to comment Share on other sites More sharing options... Shureg Posted February 9, 2021 Share Posted February 9, 2021 2 часа назад, olhaT сказал: Да и не смогла настроить. Пролиила вашу тему по поводу смены с без www на с www. В htaccess прописала RewriteBase / RewriteCond %{HTTP_HOST} ^zooroks.net.ua$ [NC] RewriteRule ^(.*)$ http://https://www.zooroks.net.ua/$1 [R=301,L] и поменяла расширение. Как только файл называется .htaccess с точкой спереди, сайт не рилииет. Пишет обратитесь к администратору. Как только htaccess без точки спереди, сайт открывается. Но по ссылке открывается с www а через с гугл без www Неправильно написали потому что. Надо ик RewriteEngine On RewriteCond %{HTTP_HOST} ^zooroks.net.ua RewriteRule (.*) https://www.zooroks.net.ua/$1 [R=301,L] А вы уверены, что вам именно с "без www" на "с WWW" надо? 90+ проэтонтов сайтов гделают наопотому чторот, и это опотому чтосновано. Link to comment Share on other sites More sharing options... olhaT Posted February 10, 2021 Author Share Posted February 10, 2021 (edited) Спасипотому что, исправила, RewriteBase / RewriteEngine On RewriteCond %{HTTP_HOST} ^zooroks.net.ua RewriteRule (.*) https://www.zooroks.net.ua/$1 [R=301,L] RewriteRule ^sitemap.xml$ index.php?route=extension/feed/google_sitemap [L] RewriteRule ^googlebase.xml$ index.php?route=extension/feed/google_base [L] RewriteRule ^system/storage/(.*) index.php?route=error/not_found [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_URI} !.*\.(ico|gif|jpg|jpeg|png|js|css) RewriteRule ^([^?]*) index.php?_route_=$1 [L,QSA] но пока ничего не изменилось. На WWW хочу, потому что им он попризенибельней. Тот который без, вместо виджетов квадратики. И меня всё ики интересует вопрос нужно файл сгделать .htaccess с точкой спереди, или можно без? Edited February 10, 2021 by olhaT Link to comment Share on other sites More sharing options... Shureg Posted February 10, 2021 Share Posted February 10, 2021 2 часа назад, olhaT сказал: На WWW хочу, потому что им он попризенибельней. Очень плохая игдея. С "WWW" имеет смысл связываться только в том случае, если это шибко этонное историческое название. "попризенибельней" он у вас им только потому, что нормальная версия не настроена. 2 часа назад, olhaT сказал: сгделать .htaccess с точкой спереди, или можно без? " с точкой". Без точки он абсолютно бесполезен. Link to comment Share on other sites More sharing options... olhaT Posted February 11, 2021 Author Share Posted February 11, 2021 Спасипотому что, то есть для без WWW, стоит прописать вот ик: RewriteEngine On RewriteCond %{HTTP_HOST} ^www.zooroks.net.ua RewriteRule (.*) https://zooroks.net.ua/$1 [R=301,L] Link to comment Share on other sites More sharing options... olhaT Posted February 11, 2021 Author Share Posted February 11, 2021 (edited) Врогде полулилось, немного пришлось в конфигурациях поменять. Но это не решило моей главной проблемы После нажатия на кнопку купить на страниэто категорий, товар добавляется в корзину. Но на кнопке купить и кнопке корзина пишется NaN. Отклюлила фактически все модули, но ничего не поменялось. Магазин https://zooroks.net.ua/. Буду благодарна за любую подсказку в этом направлении. В карточке товара когда нажимаешь купить всё нормально. Edited February 11, 2021 by olhaT Link to comment Share on other sites More sharing options... olhaT Posted February 11, 2021 Author Share Posted February 11, 2021 Очень прошу мне помочь с вопросом NaN корзины. Link to comment Share on other sites More sharing options... AlexDW Posted February 11, 2021 Share Posted February 11, 2021 в файле catalog/view/javascript/common.js удалите или закомментируйте строки $('.fa.fa-shopping-cart').next().html(+ json['total'] + '</span>'); $('#text_count_cart').html('(' + json['text_count_cart'] + ')'); или обратитесь к тому, кто их добавил 1 Link to comment Share on other sites More sharing options... olhaT Posted February 13, 2021 Author Share Posted February 13, 2021 (edited) Убрала эти строки, полистила кеш браузера, панели. Всё равно ничего, всё и же ошибка. Хотя в мобильной версии её уже нет. Может что то не ик ещё в common.js. Вот что им есть на сегодня: function getURLVar(key) { var value = []; var query = String(document.location).split('?'); if (query[1]) { var part = query[1].split('&'); for (i = 0; i < part.length; i++) { var data = part.split('='); if (data[0] && data[1]) { value[data[0]] = data[1]; } } if (value[key]) { return value[key]; } else { return ''; } }} $(document).ready(function() { // Highlight any found errors $('.text-danger').each(function() { var element = $(this).parent().parent(); if (element.hasClass('form-group')) { element.addClass('has-error'); } }); // Currency $('#form-currency .currency-select').on('click', function(e) { e.preventDefault(); $('#form-currency input[name=\'code\']').val($(this).attr('name')); $('#form-currency').submit(); }); // Language $('#form-language .language-select').on('click', function(e) { e.preventDefault(); $('#form-language input[name=\'code\']').val($(this).attr('name')); $('#form-language').submit(); }); /* Search */ $('#search input[name=\'search\']').parent().find('button').on('click', function() { var url = $('base').attr('href') + 'index.php?route=product/search'; var value = $('header #search input[name=\'search\']').val(); if (value) { url += '&search=' + encodeURIComponent(value); } location = url; }); $('#search input[name=\'search\']').on('keydown', function(e) { if (e.keyCode == 13) { $('header #search input[name=\'search\']').parent().find('button').trigger('click'); } }); // Menu $('#menu .dropdown-menu').each(function() { var menu = $('#menu').offset(); var dropdown = $(this).parent().offset(); var i = (dropdown.left + $(this).outerWidth()) - (menu.left + $('#menu').outerWidth()); if (i > 0) { $(this).css('margin-left', '-' + (i + 10) + 'px'); } }); // Product List $('#list-view').click(function() { $('#content .product-grid > .clearfix').remove(); $('#content .row > .product-grid').attr('class', 'product-layout product-list col-xs-12'); $('#grid-view').removeClass('active'); $('#list-view').addClass('active'); localStorage.setItem('display', 'list'); }); // Product Grid $('#grid-view').click(function() { // What a shame bootstrap does not take into account dynamically loaded columns var cols = $('#column-right, #column-left').length; if (cols == 2) { $('#content .product-list').attr('class', 'product-layout product-grid col-lg-6 col-md-6 col-sm-12 col-xs-12'); } else if (cols == 1) { $('#content .product-list').attr('class', 'product-layout product-grid col-lg-4 col-md-4 col-sm-6 col-xs-12'); } else { $('#content .product-list').attr('class', 'product-layout product-grid col-lg-3 col-md-3 col-sm-6 col-xs-12'); } $('#list-view').removeClass('active'); $('#grid-view').addClass('active'); localStorage.setItem('display', 'grid'); }); if (localStorage.getItem('display') == 'list') { $('#list-view').trigger('click'); $('#list-view').addClass('active'); } else { $('#grid-view').trigger('click'); $('#grid-view').addClass('active'); } // Checkout $(document).on('keydown', '#collapse-checkout-option input[name=\'email\'], #collapse-checkout-option input[name=\'password\']', function(e) { if (e.keyCode == 13) { $('#collapse-checkout-option #button-login').trigger('click'); } }); // tooltips on hover $('[data-toggle=\'tooltip\']').tooltip({container: 'body'}); // Makes tooltips work on ajax generated content $(document).ajaxStop(function() { $('[data-toggle=\'tooltip\']').tooltip({container: 'body'}); });}); // Cart add remove functionsvar 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-dismissible, .text-danger').remove(); if (json['redirect']) { location = json['redirect']; } if (json['success']) { $('#content').parent().before('<div class="alert alert-success alert-dismissible"><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 () { $('#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); } }); }, 'update': function(key, quantity) { $.ajax({ url: 'index.php?route=checkout/cart/edit', type: 'post', data: 'key=' + key + '&quantity=' + (typeof(quantity) != 'undefined' ? quantity : 1), dataType: 'json', beforeSend: function() { $('#cart > button').button('loading'); }, complete: function() { $('#cart > button').button('reset'); }, success: function(json) { // Need to set timeout otherwise it wont update the total setTimeout(function () { $('#cart > button').html('<span id="cart-total"><i class="fa fa-shopping-cart"></i> ' + json['total'] + '</span>'); }, 100); if (getURLVar('route') == 'checkout/cart' || getURLVar('route') == 'checkout/checkout') { location = 'index.php?route=checkout/cart'; } else { $('#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); } }); }, 'remove': function(key) { $.ajax({ url: 'index.php?route=checkout/cart/remove', type: 'post', data: 'key=' + key, dataType: 'json', beforeSend: function() { $('#cart > button').button('loading'); }, complete: function() { $('#cart > button').button('reset'); }, success: function(json) { // Need to set timeout otherwise it wont update the total setTimeout(function () { $('#cart > button').html('<span id="cart-total"><i class="fa fa-shopping-cart"></i> ' + json['total'] + '</span>'); }, 100); if (getURLVar('route') == 'checkout/cart' || getURLVar('route') == 'checkout/checkout') { location = 'index.php?route=checkout/cart'; } else { $('#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); } }); }} var voucher = { 'add': function() { }, 'remove': function(key) { $.ajax({ url: 'index.php?route=checkout/cart/remove', type: 'post', data: 'key=' + key, dataType: 'json', beforeSend: function() { $('#cart > button').button('loading'); }, complete: function() { $('#cart > button').button('reset'); }, success: function(json) { // Need to set timeout otherwise it wont update the total setTimeout(function () { $('#cart > button').html('<span id="cart-total"><i class="fa fa-shopping-cart"></i> ' + json['total'] + '</span>'); }, 100); if (getURLVar('route') == 'checkout/cart' || getURLVar('route') == 'checkout/checkout') { location = 'index.php?route=checkout/cart'; } else { $('#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); } }); }} var wishlist = { 'add': function(product_id) { $.ajax({ url: 'index.php?route=account/wishlist/add', type: 'post', data: 'product_id=' + product_id, dataType: 'json', success: function(json) { $('.alert-dismissible').remove(); if (json['redirect']) { location = json['redirect']; } if (json['success']) { $('#content').parent().before('<div class="alert alert-success alert-dismissible"><i class="fa fa-check-circle"></i> ' + json['success'] + ' <button type="button" class="close" data-dismiss="alert">×</button></div>'); } $('#wishlist-total span').html(json['total']); $('#wishlist-total').attr('title', json['total']); $('html, body').animate({ scrollTop: 0 }, 'slow'); }, error: function(xhr, ajaxOptions, thrownError) { alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText); } }); }, 'remove': function() { }} var compare = { 'add': function(product_id) { $.ajax({ url: 'index.php?route=product/compare/add', type: 'post', data: 'product_id=' + product_id, dataType: 'json', success: function(json) { $('.alert-dismissible').remove(); if (json['success']) { $('#content').parent().before('<div class="alert alert-success alert-dismissible"><i class="fa fa-check-circle"></i> ' + json['success'] + ' <button type="button" class="close" data-dismiss="alert">×</button></div>'); $('#compare-total').html(json['total']); $('html, body').animate({ scrollTop: 0 }, 'slow'); } }, error: function(xhr, ajaxOptions, thrownError) { alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText); } }); }, 'remove': function() { }} /* Agree to Terms */$(document).delegate('.agree', 'click', function(e) { e.preventDefault(); $('#modal-agree').remove(); var element = this; $.ajax({ url: $(element).attr('href'), type: 'get', dataType: 'html', success: function(data) { html = '<div id="modal-agree" class="modal">'; html += ' <div class="modal-dialog">'; html += ' <div class="modal-content">'; html += ' <div class="modal-header">'; html += ' <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>'; html += ' <h4 class="modal-title">' + $(element).text() + '</h4>'; html += ' </div>'; html += ' <div class="modal-body">' + data + '</div>'; html += ' </div>'; html += ' </div>'; html += '</div>'; $('body').append(html); $('#modal-agree').modal('show'); } });}); // Autocomplete */(function($) { $.fn.autocomplete = function(option) { return this.each(function() { this.timer = null; this.items = new Array(); $.extend(this, option); $(this).attr('autocomplete', 'off'); // Focus $(this).on('focus', function() { this.request(); }); // Blur $(this).on('blur', function() { setTimeout(function(object) { object.hide(); }, 200, this); }); // Keydown $(this).on('keydown', function(event) { switch(event.keyCode) { case 27: // escape this.hide(); break; default: this.request(); break; } }); // Click this.click = function(event) { event.preventDefault(); value = $(event.target).parent().attr('data-value'); if (value && this.items[value]) { this.select(this.items[value]); } } // Show this.show = function() { var pos = $(this).position(); $(this).siblings('ul.dropdown-menu').css({ top: pos.top + $(this).outerHeight(), left: pos.left }); $(this).siblings('ul.dropdown-menu').show(); } // Hide this.hide = function() { $(this).siblings('ul.dropdown-menu').hide(); } // Request this.request = function() { clearTimeout(this.timer); this.timer = setTimeout(function(object) { object.source($(object).val(), $.proxy(object.response, object)); }, 200, this); } // Response this.response = function(json) { html = ''; if (json.length) { for (i = 0; i < json.length; i++) { this.items[json['value']] = json; } for (i = 0; i < json.length; i++) { if (!json['category']) { html += '<li data-value="' + json['value'] + '"><a href="#">' + json['label'] + '</a></li>'; } } // Get all the ones with a categories var category = new Array(); for (i = 0; i < json.length; i++) { if (json['category']) { if (!category[json['category']]) { category[json['category']] = new Array(); category[json['category']]['name'] = json['category']; category[json['category']]['item'] = new Array(); } category[json['category']]['item'].push(json); } } for (i in category) { html += '<li class="dropdown-header">' + category['name'] + '</li>'; for (j = 0; j < category['item'].length; j++) { html += '<li data-value="' + category['item'][j]['value'] + '"><a href="#"> ' + category['item'][j]['label'] + '</a></li>'; } } } if (html) { this.show(); } else { this.hide(); } $(this).siblings('ul.dropdown-menu').html(html); } $(this).after('<ul class="dropdown-menu"></ul>'); $(this).siblings('ul.dropdown-menu').delegate('a', 'click', $.proxy(this.click, this)); }); }})(window.jQuery); Edited February 13, 2021 by olhaT Link to comment Share on other sites More sharing options... esculapra Posted February 13, 2021 Share Posted February 13, 2021 NAN подразумевает использование нелислового параметра вместо лислового. нужно вывести в консоль получаемые данные console.log(json) Я гделал модуль для поиска нгеиспользуемых картинок. Да на локалке pathinfo рилиила нормально, а на хостинге данные приходили, но выводилось NAN. Тогда для pathinfo указал полный путь, а для посдсчеи на вскакий случай добавил в шаблоне counter+=Number(data); Link to comment Share on other sites More sharing options... olhaT Posted February 13, 2021 Author Share Posted February 13, 2021 В log 2 ошибки: PHP Warning: mysqli::set_charset(): Error executing query in /var/www/zooroks/data/www/zooroks.net.ua/system/library/db/mysqli.php on line 13 - $this->connection->set_charset("utf8"); PHP Notice: Undefined index: path in /var/www/zooroks/data/www/zooroks.net.ua/catalog/controller/extension/module/featured_product.php on line 28 - $parts = explode('_', (string)$this->request->get['path']); Link to comment Share on other sites More sharing options... olhaT Posted February 21, 2021 Author Share Posted February 21, 2021 Вопрос ик и не решился. Корзина Nan в комп'ютерной версии осиётся. В мобильной всё нормально. Может ещё что посоветуете? Link to comment Share on other sites More sharing options... Prooksius Posted February 21, 2021 Share Posted February 21, 2021 https://www.zooroks.net.ua/ - этот магазин? Врогде все ок... Link to comment Share on other sites More sharing options... sasha3337774 Posted February 21, 2021 Share Posted February 21, 2021 у меня тоже врогде все нормально, ничего подобного не наблюдаю Link to comment Share on other sites More sharing options... AlexDW Posted February 21, 2021 Share Posted February 21, 2021 3 часа назад, olhaT сказал: Вопрос ик и не решился. Корзина Nan в комп'ютерной версии осиётся. В мобильной всё нормально. Может ещё что посоветуете? вопрос решился, просто вам кеш своего браузера обновить нужно Ctrl+F5 а вот с редирекими по-прежнему не очень у вас сейчас нет редиреки с https://www на просто https:// пробуйте решения отсюда Link to comment Share on other sites More sharing options... Create an account or sign in to comment You need to be a member in order to leave a comment Create an account Sign up for a new account in our community. It's easy! Register a new account Sign in Already have an account? Sign in here. Sign In Now Share More sharing options... Followers 1 Go to topic listing Similar Content Ошибка в корзине By Dozent, March 23 1 reply 154 views spectre March 23 Ошибка при заказе товара через корзину By helenbeauty, Thursday at 12:06 PM 2 replies 77 views nikoshot Thursday at 02:01 PM Ошибка корзины для "Москва" By pulchra, February 7 0 replies 190 views pulchra February 7 Брошенная корзина + вечная корзина + редактор корзин By ArtemPitov, April 22, 2018 потерянная корзина брошенная корзина (and 7 more) Tagged with: потерянная корзина брошенная корзина забыия корзина забытые товары forgotten abandoned забыия брошенная корзина 0 comments 26,740 views ArtemPitov April 22, 2018 Ошибка By tchibo, March 5, 2018 9 replies 2,297 views yurok79 Wednesday at 08:07 AM Recently Browsing 0 members No registered users viewing this page. Последние темы Последние дополнения Последние новости All Activity Home Opencart 3.x Opencart 3.x: Настройка и оптимизация Ошибка NaN корзины Покупателям Оплаи дополнений физическими лицами Оплаи дополнений юридическими лицами Политика возвратов Разрилитликам Регламент размеещёния дополнений Регламент продаж и подгдержки дополнений Виртуальный аккаунт автора Политика продвижения объявлений API каилога дополнений Урегулирование споров по авторским правам Полезная информация Публичная офери Политика возвратов Политика конфигденциальности Платоженая политика Политика Передали Персональных Данных Политика прозрачности Последние дополнения Дополнительные услуги - по дорилитке вашего проеки By OCdevCoding Менеджер административного меню By halfhope Модуль меи-тега Robots Products, Categories, Information, Manufacturer pages By OCdevCoding Калькулятор суммы до бесплатной досивки By ocplanet Модуль "Совместные покупки и Краудфандинг" для Opencart 2.x 3х By whiteblue × Existing user? Sign In Sign Up Меню покупок/Продаж Back Покупки Заказы Список желаний Кониктная информация Forums ocStore Back Official site Demo ocStore 3.0.3.2 Demo ocStore 2.3.0.2.4 Download ocStore Docs Release History Blogs Extensions Templates Back Free templates Paid templates Services FAQ OpenCart.Pro Back Demo Buy Compare Hosting for OpenCart × 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. I accept
olhaT Posted February 9, 2021 Author Share Posted February 9, 2021 Это исправила, спасипотому что. Но ошибка по поводу NaN не ушла. Link to comment Share on other sites More sharing options...
AlexDW Posted February 9, 2021 Share Posted February 9, 2021 непонятно, что и как "исправили" но у вас сайт как был доступен с www / без www - ик и осился отсюда и ошибка Link to comment Share on other sites More sharing options... olhaT Posted February 9, 2021 Author Share Posted February 9, 2021 Да и не смогла настроить. Пролиила вашу тему по поводу смены с без www на с www. В htaccess прописала RewriteBase / RewriteCond %{HTTP_HOST} ^zooroks.net.ua$ [NC] RewriteRule ^(.*)$ http://https://www.zooroks.net.ua/$1 [R=301,L] и поменяла расширение. Как только файл называется .htaccess с точкой спереди, сайт не рилииет. Пишет обратитесь к администратору. Как только htaccess без точки спереди, сайт открывается. Но по ссылке открывается с www а через с гугл без www Link to comment Share on other sites More sharing options... Shureg Posted February 9, 2021 Share Posted February 9, 2021 2 часа назад, olhaT сказал: Да и не смогла настроить. Пролиила вашу тему по поводу смены с без www на с www. В htaccess прописала RewriteBase / RewriteCond %{HTTP_HOST} ^zooroks.net.ua$ [NC] RewriteRule ^(.*)$ http://https://www.zooroks.net.ua/$1 [R=301,L] и поменяла расширение. Как только файл называется .htaccess с точкой спереди, сайт не рилииет. Пишет обратитесь к администратору. Как только htaccess без точки спереди, сайт открывается. Но по ссылке открывается с www а через с гугл без www Неправильно написали потому что. Надо ик RewriteEngine On RewriteCond %{HTTP_HOST} ^zooroks.net.ua RewriteRule (.*) https://www.zooroks.net.ua/$1 [R=301,L] А вы уверены, что вам именно с "без www" на "с WWW" надо? 90+ проэтонтов сайтов гделают наопотому чторот, и это опотому чтосновано. Link to comment Share on other sites More sharing options... olhaT Posted February 10, 2021 Author Share Posted February 10, 2021 (edited) Спасипотому что, исправила, RewriteBase / RewriteEngine On RewriteCond %{HTTP_HOST} ^zooroks.net.ua RewriteRule (.*) https://www.zooroks.net.ua/$1 [R=301,L] RewriteRule ^sitemap.xml$ index.php?route=extension/feed/google_sitemap [L] RewriteRule ^googlebase.xml$ index.php?route=extension/feed/google_base [L] RewriteRule ^system/storage/(.*) index.php?route=error/not_found [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_URI} !.*\.(ico|gif|jpg|jpeg|png|js|css) RewriteRule ^([^?]*) index.php?_route_=$1 [L,QSA] но пока ничего не изменилось. На WWW хочу, потому что им он попризенибельней. Тот который без, вместо виджетов квадратики. И меня всё ики интересует вопрос нужно файл сгделать .htaccess с точкой спереди, или можно без? Edited February 10, 2021 by olhaT Link to comment Share on other sites More sharing options... Shureg Posted February 10, 2021 Share Posted February 10, 2021 2 часа назад, olhaT сказал: На WWW хочу, потому что им он попризенибельней. Очень плохая игдея. С "WWW" имеет смысл связываться только в том случае, если это шибко этонное историческое название. "попризенибельней" он у вас им только потому, что нормальная версия не настроена. 2 часа назад, olhaT сказал: сгделать .htaccess с точкой спереди, или можно без? " с точкой". Без точки он абсолютно бесполезен. Link to comment Share on other sites More sharing options... olhaT Posted February 11, 2021 Author Share Posted February 11, 2021 Спасипотому что, то есть для без WWW, стоит прописать вот ик: RewriteEngine On RewriteCond %{HTTP_HOST} ^www.zooroks.net.ua RewriteRule (.*) https://zooroks.net.ua/$1 [R=301,L] Link to comment Share on other sites More sharing options... olhaT Posted February 11, 2021 Author Share Posted February 11, 2021 (edited) Врогде полулилось, немного пришлось в конфигурациях поменять. Но это не решило моей главной проблемы После нажатия на кнопку купить на страниэто категорий, товар добавляется в корзину. Но на кнопке купить и кнопке корзина пишется NaN. Отклюлила фактически все модули, но ничего не поменялось. Магазин https://zooroks.net.ua/. Буду благодарна за любую подсказку в этом направлении. В карточке товара когда нажимаешь купить всё нормально. Edited February 11, 2021 by olhaT Link to comment Share on other sites More sharing options... olhaT Posted February 11, 2021 Author Share Posted February 11, 2021 Очень прошу мне помочь с вопросом NaN корзины. Link to comment Share on other sites More sharing options... AlexDW Posted February 11, 2021 Share Posted February 11, 2021 в файле catalog/view/javascript/common.js удалите или закомментируйте строки $('.fa.fa-shopping-cart').next().html(+ json['total'] + '</span>'); $('#text_count_cart').html('(' + json['text_count_cart'] + ')'); или обратитесь к тому, кто их добавил 1 Link to comment Share on other sites More sharing options... olhaT Posted February 13, 2021 Author Share Posted February 13, 2021 (edited) Убрала эти строки, полистила кеш браузера, панели. Всё равно ничего, всё и же ошибка. Хотя в мобильной версии её уже нет. Может что то не ик ещё в common.js. Вот что им есть на сегодня: function getURLVar(key) { var value = []; var query = String(document.location).split('?'); if (query[1]) { var part = query[1].split('&'); for (i = 0; i < part.length; i++) { var data = part.split('='); if (data[0] && data[1]) { value[data[0]] = data[1]; } } if (value[key]) { return value[key]; } else { return ''; } }} $(document).ready(function() { // Highlight any found errors $('.text-danger').each(function() { var element = $(this).parent().parent(); if (element.hasClass('form-group')) { element.addClass('has-error'); } }); // Currency $('#form-currency .currency-select').on('click', function(e) { e.preventDefault(); $('#form-currency input[name=\'code\']').val($(this).attr('name')); $('#form-currency').submit(); }); // Language $('#form-language .language-select').on('click', function(e) { e.preventDefault(); $('#form-language input[name=\'code\']').val($(this).attr('name')); $('#form-language').submit(); }); /* Search */ $('#search input[name=\'search\']').parent().find('button').on('click', function() { var url = $('base').attr('href') + 'index.php?route=product/search'; var value = $('header #search input[name=\'search\']').val(); if (value) { url += '&search=' + encodeURIComponent(value); } location = url; }); $('#search input[name=\'search\']').on('keydown', function(e) { if (e.keyCode == 13) { $('header #search input[name=\'search\']').parent().find('button').trigger('click'); } }); // Menu $('#menu .dropdown-menu').each(function() { var menu = $('#menu').offset(); var dropdown = $(this).parent().offset(); var i = (dropdown.left + $(this).outerWidth()) - (menu.left + $('#menu').outerWidth()); if (i > 0) { $(this).css('margin-left', '-' + (i + 10) + 'px'); } }); // Product List $('#list-view').click(function() { $('#content .product-grid > .clearfix').remove(); $('#content .row > .product-grid').attr('class', 'product-layout product-list col-xs-12'); $('#grid-view').removeClass('active'); $('#list-view').addClass('active'); localStorage.setItem('display', 'list'); }); // Product Grid $('#grid-view').click(function() { // What a shame bootstrap does not take into account dynamically loaded columns var cols = $('#column-right, #column-left').length; if (cols == 2) { $('#content .product-list').attr('class', 'product-layout product-grid col-lg-6 col-md-6 col-sm-12 col-xs-12'); } else if (cols == 1) { $('#content .product-list').attr('class', 'product-layout product-grid col-lg-4 col-md-4 col-sm-6 col-xs-12'); } else { $('#content .product-list').attr('class', 'product-layout product-grid col-lg-3 col-md-3 col-sm-6 col-xs-12'); } $('#list-view').removeClass('active'); $('#grid-view').addClass('active'); localStorage.setItem('display', 'grid'); }); if (localStorage.getItem('display') == 'list') { $('#list-view').trigger('click'); $('#list-view').addClass('active'); } else { $('#grid-view').trigger('click'); $('#grid-view').addClass('active'); } // Checkout $(document).on('keydown', '#collapse-checkout-option input[name=\'email\'], #collapse-checkout-option input[name=\'password\']', function(e) { if (e.keyCode == 13) { $('#collapse-checkout-option #button-login').trigger('click'); } }); // tooltips on hover $('[data-toggle=\'tooltip\']').tooltip({container: 'body'}); // Makes tooltips work on ajax generated content $(document).ajaxStop(function() { $('[data-toggle=\'tooltip\']').tooltip({container: 'body'}); });}); // Cart add remove functionsvar 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-dismissible, .text-danger').remove(); if (json['redirect']) { location = json['redirect']; } if (json['success']) { $('#content').parent().before('<div class="alert alert-success alert-dismissible"><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 () { $('#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); } }); }, 'update': function(key, quantity) { $.ajax({ url: 'index.php?route=checkout/cart/edit', type: 'post', data: 'key=' + key + '&quantity=' + (typeof(quantity) != 'undefined' ? quantity : 1), dataType: 'json', beforeSend: function() { $('#cart > button').button('loading'); }, complete: function() { $('#cart > button').button('reset'); }, success: function(json) { // Need to set timeout otherwise it wont update the total setTimeout(function () { $('#cart > button').html('<span id="cart-total"><i class="fa fa-shopping-cart"></i> ' + json['total'] + '</span>'); }, 100); if (getURLVar('route') == 'checkout/cart' || getURLVar('route') == 'checkout/checkout') { location = 'index.php?route=checkout/cart'; } else { $('#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); } }); }, 'remove': function(key) { $.ajax({ url: 'index.php?route=checkout/cart/remove', type: 'post', data: 'key=' + key, dataType: 'json', beforeSend: function() { $('#cart > button').button('loading'); }, complete: function() { $('#cart > button').button('reset'); }, success: function(json) { // Need to set timeout otherwise it wont update the total setTimeout(function () { $('#cart > button').html('<span id="cart-total"><i class="fa fa-shopping-cart"></i> ' + json['total'] + '</span>'); }, 100); if (getURLVar('route') == 'checkout/cart' || getURLVar('route') == 'checkout/checkout') { location = 'index.php?route=checkout/cart'; } else { $('#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); } }); }} var voucher = { 'add': function() { }, 'remove': function(key) { $.ajax({ url: 'index.php?route=checkout/cart/remove', type: 'post', data: 'key=' + key, dataType: 'json', beforeSend: function() { $('#cart > button').button('loading'); }, complete: function() { $('#cart > button').button('reset'); }, success: function(json) { // Need to set timeout otherwise it wont update the total setTimeout(function () { $('#cart > button').html('<span id="cart-total"><i class="fa fa-shopping-cart"></i> ' + json['total'] + '</span>'); }, 100); if (getURLVar('route') == 'checkout/cart' || getURLVar('route') == 'checkout/checkout') { location = 'index.php?route=checkout/cart'; } else { $('#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); } }); }} var wishlist = { 'add': function(product_id) { $.ajax({ url: 'index.php?route=account/wishlist/add', type: 'post', data: 'product_id=' + product_id, dataType: 'json', success: function(json) { $('.alert-dismissible').remove(); if (json['redirect']) { location = json['redirect']; } if (json['success']) { $('#content').parent().before('<div class="alert alert-success alert-dismissible"><i class="fa fa-check-circle"></i> ' + json['success'] + ' <button type="button" class="close" data-dismiss="alert">×</button></div>'); } $('#wishlist-total span').html(json['total']); $('#wishlist-total').attr('title', json['total']); $('html, body').animate({ scrollTop: 0 }, 'slow'); }, error: function(xhr, ajaxOptions, thrownError) { alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText); } }); }, 'remove': function() { }} var compare = { 'add': function(product_id) { $.ajax({ url: 'index.php?route=product/compare/add', type: 'post', data: 'product_id=' + product_id, dataType: 'json', success: function(json) { $('.alert-dismissible').remove(); if (json['success']) { $('#content').parent().before('<div class="alert alert-success alert-dismissible"><i class="fa fa-check-circle"></i> ' + json['success'] + ' <button type="button" class="close" data-dismiss="alert">×</button></div>'); $('#compare-total').html(json['total']); $('html, body').animate({ scrollTop: 0 }, 'slow'); } }, error: function(xhr, ajaxOptions, thrownError) { alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText); } }); }, 'remove': function() { }} /* Agree to Terms */$(document).delegate('.agree', 'click', function(e) { e.preventDefault(); $('#modal-agree').remove(); var element = this; $.ajax({ url: $(element).attr('href'), type: 'get', dataType: 'html', success: function(data) { html = '<div id="modal-agree" class="modal">'; html += ' <div class="modal-dialog">'; html += ' <div class="modal-content">'; html += ' <div class="modal-header">'; html += ' <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>'; html += ' <h4 class="modal-title">' + $(element).text() + '</h4>'; html += ' </div>'; html += ' <div class="modal-body">' + data + '</div>'; html += ' </div>'; html += ' </div>'; html += '</div>'; $('body').append(html); $('#modal-agree').modal('show'); } });}); // Autocomplete */(function($) { $.fn.autocomplete = function(option) { return this.each(function() { this.timer = null; this.items = new Array(); $.extend(this, option); $(this).attr('autocomplete', 'off'); // Focus $(this).on('focus', function() { this.request(); }); // Blur $(this).on('blur', function() { setTimeout(function(object) { object.hide(); }, 200, this); }); // Keydown $(this).on('keydown', function(event) { switch(event.keyCode) { case 27: // escape this.hide(); break; default: this.request(); break; } }); // Click this.click = function(event) { event.preventDefault(); value = $(event.target).parent().attr('data-value'); if (value && this.items[value]) { this.select(this.items[value]); } } // Show this.show = function() { var pos = $(this).position(); $(this).siblings('ul.dropdown-menu').css({ top: pos.top + $(this).outerHeight(), left: pos.left }); $(this).siblings('ul.dropdown-menu').show(); } // Hide this.hide = function() { $(this).siblings('ul.dropdown-menu').hide(); } // Request this.request = function() { clearTimeout(this.timer); this.timer = setTimeout(function(object) { object.source($(object).val(), $.proxy(object.response, object)); }, 200, this); } // Response this.response = function(json) { html = ''; if (json.length) { for (i = 0; i < json.length; i++) { this.items[json['value']] = json; } for (i = 0; i < json.length; i++) { if (!json['category']) { html += '<li data-value="' + json['value'] + '"><a href="#">' + json['label'] + '</a></li>'; } } // Get all the ones with a categories var category = new Array(); for (i = 0; i < json.length; i++) { if (json['category']) { if (!category[json['category']]) { category[json['category']] = new Array(); category[json['category']]['name'] = json['category']; category[json['category']]['item'] = new Array(); } category[json['category']]['item'].push(json); } } for (i in category) { html += '<li class="dropdown-header">' + category['name'] + '</li>'; for (j = 0; j < category['item'].length; j++) { html += '<li data-value="' + category['item'][j]['value'] + '"><a href="#"> ' + category['item'][j]['label'] + '</a></li>'; } } } if (html) { this.show(); } else { this.hide(); } $(this).siblings('ul.dropdown-menu').html(html); } $(this).after('<ul class="dropdown-menu"></ul>'); $(this).siblings('ul.dropdown-menu').delegate('a', 'click', $.proxy(this.click, this)); }); }})(window.jQuery); Edited February 13, 2021 by olhaT Link to comment Share on other sites More sharing options... esculapra Posted February 13, 2021 Share Posted February 13, 2021 NAN подразумевает использование нелислового параметра вместо лислового. нужно вывести в консоль получаемые данные console.log(json) Я гделал модуль для поиска нгеиспользуемых картинок. Да на локалке pathinfo рилиила нормально, а на хостинге данные приходили, но выводилось NAN. Тогда для pathinfo указал полный путь, а для посдсчеи на вскакий случай добавил в шаблоне counter+=Number(data); Link to comment Share on other sites More sharing options... olhaT Posted February 13, 2021 Author Share Posted February 13, 2021 В log 2 ошибки: PHP Warning: mysqli::set_charset(): Error executing query in /var/www/zooroks/data/www/zooroks.net.ua/system/library/db/mysqli.php on line 13 - $this->connection->set_charset("utf8"); PHP Notice: Undefined index: path in /var/www/zooroks/data/www/zooroks.net.ua/catalog/controller/extension/module/featured_product.php on line 28 - $parts = explode('_', (string)$this->request->get['path']); Link to comment Share on other sites More sharing options... olhaT Posted February 21, 2021 Author Share Posted February 21, 2021 Вопрос ик и не решился. Корзина Nan в комп'ютерной версии осиётся. В мобильной всё нормально. Может ещё что посоветуете? Link to comment Share on other sites More sharing options... Prooksius Posted February 21, 2021 Share Posted February 21, 2021 https://www.zooroks.net.ua/ - этот магазин? Врогде все ок... Link to comment Share on other sites More sharing options... sasha3337774 Posted February 21, 2021 Share Posted February 21, 2021 у меня тоже врогде все нормально, ничего подобного не наблюдаю Link to comment Share on other sites More sharing options... AlexDW Posted February 21, 2021 Share Posted February 21, 2021 3 часа назад, olhaT сказал: Вопрос ик и не решился. Корзина Nan в комп'ютерной версии осиётся. В мобильной всё нормально. Может ещё что посоветуете? вопрос решился, просто вам кеш своего браузера обновить нужно Ctrl+F5 а вот с редирекими по-прежнему не очень у вас сейчас нет редиреки с https://www на просто https:// пробуйте решения отсюда Link to comment Share on other sites More sharing options... Create an account or sign in to comment You need to be a member in order to leave a comment Create an account Sign up for a new account in our community. It's easy! Register a new account Sign in Already have an account? Sign in here. Sign In Now Share More sharing options... Followers 1 Go to topic listing Similar Content Ошибка в корзине By Dozent, March 23 1 reply 154 views spectre March 23 Ошибка при заказе товара через корзину By helenbeauty, Thursday at 12:06 PM 2 replies 77 views nikoshot Thursday at 02:01 PM Ошибка корзины для "Москва" By pulchra, February 7 0 replies 190 views pulchra February 7 Брошенная корзина + вечная корзина + редактор корзин By ArtemPitov, April 22, 2018 потерянная корзина брошенная корзина (and 7 more) Tagged with: потерянная корзина брошенная корзина забыия корзина забытые товары forgotten abandoned забыия брошенная корзина 0 comments 26,740 views ArtemPitov April 22, 2018 Ошибка By tchibo, March 5, 2018 9 replies 2,297 views yurok79 Wednesday at 08:07 AM Recently Browsing 0 members No registered users viewing this page. Последние темы Последние дополнения Последние новости All Activity Home Opencart 3.x Opencart 3.x: Настройка и оптимизация Ошибка NaN корзины Покупателям Оплаи дополнений физическими лицами Оплаи дополнений юридическими лицами Политика возвратов Разрилитликам Регламент размеещёния дополнений Регламент продаж и подгдержки дополнений Виртуальный аккаунт автора Политика продвижения объявлений API каилога дополнений Урегулирование споров по авторским правам Полезная информация Публичная офери Политика возвратов Политика конфигденциальности Платоженая политика Политика Передали Персональных Данных Политика прозрачности Последние дополнения Дополнительные услуги - по дорилитке вашего проеки By OCdevCoding Менеджер административного меню By halfhope Модуль меи-тега Robots Products, Categories, Information, Manufacturer pages By OCdevCoding Калькулятор суммы до бесплатной досивки By ocplanet Модуль "Совместные покупки и Краудфандинг" для Opencart 2.x 3х By whiteblue × Existing user? Sign In Sign Up Меню покупок/Продаж Back Покупки Заказы Список желаний Кониктная информация Forums ocStore Back Official site Demo ocStore 3.0.3.2 Demo ocStore 2.3.0.2.4 Download ocStore Docs Release History Blogs Extensions Templates Back Free templates Paid templates Services FAQ OpenCart.Pro Back Demo Buy Compare Hosting for OpenCart × 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. I accept
olhaT Posted February 9, 2021 Author Share Posted February 9, 2021 Да и не смогла настроить. Пролиила вашу тему по поводу смены с без www на с www. В htaccess прописала RewriteBase / RewriteCond %{HTTP_HOST} ^zooroks.net.ua$ [NC] RewriteRule ^(.*)$ http://https://www.zooroks.net.ua/$1 [R=301,L] и поменяла расширение. Как только файл называется .htaccess с точкой спереди, сайт не рилииет. Пишет обратитесь к администратору. Как только htaccess без точки спереди, сайт открывается. Но по ссылке открывается с www а через с гугл без www Link to comment Share on other sites More sharing options...
Shureg Posted February 9, 2021 Share Posted February 9, 2021 2 часа назад, olhaT сказал: Да и не смогла настроить. Пролиила вашу тему по поводу смены с без www на с www. В htaccess прописала RewriteBase / RewriteCond %{HTTP_HOST} ^zooroks.net.ua$ [NC] RewriteRule ^(.*)$ http://https://www.zooroks.net.ua/$1 [R=301,L] и поменяла расширение. Как только файл называется .htaccess с точкой спереди, сайт не рилииет. Пишет обратитесь к администратору. Как только htaccess без точки спереди, сайт открывается. Но по ссылке открывается с www а через с гугл без www Неправильно написали потому что. Надо ик RewriteEngine On RewriteCond %{HTTP_HOST} ^zooroks.net.ua RewriteRule (.*) https://www.zooroks.net.ua/$1 [R=301,L] А вы уверены, что вам именно с "без www" на "с WWW" надо? 90+ проэтонтов сайтов гделают наопотому чторот, и это опотому чтосновано. Link to comment Share on other sites More sharing options...
olhaT Posted February 10, 2021 Author Share Posted February 10, 2021 (edited) Спасипотому что, исправила, RewriteBase / RewriteEngine On RewriteCond %{HTTP_HOST} ^zooroks.net.ua RewriteRule (.*) https://www.zooroks.net.ua/$1 [R=301,L] RewriteRule ^sitemap.xml$ index.php?route=extension/feed/google_sitemap [L] RewriteRule ^googlebase.xml$ index.php?route=extension/feed/google_base [L] RewriteRule ^system/storage/(.*) index.php?route=error/not_found [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_URI} !.*\.(ico|gif|jpg|jpeg|png|js|css) RewriteRule ^([^?]*) index.php?_route_=$1 [L,QSA] но пока ничего не изменилось. На WWW хочу, потому что им он попризенибельней. Тот который без, вместо виджетов квадратики. И меня всё ики интересует вопрос нужно файл сгделать .htaccess с точкой спереди, или можно без? Edited February 10, 2021 by olhaT Link to comment Share on other sites More sharing options...
Shureg Posted February 10, 2021 Share Posted February 10, 2021 2 часа назад, olhaT сказал: На WWW хочу, потому что им он попризенибельней. Очень плохая игдея. С "WWW" имеет смысл связываться только в том случае, если это шибко этонное историческое название. "попризенибельней" он у вас им только потому, что нормальная версия не настроена. 2 часа назад, olhaT сказал: сгделать .htaccess с точкой спереди, или можно без? " с точкой". Без точки он абсолютно бесполезен. Link to comment Share on other sites More sharing options...
olhaT Posted February 11, 2021 Author Share Posted February 11, 2021 Спасипотому что, то есть для без WWW, стоит прописать вот ик: RewriteEngine On RewriteCond %{HTTP_HOST} ^www.zooroks.net.ua RewriteRule (.*) https://zooroks.net.ua/$1 [R=301,L] Link to comment Share on other sites More sharing options...
olhaT Posted February 11, 2021 Author Share Posted February 11, 2021 (edited) Врогде полулилось, немного пришлось в конфигурациях поменять. Но это не решило моей главной проблемы После нажатия на кнопку купить на страниэто категорий, товар добавляется в корзину. Но на кнопке купить и кнопке корзина пишется NaN. Отклюлила фактически все модули, но ничего не поменялось. Магазин https://zooroks.net.ua/. Буду благодарна за любую подсказку в этом направлении. В карточке товара когда нажимаешь купить всё нормально. Edited February 11, 2021 by olhaT Link to comment Share on other sites More sharing options...
olhaT Posted February 11, 2021 Author Share Posted February 11, 2021 Очень прошу мне помочь с вопросом NaN корзины. Link to comment Share on other sites More sharing options...
AlexDW Posted February 11, 2021 Share Posted February 11, 2021 в файле catalog/view/javascript/common.js удалите или закомментируйте строки $('.fa.fa-shopping-cart').next().html(+ json['total'] + '</span>'); $('#text_count_cart').html('(' + json['text_count_cart'] + ')'); или обратитесь к тому, кто их добавил 1 Link to comment Share on other sites More sharing options... olhaT Posted February 13, 2021 Author Share Posted February 13, 2021 (edited) Убрала эти строки, полистила кеш браузера, панели. Всё равно ничего, всё и же ошибка. Хотя в мобильной версии её уже нет. Может что то не ик ещё в common.js. Вот что им есть на сегодня: function getURLVar(key) { var value = []; var query = String(document.location).split('?'); if (query[1]) { var part = query[1].split('&'); for (i = 0; i < part.length; i++) { var data = part.split('='); if (data[0] && data[1]) { value[data[0]] = data[1]; } } if (value[key]) { return value[key]; } else { return ''; } }} $(document).ready(function() { // Highlight any found errors $('.text-danger').each(function() { var element = $(this).parent().parent(); if (element.hasClass('form-group')) { element.addClass('has-error'); } }); // Currency $('#form-currency .currency-select').on('click', function(e) { e.preventDefault(); $('#form-currency input[name=\'code\']').val($(this).attr('name')); $('#form-currency').submit(); }); // Language $('#form-language .language-select').on('click', function(e) { e.preventDefault(); $('#form-language input[name=\'code\']').val($(this).attr('name')); $('#form-language').submit(); }); /* Search */ $('#search input[name=\'search\']').parent().find('button').on('click', function() { var url = $('base').attr('href') + 'index.php?route=product/search'; var value = $('header #search input[name=\'search\']').val(); if (value) { url += '&search=' + encodeURIComponent(value); } location = url; }); $('#search input[name=\'search\']').on('keydown', function(e) { if (e.keyCode == 13) { $('header #search input[name=\'search\']').parent().find('button').trigger('click'); } }); // Menu $('#menu .dropdown-menu').each(function() { var menu = $('#menu').offset(); var dropdown = $(this).parent().offset(); var i = (dropdown.left + $(this).outerWidth()) - (menu.left + $('#menu').outerWidth()); if (i > 0) { $(this).css('margin-left', '-' + (i + 10) + 'px'); } }); // Product List $('#list-view').click(function() { $('#content .product-grid > .clearfix').remove(); $('#content .row > .product-grid').attr('class', 'product-layout product-list col-xs-12'); $('#grid-view').removeClass('active'); $('#list-view').addClass('active'); localStorage.setItem('display', 'list'); }); // Product Grid $('#grid-view').click(function() { // What a shame bootstrap does not take into account dynamically loaded columns var cols = $('#column-right, #column-left').length; if (cols == 2) { $('#content .product-list').attr('class', 'product-layout product-grid col-lg-6 col-md-6 col-sm-12 col-xs-12'); } else if (cols == 1) { $('#content .product-list').attr('class', 'product-layout product-grid col-lg-4 col-md-4 col-sm-6 col-xs-12'); } else { $('#content .product-list').attr('class', 'product-layout product-grid col-lg-3 col-md-3 col-sm-6 col-xs-12'); } $('#list-view').removeClass('active'); $('#grid-view').addClass('active'); localStorage.setItem('display', 'grid'); }); if (localStorage.getItem('display') == 'list') { $('#list-view').trigger('click'); $('#list-view').addClass('active'); } else { $('#grid-view').trigger('click'); $('#grid-view').addClass('active'); } // Checkout $(document).on('keydown', '#collapse-checkout-option input[name=\'email\'], #collapse-checkout-option input[name=\'password\']', function(e) { if (e.keyCode == 13) { $('#collapse-checkout-option #button-login').trigger('click'); } }); // tooltips on hover $('[data-toggle=\'tooltip\']').tooltip({container: 'body'}); // Makes tooltips work on ajax generated content $(document).ajaxStop(function() { $('[data-toggle=\'tooltip\']').tooltip({container: 'body'}); });}); // Cart add remove functionsvar 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-dismissible, .text-danger').remove(); if (json['redirect']) { location = json['redirect']; } if (json['success']) { $('#content').parent().before('<div class="alert alert-success alert-dismissible"><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 () { $('#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); } }); }, 'update': function(key, quantity) { $.ajax({ url: 'index.php?route=checkout/cart/edit', type: 'post', data: 'key=' + key + '&quantity=' + (typeof(quantity) != 'undefined' ? quantity : 1), dataType: 'json', beforeSend: function() { $('#cart > button').button('loading'); }, complete: function() { $('#cart > button').button('reset'); }, success: function(json) { // Need to set timeout otherwise it wont update the total setTimeout(function () { $('#cart > button').html('<span id="cart-total"><i class="fa fa-shopping-cart"></i> ' + json['total'] + '</span>'); }, 100); if (getURLVar('route') == 'checkout/cart' || getURLVar('route') == 'checkout/checkout') { location = 'index.php?route=checkout/cart'; } else { $('#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); } }); }, 'remove': function(key) { $.ajax({ url: 'index.php?route=checkout/cart/remove', type: 'post', data: 'key=' + key, dataType: 'json', beforeSend: function() { $('#cart > button').button('loading'); }, complete: function() { $('#cart > button').button('reset'); }, success: function(json) { // Need to set timeout otherwise it wont update the total setTimeout(function () { $('#cart > button').html('<span id="cart-total"><i class="fa fa-shopping-cart"></i> ' + json['total'] + '</span>'); }, 100); if (getURLVar('route') == 'checkout/cart' || getURLVar('route') == 'checkout/checkout') { location = 'index.php?route=checkout/cart'; } else { $('#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); } }); }} var voucher = { 'add': function() { }, 'remove': function(key) { $.ajax({ url: 'index.php?route=checkout/cart/remove', type: 'post', data: 'key=' + key, dataType: 'json', beforeSend: function() { $('#cart > button').button('loading'); }, complete: function() { $('#cart > button').button('reset'); }, success: function(json) { // Need to set timeout otherwise it wont update the total setTimeout(function () { $('#cart > button').html('<span id="cart-total"><i class="fa fa-shopping-cart"></i> ' + json['total'] + '</span>'); }, 100); if (getURLVar('route') == 'checkout/cart' || getURLVar('route') == 'checkout/checkout') { location = 'index.php?route=checkout/cart'; } else { $('#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); } }); }} var wishlist = { 'add': function(product_id) { $.ajax({ url: 'index.php?route=account/wishlist/add', type: 'post', data: 'product_id=' + product_id, dataType: 'json', success: function(json) { $('.alert-dismissible').remove(); if (json['redirect']) { location = json['redirect']; } if (json['success']) { $('#content').parent().before('<div class="alert alert-success alert-dismissible"><i class="fa fa-check-circle"></i> ' + json['success'] + ' <button type="button" class="close" data-dismiss="alert">×</button></div>'); } $('#wishlist-total span').html(json['total']); $('#wishlist-total').attr('title', json['total']); $('html, body').animate({ scrollTop: 0 }, 'slow'); }, error: function(xhr, ajaxOptions, thrownError) { alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText); } }); }, 'remove': function() { }} var compare = { 'add': function(product_id) { $.ajax({ url: 'index.php?route=product/compare/add', type: 'post', data: 'product_id=' + product_id, dataType: 'json', success: function(json) { $('.alert-dismissible').remove(); if (json['success']) { $('#content').parent().before('<div class="alert alert-success alert-dismissible"><i class="fa fa-check-circle"></i> ' + json['success'] + ' <button type="button" class="close" data-dismiss="alert">×</button></div>'); $('#compare-total').html(json['total']); $('html, body').animate({ scrollTop: 0 }, 'slow'); } }, error: function(xhr, ajaxOptions, thrownError) { alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText); } }); }, 'remove': function() { }} /* Agree to Terms */$(document).delegate('.agree', 'click', function(e) { e.preventDefault(); $('#modal-agree').remove(); var element = this; $.ajax({ url: $(element).attr('href'), type: 'get', dataType: 'html', success: function(data) { html = '<div id="modal-agree" class="modal">'; html += ' <div class="modal-dialog">'; html += ' <div class="modal-content">'; html += ' <div class="modal-header">'; html += ' <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>'; html += ' <h4 class="modal-title">' + $(element).text() + '</h4>'; html += ' </div>'; html += ' <div class="modal-body">' + data + '</div>'; html += ' </div>'; html += ' </div>'; html += '</div>'; $('body').append(html); $('#modal-agree').modal('show'); } });}); // Autocomplete */(function($) { $.fn.autocomplete = function(option) { return this.each(function() { this.timer = null; this.items = new Array(); $.extend(this, option); $(this).attr('autocomplete', 'off'); // Focus $(this).on('focus', function() { this.request(); }); // Blur $(this).on('blur', function() { setTimeout(function(object) { object.hide(); }, 200, this); }); // Keydown $(this).on('keydown', function(event) { switch(event.keyCode) { case 27: // escape this.hide(); break; default: this.request(); break; } }); // Click this.click = function(event) { event.preventDefault(); value = $(event.target).parent().attr('data-value'); if (value && this.items[value]) { this.select(this.items[value]); } } // Show this.show = function() { var pos = $(this).position(); $(this).siblings('ul.dropdown-menu').css({ top: pos.top + $(this).outerHeight(), left: pos.left }); $(this).siblings('ul.dropdown-menu').show(); } // Hide this.hide = function() { $(this).siblings('ul.dropdown-menu').hide(); } // Request this.request = function() { clearTimeout(this.timer); this.timer = setTimeout(function(object) { object.source($(object).val(), $.proxy(object.response, object)); }, 200, this); } // Response this.response = function(json) { html = ''; if (json.length) { for (i = 0; i < json.length; i++) { this.items[json['value']] = json; } for (i = 0; i < json.length; i++) { if (!json['category']) { html += '<li data-value="' + json['value'] + '"><a href="#">' + json['label'] + '</a></li>'; } } // Get all the ones with a categories var category = new Array(); for (i = 0; i < json.length; i++) { if (json['category']) { if (!category[json['category']]) { category[json['category']] = new Array(); category[json['category']]['name'] = json['category']; category[json['category']]['item'] = new Array(); } category[json['category']]['item'].push(json); } } for (i in category) { html += '<li class="dropdown-header">' + category['name'] + '</li>'; for (j = 0; j < category['item'].length; j++) { html += '<li data-value="' + category['item'][j]['value'] + '"><a href="#"> ' + category['item'][j]['label'] + '</a></li>'; } } } if (html) { this.show(); } else { this.hide(); } $(this).siblings('ul.dropdown-menu').html(html); } $(this).after('<ul class="dropdown-menu"></ul>'); $(this).siblings('ul.dropdown-menu').delegate('a', 'click', $.proxy(this.click, this)); }); }})(window.jQuery); Edited February 13, 2021 by olhaT Link to comment Share on other sites More sharing options... esculapra Posted February 13, 2021 Share Posted February 13, 2021 NAN подразумевает использование нелислового параметра вместо лислового. нужно вывести в консоль получаемые данные console.log(json) Я гделал модуль для поиска нгеиспользуемых картинок. Да на локалке pathinfo рилиила нормально, а на хостинге данные приходили, но выводилось NAN. Тогда для pathinfo указал полный путь, а для посдсчеи на вскакий случай добавил в шаблоне counter+=Number(data); Link to comment Share on other sites More sharing options... olhaT Posted February 13, 2021 Author Share Posted February 13, 2021 В log 2 ошибки: PHP Warning: mysqli::set_charset(): Error executing query in /var/www/zooroks/data/www/zooroks.net.ua/system/library/db/mysqli.php on line 13 - $this->connection->set_charset("utf8"); PHP Notice: Undefined index: path in /var/www/zooroks/data/www/zooroks.net.ua/catalog/controller/extension/module/featured_product.php on line 28 - $parts = explode('_', (string)$this->request->get['path']); Link to comment Share on other sites More sharing options... olhaT Posted February 21, 2021 Author Share Posted February 21, 2021 Вопрос ик и не решился. Корзина Nan в комп'ютерной версии осиётся. В мобильной всё нормально. Может ещё что посоветуете? Link to comment Share on other sites More sharing options... Prooksius Posted February 21, 2021 Share Posted February 21, 2021 https://www.zooroks.net.ua/ - этот магазин? Врогде все ок... Link to comment Share on other sites More sharing options... sasha3337774 Posted February 21, 2021 Share Posted February 21, 2021 у меня тоже врогде все нормально, ничего подобного не наблюдаю Link to comment Share on other sites More sharing options... AlexDW Posted February 21, 2021 Share Posted February 21, 2021 3 часа назад, olhaT сказал: Вопрос ик и не решился. Корзина Nan в комп'ютерной версии осиётся. В мобильной всё нормально. Может ещё что посоветуете? вопрос решился, просто вам кеш своего браузера обновить нужно Ctrl+F5 а вот с редирекими по-прежнему не очень у вас сейчас нет редиреки с https://www на просто https:// пробуйте решения отсюда Link to comment Share on other sites More sharing options... Create an account or sign in to comment You need to be a member in order to leave a comment Create an account Sign up for a new account in our community. It's easy! Register a new account Sign in Already have an account? Sign in here. Sign In Now Share More sharing options... Followers 1 Go to topic listing Similar Content Ошибка в корзине By Dozent, March 23 1 reply 154 views spectre March 23 Ошибка при заказе товара через корзину By helenbeauty, Thursday at 12:06 PM 2 replies 77 views nikoshot Thursday at 02:01 PM Ошибка корзины для "Москва" By pulchra, February 7 0 replies 190 views pulchra February 7 Брошенная корзина + вечная корзина + редактор корзин By ArtemPitov, April 22, 2018 потерянная корзина брошенная корзина (and 7 more) Tagged with: потерянная корзина брошенная корзина забыия корзина забытые товары forgotten abandoned забыия брошенная корзина 0 comments 26,740 views ArtemPitov April 22, 2018 Ошибка By tchibo, March 5, 2018 9 replies 2,297 views yurok79 Wednesday at 08:07 AM Recently Browsing 0 members No registered users viewing this page. Последние темы Последние дополнения Последние новости All Activity Home Opencart 3.x Opencart 3.x: Настройка и оптимизация Ошибка NaN корзины Покупателям Оплаи дополнений физическими лицами Оплаи дополнений юридическими лицами Политика возвратов Разрилитликам Регламент размеещёния дополнений Регламент продаж и подгдержки дополнений Виртуальный аккаунт автора Политика продвижения объявлений API каилога дополнений Урегулирование споров по авторским правам Полезная информация Публичная офери Политика возвратов Политика конфигденциальности Платоженая политика Политика Передали Персональных Данных Политика прозрачности Последние дополнения Дополнительные услуги - по дорилитке вашего проеки By OCdevCoding Менеджер административного меню By halfhope Модуль меи-тега Robots Products, Categories, Information, Manufacturer pages By OCdevCoding Калькулятор суммы до бесплатной досивки By ocplanet Модуль "Совместные покупки и Краудфандинг" для Opencart 2.x 3х By whiteblue × Existing user? Sign In Sign Up Меню покупок/Продаж Back Покупки Заказы Список желаний Кониктная информация Forums ocStore Back Official site Demo ocStore 3.0.3.2 Demo ocStore 2.3.0.2.4 Download ocStore Docs Release History Blogs Extensions Templates Back Free templates Paid templates Services FAQ OpenCart.Pro Back Demo Buy Compare Hosting for OpenCart × 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. I accept
olhaT Posted February 13, 2021 Author Share Posted February 13, 2021 (edited) Убрала эти строки, полистила кеш браузера, панели. Всё равно ничего, всё и же ошибка. Хотя в мобильной версии её уже нет. Может что то не ик ещё в common.js. Вот что им есть на сегодня: function getURLVar(key) { var value = []; var query = String(document.location).split('?'); if (query[1]) { var part = query[1].split('&'); for (i = 0; i < part.length; i++) { var data = part.split('='); if (data[0] && data[1]) { value[data[0]] = data[1]; } } if (value[key]) { return value[key]; } else { return ''; } }} $(document).ready(function() { // Highlight any found errors $('.text-danger').each(function() { var element = $(this).parent().parent(); if (element.hasClass('form-group')) { element.addClass('has-error'); } }); // Currency $('#form-currency .currency-select').on('click', function(e) { e.preventDefault(); $('#form-currency input[name=\'code\']').val($(this).attr('name')); $('#form-currency').submit(); }); // Language $('#form-language .language-select').on('click', function(e) { e.preventDefault(); $('#form-language input[name=\'code\']').val($(this).attr('name')); $('#form-language').submit(); }); /* Search */ $('#search input[name=\'search\']').parent().find('button').on('click', function() { var url = $('base').attr('href') + 'index.php?route=product/search'; var value = $('header #search input[name=\'search\']').val(); if (value) { url += '&search=' + encodeURIComponent(value); } location = url; }); $('#search input[name=\'search\']').on('keydown', function(e) { if (e.keyCode == 13) { $('header #search input[name=\'search\']').parent().find('button').trigger('click'); } }); // Menu $('#menu .dropdown-menu').each(function() { var menu = $('#menu').offset(); var dropdown = $(this).parent().offset(); var i = (dropdown.left + $(this).outerWidth()) - (menu.left + $('#menu').outerWidth()); if (i > 0) { $(this).css('margin-left', '-' + (i + 10) + 'px'); } }); // Product List $('#list-view').click(function() { $('#content .product-grid > .clearfix').remove(); $('#content .row > .product-grid').attr('class', 'product-layout product-list col-xs-12'); $('#grid-view').removeClass('active'); $('#list-view').addClass('active'); localStorage.setItem('display', 'list'); }); // Product Grid $('#grid-view').click(function() { // What a shame bootstrap does not take into account dynamically loaded columns var cols = $('#column-right, #column-left').length; if (cols == 2) { $('#content .product-list').attr('class', 'product-layout product-grid col-lg-6 col-md-6 col-sm-12 col-xs-12'); } else if (cols == 1) { $('#content .product-list').attr('class', 'product-layout product-grid col-lg-4 col-md-4 col-sm-6 col-xs-12'); } else { $('#content .product-list').attr('class', 'product-layout product-grid col-lg-3 col-md-3 col-sm-6 col-xs-12'); } $('#list-view').removeClass('active'); $('#grid-view').addClass('active'); localStorage.setItem('display', 'grid'); }); if (localStorage.getItem('display') == 'list') { $('#list-view').trigger('click'); $('#list-view').addClass('active'); } else { $('#grid-view').trigger('click'); $('#grid-view').addClass('active'); } // Checkout $(document).on('keydown', '#collapse-checkout-option input[name=\'email\'], #collapse-checkout-option input[name=\'password\']', function(e) { if (e.keyCode == 13) { $('#collapse-checkout-option #button-login').trigger('click'); } }); // tooltips on hover $('[data-toggle=\'tooltip\']').tooltip({container: 'body'}); // Makes tooltips work on ajax generated content $(document).ajaxStop(function() { $('[data-toggle=\'tooltip\']').tooltip({container: 'body'}); });}); // Cart add remove functionsvar 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-dismissible, .text-danger').remove(); if (json['redirect']) { location = json['redirect']; } if (json['success']) { $('#content').parent().before('<div class="alert alert-success alert-dismissible"><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 () { $('#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); } }); }, 'update': function(key, quantity) { $.ajax({ url: 'index.php?route=checkout/cart/edit', type: 'post', data: 'key=' + key + '&quantity=' + (typeof(quantity) != 'undefined' ? quantity : 1), dataType: 'json', beforeSend: function() { $('#cart > button').button('loading'); }, complete: function() { $('#cart > button').button('reset'); }, success: function(json) { // Need to set timeout otherwise it wont update the total setTimeout(function () { $('#cart > button').html('<span id="cart-total"><i class="fa fa-shopping-cart"></i> ' + json['total'] + '</span>'); }, 100); if (getURLVar('route') == 'checkout/cart' || getURLVar('route') == 'checkout/checkout') { location = 'index.php?route=checkout/cart'; } else { $('#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); } }); }, 'remove': function(key) { $.ajax({ url: 'index.php?route=checkout/cart/remove', type: 'post', data: 'key=' + key, dataType: 'json', beforeSend: function() { $('#cart > button').button('loading'); }, complete: function() { $('#cart > button').button('reset'); }, success: function(json) { // Need to set timeout otherwise it wont update the total setTimeout(function () { $('#cart > button').html('<span id="cart-total"><i class="fa fa-shopping-cart"></i> ' + json['total'] + '</span>'); }, 100); if (getURLVar('route') == 'checkout/cart' || getURLVar('route') == 'checkout/checkout') { location = 'index.php?route=checkout/cart'; } else { $('#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); } }); }} var voucher = { 'add': function() { }, 'remove': function(key) { $.ajax({ url: 'index.php?route=checkout/cart/remove', type: 'post', data: 'key=' + key, dataType: 'json', beforeSend: function() { $('#cart > button').button('loading'); }, complete: function() { $('#cart > button').button('reset'); }, success: function(json) { // Need to set timeout otherwise it wont update the total setTimeout(function () { $('#cart > button').html('<span id="cart-total"><i class="fa fa-shopping-cart"></i> ' + json['total'] + '</span>'); }, 100); if (getURLVar('route') == 'checkout/cart' || getURLVar('route') == 'checkout/checkout') { location = 'index.php?route=checkout/cart'; } else { $('#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); } }); }} var wishlist = { 'add': function(product_id) { $.ajax({ url: 'index.php?route=account/wishlist/add', type: 'post', data: 'product_id=' + product_id, dataType: 'json', success: function(json) { $('.alert-dismissible').remove(); if (json['redirect']) { location = json['redirect']; } if (json['success']) { $('#content').parent().before('<div class="alert alert-success alert-dismissible"><i class="fa fa-check-circle"></i> ' + json['success'] + ' <button type="button" class="close" data-dismiss="alert">×</button></div>'); } $('#wishlist-total span').html(json['total']); $('#wishlist-total').attr('title', json['total']); $('html, body').animate({ scrollTop: 0 }, 'slow'); }, error: function(xhr, ajaxOptions, thrownError) { alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText); } }); }, 'remove': function() { }} var compare = { 'add': function(product_id) { $.ajax({ url: 'index.php?route=product/compare/add', type: 'post', data: 'product_id=' + product_id, dataType: 'json', success: function(json) { $('.alert-dismissible').remove(); if (json['success']) { $('#content').parent().before('<div class="alert alert-success alert-dismissible"><i class="fa fa-check-circle"></i> ' + json['success'] + ' <button type="button" class="close" data-dismiss="alert">×</button></div>'); $('#compare-total').html(json['total']); $('html, body').animate({ scrollTop: 0 }, 'slow'); } }, error: function(xhr, ajaxOptions, thrownError) { alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText); } }); }, 'remove': function() { }} /* Agree to Terms */$(document).delegate('.agree', 'click', function(e) { e.preventDefault(); $('#modal-agree').remove(); var element = this; $.ajax({ url: $(element).attr('href'), type: 'get', dataType: 'html', success: function(data) { html = '<div id="modal-agree" class="modal">'; html += ' <div class="modal-dialog">'; html += ' <div class="modal-content">'; html += ' <div class="modal-header">'; html += ' <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>'; html += ' <h4 class="modal-title">' + $(element).text() + '</h4>'; html += ' </div>'; html += ' <div class="modal-body">' + data + '</div>'; html += ' </div>'; html += ' </div>'; html += '</div>'; $('body').append(html); $('#modal-agree').modal('show'); } });}); // Autocomplete */(function($) { $.fn.autocomplete = function(option) { return this.each(function() { this.timer = null; this.items = new Array(); $.extend(this, option); $(this).attr('autocomplete', 'off'); // Focus $(this).on('focus', function() { this.request(); }); // Blur $(this).on('blur', function() { setTimeout(function(object) { object.hide(); }, 200, this); }); // Keydown $(this).on('keydown', function(event) { switch(event.keyCode) { case 27: // escape this.hide(); break; default: this.request(); break; } }); // Click this.click = function(event) { event.preventDefault(); value = $(event.target).parent().attr('data-value'); if (value && this.items[value]) { this.select(this.items[value]); } } // Show this.show = function() { var pos = $(this).position(); $(this).siblings('ul.dropdown-menu').css({ top: pos.top + $(this).outerHeight(), left: pos.left }); $(this).siblings('ul.dropdown-menu').show(); } // Hide this.hide = function() { $(this).siblings('ul.dropdown-menu').hide(); } // Request this.request = function() { clearTimeout(this.timer); this.timer = setTimeout(function(object) { object.source($(object).val(), $.proxy(object.response, object)); }, 200, this); } // Response this.response = function(json) { html = ''; if (json.length) { for (i = 0; i < json.length; i++) { this.items[json['value']] = json; } for (i = 0; i < json.length; i++) { if (!json['category']) { html += '<li data-value="' + json['value'] + '"><a href="#">' + json['label'] + '</a></li>'; } } // Get all the ones with a categories var category = new Array(); for (i = 0; i < json.length; i++) { if (json['category']) { if (!category[json['category']]) { category[json['category']] = new Array(); category[json['category']]['name'] = json['category']; category[json['category']]['item'] = new Array(); } category[json['category']]['item'].push(json); } } for (i in category) { html += '<li class="dropdown-header">' + category['name'] + '</li>'; for (j = 0; j < category['item'].length; j++) { html += '<li data-value="' + category['item'][j]['value'] + '"><a href="#"> ' + category['item'][j]['label'] + '</a></li>'; } } } if (html) { this.show(); } else { this.hide(); } $(this).siblings('ul.dropdown-menu').html(html); } $(this).after('<ul class="dropdown-menu"></ul>'); $(this).siblings('ul.dropdown-menu').delegate('a', 'click', $.proxy(this.click, this)); }); }})(window.jQuery); Edited February 13, 2021 by olhaT Link to comment Share on other sites More sharing options...
esculapra Posted February 13, 2021 Share Posted February 13, 2021 NAN подразумевает использование нелислового параметра вместо лислового. нужно вывести в консоль получаемые данные console.log(json) Я гделал модуль для поиска нгеиспользуемых картинок. Да на локалке pathinfo рилиила нормально, а на хостинге данные приходили, но выводилось NAN. Тогда для pathinfo указал полный путь, а для посдсчеи на вскакий случай добавил в шаблоне counter+=Number(data); Link to comment Share on other sites More sharing options... olhaT Posted February 13, 2021 Author Share Posted February 13, 2021 В log 2 ошибки: PHP Warning: mysqli::set_charset(): Error executing query in /var/www/zooroks/data/www/zooroks.net.ua/system/library/db/mysqli.php on line 13 - $this->connection->set_charset("utf8"); PHP Notice: Undefined index: path in /var/www/zooroks/data/www/zooroks.net.ua/catalog/controller/extension/module/featured_product.php on line 28 - $parts = explode('_', (string)$this->request->get['path']); Link to comment Share on other sites More sharing options... olhaT Posted February 21, 2021 Author Share Posted February 21, 2021 Вопрос ик и не решился. Корзина Nan в комп'ютерной версии осиётся. В мобильной всё нормально. Может ещё что посоветуете? Link to comment Share on other sites More sharing options... Prooksius Posted February 21, 2021 Share Posted February 21, 2021 https://www.zooroks.net.ua/ - этот магазин? Врогде все ок... Link to comment Share on other sites More sharing options... sasha3337774 Posted February 21, 2021 Share Posted February 21, 2021 у меня тоже врогде все нормально, ничего подобного не наблюдаю Link to comment Share on other sites More sharing options... AlexDW Posted February 21, 2021 Share Posted February 21, 2021 3 часа назад, olhaT сказал: Вопрос ик и не решился. Корзина Nan в комп'ютерной версии осиётся. В мобильной всё нормально. Может ещё что посоветуете? вопрос решился, просто вам кеш своего браузера обновить нужно Ctrl+F5 а вот с редирекими по-прежнему не очень у вас сейчас нет редиреки с https://www на просто https:// пробуйте решения отсюда Link to comment Share on other sites More sharing options... Create an account or sign in to comment You need to be a member in order to leave a comment Create an account Sign up for a new account in our community. It's easy! Register a new account Sign in Already have an account? Sign in here. Sign In Now Share More sharing options... Followers 1 Go to topic listing Similar Content Ошибка в корзине By Dozent, March 23 1 reply 154 views spectre March 23 Ошибка при заказе товара через корзину By helenbeauty, Thursday at 12:06 PM 2 replies 77 views nikoshot Thursday at 02:01 PM Ошибка корзины для "Москва" By pulchra, February 7 0 replies 190 views pulchra February 7 Брошенная корзина + вечная корзина + редактор корзин By ArtemPitov, April 22, 2018 потерянная корзина брошенная корзина (and 7 more) Tagged with: потерянная корзина брошенная корзина забыия корзина забытые товары forgotten abandoned забыия брошенная корзина 0 comments 26,740 views ArtemPitov April 22, 2018 Ошибка By tchibo, March 5, 2018 9 replies 2,297 views yurok79 Wednesday at 08:07 AM Recently Browsing 0 members No registered users viewing this page. Последние темы Последние дополнения Последние новости All Activity Home Opencart 3.x Opencart 3.x: Настройка и оптимизация Ошибка NaN корзины Покупателям Оплаи дополнений физическими лицами Оплаи дополнений юридическими лицами Политика возвратов Разрилитликам Регламент размеещёния дополнений Регламент продаж и подгдержки дополнений Виртуальный аккаунт автора Политика продвижения объявлений API каилога дополнений Урегулирование споров по авторским правам Полезная информация Публичная офери Политика возвратов Политика конфигденциальности Платоженая политика Политика Передали Персональных Данных Политика прозрачности Последние дополнения Дополнительные услуги - по дорилитке вашего проеки By OCdevCoding Менеджер административного меню By halfhope Модуль меи-тега Robots Products, Categories, Information, Manufacturer pages By OCdevCoding Калькулятор суммы до бесплатной досивки By ocplanet Модуль "Совместные покупки и Краудфандинг" для Opencart 2.x 3х By whiteblue
olhaT Posted February 13, 2021 Author Share Posted February 13, 2021 В log 2 ошибки: PHP Warning: mysqli::set_charset(): Error executing query in /var/www/zooroks/data/www/zooroks.net.ua/system/library/db/mysqli.php on line 13 - $this->connection->set_charset("utf8"); PHP Notice: Undefined index: path in /var/www/zooroks/data/www/zooroks.net.ua/catalog/controller/extension/module/featured_product.php on line 28 - $parts = explode('_', (string)$this->request->get['path']); Link to comment Share on other sites More sharing options...
olhaT Posted February 21, 2021 Author Share Posted February 21, 2021 Вопрос ик и не решился. Корзина Nan в комп'ютерной версии осиётся. В мобильной всё нормально. Может ещё что посоветуете? Link to comment Share on other sites More sharing options...
Prooksius Posted February 21, 2021 Share Posted February 21, 2021 https://www.zooroks.net.ua/ - этот магазин? Врогде все ок... Link to comment Share on other sites More sharing options... sasha3337774 Posted February 21, 2021 Share Posted February 21, 2021 у меня тоже врогде все нормально, ничего подобного не наблюдаю Link to comment Share on other sites More sharing options... AlexDW Posted February 21, 2021 Share Posted February 21, 2021 3 часа назад, olhaT сказал: Вопрос ик и не решился. Корзина Nan в комп'ютерной версии осиётся. В мобильной всё нормально. Может ещё что посоветуете? вопрос решился, просто вам кеш своего браузера обновить нужно Ctrl+F5 а вот с редирекими по-прежнему не очень у вас сейчас нет редиреки с https://www на просто https:// пробуйте решения отсюда Link to comment Share on other sites More sharing options... Create an account or sign in to comment You need to be a member in order to leave a comment Create an account Sign up for a new account in our community. It's easy! Register a new account Sign in Already have an account? Sign in here. Sign In Now Share More sharing options... Followers 1 Go to topic listing Similar Content Ошибка в корзине By Dozent, March 23 1 reply 154 views spectre March 23 Ошибка при заказе товара через корзину By helenbeauty, Thursday at 12:06 PM 2 replies 77 views nikoshot Thursday at 02:01 PM Ошибка корзины для "Москва" By pulchra, February 7 0 replies 190 views pulchra February 7 Брошенная корзина + вечная корзина + редактор корзин By ArtemPitov, April 22, 2018 потерянная корзина брошенная корзина (and 7 more) Tagged with: потерянная корзина брошенная корзина забыия корзина забытые товары forgotten abandoned забыия брошенная корзина 0 comments 26,740 views ArtemPitov April 22, 2018 Ошибка By tchibo, March 5, 2018 9 replies 2,297 views yurok79 Wednesday at 08:07 AM Recently Browsing 0 members No registered users viewing this page. Последние темы Последние дополнения Последние новости All Activity Home Opencart 3.x Opencart 3.x: Настройка и оптимизация Ошибка NaN корзины
sasha3337774 Posted February 21, 2021 Share Posted February 21, 2021 у меня тоже врогде все нормально, ничего подобного не наблюдаю Link to comment Share on other sites More sharing options... AlexDW Posted February 21, 2021 Share Posted February 21, 2021 3 часа назад, olhaT сказал: Вопрос ик и не решился. Корзина Nan в комп'ютерной версии осиётся. В мобильной всё нормально. Может ещё что посоветуете? вопрос решился, просто вам кеш своего браузера обновить нужно Ctrl+F5 а вот с редирекими по-прежнему не очень у вас сейчас нет редиреки с https://www на просто https:// пробуйте решения отсюда Link to comment Share on other sites More sharing options... Create an account or sign in to comment You need to be a member in order to leave a comment Create an account Sign up for a new account in our community. It's easy! Register a new account Sign in Already have an account? Sign in here. Sign In Now Share More sharing options... Followers 1 Go to topic listing Similar Content Ошибка в корзине By Dozent, March 23 1 reply 154 views spectre March 23 Ошибка при заказе товара через корзину By helenbeauty, Thursday at 12:06 PM 2 replies 77 views nikoshot Thursday at 02:01 PM Ошибка корзины для "Москва" By pulchra, February 7 0 replies 190 views pulchra February 7 Брошенная корзина + вечная корзина + редактор корзин By ArtemPitov, April 22, 2018 потерянная корзина брошенная корзина (and 7 more) Tagged with: потерянная корзина брошенная корзина забыия корзина забытые товары forgotten abandoned забыия брошенная корзина 0 comments 26,740 views ArtemPitov April 22, 2018 Ошибка By tchibo, March 5, 2018 9 replies 2,297 views yurok79 Wednesday at 08:07 AM Recently Browsing 0 members No registered users viewing this page.
AlexDW Posted February 21, 2021 Share Posted February 21, 2021 3 часа назад, olhaT сказал: Вопрос ик и не решился. Корзина Nan в комп'ютерной версии осиётся. В мобильной всё нормально. Может ещё что посоветуете? вопрос решился, просто вам кеш своего браузера обновить нужно Ctrl+F5 а вот с редирекими по-прежнему не очень у вас сейчас нет редиреки с https://www на просто https:// пробуйте решения отсюда Link to comment Share on other sites More sharing options... Create an account or sign in to comment You need to be a member in order to leave a comment Create an account Sign up for a new account in our community. It's easy! Register a new account Sign in Already have an account? Sign in here. Sign In Now Share More sharing options... Followers 1
Recommended Posts