Files
medusa-store/packages/modules/cart
Adrien de Peretti e4877616c3 feat(): sync cart translation synced (#14226)
ref: https://github.com/medusajs/medusa/pull/14189

  **Summary**

  This PR extends the translation module to support automatic translation syncing for cart line items based on the cart's locale.

  Key changes:
  - Added locale field to the Cart model to store the cart's locale preference
  - Created new workflow steps:
    - getTranslatedLineItemsStep - Translates line items when adding to cart or creating a cart
    - updateCartItemsTranslationsStep - Re-translates all cart items when the cart's locale changes
  - Integrated translation logic into cart workflows:
    - createCartWorkflow - Applies translations to initial line items
    - addToCartWorkflow - Applies translations when adding new items
    - updateCartWorkflow - Re-translates all items when locale_code is updated
    - refreshCartItemsWorkflow - Maintains translations during cart refresh
  - Added applyTranslationsToItems utility to map variant/product/type/collection translations to line item fields (title, subtitle, description, etc.)
2025-12-10 08:37:30 +00:00
..
2024-05-02 15:33:34 +00:00
2025-12-03 09:20:02 +01:00
2025-12-03 09:20:02 +01:00
2024-05-02 15:33:34 +00:00

Cart Module

A Cart is a collection of items that a customer intends to purchase. The Cart also stores where the items should be shipped, how they should be shipped, how the goods will be paid for and who the customer is. The Cart facilitates calculations of totals and validation of purchase flows.