Skip to content

Commit

Permalink
Merge branch 'develop' into fix/sales-channel-search
Browse files Browse the repository at this point in the history
  • Loading branch information
kasperkristensen authored Aug 29, 2024
2 parents 5323fc3 + 70f2290 commit b1f0347
Show file tree
Hide file tree
Showing 18 changed files with 1,324 additions and 761 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ module.exports = defineConfig({
],
},
},
}
},
})
```
---
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ export default async function productCreateHandler({
attachments: [ // optional var
{
content: base64,
content_type: MIME type,
content_type: "image/png", // mime type
filename: filename.ext,
disposition: "attachment or inline attachment",
id: "id", // only needed for inline attachment
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ You'll need the following resources for the taxes calculation:
```ts
// other imports...
import {
ModuleRegistrationName
ModuleRegistrationName,
} from "@medusajs/utils"

// In an API route, workflow step, etc...
Expand Down Expand Up @@ -48,19 +48,19 @@ const query = remoteQueryObjectFromString({
fields: [
"*",
"variants.*",
"variants.calculated_price.*"
"variants.calculated_price.*",
],
variables: {
filters: {
id
id,
},
"variants.calculated_price": {
context: {
region_id,
currency_code,
}
}
}
},
},
},
})

const products = await remoteQuery(query)
Expand All @@ -82,7 +82,7 @@ To retrieve the tax line of each product, first, add the following utility metho
// other imports...
import {
HttpTypes,
TaxableItemDTO
TaxableItemDTO,
} from "@medusajs/types"

// ...
Expand Down Expand Up @@ -118,7 +118,7 @@ Then, use it when retrieving the tax lines of the products retrieved earlier:
```ts
// other imports...
import {
ItemTaxLineDTO
ItemTaxLineDTO,
} from "@medusajs/types"

// ...
Expand All @@ -128,7 +128,7 @@ const taxLines = (await taxModuleService.getTaxLines(
// example of context properties. You can pass other ones.
address: {
country_code,
}
},
}
)) as unknown as ItemTaxLineDTO[]
```
Expand Down Expand Up @@ -181,7 +181,7 @@ export const calculateTaxHighlights = [
```ts highlights={calculateTaxHighlights}
// other imports...
import {
calculateAmountsWithTax
calculateAmountsWithTax,
} from "@medusajs/utils"

// ...
Expand Down
Loading

0 comments on commit b1f0347

Please sign in to comment.