
lordmicro
Members-
Posts
8 -
Joined
-
Last visited
Profile Information
-
Activity
Agency
Recent Profile Visitors
1,927,728 profile views
lordmicro's Achievements
Newbie (1/14)
0
Reputation
-
Проблема решаема, тут подробней.
-
Hello! I'm use advanced stock management. Version of PrestaShop 1.5.6.1, but the problem was in 1.5.4.1. Found a problem that when you add or remove items from your order does not occur synchronization stock. Problem not solved, but isolated. My diff for controllers/admin/AdminOrdersController.php: [spam-filter] -1743,6 +1743,14 [spam-filter] // Get the last product $product = end($products); + + // synchronizes quantities if needed.. + if (Configuration::get('PS_ADVANCED_STOCK_MANAGEMENT')) + { + StockAvailable::synchronize($order_detail->product_id, (int)$order_detail->id_shop); + $product['current_stock'] = StockAvailable::getQuantityAvailableByProduct($order_detail->product_id, $order_detail->product_attribute_id, (int)$order_detail->id_shop); + } + $resume = OrderSlip::getProductSlipResume((int)$product['id_order_detail']); $product['quantity_refundable'] = $product['product_quantity'] - $resume['product_quantity']; $product['amount_refundable'] = $product['total_price_tax_incl'] - $resume['amount_tax_incl']; [spam-filter] -2062,6 +2070,12 [spam-filter] // Reinject quantity in stock $this->reinjectQuantity($order_detail, $order_detail->product_quantity); + // synchronizes quantities if needed.. + if (Configuration::get('PS_ADVANCED_STOCK_MANAGEMENT')) + { + $product_id = (int)$order_detail->product_id; + } + // Delete OrderDetail $res &= $order_detail->delete(); [spam-filter] -2075,6 +2089,13 [spam-filter] $order->weight = sprintf("%.3f ".Configuration::get('PS_WEIGHT_UNIT'), $order_carrier->weight); } + // synchronizes quantities if needed.. + if (Configuration::get('PS_ADVANCED_STOCK_MANAGEMENT')) + { + if (StockAvailable::dependsOnStock($product_id)) + StockAvailable::synchronize($product_id, (int)$order->id_shop); + } + if (!$res) die(Tools::jsonEncode(array( 'result' => $res, Essence of changes: update the stock after adding a product to the order and, after removal of goods from the order. P.S. Sorry for my English. Use translator Google. Для русских тема тут.
-
Здравствуйте. Использую систему расширенного управления запасами. Версия PrestaShop 1.5.6.1, но проблема была и в 1.5.4.1. Нашёл проблему, что при добавлении и удалении товаров из заказа не происходит синхронизация остатков. Проблему не решил, но изолировал. Мой diff для controllers/admin/AdminOrdersController.php: [spam-filter] -1743,6 +1743,14 [spam-filter] // Get the last product $product = end($products); + + // synchronizes quantities if needed.. + if (Configuration::get('PS_ADVANCED_STOCK_MANAGEMENT')) + { + StockAvailable::synchronize($order_detail->product_id, (int)$order_detail->id_shop); + $product['current_stock'] = StockAvailable::getQuantityAvailableByProduct($order_detail->product_id, $order_detail->product_attribute_id, (int)$order_detail->id_shop); + } + $resume = OrderSlip::getProductSlipResume((int)$product['id_order_detail']); $product['quantity_refundable'] = $product['product_quantity'] - $resume['product_quantity']; $product['amount_refundable'] = $product['total_price_tax_incl'] - $resume['amount_tax_incl']; [spam-filter] -2062,6 +2070,12 [spam-filter] // Reinject quantity in stock $this->reinjectQuantity($order_detail, $order_detail->product_quantity); + // synchronizes quantities if needed.. + if (Configuration::get('PS_ADVANCED_STOCK_MANAGEMENT')) + { + $product_id = (int)$order_detail->product_id; + } + // Delete OrderDetail $res &= $order_detail->delete(); [spam-filter] -2075,6 +2089,13 [spam-filter] $order->weight = sprintf("%.3f ".Configuration::get('PS_WEIGHT_UNIT'), $order_carrier->weight); } + // synchronizes quantities if needed.. + if (Configuration::get('PS_ADVANCED_STOCK_MANAGEMENT')) + { + if (StockAvailable::dependsOnStock($product_id)) + StockAvailable::synchronize($product_id, (int)$order->id_shop); + } + if (!$res) die(Tools::jsonEncode(array( 'result' => $res, Суть изменений: обновляю остатки после добавления товара к заказу и после удаления товара из заказа. For English users topic here.
-
Hello! I upgraded from version 1.4.5.1 to the latest 1.5.6.1 Search stopped working and Russian language became transliterated. When requesting a "втулка" to write something like: Nothing found for your search "vtulka". Problem was solved by updating controllers/front/SearchController.php to the latest version ofGitHub. Removed only line $this->addColorsToProductList(...); My diff: [spam-filter] -88,16 [spam-filter],22 [spam-filter] $this->productSort(); $this->n = abs((int)(Tools::getValue('n', Configuration::get('PS_PRODUCTS_PER_PAGE')))); $this->p = abs((int)(Tools::getValue('p', 1))); + $original_query = Tools::safeOutput($query); $query = Tools::replaceAccentedChars(urldecode($query)); $search = Search::find($this->context->language->id, $query, $this->p, $this->n, $this->orderBy, $this->orderWay); + foreach ($search['result'] as &$product) + $product['link'] .= (strpos($product['link'], '?') === false ? '?' : '&').'search_query='.urlencode($query).'&results='.(int)$search['total']; Hook::exec('actionSearch', array('expr' => $query, 'total' => $search['total'])); $nbProducts = $search['total']; $this->pagination($nbProducts); $this->context->smarty->assign(array( 'products' => $search['result'], // DEPRECATED (since to 1.4), not use this: conflict with block_cart module 'search_products' => $search['result'], 'nbProducts' => $search['total'], - 'search_query' => $query, + 'search_query' => $original_query, 'homeSize' => Image::getSize(ImageType::getFormatedName('home')))); } else if (($tag = urldecode(Tools::getValue('tag'))) && !is_array($tag)) The problem was solved with the conclusion. But the search is not earned. Did reindexing the search base. Search earned, but bad. I use the localizer prestalab.ru. I use there Lingua_Stem_Ru. Before the update worked perfectly. After the upgrade of the goods by screening requests are. Search list of aliases that is configured in the admin is not working out. Started looking. Found commit: [] BO : improved unicode characters replacement in URLs (Russian and Ukrainian characters added). I rolled this commit changes and it is my happiness. Now the search is working perfectly again. What is the meaning of this commit? P.S. Sorry for my English. Use translator Google. Для русских тема тут.
-
Здравствуйте. Обновился с версии 1.4.5.1 до последней 1.5.6.1 Перестал работать поиск и начал транслитироваться русский. При запросе "втулка" писалось что-то вроде: Ничего не найдено по Вашему запросу "vtulka". Проблему решил обновлением controllers/front/SearchController.php до последней версии из GitHub. Убрал лишь строчки $this->addColorsToProductList(...); Мой diff: [spam-filter] -88,16 [spam-filter],22 [spam-filter] $this->productSort(); $this->n = abs((int)(Tools::getValue('n', Configuration::get('PS_PRODUCTS_PER_PAGE')))); $this->p = abs((int)(Tools::getValue('p', 1))); + $original_query = Tools::safeOutput($query); $query = Tools::replaceAccentedChars(urldecode($query)); $search = Search::find($this->context->language->id, $query, $this->p, $this->n, $this->orderBy, $this->orderWay); + foreach ($search['result'] as &$product) + $product['link'] .= (strpos($product['link'], '?') === false ? '?' : '&').'search_query='.urlencode($query).'&results='.(int)$search['total']; Hook::exec('actionSearch', array('expr' => $query, 'total' => $search['total'])); $nbProducts = $search['total']; $this->pagination($nbProducts); $this->context->smarty->assign(array( 'products' => $search['result'], // DEPRECATED (since to 1.4), not use this: conflict with block_cart module 'search_products' => $search['result'], 'nbProducts' => $search['total'], - 'search_query' => $query, + 'search_query' => $original_query, 'homeSize' => Image::getSize(ImageType::getFormatedName('home')))); } else if (($tag = urldecode(Tools::getValue('tag'))) && !is_array($tag)) Проблема с выводом транслита решилась. Но поиск не заработал. Сделал переиндексацию базы поиска. Поиск кое-как заработал. У меня стоит порезанный локализатор. Я использую оттуда Lingua_Stem_Ru. До обновления работал отлично. После обновления часть товаров по проверочным запросам не находились. Список псевдонимов, который настраивается в админке, не отрабатывал. Начал копать. Докопался до коммита: [] BO : improved unicode characters replacement in URLs (Russian and Ukrainian characters added). Я откатил изменения этого коммита и пришло моё счастье. Поиск работает снова прекрасно. Может мне кто-нибудь объяснить смысл этого коммита? For English users topic here.
-
Используем теги товара на полную мощность
lordmicro replied to gluck's topic in Модули, Шаблоны [ARCHIVE]
Поиск-то ищет, но в 1.5.3 точно реализован функционал, который ты привёл выше под номером 2... примерно по такому формату: /search?tag=тэг и он ищет только по тегу. -
Используем теги товара на полную мощность
lordmicro replied to gluck's topic in Модули, Шаблоны [ARCHIVE]
Для 1.5 то что связано с поиском по тегам не нужно, стандартный поиск точно по тегам ищет, если требуешь от него поиск по тегам. -
Используйте Выгрузка в Яндекс Маркет (Lite) от PrestaLab.ru Там есть выгрузка комбинаций. Они в ID товара добавляют ID комбинации. Но с комбинациями есть бага... URL для комбинаций, что он генерирует - не соответствует действительности.