diff --git a/addons/website_sale/data/demo.xml b/addons/website_sale/data/demo.xml index 9beb8052a4c..d4fda5243ca 100644 --- a/addons/website_sale/data/demo.xml +++ b/addons/website_sale/data/demo.xml @@ -174,7 +174,7 @@ Capacity: 16GB Connectivity: Wifi Beautiful 7.9-inch display -Over 375,000 apps3 +Over 375,000 apps Ultrafast wireless iOS7 diff --git a/addons/website_sale/static/src/js/website_sale.js b/addons/website_sale/static/src/js/website_sale.js index 565e82b458b..033b8c3885e 100644 --- a/addons/website_sale/static/src/js/website_sale.js +++ b/addons/website_sale/static/src/js/website_sale.js @@ -73,13 +73,13 @@ $('.oe_website_sale').each(function () { 'line_id': line_id}) .then(function (res) { //basic case - $dom.find('span.oe_currency_value').last().text(res[product_id].toFixed(2)); + $dom.find('span.oe_currency_value').last().text(price_to_str(res[product_id])); $dom.find('.text-danger').toggle(res[product_id] default_price/100)); //optional case $dom_optional.each(function(){ 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("span.oe_currency_value").last().text(price_to_str(res[id])); $(this).find('.text-danger').toggle(res[id]price/100)); }); openerp.jsonRpc("/shop/cart/update_json", 'call', { @@ -145,10 +145,47 @@ $('.oe_website_sale').each(function () { $('.css_attribute_color:has(input:checked)').addClass("active"); }); + // Copy from core.js that is not available in front end. + function intersperse(str, indices, separator) { + separator = separator || ''; + var result = [], last = str.length; + + for(var i=0; i - +