Retrieves eligible custom discount triggers based on the provided items. The retrieved custom triggers are based on your own business logic.
The getEligibleTriggers()
function determines whether a cart or checkout's items meet the conditions for a discount to apply to an item.
The function is automatically called by Wix eCommerce when actions are performed on the cart or checkout entities/pages. For example, when adding an item to the cart.
getEligibleTriggers()
When you add the Custom Discount Trigger plugin, a folder is automatically added to your site. Use the .js
file in the folder to write the code to retrieve custom triggers.
For more information on setting up your custom triggers, see Tutorial: Custom Discount Trigger Service Plugin.
Line items and triggers.
Metadata about the request.