marcoberri Posted April 11, 2011 Share Posted April 11, 2011 Nell'estrazione dei Best Sales ho notato il problema del non funzionamento della paginazione e dell'rdinamento, penso che chi guarda questa sezione vorrebbe vedere l'elenco dei prodotti più venduti ordinati appunto da quelli pià venduti!! questo file è da inserire nella cartella /overide/controllers/BestSalesController.php <?php class BestSalesController extends BestSalesControllerCore { public $orderWay = "desc"; public function process() { parent::process(); $this->productSort(); $nbProducts = (int)(ProductSale::getNbSales()); $this->pagination($nbProducts); if($this->orderBy == "position") $this->orderWay = "desc"; $this->smarty->assign(array( 'products' => ProductSale::getBestSales((int)($this->cookie->id_lang), (int)($this->p) - 1, (int)($n), $this->orderBy, $this->orderWay), 'add_prod_display' => Configuration::get('PS_ATTRIBUTE_CATEGORY_DISPLAY'), 'nbProducts' => $nbProducts, 'homeSize' => Image::getSize('home') )); } } ciao! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now