protected function getCategoryProductSelect($productIds, $storeId) { $select = $this->getConnection()->select()->from(['cpi' => $this->getTable('catalog_category_product_index')])->where('cpi.store_id = ?', $storeId)->where('cpi.product_id IN(?)', $productIds); return $select; }