Перейти к содержанию

deadiwe

Фрилансер
  • Постов

    14
  • Зарегистрирован

  • Посещение

Информация о deadiwe

Посетители профиля

Блок последних пользователей отключён и не показывается другим пользователям.

Достижения deadiwe

  1. «Удалить» (иконка ведра) Сделал так. и далее дополнительно в storage удалил все в папках cache и modification в system так же очистил папку cache не помогло Вот вся процедура. Но уже в приципе не важно сборку сменил, все отлично работает.
  2. <file path="admin/controller/catalog/product.php"> <operation> <search><![CDATA[ $filter_model = null; ]]></search> Обновил модификаторы, очистил кеш.. тишина Ошибок или нотисов нет... Очистил кеш браузера На чистом опенкарте все ок...
  3. Приветствую, установил дополнение на клубную сборку. Выдает в логах и соответственно не добавляяет колонку ID 2023-11-10 4:45:49 - PHP Notice: Undefined variable: filter_image in storage/modification/admin/controller/catalog/product.php on line 504 2023-11-10 4:45:49 - PHP Notice: Undefined variable: filter_id in storage/modification/admin/controller/catalog/product.php on line 505 2023-11-10 4:45:49 - PHP Notice: Undefined variable: filter_image in storage/modification/admin/controller/catalog/product.php on line 693 2023-11-10 4:45:49 - PHP Notice: Undefined variable: filter_id in storage/modification/admin/controller/catalog/product.php on line 694 // строка 499 - 519 $filter_data = array( 'filter_name' => $filter_name, 'filter_model' => $filter_model, // FilterImageId 'filter_image' => $filter_image, 'filter_id' => $filter_id, // FilterImageId end 'filter_manufacturer'=> $filter_manufacturer, 'filter_category' => $filter_category, 'filter_price_min'=> $filter_price_min, 'filter_price_max'=> $filter_price_max, 'filter_quantity_min'=> $filter_quantity_min, 'filter_quantity_max'=> $filter_quantity_max, 'filter_status' => $filter_status, 'sort' => $sort, 'order' => $order, 'start' => ($page - 1) * $this->config->get('config_limit_admin'), 'limit' => $this->config->get('config_limit_admin') ); //строка 653 - 713 $data['results'] = sprintf($this->language->get('text_pagination'), ($product_total) ? (($page - 1) * $this->config->get('config_limit_admin')) + 1 : 0, ((($page - 1) * $this->config->get('config_limit_admin')) > ($product_total - $this->config->get('config_limit_admin'))) ? $product_total : ((($page - 1) * $this->config->get('config_limit_admin')) + $this->config->get('config_limit_admin')), $product_total, ceil($product_total / $this->config->get('config_limit_admin'))); $this->load->model('catalog/manufacturer'); $this->load->model('catalog/category'); if (isset($filter_manufacturer)) { if ($filter_manufacturer == 0) { $data['filter_manufacturer_name'] = $this->language->get('text_no_manufacturer'); } else { $manufacturer_info = $this->model_catalog_manufacturer->getManufacturer($filter_manufacturer); if ($manufacturer_info) { $data['filter_manufacturer_name'] = $manufacturer_info['name']; } else { $data['filter_manufacturer_name'] = ''; $filter_manufacturer = null; } } } if (isset($filter_category)) { if ($filter_category == 0) { $data['filter_category_name'] = $this->language->get('text_no_category'); } else { $category_info = $this->model_catalog_category->getCategory($filter_category); if ($category_info) { $data['filter_category_name'] = $category_info['name']; } else { $data['filter_category_name'] = ''; $filter_category = null; } } } $data['filter_name'] = $filter_name; $data['filter_model'] = $filter_model; // FilterImageId $data['filter_image'] = $filter_image; $data['filter_id'] = $filter_id; // FilterImageId end $data['filter_manufacturer'] = $filter_manufacturer; $data['filter_category'] = $filter_category; $data['filter_price_min'] = $filter_price_min; $data['filter_price_max'] = $filter_price_max; $data['filter_quantity_min'] = $filter_quantity_min; $data['filter_quantity_max'] = $filter_quantity_max; $data['filter_status'] = $filter_status; $data['sort'] = $sort; $data['order'] = $order; $data['header'] = $this->load->controller('common/header'); $data['column_left'] = $this->load->controller('common/column_left'); $data['footer'] = $this->load->controller('common/footer'); $this->response->setOutput($this->load->view('catalog/product_list', $data)); }
  4. Казахская локализация админки и фронта. Добавил deadiwe Добавлено 09.11.2023 Категория Локализация, Языковые пакеты Просмотр файла  
  5. Версия 1.0.0

    25 раз скачали

    Информация о файле Файлы казахской локализации для Opencart 3. Предупреждаю, что неоторые слова могли быть переведены не правильно. Распаковать содержимое архива папки upload на сервер в корень сайта либо через установщик В настройках - установить следующие значения для языка: Language Name: Қазақ Code: kk-kz Locale: kk-kz Status: Enabled Sort Order: 1
    Бесплатный
  6. Передает мой скрипт верное значение, почему-то в попап корзине перетирается
  7. {% if quantity > 0 %} <div class="product__buy"> <label class="control-label" for="input-quantity">{{ entry_qty }}</label> <div class="quantity-box"> <input type="text" name="quantity" value="{{ minimum }}" size="2" id="input-quantity" class="" /> <input type="button" id="minus" value="-" class="" /> <input type="button" id="plus" value="&#43;" class=""/> </div> <input type="hidden" name="product_id" value="{{ product_id }}" /> <button type="button" id="button-cart" class="product__buy-btn btn btn-primary">{{ button_cart }}</button> <span class="product__reward-text">{{ product.status }}</span> </div> {% else %} <div class="product__not-in-stock">{{ text_not_in_stock }}</div> {% endif %} {{ product_info }} Ввод кол-ва и + - <script> //Кнопка добавления товара $('#button-cart').on('click', function() { $.ajax({ url: 'index.php?route=checkout/cart/add', type: 'post', data: $('#product input[type=\'text\'], #product input[type=\'hidden\'], #product input[type=\'radio\']:checked, #product input[type=\'checkbox\']:checked, #product select, #product textarea'), dataType: 'json', beforeSend: function() { $('#button-cart').button('loading'); }, complete: function() { $('#button-cart').button('reset'); }, success: function(json) { $('.alert-dismissible, .text-danger').remove(); $('.form-group').removeClass('has-error'); if (json['error']) { if (json['error']['option']) { 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.parent().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>'); } // Highlight any found errors $('.text-danger').parent().addClass('has-error'); } if (json['success']) { $('#product-product').before('<div class="alert alert-success alert-dismissible alert-firestore" role="alert">' + json['success'] + ' <button type="button" class="btn-close button-reset" data-bs-dismiss="alert" aria-label="Close"><i class="las la-times"></i></button></div>'); setTimeout(() => $('.alert-firestore').remove(), 3000); // Need to set timeout otherwise it wont update the total cart.updateCart(json); $('html, body').animate({ scrollTop: 0 }, 300); $('#cart .cart-modal__list').load('index.php?route=common/cart/info ul li'); } }, error: function(xhr, ajaxOptions, thrownError) { alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText); } }); }); $(document).ready(function() { var minimum = {{ minimum }}; $("#product-product #input-quantity").change(function(){ if ($(this).val() < minimum) { alert("Minimum Quantity: "+minimum); $("#product-product #input-quantity").val(minimum); } }); // Увеличиваем кол-во продукта function minus(minimum){ var currentval = parseInt($("#product-product #input-quantity").val()); $("#product-product #input-quantity").val(currentval-1); if($("#product-product #input-quantity").val() <= 0 || $("#product-product #input-quantity").val() < minimum){ alert("Minimum Quantity: "+minimum); $("#product-product #input-quantity").val(minimum); } }; // Уменьшаю кол-во продукта function plus(){ var currentval = parseInt($("#product-product #input-quantity").val()); $("#product-product #input-quantity").val(currentval+1); }; $('#product-product #minus').click(function(){ minus(minimum); }); $('#product-product #plus').click(function(){ plus(); }); }); При добавлении товара в корзину. почему-то вносится +1 товар, а не выбранное количество.
  8. Решение template/checkout/cart.twig <span>{{ product.name }}{% if not product.stock %} <span class="text-danger">*** </span>{{ product.quantity_in_store }} {{ cart_out_stock_msg}}{% endif %}</span> controller/checkout/cart.php $data['products'][] = array( 'cart_id' => $product['cart_id'], 'thumb' => $image, 'name' => $product['name'], 'model' => $product['model'], 'option' => $option_data, 'recurring' => $recurring, 'quantity' => $product['quantity'], 'stock' => $product['stock'] ? true : !(!$this->config->get('config_stock_checkout') || $this->config->get('config_stock_warning')), 'quantity_in_store' => $product['quantity_in_store'], 'reward' => ($product['reward'] ? sprintf($this->language->get('text_points'), $product['reward']) : ''), 'price' => $price, 'total' => $total, 'href' => $this->url->link('product/product', 'product_id=' . $product['product_id']) ); } system/library/cart/cart.php $product_data[] = array( 'cart_id' => $cart['cart_id'], 'product_id' => $product_query->row['product_id'], 'name' => $product_query->row['name'], 'model' => $product_query->row['model'], 'shipping' => $product_query->row['shipping'], 'image' => $product_query->row['image'], 'option' => $option_data, 'download' => $download_data, 'quantity' => $cart['quantity'], 'minimum' => $product_query->row['minimum'], 'subtract' => $product_query->row['subtract'], 'stock' => $stock, 'quantity_in_store' => $product_query->row['quantity'], 'price' => ($price + $option_price), 'total' => ($price + $option_price) * $cart['quantity'], 'reward' => $reward * $cart['quantity'], 'points' => ($product_query->row['points'] ? ($product_query->row['points'] + $option_points) * $cart['quantity'] : 0), 'tax_class_id' => $product_query->row['tax_class_id'], 'weight' => ($product_query->row['weight'] + $option_weight) * $cart['quantity'], 'weight_class_id' => $product_query->row['weight_class_id'], 'length' => $product_query->row['length'], 'width' => $product_query->row['width'], 'height' => $product_query->row['height'], 'length_class_id' => $product_query->row['length_class_id'], 'recurring' => $recurring ); Готово
  9. Здравствуйте. Есть задачка, вывести количество товара в корзине если человек внес в нее большее количество. template/checkout/cart.twig <span>{{ product.name }}{% if not product.stock %} <span class="text-danger">*** </span> {{ product.stock }} {{ quantity }}} {% endif %}</span> catalog/controller/checkout/cart.php $data['products'][] = array( 'cart_id' => $product['cart_id'], 'thumb' => $image, 'name' => $product['name'], 'model' => $product['model'], 'option' => $option_data, 'recurring' => $recurring, 'quantity' => $product['quantity'], 'stock' => $product['stock'] ? true : !(!$this->config->get('config_stock_checkout') || $this->config->get('config_stock_warning')), 'reward' => ($product['reward'] ? sprintf($this->language->get('text_points'), $product['reward']) : ''), 'price' => $price, 'total' => $total, 'href' => $this->url->link('product/product', 'product_id=' . $product['product_id']) ); } system/library/cart/cart.php $product_data[] = array( 'cart_id' => $cart['cart_id'], 'product_id' => $product_query->row['product_id'], 'name' => $product_query->row['name'], 'model' => $product_query->row['model'], 'shipping' => $product_query->row['shipping'], 'image' => $product_query->row['image'], 'option' => $option_data, 'download' => $download_data, 'quantity' => $cart['quantity'], 'minimum' => $product_query->row['minimum'], 'subtract' => $product_query->row['subtract'], 'stock' => $stock, 'price' => ($price + $option_price), 'total' => ($price + $option_price) * $cart['quantity'], 'reward' => $reward * $cart['quantity'], 'points' => ($product_query->row['points'] ? ($product_query->row['points'] + $option_points) * $cart['quantity'] : 0), 'tax_class_id' => $product_query->row['tax_class_id'], 'weight' => ($product_query->row['weight'] + $option_weight) * $cart['quantity'], 'weight_class_id' => $product_query->row['weight_class_id'], 'length' => $product_query->row['length'], 'width' => $product_query->row['width'], 'height' => $product_query->row['height'], 'length_class_id' => $product_query->row['length_class_id'], 'recurring' => $recurring ); } else { $this->remove($cart['cart_id']); } } return $product_data; Если вписываю в твиг <span>{{ product.name }}{% if not product.stock %} <span class="text-danger">*** </span>{{ product.quantity }}{% endif %}</span> То выводит колиство внесеных товаров
  10. Здравствуйте. Прошу помочь с определением изображения для опенграф. Изображение подгружается в твиге так <img class="vitimg" src="{{ image }}" />, как это же изображение определить сюда <meta property="og:image" content={ image } key="ogimage" /> Во вложении твиг и контролер статьи блога article.zip
×
×
  • Создать...