Tom1884 Posted March 5, 2017 Share Posted March 5, 2017 How can I select which products to view in home-featured block? I've tried to create and use "home" category, but it doesn't work. Maybe I need a tutorial!! Link to comment Share on other sites More sharing options...
rocky Posted March 6, 2017 Share Posted March 6, 2017 Adding products to the "Home" category should work. Try going to the Advanced Parameters > Performance tab and clicking the "Clear cache" button. If that doesn't work, you can go to the "Modules and Services" tab and then click the "Configure" button on the "Featured products on the homepage" module to change the category that featured products are selected from. By default, the "Category from which to pick products to be displayed" is set to 2, which should be the ID of your "Home" category unless you changed it somehow. Also, make sure you have an appropriate "Number of products to be displayed". Link to comment Share on other sites More sharing options...
Tom1884 Posted March 6, 2017 Author Share Posted March 6, 2017 Adding products to the "Home" category should work. Try going to the Advanced Parameters > Performance tab and clicking the "Clear cache" button. If that doesn't work, you can go to the "Modules and Services" tab and then click the "Configure" button on the "Featured products on the homepage" module to change the category that featured products are selected from. By default, the "Category from which to pick products to be displayed" is set to 2, which should be the ID of your "Home" category unless you changed it somehow. Also, make sure you have an appropriate "Number of products to be displayed". Having read about "Home" category, I've created one (so, probably, someone had deleted it before me), but new "Home" category doesn't make the trick. Then, on my "Featured" module config, I can only set the number of items, not the category... Link to comment Share on other sites More sharing options...
rocky Posted March 6, 2017 Share Posted March 6, 2017 What version of PrestaShop you using? You could try updating the module to see if the option becomes available. Otherwise, you'll have to manually edit the module, find the ID 2 and change it to the ID of "Home" category you created. Link to comment Share on other sites More sharing options...
Tom1884 Posted March 6, 2017 Author Share Posted March 6, 2017 find the ID 2 and change it to the ID of "Home" category you created. Searching, can't find. An hint? Please, thank you Link to comment Share on other sites More sharing options...
rocky Posted March 6, 2017 Share Posted March 6, 2017 I can't give any hint because your module is different to my one. Maybe you can post your module here? Link to comment Share on other sites More sharing options...
Tom1884 Posted March 6, 2017 Author Share Posted March 6, 2017 Ok, fixed!File: homefeatured.php Old line: $category = new Category(Context::getContext()->shop->getCategory(), (int)Context::getContext()->language->id); New line: $category = new Category(83, (int)Context::getContext()->language->id); where "83" is your new category number. 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