0 Пользователей и 1 Гость просматривают эту тему.
  • 4 Ответов
  • 1071 Просмотров
*

One

  • Захожу иногда
  • 282
  • 3 / 0
Universal AJAX Live Search + VM3
« : 18.10.2016, 18:09:09 »
Здравствуйте, как заставить этот модуль искать не только по наименованию, но и по производителям?
*

gartes

  • Завсегдатай
  • 1859
  • 142 / 6
  • Е = mс²
*

One

  • Захожу иногда
  • 282
  • 3 / 0
Re: Universal AJAX Live Search + VM3
« Ответ #2 : 19.10.2016, 12:44:58 »
MySQL Запрос изменить.
А можете подсказать как именно?
*

One

  • Захожу иногда
  • 282
  • 3 / 0
Re: Universal AJAX Live Search + VM3
« Ответ #3 : 19.10.2016, 12:45:38 »
Что-то в этой части кода? Правка плагина по адресу /public_html/plugins/search/virtuemart/virtuemart.php. Могу скинуть файл целиком

Код
		switch ($phrase) {
case 'exact':
$wheres2 = array();
// product_sku should be exact match
$text = $db->quote("%$text%", TRUE);
$wheres2[] = "p.product_sku LIKE $text";
$wheres2[] = "a.product_name LIKE $text";
$wheres2[] = "b.$category_field LIKE $text";
if ($search_product_s_description)
$wheres2[] = "a.product_s_desc LIKE $text";
if ($search_product_description)
$wheres2[] = "a.product_desc LIKE $text";
if ($search_customfields)
$wheres2[] = "(cf.customfield_value LIKE $text $customfield_ids_condition)";
$where = '(' . implode (') OR (', $wheres2). ')';
break;
case 'all':
case 'any':
default:
$words = explode (' ', $text);
$wheres = array();
foreach ($words as $word) {
$wheres2 = array();
// product_sku should be exact match
          $word = $db->quote("%$word%", TRUE);
$wheres2[] = "p.product_sku LIKE $word";
$wheres2[] = "a.product_name LIKE $word";
$wheres2[] = "b.$category_field LIKE $word";
if ($search_product_s_description)
$wheres2[] = "a.product_s_desc LIKE $word";
if ($search_product_description)
$wheres2[] = "a.product_desc LIKE $word";
if ($search_customfields)
$wheres2[] = "(cf.customfield_value LIKE $word $customfield_ids_condition)";

$wheres[] = implode (' OR ', $wheres2);
}
$where = '(' . implode (($phrase == 'all' ? ') AND (' : ') OR ('), $wheres). ')';
break;
}
switch($ordering) {
case 'alpha':
$order = 'a.product_name ASC';
break;
case 'category':
$order = 'b.category_name ASC, a.product_name ASC';
break;
case 'popular':
$order = 'a.product_name ASC';
break;
case 'newest':
$order = 'p.created_on DESC';
break;
case 'oldest':
$order = 'p.created_on ASC';
break;
default:
$order = 'a.product_name ASC';
}
« Последнее редактирование: 19.10.2016, 12:50:32 от One »
*

gartes

  • Завсегдатай
  • 1859
  • 142 / 6
  • Е = mс²
Re: Universal AJAX Live Search + VM3
« Ответ #4 : 27.10.2016, 12:58:35 »
Задайте этот вопрос в этой теме.
AJAX поиск для VirtueMart 3.x (Скачать)

Подумаем над ответом.
Чтобы оставить сообщение,
Вам необходимо Войти или Зарегистрироваться
 

ajax Scroll - пагинация товаров в категории VirtueMart 3

Автор VollanddZAFT

Ответов: 1
Просмотров: 1370
Последний ответ 15.08.2018, 21:12:08
от fsv
VirtueMart + JComments + ajax

Автор limon142

Ответов: 3
Просмотров: 1183
Последний ответ 08.08.2018, 15:57:28
от limon142
GENIUS VM AJAX SEARCH регистронезавизимый поиск

Автор lustoff

Ответов: 16
Просмотров: 3436
Последний ответ 09.04.2017, 23:13:44
от ArchibaldIron
AJAX проверка логина и email

Автор stalkervp

Ответов: 3
Просмотров: 2770
Последний ответ 14.05.2016, 00:37:22
от robert
AJAX пагинация категории и кнопка в корзину

Автор stydent

Ответов: 3
Просмотров: 1557
Последний ответ 21.09.2015, 15:11:56
от stydent