estimateCurrentCartTotals( )


Estimates the current cart's price totals (including tax), based on a selected carrier service, shipping address, and billing information.

Use this method for preview purposes, such as displaying estimated totals before checkout. This provides a partial estimation, not a full cart calculation.

Notes:

  • Use boolean flags to control which components to include in the estimation: delivery costs, additional fees, taxes, and gift cards. Components that aren't explicitly enabled are excluded.
  • Line item discounts are already calculated and applied to the cart.
  • Not passing any properties only estimates the cart items price totals, without considering shipping and billing information.
  • Calling this method before adding an item to the cart returns a 404 error, as the cart doesn't exist yet.
  • This method requires visitor or member authentication.
Permissions
Read Orders
Learn more about app permissions.
Method Declaration
Copy
Method Parameters
optionsEstimateCurrentCartTotalsOptions

Total estimation options.

Returns
Return Type:Promise<EstimateTotalsResponse>
Errors

This method doesn't return any custom errors, but may return standard errors. Learn more about standard Wix errors.

Did this help?