kumarji Posted August 5, 2013 Share Posted August 5, 2013 Hello i want to Insert Special Products block on the place of New products. I want on homepage to only show all the products that are on discount . If anyone can help me, i will be thankful. Thanks, NISCHAL Link to comment Share on other sites More sharing options...
vekia Posted August 5, 2013 Share Posted August 5, 2013 you can use specials block module to display specials product, you don't have to modify the new products block module Link to comment Share on other sites More sharing options...
kumarji Posted August 6, 2013 Author Share Posted August 6, 2013 i have tried to insert special block module on the place of new products on home page.but it shows error that cant insert the module on this position. Link to comment Share on other sites More sharing options...
vekia Posted August 6, 2013 Share Posted August 6, 2013 hello i will check the sources of the specials block module, but i must know something, one additional information: where you've got "new products" block? ? Link to comment Share on other sites More sharing options...
kumarji Posted August 6, 2013 Author Share Posted August 6, 2013 actually the name of the block is 'Featured Products'. modules---positions--Homepage Content Link to comment Share on other sites More sharing options...
kumarji Posted August 6, 2013 Author Share Posted August 6, 2013 hi have you find any solutions??? Link to comment Share on other sites More sharing options...
vekia Posted August 6, 2013 Share Posted August 6, 2013 blockspecials.php change public function install() { return (parent::install() AND $this->registerHook('rightColumn') AND $this->registerHook('header')); } to: public function install() { return (parent::install() AND $this->registerHook('rightColumn') AND $this->registerHook('home') AND $this->registerHook('header')); } then add function: public function hookHome($params) { if (Configuration::get('PS_CATALOG_MODE')) return ; if (!($special = Product::getRandomSpecial((int)$params['cookie']->id_lang)) && !Configuration::get('PS_BLOCK_SPECIALS_DISPLAY')) return; $this->smarty->assign(array( 'special' => $special, 'priceWithoutReduction_tax_excl' => Tools::ps_round($special['price_without_reduction'], 2), 'mediumSize' => Image::getSize(ImageType::getFormatedName('medium')), )); return $this->display(__FILE__, 'blockspecials.tpl'); } Link to comment Share on other sites More sharing options...
kumarji Posted August 6, 2013 Author Share Posted August 6, 2013 thanks it works, but not fully, it only shows one product that is on promotion on Home page and it shows a link at a bottom of that product to see all the products on promotion. I need to show all or you can say unlimited number number of products on home page. Link to comment Share on other sites More sharing options...
kumarji Posted August 6, 2013 Author Share Posted August 6, 2013 means all the products that are on promotion on home page. Link to comment Share on other sites More sharing options...
vekia Posted August 6, 2013 Share Posted August 6, 2013 in this case you have to modify the .tpl file of this addon, just remove the unwanted link + use different way to display products. There is no other way to achieve what you want, you can do it only with modification that i suggested 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