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

evxos

Newbie
  
  • Posts

    5
  • Joined

  • Last visited

Recent Profile Visitors

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

evxos's Achievements

Rookie

Rookie (2/14)

  • First Post
  • Week One Done
  • One Month Later
  • One Year In
  • Conversation Starter

Recent Badges

0

Reputation

  1. Можно ли использовать стандартные модули доставки/оплаты, что присутствуют в opencart 3.x? Будет ли работать с Liqpay?
  2. Спасибо за ответ. Но у меня опенкарт 3, и необходимо добавить описание к дополнительным изображениям учитывая двуязычность. Может Вы могли бы подсказать что я мог упустить?
  3. Добрый день. Я новичок, стараюсь самостоятельно разобраться, но сейчас в тупике. Нужно добавить поле описания для дополнительных изображений товара во вкладке "изображения". Что я сделал. В admin\model\catalog\product.php строка 76 и 222 вставил (выделено): if (isset($data['product_image'])) { foreach ($data['product_image'] as $product_image) { $this->db->query("INSERT INTO " . DB_PREFIX . "product_image SET product_id = '" . (int)$product_id . "', image = '" . $this->db->escape($product_image['image']) . "', sort_order = '" . (int)$product_image['sort_order'] . "', language_id = '" . (int)$language_id . "', img_description = '" . $this->db->escape($product_image['img_description']) . "'"); } } В admin\controller\catalog\product.php строка 1079: $data['product_images'][] = array( 'image' => $image, 'thumb' => $this->model_tool_image->resize($thumb, 100, 100), 'sort_order' => $product_image['sort_order'], 'img_description' => $product_image['img_description'] ); В admin\view\template\catalog\product_form.twig вставил поля с привязкой к языку (на сайте два языка) <td class="text-right">{% for language in languages %} <div class="input-group"><span class="input-group-addon"><img src="language/{{ language.code }}/{{ language.code }}.png" title="{{ language.name }}" /></span> <textarea name="product_image[{{ image_row }}][{{ language.language_id }}][img_description]" rows="5" placeholder="{{ entry_img_description }}" class="form-control">{{ product_image[language.language_id] ? product_image[language.language_id].img_description }}</textarea> </div> {% endfor %} </td> В БД в таблице oc_product_image добавил поля img_description и language_id (id языка добавил в PRIMARY и аттрибуи "первичный" - использую OpenServer). После сохранения изменений, обновил во вкладке модификаторы. К части вывода полей на сайте не перешел, т.к. полезли ошибки при обновлении карточки товара: Проверил данный файл, в указанном месте (строка 250) ничего нет, а в местах касающихся product_image внесены соответствующие изменения описанные выше. Добрые люди, помогите решить задачу.
  4. Здравствуйте. Не могу самостоятельно решить следующий вопрос. Добавил в корзину кнопки плюс\минус для изменения количества продукта в корзине. Но как коректно подключить Ajax запросы для обновления не могу понять. <button type="button" class="minus">-</button> <input type="text" name="quantity[{{ product.cart_id }}]" value="{{ product.quantity }}" size="1" class="form-control cart-q" id="score"/> $('.minus').click(function () { var $input = $(this).parent().find('#score'); var count = parseInt($input.val()) - 1; count = count < 1 ? 1 : count; $input.val(count); $input.change(); return false; setTimeout(function () { $.ajax({ type: 'post', url: 'index.php?route=checkout/cart/edit', data: 'key=' + $input.name() + '&quantity=' + $input.val(), dataType: 'json', success: function () { $('#cart > ul').load('index.php?route=common/cart/info ul li'); } }); }, 100); Что передать в data для обновления состояния корзины? В правильном ли направлении двигаюсь?
×
×
  • 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.