Jump to content

sortowanie produktu od najnizszej ceny


Recommended Posts

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...