I have added extension attribute to Magento\Catalog\Api\Data\ProductInterface using extension_attrributes.xml and its getting reflected when I get product(s) using ProductRepository's get, getList and getById methods.

Now I want to show those attributes data on product listing pages however, when I debugged that part, I have found out magento is using product collection to get products instead of product repository.

I know that we can use event observer (catalog_product_collection_load_after) to load external data but I want to know if there is any optimal solution for this.

Thanks in advance!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.