Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(core-flows): Add missing cart sales channel id fields to be part of the application context #10142

Merged
merged 3 commits into from
Nov 19, 2024

Conversation

adrien2p
Copy link
Member

@adrien2p adrien2p commented Nov 18, 2024

RESOLVES SUP-185

What
The cart fields to be fetched for the promotion workflow was not including the sales_channel_id, making any rules being constraint to that fields not being validated against this property.

Copy link

vercel bot commented Nov 18, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
medusa-dashboard ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 19, 2024 11:49am
6 Skipped Deployments
Name Status Preview Comments Updated (UTC)
api-reference ⬜️ Ignored (Inspect) Nov 19, 2024 11:49am
api-reference-v2 ⬜️ Ignored (Inspect) Visit Preview Nov 19, 2024 11:49am
docs-ui ⬜️ Ignored (Inspect) Visit Preview Nov 19, 2024 11:49am
docs-v2 ⬜️ Ignored (Inspect) Visit Preview Nov 19, 2024 11:49am
medusa-docs ⬜️ Ignored (Inspect) Visit Preview Nov 19, 2024 11:49am
resources-docs ⬜️ Ignored (Inspect) Visit Preview Nov 19, 2024 11:49am

Copy link

changeset-bot bot commented Nov 18, 2024

⚠️ No Changeset found

Latest commit: b755a44

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@adrien2p
Copy link
Member Author

cc @riqwan could you let me know if that is fine with you or if I should look at something else?

@adrien2p
Copy link
Member Author

cc #10090

@kodiakhq kodiakhq bot merged commit 59bf9af into develop Nov 19, 2024
16 of 23 checks passed
@kodiakhq kodiakhq bot deleted the fix/promotion_missing_sales_channel_id branch November 19, 2024 11:48
@iluozhiqiang
Copy link

error: Field(s) are required to have value to continue - After I added the UK region and GBP currency, it says "No sales_channel_id" during checkout

storefront

  • medusa-storefront-starter

admin

  • medusa 2.1.1

{
message: 'Field(s) are required to have value to continue - sales_channel_id',
name: 'Error',
stack: 'Error: Field(s) are required to have value to continue - sales_channel_id\n' +
' at Object. (/Users/iluo/Public/medusajs-admin/node_modules/@medusajs/core-flows/src/common/steps/validate-presence-of.ts:27:13)\n' +
' at Object.invoke (/Users/iluo/Public/medusajs-admin/node_modules/@medusajs/workflows-sdk/src/utils/composer/helpers/create-step-handler.ts:72:67)\n' +
' at processTicksAndRejections (node:internal/process/task_queues:105:5)\n' +
' at async DistributedTransaction.handler (/Users/iluo/Public/medusajs-admin/node_modules/@medusajs/orchestration/src/workflow/workflow-manager.ts:214:16)\n' +
' at async stepHandler (/Users/iluo/Public/medusajs-admin/node_modules/@medusajs/orchestration/src/transaction/transaction-orchestrator.ts:827:20)\n' +
' at async Promise.allSettled (index 0)\n' +
' at async promiseAll (/Users/iluo/Public/medusajs-admin/node_modules/@medusajs/utils/src/common/promise-all.ts:27:18)\n' +
' at async TransactionOrchestrator.executeNext (/Users/iluo/Public/medusajs-admin/node_modules/@medusajs/orchestration/src/transaction/transaction-orchestrator.ts:965:7)\n' +
' at async executeNext (/Users/iluo/Public/medusajs-admin/node_modules/@medusajs/orchestration/src/transaction/transaction-orchestrator.ts:1013:14)\n' +
' at async TransactionOrchestrator.resume (/Users/iluo/Public/medusajs-admin/node_modules/@medusajs/orchestration/src/transaction/transaction-orchestrator.ts:1028:5)\n' +
' at async LocalWorkflow.run (/Users/iluo/Public/medusajs-admin/node_modules/@medusajs/orchestration/src/workflow/local-workflow.ts:371:5)\n' +
' at async originalExecution (/Users/iluo/Public/medusajs-admin/node_modules/@medusajs/workflows-sdk/src/helper/workflow-export.ts:111:26)\n' +
' at async LocalWorkflow.newRun [as run] (/Users/iluo/Public/medusajs-admin/node_modules/@medusajs/workflows-sdk/src/helper/workflow-export.ts:190:12)\n' +
' at async GET (/Users/iluo/Public/medusajs-admin/node_modules/@medusajs/medusa/src/api/store/shipping-options/route.ts:12:40)\n' +
' at async /Users/iluo/Public/medusajs-admin/node_modules/@medusajs/utils/src/common/wrap-handler.ts:17:14\n' +
'⮑ sat /Users/iluo/Public/medusajs-admin/node_modules/@medusajs/core-flows/dist/cart/workflows/list-shipping-options-for-cart.js: [list-shipping-options-for-cart -> validate-presence-of (invoke)]',
__isMedusaError: true,
type: 'invalid_data',
code: undefined,
date: 2024-12-12T08:25:17.750Z
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants