docs: added manage products documentation (#3867)
* docs: added manage products documentation * lint fixes * generated oas types
This commit is contained in:
@@ -191,25 +191,6 @@ For other distributions, you can check out [PostgreSQL’s website for more guid
|
||||
|
||||
You can download PostgreSQL on your macOS using [the installer on their website](https://www.postgresql.org/download/macosx/).
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="docker" label="Docker">
|
||||
|
||||
Make sure the Docker Desktop app is running, then run the following command to quickly spin up a PostgreSQL instance:
|
||||
|
||||
```bash
|
||||
docker run --name postgres -e POSTGRES_USER=postgres \
|
||||
-e POSTGRES_PASSWORD=postgres -e \
|
||||
POSTGRES_DB=medusa-docker -p 5432:5432 -d postgres
|
||||
```
|
||||
|
||||
Where:
|
||||
|
||||
- `--name` creates a new container named `postgres`.
|
||||
- `-e` creates environment variables `POSTGRES_USER`, `POSTGRES_PASSWORD` and `POSTGRES_DB`. These will be used to set up a database named `medusa-docker` with the username and password being `postgres`.
|
||||
- `-p` maps the container port `5432` to the external host `5432`. This allows you to connect to the database backend from outside of the container.
|
||||
- `-d` enables Docker to run the container in the background.
|
||||
- The last section of the command, `postgres` grabs the latest postgres image from the Docker hub.
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -24,7 +24,7 @@ Admins can manage unlimited amount of products and their variants. They can mana
|
||||
<DocCardList colSize={4} items={[
|
||||
{
|
||||
type: 'link',
|
||||
href: '#',
|
||||
href: '/modules/products/admin/manage-products',
|
||||
label: 'Admin: Manage Products',
|
||||
customProps: {
|
||||
icon: Icons['academic-cap-solid'],
|
||||
@@ -127,7 +127,7 @@ Admins can bulk import and export products using CSV files. This facilitates mov
|
||||
|
||||
Learn how product-related entities are build, their relation to other modules, and more.
|
||||
|
||||
<DocCardList colSize={4} items={[
|
||||
<DocCardList colSize={6} items={[
|
||||
{
|
||||
type: 'link',
|
||||
href: '/modules/products',
|
||||
@@ -146,16 +146,6 @@ Learn how product-related entities are build, their relation to other modules, a
|
||||
description: 'Learn about the Product Category Architecture.',
|
||||
}
|
||||
},
|
||||
{
|
||||
type: 'link',
|
||||
href: '#',
|
||||
label: 'Architecture: Collection',
|
||||
customProps: {
|
||||
icon: Icons['circle-stack-solid'],
|
||||
description: 'Learn about the Collection Architecture.',
|
||||
isSoon: true,
|
||||
}
|
||||
},
|
||||
]} />
|
||||
|
||||
---
|
||||
|
||||
+1
-1
@@ -72,7 +72,7 @@ export interface AdminPostProductsProductVariantsVariantReq {
|
||||
* An optional set of key-value pairs with additional information.
|
||||
*/
|
||||
metadata?: Record<string, any>
|
||||
prices: Array<{
|
||||
prices?: Array<{
|
||||
/**
|
||||
* The ID of the price.
|
||||
*/
|
||||
|
||||
@@ -8,7 +8,7 @@ import { EntityManager } from "typeorm"
|
||||
/**
|
||||
* @oas [post] /admin/products/{id}/options
|
||||
* operationId: "PostProductsProductOptions"
|
||||
* summary: "Add an Option"
|
||||
* summary: "Add a Product Option"
|
||||
* x-authenticated: true
|
||||
* description: "Adds a Product Option to a Product"
|
||||
* parameters:
|
||||
|
||||
@@ -22,7 +22,7 @@ import { ProductService } from "../../../../services"
|
||||
* const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
|
||||
* // must be previously logged in or use api token
|
||||
* medusa.admin.products.deleteOption(product_id, option_id)
|
||||
* .then(({ option_id, object, delete, product }) => {
|
||||
* .then(({ option_id, object, deleted, product }) => {
|
||||
* console.log(product.id);
|
||||
* });
|
||||
* - lang: Shell
|
||||
|
||||
@@ -150,8 +150,6 @@ class ProductVariantOptionReq {
|
||||
/**
|
||||
* @schema AdminPostProductsProductVariantsVariantReq
|
||||
* type: object
|
||||
* required:
|
||||
* - prices
|
||||
* properties:
|
||||
* title:
|
||||
* description: The title to identify the Product Variant by.
|
||||
|
||||
+15
-41
@@ -210,17 +210,18 @@ module.exports = {
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
type: 'doc',
|
||||
id: 'deployments/server/deploying-on-microtica',
|
||||
label: 'Deploy on Microtica',
|
||||
customProps: {
|
||||
themedImage: {
|
||||
light: 'https://res.cloudinary.com/dza7lstvk/image/upload/v1681296578/Medusa%20Docs/Other/aF4ZuDS_t11rcu.png',
|
||||
dark: 'https://res.cloudinary.com/dza7lstvk/image/upload/v1681296612/Medusa%20Docs/Other/Lg7NHQk_qo6oax.png'
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
type: "doc",
|
||||
id: "deployments/server/deploying-on-microtica",
|
||||
label: "Deploy on Microtica",
|
||||
customProps: {
|
||||
themedImage: {
|
||||
light:
|
||||
"https://res.cloudinary.com/dza7lstvk/image/upload/v1681296578/Medusa%20Docs/Other/aF4ZuDS_t11rcu.png",
|
||||
dark: "https://res.cloudinary.com/dza7lstvk/image/upload/v1681296612/Medusa%20Docs/Other/Lg7NHQk_qo6oax.png",
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
type: "doc",
|
||||
id: "deployments/server/deploying-on-qovery",
|
||||
@@ -597,14 +598,6 @@ module.exports = {
|
||||
id: "modules/products/categories",
|
||||
label: "Categories",
|
||||
},
|
||||
{
|
||||
type: "link",
|
||||
href: "#",
|
||||
label: "Collections",
|
||||
customProps: {
|
||||
sidebar_is_soon: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
type: "html",
|
||||
value: "How-to",
|
||||
@@ -613,26 +606,15 @@ module.exports = {
|
||||
},
|
||||
},
|
||||
{
|
||||
type: "link",
|
||||
href: "#",
|
||||
type: "doc",
|
||||
id: "modules/products/admin/manage-products",
|
||||
label: "Admin: Manage Products",
|
||||
customProps: {
|
||||
sidebar_is_soon: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
type: "doc",
|
||||
id: "modules/products/admin/manage-categories",
|
||||
label: "Admin: Manage Categories",
|
||||
},
|
||||
{
|
||||
type: "link",
|
||||
href: "#",
|
||||
label: "Admin: Manage Collections",
|
||||
customProps: {
|
||||
sidebar_is_soon: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
type: "doc",
|
||||
id: "modules/products/admin/import-products",
|
||||
@@ -648,14 +630,6 @@ module.exports = {
|
||||
id: "modules/products/storefront/use-categories",
|
||||
label: "Storefront: Use Categories",
|
||||
},
|
||||
{
|
||||
type: "link",
|
||||
href: "#",
|
||||
label: "Storefront: Show Collections",
|
||||
customProps: {
|
||||
sidebar_is_soon: true,
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
@@ -2583,4 +2557,4 @@ module.exports = {
|
||||
dirName: "references/entities/classes",
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user