Estimates the current cart's price totals (including tax), based on a selected carrier service, shipping address, and billing information.
The estimateCurrentCartTotals()
function returns a Promise that resolves when the estimated totals are generated.
Note: Not passing any options
properties will only estimate the cart items price totals.
function estimateCurrentCartTotals(
options: EstimateCurrentCartTotalsOptions,
): Promise<EstimateTotalsResponse>;
Total estimation options.
import { currentCart } from "@wix/ecom";
async function estimateCurrentCartTotals(options) {
const response = await currentCart.estimateCurrentCartTotals(options);
}
This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.