kaczor18 Posted December 11, 2013 Share Posted December 11, 2013 witam jak ustawic tak aby domyslne sortowanie produktów było od najnizszej ceny? w produktach polecach równiez ? Link to comment Share on other sites More sharing options...
vekia Posted December 11, 2013 Share Posted December 11, 2013 preferences > products w ustawieniach paginacji: sortowanie według ceny, ascending (rosnąco) nastepnie w homefeatured.php $products = $category->getProducts((int)Context::getContext()->language->id, 1, ($nb ? $nb : 8)); dodajemy dwa parametry orderby i orderway, zgodnie z wytycznymi: /** * Return current category products * * @param integer $id_lang Language ID * @param integer $p Page number * @param integer $n Number of products per page * @param boolean $get_total return the number of results instead of the results themself * @param boolean $active return only active products * @param boolean $random active a random filter for returned products * @param int $random_number_products number of products to return if random is activated * @param boolean $check_access set to false to return all products (even if customer hasn't access) * @return mixed Products or number of products */ public function getProducts($id_lang, $p, $n, $order_by = null, $order_way = null, $get_total = false, $active = true, $random = false, $random_number_products = 1, $check_access = true, Context $context = null) 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