Jump to content

Can't add to cart from wishlist view page


Recommended Posts

I've found absolutely nothing by searching on this so have a horrible feeling it's caused by something I've done, but when I send a wishlist, the person viewing it sees 'add to cart' buttons but absolutely nothing happens when they click them.

Actually that's not the whole picture as products with attributes can be added to the cart in the latest Firefox and Safari, but not older versions or IE6. Products without attributes don't work in any browsers.

I'm not using the Ajax cart.

Anyone any ideas?

Link to comment
Share on other sites

  • 1 month later...

I'm not sure if this will help, but try removing the wishlist block. Not the wishlist itself so customers can still add from the product page. I have issues with 1.2.5.

When the wishlist block is available on the page through positioning the module, nothing appears in the cart, but it does exist in the cart block and the order can be placed.

Not sure if it's the same issue, but you could give it a try.

Link to comment
Share on other sites

Hi,
I removed the wishlist block from the right column block where I hade hooked it in. When I click on Add to wishlist on my product, the product is not added to the wishlist at all.... So I can't test the Add to cart for the product. I did have another product in my wishlist (from before I removed the wishlist block), but the add to cart-button is still inactive for this product.

It seems strange that no-one knows how to solve this. It has been an issue for some time now...

Thanks for trying to help though!

Link to comment
Share on other sites

It sounds like the "out of stock" disable function for the add to cart button issue.

In BO under preferences >>Products do you have "allow ordering of out-of-stock product:" checked yes?

It sounds exactly like that function being disabled. Although if you're adding products with stock then that's not it.

Any other details you can provide? What's the web address? If I get a few minutes I'll click around and see what I see.

Link to comment
Share on other sites

Yes, out of stock is disabled, but I have the same problem with products not out-of-stock.

I haven't published my shop yet, I only have it installed locally on my own computer... I can't think of anything else to help you help me :-(
Thanks for trying.

Link to comment
Share on other sites

  • 4 weeks later...
  • 1 month later...

It is definitely 'disabled' rather than the button just not functioning as, notice it is using the disabled button graphic - which indicates that the system 'knows' the button is disabled.

I am having this problem also, with items which are plenty in stock...

Link to comment
Share on other sites

This bug has been fixed in Prestashop v1.3. The problem is that the script for the "Add to wishlist" button is with the wishlist block in the right column. If you remove that block, then the script is missing and the "Add to wishlist" button doesn't work. To fix this bug, add the following to modules/blockwishlist/blockwishlist.php:

public function hookHeader($params)
{
   return '<script type="text/javascript" src="'._MODULE_DIR_.'blockwishlist/js/ajax-wishlist.js"></script>';
}



Then remove the <script> tag at the top of modules/blockwishlist/blockwishlist.tpl.

Link to comment
Share on other sites

Make a backup of your modules/blockwishlist directory, then try downloading Prestashop v1.3 RC3 and overwriting your modules/blockwishlist directory with the one in there. I don't think the wishlist module depends on any files outside of its directory, so it should work. If the bug still exists, post the problem on the bug tracker.

Link to comment
Share on other sites

  • 3 weeks later...

having the same problem, i can add items to the wishlist, but when you try to use the add to cart function in the mywishlist link in the myaccount block

the button is in the out of stock mode where the add to cart function will not work, even when there is ample stock

tried the wishlist module for rc1.3, but this does not display the wishlist page from the myaccount link

Link to comment
Share on other sites

  • 3 months later...

It seems that

{if $product.attribute_quantity AND $product.attribute_quantity >= 1}


is the problem, adding a "OR 1" to that statement makes the button work.

I'm guessing that the if statement is so that one must chose a attribute if there is one, but that the functionality is reversed...

Edit:

{if ($product.attribute_quantity AND $product.attribute_quantity >= 1) OR $product.quantity > 0}


seems like a better solution...

/Mats

Link to comment
Share on other sites

This sounds like a bug I encountered with a client. I reported the bug and it has been fixed in PrestaShop v1.3.2. The solution is to change line 44 of modules/blockwishlist/view.tpl from:

{if $product.attribute_quantity AND $product.attribute_quantity >= 1}



to:

{if isset($product.attribute_quantity) AND $product.attribute_quantity >= 1 OR !isset($product.attribute_quantity) AND $product.product_quantity >= 1}

Link to comment
Share on other sites

I still get “We’re sorry, but the Web address you entered is no longer available “, of course. Also, the wishlist sometimes lose the item when ordered and sometimes not, I haven't determined when it happens and when not but it seems like most often the last item on the list stays.
I have also been able to buy two items when only one is in stock. Sometimes a refresh seem to fix the issues, but not always.
It is also possible to add multiple copies to the wishlist and they then appaear as separate items and not eg 3xitem blahblah.
It seems this module is on the verge of being too buggy to be of any use in 1.2.4

/Mats

Link to comment
Share on other sites

Right, I commented out that part and now the link works, however clicking the wishlist gives "Fatal error: Call to undefined method Tools::file_exists_cache() in /home/virtual/mohsart.se/public_html/modules/blockwishlist/managewishlist.php on line 80" and the View link "Fatal error: Call to undefined method Tools::file_exists_cache() in /home/virtual/mohsart.se/public_html/modules/blockwishlist/view.php on line 55"

I commented out those lines as well, and now it seems to work. I'll do some more testing...

Now, I don't know if it's safe to do this, I mean I guess those lines of code were put there for a reason. So maybe there's a better workaround...

/Mats

Link to comment
Share on other sites

One step forwards, and one step back...
On the plus side:

It's no longer possible to order more items than there is in stock, the button still works though but I get a error message when I try to order.

Ordering more than one puts them as eg 3xBlahblah

On the minus side:

Sometimes the items disappear from the Wishlist when ordering, but the item doesn't get into the cart.

It is now required to first create a wishlist, with the 1.2.4 module, I could just start adding items to it without creating it. When trying to add items without creating a wishlist nothing happens, no error code or anything.

Edit: not true, some more commenting in cart.php and it works as before.

/Mats

Link to comment
Share on other sites

Great Rocky!

It is a little disturbing that I don't "stay" in the wishlist after adding a product but istead get the message "Page not available We're sorry, but the Web address you entered is no longer available", but at least it seems to work much better now.
Any ideas about this last issue?

/Mats

Link to comment
Share on other sites

  • 2 weeks later...

I'm not sure where to look, but here's what it looks like in view.tpl

{$wishlist.name}


and in sendwishlist.php

[...] '{message}' => 'http://'.htmlentities($_SERVER['HTTP_HOST'], ENT_COMPAT, 'UTF-8').__PS_BASE_URI__.'modules/blockwishlist/view.php?token='.$wishlist['token']), [...]



