1 min read

Get Started

Last Updated - Platform 22.0 - SDK 17.0

The Wishlist feature uses the Wishlist v3 API out of the box but can be switched to alternate sources.

Set up the Wishlist

  1. Ensure the SDK and Platform are set up following the PoqSDK set up steps.
  2. Add the PoqWishlist framework to your project following these steps.

That's it! No code required.
You'll now have the default listing level Wishlist in your app.

Set the Wishlist level

This configures the identifier within the product that should (if selected by the user) be added to the Wishlist. For variant level this is the variant identifier (SKU), for listing level this is the listing identifier, and for product level this is the master product identifier.

  1. Open your AppModule to the didAddToPlatform or setUpWishlist function.
  2. Set the Wishlist level to your desired level.
// Variant level wishlists will hide the wishlist button on the PLP by default.
Settings.Wishlist.level = .variant
// Listing level is the default.
Settings.Wishlist.level = .listing
// Product level allows wishlist from anywhere, wishlist items will have color switchers (if they have colors).
Settings.Wishlist.level = .product
// Mix and match any levels you want.
Settings.Wishlist.level = [.product, .variant]

Alternative sources

By default the wishlist uses the new Wishlist v3 API but it is possible to switch back to the v2 API or use a device only Wishlist.

  1. Open your AppModule to the didAddToPlatform or setUpWishlist function.
  2. Inject your desired Wishlist source.
// Use a device only wishlist (no API required).
Container.shared.repositories.wishlistRepository.replace { PoqWishlistRepositoryOnDevice() }
// Revert back to the v2 Wishlist API (not recommended as v3 is better and gracefully upgrades from v2).
Container.shared.services.wishlistService.replace { PoqWishlistServiceV2() }

Next steps