Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
Difference between CProduct and CPDefinition
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 ?
Copyright © 2025 Liferay, Inc
• Privacy Policy
Powered by Liferay™