1 min read

Customisation Points

Last Updated - Platform 25.0 - SDK 20.0

This page highlights the key customisation points for this feature.

Overview

The Product Details feature is made up of three key frameworks:

  • The PoqProductDetail framework for the Product Details UI presentation layer.
  • The PoqCatalogue framework for the common Product UI presentation layer including the WishlistWidget, CartWidget and VariantSelector.
  • The PoqCatalogueClient framework for the Product domain and data layers.

These frameworks have the following dependencies:

  • The PoqCartClient framework for the CartWidget domain and data layers.
  • The PoqStoresClient framework for shipment store selection.
  • The PoqWishlistClient framework for the WishlistWidget domain and data layers.

Container Dependencies

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

Customise the Coordinator

The Coordinator builds the ProductDetailsViewController using the ProductDetailsBuilder and can be easily replaced via Containers.

// You can omit the generic type to use the default 'ProductDetailsViewController'.
Container.shared.coordinators.productDetails.replace {
PoqProductDetailsCoordinator() {
// Customise the builder here.
ProductDetailsBuilder()
}
}
// Here is a more fully customised example.
Container.shared.coordinators.productDetails.replace {
PoqProductDetailsCoordinator<CustomProductDetailsViewController>() {
ProductDetailsBuilder()
.analytics(middleware: .customProductDetailsAnalytics())
.middleware(.customFun())
}
}

Next steps