samprasanna Posted February 19, 2015 Share Posted February 19, 2015 (edited) How to change the Sort by discount percentage (asc or desc) in special block module products in Home page public function hookDisplayHomeTabContent($params) { if (Configuration::get('PS_CATALOG_MODE')) return; if (!$this->isCached('blockspecials-home.tpl', $this->getCacheId('blockspecials-home'))) { $this->smarty->assign(array( 'specials' => BlockSpecials::$cache_specials, 'homeSize' => Image::getSize(ImageType::getFormatedName('home')) )); } if (BlockSpecials::$cache_specials === false) return false; return $this->display(__FILE__, 'blockspecials-home.tpl', $this->getCacheId('blockspecials-home')); } Edited February 19, 2015 by samprasanna (see edit history) Link to comment Share on other sites More sharing options...
fred-vinapresta Posted February 19, 2015 Share Posted February 19, 2015 Hi, I think you will add to override the getRandomSpecial function of the product class for that and add a Order by... clause with percentages inside 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