docs: create docs workspace (#5174)
* docs: migrate ui docs to docs universe * created yarn workspace * added eslint and tsconfig configurations * fix eslint configurations * fixed eslint configurations * shared tailwind configurations * added shared ui package * added more shared components * migrating more components * made details components shared * move InlineCode component * moved InputText * moved Loading component * Moved Modal component * moved Select components * Moved Tooltip component * moved Search components * moved ColorMode provider * Moved Notification components and providers * used icons package * use UI colors in api-reference * moved Navbar component * used Navbar and Search in UI docs * added Feedback to UI docs * general enhancements * fix color mode * added copy colors file from ui-preset * added features and enhancements to UI docs * move Sidebar component and provider * general fixes and preparations for deployment * update docusaurus version * adjusted versions * fix output directory * remove rootDirectory property * fix yarn.lock * moved code component * added vale for all docs MD and MDX * fix tests * fix vale error * fix deployment errors * change ignore commands * add output directory * fix docs test * general fixes * content fixes * fix announcement script * added changeset * fix vale checks * added nofilter option * fix vale error
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"position": 10,
|
||||
"collapsed": false,
|
||||
"link": null,
|
||||
"label": "Taxes",
|
||||
"customProps": {
|
||||
"sidebar_is_group_headline": true
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
---
|
||||
sidebar_position: 1
|
||||
description: 'Medusa admin allows merchants to manage their taxes. Merchants can specify and configure taxes per region.'
|
||||
---
|
||||
|
||||
# Taxes Overview
|
||||
|
||||
In this document, you’ll get an overview of taxes in Medusa and learn about their importance in your ecommerce store.
|
||||
|
||||
## Overview
|
||||
|
||||
Taxes in Medusas are directly associated with [Regions](../regions/index.md). As regions and countries often have different tax rates and rules, Medusa supports specifying the tax rate for each region.
|
||||
|
||||
Taxes are calculated for products and shipping methods on checkout. Medusa provides a default tax provider to calculate the taxes, and merchants and developers can also integrate custom tax providers for advanced calculation of taxes.
|
||||
|
||||
---
|
||||
|
||||
## How are Taxes Created
|
||||
|
||||
Once a region is created, a default tax rate is created for that region. You can specify the rate and code of the tax rate during the creation of the region.
|
||||
|
||||
This also means that tax rates are deleted when a region is deleted.
|
||||
|
||||
---
|
||||
|
||||
## Customizing Tax Rates
|
||||
|
||||
A region’s default tax rate is applied for all products and shipping options. You can also have more customized tax rates.
|
||||
|
||||
Adding tax rates alongside the default one allows you to override the prices of specific products, product types, or shipping options. This further increase the customization capabilities of your ecommerce store.
|
||||
|
||||
---
|
||||
|
||||
## Learn More About Taxes
|
||||
|
||||
- [Manage Taxes](./manage.md)
|
||||
- [Manage Tax Rates](./tax-rates.mdx)
|
||||
- [Manage Tax Overrides](./tax-overrides.mdx)
|
||||
- [Tax Inclusive Pricing Overview](./tax-inclusive.mdx)
|
||||
@@ -0,0 +1,80 @@
|
||||
---
|
||||
sidebar_position: 2
|
||||
description: 'This user guide explains how to manage taxes on the Medusa admin. Learn how to edit their configurations.'
|
||||
addHowToData: true
|
||||
---
|
||||
|
||||
# Manage Taxes
|
||||
|
||||
In this document, you’ll learn how to view and manage taxes in your Medusa Admin.
|
||||
|
||||
## View Taxes
|
||||
|
||||
To view taxes:
|
||||
|
||||
1. Click on Settings in the sidebar.
|
||||
2. Choose Taxes from the list of settings.
|
||||
|
||||
This opens the Taxes page where you can find a list of regions. This is because every time you create a region, a default tax rate is associated with that region.
|
||||
|
||||
---
|
||||
|
||||
## Edit a Region’s Taxes
|
||||
|
||||
To edit a region’s taxes:
|
||||
|
||||
1. Go to Settings → Taxes.
|
||||
2. Click on the region you want to edit the taxes for in the Regions section.
|
||||
|
||||
This opens a Details form to the right where you can edit the taxes calculation settings and [manage the tax rates](./tax-rates.mdx).
|
||||
|
||||
---
|
||||
|
||||
## Change Tax Calculation Settings
|
||||
|
||||
:::tip
|
||||
|
||||
The save button only appears when you make changes to the settings.
|
||||
|
||||
:::
|
||||
|
||||
### Change Tax Provider
|
||||
|
||||
The tax provider that you choose defines how taxes are calculated for products and shipping options on checkout. Medusa provides a default tax provider with the name “System Tax Provider”.
|
||||
|
||||
If you have integrated a custom tax provider and want to use it to calculate taxes in a region:
|
||||
|
||||
1. Go to Settings → Taxes.
|
||||
2. Select a region whose taxes you want to edit.
|
||||
3. Change the selected tax provider in the Tax Provider field.
|
||||
4. Click Save at the bottom right.
|
||||
|
||||
### Disable Automatic Taxes Calculation
|
||||
|
||||
By default, taxes are calculated automatically by Medusa. They’re calculated in different places during checkout, such as when a shipping method is chosen or when a new product is added to the cart.
|
||||
|
||||
If you use a third-party tax provider and you want to avoid sending too many requests to the tax provider, you can disable this behavior.
|
||||
|
||||
:::caution
|
||||
|
||||
If you switch off automatic taxes calculation, the taxes must be calculated manually on checkout. If you’re unsure how that works, please contact your technical team.
|
||||
|
||||
:::
|
||||
|
||||
To disable automatic taxes calculation:
|
||||
|
||||
1. Go to Settings → Taxes.
|
||||
2. Select a region whose tax you want to edit.
|
||||
3. Check off the “Calculate taxes automatically” input.
|
||||
4. Click Save at the bottom right.
|
||||
|
||||
### Disable Taxes for Gift Cards
|
||||
|
||||
To disable applying taxes for Gift Cards:
|
||||
|
||||
1. Go to Settings → Taxes.
|
||||
2. Select a region whose tax you want to edit.
|
||||
3. Check off the “Apply tax to gift cards” input.
|
||||
4. Click Save at the bottom right.
|
||||
|
||||
Enabling taxes for Gift Cards follows the same process, except you check the input.
|
||||
@@ -0,0 +1,131 @@
|
||||
---
|
||||
sidebar_position: 5
|
||||
description: 'This user guide explains how to manage tax inclusive pricing on the Medusa admin.'
|
||||
addHowToData: true
|
||||
---
|
||||
|
||||
import UiIcon from '@site/src/components/UiIcon';
|
||||
|
||||
# Tax Inclusive Pricing Overview
|
||||
|
||||
In this document, you’ll learn how to change tax-inclusive settings, and how prices are applied based on whether tax-inclusive pricing is enabled or not.
|
||||
|
||||
:::note
|
||||
|
||||
Tax-inclusive pricing is currently in beta mode and need to be manually enabled in your store using [feature flags](../../development/feature-flags/toggle.md). If you’re unsure how that works, please contact your technical team.
|
||||
|
||||
:::
|
||||
|
||||
## Overview
|
||||
|
||||
If you sell in multiple countries or regions that share the same currency, you might run into an issue when specifying prices without taxes, as countries that have the same currency might have different tax rates.
|
||||
|
||||
In that case, if you want to show the same price for a currency regardless of what region the customer is browsing from, you’d have to manually run calculations to specify the correct price for all regions.
|
||||
|
||||
Tax-inclusive pricing saves you the manual work. When tax-inclusive pricing is enabled, you can just enter the price you want the customer to see on the storefront. Medusa then takes care of calculating the tax amount applied to the item based on the tax rate.
|
||||
|
||||
Tax-inclusive pricing can be managed for the following domains:
|
||||
|
||||
- Regions
|
||||
- Currencies
|
||||
- Price Lists
|
||||
- Shipping Options
|
||||
|
||||
The settings for these domains can affect other domains associated with them.
|
||||
|
||||
:::info
|
||||
|
||||
Tax-Inclusive pricing is disabled by default for all these domains.
|
||||
|
||||
:::
|
||||
|
||||
---
|
||||
|
||||
## Tax-Inclusive Pricing for Regions
|
||||
|
||||
When tax-inclusive pricing is enabled for a region, it is subsequently enabled for product prices, the tax calculation on the line items in a cart, and the cart’s subtotal calculations.
|
||||
|
||||
### Change Tax-Inclusive Pricing for Existing Regions
|
||||
|
||||
To change the tax-inclusive pricing setting for an existing region:
|
||||
|
||||
1. Go to Settings → Regions.
|
||||
2. Select a region to edit.
|
||||
3. In the first section on the right, click on the <UiIcon lightIcon="https://res.cloudinary.com/dza7lstvk/image/upload/v1667999308/Medusa%20Docs/UI%20Icons/1ordBC6_ssysel.png" darkIcon="https://res.cloudinary.com/dza7lstvk/image/upload/v1667999326/Medusa%20Docs/UI%20Icons/dSwWYBH_stzgoi.png" alt="three dots" /> icon.
|
||||
4. Click on Edit Region Details from the dropdown.
|
||||
5. In the window that opens, find the Tax Inclusive Prices field and enable or disable it.
|
||||
6. Click on the “Save and close” button.
|
||||
|
||||
### Set Tax-Inclusive Pricing for New Regions
|
||||
|
||||
To set the tax-inclusive pricing setting for a new region:
|
||||
|
||||
1. Go to Settings → Regions.
|
||||
2. Click on the <UiIcon lightIcon="https://res.cloudinary.com/dza7lstvk/image/upload/v1667999131/Medusa%20Docs/UI%20Icons/1hL8NiW_lqmjcq.png" darkIcon="https://res.cloudinary.com/dza7lstvk/image/upload/v1667999150/Medusa%20Docs/UI%20Icons/8LtkPqW_jyqz5i.png" alt="plus" /> icon at the top right of the Regions section.
|
||||
3. In the form that opens and among other Region details, find the Tax Inclusive Prices field and enable or disable it.
|
||||
|
||||
---
|
||||
|
||||
## Tax-Inclusive Pricing for Currencies
|
||||
|
||||
When tax-inclusive pricing is enabled for a currency, it is subsequently enabled for:
|
||||
|
||||
- Prices of product variants in this currency.
|
||||
- Tax calculation on the line items or products in a cart using this currency.
|
||||
- Prices in this currency of product variants in a price list.
|
||||
|
||||
### Change Tax-Inclusive Pricing for Currencies
|
||||
|
||||
To change the tax-inclusive pricing setting for a currency:
|
||||
|
||||
1. Go to Settings → Currencies.
|
||||
2. Under Store Currencies, find the currency you’re making the change to.
|
||||
3. On the right of the currency, enable or disable tax-inclusive pricing.
|
||||
|
||||
---
|
||||
|
||||
## Tax-Inclusive Pricing for Price Lists
|
||||
|
||||
When tax-inclusive pricing is enabled for a price list, it is subsequently enabled for all product variants in that price list.
|
||||
|
||||
:::info
|
||||
|
||||
If tax-inclusive pricing is not enabled for a price list, but a price for a product variant in the price list uses a currency that has tax-inclusive pricing enabled, then tax-inclusive pricing is subsequently enabled on that price.
|
||||
|
||||
:::
|
||||
|
||||
### Change Tax-Inclusive Pricing for Existing Price Lists
|
||||
|
||||
To change the tax-inclusive pricing setting for an existing price list:
|
||||
|
||||
1. Go to Pricing
|
||||
2. Click on the price list you want to make the change to.
|
||||
3. Click on the <UiIcon lightIcon="https://res.cloudinary.com/dza7lstvk/image/upload/v1667999308/Medusa%20Docs/UI%20Icons/1ordBC6_ssysel.png" darkIcon="https://res.cloudinary.com/dza7lstvk/image/upload/v1667999326/Medusa%20Docs/UI%20Icons/dSwWYBH_stzgoi.png" alt="three dots" /> icon at the top right of the first section.
|
||||
4. Choose “Edit price list details” from the dropdown.
|
||||
5. In the new form that opens, expand the General collapsible and find the “Tax inclusive prices” field and enable or disable it.
|
||||
6. Click on the “Save and Close” button.
|
||||
|
||||
### Set Tax-Inclusive Pricing for New Price Lists
|
||||
|
||||
To set the tax-inclusive pricing setting for a new price list:
|
||||
|
||||
1. Go to Pricing.
|
||||
2. Click on the “Add price list” button at the top right.
|
||||
3. In the new form that opens, expand the General collapsible.
|
||||
4. Find the “Tax inclusive prices” field and enable or disable it.
|
||||
|
||||
---
|
||||
|
||||
## Tax-Inclusive Pricing for Shipping Options
|
||||
|
||||
When tax-inclusivity is enabled for a shipping option, it is subsequently enabled for the shipping method a customer uses on checkout and for the cart’s shipping calculations.
|
||||
|
||||
Tax-inclusive pricing is enabled or disabled on creation based on whether the Region it is in has the tax-inclusive pricing enabled or not.
|
||||
|
||||
---
|
||||
|
||||
## Tax-Inclusive Pricing for Products
|
||||
|
||||
Tax-inclusivity for products’ pricing is affected by the tax-inclusive options of currencies, regions, or price lists.
|
||||
|
||||
When specifying the price of a product for a currency or a region, the <UiIcon lightIcon="https://res.cloudinary.com/dza7lstvk/image/upload/v1668071655/Medusa%20Docs/UI%20Icons/taxes_hoogia.png" darkIcon="https://res.cloudinary.com/dza7lstvk/image/upload/v1668071655/Medusa%20Docs/UI%20Icons/taxes-dark_mwu0us.png" alt="tax-inclusive" /> icon will be greyed out if it’s disabled for that currency/region. If it’s enabled, the icon will be colored.
|
||||
@@ -0,0 +1,81 @@
|
||||
---
|
||||
sidebar_position: 4
|
||||
description: 'This user guide explains how to manage tax overrides on the Medusa admin. Learn how to add, edit, and delete overrides.'
|
||||
addHowToData: true
|
||||
---
|
||||
|
||||
import UiIcon from '@site/src/components/UiIcon';
|
||||
|
||||
# Manage Tax Overrides
|
||||
|
||||
In this document, you’ll learn how to manage tax overrides in your Medusa Admin.
|
||||
|
||||
## Overview
|
||||
|
||||
When you create or edit a [tax rate](./tax-rates.mdx), you can add, edit, and delete overrides. Overrides are used to customize the tax rate applied for some products, product types, or shipping options.
|
||||
|
||||
### Override Types
|
||||
|
||||
There are three override types:
|
||||
|
||||
1. **Products**: Used to override the tax rate applied on specific products during checkout.
|
||||
2. **Product Types:** Used to override the tax rate applied on a product type. This subsequently overrides the tax rate of any product having this type during checkout.
|
||||
3. **Shipping Options:** Used to override the tax rate applied on selected shipping methods during checkout.
|
||||
|
||||
---
|
||||
|
||||
## Add Override
|
||||
|
||||
To add an override while [adding or editing a tax rate](./tax-rates.mdx#create-tax-rate):
|
||||
|
||||
1. Go to Settings → Taxes
|
||||
2. Select the region that the tax rate you want to edit belongs to.
|
||||
3. Either [add a tax rate](./tax-rates.mdx#create-tax-rate) or [edit an existing one](./tax-rates.mdx#edit-tax-rate). This will open the tax rate form in a pop-up.
|
||||
3. Under the Overrides section, click Add Overrides
|
||||
4. Choose the type of the override, then choose the specific entries in that type that you want to apply the tax rate to. For example, if you chose the Products type, choose at least one product to apply the override to.
|
||||
5. Once done, click on Add.
|
||||
6. In the tax rate form, click on Save.
|
||||
|
||||
:::info
|
||||
|
||||
If you already have an override for one of the types, and you choose to add a new override for that same type, the new override replaces the old one. If you want to add new entries to the same type (for example, add more products to the Products override), you should [edit the existing override](#edit-override) instead.
|
||||
|
||||
:::
|
||||
|
||||
---
|
||||
|
||||
## Edit Override
|
||||
|
||||
You can edit an override to select more entries for or remove entries from an override type.
|
||||
|
||||
To edit an override:
|
||||
|
||||
1. Go to Settings → Taxes
|
||||
2. Select the region that the tax rate you want to edit belongs to.
|
||||
3. From the list of tax rates in the Details section, find the tax rate that the override you want to edit belongs to and click the <UiIcon lightIcon="https://res.cloudinary.com/dza7lstvk/image/upload/v1667999308/Medusa%20Docs/UI%20Icons/1ordBC6_ssysel.png" darkIcon="https://res.cloudinary.com/dza7lstvk/image/upload/v1667999326/Medusa%20Docs/UI%20Icons/dSwWYBH_stzgoi.png" alt="three dots" /> icon.
|
||||
4. Under the overrides section, find the override type you want to edit. For example, if you want to add a product to the overrides, find the override with the title “Product Rules”.
|
||||
5. Click on the <UiIcon lightIcon="https://res.cloudinary.com/dza7lstvk/image/upload/v1667999308/Medusa%20Docs/UI%20Icons/1ordBC6_ssysel.png" darkIcon="https://res.cloudinary.com/dza7lstvk/image/upload/v1667999326/Medusa%20Docs/UI%20Icons/dSwWYBH_stzgoi.png" alt="three dots" /> icon next to the override type.
|
||||
6. Choose Edit from the dropdown.
|
||||
7. You can then change the selected entries for the override type.
|
||||
8. Once done, click Add.
|
||||
9. In the edit form of the tax rate, click Save.
|
||||
|
||||
---
|
||||
|
||||
## Delete Override
|
||||
|
||||
:::caution
|
||||
|
||||
If you delete an override you won’t be able to restore it and it won’t be applied during checkout. If you want to, instead, remove some entries from an override type, you should [edit the override](#edit-override) instead.
|
||||
|
||||
:::
|
||||
|
||||
To delete an override:
|
||||
|
||||
1. Go to Settings → Taxes
|
||||
2. Select the region that the tax rate you want to edit belongs to.
|
||||
3. From the list of tax rates in the Details section, find the tax rate that the override you want to delete belongs to and click the <UiIcon lightIcon="https://res.cloudinary.com/dza7lstvk/image/upload/v1667999308/Medusa%20Docs/UI%20Icons/1ordBC6_ssysel.png" darkIcon="https://res.cloudinary.com/dza7lstvk/image/upload/v1667999326/Medusa%20Docs/UI%20Icons/dSwWYBH_stzgoi.png" alt="three dots" /> icon.
|
||||
4. Under the overrides section, find the override type you want to delete.
|
||||
5. Click on the <UiIcon lightIcon="https://res.cloudinary.com/dza7lstvk/image/upload/v1667999308/Medusa%20Docs/UI%20Icons/1ordBC6_ssysel.png" darkIcon="https://res.cloudinary.com/dza7lstvk/image/upload/v1667999326/Medusa%20Docs/UI%20Icons/dSwWYBH_stzgoi.png" alt="three dots" /> icon next to the override type.
|
||||
6. Choose “Delete rule” from the dropdown.
|
||||
7. Click Save.
|
||||
@@ -0,0 +1,65 @@
|
||||
---
|
||||
sidebar_position: 3
|
||||
description: 'This user guide explains how to manage tax rates on the Medusa admin. Learn how to create, edit, and delete tax rates.'
|
||||
addHowToData: true
|
||||
---
|
||||
|
||||
import UiIcon from '@site/src/components/UiIcon';
|
||||
|
||||
# Manage Tax Rates
|
||||
|
||||
In this document, you’ll learn how to manage tax rates in your Medusa Admin.
|
||||
|
||||
## Overview
|
||||
|
||||
Regions have at least one tax rate, which is the default tax rate. You can, however, add more tax rates for further customization. You can also edit or delete tax rates.
|
||||
|
||||
---
|
||||
|
||||
## Create Tax Rates
|
||||
|
||||
To add a tax rate:
|
||||
|
||||
1. Go to Settings → Taxes
|
||||
2. Select a region that you want to add a new tax rate to.
|
||||
3. Click on New Tax Rate at the top right of the Details section.
|
||||
4. This opens the tax rate form in a new window. You must enter a name, rate, and tax code of the new tax rate.
|
||||
5. You can optionally [add overrides to the tax rate](./tax-overrides.mdx).
|
||||
6. Once done, click Save.
|
||||
|
||||
---
|
||||
|
||||
## Edit Tax Rate
|
||||
|
||||
To edit a tax rate:
|
||||
|
||||
1. Go to Settings → Taxes
|
||||
2. Select the region that the tax rate you want to edit belongs to.
|
||||
3. From the list of tax rates in the Details section, find the tax rate you want to edit and click the <UiIcon lightIcon="https://res.cloudinary.com/dza7lstvk/image/upload/v1667999308/Medusa%20Docs/UI%20Icons/1ordBC6_ssysel.png" darkIcon="https://res.cloudinary.com/dza7lstvk/image/upload/v1667999326/Medusa%20Docs/UI%20Icons/dSwWYBH_stzgoi.png" alt="three dots" /> icon.
|
||||
4. Choose Edit from the dropdown.
|
||||
5. In the form that opens in the new window, you can edit the basic details of the tax rate such as the name or rate. If you’re editing a tax rate that’s not the default, you can [manage overrides of this tax rate](./tax-overrides.mdx).
|
||||
6. Once done, click Save.
|
||||
|
||||
---
|
||||
|
||||
## Delete Tax Rate
|
||||
|
||||
:::warning
|
||||
|
||||
If you delete a tax rate, you won’t be able to restore it or use it during checkout.
|
||||
|
||||
:::
|
||||
|
||||
To delete a tax rate:
|
||||
|
||||
1. Go to Settings → Taxes
|
||||
2. Select the region that the tax rate you want to delete belongs to.
|
||||
3. From the list of tax rates in the Details section, find the tax rate you want to delete and click the <UiIcon lightIcon="https://res.cloudinary.com/dza7lstvk/image/upload/v1667999308/Medusa%20Docs/UI%20Icons/1ordBC6_ssysel.png" darkIcon="https://res.cloudinary.com/dza7lstvk/image/upload/v1667999326/Medusa%20Docs/UI%20Icons/dSwWYBH_stzgoi.png" alt="three dots" /> icon.
|
||||
4. Choose Delete Tax Rate from the dropdown.
|
||||
5. Confirm deleting the tax rate by clicking the “Yes, confirm” button in the pop-up.
|
||||
|
||||
:::info
|
||||
|
||||
Default tax rates can’t be deleted. If you don’t want to apply any taxes in a region, you can instead set the default tax rate to zero.
|
||||
|
||||
:::
|
||||
Reference in New Issue
Block a user