[IMP] website_sale: display variants choice in confirm dialog box
This commit is contained in:
parent
d8516bcfd8
commit
8fdfc68074
|
@ -126,6 +126,19 @@ $(document).ready(function () {
|
|||
$('input.js_variant_change, select.js_variant_change', this).first().trigger('change');
|
||||
});
|
||||
|
||||
$('#modal_optional_products').on('show.bs.modal', function () {
|
||||
var $confirm = $('#product_confirmation .js_attributes');
|
||||
if (!$confirm.size()) return;
|
||||
$confirm.empty();
|
||||
$('.js_add_cart_variants:first ul:first > li').each(function () {
|
||||
var $li = $(this);
|
||||
var $span = $("<div><span></span>: <span></span></div>");
|
||||
$span.children().first().text($li.children().first().text());
|
||||
$span.children().last().text($li.find("label:has(input:checked) span:first").text());
|
||||
$confirm.append($span);
|
||||
});
|
||||
});
|
||||
|
||||
$("a.js_add, a.js_remove").click(function (event) {
|
||||
event.preventDefault();
|
||||
var $parent = $(this).parents('.js_product:first');
|
||||
|
|
|
@ -543,13 +543,16 @@
|
|||
</t>
|
||||
</xpath>
|
||||
<xpath expr="//t[@t-set='option_inc'][@t-value='0']" position="before">
|
||||
<tr>
|
||||
<tr id="product_confirmation">
|
||||
<td width="100">
|
||||
<span t-field="product.image_medium" t-field-options='{"widget": "image" }'/>
|
||||
</td>
|
||||
<td>
|
||||
<strong t-field="product.name"/>
|
||||
<div class="text-muted" t-field="product.description_sale"/>
|
||||
<div class="text-muted">
|
||||
<div t-field="product.description_sale"/>
|
||||
<div class="js_attributes"></div>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<t t-if="product.lst_price != product.price">
|
||||
|
|
Loading…
Reference in New Issue