Files
medusa-store/www/apps/docs/content/user-guide/regions/shipping-options.mdx
Shahed Nasser bb87db8342 docs: prep for v2 documentation (#6710)
This PR includes documentation that preps for v2 docs (but doesn't introduce new docs).

_Note: The number of file changes in the PR is due to find-and-replace within the `references` which is unavoidable. Let me know if I should move it to another PR._

## Changes

- Change Medusa version in base OAS used for v2.
- Fix to docblock generator related to not catching all path parameters.
- Added typedoc plugin that generates ER Diagrams, which will be used specifically for data model references in commerce modules.
- Changed OAS tool to output references in `www/apps/api-reference/specs-v2` directory when the `--v2` option is used.
- Added a version switcher to the API reference to switch between V1 and V2. This switcher is enabled by an environment variable, so it won't be visible/usable at the moment.
- Upgraded docusaurus to v3.0.1
- Added new Vale rules to ensure correct spelling of Medusa Admin and module names.
- Added new components to the `docs-ui` package that will be used in future documentation changes.
2024-03-18 07:47:35 +00:00

125 lines
8.1 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
sidebar_position: 4
sidebar_label: Manage Shipping Options
description: 'This user guide explains how to manage shipping options in a region on the Medusa Admin.'
addHowToData: true
---
import UiIcon from '@site/src/components/UiIcon';
# Manage Shipping Options in a Region
In this document, youll learn how to manage a regions shipping options in your Medusa Admin.
## Types of Shipping Options
There are two types of shipping options in a region:
1. Shipping Options that are used when a customer places an order or when an admin creates a draft order.
2. Return Shipping Options that are used when a customer requests a return or exchange for their order, or when an admin registers an exchange, a claim, or a return for an order.
A shipping option cant be used for both cases. In a region, you can create an unlimited amount of shipping options and return shipping options.
---
## Manage Shipping Options in a Region
### Add Shipping Option to a Region
To add a shipping option:
1. Go to Settings → Regions.
2. Select the shipping option's region.
3. Scroll down to the Shipping Options section on the right side.
4. Click on the Add Option button.
5. A new window will open with a form with the following fields:
- **Visible in Store:** Whether or not this option should be available on the website. This is useful if you want to create a shipping option only for use on the Medusa Admin (for example, to create draft orders).
- **Title (Required):** The name of the shipping option. The customer will see this name on the storefront if the “Show on Website” field is checked.
- **Price Type (Required):** The type of price. It can be either Flat Rate or Calculated. If you choose Flat Rate, this will show a new field **Price**. If you choose Calculated, it's assumed the calculation of the shipping option is handled using custom logic implemented in the Fulfillment provider.
- **Price:** This field is only available and required when you set the **Price Type** to Flat Rate. It indicates the price of the shipping option.
- **Shipping Profile (Required):** The shipping profile this option belongs to.
- **Fulfillment Method (Required):** the fulfillment provider that will handle fulfilling this shipping option.
- **Requirements:** You can use this section to specify a condition for when this shipping option should be available during checkout or draft-order creation. The "Min. subtotal" field indicates the minimum cart subtotal required to use this shipping option, and the "Max. subtotal" field indicates the maximum cart subtotal required to use this shipping option. For example, you can fill in the first field “100” to only allow using this shipping option if the carts subtotal is at least $100.
- **Metadata**: This section allows you to add custom data to the shipping option in the form of a key-value pair. This is mostly helpful for technical teams and developers.
6. Once youre done, click the "Save and close" button.
### Edit a Shipping Option
To edit a shipping option:
1. Go to Settings → Regions.
2. Select the shipping option's region.
3. Scroll down to the Shipping Options section on the right side.
4. Find the shipping option you want to edit and click on the three dots icon at its right.
5. Click on Edit in the dropdown.
6. A new window will open with the fields that you can edit. You can edit all of the fields you chose while adding the shipping option except for the Shipping Profile and Fulfillment Method.
7. Once youre done, click the Save and close button.
### Delete a Shipping Option
:::warning
If you delete a shipping option, you cant restore it or its data, customers cant use it during checkout, and admins cant use it for draft orders.
:::
To delete a shipping option:
1. Go to Settings → Regions.
2. Select the shipping option's region.
3. Scroll down to the Shipping Options section on the right side.
4. Find the shipping option you want to edit and 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 its right.
5. Click on Delete in the dropdown.
---
## Manage Return Shipping Options in a Region
### Add Return Shipping Option to a Region
To add a return shipping option:
1. Go to Settings → Regions.
2. Select the shipping option's region.
3. Scroll down to the Return Shipping Options section on the right side.
4. Click on the Add Option button.
5. A new window will open with a form with the following fields:
- **Visible in Store:** Whether or not this option should be available on the website. This is useful if you want to create a return shipping option only for use on the Medusa Admin (for example, to create an order return).
- **Title (Required):** The name of the shipping option. The customer will see this name on the storefront if the “Show on Website” field is checked.
- **Price Type (Required):** The type of price. It can be either Flat Rate or Calculated. If you choose Flat Rate, this will show a new field **Price**. If you choose Calculated, it's assumed the calculation of the shipping option is handled using custom logic implemented in the Fulfillment provider.
- **Price:** This field is only available and required when you set the **Price Type** to Flat Rate. It indicates the price of the shipping option.
- **Shipping Profile (Required):** The shipping profile this option belongs to.
- **Fulfillment Method (Required):** the fulfillment provider that will handle fulfilling this shipping option.
- **Requirements:** You can use this section to specify a condition for when this shipping option should be available when creating a return or exchange. The "Min. subtotal" field indicates the minimum subtotal required to use this shipping option, and the "Max. subtotal" field indicates the maximum subtotal required to use this shipping option. For example, you can fill in the first field “100” to only allow using this shipping option if the carts subtotal is at least $100.
- **Metadata**: This section allows you to add custom data to the shipping option in the form of a key-value pair. This is mostly helpful for technical teams and developers.
6. Once youre done, click the "Save and close" button.
6. Once youre done, click the Save and close button.
### Edit a Return Shipping Option
To edit a return shipping option:
1. Go to Settings → Regions.
2. Select the shipping option's region.
3. Scroll down to the Return Shipping Options section on the right side.
4. Find the shipping option you want to edit and 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 its right.
5. Click on Edit in the dropdown.
6. A new window will open with the fields that you can edit. You can edit all of the fields you chose while adding the shipping option except for the Shipping Profile and Fulfillment Method.
7. Once youre done, click the Save and close button.
### Delete a Return Shipping Option
:::warning
If you delete a return shipping option, you cant restore it or its data, customers cant use it when they request a return or an exchange, and admins cant use it when requesting a return for an order or registering an exchange or claim for an order.
:::
To delete a return shipping option:
1. Go to Settings → Regions.
2. Select the shipping option's region.
3. Scroll down to the Return Shipping Options section on the right side.
4. Find the shipping option you want to edit and 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 its right.
5. Click on Delete in the dropdown.