ok
This commit is contained in:
@@ -77,7 +77,8 @@ const ItemLister = ({
|
||||
const updatedItems = items.map((item) => {
|
||||
if (item.itemId === itemId) {
|
||||
const newQty = item.qty + 1;
|
||||
updateItemQtyInCart(shopId, itemId, newQty);
|
||||
const nowPrice = item.promoPrice > 0 ? item.promoPrice : item.price
|
||||
updateItemQtyInCart(shopId, itemId, newQty, nowPrice);
|
||||
|
||||
if (forCart) refreshTotal();
|
||||
|
||||
@@ -93,7 +94,8 @@ const ItemLister = ({
|
||||
.map((item) => {
|
||||
if (item.itemId === itemId && item.qty > 0) {
|
||||
const newQty = item.qty - 1;
|
||||
updateItemQtyInCart(shopId, itemId, newQty);
|
||||
const nowPrice = item.promoPrice > 0 ? item.promoPrice : item.price
|
||||
updateItemQtyInCart(shopId, itemId, newQty, nowPrice);
|
||||
|
||||
if (forCart) {
|
||||
refreshTotal();
|
||||
|
||||
Reference in New Issue
Block a user