Modules.PRODUCT to read and write products, variants, options, categories, collections, tags, and types from a subscriber, a scheduled job, or a custom step.
Resolve the service
The service key comes from@medusajs/framework/utils, not MercurModules:
listAndCountProducts returns a page of products and the total count.
Product methods
These methods act onProduct:
filters takes FilterableProductProps, such as id, status, handle, or q. config takes select, relations, skip, take, and order.
Methods for the other models
The same method set exists for each model in the module, named after it:Option and image methods
The service also has methods that manage shared options and variant images:
Mercur’s attribute workflows create and attach the options behind variant-axis attributes. Prefer those workflows over the option methods, so each attribute stays in sync with the option it mirrors.