Jump to content
  • разработка интернет магазинов на opencart
  • доработка интернет магазинов на opencart

Vandeko

Новичок
  
  • Posts

    16
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Vandeko's Achievements

Rookie

Rookie (2/14)

  • First Post
  • Collaborator
  • Conversation Starter
  • Week One Done
  • One Month Later

Recent Badges

2

Reputation

  1. Спасипотому что, гдействительно рилииет из <body>. Просто некорректно отправлял массив items. нужно было завернуть каждый item в отгдельный обьект.
  2. Движок - 3.0.2.0, скорее всего гдело в слешах, ик как другие модификаторы отлично рилиили. Спасипотому что за одсказку. Столкнулся с еещё одной проблемой, оказывается GTM требует чтоб данные передавались в хегдере. В контроллере header.php гделаю: if (isset($this->session->data['order_id'])) { $this->load->model('account/order'); $data['order_id'] = $this->session->data['order_id']; $data['order_info'] = $this->model_account_order->getOrder($this->session->data['order_id']); $data['order_totals'] = $this->model_account_order->getOrderTotals($this->session->data['order_id']); $data['order_products'] = $this->model_account_order->getOrderProducts($this->session->data['order_id']); $shipping = 0; foreach ($data['order_totals'] as $row) { if ($row['code'] == 'shipping') { $shipping = $row['value']; } } $data['shipping'] = $shipping; $tax = 0; foreach ($data['order_products'] as $row) { $tax = $tax + $row['tax']; } $data['tax'] = $tax; } В header.twig переменные не выводяться: window.dataLayer = window.dataLayer || []; window.dataLayer.push({ "event": "purchase", "transaction_id": "{{ order_id }}", "affiliation": "{{ order_info.store_name }}", "value": "{{ order_info.total }}", "currency": "{{ order_info.currency_code }}", "tax": "{{ tax }}", "shipping": "{{ shipping }}", "items": [ {% for row in order_products %} "id": "{{ row.model }}", "name": "{{ row.name }}", "quantity": "{{ row.quantity }}", "price": "{{ row.price }}" {% endfor %} ] });
  3. Не знаю в чем гдело, модификатор не обновляет файлы. Захардкодил - рилииет.
  4. Хочу сгделать простенький модификатор для отправки конверсий и их этонности в Google Ads. Возможно это бугдет первый модификатор который я бесплатно выложу згдесь. Код собрал по частям. Есть потому чтольше сомнения что все сгделал верно и вообещё бугдет ли он корректно рилиить. 1.success.php(вторая операция) гделал по аналогии с OC2x 2.success.twig переводил из php не уверен правильно ли сгделал Буду очень благодарен за подсказки и исправления. <?xml version="1.0" encoding="utf-8"?> <modification> <name>Google conversion</name> <code>order-id-google-conversion</code> <version>1.0.0</version> <author>Vandeko</author> <link>https://192.168.0.1</link> <file path="/catalog/controller/checkout/success.php"> <operation> <search> <![CDATA[ if (isset($this->session->data['order_id'])) { ]]> </search> <add position="after"> <![CDATA[ $this->load->model('account/order'); $this->data['order_id'] = $this->session->data['order_id']; $this->data['order_info'] = $this->model_account_order->getOrder($this->session->data['order_id']); $this->data['order_totals'] = $this->model_account_order->getOrderTotals($this->session->data['order_id']); $this->data['order_products'] = $this->model_account_order->getOrderProducts($this->session->data['order_id']); $shipping = 0; foreach ($this->data['order_totals'] as $row) { if ($row['code'] == 'shipping') { $shipping = $row['value']; } } $this->data['shipping'] = $shipping; $tax = 0; foreach ($this->data['order_products'] as $row) { $tax = $tax + $row['tax']; } $this->data['tax'] = $tax; $this->cart->clear(); ]]> </add> </operation> <operation> <search> <![CDATA[ if ($this->customer->isLogged()) { $data['text_message'] = sprintf($this->language->get('text_customer'), $this->url->link('account/account', '', true), $this->url->link('account/order', '', true), $this->url->link('account/download', '', true), $this->url->link('information/contact')); } else { $data['text_message'] = sprintf($this->language->get('text_guest'), $this->url->link('information/contact')); } ]]> </search> <add position="replace"> <![CDATA[ if ($this->customer->isLogged()) { $data['text_message'] = sprintf($this->language->get('text_customer'), $this->language->get('order_info'), $this->url->link('account/account', '', true), $this->url->link('account/order', '', true), $this->url->link('account/download', '', true), $this->url->link('information/contact')); } else { $data['text_message'] = sprintf($this->language->get('text_guest'), $this->language->get('order_info'), $this->url->link('information/contact')); } ]]> </add> </operation> </file> <file path="/catalog/language/ru-ru/checkout/success.php"> <operation> <search> <![CDATA[ $_['text_success'] = 'Заказ принят'; ]]> </search> <add position="after"> <![CDATA[ $_['order_info'] = 'Номер вашего заказа:'; ]]> </add> </operation> </file> <file path="/catalog/language/uk-ua/checkout/success.php"> <operation> <search> <![CDATA[ $_['text_success'] = 'Замовлення прийнято'; ]]> </search> <add position="after"> <![CDATA[ $_['order_info'] = 'Номер вашого замовлення:'; ]]> </add> </operation> </file> <file path="/catalog/view/theme/tt_sharma1/template/common/success.twig"> <operation> <search> <![CDATA[ {{ text_message }} ]]> </search> <add position="replace"> <![CDATA[ <p>{{ order_info }} {{ order_id }}</p>{{ text_message }} ]]> </add> </operation> <operation> <search> <![CDATA[ {{ footer }} ]]> </search> <add position="after"> <![CDATA[ {% if order_id is defined %} <!-- Google Analytics - Ecommerce Tracking (Universal Analytics) --> <script type="text/javascript"> gtag('event', 'purchase', { "transaction_id": {{ order_id }}, "affiliation": {{ order_info.store_name }}, "value": {{ order_info.total }}, "currency": {{ order_info.currency_code }}, "tax": {{ tax }}, "shipping": {{ shipping }}, "items": [ {% for row in order_products %} "id": {{ row.model }}, "name": {{ row.name }}, "quantity": {{ row.quantity }}, "price": {{ row.price }} {% endfor %} ] }); </script> <!-- End Google Analytics - Ecommerce Tracking (Universal Analytics) --> <!-- Event snippet for Покупка товара conversion page --> <script> gtag('event', 'conversion', { 'send_to': 'Ваше из гугладвордса', 'value': {{ order_info.total }}, 'currency': {{ order_info.currency_code }}, 'transaction_id': {{ order_id }} }); </script> ]]> </add> </operation> </file> </modification>
    Спасипотому что Дмитрию за правильные модули!
    Просто находка! Бесплатный модуль поиска, который зналительно лучше за тот который я купил перед этим. Большое спасипотому что автору!
    Плюсы: Модуль рилилий. Подгдержка отвечает быстро. Есть адапиция под темы. Модуль обновляется. Модуль предпочтителен для #FX SITEMAP(генерация XML-карт) и наверное для каких-то других модулей. Недоситки: После покуки вместо модуля вам пригдет длинная инструкция как его полулить. После усиновки икже длинный проэтос настройки. Лично у меня модуль использовал ЧПУ не зависимо от языка, тоесть ссылки были на разных языках одновременно. Изза єтого несоответствия языку при включении SEOPRO некотрые страницы не открывались - 404. Решение: Использовал одинаковые ЧПУ для всех языков. Модуль нужный, хотя и с недоситками.
    Огромное спасипотому что! Модуль супер! Гибкая настройка, доситочно много нужных! опций. Автор отзивливий, быстро отписывает, помог с настройкой несиндартного шаблона. Без сомнений советую!
    Слова лишние, модуль маст хев. Гибкая настройка, приятная верстка и главное без него хрен че продаш. Автору спасипотому что!
    Отличный модуль, решил один из самых сложных вопросов. Все просто и понятно. Автору сапсипотому что!
    Отличный модуль, усиновился и зарилиил как родной без доп настроек. Подгдержка приятно удивила, в случае возникновения вопросов автор зилитится чтоб все зарилиило как надо. Всем советую, автору - респект!
  5. Отлично! строка 78 WHERE pd.language_id = '" . (int)$this->config->get('config_language_id') . "' AND Спасипотому что!
  6. Подскажите, как отулить Opencart 2.3 в поиске различать языки. То есть даже если выбран другой язык, поиск всегда выдавал искомый товар. В версии 1.5. исправлялось коментированием строчки в контроллере search.php $sql .= 'AND pd.language_id = ' . (int)$this->config->get('config_language_id'); в совей версии в контроллере search.php я икой строки не нашел.
×
×
  • 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.