From 67530c7b1d6712737d109596048f15739a45f4e1 Mon Sep 17 00:00:00 2001 From: Goffin Simon Date: Wed, 22 Apr 2015 13:20:29 +0200 Subject: [PATCH] [FIX] website_sale: checkout problem When the user is not logged, there is no branding for the options. This is why, the product_id of the option must be written in the template "optional product". opw:633093 --- addons/website_sale/static/src/js/website_sale.js | 4 ++-- addons/website_sale_options/views/templates.xml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/addons/website_sale/static/src/js/website_sale.js b/addons/website_sale/static/src/js/website_sale.js index fb6b76c83a8..b9b351b9266 100644 --- a/addons/website_sale/static/src/js/website_sale.js +++ b/addons/website_sale/static/src/js/website_sale.js @@ -51,7 +51,7 @@ $('.oe_website_sale').each(function () { var product_id = parseInt($input.data('product-id'),10); var product_ids = [product_id]; $dom_optional.each(function(){ - product_ids.push($(this).find('span[data-oe-model="product.product"]').data('oe-id')); + product_ids.push($(this).find('span[data-product-id]').data('product-id')); }); if (isNaN(value)) value = 0; openerp.jsonRpc("/shop/get_unit_price", 'call', { @@ -63,7 +63,7 @@ $('.oe_website_sale').each(function () { $dom.find('.text-danger').toggle(res[product_id] default_price/100)); //optional case $dom_optional.each(function(){ - var id = $(this).find('span[data-oe-model="product.product"]').data('oe-id'); + var id = $(this).find('span[data-product-id]').data('product-id'); var price = parseFloat($(this).find(".text-danger > span.oe_currency_value").text()); $(this).find("span.oe_currency_value").last().text(res[id].toFixed(2)); $(this).find('.text-danger').toggle(res[id]price/100)); diff --git a/addons/website_sale_options/views/templates.xml b/addons/website_sale_options/views/templates.xml index 4692d15a691..7875687a411 100644 --- a/addons/website_sale_options/views/templates.xml +++ b/addons/website_sale_options/views/templates.xml @@ -19,7 +19,7 @@ - +