I've been following this discussion: How to apply an image style based on a condition (a date for ex.)? but unfortunately it has not been a success.
I would like to have the image to change based on a boolean field type being checked or not. When I check the On Sale checkbox, I would like the product image to be displayed with a different image-style.
My boolean field is named field_commerce_saleprice_on_sale. 1st image style is product_grid. 2nd image style on_sale. In node--product.tpl.php I found the line
Thanks in advance for your help.