Posted by: hurray November 12, 2015
OS Commerce Coding Help.
Login in to Rate this Post:     0       ?        
Hi guys,
I need a small help. I have a website that uses prestashop open source e-commerce.
There is a module block for products that are on sale and I would like this module block to display products sorted by price in low-high order.
Here is a part of the code at present that needs to be modified to achieve the result. Any help from fellow nepalese brother or sister would be greatly appreciated.

public function hookRightColumn($params)
{
$nbr=Configuration::get('BLOCKSPECIALS_NBR');

$products = Product::getPricesDrop($this->context->language->id, 0, $nbr, false);

$this->smarty->assign(array(
'products' => $products,
'add_prod_display' => Configuration::get('PS_ATTRIBUTE_CATEGORY_DISPLAY'),
'homeSize' => Image::getSize(ImageType::getFormatedName('home')),
));

return $this->display(__FILE__, 'blockmultiplespecials.tpl');
}

Read Full Discussion Thread for this article