How to Change colour in button

0
In add to favourite button ,how to do that it will change colour when i add the product in add to favouritr  then button colour changed  and also when i remove the product in add to favourite   it come back to it’s default colour? Pls kindly give some solution for this.
asked
1 answers
0

Hi Surya,

Use dynamic classes property of the button , which checks the the status if Favourite product is added -
For example , create FavoriteProduct entity and associate it with the selected Product when adding to favorites. Delete the associated object when removing from favorites.

create css classes - button-red, button-blue

Add this to the namic classes property of the button AddToFavourite

if $FavouriteProduct/FavouriteProduct_Product = empty then 'button-red' else 'button-green'

answered