SAP Spartacus allows us to override the various components that are used within the PDP. Example : ProductSummaryComponent (cx-product-summary).
Overriding them is pretty straightforward using the ConfigModule as they are CMS Components.
My question is around how we can use the additional attributes that our controllers may return.
Example - lets consider we add an attribute "manufacturedYear" to the ProductModel, then we also include it in the ProductData via beans xml. Now that it is in the Data objects, say we added it in the ProductWsDTO and add it in the DTO mapping, this will now be returned in the /product/{code} API call.
In the UI, we have the product as below:
product$: Observable = this.currentProductService.getProduct();
So the "Product" is a model available in "product.model.ts" in the @spartacus/core. How can we extend this such that we can use our new "manufacturedYear" by using the underlying services which make the actual API call?
The intention is to just extend the model but use underlying services to make API calls to get our additional attributes.
Thanks for your help