agentmall 0.1.9 → 0.1.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +3 -3
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -295,8 +295,8 @@ function calculateSuggestedBudget(product, quantity = 1, variantUnitPriceCents)
|
|
|
295
295
|
variantUnitPriceCents ?? 0
|
|
296
296
|
);
|
|
297
297
|
const basePriceCents = baseUnitPriceCents * quantityClamped;
|
|
298
|
-
const
|
|
299
|
-
return basePriceCents +
|
|
298
|
+
const taxAndPriceBufferCents = Math.round(basePriceCents * 0.15);
|
|
299
|
+
return basePriceCents + taxAndPriceBufferCents + 800;
|
|
300
300
|
}
|
|
301
301
|
function calculateMinimumBudget(product, quantity = 1, variantUnitPriceCents) {
|
|
302
302
|
const unitPriceCents = Math.max(product.price, variantUnitPriceCents ?? 0);
|
|
@@ -354,7 +354,7 @@ function displayCheckoutEstimate(product, quantity = 1, variantSelections, varia
|
|
|
354
354
|
}
|
|
355
355
|
}
|
|
356
356
|
console.log(
|
|
357
|
-
` Suggested budget: \x1B[1m${formatCents(suggestedBudget)}\x1B[0m (includes 15% buffer
|
|
357
|
+
` Suggested budget: \x1B[1m${formatCents(suggestedBudget)}\x1B[0m (includes a 15% tax/price buffer plus an $8 minimum shipping buffer)`
|
|
358
358
|
);
|
|
359
359
|
console.log(
|
|
360
360
|
` Service fee: ${formatCents(SERVICE_FEE_CENTS)}`
|