1 min read

Customise

Last Updated - Platform 22.0 - SDK 17.0

From v22 onwards most features require no code as they are automatically set up by the Coordinators that construct them. This page highlights the key customisation points for this feature.

Overview

As with most features the Wishlist is made up of two frameworks:

  • The PoqWishlist framework for the Wishlist UI presentation layer.
  • The PoqWishlistClient framework for the Wishlist domain and data layers.

But also has the following framework dependencies:

  • The PoqCatalogue framework for the CartWidget and VariantSelector.
  • The PoqCatalogueClient framework for the Product model and mappers.
  • The PoqCartClient framework for the CartWidget domain and data layers.

Wishlist Button

The Wishlist button, presented on other features to allow users to wishlist products, is a standalone feature that is part of the PoqCatalogue framework. However, as this feature is directly related to the Wishlist it's documentation is grouped here.

Container Dependencies

Containers can be used to replace most feature dependencies with one line of code. For the Wishlist this should be done in the AppModule on didAddToPlatform in an organised function such as setUpWishlist or setUpDependencies.

Customise the Coordinator

The Coordinator builds the WishlistViewController using the WishlistBuilder and can be easily replaced via Containers.

// You can omit the generic type to use the default 'WishlistViewController'.
Container.shared.coordinators.wishlist.replace {
PoqWishlistCoordinator() {
// Customise the builder here.
WishlistBuilder()
}
}
// Here is a more fully customised example.
Container.shared.coordinators.wishlist.replace {
PoqWishlistCoordinator<CustomWishlistViewController>() {
WishlistBuilder()
.withAnalyticsMiddleware(.customWishlistAnalytics())
.withMiddleware(.customFun())
}
}