Links between Store Module and Other Modules

This document showcases the module links defined between the Store Module and other Commerce Modules.

Summary#

The Store Module has the following links to other modules:

Tip: Read-only links are used to query data across modules, but the relations aren't stored in a pivot table in the database.

First Data Model

Second Data Model

Type

Description

StoreCurrency

Currency in Currency Module

Read-only - has many

Learn more

StoreLocale

Locale in Translation Module

Read-only - has many

Learn more


Currency Module#

The Store Module has a StoreCurrency data model that stores the supported currencies of a store. However, these currencies don't hold all the details of a currency, such as its name or symbol.

Instead, Medusa defines a read-only link from the Store Module's StoreCurrency data model to the Currency Module's Currency data model. This means you can retrieve the details of a store's supported currencies, but you don't manage the links in a pivot table in the database.

Retrieve with Query#

To retrieve the details of a store's currencies with Query, pass supported_currencies.currency.* in fields:


Translation Module#

The Store Module has a StoreLocale data model that stores the supported locales of a store. However, these locales don't hold all the details of a locale, such as its name.

Instead, Medusa defines a read-only link from the Store Module's StoreLocale data model to the Translation Module's Locale data model. This means you can retrieve the details of a store's supported locales, but you don't manage the links in a pivot table in the database.

Retrieve with Query#

To retrieve the details of a store's locales with Query, pass supported_locales.locale.* in fields:

Was this page helpful?
Ask Bloom
For assistance in your development, use Claude Code Plugins or Docs MCP server in Cursor, VSCode, etc...FAQ
What is Medusa?
How can I create a module?
How can I create a data model?
How do I create a workflow?
How can I extend a data model in the Product Module?
Recipes
How do I build a marketplace with Medusa?
How do I build digital products with Medusa?
How do I build subscription-based purchases with Medusa?
What other recipes are available in the Medusa documentation?
Chat is cleared on refresh
Line break
⇧↵