Jump to content

Comparison not working 1.6.0.11


Recommended Posts

update: Fix found check post here above

update2: Re-written this post since more people have problem with this, so now they will see much faster what my problem was and how to solve this.
 

Issue: Clicking the Add to Compare button does not add the product to compare list.
When?: This happens even with a clean install of prestashop 1.6.0.11 (without any changes made)

 

picture of the issue:

kBiTwQv.png
 

Edited by Crezzur (see edit history)
  • Like 2
Link to comment
Share on other sites

I have the same problem !!

on my web server i receive the following error when I click on the "compare" button

 

[Wed Jan 28 07:12:32 2015] [error] [client 192.168.239.1] script '/var/www/html/index.phpindex.php' not found or unable to stat, referer: http://192.168.239.143/index.php?id_category=21&controller=category

I think that the error is /var/www/html/index.phpindex.php 

Edited by morpheus74 (see edit history)
Link to comment
Share on other sites

funstad, it is not finding your homepage, for reasons I'm not clear on, during the select product to compare process.. 

 

And when I tried clicking on the logo to get to the homepage, http://dev.fietsendezwaluw.be/index, it also returned a 404.

 

Try it for yourself using the browser's developer's console and you'll see the error when trying to compare.

Link to comment
Share on other sites

Error solved but why is no-one else having this problem?

in themes/default-bootstrap/js/products-comparison.js

Change (used in 1.6.0.11): (WARNING: U have to replace it 2 times in products-comparison.js)

url: baseUri + 'index.php?controller=products-comparison&ajax=1&action=' + action + '&id_product=' + productId,

To (used in 1.6.0.9): (WARNING: U have to replace it 2 times in products-comparison.js)

url: 'index.php?controller=products-comparison&ajax=1&action='+action+'&id_product=' + productId,

You can download the file if you want.

Download: products-comparison.zip

(ps: I quoted out the wrong lines you might need them in the future)

Edited by Crezzur (see edit history)
  • Like 1
Link to comment
Share on other sites

  • 2 weeks later...

Hi Crezzur,

 

I can't thank you enough, you have made my day!

 

I tried to search the solution for this problem for weeks but nothing works.

 

Only when I found this topic, it solve everything, thank you!

 

But I did notice that after I have add products to comparison, I cannot remove the product from the comparison page.

 

I need to click on the "- Add to Compare" in order to remove the product from the comparison page.

 

Do you experience this as well?

Link to comment
Share on other sites

Hi Crezzur,

 

I can't thank you enough, you have made my day!

 

I tried to search the solution for this problem for weeks but nothing works.

 

Only when I found this topic, it solve everything, thank you!

 

But I did notice that after I have add products to comparison, I cannot remove the product from the comparison page.

 

I need to click on the "- Add to Compare" in order to remove the product from the comparison page.

 

Do you experience this as well?

 

hey bruce_ooi,

 

I have a fully working comparison right now.

so applying this changes should do the trick for anyone who has prestashop 1.6.0.11

however did you maybe made some changes during your search to solve this ?

if so you might want to undo these changes.

 

I have just looked up which file is responsible for removing the files from comparison

this file is the same where i made the changes (products-comparison.js) you might try to change the full source code.

with the one i provided in my post.

 

If you have still this problem post your link then i will have a look ;-)

Link to comment
Share on other sites

  • 7 months later...
  • 3 months later...

PS 1.6.1.2

 

line 47 change

url: baseUri + '?controller=products-comparison&ajax=1&action=' + action + '&id_product=' + productId,

to

'index.php?controller=products-comparison&ajax=1&action=' + action + '&id_product=' + productId,

 

AND

 

line 91 change

url: baseUri + '?controller=products-comparison&ajax=1&action=remove&id_product=' + idProduct,

to

'index.php?controller=products-comparison&ajax=1&action=remove&id_product=' + idProduct,

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