[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
This commit is contained in:
parent
68621de7df
commit
67530c7b1d
|
@ -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 && (default_price-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 && (price-res[id]>price/100));
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
</xpath>
|
||||
<xpath expr="//table[@id='cart_products']/tbody//td[last()]" position="inside">
|
||||
<t t-if="line.linked_line_id">
|
||||
<span class="js_quantity text-muted" t-att-data-line-id="line.id" t-esc="int(line.product_uom_qty)"/>
|
||||
<span class="js_quantity text-muted" t-att-data-line-id="line.id" t-att-data-product-id="line.product_id.id" t-esc="int(line.product_uom_qty)"/>
|
||||
</t>
|
||||
</xpath>
|
||||
</template>
|
||||
|
|
Loading…
Reference in New Issue