Adding a position order by clause.

Adding a position order by clause. This way you can manage how the featured products will display on home page. You can manage the order from the PrestaShop backend, and thus you have full control on the display in the frontend.
This commit is contained in:
Priyank Bolia
2013-11-20 20:56:35 +05:30
parent 914f613e7b
commit 0ff7163cba
+1 -1
View File
@@ -120,7 +120,7 @@ class HomeFeatured extends Module
{
$category = new Category(Context::getContext()->shop->getCategory(), (int)Context::getContext()->language->id);
$nb = (int)Configuration::get('HOME_FEATURED_NBR');
$products = $category->getProducts((int)Context::getContext()->language->id, 1, ($nb ? $nb : 8));
$products = $category->getProducts((int)Context::getContext()->language->id, 1, ($nb ? $nb : 8), "position");
$this->smarty->assign(array(
'products' => $products,