Skip to content

Commit

Permalink
only update cart when click button
Browse files Browse the repository at this point in the history
  • Loading branch information
yennanliu committed Dec 7, 2023
1 parent b3772b7 commit e56085a
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions ShoppingCart/Frondend/ecommerce-ui/src/views/Cart/Cart.vue
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,9 @@
class="p-0 h-25 border-bottom border-top-0 border-left-0 border-right-0"
type="number"
v-model="cartItem.quantity"
@change="
updateItem(cartItem.id, cartItem.product.id, cartItem.quantity)
"
/>
</p>

<!-- updateItem(itemId, productId, quantity) -->

<p id="item-total-price" class="mb-0">
Total Price:
<span class="font-weight-bold">
Expand All @@ -61,9 +56,9 @@
>Remove From Cart</a
>
<!-- TODO : add UpdateCart button -->
<!-- <br /><a href="#" class="text-right" @click="updateItem(cartItem.id)"
>Update Cart</a
> -->
<br /><a href="#" class="text-right" @click="updateItem(cartItem.id, cartItem.product.id, cartItem.quantity)"
>Update Cart</a
>
</div>
</div>

Expand Down

0 comments on commit e56085a

Please sign in to comment.