Jump to content

Prestashop 1.6.X featured products sorting not working


yard

Recommended Posts

Hello,

I have PrestaShop v.1.6.1.16 installed on https://autoair.sk/ 

I have trouble sort featured products alphabetically on frontpage. 

I was try this https://www.prestashop.com/forums/topic/262441-solved-featured-products-change-the-order/ but no result

I was manage positions in backed:

2018-03-11_17-31-08.thumb.png.27c61d01ae0cbbe7f8bb39abeb0d0a51.png

then flushing cache

But on frontpage no result - for example item Antitabak still sit on end of page:

2018-03-11_17-33-08.thumb.png.b683464e7e8a086d85c160ba8eec8e53.png

2018-03-11_17-33-33.thumb.png.6da16427c677b38a97f2c98f8d9d7f5a.png

then I was try modify homefeatured.php in modules:

image.thumb.png.445469bf19fe67c6b8aecddd6ef1e9e9.png

	public function _cacheProducts()
	{
		if (!isset(HomeFeatured::$cache_products))
		{
			$category = new Category((int)Configuration::get('HOME_FEATURED_CAT'), (int)Context::getContext()->language->id);
			$nb = (int)Configuration::get('HOME_FEATURED_NBR');
			if (Configuration::get('HOME_FEATURED_RANDOMIZE'))
				HomeFeatured::$cache_products = $category->getProducts((int)Context::getContext()->language->id, 1, ($nb ? $nb : 8), null, null, false, true, true, ($nb ? $nb : 8));
			else
				HomeFeatured::$cache_products = $category->getProducts((int)Context::getContext()->language->id, 1, ($nb ? $nb : 8), 'position','DESC');
		}

and flushing cache.

Then products order changed, but no alphabetically:

2018-03-11_18-27-27.thumb.png.20b702bcf5b0201db7145768b67be75d.png

 

 

 

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...