gweilo Posted January 7, 2009 Share Posted January 7, 2009 Hello everybody!I just tried the wishlist feature and it actually looks quite good. My question is, why the "add to wishlist" button is only shown in the detailed view of a product and not also on the category view. There I only get "add to cart" and "view". How can I get the "add to wishlist" button also on this place?ThxGweilo Link to comment Share on other sites More sharing options...
brandonc503 Posted October 5, 2009 Share Posted October 5, 2009 Im trying to do this too. Link to comment Share on other sites More sharing options...
21846657 Posted December 15, 2009 Share Posted December 15, 2009 I have managed to put "add to wishlist" button on product listing page, to replace with "view" button. But it unfortunately does not work. Does anyone manage to have it done?Thanks. Link to comment Share on other sites More sharing options...
rocky Posted December 15, 2009 Share Posted December 15, 2009 I have done this on the website I'm currently working on. I just added the following code to product-list.tpl before the View button: <a href="[removed];" class="button" onclick="[removed]WishlistCart('wishlist_block_list', 'add', '{$product.id_product|intval}', '', '1'); alert('This product has been added to your wishlist.');">{l s='Add to wishlist' mod='blockwishlist'} Replace [removed] with the text javascript followed by a colon.I had trouble getting the wishlist module from v1.2.5 to work, so I downloaded the one from SVN and everything is working fine for me now. Link to comment Share on other sites More sharing options...
21846657 Posted December 15, 2009 Share Posted December 15, 2009 Thanks a bunch Rocky - SUCH A HELPFUL & PASSIONATE MAN! I will try your code later.[update] Works like a charm! Link to comment Share on other sites More sharing options...
joope Posted August 27, 2010 Share Posted August 27, 2010 I did place the "wishlist" in the category view and that works great! Thanks. But when it takes me over to save it to my list, it doesn't save the link or any information about the product. Where its says [removed] am I suppose to put some information there? I put in "[removed]" in those areas and it did nothing, but when I put the website link in those areas it worked. Just didn't bring the information over to save it to my list. Help please! Link to comment Share on other sites More sharing options...
rocky Posted August 27, 2010 Share Posted August 27, 2010 As my instructions say above, you should replace [removed] with the text javascript followed by a colon. Link to comment Share on other sites More sharing options...
joope Posted August 27, 2010 Share Posted August 27, 2010 is it both or which one? As I state i did place that javascript word in it's place and the button did nothing. I couldn't click on it or nothing. But when I put the url in it, it worked nicely. Thanks Link to comment Share on other sites More sharing options...
rocky Posted August 27, 2010 Share Posted August 27, 2010 It's been a long time since I wrote that code, but I think the first [removed] should be javascript and the second [removed] should be javascript followed by : Link to comment Share on other sites More sharing options...
joope Posted August 27, 2010 Share Posted August 27, 2010 Ok looks like the first part of this is working. But it's now taking me to a blank page. Do you have a more updated code or something I can use? Link to comment Share on other sites More sharing options...
rocky Posted August 27, 2010 Share Posted August 27, 2010 It worked for me using PrestaShop v1.2.5. I haven't tested it in PrestaShop v1.3.1 though. I've attached a file with the code so you can be sure you copied the code right. wishlist.txt Link to comment Share on other sites More sharing options...
joope Posted August 27, 2010 Share Posted August 27, 2010 Hmmm....I copied and pasted the code from the txt you sent me. It's still taking me to a blank page, it's not retrieving the information that I need to use this wishlist stuff. I'm lost with thing, when one side works and the other one doesn't. Link to comment Share on other sites More sharing options...
rocky Posted August 27, 2010 Share Posted August 27, 2010 Try editing config/config.inc.php and temporarily changing 'display_errors' from 'off' to 'on'. You should get an error message instead of a blank page. Link to comment Share on other sites More sharing options...
joope Posted August 27, 2010 Share Posted August 27, 2010 This is what I'm getting:Fatal error: Smarty error: [in /********/*****/themes/pres2c/404.tpl line 7]: syntax error: invalid attribute name: 'sorry,' (Smarty_Compiler.class.php, line 1550) in /**********/---/tools/smarty/Smarty.class.php on line 1095 Link to comment Share on other sites More sharing options...
rocky Posted August 27, 2010 Share Posted August 27, 2010 Strange. That seems unrelated to this wishlist change. What's on line 7 of themes/pres2c/404.tpl? Link to comment Share on other sites More sharing options...
joope Posted August 27, 2010 Share Posted August 27, 2010 {l s='Oops I'm sorry, we see you went off track. Allow us to help you Link to comment Share on other sites More sharing options...
rocky Posted August 27, 2010 Share Posted August 27, 2010 It should be the following: {l s='Oops I\'m sorry, we see you went off track. Allow us to help you Link to comment Share on other sites More sharing options...
pedro fonseca Posted April 11, 2011 Share Posted April 11, 2011 and changes in product.tpl?put alert('This product has been added to your wishlist.'); where? Link to comment Share on other sites More sharing options...
rocky Posted April 11, 2011 Share Posted April 11, 2011 Before the return false; in modules/blockwishlist/blockwishlist-extra.tpl Link to comment Share on other sites More sharing options...
pedro fonseca Posted April 12, 2011 Share Posted April 12, 2011 cool. thanks big Rocky Link to comment Share on other sites More sharing options...
lucas frost Posted May 6, 2011 Share Posted May 6, 2011 Hi,I added the code of rocky in my product-list :Just before :View button. The problem is that the item is add to the wishlist but some info are missing like the "Détails produit"the title link that go product page. So When I add a item in the wishlist from product.php and then form product-list We see the item two time separated in the wishlist, The items should be combine.And If i live : href="javascript;" the site redirected to a javascript; page. If i put href="#" i get the some result.I am using prestashop 1.4.1Thanx in advance Link to comment Share on other sites More sharing options...
missbahwolf Posted October 17, 2011 Share Posted October 17, 2011 Hi , I have a problem here, I added the button in product-list.php and when I click onadd to my list on my way to the 404 error page and when I return to my list ofproducts I find product added how to solve the problem? Link to comment Share on other sites More sharing options...
rajshekharg11 Posted November 22, 2011 Share Posted November 22, 2011 Hi, I am trying to add 'add to my wishlist' button in product list. As per above post, i have add themline in product-list.tpl. But i didn;t see any change in product list. Can some one help me? Link to comment Share on other sites More sharing options...
Berlindoor Posted December 6, 2011 Share Posted December 6, 2011 Ok, it works but what about ajax? I wanted to add exactly the same effect on the product page. I've tried to paste the code contained in the blockwish-extra.tpl but it doesn't work thanks for any hints! Link to comment Share on other sites More sharing options...
BarNet Posted February 23, 2012 Share Posted February 23, 2012 I am having a problem with the add to wishlist button on the product list page http://67.23.226.149/~naturalf/category.php?id_category=2 can soemone see where I have gone wrong, Popup works but then it goes to a page can't be found page, it is trying to look for the following page: http://67.23.226.149/~naturalf/javascript; which is incorrect. Any help would be greatly appreciated. Link to comment Share on other sites More sharing options...
NithyaStephen Posted March 6, 2012 Share Posted March 6, 2012 i have a problem with javascript..while clicking the add to wish list button, the first product image of the category only moving to wishlist,,but the exact product what we clicked is added in wishlist..someone is there to help me pls? Link to comment Share on other sites More sharing options...
PrestashopTrackglobe Posted March 22, 2012 Share Posted March 22, 2012 Excuse me, but I've been trying to add this code: <a id = "deseolist" href = "#" class = "button" onclick = "WishlistCart ('wishlist_block_list', 'add', '{$ product.id_product | intval}', $ ('# idCombination'). val (),document.getElementById ('quantity_wanted'). value) return false; "> {ls = 'Add to wishlist' mod = 'blockwishlist'} </ a> </ div> But it does not work, ie does nothing. I have to add something else in some way or I'm doing something else? By the way, you know that should be modified to allow unregistered users to store theirproducts? Thank you very much. A greeting. Link to comment Share on other sites More sharing options...
Arkadia Posted July 25, 2012 Share Posted July 25, 2012 (edited) I have done this on the website I'm currently working on. I just added the following code to product-list.tpl before the View button: <a href="[removed];" class="button" onclick="[removed]WishlistCart('wishlist_block_list', 'add', '{$product.id_product|intval}', '', '1'); alert('This product has been added to your wishlist.');">{l s='Add to wishlist' mod='blockwishlist'} Replace [removed] with the text javascript followed by a colon. I had trouble getting the wishlist module from v1.2.5 to work, so I downloaded the one from SVN and everything is working fine for me now. Hi this works great thanks! I was able to use this code in product-list.tpl and my wishlist button works just fine if you're logged in already. But if you're NOT logged in already then it doesn't save the product in the wishlist. You have to log in first, then you have to go back and add the product you wanted to put into your wishlist... Is there any way to add the product to the wishlist and then login and the product will then be added to the wishlist? The way that Amazon.com does it. I used this code to add an alert that they should login first: <a href="javascript;" class="button ajax_add_to_cart_button wishlistcat" onclick="{if $logged}javascript:WishlistCart('wishlist_block_list', 'add', '{$product.id_product|intval}', '', '1'); alert('This product has been added to your wishlist.');{else}alert('Please Login First');{/if} ">{l s='Add to wishlist' mod='blockwishlist'}</a> But then they would login and the browser does not remember the item that was supposed to be added to the wishlist which means that the user will have to go and find the product again to add it to the wishlist. I understand this may be something I'd have to write a function for in the module itself...if you have any advice/guidance, I'd appreciate it! Thanks!! Edited July 25, 2012 by Arkadia (see edit history) 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