24 lines
1.3 KiB
Plaintext
24 lines
1.3 KiB
Plaintext
export const metadata = {
|
||
title: `Relations between Pricing Module and Other Modules`,
|
||
}
|
||
|
||
# {metadata.title}
|
||
|
||
This document showcases the link modules defined between the Pricing Module and other commerce modules.
|
||
|
||
## Fulfillment Module
|
||
|
||
A shipping option's price is stored as a price set. Medusa defines a link module that builds a relationship between the `PriceSet` and `ShippingOption` data models.
|
||
|
||

|
||
|
||
---
|
||
|
||
## Product Module
|
||
|
||
A product variant’s prices are stored as prices belonging to a price set. Medusa defines a link module that builds a relationship 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.
|