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(medusa): Include items.variant relation in order calculation #2869

Merged
merged 3 commits into from
Dec 22, 2022

Conversation

adrien2p
Copy link
Member

What

When an order require to decorate the totals, the variant relation should be added

FIXES CORE-930

@changeset-bot
Copy link

changeset-bot bot commented Dec 21, 2022

🦋 Changeset detected

Latest commit: a44ac15

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@medusajs/medusa Patch

Not sure what this means? Click here to learn what changesets are.

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

@@ -2,6 +2,9 @@ import { flatten, groupBy, map, merge } from "lodash"
import { EntityRepository, FindManyOptions, Repository } from "typeorm"
import { Order } from "../models"

const ITEMS_REL_NAME = "items"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

self-review: we can decide to keep it or not

@adrien2p adrien2p marked this pull request as ready for review December 22, 2022 08:36
@adrien2p adrien2p requested a review from a team as a code owner December 22, 2022 08:36
@adrien2p adrien2p force-pushed the fix/order-variant-deleted branch from 1b44fcf to 550d48b Compare December 22, 2022 08:37
Copy link
Collaborator

@srindom srindom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@srindom
Copy link
Collaborator

srindom commented Dec 22, 2022

@adrien2p - please add a changeset

@olivermrbl olivermrbl changed the title fix: Order with totals should include the variant relation to the items fix(medusa): Include items.variant relation in order calculation Dec 22, 2022
@kodiakhq kodiakhq bot merged commit e27b194 into develop Dec 22, 2022
@kodiakhq kodiakhq bot deleted the fix/order-variant-deleted branch December 22, 2022 09:32
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