outlet.ee Posted March 26, 2012 Share Posted March 26, 2012 the top sellers page on my shop is acting weird. The pagination doesn't work but I'd like to eliminate the pagination and have it like 50 top selling products, ordered by number of sales so the top selling one is the first etc. Now in the classes/productsale.php there is this function: static public function getBestSales($id_lang, $pageNumber = 0, $nbProducts = 10, $orderBy=NULL, $orderWay=NULL) { if ($pageNumber < 0) $pageNumber = 0; if ($nbProducts < 1) $nbProducts = 10; if (empty($orderBy) || $orderBy == 'position') $orderBy = 'sales'; if (empty($orderWay)) $orderWay = 'DESC'; but it doesn't sort it by sales, as a matter of fact it looke like it sorts them randmomly. I can change the number of products here but how to make it to be sorted by sales desc? 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