Difference between CProduct and CPDefinition

Jamie Sammons, modified 3 Years ago. New Member Posts: 2 Join Date: 11/30/21 Recent Posts

Hi,

I'm currently doing some tests with Liferay Commerce and product definition and its headless API. I noticed that there's two model used for a Liferay product : CProduct and CPDefinition. I was wondering what's the difference between those two models. I know that CPDefinition contains or refers the fiels you define for the product, like the name, the description, ... But for the CProduct model, everything that has reference to a CProduct has a reference to CPDefinition or a reference to a model linked to CPDefinition (like Commerce Price entry model which has a reference to CProduct but also CPInstance which is linked to CPDefinition model). What's the purpose of CProduct, then ?