From 21f2e7b467c221864f83ebe90e5d3fb7caff68b3 Mon Sep 17 00:00:00 2001 From: Nicolas Lempereur Date: Thu, 23 Jul 2015 13:19:04 +0200 Subject: [PATCH] [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 --- addons/website_sale/static/src/js/website_sale.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/addons/website_sale/static/src/js/website_sale.js b/addons/website_sale/static/src/js/website_sale.js index aa8add0dc4c..219956fc024 100644 --- a/addons/website_sale/static/src/js/website_sale.js +++ b/addons/website_sale/static/src/js/website_sale.js @@ -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'); });