Calculates additional fees to include in the cart and checkout pages.
The calculateAdditionalFees
function calculates additional fees to appear in the cart and checkout pages of a store's site.
The function is automatically called by Wix when the cart totals are calculated, or when an action is performed in
the cart and/or checkout pages. For example, when an item is added to the cart, or when a shipping location is specified.
calculateAdditionalFees()
When you add the Additional Fees service plugin,
a folder is automatically added to your site. Use the .js
file in the folder to write the code to calculate any additional fees to add to the cart or checkout.
For more information on calculating your additional fees, see Velo Tutorial: eCommerce Additional Fees Service Plugin.
Options for line items and shipping options.
Metadata about the request.
This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.
Retrieves the configuration of your additional fees plugin.
Set your additional fees configuration in the return
of the getConfig()
function. Wix calls this function when you publish your site.
Changes to the configuration don't take effect until you publish your site.
Currently no configurations are available for this plugin, so set getConfig()
to return an empty object.
getConfig()
When you add the Additional Fees service plugin,
a folder is automatically added to your site. Use the -config.js
file in the folder to set the default configuration for your
implementation of the service plugin.
For more information on setting your configuration, see Tutorial: Additional Fees Service Plugin.
This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.