gigig987 Posted May 17, 2014 Share Posted May 17, 2014 (edited) Hi, I have some issues with the products in home page.I followed this tutorial to set the category as my landing page:http://mypresta.eu/en/art/developer/category-page-as-landing-page-of-your-prestashop.htmlFirst try, everything works fine, i can associate my products with the home page in my BO and i see them correctly in the front end. Then i try to migrate the website from localhost to my domain,( exporting and importing the database with phpmyadmin) and the home page turns empty.I did the same process on a new version of PS in local (so again with the database cloned with phpmyadmin) and nothing the list in home page is empty.Do you guys have any ideas of the cause? Edited May 17, 2014 by gigig987 (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted May 17, 2014 Share Posted May 17, 2014 hello you don't even see products in home category when you browse home category page? Link to comment Share on other sites More sharing options...
gigig987 Posted May 17, 2014 Author Share Posted May 17, 2014 nope.going here will show me no products and just the subcategories. index.php?id_category=2&controller=categoryIn the back end i have set 3 products in home page and I can see them. One of them it's a brand new product created within the BO but still nothing. Link to comment Share on other sites More sharing options...
vekia Posted May 17, 2014 Share Posted May 17, 2014 so it's not related to modification that you applied. other category pages with products associated with these categories appear? Link to comment Share on other sites More sharing options...
gigig987 Posted May 17, 2014 Author Share Posted May 17, 2014 (edited) yes everything but home-page.Also i deleted the overrides and went back to the default theme but nothing.. oh i have PS 1.5.6.2 Edited May 17, 2014 by gigig987 (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted May 17, 2014 Share Posted May 17, 2014 do you use featured products module? can you check if it displays products ? Link to comment Share on other sites More sharing options...
gigig987 Posted May 17, 2014 Author Share Posted May 17, 2014 I activated it and it list the products Link to comment Share on other sites More sharing options...
vekia Posted May 17, 2014 Share Posted May 17, 2014 so, product are properly associated with home category the problem is somewhere in the controller can you show code of your modification ? Link to comment Share on other sites More sharing options...
gigig987 Posted May 18, 2014 Author Share Posted May 18, 2014 IndexController.php class IndexControllerCore extends CategoryController { public $php_self = 'index'; /** * Assign template vars related to page content * @see FrontController::initContent() */ public function init(){ $_GET['id_category']=2; parent::init(); } public function initContent() { parent::initContent(); } } CategoryController.php <?php class CategoryController extends CategoryControllerCore { public function initContent() { parent::initContent(); if ($this->category->id==2){ $this->setTemplate(_PS_THEME_DIR_.'category-home.tpl'); // template file for caregory id: 2 HOMEPAGE } else { $this->setTemplate(_PS_THEME_DIR_.'category.tpl'); // DEFAULT template } } } However the problem exist even if i delete these modification. Also now I changed the products in homefeatured and it's not rendering anymore. Link to comment Share on other sites More sharing options...
vekia Posted May 18, 2014 Share Posted May 18, 2014 okay and if you open category with id_category==2 you see "no products" or you're redirected somewhere? 1 Link to comment Share on other sites More sharing options...
gigig987 Posted May 18, 2014 Author Share Posted May 18, 2014 I see no products. even with the default template "category.tpl" Link to comment Share on other sites More sharing options...
gigig987 Posted May 19, 2014 Author Share Posted May 19, 2014 I have these errors: Undefined index: nb_products in /Applications/XAMPP/xamppfiles/htdocs/p156/cache/smarty/compile/32/09/bd/3209bd738280c4a1e40573f5faece0dcf2132188.file.category-count.tpl.php on line 28 Trying to get property of non-object in /Applications/XAMPP/xamppfiles/htdocs/p156/cache/smarty/compile/32/09/bd/3209bd738280c4a1e40573f5faece0dcf2132188.file.category-count.tpl.php on line 28 Non ci sono prodotti. Link to comment Share on other sites More sharing options...
gigig987 Posted June 1, 2014 Author Share Posted June 1, 2014 no news? it's like i can't get the products with the override Link to comment Share on other sites More sharing options...
Guest Posted November 13, 2015 Share Posted November 13, 2015 (edited) I know it's an old topic, but maybe will help somebody: - new CategoryController (/controllers/front/CategoryController.php has a line 114: if (!in_array($this->category->id, array(Configuration::get('PS_HOME_CATEGORY'), Configuration::get('PS_ROOT_CATEGORY')))) Change it to: if ($this->category->id != 1) That should fix problem (especially for PS 1.5.6.3). For PS 1.6 there is another solution: http://forge.prestashop.com/browse/PSCSX-1360 What happens is that in old Prestashop e.g. 1.4 you've had categories selected as root category, but after update in 1.5 you get Root category as id_category 1 and there used to be home category earlier instead of root. So, changing categories by hand in database might have fixed future issues, but that's only my opinion... Edited November 13, 2015 by Guest (see edit history) Link to comment Share on other sites More sharing options...
Thegame7777 Posted December 1, 2015 Share Posted December 1, 2015 i cannot see my products on frontpage and No featured products at this time. Look website: https://www.motherhealthpharmacy.com/23-xanax-brand-alplax-gador please help me to fix this issue thanks Link to comment Share on other sites More sharing options...
Recommended Posts