[FIX] website_sale: get right variant image if list of variant

If the variants are displayed by list of attributes, the image of a
product displayed would be updated to the image of the first variant.

But this was not done when using the customizing option "List View of
Variants".

opw-645729
This commit is contained in:
Nicolas Lempereur 2015-07-23 13:19:04 +02:00
parent 4914e07718
commit 21f2e7b467
1 changed files with 5 additions and 0 deletions

View File

@ -218,6 +218,11 @@ $('.oe_website_sale').each(function () {
$parent.find(".js_check_product").attr("disabled", "disabled");
}
});
$('div.js_product', oe_website_sale).each(function () {
$('input.js_product_change', this).first().trigger('change');
});
$('ul.js_add_cart_variants', oe_website_sale).each(function () {
$('input.js_variant_change, select.js_variant_change', this).first().trigger('change');
});