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: Product type tax overrides #9951

Merged
merged 3 commits into from
Nov 6, 2024
Merged

Conversation

olivermrbl
Copy link
Contributor

@olivermrbl olivermrbl commented Nov 6, 2024

What

  • Adds product_type_id to order_line_item
  • Adds product_type_id to cart_line_item

Why

  • To allow line item tax line computation for product type overrides

Copy link

vercel bot commented Nov 6, 2024

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

7 Skipped Deployments
Name Status Preview Comments Updated (UTC)
api-reference ⬜️ Ignored (Inspect) Nov 6, 2024 6:20pm
api-reference-v2 ⬜️ Ignored (Inspect) Visit Preview Nov 6, 2024 6:20pm
docs-ui ⬜️ Ignored (Inspect) Visit Preview Nov 6, 2024 6:20pm
docs-v2 ⬜️ Ignored (Inspect) Visit Preview Nov 6, 2024 6:20pm
medusa-dashboard ⬜️ Ignored (Inspect) Visit Preview Nov 6, 2024 6:20pm
medusa-docs ⬜️ Ignored (Inspect) Visit Preview Nov 6, 2024 6:20pm
resources-docs ⬜️ Ignored (Inspect) Visit Preview Nov 6, 2024 6:20pm

Copy link

changeset-bot bot commented Nov 6, 2024

⚠️ No Changeset found

Latest commit: fb72655

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

@olivermrbl olivermrbl force-pushed the fix/product-type-tax-override branch from ac327e6 to 27cbfee Compare November 6, 2024 14:04
Comment on lines -367 to -391
/**
* The name of the item's product.
*/
product_name?: string

/**
* The ID of the category of the item's product.
*/
product_category_id?: string

/**
* The categories of the item's product.
*/
product_categories?: string[]

/**
* The SKU of the item's product.
*/
product_sku?: string

/**
* The type of the item's product.
*/
product_type?: string

Copy link
Contributor Author

Choose a reason for hiding this comment

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

These are currently not used for tax calculations so I removed them from the type and input.

Comment on lines -117 to -122
product_name: product.title,
product_categories: product.categories?.map((c) => c.name),
// TODO: It is strange that we only accept a single category, revisit the tax module implementation
product_category_id: product.categories?.[0]?.id,
product_sku: variant.sku,
product_type: product.type,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

These are currently not used for tax calculations so I removed them from the type and input.

@@ -1,5 +1,7 @@
{
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Apparently, a lot of stuff was missing in the cart module snapshot

@olivermrbl olivermrbl marked this pull request as ready for review November 6, 2024 16:16
@olivermrbl olivermrbl requested a review from a team as a code owner November 6, 2024 16:16
@olivermrbl olivermrbl changed the title fix: Make product type tax override work fix: Product type tax overrides Nov 6, 2024
@olivermrbl olivermrbl merged commit 505768d into develop Nov 6, 2024
23 checks passed
@olivermrbl olivermrbl deleted the fix/product-type-tax-override branch November 6, 2024 19:33
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.

2 participants