コード例 #1
0
 public function preProcess()
 {
     $this->productSort();
     $nbProducts = 0;
     $this->n = (int) Configuration::get('PS_PRODUCTS_PER_PAGE');
     $this->p = abs((int) Tools::getValue('p', 1));
     try {
         $products = SolrSearch::getSaleProducts($nbProducts, $this->p, $this->n);
         $this->pagination($nbProducts);
         self::$smarty->assign('nbProducts', (int) $nbProducts);
     } catch (Exception $e) {
         self::$smarty->assign('fetch_error', 1);
     }
     $this->pageProducts = $products;
 }