I want to override the add-to-cart component in the Product List Page. This is what I came up with as a solution:
<ng-template [cxOutletRef]="productListOutlets.ITEM_ACTIONS" let-product>
<app-custom-add-to-cart
*ngIf="product.stock?.stockLevelStatus !== 'outOfStock'"
[showQuantity]="false"
[product]="product"
></app-custom-add-to-cart>
</ng-template>
The problem is that the product is undefined. Probably im missing some understanding of how to get the context in an outlet. In the documentation it is stated that you could get a reference to the context this way but it depends on where the outlet is used. https://sap.github.io/spartacus-docs/outlets/
Does anyone know how to get access to the outlet-context?
I found out that this is not possible. The context that is provided for this outlet contains only component data and not product data.