Links between Pricing Module and Other Modules
This document showcases the module links defined between the Pricing Module and other Commerce Modules.
Summary#
The Pricing Module has the following links to other modules:
First Data Model | Second Data Model | Type | Description |
---|---|---|---|
Stored - one-to-one | |||
Stored - one-to-one |
Fulfillment Module#
The Fulfillment Module provides fulfillment-related functionalities, including shipping options that the customer chooses from when they place their order. However, it doesn't provide pricing-related functionalities for these options.
Medusa defines a link between the PriceSet
and ShippingOption
data models. A shipping option's price is stored as a price set.
Retrieve with Query#
To retrieve the shipping option of a price set with Query, pass shipping_option.*
in fields
:
Manage with Link#
To manage the price set of a shipping option, use Link:
Product Module#
The Product Module doesn't store or manage the prices of product variants.
Medusa defines a link between the ProductVariant
and the PriceSet
. A product variant’s prices are stored as prices belonging to a price set.
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.
Retrieve with Query#
To retrieve the variant of a price set with Query, pass variant.*
in fields
:
Manage with Link#
To manage the price set of a variant, use Link: