Page 1 of 1

Changing the product Image in the cart based on the options

Posted: Tue Nov 04, 2014 6:58 am
by kotnivineela
There are two issues.

1. How to have one of the product options selected by default.
2. How to display the image of the selected product option in the cart,now only primary image is getting displayed even though I select a product with some other color.

Thanks,

Vineela

Re: Changing the product Image in the cart based on the options

Posted: Wed Nov 05, 2014 8:03 pm
by phillipuniverse
1. How to have one of the product options selected by default.


This is highly dependent on how you have it implemented. You can customize the form POST to send whatever attributes you want. You can load the page with a value pre-set as a form input and then change it as the user changes the selected product option values.

2. How to display the image of the selected product option in the cart,now only primary image is getting displayed even though I select a product with some other color.


A Media object has a property called 'tags'. You can fill this property with the values from ProductOptionValues that it corresponds to and then write some javascript to update the selected Media based on the values selected and the tags from the media.