cancel
Showing results for 
Search instead for 
Did you mean: 

How to get productmodel with help of cartdata.

Former Member
0 Kudos

i wanted to get productmodel for the product which is added in cartdata.please help.

Accepted Solutions (1)

Accepted Solutions (1)

former_member704915
Participant

You may use the below logic:

ProductData productData= cartData.getEntries().iterator().next().getProduct();

Once you get the productData, you can use the product reverse populator to convert the productdata to productModel.

Cheers 🙂

P.S: Please apply the necessary null checks during implementation.

Answers (0)