Skip to content

WishlistAlert container

The WishlistAlert container displays notifications that give feedback about actions performed in a wishlist drop-in component.

Wishlist container

WishlistAlert container

The WishlistAlert container provides the following configuration options:

OptionsTypeReq?Description
actionstringYesSpecifies the action to notify the user about. Valid values are: "add", "remove", "move", "addError" and "removeError.
itemobjectYesThe wishlist item where the action is performed.
routeToWishliststringNoSpecifies the URL to show when the wishlist has products.

The following example demonstrates how to render the WishlistAlert container:

provider.render(Wishlist, {
action: 'add', // or 'remove', 'move', 'addError', 'removeError'
item: { product: { name: 'Sample Product' } },
routeToWishlist: '/wishlist',
});