kalakrima Posted November 22, 2013 Share Posted November 22, 2013 Hello, I want to add an "Add to favorites" button, just like in product.tpl, but on each product in product-list.tpl I've searched everywhere, but I didn't find a solution. Can someone helps me about this? I would like to have 2 buttons on each product in the list : add to cart and save to favorites (not the wishlist) Thank you in advance. Link to comment Share on other sites More sharing options...
Liofey Posted January 9, 2014 Share Posted January 9, 2014 hi, i have similar problem. Looking for the answer. Link to comment Share on other sites More sharing options...
shubbing Posted February 28, 2014 Share Posted February 28, 2014 I'm looking for a solution to this too! Hope to hear from the experts soon. Thanks in advance. Here's a fix I found for Add to Wishlist button though: http://blog.belvg.com/how-to-create-a-wishlist-on-a-category-page-in-prestashop.html Link to comment Share on other sites More sharing options...
Alex Simonchik BelVG Posted March 9, 2014 Share Posted March 9, 2014 (edited) Hi there, Our team help you resolve your problem. Take a look: http://belvg.info/demo/prestashop/pricematch/index.php?id_category=4&controller=category&id_lang=1. (you must be logged in http://storage6.static.itmages.com/i/14/0309/h_1394368628_3219273_9339fa34ee.png) Follow our blog and you know how do that Regards Edited March 9, 2014 by Alexander Simonchik (see edit history) 2 Link to comment Share on other sites More sharing options...
Alex Simonchik BelVG Posted March 24, 2014 Share Posted March 24, 2014 Hi guys, Solution in our blog: http://blog.belvg.com/how-to-add-add-to-favorites-button-on-product-list-in-prestashop.html Regards 2 Link to comment Share on other sites More sharing options...
El Patron Posted March 24, 2014 Share Posted March 24, 2014 Hi guys, Solution in our blog: http://blog.belvg.com/how-to-add-add-to-favorites-button-on-product-list-in-prestashop.html Regards thanks! I am a bit confused, I was testing and I see the add to favorites...but after that I do not see where to access what I added to favorites...thanks in advance for your patience answering this. Link to comment Share on other sites More sharing options...
shubbing Posted March 24, 2014 Share Posted March 24, 2014 thanks! I am a bit confused, I was testing and I see the add to favorites...but after that I do not see where to access what I added to favorites...thanks in advance for your patience answering this. Mm, if it is the same as my site..then you should be able to find it by clicking on "My Account" usually in the first column of the footer and click :my favourite products". Must be logged in. 1 Link to comment Share on other sites More sharing options...
Alex Simonchik BelVG Posted March 24, 2014 Share Posted March 24, 2014 Hi El Patron, yes shubbing is right, you can check demo here: http://belvg.info/demo/prestashop/pricematch/index.php?id_category=4&controller=category&id_lang=1 Link to comment Share on other sites More sharing options...
El Patron Posted March 24, 2014 Share Posted March 24, 2014 thanks!... Link to comment Share on other sites More sharing options...
ajnglagla Posted April 14, 2014 Share Posted April 14, 2014 How should i mofidy this code if i want to add a "add to favorites" button in a "Home featured" (index page)? Link to comment Share on other sites More sharing options...
A_Distortion Posted May 2, 2014 Share Posted May 2, 2014 Doesn't work anymore with Ps 1.6 Link to comment Share on other sites More sharing options...
Alex Simonchik BelVG Posted May 2, 2014 Share Posted May 2, 2014 Hi, A_Distortion, there is article for version 1.5, and I doesn't test it at the 1.6. What exactly problem do you have? Link to comment Share on other sites More sharing options...
A_Distortion Posted May 2, 2014 Share Posted May 2, 2014 I followed your tutorial and this is what i got : This is only plain text clicking on it doesn't make actions. Here is the output from my web brower : <ul class="fv_block" id="fv_block_8"> <li class="pl_favoriteproducts_block_extra_add" rel="8"> Add this product to my list of favorites. </li> <li class="pl_favoriteproducts_block_extra_added" rel="8"> Remove this product from my favorite's list. </li> <li class="pl_favoriteproducts_block_extra_removed" rel="8"> Add this product to my list of favorites. </li> </ul> I checked in the header the link to the JavaScript file is inclued Link to comment Share on other sites More sharing options...
A_Distortion Posted May 5, 2014 Share Posted May 5, 2014 Now fixed for Ps 1.6, my bad. Was a problem of class and id's in CSS and Javascript. If someone need, i give my favoriteproduct module, the productlist.tpl and productlist.css favoriteproducts.tar.gz 3 Link to comment Share on other sites More sharing options...
Borax Posted May 18, 2014 Share Posted May 18, 2014 (edited) Now fixed for Ps 1.6, my bad. Was a problem of class and id's in CSS and Javascript. If someone need, i give my favoriteproduct module, the productlist.tpl and productlist.css But there is still a problem I think. On the product list page after you click twice on the add to favorites it stops working. Add » Remove » Add (stops at this point) Edited May 19, 2014 by boragursel (see edit history) Link to comment Share on other sites More sharing options...
Borax Posted May 19, 2014 Share Posted May 19, 2014 And one more question on the same topic. How can we add social share buttons (the ones on the product page) to the product-list? Link to comment Share on other sites More sharing options...
A_Distortion Posted May 19, 2014 Share Posted May 19, 2014 But there is still a problem I think. On the product list page after you click twice on the add to favorites it stops working. Add » Remove » Add (stops at this point) This is a problem with the CSS, that's for sure. I am working on it. Link to comment Share on other sites More sharing options...
A_Distortion Posted May 19, 2014 Share Posted May 19, 2014 (edited) On the file "favoriteproduct2.js, check the line 150 and remove the unnecessary dot. Change css inthe file "favoriteproduct.css" too : .ajout,.del { padding-left:0px; /* background:url(http://127.0.0.1/prestashop/modules/favoriteproducts/img/add_favorite.gif) no-repeat 0 0;*/ cursor: pointer; font-weight: bold; color: #777676; font-family: FontAwesome; font-size:1.1em; } .ajout:hover,.del:hover,.ajoute:hover,.suprime:hover { color:black; } .ajoute,.suprime { padding-left:0px; cursor: pointer; font-size:1.1em; font-family:FontAwesome; color: #777676; font-weight:bold; display: none; } .ajoute:before,.del:before { content: "\f004"; font-family: FontAwesome; color: #777676; cursor: pointer; } .suprime:before,.ajout:before { content: "\f08a"; font-family: FontAwesome; color: #777676; cursor: pointer; } .ajoute:hover:before,.del:hover:before,.ajout:hover:before,.suprime:hover:before { color: black; } Edited May 19, 2014 by A_Distortion (see edit history) 1 Link to comment Share on other sites More sharing options...
Borax Posted May 19, 2014 Share Posted May 19, 2014 I found one more bug. When we filter the products by category filter, the favorite link dissapears. Link to comment Share on other sites More sharing options...
A_Distortion Posted May 21, 2014 Share Posted May 21, 2014 This is strange. I don't have this problem on my web site. When i click on a category, i see the associated products and the favorite button for each product. Do you use Prestashop 1.6 ? Are you logged in ? Link to comment Share on other sites More sharing options...
Borax Posted June 1, 2014 Share Posted June 1, 2014 I use PS 1.6.0.6. It happens when I click the check box to filter the products. Link to comment Share on other sites More sharing options...
Borax Posted June 1, 2014 Share Posted June 1, 2014 (edited) And I have another question related with the subject and couldn't find a solution anywhere. I need to add social share buttons under the add to favorites button for every product on product list page. Has anyone tried to do and found a solution? Edited June 1, 2014 by boragursel (see edit history) Link to comment Share on other sites More sharing options...
Borax Posted June 1, 2014 Share Posted June 1, 2014 I use PS 1.6.0.6. It happens when I click the check box to filter the products. www.istanbuldabuhaftasonu.com Link to comment Share on other sites More sharing options...
Borax Posted June 9, 2014 Share Posted June 9, 2014 I want to repeat as it is important. When we filter the products by features, the favorite link disappears. I've placed a facebook share button there it disappears too. http://istanbuldabuhaftasonu.com/20-istanbul-tiyatrolar Link to comment Share on other sites More sharing options...
IgorOsnitsky Posted November 17, 2014 Share Posted November 17, 2014 First of all many thanks to Alex Simonchik, A_Distortion and other discussion makers Now fixed for Ps 1.6, my bad. Was a problem of class and id's in CSS and Javascript. If someone need, i give my favoriteproduct module, the productlist.tpl and productlist.css For Prestashop 1.6.0.9. (default-bootstrap) My idea was to get this feature (Favourite products) for the user who could mark interesting products and place them to his favourites area (like a short memory during session). 1. I tried the module prepared by of A_Distortion. It works for sure placing required button and string (Add this to my favourite products) onto product's container on the list of products 2. How to make the button and link enabled for the customers not logged in . I trace through the module and find the following inside /modules/favoriteproducts/favouriteproducts.php public function hookDisplayLeftColumnProduct($params) { include_once(dirname(__FILE__).'/FavoriteProduct.php'); $this->smarty->assign(array( 'isCustomerFavoriteProduct' => (FavoriteProduct::isCustomerFavoriteProduct($this->context->customer->id, Tools::getValue('id_product')) ? 1 : 0), 'isLogged' => (int)$this->context->customer->logged, )); return $this->display(__FILE__, 'favoriteproducts-extra.tpl'); } I feel that it is here. But I have no experience in php - how to change it. 3. After enabling changes proposed in this topic (CategoryController.php , product-list.tpl and A_Distortion version of favourite products module ) I have found that Quick search (blocksearch) did not work as ajax. It is searching just after clicking Go button. When I disabled favouriteproducts module - quicksearch works again Any idea how does this effect work? NB: If anybody knows other decisions - how to give the easy tool to the customer = to keep favourite products during browsing session - it would be great. Thank You in advance Link to comment Share on other sites More sharing options...
A_Distortion Posted November 17, 2014 Share Posted November 17, 2014 (edited) I no longer have access to PrestaShop. The code you posted stores 2 values in smarty with the array (the id of the related product, and if the user is logged or not). Smarty allow you to share values between PHP functions and the TPL files which generates the output for the display in the browser. So, if you cange this code this will not have effects. You have to look for code inside the 'favoriteproducts-extra.tpl' like "if(logged)" before the code for favorite product, but i guess this will be harder than that. If you enable the default favorite-product module, does your quicksearch works ? Hope that helps. Sorry for bad english, not my native language Edited November 17, 2014 by A_Distortion (see edit history) Link to comment Share on other sites More sharing options...
IgorOsnitsky Posted November 17, 2014 Share Posted November 17, 2014 Many thanks for Your kind answer. If you enable the default favorite-product module, does your quicksearch works ? Yes, if I enable the default favoriteproducts mmodule from Prestashop quicksearch is working Link to comment Share on other sites More sharing options...
A_Distortion Posted November 17, 2014 Share Posted November 17, 2014 (edited) Finally got my PrestaShop website working. I have no issues with the searchbox while using the module. I do not understand what is your problem exactly Still PrestaShop 1.6.0.6 Edited November 17, 2014 by A_Distortion (see edit history) Link to comment Share on other sites More sharing options...
ruisonika Posted January 8, 2018 Share Posted January 8, 2018 On 05/05/2014 at 2:59 PM, A_Distortion said: Now fixed for Ps 1.6, my bad. Was a problem of class and id's in CSS and Javascript. If someone need, i give my favoriteproduct module, the productlist.tpl and productlist.css favoriteproducts.tar.gz I have tested and try hard to implement your files but doesn't work for me and i need so bad...can someone give a light about this? Link to comment Share on other sites More sharing options...
ruisonika Posted January 8, 2018 Share Posted January 8, 2018 On 24/03/2014 at 2:25 PM, Alex Simonchik BelVG said: Hi guys, Solution in our blog: http://blog.belvg.com/how-to-add-add-to-favorites-button-on-product-list-in-prestashop.html Regards Hi Alex, is there any tutorial for this in 1.6? Many thanks... Link to comment Share on other sites More sharing options...
aleprestasuri Posted April 11, 2018 Share Posted April 11, 2018 Hi guys, I have the version 1.6.1.17 Is there any tutorial for this in 1.6? The download link are down. Can you reupload, please? Can anybody help me, please? Link to comment Share on other sites More sharing options...
selectshop.at Posted April 13, 2018 Share Posted April 13, 2018 On 11.4.2018 at 11:11 AM, aleprestasuri said: The download link are down. Can you reupload, please? Can anybody help me, please? Which download link ? This is not a module. This is a tutorial on how you can change files. The link to the site is still working for me. https://belvg.com/blog/how-to-create-a-wishlist-on-a-category-page-in-prestashop.html also the download of both files fixing the tutorial for PS 1.6. is working: favoriteproducts.tar.gz Link to comment Share on other sites More sharing options...
aleprestasuri Posted April 16, 2018 Share Posted April 16, 2018 En 13/4/2018 a las 6:57 PM, selectshop.at dijo: Which download link ? This is not a module. This is a tutorial on how you can change files. The link to the site is still working for me. https://belvg.com/blog/how-to-create-a-wishlist-on-a-category-page-in-prestashop.html also the download of both files fixing the tutorial for PS 1.6. is working: favoriteproducts.tar.gz Thanks for answering. But... How can i add a delete/remove button from the favorite list in product page? If you click in favorite button that appear a text or another icon for remove the product recently added to favorite list. Thanks again, regards. Link to comment Share on other sites More sharing options...
Sam Minerve Posted July 29, 2018 Share Posted July 29, 2018 On 24/03/2014 at 3:25 PM, Alex Simonchik BelVG said: Hi guys, Solution in our blog: http://blog.belvg.com/how-to-add-add-to-favorites-button-on-product-list-in-prestashop.html Regards Hi, Thank you for the solution. That's what I needed for my website. It works well, but on pages like "special offers", "new products" or a result page after doing a search, the add-to-favorites button doesn't display. Anybody know how to make it show on thoses pages as well? Thanks in advance. 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