diff options
| author | Rafi Zadanly <zadanlyr@gmail.com> | 2024-01-04 10:05:25 +0700 |
|---|---|---|
| committer | Rafi Zadanly <zadanlyr@gmail.com> | 2024-01-04 10:05:25 +0700 |
| commit | 67398e6f10d6f7729d8f1ace7005ef13d32c5ddd (patch) | |
| tree | 7d47ad6c1a7093e595e22bcecb40016a626162f6 /src-migrate/modules/cart/stores/useCartStore.ts | |
| parent | 89f32128f37d99b490de7590e2116a9cfd853f89 (diff) | |
Update promotion program feature
Diffstat (limited to 'src-migrate/modules/cart/stores/useCartStore.ts')
| -rw-r--r-- | src-migrate/modules/cart/stores/useCartStore.ts | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src-migrate/modules/cart/stores/useCartStore.ts b/src-migrate/modules/cart/stores/useCartStore.ts index d3eaadb7..0643b8e6 100644 --- a/src-migrate/modules/cart/stores/useCartStore.ts +++ b/src-migrate/modules/cart/stores/useCartStore.ts @@ -48,7 +48,8 @@ const computeSummary = (cart: CartProps) => { if (!item.selected) continue; let price = 0; - if (item.cart_type === 'promotion') price = item?.package_price || 0; + if (item.cart_type === 'promotion') + price = (item?.package_price || 0) * item.quantity; else if (item.cart_type === 'product') price = item.price.price * item.quantity; |
