Files
medusa-store/www/apps/docs/content/user-guide/gift-cards/manage.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

223 lines
11 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: 2
description: 'This user guide explains how to manage the main gift card on the Medusa Admin. Learn how to create, edit, and delete a gift card.'
addHowToData: true
---
import UiIcon from '@site/src/components/UiIcon';
# Manage a Gift Card
In this document, youll learn about managing gift cards, including how to create, edit, and delete them.
## Create Gift Card
:::info
You can only create one gift card per store.
:::
Click on Gift Cards in the sidebar menu. If you dont have any gift cards you should see a prompt to create your first gift card.
To create a Gift Card:
1. Click on Create Gift Card.
2. In the new pop-up that opens:
- Enter a name for the gift card
- You can optionally enter a description and a thumbnail.
- Click on Add Denomination. You must at least add one denomination
- For each denomination, choose the currency and amount.
- If you want to delete a denomination, you can click the <UiIcon lightIcon="https://res.cloudinary.com/dza7lstvk/image/upload/v1667999273/Medusa%20Docs/UI%20Icons/7hztVhj_mj6mxu.png" darkIcon="https://res.cloudinary.com/dza7lstvk/image/upload/v1667999290/Medusa%20Docs/UI%20Icons/1yp4PNt_vzwnhf.png" alt="trash" /> icon.
3. Once youre done, click the "Create & Publish" button.
:::tip
If you want to add more than one currency value for a denomination, you can do that when you [edit a denomination](#edit-a-denomination).
:::
---
## Edit Gift Card
To edit a Gift Card:
1. Go to the Gift Cards page from the sidebar menu.
2. Next to the main gift card, 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.
3. Choose Edit from the dropdown.
This opens a page with the Gift Card's details.
### Edit Gift Card Information
To edit the gift card's information:
1. 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.
2. Click on "Edit General Information" from the dropdown.
3. In the pop-up that opens, you can edit the gift card's general information such as name or handle. You can also organize the gift card into a product type or product collection, or add product tags. In addition, you can specify if the gift card is Discountable.
4. Once you're done, click on the Save button.
:::info
The handle is the URL used on the storefront to view the Gift Card.
:::
### Add a Denomination
To add a denomination:
1. In the Denominations section, 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.
2. Click on "Add Denomination" from the dropdown.
3. In the pop-up that opens:
- Under default currency, enter the denomination's amount for the default store's currency.
- The "Use value for all currencies?" field allows you to specify whether the amount entered for the default currency should be applied to all currencies. Toggling this one on will hide the "Other currencies" section.
- Under the "Other currencies" section, which is only available if "Use value for all currencies?" is disabled, you can enter the amount for each currency in your store.
- Under the Metadata section, you can attach custom data to the denomination in key-value pairs. This is mainly useful for technical teams and developers.
4. Once youre done, click the "Save and close" button.
### Edit a Denomination
To edit a denomination:
1. In the Denominations section, find the denomination you want to edit.
2. 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 right side of the denomination's row.
3. Click on Edit from the dropdown.
4. This opens a pop-up to edit the denomination. This form is similar to the [Add Denomination](#add-a-denomination) form. You can edit the amount for the default currency. You can also specify or edit the amount for other currencies if the "Use value for all currencies?" field is disabled, and you can add Metadata fields.
5. Once youre done, click on the "Save and close" button.
### Delete a Denomination
:::warning
If you delete a denomination, customers wont be able to find it in the storefront, purchase it, or use it.
:::
To delete a denomination:
1. In the Denominations section, find the denomination you want to delete.
2. 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 right side of the denomination's row.
3. Click on Delete from the dropdown.
4. Confirm deleting the denomination by clicking the “Yes, confirm button in the pop-up.
### Change Thumbnail Image
To change the thumbnail image:
1. Go to the Thumbnail section.
2. If you have an existing thumbnail image, you can click the Edit button to change it. Otherwise, you can click the Upload button to add a thumbnail image.
3. In the pop-up that opens, either click on the dotted box to upload an image or drag your image from your computer.
4. Once you're done, click the "Save and close" button.
:::note
If you face any errors or difficulties while uploading an image, please contact your technical support team as this could be an issue in the storage integration used.
:::
### Delete Thumbnail Image
To delete the thumbnail image:
1. Go to the Thumbnail section.
2. Click on the <UiIcon lightIcon="https://res.cloudinary.com/dza7lstvk/image/upload/v1667999273/Medusa%20Docs/UI%20Icons/7hztVhj_mj6mxu.png" darkIcon="https://res.cloudinary.com/dza7lstvk/image/upload/v1667999290/Medusa%20Docs/UI%20Icons/1yp4PNt_vzwnhf.png" alt="trash" /> icon.
3. Click on the button again to confirm the deletion.
### Add Images
:::info
You can add up to ten images for a Gift Card.
:::
To add images to the Gift Card:
1. Go to the Media section.
2. Click on the Edit Media button.
3. In the pop-up that opens, either click on the dotted box to upload an image or drag your image from your computer.
3. Once you're done, click the "Save and close" button.
:::note
If you face any errors or difficulties while uploading an image, please contact your technical support team as this could be an issue in the storage integration used.
:::
### Delete Gift Card Image
:::warning
If you delete an image, you wont be able to restore it.
:::
To delete a gift card image:
1. Go to the Images section.
2. Click on the Edit Media button.
3. In the pop-up, find the image you want to delete from the existing images.
4. 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 right side of the image.
5. Choose Delete from the dropdown.
3. Once you're done, click the "Save and close" button.
---
## Unpublish Gift Card
:::warning
Unpublishing a gift card prevents customers from seeing the gift card in the storefront, purchasing it, or using it.
:::
### On Gift Cards Page
1. 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 main gift card.
2. Choose Unpublish from the dropdown.
### On Edit Gift Card Page
1. In the first section, you'll find the status of the gift card with a <UiIcon lightIcon="https://res.cloudinary.com/dza7lstvk/image/upload/v1667999685/Medusa%20Docs/UI%20Icons/yrTcDO4_tulwph.png" darkIcon="https://res.cloudinary.com/dza7lstvk/image/upload/v1667999685/Medusa%20Docs/UI%20Icons/yrTcDO4_tulwph.png" alt="green" /> icon if its published or a <UiIcon lightIcon="https://res.cloudinary.com/dza7lstvk/image/upload/v1667999700/Medusa%20Docs/UI%20Icons/0lUln3B_arpgmo.png" darkIcon="https://res.cloudinary.com/dza7lstvk/image/upload/v1667999700/Medusa%20Docs/UI%20Icons/0lUln3B_arpgmo.png" alt="grey" /> icon if its a draft.
2. Click on the status, and a dropdown will show to toggle the status. For example, if the status of the gift card is Published, the dropdown will show a Draft status.
3. Choose the status in the dropdown, and the status of the gift card will change.
---
## Publish Gift Card
:::note
Publishing a gift card allows customers to see the gift card on the storefront, purchase it, and use it.
:::
### On Gift Cards Page
1. 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 main gift card.
2. Choose Publish.
### On Edit Gift Card Page
1. In the first section, you'll find the status of the gift card with a <UiIcon lightIcon="https://res.cloudinary.com/dza7lstvk/image/upload/v1667999685/Medusa%20Docs/UI%20Icons/yrTcDO4_tulwph.png" darkIcon="https://res.cloudinary.com/dza7lstvk/image/upload/v1667999685/Medusa%20Docs/UI%20Icons/yrTcDO4_tulwph.png" alt="green" /> icon if its published or a <UiIcon lightIcon="https://res.cloudinary.com/dza7lstvk/image/upload/v1667999700/Medusa%20Docs/UI%20Icons/0lUln3B_arpgmo.png" darkIcon="https://res.cloudinary.com/dza7lstvk/image/upload/v1667999700/Medusa%20Docs/UI%20Icons/0lUln3B_arpgmo.png" alt="grey" /> icon if its a draft.
2. Click on the status, and a dropdown will show to toggle the status. For example, if the status of the gift card is Published, the dropdown will show a Draft status.
3. Choose the status in the dropdown, and the status of the gift card will change.
---
## Delete Gift Card
:::warning
If you delete a gift card, you cant restore it or its settings. Customers also cant use the gift card if they had previously purchased it.
:::
To delete a gift card:
1. Go to the Gift Cards page from the sidebar menu.
2. 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 main gift card.
3. Choose Delete from the dropdown.
4. Confirm deleting the gift card by clicking the “Yes, delete” button in the pop-up.