ajnglagla Posted April 14, 2014 Share Posted April 14, 2014 (edited) I want to add "add to favorites" button below the each products on Home Featured. I found an article how to make that for Category page, but i need to modify it to use for Homefeatured. (http://blog.belvg.com/how-to-add-add-to-favorites-button-on-product-list-in-prestashop.html) This code must be in (controllers/front/CategoryController.php (the function assignProductList()) if (Module::isEnabled('favoriteproducts')) { include_once(_PS_ROOT_DIR_ . '/modules/favoriteproducts/FavoriteProduct.php'); foreach ($this->cat_products as &$cat_product) { $cat_product['isCustomerFavoriteProduct'] = (FavoriteProduct::isCustomerFavoriteProduct($this->context->customer->id, $cat_product['id_product']) ? 1 : 0); } } Seems i should modify and write it in controllers/front/IndexController.php to use for Homefeatured. Is there anyone made that before? Edited April 28, 2014 by ajnglagla (see edit history) 1 Link to comment Share on other sites More sharing options...
Alex Simonchik BelVG Posted April 28, 2014 Share Posted April 28, 2014 Hi again, our new article specially for you: http://blog.belvg.com/favorite-products-feature-for-products-on-the-home-page-in-prestashop.html Regards 1 Link to comment Share on other sites More sharing options...
ajnglagla Posted April 28, 2014 Author Share Posted April 28, 2014 thank you sooo much Alex )) 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