Get products in comparison list

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
6 years ago
Hi,

I have some featured products on the home page. When a customer adds one of these products to their comparison list it changes the comparison list button color.

On page load i am trying to write a function to get the products that are in the comparison list so i can color the buttons accordingly based on whether its in their comparison list or not.

Has anyone had any experience with this?
6 years ago
SamSnap wrote:
Hi,

I have some featured products on the home page. When a customer adds one of these products to their comparison list it changes the comparison list button color.

On page load i am trying to write a function to get the products that are in the comparison list so i can color the buttons accordingly based on whether its in their comparison list or not.

Has anyone had any experience with this?


What are you looking forward to in response? Pls share what you have tried already?
6 years ago
SamSnap wrote:
Hi,

I have some featured products on the home page. When a customer adds one of these products to their comparison list it changes the comparison list button color.

On page load i am trying to write a function to get the products that are in the comparison list so i can color the buttons accordingly based on whether its in their comparison list or not.

Has anyone had any experience with this?


Hi,

Please have a look in our article - How to marked a product in Compare List?

With this solution, when a product added to the compare list, the system will adds "in-compare-list" CSS class to the root tag of the product details / product box view. So that, based on this class, you can style every child elements.

Hope this helped :)
6 years ago
NOTED it is code for nopCommerce 4, for 3.90 will be added later.
6 years ago
Updated code for nopCommerce 3.90
Please have a look :)
5 years ago
Hi ima9ines,

I would like to do the same thing as the comparison list but with the wishlist. how would i be able to do this?

Any help would be appreciated.

Thanks
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.