diff options
| author | IT Fixcomart <it@fixcomart.co.id> | 2025-08-15 06:46:54 +0000 |
|---|---|---|
| committer | IT Fixcomart <it@fixcomart.co.id> | 2025-08-15 06:46:54 +0000 |
| commit | cb07e4b195c1a1f743990757087ae1811319a2be (patch) | |
| tree | 21fd4c0aa984cc0bb967424fb9b72f59f181ca22 /src/lib | |
| parent | 9245c59bdb53f2c53a6c275d749dcc96c47ced62 (diff) | |
| parent | ea68149a86437bd89dfcc608d602aa194cd3b436 (diff) | |
Merged in cr/repeat-order (pull request #440)
<hafid> fix alur repeat order
Diffstat (limited to 'src/lib')
| -rw-r--r-- | src/lib/transaction/components/Transactions.jsx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/lib/transaction/components/Transactions.jsx b/src/lib/transaction/components/Transactions.jsx index 2596b47f..893fbfbb 100644 --- a/src/lib/transaction/components/Transactions.jsx +++ b/src/lib/transaction/components/Transactions.jsx @@ -347,6 +347,7 @@ const Transactions = ({ context = '' }) => { const handleBuyBack = async (products) => { try { // setStatus('loading'); + console.log("Products to add:", products); const results = await Promise.all( products.map((product) => @@ -356,8 +357,8 @@ const Transactions = ({ context = '' }) => { id: product.id, qty: product.quantity, selected: true, - source: 'buy', - qtyAppend: false, + source: 'add_to_cart', + qtyAppend: true, }).catch(error => { return { error, product }; }) @@ -365,6 +366,7 @@ const Transactions = ({ context = '' }) => { ); const failedOperations = results.filter(result => result && result.error); + console.log(results); if (failedOperations.length > 0) { console.error('Some products failed to add to cart:', failedOperations); |