I haven't changed anything except for the Tools::file_exists_cache stuff, so should be the same code as you have...

/Mats

Link to comment
Share on other sites

  • 4 months later...
  • 3 months later...

Hi all!

Rocky, I was happy to read your solution because I had the same problem with Add to Cart button... But I'm on Prestashop 1.4 ! And this line of code is already modified there...

Any idea why this button is still not working in Presta 1.4 with the right line of code?

Thanks in advance!

Laurene

Presta 1.4

Link to comment
Share on other sites

  • 2 months later...

I'm having the same problem on PS1.4 - Add to Cart button not showing up on my wishlist after clicking on "view".

Apparently the .tpl that's being open is not blockwishlist/view.tpl but blockwishlist/managewishlist.tpl - which does not have any add to cart button.

 

Is this suposed to be this way? If so, how can I add the button?

 

Appreciate any help.

Cheers.

Link to comment
Share on other sites

  • 6 months later...

Help!

 

I am having the same or similar problem on my Wishlist block.

 

- No "Add to cart" button (@whishlist)

 

- Also a few bullets scattered (@wishlist) it's strange no one has commented on the bullets so far, this can be an indicator of what is causing the problem)

 

See image below. I am sure this is a bug since I already tried this on a fresh prestashop installation, with the same results. The actual screenshot is from the fresh install. (1.4.6.2)

 

Please help!

error_wishlist.JPG

Link to comment
Share on other sites

  • 1 month later...

Having the same issue guys ... mywishlist.php is not showing add to cart and the View.php under wishlist add to cart button is not working and there is a lot of bullets on the page

 

has anyone had any feedback??

Link to comment
Share on other sites

Certainly not ones that are willing to talk ... I have found a short term solution, I have added an add to cart button from scripting I created in product_list.tpl ... only to have an issue with a Token error even though a token was present in the scripting, so I switched tokens off in the admin and all works OK.

Link to comment
Share on other sites

  • 4 months later...

Same problem! I have PS 1.4.8.2. On the wishlist view page (the one friends see when you send them the link), the add to cart button is in disabled mode and the view button goes to the product but without the correct attributes selected.

 

UPDATE: Looks like in my case changing 1 to 0 for minimum quantities in view.tpl works:

 

{if isset($product.attribute_quantity) AND $product.attribute_quantity >= 0 OR !isset($product.attribute_quantity) AND $product.product_quantity >= 0}

Edited by goosedesign (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...