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

natural

Users
  
  • Posts

    423
  • Joined

  • Last visited

Everything posted by natural

    Дуже дякую за гарне рішення під Google Merchant Center!
  1. Благодарю! Не разбирался почему не работает. Времени нет. Знаю чтоб preg_replace костыль но, в моем скрипте он лучше чем лезть в саму CMS.
  2. Решено! Решение банальное. Регулярное выражение preg_replace echo preg_replace ('/\s+/', 'UTC:', '<timestamp>'.$row['date_added'].'+03:00'.'</timestamp>'); В скрипте на выходе <timestamp>2022-10-11UTC:14:59:43+03:00</timestamp>
  3. Насчет timezone 'c' знаю. Но вот как через контроллер его вывести не знаю. Пробовал Вашу строчку использовать без результатов. Вот сообственно контроллер: (admin/controller/catalog/review.php) foreach ($results as $result) { $data['reviews'][] = array( 'review_id' => $result['review_id'], 'name' => $result['name'], 'author' => $result['author'], 'rating' => $result['rating'], 'status' => ($result['status']) ? $this->language->get('text_enabled') : $this->language->get('text_disabled'), 'date_added' => date($this->language->get('date_format_short'), strtotime($result['date_added'])), 'edit' => $this->url->link('catalog/review/edit', 'user_token=' . $this->session->data['user_token'] . '&review_id=' . $result['review_id'] . $url, true) ); } Вот что еще пробую но не уверен что это верно... // Locale $_['code'] = 'uk'; $_['direction'] = 'LTR'; // $_['date_format_short'] = 'd.m.Y'; $_['date_format_short'] = 'c.d.m.Y'; $_['date_format_long'] = 'l d F Y'; $_['time_format'] = 'H:i:s'; $_['datetime_format'] = 'd.m.Y H:i:s'; $_['decimal_point'] = ','; $_['thousand_point'] = ' '; В админке зону вижу но из oc_review (MySQL) все по старому... Вижу только 2022-10-08 07:26:03
  4. Всем привет! Opencart 3x Нужна помощь вывести временную зону к дате публикации отзыва в таблице oc_review. Выводит формат даты отзыва следующий: 2022-10-13 19:54:17 Пример который нужно сделать 2014-04-21T07:07:07Z
  5. Решено! Шаблон MoneyMaker2 Сама функция function addQuickOrder() { $.ajax({ url: 'index.php?route=common/footer/addquickorder', type: 'post', data: $('#orderModal input[type=\'text\'], #orderModal input[type=\'checkbox\']:checked, #orderModal input[type=\'tel\'], #orderModal input[type=\'email\'], #orderModal input[type=\'hidden\'], #product input[type=\'number\'], #product input[type=\'text\'], #product input[type=\'hidden\'], #product input[type=\'radio\']:checked, #product input[type=\'checkbox\']:checked, #product select, #product textarea, #orderModal [name=\'g-recaptcha-response\']'), dataType: 'json', success: function(json) { $('.alert, .text-danger').remove(); $('.form-group').removeClass('has-error'); if (json['error']) { if (json['error']['option']) { $('.options .collapse').show(); if ($('.options > div').hasClass("collapse")) { $('.options > div:first-child').hide(); } for (i in json['error']['option']) { var element = $('#input-option' + i.replace('_', '-')); if (element.parent().hasClass('input-group')) { element.parent().after('<div class="text-danger">' + json['error']['option'][i] + '</div>'); } else { element.after('<div class="text-danger">' + json['error']['option'][i] + '</div>'); } } } if (json['error']['recurring']) { $('select[name=\'recurring_id\']').after('<div class="text-danger">' + json['error']['recurring'] + '</div>'); } if (json['error']['validation']) { $("#orderModal .panel").removeClass('panel-info'); $("#orderModal .panel").addClass('panel-danger'); $("#orderModal .panel small").html(json['error']['validation']); $('#orderModal .btn-primary').removeAttr('disabled'); } $('.text-danger').parent().addClass('has-error'); } if (json['success']) { $("#orderModal .panel").removeClass('panel-danger'); $("#orderModal .panel").removeClass('panel-info'); $("#orderModal .panel").addClass('panel-success'); $("#orderModal .panel small").html(json['success']); $('#orderModal .btn-primary').addClass('btn-success'); $('#orderModal .btn-primary').html('<i class="fa fa-check"></i> <?php echo $button_quickorder_success_message; ?>'); <!-- Редирект после отправки формы --> if (json['success']) { window.location.href = 'index.php?route=checkout/success'; } <!-- Редирект после отправки формы --> <?php if ($moneymaker2_modules_quickorder_goal_google) { ?> ga('send', 'event', 'button', 'click', 'quickorder'); <?php } ?> <?php if ($moneymaker2_modules_quickorder_goal_google_gtag) { ?> gtag('event', 'click', {'event_category': 'button', 'event_label': 'quickorder'}); <?php } ?> <?php if ($moneymaker2_modules_quickorder_goal_yandex&&$moneymaker2_modules_quickorder_goal_yandex_counter) { ?> ym(<?php echo $moneymaker2_modules_quickorder_goal_yandex_counter; ?>, 'reachGoal', 'quickorder'); <?php } ?> var moneymaker2_total_count = json['moneymaker2_total_count']; var moneymaker2_total_sum = json['moneymaker2_total_sum']; $('#cart > .dropdown-toggle #cart-total').html(moneymaker2_total_sum); $('#cart > .dropdown-toggle .fa-stack .fa-stack-1x, .navbar-cart-toggle .fa-stack .fa-stack-1x').html(moneymaker2_total_count); $('#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); } }); }; Добавляем <!-- Редирект после отправки формы --> if (json['success']) { window.location.href = 'index.php?route=checkout/success'; } <!-- Редирект после отправки формы -->
  6. нету в том то и дело) Весит сообщение "Ваша заявка принята" и все. Форма не закрывается.
  7. Всем привет! Версія Opencart 2.3.0.2.4 Подскажите как по id сделать редирект через js ? Есть всплывающая форма и нужно подхватить её id после успешной отправки. Пробуем следующее из footer.tpl делать но тишина. <script type="text/javascript"> $(document).getElementById('#quickredirect').onload = function() { window.location.href = 'index.php?route=checkout/success'; } } </script>
  8. Всем привет! Перехожу на новый Google Analytics 4. Нашел так же старый модуль. Данные он вроде как передает. Но не пойму почему в новой аналитике не регистрируется цена покупки и другие параметры. Тыкните может я чет упустил. Тег через GTM срабатывает сам ивент purchaces регистрируется. Вот скриншоты всей возни
  9. Пробовал в таблице поставить атрибут к category_id AUTO_INCREMENT ничего не выходит ругается..
  10. Спасибо! Не сработало... (( Очистил oc_category_path потом сделал запрос который посоветовали => зашел создал одну категорию и вот фатал опять Fatal error: Uncaught Exception: Error: Duplicate entry '0-0' for key 'PRIMARY'<br />Error No: 1062<br />INSERT INTO oc_category_to_store SET category_id = '0', store_id = '0' in C:\xampp\htdocs\testsite\system\library\db\mysqli.php:40 Stack trace: #0 C:\xampp\htdocs\testsite\system\library\db.php(45): DB\MySQLi->query('INSERT INTO oc_...') #1 C:\xampp\htdocs\testsite\storage\modification\admin\model\catalog\category.php(110): DB->query('INSERT INTO oc_...') #2 C:\xampp\htdocs\testsite\storage\modification\system\engine\loader.php(251): ModelCatalogCategory->addCategory(Array) #3 C:\xampp\htdocs\testsite\system\engine\proxy.php(47): Loader->{closure}(Array, Array) #4 C:\xampp\htdocs\testsite\storage\modification\admin\controller\catalog\category.php(23): Proxy->__call('addCategory', Array) #5 C:\xampp\htdocs\testsite\storage\modification\system\engine\action.php(79): ControllerCatalogCategory->add() #6 C:\xampp\htdocs\testsite\admin\controller\startup\router.php(26): Action->execute(Object(Registry), Array) #7 C:\xampp\ht in C:\xampp\htdocs\testsite\system\library\db\mysqli.php on line 40 Возвращаюсь обратно и тоже самое подвязка категории саму на себя
  11. Удалил category_path из таблицы. Нажал исправить и получил Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 20480 bytes) in C:\xampp\htdocs\mysite.com\system\library\db\mysqli.php on line 24 После вернулся обратно и несколько категорий все же создало но, потом зашел в одну из них и просто сохранил. И вот теперь оно дублирует не только ту которую сохранил но и другие
  12. Всем привет! Работаю на Xammp PHP 7.1 Opencart 3.0.2.0 Проблема: При сохранении категории добавляется привязка на категорию... Получается на саму себя. Где копать данный косяк ?
  13. Не подскажите как это лабуду прикрутить к Opencart ? Переустанавливать CMS уже не могу. Много работы сделано..((
×
×
  • 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.