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

linewery

Newbie
  
  • Posts

    3
  • Joined

  • Last visited

Information

  • Gender
    Мужчина

linewery's Achievements

Newbie

Newbie (1/14)

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

Recent Badges

0

Reputation

  1. Аналогично, ищу решение, вы случайно еще не нашли решения проблемы?
  2. Добрый день, у меня аналогичная ситуация, ocstore 2.3 и стоит Brainy Filter. Редактировал catalog/model/catalog/product.php Мне нужно было сделать товар с ценой 0 в конце списка, сортировка по умолчанию - по возрастанию цены. Сделал в методе getProducts() следующее: if (isset($data['sort']) && in_array($data['sort'], $sort_data)) { if ($data['sort'] == 'pd.name' || $data['sort'] == 'p.model') { $sql .= " ORDER BY IF(p.price = '0', 1, 0), LCASE(" . $data['sort'] . ")"; } elseif ($data['sort'] == 'p.price') { $sql .= " ORDER BY IF(p.price = '0', 1, 0), (CASE WHEN special IS NOT NULL THEN special WHEN discount IS NOT NULL THEN discount ELSE p.price END)"; } else { $sql .= " ORDER BY IF(p.price = '0', 1, 0), " . $data['sort']; } } else { $sql .= " ORDER BY IF(p.price = '0', 1, 0), p.sort_order"; } работает только в том случае, если отключен Brainy Filter. Получается, что BF модифицирует getProducts() Что нужно сделать, чтобы товары с ценой 0 подвинуть в конец списка и при этом сохранить работу фильтра?
×
×
  • 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.