ventesites Posted August 31, 2014 Share Posted August 31, 2014 (edited) Hello I am using Prestashop 1.6.9 I have modified my indexController.php to open the site on a specific category but I would like to get featured products to show below this category.. Actually this is what I have: class IndexControllerCore extends CategoryController{ public $php_self = 'index';/** * Assign template vars related to page content * @see FrontController::initContent() */ public function init(){ $_GET['id_category']=3; parent::init(); } public function canonicalRedirection($canonicalURL = ''){}} this opens my site with the category ID=3 how do I add the block of featured products below? I tried to add various types of hooks in the IndexController but nothing works.... Thanks Pat Edited August 31, 2014 by ventesites (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted August 31, 2014 Share Posted August 31, 2014 you ahve to add {hook::exec('home')} to category.tpl file you can add it with if condition to check if viewed category is with id 3 Link to comment Share on other sites More sharing options...
ventesites Posted August 31, 2014 Author Share Posted August 31, 2014 could be a way but featured products will display every time i load this category while i just want this on the index, reason why i believe I have to add it somehow to the override of IndexController. Link to comment Share on other sites More sharing options...
ventesites Posted August 31, 2014 Author Share Posted August 31, 2014 BTW i just dowload your new module "featuredcategory" this is exactly this module i want to display on my index page below the selected category... Link to comment Share on other sites More sharing options...
vekia Posted August 31, 2014 Share Posted August 31, 2014 so add there if condition {if $page_name=="index"} {hook::exec('home')} {/if} it should appear only on homepage 1 Link to comment Share on other sites More sharing options...
ventesites Posted August 31, 2014 Author Share Posted August 31, 2014 where should I add this code? Link to comment Share on other sites More sharing options...
vekia Posted August 31, 2014 Share Posted August 31, 2014 there where you want to display modules associated with this hook in your case it's a category.tpl Link to comment Share on other sites More sharing options...
ventesites Posted August 31, 2014 Author Share Posted August 31, 2014 great ! it's perfect ! Thanksssssssss :mellow: 1 Link to comment Share on other sites More sharing options...
vekia Posted August 31, 2014 Share Posted August 31, 2014 you're welcome :-) 1 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