master
parent
fb13d307da
commit
bd7807f30e
|
@ -240,7 +240,31 @@
|
||||||
<td class="align-middle text-end">${formatter.format(item.data_fields.preis)}</td>
|
<td class="align-middle text-end">${formatter.format(item.data_fields.preis)}</td>
|
||||||
</tr>`;
|
</tr>`;
|
||||||
$('#list-products-in-bag').append(elementProduct);
|
$('#list-products-in-bag').append(elementProduct);
|
||||||
if(typeof updateProducts === "function") $('#list-products').append(elementProduct);
|
if(typeof updateProducts === "function") {
|
||||||
|
elementProduct = `
|
||||||
|
<tr>
|
||||||
|
<td class="text-start">
|
||||||
|
<img class="rounded img-fluid" src="https://picsum.photos/120/120">
|
||||||
|
</td>
|
||||||
|
<td class="text-start">
|
||||||
|
<span class="fs-5">${item.title}</span>
|
||||||
|
<br>
|
||||||
|
<small class="text-success">sofort verfügbar</small>
|
||||||
|
<br>
|
||||||
|
<select class="form-select form-select-sm select-quantity" data-id="${item.id}" style="width:125px;" aria-label="Default select example">`;
|
||||||
|
for(let i = 1; i <= 5; i++){
|
||||||
|
if(objProductInfo.quantity == i) elementProduct += `<option selected value="${i}">Anzahl: ${i}</option>`;
|
||||||
|
else elementProduct += `<option value="${i}">Anzahl: ${i}</option>`;
|
||||||
|
}
|
||||||
|
totalPrice += item.data_fields.preis*objProductInfo.quantity;
|
||||||
|
elementProduct += `
|
||||||
|
</select>
|
||||||
|
<button data-id="${item.id}" class="btn-remove-product text-muted small text-decoration-none" style="padding: 0; border: none; background: transparen;">Löschen</button>
|
||||||
|
</td>
|
||||||
|
<td class="align-middle text-end">${formatter.format(item.data_fields.preis)}</td>
|
||||||
|
</tr>`;
|
||||||
|
$('#list-products').append(elementProduct);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
$('#total-price').text(formatter.format(totalPrice));
|
$('#total-price').text(formatter.format(totalPrice));
|
||||||
if(typeof updateProducts === "function") $('#total-checkout-price').text(formatter.format(totalPrice));
|
if(typeof updateProducts === "function") $('#total-checkout-price').text(formatter.format(totalPrice));
|
||||||
|
|
Loading…
Reference in New Issue