Как убрать лишние модели со страницы "производители" ocStore (openCart)

23.04.2015 19:41:23
  • Файле /public_html/catalog/model/catalog/product.php
    В функции getProducts изменил:

     
    $sql = "SELECT product_id FROM " . DB_PREFIX . "product_to_category WHERE category_id IN (66, 73)";
    

    на

     
    $sql = "SELECT product_id FROM " . DB_PREFIX . "product_to_category WHERE category_id IN (66, 73, 76)";
    

  • Файл /public_html/catalog/model/module/filterpro.php
    В функциях getProducts и getTotalProducts заменил:

     
    if($data['manufacturer']) {
      $sql .= " AND p.manufacturer_id IN(" . implode(", ", $data['manufacturer']) . ")";
     }
    

    на

     
    if($data['manufacturer']) {
      $sql .= " AND p.manufacturer_id IN(" . implode(", ", $data['manufacturer']) . ")";
      $sql2 = "SELECT product_id FROM " . DB_PREFIX . "product_to_category WHERE category_id IN (66, 73, 76)";
      $dpr2 = $this->db->query($sql2);
      array($idpr2);
      foreach($dpr2->rows as $it){
        $idpr2[] = $it['product_id'];
      }
      $sql .= " AND p.product_id NOT IN (".implode(',', $idpr2).")";
    }
    
    


Категории: openCart
Яндекс.Метрика