MCPcopy Index your code
hub / github.com/WHAHA-HA/react-fashion-cube / decreaseQty

Method decreaseQty

server/ecommerce/modules/Cart.js:35–46  ·  view source on GitHub ↗
(id)

Source from the content-addressed store, hash-verified

33 }
34
35 decreaseQty(id) {
36 this.items[id].qty--;
37 this.items[id].price -= this.items[id].item.price;
38 this.items[id].price = parseFloat(this.items[id].price.toFixed(2))
39 this.totalQty--;
40 this.totalPrice -= this.items[id].item.price
41 this.totalPrice = parseFloat(this.totalPrice.toFixed(2))
42 if (this.items[id].qty <= 0) {
43 delete this.items[id];
44 }
45 return this
46 }
47
48 increaseQty(id) {
49 this.items[id].qty++;

Callers 1

users.jsFile · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected