Relations between Pricing Module and Other Modules
When Commerce Modules are used together in a Medusa application, the Medusa application handles building the relations between these modules.
This document showcases the relation between the Pricing Module and other Commerce Modules.
Product Module
A product variant’s prices are stored as prices belonging to a price set. The Medusa application forms a relation between the ProductVariant
and the PriceSet
.
So, when you want to add prices for a product variant, you create a price set and add the prices to it. You can then benefit from adding rules to prices or using the calculatePrices
method to retrieve the price of a product variant within a specified context.
Was this section helpful?