nagasurendra commited on
Commit
19e703c
·
verified ·
1 Parent(s): 070ae9d

Update templates/cart.html

Browse files
Files changed (1) hide show
  1. templates/cart.html +2 -3
templates/cart.html CHANGED
@@ -202,9 +202,8 @@
202
  if (data.success) {
203
  // Update the item price and quantity in the UI
204
  quantityInput.value = quantity;
205
- let itemPriceElement = document.querySelector(`.cart-item[data-item-name="${itemName}"] .text-primary`);
206
- itemPriceElement.innerHTML = `$<span class="base-price">${data.new_item_price}</span>`;
207
- document.querySelector(`[data-item-name="${itemName}"] .base-price`).innerText = data.new_item_price.toFixed(2);
208
  document.querySelector('.cart-summary p').innerText = `Subtotal: $${data.subtotal.toFixed(2)}`;
209
  location.reload();
210
 
 
202
  if (data.success) {
203
  // Update the item price and quantity in the UI
204
  quantityInput.value = quantity;
205
+ let itemPriceElement = document.querySelector(`[data-item-name="${itemName}"] .base-price`);
206
+ itemPriceElement.innerText = data.new_item_price.toFixed(2);
 
207
  document.querySelector('.cart-summary p').innerText = `Subtotal: $${data.subtotal.toFixed(2)}`;
208
  location.reload();
209