Skip to content

Favorites Actions

Retrieves favorites from the server.

import { fetchFavorites } from '@shopgate/engage/favorites';
dispatch(fetchFavorites());
  • ignoreCache (boolean): Indicates whether to ignore the cache.

Contains the addFavorites and removeFavorites functions. addFavorites is deprecated starting from Engage Theme version 6.7.0 and has been replaced with the addFavorite action.

import { addFavorite, removeFavorites } from '@shopgate/engage/favorites';
const productId = '25';
const withRelatives = false;
dispatch(addFavorite(productId));
dispatch(removeFavorites(productId, withRelatives));
  • productId (string) required: The ID of the product to add or remove from favorites.
  • withRelatives (boolean): Indicates whether relatives are also removed.