Jump to content

Wishlist Button in Category View


Recommended Posts

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?

Thx
Gweilo

Link to comment
Share on other sites

  • 8 months later...
  • 2 months later...

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

  • 8 months later...

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

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

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

  • 7 months later...
  • 4 weeks later...

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.1

Thanx in advance

Link to comment
Share on other sites

  • 5 months later...
  • 1 month later...
  • 2 weeks later...
  • 2 months later...

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

  • 2 weeks later...
  • 3 weeks later...

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

  • 4 months later...

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 by Arkadia (see edit history)
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...