1

I have to implement product compare feature in my magento2. For this i am using

<?php $this->getAddUrl($product); ?> and I am getting the compare url of the product. But after click on add to compare link, no product showing in the compare sidebar.

Please help me to do it. Thanks

7
  • Is there any error in browser console or var log? – Khoa TruongDinh Nov 26 '16 at 13:18
  • nop..no any kind of error. only page is refresh after click on add to compare link and also i tried to echo $_helper->getItemCount() ; and getting You have no items to compare. message. – Yudi Nov 26 '16 at 13:23
  • You can give us an product compare url sample from your custom? – Khoa TruongDinh Nov 26 '16 at 13:26
  • http://localhost/magento_folder/catalog/product_compare/add/product/2379/uenc/aHR0cDovL2xvY2FsaG9zdC9tYWdlbnRvMl90d3Avd2lyZS1tZXNoLW1hdGVyaWFsL2JyYXNz/ this is the url of product which i have to compare. in this url 2379 is the product id, and aHR0cDov.....XNz is the encoded url. After click on this url, the product should add in compare sidebar. but its not adding right now. – Yudi Nov 26 '16 at 13:30
  • You use http://localhost/? – Khoa TruongDinh Nov 26 '16 at 13:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.