-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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(carts): Fixes cart modifications not accounting for certain price lists #10493
fix(carts): Fixes cart modifications not accounting for certain price lists #10493
Conversation
|
@sergiocampama is attempting to deploy a commit to the medusajs Team on Vercel. A member of the Team first needs to authorize it. |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Skipped Deployment
|
9c8e442
to
fb18b2b
Compare
7b970b4
to
36bba9c
Compare
36bba9c
to
a2b12aa
Compare
Updated to account for latest changes |
… lists *What* * Fixes medusajs#10490 * Expands any available customer_id into its customer_group_ids for cart updates that add line items. *Why* * Cart updates from the storefront were overriding any valid price lists that were correctly being shown in the storefront's product pages. *How* * Adds a new workflow step that expands an optional customer_id into the customer_group_ids it belongs to. * Uses this step in the addToCartWorkflow and updateLineItemInCartWorkflow workflows. *Testing* * Using medusa-dev to test on a local backend. * Adds integration tests for the addToCart and updateLineItemInCart workflows.
a2b12aa
to
10a53cc
Compare
@olivermrbl is this change not wanted? or anyone else looking to do it differently? this is blocking my adoption of medusa |
Hey @sergiocampama, thanks for the PR. This is needed, we're approaching it slightly differently. Expect a PR on this early next week. I'll merge this into my branch, so your contribution is accounted. 🤞🏻 |
thanks @riqwan , let me know when your PR is available, it took some time understanding the architecture to be able to create this PR, so it'd be good to understand the new direction in case I need to contribute more in the future |
ef7a6ea
into
medusajs:feat/customer-group-context
* fix(carts): Fixes cart modifications not accounting for certain price lists (#10493) *What* * Fixes #10490 * Expands any available customer_id into its customer_group_ids for cart updates that add line items. *Why* * Cart updates from the storefront were overriding any valid price lists that were correctly being shown in the storefront's product pages. *How* * Adds a new workflow step that expands an optional customer_id into the customer_group_ids it belongs to. * Uses this step in the addToCartWorkflow and updateLineItemInCartWorkflow workflows. *Testing* * Using medusa-dev to test on a local backend. * Adds integration tests for the addToCart and updateLineItemInCart workflows. Co-authored-by: Riqwan Thamir <rmthamir@gmail.com> * chore: update cart workflows to accept new pricing context * chore: add transfer specs * chore: fix specs * chore: modify types + specs * chore: add data migration + dashboard changes * chore: fix update line item workflow * chore: add changeset + unskip spec --------- Co-authored-by: Sergio Campamá <sergiocampama@gmail.com>
What
updates that add line items.
Why
that were correctly being shown in the storefront's product pages.
How
customer_group_ids it belongs to.
updateLineItemInCartWorkflow workflows.
set-pricing-context.ts
used for thestore/products
routes, but that middleware was too specific for carts.Testing
workflows.