Page 1 of 1

How to get Products List in an API with Custom fields added

Posted: Wed Mar 22, 2017 11:02 am
by ramsunder
Hi,

I am using Broadleaf - 5.0.1 GA

I have created a custom class named CustomProductImpl extending ProductImpl and added a field warranty

and I have also created a CustomProductWrapper extending ProductWrapper and mentioned in applicationcontext.xml, I am also able to get a Product data with warranty when I call the following ProductDetailAPI

http://localhost:8080/api/v1/catalog/product/{PRODUCTID}

My question here is how can I get list of Products with customfield (warranty) extending any of the ProductListingAPI.

I tried creating a new Rest Client API for that and I dont know whether its a correct approach and I failed getting StackOverflow error.

Please guide me on this

Re: How to get Products List in an API with Custom fields added

Posted: Tue Jul 25, 2017 9:18 am
by phillipuniverse
In your CustomProductWrapper extension, override the wrapSummary() method to populate properties that are displayed when the product is in a list.

The Broadleaf forums are being retired as a readonly archive of questions. For active discussions and questions, check out the broadleaf-commerce tag on Stack Overflow which is actively monitored by the Broadleaf team.