diff --git a/README.md b/README.md index 77f6afab..362b7515 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Bagisto Documentation -You can find the online version of the Bagisto documentation at [https://devdocs.bagisto.com](https://devdocs.bagisto.com). +You can find the online version of the Bagisto documentation at [https://docs.bagisto.com](https://docs.bagisto.com). ## Contribution guide diff --git a/deploy.sh b/deploy.sh index 964c073a..cccecaaf 100644 --- a/deploy.sh +++ b/deploy.sh @@ -9,11 +9,11 @@ npm run docs:build # navigate into the build output directory cd docs/.vuepress/dist -echo 'devdocs.bagisto.com' > CNAME +echo 'docs.bagisto.com' > CNAME git init git add -A -git commit -m 'Deploy docs to GitHub' -git push -f git@github.com:bagisto/bagisto-docs.git master:gh-pages +git commit -m 'chore: deploy docs to GitHub' +git push -f git@github.com:bagisto/user-guide.git master:gh-pages cd - diff --git a/docs/.vuepress/config.js b/docs/.vuepress/config.js index e957a2a2..59691f0f 100644 --- a/docs/.vuepress/config.js +++ b/docs/.vuepress/config.js @@ -25,8 +25,6 @@ module.exports = { { text: 'Community Forum', link: 'https://forums.bagisto.com/' } ], sidebar: { - '/1.x/': require('./version-configs/1.x'), - '/1.5.x/': require('./version-configs/1.5.x'), '/2.x/': require('./version-configs/2.x') } }, diff --git a/docs/.vuepress/dist/2.x/products/bundle.html b/docs/.vuepress/dist/2.x/products/bundle.html new file mode 100644 index 00000000..30fb2a6c --- /dev/null +++ b/docs/.vuepress/dist/2.x/products/bundle.html @@ -0,0 +1,42 @@ + + + + + + Bundle Product | Bagisto Documentation + + + + + + + + +

# Bundle Product

Today's document will guide you on how to create bundle products in Bagisto. Bundle products and Grouped products are similar, where a bundle product includes customizable items that the store owner can configure to create a unique product in Bagisto (opens new window)

Each item in a bundle product can be based on one of the following product types:

  • Simple Product
  • Variants of Configurable Products

# Steps To Create A Bundle Product In Bagisto 2.0

  1. On the Bagisto admin dashboard, go to Catalog Section >> Products >> select Bundle under the Product Type.

  2. Select Attribute Family.

  3. Enter the SKU (Stock Keeping Unit) for the product (unique to every product).

  4. Click the Save Button.

    Bundle

After clicking on the Save Product button, you will be redirected to the next page with several new settings.

# General Settings

  • Name: Enter the name of the product.

  • URL Key: This will be the end of the URL, e.g., http://bagisto.test.com/products/assembled-core-i3-4-gb-ddr3500-gbwindows-10-pro151-inch-screen-black.

  • Tax Category: Select the Tax Category from the dropdown list.

    editProduct

# New

  • Enable the toggle button to feature the product as a new product, shown under the New Products section.
  • Enable the toggle button to show the product under the Featured Products section.

# Visible Individually

  • Enable the toggle button to make the product visible on the frontend.

# Status

  • Enable the toggle button to enable the product on your eCommerce store.

# Guest Checkout

  • Enable the toggle button to allow guest customers to order the product.

    toggleButtons

# Description

Fill in the following fields under description:

  • Short Description: Enter a short description of the product feature.

  • Description: Mention your product in detail.

    description

# Meta Description

Fill in the following fields under meta description for improved searchability on search engines:

  • Meta Title: Provide the main title of the product.

  • Meta Keyword: Provide meta keywords for specific search engine optimization.

  • Meta Description: Enter a description for better search engine listings.

    metaDescription

# Images

To add product images, click on Add Images. You can add multiple images for your product.

image

# Bundle Item

Click on Add Option and:

  • Enter the Option Title.
  • Set the Input Type (Select, Radio buttons, Checkbox, Multi-Select).
  • Mark the Required checkbox if the field is mandatory.

options

In the Search Product section, search for the product to add to the bundle. Once found, add the product to the bundle, specifying the quantity for each item.

At the front end, customers can increase the quantity of the product to add to the cart, but the default quantity included in a bundle item cannot be changed.

bundleOptions

# Product At Front End

The bundle product will be visible at the front end.

output

+ + + diff --git a/docs/.vuepress/dist/2.x/products/configurable.html b/docs/.vuepress/dist/2.x/products/configurable.html new file mode 100644 index 00000000..51f39635 --- /dev/null +++ b/docs/.vuepress/dist/2.x/products/configurable.html @@ -0,0 +1,42 @@ + + + + + + Configurable Product | Bagisto Documentation + + + + + + + + +

# Configurable Product

Configurable products are items or services that offer customers the flexibility to personalize certain attributes according to their preferences. Whether in manufacturing, e-commerce, or software, these products enable users to choose from predefined options, such as features, specifications, colors, or sizes.

This customization allows for a diverse range of variations without the need for creating unique products. Configurable products are designed to meet individual needs, enhancing customer satisfaction and providing a tailored experience in Bagisto (opens new window).

# How to Create a Configurable Product in Bagisto 2.0

  1. Add Product: Click on Catalog >> select Configurable as Product Type >> select Family >> enter SKU and then save the product as shown in the below image.

Configurable

After you Save the Product, you get an option to select the Color & Size. In case you want some other attribute in your configurable product, you need to create an attribute first and then save the product as shown in the below image.

Configurable

# General Attributes

Below is the list of fields you need to fill under General Attributes.

  • SKU: Provide SKU (Stock Keeping Unit) of the product which is unique to every product.

  • URL Key: This will be the end of the URL, for example, http://bagisto.test.com/products/philips-speaker (Speaker is a URL key)

  • Tax Category: You can select the Tax Category from the drop-down list that you want to be applied to the product.

    Configurable

Also, make sure to enable the Settings.

  • New: Enable the toggle button if you want to feature the product as a new product. The resulting product will be shown under the New Products section.

  • Visible Individually: Enable the toggle button so that the product will be visible on the front end.

  • Featured: Enable the toggle button if you want to show the product under the Featured Products section.

  • Status: Enable the toggle button to make the product enabled on your eCommerce store.

  • Guest Checkout: Enable the toggle button to allow the product to be ordered by the guest customer.

    Configurable

# Description

Below is the list of the fields you need to fill regarding the product under the description.

  • Short Description: Enter a short description of the feature of the product.

  • Description: Here you can mention your product in detail.

    Configurable

# Meta Description

Below is the list of fields that you need to provide under the meta description to make your product easily searchable on search engines.

  • Meta Title: Provide the main title of the product by which your product will be known.

  • Meta Keyword: The meta keyword for the product needs to be provided to improve its searchability on the search engine for specific keywords.

  • Meta Description: Enter the description so that the product can easily appear in search engine listing.

    Configurable

# Images

Add the product images, click on Add Images. You can add multiple images for your product.

Configurable

Now you will be able to see the Variations right below the video section as shown below. You can simply Edit each product as we have created according to the Color and Size.

Configurable

After all Variations are created, finally, Save the Product.

# Front End

The product will be visible as given below on the front end.

Configurable

+ + + diff --git a/docs/.vuepress/dist/2.x/products/downloadable.html b/docs/.vuepress/dist/2.x/products/downloadable.html new file mode 100644 index 00000000..c08332ba --- /dev/null +++ b/docs/.vuepress/dist/2.x/products/downloadable.html @@ -0,0 +1,39 @@ + + + + + + Downloadable Product | Bagisto Documentation + + + + + + + + +

# Downloadable Product

Today, in this document, we will explore "How to Create Downloadable Product in Bagisto 2.0". Downloadable products refer to items that can be downloaded, such as eBooks, software applications, music, updates, games, etc. These products are digital and do not involve a shipping method at checkout.

# Steps to Create a Downloadable Product in Bagisto 2.0

  1. On the Bagisto admin dashboard, go to Catalog Section >> Products >> select Downloadable under the Product Type.
  2. Select Attribute Family.
  3. Enter SKU (Stock Keeping Unit) of the product, unique to every product.
  4. Save the Product, and you will be redirected to the next page with general settings.

# General Settings

  • Name: Enter the name of the product.
  • URL Key: This will be the end of the URL, e.g., http://bagisto.test.com/products/bagisto-e-book (bagisto-e-book is the URL key).
  • Tax Category: Select the Tax Category from the drop-down list.

# New

  • Enable the toggle button to feature the product as a new product, shown under the New Products section.
  • Enable the toggle button to show the product under the Featured Products section.

# Visible Individually

  • Enable the toggle button to make the product visible on the frontend.

# Status

  • Enable the toggle button to enable the product on your eCommerce store.

# Description

Fill in the following fields under the description:

  • Short Description: Enter a brief description of the product feature.
  • Description: Mention your product in detail.

# Meta Description

Fill in the following fields under meta description for improved searchability on search engines:

  • Meta Title: Provide the main title of the product.
  • Meta Keyword: Provide meta keywords for specific search engine optimization.
  • Meta Description: Enter a description for better search engine listings.

# Price

Insert the price, cost, and special price. Set the special price date for which the special price will be shown on the website.

# Images

To add product images, click on Add Images. You can add multiple images for your product.

# Downloadable Information

Here, enter the downloadable information about your product:

  • Name: Enter the name of your downloadable product.
  • Price: Enter the price of the downloadable product.
  • File: Attach the file. +
    • Upload File: Upload the file.
    • Insert URL: Insert the URL.
  • Sample: Insert URL/upload file to give a free sample.
  • Download Allow: Specify the maximum number of downloads. Enter "0" for unlimited downloads.

# Samples

If you want to provide a free sample of your product, add a new link from the Samples section below the Links section. Enter the title and attach the sample file.

# Product At Front End

The downloadable product will be visible at the front end.

Thanks for reading this blog. Please comment below if you have any questions. Also, you can hire Laravel Developers for your custom Laravel projects. If you encounter any issues, feel free to raise a ticket at our Support Portal.

+ + + diff --git a/docs/.vuepress/dist/2.x/products/grouped.html b/docs/.vuepress/dist/2.x/products/grouped.html new file mode 100644 index 00000000..b0004a8a --- /dev/null +++ b/docs/.vuepress/dist/2.x/products/grouped.html @@ -0,0 +1,42 @@ + + + + + + Grouped Product | Bagisto Documentation + + + + + + + + +

# Grouped Product

This document guides you on creating a Grouped Product in Bagisto 2.0. A grouped product is a collection of simple products that can be combined in Bagisto. This versatile product type allows you to offer variations of a single product or a group of products as a coordinated set. Each product in a grouped product can be purchased separately or all together as part of the group.

# Steps to Create a Grouped Product in Bagisto 2.0

  1. On the Bagisto admin dashboard, go to Catalog Section >> Products >> select Grouped under the Product Type.
  2. Select Attribute Family >> enter SKU >> Click to Save Product.
  3. Enter the SKU (Stock Keeping Unit) of the product, unique to every product.

After clicking on the Save Product button, you will be redirected to the next page with several new settings as shown in the below image.

# General Settings

  • Name: Enter the name of the product.
  • URL Key: This will be the end of the URL, e.g., http://bagisto.test.com/products/set-of-men-casual-wear (set-of-men-casual-wear is a URL key).
  • Tax Category: Select the Tax Category from the dropdown list.

# New

  • Enable the toggle button to feature the product as a new product, shown under the New Products section.
  • Enable the toggle button to show the product under the Featured Products section.

# Visible Individually

  • Enable the toggle button to make the product visible on the frontend.

# Status

  • Enable the toggle button to enable the product on your eCommerce store.

# Guest Checkout

  • Enable the toggle button to allow the product to be ordered by guest customers.

# Price

  • Insert the price, cost, and special price. Set the special price date for which the special price will be shown on the website.

# Description

Fill in the following fields under the description:

  • Short Description: Enter a short description of the product feature.
  • Description: Mention your product in detail.

# Meta Description

Fill in the following fields under meta description for improved searchability on search engines:

  • Meta Title: Provide the main title of the product.
  • Meta Keyword: Provide meta keywords for specific search engine optimization.
  • Meta Description: Enter a description for better search engine listings.

# Images

To add product images, click on Add Images. You can add multiple images for your product.

# Grouped Products

# Search Products

Under this section, you can search for the Simple Products to include in the Grouped Product. Once you've added all the required products to the grouped product, they will be listed.

Here, enter the default quantity (automatically added to the customer's cart), and sort orders to determine the product's appearance on the frontend, as shown in the image below.

# Product at Front End

The grouped product will be visible at the front end, as shown in the image below:

Thanks for reading this blog. Please comment below if you have any questions. Also, you can hire Laravel Developers for your custom Laravel projects. If you encounter any issues, feel free to raise a ticket at our Support Portal.

+ + + diff --git a/docs/.vuepress/dist/2.x/products/index.html b/docs/.vuepress/dist/2.x/products/index.html new file mode 100644 index 00000000..d7eb5067 --- /dev/null +++ b/docs/.vuepress/dist/2.x/products/index.html @@ -0,0 +1,34 @@ + + + + + + Product types | Bagisto Documentation + + + + + + + + +

# Product types

TOPICS: Inventory, Products

CREATED FOR:

  • Beginner
  • Intermediate
  • Admin
  • Leader
  • User

Inventory Management supports inventory and order management for all product types in Bagisto: simple, configurable, virtual, downloadable, bundle, and grouped. Options and requirements may differ per product type for sources, stocks, and shipping.

Single-source merchants create and update product settings and quantities without requiring additional updates. All created and newly imported products automatically assign to the Default Source and Default Stock, immediately available to customers if enabled and In-Stock.

Multi-source merchants assign sources, quantities per source, and settings during or after product creation. Commerce assigns all newly imported products to the Default Source, requiring additional edits to assign sources and quantities.

Product Type Shipping and Source Selection Algorithm
Simple Supports SSA recommendations and overrides at shipping.
Configurable Supports SSA recommendations and overrides at shipping.
Virtual Always uses the SSA recommendation. The system runs the algorithm implicitly when it creates invoices, and always uses the suggested results. You cannot adjust these results.
Downloadable Always uses the SSA recommendation. The system runs the algorithm implicitly when it creates invoices, and always uses the suggested results. You cannot adjust these results.
Bundle Supports SSA recommendations and overrides at shipping.
Grouped Supports SSA recommendations and overrides at shipping.
+ + + diff --git a/docs/.vuepress/dist/2.x/products/simple.html b/docs/.vuepress/dist/2.x/products/simple.html new file mode 100644 index 00000000..9b300ff6 --- /dev/null +++ b/docs/.vuepress/dist/2.x/products/simple.html @@ -0,0 +1,38 @@ + + + + + + Simple Product | Bagisto Documentation + + + + + + + + +

# Simple Product

A simple product is a product type in e-commerce that does not require customers to choose additional attributes (such as size or color) to add to the cart. It should be a physical item and can be shipped to customers.

Therefore, any service, such as downloadable items, does not count as a simple product. This is the step-by-step tutorial on how to add a simple product in Bagisto (opens new window).

# Create Simple Product in Bagisto 2.0

  1. Click on Catalog >> Products >> select Simple under Product Type.

    Simple

Now Save the Product, and you will get redirected to the Edit product page as shown below.

# General Attributes

Below is the list of fields you need to fill under General Attributes.

editProduct

# Description

Below is the list of the fields you need to fill in regarding the product under description.

# Short Description

Enter a short description of the feature of the product.

# Description

Mention your product in detail.

description

# Meta Description

Below is the list of fields that you need to provide under the meta description to make your product easily searchable on search engines.

# Meta Title

Provide the main title of the product by which your product will be known.

# Meta Keyword

The meta keyword for the product needs to be provided to improve its searchability on the search engine for specific keywords.

# Meta Description

Enter the description so that products can easily appear in search engine listings.

metaDescription

# Images

To add the product images, click on Add Images. You can add multiple images for your product.

image

# New

Enable the toggle button if you want to feature the product as a new product. The resulting product will be shown under the New Products section.

Enable the toggle button if you want to show the product under the Featured Products section.

# Visible Individually

Enable the toggle button so that the product will be visible on the front end.

# Status

Enable the toggle button to enable the product on your eCommerce store.

# Guest Checkout

Enable the toggle button to allow the product to be ordered by guest customers.

toggleButtons

# Price

Insert the price, cost, and special price, and set the special price date for which the special price will be shown on the website.

price

# Shipping

Set the Width, Height, Depth, and Weight of the product.

shipping

# Inventories

Insert the quantity of the product that is there in your inventory. By default, it is set to 0 so it shows on the front end as out of stock.

inventories

At last, Save the Product.

# Front End

The product will be visible as given below on the front end.

product

+ + + diff --git a/docs/.vuepress/dist/2.x/products/virtual.html b/docs/.vuepress/dist/2.x/products/virtual.html new file mode 100644 index 00000000..e4192d76 --- /dev/null +++ b/docs/.vuepress/dist/2.x/products/virtual.html @@ -0,0 +1,42 @@ + + + + + + Virtual Product | Bagisto Documentation + + + + + + + + +

# Virtual Product

This document provides a guide on creating virtual products in Bagisto 2.0. In an eCommerce store, products can generally be categorized into two types: physical and intangible. Virtual products fall under the category of intangible products, including memberships, services, warranties, or subscriptions in Bagisto (opens new window).

A virtual product, unlike a downloadable product, is not something that can be downloaded but rather a service offered to customers.

# Steps To Create Virtual Product In Bagisto 2.0

  1. Go to Catalog >> Products >> Select Virtual under Product Type select Family.

  2. Enter SKU and save the product, as shown in the image below.

    Virtual

After clicking on the Save Product button, you'll be redirected to the next page with various new settings.

# General Settings

  • Name: Enter the name of the product.

  • URL Key: This will be the end of the URL, e.g., http://bagisto.test.com/products/fitness-membership (fitness-membership is a URL key).

  • Tax Category: Select the tax category from the dropdown list.

    editProduct

# New

  • Enable the toggle button to feature the product as a new product, which will be shown under the New Products section.
  • Enable the toggle button to show the product under the Featured Products section.

# Visible Individually

  • Enable the toggle button to make the product visible on the frontend.

# Status

  • Enable the toggle button to enable the product on your eCommerce store.

# Guest Checkout

  • Enable the toggle button to allow guest customers to order the product.

    toggleButtons

# Description

Fill in the following fields under the description:

  • Short Description: Enter a brief description of the product feature.

  • Description: Provide a detailed description of the product.

    description

# Meta Description

Fill in the following fields under meta description for improved searchability on search engines:

  • Meta Title: Provide the main title of the product.

  • Meta Keyword: Provide meta keywords for specific search engine optimization.

  • Meta Description: Enter a description for better search engine listings.

    metaDescription

# Images

Add product images by clicking on Add Images. Multiple images can be added.

image

# Inventory

Insert the quantity of the product available in your inventory. The default is set to 0, indicating out of stock on the frontend.

inventories

# Price

Insert the price, cost, and special price. Set the special price date for displaying the special price on the website.

price

# Product At Front End

output

+ + + diff --git a/docs/.vuepress/dist/404.html b/docs/.vuepress/dist/404.html new file mode 100644 index 00000000..557a0ffe --- /dev/null +++ b/docs/.vuepress/dist/404.html @@ -0,0 +1,20 @@ + + + + + + Bagisto Documentation + + + + + + + + +

404

How did we get here?
+ Take me home. +
+ + + diff --git a/docs/.vuepress/dist/assets/css/0.styles.ab9466d3.css b/docs/.vuepress/dist/assets/css/0.styles.ab9466d3.css new file mode 100644 index 00000000..cd1ef2c7 --- /dev/null +++ b/docs/.vuepress/dist/assets/css/0.styles.ab9466d3.css @@ -0,0 +1 @@ +.code-copy{color:#aaa;fill:#aaa;font-size:14px;display:inline-block;cursor:pointer}div[class*=aside-code] aside .code-copy,div[class*=language-] pre .code-copy{position:absolute;z-index:1000;top:7px;right:35px;opacity:0;font-size:16px}div[class*=aside-code] aside:hover .code-copy,div[class*=language-] pre:hover .code-copy{opacity:1}.content pre,.content pre[class*=language-]{overflow-y:hidden}div[class*=language-] pre,div[class*=language-] pre[class*=language-]{position:static!important}div[class~=language-text]:before{content:"text"}div[class~=language-yml]:before{content:"yml"}div[class*=language-] pre{-webkit-user-select:text;-moz-user-select:text;user-select:text}p code{-webkit-user-select:all;-moz-user-select:all;user-select:all}@keyframes message-move-in{0%{opacity:0;transform:translateY(-100%)}to{opacity:1;transform:translateY(0)}}#message-container .message.move-in{animation:message-move-in .3s ease-in-out}@keyframes message-move-out{0%{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(-100%)}}#message-container .message.move-out{animation:message-move-out .3s ease-in-out;animation-fill-mode:forwards}#message-container .message{background:#fff;margin:10px 0;padding:0 10px;height:40px;box-shadow:0 0 10px 0 #ccc;font-size:14px;border-radius:3px;display:flex;align-items:center;transition:height .2s ease-in-out,margin .2s ease-in-out}#message-container{position:fixed;left:0;top:100px;right:0;display:flex;flex-direction:column;align-items:center}#message-container .message .text{color:#333;padding:0 20px 0 5px}code[class*=language-],pre[class*=language-]{color:#ccc;background:none;font-family:Consolas,Monaco,Andale Mono,Ubuntu Mono,monospace;font-size:1em;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;hyphens:none}pre[class*=language-]{padding:1em;margin:.5em 0;overflow:auto}:not(pre)>code[class*=language-],pre[class*=language-]{background:#2d2d2d}:not(pre)>code[class*=language-]{padding:.1em;border-radius:.3em;white-space:normal}.token.block-comment,.token.cdata,.token.comment,.token.doctype,.token.prolog{color:#999}.token.punctuation{color:#ccc}.token.attr-name,.token.deleted,.token.namespace,.token.tag{color:#e2777a}.token.function-name{color:#6196cc}.token.boolean,.token.function,.token.number{color:#f08d49}.token.class-name,.token.constant,.token.property,.token.symbol{color:#f8c555}.token.atrule,.token.builtin,.token.important,.token.keyword,.token.selector{color:#cc99cd}.token.attr-value,.token.char,.token.regex,.token.string,.token.variable{color:#7ec699}.token.entity,.token.operator,.token.url{color:#67cdcc}.token.bold,.token.important{font-weight:700}.token.italic{font-style:italic}.token.entity{cursor:help}.token.inserted{color:green}.theme-default-content code{color:#476582;padding:.25rem .5rem;margin:0;font-size:.85em;background-color:rgba(27,31,35,.05);border-radius:3px}.theme-default-content code .token.deleted{color:#ec5975}.theme-default-content code .token.inserted{color:#0041ff}.theme-default-content pre,.theme-default-content pre[class*=language-]{line-height:1.4;padding:1.25rem 1.5rem;margin:.85rem 0;background-color:#282c34;border-radius:6px;overflow:auto}.theme-default-content pre[class*=language-] code,.theme-default-content pre code{color:#fff;padding:0;background-color:transparent;border-radius:0}div[class*=language-]{position:relative;background-color:#282c34;border-radius:6px}div[class*=language-] .highlight-lines{-webkit-user-select:none;user-select:none;padding-top:1.3rem;position:absolute;top:0;left:0;width:100%;line-height:1.4}div[class*=language-] .highlight-lines .highlighted{background-color:rgba(0,0,0,.66)}div[class*=language-] pre,div[class*=language-] pre[class*=language-]{background:transparent;position:relative;z-index:1}div[class*=language-]:before{position:absolute;z-index:3;top:.8em;right:1em;font-size:.75rem;color:hsla(0,0%,100%,.4)}div[class*=language-]:not(.line-numbers-mode) .line-numbers-wrapper{display:none}div[class*=language-].line-numbers-mode .highlight-lines .highlighted{position:relative}div[class*=language-].line-numbers-mode .highlight-lines .highlighted:before{content:" ";position:absolute;z-index:3;left:0;top:0;display:block;width:3.5rem;height:100%;background-color:rgba(0,0,0,.66)}div[class*=language-].line-numbers-mode pre{padding-left:4.5rem;vertical-align:middle}div[class*=language-].line-numbers-mode .line-numbers-wrapper{position:absolute;top:0;width:3.5rem;text-align:center;color:hsla(0,0%,100%,.3);padding:1.25rem 0;line-height:1.4}div[class*=language-].line-numbers-mode .line-numbers-wrapper br{-webkit-user-select:none;user-select:none}div[class*=language-].line-numbers-mode .line-numbers-wrapper .line-number{position:relative;z-index:4;-webkit-user-select:none;user-select:none;font-size:.85em}div[class*=language-].line-numbers-mode:after{content:"";position:absolute;z-index:2;top:0;left:0;width:3.5rem;height:100%;border-radius:6px 0 0 6px;border-right:1px solid rgba(0,0,0,.66);background-color:#282c34}div[class~=language-js]:before{content:"js"}div[class~=language-ts]:before{content:"ts"}div[class~=language-html]:before{content:"html"}div[class~=language-md]:before{content:"md"}div[class~=language-vue]:before{content:"vue"}div[class~=language-css]:before{content:"css"}div[class~=language-sass]:before{content:"sass"}div[class~=language-scss]:before{content:"scss"}div[class~=language-less]:before{content:"less"}div[class~=language-stylus]:before{content:"stylus"}div[class~=language-go]:before{content:"go"}div[class~=language-java]:before{content:"java"}div[class~=language-c]:before{content:"c"}div[class~=language-sh]:before{content:"sh"}div[class~=language-yaml]:before{content:"yaml"}div[class~=language-py]:before{content:"py"}div[class~=language-docker]:before{content:"docker"}div[class~=language-dockerfile]:before{content:"dockerfile"}div[class~=language-makefile]:before{content:"makefile"}div[class~=language-javascript]:before{content:"js"}div[class~=language-typescript]:before{content:"ts"}div[class~=language-markup]:before{content:"html"}div[class~=language-markdown]:before{content:"md"}div[class~=language-json]:before{content:"json"}div[class~=language-ruby]:before{content:"rb"}div[class~=language-python]:before{content:"py"}div[class~=language-bash]:before{content:"sh"}div[class~=language-php]:before{content:"php"}.custom-block .custom-block-title{font-weight:600;margin-bottom:-.4rem}.custom-block.danger,.custom-block.tip,.custom-block.warning{padding:.1rem 1.5rem;border-left-width:.5rem;border-left-style:solid;margin:1rem 0}.custom-block.tip{background-color:#f3f5f7;border-color:#42b983}.custom-block.warning{background-color:rgba(255,229,100,.3);border-color:#e7c000;color:#6b5900}.custom-block.warning .custom-block-title{color:#b29400}.custom-block.warning a{color:#2c3e50}.custom-block.danger{background-color:#ffe6e6;border-color:#c00;color:#4d0000}.custom-block.danger .custom-block-title{color:#900}.custom-block.danger a{color:#2c3e50}.custom-block.details{display:block;position:relative;border-radius:2px;margin:1.6em 0;padding:1.6em;background-color:#eee}.custom-block.details h4{margin-top:0}.custom-block.details figure:last-child,.custom-block.details p:last-child{margin-bottom:0;padding-bottom:0}.custom-block.details summary{outline:none;cursor:pointer}.arrow{display:inline-block;width:0;height:0}.arrow.up{border-bottom:6px solid #ccc}.arrow.down,.arrow.up{border-left:4px solid transparent;border-right:4px solid transparent}.arrow.down{border-top:6px solid #ccc}.arrow.right{border-left:6px solid #ccc}.arrow.left,.arrow.right{border-top:4px solid transparent;border-bottom:4px solid transparent}.arrow.left{border-right:6px solid #ccc}.theme-default-content:not(.custom){max-width:960px;margin:0 auto;padding:2rem 2.5rem}@media (max-width:959px){.theme-default-content:not(.custom){padding:2rem}}@media (max-width:419px){.theme-default-content:not(.custom){padding:1.5rem}}.table-of-contents .badge{vertical-align:middle}body,html{padding:0;margin:0;background-color:#fff}body{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-size:16px;color:#2c3e50}.page{padding-left:20rem}.navbar{z-index:20;right:0;height:3.6rem;background-color:#fff;box-sizing:border-box;border-bottom:1px solid #e1e1e1}.navbar,.sidebar-mask{position:fixed;top:0;left:0}.sidebar-mask{z-index:9;width:100vw;height:100vh;display:none}.sidebar{font-size:16px;background-color:#fff;width:20rem;position:fixed;z-index:10;margin:0;top:3.6rem;left:0;bottom:0;box-sizing:border-box;border-right:1px solid #e1e1e1;overflow-y:auto}.theme-default-content:not(.custom)>:first-child{margin-top:3.6rem}.theme-default-content:not(.custom) a:hover{text-decoration:underline}.theme-default-content:not(.custom) p.demo{padding:1rem 1.5rem;border:1px solid #ddd;border-radius:4px}.theme-default-content:not(.custom) img{max-width:100%}.theme-default-content.custom{padding:0;margin:0}.theme-default-content.custom img{max-width:100%}a{font-weight:500;text-decoration:none}a,p a code{color:#0041ff}p a code{font-weight:400}kbd{background:#eee;border:.15rem solid #ddd;border-bottom:.25rem solid #ddd;border-radius:.15rem;padding:0 .15em}blockquote{font-size:1rem;color:#999;border-left:.2rem solid #dfe2e5;margin:1rem 0;padding:.25rem 0 .25rem 1rem}blockquote>p{margin:0}ol,ul{padding-left:1.2em}strong{font-weight:600}h1,h2,h3,h4,h5,h6{font-weight:600;line-height:1.25}.theme-default-content:not(.custom)>h1,.theme-default-content:not(.custom)>h2,.theme-default-content:not(.custom)>h3,.theme-default-content:not(.custom)>h4,.theme-default-content:not(.custom)>h5,.theme-default-content:not(.custom)>h6{margin-top:-3.1rem;padding-top:4.6rem;margin-bottom:0}.theme-default-content:not(.custom)>h1:first-child,.theme-default-content:not(.custom)>h2:first-child,.theme-default-content:not(.custom)>h3:first-child,.theme-default-content:not(.custom)>h4:first-child,.theme-default-content:not(.custom)>h5:first-child,.theme-default-content:not(.custom)>h6:first-child{margin-top:-1.5rem;margin-bottom:1rem}.theme-default-content:not(.custom)>h1:first-child+.custom-block,.theme-default-content:not(.custom)>h1:first-child+p,.theme-default-content:not(.custom)>h1:first-child+pre,.theme-default-content:not(.custom)>h2:first-child+.custom-block,.theme-default-content:not(.custom)>h2:first-child+p,.theme-default-content:not(.custom)>h2:first-child+pre,.theme-default-content:not(.custom)>h3:first-child+.custom-block,.theme-default-content:not(.custom)>h3:first-child+p,.theme-default-content:not(.custom)>h3:first-child+pre,.theme-default-content:not(.custom)>h4:first-child+.custom-block,.theme-default-content:not(.custom)>h4:first-child+p,.theme-default-content:not(.custom)>h4:first-child+pre,.theme-default-content:not(.custom)>h5:first-child+.custom-block,.theme-default-content:not(.custom)>h5:first-child+p,.theme-default-content:not(.custom)>h5:first-child+pre,.theme-default-content:not(.custom)>h6:first-child+.custom-block,.theme-default-content:not(.custom)>h6:first-child+p,.theme-default-content:not(.custom)>h6:first-child+pre{margin-top:2rem}h1:hover .header-anchor,h2:hover .header-anchor,h3:hover .header-anchor,h4:hover .header-anchor,h5:hover .header-anchor,h6:hover .header-anchor{opacity:1}h1{font-size:2.2rem}h2{font-size:1.65rem;padding-bottom:.3rem;border-bottom:1px solid #e1e1e1}h3{font-size:1.35rem}a.header-anchor{font-size:.85em;float:left;margin-left:-.87em;padding-right:.23em;margin-top:.125em;opacity:0}a.header-anchor:hover{text-decoration:none}.line-number,code,kbd{font-family:source-code-pro,Menlo,Monaco,Consolas,Courier New,monospace}ol,p,ul{line-height:1.7}hr{border:0;border-top:1px solid #e1e1e1}table{border-collapse:collapse;margin:1rem 0;display:block;overflow-x:auto}tr{border-top:1px solid #dfe2e5}tr:nth-child(2n){background-color:#f6f8fa}td,th{border:1px solid #dfe2e5;padding:.6em 1em}.theme-container.sidebar-open .sidebar-mask{display:block}.theme-container.no-navbar .theme-default-content:not(.custom)>h1,.theme-container.no-navbar h2,.theme-container.no-navbar h3,.theme-container.no-navbar h4,.theme-container.no-navbar h5,.theme-container.no-navbar h6{margin-top:1.5rem;padding-top:0}.theme-container.no-navbar .sidebar{top:0}@media (min-width:720px){.theme-container.no-sidebar .sidebar{display:none}.theme-container.no-sidebar .page{padding-left:0}}@media (max-width:959px){.sidebar{font-size:15px;width:16.4rem}.page{padding-left:16.4rem}}@media (max-width:719px){.sidebar{top:0;padding-top:3.6rem;transform:translateX(-100%);transition:transform .2s ease}.page{padding-left:0}.theme-container.sidebar-open .sidebar{transform:translateX(0)}.theme-container.no-navbar .sidebar{padding-top:0}}@media (max-width:419px){h1{font-size:1.9rem}.theme-default-content div[class*=language-]{margin:.85rem -1.5rem;border-radius:0}}#nprogress{pointer-events:none}#nprogress .bar{background:#0041ff;position:fixed;z-index:1031;top:0;left:0;width:100%;height:2px}#nprogress .peg{display:block;position:absolute;right:0;width:100px;height:100%;box-shadow:0 0 10px #0041ff,0 0 5px #0041ff;opacity:1;transform:rotate(3deg) translateY(-4px)}#nprogress .spinner{display:block;position:fixed;z-index:1031;top:15px;right:15px}#nprogress .spinner-icon{width:18px;height:18px;box-sizing:border-box;border-color:#0041ff transparent transparent #0041ff;border-style:solid;border-width:2px;border-radius:50%;animation:nprogress-spinner .4s linear infinite}.nprogress-custom-parent{overflow:hidden;position:relative}.nprogress-custom-parent #nprogress .bar,.nprogress-custom-parent #nprogress .spinner{position:absolute}@keyframes nprogress-spinner{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}html{scroll-behavior:smooth}.go-to-top[data-v-5fd4ef0c]{cursor:pointer;position:fixed;bottom:2rem;right:2.5rem;width:2rem;color:#0041ff;z-index:1}.go-to-top[data-v-5fd4ef0c]:hover{color:#4d7aff}@media (max-width:959px){.go-to-top[data-v-5fd4ef0c]{display:none}}.fade-enter-active[data-v-5fd4ef0c],.fade-leave-active[data-v-5fd4ef0c]{transition:opacity .3s}.fade-enter[data-v-5fd4ef0c],.fade-leave-to[data-v-5fd4ef0c]{opacity:0}.icon.outbound{color:#aaa;display:inline-block;vertical-align:middle;position:relative;top:-1px}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.algolia-search-wrapper>span{vertical-align:middle}.algolia-search-wrapper .algolia-autocomplete{line-height:normal}.algolia-search-wrapper .algolia-autocomplete .ds-dropdown-menu{background-color:#fff;border:1px solid #999;border-radius:4px;font-size:16px;margin:6px 0 0;padding:4px;text-align:left}.algolia-search-wrapper .algolia-autocomplete .ds-dropdown-menu:before{border-color:#999}.algolia-search-wrapper .algolia-autocomplete .ds-dropdown-menu [class*=ds-dataset-]{border:none;padding:0}.algolia-search-wrapper .algolia-autocomplete .ds-dropdown-menu .ds-suggestions{margin-top:0}.algolia-search-wrapper .algolia-autocomplete .ds-dropdown-menu .ds-suggestion{border-bottom:1px solid #e1e1e1}.algolia-search-wrapper .algolia-autocomplete .algolia-docsearch-suggestion--highlight{color:#2c815b}.algolia-search-wrapper .algolia-autocomplete .algolia-docsearch-suggestion{border-color:#e1e1e1;padding:0}.algolia-search-wrapper .algolia-autocomplete .algolia-docsearch-suggestion .algolia-docsearch-suggestion--category-header{padding:5px 10px;margin-top:0;background:#0041ff;color:#fff;font-weight:600}.algolia-search-wrapper .algolia-autocomplete .algolia-docsearch-suggestion .algolia-docsearch-suggestion--category-header .algolia-docsearch-suggestion--highlight{background:hsla(0,0%,100%,.6)}.algolia-search-wrapper .algolia-autocomplete .algolia-docsearch-suggestion .algolia-docsearch-suggestion--wrapper{padding:0}.algolia-search-wrapper .algolia-autocomplete .algolia-docsearch-suggestion .algolia-docsearch-suggestion--title{font-weight:600;margin-bottom:0;color:#2c3e50}.algolia-search-wrapper .algolia-autocomplete .algolia-docsearch-suggestion .algolia-docsearch-suggestion--subcategory-column{vertical-align:top;padding:5px 7px 5px 5px;border-color:#e1e1e1;background:#f1f3f5}.algolia-search-wrapper .algolia-autocomplete .algolia-docsearch-suggestion .algolia-docsearch-suggestion--subcategory-column:after{display:none}.algolia-search-wrapper .algolia-autocomplete .algolia-docsearch-suggestion .algolia-docsearch-suggestion--subcategory-column-text{color:#555}.algolia-search-wrapper .algolia-autocomplete .algolia-docsearch-footer{border-color:#e1e1e1}.algolia-search-wrapper .algolia-autocomplete .ds-cursor .algolia-docsearch-suggestion--content{background-color:#e7edf3!important;color:#2c3e50}@media (min-width:719px){.algolia-search-wrapper .algolia-autocomplete .algolia-docsearch-suggestion .algolia-docsearch-suggestion--subcategory-column{float:none;width:150px;min-width:150px;display:table-cell}.algolia-search-wrapper .algolia-autocomplete .algolia-docsearch-suggestion .algolia-docsearch-suggestion--content{float:none;display:table-cell;width:100%;vertical-align:top}.algolia-search-wrapper .algolia-autocomplete .algolia-docsearch-suggestion .ds-dropdown-menu{min-width:515px!important}}@media (max-width:719px){.algolia-search-wrapper .ds-dropdown-menu{min-width:calc(100vw - 4rem)!important;max-width:calc(100vw - 4rem)!important}.algolia-search-wrapper .algolia-docsearch-suggestion--wrapper{padding:5px 7px 5px 5px!important}.algolia-search-wrapper .algolia-docsearch-suggestion--subcategory-column{padding:0!important;background:#fff!important}.algolia-search-wrapper .algolia-docsearch-suggestion--subcategory-column-text:after{content:" > ";font-size:10px;line-height:14.4px;display:inline-block;width:5px;margin:-3px 3px 0;vertical-align:middle}}.home{padding:3.6rem 2rem 0;max-width:960px;margin:0 auto;display:block}.home .hero{text-align:center}.home .hero img{max-width:100%;max-height:280px;display:block;margin:3rem auto 1.5rem}.home .hero h1{font-size:3rem}.home .hero .action,.home .hero .description,.home .hero h1{margin:1.8rem auto}.home .hero .description{max-width:35rem;font-size:1.6rem;line-height:1.3;color:#6a8bad}.home .hero .action-button{display:inline-block;font-size:1.2rem;color:#fff;background-color:#0041ff;padding:.8rem 1.6rem;border-radius:4px;transition:background-color .1s ease;box-sizing:border-box;border-bottom:1px solid #003ae6}.home .hero .action-button:hover{background-color:#1a54ff}.home .features{border-top:1px solid #e1e1e1;padding:1.2rem 0;margin-top:2.5rem;display:flex;flex-wrap:wrap;align-items:flex-start;align-content:stretch;justify-content:space-between}.home .feature{flex-grow:1;flex-basis:30%;max-width:30%}.home .feature h2{font-size:1.4rem;font-weight:500;border-bottom:none;padding-bottom:0;color:#3a5169}.home .feature p{color:#4e6e8e}.home .footer{padding:2.5rem;border-top:1px solid #e1e1e1;text-align:center;color:#4e6e8e}@media (max-width:719px){.home .features{flex-direction:column}.home .feature{max-width:100%;padding:0 2.5rem}}@media (max-width:419px){.home{padding-left:1.5rem;padding-right:1.5rem}.home .hero img{max-height:210px;margin:2rem auto 1.2rem}.home .hero h1{font-size:2rem}.home .hero .action,.home .hero .description,.home .hero h1{margin:1.2rem auto}.home .hero .description{font-size:1.2rem}.home .hero .action-button{font-size:1rem;padding:.6rem 1.2rem}.home .feature h2{font-size:1.25rem}}.search-box{display:inline-block;position:relative;margin-right:1rem}.search-box input{cursor:text;width:10rem;height:2rem;color:#4e6e8e;display:inline-block;border:1px solid #cbcbcb;border-radius:2rem;font-size:.9rem;line-height:2rem;padding:0 .5rem 0 2rem;outline:none;transition:all .2s ease;background:#fff url(/assets/img/search.83621669.svg) .6rem .5rem no-repeat;background-size:1rem}.search-box input:focus{cursor:auto;border-color:#0041ff}.search-box .suggestions{background:#fff;width:20rem;position:absolute;top:2rem;border:1px solid #cbcbcb;border-radius:6px;padding:.4rem;list-style-type:none}.search-box .suggestions.align-right{right:0}.search-box .suggestion{line-height:1.4;padding:.4rem .6rem;border-radius:4px;cursor:pointer}.search-box .suggestion a{white-space:normal;color:#5d82a6}.search-box .suggestion a .page-title{font-weight:600}.search-box .suggestion a .header{font-size:.9em;margin-left:.25em}.search-box .suggestion.focused{background-color:#f3f4f5}.search-box .suggestion.focused a{color:#0041ff}@media (max-width:959px){.search-box input{cursor:pointer;width:0;border-color:transparent;position:relative}.search-box input:focus{cursor:text;left:0;width:10rem}}@media (-ms-high-contrast:none){.search-box input{height:2rem}}@media (max-width:959px) and (min-width:719px){.search-box .suggestions{left:0}}@media (max-width:719px){.search-box{margin-right:0}.search-box input{left:1rem}.search-box .suggestions{right:0}}@media (max-width:419px){.search-box .suggestions{width:calc(100vw - 4rem)}.search-box input:focus{width:8rem}}.sidebar-button{cursor:pointer;display:none;width:1.25rem;height:1.25rem;position:absolute;padding:.6rem;top:.6rem;left:1rem}.sidebar-button .icon{display:block;width:1.25rem;height:1.25rem}@media (max-width:719px){.sidebar-button{display:block}}.dropdown-enter,.dropdown-leave-to{height:0!important}.badge[data-v-6eb0829b]{display:inline-block;font-size:14px;height:18px;line-height:18px;border-radius:3px;padding:0 6px;color:#fff}.badge.green[data-v-6eb0829b],.badge.tip[data-v-6eb0829b],.badge[data-v-6eb0829b]{background-color:#42b983}.badge.error[data-v-6eb0829b]{background-color:#da5961}.badge.warn[data-v-6eb0829b],.badge.warning[data-v-6eb0829b],.badge.yellow[data-v-6eb0829b]{background-color:#e7c000}.badge+.badge[data-v-6eb0829b]{margin-left:5px}.searchbox{display:inline-block;position:relative;width:200px;height:32px!important;white-space:nowrap;box-sizing:border-box;visibility:visible!important}.searchbox .algolia-autocomplete{display:block;width:100%;height:100%}.searchbox__wrapper{width:100%;height:100%;z-index:999;position:relative}.searchbox__input{display:inline-block;box-sizing:border-box;transition:box-shadow .4s ease,background .4s ease;border:0;border-radius:16px;box-shadow:inset 0 0 0 1px #ccc;background:#fff!important;padding:0 26px 0 32px;width:100%;height:100%;vertical-align:middle;white-space:normal;font-size:12px;-webkit-appearance:none;-moz-appearance:none;appearance:none}.searchbox__input::-webkit-search-cancel-button,.searchbox__input::-webkit-search-decoration,.searchbox__input::-webkit-search-results-button,.searchbox__input::-webkit-search-results-decoration{display:none}.searchbox__input:hover{box-shadow:inset 0 0 0 1px #b3b3b3}.searchbox__input:active,.searchbox__input:focus{outline:0;box-shadow:inset 0 0 0 1px #aaa;background:#fff}.searchbox__input::-moz-placeholder{color:#aaa}.searchbox__input::placeholder{color:#aaa}.searchbox__submit{position:absolute;top:0;margin:0;border:0;border-radius:16px 0 0 16px;background-color:rgba(69,142,225,0);padding:0;width:32px;height:100%;vertical-align:middle;text-align:center;font-size:inherit;-webkit-user-select:none;-moz-user-select:none;user-select:none;right:inherit;left:0}.searchbox__submit:before{display:inline-block;margin-right:-4px;height:100%;vertical-align:middle;content:""}.searchbox__submit:active,.searchbox__submit:hover{cursor:pointer}.searchbox__submit:focus{outline:0}.searchbox__submit svg{width:14px;height:14px;vertical-align:middle;fill:#6d7e96}.searchbox__reset{display:block;position:absolute;top:8px;right:8px;margin:0;border:0;background:none;cursor:pointer;padding:0;font-size:inherit;-webkit-user-select:none;-moz-user-select:none;user-select:none;fill:rgba(0,0,0,.5)}.searchbox__reset.hide{display:none}.searchbox__reset:focus{outline:0}.searchbox__reset svg{display:block;margin:4px;width:8px;height:8px}.searchbox__input:valid~.searchbox__reset{display:block;animation-name:sbx-reset-in;animation-duration:.15s}@keyframes sbx-reset-in{0%{transform:translate3d(-20%,0,0);opacity:0}to{transform:none;opacity:1}}.algolia-autocomplete.algolia-autocomplete-right .ds-dropdown-menu{right:0!important;left:inherit!important}.algolia-autocomplete.algolia-autocomplete-right .ds-dropdown-menu:before{right:48px}.algolia-autocomplete.algolia-autocomplete-left .ds-dropdown-menu{left:0!important;right:inherit!important}.algolia-autocomplete.algolia-autocomplete-left .ds-dropdown-menu:before{left:48px}.algolia-autocomplete .ds-dropdown-menu{top:-6px;border-radius:4px;margin:6px 0 0;padding:0;text-align:left;height:auto;position:relative;background:transparent;border:none;z-index:999;max-width:600px;min-width:500px;box-shadow:0 1px 0 0 rgba(0,0,0,.2),0 2px 3px 0 rgba(0,0,0,.1)}.algolia-autocomplete .ds-dropdown-menu:before{display:block;position:absolute;content:"";width:14px;height:14px;background:#fff;z-index:1000;top:-7px;border-top:1px solid #d9d9d9;border-right:1px solid #d9d9d9;transform:rotate(-45deg);border-radius:2px}.algolia-autocomplete .ds-dropdown-menu .ds-suggestions{position:relative;z-index:1000;margin-top:8px}.algolia-autocomplete .ds-dropdown-menu .ds-suggestions a:hover{text-decoration:none}.algolia-autocomplete .ds-dropdown-menu .ds-suggestion{cursor:pointer}.algolia-autocomplete .ds-dropdown-menu .ds-suggestion.ds-cursor .algolia-docsearch-suggestion.suggestion-layout-simple,.algolia-autocomplete .ds-dropdown-menu .ds-suggestion.ds-cursor .algolia-docsearch-suggestion:not(.suggestion-layout-simple) .algolia-docsearch-suggestion--content{background-color:rgba(69,142,225,.05)}.algolia-autocomplete .ds-dropdown-menu [class^=ds-dataset-]{position:relative;border:1px solid #d9d9d9;background:#fff;border-radius:4px;overflow:auto;padding:0 8px 8px}.algolia-autocomplete .ds-dropdown-menu *{box-sizing:border-box}.algolia-autocomplete .algolia-docsearch-suggestion{display:block;position:relative;padding:0 8px;background:#fff;color:#02060c;overflow:hidden}.algolia-autocomplete .algolia-docsearch-suggestion--highlight{color:#174d8c;background:rgba(143,187,237,.1);padding:.1em .05em}.algolia-autocomplete .algolia-docsearch-suggestion--category-header .algolia-docsearch-suggestion--category-header-lvl0 .algolia-docsearch-suggestion--highlight,.algolia-autocomplete .algolia-docsearch-suggestion--category-header .algolia-docsearch-suggestion--category-header-lvl1 .algolia-docsearch-suggestion--highlight,.algolia-autocomplete .algolia-docsearch-suggestion--text .algolia-docsearch-suggestion--highlight{padding:0 0 1px;background:inherit;box-shadow:inset 0 -2px 0 0 rgba(69,142,225,.8);color:inherit}.algolia-autocomplete .algolia-docsearch-suggestion--content{display:block;float:right;width:70%;position:relative;padding:5.33333px 0 5.33333px 10.66667px;cursor:pointer}.algolia-autocomplete .algolia-docsearch-suggestion--content:before{content:"";position:absolute;display:block;top:0;height:100%;width:1px;background:#ddd;left:-1px}.algolia-autocomplete .algolia-docsearch-suggestion--category-header{position:relative;border-bottom:1px solid #ddd;display:none;margin-top:8px;padding:4px 0;font-size:1em;color:#33363d}.algolia-autocomplete .algolia-docsearch-suggestion--wrapper{width:100%;float:left;padding:8px 0 0}.algolia-autocomplete .algolia-docsearch-suggestion--subcategory-column{float:left;width:30%;text-align:right;position:relative;padding:5.33333px 10.66667px;color:#a4a7ae;font-size:.9em;word-wrap:break-word}.algolia-autocomplete .algolia-docsearch-suggestion--subcategory-column:before{content:"";position:absolute;display:block;top:0;height:100%;width:1px;background:#ddd;right:0}.algolia-autocomplete .algolia-docsearch-suggestion--subcategory-inline{display:none}.algolia-autocomplete .algolia-docsearch-suggestion--title{margin-bottom:4px;color:#02060c;font-size:.9em;font-weight:700}.algolia-autocomplete .algolia-docsearch-suggestion--text{display:block;line-height:1.2em;font-size:.85em;color:#63676d}.algolia-autocomplete .algolia-docsearch-suggestion--no-results{width:100%;padding:8px 0;text-align:center;font-size:1.2em}.algolia-autocomplete .algolia-docsearch-suggestion--no-results:before{display:none}.algolia-autocomplete .algolia-docsearch-suggestion code{padding:1px 5px;font-size:90%;border:none;color:#222;background-color:#ebebeb;border-radius:3px;font-family:Menlo,Monaco,Consolas,Courier New,monospace}.algolia-autocomplete .algolia-docsearch-suggestion code .algolia-docsearch-suggestion--highlight{background:none}.algolia-autocomplete .algolia-docsearch-suggestion.algolia-docsearch-suggestion__main .algolia-docsearch-suggestion--category-header,.algolia-autocomplete .algolia-docsearch-suggestion.algolia-docsearch-suggestion__secondary{display:block}@media (min-width:768px){.algolia-autocomplete .algolia-docsearch-suggestion .algolia-docsearch-suggestion--subcategory-column{display:block}}@media (max-width:768px){.algolia-autocomplete .algolia-docsearch-suggestion .algolia-docsearch-suggestion--subcategory-column{display:inline-block;width:auto;float:left;padding:0;color:#02060c;font-size:.9em;font-weight:700;text-align:left;opacity:.5}.algolia-autocomplete .algolia-docsearch-suggestion .algolia-docsearch-suggestion--subcategory-column:before{display:none}.algolia-autocomplete .algolia-docsearch-suggestion .algolia-docsearch-suggestion--subcategory-column:after{content:"|"}.algolia-autocomplete .algolia-docsearch-suggestion .algolia-docsearch-suggestion--content{display:inline-block;width:auto;text-align:left;float:left;padding:0}.algolia-autocomplete .algolia-docsearch-suggestion .algolia-docsearch-suggestion--content:before{display:none}}.algolia-autocomplete .suggestion-layout-simple.algolia-docsearch-suggestion{border-bottom:1px solid #eee;padding:8px;margin:0}.algolia-autocomplete .suggestion-layout-simple .algolia-docsearch-suggestion--content{width:100%;padding:0}.algolia-autocomplete .suggestion-layout-simple .algolia-docsearch-suggestion--content:before{display:none}.algolia-autocomplete .suggestion-layout-simple .algolia-docsearch-suggestion--category-header{margin:0;padding:0;display:block;width:100%;border:none}.algolia-autocomplete .suggestion-layout-simple .algolia-docsearch-suggestion--category-header-lvl0,.algolia-autocomplete .suggestion-layout-simple .algolia-docsearch-suggestion--category-header-lvl1{opacity:.6;font-size:.85em}.algolia-autocomplete .suggestion-layout-simple .algolia-docsearch-suggestion--category-header-lvl1:before{background-image:url('data:image/svg+xml;utf8,');content:"";width:10px;height:10px;display:inline-block}.algolia-autocomplete .suggestion-layout-simple .algolia-docsearch-suggestion--wrapper{width:100%;float:left;margin:0;padding:0}.algolia-autocomplete .suggestion-layout-simple .algolia-docsearch-suggestion--duplicate-content,.algolia-autocomplete .suggestion-layout-simple .algolia-docsearch-suggestion--subcategory-inline{display:none!important}.algolia-autocomplete .suggestion-layout-simple .algolia-docsearch-suggestion--title{margin:0;color:#458ee1;font-size:.9em;font-weight:400}.algolia-autocomplete .suggestion-layout-simple .algolia-docsearch-suggestion--title:before{content:"#";font-weight:700;color:#458ee1;display:inline-block}.algolia-autocomplete .suggestion-layout-simple .algolia-docsearch-suggestion--text{margin:4px 0 0;display:block;line-height:1.4em;padding:5.33333px 8px;background:#f8f8f8;font-size:.85em;opacity:.8}.algolia-autocomplete .suggestion-layout-simple .algolia-docsearch-suggestion--text .algolia-docsearch-suggestion--highlight{color:#3f4145;font-weight:700;box-shadow:none}.algolia-autocomplete .algolia-docsearch-footer{width:134px;height:20px;z-index:2000;margin-top:10.66667px;float:right;font-size:0;line-height:0}.algolia-autocomplete .algolia-docsearch-footer--logo{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='168' height='24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cpath d='M78.988.938h16.594a2.968 2.968 0 012.966 2.966V20.5a2.967 2.967 0 01-2.966 2.964H78.988a2.967 2.967 0 01-2.966-2.964V3.897A2.961 2.961 0 0178.988.938zm41.937 17.866c-4.386.02-4.386-3.54-4.386-4.106l-.007-13.336 2.675-.424v13.254c0 .322 0 2.358 1.718 2.364v2.248zm-10.846-2.18c.821 0 1.43-.047 1.855-.129v-2.719a6.334 6.334 0 00-1.574-.199 5.7 5.7 0 00-.897.069 2.699 2.699 0 00-.814.24c-.24.116-.439.28-.582.491-.15.212-.219.335-.219.656 0 .628.219.991.616 1.23s.938.362 1.615.362zm-.233-9.7c.883 0 1.629.109 2.231.328.602.218 1.088.525 1.444.915.363.396.609.922.76 1.483.157.56.232 1.175.232 1.85v6.874a32.5 32.5 0 01-1.868.314c-.834.123-1.772.185-2.813.185-.69 0-1.327-.069-1.895-.198a4.001 4.001 0 01-1.471-.636 3.085 3.085 0 01-.951-1.134c-.226-.465-.343-1.12-.343-1.803 0-.656.13-1.073.384-1.525a3.24 3.24 0 011.047-1.106c.445-.287.95-.492 1.532-.615a8.8 8.8 0 011.82-.185 8.404 8.404 0 011.972.24v-.438c0-.307-.035-.6-.11-.874a1.88 1.88 0 00-.384-.73 1.784 1.784 0 00-.724-.493 3.164 3.164 0 00-1.143-.205c-.616 0-1.177.075-1.69.164a7.735 7.735 0 00-1.26.307l-.321-2.192c.335-.117.834-.233 1.478-.349a10.98 10.98 0 012.073-.178zm52.842 9.626c.822 0 1.43-.048 1.854-.13V13.7a6.347 6.347 0 00-1.574-.199c-.294 0-.595.021-.896.069a2.7 2.7 0 00-.814.24 1.46 1.46 0 00-.582.491c-.15.212-.218.335-.218.656 0 .628.218.991.615 1.23.404.245.938.362 1.615.362zm-.226-9.694c.883 0 1.629.108 2.231.327.602.219 1.088.526 1.444.915.355.39.609.923.759 1.483a6.8 6.8 0 01.233 1.852v6.873c-.41.088-1.034.19-1.868.314-.834.123-1.772.184-2.813.184-.69 0-1.327-.068-1.895-.198a4.001 4.001 0 01-1.471-.635 3.085 3.085 0 01-.951-1.134c-.226-.465-.343-1.12-.343-1.804 0-.656.13-1.073.384-1.524.26-.45.608-.82 1.047-1.107.445-.286.95-.491 1.532-.614a8.803 8.803 0 012.751-.13c.329.034.671.096 1.04.185v-.437a3.3 3.3 0 00-.109-.875 1.873 1.873 0 00-.384-.731 1.784 1.784 0 00-.724-.492 3.165 3.165 0 00-1.143-.205c-.616 0-1.177.075-1.69.164a7.75 7.75 0 00-1.26.307l-.321-2.193c.335-.116.834-.232 1.478-.348a11.633 11.633 0 012.073-.177zm-8.034-1.271a1.626 1.626 0 01-1.628-1.62c0-.895.725-1.62 1.628-1.62.904 0 1.63.725 1.63 1.62 0 .895-.733 1.62-1.63 1.62zm1.348 13.22h-2.689V7.27l2.69-.423v11.956zm-4.714 0c-4.386.02-4.386-3.54-4.386-4.107l-.008-13.336 2.676-.424v13.254c0 .322 0 2.358 1.718 2.364v2.248zm-8.698-5.903c0-1.156-.253-2.119-.746-2.788-.493-.677-1.183-1.01-2.067-1.01-.882 0-1.574.333-2.065 1.01-.493.676-.733 1.632-.733 2.788 0 1.168.246 1.953.74 2.63.492.683 1.183 1.018 2.066 1.018.882 0 1.574-.342 2.067-1.019.492-.683.738-1.46.738-2.63zm2.737-.007c0 .902-.13 1.584-.397 2.33a5.52 5.52 0 01-1.128 1.906 4.986 4.986 0 01-1.752 1.223c-.685.286-1.739.45-2.265.45-.528-.006-1.574-.157-2.252-.45a5.096 5.096 0 01-1.744-1.223c-.487-.527-.863-1.162-1.137-1.906a6.345 6.345 0 01-.41-2.33c0-.902.123-1.77.397-2.508a5.554 5.554 0 011.15-1.892 5.133 5.133 0 011.75-1.216c.679-.287 1.425-.423 2.232-.423.808 0 1.553.142 2.237.423a4.88 4.88 0 011.753 1.216 5.644 5.644 0 011.135 1.892c.287.738.431 1.606.431 2.508zm-20.138 0c0 1.12.246 2.363.738 2.882.493.52 1.13.78 1.91.78.424 0 .828-.062 1.204-.178.377-.116.677-.253.917-.417V9.33a10.476 10.476 0 00-1.766-.226c-.971-.028-1.71.37-2.23 1.004-.513.636-.773 1.75-.773 2.788zm7.438 5.274c0 1.824-.466 3.156-1.404 4.004-.936.846-2.367 1.27-4.296 1.27-.705 0-2.17-.137-3.34-.396l.431-2.118c.98.205 2.272.26 2.95.26 1.074 0 1.84-.219 2.299-.656.459-.437.684-1.086.684-1.948v-.437a8.07 8.07 0 01-1.047.397c-.43.13-.93.198-1.492.198-.739 0-1.41-.116-2.018-.349a4.206 4.206 0 01-1.567-1.025c-.431-.45-.774-1.017-1.013-1.694-.24-.677-.363-1.885-.363-2.773 0-.834.13-1.88.384-2.577.26-.696.629-1.298 1.129-1.796.493-.498 1.095-.881 1.8-1.162a6.605 6.605 0 012.428-.457c.87 0 1.67.109 2.45.24.78.129 1.444.265 1.985.415V18.17z' fill='%235468FF'/%3E%3Cpath d='M6.972 6.677v1.627c-.712-.446-1.52-.67-2.425-.67-.585 0-1.045.13-1.38.391a1.24 1.24 0 00-.502 1.03c0 .425.164.765.494 1.02.33.256.835.532 1.516.83.447.192.795.356 1.045.495.25.138.537.332.862.582.324.25.563.548.718.894.154.345.23.741.23 1.188 0 .947-.334 1.691-1.004 2.234-.67.542-1.537.814-2.601.814-1.18 0-2.16-.229-2.936-.686v-1.708c.84.628 1.814.942 2.92.942.585 0 1.048-.136 1.388-.407.34-.271.51-.646.51-1.125 0-.287-.1-.55-.302-.79-.203-.24-.42-.42-.655-.542-.234-.123-.585-.29-1.053-.503a61.27 61.27 0 01-.582-.271 13.67 13.67 0 01-.55-.287 4.275 4.275 0 01-.567-.351 6.92 6.92 0 01-.455-.4c-.18-.17-.31-.34-.39-.51-.08-.17-.155-.37-.224-.598a2.553 2.553 0 01-.104-.742c0-.915.333-1.638.998-2.17.664-.532 1.523-.798 2.576-.798.968 0 1.793.17 2.473.51zm7.468 5.696v-.287c-.022-.607-.187-1.088-.495-1.444-.309-.357-.75-.535-1.324-.535-.532 0-.99.194-1.373.583-.382.388-.622.949-.717 1.683h3.909zm1.005 2.792v1.404c-.596.34-1.383.51-2.362.51-1.255 0-2.255-.377-3-1.132-.744-.755-1.116-1.744-1.116-2.968 0-1.297.34-2.316 1.021-3.055.68-.74 1.548-1.11 2.6-1.11 1.033 0 1.852.323 2.458.966.606.644.91 1.572.91 2.784 0 .33-.033.676-.096 1.038h-5.314c.107.702.405 1.239.894 1.611.49.372 1.106.558 1.85.558.862 0 1.58-.202 2.155-.606zm6.605-1.77h-1.212c-.596 0-1.045.116-1.349.35-.303.234-.454.532-.454.894 0 .372.117.664.35.877.235.213.575.32 1.022.32.51 0 .912-.142 1.204-.424.293-.281.44-.651.44-1.108v-.91zm-4.068-2.554V9.325c.627-.361 1.457-.542 2.489-.542 2.116 0 3.175 1.026 3.175 3.08V17h-1.548v-.957c-.415.68-1.143 1.02-2.186 1.02-.766 0-1.38-.22-1.843-.661-.462-.442-.694-1.003-.694-1.684 0-.776.293-1.38.878-1.81.585-.431 1.404-.647 2.457-.647h1.34V11.8c0-.554-.133-.971-.399-1.253-.266-.282-.707-.423-1.324-.423a4.07 4.07 0 00-2.345.718zm9.333-1.93v1.42c.394-1 1.101-1.5 2.123-1.5.148 0 .313.016.494.048v1.531a1.885 1.885 0 00-.75-.143c-.542 0-.989.24-1.34.718-.351.479-.527 1.048-.527 1.707V17h-1.563V8.91h1.563zm5.01 4.084c.022.82.272 1.492.75 2.019.479.526 1.15.79 2.01.79.639 0 1.235-.176 1.788-.527v1.404c-.521.319-1.186.479-1.995.479-1.265 0-2.276-.4-3.031-1.197-.755-.798-1.133-1.792-1.133-2.984 0-1.16.38-2.151 1.14-2.975.761-.825 1.79-1.237 3.088-1.237.702 0 1.346.149 1.93.447v1.436a3.242 3.242 0 00-1.77-.495c-.84 0-1.513.266-2.019.798-.505.532-.758 1.213-.758 2.042zM40.24 5.72v4.579c.458-1 1.293-1.5 2.505-1.5.787 0 1.42.245 1.899.734.479.49.718 1.17.718 2.042V17h-1.564v-5.106c0-.553-.14-.98-.422-1.284-.282-.303-.652-.455-1.11-.455-.531 0-1.002.202-1.411.606-.41.405-.615 1.022-.615 1.851V17h-1.563V5.72h1.563zm14.966 10.02c.596 0 1.096-.253 1.5-.758.404-.506.606-1.157.606-1.955 0-.915-.202-1.62-.606-2.114-.404-.495-.92-.742-1.548-.742-.553 0-1.05.224-1.491.67-.442.447-.662 1.133-.662 2.058 0 .958.212 1.67.638 2.138.425.469.946.703 1.563.703zM53.004 5.72v4.42c.574-.894 1.388-1.341 2.44-1.341 1.022 0 1.857.383 2.506 1.149.649.766.973 1.781.973 3.047 0 1.138-.309 2.109-.925 2.912-.617.803-1.463 1.205-2.537 1.205-1.075 0-1.894-.447-2.457-1.34V17h-1.58V5.72h1.58zm9.908 11.104l-3.223-7.913h1.739l1.005 2.632 1.26 3.415c.096-.32.48-1.458 1.15-3.415l.909-2.632h1.66l-2.92 7.866c-.777 2.074-1.963 3.11-3.559 3.11a2.92 2.92 0 01-.734-.079v-1.34c.17.042.351.064.543.064 1.032 0 1.755-.57 2.17-1.708z' fill='%235D6494'/%3E%3Cpath d='M89.632 5.967v-.772a.978.978 0 00-.978-.977h-2.28a.978.978 0 00-.978.977v.793c0 .088.082.15.171.13a7.127 7.127 0 011.984-.28c.65 0 1.295.088 1.917.259.082.02.164-.04.164-.13m-6.248 1.01l-.39-.389a.977.977 0 00-1.382 0l-.465.465a.973.973 0 000 1.38l.383.383c.062.061.15.047.205-.014.226-.307.472-.601.746-.874.281-.28.568-.526.883-.751.068-.042.075-.137.02-.2m4.16 2.453v3.341c0 .096.104.165.192.117l2.97-1.537c.068-.034.089-.117.055-.184a3.695 3.695 0 00-3.08-1.866c-.068 0-.136.054-.136.13m0 8.048a4.489 4.489 0 01-4.49-4.482 4.488 4.488 0 014.49-4.482 4.488 4.488 0 014.489 4.482 4.484 4.484 0 01-4.49 4.482m0-10.85a6.363 6.363 0 100 12.729 6.37 6.37 0 006.372-6.368 6.358 6.358 0 00-6.371-6.36' fill='%23FFF'/%3E%3C/g%3E%3C/svg%3E");background-repeat:no-repeat;background-position:50%;background-size:100%;overflow:hidden;text-indent:-9000px;padding:0!important;width:100%;height:100%;display:block}.dropdown-wrapper{cursor:pointer}.dropdown-wrapper .dropdown-title,.dropdown-wrapper .mobile-dropdown-title{display:block;font-size:.9rem;font-family:inherit;cursor:inherit;padding:inherit;line-height:1.4rem;background:transparent;border:none;font-weight:500;color:#2c3e50}.dropdown-wrapper .dropdown-title:hover,.dropdown-wrapper .mobile-dropdown-title:hover{border-color:transparent}.dropdown-wrapper .dropdown-title .arrow,.dropdown-wrapper .mobile-dropdown-title .arrow{vertical-align:middle;margin-top:-1px;margin-left:.4rem}.dropdown-wrapper .mobile-dropdown-title{display:none;font-weight:600}.dropdown-wrapper .mobile-dropdown-title font-size inherit:hover{color:#0041ff}.dropdown-wrapper .nav-dropdown .dropdown-item{color:inherit;line-height:1.7rem}.dropdown-wrapper .nav-dropdown .dropdown-item h4{margin:.45rem 0 0;border-top:1px solid #eee;padding:1rem 1.5rem .45rem 1.25rem}.dropdown-wrapper .nav-dropdown .dropdown-item .dropdown-subitem-wrapper{padding:0;list-style:none}.dropdown-wrapper .nav-dropdown .dropdown-item .dropdown-subitem-wrapper .dropdown-subitem{font-size:.9em}.dropdown-wrapper .nav-dropdown .dropdown-item a{display:block;line-height:1.7rem;position:relative;border-bottom:none;font-weight:400;margin-bottom:0;padding:0 1.5rem 0 1.25rem}.dropdown-wrapper .nav-dropdown .dropdown-item a.router-link-active,.dropdown-wrapper .nav-dropdown .dropdown-item a:hover{color:#0041ff}.dropdown-wrapper .nav-dropdown .dropdown-item a.router-link-active:after{content:"";width:0;height:0;border-left:5px solid #0041ff;border-top:3px solid transparent;border-bottom:3px solid transparent;position:absolute;top:calc(50% - 2px);left:9px}.dropdown-wrapper .nav-dropdown .dropdown-item:first-child h4{margin-top:0;padding-top:0;border-top:0}@media (max-width:719px){.dropdown-wrapper.open .dropdown-title{margin-bottom:.5rem}.dropdown-wrapper .dropdown-title{display:none}.dropdown-wrapper .mobile-dropdown-title{display:block}.dropdown-wrapper .nav-dropdown{transition:height .1s ease-out;overflow:hidden}.dropdown-wrapper .nav-dropdown .dropdown-item h4{border-top:0;margin-top:0;padding-top:0}.dropdown-wrapper .nav-dropdown .dropdown-item>a,.dropdown-wrapper .nav-dropdown .dropdown-item h4{font-size:15px;line-height:2rem}.dropdown-wrapper .nav-dropdown .dropdown-item .dropdown-subitem{font-size:14px;padding-left:1rem}}@media (min-width:719px){.dropdown-wrapper{height:1.8rem}.dropdown-wrapper.open .nav-dropdown,.dropdown-wrapper:hover .nav-dropdown{display:block!important}.dropdown-wrapper.open:blur{display:none}.dropdown-wrapper .nav-dropdown{display:none;height:auto!important;box-sizing:border-box;max-height:calc(100vh - 2.7rem);overflow-y:auto;position:absolute;top:100%;right:0;background-color:#fff;padding:.6rem 0;border:1px solid;border-color:#ddd #ddd #ccc;text-align:left;border-radius:.25rem;white-space:nowrap;margin:0}}.nav-links{display:inline-block}.nav-links a{line-height:1.4rem;color:inherit}.nav-links a.router-link-active,.nav-links a:hover{color:#0041ff}.nav-links .nav-item{position:relative;display:inline-block;margin-left:1.5rem;line-height:2rem}.nav-links .nav-item:first-child{margin-left:0}.nav-links .repo-link{margin-left:1.5rem}@media (max-width:719px){.nav-links .nav-item,.nav-links .repo-link{margin-left:0}}@media (min-width:719px){.nav-links a.router-link-active,.nav-links a:hover{color:#2c3e50}.nav-item>a:not(.external).router-link-active,.nav-item>a:not(.external):hover{margin-bottom:-2px;border-bottom:2px solid #1450ff}}.navbar{padding:.7rem 1.5rem;line-height:2.2rem}.navbar a,.navbar img,.navbar span{display:inline-block}.navbar .logo{height:2.2rem;min-width:2.2rem;margin-right:.8rem;vertical-align:top}.navbar .site-name{font-size:1.3rem;font-weight:600;color:#2c3e50;position:relative}.navbar .links{padding-left:1.5rem;box-sizing:border-box;background-color:#fff;white-space:nowrap;font-size:.9rem;position:absolute;right:1.5rem;top:.7rem;display:flex}.navbar .links .search-box{flex:0 0 auto;vertical-align:top}@media (max-width:719px){.navbar{padding-left:4rem}.navbar .can-hide{display:none}.navbar .links{padding-left:1.5rem}.navbar .site-name{width:calc(100vw - 9.4rem);overflow:hidden;white-space:nowrap;text-overflow:ellipsis}}.page-edit{max-width:960px;margin:0 auto;padding:2rem 2.5rem}@media (max-width:959px){.page-edit{padding:2rem}}@media (max-width:419px){.page-edit{padding:1.5rem}}.page-edit{padding-top:1rem;padding-bottom:1rem;overflow:auto}.page-edit .edit-link{display:inline-block}.page-edit .edit-link a{color:#4e6e8e;margin-right:.25rem}.page-edit .last-updated{float:right;font-size:.9em}.page-edit .last-updated .prefix{font-weight:500;color:#4e6e8e}.page-edit .last-updated .time{font-weight:400;color:#767676}@media (max-width:719px){.page-edit .edit-link{margin-bottom:.5rem}.page-edit .last-updated{font-size:.8em;float:none;text-align:left}}.page-nav{max-width:960px;margin:0 auto;padding:2rem 2.5rem}@media (max-width:959px){.page-nav{padding:2rem}}@media (max-width:419px){.page-nav{padding:1.5rem}}.page-nav{padding-top:1rem;padding-bottom:0}.page-nav .inner{min-height:2rem;margin-top:0;border-top:1px solid #e1e1e1;padding-top:1rem;overflow:auto}.page-nav .next{float:right}.page{padding-bottom:2rem;display:block}.table-of-contents ul{list-style-type:none;color:#0041ff}.table-of-contents ul li:before{content:"\0023";position:absolute;margin-left:-16px}.sidebar-group .sidebar-group{padding-left:.5em}.sidebar-group:not(.collapsable) .sidebar-heading:not(.clickable){cursor:auto;color:inherit}.sidebar-group.is-sub-group{padding-left:0}.sidebar-group.is-sub-group>.sidebar-heading{font-size:.95em;line-height:1.4;font-weight:400;padding-left:2rem}.sidebar-group.is-sub-group>.sidebar-heading:not(.clickable){opacity:.5}.sidebar-group.is-sub-group>.sidebar-group-items{padding-left:1rem}.sidebar-group.is-sub-group>.sidebar-group-items>li>.sidebar-link{font-size:.95em;border-left:none}.sidebar-group.depth-2>.sidebar-heading{border-left:none}.sidebar-heading{color:#2c3e50;transition:color .15s ease;cursor:pointer;font-size:1.1em;font-weight:700;padding:.35rem 1.5rem .35rem 1.25rem;width:100%;box-sizing:border-box;margin:0;border-left:.25rem solid transparent}.sidebar-heading.open,.sidebar-heading:hover{color:inherit}.sidebar-heading .arrow{position:relative;top:-.12em;left:.5em}.sidebar-heading.clickable.active{font-weight:600;color:#0041ff;border-left-color:#0041ff}.sidebar-heading.clickable:hover{color:#0041ff}.sidebar-group-items{transition:height .1s ease-out;font-size:.95em;overflow:hidden}.sidebar .sidebar-sub-headers{padding-left:1rem;font-size:.95em}a.sidebar-link{font-size:1em;font-weight:400;display:inline-block;color:#2c3e50;border-left:.25rem solid transparent;padding:.35rem 1rem .35rem 1.25rem;line-height:1.4;width:100%;box-sizing:border-box}a.sidebar-link:hover{color:#0041ff}a.sidebar-link.active{font-weight:600;color:#0041ff;border-left-color:#0041ff}.sidebar-group a.sidebar-link{padding-left:2rem}.sidebar-sub-headers a.sidebar-link{padding-top:.25rem;padding-bottom:.25rem;border-left:none}.sidebar-sub-headers a.sidebar-link.active{font-weight:500}.sidebar ul{padding:0;margin:0;list-style-type:none}.sidebar a{display:inline-block}.sidebar .nav-links{display:none;border-bottom:1px solid #e1e1e1;padding:.5rem 0 .75rem}.sidebar .nav-links a{font-weight:600}.sidebar .nav-links .nav-item,.sidebar .nav-links .repo-link{display:block;line-height:1.25rem;font-size:1.1em;padding:.5rem 0 .5rem 1.5rem}.sidebar>.sidebar-links{padding:1.5rem 0}.sidebar>.sidebar-links>li>a.sidebar-link{font-size:1.1em;line-height:1.7;font-weight:700}.sidebar>.sidebar-links>li:not(:first-child){margin-top:.75rem}@media (max-width:719px){.sidebar .nav-links{display:block}.sidebar .nav-links .dropdown-wrapper .nav-dropdown .dropdown-item a.router-link-active:after{top:calc(1rem - 2px)}.sidebar>.sidebar-links{padding:1rem 0}} \ No newline at end of file diff --git a/docs/.vuepress/dist/assets/img/bundle.5302b129.png b/docs/.vuepress/dist/assets/img/bundle.5302b129.png new file mode 100644 index 00000000..a2a5cb22 Binary files /dev/null and b/docs/.vuepress/dist/assets/img/bundle.5302b129.png differ diff --git a/docs/.vuepress/dist/assets/img/bundleOptions.01cb8cdc.png b/docs/.vuepress/dist/assets/img/bundleOptions.01cb8cdc.png new file mode 100644 index 00000000..a54b09ea Binary files /dev/null and b/docs/.vuepress/dist/assets/img/bundleOptions.01cb8cdc.png differ diff --git a/docs/.vuepress/dist/assets/img/configurable.9fa6fb76.png b/docs/.vuepress/dist/assets/img/configurable.9fa6fb76.png new file mode 100644 index 00000000..8f69f0e1 Binary files /dev/null and b/docs/.vuepress/dist/assets/img/configurable.9fa6fb76.png differ diff --git a/docs/.vuepress/dist/assets/img/configurableAttributes.0341eddd.png b/docs/.vuepress/dist/assets/img/configurableAttributes.0341eddd.png new file mode 100644 index 00000000..1e1b7fb9 Binary files /dev/null and b/docs/.vuepress/dist/assets/img/configurableAttributes.0341eddd.png differ diff --git a/docs/.vuepress/dist/assets/img/description.40848a5f.png b/docs/.vuepress/dist/assets/img/description.40848a5f.png new file mode 100644 index 00000000..59227aa7 Binary files /dev/null and b/docs/.vuepress/dist/assets/img/description.40848a5f.png differ diff --git a/docs/.vuepress/dist/assets/img/description.8a01022f.png b/docs/.vuepress/dist/assets/img/description.8a01022f.png new file mode 100644 index 00000000..5a6922f1 Binary files /dev/null and b/docs/.vuepress/dist/assets/img/description.8a01022f.png differ diff --git a/docs/.vuepress/dist/assets/img/description.cf62b04a.png b/docs/.vuepress/dist/assets/img/description.cf62b04a.png new file mode 100644 index 00000000..856ff9bc Binary files /dev/null and b/docs/.vuepress/dist/assets/img/description.cf62b04a.png differ diff --git a/docs/.vuepress/dist/assets/img/descriptions.765ffef8.png b/docs/.vuepress/dist/assets/img/descriptions.765ffef8.png new file mode 100644 index 00000000..75d85a1b Binary files /dev/null and b/docs/.vuepress/dist/assets/img/descriptions.765ffef8.png differ diff --git a/docs/.vuepress/dist/assets/img/editProduct.a0f174d2.png b/docs/.vuepress/dist/assets/img/editProduct.a0f174d2.png new file mode 100644 index 00000000..8e9c6e01 Binary files /dev/null and b/docs/.vuepress/dist/assets/img/editProduct.a0f174d2.png differ diff --git a/docs/.vuepress/dist/assets/img/editProduct.f3d03ba3.png b/docs/.vuepress/dist/assets/img/editProduct.f3d03ba3.png new file mode 100644 index 00000000..cf973cc3 Binary files /dev/null and b/docs/.vuepress/dist/assets/img/editProduct.f3d03ba3.png differ diff --git a/docs/.vuepress/dist/assets/img/editProduct.fff08496.png b/docs/.vuepress/dist/assets/img/editProduct.fff08496.png new file mode 100644 index 00000000..39fc2d71 Binary files /dev/null and b/docs/.vuepress/dist/assets/img/editProduct.fff08496.png differ diff --git a/docs/.vuepress/dist/assets/img/editProducts.1d1ea4f3.png b/docs/.vuepress/dist/assets/img/editProducts.1d1ea4f3.png new file mode 100644 index 00000000..41bf02cd Binary files /dev/null and b/docs/.vuepress/dist/assets/img/editProducts.1d1ea4f3.png differ diff --git a/docs/.vuepress/dist/assets/img/image.6a9cc529.png b/docs/.vuepress/dist/assets/img/image.6a9cc529.png new file mode 100644 index 00000000..edca5e01 Binary files /dev/null and b/docs/.vuepress/dist/assets/img/image.6a9cc529.png differ diff --git a/docs/.vuepress/dist/assets/img/image.ac99298b.png b/docs/.vuepress/dist/assets/img/image.ac99298b.png new file mode 100644 index 00000000..e9500c54 Binary files /dev/null and b/docs/.vuepress/dist/assets/img/image.ac99298b.png differ diff --git a/docs/.vuepress/dist/assets/img/image.b30e57d4.png b/docs/.vuepress/dist/assets/img/image.b30e57d4.png new file mode 100644 index 00000000..30a69ee1 Binary files /dev/null and b/docs/.vuepress/dist/assets/img/image.b30e57d4.png differ diff --git a/docs/.vuepress/dist/assets/img/image.e99c275b.png b/docs/.vuepress/dist/assets/img/image.e99c275b.png new file mode 100644 index 00000000..3b42f767 Binary files /dev/null and b/docs/.vuepress/dist/assets/img/image.e99c275b.png differ diff --git a/docs/.vuepress/dist/assets/img/metaDescription.16764ed9.png b/docs/.vuepress/dist/assets/img/metaDescription.16764ed9.png new file mode 100644 index 00000000..370beedd Binary files /dev/null and b/docs/.vuepress/dist/assets/img/metaDescription.16764ed9.png differ diff --git a/docs/.vuepress/dist/assets/img/metaDescription.74f66c89.png b/docs/.vuepress/dist/assets/img/metaDescription.74f66c89.png new file mode 100644 index 00000000..29c337a6 Binary files /dev/null and b/docs/.vuepress/dist/assets/img/metaDescription.74f66c89.png differ diff --git a/docs/.vuepress/dist/assets/img/metaDescription.afb36600.png b/docs/.vuepress/dist/assets/img/metaDescription.afb36600.png new file mode 100644 index 00000000..bbaedc50 Binary files /dev/null and b/docs/.vuepress/dist/assets/img/metaDescription.afb36600.png differ diff --git a/docs/.vuepress/dist/assets/img/metaDescriptions.4dfbc31b.png b/docs/.vuepress/dist/assets/img/metaDescriptions.4dfbc31b.png new file mode 100644 index 00000000..3951ed81 Binary files /dev/null and b/docs/.vuepress/dist/assets/img/metaDescriptions.4dfbc31b.png differ diff --git a/docs/.vuepress/dist/assets/img/options.001937e2.png b/docs/.vuepress/dist/assets/img/options.001937e2.png new file mode 100644 index 00000000..b07f7c02 Binary files /dev/null and b/docs/.vuepress/dist/assets/img/options.001937e2.png differ diff --git a/docs/.vuepress/dist/assets/img/output.31b099f6.png b/docs/.vuepress/dist/assets/img/output.31b099f6.png new file mode 100644 index 00000000..2038b8a5 Binary files /dev/null and b/docs/.vuepress/dist/assets/img/output.31b099f6.png differ diff --git a/docs/.vuepress/dist/assets/img/output.c8ed1df3.png b/docs/.vuepress/dist/assets/img/output.c8ed1df3.png new file mode 100644 index 00000000..91c0ea3e Binary files /dev/null and b/docs/.vuepress/dist/assets/img/output.c8ed1df3.png differ diff --git a/docs/.vuepress/dist/assets/img/output.cc9621ee.png b/docs/.vuepress/dist/assets/img/output.cc9621ee.png new file mode 100644 index 00000000..aaf64178 Binary files /dev/null and b/docs/.vuepress/dist/assets/img/output.cc9621ee.png differ diff --git a/docs/.vuepress/dist/assets/img/price.86fae45c.png b/docs/.vuepress/dist/assets/img/price.86fae45c.png new file mode 100644 index 00000000..7fb241ee Binary files /dev/null and b/docs/.vuepress/dist/assets/img/price.86fae45c.png differ diff --git a/docs/.vuepress/dist/assets/img/price.b32785ac.png b/docs/.vuepress/dist/assets/img/price.b32785ac.png new file mode 100644 index 00000000..9eb133a0 Binary files /dev/null and b/docs/.vuepress/dist/assets/img/price.b32785ac.png differ diff --git a/docs/.vuepress/dist/assets/img/product.4402c959.png b/docs/.vuepress/dist/assets/img/product.4402c959.png new file mode 100644 index 00000000..c9ffc720 Binary files /dev/null and b/docs/.vuepress/dist/assets/img/product.4402c959.png differ diff --git a/docs/.vuepress/dist/assets/img/search.83621669.svg b/docs/.vuepress/dist/assets/img/search.83621669.svg new file mode 100644 index 00000000..03d83913 --- /dev/null +++ b/docs/.vuepress/dist/assets/img/search.83621669.svg @@ -0,0 +1 @@ + diff --git a/docs/.vuepress/dist/assets/img/simple.548f03a1.png b/docs/.vuepress/dist/assets/img/simple.548f03a1.png new file mode 100644 index 00000000..91ef39df Binary files /dev/null and b/docs/.vuepress/dist/assets/img/simple.548f03a1.png differ diff --git a/docs/.vuepress/dist/assets/img/toggleButtons.db6f5a12.png b/docs/.vuepress/dist/assets/img/toggleButtons.db6f5a12.png new file mode 100644 index 00000000..7740ea31 Binary files /dev/null and b/docs/.vuepress/dist/assets/img/toggleButtons.db6f5a12.png differ diff --git a/docs/.vuepress/dist/assets/img/variations.9be19c16.png b/docs/.vuepress/dist/assets/img/variations.9be19c16.png new file mode 100644 index 00000000..d2ad9c44 Binary files /dev/null and b/docs/.vuepress/dist/assets/img/variations.9be19c16.png differ diff --git a/docs/.vuepress/dist/assets/img/virtual.e6449259.png b/docs/.vuepress/dist/assets/img/virtual.e6449259.png new file mode 100644 index 00000000..1d3e63ba Binary files /dev/null and b/docs/.vuepress/dist/assets/img/virtual.e6449259.png differ diff --git a/docs/.vuepress/dist/assets/js/1.8d1309f7.js b/docs/.vuepress/dist/assets/js/1.8d1309f7.js new file mode 100644 index 00000000..e901e2d4 --- /dev/null +++ b/docs/.vuepress/dist/assets/js/1.8d1309f7.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[1,10,16,21,22,23],{245:function(t,e,n){"use strict";n.d(e,"d",(function(){return s})),n.d(e,"a",(function(){return r})),n.d(e,"i",(function(){return o})),n.d(e,"f",(function(){return l})),n.d(e,"g",(function(){return u})),n.d(e,"h",(function(){return c})),n.d(e,"b",(function(){return h})),n.d(e,"e",(function(){return f})),n.d(e,"k",(function(){return p})),n.d(e,"l",(function(){return d})),n.d(e,"c",(function(){return m})),n.d(e,"j",(function(){return v}));n(91);const s=/#.*$/,i=/\.(md|html)$/,r=/\/$/,o=/^[a-z]+:/i;function a(t){return decodeURI(t).replace(s,"").replace(i,"")}function l(t){return o.test(t)}function u(t){return/^mailto:/.test(t)}function c(t){return/^tel:/.test(t)}function h(t){if(l(t))return t;const e=t.match(s),n=e?e[0]:"",i=a(t);return r.test(i)?t:i+".html"+n}function f(t,e){const n=decodeURIComponent(t.hash),i=function(t){const e=t.match(s);if(e)return e[0]}(e);if(i&&n!==i)return!1;return a(t.path)===a(e)}function p(t,e,n){if(l(e))return{type:"external",path:e};n&&(e=function(t,e,n){const s=t.charAt(0);if("/"===s)return t;if("?"===s||"#"===s)return e+t;const i=e.split("/");n&&i[i.length-1]||i.pop();const r=t.replace(/^\//,"").split("/");for(let t=0;tfunction t(e,n,s,i=1){if("string"==typeof e)return p(n,e,s);if(Array.isArray(e))return Object.assign(p(n,e[0],s),{title:e[1]});{const r=e.children||[];return 0===r.length&&e.path?Object.assign(p(n,e.path,s),{title:e.title}):{type:"group",path:e.path,title:e.title,sidebarDepth:e.sidebarDepth,initialOpenGroupIndex:e.initialOpenGroupIndex,children:r.map(e=>t(e,n,s,i+1)),collapsable:!1!==e.collapsable}}}(t,i,n)):[]}return[]}function g(t){const e=m(t.headers||[]);return[{type:"group",collapsable:!1,title:t.title,path:null,children:e.map(e=>({type:"auto",title:e.title,basePath:t.path,path:t.path+"#"+e.slug,children:e.children||[]}))}]}function m(t){let e;return(t=t.map(t=>Object.assign({},t))).forEach(t=>{2===t.level?e=t:e&&(e.children||(e.children=[])).push(t)}),t.filter(t=>2===t.level)}function v(t){return Object.assign(t,{type:t.items&&t.items.length?"links":"link"})}},246:function(t,e,n){},247:function(t,e,n){"use strict";n.r(e);var s=n(245),i={name:"NavLink",props:{item:{required:!0}},computed:{link(){return Object(s.b)(this.item.link)},exact(){return this.$site.locales?Object.keys(this.$site.locales).some(t=>t===this.link):"/"===this.link},isNonHttpURI(){return Object(s.g)(this.link)||Object(s.h)(this.link)},isBlankTarget(){return"_blank"===this.target},isInternal(){return!Object(s.f)(this.link)&&!this.isBlankTarget},target(){return this.isNonHttpURI?null:this.item.target?this.item.target:Object(s.f)(this.link)?"_blank":""},rel(){return this.isNonHttpURI||!1===this.item.rel?null:this.item.rel?this.item.rel:this.isBlankTarget?"noopener noreferrer":null}},methods:{focusoutAction(){this.$emit("focusout")}}},r=n(10),o=Object(r.a)(i,(function(){var t=this,e=t._self._c;return t.isInternal?e("RouterLink",{staticClass:"nav-link",attrs:{to:t.link,exact:t.exact},nativeOn:{focusout:function(e){return t.focusoutAction.apply(null,arguments)}}},[t._v("\n "+t._s(t.item.text)+"\n")]):e("a",{staticClass:"nav-link external",attrs:{href:t.link,target:t.target,rel:t.rel},on:{focusout:t.focusoutAction}},[t._v("\n "+t._s(t.item.text)+"\n "),t.isBlankTarget?e("OutboundLink"):t._e()],1)}),[],!1,null,null,null);e.default=o.exports},248:function(t,e,n){"use strict";n.r(e);var s={name:"DropdownTransition",methods:{setHeight(t){t.style.height=t.scrollHeight+"px"},unsetHeight(t){t.style.height=""}}},i=(n(249),n(10)),r=Object(i.a)(s,(function(){return(0,this._self._c)("transition",{attrs:{name:"dropdown"},on:{enter:this.setHeight,"after-enter":this.unsetHeight,"before-leave":this.setHeight}},[this._t("default")],2)}),[],!1,null,null,null);e.default=r.exports},249:function(t,e,n){"use strict";n(246)},250:function(t,e,n){},253:function(t,e,n){},257:function(t,e,n){"use strict";n(250)},260:function(t,e,n){"use strict";n.r(e);var s=n(247),i=n(248),r=n(92),o=n.n(r),a={name:"DropdownLink",components:{NavLink:s.default,DropdownTransition:i.default},props:{item:{required:!0}},data:()=>({open:!1}),computed:{dropdownAriaLabel(){return this.item.ariaLabel||this.item.text}},watch:{$route(){this.open=!1}},methods:{setOpen(t){this.open=t},isLastItemOfArray:(t,e)=>o()(e)===t,handleDropdown(){0===event.detail&&this.setOpen(!this.open)}}},l=(n(257),n(10)),u=Object(l.a)(a,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"dropdown-wrapper",class:{open:t.open}},[e("button",{staticClass:"dropdown-title",attrs:{type:"button","aria-label":t.dropdownAriaLabel},on:{click:t.handleDropdown}},[e("span",{staticClass:"title"},[t._v(t._s(t.item.text))]),t._v(" "),e("span",{staticClass:"arrow down"})]),t._v(" "),e("button",{staticClass:"mobile-dropdown-title",attrs:{type:"button","aria-label":t.dropdownAriaLabel},on:{click:function(e){return t.setOpen(!t.open)}}},[e("span",{staticClass:"title"},[t._v(t._s(t.item.text))]),t._v(" "),e("span",{staticClass:"arrow",class:t.open?"down":"right"})]),t._v(" "),e("DropdownTransition",[e("ul",{directives:[{name:"show",rawName:"v-show",value:t.open,expression:"open"}],staticClass:"nav-dropdown"},t._l(t.item.items,(function(n,s){return e("li",{key:n.link||s,staticClass:"dropdown-item"},["links"===n.type?e("h4",[t._v("\n "+t._s(n.text)+"\n ")]):t._e(),t._v(" "),"links"===n.type?e("ul",{staticClass:"dropdown-subitem-wrapper"},t._l(n.items,(function(s){return e("li",{key:s.link,staticClass:"dropdown-subitem"},[e("NavLink",{attrs:{item:s},on:{focusout:function(e){t.isLastItemOfArray(s,n.items)&&t.isLastItemOfArray(n,t.item.items)&&t.setOpen(!1)}}})],1)})),0):e("NavLink",{attrs:{item:n},on:{focusout:function(e){t.isLastItemOfArray(n,t.item.items)&&t.setOpen(!1)}}})],1)})),0)])],1)}),[],!1,null,null,null);e.default=u.exports},263:function(t,e,n){"use strict";n(253)},264:function(t,e,n){},271:function(t,e,n){"use strict";n.r(e);n(91);var s=n(260),i=n(245),r={name:"NavLinks",components:{NavLink:n(247).default,DropdownLink:s.default},data:()=>({version:"2.x"}),computed:{userNav(){return this.$themeLocaleConfig.nav||this.$site.themeConfig.nav||[]},nav(){const{locales:t}=this.$site;if(t&&Object.keys(t).length>1){const e=this.$page.path,n=this.$router.options.routes,s=this.$site.themeConfig.locales||{},i={text:this.$themeLocaleConfig.selectText||"Languages",ariaLabel:this.$themeLocaleConfig.ariaLabel||"Select language",items:Object.keys(t).map(i=>{const r=t[i],o=s[i]&&s[i].label||r.lang;let a;return r.lang===this.$lang?a=e:(a=e.replace(this.$localeConfig.path,i),n.some(t=>t.path===a)||(a=i)),{text:o,link:a}})};return[...this.userNav,i]}return this.userNav},userLinks(){return(this.nav||[]).map(t=>Object.assign(Object(i.j)(t),{items:(t.items||[]).map(i.j)}))},repoLink(){const{repo:t}=this.$site.themeConfig;return t?/^https?:/.test(t)?t:"https://github.com/"+t:null},repoLabel(){if(!this.repoLink)return;if(this.$site.themeConfig.repoLabel)return this.$site.themeConfig.repoLabel;const t=this.repoLink.match(/^https?:\/\/[^/]+/)[0],e=["GitHub","GitLab","Bitbucket"];for(let n=0;n{let s=i()(e,"title","");return i()(e,"frontmatter.tags")&&(s+=" "+e.frontmatter.tags.join(" ")),n&&(s+=" "+n),o(t,s)};const o=(t,e)=>{const n=t=>t.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"),s=new RegExp("[^\0-]"),i=t.split(/\s+/g).map(t=>t.trim()).filter(t=>!!t);if(s.test(t))return i.some(t=>e.toLowerCase().indexOf(t)>-1);{const s=t.endsWith(" ");return new RegExp(i.map((t,e)=>i.length!==e+1||s?`(?=.*\\b${n(t)}\\b)`:`(?=.*\\b${n(t)})`).join("")+".+","gi").test(e)}};var a={name:"SearchBox",data:()=>({query:"",focused:!1,focusIndex:0,placeholder:void 0}),computed:{showSuggestions(){return this.focused&&this.suggestions&&this.suggestions.length},suggestions(){const t=this.query.trim().toLowerCase();if(!t)return;const{pages:e}=this.$site,n=this.$site.themeConfig.searchMaxSuggestions||5,s=this.$localePath,i=[];for(let o=0;o=n);o++){const a=e[o];if(this.getPageLocalePath(a)===s&&this.isSearchable(a))if(r(t,a))i.push(a);else if(a.headers)for(let e=0;e=n);e++){const n=a.headers[e];n.title&&r(t,a,n.title)&&i.push(Object.assign({},a,{path:a.path+"#"+n.slug,header:n}))}}return i},alignRight(){return(this.$site.themeConfig.nav||[]).length+(this.$site.repo?1:0)<=2}},mounted(){this.placeholder=this.$site.themeConfig.searchPlaceholder||"",document.addEventListener("keydown",this.onHotkey)},beforeDestroy(){document.removeEventListener("keydown",this.onHotkey)},methods:{getPageLocalePath(t){for(const e in this.$site.locales||{})if("/"!==e&&0===t.path.indexOf(e))return e;return"/"},isSearchable(t){let e=null;return null===e||(e=Array.isArray(e)?e:new Array(e),e.filter(e=>t.path.match(e)).length>0)},onHotkey(t){t.srcElement===document.body&&["s","/"].includes(t.key)&&(this.$refs.input.focus(),t.preventDefault())},onUp(){this.showSuggestions&&(this.focusIndex>0?this.focusIndex--:this.focusIndex=this.suggestions.length-1)},onDown(){this.showSuggestions&&(this.focusIndex "+t._s(n.header.title))]):t._e()])])})),0):t._e()])}),[],!1,null,null,null).exports,c=n(287),h=n(271);function f(t,e){return t.ownerDocument.defaultView.getComputedStyle(t,null)[e]}var p={name:"Navbar",components:{SidebarButton:c.default,NavLinks:h.default,SearchBox:u,AlgoliaSearchBox:{}},data:()=>({linksWrapMaxWidth:null}),computed:{algolia(){return this.$themeLocaleConfig.algolia||this.$site.themeConfig.algolia||{}},isAlgoliaSearch(){return this.algolia&&this.algolia.apiKey&&this.algolia.indexName}},mounted(){const t=parseInt(f(this.$el,"paddingLeft"))+parseInt(f(this.$el,"paddingRight")),e=()=>{document.documentElement.clientWidth<719?this.linksWrapMaxWidth=null:this.linksWrapMaxWidth=this.$el.offsetWidth-t-(this.$refs.siteName&&this.$refs.siteName.offsetWidth||0)};e(),window.addEventListener("resize",e,!1)}},d=(n(294),Object(l.a)(p,(function(){var t=this,e=t._self._c;return e("header",{staticClass:"navbar"},[e("SidebarButton",{on:{"toggle-sidebar":function(e){return t.$emit("toggle-sidebar")}}}),t._v(" "),e("RouterLink",{staticClass:"home-link",attrs:{to:t.$localePath}},[t.$site.themeConfig.logo?e("img",{staticClass:"logo",attrs:{src:t.$withBase(t.$site.themeConfig.logo),alt:t.$siteTitle}}):t._e(),t._v(" "),t.$siteTitle?e("span",{ref:"siteName",staticClass:"site-name",class:{"can-hide":t.$site.themeConfig.logo}},[t._v(t._s(t.$siteTitle))]):t._e()]),t._v(" "),e("div",{staticClass:"links",style:t.linksWrapMaxWidth?{"max-width":t.linksWrapMaxWidth+"px"}:{}},[t.isAlgoliaSearch?e("AlgoliaSearchBox",{attrs:{options:t.algolia}}):!1!==t.$site.themeConfig.search&&!1!==t.$page.frontmatter.search?e("SearchBox"):t._e(),t._v(" "),e("NavLinks",{staticClass:"can-hide"})],1)],1)}),[],!1,null,null,null));e.default=d.exports}}]); \ No newline at end of file diff --git a/docs/.vuepress/dist/assets/js/10.223754d8.js b/docs/.vuepress/dist/assets/js/10.223754d8.js new file mode 100644 index 00000000..1f4dab2c --- /dev/null +++ b/docs/.vuepress/dist/assets/js/10.223754d8.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[10,16,21,23],{245:function(t,e,n){"use strict";n.d(e,"d",(function(){return i})),n.d(e,"a",(function(){return s})),n.d(e,"i",(function(){return a})),n.d(e,"f",(function(){return l})),n.d(e,"g",(function(){return u})),n.d(e,"h",(function(){return c})),n.d(e,"b",(function(){return p})),n.d(e,"e",(function(){return h})),n.d(e,"k",(function(){return f})),n.d(e,"l",(function(){return d})),n.d(e,"c",(function(){return g})),n.d(e,"j",(function(){return b}));n(91);const i=/#.*$/,r=/\.(md|html)$/,s=/\/$/,a=/^[a-z]+:/i;function o(t){return decodeURI(t).replace(i,"").replace(r,"")}function l(t){return a.test(t)}function u(t){return/^mailto:/.test(t)}function c(t){return/^tel:/.test(t)}function p(t){if(l(t))return t;const e=t.match(i),n=e?e[0]:"",r=o(t);return s.test(r)?t:r+".html"+n}function h(t,e){const n=decodeURIComponent(t.hash),r=function(t){const e=t.match(i);if(e)return e[0]}(e);if(r&&n!==r)return!1;return o(t.path)===o(e)}function f(t,e,n){if(l(e))return{type:"external",path:e};n&&(e=function(t,e,n){const i=t.charAt(0);if("/"===i)return t;if("?"===i||"#"===i)return e+t;const r=e.split("/");n&&r[r.length-1]||r.pop();const s=t.replace(/^\//,"").split("/");for(let t=0;tfunction t(e,n,i,r=1){if("string"==typeof e)return f(n,e,i);if(Array.isArray(e))return Object.assign(f(n,e[0],i),{title:e[1]});{const s=e.children||[];return 0===s.length&&e.path?Object.assign(f(n,e.path,i),{title:e.title}):{type:"group",path:e.path,title:e.title,sidebarDepth:e.sidebarDepth,initialOpenGroupIndex:e.initialOpenGroupIndex,children:s.map(e=>t(e,n,i,r+1)),collapsable:!1!==e.collapsable}}}(t,r,n)):[]}return[]}function m(t){const e=g(t.headers||[]);return[{type:"group",collapsable:!1,title:t.title,path:null,children:e.map(e=>({type:"auto",title:e.title,basePath:t.path,path:t.path+"#"+e.slug,children:e.children||[]}))}]}function g(t){let e;return(t=t.map(t=>Object.assign({},t))).forEach(t=>{2===t.level?e=t:e&&(e.children||(e.children=[])).push(t)}),t.filter(t=>2===t.level)}function b(t){return Object.assign(t,{type:t.items&&t.items.length?"links":"link"})}},246:function(t,e,n){},247:function(t,e,n){"use strict";n.r(e);var i=n(245),r={name:"NavLink",props:{item:{required:!0}},computed:{link(){return Object(i.b)(this.item.link)},exact(){return this.$site.locales?Object.keys(this.$site.locales).some(t=>t===this.link):"/"===this.link},isNonHttpURI(){return Object(i.g)(this.link)||Object(i.h)(this.link)},isBlankTarget(){return"_blank"===this.target},isInternal(){return!Object(i.f)(this.link)&&!this.isBlankTarget},target(){return this.isNonHttpURI?null:this.item.target?this.item.target:Object(i.f)(this.link)?"_blank":""},rel(){return this.isNonHttpURI||!1===this.item.rel?null:this.item.rel?this.item.rel:this.isBlankTarget?"noopener noreferrer":null}},methods:{focusoutAction(){this.$emit("focusout")}}},s=n(10),a=Object(s.a)(r,(function(){var t=this,e=t._self._c;return t.isInternal?e("RouterLink",{staticClass:"nav-link",attrs:{to:t.link,exact:t.exact},nativeOn:{focusout:function(e){return t.focusoutAction.apply(null,arguments)}}},[t._v("\n "+t._s(t.item.text)+"\n")]):e("a",{staticClass:"nav-link external",attrs:{href:t.link,target:t.target,rel:t.rel},on:{focusout:t.focusoutAction}},[t._v("\n "+t._s(t.item.text)+"\n "),t.isBlankTarget?e("OutboundLink"):t._e()],1)}),[],!1,null,null,null);e.default=a.exports},248:function(t,e,n){"use strict";n.r(e);var i={name:"DropdownTransition",methods:{setHeight(t){t.style.height=t.scrollHeight+"px"},unsetHeight(t){t.style.height=""}}},r=(n(249),n(10)),s=Object(r.a)(i,(function(){return(0,this._self._c)("transition",{attrs:{name:"dropdown"},on:{enter:this.setHeight,"after-enter":this.unsetHeight,"before-leave":this.setHeight}},[this._t("default")],2)}),[],!1,null,null,null);e.default=s.exports},249:function(t,e,n){"use strict";n(246)},250:function(t,e,n){},253:function(t,e,n){},257:function(t,e,n){"use strict";n(250)},260:function(t,e,n){"use strict";n.r(e);var i=n(247),r=n(248),s=n(92),a=n.n(s),o={name:"DropdownLink",components:{NavLink:i.default,DropdownTransition:r.default},props:{item:{required:!0}},data:()=>({open:!1}),computed:{dropdownAriaLabel(){return this.item.ariaLabel||this.item.text}},watch:{$route(){this.open=!1}},methods:{setOpen(t){this.open=t},isLastItemOfArray:(t,e)=>a()(e)===t,handleDropdown(){0===event.detail&&this.setOpen(!this.open)}}},l=(n(257),n(10)),u=Object(l.a)(o,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"dropdown-wrapper",class:{open:t.open}},[e("button",{staticClass:"dropdown-title",attrs:{type:"button","aria-label":t.dropdownAriaLabel},on:{click:t.handleDropdown}},[e("span",{staticClass:"title"},[t._v(t._s(t.item.text))]),t._v(" "),e("span",{staticClass:"arrow down"})]),t._v(" "),e("button",{staticClass:"mobile-dropdown-title",attrs:{type:"button","aria-label":t.dropdownAriaLabel},on:{click:function(e){return t.setOpen(!t.open)}}},[e("span",{staticClass:"title"},[t._v(t._s(t.item.text))]),t._v(" "),e("span",{staticClass:"arrow",class:t.open?"down":"right"})]),t._v(" "),e("DropdownTransition",[e("ul",{directives:[{name:"show",rawName:"v-show",value:t.open,expression:"open"}],staticClass:"nav-dropdown"},t._l(t.item.items,(function(n,i){return e("li",{key:n.link||i,staticClass:"dropdown-item"},["links"===n.type?e("h4",[t._v("\n "+t._s(n.text)+"\n ")]):t._e(),t._v(" "),"links"===n.type?e("ul",{staticClass:"dropdown-subitem-wrapper"},t._l(n.items,(function(i){return e("li",{key:i.link,staticClass:"dropdown-subitem"},[e("NavLink",{attrs:{item:i},on:{focusout:function(e){t.isLastItemOfArray(i,n.items)&&t.isLastItemOfArray(n,t.item.items)&&t.setOpen(!1)}}})],1)})),0):e("NavLink",{attrs:{item:n},on:{focusout:function(e){t.isLastItemOfArray(n,t.item.items)&&t.setOpen(!1)}}})],1)})),0)])],1)}),[],!1,null,null,null);e.default=u.exports},263:function(t,e,n){"use strict";n(253)},271:function(t,e,n){"use strict";n.r(e);n(91);var i=n(260),r=n(245),s={name:"NavLinks",components:{NavLink:n(247).default,DropdownLink:i.default},data:()=>({version:"2.x"}),computed:{userNav(){return this.$themeLocaleConfig.nav||this.$site.themeConfig.nav||[]},nav(){const{locales:t}=this.$site;if(t&&Object.keys(t).length>1){const e=this.$page.path,n=this.$router.options.routes,i=this.$site.themeConfig.locales||{},r={text:this.$themeLocaleConfig.selectText||"Languages",ariaLabel:this.$themeLocaleConfig.ariaLabel||"Select language",items:Object.keys(t).map(r=>{const s=t[r],a=i[r]&&i[r].label||s.lang;let o;return s.lang===this.$lang?o=e:(o=e.replace(this.$localeConfig.path,r),n.some(t=>t.path===o)||(o=r)),{text:a,link:o}})};return[...this.userNav,r]}return this.userNav},userLinks(){return(this.nav||[]).map(t=>Object.assign(Object(r.j)(t),{items:(t.items||[]).map(r.j)}))},repoLink(){const{repo:t}=this.$site.themeConfig;return t?/^https?:/.test(t)?t:"https://github.com/"+t:null},repoLabel(){if(!this.repoLink)return;if(this.$site.themeConfig.repoLabel)return this.$site.themeConfig.repoLabel;const t=this.repoLink.match(/^https?:\/\/[^/]+/)[0],e=["GitHub","GitLab","Bitbucket"];for(let n=0;n> Products >>")]),t._v(" select "),A("strong",[t._v("Simple")]),t._v(" under Product Type.")]),t._v(" "),A("p",[A("img",{attrs:{src:e(314),alt:"Simple"}})])])]),t._v(" "),A("p",[t._v("Now Save the Product, and you will get redirected to the Edit product page as shown below.")]),t._v(" "),A("h3",{attrs:{id:"general-attributes"}},[A("a",{staticClass:"header-anchor",attrs:{href:"#general-attributes"}},[t._v("#")]),t._v(" General Attributes")]),t._v(" "),A("p",[t._v("Below is the list of fields you need to fill under General Attributes.")]),t._v(" "),A("p",[A("img",{attrs:{src:e(315),alt:"editProduct"}})]),t._v(" "),A("h3",{attrs:{id:"description"}},[A("a",{staticClass:"header-anchor",attrs:{href:"#description"}},[t._v("#")]),t._v(" Description")]),t._v(" "),A("p",[t._v("Below is the list of the fields you need to fill in regarding the product under description.")]),t._v(" "),A("h4",{attrs:{id:"short-description"}},[A("a",{staticClass:"header-anchor",attrs:{href:"#short-description"}},[t._v("#")]),t._v(" Short Description")]),t._v(" "),A("p",[t._v("Enter a short description of the feature of the product.")]),t._v(" "),A("h4",{attrs:{id:"description-2"}},[A("a",{staticClass:"header-anchor",attrs:{href:"#description-2"}},[t._v("#")]),t._v(" Description")]),t._v(" "),A("p",[t._v("Mention your product in detail.")]),t._v(" "),A("p",[A("img",{attrs:{src:e(316),alt:"description"}})]),t._v(" "),A("h3",{attrs:{id:"meta-description"}},[A("a",{staticClass:"header-anchor",attrs:{href:"#meta-description"}},[t._v("#")]),t._v(" Meta Description")]),t._v(" "),A("p",[t._v("Below is the list of fields that you need to provide under the meta description to make your product easily searchable on search engines.")]),t._v(" "),A("h4",{attrs:{id:"meta-title"}},[A("a",{staticClass:"header-anchor",attrs:{href:"#meta-title"}},[t._v("#")]),t._v(" Meta Title")]),t._v(" "),A("p",[t._v("Provide the main title of the product by which your product will be known.")]),t._v(" "),A("h4",{attrs:{id:"meta-keyword"}},[A("a",{staticClass:"header-anchor",attrs:{href:"#meta-keyword"}},[t._v("#")]),t._v(" Meta Keyword")]),t._v(" "),A("p",[t._v("The meta keyword for the product needs to be provided to improve its searchability on the search engine for specific keywords.")]),t._v(" "),A("h4",{attrs:{id:"meta-description-2"}},[A("a",{staticClass:"header-anchor",attrs:{href:"#meta-description-2"}},[t._v("#")]),t._v(" Meta Description")]),t._v(" "),A("p",[t._v("Enter the description so that products can easily appear in search engine listings.")]),t._v(" "),A("p",[A("img",{attrs:{src:e(317),alt:"metaDescription"}})]),t._v(" "),A("h3",{attrs:{id:"images"}},[A("a",{staticClass:"header-anchor",attrs:{href:"#images"}},[t._v("#")]),t._v(" Images")]),t._v(" "),A("p",[t._v("To add the product images, click on "),A("strong",[t._v("Add Images")]),t._v(". You can add multiple images for your product.")]),t._v(" "),A("p",[A("img",{attrs:{src:e(318),alt:"image"}})]),t._v(" "),A("h3",{attrs:{id:"new"}},[A("a",{staticClass:"header-anchor",attrs:{href:"#new"}},[t._v("#")]),t._v(" New")]),t._v(" "),A("p",[t._v("Enable the toggle button if you want to feature the product as a new product. The resulting product will be shown under the New Products section.")]),t._v(" "),A("h3",{attrs:{id:"featured"}},[A("a",{staticClass:"header-anchor",attrs:{href:"#featured"}},[t._v("#")]),t._v(" Featured")]),t._v(" "),A("p",[t._v("Enable the toggle button if you want to show the product under the Featured Products section.")]),t._v(" "),A("h3",{attrs:{id:"visible-individually"}},[A("a",{staticClass:"header-anchor",attrs:{href:"#visible-individually"}},[t._v("#")]),t._v(" Visible Individually")]),t._v(" "),A("p",[t._v("Enable the toggle button so that the product will be visible on the front end.")]),t._v(" "),A("h3",{attrs:{id:"status"}},[A("a",{staticClass:"header-anchor",attrs:{href:"#status"}},[t._v("#")]),t._v(" Status")]),t._v(" "),A("p",[t._v("Enable the toggle button to enable the product on your eCommerce store.")]),t._v(" "),A("h3",{attrs:{id:"guest-checkout"}},[A("a",{staticClass:"header-anchor",attrs:{href:"#guest-checkout"}},[t._v("#")]),t._v(" Guest Checkout")]),t._v(" "),A("p",[t._v("Enable the toggle button to allow the product to be ordered by guest customers.")]),t._v(" "),A("p",[A("img",{attrs:{src:e(319),alt:"toggleButtons"}})]),t._v(" "),A("h3",{attrs:{id:"price"}},[A("a",{staticClass:"header-anchor",attrs:{href:"#price"}},[t._v("#")]),t._v(" Price")]),t._v(" "),A("p",[t._v("Insert the price, cost, and special price, and set the special price date for which the special price will be shown on the website.")]),t._v(" "),A("p",[A("img",{attrs:{src:e(320),alt:"price"}})]),t._v(" "),A("h3",{attrs:{id:"shipping"}},[A("a",{staticClass:"header-anchor",attrs:{href:"#shipping"}},[t._v("#")]),t._v(" Shipping")]),t._v(" "),A("p",[t._v("Set the Width, Height, Depth, and Weight of the product.")]),t._v(" "),A("p",[A("img",{attrs:{src:e(321),alt:"shipping"}})]),t._v(" "),A("h3",{attrs:{id:"inventories"}},[A("a",{staticClass:"header-anchor",attrs:{href:"#inventories"}},[t._v("#")]),t._v(" Inventories")]),t._v(" "),A("p",[t._v("Insert the quantity of the product that is there in your inventory. By default, it is set to 0 so it shows on the front end as out of stock.")]),t._v(" "),A("p",[A("img",{attrs:{src:e(322),alt:"inventories"}})]),t._v(" "),A("p",[t._v("At last, Save the Product.")]),t._v(" "),A("h3",{attrs:{id:"front-end"}},[A("a",{staticClass:"header-anchor",attrs:{href:"#front-end"}},[t._v("#")]),t._v(" Front End")]),t._v(" "),A("p",[t._v("The product will be visible as given below on the front end.")]),t._v(" "),A("p",[A("img",{attrs:{src:e(323),alt:"product"}})])])}),[],!1,null,null,null);A.default=s.exports}}]); \ No newline at end of file diff --git a/docs/.vuepress/dist/assets/js/12.7f15ecab.js b/docs/.vuepress/dist/assets/js/12.7f15ecab.js new file mode 100644 index 00000000..2042b46a --- /dev/null +++ b/docs/.vuepress/dist/assets/js/12.7f15ecab.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[12],{296:function(t,e,r){t.exports=r.p+"assets/img/bundle.5302b129.png"},297:function(t,e,r){t.exports=r.p+"assets/img/editProduct.f3d03ba3.png"},298:function(t,e,r){t.exports=r.p+"assets/img/toggleButtons.db6f5a12.png"},299:function(t,e,r){t.exports=r.p+"assets/img/description.8a01022f.png"},300:function(t,e,r){t.exports=r.p+"assets/img/metaDescription.74f66c89.png"},301:function(t,e,r){t.exports=r.p+"assets/img/image.e99c275b.png"},302:function(t,e,r){t.exports=r.p+"assets/img/options.001937e2.png"},303:function(t,e,r){t.exports=r.p+"assets/img/bundleOptions.01cb8cdc.png"},304:function(t,e,r){t.exports=r.p+"assets/img/output.cc9621ee.png"},342:function(t,e,r){"use strict";r.r(e);var o=r(10),a=Object(o.a)({},(function(){var t=this,e=t._self._c;return e("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[e("h1",{attrs:{id:"bundle-product"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#bundle-product"}},[t._v("#")]),t._v(" Bundle Product")]),t._v(" "),e("p",[t._v("Today's document will guide you on how to create bundle products in Bagisto. Bundle products and Grouped products are similar, where a bundle product includes customizable items that the store owner can configure to create a unique product in "),e("a",{attrs:{href:"https://bagisto.com/en/",target:"_blank",rel:"noopener noreferrer"}},[t._v("Bagisto"),e("OutboundLink")],1)]),t._v(" "),e("p",[t._v("Each item in a bundle product can be based on one of the following product types:")]),t._v(" "),e("ul",[e("li",[t._v("Simple Product")]),t._v(" "),e("li",[t._v("Variants of Configurable Products")])]),t._v(" "),e("h3",{attrs:{id:"steps-to-create-a-bundle-product-in-bagisto-2-0"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#steps-to-create-a-bundle-product-in-bagisto-2-0"}},[t._v("#")]),t._v(" Steps To Create A Bundle Product In Bagisto 2.0")]),t._v(" "),e("ol",[e("li",[e("p",[t._v("On the Bagisto admin dashboard, go to Catalog Section >> Products >> select Bundle under the Product Type.")])]),t._v(" "),e("li",[e("p",[t._v("Select Attribute Family.")])]),t._v(" "),e("li",[e("p",[t._v("Enter the SKU (Stock Keeping Unit) for the product (unique to every product).")])]),t._v(" "),e("li",[e("p",[t._v("Click the Save Button.")]),t._v(" "),e("p",[e("img",{attrs:{src:r(296),alt:"Bundle"}})])])]),t._v(" "),e("p",[t._v("After clicking on the Save Product button, you will be redirected to the next page with several new settings.")]),t._v(" "),e("h3",{attrs:{id:"general-settings"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#general-settings"}},[t._v("#")]),t._v(" General Settings")]),t._v(" "),e("ul",[e("li",[e("p",[e("strong",[t._v("Name:")]),t._v(" Enter the name of the product.")])]),t._v(" "),e("li",[e("p",[e("strong",[t._v("URL Key:")]),t._v(" This will be the end of the URL, e.g., http://bagisto.test.com/products/assembled-core-i3-4-gb-ddr3500-gbwindows-10-pro151-inch-screen-black.")])]),t._v(" "),e("li",[e("p",[e("strong",[t._v("Tax Category:")]),t._v(" Select the Tax Category from the dropdown list.")]),t._v(" "),e("p",[e("img",{attrs:{src:r(297),alt:"editProduct"}})])])]),t._v(" "),e("h4",{attrs:{id:"new"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#new"}},[t._v("#")]),t._v(" New")]),t._v(" "),e("ul",[e("li",[t._v("Enable the toggle button to feature the product as a new product, shown under the New Products section.")])]),t._v(" "),e("h4",{attrs:{id:"featured"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#featured"}},[t._v("#")]),t._v(" Featured")]),t._v(" "),e("ul",[e("li",[t._v("Enable the toggle button to show the product under the Featured Products section.")])]),t._v(" "),e("h4",{attrs:{id:"visible-individually"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#visible-individually"}},[t._v("#")]),t._v(" Visible Individually")]),t._v(" "),e("ul",[e("li",[t._v("Enable the toggle button to make the product visible on the frontend.")])]),t._v(" "),e("h4",{attrs:{id:"status"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#status"}},[t._v("#")]),t._v(" Status")]),t._v(" "),e("ul",[e("li",[t._v("Enable the toggle button to enable the product on your eCommerce store.")])]),t._v(" "),e("h4",{attrs:{id:"guest-checkout"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#guest-checkout"}},[t._v("#")]),t._v(" Guest Checkout")]),t._v(" "),e("ul",[e("li",[e("p",[t._v("Enable the toggle button to allow guest customers to order the product.")]),t._v(" "),e("p",[e("img",{attrs:{src:r(298),alt:"toggleButtons"}})])])]),t._v(" "),e("h3",{attrs:{id:"description"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#description"}},[t._v("#")]),t._v(" Description")]),t._v(" "),e("p",[t._v("Fill in the following fields under description:")]),t._v(" "),e("ul",[e("li",[e("p",[e("strong",[t._v("Short Description:")]),t._v(" Enter a short description of the product feature.")])]),t._v(" "),e("li",[e("p",[e("strong",[t._v("Description:")]),t._v(" Mention your product in detail.")]),t._v(" "),e("p",[e("img",{attrs:{src:r(299),alt:"description"}})])])]),t._v(" "),e("h3",{attrs:{id:"meta-description"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#meta-description"}},[t._v("#")]),t._v(" Meta Description")]),t._v(" "),e("p",[t._v("Fill in the following fields under meta description for improved searchability on search engines:")]),t._v(" "),e("ul",[e("li",[e("p",[e("strong",[t._v("Meta Title:")]),t._v(" Provide the main title of the product.")])]),t._v(" "),e("li",[e("p",[e("strong",[t._v("Meta Keyword:")]),t._v(" Provide meta keywords for specific search engine optimization.")])]),t._v(" "),e("li",[e("p",[e("strong",[t._v("Meta Description:")]),t._v(" Enter a description for better search engine listings.")]),t._v(" "),e("p",[e("img",{attrs:{src:r(300),alt:"metaDescription"}})])])]),t._v(" "),e("h3",{attrs:{id:"images"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#images"}},[t._v("#")]),t._v(" Images")]),t._v(" "),e("p",[t._v("To add product images, click on Add Images. You can add multiple images for your product.")]),t._v(" "),e("p",[e("img",{attrs:{src:r(301),alt:"image"}})]),t._v(" "),e("h3",{attrs:{id:"bundle-item"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#bundle-item"}},[t._v("#")]),t._v(" Bundle Item")]),t._v(" "),e("p",[t._v("Click on Add Option and:")]),t._v(" "),e("ul",[e("li",[t._v("Enter the Option Title.")]),t._v(" "),e("li",[t._v("Set the Input Type (Select, Radio buttons, Checkbox, Multi-Select).")]),t._v(" "),e("li",[t._v("Mark the Required checkbox if the field is mandatory.")])]),t._v(" "),e("p",[e("img",{attrs:{src:r(302),alt:"options"}})]),t._v(" "),e("p",[t._v("In the Search Product section, search for the product to add to the bundle. Once found, add the product to the bundle, specifying the quantity for each item.")]),t._v(" "),e("p",[t._v("At the front end, customers can increase the quantity of the product to add to the cart, but the default quantity included in a bundle item cannot be changed.")]),t._v(" "),e("p",[e("img",{attrs:{src:r(303),alt:"bundleOptions"}})]),t._v(" "),e("h3",{attrs:{id:"product-at-front-end"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#product-at-front-end"}},[t._v("#")]),t._v(" Product At Front End")]),t._v(" "),e("p",[t._v("The bundle product will be visible at the front end.")]),t._v(" "),e("p",[e("img",{attrs:{src:r(304),alt:"output"}})])])}),[],!1,null,null,null);e.default=a.exports}}]); \ No newline at end of file diff --git a/docs/.vuepress/dist/assets/js/13.f0f5caa8.js b/docs/.vuepress/dist/assets/js/13.f0f5caa8.js new file mode 100644 index 00000000..473dc7a9 --- /dev/null +++ b/docs/.vuepress/dist/assets/js/13.f0f5caa8.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[13],{305:function(t,e,o){t.exports=o.p+"assets/img/configurable.9fa6fb76.png"},306:function(t,e,o){t.exports=o.p+"assets/img/configurableAttributes.0341eddd.png"},307:function(t,e,o){t.exports=o.p+"assets/img/editProducts.1d1ea4f3.png"},308:function(t,e,o){t.exports=o.p+"assets/img/toggleButtons.db6f5a12.png"},309:function(t,e,o){t.exports=o.p+"assets/img/descriptions.765ffef8.png"},310:function(t,e,o){t.exports=o.p+"assets/img/metaDescriptions.4dfbc31b.png"},311:function(t,e,o){t.exports=o.p+"assets/img/image.b30e57d4.png"},312:function(t,e,o){t.exports=o.p+"assets/img/variations.9be19c16.png"},313:function(t,e,o){t.exports=o.p+"assets/img/output.31b099f6.png"},344:function(t,e,o){"use strict";o.r(e);var r=o(10),i=Object(r.a)({},(function(){var t=this,e=t._self._c;return e("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[e("h1",{attrs:{id:"configurable-product"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#configurable-product"}},[t._v("#")]),t._v(" Configurable Product")]),t._v(" "),e("p",[t._v("Configurable products are items or services that offer customers the flexibility to personalize certain attributes according to their preferences. Whether in manufacturing, e-commerce, or software, these products enable users to choose from predefined options, such as features, specifications, colors, or sizes.")]),t._v(" "),e("p",[t._v("This customization allows for a diverse range of variations without the need for creating unique products. Configurable products are designed to meet individual needs, enhancing customer satisfaction and providing a tailored experience in "),e("a",{attrs:{href:"https://bagisto.com/en/",target:"_blank",rel:"noopener noreferrer"}},[t._v("Bagisto"),e("OutboundLink")],1),t._v(".")]),t._v(" "),e("h3",{attrs:{id:"how-to-create-a-configurable-product-in-bagisto-2-0"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#how-to-create-a-configurable-product-in-bagisto-2-0"}},[t._v("#")]),t._v(" How to Create a Configurable Product in Bagisto 2.0")]),t._v(" "),e("ol",[e("li",[e("strong",[t._v("Add Product:")]),t._v(" Click on "),e("strong",[t._v("Catalog >>")]),t._v(" select "),e("strong",[t._v("Configurable")]),t._v(" as Product Type >> select "),e("strong",[t._v("Family")]),t._v(" >> enter SKU and then save the product as shown in the below image.")])]),t._v(" "),e("p",[e("img",{attrs:{src:o(305),alt:"Configurable"}})]),t._v(" "),e("p",[t._v("After you Save the Product, you get an option to select the Color & Size. In case you want some other attribute in your configurable product, you need to create an attribute first and then save the product as shown in the below image.")]),t._v(" "),e("p",[e("img",{attrs:{src:o(306),alt:"Configurable"}})]),t._v(" "),e("h3",{attrs:{id:"general-attributes"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#general-attributes"}},[t._v("#")]),t._v(" General Attributes")]),t._v(" "),e("p",[t._v("Below is the list of fields you need to fill under General Attributes.")]),t._v(" "),e("ul",[e("li",[e("p",[e("strong",[t._v("SKU:")]),t._v(" Provide SKU (Stock Keeping Unit) of the product which is unique to every product.")])]),t._v(" "),e("li",[e("p",[e("strong",[t._v("URL Key:")]),t._v(" This will be the end of the URL, for example, http://bagisto.test.com/products/philips-speaker (Speaker is a URL key)")])]),t._v(" "),e("li",[e("p",[e("strong",[t._v("Tax Category:")]),t._v(" You can select the Tax Category from the drop-down list that you want to be applied to the product.")]),t._v(" "),e("p",[e("img",{attrs:{src:o(307),alt:"Configurable"}})])])]),t._v(" "),e("p",[t._v("Also, make sure to enable the Settings.")]),t._v(" "),e("ul",[e("li",[e("p",[e("strong",[t._v("New:")]),t._v(" Enable the toggle button if you want to feature the product as a new product. The resulting product will be shown under the New Products section.")])]),t._v(" "),e("li",[e("p",[e("strong",[t._v("Visible Individually:")]),t._v(" Enable the toggle button so that the product will be visible on the front end.")])]),t._v(" "),e("li",[e("p",[e("strong",[t._v("Featured:")]),t._v(" Enable the toggle button if you want to show the product under the Featured Products section.")])]),t._v(" "),e("li",[e("p",[e("strong",[t._v("Status:")]),t._v(" Enable the toggle button to make the product enabled on your eCommerce store.")])]),t._v(" "),e("li",[e("p",[e("strong",[t._v("Guest Checkout:")]),t._v(" Enable the toggle button to allow the product to be ordered by the guest customer.")]),t._v(" "),e("p",[e("img",{attrs:{src:o(308),alt:"Configurable"}})])])]),t._v(" "),e("h3",{attrs:{id:"description"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#description"}},[t._v("#")]),t._v(" Description")]),t._v(" "),e("p",[t._v("Below is the list of the fields you need to fill regarding the product under the description.")]),t._v(" "),e("ul",[e("li",[e("p",[e("strong",[t._v("Short Description:")]),t._v(" Enter a short description of the feature of the product.")])]),t._v(" "),e("li",[e("p",[e("strong",[t._v("Description:")]),t._v(" Here you can mention your product in detail.")]),t._v(" "),e("p",[e("img",{attrs:{src:o(309),alt:"Configurable"}})])])]),t._v(" "),e("h3",{attrs:{id:"meta-description"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#meta-description"}},[t._v("#")]),t._v(" Meta Description")]),t._v(" "),e("p",[t._v("Below is the list of fields that you need to provide under the meta description to make your product easily searchable on search engines.")]),t._v(" "),e("ul",[e("li",[e("p",[e("strong",[t._v("Meta Title:")]),t._v(" Provide the main title of the product by which your product will be known.")])]),t._v(" "),e("li",[e("p",[e("strong",[t._v("Meta Keyword:")]),t._v(" The meta keyword for the product needs to be provided to improve its searchability on the search engine for specific keywords.")])]),t._v(" "),e("li",[e("p",[e("strong",[t._v("Meta Description:")]),t._v(" Enter the description so that the product can easily appear in search engine listing.")]),t._v(" "),e("p",[e("img",{attrs:{src:o(310),alt:"Configurable"}})])])]),t._v(" "),e("h3",{attrs:{id:"images"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#images"}},[t._v("#")]),t._v(" Images")]),t._v(" "),e("p",[t._v("Add the product images, click on "),e("strong",[t._v("Add Images")]),t._v(". You can add multiple images for your product.")]),t._v(" "),e("p",[e("img",{attrs:{src:o(311),alt:"Configurable"}})]),t._v(" "),e("p",[t._v("Now you will be able to see the Variations right below the video section as shown below. You can simply Edit each product as we have created according to the Color and Size.")]),t._v(" "),e("p",[e("img",{attrs:{src:o(312),alt:"Configurable"}})]),t._v(" "),e("p",[t._v("After all Variations are created, finally, Save the Product.")]),t._v(" "),e("h3",{attrs:{id:"front-end"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#front-end"}},[t._v("#")]),t._v(" Front End")]),t._v(" "),e("p",[t._v("The product will be visible as given below on the front end.")]),t._v(" "),e("p",[e("img",{attrs:{src:o(313),alt:"Configurable"}})])])}),[],!1,null,null,null);e.default=i.exports}}]); \ No newline at end of file diff --git a/docs/.vuepress/dist/assets/js/14.b21af8fa.js b/docs/.vuepress/dist/assets/js/14.b21af8fa.js new file mode 100644 index 00000000..e4b9be0a --- /dev/null +++ b/docs/.vuepress/dist/assets/js/14.b21af8fa.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[14],{324:function(t,e,r){t.exports=r.p+"assets/img/virtual.e6449259.png"},325:function(t,e,r){t.exports=r.p+"assets/img/editProduct.fff08496.png"},326:function(t,e,r){t.exports=r.p+"assets/img/toggleButtons.db6f5a12.png"},327:function(t,e,r){t.exports=r.p+"assets/img/description.40848a5f.png"},328:function(t,e,r){t.exports=r.p+"assets/img/metaDescription.afb36600.png"},329:function(t,e,r){t.exports=r.p+"assets/img/image.6a9cc529.png"},330:function(t,e){t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAV0AAADnCAIAAAAyzBJHAAAAA3NCSVQICAjb4U/gAAAAEHRFWHRTb2Z0d2FyZQBTaHV0dGVyY4LQCQAAIABJREFUeNrt3WtcU1e+N/A/SBIJEFRARUCRFIIBFOwBsVrwFPA8wFHBaqFalTKKI9RTtCKtWKlStIgVeiw6BUsRqgVveCnYAZwRLzUDjwTlIpdyUYNUAwpJAJMgOS+CiopyqdOK/X0/vpCdfctee/32WmtnJxoqlYoAAHrQxCEAAOQCACAXAAC5AADIBQBALgAAcgEAkAsAgFwAAOQCACAXAAC5AADIBQBALgw14vx13u6T3UP316K4AV5MLkgPBzmb8515/umiP6BKV+VnZyWn5v+WTcsLs07WySQ3BYfPN6K8AfpD62XeOdGpmKAvyuSGvvylrqaDXQnL0Xfx5OochU2gmzHKG2DI58KLYTR9U3rmJhQ1wL9tfKE5f+d6//m+M6e58PjOvGlevh+kCsRERKLUv/D4zub2wYfF3R2Qk0Eu5nxn3rKjYiIiqTAjapm3O4/vMtllSdDOfJG8e4012TFB/n5u01x4fGdze3c3/437L0sf22ZTpj//sb6MvOHing/+MnOaC8/e3W1ZVHJB88NejzAjbvWyJerdmzzNNyijnhrSffnO5nyviIKHXYuqk9tCvVxceHyXmd6hWzKr5A87LucSVs/3mmzvzLP3cvMOjimQ4hQBtBf61CjIPiu4+bAa3hH+Y/eym5R5dCl/piufyoSKqvwr8gVuLJKX5l9WEJGD23Qjkgq3LfdPu6aufvKm6py94eW1UZlfexgRiU7n5lyRda9QIau5khex7A4ra/cCk2fsQkPW6nejcpq6F6gpzNoSUFTzTWr0m3pE13KSMk4+2D25tJn0DJ4ab6hKXha85cEWRXWC5IjSGkXaPj9jqk0NWp0mVKhfuVNTRxLSwykCaC/0F/edmNO56enLbThE8orMw5eJLJxnTyQimeB0kZyILp8VSInIcvZMY6rN3JJ2TU6j5kSmFgqyTu9w5xKJ/pF6sscNApb1kvQfM7N3+fKJSFG0/3SPMUJD732C3CuC3Cv7/E1Jmr8zIaeJSG9q+Depp3+IWjyRSdS4/4vU8p675xNzOjc9+4f48JlPVmxx9u74KzLSm7rph8wrgsx970xgkSw/KV1IJLlcVK4gYk6Nzs2vL88tPBK/agrOEEAu9BuLM4FrYu68xNuBiKhZ1CAnsnJ1m0BE4oKz5UTlpwUiIpa1h6sFiQvz1ZVWdHp3xLqomGPqhsM1YZ380Rr1jLkWxnw3vznWRESiivoeW2OyOHocjh6LRUTVOYV3iIjrE7zqTSvuFI9Na104RFQnEDT02D3DCVwTc/6UqVzOk60FwekiibpDlBCzbl1McoWCiOhmdY2YOCbGRkSkKN2zIf7wORlnkpUpC2cIoB8xUBwDDpNIoZDLFUQsvo8Lf29a+U1BzuUqOt9IRHwfDy5ReYNMTkR0R3he8FgdlT+9Rj2OnvolRe9blDeLJURERhbdNxdY4wyMiCQkEzURmfS5x3ckTQoiIum1/PPXHtsXBZHT8h1LqlanlYkKM9cVZsZY+0bvCp9tgpMEkAsDazY8/qeF9wLrtC0VjTkJu6mOiGmzwM2YiDiGuiwiOdN5R278AqOBb0WueBQgLAMjDlETiWsbiQyISH6zUUxEpGtq2J916XI4TCIFyzr49NGlT937NHD+5NvzS4tOpqbuyRDUVGSu2zz1fKIHB6cJoB/xG5jP8ZvKIqo5L6gh4jjNn2NCRGTqOJVLRApBzLqEk5fra2qrhOey9p+u73N1RoYGLCKSFh3OrBI11JdfrpeT5WzHUURUcywu5lxVzeXcLTsFEiKaONW5Xxd2PQc3WxaRvCJ19WdZgqv1NVdLBdlHc67KiYgaik6eqxIzbeasjQp3G0VEkoYqMc4RQHvhNzLy9J29s+iklIhGzfZz6b7STloa/s7ZoIPXxIVpq99N677wO346x838+ZdilqOHs97ZHGnjyYilJ4lIzzv9X5+6rg2ZfT4qR1q2Z+XSPd0zGi9Yu5Tfvz009QkOzQiOqZAJD0b5H+ye6LBm6uxJ5uLze9dtLurZuTGdMtUU5wigvfBbcVwCPY2JiCZ6B7o9vBeg5/rZ3vRIX1frURwmsZhM03E2rlNGyfuOGY8du4LnWI/iEBFTlztxFEmITLx3HY1Z9ZalqR6TxdTlTnbflLJ3h5tBv/s+tqtS9u5a4uIwTpdFxGLqcq2dHUxYRCTXm+BsPYrDJCImx9By9jufJkZOx8gj/Alp4HfoAODf3F4AAOQCACAXAAC5AADIBQAA5AIAIBcAALkAAMgFAEAuAAByAQCQCwCAXAAA5AIAIBcAALkAAMgFAEAuAAByAQCQCwCAXAAA5AIAAHIBAJALvZBLGssbpCh+AOTCQ/XJAb7+O0tR/ACDzIX8j1zM7UMP9/j9VnFm8GS+V0TB77+3UmHqRl8XFx7fZbL7ktUZVUQk2Obn6J8uQkkC/I650CxuUpBCkJxW9WBKaXJCkYRk4ib577yv8oL41V/kia19wz9evtjJgMXUIyJ5U6NEgXIE+F1zQSpuIhaTWXMsNV9ORCQ5nX64ickhhUR6h4jk52K8XNx5fJfJ7sEx55qJiCQXY/z9Zk5z4fFdHL1D9xSou/H1+4N8He2defZevh9l1XRHSmPOtlCvaS48e3dH9yVBqeroaRbsXO/r4sKb5rts58WePzMvrqgXk+Xij9cELl0avjV+h69xd15UxM/kO5vbh56UEFGzIEm9Ti//DQ83ROJzCUHe7jy+i+P8OMGjQJMLdy7h2S/Zc1mOUwGg/7lwRywlro+vq/xscnYzUXNO6lly851tSJIGKRGxTKYuWL5mR/RyV1bpns2pQiKSN5ZfucaZGRwdHexKRTHrdgvkRGTAdfMLj4yK9jMXnYqJyW4movKd61enXTP1C9+1damDolpY0UxEooxPg/aWGvmER/tNqNn76ZbsR6ODplNsTak6eUPM4YLGx+rxOPfoHTGJXy535pAo49OguFKOZ/Cmpbbi7Khl24rkRFSbGrQ6rdzQe1Nk6Cqfqabdv1GtEGVHrd7bPHvr9lVT8LPVAD2o+nDmgynT/PbVXYz0tPLd90v5Pp8pPl8UV+72mjYj8lLP+VqPfmg16cNDrSrV7SNLJ01bcVTyYGLgt6KeM5Zsdpv21tYSlapyt9c0u5CcVpVK/f//+ORnlermt77TrFb82KpSqf9vt/bMvR4L38j7+gMvN6tJ0+y8Ir4vlqhUqjNr37Ty/eFG9+t16sVvq1Qqlapoq88Ep4gz91RlW32snCL+3vpwNXW7fadZeQV6TnnT58uSeyoAeIxWH7EhkckVxNIzcPbz5h7MjNhM5dZ+u6bo5eiRRCpVt88j4rKEtTJikZxsn1iaY2jAoUa5hMiw6vDmmD3nr4nlRFLiyIlIIZYTi2PAeXw4Q9RE8oqoyfwo9d8sQ5mc6OHV3NQtZJfbcvHlrC0fbY9YrcfNDX98gzJRExlNNjZSz2xtzJLeEUtI3tBMJlbcx7ckrysrp1FzrI3RVAAYYD9CKpUQk8Ni0qT5iyc3C640O/t5mBKTwyK5VCahoviItPJxS3f9kLpvue1zKpj4WExEtsI1Mj4zJXzOOPW0CQ4WTPH59MNXmyUN12q6uwu6RobEcgzN/DH99I/pp39Mz4504Ty5MpbRlPnhSy1ZTVXlTUTEJHnzg26Fgakhiesa1aMSoopGud4oIw4ZGRrIG6pEj48hcDzX73qLTm5Yv+cqBhcAHtNXe0GukBCZ6rGIjOes8DiZpBvoZkAkZbGYJJHLiUhOcmmzRHpHLu15XX9qNXIihUIikYqZ0ge3D/Rmfxw6O2D7urfPqv82IiIyn+1pGR+XGpNKC6boyZukpl7+3Idtl+yooGPk4GhpRNfy06rlht5cQzK1NqZTefFJxq4sFtfHe7bf1PjNcas/k87hFO3PaDT1Wu/MIvJ14R7MiAgyWOUzgZpY/KU2RERkPPvL7YHzl8dH7HX9IYSPZgNAf3NB2iwnXRaLiIjj9mm6m3oqk8UkUsgkNHVVpG/NzszVAWnE1DW19jB6xmpMfdaEF0Tt2bzmsILJMZzgPEmXiFgW8xNzPUS1jRJO8+Fla3KYekTEXbE9URoTc2x3xEHijLNdNdPf1eRBuOiN4jTlHU7IEpOuqbX7pk9CXVlEfmsCz0ftj9ueb+gcPtN7sV9UYkPUlozdW+S6fK9PEyOns4hoSnDiDkXEzqwtEQrOOOdNXjbdDQ+WbXikb35ARkSqd+YKc5wNAGoaKpXqj9q2pCB9TwWTb8iSFByNP3jNeVfmLjc9FAnAS99e+LfmQkNR/l5BcpOCZWjpvCZqE0IBAO0FAHg54TlrAEAuAAByAQCQCwCAXACAF23A9yn/eVlxua6z7Fpn2TVlk2Rg9zKM9DVtxmvxJ2hNmaj1n1OYOPoAL6cB3Ke8Ib6/bq9UWNP5QjbswNXasVzPzGgYygBgqObCwXP3tqbL2gf+hNFwJn0whz2Nx+AaDyOiXxrv/6tC8b8nOpSdxGbRxnd1F8wcjmIAGHq58MOZe5Hfywaxdp/prK0BusM0NTQ0Hk1UqahLpfo4WXZcICeize/pvjsL0QDwEul73PH67ftfHBxMKKz0HL7RX0dr2GOhQEQaGjRMU2PjIp33PYYT0RcHZddv30dJAAyZXOjqUoV9K+0Y+Ber+k5nrfBkc3SeuX59tmbIHLa3E7NDQeu/lXZ14ePYAEMkF67U3x/EQONwJn2+TJfD7mPlHLbmjuV6jGFUVNN5pR5NBoAhkgvFNcpBrDTIU1vZv2p+T0ErvbQHvSEA+CNyoXYwdyXfmMRkszT6M6fOcA1na+agNwQAf0guDOYybmkygE8lTDIbNugNAcAfkAty5e80HPi7bQgAfmsuTDIbzBc6/XJzAIOIVTfvD3pDADBkckFQoejnbccuFV0sVyAXAIZULowfTHX9+mRHvx+7UH19smPQGwKAPyAX3prCtDIZ8KNNyk76OFkm7eh6/myyjq51SdIuFb02bpgbHq8EGCq5wGZpfLlCjzHwhx6PC+TfZLV3PnucofM+fX2y/ccCBWMYfbVST7t/9zUB4I/PBSLimWqFLdAZxKoTf7oXniy53/Vkl0L93FTYt5LknHtEFLZAx9IEnQiAl0h/n7NOz7/3xcHBPGfNGEYfzNWebs18bdwwFdEvN+9fvKr43+MdXSrS09bY+K6u7xv4BTiAoZkLRCRquv/xd7KCyhfzASQnHuPLFbpjRuB7WQCGci6o1d26X1ilVP+72dw1oGWNR2k6WjHU/yzGIhEAXpVcAIBXHr4PGgCQCwCAXAAA5AIAIBcAALkAAMgFAEAuAAByAQCQCwCAXAAA5AIAIBcAALkAAMgFAEAuAAByAQDgcfgiZhikmrrrF/9VVHa1qvRqFRHZTrKy5fOcnRy4E8fj4Ax1Q+F73Npqso/VjvH2eH3Ey7A3rZeyTt2yfNvLivFi16uoLzhQzPD0cRjz0p80coVib0rG/oPHu7qe/IJPTU3NJf4+KwL8tbRwyUE/4t9KXHwi+2eRgohaz8aufS/6wt0/cm9+PXvsjOCm8oWvt60q73hu5QDfWvutMmHF7d/1/VfX1C9ZsTYtPfPpUCCirq6ufQeOBgaHV1bXonahH6HWlB29Oelyh5KIGNojxo1/fdbcAG/eyBe2fvbIccZmSv0XcKVuqck+dOJUQaWolZhGxnaOnosWOlnovJxl1HQp68Th3NIKsYQYBhb2TgsWzp1uoj4GlSlbv1EG79o4ehCHRFmbkxx3SChqZ5jazw0J9rDux9vvuHfv48iYhpu3nj9b1S91GzbHpn+3i8FAq+HVbS8obv/97rnpTT+Nbfpp7N1z0xW3//6sU62tpYPp6Lft80+2bQgMsNeuPBD7UVKl4oXtLcNucdi2AFvd3xoKBTER25KKO+0WBm7csHKFh9ndM4kfRaSXtL2EBdSYHb058kCtjuPc9WGh6wOcRtefiY6IPVT/WxsssuLkTXsrR3qv3BI2d0z9kcjdBf1pqvxt7/5eQ4Gpw37i90Ubbt5K/O4HVLBXtL2gut9Wubn9l9iHEzpbi1sLfNiWH+tYbSSNXn4DgjHCws6KS0R2Ng4WtPF/cs+UrOC9rmg8u+/7AwU1t9rZpvaeD65OTXkJiYeLG2+1digZHFN795BgLzv1VUtxPTvp+wM/17YQZ6Il+65SfT1UXopf+7lySUaYE7NFmBh/RFDfdLu9k8E2sJ61ZH2AbXfDpKXyUFL68eIbLUotHSNjnof/Rh9ej7O2/WJK2jmFY0TsyunqAQt7B3dHs0/WZ8QdckwO4BI1XUz57kDhdZG4g9gWAdEb5pm0lxxLTswqrWtnjDY3ZrZ3jn5Yu8qyEw7kF9W30giu27L3g5wMiUhRlbt9X35F/a8tSq3Rriv/FuLAbClNSThytrrxLhnaefivWdy9q4qGgqSkI2ermxXssdYj2pVk8cTBvHvm+6TLbM/IDSE2bCIisp3+hv3I9dsOJOU6R3uZERF1Cr5a9d9fEZFFcKJfXdi2klmb/rZ4PBGRouDz95MpeFeoTtr/xNc6b4gMejQm0irIEiodA9f7OOgS8VbUBsaeOnvbad7o550LV0orDmZmPz3deM6nqWscZD9t8dte3PMa8H3GsZlv/McU20moZq9ae0F553zPUHhUt6pjlM35fV/fdRikJAW1X0qKjyvW9gwJ2xbmOaY+4/OkUgURUWtteS3Z+2+MDNscPGNk1dGYJKF6+tmvYncXM9xXhG7+8G2XEdRLi0PRWFLdbrHwg22RoesXmt3K/jruTCsREV1PiY470DB24Ydh2yJXeho1lRQ3PbZ4W+npwo6J3nOn9xzFNJm14A3O7Qs/VxARtZYUVrZZvr0xMmxL6NtTjehWTsKmQzfGeAduDgtcxNdWPLxUN+RGbj112/LtjZFrQhyVp79KON5ARKS4WXqpnu3+YdiOyA9CvC2YipqUz77OI8cVG8K2BFjczv6me1cVlUlbE88qbZd9GLoxwHU0Pd0EaL2YW0l8z0XdoaC+NHMXLbSh6kJBQ/cEu2Wb9sRF7YkLchkx3tlG+1Z1bfeVv76ylsbb2TCIlAql8vHV3yip7jTlW6hbXkxLWwtqLKnuow1y8GjWc0apmfTkL5KrVKrjP+aijr2C7YX2X3Y8qyHRXhOnb/hWby91KoiorUlUlp+UdUOH727dUrD9Z6XLhpXzbBhE3NCFpUtSLpSQ7etERFo6lrav2+gT8UxbSv96TFhJDnYtwlPF5BwcEjCDTUSvj/71dGFpr8MNpja2duZENhZtxWsTCmsVsxyo+NSpa8aL4lbOMyEiop8Zxxue6ETcECm1eebGTyQYz9KY8n8VtZG1DhFpjeQ7vG6j3x002ZU6s8LWqxsd9uySM92jgxXZebXmc5MDnEYSkZVfRWHs2eKmeSaGRETssa878azVCVaQfqrFNiTaa7oOkdX4FcXCzy+UymbNYBbm5rVYrIhe4jWCiGwt2grPHn9yjLPuNo2ZYfHEAI2u+XhTyq1tUJIJEWnpjDA26x5uIJ4jj7lbeKltlrsO3aq+cdfIwm4E6dqv/H7/E6nafldJOiP0u//U0R/J6BS1tBPpP+dkqL/R0HtX5+QXfsWjFTcano7va89YBIZ2Lihbrwz0pZbc2PndFwltU8f5G4NnjKxPvqGUlGxedfrRXLy7bUSPD3SNMTKg9nYZETXU3iDjhZbs/o9Hmo5mU0NrG5Gs/obCyNbO5MUdIcWvIjFZ8C2YT13MaxualdUZS97JeDhptLiVyPCJ+W5V32hr/3X7+8u3P5w0ofUuEdX/SiNsrfu8+drLkKI2EeOpyzMRka69kx0jTVDc7j6DKsuv69i8bfEChzp+7f3Oh/F/fZwa3ks/gojqryMXXsnxhYEb4fjexoUWTAZ7tJGh7qNzd+zcDSGeRo9q8sinR7+ZDOajxu4Ax9UYjAcjn+o27XP2z2w0o6O2vpHsezYZlJXVjaTvMEbnGfVSqey1gjKmvPdlAO/hC8wRhr0EKBHpO67/bO7ER4vpmxHdUMfO896Vgeloyqu/IaPxPYdaZfW1IjJ0Mere7GNr0LF1s6H4n0tljuxLVQy7kGfEApM9kkGilgcp1tZ6V6k1ckQfQcxiMtp6GZplGE8y0SPSG29qQMWNTy2COvYKji8w9CcP+KURZtbm4y1MeoSCiYUZo6muhW1mYvzgn/7z7imYWJhRo6C8dRDvZ7S5AbXUVrQ8ew4dW0977bqsExd7nuINZw7/LBk94w27XqrQWN44qi2ulD35gr6ZCUd584bC6OGbMh6j00s1MLUcy2j99RY9ms1sNJuIxliaMVsqS553QTV0drWg8lMHqnqkpOL64WOlNMHR2YSIGEx2p7KtvWfT6XUPW0bZBUGxsETJc+E/q1qa2Zlricpr1W9KUV1aS8Z2ln3UYUvuxIEWxyAWgSGQC2zumme8osF+bV2/mxBOcx3ZJSnxCTnCkrLKSxfO5FW1P3/+RbP0S1Li49TzlzXK+v1+dO09XNi1+2LT8oorL13IzS57ekPs6SuWvMks3L4+NjGn4FKxMC8r+aOIjAoj1zULub02k9197Onn5MiUM5fKKksKSm8/qKR2Xu4TWy5sjz1ytriypEyYlyO80eu12d7D0+jGgdhvjl8oLSkrvXjmzKUW9XRPz3GNB2K/PnShtKSs9FJ169NtpDGz3ltk3npi6+aYYxculVVeupAdFxF7+KbxvBUeZkREZjwTrYrcE3nFlZcuFJR0r9bdRacyJamgzcbJjklEJCtODgzYmNgzXEjf2ceBUZy+PUtYUpwblyRU2nu6jO7j2Fq9NuBKPohFYAj0IxiGb2lPDOmoS3iyblltYBi49r//Pz04bP2B7w8c+uZUaydD38w5wNbd6jmtVrbdirDN7LSUQ9980trJYHPGWDqZ9vNDRzq2IRHvUdKppNh8BdvMgtlb83+EU3i0Qfb+oycOJZ9o7dTRN+PNev/LhTOe9bmmkTNWbqP03YeOfJ7doWRojx7H9VS34U28tm2ghAP5CbGn2kh7tOWs9bMceunDMHlB0aHMpCOHdse3KLVGjOMtspxFI4iY4wMi1oxMST+eFL+vXUtH35Bnb/bkZ8CY4xdGbhhzIP1AVlpkaycxOBPtZ6wPfdule6BR3z3g7aL4Ewlb80nfYlGYk90IIuLO8xp/al+js6uD7vMCNHDLsuS4Q9980s4wtZ+7Odipz4+f/bfnW+lHTiqVnU/0kxprGqQ0WnH9dvMT55aW1lwvd9Sxoahfz0fcl11tr/lK0fRPImIa/ieb++Ew3SFxU1p5MXZtPGNlRqjtK1BUtfs3fnRmbMhnK91N+mjwK4qTA5MoPC7QjvmC9yEpJf3b1INPXz50x+jQrZYnmnWrlr+3bNF81LFXNheGlMaLObVkMnaMTuetstykA5W8D2PCndivwjtTXD8em5ByuXWkJe91ryUhM54e42y9Ud9ObZUHdh9pmRe5bbbhi98FpTJo9ScVVX0/+2D12sTv/hY7TBMP8iMXXgZtpYlb0842tLa0k47ReOd5fitmc3VfofcnaygtKq5UWM51f/qBztu5n6zJKGEY2HksWf/gI5UvXEVVTWBweK8PTT0atdLU/G7Pdp6lBSoYcgH+LDo7O5NS0tPSj/X6nPXid+atDHwXz1kjF+DPqKbuuqBAWFpe+fB7WWwmWU2fNhXfy4JcAIBXEIaFAAC5AADIBQBALgAAcgEAkAsAgFwAAOQCACAXAAC5AADIBQBALgAAcgEAkAsAgFwAAOQCACAXAACQCwCAXAAA5AIAIBcAALkAAMgFAEAuAAByAQCQC72QSxoaJSgNgFc0FxpzPvvLTHtnnr1vxDl5f1Mh+1NHj40nG1AcAEMjFy5ucXfn8Z3N+S6TXfz8P0rNb3hebZdkx6072Mhd+umOyOVzLFgD35+qZH93r22lKBiAP1CfP0auEDfJjGYuCfU0ltQV5RzbvWy+IPqH3Ystep+75nK13NA1dK23wyD3RyFqkslRLAAvfz+CY+2xwHd+4NrP039Y70pFMV/kqscCRKfjlnl7TbZ39/ogXSghIpLL5fKmTF++szl/yZ5aEib9ZeY0Fx7fZaZ/TE4DEZEkM5THDz0pISLK/8idNz+15ulwSVtuznfm+aeLUD4AQ2B8wcQ7cKau5HK+kIiuJgR9lCma6L/pEw9OYfzqnUXq6zzL0HnTjpjEXWtmm5CRtUfgx+E7PvYwqsiM2Hmxnw0Bo5nBibtidq11NUL5ALyU/YgnsDiGeiSXSSQkPJZXw3JJ/HKpK4u4tQL/0/nlNJWIiDnBwcu1ux/xpn8gEZE753J+UN01MU3n9Kd5MnHqbDdblA3AUMkFubhBSixdDofEDc1yad4yh7zuV5jNEqLHRxqlwtSoLalFNU3EIhlZKB62FzCCAPAK5UJD1v5CmZGjqwNRjaEu6dnuSAl26A4DPVMiYc+Zr6ZGfFHEWR6V7mNQvjM44iYREYvFJGoUNxE91XLo7oYQyeUKFAzAy54Lkorcw5mlkoqik8fyhDQ1eq0Hh4jv68E9mLknzjjQ04qlaKaJvtxeblIo5HKZpIkkD2o6y3oqn+L3f5HA8TQur+ueytLT41BRTurF2Z9YcU2Yon+kxkyqNyXj2X7TMcQA8Psb9tlnnz13hsYLh//5/8uEp/5RKLypMJ6+ODr+ozkTtIhIa+zUmRPvCLN/2n887x9lt7Vs3vKapCc6s//Yde6CpdONiciIayopyzl2OOlgtuCuLneKh/9/cXVGWk42FAlOZe//8ew1Gs2b+tYCN67OWGOdasGpC7KZ7/8/V2vtqpyfjv14QXjLwNXPyRhFBPC701CpVDgKANATnpsCAOQCACAXAAC5AADIBQBALgAAcgEAfm/9/Rx0e/u9jntyZWdnVxc+7wAwRC77mhoMLS1tbRZbe/iAFuzX55paWmVEquHDWQwtrWHCc/xHAAAC1UlEQVTD0MQAGBru3+9SdnZ23JNramjoc3RfZC60tMo0NTU4ejo4ygBDlEQqU6mo/9HQx8W/veMekQqhADCkcfR0u1Sq9g75i8mFjg758OEsHFaAoU57OKuj496LyQVlZydDSwvHFGCoY2hpKTs7X0wudHWpMNAI8AoYNkyz/zcTUecBALkAAMgFAEAuAAByAQCQCwCAXACAIZ4Ld4uT/7p4Y0p9P6a3lCZ+Fu63+K9+IVsTCppQEgAvjxf3WcaWmrxDGSm5tS00th/TG4/Hfn1K4RQS5sQsPpHwVbxOdGSAOQPlAfBKtRdqs74/0GAW8KH7REY/plflHa82nBcS6G5v6xIQtGjcr6eyKvHjcwCvWnvBYnFkMhE1ZB/vx/S71Tfusi3szNV/GfJsDBTFlSKytUCBALx64wv9HYYQtyp12CMf/DnSSJ/aWttQGgB/5lwgIsJgAgByoScdI31GS/vdB3+2iVtJRx/f/QLwp86FMZZmI9trS+rVfzWVVDczzXmmKA2Al8Mf9J0rVu7zLC+kJKSZLnZgFp84UD/WcwWPidIA+FPnAhnPC/vgVnxaUmy+YoSFe3AoPrwA8PLo4/ugb/7aNG6sIQ4TwCug/9UZz0cAAHIBAJALAIBcAADkAgAgFwAAuQAAyAUAeMlzQVNT4/79LhwmgKHu/v0uTU2NF5MLA/qtSwB4aQ3oN6j7yAW29vCODjmOKcBQ19EhZ2uzXkwuaGuzNDU1WqX4LiWAIaxVItPU1NDWHt7P+ft4burhSlUq1fDhLIaWFn72HmAIjSkoOzs7Ou5pamrqc3T7v2C/coGIOjrutXfIlZ2dXV0qHG6AIUFTU4OhpcVmD9cezhrQgv3NBQD4EwUKDgEAIBcAALkAAMgFAEAuAAByAQCQCwCAXAAA5AIAIBcAALkAAMgFAEAuAAByAQCQCwCAXAAA5AIAAHIBAJALAIBcAIDf5P8Avqe7N/3SI1UAAAAASUVORK5CYII="},331:function(t,e,r){t.exports=r.p+"assets/img/price.b32785ac.png"},332:function(t,e,r){t.exports=r.p+"assets/img/output.c8ed1df3.png"},346:function(t,e,r){"use strict";r.r(e);var i=r(10),s=Object(i.a)({},(function(){var t=this,e=t._self._c;return e("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[e("h1",{attrs:{id:"virtual-product"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#virtual-product"}},[t._v("#")]),t._v(" Virtual Product")]),t._v(" "),e("p",[t._v("This document provides a guide on creating virtual products in Bagisto 2.0. In an eCommerce store, products can generally be categorized into two types: physical and intangible. Virtual products fall under the category of intangible products, including memberships, services, warranties, or subscriptions in "),e("a",{attrs:{href:"https://bagisto.com/en/",target:"_blank",rel:"noopener noreferrer"}},[t._v("Bagisto"),e("OutboundLink")],1),t._v(".")]),t._v(" "),e("p",[t._v("A virtual product, unlike a downloadable product, is not something that can be downloaded but rather a service offered to customers.")]),t._v(" "),e("h3",{attrs:{id:"steps-to-create-virtual-product-in-bagisto-2-0"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#steps-to-create-virtual-product-in-bagisto-2-0"}},[t._v("#")]),t._v(" Steps To Create Virtual Product In Bagisto 2.0")]),t._v(" "),e("ol",[e("li",[e("p",[t._v("Go to Catalog >> Products >> Select Virtual under Product Type select Family.")])]),t._v(" "),e("li",[e("p",[t._v("Enter SKU and save the product, as shown in the image below.")]),t._v(" "),e("p",[e("img",{attrs:{src:r(324),alt:"Virtual"}})])])]),t._v(" "),e("p",[t._v("After clicking on the Save Product button, you'll be redirected to the next page with various new settings.")]),t._v(" "),e("h3",{attrs:{id:"general-settings"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#general-settings"}},[t._v("#")]),t._v(" General Settings")]),t._v(" "),e("ul",[e("li",[e("p",[e("strong",[t._v("Name:")]),t._v(" Enter the name of the product.")])]),t._v(" "),e("li",[e("p",[e("strong",[t._v("URL Key:")]),t._v(" This will be the end of the URL, e.g., http://bagisto.test.com/products/fitness-membership (fitness-membership is a URL key).")])]),t._v(" "),e("li",[e("p",[e("strong",[t._v("Tax Category:")]),t._v(" Select the tax category from the dropdown list.")]),t._v(" "),e("p",[e("img",{attrs:{src:r(325),alt:"editProduct"}})])])]),t._v(" "),e("h4",{attrs:{id:"new"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#new"}},[t._v("#")]),t._v(" New")]),t._v(" "),e("ul",[e("li",[t._v("Enable the toggle button to feature the product as a new product, which will be shown under the New Products section.")])]),t._v(" "),e("h4",{attrs:{id:"featured"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#featured"}},[t._v("#")]),t._v(" Featured")]),t._v(" "),e("ul",[e("li",[t._v("Enable the toggle button to show the product under the Featured Products section.")])]),t._v(" "),e("h4",{attrs:{id:"visible-individually"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#visible-individually"}},[t._v("#")]),t._v(" Visible Individually")]),t._v(" "),e("ul",[e("li",[t._v("Enable the toggle button to make the product visible on the frontend.")])]),t._v(" "),e("h4",{attrs:{id:"status"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#status"}},[t._v("#")]),t._v(" Status")]),t._v(" "),e("ul",[e("li",[t._v("Enable the toggle button to enable the product on your eCommerce store.")])]),t._v(" "),e("h4",{attrs:{id:"guest-checkout"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#guest-checkout"}},[t._v("#")]),t._v(" Guest Checkout")]),t._v(" "),e("ul",[e("li",[e("p",[t._v("Enable the toggle button to allow guest customers to order the product.")]),t._v(" "),e("p",[e("img",{attrs:{src:r(326),alt:"toggleButtons"}})])])]),t._v(" "),e("h3",{attrs:{id:"description"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#description"}},[t._v("#")]),t._v(" Description")]),t._v(" "),e("p",[t._v("Fill in the following fields under the description:")]),t._v(" "),e("ul",[e("li",[e("p",[e("strong",[t._v("Short Description:")]),t._v(" Enter a brief description of the product feature.")])]),t._v(" "),e("li",[e("p",[e("strong",[t._v("Description:")]),t._v(" Provide a detailed description of the product.")]),t._v(" "),e("p",[e("img",{attrs:{src:r(327),alt:"description"}})])])]),t._v(" "),e("h3",{attrs:{id:"meta-description"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#meta-description"}},[t._v("#")]),t._v(" Meta Description")]),t._v(" "),e("p",[t._v("Fill in the following fields under meta description for improved searchability on search engines:")]),t._v(" "),e("ul",[e("li",[e("p",[e("strong",[t._v("Meta Title:")]),t._v(" Provide the main title of the product.")])]),t._v(" "),e("li",[e("p",[e("strong",[t._v("Meta Keyword:")]),t._v(" Provide meta keywords for specific search engine optimization.")])]),t._v(" "),e("li",[e("p",[e("strong",[t._v("Meta Description:")]),t._v(" Enter a description for better search engine listings.")]),t._v(" "),e("p",[e("img",{attrs:{src:r(328),alt:"metaDescription"}})])])]),t._v(" "),e("h3",{attrs:{id:"images"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#images"}},[t._v("#")]),t._v(" Images")]),t._v(" "),e("p",[t._v("Add product images by clicking on Add Images. Multiple images can be added.")]),t._v(" "),e("p",[e("img",{attrs:{src:r(329),alt:"image"}})]),t._v(" "),e("h3",{attrs:{id:"inventory"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#inventory"}},[t._v("#")]),t._v(" Inventory")]),t._v(" "),e("p",[t._v("Insert the quantity of the product available in your inventory. The default is set to 0, indicating out of stock on the frontend.")]),t._v(" "),e("p",[e("img",{attrs:{src:r(330),alt:"inventories"}})]),t._v(" "),e("h3",{attrs:{id:"price"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#price"}},[t._v("#")]),t._v(" Price")]),t._v(" "),e("p",[t._v("Insert the price, cost, and special price. Set the special price date for displaying the special price on the website.")]),t._v(" "),e("p",[e("img",{attrs:{src:r(331),alt:"price"}})]),t._v(" "),e("h3",{attrs:{id:"product-at-front-end"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#product-at-front-end"}},[t._v("#")]),t._v(" Product At Front End")]),t._v(" "),e("p",[e("img",{attrs:{src:r(332),alt:"output"}})])])}),[],!1,null,null,null);e.default=s.exports}}]); \ No newline at end of file diff --git a/docs/.vuepress/dist/assets/js/15.bf289bd8.js b/docs/.vuepress/dist/assets/js/15.bf289bd8.js new file mode 100644 index 00000000..8bd90bbc --- /dev/null +++ b/docs/.vuepress/dist/assets/js/15.bf289bd8.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[15],{279:function(e,t,a){"use strict";var i=TypeError;e.exports=function(e,t){if(e({placeholder:void 0}),watch:{$lang(e){this.update(this.options,e)},options(e){this.update(e,this.$lang)}},mounted(){this.initialize(this.options,this.$lang),this.placeholder=this.$site.themeConfig.searchPlaceholder||""},methods:{initialize(e,t){Promise.all([Promise.all([a.e(0),a.e(7)]).then(a.t.bind(null,335,7)),Promise.all([a.e(0),a.e(7)]).then(a.t.bind(null,336,7))]).then(([a])=>{a=a.default;const{algoliaOptions:i={}}=e;a(Object.assign({},e,{inputSelector:"#algolia-search-input",algoliaOptions:Object.assign({facetFilters:["lang:"+t].concat(i.facetFilters||[])},i),handleSelected:(e,t,a)=>{const{pathname:i,hash:n}=new URL(a.url),r=i.replace(this.$site.base,"/"),s=decodeURIComponent(n);this.$router.push(`${r}${s}`)}}))})},update(e,t){this.$el.innerHTML='',this.initialize(e,t)}}},n=(a(292),a(10)),r=Object(n.a)(i,(function(){var e=this._self._c;return e("form",{staticClass:"algolia-search-wrapper search-box",attrs:{id:"search-form",role:"search"}},[e("input",{staticClass:"search-query",attrs:{id:"algolia-search-input",placeholder:this.placeholder}})])}),[],!1,null,null,null);t.default=r.exports}}]); \ No newline at end of file diff --git a/docs/.vuepress/dist/assets/js/16.d50a6791.js b/docs/.vuepress/dist/assets/js/16.d50a6791.js new file mode 100644 index 00000000..61bad7c9 --- /dev/null +++ b/docs/.vuepress/dist/assets/js/16.d50a6791.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[16,21,23],{245:function(t,e,n){"use strict";n.d(e,"d",(function(){return i})),n.d(e,"a",(function(){return s})),n.d(e,"i",(function(){return o})),n.d(e,"f",(function(){return l})),n.d(e,"g",(function(){return u})),n.d(e,"h",(function(){return c})),n.d(e,"b",(function(){return p})),n.d(e,"e",(function(){return f})),n.d(e,"k",(function(){return h})),n.d(e,"l",(function(){return d})),n.d(e,"c",(function(){return b})),n.d(e,"j",(function(){return g}));n(91);const i=/#.*$/,r=/\.(md|html)$/,s=/\/$/,o=/^[a-z]+:/i;function a(t){return decodeURI(t).replace(i,"").replace(r,"")}function l(t){return o.test(t)}function u(t){return/^mailto:/.test(t)}function c(t){return/^tel:/.test(t)}function p(t){if(l(t))return t;const e=t.match(i),n=e?e[0]:"",r=a(t);return s.test(r)?t:r+".html"+n}function f(t,e){const n=decodeURIComponent(t.hash),r=function(t){const e=t.match(i);if(e)return e[0]}(e);if(r&&n!==r)return!1;return a(t.path)===a(e)}function h(t,e,n){if(l(e))return{type:"external",path:e};n&&(e=function(t,e,n){const i=t.charAt(0);if("/"===i)return t;if("?"===i||"#"===i)return e+t;const r=e.split("/");n&&r[r.length-1]||r.pop();const s=t.replace(/^\//,"").split("/");for(let t=0;tfunction t(e,n,i,r=1){if("string"==typeof e)return h(n,e,i);if(Array.isArray(e))return Object.assign(h(n,e[0],i),{title:e[1]});{const s=e.children||[];return 0===s.length&&e.path?Object.assign(h(n,e.path,i),{title:e.title}):{type:"group",path:e.path,title:e.title,sidebarDepth:e.sidebarDepth,initialOpenGroupIndex:e.initialOpenGroupIndex,children:s.map(e=>t(e,n,i,r+1)),collapsable:!1!==e.collapsable}}}(t,r,n)):[]}return[]}function m(t){const e=b(t.headers||[]);return[{type:"group",collapsable:!1,title:t.title,path:null,children:e.map(e=>({type:"auto",title:e.title,basePath:t.path,path:t.path+"#"+e.slug,children:e.children||[]}))}]}function b(t){let e;return(t=t.map(t=>Object.assign({},t))).forEach(t=>{2===t.level?e=t:e&&(e.children||(e.children=[])).push(t)}),t.filter(t=>2===t.level)}function g(t){return Object.assign(t,{type:t.items&&t.items.length?"links":"link"})}},246:function(t,e,n){},247:function(t,e,n){"use strict";n.r(e);var i=n(245),r={name:"NavLink",props:{item:{required:!0}},computed:{link(){return Object(i.b)(this.item.link)},exact(){return this.$site.locales?Object.keys(this.$site.locales).some(t=>t===this.link):"/"===this.link},isNonHttpURI(){return Object(i.g)(this.link)||Object(i.h)(this.link)},isBlankTarget(){return"_blank"===this.target},isInternal(){return!Object(i.f)(this.link)&&!this.isBlankTarget},target(){return this.isNonHttpURI?null:this.item.target?this.item.target:Object(i.f)(this.link)?"_blank":""},rel(){return this.isNonHttpURI||!1===this.item.rel?null:this.item.rel?this.item.rel:this.isBlankTarget?"noopener noreferrer":null}},methods:{focusoutAction(){this.$emit("focusout")}}},s=n(10),o=Object(s.a)(r,(function(){var t=this,e=t._self._c;return t.isInternal?e("RouterLink",{staticClass:"nav-link",attrs:{to:t.link,exact:t.exact},nativeOn:{focusout:function(e){return t.focusoutAction.apply(null,arguments)}}},[t._v("\n "+t._s(t.item.text)+"\n")]):e("a",{staticClass:"nav-link external",attrs:{href:t.link,target:t.target,rel:t.rel},on:{focusout:t.focusoutAction}},[t._v("\n "+t._s(t.item.text)+"\n "),t.isBlankTarget?e("OutboundLink"):t._e()],1)}),[],!1,null,null,null);e.default=o.exports},248:function(t,e,n){"use strict";n.r(e);var i={name:"DropdownTransition",methods:{setHeight(t){t.style.height=t.scrollHeight+"px"},unsetHeight(t){t.style.height=""}}},r=(n(249),n(10)),s=Object(r.a)(i,(function(){return(0,this._self._c)("transition",{attrs:{name:"dropdown"},on:{enter:this.setHeight,"after-enter":this.unsetHeight,"before-leave":this.setHeight}},[this._t("default")],2)}),[],!1,null,null,null);e.default=s.exports},249:function(t,e,n){"use strict";n(246)},250:function(t,e,n){},257:function(t,e,n){"use strict";n(250)},260:function(t,e,n){"use strict";n.r(e);var i=n(247),r=n(248),s=n(92),o=n.n(s),a={name:"DropdownLink",components:{NavLink:i.default,DropdownTransition:r.default},props:{item:{required:!0}},data:()=>({open:!1}),computed:{dropdownAriaLabel(){return this.item.ariaLabel||this.item.text}},watch:{$route(){this.open=!1}},methods:{setOpen(t){this.open=t},isLastItemOfArray:(t,e)=>o()(e)===t,handleDropdown(){0===event.detail&&this.setOpen(!this.open)}}},l=(n(257),n(10)),u=Object(l.a)(a,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"dropdown-wrapper",class:{open:t.open}},[e("button",{staticClass:"dropdown-title",attrs:{type:"button","aria-label":t.dropdownAriaLabel},on:{click:t.handleDropdown}},[e("span",{staticClass:"title"},[t._v(t._s(t.item.text))]),t._v(" "),e("span",{staticClass:"arrow down"})]),t._v(" "),e("button",{staticClass:"mobile-dropdown-title",attrs:{type:"button","aria-label":t.dropdownAriaLabel},on:{click:function(e){return t.setOpen(!t.open)}}},[e("span",{staticClass:"title"},[t._v(t._s(t.item.text))]),t._v(" "),e("span",{staticClass:"arrow",class:t.open?"down":"right"})]),t._v(" "),e("DropdownTransition",[e("ul",{directives:[{name:"show",rawName:"v-show",value:t.open,expression:"open"}],staticClass:"nav-dropdown"},t._l(t.item.items,(function(n,i){return e("li",{key:n.link||i,staticClass:"dropdown-item"},["links"===n.type?e("h4",[t._v("\n "+t._s(n.text)+"\n ")]):t._e(),t._v(" "),"links"===n.type?e("ul",{staticClass:"dropdown-subitem-wrapper"},t._l(n.items,(function(i){return e("li",{key:i.link,staticClass:"dropdown-subitem"},[e("NavLink",{attrs:{item:i},on:{focusout:function(e){t.isLastItemOfArray(i,n.items)&&t.isLastItemOfArray(n,t.item.items)&&t.setOpen(!1)}}})],1)})),0):e("NavLink",{attrs:{item:n},on:{focusout:function(e){t.isLastItemOfArray(n,t.item.items)&&t.setOpen(!1)}}})],1)})),0)])],1)}),[],!1,null,null,null);e.default=u.exports}}]); \ No newline at end of file diff --git a/docs/.vuepress/dist/assets/js/17.89eadde8.js b/docs/.vuepress/dist/assets/js/17.89eadde8.js new file mode 100644 index 00000000..b6ff3440 --- /dev/null +++ b/docs/.vuepress/dist/assets/js/17.89eadde8.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[17],{245:function(t,n,e){"use strict";e.d(n,"d",(function(){return r})),e.d(n,"a",(function(){return o})),e.d(n,"i",(function(){return a})),e.d(n,"f",(function(){return u})),e.d(n,"g",(function(){return c})),e.d(n,"h",(function(){return p})),e.d(n,"b",(function(){return l})),e.d(n,"e",(function(){return f})),e.d(n,"k",(function(){return h})),e.d(n,"l",(function(){return d})),e.d(n,"c",(function(){return v})),e.d(n,"j",(function(){return b}));e(91);const r=/#.*$/,i=/\.(md|html)$/,o=/\/$/,a=/^[a-z]+:/i;function s(t){return decodeURI(t).replace(r,"").replace(i,"")}function u(t){return a.test(t)}function c(t){return/^mailto:/.test(t)}function p(t){return/^tel:/.test(t)}function l(t){if(u(t))return t;const n=t.match(r),e=n?n[0]:"",i=s(t);return o.test(i)?t:i+".html"+e}function f(t,n){const e=decodeURIComponent(t.hash),i=function(t){const n=t.match(r);if(n)return n[0]}(n);if(i&&e!==i)return!1;return s(t.path)===s(n)}function h(t,n,e){if(u(n))return{type:"external",path:n};e&&(n=function(t,n,e){const r=t.charAt(0);if("/"===r)return t;if("?"===r||"#"===r)return n+t;const i=n.split("/");e&&i[i.length-1]||i.pop();const o=t.replace(/^\//,"").split("/");for(let t=0;tfunction t(n,e,r,i=1){if("string"==typeof n)return h(e,n,r);if(Array.isArray(n))return Object.assign(h(e,n[0],r),{title:n[1]});{const o=n.children||[];return 0===o.length&&n.path?Object.assign(h(e,n.path,r),{title:n.title}):{type:"group",path:n.path,title:n.title,sidebarDepth:n.sidebarDepth,initialOpenGroupIndex:n.initialOpenGroupIndex,children:o.map(n=>t(n,e,r,i+1)),collapsable:!1!==n.collapsable}}}(t,i,e)):[]}return[]}function g(t){const n=v(t.headers||[]);return[{type:"group",collapsable:!1,title:t.title,path:null,children:n.map(n=>({type:"auto",title:n.title,basePath:t.path,path:t.path+"#"+n.slug,children:n.children||[]}))}]}function v(t){let n;return(t=t.map(t=>Object.assign({},t))).forEach(t=>{2===t.level?n=t:n&&(n.children||(n.children=[])).push(t)}),t.filter(t=>2===t.level)}function b(t){return Object.assign(t,{type:t.items&&t.items.length?"links":"link"})}},252:function(t,n){t.exports=function(t){return null==t}},255:function(t,n,e){},266:function(t,n,e){var r=e(12),i=e(4),o=e(11);t.exports=function(t){return"string"==typeof t||!i(t)&&o(t)&&"[object String]"==r(t)}},267:function(t,n,e){"use strict";e(255)},274:function(t,n,e){"use strict";e.r(n);e(91);var r=e(245),i=e(266),o=e.n(i),a=e(252),s=e.n(a),u={name:"PageNav",props:["sidebarItems"],computed:{prev(){return p(c.PREV,this)},next(){return p(c.NEXT,this)}}};const c={NEXT:{resolveLink:function(t,n){return l(t,n,1)},getThemeLinkConfig:({nextLinks:t})=>t,getPageLinkConfig:({frontmatter:t})=>t.next},PREV:{resolveLink:function(t,n){return l(t,n,-1)},getThemeLinkConfig:({prevLinks:t})=>t,getPageLinkConfig:({frontmatter:t})=>t.prev}};function p(t,{$themeConfig:n,$page:e,$route:i,$site:a,sidebarItems:u}){const{resolveLink:c,getThemeLinkConfig:p,getPageLinkConfig:l}=t,f=p(n),h=l(e),d=s()(h)?f:h;return!1===d?void 0:o()(d)?Object(r.k)(a.pages,d,i.path):c(e,u)}function l(t,n,e){const r=[];!function t(n,e){for(let r=0,i=n.length;rfunction t(e,n,i,r=1){if("string"==typeof e)return d(n,e,i);if(Array.isArray(e))return Object.assign(d(n,e[0],i),{title:e[1]});{const a=e.children||[];return 0===a.length&&e.path?Object.assign(d(n,e.path,i),{title:e.title}):{type:"group",path:e.path,title:e.title,sidebarDepth:e.sidebarDepth,initialOpenGroupIndex:e.initialOpenGroupIndex,children:a.map(e=>t(e,n,i,r+1)),collapsable:!1!==e.collapsable}}}(t,r,n)):[]}return[]}function m(t){const e=g(t.headers||[]);return[{type:"group",collapsable:!1,title:t.title,path:null,children:e.map(e=>({type:"auto",title:e.title,basePath:t.path,path:t.path+"#"+e.slug,children:e.children||[]}))}]}function g(t){let e;return(t=t.map(t=>Object.assign({},t))).forEach(t=>{2===t.level?e=t:e&&(e.children||(e.children=[])).push(t)}),t.filter(t=>2===t.level)}function b(t){return Object.assign(t,{type:t.items&&t.items.length?"links":"link"})}},247:function(t,e,n){"use strict";n.r(e);var i=n(245),r={name:"NavLink",props:{item:{required:!0}},computed:{link(){return Object(i.b)(this.item.link)},exact(){return this.$site.locales?Object.keys(this.$site.locales).some(t=>t===this.link):"/"===this.link},isNonHttpURI(){return Object(i.g)(this.link)||Object(i.h)(this.link)},isBlankTarget(){return"_blank"===this.target},isInternal(){return!Object(i.f)(this.link)&&!this.isBlankTarget},target(){return this.isNonHttpURI?null:this.item.target?this.item.target:Object(i.f)(this.link)?"_blank":""},rel(){return this.isNonHttpURI||!1===this.item.rel?null:this.item.rel?this.item.rel:this.isBlankTarget?"noopener noreferrer":null}},methods:{focusoutAction(){this.$emit("focusout")}}},a=n(10),s=Object(a.a)(r,(function(){var t=this,e=t._self._c;return t.isInternal?e("RouterLink",{staticClass:"nav-link",attrs:{to:t.link,exact:t.exact},nativeOn:{focusout:function(e){return t.focusoutAction.apply(null,arguments)}}},[t._v("\n "+t._s(t.item.text)+"\n")]):e("a",{staticClass:"nav-link external",attrs:{href:t.link,target:t.target,rel:t.rel},on:{focusout:t.focusoutAction}},[t._v("\n "+t._s(t.item.text)+"\n "),t.isBlankTarget?e("OutboundLink"):t._e()],1)}),[],!1,null,null,null);e.default=s.exports},262:function(t,e,n){},275:function(t,e,n){"use strict";n(262)},284:function(t,e,n){"use strict";n.r(e);var i={name:"Home",components:{NavLink:n(247).default},computed:{data(){return this.$page.frontmatter},actionLink(){return{link:this.data.actionLink,text:this.data.actionText}}}},r=(n(275),n(10)),a=Object(r.a)(i,(function(){var t=this,e=t._self._c;return e("main",{staticClass:"home",attrs:{"aria-labelledby":null!==t.data.heroText?"main-title":null}},[e("header",{staticClass:"hero"},[t.data.heroImage?e("img",{attrs:{src:t.$withBase(t.data.heroImage),alt:t.data.heroAlt||"hero"}}):t._e(),t._v(" "),null!==t.data.heroText?e("h1",{attrs:{id:"main-title"}},[t._v("\n "+t._s(t.data.heroText||t.$title||"Hello")+"\n ")]):t._e(),t._v(" "),null!==t.data.tagline?e("p",{staticClass:"description"},[t._v("\n "+t._s(t.data.tagline||t.$description||"Welcome to your VuePress site")+"\n ")]):t._e(),t._v(" "),t.data.actionText&&t.data.actionLink?e("p",{staticClass:"action"},[e("NavLink",{staticClass:"action-button",attrs:{item:t.actionLink}})],1):t._e()]),t._v(" "),t.data.features&&t.data.features.length?e("div",{staticClass:"features"},t._l(t.data.features,(function(n,i){return e("div",{key:i,staticClass:"feature"},[e("h2",[t._v(t._s(n.title))]),t._v(" "),e("p",[t._v(t._s(n.details))])])})),0):t._e(),t._v(" "),e("Content",{staticClass:"theme-default-content custom"}),t._v(" "),t.data.footer?e("div",{staticClass:"footer"},[t._v("\n "+t._s(t.data.footer)+"\n ")]):t._e()],1)}),[],!1,null,null,null);e.default=a.exports}}]); \ No newline at end of file diff --git a/docs/.vuepress/dist/assets/js/19.f79aca12.js b/docs/.vuepress/dist/assets/js/19.f79aca12.js new file mode 100644 index 00000000..aa1cc5ea --- /dev/null +++ b/docs/.vuepress/dist/assets/js/19.f79aca12.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[19],{245:function(t,e,n){"use strict";n.d(e,"d",(function(){return i})),n.d(e,"a",(function(){return a})),n.d(e,"i",(function(){return s})),n.d(e,"f",(function(){return c})),n.d(e,"g",(function(){return u})),n.d(e,"h",(function(){return l})),n.d(e,"b",(function(){return d})),n.d(e,"e",(function(){return p})),n.d(e,"k",(function(){return f})),n.d(e,"l",(function(){return h})),n.d(e,"c",(function(){return m})),n.d(e,"j",(function(){return b}));n(91);const i=/#.*$/,r=/\.(md|html)$/,a=/\/$/,s=/^[a-z]+:/i;function o(t){return decodeURI(t).replace(i,"").replace(r,"")}function c(t){return s.test(t)}function u(t){return/^mailto:/.test(t)}function l(t){return/^tel:/.test(t)}function d(t){if(c(t))return t;const e=t.match(i),n=e?e[0]:"",r=o(t);return a.test(r)?t:r+".html"+n}function p(t,e){const n=decodeURIComponent(t.hash),r=function(t){const e=t.match(i);if(e)return e[0]}(e);if(r&&n!==r)return!1;return o(t.path)===o(e)}function f(t,e,n){if(c(e))return{type:"external",path:e};n&&(e=function(t,e,n){const i=t.charAt(0);if("/"===i)return t;if("?"===i||"#"===i)return e+t;const r=e.split("/");n&&r[r.length-1]||r.pop();const a=t.replace(/^\//,"").split("/");for(let t=0;tfunction t(e,n,i,r=1){if("string"==typeof e)return f(n,e,i);if(Array.isArray(e))return Object.assign(f(n,e[0],i),{title:e[1]});{const a=e.children||[];return 0===a.length&&e.path?Object.assign(f(n,e.path,i),{title:e.title}):{type:"group",path:e.path,title:e.title,sidebarDepth:e.sidebarDepth,initialOpenGroupIndex:e.initialOpenGroupIndex,children:a.map(e=>t(e,n,i,r+1)),collapsable:!1!==e.collapsable}}}(t,r,n)):[]}return[]}function g(t){const e=m(t.headers||[]);return[{type:"group",collapsable:!1,title:t.title,path:null,children:e.map(e=>({type:"auto",title:e.title,basePath:t.path,path:t.path+"#"+e.slug,children:e.children||[]}))}]}function m(t){let e;return(t=t.map(t=>Object.assign({},t))).forEach(t=>{2===t.level?e=t:e&&(e.children||(e.children=[])).push(t)}),t.filter(t=>2===t.level)}function b(t){return Object.assign(t,{type:t.items&&t.items.length?"links":"link"})}},252:function(t,e){t.exports=function(t){return null==t}},254:function(t,e,n){},265:function(t,e,n){"use strict";n(254)},273:function(t,e,n){"use strict";n.r(e);var i=n(252),r=n.n(i),a=n(245),s={name:"PageEdit",computed:{lastUpdated(){return this.$page.lastUpdated},lastUpdatedText(){return"string"==typeof this.$themeLocaleConfig.lastUpdated?this.$themeLocaleConfig.lastUpdated:"string"==typeof this.$site.themeConfig.lastUpdated?this.$site.themeConfig.lastUpdated:"Last Updated"},editLink(){const t=r()(this.$page.frontmatter.editLink)?this.$site.themeConfig.editLinks:this.$page.frontmatter.editLink,{repo:e,docsDir:n="",docsBranch:i="master",docsRepo:a=e}=this.$site.themeConfig;return t&&a&&this.$page.relativePath?this.createEditLink(e,a,n,i,this.$page.relativePath):null},editLinkText(){return this.$themeLocaleConfig.editLinkText||this.$site.themeConfig.editLinkText||"Edit this page"}},methods:{createEditLink(t,e,n,i,r){if(/bitbucket.org/.test(e)){return e.replace(a.a,"")+"/src"+`/${i}/`+(n?n.replace(a.a,"")+"/":"")+r+`?mode=edit&spa=0&at=${i}&fileviewer=file-view-default`}if(/gitlab.com/.test(e)){return e.replace(a.a,"")+"/-/edit"+`/${i}/`+(n?n.replace(a.a,"")+"/":"")+r}return(a.i.test(e)?e:"https://github.com/"+e).replace(a.a,"")+"/edit"+`/${i}/`+(n?n.replace(a.a,"")+"/":"")+r}}},o=(n(265),n(10)),c=Object(o.a)(s,(function(){var t=this,e=t._self._c;return e("footer",{staticClass:"page-edit"},[t.editLink?e("div",{staticClass:"edit-link"},[e("a",{attrs:{href:t.editLink,target:"_blank",rel:"noopener noreferrer"}},[t._v(t._s(t.editLinkText))]),t._v(" "),e("OutboundLink")],1):t._e(),t._v(" "),t.lastUpdated?e("div",{staticClass:"last-updated"},[e("span",{staticClass:"prefix"},[t._v(t._s(t.lastUpdatedText)+":")]),t._v(" "),e("span",{staticClass:"time"},[t._v(t._s(t.lastUpdated))])]):t._e()])}),[],!1,null,null,null);e.default=c.exports}}]); \ No newline at end of file diff --git a/docs/.vuepress/dist/assets/js/2.e48b8fe5.js b/docs/.vuepress/dist/assets/js/2.e48b8fe5.js new file mode 100644 index 00000000..6f066e5e --- /dev/null +++ b/docs/.vuepress/dist/assets/js/2.e48b8fe5.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[2],{251:function(t,e,a){},252:function(t,e){t.exports=function(t){return null==t}},254:function(t,e,a){},255:function(t,e,a){},256:function(t,e,a){},258:function(t,e,a){"use strict";a(251)},259:function(t,e,a){"use strict";a.r(e);var n=a(272),s=a(261),i=a(245);function r(t,e){return"group"===e.type&&e.children.some(e=>"group"===e.type?r(t,e):"page"===e.type&&Object(i.e)(t,e.path))}var o={name:"SidebarLinks",components:{SidebarGroup:n.default,SidebarLink:s.default},props:["items","depth","sidebarDepth","initialOpenGroupIndex"],data(){return{openGroupIndex:this.initialOpenGroupIndex||0}},watch:{$route(){this.refreshIndex()}},created(){this.refreshIndex()},methods:{refreshIndex(){const t=function(t,e){for(let a=0;a-1&&(this.openGroupIndex=t)},toggleGroup(t){this.openGroupIndex=t===this.openGroupIndex?-1:t},isActive(t){return Object(i.e)(this.$route,t.regularPath)}}},l=a(10),u=Object(l.a)(o,(function(){var t=this,e=t._self._c;return t.items.length?e("ul",{staticClass:"sidebar-links"},t._l(t.items,(function(a,n){return e("li",{key:n},["group"===a.type?e("SidebarGroup",{attrs:{item:a,open:n===t.openGroupIndex,collapsable:a.collapsable||a.collapsible,depth:t.depth},on:{toggle:function(e){return t.toggleGroup(n)}}}):e("SidebarLink",{attrs:{"sidebar-depth":t.sidebarDepth,item:a}})],1)})),0):t._e()}),[],!1,null,null,null);e.default=u.exports},261:function(t,e,a){"use strict";a.r(e);var n=a(245);function s(t,e,a,n,s){const i={props:{to:e,activeClass:"",exactActiveClass:""},class:{active:n,"sidebar-link":!0}};return s>2&&(i.style={"padding-left":s+"rem"}),t("RouterLink",i,a)}function i(t,e,a,r,o,l=1){return!e||l>o?null:t("ul",{class:"sidebar-sub-headers"},e.map(e=>{const u=Object(n.e)(r,a+"#"+e.slug);return t("li",{class:"sidebar-sub-header"},[s(t,a+"#"+e.slug,e.title,u,e.level-1),i(t,e.children,a,r,o,l+1)])}))}var r={functional:!0,props:["item","sidebarDepth"],render(t,{parent:{$page:e,$site:a,$route:r,$themeConfig:o,$themeLocaleConfig:l},props:{item:u,sidebarDepth:c}}){const p=Object(n.e)(r,u.path),d="auto"===u.type?p||u.children.some(t=>Object(n.e)(r,u.basePath+"#"+t.slug)):p,h="external"===u.type?function(t,e,a){return t("a",{attrs:{href:e,target:"_blank",rel:"noopener noreferrer"},class:{"sidebar-link":!0}},[a,t("OutboundLink")])}(t,u.path,u.title||u.path):s(t,u.path,u.title||u.path,d),f=[e.frontmatter.sidebarDepth,c,l.sidebarDepth,o.sidebarDepth,1].find(t=>void 0!==t),b=l.displayAllHeaders||o.displayAllHeaders;if("auto"===u.type)return[h,i(t,u.children,u.basePath,r,f)];if((d||b)&&u.headers&&!n.d.test(u.path)){return[h,i(t,Object(n.c)(u.headers),u.path,r,f)]}return h}},o=(a(258),a(10)),l=Object(o.a)(r,void 0,void 0,!1,null,null,null);e.default=l.exports},262:function(t,e,a){},265:function(t,e,a){"use strict";a(254)},266:function(t,e,a){var n=a(12),s=a(4),i=a(11);t.exports=function(t){return"string"==typeof t||!s(t)&&i(t)&&"[object String]"==n(t)}},267:function(t,e,a){"use strict";a(255)},268:function(t,e,a){},269:function(t,e,a){"use strict";a(256)},270:function(t,e,a){},272:function(t,e,a){"use strict";a.r(e);var n=a(245),s={name:"SidebarGroup",components:{DropdownTransition:a(248).default},props:["item","open","collapsable","depth"],beforeCreate(){this.$options.components.SidebarLinks=a(259).default},methods:{isActive:n.e}},i=(a(269),a(10)),r=Object(i.a)(s,(function(){var t=this,e=t._self._c;return e("section",{staticClass:"sidebar-group",class:[{collapsable:t.collapsable,"is-sub-group":0!==t.depth},"depth-"+t.depth]},[t.item.path?e("RouterLink",{staticClass:"sidebar-heading clickable",class:{open:t.open,active:t.isActive(t.$route,t.item.path)},attrs:{to:t.item.path},nativeOn:{click:function(e){return t.$emit("toggle")}}},[e("span",[t._v(t._s(t.item.title))]),t._v(" "),t.collapsable?e("span",{staticClass:"arrow",class:t.open?"down":"right"}):t._e()]):e("p",{staticClass:"sidebar-heading",class:{open:t.open},on:{click:function(e){return t.$emit("toggle")}}},[e("span",[t._v(t._s(t.item.title))]),t._v(" "),t.collapsable?e("span",{staticClass:"arrow",class:t.open?"down":"right"}):t._e()]),t._v(" "),e("DropdownTransition",[t.open||!t.collapsable?e("SidebarLinks",{staticClass:"sidebar-group-items",attrs:{items:t.item.children,"sidebar-depth":t.item.sidebarDepth,"initial-open-group-index":t.item.initialOpenGroupIndex,depth:t.depth+1}}):t._e()],1)],1)}),[],!1,null,null,null);e.default=r.exports},273:function(t,e,a){"use strict";a.r(e);var n=a(252),s=a.n(n),i=a(245),r={name:"PageEdit",computed:{lastUpdated(){return this.$page.lastUpdated},lastUpdatedText(){return"string"==typeof this.$themeLocaleConfig.lastUpdated?this.$themeLocaleConfig.lastUpdated:"string"==typeof this.$site.themeConfig.lastUpdated?this.$site.themeConfig.lastUpdated:"Last Updated"},editLink(){const t=s()(this.$page.frontmatter.editLink)?this.$site.themeConfig.editLinks:this.$page.frontmatter.editLink,{repo:e,docsDir:a="",docsBranch:n="master",docsRepo:i=e}=this.$site.themeConfig;return t&&i&&this.$page.relativePath?this.createEditLink(e,i,a,n,this.$page.relativePath):null},editLinkText(){return this.$themeLocaleConfig.editLinkText||this.$site.themeConfig.editLinkText||"Edit this page"}},methods:{createEditLink(t,e,a,n,s){if(/bitbucket.org/.test(e)){return e.replace(i.a,"")+"/src"+`/${n}/`+(a?a.replace(i.a,"")+"/":"")+s+`?mode=edit&spa=0&at=${n}&fileviewer=file-view-default`}if(/gitlab.com/.test(e)){return e.replace(i.a,"")+"/-/edit"+`/${n}/`+(a?a.replace(i.a,"")+"/":"")+s}return(i.i.test(e)?e:"https://github.com/"+e).replace(i.a,"")+"/edit"+`/${n}/`+(a?a.replace(i.a,"")+"/":"")+s}}},o=(a(265),a(10)),l=Object(o.a)(r,(function(){var t=this,e=t._self._c;return e("footer",{staticClass:"page-edit"},[t.editLink?e("div",{staticClass:"edit-link"},[e("a",{attrs:{href:t.editLink,target:"_blank",rel:"noopener noreferrer"}},[t._v(t._s(t.editLinkText))]),t._v(" "),e("OutboundLink")],1):t._e(),t._v(" "),t.lastUpdated?e("div",{staticClass:"last-updated"},[e("span",{staticClass:"prefix"},[t._v(t._s(t.lastUpdatedText)+":")]),t._v(" "),e("span",{staticClass:"time"},[t._v(t._s(t.lastUpdated))])]):t._e()])}),[],!1,null,null,null);e.default=l.exports},274:function(t,e,a){"use strict";a.r(e);a(91);var n=a(245),s=a(266),i=a.n(s),r=a(252),o=a.n(r),l={name:"PageNav",props:["sidebarItems"],computed:{prev(){return c(u.PREV,this)},next(){return c(u.NEXT,this)}}};const u={NEXT:{resolveLink:function(t,e){return p(t,e,1)},getThemeLinkConfig:({nextLinks:t})=>t,getPageLinkConfig:({frontmatter:t})=>t.next},PREV:{resolveLink:function(t,e){return p(t,e,-1)},getThemeLinkConfig:({prevLinks:t})=>t,getPageLinkConfig:({frontmatter:t})=>t.prev}};function c(t,{$themeConfig:e,$page:a,$route:s,$site:r,sidebarItems:l}){const{resolveLink:u,getThemeLinkConfig:c,getPageLinkConfig:p}=t,d=c(e),h=p(a),f=o()(h)?d:h;return!1===f?void 0:i()(f)?Object(n.k)(r.pages,f,s.path):u(a,l)}function p(t,e,a){const n=[];!function t(e,a){for(let n=0,s=e.length;n({isSidebarOpen:!1}),computed:{shouldShowNavbar(){const{themeConfig:t}=this.$site,{frontmatter:e}=this.$page;return!1!==e.navbar&&!1!==t.navbar&&(this.$title||t.logo||t.repo||t.nav||this.$themeLocaleConfig.nav)},shouldShowSidebar(){const{frontmatter:t}=this.$page;return!t.home&&!1!==t.sidebar&&this.sidebarItems.length},sidebarItems(){return Object(o.l)(this.$page,this.$page.regularPath,this.$site,this.$localePath)},pageClasses(){const t=this.$page.frontmatter.pageClass;return[{"no-navbar":!this.shouldShowNavbar,"sidebar-open":this.isSidebarOpen,"no-sidebar":!this.shouldShowSidebar},t]}},mounted(){this.$router.afterEach(()=>{this.isSidebarOpen=!1})},methods:{toggleSidebar(t){this.isSidebarOpen="boolean"==typeof t?t:!this.isSidebarOpen,this.$emit("toggle-sidebar",this.isSidebarOpen)},onTouchStart(t){this.touchStart={x:t.changedTouches[0].clientX,y:t.changedTouches[0].clientY}},onTouchEnd(t){const e=t.changedTouches[0].clientX-this.touchStart.x,a=t.changedTouches[0].clientY-this.touchStart.y;Math.abs(e)>Math.abs(a)&&Math.abs(e)>40&&(e>0&&this.touchStart.x<=80?this.toggleSidebar(!0):this.toggleSidebar(!1))}}},u=a(10),c=Object(u.a)(l,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"theme-container",class:t.pageClasses,on:{touchstart:t.onTouchStart,touchend:t.onTouchEnd}},[t.shouldShowNavbar?e("Navbar",{on:{"toggle-sidebar":t.toggleSidebar}}):t._e(),t._v(" "),e("div",{staticClass:"sidebar-mask",on:{click:function(e){return t.toggleSidebar(!1)}}}),t._v(" "),e("Sidebar",{attrs:{items:t.sidebarItems},on:{"toggle-sidebar":t.toggleSidebar},scopedSlots:t._u([{key:"top",fn:function(){return[t._t("sidebar-top")]},proxy:!0},{key:"bottom",fn:function(){return[t._t("sidebar-bottom")]},proxy:!0}],null,!0)}),t._v(" "),t.$page.frontmatter.home?e("Home"):e("Page",{attrs:{"sidebar-items":t.sidebarItems},scopedSlots:t._u([{key:"top",fn:function(){return[t._t("page-top")]},proxy:!0},{key:"bottom",fn:function(){return[t._t("page-bottom")]},proxy:!0}],null,!0)})],1)}),[],!1,null,null,null);e.default=c.exports}}]); \ No newline at end of file diff --git a/docs/.vuepress/dist/assets/js/20.f18130ba.js b/docs/.vuepress/dist/assets/js/20.f18130ba.js new file mode 100644 index 00000000..cd66d784 --- /dev/null +++ b/docs/.vuepress/dist/assets/js/20.f18130ba.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[20],{245:function(t,e,n){"use strict";n.d(e,"d",(function(){return r})),n.d(e,"a",(function(){return a})),n.d(e,"i",(function(){return s})),n.d(e,"f",(function(){return o})),n.d(e,"g",(function(){return c})),n.d(e,"h",(function(){return l})),n.d(e,"b",(function(){return p})),n.d(e,"e",(function(){return f})),n.d(e,"k",(function(){return d})),n.d(e,"l",(function(){return h})),n.d(e,"c",(function(){return g})),n.d(e,"j",(function(){return m}));n(91);const r=/#.*$/,i=/\.(md|html)$/,a=/\/$/,s=/^[a-z]+:/i;function u(t){return decodeURI(t).replace(r,"").replace(i,"")}function o(t){return s.test(t)}function c(t){return/^mailto:/.test(t)}function l(t){return/^tel:/.test(t)}function p(t){if(o(t))return t;const e=t.match(r),n=e?e[0]:"",i=u(t);return a.test(i)?t:i+".html"+n}function f(t,e){const n=decodeURIComponent(t.hash),i=function(t){const e=t.match(r);if(e)return e[0]}(e);if(i&&n!==i)return!1;return u(t.path)===u(e)}function d(t,e,n){if(o(e))return{type:"external",path:e};n&&(e=function(t,e,n){const r=t.charAt(0);if("/"===r)return t;if("?"===r||"#"===r)return e+t;const i=e.split("/");n&&i[i.length-1]||i.pop();const a=t.replace(/^\//,"").split("/");for(let t=0;tfunction t(e,n,r,i=1){if("string"==typeof e)return d(n,e,r);if(Array.isArray(e))return Object.assign(d(n,e[0],r),{title:e[1]});{const a=e.children||[];return 0===a.length&&e.path?Object.assign(d(n,e.path,r),{title:e.title}):{type:"group",path:e.path,title:e.title,sidebarDepth:e.sidebarDepth,initialOpenGroupIndex:e.initialOpenGroupIndex,children:a.map(e=>t(e,n,r,i+1)),collapsable:!1!==e.collapsable}}}(t,i,n)):[]}return[]}function b(t){const e=g(t.headers||[]);return[{type:"group",collapsable:!1,title:t.title,path:null,children:e.map(e=>({type:"auto",title:e.title,basePath:t.path,path:t.path+"#"+e.slug,children:e.children||[]}))}]}function g(t){let e;return(t=t.map(t=>Object.assign({},t))).forEach(t=>{2===t.level?e=t:e&&(e.children||(e.children=[])).push(t)}),t.filter(t=>2===t.level)}function m(t){return Object.assign(t,{type:t.items&&t.items.length?"links":"link"})}},251:function(t,e,n){},258:function(t,e,n){"use strict";n(251)},261:function(t,e,n){"use strict";n.r(e);var r=n(245);function i(t,e,n,r,i){const a={props:{to:e,activeClass:"",exactActiveClass:""},class:{active:r,"sidebar-link":!0}};return i>2&&(a.style={"padding-left":i+"rem"}),t("RouterLink",a,n)}function a(t,e,n,s,u,o=1){return!e||o>u?null:t("ul",{class:"sidebar-sub-headers"},e.map(e=>{const c=Object(r.e)(s,n+"#"+e.slug);return t("li",{class:"sidebar-sub-header"},[i(t,n+"#"+e.slug,e.title,c,e.level-1),a(t,e.children,n,s,u,o+1)])}))}var s={functional:!0,props:["item","sidebarDepth"],render(t,{parent:{$page:e,$site:n,$route:s,$themeConfig:u,$themeLocaleConfig:o},props:{item:c,sidebarDepth:l}}){const p=Object(r.e)(s,c.path),f="auto"===c.type?p||c.children.some(t=>Object(r.e)(s,c.basePath+"#"+t.slug)):p,d="external"===c.type?function(t,e,n){return t("a",{attrs:{href:e,target:"_blank",rel:"noopener noreferrer"},class:{"sidebar-link":!0}},[n,t("OutboundLink")])}(t,c.path,c.title||c.path):i(t,c.path,c.title||c.path,f),h=[e.frontmatter.sidebarDepth,l,o.sidebarDepth,u.sidebarDepth,1].find(t=>void 0!==t),b=o.displayAllHeaders||u.displayAllHeaders;if("auto"===c.type)return[d,a(t,c.children,c.basePath,s,h)];if((f||b)&&c.headers&&!r.d.test(c.path)){return[d,a(t,Object(r.c)(c.headers),c.path,s,h)]}return d}},u=(n(258),n(10)),o=Object(u.a)(s,void 0,void 0,!1,null,null,null);e.default=o.exports}}]); \ No newline at end of file diff --git a/docs/.vuepress/dist/assets/js/21.b038100c.js b/docs/.vuepress/dist/assets/js/21.b038100c.js new file mode 100644 index 00000000..197847bf --- /dev/null +++ b/docs/.vuepress/dist/assets/js/21.b038100c.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[21],{246:function(t,e,n){},248:function(t,e,n){"use strict";n.r(e);var s={name:"DropdownTransition",methods:{setHeight(t){t.style.height=t.scrollHeight+"px"},unsetHeight(t){t.style.height=""}}},i=(n(249),n(10)),o=Object(i.a)(s,(function(){return(0,this._self._c)("transition",{attrs:{name:"dropdown"},on:{enter:this.setHeight,"after-enter":this.unsetHeight,"before-leave":this.setHeight}},[this._t("default")],2)}),[],!1,null,null,null);e.default=o.exports},249:function(t,e,n){"use strict";n(246)}}]); \ No newline at end of file diff --git a/docs/.vuepress/dist/assets/js/22.90205bc8.js b/docs/.vuepress/dist/assets/js/22.90205bc8.js new file mode 100644 index 00000000..17d1d432 --- /dev/null +++ b/docs/.vuepress/dist/assets/js/22.90205bc8.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[22],{264:function(t,c,n){},276:function(t,c,n){"use strict";n(264)},287:function(t,c,n){"use strict";n.r(c);n(276);var i=n(10),s=Object(i.a)({},(function(){var t=this,c=t._self._c;return c("div",{staticClass:"sidebar-button",on:{click:function(c){return t.$emit("toggle-sidebar")}}},[c("svg",{staticClass:"icon",attrs:{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",role:"img",viewBox:"0 0 448 512"}},[c("path",{attrs:{fill:"currentColor",d:"M436 124H12c-6.627 0-12-5.373-12-12V80c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12z"}})])])}),[],!1,null,null,null);c.default=s.exports}}]); \ No newline at end of file diff --git a/docs/.vuepress/dist/assets/js/23.ccf18d64.js b/docs/.vuepress/dist/assets/js/23.ccf18d64.js new file mode 100644 index 00000000..67514c9f --- /dev/null +++ b/docs/.vuepress/dist/assets/js/23.ccf18d64.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[23],{245:function(t,n,e){"use strict";e.d(n,"d",(function(){return r})),e.d(n,"a",(function(){return s})),e.d(n,"i",(function(){return u})),e.d(n,"f",(function(){return a})),e.d(n,"g",(function(){return l})),e.d(n,"h",(function(){return c})),e.d(n,"b",(function(){return f})),e.d(n,"e",(function(){return h})),e.d(n,"k",(function(){return p})),e.d(n,"l",(function(){return d})),e.d(n,"c",(function(){return b})),e.d(n,"j",(function(){return m}));e(91);const r=/#.*$/,i=/\.(md|html)$/,s=/\/$/,u=/^[a-z]+:/i;function o(t){return decodeURI(t).replace(r,"").replace(i,"")}function a(t){return u.test(t)}function l(t){return/^mailto:/.test(t)}function c(t){return/^tel:/.test(t)}function f(t){if(a(t))return t;const n=t.match(r),e=n?n[0]:"",i=o(t);return s.test(i)?t:i+".html"+e}function h(t,n){const e=decodeURIComponent(t.hash),i=function(t){const n=t.match(r);if(n)return n[0]}(n);if(i&&e!==i)return!1;return o(t.path)===o(n)}function p(t,n,e){if(a(n))return{type:"external",path:n};e&&(n=function(t,n,e){const r=t.charAt(0);if("/"===r)return t;if("?"===r||"#"===r)return n+t;const i=n.split("/");e&&i[i.length-1]||i.pop();const s=t.replace(/^\//,"").split("/");for(let t=0;tfunction t(n,e,r,i=1){if("string"==typeof n)return p(e,n,r);if(Array.isArray(n))return Object.assign(p(e,n[0],r),{title:n[1]});{const s=n.children||[];return 0===s.length&&n.path?Object.assign(p(e,n.path,r),{title:n.title}):{type:"group",path:n.path,title:n.title,sidebarDepth:n.sidebarDepth,initialOpenGroupIndex:n.initialOpenGroupIndex,children:s.map(n=>t(n,e,r,i+1)),collapsable:!1!==n.collapsable}}}(t,i,e)):[]}return[]}function g(t){const n=b(t.headers||[]);return[{type:"group",collapsable:!1,title:t.title,path:null,children:n.map(n=>({type:"auto",title:n.title,basePath:t.path,path:t.path+"#"+n.slug,children:n.children||[]}))}]}function b(t){let n;return(t=t.map(t=>Object.assign({},t))).forEach(t=>{2===t.level?n=t:n&&(n.children||(n.children=[])).push(t)}),t.filter(t=>2===t.level)}function m(t){return Object.assign(t,{type:t.items&&t.items.length?"links":"link"})}},247:function(t,n,e){"use strict";e.r(n);var r=e(245),i={name:"NavLink",props:{item:{required:!0}},computed:{link(){return Object(r.b)(this.item.link)},exact(){return this.$site.locales?Object.keys(this.$site.locales).some(t=>t===this.link):"/"===this.link},isNonHttpURI(){return Object(r.g)(this.link)||Object(r.h)(this.link)},isBlankTarget(){return"_blank"===this.target},isInternal(){return!Object(r.f)(this.link)&&!this.isBlankTarget},target(){return this.isNonHttpURI?null:this.item.target?this.item.target:Object(r.f)(this.link)?"_blank":""},rel(){return this.isNonHttpURI||!1===this.item.rel?null:this.item.rel?this.item.rel:this.isBlankTarget?"noopener noreferrer":null}},methods:{focusoutAction(){this.$emit("focusout")}}},s=e(10),u=Object(s.a)(i,(function(){var t=this,n=t._self._c;return t.isInternal?n("RouterLink",{staticClass:"nav-link",attrs:{to:t.link,exact:t.exact},nativeOn:{focusout:function(n){return t.focusoutAction.apply(null,arguments)}}},[t._v("\n "+t._s(t.item.text)+"\n")]):n("a",{staticClass:"nav-link external",attrs:{href:t.link,target:t.target,rel:t.rel},on:{focusout:t.focusoutAction}},[t._v("\n "+t._s(t.item.text)+"\n "),t.isBlankTarget?n("OutboundLink"):t._e()],1)}),[],!1,null,null,null);n.default=u.exports}}]); \ No newline at end of file diff --git a/docs/.vuepress/dist/assets/js/24.ca58c34f.js b/docs/.vuepress/dist/assets/js/24.ca58c34f.js new file mode 100644 index 00000000..21559ba3 --- /dev/null +++ b/docs/.vuepress/dist/assets/js/24.ca58c34f.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[24],{341:function(t,e,s){"use strict";s.r(e);var r=s(10),n=Object(r.a)({},(function(){var t=this,e=t._self._c;return e("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[e("h1",{attrs:{id:"product-types"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#product-types"}},[t._v("#")]),t._v(" Product types")]),t._v(" "),e("p",[e("strong",[t._v("TOPICS:")]),t._v(" Inventory, Products")]),t._v(" "),e("p",[e("strong",[t._v("CREATED FOR:")])]),t._v(" "),e("ul",[e("li",[t._v("Beginner")]),t._v(" "),e("li",[t._v("Intermediate")]),t._v(" "),e("li",[t._v("Admin")]),t._v(" "),e("li",[t._v("Leader")]),t._v(" "),e("li",[t._v("User")])]),t._v(" "),e("p",[t._v("Inventory Management supports inventory and order management for all product types in Bagisto: simple, configurable, virtual, downloadable, bundle, and grouped. Options and requirements may differ per product type for sources, stocks, and shipping.")]),t._v(" "),e("p",[t._v("Single-source merchants create and update product settings and quantities without requiring additional updates. All created and newly imported products automatically assign to the Default Source and Default Stock, immediately available to customers if enabled and In-Stock.")]),t._v(" "),e("p",[t._v("Multi-source merchants assign sources, quantities per source, and settings during or after product creation. Commerce assigns all newly imported products to the Default Source, requiring additional edits to assign sources and quantities.")]),t._v(" "),e("table",[e("thead",[e("tr",[e("th",[t._v("Product Type")]),t._v(" "),e("th",[t._v("Shipping and Source Selection Algorithm")])])]),t._v(" "),e("tbody",[e("tr",[e("td",[t._v("Simple")]),t._v(" "),e("td",[t._v("Supports SSA recommendations and overrides at shipping.")])]),t._v(" "),e("tr",[e("td",[t._v("Configurable")]),t._v(" "),e("td",[t._v("Supports SSA recommendations and overrides at shipping.")])]),t._v(" "),e("tr",[e("td",[t._v("Virtual")]),t._v(" "),e("td",[t._v("Always uses the SSA recommendation. The system runs the algorithm implicitly when it creates invoices, and always uses the suggested results. You cannot adjust these results.")])]),t._v(" "),e("tr",[e("td",[t._v("Downloadable")]),t._v(" "),e("td",[t._v("Always uses the SSA recommendation. The system runs the algorithm implicitly when it creates invoices, and always uses the suggested results. You cannot adjust these results.")])]),t._v(" "),e("tr",[e("td",[t._v("Bundle")]),t._v(" "),e("td",[t._v("Supports SSA recommendations and overrides at shipping.")])]),t._v(" "),e("tr",[e("td",[t._v("Grouped")]),t._v(" "),e("td",[t._v("Supports SSA recommendations and overrides at shipping.")])])])])])}),[],!1,null,null,null);e.default=n.exports}}]); \ No newline at end of file diff --git a/docs/.vuepress/dist/assets/js/25.97c7788e.js b/docs/.vuepress/dist/assets/js/25.97c7788e.js new file mode 100644 index 00000000..000ab621 --- /dev/null +++ b/docs/.vuepress/dist/assets/js/25.97c7788e.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[25],{343:function(t,e,a){"use strict";a.r(e);var o=a(10),r=Object(o.a)({},(function(){var t=this,e=t._self._c;return e("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[e("h1",{attrs:{id:"downloadable-product"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#downloadable-product"}},[t._v("#")]),t._v(" Downloadable Product")]),t._v(" "),e("p",[t._v('Today, in this document, we will explore "How to Create Downloadable Product in Bagisto 2.0". Downloadable products refer to items that can be downloaded, such as eBooks, software applications, music, updates, games, etc. These products are digital and do not involve a shipping method at checkout.')]),t._v(" "),e("h3",{attrs:{id:"steps-to-create-a-downloadable-product-in-bagisto-2-0"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#steps-to-create-a-downloadable-product-in-bagisto-2-0"}},[t._v("#")]),t._v(" Steps to Create a Downloadable Product in Bagisto 2.0")]),t._v(" "),e("ol",[e("li",[t._v("On the Bagisto admin dashboard, go to Catalog Section >> Products >> select Downloadable under the Product Type.")]),t._v(" "),e("li",[t._v("Select Attribute Family.")]),t._v(" "),e("li",[t._v("Enter SKU (Stock Keeping Unit) of the product, unique to every product.")]),t._v(" "),e("li",[t._v("Save the Product, and you will be redirected to the next page with general settings.")])]),t._v(" "),e("h3",{attrs:{id:"general-settings"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#general-settings"}},[t._v("#")]),t._v(" General Settings")]),t._v(" "),e("ul",[e("li",[e("strong",[t._v("Name:")]),t._v(" Enter the name of the product.")]),t._v(" "),e("li",[e("strong",[t._v("URL Key:")]),t._v(" This will be the end of the URL, e.g., http://bagisto.test.com/products/bagisto-e-book (bagisto-e-book is the URL key).")]),t._v(" "),e("li",[e("strong",[t._v("Tax Category:")]),t._v(" Select the Tax Category from the drop-down list.")])]),t._v(" "),e("h4",{attrs:{id:"new"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#new"}},[t._v("#")]),t._v(" New")]),t._v(" "),e("ul",[e("li",[t._v("Enable the toggle button to feature the product as a new product, shown under the New Products section.")])]),t._v(" "),e("h4",{attrs:{id:"featured"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#featured"}},[t._v("#")]),t._v(" Featured")]),t._v(" "),e("ul",[e("li",[t._v("Enable the toggle button to show the product under the Featured Products section.")])]),t._v(" "),e("h4",{attrs:{id:"visible-individually"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#visible-individually"}},[t._v("#")]),t._v(" Visible Individually")]),t._v(" "),e("ul",[e("li",[t._v("Enable the toggle button to make the product visible on the frontend.")])]),t._v(" "),e("h4",{attrs:{id:"status"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#status"}},[t._v("#")]),t._v(" Status")]),t._v(" "),e("ul",[e("li",[t._v("Enable the toggle button to enable the product on your eCommerce store.")])]),t._v(" "),e("h3",{attrs:{id:"description"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#description"}},[t._v("#")]),t._v(" Description")]),t._v(" "),e("p",[t._v("Fill in the following fields under the description:")]),t._v(" "),e("ul",[e("li",[e("strong",[t._v("Short Description:")]),t._v(" Enter a brief description of the product feature.")]),t._v(" "),e("li",[e("strong",[t._v("Description:")]),t._v(" Mention your product in detail.")])]),t._v(" "),e("h3",{attrs:{id:"meta-description"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#meta-description"}},[t._v("#")]),t._v(" Meta Description")]),t._v(" "),e("p",[t._v("Fill in the following fields under meta description for improved searchability on search engines:")]),t._v(" "),e("ul",[e("li",[e("strong",[t._v("Meta Title:")]),t._v(" Provide the main title of the product.")]),t._v(" "),e("li",[e("strong",[t._v("Meta Keyword:")]),t._v(" Provide meta keywords for specific search engine optimization.")]),t._v(" "),e("li",[e("strong",[t._v("Meta Description:")]),t._v(" Enter a description for better search engine listings.")])]),t._v(" "),e("h3",{attrs:{id:"price"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#price"}},[t._v("#")]),t._v(" Price")]),t._v(" "),e("p",[t._v("Insert the price, cost, and special price. Set the special price date for which the special price will be shown on the website.")]),t._v(" "),e("h3",{attrs:{id:"images"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#images"}},[t._v("#")]),t._v(" Images")]),t._v(" "),e("p",[t._v("To add product images, click on Add Images. You can add multiple images for your product.")]),t._v(" "),e("h3",{attrs:{id:"downloadable-information"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#downloadable-information"}},[t._v("#")]),t._v(" Downloadable Information")]),t._v(" "),e("p",[t._v("Here, enter the downloadable information about your product:")]),t._v(" "),e("ul",[e("li",[e("strong",[t._v("Name:")]),t._v(" Enter the name of your downloadable product.")]),t._v(" "),e("li",[e("strong",[t._v("Price:")]),t._v(" Enter the price of the downloadable product.")]),t._v(" "),e("li",[e("strong",[t._v("File:")]),t._v(" Attach the file.\n"),e("ul",[e("li",[e("strong",[t._v("Upload File:")]),t._v(" Upload the file.")]),t._v(" "),e("li",[e("strong",[t._v("Insert URL:")]),t._v(" Insert the URL.")])])]),t._v(" "),e("li",[e("strong",[t._v("Sample:")]),t._v(" Insert URL/upload file to give a free sample.")]),t._v(" "),e("li",[e("strong",[t._v("Download Allow:")]),t._v(' Specify the maximum number of downloads. Enter "0" for unlimited downloads.')])]),t._v(" "),e("h3",{attrs:{id:"samples"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#samples"}},[t._v("#")]),t._v(" Samples")]),t._v(" "),e("p",[t._v("If you want to provide a free sample of your product, add a new link from the Samples section below the Links section. Enter the title and attach the sample file.")]),t._v(" "),e("h3",{attrs:{id:"product-at-front-end"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#product-at-front-end"}},[t._v("#")]),t._v(" Product At Front End")]),t._v(" "),e("p",[t._v("The downloadable product will be visible at the front end.")]),t._v(" "),e("p",[t._v("Thanks for reading this blog. Please comment below if you have any questions. Also, you can hire Laravel Developers for your custom Laravel projects. If you encounter any issues, feel free to raise a ticket at our Support Portal.")])])}),[],!1,null,null,null);e.default=r.exports}}]); \ No newline at end of file diff --git a/docs/.vuepress/dist/assets/js/26.ff11d878.js b/docs/.vuepress/dist/assets/js/26.ff11d878.js new file mode 100644 index 00000000..b5b34c9b --- /dev/null +++ b/docs/.vuepress/dist/assets/js/26.ff11d878.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[26],{348:function(t,e,r){"use strict";r.r(e);var o=r(10),a=Object(o.a)({},(function(){var t=this,e=t._self._c;return e("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[e("h1",{attrs:{id:"grouped-product"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#grouped-product"}},[t._v("#")]),t._v(" Grouped Product")]),t._v(" "),e("p",[t._v("This document guides you on creating a Grouped Product in Bagisto 2.0. A grouped product is a collection of simple products that can be combined in Bagisto. This versatile product type allows you to offer variations of a single product or a group of products as a coordinated set. Each product in a grouped product can be purchased separately or all together as part of the group.")]),t._v(" "),e("h3",{attrs:{id:"steps-to-create-a-grouped-product-in-bagisto-2-0"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#steps-to-create-a-grouped-product-in-bagisto-2-0"}},[t._v("#")]),t._v(" Steps to Create a Grouped Product in Bagisto 2.0")]),t._v(" "),e("ol",[e("li",[t._v("On the Bagisto admin dashboard, go to Catalog Section >> Products >> select Grouped under the Product Type.")]),t._v(" "),e("li",[t._v("Select Attribute Family >> enter SKU >> Click to Save Product.")]),t._v(" "),e("li",[t._v("Enter the SKU (Stock Keeping Unit) of the product, unique to every product.")])]),t._v(" "),e("p",[t._v("After clicking on the Save Product button, you will be redirected to the next page with several new settings as shown in the below image.")]),t._v(" "),e("h3",{attrs:{id:"general-settings"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#general-settings"}},[t._v("#")]),t._v(" General Settings")]),t._v(" "),e("ul",[e("li",[e("strong",[t._v("Name:")]),t._v(" Enter the name of the product.")]),t._v(" "),e("li",[e("strong",[t._v("URL Key:")]),t._v(" This will be the end of the URL, e.g., http://bagisto.test.com/products/set-of-men-casual-wear (set-of-men-casual-wear is a URL key).")]),t._v(" "),e("li",[e("strong",[t._v("Tax Category:")]),t._v(" Select the Tax Category from the dropdown list.")])]),t._v(" "),e("h4",{attrs:{id:"new"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#new"}},[t._v("#")]),t._v(" New")]),t._v(" "),e("ul",[e("li",[t._v("Enable the toggle button to feature the product as a new product, shown under the New Products section.")])]),t._v(" "),e("h4",{attrs:{id:"featured"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#featured"}},[t._v("#")]),t._v(" Featured")]),t._v(" "),e("ul",[e("li",[t._v("Enable the toggle button to show the product under the Featured Products section.")])]),t._v(" "),e("h4",{attrs:{id:"visible-individually"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#visible-individually"}},[t._v("#")]),t._v(" Visible Individually")]),t._v(" "),e("ul",[e("li",[t._v("Enable the toggle button to make the product visible on the frontend.")])]),t._v(" "),e("h4",{attrs:{id:"status"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#status"}},[t._v("#")]),t._v(" Status")]),t._v(" "),e("ul",[e("li",[t._v("Enable the toggle button to enable the product on your eCommerce store.")])]),t._v(" "),e("h4",{attrs:{id:"guest-checkout"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#guest-checkout"}},[t._v("#")]),t._v(" Guest Checkout")]),t._v(" "),e("ul",[e("li",[t._v("Enable the toggle button to allow the product to be ordered by guest customers.")])]),t._v(" "),e("h3",{attrs:{id:"price"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#price"}},[t._v("#")]),t._v(" Price")]),t._v(" "),e("ul",[e("li",[t._v("Insert the price, cost, and special price. Set the special price date for which the special price will be shown on the website.")])]),t._v(" "),e("h3",{attrs:{id:"description"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#description"}},[t._v("#")]),t._v(" Description")]),t._v(" "),e("p",[t._v("Fill in the following fields under the description:")]),t._v(" "),e("ul",[e("li",[e("strong",[t._v("Short Description:")]),t._v(" Enter a short description of the product feature.")]),t._v(" "),e("li",[e("strong",[t._v("Description:")]),t._v(" Mention your product in detail.")])]),t._v(" "),e("h3",{attrs:{id:"meta-description"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#meta-description"}},[t._v("#")]),t._v(" Meta Description")]),t._v(" "),e("p",[t._v("Fill in the following fields under meta description for improved searchability on search engines:")]),t._v(" "),e("ul",[e("li",[e("strong",[t._v("Meta Title:")]),t._v(" Provide the main title of the product.")]),t._v(" "),e("li",[e("strong",[t._v("Meta Keyword:")]),t._v(" Provide meta keywords for specific search engine optimization.")]),t._v(" "),e("li",[e("strong",[t._v("Meta Description:")]),t._v(" Enter a description for better search engine listings.")])]),t._v(" "),e("h3",{attrs:{id:"images"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#images"}},[t._v("#")]),t._v(" Images")]),t._v(" "),e("p",[t._v("To add product images, click on Add Images. You can add multiple images for your product.")]),t._v(" "),e("h3",{attrs:{id:"grouped-products"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#grouped-products"}},[t._v("#")]),t._v(" Grouped Products")]),t._v(" "),e("h4",{attrs:{id:"search-products"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#search-products"}},[t._v("#")]),t._v(" Search Products")]),t._v(" "),e("p",[t._v("Under this section, you can search for the Simple Products to include in the Grouped Product. Once you've added all the required products to the grouped product, they will be listed.")]),t._v(" "),e("p",[t._v("Here, enter the default quantity (automatically added to the customer's cart), and sort orders to determine the product's appearance on the frontend, as shown in the image below.")]),t._v(" "),e("h3",{attrs:{id:"product-at-front-end"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#product-at-front-end"}},[t._v("#")]),t._v(" Product at Front End")]),t._v(" "),e("p",[t._v("The grouped product will be visible at the front end, as shown in the image below:")]),t._v(" "),e("p",[t._v("Thanks for reading this blog. Please comment below if you have any questions. Also, you can hire Laravel Developers for your custom Laravel projects. If you encounter any issues, feel free to raise a ticket at our Support Portal.")])])}),[],!1,null,null,null);e.default=a.exports}}]); \ No newline at end of file diff --git a/docs/.vuepress/dist/assets/js/27.9d9d11ce.js b/docs/.vuepress/dist/assets/js/27.9d9d11ce.js new file mode 100644 index 00000000..b0170a3c --- /dev/null +++ b/docs/.vuepress/dist/assets/js/27.9d9d11ce.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[27],{347:function(t,n,s){"use strict";s.r(n);var e=s(10),o=Object(e.a)({},(function(){return(0,this._self._c)("ContentSlotsDistributor",{attrs:{"slot-key":this.$parent.slotKey}})}),[],!1,null,null,null);n.default=o.exports}}]); \ No newline at end of file diff --git a/docs/.vuepress/dist/assets/js/28.7b9f99ce.js b/docs/.vuepress/dist/assets/js/28.7b9f99ce.js new file mode 100644 index 00000000..669c7293 --- /dev/null +++ b/docs/.vuepress/dist/assets/js/28.7b9f99ce.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[28],{334:function(n,e,t){"use strict";t.r(e),t.d(e,"register",(function(){return o})),t.d(e,"unregister",(function(){return c}));var r;function o(n,e){void 0===e&&(e={});var t=e.registrationOptions;void 0===t&&(t={}),delete e.registrationOptions;var o=function(n){for(var t=[],r=arguments.length-1;r-- >0;)t[r]=arguments[r+1];e&&e[n]&&e[n].apply(e,t)};"serviceWorker"in navigator&&r.then((function(){Boolean("localhost"===window.location.hostname||"[::1]"===window.location.hostname||window.location.hostname.match(/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/))?(!function(n,e,t){fetch(n).then((function(r){404===r.status?(e("error",new Error("Service worker not found at "+n)),c()):-1===r.headers.get("content-type").indexOf("javascript")?(e("error",new Error("Expected "+n+" to have javascript content-type, but received "+r.headers.get("content-type"))),c()):a(n,e,t)})).catch((function(n){return i(e,n)}))}(n,o,t),navigator.serviceWorker.ready.then((function(n){o("ready",n)})).catch((function(n){return i(o,n)}))):(a(n,o,t),navigator.serviceWorker.ready.then((function(n){o("ready",n)})).catch((function(n){return i(o,n)})))}))}function i(n,e){navigator.onLine||n("offline"),n("error",e)}function a(n,e,t){navigator.serviceWorker.register(n,t).then((function(n){e("registered",n),n.waiting?e("updated",n):n.onupdatefound=function(){e("updatefound",n);var t=n.installing;t.onstatechange=function(){"installed"===t.state&&(navigator.serviceWorker.controller?e("updated",n):e("cached",n))}}})).catch((function(n){return i(e,n)}))}function c(){"serviceWorker"in navigator&&navigator.serviceWorker.ready.then((function(n){n.unregister()})).catch((function(n){return i(emit,n)}))}"undefined"!=typeof window&&(r="undefined"!=typeof Promise?new Promise((function(n){return window.addEventListener("load",n)})):{then:function(n){return window.addEventListener("load",n)}})}}]); \ No newline at end of file diff --git a/docs/.vuepress/dist/assets/js/3.63669f64.js b/docs/.vuepress/dist/assets/js/3.63669f64.js new file mode 100644 index 00000000..a86a17d2 --- /dev/null +++ b/docs/.vuepress/dist/assets/js/3.63669f64.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[3,20,21],{245:function(t,e,n){"use strict";n.d(e,"d",(function(){return r})),n.d(e,"a",(function(){return s})),n.d(e,"i",(function(){return a})),n.d(e,"f",(function(){return l})),n.d(e,"g",(function(){return u})),n.d(e,"h",(function(){return c})),n.d(e,"b",(function(){return p})),n.d(e,"e",(function(){return d})),n.d(e,"k",(function(){return h})),n.d(e,"l",(function(){return f})),n.d(e,"c",(function(){return g})),n.d(e,"j",(function(){return m}));n(91);const r=/#.*$/,i=/\.(md|html)$/,s=/\/$/,a=/^[a-z]+:/i;function o(t){return decodeURI(t).replace(r,"").replace(i,"")}function l(t){return a.test(t)}function u(t){return/^mailto:/.test(t)}function c(t){return/^tel:/.test(t)}function p(t){if(l(t))return t;const e=t.match(r),n=e?e[0]:"",i=o(t);return s.test(i)?t:i+".html"+n}function d(t,e){const n=decodeURIComponent(t.hash),i=function(t){const e=t.match(r);if(e)return e[0]}(e);if(i&&n!==i)return!1;return o(t.path)===o(e)}function h(t,e,n){if(l(e))return{type:"external",path:e};n&&(e=function(t,e,n){const r=t.charAt(0);if("/"===r)return t;if("?"===r||"#"===r)return e+t;const i=e.split("/");n&&i[i.length-1]||i.pop();const s=t.replace(/^\//,"").split("/");for(let t=0;tfunction t(e,n,r,i=1){if("string"==typeof e)return h(n,e,r);if(Array.isArray(e))return Object.assign(h(n,e[0],r),{title:e[1]});{const s=e.children||[];return 0===s.length&&e.path?Object.assign(h(n,e.path,r),{title:e.title}):{type:"group",path:e.path,title:e.title,sidebarDepth:e.sidebarDepth,initialOpenGroupIndex:e.initialOpenGroupIndex,children:s.map(e=>t(e,n,r,i+1)),collapsable:!1!==e.collapsable}}}(t,i,n)):[]}return[]}function b(t){const e=g(t.headers||[]);return[{type:"group",collapsable:!1,title:t.title,path:null,children:e.map(e=>({type:"auto",title:e.title,basePath:t.path,path:t.path+"#"+e.slug,children:e.children||[]}))}]}function g(t){let e;return(t=t.map(t=>Object.assign({},t))).forEach(t=>{2===t.level?e=t:e&&(e.children||(e.children=[])).push(t)}),t.filter(t=>2===t.level)}function m(t){return Object.assign(t,{type:t.items&&t.items.length?"links":"link"})}},246:function(t,e,n){},248:function(t,e,n){"use strict";n.r(e);var r={name:"DropdownTransition",methods:{setHeight(t){t.style.height=t.scrollHeight+"px"},unsetHeight(t){t.style.height=""}}},i=(n(249),n(10)),s=Object(i.a)(r,(function(){return(0,this._self._c)("transition",{attrs:{name:"dropdown"},on:{enter:this.setHeight,"after-enter":this.unsetHeight,"before-leave":this.setHeight}},[this._t("default")],2)}),[],!1,null,null,null);e.default=s.exports},249:function(t,e,n){"use strict";n(246)},251:function(t,e,n){},256:function(t,e,n){},258:function(t,e,n){"use strict";n(251)},259:function(t,e,n){"use strict";n.r(e);var r=n(272),i=n(261),s=n(245);function a(t,e){return"group"===e.type&&e.children.some(e=>"group"===e.type?a(t,e):"page"===e.type&&Object(s.e)(t,e.path))}var o={name:"SidebarLinks",components:{SidebarGroup:r.default,SidebarLink:i.default},props:["items","depth","sidebarDepth","initialOpenGroupIndex"],data(){return{openGroupIndex:this.initialOpenGroupIndex||0}},watch:{$route(){this.refreshIndex()}},created(){this.refreshIndex()},methods:{refreshIndex(){const t=function(t,e){for(let n=0;n-1&&(this.openGroupIndex=t)},toggleGroup(t){this.openGroupIndex=t===this.openGroupIndex?-1:t},isActive(t){return Object(s.e)(this.$route,t.regularPath)}}},l=n(10),u=Object(l.a)(o,(function(){var t=this,e=t._self._c;return t.items.length?e("ul",{staticClass:"sidebar-links"},t._l(t.items,(function(n,r){return e("li",{key:r},["group"===n.type?e("SidebarGroup",{attrs:{item:n,open:r===t.openGroupIndex,collapsable:n.collapsable||n.collapsible,depth:t.depth},on:{toggle:function(e){return t.toggleGroup(r)}}}):e("SidebarLink",{attrs:{"sidebar-depth":t.sidebarDepth,item:n}})],1)})),0):t._e()}),[],!1,null,null,null);e.default=u.exports},261:function(t,e,n){"use strict";n.r(e);var r=n(245);function i(t,e,n,r,i){const s={props:{to:e,activeClass:"",exactActiveClass:""},class:{active:r,"sidebar-link":!0}};return i>2&&(s.style={"padding-left":i+"rem"}),t("RouterLink",s,n)}function s(t,e,n,a,o,l=1){return!e||l>o?null:t("ul",{class:"sidebar-sub-headers"},e.map(e=>{const u=Object(r.e)(a,n+"#"+e.slug);return t("li",{class:"sidebar-sub-header"},[i(t,n+"#"+e.slug,e.title,u,e.level-1),s(t,e.children,n,a,o,l+1)])}))}var a={functional:!0,props:["item","sidebarDepth"],render(t,{parent:{$page:e,$site:n,$route:a,$themeConfig:o,$themeLocaleConfig:l},props:{item:u,sidebarDepth:c}}){const p=Object(r.e)(a,u.path),d="auto"===u.type?p||u.children.some(t=>Object(r.e)(a,u.basePath+"#"+t.slug)):p,h="external"===u.type?function(t,e,n){return t("a",{attrs:{href:e,target:"_blank",rel:"noopener noreferrer"},class:{"sidebar-link":!0}},[n,t("OutboundLink")])}(t,u.path,u.title||u.path):i(t,u.path,u.title||u.path,d),f=[e.frontmatter.sidebarDepth,c,l.sidebarDepth,o.sidebarDepth,1].find(t=>void 0!==t),b=l.displayAllHeaders||o.displayAllHeaders;if("auto"===u.type)return[h,s(t,u.children,u.basePath,a,f)];if((d||b)&&u.headers&&!r.d.test(u.path)){return[h,s(t,Object(r.c)(u.headers),u.path,a,f)]}return h}},o=(n(258),n(10)),l=Object(o.a)(a,void 0,void 0,!1,null,null,null);e.default=l.exports},269:function(t,e,n){"use strict";n(256)},272:function(t,e,n){"use strict";n.r(e);var r=n(245),i={name:"SidebarGroup",components:{DropdownTransition:n(248).default},props:["item","open","collapsable","depth"],beforeCreate(){this.$options.components.SidebarLinks=n(259).default},methods:{isActive:r.e}},s=(n(269),n(10)),a=Object(s.a)(i,(function(){var t=this,e=t._self._c;return e("section",{staticClass:"sidebar-group",class:[{collapsable:t.collapsable,"is-sub-group":0!==t.depth},"depth-"+t.depth]},[t.item.path?e("RouterLink",{staticClass:"sidebar-heading clickable",class:{open:t.open,active:t.isActive(t.$route,t.item.path)},attrs:{to:t.item.path},nativeOn:{click:function(e){return t.$emit("toggle")}}},[e("span",[t._v(t._s(t.item.title))]),t._v(" "),t.collapsable?e("span",{staticClass:"arrow",class:t.open?"down":"right"}):t._e()]):e("p",{staticClass:"sidebar-heading",class:{open:t.open},on:{click:function(e){return t.$emit("toggle")}}},[e("span",[t._v(t._s(t.item.title))]),t._v(" "),t.collapsable?e("span",{staticClass:"arrow",class:t.open?"down":"right"}):t._e()]),t._v(" "),e("DropdownTransition",[t.open||!t.collapsable?e("SidebarLinks",{staticClass:"sidebar-group-items",attrs:{items:t.item.children,"sidebar-depth":t.item.sidebarDepth,"initial-open-group-index":t.item.initialOpenGroupIndex,depth:t.depth+1}}):t._e()],1)],1)}),[],!1,null,null,null);e.default=a.exports}}]); \ No newline at end of file diff --git a/docs/.vuepress/dist/assets/js/4.4ac0bcc1.js b/docs/.vuepress/dist/assets/js/4.4ac0bcc1.js new file mode 100644 index 00000000..11234520 --- /dev/null +++ b/docs/.vuepress/dist/assets/js/4.4ac0bcc1.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[4],{283:function(t,e,n){},295:function(t,e,n){"use strict";n(283)},340:function(t,e,n){"use strict";n.r(e);var i={functional:!0,props:{type:{type:String,default:"tip"},text:String,vertical:{type:String,default:"top"}},render:(t,{props:e,slots:n})=>t("span",{class:["badge",e.type],style:{verticalAlign:e.vertical}},e.text||n().default)},p=(n(295),n(10)),l=Object(p.a)(i,void 0,void 0,!1,null,"6eb0829b",null);e.default=l.exports}}]); \ No newline at end of file diff --git a/docs/.vuepress/dist/assets/js/5.07da705c.js b/docs/.vuepress/dist/assets/js/5.07da705c.js new file mode 100644 index 00000000..1637456c --- /dev/null +++ b/docs/.vuepress/dist/assets/js/5.07da705c.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[5],{338:function(t,e,s){"use strict";s.r(e);const o=["There's nothing here.","How did we get here?","That's a Four-Oh-Four.","Looks like we've got some broken links."];var n={methods:{getMsg:()=>o[Math.floor(Math.random()*o.length)]}},h=s(10),i=Object(h.a)(n,(function(){var t=this._self._c;return t("div",{staticClass:"theme-container"},[t("div",{staticClass:"theme-default-content"},[t("h1",[this._v("404")]),this._v(" "),t("blockquote",[this._v(this._s(this.getMsg()))]),this._v(" "),t("RouterLink",{attrs:{to:"/"}},[this._v("\n Take me home.\n ")])],1)])}),[],!1,null,null,null);e.default=i.exports}}]); \ No newline at end of file diff --git a/docs/.vuepress/dist/assets/js/8.29c8b4a7.js b/docs/.vuepress/dist/assets/js/8.29c8b4a7.js new file mode 100644 index 00000000..e9a40469 --- /dev/null +++ b/docs/.vuepress/dist/assets/js/8.29c8b4a7.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[8,3,10,16,20,21,23],{245:function(t,e,n){"use strict";n.d(e,"d",(function(){return i})),n.d(e,"a",(function(){return r})),n.d(e,"i",(function(){return a})),n.d(e,"f",(function(){return l})),n.d(e,"g",(function(){return u})),n.d(e,"h",(function(){return c})),n.d(e,"b",(function(){return p})),n.d(e,"e",(function(){return h})),n.d(e,"k",(function(){return d})),n.d(e,"l",(function(){return f})),n.d(e,"c",(function(){return b})),n.d(e,"j",(function(){return g}));n(91);const i=/#.*$/,s=/\.(md|html)$/,r=/\/$/,a=/^[a-z]+:/i;function o(t){return decodeURI(t).replace(i,"").replace(s,"")}function l(t){return a.test(t)}function u(t){return/^mailto:/.test(t)}function c(t){return/^tel:/.test(t)}function p(t){if(l(t))return t;const e=t.match(i),n=e?e[0]:"",s=o(t);return r.test(s)?t:s+".html"+n}function h(t,e){const n=decodeURIComponent(t.hash),s=function(t){const e=t.match(i);if(e)return e[0]}(e);if(s&&n!==s)return!1;return o(t.path)===o(e)}function d(t,e,n){if(l(e))return{type:"external",path:e};n&&(e=function(t,e,n){const i=t.charAt(0);if("/"===i)return t;if("?"===i||"#"===i)return e+t;const s=e.split("/");n&&s[s.length-1]||s.pop();const r=t.replace(/^\//,"").split("/");for(let t=0;tfunction t(e,n,i,s=1){if("string"==typeof e)return d(n,e,i);if(Array.isArray(e))return Object.assign(d(n,e[0],i),{title:e[1]});{const r=e.children||[];return 0===r.length&&e.path?Object.assign(d(n,e.path,i),{title:e.title}):{type:"group",path:e.path,title:e.title,sidebarDepth:e.sidebarDepth,initialOpenGroupIndex:e.initialOpenGroupIndex,children:r.map(e=>t(e,n,i,s+1)),collapsable:!1!==e.collapsable}}}(t,s,n)):[]}return[]}function m(t){const e=b(t.headers||[]);return[{type:"group",collapsable:!1,title:t.title,path:null,children:e.map(e=>({type:"auto",title:e.title,basePath:t.path,path:t.path+"#"+e.slug,children:e.children||[]}))}]}function b(t){let e;return(t=t.map(t=>Object.assign({},t))).forEach(t=>{2===t.level?e=t:e&&(e.children||(e.children=[])).push(t)}),t.filter(t=>2===t.level)}function g(t){return Object.assign(t,{type:t.items&&t.items.length?"links":"link"})}},246:function(t,e,n){},247:function(t,e,n){"use strict";n.r(e);var i=n(245),s={name:"NavLink",props:{item:{required:!0}},computed:{link(){return Object(i.b)(this.item.link)},exact(){return this.$site.locales?Object.keys(this.$site.locales).some(t=>t===this.link):"/"===this.link},isNonHttpURI(){return Object(i.g)(this.link)||Object(i.h)(this.link)},isBlankTarget(){return"_blank"===this.target},isInternal(){return!Object(i.f)(this.link)&&!this.isBlankTarget},target(){return this.isNonHttpURI?null:this.item.target?this.item.target:Object(i.f)(this.link)?"_blank":""},rel(){return this.isNonHttpURI||!1===this.item.rel?null:this.item.rel?this.item.rel:this.isBlankTarget?"noopener noreferrer":null}},methods:{focusoutAction(){this.$emit("focusout")}}},r=n(10),a=Object(r.a)(s,(function(){var t=this,e=t._self._c;return t.isInternal?e("RouterLink",{staticClass:"nav-link",attrs:{to:t.link,exact:t.exact},nativeOn:{focusout:function(e){return t.focusoutAction.apply(null,arguments)}}},[t._v("\n "+t._s(t.item.text)+"\n")]):e("a",{staticClass:"nav-link external",attrs:{href:t.link,target:t.target,rel:t.rel},on:{focusout:t.focusoutAction}},[t._v("\n "+t._s(t.item.text)+"\n "),t.isBlankTarget?e("OutboundLink"):t._e()],1)}),[],!1,null,null,null);e.default=a.exports},248:function(t,e,n){"use strict";n.r(e);var i={name:"DropdownTransition",methods:{setHeight(t){t.style.height=t.scrollHeight+"px"},unsetHeight(t){t.style.height=""}}},s=(n(249),n(10)),r=Object(s.a)(i,(function(){return(0,this._self._c)("transition",{attrs:{name:"dropdown"},on:{enter:this.setHeight,"after-enter":this.unsetHeight,"before-leave":this.setHeight}},[this._t("default")],2)}),[],!1,null,null,null);e.default=r.exports},249:function(t,e,n){"use strict";n(246)},250:function(t,e,n){},251:function(t,e,n){},253:function(t,e,n){},256:function(t,e,n){},257:function(t,e,n){"use strict";n(250)},258:function(t,e,n){"use strict";n(251)},259:function(t,e,n){"use strict";n.r(e);var i=n(272),s=n(261),r=n(245);function a(t,e){return"group"===e.type&&e.children.some(e=>"group"===e.type?a(t,e):"page"===e.type&&Object(r.e)(t,e.path))}var o={name:"SidebarLinks",components:{SidebarGroup:i.default,SidebarLink:s.default},props:["items","depth","sidebarDepth","initialOpenGroupIndex"],data(){return{openGroupIndex:this.initialOpenGroupIndex||0}},watch:{$route(){this.refreshIndex()}},created(){this.refreshIndex()},methods:{refreshIndex(){const t=function(t,e){for(let n=0;n-1&&(this.openGroupIndex=t)},toggleGroup(t){this.openGroupIndex=t===this.openGroupIndex?-1:t},isActive(t){return Object(r.e)(this.$route,t.regularPath)}}},l=n(10),u=Object(l.a)(o,(function(){var t=this,e=t._self._c;return t.items.length?e("ul",{staticClass:"sidebar-links"},t._l(t.items,(function(n,i){return e("li",{key:i},["group"===n.type?e("SidebarGroup",{attrs:{item:n,open:i===t.openGroupIndex,collapsable:n.collapsable||n.collapsible,depth:t.depth},on:{toggle:function(e){return t.toggleGroup(i)}}}):e("SidebarLink",{attrs:{"sidebar-depth":t.sidebarDepth,item:n}})],1)})),0):t._e()}),[],!1,null,null,null);e.default=u.exports},260:function(t,e,n){"use strict";n.r(e);var i=n(247),s=n(248),r=n(92),a=n.n(r),o={name:"DropdownLink",components:{NavLink:i.default,DropdownTransition:s.default},props:{item:{required:!0}},data:()=>({open:!1}),computed:{dropdownAriaLabel(){return this.item.ariaLabel||this.item.text}},watch:{$route(){this.open=!1}},methods:{setOpen(t){this.open=t},isLastItemOfArray:(t,e)=>a()(e)===t,handleDropdown(){0===event.detail&&this.setOpen(!this.open)}}},l=(n(257),n(10)),u=Object(l.a)(o,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"dropdown-wrapper",class:{open:t.open}},[e("button",{staticClass:"dropdown-title",attrs:{type:"button","aria-label":t.dropdownAriaLabel},on:{click:t.handleDropdown}},[e("span",{staticClass:"title"},[t._v(t._s(t.item.text))]),t._v(" "),e("span",{staticClass:"arrow down"})]),t._v(" "),e("button",{staticClass:"mobile-dropdown-title",attrs:{type:"button","aria-label":t.dropdownAriaLabel},on:{click:function(e){return t.setOpen(!t.open)}}},[e("span",{staticClass:"title"},[t._v(t._s(t.item.text))]),t._v(" "),e("span",{staticClass:"arrow",class:t.open?"down":"right"})]),t._v(" "),e("DropdownTransition",[e("ul",{directives:[{name:"show",rawName:"v-show",value:t.open,expression:"open"}],staticClass:"nav-dropdown"},t._l(t.item.items,(function(n,i){return e("li",{key:n.link||i,staticClass:"dropdown-item"},["links"===n.type?e("h4",[t._v("\n "+t._s(n.text)+"\n ")]):t._e(),t._v(" "),"links"===n.type?e("ul",{staticClass:"dropdown-subitem-wrapper"},t._l(n.items,(function(i){return e("li",{key:i.link,staticClass:"dropdown-subitem"},[e("NavLink",{attrs:{item:i},on:{focusout:function(e){t.isLastItemOfArray(i,n.items)&&t.isLastItemOfArray(n,t.item.items)&&t.setOpen(!1)}}})],1)})),0):e("NavLink",{attrs:{item:n},on:{focusout:function(e){t.isLastItemOfArray(n,t.item.items)&&t.setOpen(!1)}}})],1)})),0)])],1)}),[],!1,null,null,null);e.default=u.exports},261:function(t,e,n){"use strict";n.r(e);var i=n(245);function s(t,e,n,i,s){const r={props:{to:e,activeClass:"",exactActiveClass:""},class:{active:i,"sidebar-link":!0}};return s>2&&(r.style={"padding-left":s+"rem"}),t("RouterLink",r,n)}function r(t,e,n,a,o,l=1){return!e||l>o?null:t("ul",{class:"sidebar-sub-headers"},e.map(e=>{const u=Object(i.e)(a,n+"#"+e.slug);return t("li",{class:"sidebar-sub-header"},[s(t,n+"#"+e.slug,e.title,u,e.level-1),r(t,e.children,n,a,o,l+1)])}))}var a={functional:!0,props:["item","sidebarDepth"],render(t,{parent:{$page:e,$site:n,$route:a,$themeConfig:o,$themeLocaleConfig:l},props:{item:u,sidebarDepth:c}}){const p=Object(i.e)(a,u.path),h="auto"===u.type?p||u.children.some(t=>Object(i.e)(a,u.basePath+"#"+t.slug)):p,d="external"===u.type?function(t,e,n){return t("a",{attrs:{href:e,target:"_blank",rel:"noopener noreferrer"},class:{"sidebar-link":!0}},[n,t("OutboundLink")])}(t,u.path,u.title||u.path):s(t,u.path,u.title||u.path,h),f=[e.frontmatter.sidebarDepth,c,l.sidebarDepth,o.sidebarDepth,1].find(t=>void 0!==t),m=l.displayAllHeaders||o.displayAllHeaders;if("auto"===u.type)return[d,r(t,u.children,u.basePath,a,f)];if((h||m)&&u.headers&&!i.d.test(u.path)){return[d,r(t,Object(i.c)(u.headers),u.path,a,f)]}return d}},o=(n(258),n(10)),l=Object(o.a)(a,void 0,void 0,!1,null,null,null);e.default=l.exports},263:function(t,e,n){"use strict";n(253)},269:function(t,e,n){"use strict";n(256)},270:function(t,e,n){},271:function(t,e,n){"use strict";n.r(e);n(91);var i=n(260),s=n(245),r={name:"NavLinks",components:{NavLink:n(247).default,DropdownLink:i.default},data:()=>({version:"2.x"}),computed:{userNav(){return this.$themeLocaleConfig.nav||this.$site.themeConfig.nav||[]},nav(){const{locales:t}=this.$site;if(t&&Object.keys(t).length>1){const e=this.$page.path,n=this.$router.options.routes,i=this.$site.themeConfig.locales||{},s={text:this.$themeLocaleConfig.selectText||"Languages",ariaLabel:this.$themeLocaleConfig.ariaLabel||"Select language",items:Object.keys(t).map(s=>{const r=t[s],a=i[s]&&i[s].label||r.lang;let o;return r.lang===this.$lang?o=e:(o=e.replace(this.$localeConfig.path,s),n.some(t=>t.path===o)||(o=s)),{text:a,link:o}})};return[...this.userNav,s]}return this.userNav},userLinks(){return(this.nav||[]).map(t=>Object.assign(Object(s.j)(t),{items:(t.items||[]).map(s.j)}))},repoLink(){const{repo:t}=this.$site.themeConfig;return t?/^https?:/.test(t)?t:"https://github.com/"+t:null},repoLabel(){if(!this.repoLink)return;if(this.$site.themeConfig.repoLabel)return this.$site.themeConfig.repoLabel;const t=this.repoLink.match(/^https?:\/\/[^/]+/)[0],e=["GitHub","GitLab","Bitbucket"];for(let n=0;nfunction t(e,n,r,i=1){if("string"==typeof e)return d(n,e,r);if(Array.isArray(e))return Object.assign(d(n,e[0],r),{title:e[1]});{const a=e.children||[];return 0===a.length&&e.path?Object.assign(d(n,e.path,r),{title:e.title}):{type:"group",path:e.path,title:e.title,sidebarDepth:e.sidebarDepth,initialOpenGroupIndex:e.initialOpenGroupIndex,children:a.map(e=>t(e,n,r,i+1)),collapsable:!1!==e.collapsable}}}(t,i,n)):[]}return[]}function g(t){const e=v(t.headers||[]);return[{type:"group",collapsable:!1,title:t.title,path:null,children:e.map(e=>({type:"auto",title:e.title,basePath:t.path,path:t.path+"#"+e.slug,children:e.children||[]}))}]}function v(t){let e;return(t=t.map(t=>Object.assign({},t))).forEach(t=>{2===t.level?e=t:e&&(e.children||(e.children=[])).push(t)}),t.filter(t=>2===t.level)}function m(t){return Object.assign(t,{type:t.items&&t.items.length?"links":"link"})}},252:function(t,e){t.exports=function(t){return null==t}},254:function(t,e,n){},255:function(t,e,n){},265:function(t,e,n){"use strict";n(254)},266:function(t,e,n){var r=n(12),i=n(4),a=n(11);t.exports=function(t){return"string"==typeof t||!i(t)&&a(t)&&"[object String]"==r(t)}},267:function(t,e,n){"use strict";n(255)},268:function(t,e,n){},273:function(t,e,n){"use strict";n.r(e);var r=n(252),i=n.n(r),a=n(245),s={name:"PageEdit",computed:{lastUpdated(){return this.$page.lastUpdated},lastUpdatedText(){return"string"==typeof this.$themeLocaleConfig.lastUpdated?this.$themeLocaleConfig.lastUpdated:"string"==typeof this.$site.themeConfig.lastUpdated?this.$site.themeConfig.lastUpdated:"Last Updated"},editLink(){const t=i()(this.$page.frontmatter.editLink)?this.$site.themeConfig.editLinks:this.$page.frontmatter.editLink,{repo:e,docsDir:n="",docsBranch:r="master",docsRepo:a=e}=this.$site.themeConfig;return t&&a&&this.$page.relativePath?this.createEditLink(e,a,n,r,this.$page.relativePath):null},editLinkText(){return this.$themeLocaleConfig.editLinkText||this.$site.themeConfig.editLinkText||"Edit this page"}},methods:{createEditLink(t,e,n,r,i){if(/bitbucket.org/.test(e)){return e.replace(a.a,"")+"/src"+`/${r}/`+(n?n.replace(a.a,"")+"/":"")+i+`?mode=edit&spa=0&at=${r}&fileviewer=file-view-default`}if(/gitlab.com/.test(e)){return e.replace(a.a,"")+"/-/edit"+`/${r}/`+(n?n.replace(a.a,"")+"/":"")+i}return(a.i.test(e)?e:"https://github.com/"+e).replace(a.a,"")+"/edit"+`/${r}/`+(n?n.replace(a.a,"")+"/":"")+i}}},o=(n(265),n(10)),u=Object(o.a)(s,(function(){var t=this,e=t._self._c;return e("footer",{staticClass:"page-edit"},[t.editLink?e("div",{staticClass:"edit-link"},[e("a",{attrs:{href:t.editLink,target:"_blank",rel:"noopener noreferrer"}},[t._v(t._s(t.editLinkText))]),t._v(" "),e("OutboundLink")],1):t._e(),t._v(" "),t.lastUpdated?e("div",{staticClass:"last-updated"},[e("span",{staticClass:"prefix"},[t._v(t._s(t.lastUpdatedText)+":")]),t._v(" "),e("span",{staticClass:"time"},[t._v(t._s(t.lastUpdated))])]):t._e()])}),[],!1,null,null,null);e.default=u.exports},274:function(t,e,n){"use strict";n.r(e);n(91);var r=n(245),i=n(266),a=n.n(i),s=n(252),o=n.n(s),u={name:"PageNav",props:["sidebarItems"],computed:{prev(){return l(c.PREV,this)},next(){return l(c.NEXT,this)}}};const c={NEXT:{resolveLink:function(t,e){return p(t,e,1)},getThemeLinkConfig:({nextLinks:t})=>t,getPageLinkConfig:({frontmatter:t})=>t.next},PREV:{resolveLink:function(t,e){return p(t,e,-1)},getThemeLinkConfig:({prevLinks:t})=>t,getPageLinkConfig:({frontmatter:t})=>t.prev}};function l(t,{$themeConfig:e,$page:n,$route:i,$site:s,sidebarItems:u}){const{resolveLink:c,getThemeLinkConfig:l,getPageLinkConfig:p}=t,f=l(e),d=p(n),h=o()(d)?f:d;return!1===h?void 0:a()(h)?Object(r.k)(s.pages,h,i.path):c(n,u)}function p(t,e,n){const r=[];!function t(e,n){for(let r=0,i=e.length;r=e||n<0||m&&t-u>=i}function x(){var t=d();if(_(t))return w(t);s=setTimeout(x,function(t){var n=e-(t-c);return m?p(n,i-(t-u)):n}(t))}function w(t){return s=void 0,y&&r?g(t):(r=o=void 0,a)}function C(){var t=d(),n=_(t);if(r=arguments,o=this,c=t,n){if(void 0===s)return b(c);if(m)return s=setTimeout(x,e),g(c)}return void 0===s&&(s=setTimeout(x,e)),a}return e=v(e)||0,h(n)&&(l=!!n.leading,i=(m="maxWait"in n)?f(v(n.maxWait)||0,e):i,y="trailing"in n?!!n.trailing:y),C.cancel=function(){void 0!==s&&clearTimeout(s),u=0,r=c=o=s=void 0},C.flush=function(){return void 0===s?a:w(d())},C}},function(t,e,n){var r,o; +/* NProgress, (c) 2013, 2014 Rico Sta. Cruz - http://ricostacruz.com/nprogress + * @license MIT */void 0===(o="function"==typeof(r=function(){var t,e,n={version:"0.2.0"},r=n.settings={minimum:.08,easing:"ease",positionUsing:"",speed:200,trickle:!0,trickleRate:.02,trickleSpeed:800,showSpinner:!0,barSelector:'[role="bar"]',spinnerSelector:'[role="spinner"]',parent:"body",template:'
'};function o(t,e,n){return tn?n:t}function i(t){return 100*(-1+t)}n.configure=function(t){var e,n;for(e in t)void 0!==(n=t[e])&&t.hasOwnProperty(e)&&(r[e]=n);return this},n.status=null,n.set=function(t){var e=n.isStarted();t=o(t,r.minimum,1),n.status=1===t?null:t;var c=n.render(!e),u=c.querySelector(r.barSelector),l=r.speed,f=r.easing;return c.offsetWidth,a((function(e){""===r.positionUsing&&(r.positionUsing=n.getPositioningCSS()),s(u,function(t,e,n){var o;return(o="translate3d"===r.positionUsing?{transform:"translate3d("+i(t)+"%,0,0)"}:"translate"===r.positionUsing?{transform:"translate("+i(t)+"%,0)"}:{"margin-left":i(t)+"%"}).transition="all "+e+"ms "+n,o}(t,l,f)),1===t?(s(c,{transition:"none",opacity:1}),c.offsetWidth,setTimeout((function(){s(c,{transition:"all "+l+"ms linear",opacity:0}),setTimeout((function(){n.remove(),e()}),l)}),l)):setTimeout(e,l)})),this},n.isStarted=function(){return"number"==typeof n.status},n.start=function(){n.status||n.set(0);var t=function(){setTimeout((function(){n.status&&(n.trickle(),t())}),r.trickleSpeed)};return r.trickle&&t(),this},n.done=function(t){return t||n.status?n.inc(.3+.5*Math.random()).set(1):this},n.inc=function(t){var e=n.status;return e?("number"!=typeof t&&(t=(1-e)*o(Math.random()*e,.1,.95)),e=o(e+t,0,.994),n.set(e)):n.start()},n.trickle=function(){return n.inc(Math.random()*r.trickleRate)},t=0,e=0,n.promise=function(r){return r&&"resolved"!==r.state()?(0===e&&n.start(),t++,e++,r.always((function(){0==--e?(t=0,n.done()):n.set((t-e)/t)})),this):this},n.render=function(t){if(n.isRendered())return document.getElementById("nprogress");u(document.documentElement,"nprogress-busy");var e=document.createElement("div");e.id="nprogress",e.innerHTML=r.template;var o,a=e.querySelector(r.barSelector),c=t?"-100":i(n.status||0),l=document.querySelector(r.parent);return s(a,{transition:"all 0 linear",transform:"translate3d("+c+"%,0,0)"}),r.showSpinner||(o=e.querySelector(r.spinnerSelector))&&p(o),l!=document.body&&u(l,"nprogress-custom-parent"),l.appendChild(e),e},n.remove=function(){l(document.documentElement,"nprogress-busy"),l(document.querySelector(r.parent),"nprogress-custom-parent");var t=document.getElementById("nprogress");t&&p(t)},n.isRendered=function(){return!!document.getElementById("nprogress")},n.getPositioningCSS=function(){var t=document.body.style,e="WebkitTransform"in t?"Webkit":"MozTransform"in t?"Moz":"msTransform"in t?"ms":"OTransform"in t?"O":"";return e+"Perspective"in t?"translate3d":e+"Transform"in t?"translate":"margin"};var a=function(){var t=[];function e(){var n=t.shift();n&&n(e)}return function(n){t.push(n),1==t.length&&e()}}(),s=function(){var t=["Webkit","O","Moz","ms"],e={};function n(n){return n=n.replace(/^-ms-/,"ms-").replace(/-([\da-z])/gi,(function(t,e){return e.toUpperCase()})),e[n]||(e[n]=function(e){var n=document.body.style;if(e in n)return e;for(var r,o=t.length,i=e.charAt(0).toUpperCase()+e.slice(1);o--;)if((r=t[o]+i)in n)return r;return e}(n))}function r(t,e,r){e=n(e),t.style[e]=r}return function(t,e){var n,o,i=arguments;if(2==i.length)for(n in e)void 0!==(o=e[n])&&e.hasOwnProperty(n)&&r(t,n,o);else r(t,i[1],i[2])}}();function c(t,e){return("string"==typeof t?t:f(t)).indexOf(" "+e+" ")>=0}function u(t,e){var n=f(t),r=n+e;c(n,e)||(t.className=r.substring(1))}function l(t,e){var n,r=f(t);c(t,e)&&(n=r.replace(" "+e+" "," "),t.className=n.substring(1,n.length-1))}function f(t){return(" "+(t.className||"")+" ").replace(/\s+/gi," ")}function p(t){t&&t.parentNode&&t.parentNode.removeChild(t)}return n})?r.call(e,n,e,t):r)||(t.exports=o)},function(t,e,n){"use strict";var r=n(0),o=n(46).f,i=n(13),a=n(93),s=n(33),c=n(61),u=n(121);t.exports=function(t,e){var n,l,f,p,d,h=t.target,v=t.global,m=t.stat;if(n=v?r:m?r[h]||s(h,{}):(r[h]||{}).prototype)for(l in e){if(p=e[l],f=t.dontCallGetSet?(d=o(n,l))&&d.value:n[l],!u(v?l:h+(m?".":"#")+l,t.forced)&&void 0!==f){if(typeof p==typeof f)continue;c(p,f)}(t.sham||f&&f.sham)&&i(p,"sham",!0),a(n,l,p,t)}}},function(t,e,n){"use strict";var r=n(26),o=Function.prototype.call;t.exports=r?o.bind(o):function(){return o.apply(o,arguments)}},function(t,e,n){"use strict";var r=n(3);t.exports=!r((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")}))},function(t,e,n){"use strict";t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e,n){"use strict";var r=n(47),o=n(48);t.exports=function(t){return r(o(t))}},function(t,e,n){"use strict";var r=n(0),o=n(1),i=function(t){return o(t)?t:void 0};t.exports=function(t,e){return arguments.length<2?i(r[t]):r[t]&&r[t][e]}},function(t,e,n){"use strict";var r=n(1),o=n(103),i=TypeError;t.exports=function(t){if(r(t))return t;throw new i(o(t)+" is not a function")}},function(t,e,n){"use strict";var r=n(0),o=n(56),i=n(8),a=n(58),s=n(54),c=n(53),u=r.Symbol,l=o("wks"),f=c?u.for||u:u&&u.withoutSetter||a;t.exports=function(t){return i(l,t)||(l[t]=s&&i(u,t)?u[t]:f("Symbol."+t)),l[t]}},function(t,e,n){"use strict";var r=n(0),o=n(33),i=r["__core-js_shared__"]||o("__core-js_shared__",{});t.exports=i},function(t,e,n){"use strict";var r=n(0),o=Object.defineProperty;t.exports=function(t,e){try{o(r,t,{value:e,configurable:!0,writable:!0})}catch(n){r[t]=e}return e}},function(t,e,n){"use strict";var r=n(48),o=Object;t.exports=function(t){return o(r(t))}},function(t,e,n){"use strict";var r=n(7),o=String,i=TypeError;t.exports=function(t){if(r(t))return t;throw new i(o(t)+" is not an object")}},function(t,e,n){"use strict";var r=n(118);t.exports=function(t){return r(t.length)}},function(t,e,n){var r=n(145),o=n(11),i=Object.prototype,a=i.hasOwnProperty,s=i.propertyIsEnumerable,c=r(function(){return arguments}())?r:function(t){return o(t)&&a.call(t,"callee")&&!s.call(t,"callee")};t.exports=c},function(t,e,n){var r=n(9)(n(6),"Map");t.exports=r},function(t,e){t.exports=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},function(t,e,n){var r=n(165),o=n(172),i=n(174),a=n(175),s=n(176);function c(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e-1&&t%1==0&&t<=9007199254740991}},function(t,e,n){var r=n(4),o=n(44),i=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\w*$/;t.exports=function(t,e){if(r(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!o(t))||(a.test(t)||!i.test(t)||null!=e&&t in Object(e))}},function(t,e,n){var r=n(12),o=n(11);t.exports=function(t){return"symbol"==typeof t||o(t)&&"[object Symbol]"==r(t)}},function(t,e){t.exports=function(t){return t}},function(t,e,n){"use strict";var r=n(5),o=n(25),i=n(99),a=n(27),s=n(28),c=n(50),u=n(8),l=n(59),f=Object.getOwnPropertyDescriptor;e.f=r?f:function(t,e){if(t=s(t),e=c(e),l)try{return f(t,e)}catch(t){}if(u(t,e))return a(!o(i.f,t,e),t[e])}},function(t,e,n){"use strict";var r=n(2),o=n(3),i=n(16),a=Object,s=r("".split);t.exports=o((function(){return!a("z").propertyIsEnumerable(0)}))?function(t){return"String"===i(t)?s(t,""):a(t)}:a},function(t,e,n){"use strict";var r=n(49),o=TypeError;t.exports=function(t){if(r(t))throw new o("Can't call method on "+t);return t}},function(t,e,n){"use strict";t.exports=function(t){return null==t}},function(t,e,n){"use strict";var r=n(100),o=n(51);t.exports=function(t){var e=r(t,"string");return o(e)?e:e+""}},function(t,e,n){"use strict";var r=n(29),o=n(1),i=n(52),a=n(53),s=Object;t.exports=a?function(t){return"symbol"==typeof t}:function(t){var e=r("Symbol");return o(e)&&i(e.prototype,s(t))}},function(t,e,n){"use strict";var r=n(2);t.exports=r({}.isPrototypeOf)},function(t,e,n){"use strict";var r=n(54);t.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},function(t,e,n){"use strict";var r=n(55),o=n(3),i=n(0).String;t.exports=!!Object.getOwnPropertySymbols&&!o((function(){var t=Symbol("symbol detection");return!i(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&r&&r<41}))},function(t,e,n){"use strict";var r,o,i=n(0),a=n(101),s=i.process,c=i.Deno,u=s&&s.versions||c&&c.version,l=u&&u.v8;l&&(o=(r=l.split("."))[0]>0&&r[0]<4?1:+(r[0]+r[1])),!o&&a&&(!(r=a.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=a.match(/Chrome\/(\d+)/))&&(o=+r[1]),t.exports=o},function(t,e,n){"use strict";var r=n(57),o=n(32);(t.exports=function(t,e){return o[t]||(o[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.35.0",mode:r?"pure":"global",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.35.0/LICENSE",source:"https://github.com/zloirock/core-js"})},function(t,e,n){"use strict";t.exports=!1},function(t,e,n){"use strict";var r=n(2),o=0,i=Math.random(),a=r(1..toString);t.exports=function(t){return"Symbol("+(void 0===t?"":t)+")_"+a(++o+i,36)}},function(t,e,n){"use strict";var r=n(5),o=n(3),i=n(105);t.exports=!r&&!o((function(){return 7!==Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a}))},function(t,e,n){"use strict";t.exports={}},function(t,e,n){"use strict";var r=n(8),o=n(112),i=n(46),a=n(15);t.exports=function(t,e,n){for(var s=o(e),c=a.f,u=i.f,l=0;ll))return!1;var p=c.get(t),d=c.get(e);if(p&&d)return p==e&&d==t;var h=-1,v=!0,m=2&n?new r:void 0;for(c.set(t,e),c.set(e,t);++h-1&&t%1==0&&t]/;t.exports=function(t){var e,n=""+t,o=r.exec(n);if(!o)return n;var i="",a=0,s=0;for(a=o.index;a1?1:s,n=.5*(1-Math.cos(Math.PI*a)),r=e.startX+(e.x-e.startX)*n,o=e.startY+(e.y-e.startY)*n,e.method.call(e.scrollable,r,o),r===e.x&&o===e.y||t.requestAnimationFrame(d.bind(t,e))}function h(n,r,a){var c,u,l,f,p=i();n===e.body?(c=t,u=t.scrollX||t.pageXOffset,l=t.scrollY||t.pageYOffset,f=o.scroll):(c=n,u=n.scrollLeft,l=n.scrollTop,f=s),d({scrollable:c,method:f,startTime:p,startX:u,startY:l,x:r,y:a})}}}}()},function(t,e,n){"use strict";var r=n(24),o=n(34),i=n(36),a=n(125),s=n(127);r({target:"Array",proto:!0,arity:1,forced:n(3)((function(){return 4294967297!==[].push.call({length:4294967296},1)}))||!function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(t){return t instanceof TypeError}}()},{push:function(t){var e=o(this),n=i(e),r=arguments.length;s(n+r);for(var c=0;c79&&a<83||!i("reduce")},{reduce:function(t){var e=arguments.length;return o(this,t,e,e>1?arguments[1]:void 0)}})},function(t,e,n){"use strict";var r={}.propertyIsEnumerable,o=Object.getOwnPropertyDescriptor,i=o&&!r.call({1:2},1);e.f=i?function(t){var e=o(this,t);return!!e&&e.enumerable}:r},function(t,e,n){"use strict";var r=n(25),o=n(7),i=n(51),a=n(102),s=n(104),c=n(31),u=TypeError,l=c("toPrimitive");t.exports=function(t,e){if(!o(t)||i(t))return t;var n,c=a(t,l);if(c){if(void 0===e&&(e="default"),n=r(c,t,e),!o(n)||i(n))return n;throw new u("Can't convert object to primitive value")}return void 0===e&&(e="number"),s(t,e)}},function(t,e,n){"use strict";t.exports="undefined"!=typeof navigator&&String(navigator.userAgent)||""},function(t,e,n){"use strict";var r=n(30),o=n(49);t.exports=function(t,e){var n=t[e];return o(n)?void 0:r(n)}},function(t,e,n){"use strict";var r=String;t.exports=function(t){try{return r(t)}catch(t){return"Object"}}},function(t,e,n){"use strict";var r=n(25),o=n(1),i=n(7),a=TypeError;t.exports=function(t,e){var n,s;if("string"===e&&o(n=t.toString)&&!i(s=r(n,t)))return s;if(o(n=t.valueOf)&&!i(s=r(n,t)))return s;if("string"!==e&&o(n=t.toString)&&!i(s=r(n,t)))return s;throw new a("Can't convert object to primitive value")}},function(t,e,n){"use strict";var r=n(0),o=n(7),i=r.document,a=o(i)&&o(i.createElement);t.exports=function(t){return a?i.createElement(t):{}}},function(t,e,n){"use strict";var r=n(5),o=n(3);t.exports=r&&o((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},function(t,e,n){"use strict";var r=n(5),o=n(8),i=Function.prototype,a=r&&Object.getOwnPropertyDescriptor,s=o(i,"name"),c=s&&"something"===function(){}.name,u=s&&(!r||r&&a(i,"name").configurable);t.exports={EXISTS:s,PROPER:c,CONFIGURABLE:u}},function(t,e,n){"use strict";var r=n(2),o=n(1),i=n(32),a=r(Function.toString);o(i.inspectSource)||(i.inspectSource=function(t){return a(t)}),t.exports=i.inspectSource},function(t,e,n){"use strict";var r,o,i,a=n(110),s=n(0),c=n(7),u=n(13),l=n(8),f=n(32),p=n(111),d=n(60),h=s.TypeError,v=s.WeakMap;if(a||f.state){var m=f.state||(f.state=new v);m.get=m.get,m.has=m.has,m.set=m.set,r=function(t,e){if(m.has(t))throw new h("Object already initialized");return e.facade=t,m.set(t,e),e},o=function(t){return m.get(t)||{}},i=function(t){return m.has(t)}}else{var y=p("state");d[y]=!0,r=function(t,e){if(l(t,y))throw new h("Object already initialized");return e.facade=t,u(t,y,e),e},o=function(t){return l(t,y)?t[y]:{}},i=function(t){return l(t,y)}}t.exports={set:r,get:o,has:i,enforce:function(t){return i(t)?o(t):r(t,{})},getterFor:function(t){return function(e){var n;if(!c(e)||(n=o(e)).type!==t)throw new h("Incompatible receiver, "+t+" required");return n}}}},function(t,e,n){"use strict";var r=n(0),o=n(1),i=r.WeakMap;t.exports=o(i)&&/native code/.test(String(i))},function(t,e,n){"use strict";var r=n(56),o=n(58),i=r("keys");t.exports=function(t){return i[t]||(i[t]=o(t))}},function(t,e,n){"use strict";var r=n(29),o=n(2),i=n(113),a=n(120),s=n(35),c=o([].concat);t.exports=r("Reflect","ownKeys")||function(t){var e=i.f(s(t)),n=a.f;return n?c(e,n(t)):e}},function(t,e,n){"use strict";var r=n(114),o=n(119).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,o)}},function(t,e,n){"use strict";var r=n(2),o=n(8),i=n(28),a=n(115).indexOf,s=n(60),c=r([].push);t.exports=function(t,e){var n,r=i(t),u=0,l=[];for(n in r)!o(s,n)&&o(r,n)&&c(l,n);for(;e.length>u;)o(r,n=e[u++])&&(~a(l,n)||c(l,n));return l}},function(t,e,n){"use strict";var r=n(28),o=n(116),i=n(36),a=function(t){return function(e,n,a){var s,c=r(e),u=i(c),l=o(a,u);if(t&&n!=n){for(;u>l;)if((s=c[l++])!=s)return!0}else for(;u>l;l++)if((t||l in c)&&c[l]===n)return t||l||0;return!t&&-1}};t.exports={includes:a(!0),indexOf:a(!1)}},function(t,e,n){"use strict";var r=n(62),o=Math.max,i=Math.min;t.exports=function(t,e){var n=r(t);return n<0?o(n+e,0):i(n,e)}},function(t,e,n){"use strict";var r=Math.ceil,o=Math.floor;t.exports=Math.trunc||function(t){var e=+t;return(e>0?o:r)(e)}},function(t,e,n){"use strict";var r=n(62),o=Math.min;t.exports=function(t){return t>0?o(r(t),9007199254740991):0}},function(t,e,n){"use strict";t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},function(t,e,n){"use strict";e.f=Object.getOwnPropertySymbols},function(t,e,n){"use strict";var r=n(3),o=n(1),i=/#|\.prototype\./,a=function(t,e){var n=c[s(t)];return n===l||n!==u&&(o(e)?r(e):!!e)},s=a.normalize=function(t){return String(t).replace(i,".").toLowerCase()},c=a.data={},u=a.NATIVE="N",l=a.POLYFILL="P";t.exports=a},function(t,e,n){"use strict";var r=n(30),o=n(34),i=n(47),a=n(36),s=TypeError,c=function(t){return function(e,n,c,u){var l=o(e),f=i(l),p=a(l);r(n);var d=t?p-1:0,h=t?-1:1;if(c<2)for(;;){if(d in f){u=f[d],d+=h;break}if(d+=h,t?d<0:p<=d)throw new s("Reduce of empty array with no initial value")}for(;t?d>=0:p>d;d+=h)d in f&&(u=n(u,f[d],d,l));return u}};t.exports={left:c(!1),right:c(!0)}},function(t,e,n){"use strict";var r=n(3);t.exports=function(t,e){var n=[][t];return!!n&&r((function(){n.call(null,e||function(){return 1},1)}))}},function(t,e,n){"use strict";var r=n(0),o=n(16);t.exports="process"===o(r.process)},function(t,e,n){"use strict";var r=n(5),o=n(126),i=TypeError,a=Object.getOwnPropertyDescriptor,s=r&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(t){return t instanceof TypeError}}();t.exports=s?function(t,e){if(o(t)&&!a(t,"length").writable)throw new i("Cannot set read only .length");return t.length=e}:function(t,e){return t.length=e}},function(t,e,n){"use strict";var r=n(16);t.exports=Array.isArray||function(t){return"Array"===r(t)}},function(t,e,n){"use strict";var r=TypeError;t.exports=function(t){if(t>9007199254740991)throw r("Maximum allowed index exceeded");return t}},function(t,e,n){"use strict";var r=n(24),o=n(0),i=n(129),a=n(130),s=o.WebAssembly,c=7!==new Error("e",{cause:7}).cause,u=function(t,e){var n={};n[t]=a(t,e,c),r({global:!0,constructor:!0,arity:1,forced:c},n)},l=function(t,e){if(s&&s[t]){var n={};n[t]=a("WebAssembly."+t,e,c),r({target:"WebAssembly",stat:!0,constructor:!0,arity:1,forced:c},n)}};u("Error",(function(t){return function(e){return i(t,this,arguments)}})),u("EvalError",(function(t){return function(e){return i(t,this,arguments)}})),u("RangeError",(function(t){return function(e){return i(t,this,arguments)}})),u("ReferenceError",(function(t){return function(e){return i(t,this,arguments)}})),u("SyntaxError",(function(t){return function(e){return i(t,this,arguments)}})),u("TypeError",(function(t){return function(e){return i(t,this,arguments)}})),u("URIError",(function(t){return function(e){return i(t,this,arguments)}})),l("CompileError",(function(t){return function(e){return i(t,this,arguments)}})),l("LinkError",(function(t){return function(e){return i(t,this,arguments)}})),l("RuntimeError",(function(t){return function(e){return i(t,this,arguments)}}))},function(t,e,n){"use strict";var r=n(26),o=Function.prototype,i=o.apply,a=o.call;t.exports="object"==typeof Reflect&&Reflect.apply||(r?a.bind(i):function(){return a.apply(i,arguments)})},function(t,e,n){"use strict";var r=n(29),o=n(8),i=n(13),a=n(52),s=n(63),c=n(61),u=n(134),l=n(135),f=n(136),p=n(139),d=n(140),h=n(5),v=n(57);t.exports=function(t,e,n,m){var y=m?2:1,g=t.split("."),b=g[g.length-1],_=r.apply(null,g);if(_){var x=_.prototype;if(!v&&o(x,"cause")&&delete x.cause,!n)return _;var w=r("Error"),C=e((function(t,e){var n=f(m?e:t,void 0),r=m?new _(t):new _;return void 0!==n&&i(r,"message",n),d(r,C,r.stack,2),this&&a(x,this)&&l(r,this,C),arguments.length>y&&p(r,arguments[y]),r}));if(C.prototype=x,"Error"!==b?s?s(C,w):c(C,w,{name:!0}):h&&"stackTraceLimit"in _&&(u(C,_,"stackTraceLimit"),u(C,_,"prepareStackTrace")),c(C,_),!v)try{x.name!==b&&i(x,"name",b),x.constructor=C}catch(t){}return C}}},function(t,e,n){"use strict";var r=n(2),o=n(30);t.exports=function(t,e,n){try{return r(o(Object.getOwnPropertyDescriptor(t,e)[n]))}catch(t){}}},function(t,e,n){"use strict";var r=n(133),o=String,i=TypeError;t.exports=function(t){if(r(t))return t;throw new i("Can't set "+o(t)+" as a prototype")}},function(t,e,n){"use strict";var r=n(7);t.exports=function(t){return r(t)||null===t}},function(t,e,n){"use strict";var r=n(15).f;t.exports=function(t,e,n){n in t||r(t,n,{configurable:!0,get:function(){return e[n]},set:function(t){e[n]=t}})}},function(t,e,n){"use strict";var r=n(1),o=n(7),i=n(63);t.exports=function(t,e,n){var a,s;return i&&r(a=e.constructor)&&a!==n&&o(s=a.prototype)&&s!==n.prototype&&i(t,s),t}},function(t,e,n){"use strict";var r=n(94);t.exports=function(t,e){return void 0===t?arguments.length<2?"":e:r(t)}},function(t,e,n){"use strict";var r=n(138),o=n(1),i=n(16),a=n(31)("toStringTag"),s=Object,c="Arguments"===i(function(){return arguments}());t.exports=r?i:function(t){var e,n,r;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=s(t),a))?n:c?i(e):"Object"===(r=i(e))&&o(e.callee)?"Arguments":r}},function(t,e,n){"use strict";var r={};r[n(31)("toStringTag")]="z",t.exports="[object z]"===String(r)},function(t,e,n){"use strict";var r=n(7),o=n(13);t.exports=function(t,e){r(e)&&"cause"in e&&o(t,"cause",e.cause)}},function(t,e,n){"use strict";var r=n(13),o=n(141),i=n(142),a=Error.captureStackTrace;t.exports=function(t,e,n,s){i&&(a?a(t,e):r(t,"stack",o(n,s)))}},function(t,e,n){"use strict";var r=n(2),o=Error,i=r("".replace),a=String(new o("zxcasd").stack),s=/\n\s*at [^:]*:[^\n]*/,c=s.test(a);t.exports=function(t,e){if(c&&"string"==typeof t&&!o.prepareStackTrace)for(;e--;)t=i(t,s,"");return t}},function(t,e,n){"use strict";var r=n(3),o=n(27);t.exports=!r((function(){var t=new Error("a");return!("stack"in t)||(Object.defineProperty(t,"stack",o(1,7)),7!==t.stack)}))},function(t,e,n){var r=n(64),o=n(144);t.exports=function t(e,n,i,a,s){var c=-1,u=e.length;for(i||(i=o),s||(s=[]);++c0&&i(l)?n>1?t(l,n-1,i,a,s):r(s,l):a||(s[s.length]=l)}return s}},function(t,e,n){var r=n(14),o=n(37),i=n(4),a=r?r.isConcatSpreadable:void 0;t.exports=function(t){return i(t)||o(t)||!!(a&&t&&t[a])}},function(t,e,n){var r=n(12),o=n(11);t.exports=function(t){return o(t)&&"[object Arguments]"==r(t)}},function(t,e,n){var r=n(14),o=Object.prototype,i=o.hasOwnProperty,a=o.toString,s=r?r.toStringTag:void 0;t.exports=function(t){var e=i.call(t,s),n=t[s];try{t[s]=void 0;var r=!0}catch(t){}var o=a.call(t);return r&&(e?t[s]=n:delete t[s]),o}},function(t,e){var n=Object.prototype.toString;t.exports=function(t){return n.call(t)}},function(t,e,n){var r=n(149),o=n(205),i=n(45),a=n(4),s=n(215);t.exports=function(t){return"function"==typeof t?t:null==t?i:"object"==typeof t?a(t)?o(t[0],t[1]):r(t):s(t)}},function(t,e,n){var r=n(150),o=n(204),i=n(82);t.exports=function(t){var e=o(t);return 1==e.length&&e[0][2]?i(e[0][0],e[0][1]):function(n){return n===t||r(n,t,e)}}},function(t,e,n){var r=n(66),o=n(70);t.exports=function(t,e,n,i){var a=n.length,s=a,c=!i;if(null==t)return!s;for(t=Object(t);a--;){var u=n[a];if(c&&u[2]?u[1]!==t[u[0]]:!(u[0]in t))return!1}for(;++a-1}},function(t,e,n){var r=n(18);t.exports=function(t,e){var n=this.__data__,o=r(n,t);return o<0?(++this.size,n.push([t,e])):n[o][1]=e,this}},function(t,e,n){var r=n(17);t.exports=function(){this.__data__=new r,this.size=0}},function(t,e){t.exports=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}},function(t,e){t.exports=function(t){return this.__data__.get(t)}},function(t,e){t.exports=function(t){return this.__data__.has(t)}},function(t,e,n){var r=n(17),o=n(38),i=n(40);t.exports=function(t,e){var n=this.__data__;if(n instanceof r){var a=n.__data__;if(!o||a.length<199)return a.push([t,e]),this.size=++n.size,this;n=this.__data__=new i(a)}return n.set(t,e),this.size=n.size,this}},function(t,e,n){var r=n(68),o=n(162),i=n(39),a=n(69),s=/^\[object .+?Constructor\]$/,c=Function.prototype,u=Object.prototype,l=c.toString,f=u.hasOwnProperty,p=RegExp("^"+l.call(f).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");t.exports=function(t){return!(!i(t)||o(t))&&(r(t)?p:s).test(a(t))}},function(t,e,n){var r,o=n(163),i=(r=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";t.exports=function(t){return!!i&&i in t}},function(t,e,n){var r=n(6)["__core-js_shared__"];t.exports=r},function(t,e){t.exports=function(t,e){return null==t?void 0:t[e]}},function(t,e,n){var r=n(166),o=n(17),i=n(38);t.exports=function(){this.size=0,this.__data__={hash:new r,map:new(i||o),string:new r}}},function(t,e,n){var r=n(167),o=n(168),i=n(169),a=n(170),s=n(171);function c(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}},function(t,e,n){var r=n(72),o=n(227),i=n(232),a=n(73),s=n(233),c=n(41);t.exports=function(t,e,n){var u=-1,l=o,f=t.length,p=!0,d=[],h=d;if(n)p=!1,l=i;else if(f>=200){var v=e?null:s(t);if(v)return c(v);p=!1,l=a,h=new r}else h=e?[]:d;t:for(;++u-1}},function(t,e,n){var r=n(229),o=n(230),i=n(231);t.exports=function(t,e,n){return e==e?i(t,e,n):r(t,o,n)}},function(t,e){t.exports=function(t,e,n,r){for(var o=t.length,i=n+(r?1:-1);r?i--:++i=0&&Math.floor(e)===e&&isFinite(t)}function v(t){return a(t)&&"function"==typeof t.then&&"function"==typeof t.catch}function m(t){return null==t?"":Array.isArray(t)||p(t)&&t.toString===f?JSON.stringify(t,y,2):String(t)}function y(t,e){return e&&e.__v_isRef?e.value:e}function g(t){var e=parseFloat(t);return isNaN(e)?t:e}function b(t,e){for(var n=Object.create(null),r=t.split(","),o=0;o-1)return t.splice(r,1)}}var w=Object.prototype.hasOwnProperty;function C(t,e){return w.call(t,e)}function O(t){var e=Object.create(null);return function(n){return e[n]||(e[n]=t(n))}}var $=/-(\w)/g,S=O((function(t){return t.replace($,(function(t,e){return e?e.toUpperCase():""}))})),k=O((function(t){return t.charAt(0).toUpperCase()+t.slice(1)})),j=/\B([A-Z])/g,E=O((function(t){return t.replace(j,"-$1").toLowerCase()}));var P=Function.prototype.bind?function(t,e){return t.bind(e)}:function(t,e){function n(n){var r=arguments.length;return r?r>1?t.apply(e,arguments):t.call(e,n):t.call(e)}return n._length=t.length,n};function T(t,e){e=e||0;for(var n=t.length-e,r=new Array(n);n--;)r[n]=t[n+e];return r}function A(t,e){for(var n in e)t[n]=e[n];return t}function L(t){for(var e={},n=0;n0,Q=Y&&Y.indexOf("edge/")>0;Y&&Y.indexOf("android");var tt=Y&&/iphone|ipad|ipod|ios/.test(Y);Y&&/chrome\/\d+/.test(Y),Y&&/phantomjs/.test(Y);var et,nt=Y&&Y.match(/firefox\/(\d+)/),rt={}.watch,ot=!1;if(X)try{var it={};Object.defineProperty(it,"passive",{get:function(){ot=!0}}),window.addEventListener("test-passive",null,it)}catch(t){}var at=function(){return void 0===et&&(et=!X&&"undefined"!=typeof global&&(global.process&&"server"===global.process.env.VUE_ENV)),et},st=X&&window.__VUE_DEVTOOLS_GLOBAL_HOOK__;function ct(t){return"function"==typeof t&&/native code/.test(t.toString())}var ut,lt="undefined"!=typeof Symbol&&ct(Symbol)&&"undefined"!=typeof Reflect&&ct(Reflect.ownKeys);ut="undefined"!=typeof Set&&ct(Set)?Set:function(){function t(){this.set=Object.create(null)}return t.prototype.has=function(t){return!0===this.set[t]},t.prototype.add=function(t){this.set[t]=!0},t.prototype.clear=function(){this.set=Object.create(null)},t}();var ft=null;function pt(t){void 0===t&&(t=null),t||ft&&ft._scope.off(),ft=t,t&&t._scope.on()}var dt=function(){function t(t,e,n,r,o,i,a,s){this.tag=t,this.data=e,this.children=n,this.text=r,this.elm=o,this.ns=void 0,this.context=i,this.fnContext=void 0,this.fnOptions=void 0,this.fnScopeId=void 0,this.key=e&&e.key,this.componentOptions=a,this.componentInstance=void 0,this.parent=void 0,this.raw=!1,this.isStatic=!1,this.isRootInsert=!0,this.isComment=!1,this.isCloned=!1,this.isOnce=!1,this.asyncFactory=s,this.asyncMeta=void 0,this.isAsyncPlaceholder=!1}return Object.defineProperty(t.prototype,"child",{get:function(){return this.componentInstance},enumerable:!1,configurable:!0}),t}(),ht=function(t){void 0===t&&(t="");var e=new dt;return e.text=t,e.isComment=!0,e};function vt(t){return new dt(void 0,void 0,void 0,String(t))}function mt(t){var e=new dt(t.tag,t.data,t.children&&t.children.slice(),t.text,t.elm,t.context,t.componentOptions,t.asyncFactory);return e.ns=t.ns,e.isStatic=t.isStatic,e.key=t.key,e.isComment=t.isComment,e.fnContext=t.fnContext,e.fnOptions=t.fnOptions,e.fnScopeId=t.fnScopeId,e.asyncMeta=t.asyncMeta,e.isCloned=!0,e}"function"==typeof SuppressedError&&SuppressedError;var yt=0,gt=[],bt=function(){function t(){this._pending=!1,this.id=yt++,this.subs=[]}return t.prototype.addSub=function(t){this.subs.push(t)},t.prototype.removeSub=function(t){this.subs[this.subs.indexOf(t)]=null,this._pending||(this._pending=!0,gt.push(this))},t.prototype.depend=function(e){t.target&&t.target.addDep(this)},t.prototype.notify=function(t){var e=this.subs.filter((function(t){return t}));for(var n=0,r=e.length;n0&&(Yt((u=t(u,"".concat(n||"","_").concat(r)))[0])&&Yt(f)&&(p[l]=vt(f.text+u[0].text),u.shift()),p.push.apply(p,u)):c(u)?Yt(f)?p[l]=vt(f.text+u):""!==u&&p.push(vt(u)):Yt(u)&&Yt(f)?p[l]=vt(f.text+u.text):(s(e._isVList)&&a(u.tag)&&i(u.key)&&a(n)&&(u.key="__vlist".concat(n,"_").concat(r,"__")),p.push(u)));return p}(t):void 0}function Yt(t){return a(t)&&a(t.text)&&!1===t.isComment}function Jt(t,e){var n,r,i,s,c=null;if(o(t)||"string"==typeof t)for(c=new Array(t.length),n=0,r=t.length;n0,s=e?!!e.$stable:!a,c=e&&e.$key;if(e){if(e._normalized)return e._normalized;if(s&&o&&o!==r&&c===o.$key&&!a&&!o.$hasNormal)return o;for(var u in i={},e)e[u]&&"$"!==u[0]&&(i[u]=me(t,n,u,e[u]))}else i={};for(var l in n)l in i||(i[l]=ye(n,l));return e&&Object.isExtensible(e)&&(e._normalized=i),W(i,"$stable",s),W(i,"$key",c),W(i,"$hasNormal",a),i}function me(t,e,n,r){var i=function(){var e=ft;pt(t);var n=arguments.length?r.apply(null,arguments):r({}),i=(n=n&&"object"==typeof n&&!o(n)?[n]:Xt(n))&&n[0];return pt(e),n&&(!i||1===n.length&&i.isComment&&!he(i))?void 0:n};return r.proxy&&Object.defineProperty(e,n,{get:i,enumerable:!0,configurable:!0}),i}function ye(t,e){return function(){return t[e]}}function ge(t){return{get attrs(){if(!t._attrsProxy){var e=t._attrsProxy={};W(e,"_v_attr_proxy",!0),be(e,t.$attrs,r,t,"$attrs")}return t._attrsProxy},get listeners(){t._listenersProxy||be(t._listenersProxy={},t.$listeners,r,t,"$listeners");return t._listenersProxy},get slots(){return function(t){t._slotsProxy||xe(t._slotsProxy={},t.$scopedSlots);return t._slotsProxy}(t)},emit:P(t.$emit,t),expose:function(e){e&&Object.keys(e).forEach((function(n){return Ut(t,e,n)}))}}}function be(t,e,n,r,o){var i=!1;for(var a in e)a in t?e[a]!==n[a]&&(i=!0):(i=!0,_e(t,a,r,o));for(var a in t)a in e||(i=!0,delete t[a]);return i}function _e(t,e,n,r){Object.defineProperty(t,e,{enumerable:!0,configurable:!0,get:function(){return n[r][e]}})}function xe(t,e){for(var n in e)t[n]=e[n];for(var n in t)n in e||delete t[n]}var we=null;function Ce(t,e){return(t.__esModule||lt&&"Module"===t[Symbol.toStringTag])&&(t=t.default),l(t)?e.extend(t):t}function Oe(t){if(o(t))for(var e=0;edocument.createEvent("Event").timeStamp&&(un=function(){return ln.now()})}var fn=function(t,e){if(t.post){if(!e.post)return 1}else if(e.post)return-1;return t.id-e.id};function pn(){var t,e;for(cn=un(),an=!0,en.sort(fn),sn=0;snsn&&en[n].id>t.id;)n--;en.splice(n+1,0,t)}else en.push(t);on||(on=!0,Be(pn))}}function hn(t,e){if(t){for(var n=Object.create(null),r=lt?Reflect.ownKeys(t):Object.keys(t),o=0;o-1)if(i&&!C(o,"default"))a=!1;else if(""===a||a===E(t)){var c=In(String,o.type);(c<0||s-1:"string"==typeof t?t.split(",").indexOf(e)>-1:!!d(t)&&t.test(e)}function Jn(t,e){var n=t.cache,r=t.keys,o=t._vnode,i=t.$vnode;for(var a in n){var s=n[a];if(s){var c=s.name;c&&!e(c)&&Zn(n,a,r,o)}}i.componentOptions.children=void 0}function Zn(t,e,n,r){var o=t[e];!o||r&&o.tag===r.tag||o.componentInstance.$destroy(),t[e]=null,x(n,e)}Gn.prototype._init=function(t){var e=this;e._uid=qn++,e._isVue=!0,e.__v_skip=!0,e._scope=new zt(!0),e._scope.parent=void 0,e._scope._vm=!0,t&&t._isComponent?function(t,e){var n=t.$options=Object.create(t.constructor.options),r=e._parentVnode;n.parent=e.parent,n._parentVnode=r;var o=r.componentOptions;n.propsData=o.propsData,n._parentListeners=o.listeners,n._renderChildren=o.children,n._componentTag=o.tag,e.render&&(n.render=e.render,n.staticRenderFns=e.staticRenderFns)}(e,t):e.$options=Pn(Wn(e.constructor),t||{},e),e._renderProxy=e,e._self=e,function(t){var e=t.$options,n=e.parent;if(n&&!e.abstract){for(;n.$options.abstract&&n.$parent;)n=n.$parent;n.$children.push(t)}t.$parent=n,t.$root=n?n.$root:t,t.$children=[],t.$refs={},t._provided=n?n._provided:Object.create(null),t._watcher=null,t._inactive=null,t._directInactive=!1,t._isMounted=!1,t._isDestroyed=!1,t._isBeingDestroyed=!1}(e),function(t){t._events=Object.create(null),t._hasHookEvent=!1;var e=t.$options._parentListeners;e&&Xe(t,e)}(e),function(t){t._vnode=null,t._staticTrees=null;var e=t.$options,n=t.$vnode=e._parentVnode,o=n&&n.context;t.$slots=pe(e._renderChildren,o),t.$scopedSlots=n?ve(t.$parent,n.data.scopedSlots,t.$slots):r,t._c=function(e,n,r,o){return $e(t,e,n,r,o,!1)},t.$createElement=function(e,n,r,o){return $e(t,e,n,r,o,!0)};var i=n&&n.data;At(t,"$attrs",i&&i.attrs||r,null,!0),At(t,"$listeners",e._parentListeners||r,null,!0)}(e),tn(e,"beforeCreate",void 0,!1),function(t){var e=hn(t.$options.inject,t);e&&(jt(!1),Object.keys(e).forEach((function(n){At(t,n,e[n])})),jt(!0))}(e),Bn(e),function(t){var e=t.$options.provide;if(e){var n=u(e)?e.call(t):e;if(!l(n))return;for(var r=Vt(t),o=lt?Reflect.ownKeys(n):Object.keys(n),i=0;i1?T(n):n;for(var r=T(arguments,1),o='event handler for "'.concat(t,'"'),i=0,a=n.length;iparseInt(this.max)&&Zn(t,e[0],e,this._vnode),this.vnodeToCache=null}}},created:function(){this.cache=Object.create(null),this.keys=[]},destroyed:function(){for(var t in this.cache)Zn(this.cache,t,this.keys)},mounted:function(){var t=this;this.cacheVNode(),this.$watch("include",(function(e){Jn(t,(function(t){return Yn(e,t)}))})),this.$watch("exclude",(function(e){Jn(t,(function(t){return!Yn(e,t)}))}))},updated:function(){this.cacheVNode()},render:function(){var t=this.$slots.default,e=Oe(t),n=e&&e.componentOptions;if(n){var r=Xn(n),o=this.include,i=this.exclude;if(o&&(!r||!Yn(o,r))||i&&r&&Yn(i,r))return e;var a=this.cache,s=this.keys,c=null==e.key?n.Ctor.cid+(n.tag?"::".concat(n.tag):""):e.key;a[c]?(e.componentInstance=a[c].componentInstance,x(s,c),s.push(c)):(this.vnodeToCache=e,this.keyToCache=c),e.data.keepAlive=!0}return e||t&&t[0]}}};!function(t){var e={get:function(){return V}};Object.defineProperty(t,"config",e),t.util={warn:Cn,extend:A,mergeOptions:Pn,defineReactive:At},t.set=Lt,t.delete=Mt,t.nextTick=Be,t.observable=function(t){return Tt(t),t},t.options=Object.create(null),F.forEach((function(e){t.options[e+"s"]=Object.create(null)})),t.options._base=t,A(t.options.components,tr),function(t){t.use=function(t){var e=this._installedPlugins||(this._installedPlugins=[]);if(e.indexOf(t)>-1)return this;var n=T(arguments,1);return n.unshift(this),u(t.install)?t.install.apply(t,n):u(t)&&t.apply(null,n),e.push(t),this}}(t),function(t){t.mixin=function(t){return this.options=Pn(this.options,t),this}}(t),Kn(t),function(t){F.forEach((function(e){t[e]=function(t,n){return n?("component"===e&&p(n)&&(n.name=n.name||t,n=this.options._base.extend(n)),"directive"===e&&u(n)&&(n={bind:n,update:n}),this.options[e+"s"][t]=n,n):this.options[e+"s"][t]}}))}(t)}(Gn),Object.defineProperty(Gn.prototype,"$isServer",{get:at}),Object.defineProperty(Gn.prototype,"$ssrContext",{get:function(){return this.$vnode&&this.$vnode.ssrContext}}),Object.defineProperty(Gn,"FunctionalRenderContext",{value:vn}),Gn.version="2.7.16";var er=b("style,class"),nr=b("input,textarea,option,select,progress"),rr=b("contenteditable,draggable,spellcheck"),or=b("events,caret,typing,plaintext-only"),ir=b("allowfullscreen,async,autofocus,autoplay,checked,compact,controls,declare,default,defaultchecked,defaultmuted,defaultselected,defer,disabled,enabled,formnovalidate,hidden,indeterminate,inert,ismap,itemscope,loop,multiple,muted,nohref,noresize,noshade,novalidate,nowrap,open,pauseonexit,readonly,required,reversed,scoped,seamless,selected,sortable,truespeed,typemustmatch,visible"),ar="http://www.w3.org/1999/xlink",sr=function(t){return":"===t.charAt(5)&&"xlink"===t.slice(0,5)},cr=function(t){return sr(t)?t.slice(6,t.length):""},ur=function(t){return null==t||!1===t};function lr(t){for(var e=t.data,n=t,r=t;a(r.componentInstance);)(r=r.componentInstance._vnode)&&r.data&&(e=fr(r.data,e));for(;a(n=n.parent);)n&&n.data&&(e=fr(e,n.data));return function(t,e){if(a(t)||a(e))return pr(t,dr(e));return""}(e.staticClass,e.class)}function fr(t,e){return{staticClass:pr(t.staticClass,e.staticClass),class:a(t.class)?[t.class,e.class]:e.class}}function pr(t,e){return t?e?t+" "+e:t:e||""}function dr(t){return Array.isArray(t)?function(t){for(var e,n="",r=0,o=t.length;r-1?Dr(t,e,n):ir(e)?ur(n)?t.removeAttribute(e):(n="allowfullscreen"===e&&"EMBED"===t.tagName?"true":e,t.setAttribute(e,n)):rr(e)?t.setAttribute(e,function(t,e){return ur(e)||"false"===e?"false":"contenteditable"===t&&or(e)?e:"true"}(e,n)):sr(e)?ur(n)?t.removeAttributeNS(ar,cr(e)):t.setAttributeNS(ar,e,n):Dr(t,e,n)}function Dr(t,e,n){if(ur(n))t.removeAttribute(e);else{if(J&&!Z&&"TEXTAREA"===t.tagName&&"placeholder"===e&&""!==n&&!t.__ieph){var r=function(e){e.stopImmediatePropagation(),t.removeEventListener("input",r)};t.addEventListener("input",r),t.__ieph=!0}t.setAttribute(e,n)}}var Nr={create:Rr,update:Rr};function Br(t,e){var n=e.elm,r=e.data,o=t.data;if(!(i(r.staticClass)&&i(r.class)&&(i(o)||i(o.staticClass)&&i(o.class)))){var s=lr(e),c=n._transitionClasses;a(c)&&(s=pr(s,dr(c))),s!==n._prevClass&&(n.setAttribute("class",s),n._prevClass=s)}}var Ur,Fr={create:Br,update:Br};function zr(t,e,n){var r=Ur;return function o(){var i=e.apply(null,arguments);null!==i&&qr(t,o,n,r)}}var Vr=Te&&!(nt&&Number(nt[1])<=53);function Hr(t,e,n,r){if(Vr){var o=cn,i=e;e=i._wrapper=function(t){if(t.target===t.currentTarget||t.timeStamp>=o||t.timeStamp<=0||t.target.ownerDocument!==document)return i.apply(this,arguments)}}Ur.addEventListener(t,e,ot?{capture:n,passive:r}:n)}function qr(t,e,n,r){(r||Ur).removeEventListener(t,e._wrapper||e,n)}function Wr(t,e){if(!i(t.data.on)||!i(e.data.on)){var n=e.data.on||{},r=t.data.on||{};Ur=e.elm||t.elm,function(t){if(a(t.__r)){var e=J?"change":"input";t[e]=[].concat(t.__r,t[e]||[]),delete t.__r}a(t.__c)&&(t.change=[].concat(t.__c,t.change||[]),delete t.__c)}(n),Wt(n,r,Hr,qr,zr,e.context),Ur=void 0}}var Gr,Kr={create:Wr,update:Wr,destroy:function(t){return Wr(t,Or)}};function Xr(t,e){if(!i(t.data.domProps)||!i(e.data.domProps)){var n,r,o=e.elm,c=t.data.domProps||{},u=e.data.domProps||{};for(n in(a(u.__ob__)||s(u._v_attr_proxy))&&(u=e.data.domProps=A({},u)),c)n in u||(o[n]="");for(n in u){if(r=u[n],"textContent"===n||"innerHTML"===n){if(e.children&&(e.children.length=0),r===c[n])continue;1===o.childNodes.length&&o.removeChild(o.childNodes[0])}if("value"===n&&"PROGRESS"!==o.tagName){o._value=r;var l=i(r)?"":String(r);Yr(o,l)&&(o.value=l)}else if("innerHTML"===n&&mr(o.tagName)&&i(o.innerHTML)){(Gr=Gr||document.createElement("div")).innerHTML="".concat(r,"");for(var f=Gr.firstChild;o.firstChild;)o.removeChild(o.firstChild);for(;f.firstChild;)o.appendChild(f.firstChild)}else if(r!==c[n])try{o[n]=r}catch(t){}}}}function Yr(t,e){return!t.composing&&("OPTION"===t.tagName||function(t,e){var n=!0;try{n=document.activeElement!==t}catch(t){}return n&&t.value!==e}(t,e)||function(t,e){var n=t.value,r=t._vModifiers;if(a(r)){if(r.number)return g(n)!==g(e);if(r.trim)return n.trim()!==e.trim()}return n!==e}(t,e))}var Jr={create:Xr,update:Xr},Zr=O((function(t){var e={},n=/:(.+)/;return t.split(/;(?![^(]*\))/g).forEach((function(t){if(t){var r=t.split(n);r.length>1&&(e[r[0].trim()]=r[1].trim())}})),e}));function Qr(t){var e=to(t.style);return t.staticStyle?A(t.staticStyle,e):e}function to(t){return Array.isArray(t)?L(t):"string"==typeof t?Zr(t):t}var eo,no=/^--/,ro=/\s*!important$/,oo=function(t,e,n){if(no.test(e))t.style.setProperty(e,n);else if(ro.test(n))t.style.setProperty(E(e),n.replace(ro,""),"important");else{var r=ao(e);if(Array.isArray(n))for(var o=0,i=n.length;o-1?e.split(uo).forEach((function(e){return t.classList.add(e)})):t.classList.add(e);else{var n=" ".concat(t.getAttribute("class")||""," ");n.indexOf(" "+e+" ")<0&&t.setAttribute("class",(n+e).trim())}}function fo(t,e){if(e&&(e=e.trim()))if(t.classList)e.indexOf(" ")>-1?e.split(uo).forEach((function(e){return t.classList.remove(e)})):t.classList.remove(e),t.classList.length||t.removeAttribute("class");else{for(var n=" ".concat(t.getAttribute("class")||""," "),r=" "+e+" ";n.indexOf(r)>=0;)n=n.replace(r," ");(n=n.trim())?t.setAttribute("class",n):t.removeAttribute("class")}}function po(t){if(t){if("object"==typeof t){var e={};return!1!==t.css&&A(e,ho(t.name||"v")),A(e,t),e}return"string"==typeof t?ho(t):void 0}}var ho=O((function(t){return{enterClass:"".concat(t,"-enter"),enterToClass:"".concat(t,"-enter-to"),enterActiveClass:"".concat(t,"-enter-active"),leaveClass:"".concat(t,"-leave"),leaveToClass:"".concat(t,"-leave-to"),leaveActiveClass:"".concat(t,"-leave-active")}})),vo=X&&!Z,mo="transition",yo="transitionend",go="animation",bo="animationend";vo&&(void 0===window.ontransitionend&&void 0!==window.onwebkittransitionend&&(mo="WebkitTransition",yo="webkitTransitionEnd"),void 0===window.onanimationend&&void 0!==window.onwebkitanimationend&&(go="WebkitAnimation",bo="webkitAnimationEnd"));var _o=X?window.requestAnimationFrame?window.requestAnimationFrame.bind(window):setTimeout:function(t){return t()};function xo(t){_o((function(){_o(t)}))}function wo(t,e){var n=t._transitionClasses||(t._transitionClasses=[]);n.indexOf(e)<0&&(n.push(e),lo(t,e))}function Co(t,e){t._transitionClasses&&x(t._transitionClasses,e),fo(t,e)}function Oo(t,e,n){var r=So(t,e),o=r.type,i=r.timeout,a=r.propCount;if(!o)return n();var s="transition"===o?yo:bo,c=0,u=function(){t.removeEventListener(s,l),n()},l=function(e){e.target===t&&++c>=a&&u()};setTimeout((function(){c0&&(n="transition",l=a,f=i.length):"animation"===e?u>0&&(n="animation",l=u,f=c.length):f=(n=(l=Math.max(a,u))>0?a>u?"transition":"animation":null)?"transition"===n?i.length:c.length:0,{type:n,timeout:l,propCount:f,hasTransform:"transition"===n&&$o.test(r[mo+"Property"])}}function ko(t,e){for(;t.length1}function Lo(t,e){!0!==e.data.show&&Eo(e)}var Mo=function(t){var e,n,r={},u=t.modules,l=t.nodeOps;for(e=0;e<$r.length;++e)for(r[$r[e]]=[],n=0;nh?_(t,i(n[y+1])?null:n[y+1].elm,n,d,y,r):d>y&&w(e,f,h)}(f,v,y,n,u):a(y)?(a(t.text)&&l.setTextContent(f,""),_(f,null,y,0,y.length-1,n)):a(v)?w(v,0,v.length-1):a(t.text)&&l.setTextContent(f,""):t.text!==e.text&&l.setTextContent(f,e.text),a(h)&&a(d=h.hook)&&a(d=d.postpatch)&&d(t,e)}}}function S(t,e,n){if(s(n)&&a(t.parent))t.parent.data.pendingInsert=e;else for(var r=0;r-1,a.selected!==i&&(a.selected=i);else if(D(Bo(a),r))return void(t.selectedIndex!==s&&(t.selectedIndex=s));o||(t.selectedIndex=-1)}}function No(t,e){return e.every((function(e){return!D(e,t)}))}function Bo(t){return"_value"in t?t._value:t.value}function Uo(t){t.target.composing=!0}function Fo(t){t.target.composing&&(t.target.composing=!1,zo(t.target,"input"))}function zo(t,e){var n=document.createEvent("HTMLEvents");n.initEvent(e,!0,!0),t.dispatchEvent(n)}function Vo(t){return!t.componentInstance||t.data&&t.data.transition?t:Vo(t.componentInstance._vnode)}var Ho={model:Ro,show:{bind:function(t,e,n){var r=e.value,o=(n=Vo(n)).data&&n.data.transition,i=t.__vOriginalDisplay="none"===t.style.display?"":t.style.display;r&&o?(n.data.show=!0,Eo(n,(function(){t.style.display=i}))):t.style.display=r?i:"none"},update:function(t,e,n){var r=e.value;!r!=!e.oldValue&&((n=Vo(n)).data&&n.data.transition?(n.data.show=!0,r?Eo(n,(function(){t.style.display=t.__vOriginalDisplay})):Po(n,(function(){t.style.display="none"}))):t.style.display=r?t.__vOriginalDisplay:"none")},unbind:function(t,e,n,r,o){o||(t.style.display=t.__vOriginalDisplay)}}},qo={name:String,appear:Boolean,css:Boolean,mode:String,type:String,enterClass:String,leaveClass:String,enterToClass:String,leaveToClass:String,enterActiveClass:String,leaveActiveClass:String,appearClass:String,appearActiveClass:String,appearToClass:String,duration:[Number,String,Object]};function Wo(t){var e=t&&t.componentOptions;return e&&e.Ctor.options.abstract?Wo(Oe(e.children)):t}function Go(t){var e={},n=t.$options;for(var r in n.propsData)e[r]=t[r];var o=n._parentListeners;for(var r in o)e[S(r)]=o[r];return e}function Ko(t,e){if(/\d-keep-alive$/.test(e.tag))return t("keep-alive",{props:e.componentOptions.propsData})}var Xo=function(t){return t.tag||he(t)},Yo=function(t){return"show"===t.name},Jo={name:"transition",props:qo,abstract:!0,render:function(t){var e=this,n=this.$slots.default;if(n&&(n=n.filter(Xo)).length){0;var r=this.mode;0;var o=n[0];if(function(t){for(;t=t.parent;)if(t.data.transition)return!0}(this.$vnode))return o;var i=Wo(o);if(!i)return o;if(this._leaving)return Ko(t,o);var a="__transition-".concat(this._uid,"-");i.key=null==i.key?i.isComment?a+"comment":a+i.tag:c(i.key)?0===String(i.key).indexOf(a)?i.key:a+i.key:i.key;var s=(i.data||(i.data={})).transition=Go(this),u=this._vnode,l=Wo(u);if(i.data.directives&&i.data.directives.some(Yo)&&(i.data.show=!0),l&&l.data&&!function(t,e){return e.key===t.key&&e.tag===t.tag}(i,l)&&!he(l)&&(!l.componentInstance||!l.componentInstance._vnode.isComment)){var f=l.data.transition=A({},s);if("out-in"===r)return this._leaving=!0,Gt(f,"afterLeave",(function(){e._leaving=!1,e.$forceUpdate()})),Ko(t,o);if("in-out"===r){if(he(i))return u;var p,d=function(){p()};Gt(s,"afterEnter",d),Gt(s,"enterCancelled",d),Gt(f,"delayLeave",(function(t){p=t}))}}return o}}},Zo=A({tag:String,moveClass:String},qo);function Qo(t){t.elm._moveCb&&t.elm._moveCb(),t.elm._enterCb&&t.elm._enterCb()}function ti(t){t.data.newPos=t.elm.getBoundingClientRect()}function ei(t){var e=t.data.pos,n=t.data.newPos,r=e.left-n.left,o=e.top-n.top;if(r||o){t.data.moved=!0;var i=t.elm.style;i.transform=i.WebkitTransform="translate(".concat(r,"px,").concat(o,"px)"),i.transitionDuration="0s"}}delete Zo.mode;var ni={Transition:Jo,TransitionGroup:{props:Zo,beforeMount:function(){var t=this,e=this._update;this._update=function(n,r){var o=Je(t);t.__patch__(t._vnode,t.kept,!1,!0),t._vnode=t.kept,o(),e.call(t,n,r)}},render:function(t){for(var e=this.tag||this.$vnode.data.tag||"span",n=Object.create(null),r=this.prevChildren=this.children,o=this.$slots.default||[],i=this.children=[],a=Go(this),s=0;s-1?gr[t]=e.constructor===window.HTMLUnknownElement||e.constructor===window.HTMLElement:gr[t]=/HTMLUnknownElement/.test(e.toString())},A(Gn.options.directives,Ho),A(Gn.options.components,ni),Gn.prototype.__patch__=X?Mo:M,Gn.prototype.$mount=function(t,e){return function(t,e,n){var r;t.$el=e,t.$options.render||(t.$options.render=ht),tn(t,"beforeMount"),r=function(){t._update(t._render(),n)},new qe(t,r,M,{before:function(){t._isMounted&&!t._isDestroyed&&tn(t,"beforeUpdate")}},!0),n=!1;var o=t._preWatchers;if(o)for(var i=0;i=0&&(e=t.slice(r),t=t.slice(0,r));var o=t.indexOf("?");return o>=0&&(n=t.slice(o+1),t=t.slice(0,o)),{path:t,query:n,hash:e}}(o.path||""),u=e&&e.path||"/",l=c.path?Ci(c.path,u,n||o.append):u,f=function(t,e,n){void 0===e&&(e={});var r,o=n||li;try{r=o(t||"")}catch(t){r={}}for(var i in e){var a=e[i];r[i]=Array.isArray(a)?a.map(ui):ui(a)}return r}(c.query,o.query,r&&r.options.parseQuery),p=o.hash||c.hash;return p&&"#"!==p.charAt(0)&&(p="#"+p),{_normalized:!0,path:l,query:f,hash:p}}var Hi,qi=function(){},Wi={name:"RouterLink",props:{to:{type:[String,Object],required:!0},tag:{type:String,default:"a"},custom:Boolean,exact:Boolean,exactPath:Boolean,append:Boolean,replace:Boolean,activeClass:String,exactActiveClass:String,ariaCurrentValue:{type:String,default:"page"},event:{type:[String,Array],default:"click"}},render:function(t){var e=this,n=this.$router,r=this.$route,o=n.resolve(this.to,r,this.append),i=o.location,a=o.route,s=o.href,c={},u=n.options.linkActiveClass,l=n.options.linkExactActiveClass,f=null==u?"router-link-active":u,p=null==l?"router-link-exact-active":l,d=null==this.activeClass?f:this.activeClass,h=null==this.exactActiveClass?p:this.exactActiveClass,v=a.redirectedFrom?di(null,Vi(a.redirectedFrom),null,n):a;c[h]=gi(r,v,this.exactPath),c[d]=this.exact||this.exactPath?c[h]:function(t,e){return 0===t.path.replace(pi,"/").indexOf(e.path.replace(pi,"/"))&&(!e.hash||t.hash===e.hash)&&function(t,e){for(var n in e)if(!(n in t))return!1;return!0}(t.query,e.query)}(r,v);var m=c[h]?this.ariaCurrentValue:null,y=function(t){Gi(t)&&(e.replace?n.replace(i,qi):n.push(i,qi))},g={click:Gi};Array.isArray(this.event)?this.event.forEach((function(t){g[t]=y})):g[this.event]=y;var b={class:c},_=!this.$scopedSlots.$hasNormal&&this.$scopedSlots.default&&this.$scopedSlots.default({href:s,route:a,navigate:y,isActive:c[d],isExactActive:c[h]});if(_){if(1===_.length)return _[0];if(_.length>1||!_.length)return 0===_.length?t():t("span",{},_)}if("a"===this.tag)b.on=g,b.attrs={href:s,"aria-current":m};else{var x=function t(e){var n;if(e)for(var r=0;r-1&&(s.params[p]=n.params[p]);return s.path=zi(l.path,s.params),c(l,s,a)}if(s.path){s.params={};for(var d=0;d-1}function $a(t,e){return Oa(t)&&t._isRouter&&(null==e||t.type===e)}function Sa(t,e,n){var r=function(o){o>=t.length?n():t[o]?e(t[o],(function(){r(o+1)})):r(o+1)};r(0)}function ka(t){return function(e,n,r){var o=!1,i=0,a=null;ja(t,(function(t,e,n,s){if("function"==typeof t&&void 0===t.cid){o=!0,i++;var c,u=Ta((function(e){var o;((o=e).__esModule||Pa&&"Module"===o[Symbol.toStringTag])&&(e=e.default),t.resolved="function"==typeof e?e:Hi.extend(e),n.components[s]=e,--i<=0&&r()})),l=Ta((function(t){var e="Failed to resolve async component "+s+": "+t;a||(a=Oa(t)?t:new Error(e),r(a))}));try{c=t(u,l)}catch(t){l(t)}if(c)if("function"==typeof c.then)c.then(u,l);else{var f=c.component;f&&"function"==typeof f.then&&f.then(u,l)}}})),o||r()}}function ja(t,e){return Ea(t.map((function(t){return Object.keys(t.components).map((function(n){return e(t.components[n],t.instances[n],t,n)}))})))}function Ea(t){return Array.prototype.concat.apply([],t)}var Pa="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag;function Ta(t){var e=!1;return function(){for(var n=[],r=arguments.length;r--;)n[r]=arguments[r];if(!e)return e=!0,t.apply(this,n)}}var Aa=function(t,e){this.router=t,this.base=function(t){if(!t)if(Ki){var e=document.querySelector("base");t=(t=e&&e.getAttribute("href")||"/").replace(/^https?:\/\/[^\/]+/,"")}else t="/";"/"!==t.charAt(0)&&(t="/"+t);return t.replace(/\/$/,"")}(e),this.current=vi,this.pending=null,this.ready=!1,this.readyCbs=[],this.readyErrorCbs=[],this.errorCbs=[],this.listeners=[]};function La(t,e,n,r){var o=ja(t,(function(t,r,o,i){var a=function(t,e){"function"!=typeof t&&(t=Hi.extend(t));return t.options[e]}(t,e);if(a)return Array.isArray(a)?a.map((function(t){return n(t,r,o,i)})):n(a,r,o,i)}));return Ea(r?o.reverse():o)}function Ma(t,e){if(e)return function(){return t.apply(e,arguments)}}Aa.prototype.listen=function(t){this.cb=t},Aa.prototype.onReady=function(t,e){this.ready?t():(this.readyCbs.push(t),e&&this.readyErrorCbs.push(e))},Aa.prototype.onError=function(t){this.errorCbs.push(t)},Aa.prototype.transitionTo=function(t,e,n){var r,o=this;try{r=this.router.match(t,this.current)}catch(t){throw this.errorCbs.forEach((function(e){e(t)})),t}var i=this.current;this.confirmTransition(r,(function(){o.updateRoute(r),e&&e(r),o.ensureURL(),o.router.afterHooks.forEach((function(t){t&&t(r,i)})),o.ready||(o.ready=!0,o.readyCbs.forEach((function(t){t(r)})))}),(function(t){n&&n(t),t&&!o.ready&&($a(t,ba.redirected)&&i===vi||(o.ready=!0,o.readyErrorCbs.forEach((function(e){e(t)}))))}))},Aa.prototype.confirmTransition=function(t,e,n){var r=this,o=this.current;this.pending=t;var i,a,s=function(t){!$a(t)&&Oa(t)&&(r.errorCbs.length?r.errorCbs.forEach((function(e){e(t)})):console.error(t)),n&&n(t)},c=t.matched.length-1,u=o.matched.length-1;if(gi(t,o)&&c===u&&t.matched[c]===o.matched[u])return this.ensureURL(),t.hash&&aa(this.router,o,t,!1),s(((a=wa(i=o,t,ba.duplicated,'Avoided redundant navigation to current location: "'+i.fullPath+'".')).name="NavigationDuplicated",a));var l=function(t,e){var n,r=Math.max(t.length,e.length);for(n=0;n0)){var e=this.router,n=e.options.scrollBehavior,r=va&&n;r&&this.listeners.push(ia());var o=function(){var n=t.current,o=Ia(t.base);t.current===vi&&o===t._startLocation||t.transitionTo(o,(function(t){r&&aa(e,t,n,!0)}))};window.addEventListener("popstate",o),this.listeners.push((function(){window.removeEventListener("popstate",o)}))}},e.prototype.go=function(t){window.history.go(t)},e.prototype.push=function(t,e,n){var r=this,o=this.current;this.transitionTo(t,(function(t){ma(Oi(r.base+t.fullPath)),aa(r.router,t,o,!1),e&&e(t)}),n)},e.prototype.replace=function(t,e,n){var r=this,o=this.current;this.transitionTo(t,(function(t){ya(Oi(r.base+t.fullPath)),aa(r.router,t,o,!1),e&&e(t)}),n)},e.prototype.ensureURL=function(t){if(Ia(this.base)!==this.current.fullPath){var e=Oi(this.base+this.current.fullPath);t?ma(e):ya(e)}},e.prototype.getCurrentLocation=function(){return Ia(this.base)},e}(Aa);function Ia(t){var e=window.location.pathname,n=e.toLowerCase(),r=t.toLowerCase();return!t||n!==r&&0!==n.indexOf(Oi(r+"/"))||(e=e.slice(t.length)),(e||"/")+window.location.search+window.location.hash}var Da=function(t){function e(e,n,r){t.call(this,e,n),r&&function(t){var e=Ia(t);if(!/^\/#/.test(e))return window.location.replace(Oi(t+"/#"+e)),!0}(this.base)||Na()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.setupListeners=function(){var t=this;if(!(this.listeners.length>0)){var e=this.router.options.scrollBehavior,n=va&&e;n&&this.listeners.push(ia());var r=function(){var e=t.current;Na()&&t.transitionTo(Ba(),(function(r){n&&aa(t.router,r,e,!0),va||za(r.fullPath)}))},o=va?"popstate":"hashchange";window.addEventListener(o,r),this.listeners.push((function(){window.removeEventListener(o,r)}))}},e.prototype.push=function(t,e,n){var r=this,o=this.current;this.transitionTo(t,(function(t){Fa(t.fullPath),aa(r.router,t,o,!1),e&&e(t)}),n)},e.prototype.replace=function(t,e,n){var r=this,o=this.current;this.transitionTo(t,(function(t){za(t.fullPath),aa(r.router,t,o,!1),e&&e(t)}),n)},e.prototype.go=function(t){window.history.go(t)},e.prototype.ensureURL=function(t){var e=this.current.fullPath;Ba()!==e&&(t?Fa(e):za(e))},e.prototype.getCurrentLocation=function(){return Ba()},e}(Aa);function Na(){var t=Ba();return"/"===t.charAt(0)||(za("/"+t),!1)}function Ba(){var t=window.location.href,e=t.indexOf("#");return e<0?"":t=t.slice(e+1)}function Ua(t){var e=window.location.href,n=e.indexOf("#");return(n>=0?e.slice(0,n):e)+"#"+t}function Fa(t){va?ma(Ua(t)):window.location.hash=t}function za(t){va?ya(Ua(t)):window.location.replace(Ua(t))}var Va=function(t){function e(e,n){t.call(this,e,n),this.stack=[],this.index=-1}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.push=function(t,e,n){var r=this;this.transitionTo(t,(function(t){r.stack=r.stack.slice(0,r.index+1).concat(t),r.index++,e&&e(t)}),n)},e.prototype.replace=function(t,e,n){var r=this;this.transitionTo(t,(function(t){r.stack=r.stack.slice(0,r.index).concat(t),e&&e(t)}),n)},e.prototype.go=function(t){var e=this,n=this.index+t;if(!(n<0||n>=this.stack.length)){var r=this.stack[n];this.confirmTransition(r,(function(){var t=e.current;e.index=n,e.updateRoute(r),e.router.afterHooks.forEach((function(e){e&&e(r,t)}))}),(function(t){$a(t,ba.duplicated)&&(e.index=n)}))}},e.prototype.getCurrentLocation=function(){var t=this.stack[this.stack.length-1];return t?t.fullPath:"/"},e.prototype.ensureURL=function(){},e}(Aa),Ha=function(t){void 0===t&&(t={}),this.app=null,this.apps=[],this.options=t,this.beforeHooks=[],this.resolveHooks=[],this.afterHooks=[],this.matcher=Ji(t.routes||[],this);var e=t.mode||"hash";switch(this.fallback="history"===e&&!va&&!1!==t.fallback,this.fallback&&(e="hash"),Ki||(e="abstract"),this.mode=e,e){case"history":this.history=new Ra(this,t.base);break;case"hash":this.history=new Da(this,t.base,this.fallback);break;case"abstract":this.history=new Va(this,t.base);break;default:0}},qa={currentRoute:{configurable:!0}};Ha.prototype.match=function(t,e,n){return this.matcher.match(t,e,n)},qa.currentRoute.get=function(){return this.history&&this.history.current},Ha.prototype.init=function(t){var e=this;if(this.apps.push(t),t.$once("hook:destroyed",(function(){var n=e.apps.indexOf(t);n>-1&&e.apps.splice(n,1),e.app===t&&(e.app=e.apps[0]||null),e.app||e.history.teardown()})),!this.app){this.app=t;var n=this.history;if(n instanceof Ra||n instanceof Da){var r=function(t){n.setupListeners(),function(t){var r=n.current,o=e.options.scrollBehavior;va&&o&&"fullPath"in t&&aa(e,t,r,!1)}(t)};n.transitionTo(n.getCurrentLocation(),r,r)}n.listen((function(t){e.apps.forEach((function(e){e._route=t}))}))}},Ha.prototype.beforeEach=function(t){return Ga(this.beforeHooks,t)},Ha.prototype.beforeResolve=function(t){return Ga(this.resolveHooks,t)},Ha.prototype.afterEach=function(t){return Ga(this.afterHooks,t)},Ha.prototype.onReady=function(t,e){this.history.onReady(t,e)},Ha.prototype.onError=function(t){this.history.onError(t)},Ha.prototype.push=function(t,e,n){var r=this;if(!e&&!n&&"undefined"!=typeof Promise)return new Promise((function(e,n){r.history.push(t,e,n)}));this.history.push(t,e,n)},Ha.prototype.replace=function(t,e,n){var r=this;if(!e&&!n&&"undefined"!=typeof Promise)return new Promise((function(e,n){r.history.replace(t,e,n)}));this.history.replace(t,e,n)},Ha.prototype.go=function(t){this.history.go(t)},Ha.prototype.back=function(){this.go(-1)},Ha.prototype.forward=function(){this.go(1)},Ha.prototype.getMatchedComponents=function(t){var e=t?t.matched?t:this.resolve(t).route:this.currentRoute;return e?[].concat.apply([],e.matched.map((function(t){return Object.keys(t.components).map((function(e){return t.components[e]}))}))):[]},Ha.prototype.resolve=function(t,e,n){var r=Vi(t,e=e||this.history.current,n,this),o=this.match(r,e),i=o.redirectedFrom||o.fullPath;return{location:r,route:o,href:function(t,e,n){var r="hash"===n?"#"+e:e;return t?Oi(t+"/"+r):r}(this.history.base,i,this.mode),normalizedTo:r,resolved:o}},Ha.prototype.getRoutes=function(){return this.matcher.getRoutes()},Ha.prototype.addRoute=function(t,e){this.matcher.addRoute(t,e),this.history.current!==vi&&this.history.transitionTo(this.history.getCurrentLocation())},Ha.prototype.addRoutes=function(t){this.matcher.addRoutes(t),this.history.current!==vi&&this.history.transitionTo(this.history.getCurrentLocation())},Object.defineProperties(Ha.prototype,qa);var Wa=Ha;function Ga(t,e){return t.push(e),function(){var n=t.indexOf(e);n>-1&&t.splice(n,1)}}Ha.install=function t(e){if(!t.installed||Hi!==e){t.installed=!0,Hi=e;var n=function(t){return void 0!==t},r=function(t,e){var r=t.$options._parentVnode;n(r)&&n(r=r.data)&&n(r=r.registerRouteInstance)&&r(t,e)};e.mixin({beforeCreate:function(){n(this.$options.router)?(this._routerRoot=this,this._router=this.$options.router,this._router.init(this),e.util.defineReactive(this,"_route",this._router.history.current)):this._routerRoot=this.$parent&&this.$parent._routerRoot||this,r(this,this)},destroyed:function(){r(this)}}),Object.defineProperty(e.prototype,"$router",{get:function(){return this._routerRoot._router}}),Object.defineProperty(e.prototype,"$route",{get:function(){return this._routerRoot._route}}),e.component("RouterView",xi),e.component("RouterLink",Wi);var o=e.config.optionMergeStrategies;o.beforeRouteEnter=o.beforeRouteLeave=o.beforeRouteUpdate=o.created}},Ha.version="3.6.5",Ha.isNavigationFailure=$a,Ha.NavigationFailureType=ba,Ha.START_LOCATION=vi,Ki&&window.Vue&&window.Vue.use(Ha);n(98);n(91),n(128);var Ka={"components/AlgoliaSearchBox":()=>Promise.all([n.e(0),n.e(15)]).then(n.bind(null,337)),"components/DropdownLink":()=>Promise.all([n.e(0),n.e(16)]).then(n.bind(null,260)),"components/DropdownTransition":()=>Promise.all([n.e(0),n.e(21)]).then(n.bind(null,248)),"components/Home":()=>Promise.all([n.e(0),n.e(18)]).then(n.bind(null,284)),"components/NavLink":()=>n.e(23).then(n.bind(null,247)),"components/NavLinks":()=>Promise.all([n.e(0),n.e(10)]).then(n.bind(null,271)),"components/Navbar":()=>Promise.all([n.e(0),n.e(1)]).then(n.bind(null,333)),"components/Page":()=>Promise.all([n.e(0),n.e(9)]).then(n.bind(null,285)),"components/PageEdit":()=>Promise.all([n.e(0),n.e(19)]).then(n.bind(null,273)),"components/PageNav":()=>Promise.all([n.e(0),n.e(17)]).then(n.bind(null,274)),"components/Sidebar":()=>Promise.all([n.e(0),n.e(8)]).then(n.bind(null,286)),"components/SidebarButton":()=>Promise.all([n.e(0),n.e(22)]).then(n.bind(null,287)),"components/SidebarGroup":()=>Promise.all([n.e(0),n.e(3)]).then(n.bind(null,272)),"components/SidebarLink":()=>Promise.all([n.e(0),n.e(20)]).then(n.bind(null,261)),"components/SidebarLinks":()=>Promise.all([n.e(0),n.e(3)]).then(n.bind(null,259)),"global-components/Badge":()=>Promise.all([n.e(0),n.e(4)]).then(n.bind(null,340)),"layouts/404":()=>n.e(5).then(n.bind(null,338)),"layouts/Layout":()=>Promise.all([n.e(0),n.e(1),n.e(2)]).then(n.bind(null,339)),NotFound:()=>n.e(5).then(n.bind(null,338)),Layout:()=>Promise.all([n.e(0),n.e(1),n.e(2)]).then(n.bind(null,339))},Xa={"v-c738551c":()=>n.e(24).then(n.bind(null,341)),"v-3907ddb9":()=>n.e(12).then(n.bind(null,342)),"v-be4ae48e":()=>n.e(25).then(n.bind(null,343)),"v-be8f934e":()=>n.e(13).then(n.bind(null,344)),"v-e26f188e":()=>n.e(11).then(n.bind(null,345)),"v-3d20953f":()=>n.e(14).then(n.bind(null,346)),"v-6f5e5462":()=>n.e(27).then(n.bind(null,347)),"v-9534154e":()=>n.e(26).then(n.bind(null,348))};function Ya(t){const e=Object.create(null);return function(n){return e[n]||(e[n]=t(n))}}const Ja=/-(\w)/g,Za=Ya(t=>t.replace(Ja,(t,e)=>e?e.toUpperCase():"")),Qa=/\B([A-Z])/g,ts=Ya(t=>t.replace(Qa,"-$1").toLowerCase()),es=Ya(t=>t.charAt(0).toUpperCase()+t.slice(1));function ns(t,e){if(!e)return;if(t(e))return t(e);return e.includes("-")?t(es(Za(e))):t(es(e))||t(ts(e))}const rs=Object.assign({},Ka,Xa),os=t=>rs[t],is=t=>Xa[t],as=t=>Ka[t],ss=t=>Gn.component(t);function cs(t){return ns(is,t)}function us(t){return ns(as,t)}function ls(t){return ns(os,t)}function fs(t){return ns(ss,t)}function ps(...t){return Promise.all(t.filter(t=>t).map(async t=>{if(!fs(t)&&ls(t)){const e=await ls(t)();Gn.component(t,e.default)}}))}function ds(t,e){"undefined"!=typeof window&&window.__VUEPRESS__&&(window.__VUEPRESS__[t]=e)}var hs=n(88),vs=n.n(hs),ms=n(89),ys=n.n(ms),gs={created(){if(this.siteMeta=this.$site.headTags.filter(([t])=>"meta"===t).map(([t,e])=>e),this.$ssrContext){const e=this.getMergedMetaTags();this.$ssrContext.title=this.$title,this.$ssrContext.lang=this.$lang,this.$ssrContext.pageMeta=(t=e)?t.map(t=>{let e="{e+=` ${n}="${ys()(t[n])}"`}),e+">"}).join("\n "):"",this.$ssrContext.canonicalLink=_s(this.$canonicalUrl)}var t},mounted(){this.currentMetaTags=[...document.querySelectorAll("meta")],this.updateMeta(),this.updateCanonicalLink()},methods:{updateMeta(){document.title=this.$title,document.documentElement.lang=this.$lang;const t=this.getMergedMetaTags();this.currentMetaTags=xs(t,this.currentMetaTags)},getMergedMetaTags(){const t=this.$page.frontmatter.meta||[];return vs()([{name:"description",content:this.$description}],t,this.siteMeta,ws)},updateCanonicalLink(){bs(),this.$canonicalUrl&&document.head.insertAdjacentHTML("beforeend",_s(this.$canonicalUrl))}},watch:{$page(){this.updateMeta(),this.updateCanonicalLink()}},beforeDestroy(){xs(null,this.currentMetaTags),bs()}};function bs(){const t=document.querySelector("link[rel='canonical']");t&&t.remove()}function _s(t=""){return t?``:""}function xs(t,e){if(e&&[...e].filter(t=>t.parentNode===document.head).forEach(t=>document.head.removeChild(t)),t)return t.map(t=>{const e=document.createElement("meta");return Object.keys(t).forEach(n=>{e.setAttribute(n,t[n])}),document.head.appendChild(e),e})}function ws(t){for(const e of["name","property","itemprop"])if(t.hasOwnProperty(e))return t[e]+e;return JSON.stringify(t)}var Cs=n(22),Os=n.n(Cs),$s={mounted(){window.addEventListener("scroll",this.onScroll)},methods:{onScroll:Os()((function(){this.setActiveHash()}),300),setActiveHash(){const t=[].slice.call(document.querySelectorAll(".sidebar-link")),e=[].slice.call(document.querySelectorAll(".header-anchor")).filter(e=>t.some(t=>t.hash===e.hash)),n=Math.max(window.pageYOffset,document.documentElement.scrollTop,document.body.scrollTop),r=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight),o=window.innerHeight+n;for(let t=0;t=i.parentElement.offsetTop+10&&(!a||n{this.$nextTick(()=>{this.$vuepress.$set("disableScrollBehavior",!1)})})}}}},beforeDestroy(){window.removeEventListener("scroll",this.onScroll)}},Ss=n(23),ks=n.n(Ss),js={mounted(){ks.a.configure({showSpinner:!1}),this.$router.beforeEach((t,e,n)=>{t.path===e.path||Gn.component(t.name)||ks.a.start(),n()}),this.$router.afterEach(()=>{ks.a.done(),this.isSidebarOpen=!1})}},Es=n(90),Ps=n.n(Es),Ts={mounted(){Ps.a.polyfill()}};n(236),n(237);class As{constructor(){this.containerEl=document.getElementById("message-container"),this.containerEl||(this.containerEl=document.createElement("div"),this.containerEl.id="message-container",document.body.appendChild(this.containerEl))}show({text:t="",duration:e=3e3}){let n=document.createElement("div");n.className="message move-in",n.innerHTML=`\n \n \n \n
${t}
\n `,this.containerEl.appendChild(n),e>0&&setTimeout(()=>{this.close(n)},e)}close(t){t.className=t.className.replace("move-in",""),t.className+="move-out",t.addEventListener("animationend",()=>{t.remove()})}}var Ls=[gs,$s,js,Ts,{mounted(){this.updateCopy()},watch:{$route:{handler(){this.updateCopy()}}},updated(){this.updateCopy()},methods:{updateCopy(){!!/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)||setTimeout(()=>{(['div[class*="language-"] pre','div[class*="aside-code"] aside']instanceof Array||Array.isArray(['div[class*="language-"] pre','div[class*="aside-code"] aside']))&&['div[class*="language-"] pre','div[class*="aside-code"] aside'].forEach(t=>{document.querySelectorAll(t).forEach(this.generateCopyButton)})},1e3)},generateCopyButton(t){if(t.classList.contains("codecopy-enabled"))return;const e=document.createElement("i");e.className="code-copy",e.innerHTML='',e.title="Click to Copy to Clipboard",e.addEventListener("click",()=>{this.copyToClipboard(t.innerText)}),t.appendChild(e),t.classList.add("codecopy-enabled")},copyToClipboard(t){const e=document.createElement("textarea");e.value=t,e.setAttribute("readonly",""),e.style.position="absolute",e.style.left="-9999px",document.body.appendChild(e);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);e.select(),document.execCommand("copy");(new As).show({text:"Copy successfully and then paste it for use.",duration:3e3}),document.body.removeChild(e),n&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n))}}}],Ms={name:"GlobalLayout",computed:{layout(){const t=this.getLayout();return ds("layout",t),Gn.component(t)}},methods:{getLayout(){if(this.$page.path){const t=this.$page.frontmatter.layout;return t&&(this.$vuepress.getLayoutAsyncComponent(t)||this.$vuepress.getVueComponent(t))?t:"Layout"}return"NotFound"}}},Rs=n(10),Is=Object(Rs.a)(Ms,(function(){return(0,this._self._c)(this.layout,{tag:"component"})}),[],!1,null,null,null).exports;!function(t,e,n){switch(e){case"components":t[e]||(t[e]={}),Object.assign(t[e],n);break;case"mixins":t[e]||(t[e]=[]),t[e].push(...n);break;default:throw new Error("Unknown option name.")}}(Is,"mixins",Ls);const Ds=[{name:"v-c738551c",path:"/2.x/products/",component:Is,beforeEnter:(t,e,n)=>{ps("Layout","v-c738551c").then(n)}},{path:"/2.x/products/index.html",redirect:"/2.x/products/"},{name:"v-3907ddb9",path:"/2.x/products/bundle.html",component:Is,beforeEnter:(t,e,n)=>{ps("Layout","v-3907ddb9").then(n)}},{name:"v-be4ae48e",path:"/2.x/products/downloadable.html",component:Is,beforeEnter:(t,e,n)=>{ps("Layout","v-be4ae48e").then(n)}},{name:"v-be8f934e",path:"/2.x/products/configurable.html",component:Is,beforeEnter:(t,e,n)=>{ps("Layout","v-be8f934e").then(n)}},{name:"v-e26f188e",path:"/2.x/products/simple.html",component:Is,beforeEnter:(t,e,n)=>{ps("Layout","v-e26f188e").then(n)}},{name:"v-3d20953f",path:"/2.x/products/virtual.html",component:Is,beforeEnter:(t,e,n)=>{ps("Layout","v-3d20953f").then(n)}},{name:"v-6f5e5462",path:"/",component:Is,beforeEnter:(t,e,n)=>{ps("Layout","v-6f5e5462").then(n)}},{path:"/index.html",redirect:"/"},{name:"v-9534154e",path:"/2.x/products/grouped.html",component:Is,beforeEnter:(t,e,n)=>{ps("Layout","v-9534154e").then(n)}},{path:"*",component:Is}],Ns={title:"Bagisto Documentation",description:"Bagisto Developer Portal",base:"/",headTags:[["link",{rel:"icon",type:"image/png",href:"/favicon.ico"}]],pages:[{title:"Product types",frontmatter:{},regularPath:"/2.x/products/",relativePath:"2.x/products/README.md",key:"v-c738551c",path:"/2.x/products/",lastUpdated:"1/16/2024, 1:20:23 PM",lastUpdatedTimestamp:1705411223e3},{title:"Bundle Product",frontmatter:{},regularPath:"/2.x/products/bundle.html",relativePath:"2.x/products/bundle.md",key:"v-3907ddb9",path:"/2.x/products/bundle.html",headers:[{level:3,title:"Steps To Create A Bundle Product In Bagisto 2.0",slug:"steps-to-create-a-bundle-product-in-bagisto-2-0"},{level:3,title:"General Settings",slug:"general-settings"},{level:3,title:"Description",slug:"description"},{level:3,title:"Meta Description",slug:"meta-description"},{level:3,title:"Images",slug:"images"},{level:3,title:"Bundle Item",slug:"bundle-item"},{level:3,title:"Product At Front End",slug:"product-at-front-end"}],lastUpdated:"1/16/2024, 1:20:23 PM",lastUpdatedTimestamp:1705411223e3},{title:"Downloadable Product",frontmatter:{},regularPath:"/2.x/products/downloadable.html",relativePath:"2.x/products/downloadable.md",key:"v-be4ae48e",path:"/2.x/products/downloadable.html",headers:[{level:3,title:"Steps to Create a Downloadable Product in Bagisto 2.0",slug:"steps-to-create-a-downloadable-product-in-bagisto-2-0"},{level:3,title:"General Settings",slug:"general-settings"},{level:3,title:"Description",slug:"description"},{level:3,title:"Meta Description",slug:"meta-description"},{level:3,title:"Price",slug:"price"},{level:3,title:"Images",slug:"images"},{level:3,title:"Downloadable Information",slug:"downloadable-information"},{level:3,title:"Samples",slug:"samples"},{level:3,title:"Product At Front End",slug:"product-at-front-end"}],lastUpdated:"1/16/2024, 1:20:23 PM",lastUpdatedTimestamp:1705411223e3},{title:"Configurable Product",frontmatter:{},regularPath:"/2.x/products/configurable.html",relativePath:"2.x/products/configurable.md",key:"v-be8f934e",path:"/2.x/products/configurable.html",headers:[{level:3,title:"How to Create a Configurable Product in Bagisto 2.0",slug:"how-to-create-a-configurable-product-in-bagisto-2-0"},{level:3,title:"General Attributes",slug:"general-attributes"},{level:3,title:"Description",slug:"description"},{level:3,title:"Meta Description",slug:"meta-description"},{level:3,title:"Images",slug:"images"},{level:3,title:"Front End",slug:"front-end"}],lastUpdated:"1/16/2024, 1:20:23 PM",lastUpdatedTimestamp:1705411223e3},{title:"Simple Product",frontmatter:{},regularPath:"/2.x/products/simple.html",relativePath:"2.x/products/simple.md",key:"v-e26f188e",path:"/2.x/products/simple.html",headers:[{level:3,title:"Create Simple Product in Bagisto 2.0",slug:"create-simple-product-in-bagisto-2-0"},{level:3,title:"General Attributes",slug:"general-attributes"},{level:3,title:"Description",slug:"description"},{level:3,title:"Meta Description",slug:"meta-description"},{level:3,title:"Images",slug:"images"},{level:3,title:"New",slug:"new"},{level:3,title:"Featured",slug:"featured"},{level:3,title:"Visible Individually",slug:"visible-individually"},{level:3,title:"Status",slug:"status"},{level:3,title:"Guest Checkout",slug:"guest-checkout"},{level:3,title:"Price",slug:"price"},{level:3,title:"Shipping",slug:"shipping"},{level:3,title:"Inventories",slug:"inventories"},{level:3,title:"Front End",slug:"front-end"}],lastUpdated:"1/16/2024, 1:20:23 PM",lastUpdatedTimestamp:1705411223e3},{title:"Virtual Product",frontmatter:{},regularPath:"/2.x/products/virtual.html",relativePath:"2.x/products/virtual.md",key:"v-3d20953f",path:"/2.x/products/virtual.html",headers:[{level:3,title:"Steps To Create Virtual Product In Bagisto 2.0",slug:"steps-to-create-virtual-product-in-bagisto-2-0"},{level:3,title:"General Settings",slug:"general-settings"},{level:3,title:"Description",slug:"description"},{level:3,title:"Meta Description",slug:"meta-description"},{level:3,title:"Images",slug:"images"},{level:3,title:"Inventory",slug:"inventory"},{level:3,title:"Price",slug:"price"},{level:3,title:"Product At Front End",slug:"product-at-front-end"}],lastUpdated:"1/16/2024, 1:20:23 PM",lastUpdatedTimestamp:1705411223e3},{title:"Home",frontmatter:{home:!0,heroText:"Bagisto User Guide",tagline:"Find detailed documentation and code examples.",actionText:"Get Started →",actionLink:"/2.x/products/",features:[{title:"Package creation",details:"Learn how to create a new package for Bagisto."},{title:"Digging Deeper",details:"Learn advanced topics like payment methods, shipping methods."},{title:"Custom theme",details:"Learn how to create or customize a theme for Bagisto."}],footer:"Copyright © 2023 Bagisto"},regularPath:"/",relativePath:"README.md",key:"v-6f5e5462",path:"/",lastUpdated:"1/16/2024, 1:20:23 PM",lastUpdatedTimestamp:1705411223e3},{title:"Grouped Product",frontmatter:{},regularPath:"/2.x/products/grouped.html",relativePath:"2.x/products/grouped.md",key:"v-9534154e",path:"/2.x/products/grouped.html",headers:[{level:3,title:"Steps to Create a Grouped Product in Bagisto 2.0",slug:"steps-to-create-a-grouped-product-in-bagisto-2-0"},{level:3,title:"General Settings",slug:"general-settings"},{level:3,title:"Price",slug:"price"},{level:3,title:"Description",slug:"description"},{level:3,title:"Meta Description",slug:"meta-description"},{level:3,title:"Images",slug:"images"},{level:3,title:"Grouped Products",slug:"grouped-products"},{level:3,title:"Product at Front End",slug:"product-at-front-end"}],lastUpdated:"1/16/2024, 1:20:23 PM",lastUpdatedTimestamp:1705411223e3}],themeConfig:{smoothScroll:!0,lastUpdated:"Last Updated",repo:"bagisto/bagisto",repoLabel:"Contribute to Bagisto",docsRepo:"bagisto/bagisto-docs",docsDir:"docs",docsBranch:"master",editLinks:!0,editLinkText:"Help us improve this page on Github.",logo:"/logo.png",nav:[{text:"Home",link:"/"},{text:"Extensions",link:"https://bagisto.com/en/extensions/"},{text:"Community Forum",link:"https://forums.bagisto.com/"}],sidebar:{"/2.x/":[{title:"Product Types",path:"/2.x/products",collapsable:!0,children:[["/2.x/products/simple","Simple Product"],["/2.x/products/configurable","Configurable Product"],["/2.x/products/virtual","Virtual Product"],["/2.x/products/bundle","Bundle Product"],["/2.x/products/grouped","Grouped Product"],["/2.x/products/downloadable","Downloadable Product"]]}]}}};n(238);Gn.component("Badge",()=>Promise.all([n.e(0),n.e(4)]).then(n.bind(null,340)));n(239),n(240);function Bs(t){const e=document.documentElement.getBoundingClientRect(),n=t.getBoundingClientRect();return{x:n.left-e.left,y:n.top-e.top}}class Us{constructor(t){Object.defineProperty(this,"registration",{value:t,configurable:!0,writable:!0})}update(){return this.registration.update()}skipWaiting(){const t=this.registration.waiting;return t?(console.log("[vuepress:sw] Doing worker.skipWaiting()."),new Promise((e,n)=>{const r=new MessageChannel;r.port1.onmessage=t=>{console.log("[vuepress:sw] Done worker.skipWaiting()."),t.data.error?n(t.data.error):e(t.data)},t.postMessage({type:"skip-waiting"},[r.port2])})):Promise.resolve()}}var Fs=new Gn;var zs={name:"BackToTop",props:{threshold:{type:Number,default:300}},data:()=>({scrollTop:null}),computed:{show(){return this.scrollTop>this.threshold}},mounted(){this.scrollTop=this.getScrollTop(),window.addEventListener("scroll",Os()(()=>{this.scrollTop=this.getScrollTop()},100))},methods:{getScrollTop:()=>window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0,scrollToTop(){window.scrollTo({top:0,behavior:"smooth"}),this.scrollTop=0}}},Vs=(n(241),Object(Rs.a)(zs,(function(){var t=this._self._c;return t("transition",{attrs:{name:"fade"}},[this.show?t("svg",{staticClass:"go-to-top",attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 49.484 28.284"},on:{click:this.scrollToTop}},[t("g",{attrs:{transform:"translate(-229 -126.358)"}},[t("rect",{attrs:{fill:"currentColor",width:"35",height:"5",rx:"2",transform:"translate(229 151.107) rotate(-45)"}}),this._v(" "),t("rect",{attrs:{fill:"currentColor",width:"35",height:"5",rx:"2",transform:"translate(274.949 154.642) rotate(-135)"}})])]):this._e()])}),[],!1,null,"5fd4ef0c",null).exports),Hs=[{},({Vue:t})=>{t.mixin({computed:{$dataBlock(){return this.$options.__data__block__}}})},{},{},({Vue:t,router:e})=>{e.options.scrollBehavior=(e,n,r)=>{if(r)return window.scrollTo({top:r.y,behavior:"smooth"});if(e.hash){if(t.$vuepress.$get("disableScrollBehavior"))return!1;const n=document.querySelector(e.hash);return!!n&&window.scrollTo({top:Bs(n).y,behavior:"smooth"})}return window.scrollTo({top:0,behavior:"smooth"})}},async({router:t,isServer:e})=>{if(!e){const{register:e}=await n.e(28).then(n.bind(null,334));t.onReady(()=>{e("/service-worker.js",{registrationOptions:{},ready(){console.log("[vuepress:sw] Service worker is active."),Fs.$emit("sw-ready")},cached(t){console.log("[vuepress:sw] Content has been cached for offline use."),Fs.$emit("sw-cached",new Us(t))},updated(t){console.log("[vuepress:sw] Content updated."),Fs.$emit("sw-updated",new Us(t))},offline(){console.log("[vuepress:sw] No internet connection found. App is running in offline mode."),Fs.$emit("sw-offline")},error(t){console.error("[vuepress:sw] Error during service worker registration:",t),Fs.$emit("sw-error",t),GA_ID&&ga("send","exception",{exDescription:t.message,exFatal:!1})}})})}},({Vue:t})=>{t.component("BackToTop",Vs)}],qs=["BackToTop"];class Ws extends class{constructor(){this.store=new Gn({data:{state:{}}})}$get(t){return this.store.state[t]}$set(t,e){Gn.set(this.store.state,t,e)}$emit(...t){this.store.$emit(...t)}$on(...t){this.store.$on(...t)}}{}Object.assign(Ws.prototype,{getPageAsyncComponent:cs,getLayoutAsyncComponent:us,getAsyncComponent:ls,getVueComponent:fs});var Gs={install(t){const e=new Ws;t.$vuepress=e,t.prototype.$vuepress=e}};function Ks(t,e){const n=e.toLowerCase();return t.options.routes.some(t=>t.path.toLowerCase()===n)}var Xs={props:{pageKey:String,slotKey:{type:String,default:"default"}},render(t){const e=this.pageKey||this.$parent.$page.key;return ds("pageKey",e),Gn.component(e)||Gn.component(e,cs(e)),Gn.component(e)?t(e):t("")}},Ys={functional:!0,props:{slotKey:String,required:!0},render:(t,{props:e,slots:n})=>t("div",{class:["content__"+e.slotKey]},n()[e.slotKey])},Js={computed:{openInNewWindowTitle(){return this.$themeLocaleConfig.openNewWindowText||"(opens new window)"}}},Zs=(n(242),n(243),Object(Rs.a)(Js,(function(){var t=this._self._c;return t("span",[t("svg",{staticClass:"icon outbound",attrs:{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",focusable:"false",x:"0px",y:"0px",viewBox:"0 0 100 100",width:"15",height:"15"}},[t("path",{attrs:{fill:"currentColor",d:"M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"}}),this._v(" "),t("polygon",{attrs:{fill:"currentColor",points:"45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"}})]),this._v(" "),t("span",{staticClass:"sr-only"},[this._v(this._s(this.openInNewWindowTitle))])])}),[],!1,null,null,null).exports),Qs={functional:!0,render(t,{parent:e,children:n}){if(e._isMounted)return n;e.$once("hook:mounted",()=>{e.$forceUpdate()})}};Gn.config.productionTip=!1,Gn.use(Wa),Gn.use(Gs),Gn.mixin(function(t,e,n=Gn){!function(t){t.locales&&Object.keys(t.locales).forEach(e=>{t.locales[e].path=e});Object.freeze(t)}(e),n.$vuepress.$set("siteData",e);const r=new(t(n.$vuepress.$get("siteData"))),o=Object.getOwnPropertyDescriptors(Object.getPrototypeOf(r)),i={};return Object.keys(o).reduce((t,e)=>(e.startsWith("$")&&(t[e]=o[e].get),t),i),{computed:i}}(t=>class{setPage(t){this.__page=t}get $site(){return t}get $themeConfig(){return this.$site.themeConfig}get $frontmatter(){return this.$page.frontmatter}get $localeConfig(){const{locales:t={}}=this.$site;let e,n;for(const r in t)"/"===r?n=t[r]:0===this.$page.path.indexOf(r)&&(e=t[r]);return e||n||{}}get $siteTitle(){return this.$localeConfig.title||this.$site.title||""}get $canonicalUrl(){const{canonicalUrl:t}=this.$page.frontmatter;return"string"==typeof t&&t}get $title(){const t=this.$page,{metaTitle:e}=this.$page.frontmatter;if("string"==typeof e)return e;const n=this.$siteTitle,r=t.frontmatter.home?null:t.frontmatter.title||t.title;return n?r?r+" | "+n:n:r||"VuePress"}get $description(){const t=function(t){if(t){const e=t.filter(t=>"description"===t.name)[0];if(e)return e.content}}(this.$page.frontmatter.meta);return t||(this.$page.frontmatter.description||this.$localeConfig.description||this.$site.description||"")}get $lang(){return this.$page.frontmatter.lang||this.$localeConfig.lang||"en-US"}get $localePath(){return this.$localeConfig.path||"/"}get $themeLocaleConfig(){return(this.$site.themeConfig.locales||{})[this.$localePath]||{}}get $page(){return this.__page?this.__page:function(t,e){for(let n=0;nn||(t.hash?!Gn.$vuepress.$get("disableScrollBehavior")&&{selector:decodeURIComponent(t.hash)}:{x:0,y:0})});!function(t){t.beforeEach((e,n,r)=>{if(Ks(t,e.path))r();else if(/(\/|\.html)$/.test(e.path))if(/\/$/.test(e.path)){const n=e.path.replace(/\/$/,"")+".html";Ks(t,n)?r(n):r()}else r();else{const n=e.path+"/",o=e.path+".html";Ks(t,o)?r(o):Ks(t,n)?r(n):r()}})}(n);const r={};try{await Promise.all(Hs.filter(t=>"function"==typeof t).map(e=>e({Vue:Gn,options:r,router:n,siteData:Ns,isServer:t})))}catch(t){console.error(t)}return{app:new Gn(Object.assign(r,{router:n,render:t=>t("div",{attrs:{id:"app"}},[t("RouterView",{ref:"layout"}),t("div",{class:"global-ui"},qs.map(e=>t(e)))])})),router:n}}(!1).then(({app:t,router:e})=>{e.onReady(()=>{t.$mount("#app")})})}]); \ No newline at end of file diff --git a/docs/.vuepress/dist/assets/js/vendors~docsearch.1a0149e0.js b/docs/.vuepress/dist/assets/js/vendors~docsearch.1a0149e0.js new file mode 100644 index 00000000..5f673bc1 --- /dev/null +++ b/docs/.vuepress/dist/assets/js/vendors~docsearch.1a0149e0.js @@ -0,0 +1,3 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[7],{335:function(t,e,n){ +/*! docsearch 2.6.3 | © Algolia | github.com/algolia/docsearch */ +var r;"undefined"!=typeof self&&self,r=function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:r})},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=22)}([function(t,e,n){"use strict";var r,i=n(1);function s(t){return t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}t.exports={isArray:null,isFunction:null,isObject:null,bind:null,each:null,map:null,mixin:null,isMsie:function(t){if(void 0===t&&(t=navigator.userAgent),/(msie|trident)/i.test(t)){var e=t.match(/(msie |rv:)(\d+(.\d+)?)/i);if(e)return e[2]}return!1},escapeRegExChars:function(t){return t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")},isNumber:function(t){return"number"==typeof t},toStr:function(t){return null==t?"":t+""},cloneDeep:function(t){var e=this.mixin({},t),n=this;return this.each(e,(function(t,r){t&&(n.isArray(t)?e[r]=[].concat(t):n.isObject(t)&&(e[r]=n.cloneDeep(t)))})),e},error:function(t){throw new Error(t)},every:function(t,e){var n=!0;return t?(this.each(t,(function(r,i){n&&(n=e.call(null,r,i,t)&&n)})),!!n):n},any:function(t,e){var n=!1;return t?(this.each(t,(function(r,i){if(e.call(null,r,i,t))return n=!0,!1})),n):n},getUniqueId:(r=0,function(){return r++}),templatify:function(t){if(this.isFunction(t))return t;var e=i.element(t);return"SCRIPT"===e.prop("tagName")?function(){return e.text()}:function(){return String(t)}},defer:function(t){setTimeout(t,0)},noop:function(){},formatPrefix:function(t,e){return e?"":t+"-"},className:function(t,e,n){return(n?"":".")+t+e},escapeHighlightedString:function(t,e,n){e=e||"";var r=document.createElement("div");r.appendChild(document.createTextNode(e)),n=n||"";var i=document.createElement("div");i.appendChild(document.createTextNode(n));var o=document.createElement("div");return o.appendChild(document.createTextNode(t)),o.innerHTML.replace(RegExp(s(r.innerHTML),"g"),e).replace(RegExp(s(i.innerHTML),"g"),n)}}},function(t,e,n){"use strict";t.exports={element:null}},function(t,e){var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString;t.exports=function(t,e,i){if("[object Function]"!==r.call(e))throw new TypeError("iterator must be a function");var s=t.length;if(s===+s)for(var o=0;o was loaded but did not call our provided callback"),JSONPScriptError:s("JSONPScriptError"," + + diff --git a/docs/.vuepress/dist/logo.png b/docs/.vuepress/dist/logo.png new file mode 100644 index 00000000..fd410637 Binary files /dev/null and b/docs/.vuepress/dist/logo.png differ diff --git a/docs/.vuepress/dist/service-worker.js b/docs/.vuepress/dist/service-worker.js new file mode 100644 index 00000000..43bff141 --- /dev/null +++ b/docs/.vuepress/dist/service-worker.js @@ -0,0 +1,325 @@ +/** + * Welcome to your Workbox-powered service worker! + * + * You'll need to register this file in your web app and you should + * disable HTTP caching for this file too. + * See https://goo.gl/nhQhGp + * + * The rest of the code is auto-generated. Please don't update this file + * directly; instead, make changes to your Workbox build configuration + * and re-run your build process. + * See https://goo.gl/2aRDsh + */ + +importScripts("https://storage.googleapis.com/workbox-cdn/releases/4.3.1/workbox-sw.js"); + +self.addEventListener('message', (event) => { + if (event.data && event.data.type === 'SKIP_WAITING') { + self.skipWaiting(); + } +}); + +/** + * The workboxSW.precacheAndRoute() method efficiently caches and responds to + * requests for URLs in the manifest. + * See https://goo.gl/S9QRab + */ +self.__precacheManifest = [ + { + "url": "2.x/products/bundle.html", + "revision": "464b18d0d65af03773773ddf58047352" + }, + { + "url": "2.x/products/configurable.html", + "revision": "621a1451ce34a1748e73a0eaf3a72cf6" + }, + { + "url": "2.x/products/downloadable.html", + "revision": "eef129f57d222bae616e4913c2702b77" + }, + { + "url": "2.x/products/grouped.html", + "revision": "7e598605b8c0a1b42fd42650ab1dc6d2" + }, + { + "url": "2.x/products/index.html", + "revision": "ef7cf28f088a57b759b3231f1134fdea" + }, + { + "url": "2.x/products/simple.html", + "revision": "0b2396b0d6f25a91bdb33c4ebda0b56e" + }, + { + "url": "2.x/products/virtual.html", + "revision": "fd4433d66f29eb950835aac1e6b3d5bb" + }, + { + "url": "404.html", + "revision": "eee9d705cbaa445feee7877fd8a6fd51" + }, + { + "url": "assets/css/0.styles.ab9466d3.css", + "revision": "a7946032f7d67be5525dcdbe05829b9e" + }, + { + "url": "assets/img/bundle.5302b129.png", + "revision": "5302b129967146ebc686735ba8c55ff0" + }, + { + "url": "assets/img/bundleOptions.01cb8cdc.png", + "revision": "01cb8cdc5eeee8f6684dd51da2050d5a" + }, + { + "url": "assets/img/configurable.9fa6fb76.png", + "revision": "9fa6fb7664af716acdf07eb82708f5ba" + }, + { + "url": "assets/img/configurableAttributes.0341eddd.png", + "revision": "0341eddd298735466ee157f6485d9706" + }, + { + "url": "assets/img/description.40848a5f.png", + "revision": "40848a5f5f247f682852c84998efa3c0" + }, + { + "url": "assets/img/description.8a01022f.png", + "revision": "8a01022faa9c7169b3b464d3b50ae2db" + }, + { + "url": "assets/img/description.cf62b04a.png", + "revision": "cf62b04aa2f445f10339b56579fa52f8" + }, + { + "url": "assets/img/descriptions.765ffef8.png", + "revision": "765ffef8e6c1d256cd89e6cd63e8a99e" + }, + { + "url": "assets/img/editProduct.a0f174d2.png", + "revision": "a0f174d28c7d61054863da62174ba8d1" + }, + { + "url": "assets/img/editProduct.f3d03ba3.png", + "revision": "f3d03ba38a9663379dd57eb22b49d626" + }, + { + "url": "assets/img/editProduct.fff08496.png", + "revision": "fff0849642df2f8807b13fad295e8837" + }, + { + "url": "assets/img/editProducts.1d1ea4f3.png", + "revision": "1d1ea4f388a0ccd939097fe3c8139328" + }, + { + "url": "assets/img/image.6a9cc529.png", + "revision": "6a9cc529f91e47c9fed2a5bca27de29a" + }, + { + "url": "assets/img/image.ac99298b.png", + "revision": "ac99298bc7c874fc29cd2279398e2655" + }, + { + "url": "assets/img/image.b30e57d4.png", + "revision": "b30e57d4619cab816c7f63f1f039c26a" + }, + { + "url": "assets/img/image.e99c275b.png", + "revision": "e99c275be41933e50a8ebfbb862e0e59" + }, + { + "url": "assets/img/metaDescription.16764ed9.png", + "revision": "16764ed924978ceba5e8309f09f5ca78" + }, + { + "url": "assets/img/metaDescription.74f66c89.png", + "revision": "74f66c899f15052cfaaa76033580ef0e" + }, + { + "url": "assets/img/metaDescription.afb36600.png", + "revision": "afb36600eab84ea9868a197a962dde20" + }, + { + "url": "assets/img/metaDescriptions.4dfbc31b.png", + "revision": "4dfbc31baabc5bdc385e298bb43d42b2" + }, + { + "url": "assets/img/options.001937e2.png", + "revision": "001937e250d31e5f629729cfe7151e50" + }, + { + "url": "assets/img/output.31b099f6.png", + "revision": "31b099f668578a9215701cbe7e382c5a" + }, + { + "url": "assets/img/output.c8ed1df3.png", + "revision": "c8ed1df3080c6c55af735ddb1d491ff7" + }, + { + "url": "assets/img/output.cc9621ee.png", + "revision": "cc9621eecc949453e93b99ae86a9ce7e" + }, + { + "url": "assets/img/price.86fae45c.png", + "revision": "86fae45cb1a4e4afe4bde5667ab03074" + }, + { + "url": "assets/img/price.b32785ac.png", + "revision": "b32785acffd1121a1079927e0670f95a" + }, + { + "url": "assets/img/product.4402c959.png", + "revision": "4402c959fad67f9bbeb0855e84b8e541" + }, + { + "url": "assets/img/search.83621669.svg", + "revision": "83621669651b9a3d4bf64d1a670ad856" + }, + { + "url": "assets/img/simple.548f03a1.png", + "revision": "548f03a1366af976be5f6baa86428155" + }, + { + "url": "assets/img/toggleButtons.db6f5a12.png", + "revision": "db6f5a120e98bbbf4768bbe493ad4a67" + }, + { + "url": "assets/img/variations.9be19c16.png", + "revision": "9be19c168dd7dc86d64dd341abb15832" + }, + { + "url": "assets/img/virtual.e6449259.png", + "revision": "e64492590e33b4093062965c17de2d84" + }, + { + "url": "assets/js/1.8d1309f7.js", + "revision": "7c455b29f8958a5845277e4e0c1965f4" + }, + { + "url": "assets/js/10.223754d8.js", + "revision": "41fccd27db8a1faab039495fb9c632e0" + }, + { + "url": "assets/js/11.535d309e.js", + "revision": "43d2beda3fe9e287cb7ae6391dee38c5" + }, + { + "url": "assets/js/12.7f15ecab.js", + "revision": "f3d43ed3aeefc36f5d0fa01670677329" + }, + { + "url": "assets/js/13.f0f5caa8.js", + "revision": "a69dedf690256df27fe170a40dde1b4c" + }, + { + "url": "assets/js/14.b21af8fa.js", + "revision": "abd0a8c815cfa28de1904ca9bfa068cb" + }, + { + "url": "assets/js/15.bf289bd8.js", + "revision": "2a6f16366a6f9fd6d1d894b85502ae1f" + }, + { + "url": "assets/js/16.d50a6791.js", + "revision": "3079d0b6167083f6f425eabffd0020e5" + }, + { + "url": "assets/js/17.89eadde8.js", + "revision": "21b285663a2ed94712fea32ee9bdd4f2" + }, + { + "url": "assets/js/18.b06ccb03.js", + "revision": "b26f6ad7332390336af978a31607c870" + }, + { + "url": "assets/js/19.f79aca12.js", + "revision": "1dc105c27133ddabf952c85d1832b3ed" + }, + { + "url": "assets/js/2.e48b8fe5.js", + "revision": "7f9357088ade3b50ac80e1a2ac42699b" + }, + { + "url": "assets/js/20.f18130ba.js", + "revision": "916ed201b4d4368bc4841975cd819af8" + }, + { + "url": "assets/js/21.b038100c.js", + "revision": "f28c5746622e65c7450cfc1e3247280a" + }, + { + "url": "assets/js/22.90205bc8.js", + "revision": "6f4586dc52e0465574c93644e72bf6ea" + }, + { + "url": "assets/js/23.ccf18d64.js", + "revision": "61c3e060b850d9197f11c8e95304689f" + }, + { + "url": "assets/js/24.ca58c34f.js", + "revision": "8a67519f8949f6e7171ab4ef087d9f0f" + }, + { + "url": "assets/js/25.97c7788e.js", + "revision": "00babb2468c984a96b6cea024ab2407e" + }, + { + "url": "assets/js/26.ff11d878.js", + "revision": "624a850f90451817da6b89e7992a02eb" + }, + { + "url": "assets/js/27.9d9d11ce.js", + "revision": "4cedd3a577ae5e1c1c77e884a884888f" + }, + { + "url": "assets/js/28.7b9f99ce.js", + "revision": "be51a4486bd8713d919be9d91a87b33a" + }, + { + "url": "assets/js/3.63669f64.js", + "revision": "0c99edb6179dd07118a185ad4b3b8859" + }, + { + "url": "assets/js/4.4ac0bcc1.js", + "revision": "b6fbd191fccfb1c49aa1b40d5238faa1" + }, + { + "url": "assets/js/5.07da705c.js", + "revision": "78a02ecd64d68456c43f1708dc089254" + }, + { + "url": "assets/js/8.29c8b4a7.js", + "revision": "9f3c5e7665d04fab4cf54c80fef5f2aa" + }, + { + "url": "assets/js/9.e70a4052.js", + "revision": "c05649f62419f75676de5e441cc09e72" + }, + { + "url": "assets/js/app.a6cf5ef7.js", + "revision": "2c9a42b38ac5258f3fec1dbb864510ea" + }, + { + "url": "assets/js/vendors~docsearch.1a0149e0.js", + "revision": "9eedd14f355fc7447364cf3a805d2885" + }, + { + "url": "index.html", + "revision": "a15f7400b00f7e39d3ee63ab35a44ee6" + }, + { + "url": "logo.png", + "revision": "7623b31ea8912e775aa903f3da491179" + } +].concat(self.__precacheManifest || []); +workbox.precaching.precacheAndRoute(self.__precacheManifest, {}); +addEventListener('message', event => { + const replyPort = event.ports[0] + const message = event.data + if (replyPort && message && message.type === 'skip-waiting') { + event.waitUntil( + self.skipWaiting().then( + () => replyPort.postMessage({ error: null }), + error => replyPort.postMessage({ error }) + ) + ) + } +}) diff --git a/docs/.vuepress/theme/components/NavLinks.vue b/docs/.vuepress/theme/components/NavLinks.vue index 49b4ec4e..060abbdc 100644 --- a/docs/.vuepress/theme/components/NavLinks.vue +++ b/docs/.vuepress/theme/components/NavLinks.vue @@ -33,8 +33,6 @@ @@ -60,12 +58,6 @@ export default { }; }, - mounted() { - let currentPath = this.$route.path.split('/'); - - this.version = currentPath[1]; - }, - computed: { userNav () { return this.$themeLocaleConfig.nav || this.$site.themeConfig.nav || [] diff --git a/docs/.vuepress/version-configs/1.5.x.js b/docs/.vuepress/version-configs/1.5.x.js deleted file mode 100644 index 467f27a2..00000000 --- a/docs/.vuepress/version-configs/1.5.x.js +++ /dev/null @@ -1,101 +0,0 @@ -/* set version */ -let version = '1.5.x'; - -/* version prefix setter */ -function setVersionPrefix(children) { - if (children.constructor === Array) { - return children.map(child => { - child[0] = `/${version}/${child[0]}`; - return child; - }); - } - return `/${version}/${children}`; -} - -/* module export */ -module.exports = [ - { - title: 'Prologue', - path: setVersionPrefix('prologue'), - collapsable: true, - children: setVersionPrefix([ - ['prologue/upgrade-guide', 'Upgrade Guide'], - ['prologue/contribution-guide', ' Contribution Guide'] - ]) - }, - { - title: 'Introduction', - path: setVersionPrefix('introduction'), - collapsable: true, - children: setVersionPrefix([ - ['introduction/requirements', 'Requirements'], - ['introduction/installation', 'Installation'], - ['introduction/docker', 'Docker'] - ]) - }, - { - title: 'Architecture concepts', - path: setVersionPrefix('architecture'), - collapsable: true, - children: setVersionPrefix([ - ['architecture/packages', 'Packages'], - ['architecture/frontend', 'Frontend'], - ['architecture/theme', 'Theme'], - ['architecture/performance', 'Performance'], - ['architecture/repository-pattern', 'Repository Pattern'], - ['architecture/modular-design', 'Modular Design'] - ]) - }, - { - title: 'Package Development', - path: setVersionPrefix('packages'), - collapsable: true, - children: setVersionPrefix([ - ['packages/create-package', 'Getting Started'], - ['packages/create-migrations', 'Migrations'], - ['packages/create-models', 'Models'], - ['packages/store-data-through-repositories', 'Repository'], - ['packages/routes', 'Routes'], - ['packages/controllers', 'Controllers'], - ['packages/views', 'Views'], - ['packages/localization', 'Localization'], - ['packages/layouts', 'Layouts'], - ['packages/assets', 'Assets'], - ['packages/add-menu-in-admin', 'Admin Menu'], - ['packages/customize-hompepage-menu.md', 'Homepage Menu'], - ['packages/validation', 'Validation'], - ['packages/datagrid', 'DataGrid'], - ['packages/create-acl', 'Access Control List'], - ['packages/create-custom-configuration', 'Custom Configuration'] - ]) - }, - { - title: 'Digging Deeper', - path: setVersionPrefix('advanced'), - collapsable: true, - children: setVersionPrefix([ - ['advanced/create-shipping-method', 'Shipping Method'], - ['advanced/create-payment-method', 'Payment Method'], - ['advanced/create-product-type', 'Product Type'], - ['advanced/events', 'Events Listeners'], - ['advanced/helpers', 'Helpers'], - ['advanced/override-core-model', 'Override Core Models'], - ['advanced/render-event', 'View Render Event'], - ['advanced/change-email-template.md', 'Email Template'], - ['advanced/indexing-products-to-elasticsearch.md', 'Configure Elasticsearch'], - ['advanced/security-practice', 'Best Security Practices'], - ]) - }, - { - title: 'Themes', - path: setVersionPrefix('themes'), - collapsable: true, - children: setVersionPrefix([ - ['themes/create-theme', 'Store Theme'], - ['themes/create-admin-theme', 'Admin Theme'], - ['themes/notification', 'Real Time Notification'], - ['themes/integrate-image-search-in-theme', 'Image Search'] - ]) - } - -] diff --git a/docs/.vuepress/version-configs/1.x.js b/docs/.vuepress/version-configs/1.x.js deleted file mode 100644 index 04d74b5b..00000000 --- a/docs/.vuepress/version-configs/1.x.js +++ /dev/null @@ -1,158 +0,0 @@ -/* set version */ -let version = '1.x'; - -/* version prefix setter */ -function setVersionPrefix(children) { - if (children.constructor === Array) { - return children.map(child => { - child[0] = `/${version}/${child[0]}`; - return child; - }); - } - return `/${version}/${children}`; -} - -/* module export */ -module.exports = [ - { - title: 'Introduction', - path: setVersionPrefix('introduction'), - collapsable: true, - children: setVersionPrefix([ - ['introduction/requirements', 'Requirements'], - ['introduction/installation', 'Installation'], - ['introduction/upgrade-to-latest-bagisto', 'Upgrade Bagisto'], - ['introduction/docker', 'Docker'] - - ]) - }, - { - title: 'Package Development', - path: setVersionPrefix('packages'), - collapsable: true, - children: setVersionPrefix([ - ['packages/create-package', 'Create a new package'], - ['packages/create-migrations', 'Create migrations'], - ['packages/add-menu-in-admin', 'Add menu in admin'], - ['packages/create-acl', 'Access control list'], - ['packages/create-custom-configuration', 'Create custom configuration'], - ['packages/create-models', 'Create models'], - ['packages/store-data-through-repositories', 'Store data through repositories'], - ]) - }, - { - title: 'Advanced Topics', - path: setVersionPrefix('advanced'), - collapsable: true, - children: setVersionPrefix([ - ['advanced/create-shipping-method', 'Create a shipping method'], - ['advanced/create-payment-method', 'Create a payment method'], - ['advanced/create-product-type', 'Create your own product type'], - ['advanced/datagrid', 'DataGrid'], - ['advanced/events', 'Events'], - ['advanced/helpers', 'Helpers'], - ['advanced/override-core-model', 'Override core models'], - ['advanced/render-event', 'View render event'], - ['advanced/indexing-products-to-elasticsearch.md', 'Indexing products to Elasticsearch'], - ['advanced/security-practice', 'Best Security Practices'], - ]) - }, - { - title: 'Themes', - path: setVersionPrefix('themes'), - collapsable: true, - children: setVersionPrefix([ - ['themes/tracer', 'Blade file tracer'], - ['themes/create-theme', 'Create a store theme'], - ['themes/create-admin-theme', 'Create an admin theme'], - ['themes/change-email-template.md', 'Change email template'], - ['themes/customize-hompepage-menu.md', 'Customize homepage menu'], - ['themes/integrate-image-search-in-theme', 'Integrate image search in theme'] - ]) - },{ - title: 'Admin Theme', - path: setVersionPrefix('admin-theme'), - collapsable: true, - children: setVersionPrefix([ - ['admin-theme/notification', 'Enable real time notification'], - ]) - },{ - title: 'Translations', - path: setVersionPrefix('translations/translation-based-on-locale'), - collapsable: true, - children: setVersionPrefix([ - ['translations/translation-based-on-locale', 'Translation based on locale'], - ['translations/change-the-language-of-error-validations-on-your-store', 'Change the language of error validations on your store'] - ]) - }, - { - title: 'User Guides', - path: setVersionPrefix('user-guides'), - collapsable: true, - children: setVersionPrefix([ - ['user-guides/tax-rates', 'Tax Rates'], - ['user-guides/cart-rule', 'Cart rules'], - ['user-guides/social-auth', 'Social Authentication'] - ]) - }, - { - title: 'Bagisto Web API', - path: setVersionPrefix('api'), - collapsable: true, - children: setVersionPrefix([ - ['api/getting-started-with-the-api', 'Authentication'], - ['api/customers', 'Customers'], - ['api/locales', 'Locales'], - ['api/addresses', 'Addresses'], - ['api/products', 'Products'], - ['api/categories', 'Categories'], - ['api/attributes', 'Attributes'], - ['api/attribute-families', 'Attribute Families'], - ['api/cart', 'Shopping Cart'], - ['api/orders', 'Orders'], - ['api/invoices', 'Invoices'], - ['api/shipments', 'Shipments'], - ['api/transactions', 'Transactions'], - ['api/reviews', 'Reviews'], - ['api/wishlists', 'Wishlists'], - ]) - }, - { - title: 'Bagisto GraphQL Admin API', - path: setVersionPrefix('graphql-admin-api'), - collapsable: true, - children: setVersionPrefix([ - ['graphql-admin-api/installation', 'Installation'], - ['graphql-admin-api/getting-started-with-the-api.md', 'Authentication'], - ['graphql-admin-api/settings.md', 'Settings'], - ['graphql-admin-api/cms.md', 'CMS'], - ['graphql-admin-api/velocity.md', 'Velocity'], - ['graphql-admin-api/customers.md', 'Customers'], - ['graphql-admin-api/promotions.md', 'Promotions'], - ['graphql-admin-api/products.md', 'Products'], - ['graphql-admin-api/categories.md', 'Categories'], - ['graphql-admin-api/attributes.md', 'Attributes'], - ['graphql-admin-api/attribute-groups.md', 'Attribute Groups'], - ['graphql-admin-api/attribute-families.md', 'Attribute Families'], - ['graphql-admin-api/sales.md', 'Sales'], - ]) - }, - { - title: 'Bagisto GraphQL Shop API', - path: setVersionPrefix('graphql-shop-api'), - collapsable: true, - children: setVersionPrefix([ - ['graphql-admin-api/installation', 'Installation'], - ['graphql-shop-api/getting-started-with-the-api.md', 'Authentication'], - ['graphql-shop-api/addresses.md', 'Addresses'], - ['graphql-shop-api/orders.md', 'Orders'], - ['graphql-shop-api/reviews.md', 'Reviews'], - ['graphql-shop-api/wishlists.md', 'Wishlists'], - ['graphql-shop-api/compare.md', 'Compare'], - ['graphql-shop-api/downloadable-links.md', 'Downloadable Links'], - ['graphql-shop-api/cart.md', 'Cart'], - ['graphql-shop-api/checkout.md', 'Checkout Process'], - ['graphql-shop-api/homepage.md', 'Home Page'], - ]) - }, -] \ No newline at end of file diff --git a/docs/1.5.x/advanced/README.md b/docs/1.5.x/advanced/README.md deleted file mode 100644 index d25989dd..00000000 --- a/docs/1.5.x/advanced/README.md +++ /dev/null @@ -1,33 +0,0 @@ -# Digging Deeper - -Welcome to the "Digging Deeper" section of the Bagisto documentation. Here, we will explore various advanced topics related to Bagisto, which will enable you to customize and extend your e-commerce platform to suit your specific needs. - -We expect you to have knowledge of creating packages in Laravel. If you are new to package development, we recommend referring to the [Package Development](../packages/create-package.html) section for a primer on creating and managing packages in Laravel. - -### Creating Payment Methods - -Bagisto provides a flexible and configurable system for integrating different payment methods into your e-commerce store. We will guide you through the process of setting up and configuring payment methods, allowing you to offer a variety of options to your customers while ensuring a seamless and secure checkout experience. - -### Product Types - -Bagisto supports different types of products, allowing you to showcase and sell a wide range of items. We will delve into the details of configuring and managing product types, giving you the ability to define specific attributes and behaviors for each product category. - -### Shipping Methods - -Efficient and reliable shipping is crucial for any e-commerce business. Bagisto offers robust features for managing shipping methods, enabling you to define various shipping options, rates, and rules based on factors such as location, weight, or order value. We will explain how to configure and customize shipping methods to streamline your order fulfillment process. - -### Events and Event Handlers - -Events and event handlers provide a powerful way to extend the functionality of Bagisto by allowing you to react to specific actions or triggers within the application. We will show you how to utilize events and event handlers effectively, enabling you to integrate custom functionalities and automate processes. - -### Helpers - -Bagisto includes a comprehensive set of helper functions that simplify common development tasks and enhance productivity. We will explore the various helper functions available, explaining their purpose and usage to assist you in writing clean and efficient code. - -### Indexing through Elastic - -To optimize search performance, Bagisto integrates with Elasticsearch, a highly scalable search engine. We will guide you through the process of indexing your data using Elastic, improving the search functionality of your e-commerce store and providing a seamless search experience for your customers. - -### Overriding Core Models - -Sometimes, you may need to modify or extend the default behavior of Bagisto's core models to accommodate your specific business requirements. We will demonstrate how to override core models effectively, enabling you to customize the behavior of Bagisto without modifying the underlying codebase. \ No newline at end of file diff --git a/docs/1.5.x/advanced/change-email-template.md b/docs/1.5.x/advanced/change-email-template.md deleted file mode 100644 index 2dd7d406..00000000 --- a/docs/1.5.x/advanced/change-email-template.md +++ /dev/null @@ -1,106 +0,0 @@ -# Email Template - -[[TOC]] - -## Introduction - -In this section, we will explain how to customize the email templates in Bagisto. Customizing email templates allows you to personalize the appearance of your emails according to your preferences. - -## Email Template Flow - -Before we dive into template customization, let's understand how email templates work in Bagisto. - -Bagisto provides various mail notification classes, such as **`CancelOrderAdminNotification`** and **`NewCustomerNotification`**, located in the **`Webkul\Admin\Mail`** namespace. Let's take the **`CancelOrderAdminNotification`** class as an example. - -```php -order = $order; - } - - /** - * Build. - * - * @return void - */ - public function build() - { - return $this->from(core()->getSenderEmailDetails()['email'], core()->getSenderEmailDetails()['name']) - ->to(core()->getAdminEmailDetails()['email']) - ->subject(trans('shop::app.mail.order.cancel.subject')) - ->view('shop::emails.sales.order-cancel-admin'); - } -} -``` - -In the **`build()`** method of the above class, you can see that the main view file, **`view('shop::emails.sales.order-cancel-admin')`**, is loaded from the shop package. - -Now, let's explore the view file mentioned in **`view('shop::emails.sales.order-cancel-admin')`**. If you check the file at the path **`packages/Webkul/Shop/src/Resources/views/emails/sales/order-cancel-admin.blade.php`**, you will find it. This view file uses the main layout component **`shop::emails.layouts.master`**. - -```php -@component('shop::emails.layouts.master') - ... -@endcomponent -``` - -This layout component is responsible for the overall email layout. If desired, you can explore this file as well. Now, let's proceed to learn how to change these email templates. - -## Changing Email Template - -To customize the email template, the recommended approach is to override the package's view. Since all email views are defined in the shop package, we need to override the view within the shop package. - -Here's how you can override the view for the same file we mentioned above, **`view('shop::emails.sales.order-cancel-admin')`**. - -Bagisto registers two locations for views: the application's **`resources/themes`** directory specified in **`config/themes.php`**, and the directory you specify. If you are using the default theme, **`shop`** package, Bagisto will first check if a custom version of the view exists in the **`resources/themes/default`** directory. If the view has not been customized, Bagisto will then search the package's view directory. - -To override the view, create the same directory structure in the application's **`resources/themes/default`** directory: - -``` -- resources/ - └── themes/ - └── default/ - └── views/ - └── emails/ - └── sales/ - └── order-cancel-admin.blade.php -``` - -For example, create a file named **`order-cancel-admin.blade.php`** within the **`sales`** directory, and modify its content as desired: - -```blade - - Lorem ipsum dolor sit amet consectetur adipisicing elit. Laborum porro cumque numquam neque dicta quo, accusantium, perferendis sed beatae nesc - - iunt eum impedit vel doloribus dolor excepturi vero tenetur perspiciatis saepe? -``` - -Now you can test the modified email template. - -## Email Template Sample - -![Email Template Sample](../../assets/1.5.x/images/advanced-topics/mail-sample.png) \ No newline at end of file diff --git a/docs/1.5.x/advanced/create-payment-method.md b/docs/1.5.x/advanced/create-payment-method.md deleted file mode 100644 index 822333b1..00000000 --- a/docs/1.5.x/advanced/create-payment-method.md +++ /dev/null @@ -1,220 +0,0 @@ -# Payment Method - -[[TOC]] - -## Introduction - -Bagisto eases the task of creating payment methods, making it simple for both novice and professional developers. - -The diversity of payment methods provides customers with various options for payment when they proceed to checkout. Moreover, offering multiple payment methods is a great strategy to reach out to the global marketplace. - -## Using Bagisto Package Generator - -To create a payment method package, follow these commands in the Bagisto root directory: - -- If the package directory is not present: - - ```sh - php artisan package:make-payment-method Webkul/Blog - ``` - -- If the package directory is already present, you can use the force command to overwrite it. Simply add the **`--force`** flag: - - ```sh - php artisan package:make-payment-method Webkul/Blog --force - ``` - - These commands will generate the entire directory structure automatically, saving you from manual setup. - -## Manually Setting Up All Files - -1. To create your payment method, follow these steps to set up the respective directory structure: - - ``` - - Webkul/ - └── Blog/ - └── src/ - ├── ... - ├── Config/ - │ ├── system.php - │ └── paymentmethods.php - ├── Payment/ - │ └── Stripe.php - └── Providers/ - └── StripeServiceProvider.php - ``` - -2. The **`Config`** folder contains application configuration files. Create two files, **`system.php`** and **`paymentmethods.php`**, within the **`Config`** folder. In the **`system.php`** file, include the following array keys: - - ```php - 'sales.paymentmethods.stripe', - 'name' => 'Stripe', - 'sort' => 1, - 'fields' => [ - [ - 'name' => 'title', - 'title' => 'admin::app.admin.system.title', - 'type' => 'text', - 'validation' => 'required', - 'channel_based' => false, - 'locale_based' => true, - ], [ - 'name' => 'description', - 'title' => 'admin::app.admin.system.description', - 'type' => 'textarea', - 'channel_based' => false, - 'locale_based' => true, - ], [ - 'name' => 'active', - 'title' => 'admin::app.admin.system.status', - 'type' => 'boolean', - 'validation' => 'required', - 'channel_based' => false, - 'locale_based' => true, - ] - ] - ] - ]; - ``` - - **`key`**: A unique value for the configuration, concatenated with a dot (`.`) operator. - - **`name`**: The placeholder value for the configuration. It is recommended to use translations in Bagisto. - - **`sort`**: The position of the configuration menu. - - **`fields`**: An array containing the custom configurations and fields for the payment method. The example includes three arrays for **`title`**, **`description`**, and **`status`**. You can add more arrays for additional settings. - -3. In the **`paymentmethods.php`** file, add the following content: - - ```php - [ - 'code' => 'stripe', - 'title' => 'Stripe', - 'description' => 'Stripe', - 'class' => 'Webkul\Blog\Payment\Stripe', - 'active' => true, - 'sort' => 1, - ], - ]; - ``` - - **`code`**: A text representing the payment method. - - **`title`**: The name of the payment method. - - **`description`**: A brief description of the payment method. - - **`class`**: The namespace of the class where the payment method functions are defined. - - **`active`**: A boolean value (`true` or `false`) to enable or disable the module. - - **`sort`**: The position of the payment method. - -4. In the **`Stripe.php`** file within the **`Payment`** directory, add the following code: - - ```php - registerConfig(); - } - - /** - * Register package config. - * - * @return void - */ - protected function registerConfig() - { - $this->mergeConfigFrom( - dirname(__DIR__) . '/Config/paymentmethods.php', 'paymentmethods' - ); - - $this->mergeConfigFrom( - dirname(__DIR__) . '/Config/system.php', 'core' - ); - } - } - ``` - -2. Next, add your payment method namespace to the **`psr-4`** key in the **`composer.json`** file located in the Bagisto root directory: - - ```json - "autoload": { - ... - "psr-4": { - // Other PSR-4 namespaces - "Webkul\\Blog\\": "packages/Webkul/Blog/src" - } - } - ``` - -3. Register your service provider in the **`config/app.php`** file, also located in the Bagisto root directory: - - ```php - ServiceProvider::defaultProviders()->merge([ - // Other service providers - Webkul\Blog\Providers\StripeServiceProvider::class, - ])->toArray(), - - // Other configuration options - ]; - ``` - -4. After making these changes, run the following commands: - - ```sh - composer dump-autoload - ``` - - ```sh - php artisan config:cache - ``` - - If you encounter any issues with **`composer dump-autoload`**, delete all files from the **`bootstrap/cache`** directory and run **`composer dump-autoload`** again. \ No newline at end of file diff --git a/docs/1.5.x/advanced/create-product-type.md b/docs/1.5.x/advanced/create-product-type.md deleted file mode 100644 index d6372ccc..00000000 --- a/docs/1.5.x/advanced/create-product-type.md +++ /dev/null @@ -1,80 +0,0 @@ -# Product Type - -[[TOC]] - -## Introduction - -Bagisto provides several default product types, including simple, configurable, virtual, grouped, downloadable, bundled, and bookings. However, if these default product types do not meet your requirements, you can create your own custom product types. - -## Creating a New Product Type - -To create a new product type in Bagisto, follow these steps: - -**Note**: In this example, we will create a new product type called "coupon". - -1. Create your own package. If you need assistance with package development, you can refer to the [Package Development](../packages) section. - -2. Inside the **Config** folder of your package, create a file named **`product_types.php`**. - -3. Add the following code to the **`product_types.php`** file. This code will define the new product type and its properties: - - ```php - [ - 'key' => 'coupon', - 'name' => 'Coupon', - 'class' => 'Webkul\Blog\Type\Coupon', - 'sort' => 7 - ], - ]; - ``` - -### Merging the Configuration - -4. To merge the **`Config/product_types.php`** with the core product types configuration, use the **`mergeConfigFrom()`** method in the **`register()`** method of your service provider. For example, in the **`CouponServiceProvider.php`** file: - - ```php - mergeConfigFrom( - dirname(__DIR__) . '/Config/product_types.php', 'product_types' - ); - } - } - ``` - -5. In the code snippet above, notice the **`class`** key mentioned in step 3. This key specifies the class that loads the coupon product type. Create a file named **`Coupon.php`** within your package under the **`src/Type`** folder, and add the following code: - - ```php - [ - 'code' => 'blog', - 'title' => 'Blog', - 'description' => 'Blog', - 'active' => true, - 'default_rate' => '10', - 'type' => 'per_unit', - 'class' => 'Webkul\Blog\Carriers\Blog', - ] - ]; - ``` - - - **code**: A unique value used to refer to the particular shipping method. - - **title**: The label or name displayed in the user interface. - - **description**: Information about your shipping method. - - **active**: Enable or disable option for the shipping method. - - **default_rate**: The default rate value. - - **type**: Specifies whether the shipping method applies per unit or per order. - - **class**: The path and filename of the shipping method class (**`namespace\package-name\Carriers-folder\filename`**). - -3. Create a **`Carriers`** folder inside the **`src`** folder. Then, create a **`Blog.php`** file inside the **`Carriers`** folder. - - ``` - - Webkul - └── Blog/ - └── src/ - ├── ... - ├── Carriers/ - │ └── Blog.php - └── Config/ - ├── ... - └── carriers.php - - ``` - -4. Copy the following code into the **`Blog.php`** file: - - ```php - isAvailable()) { - return false; - } - - $object = new CartShippingRate; - - $object->carrier = 'blog'; - $object->carrier_title = $this->getConfigData('title'); - $object->method = 'blog_blog'; - $object->method_title = $this->getConfigData('title'); - $object->method_description = $this->getConfigData('description'); - $object->price = 0; - $object->base_price = 0; - - if ($this->getConfigData('type') == 'per_unit') { - foreach ($cart->items as $item) { - if ( - $this->getConfigData('base_amount') && - $this->getConfigData('base_amount') > ($item->product->price) - ) { - continue; - } - if ($item->product->getTypeInstance()->isStockable()) { - $object->price += core()->convertPrice($this->getConfigData('default_rate')) * $item->quantity; - $object->base_price += $this->getConfigData('default_rate') * $item->quantity; - } - } - } else { - if ( - $this->getConfigData('base_amount') && - $this->getConfigData('base_amount') > ($cart->sub_total) - ) { - return false; - } - $object->price = core()->convertPrice($this->getConfigData('default_rate')); - $object->base_price = $this->getConfigData('default_rate'); - } - - return $object; - } - } - ``` - - The **`Blog.php`** file extends the **`AbstractShipping`** class defined at **`Webkul\Shipping\Carriers\AbstractShipping`**. In this file, you can write all the operations needed for your shipping method. To render the shipping methods in the checkout process, define the **`calculate()`** method within the **`Blog.php`** file and return the shipping rate, title, and description within a **`CartShippingRate`** object. - -5. After creating all the necessary files and configurations, create a form that will appear in the configuration section. Create a **`system.php`** file in the **`src/Config`** path and add the following code to it: - - ```php - 'sales.carriers.blog', - 'name' => 'admin::app.admin.system.blog-shipping', - 'sort' => 2, - 'fields' => [ - [ - 'name' => 'title', - 'title' => 'admin::app.admin.system.title', - 'type' => 'depends', - 'depend' => 'active:1', - 'validation' => 'required_if:active,1', - 'channel_based' => true, - 'locale_based' => true - ], [ - 'name' => 'description', - 'title' => 'admin::app.admin.system.description', - 'type' => 'textarea', - 'channel_based' => true, - 'locale_based' => false - ], [ - 'name' => 'default_rate', - 'title' => 'admin::app.admin.system.rate', - 'type' => 'depends', - 'depend' => 'active:1', - 'validation' => 'required_if:active,1', - 'channel_based' => true, - 'locale_based' => false - ], [ - 'name' => 'base_amount', - 'title' => 'admin::app.admin.system.minimum-amount', - 'type' => 'text', - 'channel_based' => true, - 'locale_based' => false - ], [ - 'name' => 'type', - 'title' => 'admin::app.admin.system.type', - 'type' => 'select', - 'options' => [ - [ - 'title' => 'Per Unit', - 'value' => 'per_unit', - ], [ - 'title' => 'Per Order', - 'value' => 'per_order', - ], - ], - 'channel_based' => true, - 'locale_based' => false, - ], [ - 'name' => 'active', - 'title' => 'admin::app.admin.system.status', - 'type' => 'boolean', - 'validation' => 'required', - 'channel_based' => true, - 'locale_based' => false - ] - ] - ] - ``` - -## Merge Configuration - -1. To merge all your configurations, modify the **`packages/Webkul/Blog/src/Providers/BlogServiceProvider.php`** file as follows: - - ```php - mergeConfigFrom( - dirname(__DIR__) . '/Config/carriers.php', 'carriers' - ); - - $this->mergeConfigFrom( - dirname(__DIR__) . '/Config/system.php', 'core' - ); - } - } - ``` - -2. Add the namespace for your shipment method in the **`psr-4`** key of the **`composer.json`** file in the Bagisto root directory: - - ```json - "autoload": { - ... - "psr-4": { - // Other PSR-4 namespaces - "Webkul\\Blog\\": "packages/Webkul/Blog/src" - } - } - ``` - -3. Register your service provider in the **`config/app.php`** file located in the Bagisto root directory: - - ```php - ServiceProvider::defaultProviders()->merge([ - // Other service providers - Webkul\Blog\Providers\BlogServiceProvider::class, - ])->toArray(), - - // Other configuration options - ]; - ``` - -4. After making these changes, run the following commands: - - ```sh - composer dump-autoload - php artisan config:cache - ``` - - If you encounter an error with the **`composer dump-autoload`** command, try deleting all files in the **`bootstrap/cache`** directory and then running the command again. \ No newline at end of file diff --git a/docs/1.5.x/advanced/events.md b/docs/1.5.x/advanced/events.md deleted file mode 100644 index bcd0332c..00000000 --- a/docs/1.5.x/advanced/events.md +++ /dev/null @@ -1,238 +0,0 @@ -# Event Listeners - -[[TOC]] - -## Introduction - -Event Listeners in Bagisto are a way to implement the observer pattern, where listeners respond to events that occur in the application. Events can be thought of as announcements made by the application, and listeners are the actions taken in response to those announcements. All event classes in Bagisto are stored in the **Providers** folder, and the listeners are stored in the **Listeners** folder. - -## Creating an Event Class - -If you have the Bagisto Package Generator installed, you can use the following command to create a new event class in the **`packages/Webkul/Blog/src/Events`** directory: - -```sh -php artisan package:make-event BlogEvent Webkul/Blog -``` - -If the event class already exists, you can use the **`--force`** option to overwrite it: - -```sh -php artisan package:make-event BlogEvent Webkul/Blog --force -``` - -Alternatively, if you don't have the package generator, you can create the file manually. - -## Manually Registering Events - -In Bagisto, events are manually registered in the **`boot`** method of your **`EventServiceProvider.php`** file. Here is an example of how to register events: - -```php -/** - * Register any other events for your application. - * - * @return void - */ -public function boot() -{ - //... - - parent::boot(); - - Event::listen('event.name', 'path-upto-listener@function'); -} -``` - -## Manually Registering Listeners - -When registering events, you specify the listener function to be executed when an event is called. Here is an example of how to register a listener: - -```php -class EventServiceProvider extends ServiceProvider -{ - /** - * Bootstrap services. - * - * @return void - */ - public function boot() - { - //... - - Event::listen('checkout.order.save.after', 'Webkul\Admin\Listeners\Order@sendNewOrderMail'); - } -} -``` - -## Specifying Events - -In most CRUD operations, events are fired before and after the execution of a function. This allows listeners to perform additional operations before or after certain actions, such as product creation, update, or deletion. - -## Events Fired in Bagisto - -- Events fired in bagisto but not listened such that if any user wants to perform any action on event fire, then they may create listener file and perform the respective operation. - - | Events name | Functionality| - | ------------------------------- | ------------- | - |core.configuration.save.after|This event will be fired after core configuration form data gets saved, then you may create a listener file and perform the respective operation when that event fires | - |core.configuration.save.after|This event will be fired after core configuration form data gets saved, then you may create a listener file and perform the respective operation when that event fires| - |checkout.cart.item.add.before |This event will be fired before saving into the database of item added in checkout and you may create a listener file and perform the respective operation when that event fires| - |checkout.cart.item.add.after|This event will be fired after saving into the database of item added in checkout and you may create a listener file and perform the respective operation when that event fires| - |checkout.cart.item.update.before|This event will be fired before updating the database item of checkout table of respective passed **`id`** and you may create a listener file and perform the respective operation when that event fires | - |checkout.cart.item.update.after|This event will be fired after updating the database item of checkout table of respective passed **`id`** and you may create a listener file and perform the respective operation when that event fires| - |checkout.cart.delete.before|This event will be fired before deleting the database item of checkout table of respective passed **`id`** and you may create a listener file and perform the respective operation when that event fires| - |checkout.cart.delete.after|This event will be fired after deleting the database item of checkout table of respective passed **`id`** and you may create a listener file and perform the respective operation when that event fires| - |checkout.cart.item.delete.before|This event will be fired before deleting the database item of checkout table of respective passed **`id`** and you may create a listener file and perform the respective operation when that event fires| - |checkout.cart.item.delete.after|This event will be fired after deleting the database item of checkout table of respective passed **`id`** and you may create a listener file and perform the respective operation when that event fires| - |checkout.cart.item.move-to-wishlist.before|This event will be fired before adding cart item to wishlist added in checkout and you may create a listener file and perform the respective operation when that event fires| - |checkout.cart.item.move-to-wishlist.after|This event will be fired after adding cart item to wishlist added in checkout and you may create a listener file and perform the respective operation when that event fires| - |customer.registration.before|This event will be fired before registration of customer details and you may create a listener file and perform the respective operation when that event fires| - |customer.registration.after|This event will be fired after registration of customer details and you may create a listener file and perform the respective operation when that event fires| - |customer.after.login|This event will be fired after login of customer and you may create a listener file and perform the respective operation when that event fires| - |catalog.attribute_family.create.before|This event will be fired before attribute family gets created and you may create a listener file and perform the respective operation when that event fires| - |catalog.attribute_family.create.after|This event will be fired after attribute family gets created and you may create a listener file and perform the respective operation when that event fires| - |catalog.attribute_family.update.before|This event will be fired before updating attribute family and you may create a listener file and perform the respective operation when that event fires| - |catalog.attribute_family.update.after|This event will be fired after updating attribute family and you may create a listener file and perform the respective operation when that event fires| - |catalog.attribute_family.delete.before|This event will be fired before deleting attribute family and you may create a listener file and perform the respective operation when that event fires| - |catalog.attribute_family.delete.after|This event will be fired after deleting attribute family and you may create a listener file and perform the respective operation when that event fires| - |catalog.attribute.create.before|This event will be fired before attribute gets created and you may create a listener file and perform the respective operation when that event fires| - |catalog.attribute.create.after|This event will be fired after attribute gets created and you may create a listener file and perform the respective operation when that event fires| - |catalog.attribute.update.before|This event will be fired before attribute gets updated and you may create a listener file and perform the respective operation when that event fires| - |catalog.attribute.update.after|This event will be fired after attribute gets updated and you may create a listener file and perform the respective operation when that event fires| - |catalog.attribute.delete.before|This event will be fired before attribute gets deleted and you may create a listener file and perform the respective operation when that event fires| - |catalog.attribute.delete.after|This event will be fired after attribute gets deleted and you may create a listener file and perform the respective operation when that event fires| - |catalog.category.delete.after|This event will be fired after deleting category and you may create a listener file and perform the respective operation when that event fires| - |catalog.category.delete.before|This event will be fired before deleting category with mass selection and you may create a listener file and perform the respective operation when that event fires| - |catalog.category.delete.after|This event will be fired after deleting category with mass selection and you may create a listener file and perform the respective operation when that event fires| - |catalog.category.create.before|This event will be fired before creating category and you may create a listener file and perform the respective operation when that event fires| - |catalog.category.create.after|This event will be fired after creating category and you may create a listener file and perform the respective operation when that event fires| - |catalog.category.update.before|This event will be fired before updating category and you may create a listener file and perform the respective operation when that event fires| - |catalog.category.update.after|This event will be fired after updating category and you may create a listener file and perform the respective operation when that event fires| - |catalog.category.delete.before|This event will be fired before deleting category and you may create a listener file and perform the respective operation when that event fires| - |catalog.category.delete.after|This event will be fired after deleting category and you may create a listener file and perform the respective operation when that event fires| - |core.channel.create.before|This event will be fired before channel gets created and you may create a listener file and perform the respective operation when that event fires| - |core.channel.create.after|This event will be fired after channel gets created and you may create a listener file and perform the respective operation when that event fires| - |core.channel.update.before|This event will be fired before channel gets updated and you may create a listener file and perform the respective operation when that event fires| - |core.channel.update.after|This event will be fired after channel gets updated and you may create a listener file and perform the respective operation when that event fires| - |core.channel.delete.before|This event will be fired before channel gets deleted and you may create a listener file and perform the respective operation when that event fires| - |core.channel.delete.after|This event will be fired after channel gets deleted and you may create a listener file and perform the respective operation when that event fires| - |core.currency.create.before|This event will be fired before currency gets created and you may create a listener file and perform the respective operation when that event fires| - |core.currency.create.after|This event will be fired after currency gets created and you may create a listener file and perform the respective operation when that event fires| - |core.currency.update.before|This event will be fired before currency gets updated and you may create a listener file and perform the respective operation when that event fires| - |core.currency.update.after|This event will be fired after currency gets updated and you may create a listener file and perform the respective operation when that event fires| - |core.currency.delete.before|This event will be fired before currency gets deleted and you may create a listener file and perform the respective operation when that event fires| - |core.currency.delete.after|This event will be fired after currency gets deleted and you may create a listener file and perform the respective operation when that event fires| - |core.currency.delete.before|This event will be fired before currency gets deleted with mass selection and you may create a listener file and perform the respective operation when that event fires| - |core.currency.delete.after|This event will be fired after currency gets deleted with mass selection and you may create a listener file and perform the respective operation when that event fires| - |core.exchange_rate.create.before|This event will be fired before exchange rate gets created and you may create a listener file and perform the respective operation when that event fires| - |core.exchange_rate.create.after|This event will be fired after exchange rate gets created and you may create a listener file and perform the respective operation when that event fires| - |core.exchange_rate.update.before |This event will be fired before exchange rate gets updated and you may create a listener file and perform the respective operation when that event fires| - |core.exchange_rate.update.after|This event will be fired after exchange rate gets updated and you may create a listener file and perform the respective operation when that event fires| - |core.exchange_rate.delete.before|This event will be fired before exchange rate gets deleted and you may create a listener file and perform the respective operation when that event fires| - |core.exchange_rate.delete.after|This event will be fired after exchange rate gets deleted and you may create a listener file and perform the respective operation when that event fires| - |core.locale.create.before|This event will be fired before locale gets created and you may create a listener file and perform the respective operation when that event fires| - |core.locale.create.after|This event will be fired after locale gets created and you may create a listener file and perform the respective operation when that event fires| - |core.locale.update.before|This event will be fired before locale gets updated and you may create a listener file and perform the respective operation when that event fires| - |core.locale.update.after|This event will be fired after locale gets updated and you may create a listener file and perform the respective operation when that event fires| - |core.locale.delete.before|This event will be fired before locale gets deleted and you may create a listener file and perform the respective operation when that event fires| - |core.locale.delete.after|This event will be fired after locale gets deleted and you may create a listener file and perform the respective operation when that event fires| - |customer.registration.before|This event will be fired before customer gets registered and you may create a listener file and perform the respective operation when that event fires| - |customer.registration.after|This event will be fired after customer gets registered and you may create a listener file and perform the respective operation when that event fires| - |customer.after.login|This event will be fired after customer successfully logins in store and you may create a listener file and perform the respective operation when that event fires| - |customer.after.logout|This event will be fired after customer successfully logouts from store and you may create a listener file and perform the respective operation when that event fires| - |inventory.inventory_source.create.before|This event will be fired before inventory source gets created and you may create a listener file and perform the respective operation when that event fires| - |inventory.inventory_source.create.after|This event will be fired after inventory source gets created and you may create a listener file and perform the respective operation when that event fires| - |inventory.inventory_source.update.before|This event will be fired before inventory source gets updated and you may create a listener file and perform the respective operation when that event fires| - |inventory.inventory_source.update.after|This event will be fired after inventory source gets updated and you may create a listener file and perform the respective operation when that event fires| - |inventory.inventory_source.delete.before|This event will be fired before inventory source gets deleted and you may create a listener file and perform the respective operation when that event fires| - |inventory.inventory_source.delete.after|This event will be fired after inventory source gets deleted and you may create a listener file and perform the respective operation when that event fires| - |customer.review.update.before|This event will be fired before customer review gets updated and you may create a listener file and perform the respective operation when that event fires| - |customer.review.update.after|This event will be fired after customer review gets updated and you may create a listener file and perform the respective operation when that event fires| - |customer.review.delete.before|This event will be fired before customer review gets deleted and you may create a listener file and perform the respective operation when that event fires| - |customer.review.delete.after|This event will be fired after customer review gets deleted and you may create a listener file and perform the respective operation when that event fires| - |customer.review.delete.before|This event will be fired before customer review gets deleted with mass selection and you may create a listener file and perform the respective operation when that event fires| - |customer.review.delete.after|This event will be fired after customer review gets deleted with mass selection and you may create a listener file and perform the respective operation when that event fires| - |customer.review.update.before|This event will be fired before customer review gets updated with mass selection and you may create a listener file and perform the respective operation when that event fires| - |customer.review.update.after|This event will be fired after customer review gets updated with mass selection and you may create a listener file and perform the respective operation when that event fires| - |catalog.product.create.before|This event will be fired before product gets created and you may create a listener file and perform the respective operation when that event fires| - |catalog.product.create.after|This event will be fired after product gets created and you may create a listener file and perform the respective operation when that event fires| - |catalog.product.update.before|This event will be fired before product gets updated and you may create a listener file and perform the respective operation when that event fires| - |catalog.product.update.after|This event will be fired after product gets updated and you may create a listener file and perform the respective operation when that event fires| - |catalog.product.delete.before|This event will be fired before product gets deleted and you may create a listener file and perform the respective operation when that event fires| - |catalog.product.delete.after|This event will be fired after product gets deleted and you may create a listener file and perform the respective operation when that event fires| - |sales.invoice.save.before|This event will be fired before invoice gets created and you may create a listener file and perform the respective operation when that event fires| - |sales.invoice.save.after|This event will be fired after invoice gets created and you may create a listener file and perform the respective operation when that event fires| - |checkout.order.save.before|This event will be fired before order gets created and you may create a listener file and perform the respective operation when that event fires| - |checkout.order.save.after|This event will be fired after order gets created and you may create a listener file and perform the respective operation when that event fires| - |sales.order.cancel.before|This event will be fired before order gets cancelled and you may create a listener file and perform the respective operation when that event fires| - |sales.order.cancel.after|This event will be fired after order gets cancelled and you may create a listener file and perform the respective operation when that event fires| - |catalog.product.update.after|This event will be fired after product gets updated and you may create a listener file and perform the respective operation when that event fires| - |sales.shipment.save.before|This event will be fired before shipment for product gets created and you may create a listener file and perform the respective operation when that event fires| - |sales.shipment.save.after|This event will be fired after shipment for product gets created and you may create a listener file and perform the respective operation when that event fires| - |checkout.cart.add.before|This event will be fired before product get added in cart and you may create a listener file and perform the respective operation when that event fires| - |checkout.cart.add.after|This event will be fired after product get added in cart and you may create a listener file and perform the respective operation when that event fires| - |checkout.cart.delete.before|This event will be fired before product get deleted from cart and you may create a listener file and perform the respective operation when that event fires| - |checkout.cart.delete.after|This event will be fired after product get deleted from cart and you may create a listener file and perform the respective operation when that event fires| - |checkout.cart.update.before|This event will be fired before cart item get updated and you may create a listener file and perform the respective operation when that event fires| - |checkout.cart.update.after|This event will be fired after cart item get updated and you may create a listener file and perform the respective operation when that event fires| - |checkout.cart.add.before|This event will be fired before configurable product get added in cart and you may create a listener file and perform the respective operation when that event fires| - |checkout.cart.add.after|This event will be fired after configurable product get added in cart and proceeded to but the product and you may create a listener file and perform the respective operation when that event fires| - |tax.tax_category.create.before|This event will be fired before tax category gets created and you may create a listener file and perform the respective operation when that event fires| - |tax.tax_category.create.after|This event will be fired after tax category gets created and you may create a listener file and perform the respective operation when that event fires| - |tax.tax_category.update.before|This event will be fired before tax category gets updated and you may create a listener file and perform the respective operation when that event fires| - |tax.tax_category.update.after|This event will be fired after tax category gets updated and you may create a listener file and perform the respective operation when that event fires| - |tax.tax_category.delete.before|This event will be fired before tax category gets deleted and you may create a listener file and perform the respective operation when that event fires| - |tax.tax_category.delete.after|This event will be fired after tax category gets deleted and you may create a listener file and perform the respective operation when that event fires| - |tax.tax_rate.create.before|This event will be fired before tax rate gets created and you may create a listener file and perform the respective operation when that event fires| - |tax.tax_rate.create.after|This event will be fired after tax rate gets created and you may create a listener file and perform the respective operation when that event fires| - |tax.tax_rate.update.before|This event will be fired before tax rate gets updated and you may create a listener file and perform the respective operation when that event fires| - |tax.tax_rate.update.after|This event will be fired after tax rate gets updated and you may create a listener file and perform the respective operation when that event fires| - |tax.tax_rate.delete.before|This event will be fired before tax rate gets deleted and you may create a listener file and perform the respective operation when that event fires| - |tax.tax_rate.delete.after|This event will be fired after tax rate gets deleted and you may create a listener file and perform the respective operation when that event fires| - |user.role.create.before|This event will be fired before user role gets created. The role of user in created from admin panel and you may create a listener file and perform the respective operation when that event fires| - |user.role.create.after|This event will be fired after user role gets created. The role of user in created from admin panel and you may create a listener file and perform the respective operation when that event fires| - |user.role.update.before|This event will be fired before user role gets updated. The role of user in created from admin panel and you may create a listener file and perform the respective operation when that event fires| - |user.role.update.after|This event will be fired after user role gets updated. The role of user in created from admin panel and you may create a listener file and perform the respective operation when that event fires| - |user.role.delete.before|This event will be fired before user role gets updated. The role of user in created from admin panel and you may create a listener file and perform the respective operation when that event fires| - |user.role.delete.after|This event will be fired after user role gets deleted. The role of user in created from admin panel and you may create a listener file and perform the respective operation when that event fires| - |user.admin.create.before|This event will be fired before user gets created. The user gets created from admin panel and you may create a listener file and perform the respective operation when that event fires| - |user.admin.delete.after|This event will be fired after user gets deleted. The user gets created from admin panel and you may create a listener file and perform the respective operation when that event fires| - |user.admin.update.before|This event will be fired before user gets updated. The user gets created from admin panel and you may create a listener file and perform the respective operation when that event fires| - |user.admin.update.after|This event will be fired after user gets updated. The user gets created from admin panel and you may create a listener file and perform the respective operation when that event fires| - |user.admin.delete.before|This event will be fired before user gets deleted. The user gets created from admin panel and you may create a listener file and perform the respective operation when that event fires| - |user.admin.delete.after|This event will be fired after user gets deleted. The user gets created from admin panel and you may create a listener file and perform the respective operation when that event fires| - |user.admin.delete.before|This event will be fired before user gets deleted. The user gets created from admin panel and you may create a listener file and perform the respective operation when that event fires| - |user.admin.delete.after|This event will be fired after user gets deleted. The user gets created from admin panel and you may create a listener file and perform the respective operation when that event fires| - -## Events Listen in Bagisto - -- Event listen in bagisto is given below with their functionality. - - | Events name | functionality | - | ------------------------------- | ------------- | - | checkout.order.save.after | This event will be fired after order creation and listen in **`ProductFlat`** listener file to send new order mail from **`sendNewOrderMail`** function | - | sales.invoice.save.after | This event will be fired after invoice details have been saved and listen in **`ProductFlat`** listener file to send new invoice mail from **`sendNewInvoiceMail`** function | - | sales.shipment.save.after | This event will be fired after shipment details have been saved and listen in **`ProductFlat`** listener file to send new shipment mail from **`sendNewShipmentMail`** function | - | checkout.order.save.after | This event will be fired after order has been created and will listen in **`ProductFlat`** listener file to update product inventory from **`updateProductInventory`** function | - | catalog.attribute.create.after | This event will be fired after attribute has been created and listen in **`ProductFlat`** listener file from **`afterAttributeCreatedUpdated`** function | - | catalog.attribute.update.after | This event will be fired after attribute has updated and listen in **`ProductFlat`** listener file from **`afterAttributeCreatedUpdated`** function | - | catalog.attribute.delete.before | This event will be fired before attribute has been delete and listen in **`ProductFlat`** listener file from **`afterAttributeDeleted`** function | - | catalog.product.create.after | This event will be fired after product has been creation and listen in **`ProductFlat`** listener file from **`afterProductCreatedUpdated`** function | - | catalog.product.update.after | This event will be fired after product has been updated and listen in **`ProductFlat`** listener file from **`afterProductCreatedUpdated`** function | - -## Listening to Existing Events - -To listen to an existing event in Bagisto, you can follow these steps: - -1. Open the **`EventServiceProvider.php`** file located in the **`Providers`** folder. - -2. Inside the **`boot`** method, you can register your listener by calling the **`Event::listen`** method and providing the event name and the listener function. - - ```php - Event::listen('checkout.order.save.after', 'Webkul\Admin\Listeners\Order@sendNewOrderMail'); - ``` - - In the example above, we are listening to the **`checkout.order.save.after`** event and specifying the **`sendNewOrderMail`** function from the **`Order`** listener class in the **`Webkul\Admin\Listeners`** namespace. - -By registering the listener, you have associated the **`sendNewOrderMail`** function with the **`checkout.order.save.after`** event. Whenever this event is triggered, the specified function will be executed. - -You can modify the listener function according to your requirements to perform the desired operation. diff --git a/docs/1.5.x/advanced/helpers.md b/docs/1.5.x/advanced/helpers.md deleted file mode 100644 index e0e4058e..00000000 --- a/docs/1.5.x/advanced/helpers.md +++ /dev/null @@ -1,187 +0,0 @@ -# Helpers - -[[TOC]] - -## Introduction - -Bagisto provides several helper methods in its packages, which are designed to assist developers in building their projects more efficiently. - -## Core Helpers - -The core helper methods mentioned below are part of the `Core` class in the `Webkul\Core` namespace. Let's explore some common methods: - -- **Get all channels:** - - ```php - core()->getAllChannels(); - ``` - -- **Get the current channel:** - - ```php - core()->getCurrentChannel(); - ``` - -- **Set the current channel:** This method takes an instance of the `Webkul\Core\Models\Channel` class as an argument. - - ```php - core()->setCurrentChannel($channel); - ``` - -- **Get the current channel code:** - - ```php - core()->getCurrentChannelCode(); - ``` - -- **Get the default channel:** - - ```php - core()->getDefaultChannel(); - ``` - -- **Get the default channel code:** - - ```php - core()->getDefaultChannelCode(); - ``` - -- **Get the requested channel code:** This method is useful when you need to retrieve the channel from the request, with an optional fallback parameter. - - ```php - core()->getRequestedChannelCode($fallback = true); - ``` - -- **Get the channel name:** This method retrieves the name of the channel. It handles fallback cases by checking the name in the property, app locale code, and the `app.fallback_locale` config key. - - ```php - core()->getChannelName($channel); - ``` - -- **Get all locales:** - - ```php - core()->getAllLocales(); - ``` - -- **Get all locales by requested channel:** This method provides all the locales associated with the requested channel. - - ```php - core()->getAllLocalesByRequestedChannel(); - ``` - -- **Get the current locale:** - - ```php - core()->getCurrentLocale(); - ``` - -- **Get the requested locale code:** This method retrieves the locale code from the request, with optional parameters for specifying the locale key and fallback behavior. - - ```php - core()->getRequestedLocaleCode($localeKey = null, $fallback = true); - ``` - -- **Get all customer groups:** - - ```php - core()->getAllCustomerGroups(); - ``` - -- **Get the requested customer group code:** This method fetches the customer group code from the request. - - ```php - core()->getRequestedCustomerGroupCode(); - ``` - -- **Get all currencies:** - - ```php - core()->getAllCurrencies(); - ``` - -- **Get the base currency:** - - ```php - core()->getBaseCurrency(); - ``` - -- **Get the base currency code:** - - ```php - core()->getBaseCurrencyCode(); - ``` - -- **Get the channel-based currency:** - - ```php - core()->getChannelBaseCurrency(); - ``` - -- **Get the channel-based currency code:** - - ```php - core()->getChannelBaseCurrencyCode(); - ``` - -- **Get the current currency:** - - ```php - core()->getCurrentCurrency(); - ``` - -- **Get the current currency code:** - - ```php - core()->getCurrentCurrencyCode(); - ``` - -- **Get the exchange rate based on the currency ID:** - - ```php - core()->getExchangeRate($targetCurrencyId); - ``` - -- **Get the formatted amount:** - - ```php - core()->currency($amount = 0); - ``` - -- **Get the configuration data based on the key, channel, and locale:** - - ```php - core()->getConfigData($field, $channel = null, $locale = null); - ``` - -- **Get all countries:** - - ```php - core()->countries(); - ``` - -- **Get the country name by country code:** - - ```php - core()->country_name($countryCode); - ``` - -- **Get all states of a country:** - - ```php - core()->states($countryCode); - ``` - -- **Get sender email details:** - - ```php - core()->getSenderEmailDetails(); - ``` - -- **Get admin email details:** - - ```php - core()->getAdminEmailDetails(); - ``` - -These core helper methods provide various functionalities to simplify common tasks and streamline development in Bagisto. \ No newline at end of file diff --git a/docs/1.5.x/advanced/indexing-products-to-elasticsearch.md b/docs/1.5.x/advanced/indexing-products-to-elasticsearch.md deleted file mode 100644 index 4ae0bbe5..00000000 --- a/docs/1.5.x/advanced/indexing-products-to-elasticsearch.md +++ /dev/null @@ -1,100 +0,0 @@ -# Elasticsearch Configuration - -[[TOC]] - -In this section, we will explain how to configure Elasticsearch for indexing products from the database. - -## Environment Setup - -Before we proceed, make sure you have [Elasticsearch](https://www.elastic.co/guide/en/elasticsearch/reference/current/install-elasticsearch.html) installed on your system. By default, Elasticsearch uses port **`9200`**. We will be using the same port for our configuration. - -To verify if Elasticsearch is installed successfully on your system, open your browser and navigate to **`http://localhost:9200`**. If you see the following output, it means Elasticsearch is installed: - -```json -{ - "name" : "webkul-pc", - "cluster_name" : "elasticsearch", - "cluster_uuid" : "suPotT8zQjCOlq9dteWKyQ", - "version" : { - "number" : "8.6.2", - "build_flavor" : "default", - "build_type" : "deb", - "build_hash" : "2d58d0f136141f03239816a4e360a8d17b6d8f29", - "build_date" : "2023-02-13T09:35:20.314882762Z", - "build_snapshot" : false, - "lucene_version" : "9.4.2", - "minimum_wire_compatibility_version" : "7.17.0", - "minimum_index_compatibility_version" : "7.0.0" - }, - "tagline" : "You Know, for Search" -} -``` - -Alternatively, you can use the curl command: - -```sh -curl -X GET 'http://localhost:9200' -``` - -## Configuration Setup - -To configure Elasticsearch, you can set the necessary key-value pairs in the **`.env`** file of your project. - -Open the **`.env`** file and add the following lines: - -```env -ELASTICSEARCH_PORT=9200 -ELASTICSEARCH_HOST=localhost -``` - -Save the file and run the following command to cache the configuration: - -```sh -php artisan config:cache -``` - -Now your environment is set up and ready to index products. - -If you encounter any issues, you can directly set the configuration in the **`config/elasticsearch.php`** file: - -```php -'hosts' => [ - [ - 'host' => env('ELASTICSEARCH_HOST', 'localhost'), - 'port' => env('ELASTICSEARCH_PORT', 9200), - // Additional configuration options can be added here - ] -] -``` - -## Indexing - -After setting up the environment and configuration, new products will be automatically indexed when created. - -To index existing products, run the following command: - -```sh -php artisan indexer:index -``` - -This command will index all the data from the **`product_flat`** table to the Elasticsearch index. - -## Checking Indexes - -To check if your products have been indexed successfully, open your browser and navigate to **`http://localhost:9200/_cat/indices?v`**. You should see information about the imported index. - -Alternatively, you can use the curl command: - -```sh -curl -X GET 'http://localhost:9200/_cat/indices?v' -``` - -The output will provide details about the product index: - -:::details Output - -![Product Index Information](../../assets/1.5.x/images/advanced-topics/product-index.png) - -::: - -By following these steps, you have successfully configured Elasticsearch and indexed your products. \ No newline at end of file diff --git a/docs/1.5.x/advanced/override-core-model.md b/docs/1.5.x/advanced/override-core-model.md deleted file mode 100644 index fd08acdf..00000000 --- a/docs/1.5.x/advanced/override-core-model.md +++ /dev/null @@ -1,66 +0,0 @@ -# Override Core Model - -[[TOC]] - -## Introduction - -Bagisto utilizes Concord, a Laravel extension, for building modules on top of Laravel's built-in service providers. Concord introduces the concept of model proxies, which allow you to override and extend core models in a modular way. - -Concord requires the existence of an interface, such as **Product**, which serves as a contract that can be bound to a concrete class using Concord's **registerModel()** method. - -By default, the **`Models\Product`** class is bound to the **`Contracts\Product`** interface within the module. If you want to extend or override this class, you can use Concord's **registerModel()** method. - -The **registerModel()** method handles the binding of the interface and implementation in Laravel's service container, enabling you to easily type-hint the interface for automatic injection. - -For more details, you can visit the [Concord GitHub repository](https://github.com/artkonekt/concord) or refer to the [Concord documentation](https://artkonekt.github.io/concord/#/). - -## Overriding a Model Class - -- In Concord modules, an interface is typically defined for each Eloquent model. If you wish to override a model, you can instruct Concord to use another class for that interface. Here's an example: - - ```php - app->concord->registerModel( - \Webkul\Product\Contracts\Product::class, \App\Http\Product::class - ); - } - } - ``` - -- In the code above, the **registerModel()** method accepts two parameters: - - - The first parameter specifies the path to the interface (contract) you want to override. - - The second parameter specifies the path to the model class that will override the default implementation. - -- The model class you're overriding must extend your specified model path, as shown in the example below: - - ```php - field('home_page_content') - ->with(['sliderData' => $sliderData])->render() !!} - - {!! view_render_event('bagisto.shop.home.content.after') !!} - -@endsection -``` - -In the example above, we use **`view_render_event()`** to inject content before and after the main content of the **`home_page_content`** template. - -## Render View - -To render content before or after a specific section of a template, follow these steps: - -1. Add the event in the blade file where you want to inject the content. For example: - - ```php - {!! view_render_event('bagisto.shop.test.before') !!} - ``` - - In this example, **`bagisto.shop.test`** is the event name defined in a random blade file of your project. - -2. Next, you need to listen to the event in the **`EventServiceProvider.php`** file. Add the following code in the **`boot()`** method: - - ```php - addTemplate('template file path to be injected'); - }); - } - } - ``` - - In the code above, replace **`'template file path to be injected'`** with the actual path to the template file that you want to render. - -:::warning - Make sure that you have registered the **`EventServiceProvider`** in your own service provider. -::: - -By following these steps, you can use the **`view_render_event()`** function to dynamically inject content before or after the main content of a template in Bagisto. \ No newline at end of file diff --git a/docs/1.5.x/advanced/security-practice.md b/docs/1.5.x/advanced/security-practice.md deleted file mode 100644 index a3ce5d39..00000000 --- a/docs/1.5.x/advanced/security-practice.md +++ /dev/null @@ -1,135 +0,0 @@ -# Best Security Practices - -[[TOC]] - -## Software Updates - -To ensure the security of your system, follow these best practices: - -- Use HTTPS to encrypt communication. Google now considers HTTPS as a ranking factor. -- Keep all software on the server up-to-date, including Bagisto, the database, Adminer/phpMyAdmin, Apache, Redis, etc. -- Regularly update the server operating system to apply available security patches. -- Manage files only through secure communication protocols like SSH, SFTP, or HTTPS. Disable FTP. -- Use the **`.htaccess`** file to protect system files when using the Apache web server. -- Disable unused ports and stop unnecessary services running on the server. -- Restrict access to the admin panel by allowing only specific IP addresses and enforcing two-factor authorization for admin logins. -- Ensure the use of strong and unique passwords. -- Configure and update the firewall properly to secure the connection between payment card data and the public network. - -## Limiting Error Messages - -To limit the exposure of sensitive information in error messages, follow these steps: - -- Edit your Apache configuration file to avoid displaying server and operating system details. -- Set **`ServerSignature`** to **`Off`** (by default, it is **`On`**). -- Add **`ServerTokens Prod`** to display Apache only as the product. - -:::details Screenshot - -![limiting-error-messages](../../assets/1.5.x/images/advanced-topics/limiting-error-messages.png) - -::: - -## Limiting Admin Access - -To restrict access to the admin area, modify the **`.htaccess`** file with the following code: - -```apacheconf -RewriteEngine On -RewriteCond %{REQUEST_URI} .*/admin -RewriteCond %{REMOTE_ADDR} != -RewriteCond %{REMOTE_ADDR} != -RewriteRule ^(.*)$ - [R=403,L] -``` - -Ensure that there are no accessible development leftovers on the server, such as "log files," ".git directories," "database dumps," or "zip files." - -## Restricting Unnecessary Files - -To restrict access to unnecessary files, add the following code to your **`.htaccess`** file: - -```apacheconf - - Require all denied - -``` - -Consider using a Web Application Firewall (WAF) to analyze traffic and detect suspicious patterns, such as credit card information being sent to attackers. Additionally, restrict public access to only ports 80 (HTTP) and 443 (HTTPS), while blocking other ports. - -## Restricting PHP Execution Inside Storage - -To restrict PHP execution inside the storage directory, modify your Apache configuration file: - -```apacheconf - - - Require all denied - - php_flag engine off - -``` - -Don't forget to restart Apache after making these changes. - -## Server Hardening - -Take the following measures to harden your server: - -- Use the **`mod_security`** module to detect and prevent intrusions. -- Implement the **`mod_passive`** module to prevent brute force attacks. -- Allow only specific users to log in. -- Disable login for users with empty passwords. -- Review and configure iptable rules to prevent unauthorized access and activity. -- Regularly back up important files and store them remotely in a secure environment. - -## Strong Passwords - -Ensure the use of strong and unique passwords and encourage periodic password changes. You can use a password generator tool ([Password Generator](https://passwords-generator.org/)) to create strong passwords. Limit access to the Bagisto admin - - panel by updating the whitelist with authorized IP addresses. - -## Implementation of HTTP Security Headers - -Implementing the following HTTP security headers enhances web security: - -### HTTP Strict Transport Security (HSTS) - -Set the **`Strict-Transport-Security`** response header to instruct the browser to only access the application using HTTPS: - -``` -Strict-Transport-Security: max-age= -``` - -### Cross-Site Scripting Protection (X-XSS Protection) - -Set the **`X-XSS-Protection`** response header to enable browsers to detect and prevent cross-site scripting (XSS) attacks: - -``` -X-XSS-Protection: 1; mode=block -``` - -### X-Frame-Options​ - -The **`X-Frame-Options`** response header protects applications against clickjacking. It specifies whether the content can be displayed within frames: - -``` -X-Frame-Options: deny -``` - -### X-Content-Type-Options​ - -The **`X-Content-Type-Options`** response header forces the browser to disable MIME sniffing, preventing MIME sniffing vulnerabilities: - -``` -X-Content-Type-Options: nosniff -``` - -### Content Security Policy (CSP) - -Implement a Content Security Policy (CSP) response header to control resources that can be loaded in users' browsers. CSP helps detect and mitigate attacks such as XSS and clickjacking. - -### Continuous Logging And Monitoring - -Maintain continuous logging and monitoring of all network access and cardholder data activities. Keep an eye out for large volume orders of a single item from new customers, a series of orders shipped to the same address but using different payment methods. - -By implementing these best security practices, you can enhance the security of your system and protect it from potential threats. \ No newline at end of file diff --git a/docs/1.5.x/architecture/README.md b/docs/1.5.x/architecture/README.md deleted file mode 100644 index ac1ebe2b..00000000 --- a/docs/1.5.x/architecture/README.md +++ /dev/null @@ -1,12 +0,0 @@ -# Architecture concepts -**Bagisto** is very easy framework to understand. The goal of this document to give you overview of how bagisto works. - -We love to work with hot [Opensource](https://en.wikipedia.org/wiki/Open_source) softwares so Bagisto is built on technologies such as [PHP](https://php.net), [Laravel](https://laravel.com) and [Vue.js](https://vuejs.org/) - -As **Bagisto** targets e-commerce businesses so it provides front and back end features to enable customer account and administrative control simultaneously. - -Laravel packages are being used to separate each functionality such as Category, Product, Cart, Checkout, etc. - -We developed and used built-in components of Vue.js - -**Bagisto** registers useful events that are triggered on most of the pages which could enable to perform some custom operations in the application. diff --git a/docs/1.5.x/architecture/frontend.md b/docs/1.5.x/architecture/frontend.md deleted file mode 100644 index f0eaf168..00000000 --- a/docs/1.5.x/architecture/frontend.md +++ /dev/null @@ -1,13 +0,0 @@ -# Vue and Sass - -[Vue.js](https://vuejs.org/) handles the complete UI of **Bagisto** - -[Laravel Mix](https://laravel.com/docs/10.x/mix) is a package that provides a fluent API for defining [webpack](https://webpack.js.org/) and it build steps for your [Laravel](https://laravel.com) application using several common CSS and JavaScript [pre-processors](https://en.wikipedia.org/wiki/Preprocessor). - -**Bagisto** is using [Vue.js](https://vuejs.org/) and [Sass](https://sass-lang.com/), webpack compiles all of CSS and JavaScript assets that are placed into public directory. - -In **webpack.mix.js** file, just define your [Vue.js](https://vuejs.org/) and [Sass](https://sass-lang.com/) assets, [webpack](https://webpack.js.org/) will be responsible to compile all the assets on defined location. - -# Blade - -**Bagisto** uses blade template engine that is included with **Laravel**. It does not restrict you from using plain PHP code in your templates. [This documentation](http://localhost:8080/1.5.x/packages/views.html#directory-structure) provides an explanation of directory structure and package configuration for implementations. \ No newline at end of file diff --git a/docs/1.5.x/architecture/modular-design.md b/docs/1.5.x/architecture/modular-design.md deleted file mode 100644 index 34b05255..00000000 --- a/docs/1.5.x/architecture/modular-design.md +++ /dev/null @@ -1,13 +0,0 @@ -# Modular Design - -**Modular design** is the preferred approach for e-commerce software, as it enables the separation of each package and empowers users to work with self-contained modules. - -This architectural style effectively manages the complexity of the system by breaking down problems into smaller, more manageable modules. - -To implement this modular approach, Bagisto utilizes the [Concord package](https://github.com/artkonekt/concord). - -Concord plays a pivotal role in enabling the modular architecture within **Bagisto**, providing the necessary tools and features. - -By leveraging **Concord**, **Bagisto** is able to follow a modular architecture that enhances **flexibility** and **scalability**. - -Through Concord, Bagisto users can take advantage of the benefits offered by a modular architecture, enabling them to easily customize and extend the software according to their specific requirements. \ No newline at end of file diff --git a/docs/1.5.x/architecture/packages.md b/docs/1.5.x/architecture/packages.md deleted file mode 100644 index 150bb4cb..00000000 --- a/docs/1.5.x/architecture/packages.md +++ /dev/null @@ -1,11 +0,0 @@ -# Packages -[Laravel](https://laravel.com) packages are the primary way of adding functionality so the following features are distributed into packages to enhance the application and allow developers to follow the standard way of developing custom functionality. - -- Theme -- Category -- Product -- Cart -- Checkout -- Payment - -Service provider enables features such as loading [routes](/1.5.x/packages/routes.html), [migrations](/1.5.x/packages/create-migrations.html), [languages](/1.5.x/packages/localization.html) or publishing [views](/1.5.x/packages/views.html), etc so **Bagisto** is developed considering these aspects. diff --git a/docs/1.5.x/architecture/performance.md b/docs/1.5.x/architecture/performance.md deleted file mode 100644 index 21457486..00000000 --- a/docs/1.5.x/architecture/performance.md +++ /dev/null @@ -1,29 +0,0 @@ -# Performance - -[[TOC]] - -In the realm of online stores, [web vitals](https://web.dev/vitals/) have become increasingly crucial. **Bagisto** prioritizes good [LCP](https://web.dev/lcp/) and [CLS](https://web.dev/cls/) to ensure optimal user experience. - -Additionally, **Bagisto** has seamlessly integrated [ElasticSearch](https://bagisto.com/en/elasticsearch-for-bagisto/) to further enhance user experience. - -## Indexing - -When dealing with large volumes of data and retrieving complex information like variants and prices, optimizing queries becomes a challenge. - -To enhance **Bagisto's** performance, the following indexers play a crucial role: - -- Inventory -- Price -- ElasticSearch - -### Inventory - -This indexer focuses on indexing the inventory of the website for various product types such as configurable, grouped, and bundled products. - -### Price - -The price indexer manages the prices of the aforementioned product types. - -### ElasticSearch - -As Elastic is designed to handle large amounts of data and provide fast and scalable search capabilities, **Bagisto** leverages its capabilities to index all products, thereby significantly enhancing the search functionality. \ No newline at end of file diff --git a/docs/1.5.x/architecture/repository-pattern.md b/docs/1.5.x/architecture/repository-pattern.md deleted file mode 100644 index 3d6f0ad7..00000000 --- a/docs/1.5.x/architecture/repository-pattern.md +++ /dev/null @@ -1,9 +0,0 @@ -# Repository Pattern - -[Eloquent](https://laravel.com/docs/10.x/eloquent), the [ORM](https://en.wikipedia.org/wiki/Object%E2%80%93relational_mapping) in **Laravel**, provide a higher level of abstraction and make working with databases more convenient, as you can focus on manipulating objects rather than dealing with raw SQL queries. - -To further enhance flexibility and maintainability, Bagisto incorporates the **Repository pattern** as an additional layer on top of the **ORM**. - -By implementing the **Repository pattern**, **Bagisto** restricts the use of raw queries throughout the application. This ensures consistency and promotes better code organization. - -Bagisto utilizes the [Prettus Repository](https://github.com/prettus/l5-repository) package to facilitate the implementation of the **Repository pattern**. This choice enhances the flexibility of the application, making it easier to maintain and extend. \ No newline at end of file diff --git a/docs/1.5.x/architecture/theme.md b/docs/1.5.x/architecture/theme.md deleted file mode 100644 index 7b5750e5..00000000 --- a/docs/1.5.x/architecture/theme.md +++ /dev/null @@ -1,3 +0,0 @@ -# Theme - -In e-commerce businesses, themes provides an elegant way to attract users. **Bagisto** provides front-end theme i.e. **Velocity** and allow developers to create new theme as per their convenience. \ No newline at end of file diff --git a/docs/1.5.x/deploy/README.md b/docs/1.5.x/deploy/README.md deleted file mode 100644 index 6ca0fb29..00000000 --- a/docs/1.5.x/deploy/README.md +++ /dev/null @@ -1,9 +0,0 @@ -# Deploy - -this article will explain how you can deploy your Bagisto store to your production server when you have been developing your Bagisto store on your local system. - -## Deploy Bagisto with (S)FTP - -## Deploy on Cpanel - -## Deploy on Plesk diff --git a/docs/1.5.x/introduction/README.md b/docs/1.5.x/introduction/README.md deleted file mode 100644 index c4bdee56..00000000 --- a/docs/1.5.x/introduction/README.md +++ /dev/null @@ -1,45 +0,0 @@ -# Introduction - -## Bagisto: A Powerful Open-Source E-Commerce Platform - -Bagisto is a popular open-source e-commerce platform built on the combination of Laravel PHP framework and Vue.js. It provides a comprehensive set of tools and features to help developers and businesses create and manage their online stores effectively. With its flexible and adaptable nature, Bagisto has gained recognition and support from a growing community of users, as evidenced by its impressive 6K+ stars on [GitHub](https://github.com/bagisto/bagisto). - -## Key Features of Bagisto - -Bagisto comes with a rich set of features that empower developers and businesses to create and manage their online stores effectively: - -### Modular Design - -Bagisto adopts a modular design approach, providing developers with the flexibility to customize and extend the platform's functionalities to meet specific business requirements. It allows you to tailor your e-commerce store precisely to your needs. - -### Multi-Channel and Multi-Vendor Support - -With Bagisto, you can easily create and manage multiple sales channels, enabling you to expand your reach and cater to different customer segments. It also supports multi-vendor functionality, allowing various vendors to sell their products on your platform. - -### Responsive and Mobile-Friendly - -Bagisto ensures that your online store looks great and performs flawlessly across different devices, including mobile phones and tablets. With a responsive design, you can provide a seamless shopping experience to your customers, no matter the device they use. - -### Efficient Inventory Management - -Bagisto simplifies inventory management by providing tools to effectively track stock levels, set low inventory alerts, and streamline order fulfillment processes. You can efficiently manage your product inventory and ensure a smooth flow of operations. - -### Secure Payment Gateways and Shipping Methods - -Integrating popular payment gateways and shipping methods is effortless with Bagisto. It offers seamless integration options to ensure secure and convenient transactions for your customers, making the checkout process a breeze. - -### Search Engine Optimization (SEO) Capabilities - -Bagisto equips you with built-in features to optimize your online store for search engines. You can customize meta tags, URLs, and keywords to improve your store's visibility and attract more organic traffic. - -## Community and Support - -Bagisto has a vibrant and supportive community of developers and users who actively contribute to its growth and improvement. - -- **Explore Bagisto**: Visit our website at [https://bagisto.com](https://bagisto.com) to discover more about Bagisto's features and experience a demo. - -- **Stay Updated**: Refer to the [Bagisto roadmap](https://bagisto.com/roadmap) for the latest version and recently added features. - -- **GitHub Repository**: Access the Bagisto repository on [GitHub](https://github.com/bagisto/bagisto) with over 6K+ stars, reflecting its popularity and community support. - -Join the Bagisto community today and build and manage your online store with ease. \ No newline at end of file diff --git a/docs/1.5.x/introduction/docker.md b/docs/1.5.x/introduction/docker.md deleted file mode 100644 index 986e2333..00000000 --- a/docs/1.5.x/introduction/docker.md +++ /dev/null @@ -1,225 +0,0 @@ -# Docker - -[[toc]] - -## Introduction - -[Docker](https://www.docker.com/) is an open platform for developing, shipping, and running applications. Docker enables you to separate your applications from your infrastructure so you can deliver software quickly. With Docker, you can manage your infrastructure in the same ways you manage your applications. Docker can also be used for defining and running multi-container Docker applications using the Docker Compose tool. - -With the help of Docker Compose, you can define containers to be built, their configuration, links, volumes, ports, etc., in a single file, and it gets launched by a single command. You can also add multiple servers and services just by adding them to the Docker Compose configuration file. This configuration file is in [YAML](https://en.wikipedia.org/wiki/YAML) format. - -#### Application Data and Database Volume Persistence - -It is recommended to keep your application files and database data volume on the Docker host and mount them on the running container. This ensures that the application and database data persistence even in the case of containers' failure or termination. In this way, even if you destroy containers, your data won't get lost unless you remove them forcefully. -This compose configuration file mounts the application directory **`app`** and database volume **`dbvolume`** from the host to running Docker containers at the time of containers' launch. - -## Installation & Setup - -### First steps - -Before you can launch Bagisto in a Docker environment, you need to install the latest versions of Docker and Docker Compose. - -- [Docker](https://docs.docker.com/install/) -- [Docker Compose](https://docs.docker.com/compose/install/) -- [Composer](https://getcomposer.org) (optional) - -### Configure the Docker container - -Once Docker and Docker Compose are installed, you need to create a **`docker-compose.yml`** file. The **`docker-compose.yml`** configuration file requires the following inputs from the user: - -#### Webserver configuration - -In the **`web_server`** service block, assign your system's working user UID to the **`USER_UID`** environment variable. To find your user ID, run the following command on Linux or macOS: -```shell -id -u -``` - -#### Database configuration - -In the **`database_server`** service block, assign the MySQL database name, MySQL database user name, MySQL database user password, and MySQL root password to the **`MYSQL_DATABASE`**, **`MYSQL_USER`**, **`MYSQL_PASSWORD`**, and **`MYSQL_ROOT_PASSWORD`** environment variables, respectively. - -#### Clone configuration from GitHub - -You can make use of our repository from GitHub by cloning it into your new directory: -```shell -git clone https://github.com/bagisto/bagisto-docker.git . -``` - -#### Manual configuration - -Alternatively, you can create a new folder, for example, **`bagisto-docker`**, and manually create the **`docker-compose.yml`** file inside it. Add the following content to **`docker-compose.yml`**: - -```yml -version: '3' - -services: - - web_server: - image: webkul/apache-php:latest - container_name: apache2 - restart: always - volumes: - - ./app:/var/www/html - working_dir: /var/www/html/ - environment: - USER_UID: 'mention your system user ID here. ex: 1001, 1000, 33, etc' - networks: - - bagisto-network - ports: - - '80:80' - expose: - - '80' - depends_on: - - database_server - links: - - database_server - - database_server: - image: mysql:5.7 - container_name: mysql - restart: always - environment: - MYSQL_DATABASE: 'mention the name of the database to be created here. eg: mydatabase' - MYSQL_USER: 'mention database user here. eg: mydatabase_user' - MYSQL_PASSWORD: 'mention database user password here. ex: mystrongPassword' - MYSQL_ROOT_PASSWORD: 'mention mysql root password here. ex: mysqlstrongpass' - MYSQL_ROOT_HOST: '%' - networks: - - bagisto-network - ports: - - '3306:3306' - expose: - - '3306' - volumes: - - ./dbvolume:/var/lib/mysql - -volumes: - dbvolume: - app: - -networks: - bagisto-network: - ** -``` - -#### Downloading the Docker Image - -To download the Docker images for Apache-PHP version 7.3 and MySQL version 5.7, execute the following command: - -```shell -docker-compose pull -``` - -### Launching the Docker Container - -Execute the following command to create a network and launch web server and database containers with the names **`apache2`** and **`mysql`** respectively. It will also create new directories **`app`** and **`dbvolume`** within your current directory and mount them to the respective Docker containers as specified in the **`docker-compose.yml`** file. Additionally, it binds your **`host port 80`** to the Apache2 container's port 80, and your **`host port 3306`** to the MySQL container's port 3306. If you wish to use different ports for the containers, modify their values in the **`docker-compose.yml`** file. - -``` -docker-compose up -d -``` - -### Monitoring Your Container(s) - -To check the running Docker containers, use the following commands: - -**`docker ps`** OR **`docker-compose ps`** -```shell -CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES -62a10346b84a webkul/apache-php:latest "/usr/bin/supervisord" About an hour ago Up About an hour 0.0.0.0:80->80/tcp apache2 -90a0a2e0e46b mysql:5.7 "docker-entrypoint.s…" About an hour ago Up About an hour 0.0.0.0:3306->3306/tcp, 33060/tcp mysql -``` - -## Configuring Bagisto - -After setting up your environment, you can proceed with the installation of Bagisto. There are two ways to install Bagisto: either from [Github](#install-without-composer) or using [composer](#install-with-composer). - -### Install without Composer - -To install Bagisto without using composer, follow these steps: -1. Download the [latest release](https://bagisto.com/en/download) and save it in the **`app/bagisto`** directory. -2. Open the **`.env`** file located inside the **app/bagisto** directory. -3. Set the following environment variables as shown below: - -```editorconfig -APP_URL=https://127.0.0.1 -DB_CONNECTION=mysql -DB_HOST=mysql -DB_PORT=3306 -DB_DATABASE= -DB_USERNAME= -DB_PASSWORD= -``` - -Run the following commands to install Bagisto. -```shell -docker exec -i apache2 bash -c "su - www-data -s /bin/bash -c 'php bagisto/artisan migrate'" -docker exec -i apache2 bash -c "su - www-data -s /bin/bash -c 'php bagisto/artisan db:seed'" -docker exec -i apache2 bash -c "su - www-data -s /bin/bash -c 'php bagisto/artisan vendor:publish'" -docker exec -i apache2 bash -c "su - www-data -s /bin/bash -c 'php bagisto/artisan storage:link'" -docker exec -i apache2 bash -c "su - www-data -s /bin/bash -c 'composer dump-autoload -d bagisto'" -``` - -Mention the database details same as docker-compose.yml and admin details. - - -### Install with composer - -The following commands will be exexcuted within the docker container -```shell -docker exec -i apache2 bash -c "su - www-data -s /bin/bash -c 'composer create-project bagisto/bagisto'" -``` - -Open the .env file inside **`app/bagisto`** directory and set the following environment variables listed below: - -```editorconfig -APP_URL=https://127.0.0.1 -DB_CONNECTION=mysql -DB_HOST=mysql -DB_PORT=3306 -DB_DATABASE= -DB_USERNAME= -DB_PASSWORD= -``` - -To install Bagisto, execute the following commands: - -```shell -docker exec -i apache2 bash -c "su - www-data -s /bin/bash -c 'php bagisto/artisan migrate'" -docker exec -i apache2 bash -c "su - www-data -s /bin/bash -c 'php bagisto/artisan db:seed'" -docker exec -i apache2 bash -c "su - www-data -s /bin/bash -c 'php bagisto/artisan vendor:publish'" -docker exec -i apache2 bash -c "su - www-data -s /bin/bash -c 'php bagisto/artisan storage:link'" -docker exec -i apache2 bash -c "su - www-data -s /bin/bash -c 'composer dump-autoload -d bagisto'" -``` - -Bagisto has been successfully installed and is now ready to use. To access it, open your web browser and enter your server's IP address or domain name. - -### Configuring Apache - -By default, the Apache document root is set to **/var/www/html/public_html**. Additionally, the **app** directory on your host machine is mapped to the **html** directory inside the container. To ensure proper configuration, we need to create a symlink of **`bagisto/public`** in the **`app`** directory that points to **`/var/www/html/public_html`**. - -To create the symlink, follow the steps below: - -On Linux or macOS, run the following command: -```bash -cd app; ln -snf bagisto/public public_html -``` - -On Windows, run the following command: -```command-line -cd app -mklink bagisto/public public_html -``` - -### Ready to Use - -#### Admin Login: - -You can access the admin interface by visiting [http://your_server_endpoint/admin](http://your_server_endpoint/admin/) and logging in with the following credentials: - -| Email | Password | -|----------------------|----------| -| admin@example.com | admin123 | - -#### Customer Login: - -To access your store, visit [http://your_server_endpoint/](http://your_server_endpoint/). \ No newline at end of file diff --git a/docs/1.5.x/introduction/installation.md b/docs/1.5.x/introduction/installation.md deleted file mode 100644 index bd08110b..00000000 --- a/docs/1.5.x/introduction/installation.md +++ /dev/null @@ -1,103 +0,0 @@ -# Installation - -[[TOC]] - -## Install Using GUI Installer - -To install Bagisto using our GUI installer, follow these steps: - -1. [Download Bagisto](https://bagisto.com/en/download/) from our website. -2. Extract the contents of the downloaded zip file. -3. Navigate to the project root directory. -4. Run the following command: - - ```sh - composer install - ``` - -5. Configure your HTTP server to point to the **`public/`** directory of the project. -6. Open your browser and access the following URL: - - ``` - http://localhost/bagisto/public/ - ``` - - This will launch the Bagisto installer. - -## Install Using Composer - -To install Bagisto using Composer, use the following steps: - -1. Run the following command: - - ```sh - composer create-project bagisto/bagisto - ``` - -2. Navigate to the project root directory. -3. Open the **`.env`** file and add your database credentials: - - ```editorconfig - DB_DATABASE= - DB_USERNAME= - DB_PASSWORD= - ``` - -4. Run the following command: - - ```sh - php artisan bagisto:install - ``` - - ::: warning - During the installation process, if the **`.env`** file doesn't exist, the installer will prompt you to provide the necessary information. - ::: - - - Follow the prompts during the installation process to provide the following details: - - ``` - - Please Enter the APP URL : - - Please Enter the Admin URL : - - Please select the default locale or press enter to continue [en]: - - Please enter the default timezone [Asia/Kolkata]: - - Please enter the default currency [USD]: - - What is the database name to be used by Bagisto?: - - What is your database username?: - - What is your database password?: - ``` - -## Start Using Bagisto - -### On a Production Server - -To access Bagisto on a production server, open your domain in a web browser. For example: - -``` -https://example.com/ -``` - -### On Your Local Server - -To access Bagisto on your local server, follow these steps: - -1. Configure your HTTP server to point to the **`public/`** directory of the project. -2. Run the following command: - - ```sh - php artisan serve - ``` - -3. Open your browser and access the provided local server URL. - -### Login as an Admin - -To log in as an admin, visit **`https://example.com/admin/`**. If you used the **`php artisan bagisto:install`** command, use the following credentials: - -``` -Email: admin@example.com -Password: admin123 -``` - -### Login as a Customer - -To log in as a customer, you can directly register on **`https://example.com/customer/register`**. After registration, you can log in using your credentials on the domain. \ No newline at end of file diff --git a/docs/1.5.x/introduction/requirements.md b/docs/1.5.x/introduction/requirements.md deleted file mode 100644 index 321128c9..00000000 --- a/docs/1.5.x/introduction/requirements.md +++ /dev/null @@ -1,53 +0,0 @@ -# Requirements - -[[TOC]] - -## Server Configuration - -- **Server**: Apache 2 or NGINX -- **RAM**: 4GB or higher -- **Node**: 18.12.0 LTS or higher -- **PHP**: 8.1 or higher -- **Composer**: 2.5 or higher - -## PHP Extensions - -Ensure the following extensions are installed and enabled. You can check using the **`phpinfo()`** page or the **`php -m`** command. - -- **php-intl extension**: This extension is required for internationalization support in Bagisto. - -- **php-gd extension**: The **`php-gd`** extension must be properly installed to ensure correct image functionality in the project. If not installed correctly, image-related features may not work as expected. - - ::: tip Note - It is important to ensure proper installation of the **`php-gd`** extension to avoid any issues with image manipulation in Bagisto. - ::: - -## PHP Configuration - -Open your **`php.ini`** file and modify the following settings. - -- **memory_limit**: Set the **`memory_limit`** directive to **`4G`** or higher to ensure sufficient memory allocation for the application. - -- **max_execution_time**: Adjust the **`max_execution_time`** directive to **`360`** or higher. This value determines the maximum time (in seconds) a script is allowed to run. Increasing this value ensures that longer operations, such as import/export processes, can be completed successfully. - -- **date.timezone**: Set the **`date.timezone`** directive to your specific timezone. For example, **`Asia/Kolkata`**. This ensures that date and time-related functions work accurately based on the specified timezone. - -```ini -memory_limit = 4G -max_execution_time = 360 -date.timezone = Asia/Kolkata <- Change this to your own timezone. -``` - -::: tip Remember to restart your web server -Whenever you make changes to the PHP configuration file, be sure to restart Apache or NGINX to apply the modifications. -::: - -## Supported Database Servers - -Bagisto supports the following database servers: - -- **MySQL**: Version 8.0.32 or higher is recommended for optimal performance and compatibility. - -- **MariaDB**: Version 10.3 or higher is recommended for optimal performance and compatibility. - -- **Database Collation**: The recommended collation for the database is **`utf8mb4_unicode_ci`**, which ensures proper handling of Unicode characters and multilingual support. \ No newline at end of file diff --git a/docs/1.5.x/packages/README.md b/docs/1.5.x/packages/README.md deleted file mode 100644 index 104b96d5..00000000 --- a/docs/1.5.x/packages/README.md +++ /dev/null @@ -1,88 +0,0 @@ -## Package Development - -If you are looking to extend the functionalities of Bagisto eCommerce platform, creating a package is the way to go. A package is a self-contained module that adds specific features to the platform. It allows developers to add custom functionality to the platform without modifying the core codebase. - -This guide will walk you through the process of developing a package for Bagisto. - -In Bagisto, we have created numerous packages located at **`packages/Webkul/`**. Below is a basic tree structure of a package: - -~~~directory-structure -└── Webkul - └── Blog - ├── publishable - │ └── assets - │ ├── css - │ │ ├── admin.css - │ │ ├── default.css - │ │ └── velocity.css - │ ├── images - │ │ └── blog-icon.png - │ └── js - │ └── app.js - └── src - ├── Config - │ ├── acl.php - │ ├── admin-menu.php - │ └── system.php - ├── Console - │ └── Commands - ├── Contracts - │ └── Post.php - ├── Database - │ ├── Migrations - │ │ └── 2023_04_21_173057_create_posts_table - │ └── Seeders - ├── Events - ├── Http - │ ├── Controllers - │ │ ├── Admin - │ │ │ └── PostController.php - │ │ └── Shop - │ │ └── PostController.php - │ ├── Middleware - │ └── Requests - ├── Listeners - ├── Mail - ├── Models - │ ├── Post.php - │ └── PostProxy.php - ├── Providers - │ ├── BlogServiceProvider.php - │ └── ModuleServiceProvider.php - ├── Routes - │ ├── admin-routes.php - │ └── shop-routes.php - ├── Repositories - │ └── PostRepository.php - └── Resources - ├── assets - │ ├── images - │ │ └── blog-icon.png - │ ├── js - │ │ └── app.js - │ └── sass - │ ├── admin.scss - │ ├── default.scss - │ └── velocity.scss - ├── lang - │ └── app.php - └── views - ├── admin - │ └── layouts - │ └── style.blade.php - ├── index.blade.php - ├── create.blade.php - ├── edit.blade.php - ├── shop - │ └── default - │ └── layouts - │ └── style.blade.php - │ ├── index.blade.php - │ └── blog-details.blade.php - └── velocity - └── layouts - └── style.blade.php - ├── index.blade.php - └── blog-details.blade.php - -~~~ \ No newline at end of file diff --git a/docs/1.5.x/packages/add-menu-in-admin.md b/docs/1.5.x/packages/add-menu-in-admin.md deleted file mode 100644 index 6ed72274..00000000 --- a/docs/1.5.x/packages/add-menu-in-admin.md +++ /dev/null @@ -1,106 +0,0 @@ -# Admin Menu - -[[TOC]] - -## Directory Structure - -To ensure that the admin menu includes the necessary configuration, follow these steps: - -1. In your package's source directory, which is typically located at **`packages/Webkul/Blog/src`**, create a new folder named **`Config`** if it doesn't already exist. - ``` - └── packages - └── Webkul - └── Blog - └── src - ├── ... - └── Config - └── admin-menu.php - ``` - -2. Inside the newly created **`Config`** folder, create a file named **`admin-menu.php`**. - -3. Copy and paste the following code into the **`admin-menu.php`** file: - - ```php - 'blogs', - 'name' => 'Blogs', - 'route' => 'blog.admin.index', - 'sort' => 2, - 'icon-class' => 'blog-icon', - ], - ]; - ``` - -4. In your **`admin-routes.php`** file (located in the same package's source directory), add the named route **`blog.admin.index`** as follows: - - ```php - Route::get('/blog', [PostController::class, 'index'])->name('blog.admin.index'); - ``` - - In this step, we define the route that corresponds to the menu item added in the previous step. - -## Add Menu Icon - -5. To add the menu icon styling, open the **`assets/scss/admin.scss`** file within your package and add the following code: - - ```css - .blog-icon { - background-image: url("../images/blog.png"); - width: 45px; - height: 45px; - opacity: 0.6; - margin-left: 4px !important; - } - - .active { - .blog-icon { - opacity: 1; - background-image: url("../images/blog-active.png"); - } - } - ``` - - Ensure that you have the necessary **`.png`** image files (**`blog.png`** and **`blog-active.png`**) and manually place them inside the **`assets/images`** folder of your package. - -6. To merge the **`admin-menu.php`** configuration with the core menu file, use the **`mergeConfigFrom()`** method in the **`register()`** method of your package's service provider. Here's an example: - - ```php - mergeConfigFrom( - dirname(__DIR__) . '/Config/admin-menu.php', 'menu.admin' - ); - } - } - ``` - -7. Finally, run the following command to optimize your application: - - ``` - php artisan optimize - ``` - - After completing these steps, the menu item should appear in the admin panel. - - ::: details Admin Menu Output - - ![Admin Menu Output](../../assets/1.5.x/images/package-development/admin-menu-output.png) - - ::: \ No newline at end of file diff --git a/docs/1.5.x/packages/assets.md b/docs/1.5.x/packages/assets.md deleted file mode 100644 index f4d1a247..00000000 --- a/docs/1.5.x/packages/assets.md +++ /dev/null @@ -1,236 +0,0 @@ -# Assets - -[[TOC]] - -## Directory Structure - -- To organize our assets, we need to create the following folder structure in the **`Resources`** folder: - - Create a folder named **`assets`**. - - Inside the **`assets`** folder, create the following folders: **`sass`**, **`js`**, and **`images`**. - - In the **sass** folder, add the files **_admin.scss_**, **_default.scss_**, and **_velocity.scss_**. - - In the **js** folder, add the file **app.js**. - -Here's the updated directory structure: - -``` -└── packages - └── Webkul - └── Blog - └── src - ├── ... - └── Resources - ├── ... - └── assets - ├── sass - │ ├── admin.scss - │ ├── default.scss - │ └── velocity.scss - ├── js - │ └── app.js - └── images - -``` - -## Compiling Assets - -To compile the assets, perform the following steps: - -1. Create a **`package.json`** and **`webpack.mix.js`** file inside the root of your package (**`packages/Webkul/Blog`**). - -2. Copy the following code into the **`package.json`** file: - - ```json - { - "scripts": { - "dev": "npm run development", - "development": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js", - "watch": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --watch --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js", - "watch-poll": "npm run watch -- --watch-poll", - "hot": "cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js", - "prod": "npm run production", - "production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --no-progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js" - }, - "devDependencies": { - "cross-env": "^7.0.2", - "laravel-mix": "^5.0.1", - "laravel-mix-merge-manifest": "^0.1.2", - "sass": "^1.62.0", - "sass-loader": "^8.0.2", - "vue-template-compiler": "^2.7.14" - } - } - ``` - -3. Copy the following code into the **`webpack.mix.js`** file: - - ```javascript - const mix = require("laravel-mix"); - - if (typeof mix == "undefined") { - const { mix } = require("laravel-mix"); - } - - require("laravel-mix-merge-manifest"); - - if (mix.inProduction()) { - var publicPath = "publishable/assets"; - } else { - var publicPath = "../../../public/vendor/webkul/blog/assets"; - } - - mix.setPublicPath(publicPath).mergeManifest(); - - mix.disableNotifications(); - - mix - .js([__dirname + "/src/Resources/assets/js/app.js"], "js/blog.js") - .copyDirectory( - __dirname + "/src/Resources/assets/images", - publicPath + "/images" - ) - .sass( - __dirname + "/src/Resources/assets/sass/app.scss", - "css/admin.css" - ) - .sass( - __dirname + '/src/Resources/assets/sass/default.scss', - 'css/default.css' - ) - .sass( - __dirname + '/src/Resources/assets/sass/velocity.scss', - 'css/velocity.css' - ) - .options({ - processCssUrls: false, - }); - - if (mix.inProduction()) { - mix.version(); - } - ``` - -4. Run **`npm install`** in the root of your package (**`packages/Webkul/Blog`**) to install all the dependencies. - -Now, your **`scss`** and **`js`** files are ready to use. You can write all your CSS and JS code here. - -To compile the assets, run **`npm run prod`**. This will compile all your CSS, JS, and images into the publishable folder. Finally, make sure to register your publishable in the **`BlogServiceProvider`**. - -::: tip -You can also use **`npm run watch`**, which watches for changes in your assets and automatically updates the public path. When you're done making changes, run **`npm run prod`** to compile all your changes and move them to the publishable folder. -::: - -## Load Assets From Package - -- To load the assets from your package, add the following code to the **`BlogServiceProvider.php`** file: - - ```php - publishes([ - __DIR__ . '/../../publishable/assets' => public_path('vendor/webkul/blog/assets'), - ], 'public'); - } - } - ``` - -### Linking Stylesheets - -To link the stylesheets to the layouts, follow these steps: - -1. Create a **`layouts`** folder within the **`/Resources/views/shop/default`**, **`/Resources/views/shop/velocity`**, and **`/Resources/views/admin`** folders. - -2. Inside each **layouts** folder, create a file called **`style.blade.php`**. - -3. Copy the following code into the **`admin/layouts/style.blade.php`** file: - - ```html - - ``` - -4. Copy the following code into the **`shop/default/layouts/style.blade.php`** file: - - ```html - - ``` - -5. Copy the following code into the **`shop/velocity/layouts/style.blade.php`** file: - - ```html - - ``` - -### Event Listener - -- To ensure that the admin layouts include our CSS, we should add an event listener. You can add the following code to the **`BlogServiceProvider.php`** file: - - ```php - publishes([ - __DIR__ . '/../../publishable/assets' => public_path('vendor/webkul/blog/assets'), - ], 'public'); - - Event::listen('bagisto.admin.layout.head', function($viewRenderEventManager) { - $viewRenderEventManager->addTemplate('blog::admin.layouts.style'); - }); - - Event::listen('bagisto.shop.layout.head', function($viewRenderEventManager) { - $viewRenderEventManager->addTemplate('blog::shop.default.layouts.style'); - }); - - Event::listen('bagisto.shop.layout.head', function($viewRenderEventManager) { - $viewRenderEventManager->addTemplate('blog::shop.velocity.layouts.style'); - }); - } - - /** - * Register services. - * - * @return void - */ - public function register() - { - } - } - ``` \ No newline at end of file diff --git a/docs/1.5.x/packages/controllers.md b/docs/1.5.x/packages/controllers.md deleted file mode 100644 index d82ac3c9..00000000 --- a/docs/1.5.x/packages/controllers.md +++ /dev/null @@ -1,149 +0,0 @@ -# Controller - -[[TOC]] - -To learn in detail about Controllers, you can visit the Laravel documentation [here](https://laravel.com/docs/10.x/controllers). - -## Directory Structure - -- Create an **`Http`** folder in the **`packages/Webkul/Blog/src`** path. Inside the **`Http`** folder, create another folder named **`Controllers`**. Inside the **`Controllers`** folder, we need to create one file named **`Controller.php`** and two folders, namely **`Admin`** and **`Shop`**. - -- Inside both the **`Admin`** and **`Shop`** folders, create a **`PostController.php`** file. The updated directory structure will look like this: - - ``` - └── packages - └── Webkul - └── Blog - └── src - ├── ... - └── Http - └── Controllers - ├── Controller.php - ├── Admin - │ └── PostController.php - └── Shop - └── PostController.php - ``` - -## Base Controller - -- **`Controller.php`**: This is the base controller. Add the following code to this file: - - ```php - postRepository->all(); - - return view('blog::admin.index', ['blogs' => $blogs]); - } - - /** - * Create. - * - * @return \Illuminate\View\View - */ - public function create() { - // - } - - /** - * Store. - * - * @param \Illuminate\Http\Request $request - * @return \Illuminate\View\View - */ - public function store(Request $request) { - // - } - } - ``` - -- **`Shop/PostController.php`**: This file is for shop usage. Add the following code to this file: - - ```php - postRepository->with(['author'])->all(); - - return view('blog::shop.index', ['blogs' => $blogs]); - } - - /** - * Blog details. - * - * @return \Illuminate\View\View - */ - public function blogDetails($id) - { - // - } - } - ``` \ No newline at end of file diff --git a/docs/1.5.x/packages/create-acl.md b/docs/1.5.x/packages/create-acl.md deleted file mode 100644 index cd84246e..00000000 --- a/docs/1.5.x/packages/create-acl.md +++ /dev/null @@ -1,110 +0,0 @@ -# Access Control List - -[[TOC]] - -## Introduction - -In addition to providing authentication services out of the box, Bagisto also offers an Access Control List (ACL) functionality. This feature allows administrators to control user access to different parts of Bagisto. - -## Directory Structure - -To configure the ACL, follow these steps: - -1. Create a new file named **`acl.php`** in the **`packages/Webkul/Blog/src/Config`** folder of your package. - - ``` - └── packages - └── Webkul - └── Blog - └── src - ├── ... - └── Config - ├── acl.php - └── ... - ``` - -2. Add the following code to **`acl.php`**: - - ```php - 'blog', - 'name' => 'blog', - 'route' => 'blog.admin.index', - 'sort' => 2 - ] - ]; - ``` - - In the above code, we have defined an array for each menu item with the parameters (key, name, route, and sort). You need to define the menus you want to include in the ACL here. - -## Merge Configuration - -To merge the ACL configuration, follow these steps: - -1. Open the **`BlogServiceProvider`** class in the **`Webkul\Blog\Providers`** namespace. - -2. In the **`register`** method, add the following code to merge the ACL configuration: - - ```php - mergeConfigFrom( - dirname(__DIR__) . '/Config/acl.php', 'acl' - ); - } - } - ``` - - This will merge the ACL configuration with the existing configuration. - -3. After making the changes, run the following command to cache the latest changes: - - ```sh - php artisan optimize - ``` - - This will ensure that the latest ACL configuration is used. - -4. You can now check the updated ACL configuration in the admin panel: - - :::details Admin ACL Output - - ![Admin ACL Output](../../assets/1.5.x/images/package-development/admin-acl-output.png) - - ::: - -## Checking Roles and Permissions - -To check roles and permissions, follow these steps: - -1. Open the **`Admin`** model in the **`Webkul\User\Models`** namespace. - -2. In this model, you will find a relationship binding with the **`Role`** model in the same namespace. You can use this relationship to access all the permissions of the current user. - -3. We have provided the **`bouncer()`** helper function, which allows you to check permissions. Use the following code to check if the current user has a specific permission: - - ```php - bouncer()->hasPermission($permission) - ``` - - Replace `$permission` with the actual permission you want to check. - -By following these steps, you can configure and manage the Access Control List (ACL) in Bagisto. \ No newline at end of file diff --git a/docs/1.5.x/packages/create-custom-configuration.md b/docs/1.5.x/packages/create-custom-configuration.md deleted file mode 100644 index 75108965..00000000 --- a/docs/1.5.x/packages/create-custom-configuration.md +++ /dev/null @@ -1,305 +0,0 @@ -# Custom Configuration - -[[TOC]] - -Creating a custom configuration makes it easier for developers or non-developers to manage settings in Bagisto. In Bagisto, custom configurations can be found in the admin panel under the **Configuration Menu**. - -## Directory Structure - -To create a custom configuration for your application, follow these steps: - -1. Create a **`system.php`** file in the **`Config`** folder of your package: - - ``` - └── packages - └── Webkul - └── Blog - ├── ... - └── src - └── ... - └── Config - └── system.php - - ``` - -2. Inside the **`system.php`** file, include the following code: - - ```php - 'blog', - 'name' => 'Blog', - 'sort' => 1 - ], - [ - 'key' => 'blog.settings', - 'name' => 'Blog Settings', - 'sort' => 1, - ], - [ - 'key' => 'blog.settings.package', - 'name' => 'Package Status', - 'sort' => 1, - 'fields' => [ - [ - 'name' => 'status', - 'title' => 'Status', - 'type' => 'boolean', - 'validation' => 'required' - ] - ] - ], - [ - 'key' => 'blog.settings.blog-setting', - 'name' => 'blog::app.admin.system.blog-setting', - 'sort' => 2, - 'fields' => [ - [ - 'name' => 'pagination', - 'title' => 'blog::app.admin.system.pagination', - 'type' => 'select', - 'validation' => 'required', - 'options' => [ - [ - 'title' => 'Yes', - 'value' => 1, - ], - [ - 'title' => 'No', - 'value' => 0, - ], - ] - ], - [ - 'name' => 'items', - 'title' => 'blog::app.admin.system.items', - 'type' => 'number', - 'validation' => 'numeric' - ] - ] - ] - ]; - ``` - - This code defines the custom configuration settings. Each configuration has a key, name, sort, and fields (if applicable). - -## Merge Configuration - -To merge the custom configuration, follow these steps: - -1. Open the **`BlogServiceProvider`** class in the **`Webkul\Blog\Providers`** namespace. - -2. In the **`register`** method, add the following code to merge the custom configuration: - - ```php - mergeConfigFrom( - dirname(__DIR__) . '/Config/system.php', 'core' - ); - } - } - ``` - - This code merges the custom configuration with the existing configuration. - -3. After making the changes, run the following command to cache the latest changes: - - ```sh - php artisan optimize - ``` - - This ensures that the latest custom configuration is used. - -4. You can now check the updated configuration in the admin panel: - - :::details Custom Configuration - - ![Admin Custom Config Output](../../assets/1.5.x/images/package-development/custom-config-output.png) - - ::: - -## Supported Field Types - -Bagisto supports several field types for custom configurations. Let's explore each of them: - -### Text Type - -This field type provides an input field of type text. - -#### Example - -```php -return [ - // ... - [ - 'key' => 'general.general.custom-types', - 'name' => 'admin::app.admin.system.custom-types', - 'sort' => 1, - 'fields' => [ - - - [ - 'name' => 'text_type', - 'title' => 'admin::app.admin.system.text-type', - 'type' => 'text', - 'default_value' => '', - ], - ], - ], - // ... -]; -``` - -### Number Type - -This field type provides an input field of type number. - -#### Example - -```php -return [ - // ... - [ - 'key' => 'general.general.custom-types', - 'name' => 'admin::app.admin.system.custom-types', - 'sort' => 1, - 'fields' => [ - [ - 'name' => 'number_type', - 'title' => 'admin::app.admin.system.number-type', - 'type' => 'number', - ], - ], - ], - // ... -]; -``` - -### Boolean Type - -This field type provides an enable/disable switch. - -#### Example - -```php -return [ - // ... - [ - 'key' => 'general.general.custom-types', - 'name' => 'admin::app.admin.system.custom-types', - 'sort' => 1, - 'fields' => [ - [ - 'name' => 'boolean_type', - 'title' => 'admin::app.admin.system.boolean-type', - 'type' => 'boolean', - ], - ], - ], - // ... -]; -``` - -### Select Type - -This field type provides a select field with specified options. - -#### Example - -```php -return [ - // ... - [ - 'key' => 'general.general.custom-types', - 'name' => 'admin::app.admin.system.custom-types', - 'sort' => 1, - 'fields' => [ - [ - 'name' => 'select_type', - 'title' => 'admin::app.admin.system.select-type', - 'type' => 'select', - 'options' => [ - [ - 'title' => 'option_1', - 'value' => 'value_1', - ], - [ - 'title' => 'option_2', - 'value' => 'vallue_2', - ], - ], - ], - ], - ], - // ... -]; -``` - -### Textarea Type - -This field type provides a textarea field, mostly used for long text. - -#### Example - -```php -return [ - // ... - [ - 'key' => 'general.general.custom-types', - 'name' => 'admin::app.admin.system.custom-types', - 'sort' => 1, - 'fields' => [ - [ - 'name' => 'textarea_type', - 'title' => 'admin::app.admin.system.textarea-type', - 'type' => 'textarea' - ], - ], - ], - // ... -]; -``` - -### Image Type - -This field type provides a file upload option for uploading images. - -#### Example - -```php -return [ - // ... - [ - 'key' => 'general.general.custom-types', - 'name' => 'admin::app.admin.system.custom-types', - 'sort' => 1, - 'fields' => [ - [ - 'name' => 'image_type', - 'title' => 'admin::app.admin.system.image-type', - 'type' => 'image', - 'validation' => 'mimes:bmp,jpeg,jpg,png,webp', - ], - ], - ], - // ... -]; -``` \ No newline at end of file diff --git a/docs/1.5.x/packages/create-migrations.md b/docs/1.5.x/packages/create-migrations.md deleted file mode 100644 index 928baba8..00000000 --- a/docs/1.5.x/packages/create-migrations.md +++ /dev/null @@ -1,112 +0,0 @@ -# Migrations - -[[TOC]] - -To understand Migrations in detail, you can visit the Laravel documentation [here](https://laravel.com/docs/10.x/migrations). - -## Using Bagisto Package Generator - -This command creates a new migration class in the **`packages/Webkul/Blog/src/Database/Migrations`** directory. - -```sh -php artisan package:make-migration CreatePostsTable Webkul/Blog -``` - -## Using Laravel Artisan Command - -- Create a **`Database`** folder in the **`packages/Webkul/Blog/src`** path. Inside the **`Database`** folder, create **`Migrations`** and **`Seeders`** folders. - - ``` - └── packages - └── Webkul - └── Blog - └── src - ├── ... - └── Database - ├── Migrations - └── Seeders - ``` - -- Run the following command with the **`--path`** option to specify where your migration file will be placed. - - ```sh - php artisan make:migration create_posts_table --path=packages/Webkul/Blog/src/Database/Migrations - ``` - -- Copy the code provided here and paste it into your migration file. - - ```php - id(); - $table->string('title')->nullable(); - $table->longText('description')->nullable(); - $table->integer('user_id'); - $table->tinyInteger('status')->default(1); - $table->timestamps(); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::dropIfExists('posts'); - } - }; - ``` - -### Loading Migration from Package - -- We need to add the migrations to our service provider to load them. - - ```php - loadMigrationsFrom(__DIR__ .'/../Database/Migrations'); - } - } - ``` - -### Creating Tables from Migrations - -- Run the following command to create the **`posts`** table in your database. - - ```sh - php artisan migrate - ``` diff --git a/docs/1.5.x/packages/create-models.md b/docs/1.5.x/packages/create-models.md deleted file mode 100644 index 2adc7e9d..00000000 --- a/docs/1.5.x/packages/create-models.md +++ /dev/null @@ -1,192 +0,0 @@ -# Models - -[[TOC]] - -To understand Models in detail, you can visit the Laravel documentation [here](https://laravel.com/docs/10.x/eloquent). - -We are using the [konekt/concord](https://packagist.org/packages/konekt/concord) package, which is an extension of Laravel. It helps in building modular Laravel applications. - -## Using Bagisto Package Generator - -- This command creates a new **`Post`** Model inside your package. - - ```sh - php artisan package:make-model Post Webkul/Blog - ``` - -- This command creates the following files: - - New model **`Post.php`** in the **`packages/Webkul/Blog/src/Models`** directory. - - New model proxy **`PostProxy.php`** in the **`packages/Webkul/Blog/src/Models`** directory. - - New model contract **`Post.php*`** in the **`packages/Webkul/Blog/src/Contracts`** directory. - -## Using Laravel Artisan Command - -Before creating the model class, we need to create two things: the **`Contract`** and the **`Proxy`**. - -### Contract - -Laravel's Contracts are a set of interfaces that define the core services provided by the framework. For example, the **`Illuminate\Contracts\Queue\Queue`** contract defines the methods needed for queueing jobs, while the **`Illuminate\Contracts\Mail\Mailer`** contract defines the methods needed for sending an email. - -Each contract has a corresponding implementation provided by the framework. For example, Laravel provides a queue implementation with various drivers and a mailer implementation powered by SwiftMailer. - -All Laravel contracts are stored in their own GitHub repository. This provides a quick reference for all available contracts and a single, decoupled package that can be used by package developers. - -- Now, create a folder named **`Contracts`** inside **`Webkul/Blog/src/`** and create an interface file named **`Post.php`**. - - ``` - packages - └── Webkul - └── Blog - └── src - ├── ... - └── Contracts - └── Post.php - ``` - -- Copy the following code into the **`Post.php`** file. - - ```php - belongsTo(Admin::class, 'user_id'); - } - } - ``` - -### Module Service Provider - -- Now, we need to create a provider named **`ModuleServiceProvider.php`** inside **`Webkul/Blog/src/Providers`**. - - ``` - └── packages - └── Webkul - └── Blog - └── src - ├── ... - └── Providers - ├── BlogServiceProvider.php - └── ModuleServiceProvider.php - ``` - -- In this file, we register the models used in this package. You can see the code below. - - ```php - [ - // Other service providers - \Webkul\Blog\Providers\ModuleServiceProvider::class, - ] - ]; - ``` \ No newline at end of file diff --git a/docs/1.5.x/packages/create-package.md b/docs/1.5.x/packages/create-package.md deleted file mode 100644 index 41b57f56..00000000 --- a/docs/1.5.x/packages/create-package.md +++ /dev/null @@ -1,195 +0,0 @@ -# Getting Started - -[[TOC]] - -## Using Bagisto Package Generator - -To facilitate package development, you can use the [Bagisto Package Generator](https://github.com/bagisto/bagisto-package-generator). Follow the steps below to install it: - -1. Install the Bagisto Package Generator by running the following command in the root folder of your Bagisto application: - - ```shell - composer require bagisto/bagisto-package-generator - ``` - -2. Once installed, you can generate your package using the following command: - - - If the package directory does not exist: - - ```shell - php artisan package:make Webkul/Blog - ``` - - - If the package directory already exists, you can use the **`--force`** option to overwrite it: - - ```shell - php artisan package:make Webkul/Blog --force - ``` - - This command will set up the necessary files and directories in the **`packages`** directory. - -### Registering Your Package - -To register your package, follow these steps: - -1. Add your package's namespace to the **`psr-4`** section in the **`composer.json`** file located in the root directory of your Bagisto application. Update it as follows: - - ```json - "autoload": { - ... - "psr-4": { - // Other PSR-4 namespaces - "Webkul\\Blog\\": "packages/Webkul/Blog/src" - } - } - ``` - -2. Register your package's service provider in the **`config/app.php`** file located in the root directory of your Bagisto application. Add the following line to the **`providers`** array: - - ```php - ServiceProvider::defaultProviders()->merge([ - // Other service providers - Webkul\Blog\Providers\BlogServiceProvider::class, - ])->toArray(), - - // Other configuration options - ]; - ``` - -3. Run the following commands to autoload your package and publish its assets and configurations: - - ```shell - composer dump-autoload - php artisan optimize - php artisan vendor:publish --force - ``` - - When prompted to select which items to publish, choose the number corresponding to **`"Webkul\Blog\Providers\BlogServiceProvider"`** and press enter to publish all assets and configurations. - -::: details Example Output in the Browser - -![helloworld-admin-browser-output](../../assets/1.5.x/images/package-development/blog-package-output.png) - -::: - -Congratulations! Your package is now registered and ready to use. Start creating something cool! - -## Manual Setup of Files - -If you prefer to set up your package manually, follow these steps assuming you are familiar with package directory structures and workflows. We'll use the default **`package`** folder in Bagisto as an example. - -### Create Package Directory - -1. Inside the **`packages/Webkul`** folder, create a folder with your package name. Your structure should look like this: - - ``` - └── packages - └── Webkul - └── Blog - ``` - -2. In your package folder, create a folder named as **`src`**. This is where you'll put all your package-related files. Your updated structure will look like this: - - ``` - └── packages - └── Webkul - └── Blog - └── src - ``` - -### Create Service Provider - -1. In the **`src`** folder, create a folder named as **`Providers`**. Inside that folder, create a file named as **`BlogServiceProvider.php`**. Your structure should look like this: - - ``` - └── packages - └── Webkul - └── Blog - └── src - └── Providers - └── BlogServiceProvider.php - ``` - -2. Copy the following code and paste it into **`BlogServiceProvider.php`**: - - ```php - ServiceProvider::defaultProviders()->merge([ - // Other service providers - Webkul\Blog\Providers\BlogServiceProvider::class, - ])->toArray(), - - // Other configuration options - ]; - ``` - -3. Run the following command to autoload your package: - - ```shell - composer dump-autoload - ``` - - Your package is now ready to use! \ No newline at end of file diff --git a/docs/1.5.x/packages/customize-hompepage-menu.md b/docs/1.5.x/packages/customize-hompepage-menu.md deleted file mode 100644 index f294d147..00000000 --- a/docs/1.5.x/packages/customize-hompepage-menu.md +++ /dev/null @@ -1,29 +0,0 @@ -# Homepage Menu - -[[TOC]] - -This section provides an overview of menu items, how to access them, and how they can be customized. Both the **`default`** and **`velocity`** themes display categories in the menu items. - -## Accessing Categories - -To access the menu categories, you can utilize the **`CategoryRepository`** class located in the **`Webkul\Category\Repositories\CategoryRepository`** namespace. This repository class provides useful methods for retrieving and managing categories. - -One such method is **`getVisibleCategoryTree`**, which returns a list of all visible categories under the specified root category. You can pass the ID of the main root category as a parameter to this method. - -## Example from the Default Theme - -In the default theme's blade file, you can find the following code snippet: - -```php -@foreach (app('Webkul\Category\Repositories\CategoryRepository')->getVisibleCategoryTree(core()->getCurrentChannel()->root_category_id) as $category) - // ... -@endforeach -``` - -You can iterate through the retrieved categories and customize the menu according to your specific requirements. - -::: tip - -The **`CategoryRepository`** class provides several other methods for working with categories. Take some time to explore and utilize those methods as needed. - -::: \ No newline at end of file diff --git a/docs/1.5.x/packages/datagrid.md b/docs/1.5.x/packages/datagrid.md deleted file mode 100644 index f55747b9..00000000 --- a/docs/1.5.x/packages/datagrid.md +++ /dev/null @@ -1,337 +0,0 @@ -# DataGrid - -[[TOC]] - -## Introduction - -A DataGrid is a concept of displaying your database records in a tabular format. It is a powerful tool that helps you present large amounts of data in an organized way. At Bagisto, we have implemented this feature, which allows you to use it to display data in a tabular format or write code from scratch to display data. In addition to the basic functionality of DataGrid, we have also implemented additional features such as sorting, filtering, and mass action, which are explained in detail below. - -## Global Properties of DataGrid - -Here are the global properties of the DataGrid: - -| Property | Functionality | -| ----------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| **`index`** | This property is defined in the grid, and the value assigned to this property must be unique, typically the primary key, so that data will be uniquely identified and operations performed will be based on your index value. | -| **`sortOrder`** | The **`sortOrder`** key is used to arrange the results in ascending or descending order. Set the **`sortOrder`** variable to **`asc`** or **`desc`**. | -| **`queryBuilder`** | This is used to perform database operations in your application. | -| **`enableMassAction`** | This accepts boolean values **`true`** or **`false`** to enable or disable the mass action in DataGrid. | -| **`enableAction`** | This accepts boolean values **`true`** or **`false`** to enable or disable the action column of DataGrid. | -| **`paginate`** | Set the **`paginate`** property to **`true`** to allow pagination on your page. | -| **`itemsPerPage`** | The **`itemsPerPage`** key is used to display the number of items per page. | -| **`enableFilterMap`** | This accepts boolean values **`true`** or **`false`** to enable or disable filtering on the basis of columns. | - -## How DataGrid Works - -The **`DataGrid`** abstract class is created in the **`Webkul\Ui`** package. In the abstract class, a list of properties and methods are declared. To create your own DataGrid, you need to extend the **`Webkul\Ui\DataGrid\DataGrid`** abstract class. - -In **`Webkul\Ui\DataGrid\DataGrid.php`** abstract class, two abstract methods are declared **`prepareQueryBuilder()`** and **`addColumns()`**. You can prepare your grid by defining these two methods. - -- **`prepareQueryBuilder()`**: In this method, records are retrieved through queries applicable to the database and stored in a collection. When records are retrieved, the **`setQueryBuilder()`** method is called. - -- **`setQueryBuilder()`**: This method is used for setting the **`$queryBuilder`**. - - ```php - public function prepareQueryBuilder() - { - $queryBuilder = DB::table('posts') - ->select('id', 'title', 'status', 'created_at', 'updated_at') - ->where('user_id', '=', auth()->guard('admin')->user()->id); - - $this->setQueryBuilder($queryBuilder); - } - ``` - -- **`addColumns()`**: In this method, columns are created which are displayed in the grid. The parameter accepts an array in key-value pairs. Some of the essential keys are described below: - - | Key | Functionality | - | ------------- | ------------------------------------------------------------------------ | - | **`index`** | This key is defined in the grid, and the value assigned to this key must be unique, typically the primary key, so that data will be uniquely identified and operations performed will be based on your index value. | - | **`label`** | This key defines the name of the column. | - | **`type`** | This key accepts the type of data in the column. | - | **`searchable`** | This accepts boolean values **`true`** or **`false`** to make the column searchable. | - | **`sortable`** | This accepts boolean values **`true`** or **`false`** to make the column sortable. | - | **`filterable`** | This accepts boolean values **`true`** or **`false`** to make the column filterable. | - | **`wrapper`** | Perform actions based on a condition satisfied or apply some customization to the value. | - - ```php - public function addColumns() - { - $this->addColumn([ - 'index' => 'id', - 'label' => trans('blog::app.admin.datagrid.id'), - 'type' => 'number', - 'searchable' => false, - 'sortable' => true, - 'filterable' => true - ]); - } - ``` - -- **`prepareActions()`**: This method is defined when there is a need to perform any action such as edit or delete on the grid. In this method, the **`addAction()`** method is called to define a particular action. - -- **`addAction()`**: This method is used for adding actions (like **`edit`**, **`delete`**, etc.) to each row generated by the DataGrid. - - | Key | Functionality | - | ------------- | ------------------------------------------------------------------------ | - | **`title`** | The text to be displayed is written here. | - | **`method`** | HTTP methods are declared. | - | **`route`** | This key accepts the route of the icon. | - | **`icon`** | Class of the icon to be displayed in the action column. You may prefer text also. | - - ```php - public function prepareActions() - { - $this->addAction([ - 'title' => trans('blog::app.admin.datagrid.edit'), - 'method' => 'GET', - 'route' => 'admin.blog.edit', - 'icon' => 'icon pencil-lg-icon' - ]); - } - ``` - -## Multiple DataGrids - -When working with multiple DataGrids, the default DataGrid implementation can handle only a single request at a time. This means that operations such as filtration, sorting, and others can conflict when implementing multiple DataGrids. To overcome this, we provide a trait called **`ProvideDataGridPlus`** in the namespace **`Webkul\Ui\DataGrid\Traits`**. - -Follow the steps below to implement multiple DataGrids: - -1. Create a folder called **`DataGrids`** inside the **`src`** folder of your package. Within the **`DataGrids`** folder, create a file called **`PostDataGrid.php`** that extends the **`DataGrid`** class from the **`Webkul\Ui`** package. The directory structure will be as follows: - - ``` - └── packages - └── Webkul - └── Blog - └── src - ├── ... - └── DataGrids - └── PostDataGrid.php - ``` - -2. Add the following code to your DataGrid file, i.e., **`PostDataGrid.php`**: - - ```php - namespace Webkul\Blog\DataGrids; - - use Webkul\Ui\DataGrid\DataGrid; - - class PostDataGrid extends DataGrid - { - // ... - } - ``` - -### DataGrid to JSON - -3. Import the **`ProvideDataGridPlus`** trait into the **`PostDataGrid`** class: - - ```php - namespace Webkul\Blog\DataGrids; - - use Webkul\Ui\DataGrid\Traits\ProvideDataGridPlus; - - class PostDataGrid extends DataGrid - { - use ProvideDataGridPlus; - - // ... - } - ``` - -4. After that, the **`toJson()`** method will be available in the DataGrid instance, which provides data to the component. - -5. Now, go to **`Admin/PostController.php`** and locate the **`index`** method. Use the **`toJson()`** method as follows: - - ```php - use Webkul\Blog\DataGrids\PostDataGrid; - - class PostController extends Controller - { - /** - * Display a listing of the resource. - * - * @return \Illuminate\View\View - */ - public function index() - { - if (request()->ajax()) { - return app(PostDataGrid::class)->toJson(); - } - - return view('blog::admin.index'); - } - - // ... - } - ``` - -### Render DataGrid - -6. In the view file **`views/admin/index.blade.php`**, use the **`datagrid-plus`** component and specify the URL from which it will load the JSON data: - - ```php -
- ... - - - - ... -
- ``` - - With these steps, your DataGrid is now ready to be used. - -::: warning -Make sure to copy the sample code provided below to your own **`PostDataGrid.php`** file, as we have already included all the necessary methods and functions there. This code can be used later as an example for your implementation. -::: - -## Sample DataGrid - -Here's an improved version of the provided DataGrid sample: - -```php -select('id', 'title', 'status', 'created_at', 'updated_at') - ->where('user_id', '=', auth()->guard('admin')->user()->id); - - $this->setQueryBuilder($queryBuilder); - } - - /** - * Add columns. - */ - public function addColumns() - { - $this->addColumn([ - 'index' => 'id', - 'label' => trans('blog::app.admin.datagrid.id'), - 'type' => 'number', - 'searchable' => false, - 'sortable' => true, - 'filterable' => true, - ]); - - $this->addColumn([ - 'index' => 'title', - 'label' => trans('blog::app.admin.datagrid.title'), - 'type' => 'string', - 'searchable' => true, - 'sortable' => true, - 'filterable' => false, - 'wrapper' => function ($value) { - return substr($value->title, 0, 30); - }, - ]); - - $this->addColumn([ - 'index' => 'status', - 'label' => trans('blog::app.admin.datagrid.status'), - 'type' => 'boolean', - 'sortable' => true, - 'searchable' => false, - 'filterable' => true, - 'closure' => function ($value) { - $html = ''; - - if ($value->status) { - $html .= '' . trans('blog::app.admin.datagrid.active') . ''; - } else { - $html .= '' . trans('blog::app.admin.datagrid.inactive') . ''; - } - - return $html; - }, - ]); - - $this->addColumn([ - 'index' => 'created_at', - 'label' => trans('blog::app.admin.datagrid.created_at'), - 'type' => 'datetime', - 'searchable' => true, - 'sortable' => true, - 'filterable' => true, - ]); - - $this->addColumn([ - 'index' => 'updated_at', - 'label' => trans('blog::app.admin.datagrid.updated_at'), - 'type' => 'datetime', - 'searchable' => true, - 'sortable' => true, - 'filterable' => true, - ]); - } - - /** - * Prepare actions. - */ - public function prepareActions() - { - $this->addAction([ - 'title' => trans('blog::app.admin.datagrid.edit'), - 'method' => 'GET', - 'route' => 'admin.blog.edit', - 'icon' => 'icon pencil-lg-icon', - ]); - - $this->addAction([ - 'title' => trans('blog::app.admin.datagrid.delete'), - 'method' => 'POST', - 'route' => 'admin.blog.delete', - 'icon' => 'icon trash-icon', - ]); - } - - /** - * Prepare mass actions. - */ - public function prepareMassActions() - { - $this->addMassAction([ - 'type' => 'update', - 'action' => route('admin.blog.massupdate'), - 'label' => trans('blog::app.admin.datagrid.massupdate'), - 'method' => 'POST', - 'options' => [ - trans('blog::app.admin.datagrid.active') => 1, - trans('blog::app.admin.datagrid.inactive') => 0, - ], - ]); - - $this->addMassAction([ - 'type' => 'delete', - 'action' => route('admin.blog.massdelete'), - 'label' => trans('blog::app.admin.datagrid.massdelete'), - 'method' => 'POST', - ]); - } -} -``` \ No newline at end of file diff --git a/docs/1.5.x/packages/layouts.md b/docs/1.5.x/packages/layouts.md deleted file mode 100644 index 3b5a4c2e..00000000 --- a/docs/1.5.x/packages/layouts.md +++ /dev/null @@ -1,56 +0,0 @@ -# Layouts - -[[TOC]] - -To learn in detail about Layouts, you can visit the Laravel documentation [here](https://laravel.com/docs/10.x/blade). - -## Extend Admin Layout - -Now, let's extend the default layout of the Bagisto admin panel by using **`@extends('admin::layouts.master')`** in the file **`packages/Webkul/Blog/src/Resources/views/admin/index.blade.php`**. You can copy the following template to your **`index.blade.php`** file: - -```html -@extends('admin::layouts.master') - -@section('page_title') {{ __('blog::app.admin.index.page-title') }} @stop - -@section('content-wrapper') - -
- -
-
-
- -@stop -``` - -## Extend Shop Layout - -Similarly, for the file **`packages/Webkul/Blog/src/Resources/views/shop/velocity/index.blade.php`**, you can extend the shop layout by using **`@extends('shop::layouts.master')`**. You can copy the following template to your **`index.blade.php`** file: - -```html -@extends('shop::layouts.master') - -@section('page_title') {{ __('blog::app.shop.blogs.page-title') }} @stop - -@section('content-wrapper') - -
-
-
-
- -@stop -``` - -::: warning -Notice that there are translations used in the blade files, so you will also need to add the corresponding translations in **`lang/app.php`**. -::: - -If you don't want to include these layouts, you can create your own master file. \ No newline at end of file diff --git a/docs/1.5.x/packages/localization.md b/docs/1.5.x/packages/localization.md deleted file mode 100644 index 0b98ec4e..00000000 --- a/docs/1.5.x/packages/localization.md +++ /dev/null @@ -1,86 +0,0 @@ -# Localization - -[[TOC]] - -To learn in detail about Localization, you can visit the Laravel documentation [here](https://laravel.com/docs/10.x/localization). - -## Directory Structure - -- Now, let's create a language file for our package. Create a **`lang`** folder in the **`packages/Webkul/Blog/src/Resources`** path. - -- Inside the **`lang`** folder, you can create different folders for language translations. For example, you can create folders for English ('en'), Hindi ('hi'), etc. For now, let's create a folder named **`en`** (representing the language code). Inside the **`en`** folder, create a file named **`app.php`** for language translation. - - ``` - └── packages - └── Webkul - └── Blog - └── src - ├── ... - └── Resources - ├── ... - └── lang - └── en - └── app.php - ``` - -- Now, let's write a translation in **`app.php`** as follows: - - ```php - [ - 'name' => 'John Doe' - ] - ]; - ``` - -## Load Translation from Package - -- We need to register the language file in the service provider. - - ```php - loadTranslationsFrom(__DIR__ . '/../Resources/lang', 'blog'); - } - } - ``` - -- Add the following code to your Blade file: - - ```html - {{ __('blog::app.admin.name') }} - ``` - - ::: details Admin Output - - ![Translation Output](../../assets/1.5.x/images/package-development/blog-admin-lang-output.png) - - ::: - - ::: details Shop Output - - ![Translation Output](../../assets/1.5.x/images/package-development/blog-shop-lang-output.png) - - ::: \ No newline at end of file diff --git a/docs/1.5.x/packages/routes.md b/docs/1.5.x/packages/routes.md deleted file mode 100644 index 79f8eb58..00000000 --- a/docs/1.5.x/packages/routes.md +++ /dev/null @@ -1,80 +0,0 @@ -# Routes - -[[TOC]] - -To learn in detail about Routes, you can visit the Laravel documentation [here](https://laravel.com/docs/10.x/routing). - -## Directory Structure - -- Create a **`Routes`** folder inside **`packages/Webkul/Blog/src`** and create two files named **`admin-routes.php`** and **`shop-routes.php`**. The updated directory structure will look like this: - - ``` - └── packages - └── Webkul - └── Blog - └── src - ├── ... - └── Routes - ├── admin-routes.php - └── shop-routes.php - ``` - -- **`admin-routes.php`**: This file is for admin routes. Add the following code to this file: - - ```php - ['web', 'admin'], 'prefix' => config('app.admin_url')], function () { - Route::get('/blog', [PostController::class, 'index']); - }); - ``` - -- **`shop-routes.php`**: This file is for shop routes. Add the following code to this file: - - ```php - ['web', 'theme', 'locale', 'currency']], function () { - Route::get('/blogs', [PostController::class, 'index']); - }); - ``` - -## Loading Routes - -- Now, we need to register our routes in the service provider's boot method, which is located in **`BlogServiceProvider.php`**. - - ```php - loadRoutesFrom(__DIR__ . '/../Routes/admin-routes.php'); - - $this->loadRoutesFrom(__DIR__ . '/../Routes/shop-routes.php'); - } - } - ``` \ No newline at end of file diff --git a/docs/1.5.x/packages/store-data-through-repositories.md b/docs/1.5.x/packages/store-data-through-repositories.md deleted file mode 100644 index 38fc23ef..00000000 --- a/docs/1.5.x/packages/store-data-through-repositories.md +++ /dev/null @@ -1,78 +0,0 @@ -# Repository - -[[TOC]] - -## Introduction - -In traditional development, application logic is often written directly in the controller. However, there is an alternative approach that abstracts some of these calls into PHP classes called Repositories. The purpose of repositories is to decouple models from controllers and provide readable names for complex queries. - -This file defines our Repository class. Instances of this class have a model property that is bound to an Eloquent model. With this binding in the constructor, we can call Eloquent methods such as findOrFail, update, or all from the class methods. - -We are using the Prettus Repository package. You can find all available methods in the Prettus repository [here](https://github.com/andersao/l5-repository). Here are some examples: - -Examples: - -| Sl. no. | Method | Description | -| ------- | ------ | ----------- | -| 1 | all | Find all results in the Repository | -| 2 | paginate | Find all results in the Repository with pagination | -| 3 | find | Find a result by ID | -| 4 | with(['table_name'])| Load the model relationships | -| 5 | findWhereIn | Find results by multiple values in one field| - -```php -// Bound in constructor -public function __construct(protected PostRepository $postRepository) {} -``` - -```php -// Find all results in the Repository -$posts = $this->postRepository->all(); -``` - -## Using Bagisto Package Generator - -- This command creates a new Repository class in the **`packages/Webkul/Blog/src/Repository`** directory. - - ```sh - php artisan package:make-repository PostRepository Webkul/Blog - ``` - -## Manual Setup of Files - -- Create a **`Repository`** folder inside **`Webkul/Blog/src/`** and create a file named **`PostRepository.php`**. In the repository class, create the **`model()`** method that returns the path of your contract class. - - ``` - └── packages - └── Webkul - └── Blog - └── src - ├── ... - └── Repository - └── PostRepository.php - ``` - -- Copy the following code into your newly created repository file. - - ```php - validate([ - 'title' => 'required|unique:posts|max:255', - 'body' => 'required', - ]); -} -``` - -Alternatively, you can manually create a validator instance using the Validator facade, as shown in this example: - -```php - 'required', - 'email' => 'required|email', - 'message' => 'required|max:250', - ]; - - $customMessages = [ - 'required' => 'The :attribute field is required.', - ]; - - $this->validate($request, $rules, $customMessages); - } -} -``` - -## Validation Using Vue - -### Introduction - -VeeValidate is a validation library for Vue.js that provides plenty of validation rules out of the box, along with support for custom rules. It is template-based and similar to the HTML5 validation API, making it easy to validate HTML5 inputs as well as custom Vue components. VeeValidate also supports localization with 44 languages maintained by the community. - -For detailed information about validation in Vue.js using VeeValidate, refer to the [VeeValidate documentation](https://vee-validate.logaretm.com/v2/guide/). - -### Installation - -Bagisto already comes with the VeeValidate library, so there is no need to install it separately. - -### Configuration - -Bagisto includes the configuration for **`vee-validate`**. For example, you can find the configuration in the following path: **`bagisto/packages/Webkul/Admin/src/Resources/assets/js/app.js`**. - -```js -import Vue from 'vue'; -import VeeValidate from 'vee-validate'; - -/** - * Language imports. -*/ -import de from 'vee-validate/dist/locale/en'; -import de from 'vee-validate/dist/locale/de'; -import fa from 'vee-validate/dist/locale/fa'; - -/** - * Vue plugins. -*/ -Vue.use(VeeValidate, { - dictionary: { - en: en, - de: de, - fa: fa, - }, - events: 'input|change|blur' -}); -``` - -### Examples - -Here are some examples of Vue validation using VeeValidate: - -```html - - - - - -``` \ No newline at end of file diff --git a/docs/1.5.x/packages/views.md b/docs/1.5.x/packages/views.md deleted file mode 100644 index 43b8ba7c..00000000 --- a/docs/1.5.x/packages/views.md +++ /dev/null @@ -1,108 +0,0 @@ -# Views - -[[TOC]] - -To learn in detail about Views, you can visit the Laravel documentation [here](https://laravel.com/docs/10.x/views). - -## Directory Structure - -- Create a **`Resources`** folder in the **`packages/Webkul/Blog/src`** path. Inside the **`Resources`** folder, create another folder named **`views`**. Now, inside the **`views`** folder, we need to create two folders, namely **`admin`** and **`shop`**. Finally, we need to create two more folders, namely **`default`** and **`velocity`**, under the **`shop`** folder. The updated directory structure will look like this: - - ``` - └── packages - └── Webkul - └── Blog - └── src - ├── ... - └── Resources - └── views - ├── admin - └── shop - ├── default - └── velocity - ``` - - ::: tip The default and velocity folders - Whenever you create a Blade file for the shop front, you need to keep the same file in both the **`default`** and **`velocity`** folders. This is because we are using the **`theme`** middleware. When we use the **`default`** theme, the files will be called from the **`default`** folder, and when we use the **`velocity`** theme, the files will be called from the **`velocity`** folder. - ::: - - ::: warning - In this tutorial, we are using the **`theme`** middleware and the **`velocity`** theme. Therefore, it is necessary to keep the files in the **`velocity`** folder. However, if we are not using the **`default`** theme, it is not necessary to keep the same files in the **`default`** folder. - ::: - -- Inside each folder, **`admin`** and **`velocity`**, create a file named **`index.blade.php`** and add some HTML to it. - - ``` - └── packages - └── Webkul - └── Blog - └── src - ├── ... - └── Resources - └── views - ├── admin - │ └── index.blade.php - └── shop - ├── default - └── velocity - └── index.blade.php - - ``` - - - **`admin/index.blade.php`** - - ```html -

Blog Admin Page

- ``` - - - **`shop/velocity/index.blade.php`** - - ```html -

Blog Shop Page

- ``` - -## Load Views from Package - -- Now, we need to register our views in the service provider's `boot` method. Open the file **`packages/Webkul/Blog/src/Providers/BlogServiceProvider.php`** and update it as follows: - - ```php - loadViewsFrom(__DIR__ . '/../Resources/views', 'blog'); - } - } - ``` - -- Now, check the routes in your browser. - - ::: details Shop Output - - ![Shop Browser Output](../../assets/1.5.x/images/package-development/blog-shop-output.png) - - ::: - - ::: details Admin Output - - ![Admin Browser Output](../../assets/1.5.x/images/package-development/blog-admin-output.png) - - ::: diff --git a/docs/1.5.x/products/simple.md b/docs/1.5.x/products/simple.md deleted file mode 100644 index 6ca0fb29..00000000 --- a/docs/1.5.x/products/simple.md +++ /dev/null @@ -1,9 +0,0 @@ -# Deploy - -this article will explain how you can deploy your Bagisto store to your production server when you have been developing your Bagisto store on your local system. - -## Deploy Bagisto with (S)FTP - -## Deploy on Cpanel - -## Deploy on Plesk diff --git a/docs/1.5.x/prologue/README.md b/docs/1.5.x/prologue/README.md deleted file mode 100644 index 08f5cdf6..00000000 --- a/docs/1.5.x/prologue/README.md +++ /dev/null @@ -1,23 +0,0 @@ -# Prologue - -## Introduction to Bagisto - -[Bagisto](https://bagisto.com/) is a fantastic open-source eCommerce platform that allows businesses to create modern online stores easily. Bagisto offers a wide range of customizable features to meet the specific needs of any online business. - -The platform is built on top of the reliable [Laravel](https://laravel.com/) framework and [Vue.js](https://vuejs.org/), a user-friendly JavaScript framework. It provides businesses with a user-friendly interface and powerful tools to manage their online stores, handle inventory and orders, and create a smooth shopping experience for customers. - -## Customization and Branding - -With Bagisto, businesses have the flexibility to customize the look and feel of their online stores, from choosing themes and layouts to adding unique branding elements. The platform offers a comprehensive set of marketing and promotional tools, enabling businesses to attract customers and drive sales effectively. - -## SEO Optimization - -One of Bagisto's standout features is its robust SEO capabilities. It includes built-in SEO tools and optimization options, empowering businesses to improve their search engine rankings and increase organic traffic to their online stores. - -## Payment and Shipping Integration - -Moreover, Bagisto supports a wide range of payment gateways, allowing businesses to offer convenient and secure payment options to their customers. It also integrates seamlessly with popular shipping providers, streamlining the order fulfillment process and ensuring reliable and timely deliveries. - -## Summary - -In summary, Bagisto is a powerful and flexible eCommerce platform that empowers businesses to build and manage online stores efficiently. With its customizable features, user-friendly interface, reliable framework, robust SEO capabilities, and comprehensive set of tools, Bagisto is the perfect choice for businesses looking to establish a strong online presence, drive sales growth, and deliver exceptional customer experiences. \ No newline at end of file diff --git a/docs/1.5.x/prologue/contribution-guide.md b/docs/1.5.x/prologue/contribution-guide.md deleted file mode 100644 index 7763c460..00000000 --- a/docs/1.5.x/prologue/contribution-guide.md +++ /dev/null @@ -1,64 +0,0 @@ -# Contribution Guide - -[[Toc]] - -## Bug Reports - -To encourage active collaboration, Bagisto welcomes both bug reports and pull requests. Instead of just reporting bugs, we encourage you to submit pull requests that include fixes or negative test cases demonstrating the issue. When filing a bug report, please provide a clear title and description of the problem. Include as much relevant information as possible, along with a code sample that reproduces the bug. The goal is to make it easy for everyone to understand and fix the issue. - -Bug reports are meant to foster collaboration and find solutions. By reporting bugs, you can engage others in solving the problem and contribute to the project's improvement. - -## Projects to Contribute - -You can contribute to the following projects: - -- Bagisto -- Bagisto docs -- Laravel-aliexpress-dropship -- Laravel-aliexpress-dropship-chrome-extension -- Bagisto-custom-style-extension - -## Feature Requests - -We welcome proposals for new features and enhancements to the existing Bagisto app. If you have a new feature in mind, please be prepared to contribute some of the code required to implement it. - -## Branch Selection - -Before submitting a pull request, it's important to consider the following points to help you choose the appropriate branch: - -- **Bug Fixes**: If you're fixing a bug, make sure to port the fix to the latest version that supports it (currently v1.5.1). -- **Minor Feature Requests**: For minor features compatible with the current release, push your changes to the latest stable branch (currently v1.x). -- **Major Feature Requests**: If your request involves a major new feature with potential breaking changes, send it to the master branch, which corresponds to the upcoming release (v2.x). - -## Compiled Assets - -When submitting a change that includes compiled files, please avoid committing the compiled files directly. Maintainers find it difficult to review compiled files, and they may contain malicious code. To prevent this issue, the Bagisto maintainers will generate and commit the compiled files themselves. - -## Security Vulnerabilities - -If you discover a security vulnerability within Bagisto, please notify us immediately by sending an email to Jitendra Singh at [jitendra@webkul.in](mailto:jitendra@webkul.in). We take security vulnerabilities seriously and will address them promptly. - -## Coding Style - -Bagisto follows the [PSR-2](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md) coding standard and the [PSR-4](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-4-autoloader.md) autoloading standard. These standards ensure consistency and readability in the codebase, similar to Laravel. - -## PHPDoc - -Below is an example of a valid Bagisto doc block that follows the coding style: - -```php -/** - * Register a service with CoreServiceProvider. - * - * @param string|array $loader - * @param \Closure|string|null $concrete - * @param bool $shared - * @return void - * - * @throws \Exception - */ -protected function registerFacades($loader, $concrete = null, $shared = false) -{ - // -} -``` \ No newline at end of file diff --git a/docs/1.5.x/prologue/upgrade-guide.md b/docs/1.5.x/prologue/upgrade-guide.md deleted file mode 100644 index 93ea4d99..00000000 --- a/docs/1.5.x/prologue/upgrade-guide.md +++ /dev/null @@ -1,83 +0,0 @@ -# Upgrade Guide - -[[TOC]] - -## Upgrade Steps - -To upgrade your current version to the latest version of Bagisto, follow these steps: - -1. Download the latest version of Bagisto from one of the following links: - - [Download From Official Bagisto Site](https://bagisto.com/en/download/) - - [Download From GitHub](https://github.com/bagisto/bagisto) - -2. Extract the downloaded Bagisto zip file to the desired deployment location. - -3. Open the terminal and navigate to the root folder of the extracted Bagisto folder. - -4. Run the following command in the terminal: - - ```sh - composer create-project - ``` - - This command will install the necessary dependencies for the latest version of Bagisto. - -5. Open the **`.env`** file in your project's root folder. Provide the database credentials of your old project, which you want to upgrade using Bagisto. - -6. Run one of the following commands to cache the new changes: - - ```sh - php artisan optimize - - # -- OR -- - - php artisan config:cache - ``` - - These commands will cache the configuration files and optimize the project. - -7. Now, your project is ready to run the migration command. Execute the following command in the terminal: - - ```sh - php artisan migrate - ``` - - ::: danger - Be cautious when using the seeder command as it may reset settings and categories. Add default settings manually if necessary. - ::: - -8. Create a symbolic link to link public assets to the storage folder by running the following command: - - ```sh - php artisan storage:link - ``` - -9. Copy the contents of the previous version's folder (e.g., **`old-project/storage/app/public`**) to the corresponding folder in the latest version (e.g., **`new-project/storage/app/public`**). - - ::: tip - If your existing project depends on local storage, has changed paths, or requires previous logs, ensure to include those as well. - ::: - -10. Once the copying is complete, publish the new files by running the following command: - - ```sh - php artisan vendor:publish --all - ``` - - ::: warning - Avoid using the **`--force`** flag, as it will reset all your views. Only use it if you understand the consequences. - ::: - -11. Congratulations! Your project is now upgraded to the latest version of Bagisto. However, keep in mind that if you have made significant customizations, ensure compatibility with the latest version. - -## New Changes - -The following changes have been implemented in Bagisto from version 1.4.5 to 1.5.1: - -- Implemented Elasticsearch for improved search functionality. -- Added a count of selected products in Datagrid. ([GitHub](https://github.com/bagisto/bagisto/pull/7437)) -- Changed the appearance of checkboxes in dark mode. ([GitHub](https://github.com/bagisto/bagisto/pull/7304)) -- Modified routes in Packages. ([GitHub](https://github.com/bagisto/bagisto/pull/7345)) -- Removed Triggers feature. ([GitHub](https://github.com/bagisto/bagisto/pull/7334)) -- Consistent mail configuration as per Laravel standards. ([GitHub](https://github.com/bagisto/bagisto/pull/7509)) -- Removed REST API and JWT package related dependencies. ([GitHub](https://github.com/bagisto/bagisto/pull/7546)) \ No newline at end of file diff --git a/docs/1.5.x/themes/README.md b/docs/1.5.x/themes/README.md deleted file mode 100644 index 050378c7..00000000 --- a/docs/1.5.x/themes/README.md +++ /dev/null @@ -1,27 +0,0 @@ -# Themes - -If you are looking to customize the appearance and design of your Bagisto e-commerce store, creating a custom theme is the way to go. Bagisto offers a flexible and straightforward approach to theme development, allowing you to tailor the look and feel of your store to align with your brand and meet your specific requirements. - -## Package Development Prerequisite - -Before diving into theme development, it is recommended to have knowledge of creating packages in Laravel. If you are new to package development, you can refer to the [Package Development](../packages) section for a primer on creating and managing packages in Laravel. Understanding package development concepts will greatly assist you in creating and organizing your custom theme. - -## Creating a Custom Theme - -Creating a custom theme for Bagisto involves a few simple steps. Here's an overview of the process: - -1. **Create a Package**: As themes in Bagisto are treated as packages, the first step is to create a new package specifically for your theme. This package will serve as the container for your theme files and configuration. - -2. **Configure the Package**: Once the package is created, you need to configure it by defining the necessary details such as the package name, author, description, and other relevant information. This configuration ensures that Bagisto recognizes your package as a theme. - -3. **Define the Theme Assets**: In Bagisto, themes are primarily composed of assets such as CSS stylesheets, JavaScript files, and image files. You will need to create the appropriate directories within your theme package to store these assets. - -4. **Create Blade Views**: Blade views are the templates used to render the frontend of your store. You can create your own custom views within your theme package, allowing you to customize the appearance of different pages and components. - -5. **Configure Theme Layout**: Bagisto provides a layout system that defines the structure and organization of your store's pages. You can configure the layout for your theme by specifying the positions of various components, such as the header, footer, sidebar, and content sections. - -6. **Customize Theme Styles**: To achieve a unique and visually appealing design, you can customize the CSS stylesheets of your theme. This includes modifying colors, typography, spacing, and other visual elements to match your branding and aesthetic preferences. - -7. **Activate and Test the Theme**: Once your custom theme is ready, you can activate it in the Bagisto admin panel. This will make your theme the active theme for your store, reflecting the changes and customizations you have made. It is crucial to thoroughly test your theme to ensure its compatibility and responsiveness across different devices and browsers. - -By following these steps, you can create a fully customized theme for your Bagisto e-commerce store. This empowers you to create a unique and engaging shopping experience for your customers, aligning with your brand identity and enhancing your online presence. \ No newline at end of file diff --git a/docs/1.5.x/themes/create-admin-theme.md b/docs/1.5.x/themes/create-admin-theme.md deleted file mode 100644 index 1ad7a16c..00000000 --- a/docs/1.5.x/themes/create-admin-theme.md +++ /dev/null @@ -1,101 +0,0 @@ -# Admin Theme - -[[TOC]] - -## Configuration - -To configure the admin theme in Bagisto, follow these steps: - -1. In the Bagisto root directory, navigate to the **config** folder and open the **`themes.php`** file. Look for the keys **`admin-default`** and **`admin-themes`**. The configuration will appear as follows: - - ```php - 'default', - - 'admin-themes' => [ - 'default' => [ - 'views_path' => 'resources/admin-themes/default/views', - 'assets_path' => 'public/admin-themes/default/assets', - 'name' => 'Default' - ] - ] - ]; - ``` - - | Key | Description | - | -------------- | ---------------------------------------- | - | admin-default | Sets the current theme for the admin area | - | admin-themes | Stores a list of available themes | - -## Creating a Theme - -To create a new admin theme, follow these steps: - -1. Add a new theme entry to the **`admin-themes`** array in the **`themes.php`** file: - - ```php - 'default', - - 'admin-themes' => [ - 'default' => [ - 'views_path' => 'resources/admin-themes/default/views', - 'assets_path' => 'public/admin-themes/default/assets', - 'name' => 'Default' - ], - - 'theme1' => [ - 'views_path' => 'resources/admin-themes/theme1/views', - 'assets_path' => 'public/admin-themes/theme1/assets', - 'name' => 'Theme 1' - ] - ] - ]; - ``` - -2. In the new theme entry, specify the path to the views and assets folders according to your desired structure. For example: - - - Views structure: - - ``` - - resources - └── admin-themes - └── theme1 - └── views - ``` - - - Assets structure: - - ``` - - public - └── admin-themes - └── theme1 - └── assets - ``` - -3. To replace the dashboard page with a custom version, create the same directory structure for the dashboard in the **`theme1`** folder as it exists in the **`default`** folder. For example: - - ``` - - resources - └── admin-themes - └── theme1 - └── views - └── dashboard - └── index.blade.php - ``` - -4. In the newly created **`index.blade.php`** file, add the desired content for the dashboard page. For example: - - ```php - Theme 1 Sample - ``` - -5. Finally, activate the new theme by changing the value of the **`admin-default`** key in the **`config/themes.php`** file: - - ```php - 'admin-default' => 'theme1', - ``` - -Now, when you access the dashboard page in the admin area, you should see the customized version provided by the new theme (Theme 1). \ No newline at end of file diff --git a/docs/1.5.x/themes/create-theme.md b/docs/1.5.x/themes/create-theme.md deleted file mode 100644 index 3c24c36e..00000000 --- a/docs/1.5.x/themes/create-theme.md +++ /dev/null @@ -1,82 +0,0 @@ -# Store Theme - -[[TOC]] - -## Configuration - -To configure the store theme in Bagisto, follow these steps: - -1. Go to your project's root directory and locate the **`config`** folder. Inside the **`config`** folder, you will find a file named **`themes.php`**. - - ``` - - app - - bin - - bootstrap - - config - ├── ... - └── themes.php - - database - - packages - └── Webkul - ``` - -2. Open the **`themes.php`** file to examine its contents. This file contains all the necessary information for creating a custom theme in Bagisto. - - ```php - 'default', - - 'themes' => [ - 'default' => [ - 'views_path' => 'resources/themes/default/views', - 'assets_path' => 'public/themes/default/assets', - 'name' => 'Default' - ], - - 'velocity' => [ - 'views_path' => 'resources/themes/velocity/views', - 'assets_path' => 'public/themes/velocity/assets', - 'name' => 'Velocity', - 'parent' => 'default' - ], - ], - ]; - ``` - -3. Let's go through the parameters defined in the **`themes.php`** file as understanding them will help you in creating a custom theme. - -### Explanation of Parameters: - -- **default**: This parameter at the top of the file indicates the currently active or default theme in Bagisto. It is set to **`'default'`**, representing the name of the currently active theme. - -- **themes**: This parameter allows you to define the configurations for your custom themes. You can create and use multiple themes simultaneously in Bagisto. - - - Inside the **`'themes'`** array, there is another array named **`'default'`**, which represents your currently active theme. It contains several key-value pairs that are explained below: - - - **views_path**: This parameter specifies the path to the views or blade files for your custom theme. - - - **assets_path**: It determines the path to the assets such as images, CSS files, and JavaScript files for your theme. - - - **name**: This parameter defines a global name for your theme inside Bagisto. - - - **parent**: This is an optional parameter that allows you to customize existing themes in Bagisto. By setting the **`'parent'`** parameter to the value of the **`'name'`** parameter listed above, you can inherit the configuration of the parent theme and make further customizations. - -4. Once you have defined the paths and names for your custom theme in the **`themes.php`** file, you can start creating your view files. Make sure to cover all the GET routes of the shop package that include a parameter called **`'view'`**. You can find the route file of the shop package located at **`packages/Webkul/Shop/src/Http/routes.php`**. - -5. Ensure that the name of your blade file matches the value passed in the GET route file. For example: - - ```php - // Store front header nav-menu fetch - Route::get('/categories/{slug}', 'Webkul\Shop\Http\Controllers\CategoryController@index') - ->defaults('_config', [ - 'view' => 'shop::products.index' - ])->name('shop.categories.index'); - ``` - - In this example, the view file should be named **`index.blade.php`** and placed in the appropriate directory within your custom theme. - -6. For all the views, check all the GET routes as they include a **`'view'`** parameter with the corresponding value to be used. - -By following these steps, you can configure and create custom view files for your store theme in Bagisto. This allows you to personalize the appearance and layout of your storefront to align with your branding and provide an enhanced user experience. \ No newline at end of file diff --git a/docs/1.5.x/themes/integrate-image-search-in-theme.md b/docs/1.5.x/themes/integrate-image-search-in-theme.md deleted file mode 100644 index b753e6b0..00000000 --- a/docs/1.5.x/themes/integrate-image-search-in-theme.md +++ /dev/null @@ -1,72 +0,0 @@ -# Image Search - -[[TOC]] - -## Introduction - -In this section, we will guide you on integrating image search with your new theme. Our **`Default Theme`** and **`Velocity Theme`** utilize [TensorFlow.js](https://www.tensorflow.org/js) and load the **`TensorFlow`** MobileNet model. - -The **`TensorFlow`** JS model doesn't require any machine learning expertise. You simply need to pass browser-based image elements, such as **``**, and it will return an array containing the best predictions along with their confidences. - -## Usage - -Ensure that all your scripts are loaded in the footer. If you examine the **`default theme`** and **`velocity theme`**, you will notice that we use the `yielding` feature. You can also use the same approach by including a `scripts` yield in your main layouts. - -Let's begin by loading the library and model: - -```php -@push('scripts') - - -@endpush -``` - -Since the **`TensorFlow`** model only requires an image element, we will use a sample image element: - -```php -@push('scripts') - - - - -@endpush -``` - -::: tip -This is a sample image element. You can add a file input to allow users to select an image. -::: - -Now, for the main part, pass your image element to the model: - -```php -@push('scripts') - - - - - - -@endpush -``` - -Now you have all the predictions. Simply pass your predictions to your search input. - -::: tip -Create a query string from the predictions and redirect to the search route. -::: - -## Conclusion - -By following the entire flow, you can see that we pass an image element to the **`TensorFlow`** model. In return, we receive an array of predictions. From these predictions, we can generate query strings and redirect to the search route. \ No newline at end of file diff --git a/docs/1.5.x/themes/notification.md b/docs/1.5.x/themes/notification.md deleted file mode 100644 index 72bb22d7..00000000 --- a/docs/1.5.x/themes/notification.md +++ /dev/null @@ -1,21 +0,0 @@ -# Real-Time Notification - -To enable real-time notifications in the updated admin theme, you need to configure your project by following these steps: - -1. Create an account on [Pusher](https://dashboard.pusher.com/accounts/sign_up?_ga=2.266851022.1754006062.1647430118-1332525715.1647430118&_gl=1*jiq2no*_ga*MTMzMjUyNTcxNS4xNjQ3NDMwMTE4*_ga_V7TRZJDKDQ*MTY0NzQzMDExOC4xLjAuMTY0NzQzMDE0MC4w). - -2. Once you have created an account, create a Channels app for your application. In the app settings, go to the **`"App Keys"`** menu and copy the app ID, key, secret, and cluster. - -3. Open your application's **`.env`** file and replace the respective values with the credentials generated by Pusher. - -4. After updating the **`.env`** file, run the following command in your terminal to start the queue listener: - - ``` - php artisan queue:listen --queue=broadcastable - ``` - - This command ensures that the queue broadcasts are processed, making your application more responsive and providing a real-time experience. - - Note: Make sure you have set up the required configurations for queues and broadcasting in your Laravel application. - -By implementing real-time notifications, whenever an order is created or updated, you will receive immediate updates in the admin notification menu without having to wait for the process to complete or refresh the page. This enhances the responsiveness and user experience of your application. \ No newline at end of file diff --git a/docs/1.x/admin-theme/README.md b/docs/1.x/admin-theme/README.md deleted file mode 100644 index a8f53ba2..00000000 --- a/docs/1.x/admin-theme/README.md +++ /dev/null @@ -1,7 +0,0 @@ -# Themes - -We hope that now you know how to create a package, if not then you may refer to [Package Development](../packages) section. - -Creating a custom admin theme for Bagisto had been a hot topic lately. More and more users are actively trying our framework and we’re genuinely overwhelmed by it. - -Creating a custom admin theme for Bagisto is super easy with just a few lines of configuration code. Similarly following the traditional way of creating view files in Laravel would be enough. diff --git a/docs/1.x/admin-theme/notification.md b/docs/1.x/admin-theme/notification.md deleted file mode 100644 index 03656ba8..00000000 --- a/docs/1.x/admin-theme/notification.md +++ /dev/null @@ -1,9 +0,0 @@ -### Real time notification - -In the updated admin theme, we have introduced an option of getting real time notifications upon order creation and updation. For the real time notification, you need to have some of the configuration within your project as mentioned below: - -- [Create an account](https://dashboard.pusher.com/accounts/sign_up?_ga=2.266851022.1754006062.1647430118-1332525715.1647430118&_gl=1*jiq2no*_ga*MTMzMjUyNTcxNS4xNjQ3NDMwMTE4*_ga_V7TRZJDKDQ*MTY0NzQzMDExOC4xLjAuMTY0NzQzMDE0MC4w), then create a Channels app for your application. Go to the “App Keys” menu for that app, and copy the app_id, key, secret and cluster. -- Upon successfull generation of pusher credentials, go to your application .env file and replace the respective values with generated credentials. -- After that run queue listener command i.e. php artisan queue:listen --queue=broadcastable - -Queue broadcasts actually make your application more responsive and allows a realtime experience. When you have any action for order creation or updation, then you can immediately get respond to the admin notification menu instead of having to wait on the process to complete or page to refresh. diff --git a/docs/1.x/advanced/README.md b/docs/1.x/advanced/README.md deleted file mode 100644 index 5efcfa7b..00000000 --- a/docs/1.x/advanced/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Advanced Topics - -In this section, we will discuss the advanced topics of Bagisto like creating payment methods, shipping methods, data grids, and many more. Before diving into this, we are assuming that you are familiar with Laravel. diff --git a/docs/1.x/advanced/create-payment-method.md b/docs/1.x/advanced/create-payment-method.md deleted file mode 100644 index c488d8d9..00000000 --- a/docs/1.x/advanced/create-payment-method.md +++ /dev/null @@ -1,269 +0,0 @@ -# Create a new payment method - -We hope that now you know how to create a package, if not refer to [Package Development](../packages). - -Bagisto eases the task of creating payment methods. So, a novice developer or a professional developer can easily create payment methods. - -As the diversity of payment methods provide the options to customer for payment when they proceed to checkout. - -On another perspective, multiple payment methods are a great strategy to reach out to the global marketplace. - -In this section, we will explain how to create a payment method. You can create a payment method in two ways. - -1. By using Bagisto Package Generator (**Recommended**) -2. By manually setting up all files (**Expert Level**) - -## 1. By using Bagisto Package Generator - -- For creating payment method package, you need to use these commands in bagisto root directory, - - - If package directory not present, - - ```php - php artisan package:make-payment-method ACME/Stripe - ``` - - - If somehow package directory already present then you can use force command as well. For that you just need to pass the '**--force**' command. - - ```php - php artisan package:make-payment-method ACME/Stripe --force - ``` - - - This will generate whole directory structures. You don't need to do manually. - -- After that, you need to register your service provider in `config/app.php` which is located Bagisto root directory. - - ```php - [ - ... - ACME\Stripe\Providers\StripeServiceProvider::class, - ... - ] - ... - ]; - ``` - -- After that, add you payment method namespace in `psr-4` key in `composer.json` file for auto loading which is located Bagisto root directory. - - ```json - "autoload": { - ... - "psr-4": { - ... - "ACME\\Stripe\\": "packages/ACME/Stripe/src" - ... - } - ... - } - ``` - -- Run `composer dump-autoload`. - -- After that run `php artisan config:cache`. - -- This will setup the configuration in the admin panel. Now start creating routes, controllers and make some cool stuff. - -## 2. By manually setting up all files - -### Steps to create a payment method - -- Create respective directory structure to create your payment method. - - ```file-structure - - ACME/Stripe/src/ - - Config/ - - system.php - - paymentmethods.php - - Payment/ - - Stripe.php - - Providers/ - - StripeServiceProvider.php - ``` - -- Within `Config` folder, it contains application's configuration files. Let's just create two files i.e. `system.php` and `paymentmethods.php`. In `system.php` file, you have to include the array keys in the file as shown below, - - ```php - 'sales.paymentmethods.stripe', - 'name' => 'Stripe', - 'sort' => 1, - 'fields' => [ - [ - 'name' => 'title', - 'title' => 'admin::app.admin.system.title', - 'type' => 'text', - 'validation' => 'required', - 'channel_based' => false, - 'locale_based' => true, - ], [ - 'name' => 'description', - 'title' => 'admin::app.admin.system.description', - 'type' => 'textarea', - 'channel_based' => false, - 'locale_based' => true, - ], [ - 'name' => 'active', - 'title' => 'admin::app.admin.system.status', - 'type' => 'boolean', - 'validation' => 'required', - 'channel_based' => false, - 'locale_based' => true, - ] - ] - ] - ]; - ``` - - - Let's discuss what these keys are, - - - `key`: Value which is provided in this key should be unique and concatenated with '.' (dot) operator. - - - `name`: This key accept the value as a placeholder for your configuration. Generally, in Bagisto, we consider writing it using translation. - - - `sort`: This key accept the sort position for your configuration menu. - - - `fields`: This key accept the list of arrays representing your custom configurations and fields. Right now you are seeing that it only holding 3 array i.e. title, description and status. If you need some other settings than you can add one more array to this. - -- Similarly in `paymentmethods.php`, - - ```php - [ - 'code' => 'stripe', - 'title' => 'Stripe', - 'description' => 'Stripe', - 'class' => 'ACME\Stripe\Payment\Stripe', - 'active' => true, - 'sort' => 1, - ], - ]; - ``` - - - Now, let's look into this what these keys are, - - `code`: A text to represent payment method. - - `title`: Name of the payment method. - - `description`: A brief description of the payment method. - - `class`: This key includes the class namespace where all functions of payment method are written. - - `active`: This key accepts true/false to enable or disable the module. - - `sort`: This key accept the sort position of the payment. - -- If you check the above point, we have discussed the key `class` which includes the class namespace. So let's create that class in the respective file. In `Stripe.php`, add the below code, - - ```php - registerConfig(); - } - - /** - * Register package config. - * - * @return void - */ - protected function registerConfig() - { - $this->mergeConfigFrom( - dirname(__DIR__) . '/Config/paymentmethods.php', 'paymentmethods' - ); - - $this->mergeConfigFrom( - dirname(__DIR__) . '/Config/system.php', 'core' - ); - } - } - ``` - -- After that, you need to register your service provider in `config/app.php` which is located Bagisto root directory. - - ```php - [ - ... - ACME\Stripe\Providers\StripeServiceProvider::class, - ... - ] - ... - ]; - ``` - -- After that, add payment method namespace in `psr-4` key in `composer.json` file for auto loading which is located Bagisto root directory. - - ```json - "autoload": { - ... - "psr-4": { - ... - "ACME\\Stripe\\": "packages/ACME/Stripe/src" - ... - } - ... - } - ``` - -- Run `composer dump-autoload`. - -- After that run `php artisan config:cache`. - -::: tip - -If `composer dump-autoload` giving some error than in that case delete all files from the `bootstrap/cache` and again run `composer dump-autoload`. - -::: diff --git a/docs/1.x/advanced/create-product-type.md b/docs/1.x/advanced/create-product-type.md deleted file mode 100644 index 85a521bd..00000000 --- a/docs/1.x/advanced/create-product-type.md +++ /dev/null @@ -1,77 +0,0 @@ -# Create your own product type - -By default Bagisto provides the following product types: simple, configurable, virtual, grouped, downloadable, bundled and bookings. -If the default product types do not meet your requirements, you can create your own product type. - -## Steps to create your own product-types - -You may access this super-functionality of creating your own product-types by following the points listed below. - -**Note**: To demonstrate the process here, we will be creating a new product-type say "`coupon`" - -1. Create your own package, you can check out the [Package Development](../packages) section if you need help with this. -2. Within the Config folder of your package, create a file `product_types.php` -3. Write the below piece of code in it, which is will be used to add product-type in your project. - - ```php - [ - 'key' => 'coupon', - 'name' => 'Coupon', - 'class' => 'ACME\Coupon\Type\Coupon', - 'sort' => 7 - ], - ]; - ``` -4. After that, we need to merge this `Config/product_types.php` with a core product_types option. For this, we use the method mergeConfigFrom() in the register method of the service provider(`ACME\Coupon\Providers\CouponServiceProvider.php`). - - - ```php - mergeConfigFrom( - dirname(__DIR__) . '/Config/product_types.php', 'product_types' - ); - } - } - - ``` - -5. In 3rd point above, that have mentioned key `class` which loads coupon product type. So, you need to create a file `Coupon.php` within your package under Type folder and add the below code. - -```php - - -``` - -6. After successfully completion of above steps, your product type will get created. But, still we don't have any code written for coupon type product in the `Type/Coupon.php`. To inherit basic functionality of any product to your product type, we need to inherit the classes from the Product package `type/AbstractType.php` file. - -7. Extending `AbstractType.php` class within your product_type (`Type\Coupon.php`) class let you to provide some core functionality of product. But, in addition, if user need to defined it's own custom methods, then he can define within their `Coupon.php` file. diff --git a/docs/1.x/advanced/create-shipping-method.md b/docs/1.x/advanced/create-shipping-method.md deleted file mode 100644 index 4dcf7f90..00000000 --- a/docs/1.x/advanced/create-shipping-method.md +++ /dev/null @@ -1,257 +0,0 @@ -# Create a new shipping method - -We hope that now you know how to create a package, if not refer to [Package Development](../packages). - -In this section, we will understand how to create a shipping method. - -You can create a shipping method in two ways. - -1. By using Bagisto Package Generator (**Recommended**) -2. By manually setting up all files (**Expert Level**) - -## 1. By using Bagisto Package Generator - -For creating shipping method package, you need to use this command in bagisto root directory, - -~~~php -php artisan package:make-shipping-method ACME/FedEx -~~~ - -If somehow package directory already present then you can use force command as well. For that you just need to pass the '**--force**' command. - -~~~php -php artisan package:make-shipping-method ACME/FedEx --force -~~~ - -This will generate whole directory structures. You don't need to do manually. - -## 2. By manually setting up all files - -- User needs to create a `carriers.php` file in the `src/Config` path in the package (say FedEx). Here, we are going to specify what to include in your `carriers.php` file. - - ::: details Directory structure - - ~~~ - - ACME/FedEx/ - - FedEx/ - - src/ - - Config/ - - carriers.php - ~~~ - - ::: - - ~~~php - [ - 'code' => 'fedex', - 'title' => 'FedEx', - 'description' => 'FedEx Shipping', - 'active' => true, - 'type' => 'per_unit', - 'class' => 'ACME\FedEx\Carriers\FedEx', - ] - ]; - ~~~ - - - Explanation - - **code**: Unique value used for referring the particular menu. - - **title**: Label or name to display at the user interface. - - **description**: About your shipping method. - - **active**: Enable or disable option for shipping method. - - **type**: This field specifies that the shipping method applies as `per_unit` or - `per_order`. - - **class**: Path specified with filename `namespace\package-name\Carriers-folder\filename` - -- Create `Carriers` folder inside the `src` folder. Now, create `Fedex.php` in `Carriers` folder and add the below code to `Fedex.php` file. - -~~~php - isAvailable()) { - return false; - } - - $object = new CartShippingRate; - - $object->carrier = 'fedex'; - $object->carrier_title = $this->getConfigData('title'); - $object->method = 'fedex_fedex'; - $object->method_title = $this->getConfigData('title'); - $object->method_description = $this->getConfigData('description'); - $object->price = 0; - $object->base_price = 0; - - return $object; - } - } - ~~~ - - - File `Fedex.php` will extends `AbstractShipping` class which is defined at `Webkul\Shipping\Carriers\AbstractShipping`. In `Fedex.php`, methods are defined that you can use while creating a shipping method. - - - Now, you can write all the operations needed for your shipping method in `Fedex.php` file. - - - To render the shipping methods in checkout process, you need to define `calculate()` within your `Fedex.php` and return shipping rate, shipping title, shipping description within an object. - - ::: tip - May refer [FlatRate](https://github.com/bagisto/bagisto/blob/master/packages/Webkul/Shipping/src/Carriers/FlatRate.php#L28) `calculate()` method. - ::: - -- After creating all the necessary files and configurations, you need to create the form which will appear on the config section. So for that create file `system.php` in `src/Config`. Add below code to following file, - - ~~~php - 'sales.carriers.Fedex', - 'name' => 'admin::app.admin.system.fedex-shipping', - 'sort' => 2, - 'fields' => [ - [ - 'name' => 'title', - 'title' => 'admin::app.admin.system.title', - 'type' => 'text', - 'validation' => 'required', - 'channel_based' => true, - 'locale_based' => true - ], [ - 'name' => 'description', - 'title' => 'admin::app.admin.system.description', - 'type' => 'textarea', - 'channel_based' => true, - 'locale_based' => false - ], [ - 'name' => 'default_rate', - 'title' => 'admin::app.admin.system.rate', - 'type' => 'text', - 'channel_based' => true, - 'locale_based' => false - ], [ - 'name' => 'base_amount', - 'title' => 'admin::app.admin.system.minimum-amount', - 'type' => 'text', - 'channel_based' => true, - 'locale_based' => false - ], [ - 'name' => 'active', - 'title' => 'admin::app.admin.system.status', - 'type' => 'select', - 'options' => [ - [ - 'title' => 'Active', - 'value' => true - ], [ - 'title' => 'Inactive', - 'value' => false - ] - ], - 'validation' => 'required', - 'channel_based' => false, - 'locale_based' => true - ] - ] - ] - ~~~ - -- Now merge all your config in `packages/ACME/FedEx/src/Providers/FedExServiceProvider.php`, - - ~~~php - mergeConfigFrom( - dirname(__DIR__) . '/Config/carriers.php', 'carriers' - ); - - $this->mergeConfigFrom( - dirname(__DIR__) . '/Config/system.php', 'core' - ); - } - } - ~~~ - -- After that, you need to register your service provider in `config/app.php` which is located in Bagisto root directory. - - ~~~php - [ - ... - ACME\FedEx\Providers\FedExServiceProvider::class, - ... - ] - ... - ]; - ~~~ - -- After that, add you shipment method namespace in `psr-4` key in `composer.json` file for auto loading which is located in Bagisto root directory. - - ~~~json - "autoload": { - ... - "psr-4": { - ... - "ACME\\FedEx\\": "packages/ACME/FedEx/src" - ... - } - ... - } - ~~~ - -- Run `composer dump-autoload`. - -- After that run `php artisan config:cache`. - -::: tip - -If `composer dump-autoload` giving some error than in that case delete all files from the `bootstrap/cache` and again run `composer dump-autoload`. - -::: diff --git a/docs/1.x/advanced/datagrid.md b/docs/1.x/advanced/datagrid.md deleted file mode 100644 index 56ff73e2..00000000 --- a/docs/1.x/advanced/datagrid.md +++ /dev/null @@ -1,434 +0,0 @@ -# DataGrid - -DataGrid is just a concept of displaying your database records in tabular format. We have implemented this in Bagisto either you can use it to display data in tabular format or write code from scratch to display data in tabular format. In addition to DataGrid, we have implemented additional features such as sorting, filtering, mass action. You may refer to the table below for detailed information about the features. - -Let us take a sample of one DataGrid, - -~~~php -select('id') - ->addSelect('id', 'code', 'admin_name', 'type', 'is_required', 'is_unique', 'value_per_locale', 'value_per_channel'); - - $this->setQueryBuilder($queryBuilder); - } - - /** - * Add columns. - */ - public function addColumns() - { - $this->addColumn([ - 'index' => 'id', - 'label' => trans('admin::app.datagrid.id'), - 'type' => 'number', - 'searchable' => false, - 'sortable' => true, - 'filterable' => true - ]); - - $this->addColumn([ - 'index' => 'code', - 'label' => trans('admin::app.datagrid.code'), - 'type' => 'string', - 'searchable' => true, - 'sortable' => true, - 'filterable' => true - ]); - - $this->addColumn([ - 'index' => 'admin_name', - 'label' => trans('admin::app.datagrid.admin-name'), - 'type' => 'string', - 'searchable' => true, - 'sortable' => true, - 'filterable' => true - ]); - - $this->addColumn([ - 'index' => 'type', - 'label' => trans('admin::app.datagrid.type'), - 'type' => 'string', - 'sortable' => true, - 'searchable' => true, - 'filterable' => true - ]); - - $this->addColumn([ - 'index' => 'is_required', - 'label' => trans('admin::app.datagrid.required'), - 'type' => 'boolean', - 'sortable' => true, - 'searchable' => false, - 'wrapper' => function ($value) { - if ($value->is_required == 1) - return 'True'; - else - return 'False'; - } - ]); - - $this->addColumn([ - 'index' => 'is_unique', - 'label' => trans('admin::app.datagrid.unique'), - 'type' => 'boolean', - 'sortable' => true, - 'searchable' => false, - 'filterable' => true, - 'wrapper' => function ($value) { - if ($value->is_unique == 1) - return 'True'; - else - return 'False'; - } - ]); - - $this->addColumn([ - 'index' => 'value_per_locale', - 'label' => trans('admin::app.datagrid.per-locale'), - 'type' => 'boolean', - 'sortable' => true, - 'searchable' => false, - 'filterable' => true, - 'wrapper' => function ($value) { - if ($value->value_per_locale == 1) - return 'True'; - else - return 'False'; - } - ]); - - $this->addColumn([ - 'index' => 'value_per_channel', - 'label' => trans('admin::app.datagrid.per-channel'), - 'type' => 'boolean', - 'sortable' => true, - 'searchable' => false, - 'filterable' => true, - 'wrapper' => function ($value) { - if ($value->value_per_channel == 1) - return 'True'; - else - return 'False'; - } - ]); - } - - /** - * Prepare actions. - */ - public function prepareActions() - { - $this->addAction([ - 'title' => trans('admin::app.datagrid.edit'), - 'method' => 'GET', - 'route' => 'admin.catalog.attributes.edit', - 'icon' => 'icon pencil-lg-icon' - ]); - - $this->addAction([ - 'title' => trans('admin::app.datagrid.delete'), - 'method' => 'POST', - 'route' => 'admin.catalog.attributes.delete', - 'icon' => 'icon trash-icon' - ]); - } - - /** - * Prepare mass actions. - */ - public function prepareMassActions() - { - $this->addMassAction([ - 'type' => 'delete', - 'action' => route('admin.catalog.attributes.massdelete'), - 'label' => 'Delete', - 'method' => 'DELETE' - ]); - } -} -~~~ - -## Global properties of DataGrid - -As you see the above sample Datagrid, now let us discuss some properties, - -| Name | Functionality | -| ----------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| index | This property is defined in the grid, and the value assigned to this property must be unique i.e. `id`, so that data will be uniquely identified and operations performed will be based on your index value. | -| sortOrder | The `sortOrder` key is used to arrange the results in ascending or descending order, we have to set the sort order variable to `asc` or `desc`. | -| queryBuilder | It is used to perform database operations in your application. | -| enableMassAction | This accepts boolean values `true` or `false` to enable or disable the mass action in Datagrid. | -| enableAction | This accepts boolean values `true` or `false` to enable or disable the action column of Datagrid. | -| paginate | While creating your grid file you have to declare paginate property and set it to `true` to allow pagination on your page. | -| itemsPerPage | The `itemsPerPage` key is used to display the number of items per page. | -| enableFilterMap | This accepts boolean values `true` or `false` to enable or disable the filter on the basis of columns. | - -## Steps to create DataGrid - -You can create a DataGrid in two ways. - -1. By using Bagisto Package Generator (**Recommended**) -2. By manually setting up all files (**Expert Level**) - -### 1. By using Bagisto Package Generator - -This command will create a new data grid class in `packages/ACME/TestPackage/src/Datagrids` directory., - -~~~php -php artisan package:make-datagrid TestDataGrid ACME/TestPackage -~~~ - -If data grid class already present then you can use force command for overwriting. - -~~~php -php artisan package:make-datagrid TestDataGrid ACME/TestPackage --force -~~~ - -This will generate whole directory structures. You don't need to do manually. - -### 2. By manually setting up all files -1. We assume that you have created package let's say `ACME\TestPackage` with the below directory structure. -~~~directory-structure -- ACME/TestPackage/ - - publishable/assets - - css/ - - images/ - - js/ - - src/ - - Config/ - - acl.php - - admin-menu.php - - Console/ - - Commands/ - - Contracts/ - - Database/ - - Migrations/ - - Seeders/ - - Events/ - - Http/ - - Controllers/ - - Admin/ - - TestPackageController.php - - Shop/ - - TestPackageController.php - - Middleware/ - - Requests/ - - admin-routes.php - - shop-routes.php - - Listeners/ - - Mail/ - - Models/ - - Providers/ - - TestPackageServiceProvider.php - - TestPackageProvider.php - - Repositories/ - - Resources/ - - assets/ - - images/ - - js/ - - app.js - - sass/ - - admin.scss - - default.scss - - velocity.scss - - lang/ - - views/ - - admin/ - - layouts/ - - style.blade.php - - index.blade.php - - shop/ - - default/ - - index.blade.php - - velocity/ - - index.blade.php - - package.json - - webpack.mix.js -~~~ -2. Create a folder **Datagrids** in your package inside `src` folder, inside **Datagrids** folder, create a class let's say `TestDataGrid.php` that extends DataGrid class from Webkul `Ui` package. - -3. We have created `DataGrid` abstract class in Webkul `Ui` package. In the DataGrid abstract class, a list of properties and methods are declared. So, while creating your own DataGrid you need to only extends the `Webkul\Ui\DataGrid\DataGrid` abstract class inside your `TestDataGrid.php` class. - -4. In `Webkul\Ui\DataGrid\DataGrid.php` abstract class, two abstract methods are declared `prepareQueryBuilder()` and `addColumns()`. We can prepare grid by defining these two methods - - - `prepareQueryBuilder()`: In this method, records are retrieved through queries that is applicable on database and stored in a collection. When records are retrieved, `$this->setQueryBuilder($queryBuilder)` setQueryBuilder method is called. - - - `setQueryBuilder()`: This method is written in DataGrid abstract class of Webkul `Ui` package. This is used for setting the `$queryBuilder`. - - ~~~php - public function prepareQueryBuilder() - { - $queryBuilder = DB::table('attributes') - ->select('id') - ->addSelect('id', 'code', 'admin_name', 'type', 'is_required', 'is_unique', 'value_per_locale', 'value_per_channel'); - - $this->setQueryBuilder($queryBuilder); - } - ~~~ - - - `addColumns()`: In this method, the columns are created which are displayed in the grid. In this method, the parameter accepts the array in key-value pairs. Some of the essential keys are described below, - - | Name | functionality | - | ---------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | - | index | This key is defined in the grid, and the value assigned to this key must be unique, so that data will be uniquely identified and operations performed will be based on your index value. | - | label | In this key, the name of the column is defined. | - | type | This key accepts the type of data in column. | - | searchable | This accepts boolean values `true` or `false` to make the column searchable. | - | sortable | This accepts boolean values `true` or `false` to make the column sortable. | - | filterable | This accepts boolean values `true` or `false` to make the column filterable. | - | wrapper | Perform actions based on condition satisfied or some customization to value. | - - ~~~php - public function addColumns() - { - $this->addColumn([ - 'index' => 'id', - 'label' => trans('admin::app.datagrid.id'), - 'type' => 'number', - 'searchable' => false, - 'sortable' => true, - 'filterable' => true - ]); - - $this->addColumn([ - 'index' => 'code', - 'label' => trans('admin::app.datagrid.code'), - 'type' => 'string', - 'searchable' => true, - 'sortable' => true, - 'filterable' => true - ]); - } - ~~~ - - - `prepareActions()`: Additionally, this method is defined when there is a need to perform any action such as edit or delete on the grid. In this method, `addAction()` is called to define particular action. - - - `addAction()`: It is used for adding actions (like `edit`, `delete`, etc) to each row generated by Datagrid. - - | Name | Functionality | - | ------------ | ------------------------------------------------------------------------ | - | title | The text to be displayed in written here. | - | method | HTTP methods are declared. | - | route | This key accepts the route of icon. | - | icon | Class of icon to be displayed in action column you may prefer text also. | - - ~~~php - public function prepareActions() - { - $this->addAction([ - 'title' => trans('admin::app.datagrid.edit'), - 'method' => 'GET', - 'route' => 'admin.catalog.attributes.edit', - 'icon' => 'icon pencil-lg-icon' - ]); - - $this->addAction([ - 'title' => trans('admin::app.datagrid.delete'), - 'method' => 'POST', - 'route' => 'admin.catalog.attributes.delete', - 'icon' => 'icon trash-icon' - ]); - } - ~~~ - -::: warning - -- Use JavaScript with wrapper property set to true when needed. -- Return static blade files loaded with scripts in it with caution. - -::: - -## Multiple DataGrids - -As the default Datagrid will handle only a single request at a time which means filtration, sorting and many other operations will get conflicted when you try to implement the multiple DataGrids. To overcome this we have provided a trait `ProvideDataGridPlus` in the namespace `Webkul\Ui\DataGrid\Traits`. - -- Just take any of the Datagrid, let say `ProductDataGrid` in the namespace `Webkul\Admin\DataGrids`, - - ~~~php - namespace Webkul\Admin\DataGrids; - - class ProductDataGrid extends DataGrid - { - ... - } - ~~~ - -- Import the `ProvideDataGridPlus` trait in the mentioned class, - - ~~~php - namespace Webkul\Admin\DataGrids; - - use Webkul\Ui\DataGrid\Traits\ProvideDataGridPlus; - - class ProductDataGrid extends DataGrid - { - use ProvideDataGridPlus; - - ... - } - ~~~ - -- After that `toJson()` method will be available in the Datagrid instance which will provide data to the component. - -- Now you need to create one route and method from where the response will come. Let us take an example of the product listing page. Now go to `ProductController` in the namespace `Webkul\Product\Http\Controllers`, there is an index method, just use the `toJson`. - - ~~~php - use Webkul\Admin\DataGrids\ProductDataGrid; - - class ProductController extends Controller - { - /** - * Display a listing of the resource. - * - * @return \Illuminate\View\View - */ - public function index() - { - if (request()->ajax()) { - return app(ProductDataGrid::class)->toJson(); - } - - return view($this->_config['view']); - } - - ... - } - ~~~ - -- Now, in the view portion use this component i.e. `datagrid-plus` and add the url from where it will load the json data, - - ~~~php -
- ... - - - - ... -
- ~~~ - -- Done, your datagrid is ready. diff --git a/docs/1.x/advanced/events.md b/docs/1.x/advanced/events.md deleted file mode 100644 index 6db88d38..00000000 --- a/docs/1.x/advanced/events.md +++ /dev/null @@ -1,245 +0,0 @@ -# Events -Events are an implementation of observer pattern such that whenever an event takes place, then one or more listener(s) associated with that event responds. Imagine something like making an announcement to your application, and then actions being taken due to that announcement. All the event classes in Bagisto are stored in the **Providers** folder and the listeners are stored in the **Listeners** folder. - -## How to create Event Class? - -If you have the Bagisto Package Generator installed, then you can use the following command which will create a new event class in `packages/ACME/TestPackage/src/Events` directory. - -Please follow the following steps to create a new event class in your `packages/ACME/TestPackage` - -1. We assume that you have created a new TestPackage using Bagisto Package Generator like the below command. - -`php artisan package:make ACME/TestPackage` - -2. Now, you can create a event `Events\TestEvent.php` class using the below command. - -`php artisan package:make-event TestEvent ACME/TestPackage` - -If event class already present then you can use force command for overwriting by passing `--force` option. - -`php artisan package:make-event TestEvent ACME/TestPackage --force` - -Or if you don't have package generator then, you can create file manually also. - -## How to create Listener Class? - -If you have the Bagisto Package Generator installed, then you can use the following command which will create a new listener class in `packages/ACME/TestPackage/src/Listeners` directory. - -`php artisan package:make-listener TestListener ACME/TestPackage` - -If listener class already present then you can use force command for overwriting. - -`php artisan package:make-listener TestListener ACME/TestPackage --force` - -Or if you don't have package generator then, you can create file manually also. - -## Manually Registering Events - -For the sake of simplicity, in bagisto, we register events manually in the boot method of your **_EventServiceProvider.php_** as below: - -~~~php -/** -* Register any other events for your application. -* -* @return void -*/ - -public function boot() -{ - parent::boot(); - - Event::listen('event.name', 'path-upto-listener@function'); -} -~~~ - -## Manually Registering Listeners - -In registering events, we specify listener function to be executed when an event is called so on every event a listener function is to be executed - -~~~php -class EventServiceProvider extends ServiceProvider -{ - /** - * Bootstrap services. - * - * @return void - */ - public function boot() - { - Event::listen('checkout.order.save.after', 'Webkul\Admin\Listeners\Order@sendNewOrderMail'); - } -} -~~~ - -### How we specify events? - -In most of **CRUD** operation, we had fired an event before and after the execution of function. So, that if some one want to perform any operation after or before product create/update/delete can perform by simply calling a listener function in event registration - -## Events Fired in Bagisto - -Events fired in bagisto but not listened such that if any user wants to perform any action on event fire, then they may create listener file and perform the respective operation. - -| Events name | Functionality| -| ------------------------------- | ------------- | -|core.configuration.save.after|This event will be fired after core configuration form data gets saved, then you may create a listener file and perform the respective operation when that event fires | -|core.configuration.save.after|This event will be fired after core configuration form data gets saved, then you may create a listener file and perform the respective operation when that event fires| -|checkout.cart.item.add.before |This event will be fired before saving into the database of item added in checkout and you may create a listener file and perform the respective operation when that event fires| -|checkout.cart.item.add.after|This event will be fired after saving into the database of item added in checkout and you may create a listener file and perform the respective operation when that event fires| -|checkout.cart.item.update.before|This event will be fired before updating the database item of checkout table of respective passed `id` and you may create a listener file and perform the respective operation when that event fires | -|checkout.cart.item.update.after|This event will be fired after updating the database item of checkout table of respective passed `id` and you may create a listener file and perform the respective operation when that event fires| -|checkout.cart.delete.before|This event will be fired before deleting the database item of checkout table of respective passed `id` and you may create a listener file and perform the respective operation when that event fires| -|checkout.cart.delete.after|This event will be fired after deleting the database item of checkout table of respective passed `id` and you may create a listener file and perform the respective operation when that event fires| -|checkout.cart.item.delete.before|This event will be fired before deleting the database item of checkout table of respective passed `id` and you may create a listener file and perform the respective operation when that event fires| -|checkout.cart.item.delete.after|This event will be fired after deleting the database item of checkout table of respective passed `id` and you may create a listener file and perform the respective operation when that event fires| -|checkout.cart.item.move-to-wishlist.before|This event will be fired before adding cart item to wishlist added in checkout and you may create a listener file and perform the respective operation when that event fires| -|checkout.cart.item.move-to-wishlist.after|This event will be fired after adding cart item to wishlist added in checkout and you may create a listener file and perform the respective operation when that event fires| -|customer.registration.before|This event will be fired before registration of customer details and you may create a listener file and perform the respective operation when that event fires| -|customer.registration.after|This event will be fired after registration of customer details and you may create a listener file and perform the respective operation when that event fires| -|customer.after.login|This event will be fired after login of customer and you may create a listener file and perform the respective operation when that event fires| -|catalog.attribute_family.create.before|This event will be fired before attribute family gets created and you may create a listener file and perform the respective operation when that event fires| -|catalog.attribute_family.create.after|This event will be fired after attribute family gets created and you may create a listener file and perform the respective operation when that event fires| -|catalog.attribute_family.update.before|This event will be fired before updating attribute family and you may create a listener file and perform the respective operation when that event fires| -|catalog.attribute_family.update.after|This event will be fired after updating attribute family and you may create a listener file and perform the respective operation when that event fires| -|catalog.attribute_family.delete.before|This event will be fired before deleting attribute family and you may create a listener file and perform the respective operation when that event fires| -|catalog.attribute_family.delete.after|This event will be fired after deleting attribute family and you may create a listener file and perform the respective operation when that event fires| -|catalog.attribute.create.before|This event will be fired before attribute gets created and you may create a listener file and perform the respective operation when that event fires| -|catalog.attribute.create.after|This event will be fired after attribute gets created and you may create a listener file and perform the respective operation when that event fires| -|catalog.attribute.update.before|This event will be fired before attribute gets updated and you may create a listener file and perform the respective operation when that event fires| -|catalog.attribute.update.after|This event will be fired after attribute gets updated and you may create a listener file and perform the respective operation when that event fires| -|catalog.attribute.delete.before|This event will be fired before attribute gets deleted and you may create a listener file and perform the respective operation when that event fires| -|catalog.attribute.delete.after|This event will be fired after attribute gets deleted and you may create a listener file and perform the respective operation when that event fires| -|catalog.category.delete.after|This event will be fired after deleting category and you may create a listener file and perform the respective operation when that event fires| -|catalog.category.delete.before|This event will be fired before deleting category with mass selection and you may create a listener file and perform the respective operation when that event fires| -|catalog.category.delete.after|This event will be fired after deleting category with mass selection and you may create a listener file and perform the respective operation when that event fires| -|catalog.category.create.before|This event will be fired before creating category and you may create a listener file and perform the respective operation when that event fires| -|catalog.category.create.after|This event will be fired after creating category and you may create a listener file and perform the respective operation when that event fires| -|catalog.category.update.before|This event will be fired before updating category and you may create a listener file and perform the respective operation when that event fires| -|catalog.category.update.after|This event will be fired after updating category and you may create a listener file and perform the respective operation when that event fires| -|catalog.category.delete.before|This event will be fired before deleting category and you may create a listener file and perform the respective operation when that event fires| -|catalog.category.delete.after|This event will be fired after deleting category and you may create a listener file and perform the respective operation when that event fires| -|core.channel.create.before|This event will be fired before channel gets created and you may create a listener file and perform the respective operation when that event fires| -|core.channel.create.after|This event will be fired after channel gets created and you may create a listener file and perform the respective operation when that event fires| -|core.channel.update.before|This event will be fired before channel gets updated and you may create a listener file and perform the respective operation when that event fires| -|core.channel.update.after|This event will be fired after channel gets updated and you may create a listener file and perform the respective operation when that event fires| -|core.channel.delete.before|This event will be fired before channel gets deleted and you may create a listener file and perform the respective operation when that event fires| -|core.channel.delete.after|This event will be fired after channel gets deleted and you may create a listener file and perform the respective operation when that event fires| -|core.currency.create.before|This event will be fired before currency gets created and you may create a listener file and perform the respective operation when that event fires| -|core.currency.create.after|This event will be fired after currency gets created and you may create a listener file and perform the respective operation when that event fires| -|core.currency.update.before|This event will be fired before currency gets updated and you may create a listener file and perform the respective operation when that event fires| -|core.currency.update.after|This event will be fired after currency gets updated and you may create a listener file and perform the respective operation when that event fires| -|core.currency.delete.before|This event will be fired before currency gets deleted and you may create a listener file and perform the respective operation when that event fires| -|core.currency.delete.after|This event will be fired after currency gets deleted and you may create a listener file and perform the respective operation when that event fires| -|core.currency.delete.before|This event will be fired before currency gets deleted with mass selection and you may create a listener file and perform the respective operation when that event fires| -|core.currency.delete.after|This event will be fired after currency gets deleted with mass selection and you may create a listener file and perform the respective operation when that event fires| -|core.exchange_rate.create.before|This event will be fired before exchange rate gets created and you may create a listener file and perform the respective operation when that event fires| -|core.exchange_rate.create.after|This event will be fired after exchange rate gets created and you may create a listener file and perform the respective operation when that event fires| -|core.exchange_rate.update.before |This event will be fired before exchange rate gets updated and you may create a listener file and perform the respective operation when that event fires| -|core.exchange_rate.update.after|This event will be fired after exchange rate gets updated and you may create a listener file and perform the respective operation when that event fires| -|core.exchange_rate.delete.before|This event will be fired before exchange rate gets deleted and you may create a listener file and perform the respective operation when that event fires| -|core.exchange_rate.delete.after|This event will be fired after exchange rate gets deleted and you may create a listener file and perform the respective operation when that event fires| -|core.locale.create.before|This event will be fired before locale gets created and you may create a listener file and perform the respective operation when that event fires| -|core.locale.create.after|This event will be fired after locale gets created and you may create a listener file and perform the respective operation when that event fires| -|core.locale.update.before|This event will be fired before locale gets updated and you may create a listener file and perform the respective operation when that event fires| -|core.locale.update.after|This event will be fired after locale gets updated and you may create a listener file and perform the respective operation when that event fires| -|core.locale.delete.before|This event will be fired before locale gets deleted and you may create a listener file and perform the respective operation when that event fires| -|core.locale.delete.after|This event will be fired after locale gets deleted and you may create a listener file and perform the respective operation when that event fires| -|customer.registration.before|This event will be fired before customer gets registered and you may create a listener file and perform the respective operation when that event fires| -|customer.registration.after|This event will be fired after customer gets registered and you may create a listener file and perform the respective operation when that event fires| -|customer.after.login|This event will be fired after customer successfully logins in store and you may create a listener file and perform the respective operation when that event fires| -|customer.after.logout|This event will be fired after customer successfully logouts from store and you may create a listener file and perform the respective operation when that event fires| -|inventory.inventory_source.create.before|This event will be fired before inventory source gets created and you may create a listener file and perform the respective operation when that event fires| -|inventory.inventory_source.create.after|This event will be fired after inventory source gets created and you may create a listener file and perform the respective operation when that event fires| -|inventory.inventory_source.update.before|This event will be fired before inventory source gets updated and you may create a listener file and perform the respective operation when that event fires| -|inventory.inventory_source.update.after|This event will be fired after inventory source gets updated and you may create a listener file and perform the respective operation when that event fires| -|inventory.inventory_source.delete.before|This event will be fired before inventory source gets deleted and you may create a listener file and perform the respective operation when that event fires| -|inventory.inventory_source.delete.after|This event will be fired after inventory source gets deleted and you may create a listener file and perform the respective operation when that event fires| -|customer.review.update.before|This event will be fired before customer review gets updated and you may create a listener file and perform the respective operation when that event fires| -|customer.review.update.after|This event will be fired after customer review gets updated and you may create a listener file and perform the respective operation when that event fires| -|customer.review.delete.before|This event will be fired before customer review gets deleted and you may create a listener file and perform the respective operation when that event fires| -|customer.review.delete.after|This event will be fired after customer review gets deleted and you may create a listener file and perform the respective operation when that event fires| -|customer.review.delete.before|This event will be fired before customer review gets deleted with mass selection and you may create a listener file and perform the respective operation when that event fires| -|customer.review.delete.after|This event will be fired after customer review gets deleted with mass selection and you may create a listener file and perform the respective operation when that event fires| -|customer.review.update.before|This event will be fired before customer review gets updated with mass selection and you may create a listener file and perform the respective operation when that event fires| -|customer.review.update.after|This event will be fired after customer review gets updated with mass selection and you may create a listener file and perform the respective operation when that event fires| -|catalog.product.create.before|This event will be fired before product gets created and you may create a listener file and perform the respective operation when that event fires| -|catalog.product.create.after|This event will be fired after product gets created and you may create a listener file and perform the respective operation when that event fires| -|catalog.product.update.before|This event will be fired before product gets updated and you may create a listener file and perform the respective operation when that event fires| -|catalog.product.update.after|This event will be fired after product gets updated and you may create a listener file and perform the respective operation when that event fires| -|catalog.product.delete.before|This event will be fired before product gets deleted and you may create a listener file and perform the respective operation when that event fires| -|catalog.product.delete.after|This event will be fired after product gets deleted and you may create a listener file and perform the respective operation when that event fires| -|sales.invoice.save.before|This event will be fired before invoice gets created and you may create a listener file and perform the respective operation when that event fires| -|sales.invoice.save.after|This event will be fired after invoice gets created and you may create a listener file and perform the respective operation when that event fires| -|checkout.order.save.before|This event will be fired before order gets created and you may create a listener file and perform the respective operation when that event fires| -|checkout.order.save.after|This event will be fired after order gets created and you may create a listener file and perform the respective operation when that event fires| -|sales.order.cancel.before|This event will be fired before order gets cancelled and you may create a listener file and perform the respective operation when that event fires| -|sales.order.cancel.after|This event will be fired after order gets cancelled and you may create a listener file and perform the respective operation when that event fires| -|catalog.product.update.after|This event will be fired after product gets updated and you may create a listener file and perform the respective operation when that event fires| -|sales.shipment.save.before|This event will be fired before shipment for product gets created and you may create a listener file and perform the respective operation when that event fires| -|sales.shipment.save.after|This event will be fired after shipment for product gets created and you may create a listener file and perform the respective operation when that event fires| -|checkout.cart.add.before|This event will be fired before product get added in cart and you may create a listener file and perform the respective operation when that event fires| -|checkout.cart.add.after|This event will be fired after product get added in cart and you may create a listener file and perform the respective operation when that event fires| -|checkout.cart.delete.before|This event will be fired before product get deleted from cart and you may create a listener file and perform the respective operation when that event fires| -|checkout.cart.delete.after|This event will be fired after product get deleted from cart and you may create a listener file and perform the respective operation when that event fires| -|checkout.cart.update.before|This event will be fired before cart item get updated and you may create a listener file and perform the respective operation when that event fires| -|checkout.cart.update.after|This event will be fired after cart item get updated and you may create a listener file and perform the respective operation when that event fires| -|checkout.cart.add.before|This event will be fired before configurable product get added in cart and you may create a listener file and perform the respective operation when that event fires| -|checkout.cart.add.after|This event will be fired after configurable product get added in cart and proceeded to but the product and you may create a listener file and perform the respective operation when that event fires| -|tax.tax_category.create.before|This event will be fired before tax category gets created and you may create a listener file and perform the respective operation when that event fires| -|tax.tax_category.create.after|This event will be fired after tax category gets created and you may create a listener file and perform the respective operation when that event fires| -|tax.tax_category.update.before|This event will be fired before tax category gets updated and you may create a listener file and perform the respective operation when that event fires| -|tax.tax_category.update.after|This event will be fired after tax category gets updated and you may create a listener file and perform the respective operation when that event fires| -|tax.tax_category.delete.before|This event will be fired before tax category gets deleted and you may create a listener file and perform the respective operation when that event fires| -|tax.tax_category.delete.after|This event will be fired after tax category gets deleted and you may create a listener file and perform the respective operation when that event fires| -|tax.tax_rate.create.before|This event will be fired before tax rate gets created and you may create a listener file and perform the respective operation when that event fires| -|tax.tax_rate.create.after|This event will be fired after tax rate gets created and you may create a listener file and perform the respective operation when that event fires| -|tax.tax_rate.update.before|This event will be fired before tax rate gets updated and you may create a listener file and perform the respective operation when that event fires| -|tax.tax_rate.update.after|This event will be fired after tax rate gets updated and you may create a listener file and perform the respective operation when that event fires| -|tax.tax_rate.delete.before|This event will be fired before tax rate gets deleted and you may create a listener file and perform the respective operation when that event fires| -|tax.tax_rate.delete.after|This event will be fired after tax rate gets deleted and you may create a listener file and perform the respective operation when that event fires| -|user.role.create.before|This event will be fired before user role gets created. The role of user in created from admin panel and you may create a listener file and perform the respective operation when that event fires| -|user.role.create.after|This event will be fired after user role gets created. The role of user in created from admin panel and you may create a listener file and perform the respective operation when that event fires| -|user.role.update.before|This event will be fired before user role gets updated. The role of user in created from admin panel and you may create a listener file and perform the respective operation when that event fires| -|user.role.update.after|This event will be fired after user role gets updated. The role of user in created from admin panel and you may create a listener file and perform the respective operation when that event fires| -|user.role.delete.before|This event will be fired before user role gets updated. The role of user in created from admin panel and you may create a listener file and perform the respective operation when that event fires| -|user.role.delete.after|This event will be fired after user role gets deleted. The role of user in created from admin panel and you may create a listener file and perform the respective operation when that event fires| -|user.admin.create.before|This event will be fired before user gets created. The user gets created from admin panel and you may create a listener file and perform the respective operation when that event fires| -|user.admin.delete.after|This event will be fired after user gets deleted. The user gets created from admin panel and you may create a listener file and perform the respective operation when that event fires| -|user.admin.update.before|This event will be fired before user gets updated. The user gets created from admin panel and you may create a listener file and perform the respective operation when that event fires| -|user.admin.update.after|This event will be fired after user gets updated. The user gets created from admin panel and you may create a listener file and perform the respective operation when that event fires| -|user.admin.delete.before|This event will be fired before user gets deleted. The user gets created from admin panel and you may create a listener file and perform the respective operation when that event fires| -|user.admin.delete.after|This event will be fired after user gets deleted. The user gets created from admin panel and you may create a listener file and perform the respective operation when that event fires| -|user.admin.delete.before|This event will be fired before user gets deleted. The user gets created from admin panel and you may create a listener file and perform the respective operation when that event fires| -|user.admin.delete.after|This event will be fired after user gets deleted. The user gets created from admin panel and you may create a listener file and perform the respective operation when that event fires| - -## Events Listen in Bagisto - -| Events name | functionality | -| ------------------------------- | ------------- | -| checkout.order.save.after | This event will be fired after order creation and listen in `ProductFlat` listener file to send new order mail from `sendNewOrderMail` function | -| sales.invoice.save.after | This event will be fired after invoice details have been saved and listen in `ProductFlat` listener file to send new invoice mail from `sendNewInvoiceMail` function | -| sales.shipment.save.after | This event will be fired after shipment details have been saved and listen in `ProductFlat` listener file to send new shipment mail from `sendNewShipmentMail` function | -| checkout.order.save.after | This event will be fired after order has been created and will listen in `ProductFlat` listener file to update product inventory from `updateProductInventory` function | -| catalog.attribute.create.after | This event will be fired after attribute has been created and listen in `ProductFlat` listener file from `afterAttributeCreatedUpdated` function | -| catalog.attribute.update.after | This event will be fired after attribute has updated and listen in `ProductFlat` listener file from `afterAttributeCreatedUpdated` function | -| catalog.attribute.delete.before | This event will be fired before attribute has been delete and listen in `ProductFlat` listener file from `afterAttributeDeleted` function | -| catalog.product.create.after | This event will be fired after product has been creation and listen in `ProductFlat` listener file from `afterProductCreatedUpdated` function | -| catalog.product.update.after | This event will be fired after product has been updated and listen in `ProductFlat` listener file from `afterProductCreatedUpdated` function | - -## Listen Existing Event - -As above, all events used in bagisto are listed here so you may change or edit the listener function such as- `sendNewOrderMail` that is defined in `productFlat` listener file, so you can edit and perform the required operation - -~~~php -class EventServiceProvider extends ServiceProvider -{ - /** - * Bootstrap services. - * - * @return void - */ - public function boot() - { - Event::listen('checkout.order.save.after', 'Webkul\Admin\Listeners\Order@sendNewOrderMail'); - } -} -~~~ \ No newline at end of file diff --git a/docs/1.x/advanced/helpers.md b/docs/1.x/advanced/helpers.md deleted file mode 100644 index 8a26e243..00000000 --- a/docs/1.x/advanced/helpers.md +++ /dev/null @@ -1,181 +0,0 @@ -# Helpers - -In Bagisto, there are several packages have been used. We have provided useful helper methods in the packages which can help developers to develop their projects with ease. - -## Core Helpers - -All the mentioned helper methods are from Bagisto's core package class named `Core` in the `Webkul\Core` namespace. Let's discuss some common methods, - -- Get all the channels, - - ~~~php - core()->getAllChannels(); - ~~~ - -- Get the current channel, - - ~~~php - core()->getCurrentChannel(); - ~~~ - -- Set the current channel, this method will take one argument i.e. instance of this class `Webkul\Core\Models\Channel`, - - ~~~php - core()->setCurrentChannel($channel); - ~~~ - -- Get the current channel code, - - ~~~php - core()->getCurrentChannelCode(); - ~~~ - -- Get the default channel, - - ~~~php - core()->getDefaultChannel(); - ~~~ - -- Get the default channel code, - - ~~~php - core()->getDefaultChannelCode(); - ~~~ - -- Get requested channel code, this method is useful when you need to fetch the channel from the request, and no need to worry about the fallback as well. This method also has the optional parameter `$fallback`, which means the developer can use this with or without fallback, - - ~~~php - core()->getRequestedChannelCode(); - ~~~ - -- Get the channel name, yeah we know that you can chain it with the `Channel` instance but the purpose of this method is to handle the fallback case as well. This method will first check the name in the property, if not found then it will proceed further with app locale code, if still not found then it will check from the config key name as `app.fallback_locale`, - - ~~~php - core()->getChannelName($channel); - ~~~ - -- Get all the locales, - - ~~~php - core()->getAllLocales(); - ~~~ - -- Get all locales by requested channel, this method will provide you all the locales associated with the requested channel, - - ~~~php - core()->getAllLocalesByRequestedChannel(); - ~~~ - -- Get the current locale, - - ~~~php - core()->getCurrentLocale(); - ~~~ - -- Get the requested locale code, this method is useful when you need to fetch the locale code from the request, and no need to worry about the fallback as well. This method also has the optional parameter `$localeKey` and `$fallback`, which means the developer can use this with or without fallback, - - ~~~php - core()->getRequestedLocaleCode(); - ~~~ - -- Get all the customer groups, - - ~~~php - core()->getAllCustomerGroups(); - ~~~ - -- Get requested customer group code, this method will fetch you customer group code from the request, - - ~~~php - core()->getRequestedCustomerGroupCode(); - ~~~ - -- Get all the currencies, - - ~~~php - core()->getAllCurrencies(); - ~~~ - -- Get the base currency, - - ~~~php - core()->getBaseCurrency(); - ~~~ - -- Get the base currency code, - - ~~~php - core()->getBaseCurrencyCode(); - ~~~ - -- Get the channel based currency, - - ~~~php - core()->getChannelBaseCurrency(); - ~~~ - -- Get the channel based currency code, - - ~~~php - core()->getChannelBaseCurrencyCode(); - ~~~ - -- Get the current currency, - - ~~~php - core()->getCurrentCurrency(); - ~~~ - -- Get the current currency code, - - ~~~php - core()->getCurrentCurrencyCode(); - ~~~ - -- Get the exchange rate based on the currency id, - - ~~~php - core()->getExchangeRate($targetCurrencyId); - ~~~ - -- Get the formatted amount, - - ~~~php - core()->currency($amount = 0); - ~~~ - -- Get the configuration date based on the key, channel and locale, - - ~~~php - core()->getConfigData($field, $channel = null, $locale = null); - ~~~ - -- Get all the countries, - - ~~~php - core()->countries(); - ~~~ - -- Get the country name by country code, - - ~~~php - core()->country_name($countryCode); - ~~~ - -- Get all the country's state, - - ~~~php - core()->states($countryCode); - ~~~ - -- Get sender email details, - - ~~~php - core()->getSenderEmailDetails(); - ~~~ - -- Get admin email details, - - ~~~php - core()->getAdminEmailDetails(); - ~~~ diff --git a/docs/1.x/advanced/indexing-products-to-elasticsearch.md b/docs/1.x/advanced/indexing-products-to-elasticsearch.md deleted file mode 100644 index e5bf70e0..00000000 --- a/docs/1.x/advanced/indexing-products-to-elasticsearch.md +++ /dev/null @@ -1,96 +0,0 @@ -# Indexing products to Elasticsearch - -In this section, we will explain the indexing of products from the database to the Elasticsearch engine. - -## Setting up environment - -To continue with this make sure you have [Elasticseach](https://www.elastic.co/guide/en/elasticsearch/reference/current/install-elasticsearch.html) installed on your system. By default, Elasticsearch uses the `9200` port. So, we are using the same port. - -Just hit this route `http://localhost:9200`, if you see the below image then Elasticsearch is successfully installed on your system, - -![Elasticsearch Installation Info](../../assets/1.x/images/advanced-topics/elastic-search/installed-elastic-info.png) - -::: tip - -If you want to use curl, you can hit this command, - -~~~sh -curl -X GET 'http://localhost:9200' -~~~ - -::: - -You can use [Kibana](https://www.elastic.co/guide/en/kibana/7.10/index.html) for visualization also, but in this section, we are using only the Elasticsearch engine. - -## Setting up config - -The most simple way to set up your environment is by just setting the key in the `.env` file. - -- Now, open the `.env` file in your project and this line, - - ~~~env - SCOUT_DRIVER=elastic - ELASTIC_HOST="localhost:9200" - ~~~ - -- After that run `php artisan config:cache`. - -- Done! Now you are all set to index your products. - -::: tip - -If still it is not working, then you can directly set your config in the following files i.e., - -- `config/elastic.client.php` - - ~~~php - ... - - 'hosts' => [ - env('ELASTIC_HOST', 'localhost:9200'), - ] - - ... - ~~~ - -- `config/scout.php` - - ~~~php - ... - - 'driver' => env('SCOUT_DRIVER', 'elastic'), - - ... - ~~~ - -Then run `php artisan config:cache`. - -::: - -## Indexing - -Now, after setting up the environment and config, your product gets automatically indexed when you create a new one. - -If you want to index the existing products, then you need to run the below command, - -~~~php -php artisan scout:import Webkul\\Product\\Models\\ProductFlat -~~~ - -This command will index all your data from `product_flat` table to Elasticsearch index. - -## Checking index - -Now, let's check our imported index in the Elasticsearch by hitting this URL `http://localhost:9200/_cat/indices?v`, - -![Product Index Info](../../assets/1.x/images/advanced-topics/elastic-search/product-index.png) - -::: tip - -If you want to use curl, you can hit this command, - -~~~sh -curl -X GET 'http://localhost:9200/_cat/indices?v' -~~~ - -::: diff --git a/docs/1.x/advanced/override-core-model.md b/docs/1.x/advanced/override-core-model.md deleted file mode 100644 index 6ad2c19e..00000000 --- a/docs/1.x/advanced/override-core-model.md +++ /dev/null @@ -1,61 +0,0 @@ -# Override core model - -Concord is a Laravel Extension that helps building modules on top of Laravel's built-in Service Providers. -Bagisto uses Concord for managing their modules. -The concept of model proxies has been introduced. Proxies, as the name suggests will drive you to the actual model class. - -Concord's concept also requires to have an interface **_Product_** and this way it's possible to freely bind a concrete class to it using Concord's **registerModel()** method. - -`Models\Product` class gets bound to the `Contracts\Product` interface within the module (consider it as a default). If the application wants to extend that class, it invokes Concord's **registerModel()** again, and that's all. - -The **registerModel()** method also silently binds the interface to the implementation with Laravel's service container so you can simply type-hint the interface at any point where automatic injection happens. - -**Note** : _For more details check_ Concord _on github or refer to its_ Documentation - -Overriding Model class in the application: - -Concord modules generally define an interface for every eloquent model. If you want to override a model you can tell concord to use another class for that interface. Below, you may have a look at code - -```php - namespace App\Providers; - - use Illuminate\Support\ServiceProvider; - use Illuminate\Support\Facades\Schema; - - class AppServiceProvider extends ServiceProvider - { - - /** - * Bootstrap any application services. - * - * @return void - */ - public function boot() - { - $this->app->concord->registerModel( - \Webkul\Product\Contracts\Product::class, \App\Http\Product::class - ); - } - } -``` - -In the code shown above, **registerModel()** method accepts two parameters, described below: - -- The first parameter states your Contracts path which you want to override. - -- The second parameter states the model path from where you will override the model. - -The model from which you want to override must extend your model path as shown below - -```php -field('home_page_content') - ->with(['sliderData' => $sliderData])->render() !!} - - {!! view_render_event('bagisto.shop.home.content.after') !!} - - @endsection -``` - -To render any template before or after any function we may use 'view_render_event'. -You can define any event view_render_event() in the template by following steps: - -## Steps to render View - -- Create an event in the blade file in which you want to render any content before or after any content of that template: - -```php - {!! view_render_event('bagisto.shop.test.before') !!} -``` - -As you can see, `bagisto.shop.test` is the event name here that is defined in a random blade file of the project. - -- Now you have to listen to the event at **_EventServiceProvider.php_** file and in the boot method like: - -```php - Event::listen('bagisto.shop.test.before', function($viewRenderEventManager) { - $viewRenderEventManager->addTemplate('template file path that you want to inject'); - }); -``` - -As you can see, you have to add the path of the template that you want to render. -After that, this will automatically fire and your template will be injected before the content. -Make sure that you have registered EventServiceProvider in your ServiceProvider. diff --git a/docs/1.x/advanced/security-practice.md b/docs/1.x/advanced/security-practice.md deleted file mode 100644 index 72e052c3..00000000 --- a/docs/1.x/advanced/security-practice.md +++ /dev/null @@ -1,151 +0,0 @@ -# Best Security Practices - -## Keep your software up-to-date - -- Using HTTPS (Google now uses HTTPS as a ranking factor). - -- Keep all software on the server up-to-date. - - Bagisto - - Database - - Adminer/phpMyAdmin - - Apache - - Redis, etc. - -- Make sure the server operating system is up-to-date for available security patches. - -- Manage files only with secure communication protocols (SSH/ SFTP/ HTTPs), disable FTP. - -- [ .htaccess ] file to protect system files, when using apache webserver. - -- Disable unused ports, and stop services running unnecessarily. - -- Restrict access to certain IPs to the admin panel and use Admin logins with two-factor authorization. - -- Use of strong and unique passwords. - -- Use a properly configured and updated firewall between the payment card data and the public network. - -## Limiting error messages - -![limiting-error-messages](../../assets/1.x/images/advanced-topics/best-security-practices/limiting-error-messages.png) - -- Edit your apache configuration file to avoid displaying server and os details. - -- Set “ServerSignature” to OFF as by default it is ON. - -- Add “ServerTokens Prod” to display Apache as product only. - -## Allow admin access to certain IPs - -- Edit your .htaccess file with the following code - -~~~ -RewriteEngine On -RewriteCond %{REQUEST*URI} .*/admin -RewriteCond %{REMOTE*ADDR} != -RewriteCond %{REMOTE_ADDR} != -RewriteRule ^(.*)\$ - [R=403,L] -~~~ - -- Review your server for development leftovers. Make sure there are no accessible "log files", ".git directories", "database dumps", "zip files". - -## Restrict files with .git, .zip, .gz, and .sql extensions - -- Edit your .htaccess file - -~~~ - - Require all denied - -~~~ - -- Use a Web application firewall to analyze traffic and discover suspicious patterns such as credit card information being sent to an attacker. - -- Make sure only port 80 and 443 are publicly accessible and the rest of the ports are restricted. - - -## Restrict php execution inside storage directory - -- Edit your apache configuration file - - ~~~ - - - Require all denied - - php_flag engine off - - ~~~ - - ::: tip - - Don't forget to restart apache. - - ::: - -## Harden your server - -- Use of mod_security module to detect and prevent intrusions. - -- Use of mod_passive module to prevent brute force attack. - -- Allow only specific users to login. - -- Disable login to users with empty passwords. - -- Check iptable rules to prevent unauthorized access and activity. - -- Take regular backup of important files and also save them remotely in a secure environment. - -## Use strong and unique passwords - -- Use strong and unique passwords, and change them periodically. - - ::: tip - - Use password generator. ([Password Generator](https://passwords-generator.org/)) - - ::: - -- Limit access to the Bagisto admin by updating the whitelist with the IP address of each computer that is authorized to use the admin. - -## Implementation of HTTP Security Headers - -- In addition, Headers play a key role in communication between the client and the server, some of -them have been mentioned in order to enhance the web security. - -### HTTP Strict Transport Security (HSTS) - -- This response header will tell the browser that the application is only to be accessed using https instead of http. - - `Strict-Transport-Security: max-age=` - -### Cross Site Scripting Protection (X-XSS Protection) - -- This response header will enforce browsers to detect cross site scripting attacks and not to execute malicious js script in response. - - `X-XSS-Protection: 1; mode=block` - -### X-Frame-Options​ - -- This response header enables the protection of applications against clickjacking. It tells the browser whether the content can be displayed within frames. - - `X-Frame-Options: deny` - -### X-Content-Type-Options​ - -- This header will force the browser to disable MIME sniffing. - -- MIME sniffing vulnerability occurs when an attacker uploads an HTML file as a different file type such as jpg. - - `X-Content-Type-Options: nosniff` - -### Content Security Policy (CSP) - -- This response header allows application administrators to control resources that can be loaded in users' browsers and helps to detect and mitigate attacks such as xss, clickjacking. - -### Continuous Logging And Monitoring - -- Likewise, monitor all access to the network and cardholder data environment. -- Keep an eye on large volume orders for a single item from a new customer. -- A series of orders, shipped to the same address using different payment methods. diff --git a/docs/1.x/api/README.md b/docs/1.x/api/README.md deleted file mode 100644 index 6c1ba515..00000000 --- a/docs/1.x/api/README.md +++ /dev/null @@ -1,21 +0,0 @@ -# Bagisto Web APIs - -Bagisto Web API is a medium to use the features of the core Bagisto System. By using Bagisto Web API, you can integrate your application to serve the default content of Bagisto. - -## Key Features - -- Bagisto APIs supports REST (Representational State Transfer). -- Authentication: Customer Authentication with Login Details. -- Provide access to performed CRUD operations. -- Also Provide the option to filter the responses based on attribute fields. -- The Framework supports the pagination which helps to increase the performance of application. - -## Where can I use Bagisto Web APIs? - -We can use the Bagisto APIs in different areas. Some of them are: - -- To build a PWA (Progressive Web Application) application, which uses modern web capabilities to deliver an application like experience to the users and provide more user friendly experience than a web application. - -- Use to integrate an Online-Shopping Mobile Application with the Bagisto Store to help the customers make purchase. - -- Use to integrate with CRM (Customer Relationship Management) systems Like: HubSpot, Salesforce etc. which allows you to manage the business relationships with your customers to help you grow your business. diff --git a/docs/1.x/api/addresses.md b/docs/1.x/api/addresses.md deleted file mode 100644 index dfbf4754..00000000 --- a/docs/1.x/api/addresses.md +++ /dev/null @@ -1,278 +0,0 @@ -# Addresses - -In this section, we will use all the addresses' API. We will check the creation of address, fetching of addresses, and updation of address. - -## Create a new address - -To add an address, you have to use the `addresses/create` endpoint url and have to pass the address fields in the request payload. This `addresses/create` API call resource will create a new address of the customer, only if that customer has logged in the store. - -- Headers - - | Key | Value | Info | - | ------------- | --------------------- | ------------------------------------ | - | Accept | application/json | | - | Authorization | Bearer `token-string` | Use only when you pass `?token=true` | - -- Request - - `POST /api/addresses/create` - -- Params - - | Name | Info | Type | - | ------------ | ------------ | ------ | - | address1 | Address | Array | - | city | City | String | - | country | Country | String | - | country_name | Country Name | String | - | phone | Phone | String | - | postcode | Post Code | String | - | state | State | String | - -### Examples - -Let's take an example of creating an address, - -- Headers - - | Key | Value | Info | - | ------------- | --------------------- | ------------------------------------ | - | Accept | application/json | | - | Authorization | Bearer `token-string` | Use only when you pass `?token=true` | - -- Request - - `POST http(s)://example.com/api/addresses/create` - -- Params - - | Name | Value | - | ------------ | --------------- | - | address1 | ['Clock Tower'] | - | city | Dehradun | - | country | IN | - | country_name | India | - | phone | 0123456798 | - | postcode | 248001 | - | state | UT | - - ~~~json - { - "address1": [ - "Clock Tower" - ], - "city": "Dehradun", - "country": "IN", - "country_name": "India", - "phone": "0123456798", - "postcode": "248001", - "state": "UT" - } - ~~~ - -::: details Response - - ~~~json - { - "message":"Address has been created successfully.", - "data": {...} // This contains the data you send to the api. - } - ~~~ - -::: - -## Get all addresses - -To get all the address of a customer, that customer must be logged in to the store. You can achieve this job by using `addresses` API call resource. - -- Headers - - | Key | Value | Info | - | ------------- | --------------------- | ------------------------------------ | - | Accept | application/json | | - | Authorization | Bearer `token-string` | Use only when you pass `?token=true` | - -- Request - - `GET /api/addresses` - -### Examples - -Let's take an example, - -- Headers - - | Key | Value | Info | - | ------------- | --------------------- | ------------------------------------ | - | Accept | application/json | | - | Authorization | Bearer `token-string` | Use only when you pass `?token=true` | - -- Request - - `GET http(s)://example.com/api/addresses` - -::: details Response - - ~~~json - { - "data": [ - { - "id": 3, - "address1": [...], - "country": "IN", - "country_name": "India", - "state": "UT", - "city": "Dehradun", - "postcode": 248001, - "phone": "01345679", - }, - { - "id": 2, - "address1": [...], - "country": "IN", - "country_name": "India", - "state": "UP", - "city": "Noida", - "postcode": 201301, - "phone": "012345679", - }, - ] - } - ~~~ - -::: - -## Get address by id - -To get the customer's specific address, you have to pass an `address_id` as a request payload like `addresses/{address_id}` in API URL. By using this resource and request payload, you will get only a single object under the `data` object in response. - -- Headers - - | Key | Value | Info | - | ------------- | --------------------- | ------------------------------------ | - | Accept | application/json | | - | Authorization | Bearer `token-string` | Use only when you pass `?token=true` | - -- Request - - `GET /api/addresses/{address_id}` - -- Params - - | Name | Info | Type | - | ---------- | ------- | ------ | - | address_id | Address | Number | - -### Examples - -Let's take an example, - -- Headers - - | Key | Value | Info | - | ------------- | --------------------- | ------------------------------------ | - | Accept | application/json | | - | Authorization | Bearer `token-string` | Use only when you pass `?token=true` | - -- Request - - `GET http(s)://example.com/api/addresses/1` - -::: details Response - - ~~~json - { - "data": { - "id": 1, - "address1": [ - "Block H-ARP Park, Sector 63 " - ], - "country": "IN", - "country_name": "India", - "state": "UP", - "city": "Noida", - "postcode": 201301, - "phone": "0132456789", - "created_at": { - "date": "", - "timezone_type": 3, - "timezone": "Asia/Kolkata" - }, - "updated_at": { - "date": "", - "timezone_type": 3, - "timezone": "Asia/Kolkata" - }, - } - } - ~~~ - -::: - -## Update address - -To update the customer's specific address, you have to pass an `address_id` as a request payload like `addresses/{address_id}` in API URL. - -- Headers - - | Key | Value | Info | - | ------------- | --------------------- | ------------------------------------ | - | Accept | application/json | | - | Authorization | Bearer `token-string` | Use only when you pass `?token=true` | - -- Request - - `PUT /api/addresses/1` - -- Params - - | Name | Info | Type | - | ------------ | ------------ | ------ | - | address1 | Address | Array | - | city | City | String | - | country | Country | String | - | country_name | Country Name | String | - | phone | Phone | String | - | postcode | Post Code | String | - | state | State | String | - -### Examples - -- Headers - - | Key | Value | Info | - | ------------- | --------------------- | ------------------------------------ | - | Accept | application/json | | - | Authorization | Bearer `token-string` | Use only when you pass `?token=true` | - -- Request - - `PUT http(s)://example.com/api/addresses/1` - -- Params - - ~~~json - { - "id": 1, - "address1": [ - "Clock Tower" - ], - "city": "New Delhi", - "country": "IN", - "country_name": "India", - "phone": "9876543210", - "postcode": "248001", - "state": "DL" - } - ~~~ - -::: details Response - - ~~~json - { - "message":"Your address has been updated successfully.", - "data": {...} // Address' detail. - } - ~~~ - -::: diff --git a/docs/1.x/api/attribute-families.md b/docs/1.x/api/attribute-families.md deleted file mode 100644 index a686e627..00000000 --- a/docs/1.x/api/attribute-families.md +++ /dev/null @@ -1,239 +0,0 @@ -# Attribute Families - -Attribute families are the group of attributes that can be assigned to the product according to the product's needs. - -## Get all attribute familes - -This api request will fetch all the attribute families. - -- Headers - - | Key | Value | - | ------------- | ---------------- | - | Accept | application/json | - -- Request - - `GET /api/families(?limit,page,pagination)` - -- Params - - | Name | Info | Type | - | ------------- | -------------------------------------------- | ------ | - | limit | Maximum number of records in each request | Number | - | page | Records for specific page based on the limit | Number | - | pagination | will display all the records if set to `0` | Number | - -::: tip - - If you are using pagination and want to know more info about responses then check the [explanation](./explanation) portion. - -::: - -### Examples - -#### 1. Get attribute families of the specific page - -- Headers - - | Key | Value | - | ------------- | ---------------- | - | Accept | application/json | - -- Request - - `GET http(s)://example.com/api/families?page=1` - - ::: tip - - If you didn't use the page (?page=x) filter, then it returns the data of the first page by default. - - `GET http(s)://example.com/api/families` - - ::: - -::: details Response - - ~~~json - { - "data": [ - { - "id": 1, - "code": "default", - "name": "Default", - "status": 0, - "groups": [...] - "created_at": null, - "updated_at": null - } - ], - "links": { - "first": "https://example.com/api/families?page=1", - "last": "https://example.com/api/families?page=1", - "prev": null, - "next": null - }, - "meta": { - "current_page": 1, - "from": 1, - "last_page": 1, - "links": [ - { "url": null, "label": "« Previous", "active": false }, - { - "url": "https://example.com/api/families?page=1", - "label": "1", - "active": true - }, - { "url": null, "label": "Next »", "active": false } - ], - "path": "https://example.com/api/families", - "per_page": 10, - "to": 1, - "total": 1 - } - } - ~~~ - -::: - -#### 2. Get attribute families of the specific page with limit - -- Headers - - | Key | Value | - | ------------- | ---------------- | - | Accept | application/json | - -- Request - - `GET http(s)://example.com/api/families?page=1&limit=5` - -::: details Response - - ~~~json - { - "data": [ - { - "id": 1, - "code": "default", - "name": "Default", - "status": 0, - "groups": [...], - "created_at": null, - "updated_at": null - } - ], - "links": { - "first": "https://example.com/api/families?limit=5&page=1", - "last": "https://example.com/api/families?limit=5&page=1", - "prev": null, - "next": null - }, - "meta": { - "current_page": 1, - "from": 1, - "last_page": 1, - "links": [ - { "url": null, "label": "« Previous", "active": false }, - { - "url": "https://example.com/api/families?limit=5&page=1", - "label": "1", - "active": true - }, - { "url": null, "label": "Next »", "active": false } - ], - "path": "https://example.com/api/families", - "per_page": "5", - "to": 1, - "total": 1 - } - } - ~~~ - -::: - -#### 3. Get all attribute families without pagination - -If you don't want to use the pagination and want to access all the store's attribute families at once, then you have to send a filter parameter named as`pagination` with value `zero`. By doing this you will get all attributes objects at once in the data object and this will not give you link and meta objects. - -- Headers - - | Key | Value | - | ------------- | ---------------- | - | Accept | application/json | - -- Request - - `GET http(s)://example.com/api/families?pagination=0` - -::: details Response - - ~~~json - { - "data": [ - { - "id": 1, - "code": "default", - "name": "Default", - "status": 0, - "groups": [...], - "created_at": null, - "updated_at": null - } - ] - } - ~~~ - -::: - -## Get attribute family by id - -For fetching any specific attribute family, you have to provide the attribute family's id as an input parameter. - -- Headers - - | Key | Value | - | ------------- | ---------------- | - | Accept | application/json | - -- Request - - `GET /api/families/{id}` - -- Params - - | Name | Info | Type | - | ---- | --------------------- | ------ | - | id | Attribute Family's id | Number | - -### Examples - -#### 1. Let's try to fetch attribute family by id - -- Headers - - | Key | Value | - | ------------- | ---------------- | - | Accept | application/json | - -- Request - - `GET http(s)://example.com/api/families/1` - -::: details Response - - ~~~json - { - "data": { - "id": 1, - "code": "default", - "name": "Default", - "status": 0, - "groups": [...], - "created_at": null, - "updated_at": null - } - } - ~~~ - -::: diff --git a/docs/1.x/api/attributes.md b/docs/1.x/api/attributes.md deleted file mode 100644 index 9181c9b5..00000000 --- a/docs/1.x/api/attributes.md +++ /dev/null @@ -1,355 +0,0 @@ -# Attributes - -In this section, we are using the attributes' API. An Attribute is a specification or characteristics of a product for example color, size, pattern are an attribute of T-Shirt. You can as create many attributes for a single product. Product Attribute plays a major factor in buying decision of the Customer. - -## Get all attributes - -This api request will fetch all the attributes. - -- Headers - - | Key | Value | - | ------------- | ---------------- | - | Accept | application/json | - -- Request - - `GET /api/attributes(?limit,page,pagination)` - -- Params - - | Name | Info | Type | - | ------------- | -------------------------------------------- | ------ | - | limit | Maximum number of records in each request | Number | - | page | Records for specific page based on the limit | Number | - | pagination | will display all the records if set to `0` | Number | - -::: tip - - If you are using pagination and want to know more info about responses then check the [explanation](./explanation) portion. - -::: - -### Examples - -#### 1. Get attributes of the specific page - -- Headers - - | Key | Value | - | ------------- | ---------------- | - | Accept | application/json | - -- Request - - `GET http(s)://example.com/api/attributes?page=1` - - ::: tip - - If you didn't use the page (?page=x) filter, then it returns the data of the first page by default. - - `GET http(s)://example.com/api/attributes` - - ::: - -::: details Response - - ~~~json - { - "data": [ - { - "id":27, - "code":"product_number", - "type":"text", - "name":"Product Number", - "swatch_type":null, - "options":[], - "created_at":"2021-05-24T05:09:12.000000Z", - "updated_at":"2021-05-24T05:09:12.000000Z" - }, - {...}, - {...} - ], - "links": { - "first": "https://example.com/api/attributes?page=1", - "last": "https://example.com/api/attributes?page=3", - "prev": null, - "next": "https://example.com/api/attributes?page=2" - }, - "meta": { - "current_page": 1, - "from": 1, - "last_page": 3, - "links": [...], - "path": "https://example.com/api/attributes", - "per_page": 10, - "to": 10, - "total": 27 - } - } - ~~~ - -::: - -#### 2. Get attributes of the specific page with limit - -- Headers - - | Key | Value | - | ------------- | ---------------- | - | Accept | application/json | - -- Request - - `GET http(s)://example.com/api/attributes?page=1&limit=5` - -::: details Response - - ~~~json - { - "data": [ - { - "id": 27, - "code": "product_number", - "type": "text", - "name": "Product Number", - "swatch_type": null, - "options": [], - "created_at": "2021-05-24T05:09:12.000000Z", - "updated_at": "2021-05-24T05:09:12.000000Z" - }, - { - "id": 26, - "code": "guest_checkout", - "type": "boolean", - "name": "Allow Guest Checkout", - "swatch_type": null, - "options": [], - "created_at": "2021-05-24T05:09:12.000000Z", - "updated_at": "2021-05-24T05:09:12.000000Z" - }, - { - "id": 25, - "code": "brand", - "type": "select", - "name": "Brand", - "swatch_type": null, - "options": [], - "created_at": "2021-05-24T05:09:12.000000Z", - "updated_at": "2021-05-24T05:09:12.000000Z" - }, - { - "id": 24, - "code": "size", - "type": "select", - "name": "Size", - "swatch_type": null, - "options": [ - { "id": 6, "admin_name": "S", "label": "S", "swatch_value": null }, - { "id": 7, "admin_name": "M", "label": "M", "swatch_value": null }, - { "id": 8, "admin_name": "L", "label": "L", "swatch_value": null }, - { "id": 9, "admin_name": "XL", "label": "XL", "swatch_value": null } - ], - "created_at": "2021-05-24T05:09:12.000000Z", - "updated_at": "2021-05-24T05:09:12.000000Z" - }, - { - "id": 23, - "code": "color", - "type": "select", - "name": "Color", - "swatch_type": null, - "options": [ - { "id": 1, "admin_name": "Red", "label": "Red", "swatch_value": null }, - { - "id": 2, - "admin_name": "Green", - "label": "Green", - "swatch_value": null - }, - { - "id": 3, - "admin_name": "Yellow", - "label": "Yellow", - "swatch_value": null - }, - { - "id": 4, - "admin_name": "Black", - "label": "Black", - "swatch_value": null - }, - { - "id": 5, - "admin_name": "White", - "label": "White", - "swatch_value": null - } - ], - "created_at": "2021-05-24T05:09:12.000000Z", - "updated_at": "2021-05-24T05:09:12.000000Z" - } - ], - "links": { - "first": "https://example.com/api/attributes?limit=5&page=1", - "last": "https://example.com/api/attributes?limit=5&page=6", - "prev": null, - "next": "https://example.com/api/attributes?limit=5&page=2" - }, - "meta": { - "current_page": 1, - "from": 1, - "last_page": 6, - "links": [ - { - "url": null, - "label": "« Previous", - "active": false - }, - { - "url": "https://example.com/api/attributes?limit=5&page=1", - "label": "1", - "active": true - }, - { - "url": "https://example.com/api/attributes?limit=5&page=2", - "label": "2", - "active": false - }, - { - "url": "https://example.com/api/attributes?limit=5&page=3", - "label": "3", - "active": false - }, - { - "url": "https://example.com/api/attributes?limit=5&page=4", - "label": "4", - "active": false - }, - { - "url": "https://example.com/api/attributes?limit=5&page=5", - "label": "5", - "active": false - }, - { - "url": "https://example.com/api/attributes?limit=5&page=6", - "label": "6", - "active": false - }, - { - "url": "https://example.com/api/attributes?limit=5&page=2", - "label": "Next »", - "active": false - } - ], - "path": "https://example.com/api/attributes", - "per_page": "5", - "to": 5, - "total": 27 - } - } - ~~~ - -::: - -#### 3. Get all attributes without pagination - -If you don't want to use the pagination and want to access all the store's attributes at once, then you have to send a filter parameter named as`pagination` with value `zero`. By doing this you will get all attributes objects at once in the data object and this will not give you link and meta objects. - -- Headers - - | Key | Value | - | ------------- | ---------------- | - | Accept | application/json | - -- Request - - `GET http(s)://example.com/api/attributes?pagination=0` - -::: details Response - - ~~~json - { - "data": [ - { - "id": 27, - "code": "product_number", - "type": "text", - "name": "Product Number", - "swatch_type": null, - "options": [], - "created_at": "2021-05-24T05:09:12.000000Z", - "updated_at": "2021-05-24T05:09:12.000000Z" - }, - { - "id": 26, - "code": "guest_checkout", - "type": "boolean", - "name": "Allow Guest Checkout", - "swatch_type": null, - "options": [], - "created_at": "2021-05-24T05:09:12.000000Z", - "updated_at": "2021-05-24T05:09:12.000000Z" - }, - {...}, - {...}, - {...}, - {...} - ] - } - ~~~ - -::: - -## Get attribute by id - -For fetching any specific attribute, you have to provide the attribute's id as an input parameter. - -- Headers - - | Key | Value | - | ------------- | ---------------- | - | Accept | application/json | - -- Request - - `GET /api/attributes/{id}` - -- Params - - | Name | Info | Type | - | ---- | -------------- | ------ | - | id | Attribute's id | Number | - -### Examples - -#### 1. Let's try to fetch attribute by id - -- Headers - - | Key | Value | - | ------------- | ---------------- | - | Accept | application/json | - -- Request - - `GET http(s)://example.com/api/attributes/1` - -::: details Response - - ~~~json - { - "data": { - "id": 1, - "code": "sku", - "type": "text", - "name": "SKU", - "swatch_type": null, - "options": [], - "created_at": "2021-05-24T05:09:12.000000Z", - "updated_at": "2021-05-24T05:09:12.000000Z" - } - } - ~~~ - -::: diff --git a/docs/1.x/api/cart.md b/docs/1.x/api/cart.md deleted file mode 100644 index 32c6dfd5..00000000 --- a/docs/1.x/api/cart.md +++ /dev/null @@ -1,1104 +0,0 @@ -# Cart - -In this section, we will use the cart's API. We will see how to add the product to the cart, fetching cart details, updating cart, and many more things related to the cart. - -## Add product to cart - -By using this API call you can add new products to the cart and also you can add quantity to the existing product in the cart. To do this task, you have to use the `checkout/cart/add/{product_id}` as a request payload in the API URL. This API call will work with both customer's authentication or without customer's authentication. - -Currently,Bagisto support the following types of product, - -- [Simple](#simple-and-virtual-product) -- [Configurable](#configurable-product) -- [Bundle](#bundle-product) -- [Grouped](#grouped-product) -- [Downloadable](#downloadable-product) -- [Virtual](#simple-and-virtual-product) - -Let us discuss each product, - -### Simple And Virtual Product - -A simple product is a physical item with no configurable option like size, color, etc. Whereas virtual product is slightly same as simple but is not a physical item. - -- Headers - - | Key | Value | Info | - | ------------- | --------------------- | ------------------------------------ | - | Accept | application/json | | - | Authorization | Bearer `token-string` | Use only when you pass `?token=true` | - -- Request - - `POST /api/checkout/cart/add/{product_id}` - -- Params - - | Name | Info | Type | - | ---------- | ------------ | ------ | - | product_id | Product's ID | Number | - | quantity | Quantity | Number | - - ```json - { - "product_id": "product_id", - "quantity": "quantity" - } - ``` - -### Configurable Product - -A Configurable product allows the seller to sell the product in a different variation in Bagisto. - -- Headers - - | Key | Value | Info | - | ------------- | --------------------- | ------------------------------------ | - | Accept | application/json | | - | Authorization | Bearer `token-string` | Use only when you pass `?token=true` | - -- Request - - `POST /api/checkout/cart/add/{product_id}` - -- Params - - | Name | Info | Type | - | ---------------------------- | --------------------------------- | ------ | - | product_id | Product's ID | Number | - | quantity | Quantity | Number | - | selected_configurable_option | Configurable product variant's ID | Number | - | super_attribute | Attribute's ID collections | Object | - - ```json - { - "product_id": "product_id", - "quantity": "quantity", - "selected_configurable_option": "configurable_product_variant_id", - "super_attribute": { - "attribute_id": "attribute_option_id", - "attribute_id": "attribute_option_id" - } - } - ``` - -### Bundle Product - -A bundle product includes a customizable product that you can build for your own. - -- Headers - - | Key | Value | Info | - | ------------- | --------------------- | ------------------------------------ | - | Accept | application/json | | - | Authorization | Bearer `token-string` | Use only when you pass `?token=true` | - -- Request - - `POST /api/checkout/cart/add/{product_id}` - -- Params - - | Name | Info | Type | - | ----------------- | -------------------------- | ------ | - | product_id | Product's ID | Number | - | quantity | Quantity | Number | - | bundle_options | Bundle options collections | Object | - | bundle_option_qty | Bundle options qunatity | Object | - - ```json - { - "product_id": "product_id", - "quantity": "quantity", - "bundle_options": { - "first_option_id": { - "index_0": "option_product_id" - }, - "second_option_id": { - "index_0": "option_product_id", - "index_1": "another_option_product_id" - } - }, - "bundle_option_qty": { - "first_option_id": "quantity" - } - } - ``` - -### Grouped Product - -A grouped product is a group of simple products that can be combined together. - -- Headers - - | Key | Value | Info | - | ------------- | --------------------- | ------------------------------------ | - | Accept | application/json | | - | Authorization | Bearer `token-string` | Use only when you pass `?token=true` | - -- Request - - `POST /api/checkout/cart/add/{product_id}` - -- Params - - | Name | Info | Type | - | ---------- | ----------------------------------- | ------ | - | product_id | Product's ID | Number | - | quantity | Quantity | Number | - | qty | Collection of product with quantity | Object | - - ```json - { - "product_id": "product_id", - "quantity": "quantity", - "qty": { - "product_id_1": "quantity", - "product_id_2": "quantity", - "product_id_3": "quantity", - "product_id_4": "quantity" - } - } - ``` - -### Downloadable Product - -Downloadable product allows you to sell digital products, such as eBooks, software applications, music, updates, games, etc. - -- Headers - - | Key | Value | Info | - | ------------- | --------------------- | ------------------------------------ | - | Accept | application/json | | - | Authorization | Bearer `token-string` | Use only when you pass `?token=true` | - -- Request - - `POST /api/checkout/cart/add/{product_id}` - -- Params - - | Name | Info | Type | - | ---------- | ------------------- | ------ | - | product_id | Product's ID | Number | - | quantity | Quantity | Number | - | links | Collection of links | Object | - - ```json - { - "product_id": "product_id", - "quantity": "quantity", - "links": { - "0": "link_id_1", - "1": "link_id_2" - } - } - ``` - -### Examples - -#### 1. For simple product - -- Headers - - | Key | Value | Info | - | ------------- | --------------------- | ------------------------------------ | - | Accept | application/json | | - | Authorization | Bearer `token-string` | Use only when you pass `?token=true` | - -- Request - - `POST http(s)://example.com/api/checkout/cart/add/24` - -- Params - - ```json - { - "product_id": 24, - "quantity": 2 - } - ``` - -#### 2. For configurable product - -- Headers - - | Key | Value | Info | - | ------------- | --------------------- | ------------------------------------ | - | Accept | application/json | | - | Authorization | Bearer `token-string` | Use only when you pass `?token=true` | - -- Request - - `POST http(s)://example.com/api/checkout/cart/add/6` - -- Params - - ```json - { - "product_id": 6, - "quantity": 1, - "selected_configurable_option": 26, - "super_attribute": { - "23": 2, - "24": 6 - } - } - ``` - -::: details Response - -```json -{ - "message": "Product added to cart successfully.", - "data": { - "id": 4, - "customer_email": "johndoe@example.com", - "customer_first_name": "John", - "customer_last_name": "Doe", - "shipping_method": null, - "items_qty": "1.0000", - "grand_total": "50.0000", - "sub_total": "50.0000", - "tax_total": "0.0000", - "discount": "0.0000", - "checkout_method": null, - "is_guest": 0, - "items": [ - {...}, // Cart Item 1 - {...}, // Cart Item 2 - ], - "selected_shipping_rate": null, - "payment": null, - "billing_address": null, - "shipping_address": null, - } -} -``` - -![bagisto_cart_add](../../assets/1.x/images/api/bagisto_cart_add.jpg) - -::: - -#### 3. Adding more products to the same cart - -For this, you need to pass the `product_id` in the request body also. - -- Headers - - | Key | Value | Info | - | ------------- | --------------------- | ------------------------------------ | - | Accept | application/json | | - | Authorization | Bearer `token-string` | Use only when you pass `?token=true` | - -- Request - - `POST http(s)://example.com/api/checkout/cart/add/25` - -- Params - - ```json - { - "product_id": 25, - "quantity": 2 - } - ``` - -## Get complete cart details - -To get the current cart details, you have to use the `checkout/cart` resource in the API URL. You will see in all the `cart` related API, we used the `checkout` prefix. This API call will work with both customer's authentication or without customer's authentication. If the customer is not logged-in to the store, then this API resource will return the guest's cart detail. - -- Headers - - | Key | Value | Info | - | ------------- | --------------------- | ------------------------------------ | - | Accept | application/json | | - | Authorization | Bearer `token-string` | Use only when you pass `?token=true` | - -- Request - - `GET /api/checkout/cart` - -### Examples - -#### 1. In case of guest customer - -In, Bagisto guest cart is handled by session, and Laravel handles session by cookies. So you need to save the cookies for the guest cart when you are adding product to the cart and then send it as a header when you want to fetch. - -- Headers - - | Key | Value | - | ------ | ------------------- | - | Accept | application/json | - | Cookie | bagisto_session=key | - -- Request - - `GET http(s)://example.com/api/checkout/cart` - -::: details Response - -```json -{ - "data": { - "id": 7, - "customer_email": null, - "customer_first_name": null, - "customer_last_name": null, - "shipping_method": null, - "items_qty": "1.0000", - "grand_total": "50.0000", - "sub_total": "50.0000", - "tax_total": "0.0000", - "discount": "0.0000", - "checkout_method": null, - "is_guest": 1, - "items": [ - {...}, // Cart Item 1 - {...} // Cart Item 2 - ], - "selected_shipping_rate": null, - "payment": null, - "billing_address": null, - "shipping_address": null, - } -} -``` - -![bagisto_cart_guest](../../assets/1.x/images/api/bagisto_cart_guest.jpg) - -::: - -#### 2. In case of logged in customer - -In the case of the logged-in user, no need for cookies as the cart is in the database and linked with the customer. - -- Headers - - | Key | Value | Info | - | ------------- | --------------------- | ------------------------------------ | - | Accept | application/json | | - | Authorization | Bearer `token-string` | Use only when you pass `?token=true` | - -- Request - - `GET http(s)://example.com/api/checkout/cart` - -::: details Response - -```json -{ - "data": { - "id": 6, - "customer_email": "johndoe@example.com", - "customer_first_name": "John", - "customer_last_name": "Doe", - "shipping_method": null, - "items_count": 2, - "items_qty": "2.0000", - "grand_total": "170.0000", - "sub_total": "170.0000", - "tax_total": "0.0000", - "discount": "0.0000", - "checkout_method": null, - "is_guest": 0, - "items": [ - {...}, // Cart Item 1 - {...} // Cart Item 2 - ], - "selected_shipping_rate": null, - "payment": null, - "billing_address": null, - "shipping_address": null, - } -} -``` - -![bagisto_cart](../../assets/1.x/images/api/bagisto_cart.jpg) - -::: - -## Empty cart - -By using this API call you can remove all the products from the cart. To do this task, you have to use the `checkout/cart/empty` resource in the API URL. This API call will work both with customer's authentication or without customer's authentication. - -- Headers - - | Key | Value | Info | - | ------------- | --------------------- | ------------------------------------ | - | Accept | application/json | | - | Authorization | Bearer `token-string` | Use only when you pass `?token=true` | - -- Request - - `GET /api/checkout/cart/empty` - -### Examples - -- Headers - - | Key | Value | Info | - | ------------- | --------------------- | ------------------------------------ | - | Accept | application/json | | - | Authorization | Bearer `token-string` | Use only when you pass `?token=true` | - -- Request - - `GET http(s)://example.com/api/checkout/cart/empty` - -::: details Response - -```json -{ - "message": "Cart removed successfully.", - "data": null -} -``` - -::: - -## Update cart - -By using this API call you can update the cart's product(s) quantity. To do this task, you have to use the `checkout/cart/update` resource in the API URL. This API call will work with both customer's authentication or without customer's authentication. - -- Headers - - | Key | Value | Info | - | ------------- | --------------------- | ------------------------------------ | - | Accept | application/json | | - | Authorization | Bearer `token-string` | Use only when you pass `?token=true` | - -- Request - - `PUT /api/checkout/cart/update` - -- Params - - ```json - { - "qty": { - "cart_item_id": "quantity" - } - } - ``` - -### Examples - -- Headers - - | Key | Value | Info | - | ------------- | --------------------- | ------------------------------------ | - | Accept | application/json | | - | Authorization | Bearer `token-string` | Use only when you pass `?token=true` | - -- Request - - `PUT http(s)://example.com/api/checkout/cart/update` - -- Params - - ```json - { - "qty": { - "4": 2 - } - } - ``` - -::: details Response: - -```json -{ - "message": "Cart updated successfully.", - "data": { - "id": 7, - "customer_email": "johndoe@example.com", - "customer_first_name": "John", - "customer_last_name": "Doe", - "shipping_method": null, - "items_qty": "7.0000", - "grand_total": "450.0000", - "sub_total": "450.0000", - "tax_total": "0.0000", - "discount": "0.0000", - "checkout_method": null, - "is_guest": 0, - "items": [ - {...}, // Cart Item 1 - {...}, // Cart Item 2 - {...} // Cart Item 3 - ], - "selected_shipping_rate": null, - "payment": null, - "billing_address": null, - "shipping_address": null, - } -} -``` - -![Bagisto Cart Update](../../assets/1.x/images/api/bagisto_cart_update.jpg) - -::: - -## Apply coupon - -You can also apply the coupon by using the `checkout/cart/coupon` endpoint. - -- Headers - - | Key | Value | Info | - | ------------- | --------------------- | ------------------------------------ | - | Accept | application/json | | - | Authorization | Bearer `token-string` | Use only when you pass `?token=true` | - -- Request - - `POST /api/checkout/cart/coupon` - -- Params - - ```json - { - "code": "OFFER20" - } - ``` - -### Examples - -Now, let's apply the coupon and check the responses, - -- Headers - - | Key | Value | Info | - | ------------- | --------------------- | ------------------------------------ | - | Accept | application/json | | - | Authorization | Bearer `token-string` | Use only when you pass `?token=true` | - -- Request - - `POST http(s)://example.com/api/checkout/cart/coupon` - -- Params - - ```json - { - "code": "OFFER20" - } - ``` - -::: details Response - -```json -{ - "success": true, - "message": "Coupon code applied successfully." -} -``` - -::: - -## Remove coupon - -For removing the coupon, you just need to hit the `checkout/cart/coupon` endpoint with the `DELETE` method. - -- Headers - - | Key | Value | Info | - | ------------- | --------------------- | ------------------------------------ | - | Accept | application/json | | - | Authorization | Bearer `token-string` | Use only when you pass `?token=true` | - -- Request - - `DELETE /api/checkout/cart/coupon` - -### Examples - -Let's remove the coupon and check the responses, - -- Headers - - | Key | Value | Info | - | ------------- | --------------------- | ------------------------------------ | - | Accept | application/json | | - | Authorization | Bearer `token-string` | Use only when you pass `?token=true` | - -- Request - - `DELETE http(s)://example.com/api/checkout/cart/coupon` - -::: details Response - -```json -{ - "success": true, - "message": "Remove Coupon" -} -``` - -::: - -## Remove specific product from cart - -You can remove any particular product from the cart. To do this task, you have to use the `checkout/cart/remove-item/{cart_item_id}` as request payload in the API URL. This API call will work with both customer's authentication or without customer's authentication. - -- Headers - - | Key | Value | Info | - | ------------- | --------------------- | ------------------------------------ | - | Accept | application/json | | - | Authorization | Bearer `token-string` | Use only when you pass `?token=true` | - -- Request - - `GET /api/checkout/cart/remove-item/{cart_item_id}` - -- Params - - | Name | Info | Type | - | ------------ | -------------- | ------ | - | cart_item_id | Cart item's ID | Number | - -### Examples - -- Request - - `GET http(s)://example.com/api/checkout/cart/remove-item/15` - -::: details Response - -```json -{ - "message": "Cart removed successfully.", - "data": { - "id": 6, - "customer_email": "johndoe@example.com", - "customer_first_name": "John", - "customer_last_name": "Doe", - "shipping_method": null, - "items_count": 2, - "items_qty": "5.0000", - "grand_total": "210.0000", - "sub_total": "210.0000", - "tax_total": "0.0000", - "discount": "0.0000", - "checkout_method": null, - "is_guest": 0, - "items": [ - {...}, - {...} - ], - "selected_shipping_rate": null, - "payment": null, - "billing_address": null, - "shipping_address": null, - } -} -``` - -![bagisto_cart_remove_item](../../assets/1.x/images/api/bagisto_cart_remove_item.jpg){:class="screenshot-dimension center"} - -::: - -## Move product from cart to wishlist - -You can move a product from cart to wishlist. To do this task, you have to use the `checkout/cart/move-to-wishlist/{cart_item_id}` as request payload in the API URL. - -- Headers - - | Key | Value | Info | - | ------------- | --------------------- | ------------------------------------ | - | Accept | application/json | | - | Authorization | Bearer `token-string` | Use only when you pass `?token=true` | - -- Request - - `GET /api/checkout/cart/move-to-wishlist/{cart_item_id}` - -- Params - - | Name | Info | Type | - | ------------ | -------------- | ------ | - | cart_item_id | Cart item's ID | Number | - -### Examples - -- Request - - `http(s)://example.com/api/checkout/cart/move-to-wishlist/16` - -::: details Response: - -```json -{ - "message": "Cart item moved to wishlist successfully.", - "data": { - "id": 1, - "customer_email": "johndoe@example.com", - "customer_first_name": "John", - "customer_last_name": "Doe", - "shipping_method": null, - "items_qty": "1.0000", - "grand_total": "50.0000", - "sub_total": "50.0000", - "tax_total": "0.0000", - "discount": "0.0000", - "checkout_method": null, - "is_guest": 0, - "items": [ - {...} // Remaining Cart Item - ], - "selected_shipping_rate": null, - "payment": null, - "billing_address": null, - "shipping_address": null, - } -} -``` - -![bagisto_move_to_wishlist](../../assets/1.x/images/api/bagisto_move_to_wishlist.jpg) - -::: - -## Save addresses to cart - -At the checkout step, customers can create new addresses or select from the existing addresses for billing & shipping the cart's item. You can achieve this task by using the `checkout/save-address` resource in the API URL. This API will work for both logged-in customers and guest users. - -- Request - - `POST /api/checkout/save-address` - -### Examples - -#### 1. For logged in user, - -- Request - - `POST http(s)://example.com/api/checkout/save-address` - -- Params - - ```json - { - "billing": { - "address1": { - "0": "" - }, - "use_for_shipping": "false", - "first_name": "john", - "last_name": "doe", - "email": "john@gmail.com", - "address_id": 1 - }, - "shipping": { - "address1": { - "0": "" - }, - "first_name": "john", - "last_name": "doe", - "email": "john@gmail.com", - "address_id": 2 - } - } - ``` - -#### 2. For guest user - -- Headers - - | Key | Value | - | ------ | ---------------- | - | Accept | application/json | - -- Request - - `POST http(s)://example.com/api/checkout/save-address` - -- Params - - ```json - { - "billing": { - "address1": { - "0": "H 23" - }, - "use_for_shipping": "true", - "first_name": "john", - "last_name": "doe", - "email": "john@webkul.com", - "city": "noida", - "state": "DL", - "postcode": "110092", - "country": "IN", - "phone": "8802097347" - }, - "shipping": { - "address1": { - "0": "" - } - } - } - ``` - -::: details Response - -```json -{ - "data": { - "rates": [{...},{...}], - "cart": { - "id": 6, - "customer_email": "johndoe@example.com", - "items": [{...}, {...}], - "billing_address": { - "id": 7, - "first_name": "John", - "last_name": "Doe", - "name": "John Doe", - "email": "johndoe@example.com", - "address1": [ - "Block H-ARP Park, Sector 63 " - ], - "country": "IN", - "country_name": "India", - "state": "UP", - "city": "Noida", - "postcode": 201301, - "phone": "0132456789" - }, - "shipping_address": { - "id": 8, - "first_name": "John", - "last_name": "Doe", - "name": "John Doe", - "email": "johndoe@example.com", - "address1": [ - "Block H-ARP Park, Sector 63 " - ], - "country": "IN", - "country_name": "India", - "state": "UP", - "city": "Noida", - "postcode": 201301, - "phone": "0132456789" - } - } - } -} -``` - -![bagisto_save_address](../../assets/1.x/images/api/bagisto_save_address.jpg) - -::: - -## Save shipping method to cart - -After saving the customer's addresses to the cart, you have to select a shipping method to proceed for completing the order. You can achieve this task by using the `checkout/save-shipping` resource in the API URL. The shipping method and changes will apply to the cart through this API call. This API will work for both logged-in customers and guest users. - -- Headers - - | Key | Value | Info | - | ------------- | --------------------- | ------------------------------------ | - | Accept | application/json | | - | Authorization | Bearer `token-string` | Use only when you pass `?token=true` | - -- Request - - `POST /api/checkout/save-shipping` - -- Params - - ```json - { - "shipping_method": "shipping_method_key" - } - ``` - -### Examples - -- Headers - - | Key | Value | Info | - | ------------- | --------------------- | ------------------------------------ | - | Accept | application/json | | - | Authorization | Bearer `token-string` | Use only when you pass `?token=true` | - -- Request - - `POST http(s)://example.com/api/checkout/save-shipping` - -- Params - - ```json - { - "shipping_method": "flatrate_flatrate" - } - ``` - -::: details Response - -```json -{ - "data": { - "methods": [{...},{...}], - "cart": { - "id": 6, - "customer_email": "johndoe@example.com", - "customer_first_name": "John", - "customer_last_name": "Doe", - "shipping_method": "flatrate_flatrate", - "items": [{...}], - "selected_shipping_rate": { - "id": 9, - "carrier": "flatrate", - "carrier_title": "Flat Rate", - "method": "flatrate_flatrate", - "method_title": "Flat Rate", - "method_description": "This is a flat rate", - "price": 20, - }, - "payment": null, - "billing_address": {...}, - "shipping_address": {...} - } - } -} -``` - -![bagisto_save_shipping](../../assets/1.x/images/api/bagisto_save_shipping.jpg) - -::: - -## Save payment method to cart - -After applying the shipping method to the cart, you have to select a payment method to proceed for completing the order. You can achieve this task by using the `checkout/save-payment` resource in the API URL. By using this API payment method will apply to the cart and will work with both logged-in customers and as well as guest users. - -- Headers - - | Key | Value | Info | - | ------------- | --------------------- | ------------------------------------ | - | Accept | application/json | | - | Authorization | Bearer `token-string` | Use only when you pass `?token=true` | - -- Request - - `POST /api/checkout/save-payment` - -- Params - - ```json - { - "payment": { - "method": "payment_method_key" - } - } - ``` - -### Examples - -- Headers - - | Key | Value | Info | - | ------------- | --------------------- | ------------------------------------ | - | Accept | application/json | | - | Authorization | Bearer `token-string` | Use only when you pass `?token=true` | - -- Request - - `POST http(s)://example.com/api/checkout/save-payment` - -- Params - - ```json - { - "payment": { - "method": "cashondelivery" - } - } - ``` - -::: details Response - -```json -{ - "data": { - "cart": { - "id": 6, - "customer_email": "johndoe@example.com", - "customer_first_name": "John", - "customer_last_name": "Doe", - "shipping_method": "flatrate_flatrate", - "items": [{...}], - "selected_shipping_rate": {...}, - "payment": { - "id": 4, - "method": "cashondelivery", - "method_title": "Cash On Delivery" - }, - "billing_address": {...}, - "shipping_address": {...} - } - } -} -``` - -![bagisto_save_payment](../../assets/1.x/images/api/bagisto_save_payment.jpg) - -::: - -## Save Order - -After applying shipping addresses, shipping methods, and payment methods to the cart, now finally you have to create/save the order. You can achieve this task by using the `checkout/save-order` resource in the API URL. By using this API order will be placed and save to the current store and this API will work for both logged-in customers and with guest users. - -- Headers - - | Key | Value | Info | - | ------------- | --------------------- | ------------------------------------ | - | Accept | application/json | | - | Authorization | Bearer `token-string` | Use only when you pass `?token=true` | - -- Request - - `POST /api/checkout/save-order` - -### Examples - -- Headers - - | Key | Value | - | ------ | ---------------- | - | Accept | application/json | - -- Request - - `POST http(s)://example.com/api/checkout/save-order` - -::: details Response - -```json -{ - "success": true, - "order": { - "id": 4, - "status": "pending", - "customer_email": "johndoe@example.com", - "customer_first_name": "John", - "customer_last_name": "Doe", - "shipping_title": "Flat Rate - Flat Rate", - "payment_title": "Cash On Delivery", - "total_qty_ordered": "2.0000", - "grand_total": "120.0000", - "shipping_amount": 20, - "customer": {...}, - "shipping_address": {...}, - "billing_address": {...}, - "items": [{...}], - "invoices": [], - "shipments": [] - } -} -``` - -![bagisto_save_order](../../assets/1.x/images/api/bagisto_save_order.jpg) - -::: diff --git a/docs/1.x/api/categories.md b/docs/1.x/api/categories.md deleted file mode 100644 index e4b1012a..00000000 --- a/docs/1.x/api/categories.md +++ /dev/null @@ -1,363 +0,0 @@ -# Categories - -In this section, we are using the categories' API. We will fetch all the categories based on `id` and `parent_id` as well. - -## Get all categories - -This api request will fetch all the categories. - -- Headers - - | Key | Value | - | ------------- | ---------------- | - | Accept | application/json | - -- Request - - `GET /api/categories(?limit,page,pagination)` - -- Params - - | Name | Info | Type | - | ------------- | -------------------------------------------- | ------ | - | limit | Maximum number of records in each request | Number | - | page | Records for specific page based on the limit | Number | - | pagination | will display all the records if set to `0` | Number | - -::: tip - - If you are using pagination and want to know more info about responses then check the [explanation](./explanation) portion. - -::: - -### Examples - -#### 1. Get categories of the specific page - -- Headers - - | Key | Value | - | ------------- | ---------------- | - | Accept | application/json | - -- Request - - `GET http(s)://example.com/api/categories?page=1` - - ::: tip - - If you didn't use the page (?page=x) filter, then it returns the data of the first page by default. - - `GET http(s)://example.com/api/categories` - - ::: - -::: details Response - - ~~~json - { - "data": [ - { - "id": 3, - "code": null, - "name": "Laptops", - "slug": "laptops", - "display_mode": "products_only", - "description": "", - "meta_title": "Laptops", - "meta_description": "", - "meta_keywords": "", - "status": 1, - "image_url": null, - "additional": null, - "created_at": "2020-09-08T23:41:24.000000Z", - "updated_at": "2020-09-08T23:41:24.000000Z" - }, - {...}, - {...} - ], - "links": { - "first": "https://example.com/api/categories?page=1", - "last": "https://example.com/api/categories?page=1", - "prev": null, - "next": null - }, - "meta": { - "current_page": 1, - "from": 1, - "last_page": 1, - "path": "https://example.com/api/categories", - "per_page": 10, - "to": 3, - "total": 3 - } - } - ~~~ - -::: - -#### 2. Get categories of the specific page with limit - -- Headers - - | Key | Value | - | ------------- | ---------------- | - | Accept | application/json | - -- Request - - `GET http(s)://example.com/api/categories?page=1&limit=10` - -::: details Response - - ~~~json - { - "data": [ - { - "id": 10, - "code": null, - "name": "Lights", - "slug": "lights", - "display_mode": "products_only", - "description": "", - "meta_title": "", - "meta_description": "", - "meta_keywords": "", - "status": 1, - "image_url": null, - "additional": null, - "created_at": "2020-09-24T11:44:42.000000Z", - "updated_at": "2020-09-24T11:44:42.000000Z" - }, - {...}, - {...}, - {...}, - {...} - ], - "links": { - "first": "https://example.com/api/categories?limit=5&page=1", - "last": "https://example.com/api/categories?limit=5&page=2", - "prev": null, - "next": "https://example.com/api/categories?limit=5&page=2" - }, - "meta": { - "current_page": 1, - "from": 1, - "last_page": 2, - "path": "https://example.com/api/categories", - "per_page": "5", - "to": 5, - "total": 10 - } - } - ~~~ - -::: - -#### 3. Get all categories without pagination - -If you don't want to use the pagination and want to access all the store's categories at once, then you have to send a filter parameter named as`pagination` with value `zero`. By doing this you will get all categories objects at once in the data object and this will not give you link and meta objects. - -- Headers - - | Key | Value | - | ------------- | ---------------- | - | Accept | application/json | - -- Request - - `GET http(s)://example.com/api/categories?pagination=0` - -::: details Response - - ~~~json - { - "data": [ - { - "id": 10, - "code": null, - "name": "Lights", - "slug": "lights", - "display_mode": "products_only", - "description": "", - "meta_title": "", - "meta_description": "", - "meta_keywords": "", - "status": 1, - "image_url": null, - "additional": null, - "created_at": "2020-09-24T11:44:42.000000Z", - "updated_at": "2020-09-24T11:44:42.000000Z" - }, - {...}, - {...}, - {...}, - {...}, - {...}, - {...}, - {...}, - {...}, - {...} - ] - } - ~~~ - -::: - -## Get category by id - -For fetching any specific category, you have to provide the category's id as an input parameter. - -- Headers - - | Key | Value | - | ------------- | ---------------- | - | Accept | application/json | - -- Request - - `GET /api/categories/{id}` - -- Params - - | Name | Info | Type | - | ---- | ------------- | ------ | - | id | Category's id | Number | - -### Examples - -#### 1. Let's try to fetch category by id - -- Headers - - | Key | Value | - | ------------- | ---------------- | - | Accept | application/json | - -- Request - - `GET http(s)://example.com/api/categories/6` - -::: details Response - - ~~~json - { - "data": { - "id": 6, - "code": null, - "name": "Kitchen Appliances", - "slug": "kitchen-appliances", - "display_mode": "products_only", - "description": "", - "meta_title": "", - "meta_description": "", - "meta_keywords": "", - "status": 1, - "image_url": null, - "additional": null, - "created_at": "2020-09-24T11:42:17.000000Z", - "updated_at": "2020-09-24T11:42:17.000000Z" - } - } - ~~~ - -::: - -## Get descendant categories of specific category - -This api request will fetch all the descendant categories based on the `parent_id`. - -- Headers - - | Key | Value | - | ------------- | ---------------- | - | Accept | application/json | - -- Request - - `GET /api/descendant-categories(?parent_id)` - -- Params - - | Name | Info | Type | - | --------- | ------------------------------------ | ------ | - | parent_id | Parent id of the descendant category | Number | - -### Examples - -#### 1. Get data based on the `parent_id` which have descendant categories - -- Headers - - | Key | Value | - | ------------- | ---------------- | - | Accept | application/json | - -- Request - - `GET http(s)://example.com/api/descendant-categories?parent_id=2` - -::: details Response - - ~~~json - { - "data": [ - { - "id": 3, - "code": null, - "name": "Bike Accessories", - "slug": "bike-accessories", - "display_mode": "products_only", - "description": "", - "meta_title": "", - "meta_description": "", - "meta_keywords": "", - "status": 1, - "image_url": null, - "additional": null, - "created_at": "2020-09-22T07:16:32.000000Z", - "updated_at": "2020-09-24T13:08:21.000000Z" - }, - { - "id": 11, - "code": null, - "name": "Bike Tyres", - "slug": "bike-tyres", - "display_mode": "products_only", - "description": "", - "meta_title": "", - "meta_description": "", - "meta_keywords": "", - "status": 1, - "image_url": null, - "additional": null, - "created_at": "2020-09-24T13:20:01.000000Z", - "updated_at": "2020-09-24T13:20:01.000000Z" - } - ] - } - ~~~ - -::: - -#### 2. Let's try with `parent_id` which have no descendant categories - -- Headers - - | Key | Value | - | ------------- | ---------------- | - | Accept | application/json | - -- Request - - `GET http(s)://example.com/api/descendant-categories?parent_id=3` - -::: details Response - - ~~~json - { - "data": [] - } - ~~~ - -::: diff --git a/docs/1.x/api/customers.md b/docs/1.x/api/customers.md deleted file mode 100644 index 71c111a1..00000000 --- a/docs/1.x/api/customers.md +++ /dev/null @@ -1,524 +0,0 @@ -# Customers - -In this section, we will use all APIs which relates to customer like registration, authentication, details and reset password. - -Let's start with registration first, - -## Registration - -You can create/register a new customer in the Bagisto store. To achieve this task, you can use the `customer/register` API call resource. - -- Headers - - | Key | Value | - | --------------------- | ---------------- | - | Accept | application/json | - | Content-Type | application/json | - -- Request - - `POST /api/v1/customer/register` - -- Params - - | Name | Info | Type | - | --------------------- | ---------------- | ------ | - | email | Email | String | - | first_name | First Name | String | - | last_name | Last Name | String | - | password | Password | String | - | password_confirmation | Confirm Password | String | - -### Examples - -#### 1. Let's register/create a new customer - -- Headers - - | Key | Value | - | --------------------- | ---------------- | - | Accept | application/json | - | Content-Type | application/json | - -- Request - - `POST http(s)://example.com/api/v1/customer/register` - -- Params - - | Name | Value | - | --------------------- | ------------------------- | - | email | customer@example.com | - | first_name | John | - | last_name | Doe | - | password | customer123 | - | password_confirmation | customer123 | - -::: details Response - - ~~~json - { - message: "Your account has been created successfully." - } - ~~~ - -::: - -#### 2. If customer is already in the Bagisto store with the same email address - -Now, hit the above request one more time. Now, we are going to see the following response. - -::: details Response - - ~~~json - { - "message": "The email has already been taken.", - "errors": { - "email": [ - "The email has already been taken." - ] - } -} - ~~~ - -::: - -## Authentication - -To authenticate any customer at the Bagisto store, the customer needs to have a valid email address and password. - -- Headers - - | Key | Value | - | --------------------- | ---------------- | - | Accept | application/json | - | Content-Type | application/json | - -- Request - - Now here is your choice, whether you want to use **JWT API guard** or normal **customer guard**. - - ::: tip - - If you want to know more about the JWT Authentication, please check here [JWT Authentication](./getting-started-with-the-api#_1-jwt-authentication). - - ::: - - For JWT API guard, you need to pass the token key in the query string. - - `POST /api/customer/login?token=true` - - For normal customer guard, - - `POST /api/customer/login` - -- Params - - | Name | Info | Type | - | ------------- | --------------------- | ------ | - | email | Email for customer | String | - | password | Password for customer | String | - -### Both Examples - -#### 1. Let's try the customer authentication with JWT API guard - -- Headers - - | Key | Value | - | ------ | ---------------- | - | Accept | application/json | - -- Request - - `POST http(s)://example.com/api/customer/login?token=true` - -- Params - - | Key | Value | - | -------- | ---------------- | - | email | john@example.com | - | password | john123 | - -::: details Response - - Once you send the request, you will get some random token string that will be used to access the API data. - - ~~~json - { - "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOlwvXC9sb2NhbGhvc3RcL2RldmVsb3BtZW50XC9iYWdpc3RvLW1hc3RlclwvcHVibGljXC9hcGlcL2N1c3RvbWVyXC9sb2dpbiIsImlhdCI6MTYxMDY5Njk2MSwiZXhwIjoxNjEwNzAwNTYxLCJuYmYiOjE2MTA2OTY5NjEsImp0aSI6IkpuMU9aUWoxd1BVaXlLaHQiLCJzdWIiOjEsInBydiI6IjhmY2EwODhhYmFlMmY5YThmODRhNWYwYmY2YTY1MjQ0OTA1NWJlMDAifQ.6mKgyRgMHxi_W6gf2cgb7Rdcut73L1YEBauYZ8soKSU", - "message": "Logged in successfully.", - "data": { - "id": 1, - "email": "john@example.com", - "first_name": "John", - "last_name": "Doe", - "name": "John Doe", - "gender": null, - "date_of_birth": null, - "phone": null, - "status": 1, - "group": { - "id": 2, - "name": "General", - "created_at": null, - "updated_at": null - }, - "created_at": "2020-09-28T05:13:42.000000Z", - "updated_at": "2020-09-28T05:13:42.000000Z" - } - } - ~~~ - -::: - -#### 2. Let's try without token - -By removing the token key from request will activate the **customer guard**. - -- Headers - - | Key | Value | - | ------ | ---------------- | - | Accept | application/json | - -- Request - - `POST http(s)://example.com/api/customer/login` - -- Params - - | Key | Value | - | -------- | ---------------- | - | email | john@example.com | - | password | john123 | - -::: details Response - - Once you send the request, then you will get data without token because now the **customer guard** is active. - - ~~~json - { - "token": true, - "message": "Logged in successfully.", - "data": { - "id": 1, - "email": "john@example.com", - "first_name": "John", - "last_name": "Doe", - "name": "John Doe", - "gender": null, - "date_of_birth": null, - "phone": null, - "status": 1, - "group": { - "id": 2, - "name": "General", - "created_at": null, - "updated_at": null - }, - "created_at": "2020-09-28T05:13:42.000000Z", - "updated_at": "2020-09-28T05:13:42.000000Z" - } - } - ~~~ - -::: - -## Details - -You can get the customer's details only for the logged-in customer. To retrieve the customer's information you can use the `customer/get` resource. - -- Headers - - | Key | Value | Info | - | ------------- | --------------------- | ------------------------------------ | - | Accept | application/json | | - | Authorization | Bearer `token-string` | Use only when you pass `?token=true` | - -- Request - - `GET /api/customer/get` - -### Examples - -Let's fetch the customer data, - -- Headers - - | Key | Value | Info | - | ------------- | --------------------- | ------------------------------------ | - | Accept | application/json | | - | Authorization | Bearer `token-string` | Use only when you pass `?token=true` | - -- Request - - `GET http(s)://example.com/api/customer/get` - -::: details Response - - ~~~json - { - "data": { - "id": 1, - "email": "john@example.com", - "first_name": "John", - "last_name": "Doe", - "name": "John Doe", - "gender": null, - "date_of_birth": null, - "phone": null, - "status": 1, - "group": { - "id": 2, - "name": "General", - "created_at": null, - "updated_at": null - }, - "created_at": "2020-09-28T05:13:42.000000Z", - "updated_at": "2020-09-28T05:13:42.000000Z" - } - } - ~~~ - -::: - -## Details by id - -You can also get the customer information by using `customer_id` as a request payload. To achieve this, you can use the `customers/{id}` API call resource. - -- Headers - - | Key | Value | Info | - | ------------- | --------------------- | ------------------------------------ | - | Accept | application/json | | - | Authorization | Bearer `token-string` | Use only when you pass `?token=true` | - -- Request - - `GET /api/customers/{id}` - -- Params - - | Name | Info | Type | - | ---- | ----------- | ------ | - | id | Customer ID | Number | - -::: warning - - This request will return the current logged in customer's details. - -::: - -### Examples - -Let's fetch the customer data, - -- Headers - - | Key | Value | Info | - | ------------- | --------------------- | ------------------------------------ | - | Accept | application/json | | - | Authorization | Bearer `token-string` | Use only when you pass `?token=true` | - -- Request - - `GET http(s)://example.com/api/customers/1` - -::: details Response - - ~~~json - { - "data": { - "id": 1, - "email": "john@example.com", - "first_name": "John", - "last_name": "Doe", - "name": "John Doe", - "gender": null, - "date_of_birth": null, - "phone": null, - "status": 1, - "group": { - "id": 2, - "name": "General", - "created_at": null, - "updated_at": null - }, - "created_at": "2020-09-28T05:13:42.000000Z", - "updated_at": "2020-09-28T05:13:42.000000Z" - } - } - ~~~ - -::: - -## Profile details - -To update the current logged in customer's account information, you need to use the `customer/profile` API call resource. - -- Headers - - | Key | Value | Info | - | ------------- | --------------------- | ------------------------------------ | - | Accept | application/json | | - | Authorization | Bearer `token-string` | Use only when you pass `?token=true` | - -- Request - - `PUT /api/customer/profile` - -- Params - - | Name | Info | Type | - | ------------- | ------------- | ------ | - | first_name | First Name | String | - | last_name | Last Name | String | - | gender | Gender | String | - | date_of_birth | Date Of Birth | Date | - | email | E-Mail | String | - | password | Password | String | - -### Examples - -#### 1. Updating current logged in user - -- Headers - - | Key | Value | Info | - | ------------- | --------------------- | ------------------------------------ | - | Accept | application/json | | - | Authorization | Bearer `token-string` | Use only when you pass `?token=true` | - -- Request - - `PUT http(s)://example.com/api/customer/profile` - -- Params - - | Name | Value | - | ---------- | ---------------- | - | first_name | John | - | last_name | Doe | - | name | John Doe | - | email | john@example.com | - -::: details Response - - ~~~json - { - "message": "Your account has been updated successfully.", - "data": {...} - } - ~~~ - -::: - -## Logout - -You can logout the customer from the Bagisto store with the help of `customer/logout` resources. No need to provide any request payload in the API call. - -- Headers - - | Key | Value | Info | - | ------------- | --------------------- | ------------------------------------ | - | Accept | application/json | | - | Authorization | Bearer `token-string` | Use only when you pass `?token=true` | - -- Request - - `GET /api/customer/logout` - -### Examples - -- Request - - `GET http(s)://example.com/api/customer/logout` - -::: details Response - - ~~~json - { - "message": "Logged out successfully!" - } - ~~~ - -::: - -## Reset password - -You can also use the API to reset the customer's password by providing the valid customer's email address. In this API request, you have to use the `customer/forgot-password` resource with `email` as a request payload. An email will be sent on the provided email address, only if the same email address exists in the Bagisto store. - -- Headers - - | Key | Value | - | ------------- | --------------------- | - | Accept | application/json | - -- Request - - `POST /api/customer/forgot-password` - -- Params - - | Name | Info | Type | - | ------------- | ----- | ------ | - | email | Email | String | - -### Examples - -#### 1. Let's try the customer forgot password request - -- Headers - - | Key | Value | - | ------------- | --------------------- | - | Accept | application/json | - -- Request - - `GET http(s)://example.com/api/customer/forgot-password` - -- Params - - | Name | Value | - | ----- | ---------------- | - | email | john@example.com | - -::: details Response - - ~~~json - { - "message": "We have e-mailed your password reset link!" - } - ~~~ - -::: - -#### 2. In case you provide an invalid or unregistered email address, then no email will be sent to the provided email address - -- Headers - - | Key | Value | - | ------------- | --------------------- | - | Accept | application/json | - -- Request - - `GET http(s)://example.com/api/customer/forgot-password` - -- Params - - | Name | Value | - | ----- | ----------------- | - | email | peter@example.com | - -::: details Response - - ~~~json - { - "error": "We can't find a user with that e-mail address." - } - ~~~ - -::: diff --git a/docs/1.x/api/explanation.md b/docs/1.x/api/explanation.md deleted file mode 100644 index 2a3fd87f..00000000 --- a/docs/1.x/api/explanation.md +++ /dev/null @@ -1,63 +0,0 @@ -# Explanation - -If you check all the sections in which we have used pagination, in all the responses, you will find that there are three objects key i.e. `data`, `links`, and `meta`. In this section, we will explain all the three keys. - -Let's take an example of the categories section, we have some response in which we got these three keys. - -~~~json -{ - "data": [{...},{...},...,{...}], - "links": {...}, - "meta": {...} -} -~~~ - -## 1. Data Object `data` - -In the data object key, you will find the collection of many objects which represent the Bagisto store's categories. - -## 2. Links Object `links` - -In the links object, you will find four more object keys, which will be used according to pagination, - - ~~~json - "links": { - "first": "https://example.com/api/categories?limit=5&pagination=342234&page=1", - "last": "https://example.com/api/categories?limit=5&pagination=342234&page=2", - "prev": null, - "next": "https://example.com/api/categories?limit=5&pagination=342234&page=2" - } - ~~~ - - | Name | Info | - | ------------- | ------------------------------------------------------------------------------------------------------------------- | - | first | Display the first url link of the called API with filter variable. | - | last | Display the last url link of the called API with filter variable. | - | prev | Display the previous url of the current called API url. | - | next | Display the next url of the current called API url. If no next url available then it will contain the `null` value. | - -## 3. Meta Object `meta` - -`meta` object will only used with pagination. Under meta object, you will find seven object keys, - - ~~~json - "meta": { - "current_page": 1, - "from": 1, - "last_page": 2, - "path": "https://example.com/api/categories", - "per_page": "5", - "to": 5, - "total": 10 - } - ~~~ - - | Name | Info | - | ------------- | -------------------------------------------------------------------------------------------------- | - | current_page | Display the current page number. | - | from | Display the first count of the returned data object based on the provided page and limit filters. | - | last_page | Display the last page number. | - | path | Display the current api url without input parameters. | - | per_page | Display the total of records in a single page. | - | to | Display the last count of the returned data object based on the provided page and limit filters. | - | total | Display the total number of records in the store. | \ No newline at end of file diff --git a/docs/1.x/api/getting-started-with-the-api.md b/docs/1.x/api/getting-started-with-the-api.md deleted file mode 100644 index d3925186..00000000 --- a/docs/1.x/api/getting-started-with-the-api.md +++ /dev/null @@ -1,200 +0,0 @@ -# Authentication - -[[toc]] - -## Introduction - -By default the [Bagisto](https://bagisto.com) API makes use of the [JWT package](https://jwt.io/) for token-based authentication. -You can however choose either if you want to authenticate via. **JWT API guard** or with the normal **customer guard**. -When you are going through the api documentation, you will see one of the examples i.e. with or without tokens. Let discuss both of them. - -## Auth Guards - -::: warning -You are required to send a valid **User Agent** header in your request. -::: - -### JWT Authentication - -To activate the **JWT** authentication, you just need to pass one extra key-value pair in your request i.e. `token=true`. - - | Key | Value | - | ----- | ----- | - | token | true | - -This will tell the Bagisto api to use the **JWT API guard**. If you are not passing this, the normal **customer guard** will be activated. - -So, let's try to authenticate the user by using **JWT**. Please send valid **User Agent** header in your request whether you are using postman, curl or some other clients. - -::: tip Reminder - - Here we are showing just a sample of API for the usage of **JWT** token. If you are familiar with all these things you can start with the [Customer](./customers) API section. - -::: - -- Headers - - | Key | Value | - | ------ | ---------------- | - | Accept | application/json | - -- Request - - `POST http(s)://example.com/api/customer/login?token=true` - -- Params - - | Key | Value | - | -------- | ---------------- | - | email | john@example.com | - | password | john123 | - -- Response - - - Once you send the request, you will get some random token string that will be used to access the API data. - - ~~~json - { - "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOlwvXC9sb2NhbGhvc3RcL2RldmVsb3BtZW50XC9iYWdpc3RvLW1hc3RlclwvcHVibGljXC9hcGlcL2N1c3RvbWVyXC9sb2dpbiIsImlhdCI6MTYxMDY5Njk2MSwiZXhwIjoxNjEwNzAwNTYxLCJuYmYiOjE2MTA2OTY5NjEsImp0aSI6IkpuMU9aUWoxd1BVaXlLaHQiLCJzdWIiOjEsInBydiI6IjhmY2EwODhhYmFlMmY5YThmODRhNWYwYmY2YTY1MjQ0OTA1NWJlMDAifQ.6mKgyRgMHxi_W6gf2cgb7Rdcut73L1YEBauYZ8soKSU", - "message": "Logged in successfully.", - "data": { - "id": 1, - "email": "john@example.com", - "first_name": "John", - "last_name": "Doe", - "name": "John Doe", - "gender": null, - "date_of_birth": null, - "phone": null, - "status": 1, - "group": { - "id": 2, - "name": "General", - "created_at": null, - "updated_at": null - }, - "created_at": "2020-09-28T05:13:42.000000Z", - "updated_at": "2020-09-28T05:13:42.000000Z" - } - } - ~~~ - -### Customer Guard - -By removing the token key from your request the **customer guard** will be activated. - -#### Headers - - | Key | Value | - | ------ | ---------------- | - | Accept | application/json | - -- Request - - `POST http(s)://example.com/api/customer/login` - -#### Params - - | Key | Value | - | -------- | ---------------- | - | email | john@example.com | - | password | john123 | - -#### Response - -Once you send the request, you will get data without any token because now the **customer guard** is active. - -~~~json -{ - "token": true, - "message": "Logged in successfully.", - "data": { - "id": 1, - "email": "john@example.com", - "first_name": "John", - "last_name": "Doe", - "name": "John Doe", - "gender": null, - "date_of_birth": null, - "phone": null, - "status": 1, - "group": { - "id": 2, - "name": "General", - "created_at": null, - "updated_at": null - }, - "created_at": "2020-09-28T05:13:42.000000Z", - "updated_at": "2020-09-28T05:13:42.000000Z" - } -} -~~~ - -## Accessing Data - -Once you are authenticated, try to access the current customer data by using **JWT**, use the customer API endpoint for this, - -::: tip - -Here we are just showing a example of how to collect data from the API with the usage of a **JWT** token. -If you are familiar with all these things you can start with the [Customer](./customers) API section. - -::: - -#### Headers - - | Key | Value | - | ------------- | --------------------- | - | Accept | application/json | - | Authorization | Bearer `token-string` | - -::: tip - -As you check the **JWT** authentication we got some token string, we just need to put that token in the request header. For e.g., - -~~~request-header - Accept:application/json - Authorization:Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9... -~~~ - -::: - -#### Request - - `GET http(s)://example.com/api/customer/get?token=true` - -::: details Response - -~~~json -{ - "data": { - "id": 1, - "email": "john@example.com", - "first_name": "John", - "last_name": "Doe", - "name": "John Doe", - "gender": null, - "date_of_birth": null, - "phone": null, - "status": 1, - "group": { - "id": 2, - "name": "General", - "created_at": null, - "updated_at": null - }, - "created_at": "2020-09-28T05:13:42.000000Z", - "updated_at": "2020-09-28T05:13:42.000000Z" - } -} -~~~ - -::: - -If you don't want to use **JWT**, then just remove the token key from the query string. - -::: warning - - You have to re-login again to access without the **JWT** token because currently it will use the **customer guard**. - -::: diff --git a/docs/1.x/api/invoices.md b/docs/1.x/api/invoices.md deleted file mode 100644 index fe4d0828..00000000 --- a/docs/1.x/api/invoices.md +++ /dev/null @@ -1,258 +0,0 @@ -# Invoices - -In this section, we will check all the invoices' API. - -## Get invoices from all orders - -You can get all the invoices for the Bagisto store's orders. To get the invoices of the store, the customer must be logged-in to the Bagisto store. You can achieve this job by using the `invoices` API call resource. - -- Headers - - | Key | Value | Info | - | ------------- | --------------------- | ------------------------------------ | - | Accept | application/json | | - | Authorization | Bearer `token-string` | Use only when you pass `?token=true` | - -- Request - - `GET /api/invoices(?limit,page,pagination)` - -- Params - - | Name | Info | Type | - | ------------- | -------------------------------------------- | ------ | - | limit | Maximum number of records in each request | Number | - | page | Records for specific page based on the limit | Number | - | pagination | Will display all the records if set to `0` | Number | - -::: tip - - If you are using pagination and want to know more info about responses then check the [explanation](./explanation) portion. - -::: - -### Examples - -#### 1. Get invoices with pagination - -- Headers - - | Key | Value | Info | - | ------------- | --------------------- | ------------------------------------ | - | Accept | application/json | | - | Authorization | Bearer `token-string` | Use only when you pass `?token=true` | - -- Request - - `GET http(s)://example.com/api/invoices?page=1` - - ::: tip - - If you didn't use the page (?page=x) filter, then it returns the data of the first page by default. - - `GET http(s)://example.com/api/invoices` - - ::: - -::: details Response - - ~~~json - { - "data": [ - { - "id": 8, - "state": "paid", - "email_sent": 0, - "total_qty": 4, - "sub_total": "190.0000", - "base_sub_total": "190.0000", - "grand_total": "230.0000", - "order_address": {...}, - "transaction_id": null, - "items": [ - {...}, - {...} - ], - }, - {...}, - ... - {...} - ], - "links": { - "first": "https://example.com/api/invoices?page=1", - "last": "https://example.com/api/invoices?page=1", - "prev": null, - "next": null - }, - "meta": {...} - } - ~~~ - -::: - -#### 2. Get all invoices without pagination - -- Headers - - | Key | Value | Info | - | ------------- | --------------------- | ------------------------------------ | - | Accept | application/json | | - | Authorization | Bearer `token-string` | Use only when you pass `?token=true` | - -- Request - - `GET http(s)://example.com/api/invoices?pagination=0` - -::: details Response - - ~~~json - { - "data": [ - { - "id": 8, - "state": "paid", - "email_sent": 0, - "total_qty": 4, - "sub_total": "190.0000", - "base_sub_total": "190.0000", - "grand_total": "230.0000", - "order_address": {...}, - "transaction_id": null, - "items": [ - {...}, - {...} - ], - }, - {...}, - ... - {...} - ] - } - ~~~ - -::: - -## Get invoices by order's id - -To get the details of a specific order's invoice, you have to pass an `order_id` as a query parameter like `invoices?order_id={id}` in API URL. By using this resource and query parameter, you will get only a single invoice detail regarding the provided `order_id` in response. - -- Headers - - | Key | Value | Info | - | ------------- | --------------------- | ------------------------------------ | - | Accept | application/json | | - | Authorization | Bearer `token-string` | Use only when you pass `?token=true` | - -- Request - - `GET /api/invoices(?order_id,limit,page,pagination)` - -- Params - - | Name | Info | Type | - | ------------- | -------------------------------------------- | ------ | - | order_id | Order's ID | Number | - | limit | Maximum number of records in each request | Number | - | page | Records for specific page based on the limit | Number | - | pagination | Will display all the records if set to `0` | Number | - -### Examples - -#### 1. Get all invoices by order's id - -- Headers - - | Key | Value | Info | - | ------------- | --------------------- | ------------------------------------ | - | Accept | application/json | | - | Authorization | Bearer `token-string` | Use only when you pass `?token=true` | - -- Request - - `GET http(s)://example.com/api/invoices?order_id=3&pagination=0` - -::: details Response - - ~~~json - { - "data": [ - { - "id": 1, - "state": "paid", - "email_sent": 0, - "total_qty": 2, - "sub_total": "60.0000", - "grand_total": "80.0000", - "shipping_amount": "20.0000", - "items": [ - {...}, - {...} - ], - } - ] - } - ~~~ - -::: - -## Get invoice by id - -To get the details of a specific invoice, you have to pass an `invoice_id` as a request payload in API URL. - -- Headers - - | Key | Value | Info | - | ------------- | --------------------- | ------------------------------------ | - | Accept | application/json | | - | Authorization | Bearer `token-string` | Use only when you pass `?token=true` | - -- Request - - `GET /api/invoices/{invoice_id}` - -- Params - - | Name | Info | Type | - | ------------- | ------------ | ------ | - | invoice_id | Invoice's ID | Number | - -### Examples - -#### 1. Let's fetch specific invoice - -- Headers - - | Key | Value | Info | - | ------------- | --------------------- | ------------------------------------ | - | Accept | application/json | | - | Authorization | Bearer `token-string` | Use only when you pass `?token=true` | - -- Request - - `GET http(s)://example.com/api/invoices/2` - -::: details Response - - ~~~json - { - "data": { - "id": 2, - "state": "paid", - "email_sent": 0, - "total_qty": 4, - "sub_total": "190.0000", - "grand_total": "230.0000", - "shipping_amount": "40.0000", - "tax_amount": "0.0000", - "discount_amount": "0.0000", - "order_address": {...}, - "transaction_id": null, - "items": [ - {...}, - {...} - ], - } - } - ~~~ - -::: diff --git a/docs/1.x/api/locales.md b/docs/1.x/api/locales.md deleted file mode 100644 index 4094cf72..00000000 --- a/docs/1.x/api/locales.md +++ /dev/null @@ -1,227 +0,0 @@ -# Locales - -In this section, we will see all the APIs which are related to locales. - -## Get all locales - -You can get all the locales from the Bagisto store. You can achieve this job by using the `locales` API call resource. - -- Headers - - | Key | Value | - | ------------- | ---------------- | - | Accept | application/json | - -- Request - - `GET /api/locales(?limit,page,pagination)` - -- Params - - | Name | Info | Type | - | ---------- | -------------------------------------------- | ------ | - | limit | Maximum number of records in each request | Number | - | page | Records for specific page based on the limit | Number | - | pagination | Will display all the records if set to `0` | Number | - -::: tip - - If you are using pagination and want to know more info about responses then check the [explanation](./explanation) portion. - -::: - -### Examples - -#### 1. Records for specific page - -- Headers - - | Key | Value | - | ------------- | ---------------- | - | Accept | application/json | - -- Request - - `GET http(s)://example.com/api/locales?page=1` - - ::: tip - - If you didn't use the page (?page=x) filter, then it returns the data of the first page by default. - - `GET http(s)://example.com/api/locales` - - ::: - -::: details Response - -~~~json -{ - "data": [ - { - "id": 4, - "code": "tr", - "name": "Türkçe", - "created_at": null, - "updated_at": null - }, - { - "id": 3, - "code": "nl", - "name": "Dutch", - "created_at": null, - "updated_at": null - }, - { - "id": 2, - "code": "fr", - "name": "French", - "created_at": null, - "updated_at": null - }, - { - "id": 1, - "code": "en", - "name": "English", - "created_at": null, - "updated_at": null - } - ], - "links": { - "first": "https://example.com/api/locales?page=1", - "last": "https://example.com/api/locales?page=1", - "prev": null, - "next": null - }, - "meta": { - "current_page": 1, - "from": 1, - "last_page": 1, - "links": [ - { - "url": null, - "label": "« Previous", - "active": false - }, - { - "url": "https://example.com/api/locales?page=1", - "label": "1", - "active": true - }, - { - "url": null, - "label": "Next »", - "active": false - } - ], - "path": "https://example.com/api/locales", - "per_page": 10, - "to": 4, - "total": 4 - } -} -~~~ - -::: - -#### 2. Get all locales without pagination - -You can also get all the locales at once from the Bagisto store without pagination. For this, you have to pass `pagination=0` in the query parameter with the `locales` resource in the API URL. - -- Headers - - | Key | Value | - | ------------- | ---------------- | - | Accept | application/json | - -- Request - - `GET http(s)://example.com/public/api/locales?pagination=0` - -::: details Response - -~~~json -{ - "data": [ - { - "id": 4, - "code": "tr", - "name": "Türkçe", - "created_at": null, - "updated_at": null - }, - { - "id": 3, - "code": "nl", - "name": "Dutch", - "created_at": null, - "updated_at": null - }, - { - "id": 2, - "code": "fr", - "name": "French", - "created_at": null, - "updated_at": null - }, - { - "id": 1, - "code": "en", - "name": "English", - "created_at": null, - "updated_at": null - } - ] -} -~~~ - -::: - -## Get locale by id - -To get the specific locale details, you have to pass an `locale_id` as a request payload in the API URL. - -- Headers - - | Key | Value | - | ------------- | ---------------- | - | Accept | application/json | - -- Request - - `GET /api/locales/{locale_id}` - -- Params - - | Name | Info | Type | - | --------- | ----------- | ------ | - | locale_id | Locale's ID | Number | - -### Examples - -Let's fetch specific locale, - -- Headers - - | Key | Value | - | ------------- | ---------------- | - | Accept | application/json | - -- Request - - `GET http(s)://example.com/api/locales/1` - -::: details Response - -~~~json -{ - "data": { - "id": 1, - "code": "en", - "name": "English", - "created_at": null, - "updated_at": null - } -} -~~~ - -::: diff --git a/docs/1.x/api/orders.md b/docs/1.x/api/orders.md deleted file mode 100644 index 37766893..00000000 --- a/docs/1.x/api/orders.md +++ /dev/null @@ -1,355 +0,0 @@ -# Orders - -In this section, we will see all the APIs which are related to order. As after order placement tracking of order is also important. - -## Get all orders - -You can get all the orders of the Bagisto store. To get the orders of the store, the customer must be logged in to the Bagisto Store. You can achieve this job by using `orders` API call resource. - -- Headers - - | Key | Value | Info | - | ------------- | --------------------- | ------------------------------------ | - | Accept | application/json | | - | Authorization | Bearer `token-string` | Use only when you pass `?token=true` | - -- Request - - `GET /api/orders(?limit,page,pagination)` - -- Params - - | Name | Info | Type | - | ---------- | -------------------------------------------- | ------ | - | limit | Maximum number of records in each request | Number | - | page | Records for specific page based on the limit | Number | - | pagination | Will display all the records if set to `0` | Number | - -::: tip - -If you are using pagination and want to know more info about responses then check the [explanation](./explanation) portion. - -::: - -### Examples - -#### 1. Records for specific page - -- Headers - - | Key | Value | Info | - | ------------- | --------------------- | ------------------------------------ | - | Accept | application/json | | - | Authorization | Bearer `token-string` | Use only when you pass `?token=true` | - -- Request - - `GET http(s)://example.com/api/orders?page=1` - - ::: tip - - If you didn't use the page (?page=x) filter, then it returns the data of the first page by default. - - `GET http(s)://example.com/api/orders` - - ::: - -::: details Response - -```json -{ - "data": [ - {...}, - {...}, - ... - {...} - ], - "links": { - "first": "https://example.com/api/orders?page=1", - "last": "https://example.com/api/orders?page=2", - "prev": null, - "next": "https://example.com/api/orders?page=2" - }, - "meta": { - "current_page": 1, - "from": 1, - "last_page": 2, - "path": "https://example.com/api/orders", - "per_page": 10, - "to": 10, - "total": 11 - } -} -``` - -::: - -#### 2. Records for specific page with limit - -- Headers - - | Key | Value | Info | - | ------------- | --------------------- | ------------------------------------ | - | Accept | application/json | | - | Authorization | Bearer `token-string` | Use only when you pass `?token=true` | - -- Request - - `GET http(s)://example.com/public/api/orders?limit=5&page=2` - -::: details Response - -```json -{ - "data": [ - {...}, - {...}, - {...}, - {...}, - {...} - ] - "links": { - "first": "https://example.com/api/orders?limit=5&page=1", - "last": "https://example.com/api/orders?limit=5&page=3", - "prev": "https://example.com/api/orders?limit=5&page=1", - "next": "https://example.com/api/orders?limit=5&page=3" - }, - "meta": { - "current_page": 2, - "from": 6, - "last_page": 3, - "path": "https://example.com/api/orders", - "per_page": "5", - "to": 10, - "total": 11 - } -} -``` - -::: - -#### 3. Get all orders without pagination, - -You can also get all the orders at once from the Bagisto store without pagination. To get the orders, the customer must be logged in to the Bagisto store. For this, you have to pass `pagination=0` in the query parameter with the `orders` resource in the API URL. - -- Headers - - | Key | Value | Info | - | ------------- | --------------------- | ------------------------------------ | - | Accept | application/json | | - | Authorization | Bearer `token-string` | Use only when you pass `?token=true` | - -- Request - - `GET http(s)://example.com/public/api/orders?pagination=0` - -::: details Response - -```json -{ - "data": [ - {...}, - {...}, - {...}, - ... - {...} - ] -} -``` - -![bagisto_orders_no_pag](../../assets/1.x/images/api/bagisto_orders_no_pag.jpg){:class="screenshot-dimension center"} - -::: - -## Get order by id - -To get the specific order details, you have to pass an `order_id` as a request payload in the API URL. - -- Headers - - | Key | Value | Info | - | ------------- | --------------------- | ------------------------------------ | - | Accept | application/json | | - | Authorization | Bearer `token-string` | Use only when you pass `?token=true` | - -- Request - - `GET /api/orders/{order_id}` - -- Params - - | Name | Info | Type | - | -------- | ---------- | ------ | - | order_id | Order's ID | Number | - -### Examples - -Let's fetch specific order, - -- Headers - - | Key | Value | Info | - | ------------- | --------------------- | ------------------------------------ | - | Accept | application/json | | - | Authorization | Bearer `token-string` | Use only when you pass `?token=true` | - -- Request - - `GET http(s)://example.com/api/order/3` - -::: details Response - -```json -{ - "data": { - "id": 3, - "status": "pending", - "status_label": "Pending", - "channel_name": "Default", - "customer_email": "peterdoe@example.com", - "customer_first_name": "Peter", - "customer_last_name": "Doe", - "shipping_method": "flatrate_flatrate", - "shipping_title": "Flat Rate - Flat Rate", - "payment_title": "Cash On Delivery", - "total_qty_ordered": 2, - "grand_total": "80.0000", - "customer": {...}, - "shipping_address": {...}, - "billing_address": {...}, - "items": [ - {...}, - {...} - ], - "invoices": [], - "shipments": [], - } - } -} -``` - -![bagisto_orders_id](../../assets/1.x/images/api/bagisto_orders_id.jpg) - -::: - -## Get orders by customer's id - -To get all the orders of a specific customer, you have to pass a `customer_id` as a query parameter like `orders?customer_id={id}` in API URL. To use this API call customer authentication is required means that customers must be logged-in to the store. - -- Headers - - | Key | Value | Info | - | ------------- | --------------------- | ------------------------------------ | - | Accept | application/json | | - | Authorization | Bearer `token-string` | Use only when you pass `?token=true` | - -- Request - - `GET http(s)://example.com/public/api/orders(?customer_id,limit,page,pagination)` - -- Params - - | Name | Info | Type | - | ----------- | -------------------------------------------- | ------ | - | customer_id | Cutomer's ID | Number | - | limit | Maximum number of records in each request | Number | - | page | Records for specific page based on the limit | Number | - | pagination | Will display all the records if set to `0` | Number | - -### Examples - -#### 1. To get all the results without pagination - -- Headers - - | Key | Value | Info | - | ------------- | --------------------- | ------------------------------------ | - | Accept | application/json | | - | Authorization | Bearer `token-string` | Use only when you pass `?token=true` | - -- Request - - `GET http(s)://example.com/public/api/orders?customer_id=2&pagination=0` - -::: details Response - -```json -{ - "data": [ - { - "id": 3, - "status": "pending", - "customer_email": "peterdoe@webkul.com", - "customer_first_name": "Peter", - "customer_last_name": "Doe", - "shipping_method": "flatrate_flatrate", - "shipping_title": "Flat Rate - Flat Rate", - "payment_title": "Cash On Delivery", - "total_qty_ordered": 2, - "grand_total": "80.0000", - "customer": {...}, - "shipping_address": {...}, - "billing_address": {...}, - "items": [{...},{...},{...}], - }, - { - "id": 2, - "status": "pending", - "customer_email": "peterdoe@webkul.com", - "customer_first_name": "Peter", - "customer_last_name": "Doe", - "shipping_method": "flatrate_flatrate", - "shipping_title": "Flat Rate - Flat Rate", - "payment_title": "Cash On Delivery", - "total_qty_ordered": 5, - "grand_total": "400.0000", - "customer": {...}, - "shipping_address": {...}, - "billing_address": {...}, - "items": [{...},{...},{...}], - } - ] -} -``` - -::: - -#### 2. Get all orders by customer's id with pagination - -- Headers - - | Key | Value | Info | - | ------------- | --------------------- | ------------------------------------ | - | Accept | application/json | | - | Authorization | Bearer `token-string` | Use only when you pass `?token=true` | - -- Request - - `GET http(s)://example.com/api/orders?customer_id=2&limit=5&page=1` - -::: details Response - -```json -{ - "data": [ - {...} - ], - "links": { - "first": "https://example.com/api/orders?customer_id=2&limit=1&page=1", - "last": "https://example.com/api/orders?customer_id=2&limit=1&page=1", - "prev": "https://example.com/api/orders?customer_id=2&limit=1&page=1", - "next": null - }, - "meta": { - "current_page": 2, - "from": 2, - "last_page": 2, - "path": "https://example.com/api/orders", - "per_page": "1", - "to": 2, - "total": 2 - } -} -``` - -::: diff --git a/docs/1.x/api/products.md b/docs/1.x/api/products.md deleted file mode 100644 index 21cb91f2..00000000 --- a/docs/1.x/api/products.md +++ /dev/null @@ -1,506 +0,0 @@ -# Products - -In this section, we will use the product's API. We will start with the fetching of all products. Then we will move forward to query params and filterable query params. In last, we will check the additional and variant information. - -## Get all products - -This request will fetch all the products based on `limit` and `page`. - -- Headers - - | Key | Value | - | ------ | ---------------- | - | Accept | application/json | - -- Request - - `/api/products(?limit,page)` - - ::: tip - - If you didn't use the page(?page=x) filter, then it returns the data of the first page by default. - - ::: - -- Params - - | Name | Info | Type | - | ----- | -------------------------------------------- | ------ | - | limit | Maximum number of records in each request | Number | - | page | Records for specific page based on the limit | Number | - -::: tip - -If you are using pagination and want to know more info about responses then check the [explanation](./explanation) portion. - -::: - -### Examples - -#### 1. Get products for specific page - -- Headers - - | Key | Value | - | ------ | ---------------- | - | Accept | application/json | - -- Request - - `http(s)://example.com/api/products?page=1` - -::: details Response - -```json -{ - "data": [ - { - "id": 3, - "type": "simple", - "name": "Lenovo IdeaPad Yoga 500 15 Hybrid (2-in-1) White", - "url_key": "lenovo-ideapad-yoga-500-15-hybrid-2-in-1-white", - "price": "600.0000", - "formated_price": "$600.00", - ... - "sku": "5626", - "images": [ - {...} - ], - "base_image": {...}, - "variants": [], - "in_stock": true, - "reviews": {...}, - "is_saved": false, - "created_at": "2020-09-09 03:31:47", - "updated_at": "2020-09-09 03:31:47" - }, - {...}, - {...} - ], - "links": {...}, - "meta": {...} -} -``` - -::: - -#### 2. Get products for specific page with limit - -- Headers - - | Key | Value | - | ------ | ---------------- | - | Accept | application/json | - -- Request - - `http(s)://example.com/api/products?limit=2&page=1` - -::: details Response - -```json -{ - "data": [ - {...}, - {...} - ], - "links": { - "first": "https://example.com/api/products?page=1&limit=2", - "last": "https://example.com/api/products?page=4&limit=2", - "prev": null, - "next": "https://example.com/api/products?page=2&limit=2" - }, - "meta": { - "current_page": 1, - "from": 1, - "last_page": 4, - "path": "https://example.com/api/products", - "per_page": "2", // limit - "to": 2, - "total": 8 - } -} -``` - -::: - -## Get products with query parameters - -- Headers - - | Key | Value | - | ------ | ---------------- | - | Accept | application/json | - -- Request - - `GET /api/products(?category_id,new,featured,name,sku,url_key,limit,page)` - -- Params - - | Name | Info | Type | - | ----------- | ---------------- | ------- | - | category_id | Category's ID | Number | - | new | New Product | Boolean | - | featured | Featured Product | Boolean | - | name | Name | String | - | sku | SKU | String | - | url_key | URL Key | String | - | limit | Limit | Number | - | page | Page | Number | - -### Examples - -#### 1. If you want to get the store's products those are having new condition then you can use `new=1` in the query parameter and if want to get the products without new condition then use `new=0` - -- Headers - - | Key | Value | - | ------ | ---------------- | - | Accept | application/json | - -- Request - - `GET http(s)://example.com/api/products?new=1` - -#### 2. You can also use the `limit` and `page` query parameters with the `new` query parameter - -- Headers - - | Key | Value | - | ------ | ---------------- | - | Accept | application/json | - -- Request - - `GET http(s)://example.com/api/products?new=1&limit=5&page=1` - - `GET http(s)://example.com/api/products?new=0&limit=5&page=1` - -#### 3. If you want to get the store's products those are featured then you can use `featured=1` query parameter - -- Headers - - | Key | Value | - | ------ | ---------------- | - | Accept | application/json | - -- Request - - `GET http(s)://example.com/api/products?featured=1` - -#### 4. You can also use the `limit` and `page` in query parameters with `featured` query parameter - -- Headers - - | Key | Value | - | ------ | ---------------- | - | Accept | application/json | - -- Request - - `GET http(s)://example.com/api/products?featured=1&limit=5&page=1` - - `GET http(s)://example.com/api/products?featured=0&limit=5&page=1` - -#### 5. Suppose you want to find out the data of your product in the Bagisto store, here you can use the `name` query parameter. You have to provide the product name to the `name` query parameter in the API URL - -- Headers - - | Key | Value | - | ------ | ---------------- | - | Accept | application/json | - -- Request - - `GET http(s)://example.com/api/products?name='Leather Shoes'` - -#### 6. You can also get your product-related details with the help of the product's SKU. SKU will be unique for each product in the Bagisto store. For this, you have to use `sku` as a query parameter in the API URL - -- Headers - - | Key | Value | - | ------ | ---------------- | - | Accept | application/json | - -- Request - - `GET http(s)://example.com/api/products?sku='1234'` - -#### 7. `url_key` is a unique field for every product in Bagisto Store. You can also find out product details by using `url_key`. For this, you have to pass `url_key` as a query parameter in the API URL - -- Headers - - | Key | Value | - | ------ | ---------------- | - | Accept | application/json | - -- Request - - `GET http(s)://example.com/api/products?url_key='leather-shoes'` - -## Get products with filterable query parameters - -You can also filter your store products by using filterable attributes query parameters. These filters will only work with the `category_id` input query parameter. There are two system-defined filterable attributes in the Bagisto E-commerce framework i.e. `size` and `color`. Admin user can also create their own custom attribute and can make these custom attributes as filterable. By using these filterable attributes, customers can filter the category's products to get the desired result. - -- Headers - - | Key | Value | - | ------ | ---------------- | - | Accept | application/json | - -- Request - - `GET http(s)://example.com/api/products(?category_id,size,color,price)` - -- Params - - | Name | Info | Type | - | ----------- | ------------- | ------ | - | category_id | Category's ID | Number | - | size | Size | String | - | color | Color | String | - | price | Price | String | - -### Examples - -#### 1. You can filter Bagisto's product catalog with the help of `size` filter. `size` filter will work only on the category layout. You can pass the multiple attribute's values to the `size` filterable attributes as a query parameter in API url. Suppose you want to filter men's T-Shirt with medium and large size, then you can pass the id of both medium & large - -- Headers - - | Key | Value | - | ------ | ---------------- | - | Accept | application/json | - -- Request - - `GET http(s)://example.com/api/products?category_id=2&size=6,7` - -#### 2. You can also use the limit and page in query parameters with category & size filterable parameters - -- Headers - - | Key | Value | - | ------ | ---------------- | - | Accept | application/json | - -- Request - - `GET http(s)://example.com/api/products?category_id=2&size=6,7&limit=10&page=1` - - ![Bagisto Product Size](../../assets/1.x/images/api/bagisto_prod_size.jpg) - -#### 3. You can also filter the Bagisto product catalog with the help of `color` filter. `color` filter will work only on the category layout. You can pass the multiple attribute's values to the color`s filterable attributes as a query parameter in API URL. Suppose you want to filter men's T-Shirt with white and red color, then you can pass the id of both white & red - -- Headers - - | Key | Value | - | ------ | ---------------- | - | Accept | application/json | - -- Request - - `GET http(s)://example.com/api/products?category_id=2&color=1,2` - -#### 4. You can also use the limit and page in query parameters with category & color filterable parameters - -- Headers - - | Key | Value | - | ------ | ---------------- | - | Accept | application/json | - -- Request - - `GET http(s)://example.com/api/products?category_id=2&color=1,2&limit=10&page=1` - - ![Bagisto Product Color](../../assets/1.x/images/api/bagisto_prod_color.jpg) - -#### 5. In the case of a simple product, You can set a range of a minimum price and maximum price. Same as `size` and `color`, the `price` filter will also work on the category layout only. Suppose you want to filter products those are having price between price range from 50 to 100, then you have to pass value like `price=10,50` as the query parameter in API URL - -- Headers - - | Key | Value | - | ------ | ---------------- | - | Accept | application/json | - -- Request - - `GET http(s)://example.com/api/products?category_id=2&price=50,100` - -#### 6. You can also use the `limit` and `page` in query parameters with `category` & `price` filterable parameters - -- Headers - - | Key | Value | - | ------ | ---------------- | - | Accept | application/json | - -- Request - - `GET http(s)://example.com/api/products?category_id=2&price=50,100&limit=10&page=1` - - ![Bagisto Product Price Simple](../../assets/1.x/images/api/bagisto_prod_price_simple.jpg) - -#### 7. In the case of a configurable product, the `price` filter will also work with the product's variants. Suppose you want to filter products with the 40$ min and 100$ max price range. And there is a configurable product named men's T-shirts having a price 30$ and there is any variant of the same product having 45$ price, then men's T-shirts product will show you in the filtered product's list - -- Headers - - | Key | Value | - | ------ | ---------------- | - | Accept | application/json | - -- Request - - `GET http(s)://example.com/api/products?category_id=2&price=30,100` - - ![Bagisto Product Price Config](../../assets/1.x/images/api/bagisto_prod_price_config.jpg) - -::: tip - -The above-explained filter query parameters (i.e. size, color, price) can be used together. - -::: - -## Get product by id - -If you want the record of any specific product, then you have to provide the product id as an input parameter in the API URL. - -- Headers - - | Key | Value | - | ------ | ---------------- | - | Accept | application/json | - -- Request - - `GET /api/products/{product_id}` - -- Params - - | Name | Info | Type | - | ---------- | ------------ | ------ | - | product_id | Product's ID | Number | - -### Examples - -- Headers - - | Key | Value | - | ------ | ---------------- | - | Accept | application/json | - -- Request - - `GET http(s)://example.com/api/products/1` - -::: details Response - -```json -{ - "data": { - "id": 1, - "type": "simple", - "name": "Adorable Cream Teddy Bear", - "url_key": "adorable-cream-teddy-bear", - "price": "10.0000", - "formated_price": "$10.00", - "short_description": "

Buy Adorable Cream Teddy Bear online at best price

", - "description": "

Buy Adorable Cream Teddy Bear online at best price

", - "sku": "80971254", - "images": [ - {...} - ], - "base_image": {...}, - "variants": [], - "in_stock": true, - "reviews": {...}, - "is_saved": false, - "created_at": "2020-09-08T23:52:02.000000Z", - "updated_at": "2020-09-08T23:52:02.000000Z" - } -} -``` - -::: - -## Get product's additional information - -Additional information relates to all the attributes and their values for which admin sets the `Yes` value for the `Visible on Product View Page on Front-end`. The product's additional information means those attributes which describe the product's specification. - -![Bagisto Attribute](../../assets/1.x/images/api/bagisto_attribute.jpg) - -- Headers - - | Key | Value | - | ------ | ---------------- | - | Accept | application/json | - -- Request - - `GET http(s)://example.com/api/product-additional-information/1` - -::: details Response - -![Bagisto Additional Info](../../assets/1.x/images/api/bagisto_add_info.jpg) - -::: - -## Get product's variants information - -You can get all the configurable attributes of a product by using `product-configurable-config` resource in API calls. It will return all the variants of a product with their `label`, `options`, `regular_price` and `final_price` also. - -Admin can set the `Yes` value for the `Use To Create Configurable Product` field under the attribute panel to make that attribute as variant. - -![Bagisto Config](../../assets/1.x/images/api/bagisto_config.jpg) - -- Headers - - | Key | Value | - | ------ | ---------------- | - | Accept | application/json | - -- Request - - `GET http(s)://example.com/api/product-configurable-config/1` - -::: details Response - -```json -{ - "data": { - "attributes": [ - { - "id": 24, - "code": "size", - "label": "Size", - "swatch_type": null, - "options": [ - { - "id": 7, - "label": "M", - "swatch_value": null, - "products": [4] - } - ] - } - ], - "variant_prices": { - "4": { - "regular_price": { - "formated_price": "$45.00", - "price": 45 - }, - "final_price": { - "formated_price": "$45.00", - "price": 45 - } - } - } - } -} -``` - -![Bagisto Config Attributes](../../assets/1.x/images/api/bagisto_config_attr.jpg) - -::: diff --git a/docs/1.x/api/reviews.md b/docs/1.x/api/reviews.md deleted file mode 100644 index 04abae40..00000000 --- a/docs/1.x/api/reviews.md +++ /dev/null @@ -1,495 +0,0 @@ -# Reviews - -In this section, we will check all the reviews' API based on customers as well as products. Also we will see how to create a review. - -## Get all reviews - -You can get all the reviews of the Bagisto store. You can achieve this job by using `reviews` API call resource. There is no need of customer authentication. - -- Headers - - | Key | Value | - | ------------- | ---------------- | - | Accept | application/json | - -- Request - - `GET /api/reviews(?page,limit,pagination)` - -- Params - - | Name | Info | Type | - | ---------- | -------------------------------------------- | ------ | - | limit | Maximum number of records in each request | Number | - | page | Records for specific page based on the limit | Number | - | pagination | Will display all the records if set to `0` | Number | - -::: tip - - If you are using pagination and want to know more info about responses then check the [explanation](./explanation) portion. - -::: - -### Examples - -#### 1. Get reviews for specific page - -- Headers - - | Key | Value | - | ------------- | ---------------- | - | Accept | application/json | - -- Request - - `GET https://example.com/api/reviews?page=1` - -::: details Response - - ~~~json - { - "data": [ - { - "id": 10, - "title": "Awesome Product & Service ", - "rating": "3.0", - "comment": "Awesome Product & Service ", - "name": "John Doe", - "status": "approved", - }, - { - "id": 9, - "title": "Awesome Product Quality", - "rating": "4.0", - "comment": "Awesome Product Quality", - "name": "John Doe", - "status": "approved", - }, - {...}, - {...}, - ], - "links": { - "first": "https://example.com/api/reviews?page=1", - "last": "https://example.com/api/reviews?page=2", - "prev": null, - "next": null - }, - "meta": {...} - } - ~~~ - -::: - -#### 2. Get all reviews without pagination - -- Headers - - | Key | Value | - | ------------- | ---------------- | - | Accept | application/json | - -- Request - - `GET https://example.com/api/reviews?pagination=0` - -::: details Response - - ~~~json - { - "data": [ - { - "id": 6, - "title": "Great product & Service!!!", - "rating": "4.0", - "comment": "Beautiful bangles. Better than I expected.", - "name": "John Doe", - "status": "approved", - }, - { - "id": 5, - "title": "Very good product.. Recommend to all", - "rating": "5.0", - "comment": "I have ordered 2 sets. The product i received was good, i loved it.", - "name": "Peter Doe", - "status": "approved", - }, - { - "id": 4, - "title": "Awesome Product & Service ", - "rating": "3.0", - "comment": "Awesome Product & Service ", - "name": "John Doe", - "status": "approved", - }, - {...}, - {...}, - {...} - ] - } - ~~~ - -::: - -## Get review by id - -To get the specific review detail, you have to pass a review id i.e. `id` as a request payload like `reviews/{id}` in API URL. - -- Headers - - | Key | Value | - | ------------- | ---------------- | - | Accept | application/json | - -- Request - - `GET /api/reviews/{id}` - -- Params - - | Name | Info | Type | - | ---- | ------------ | ------ | - | id | Review's ID. | Number | - -### Examples - -#### 1. Get specific review by id - -- Headers - - | Key | Value | - | ------------- | ---------------- | - | Accept | application/json | - -- Request - - `GET https://example.com/api/reviews/2` - -- Response - - ~~~json - { - "data": { - "id": 2, - "title": "Awesome Product & Service ", - "rating": "3.0", - "comment": "Awesome Product & Service ", - "name": "John Doe", - "status": "approved", - "product": {...}, - "customer": {...} - } - } - ~~~ - -## Get reviews by customer's id - -This request will fetch all the reviews by customer's id. - -- Headers - - | Key | Value | - | ------------- | ---------------- | - | Accept | application/json | - -- Request - - `GET /api/reviews(?customer_id,limit,page,pagination)` - -- Params - - | Name | Info | Type | - | ----------- | -------------------------------------------- | ------ | - | customer_id | Customer's ID. | Number | - | limit | Maximum number of records in each request | Number | - | page | Records for specific page based on the limit | Number | - | pagination | Will display all the records if set to `0` | Number | - -### Examples - -#### 1. Get data of the specific page - -- Headers - - | Key | Value | - | ------------- | ---------------- | - | Accept | application/json | - -- Request - - `GET https://example.com/api/reviews?customer_id=1&page=1` - - ::: tip - - If you didn't use the page (?page=x) filter, then it returns the data of the first page by default. - - `GET https://example.com/api/reviews?customer_id=1` - - ::: - -::: details Response - - ~~~json - { - { - "data": [ - { - "id": 4, - "title": "Good Product", - "rating": "5.0", - "comment": "Nice...", - "name": "John Doe", - "status": "approved", - "product": {...}, - "customer": {...}, - }, - { - "id": 3, - "title": "Value For Money", - "rating": "5.0", - "comment": "Very nice product. Made with good quality.", - "name": "John Doe", - "status": "approved", - "product": {...}, - "customer": {...}, - } - { - "id": 2, - "title": "Great product & Service!!!", - "rating": "4.0", - "comment": "Beautiful bangles. Better than I expected.", - "name": "John Doe", - "status": "approved", - "product": {...}, - "customer": {...} - }, - { - "id": 1, - "title": "Awesome Product & Service ", - "rating": "3.0", - "comment": "Awesome Product & Service ", - "name": "John Doe", - "status": "approved", - "product": {...}, - "customer": {...} - }, - ], - "links": { - "first": "https://example.com/api/reviews?customer_id=1&page=1", - "last": "https://example.com/api/reviews?customer_id=1&page=1", - "prev": null, - "next": null - }, - "meta": {...} - } - } - ~~~ - -::: - -#### 2. Get all customer's reviews without pagination - -You can also get all customer's reviews of Bagisto Store in a single API call without using pagination. For this you have to pass `pagination=0` in the query parameter with the `reviews?customer_id={id}` resource in the API URL. - -- Headers - - | Key | Value | - | ------------- | ---------------- | - | Accept | application/json | - -- Request - - `GET https://example.com/api/reviews?customer_id=1&pagination=0` - -::: details Response - - ~~~json - { - "data": [ - { - "id": 4, - "title": "Good Product", - "rating": "5.0", - "comment": "Nice...", - "name": "John Doe", - "status": "approved", - "product": {...}, - "customer": {...}, - }, - { - "id": 3, - "title": "Value For Money", - "rating": "5.0", - "comment": "Very nice product. Made with good quality.", - "name": "John Doe", - "status": "approved", - "product": {...}, - "customer": {...}, - } - { - "id": 2, - "title": "Great product & Service!!!", - "rating": "4.0", - "comment": "Beautiful bangles. Better than I expected.", - "name": "John Doe", - "status": "approved", - "product": {...}, - "customer": {...} - }, - { - "id": 1, - "title": "Awesome Product & Service ", - "rating": "3.0", - "comment": "Awesome Product & Service ", - "name": "John Doe", - "status": "approved", - "product": {...}, - "customer": {...} - } - ] - } - ~~~ - -::: - -## Get review by product's id - -To get all the reviews of a specific product, you have to pass a `product_id` as a query parameter like `reviews?product_id={id}` in API URL. To use this API call customer authentication is not required. - -- Headers - - | Key | Value | - | ------------- | ---------------- | - | Accept | application/json | - -- Request - - `GET /api/reviews(?product_id,limit,page,pagination)` - -- Params - - | Name | Info | Type | - | ---------- | -------------------------------------------- | ------ | - | product_id | Product's ID. | Number | - | limit | Maximum number of records in each request | Number | - | page | Records for specific page based on the limit | Number | - | pagination | Will display all the records if set to `0` | Number | - -### Examples - -#### 1. Get data of the specific page - -- Headers - - | Key | Value | - | ------------- | ---------------- | - | Accept | application/json | - -- Request - - `GET https://example.com/api/reviews?product_id=1&page=1` - - ::: tip - - If you didn't use the page (?page=x) filter, then it returns the data of the first page by default. - - `GET https://example.com/api/reviews?product_id=1` - - ::: - -::: details Response - - ~~~json - { - "data": [ - { - "id": 4, - "title": "Great product & Service!!!", - "rating": "4.0", - "comment": "Beautiful bangles. Better than I expected.", - "name": "John Doe", - "status": "approved", - "product": {...}, - }, - { - "id": 3, - "title": "Very good product.. Recommend to all", - "rating": "5.0", - "comment": "I have ordered 2 sets. The product i received was good, i loved it..", - "name": "Peter Doe", - "status": "approved", - "product": {...}, - } - ], - "links": {...}, - "meta": {...} - } - ~~~ - -::: - -## Create products's review - -To post a review of a specific product, you have to login as a customer. - -- Headers - - | Key | Value | - | ------------- | ---------------- | - | Accept | application/json | - -- Request - - `POST /api/reviews/{product_id}/create` - -- Params - - | Name | Info | Type | - | ---------- | ------------------------------ | ------ | - | product_id | Product's ID. | Number | - | rating | Specify rating of the product. | Number | - | title | Title for review. | String | - | comment | Comments for review. | String | - -### Examples - -#### 1. Creating review for the product - -- Headers - - | Key | Value | - | ------------- | ---------------- | - | Accept | application/json | - -- Request - - `POST https://example.com/api/reviews/1/create` - -- Params - - | Name | Value | - | ---------- | --------------------- | - | rating | 5 | - | title | Awesome Product | - | comment | Good quality product. | - -::: details Response - - ~~~json - { - "message": "Your review submitted successfully.", - "data": { - "id": 6, - "title": "Awesome Product", - "rating": "5.0", - "comment": "Good quality product.", - "name": "John Doe", - "status": "pending", - "product": {...}, - "customer": {...}, - "created_at": "2020-09-28T14:27:27.000000Z", - "updated_at": "2020-09-28T14:27:27.000000Z" - } - } - ~~~ - -::: diff --git a/docs/1.x/api/shipments.md b/docs/1.x/api/shipments.md deleted file mode 100644 index 4b46772b..00000000 --- a/docs/1.x/api/shipments.md +++ /dev/null @@ -1,286 +0,0 @@ -# Shipments - -In this section, we will check all the shipments' API. - -## Get shipments from all orders - -You can get all the shipments of the Bagisto store. To get the shipments of the store, the customer must be logged in to the Bagisto store. You can achieve this job by using the `shipments` API call resource. - -- Headers - - | Key | Value | Info | - | ------------- | --------------------- | ------------------------------------ | - | Accept | application/json | | - | Authorization | Bearer `token-string` | Use only when you pass `?token=true` | - -- Request - - `GET /api/shipments(?limit,page,pagination)` - -- Params - - | Name | Info | Type | - | ---------- | -------------------------------------------- | ------ | - | limit | Maximum number of records in each request | Number | - | page | Records for specific page based on the limit | Number | - | pagination | Will display all the records if set to `0` | Number | - -::: tip - -If you are using pagination and want to know more info about responses then check the [explanation](./explanation) portion. - -::: - -### Examples - -#### 1. Get all shipments with pagination - -- Headers - - | Key | Value | Info | - | ------------- | --------------------- | ------------------------------------ | - | Accept | application/json | | - | Authorization | Bearer `token-string` | Use only when you pass `?token=true` | - -- Request - - `GET http(s)://example.com/api/shipments?page=1` - - ::: tip - - If you didn't use the page (?page=x) filter, then it returns the data of the first page by default. - - `GET http(s)://example.com/api/shipments` - - ::: - -::: details Response - -```json -{ - "data": [ - { - "id": 1, - "total_qty": 2, - "total_weight": null, - "carrier_title": "DHL Shipping", - "track_number": "1234566", - "customer": {...}, - "inventory_source": { - "id": 1, - "name": "Default", - "contact_name": "Detroit Warehouse", - "contact_email": "warehouse@example.com", - "contact_number": "1234567899", - "country": "US", - "state": "MI", - "city": "Detroit", - "street": "12th Street", - "postcode": "48127", - }, - "items": [{...},{...}] - } - ], - "links": {...}, - "meta": {...} -} -``` - -![bagisto_shipments](../../assets/1.x/images/api/bagisto_shipments.jpg) - -::: - -#### 2. Get all shipments without pagination - -- Headers - - | Key | Value | Info | - | ------------- | --------------------- | ------------------------------------ | - | Accept | application/json | | - | Authorization | Bearer `token-string` | Use only when you pass `?token=true` | - -- Request - - `GET http(s)://example.com/api/shipments?pagination=0` - -::: details Response - -```json -{ - "data": [ - { - "id": 1, - "total_qty": 2, - "total_weight": null, - "carrier_title": "DHL Shipping", - "track_number": "1234566", - "customer": {...}, - "inventory_source": { - "id": 1, - "name": "Default", - "contact_name": "Detroit Warehouse", - "contact_email": "warehouse@example.com", - "contact_number": "1234567899", - "country": "US", - "state": "MI", - "city": "Detroit", - "street": "12th Street", - "postcode": "48127", - }, - "items": [{...},{...}] - }, - {...}, - {...}, - {...}, - ... - {...} - ] -} -``` - -::: - -## Get shipments by order's id - -To get the details of a specific order's shipment, you have to pass an `order_id` as a query parameter in API URL. By using this resource and query parameter, you will get only a single shipment detail in API response based on the provided `order_id`. - -- Headers - - | Key | Value | Info | - | ------------- | --------------------- | ------------------------------------ | - | Accept | application/json | | - | Authorization | Bearer `token-string` | Use only when you pass `?token=true` | - -- Request - - `GET /api/shipments(?order_id,limit,page,pagination)` - -- Params - - | Name | Info | Type | - | ---------- | -------------------------------------------- | ------ | - | order_id | Order's ID | Number | - | limit | Maximum number of records in each request | Number | - | page | Records for specific page based on the limit | Number | - | pagination | Will display all the records if set to `0` | Number | - -### Examples - -#### 1. Get all shipments by order's id - -- Headers - - | Key | Value | Info | - | ------------- | --------------------- | ------------------------------------ | - | Accept | application/json | | - | Authorization | Bearer `token-string` | Use only when you pass `?token=true` | - -- Request - - `GET http(s)://example.com/api/shipments?order_id=3&pagination=0` - -::: details Response - -```json -{ - "data": [ - { - "id": 1, - "total_qty": 2, - "total_weight": null, - "carrier_code": null, - "carrier_title": "DHL Shipping", - "track_number": "1234566", - "customer": {...}, - "inventory_source": {...}, - "items": [ - {...}, - {...} - ] - } - ], -} -``` - -::: - -#### 2. Get all shipments by order's id for specific page - -- Headers - - | Key | Value | Info | - | ------------- | --------------------- | ------------------------------------ | - | Accept | application/json | | - | Authorization | Bearer `token-string` | Use only when you pass `?token=true` | - -- Request - - `GET http(s)://example.com/api/shipments?order_id=3&page=1` - - ::: tip - - If you didn't use the page (?page=x) filter, then it returns the data of the first page by default. - - `GET http(s)://example.com/api/shipments?order_id=3` - - ::: - -::: details Response - -![bagisto_ship_order_id](../../assets/1.x/images/api/bagisto_ship_order_id.jpg) - -::: - -## Get shipment by id - -To get the details of a specific shipment, you have to pass a `shipment_id` as a request payload in the API URL. - -- Headers - - | Key | Value | Info | - | ------------- | --------------------- | ------------------------------------ | - | Accept | application/json | | - | Authorization | Bearer `token-string` | Use only when you pass `?token=true` | - -- Request - - `GET http(s)://example.com/api/shipments/{id}` - -### Examples - -#### 1. Let's fetch specific shipment - -- Headers - - | Key | Value | Info | - | ------------- | --------------------- | ------------------------------------ | - | Accept | application/json | | - | Authorization | Bearer `token-string` | Use only when you pass `?token=true` | - -- Request - - `GET http(s)://example.com/api/shipments/1` - -::: details Response - -```json -{ - "data": { - "id": 1, - "total_qty": 2, - "total_weight": null, - "carrier_code": null, - "carrier_title": "DHL Shipping", - "track_number": "1234566", - "email_sent": 0, - "customer": {...}, - "inventory_source": {...}, - "items": [ - {...}, - {...} - ] - } -} -``` - -::: diff --git a/docs/1.x/api/transactions.md b/docs/1.x/api/transactions.md deleted file mode 100644 index 458066bd..00000000 --- a/docs/1.x/api/transactions.md +++ /dev/null @@ -1,203 +0,0 @@ -# Transactions - -In this section, we will see all the APIs which are related to transactions. In Bagisto, we save all the transactions done by the customers using the Paypal Smart Button option. - -::: warning - -These are all transactions that are saved in the database after the payment done by the customers using the Paypal Smart Button option. - -::: - -## Get all transactions - -You can get all the transaction data from the Bagisto store. To get the data from the store, the customer must be authenticated. You can achieve this job by using the `transactions` API call resource. - -- Headers - - | Key | Value | Info | - | ------------- | --------------------- | ------------------------------------ | - | Accept | application/json | | - | Authorization | Bearer `token-string` | Use only when you pass `?token=true` | - -- Request - - `GET /api/transactions(?limit,page,pagination)` - -- Params - - | Name | Info | Type | - | ---------- | -------------------------------------------- | ------ | - | limit | Maximum number of records in each request | Number | - | page | Records for specific page based on the limit | Number | - | pagination | Will display all the records if set to `0` | Number | - -::: tip - - If you are using pagination and want to know more info about responses then check the [explanation](./explanation) portion. - -::: - -### Examples - -#### 1. Records for specific page - -- Headers - - | Key | Value | Info | - | ------------- | --------------------- | ------------------------------------ | - | Accept | application/json | | - | Authorization | Bearer `token-string` | Use only when you pass `?token=true` | - -- Request - - `GET http(s)://example.com/api/transactions?page=1` - - ::: tip - - If you didn't use the page (?page=x) filter, then it returns the data of the first page by default. - - `GET http(s)://example.com/api/transactions` - - ::: - -::: details Response - -~~~json -{ - "data": [ - { - "id": 1, - "transaction_id": "47427618SF330010G", - "status": "COMPLETED", - "type": "CAPTURE", - "payment_method": "paypal_smart_button", - "data": "{\"0\": {\"items\": [{\"sku\": \"12\", \"name\": \"Soft Toy\", \"category\": \"PHYSICAL_GOODS\", \"quantity\": \"1\", \"unit_amount\": {\"value\": \"150.00\", \"currency_code\": \"USD\"}}], \"payee\": {\"merchant_id\": \"85PGX7H6T2ZLW\", \"email_address\": \"prachiwebkul-facilitator@gmail.com\"}, \"amount\": {\"value\": \"150.00\", \"breakdown\": {\"shipping\": {\"value\": \"0.00\", \"currency_code\": \"USD\"}, \"tax_total\": {\"value\": \"0.00\", \"currency_code\": \"USD\"}, \"item_total\": {\"value\": \"150.00\", \"currency_code\": \"USD\"}}, \"currency_code\": \"USD\"}, \"payments\": {\"captures\": [{\"id\": \"2U5068420K488272L\", \"links\": [{\"rel\": \"self\", \"href\": \"https://api.sandbox.paypal.com/v2/payments/captures/2U5068420K488272L\", \"method\": \"GET\"}, {\"rel\": \"refund\", \"href\": \"https://api.sandbox.paypal.com/v2/payments/captures/2U5068420K488272L/refund\", \"method\": \"POST\"}, {\"rel\": \"up\", \"href\": \"https://api.sandbox.paypal.com/v2/checkout/orders/47427618SF330010G\", \"method\": \"GET\"}], \"amount\": {\"value\": \"150.00\", \"currency_code\": \"USD\"}, \"status\": \"COMPLETED\", \"create_time\": \"2021-04-09T09:28:03Z\", \"update_time\": \"2021-04-09T09:28:03Z\", \"final_capture\": true, \"seller_protection\": {\"status\": \"ELIGIBLE\", \"dispute_categories\": [\"ITEM_NOT_RECEIVED\", \"UNAUTHORIZED_TRANSACTION\"]}, \"seller_receivable_breakdown\": {\"net_amount\": {\"value\": \"143.85\", \"currency_code\": \"USD\"}, \"paypal_fee\": {\"value\": \"6.15\", \"currency_code\": \"USD\"}, \"gross_amount\": {\"value\": \"150.00\", \"currency_code\": \"USD\"}}}]}, \"shipping\": {\"name\": {\"full_name\": \"John Doe\"}, \"address\": {\"postal_code\": \"110045\", \"admin_area_1\": \"DL\", \"admin_area_2\": \"New Delhi\", \"country_code\": \"IN\", \"address_line_1\": \"Dwarka\"}}, \"reference_id\": \"default\", \"soft_descriptor\": \"PAYPAL *TESTFACILIT\"}, \"name\": {\"surname\": \"Doe\", \"given_name\": \"John\"}, \"address\": {\"postal_code\": \"110045\", \"admin_area_1\": \"DL\", \"admin_area_2\": \"New Delhi\", \"country_code\": \"IN\", \"address_line_1\": \"Dwarka\"}, \"payer_id\": \"8KC42JLS656PQ\", \"email_address\": \"sb-eyqoq4881652@personal.example.com\"}", - "updated_at": "2021-04-09T09:28:08.000000Z", - "created_at": "2021-04-09T09:28:08.000000Z" - } - ], - "links": { - "first": "https://example.com/api/transactions?page=1", - "last": "https://example.com/api/transactions?page=1", - "prev": null, - "next": null - }, - "meta": { - "current_page": 1, - "from": 1, - "last_page": 1, - "links": [ - { - "url": null, - "label": "« Previous", - "active": false - }, - { - "url": "https://example.com/api/transactions?page=1", - "label": "1", - "active": true - }, - { - "url": null, - "label": "Next »", - "active": false - } - ], - "path": "https://example.com/api/transactions", - "per_page": 10, - "to": 1, - "total": 1 - } -} -~~~ - -::: - -#### 2. Get all transactions without pagination - -You can also get all the transaction data at once from the Bagisto store without pagination. To get the data, the customer must be authenticated. For this, you have to pass `pagination=0` in the query parameter with the `transactions` resource in the API URL. - -- Headers - - | Key | Value | Info | - | ------------- | --------------------- | ------------------------------------ | - | Accept | application/json | | - | Authorization | Bearer `token-string` | Use only when you pass `?token=true` | - -- Request - - `GET http(s)://example.com/public/api/transactions?pagination=0` - -::: details Response - -~~~json -{ - "data": [ - { - "id": 1, - "transaction_id": "47427618SF330010G", - "status": "COMPLETED", - "type": "CAPTURE", - "payment_method": "paypal_smart_button", - "data": "{\"0\": {\"items\": [{\"sku\": \"12\", \"name\": \"Soft Toy\", \"category\": \"PHYSICAL_GOODS\", \"quantity\": \"1\", \"unit_amount\": {\"value\": \"150.00\", \"currency_code\": \"USD\"}}], \"payee\": {\"merchant_id\": \"85PGX7H6T2ZLW\", \"email_address\": \"prachiwebkul-facilitator@gmail.com\"}, \"amount\": {\"value\": \"150.00\", \"breakdown\": {\"shipping\": {\"value\": \"0.00\", \"currency_code\": \"USD\"}, \"tax_total\": {\"value\": \"0.00\", \"currency_code\": \"USD\"}, \"item_total\": {\"value\": \"150.00\", \"currency_code\": \"USD\"}}, \"currency_code\": \"USD\"}, \"payments\": {\"captures\": [{\"id\": \"2U5068420K488272L\", \"links\": [{\"rel\": \"self\", \"href\": \"https://api.sandbox.paypal.com/v2/payments/captures/2U5068420K488272L\", \"method\": \"GET\"}, {\"rel\": \"refund\", \"href\": \"https://api.sandbox.paypal.com/v2/payments/captures/2U5068420K488272L/refund\", \"method\": \"POST\"}, {\"rel\": \"up\", \"href\": \"https://api.sandbox.paypal.com/v2/checkout/orders/47427618SF330010G\", \"method\": \"GET\"}], \"amount\": {\"value\": \"150.00\", \"currency_code\": \"USD\"}, \"status\": \"COMPLETED\", \"create_time\": \"2021-04-09T09:28:03Z\", \"update_time\": \"2021-04-09T09:28:03Z\", \"final_capture\": true, \"seller_protection\": {\"status\": \"ELIGIBLE\", \"dispute_categories\": [\"ITEM_NOT_RECEIVED\", \"UNAUTHORIZED_TRANSACTION\"]}, \"seller_receivable_breakdown\": {\"net_amount\": {\"value\": \"143.85\", \"currency_code\": \"USD\"}, \"paypal_fee\": {\"value\": \"6.15\", \"currency_code\": \"USD\"}, \"gross_amount\": {\"value\": \"150.00\", \"currency_code\": \"USD\"}}}]}, \"shipping\": {\"name\": {\"full_name\": \"John Doe\"}, \"address\": {\"postal_code\": \"110045\", \"admin_area_1\": \"DL\", \"admin_area_2\": \"New Delhi\", \"country_code\": \"IN\", \"address_line_1\": \"Dwarka\"}}, \"reference_id\": \"default\", \"soft_descriptor\": \"PAYPAL *TESTFACILIT\"}, \"name\": {\"surname\": \"Doe\", \"given_name\": \"John\"}, \"address\": {\"postal_code\": \"110045\", \"admin_area_1\": \"DL\", \"admin_area_2\": \"New Delhi\", \"country_code\": \"IN\", \"address_line_1\": \"Dwarka\"}, \"payer_id\": \"8KC42JLS656PQ\", \"email_address\": \"sb-eyqoq4881652@personal.example.com\"}", - "updated_at": "2021-04-09T09:28:08.000000Z", - "created_at": "2021-04-09T09:28:08.000000Z" - } - ] -} -~~~ - -::: - -## Get transaction by id - -To get the specific transaction details, you have to pass an `transaction_id` as a request payload in the API URL. - -- Headers - - | Key | Value | Info | - | ------------- | --------------------- | ------------------------------------ | - | Accept | application/json | | - | Authorization | Bearer `token-string` | Use only when you pass `?token=true` | - -- Request - - `GET /api/transactions/{transaction_id}` - -- Params - - | Name | Info | Type | - | -------------- | ---------------- | ------ | - | transaction_id | Transaction's ID | Number | - -### Examples - -Let's fetch specific transaction, - -- Headers - - | Key | Value | Info | - | ------------- | --------------------- | ------------------------------------ | - | Accept | application/json | | - | Authorization | Bearer `token-string` | Use only when you pass `?token=true` | - -- Request - - `GET http(s)://example.com/api/transactions/1` - -::: details Response - -~~~json -{ - "id": 1, - "transaction_id": "47427618SF330010G", - "status": "COMPLETED", - "type": "CAPTURE", - "payment_method": "paypal_smart_button", - "data": "{\"0\": {\"items\": [{\"sku\": \"12\", \"name\": \"Soft Toy\", \"category\": \"PHYSICAL_GOODS\", \"quantity\": \"1\", \"unit_amount\": {\"value\": \"150.00\", \"currency_code\": \"USD\"}}], \"payee\": {\"merchant_id\": \"85PGX7H6T2ZLW\", \"email_address\": \"prachiwebkul-facilitator@gmail.com\"}, \"amount\": {\"value\": \"150.00\", \"breakdown\": {\"shipping\": {\"value\": \"0.00\", \"currency_code\": \"USD\"}, \"tax_total\": {\"value\": \"0.00\", \"currency_code\": \"USD\"}, \"item_total\": {\"value\": \"150.00\", \"currency_code\": \"USD\"}}, \"currency_code\": \"USD\"}, \"payments\": {\"captures\": [{\"id\": \"2U5068420K488272L\", \"links\": [{\"rel\": \"self\", \"href\": \"https://api.sandbox.paypal.com/v2/payments/captures/2U5068420K488272L\", \"method\": \"GET\"}, {\"rel\": \"refund\", \"href\": \"https://api.sandbox.paypal.com/v2/payments/captures/2U5068420K488272L/refund\", \"method\": \"POST\"}, {\"rel\": \"up\", \"href\": \"https://api.sandbox.paypal.com/v2/checkout/orders/47427618SF330010G\", \"method\": \"GET\"}], \"amount\": {\"value\": \"150.00\", \"currency_code\": \"USD\"}, \"status\": \"COMPLETED\", \"create_time\": \"2021-04-09T09:28:03Z\", \"update_time\": \"2021-04-09T09:28:03Z\", \"final_capture\": true, \"seller_protection\": {\"status\": \"ELIGIBLE\", \"dispute_categories\": [\"ITEM_NOT_RECEIVED\", \"UNAUTHORIZED_TRANSACTION\"]}, \"seller_receivable_breakdown\": {\"net_amount\": {\"value\": \"143.85\", \"currency_code\": \"USD\"}, \"paypal_fee\": {\"value\": \"6.15\", \"currency_code\": \"USD\"}, \"gross_amount\": {\"value\": \"150.00\", \"currency_code\": \"USD\"}}}]}, \"shipping\": {\"name\": {\"full_name\": \"John Doe\"}, \"address\": {\"postal_code\": \"110045\", \"admin_area_1\": \"DL\", \"admin_area_2\": \"New Delhi\", \"country_code\": \"IN\", \"address_line_1\": \"Dwarka\"}}, \"reference_id\": \"default\", \"soft_descriptor\": \"PAYPAL *TESTFACILIT\"}, \"name\": {\"surname\": \"Doe\", \"given_name\": \"John\"}, \"address\": {\"postal_code\": \"110045\", \"admin_area_1\": \"DL\", \"admin_area_2\": \"New Delhi\", \"country_code\": \"IN\", \"address_line_1\": \"Dwarka\"}, \"payer_id\": \"8KC42JLS656PQ\", \"email_address\": \"sb-eyqoq4881652@personal.example.com\"}", - "updated_at": "2021-04-09T09:28:08.000000Z", - "created_at": "2021-04-09T09:28:08.000000Z" -} -~~~ - -::: diff --git a/docs/1.x/api/wishlists.md b/docs/1.x/api/wishlists.md deleted file mode 100644 index 45e6e091..00000000 --- a/docs/1.x/api/wishlists.md +++ /dev/null @@ -1,309 +0,0 @@ -# Wishlists - -In this section, we will see how wishlists' API works. - -## Get all wishlists - -You can also get all the wishlists of store's customers. To get the wishlists, customer must be logged-in to the Bagisto store. - -- Headers - - | Key | Value | Info | - | ------------- | --------------------- | ------------------------------------ | - | Accept | application/json | | - | Authorization | Bearer `token-string` | Use only when you pass `?token=true` | - -- Request - - `GET /api/wishlist(?limit,page,pagination)` - -- Params - - | Name | Info | Type | - | ---------- | -------------------------------------------- | ------ | - | limit | Maximum number of records in each request | Number | - | page | Records for specific page based on the limit | Number | - | pagination | Will display all the records if set to `0` | Number | - -::: tip - -If you are using pagination and want to know more info about responses then check the [explanation](./explanation) portion. - -::: - -### Examples - -#### 1. Get wishlists for specific page - -- Headers - - | Key | Value | Info | - | ------------- | --------------------- | ------------------------------------ | - | Accept | application/json | | - | Authorization | Bearer `token-string` | Use only when you pass `?token=true` | - -- Request - - `GET http(s)://example.com/api/wishlist?page=1` - -#### 2. Get wishlists for specific page with limit - -- Headers - - | Key | Value | Info | - | ------------- | --------------------- | ------------------------------------ | - | Accept | application/json | | - | Authorization | Bearer `token-string` | Use only when you pass `?token=true` | - -- Request - - `GET http(s)://example.com/api/wishlist?limit=2&page=1` - -::: details Response (Example 1 & 2) - -![bagisto_wishlist_page](../../assets/1.x/images/api/bagisto_wishlist_page.jpg) - -::: - -#### 3. Get all wishlists without pagination - -- Headers - - | Key | Value | Info | - | ------------- | --------------------- | ------------------------------------ | - | Accept | application/json | | - | Authorization | Bearer `token-string` | Use only when you pass `?token=true` | - -- Request - - `GET http(s)://example.com/api/wishlist?pagination=0` - -::: details Response - -```json -{ - "data": [ - { - "id": 9, - "product": { - "id": 5, - "type": "simple", - "name": "Home Decor Bottles", - "url_key": "home-decor-bottles", - "price": 10, - "formated_price": "$10.00", - "short_description": "

Home Decor Bottles

", - "description": "

Home Decor Bottles

", - "sku": "bottles", - } - }, - { - "id": 8, - "product": {...} - }, - { - "id": 7, - "product": {...} - } - ] -} -``` - -::: - -## Get wishlists by customer's id - -To get all wishlists of a specific customer, you have to pass a `customer_id` as a query parameter in API url. - -- Headers - - | Key | Value | Info | - | ------------- | --------------------- | ------------------------------------ | - | Accept | application/json | | - | Authorization | Bearer `token-string` | Use only when you pass `?token=true` | - -- Request - - `GET /api/wishlist(?customer_id,limit,page,pagination)` - -- Params - - | Name | Info | Type | - | ----------- | -------------------------------------------- | ------ | - | customer_id | Customer's ID | Number | - | limit | Maximum number of records in each request | Number | - | page | Records for specific page based on the limit | Number | - | pagination | Will display all the records if set to `0` | Number | - -### Examples - -#### 1. If you want all the wishlists by `customer_id` - -- Headers - - | Key | Value | Info | - | ------------- | --------------------- | ------------------------------------ | - | Accept | application/json | | - | Authorization | Bearer `token-string` | Use only when you pass `?token=true` | - -- Request - - `GET http(s)://example.com/api/wishlist?customer_id=1&pagination=0` - -::: details Response: - -```json -{ - "data": [ - { - "id": 7, - "product": {...}, - }, - {...}, - {...}, - {...}, - ... - {...} - ] -} -``` - -::: - -#### 2. If you want wishlists for specific page by `customer_id` - -- Headers - - | Key | Value | Info | - | ------------- | --------------------- | ------------------------------------ | - | Accept | application/json | | - | Authorization | Bearer `token-string` | Use only when you pass `?token=true` | - -- Request - - `GET http(s)://example.com/api/wishlist?customer_id=1&page=1` - -::: details Response: - -```json -{ - "data": [ - { - "id": 7, - "product": {...}, - }, - {...}, - {...}, - {...}, - ... - {...} - ], - "links": { - "first": "https://example.com/api/wishlist?customer_id=1&page=1", - "last": "https://example.com/api/wishlist?customer_id=1&page=1", - "prev": null, - "next": null - }, - "meta": { - "current_page": 1, - "from": 1, - "last_page": 1, - "path": "https://example.com/api/wishlist", - "per_page": 10, - "to": 2, - "total": 9 - } -} -``` - -::: - -## Add product to wishlist - -To add a product to customer's wishlist, you have to pass a `product_id` as a request payload like `wishlist/add/{product_id}` in API URL. - -- Headers - - | Key | Value | Info | - | ------------- | --------------------- | ------------------------------------ | - | Accept | application/json | | - | Authorization | Bearer `token-string` | Use only when you pass `?token=true` | - -- Request - - `GET http(s)://example.com/api/wishlist/add/{product_id}` - -- Params - - | Name | Info | Type | - | ---------- | ---------- | ------ | - | product_id | Product ID | Number | - -### Examples - -Let's add one product to wishlist, - -- Headers - - | Key | Value | Info | - | ------------- | --------------------- | ------------------------------------ | - | Accept | application/json | | - | Authorization | Bearer `token-string` | Use only when you pass `?token=true` | - -- Request - - `GET http(s)://example.com/api/wishlist/add/11` - -::: details Response - -```json -{ - "data": { - "id": 11, - "product": { - "id": 1, - "type": "simple", - "name": "Leather Shoes", - "url_key": "leather-shoes", - "price": 50, - "formated_price": "$50.00", - "short_description": "

Leather Shoes

", - "description": "

Leather Shoes

", - "sku": "men-leather-shoes" - } - }, - "message": "Item Successfully Added To Wishlist" -} -``` - -::: - -## Remove product from wishlist - -For removing the product from the wishlist, you need to hit the same add API again. Just like a toggle. It will remove if the wishlist is already added. - -### Examples - -Hitting the same add API again, - -- Headers - - | Key | Value | Info | - | ------------- | --------------------- | ------------------------------------ | - | Accept | application/json | | - | Authorization | Bearer `token-string` | Use only when you pass `?token=true` | - -- Request - - `GET http(s)://example.com/api/wishlist/add/11` - -::: details Response - -```json -{ - "data": null, - "message": "Item removed from wishlist successfully." -} -``` - -::: diff --git a/docs/1.x/deploy/README.md b/docs/1.x/deploy/README.md deleted file mode 100644 index 6ca0fb29..00000000 --- a/docs/1.x/deploy/README.md +++ /dev/null @@ -1,9 +0,0 @@ -# Deploy - -this article will explain how you can deploy your Bagisto store to your production server when you have been developing your Bagisto store on your local system. - -## Deploy Bagisto with (S)FTP - -## Deploy on Cpanel - -## Deploy on Plesk diff --git a/docs/1.x/graphql-admin-api/README.md b/docs/1.x/graphql-admin-api/README.md deleted file mode 100644 index 6739d0e8..00000000 --- a/docs/1.x/graphql-admin-api/README.md +++ /dev/null @@ -1,38 +0,0 @@ -# Bagisto GraphQL Admin APIs - -Bagisto GraphQL Admin API is a medium to use the features of the core Bagisto Admin System. By using Bagisto GraphQL Admin API, you can integrate your application to serve the default content of Bagisto. - -**To download and contribute: [Bagisto GraphQL API GitHub](https://github.com/bagisto/headless-ecommerce/)** - - -## Key Features - -- Bagisto GraphQL API provides a complete and understandable description of the data. -- Authentication: Customer Authentication with Login Details. -- Authentication: Admin Authentication with Login Details. -- Provide access to performed CRUD operations. -- Provide the option to filter the responses based on attribute fields. -- The Framework supports the pagination which helps to increase the performance of application. -- Get many resources in a single request. - -## Request - -- `http(s)://example.com/graphql` - -## Where can I use Bagisto GraphQL APIs? - -We can use the Bagisto GraphQL APIs in different areas. Some of them are: - -- To build a PWA (Progressive Web Application) application, which uses modern web capabilities to deliver an application like experience to the users and provide more user friendly experience than a web application. - -- Use to integrate an Online-Shopping Mobile Application with the Bagisto Store to help the customers make purchase. - -- Use to integrate with CRM (Customer Relationship Management) systems Like: HubSpot, Salesforce etc. which allows you to manage the business relationships with your customers to help you grow your business. - -- To provide exactly what you need and nothing more. - -- To get Predictable result. - -- Applications using GraphQL can be quick even on slow mobile network connections. - -- Applications for devices where bandwidth usage matters. \ No newline at end of file diff --git a/docs/1.x/graphql-admin-api/attribute-families.md b/docs/1.x/graphql-admin-api/attribute-families.md deleted file mode 100644 index 71026ea8..00000000 --- a/docs/1.x/graphql-admin-api/attribute-families.md +++ /dev/null @@ -1,3233 +0,0 @@ -# Attribute Families - -In this section, we will see all the APIs which are related to Attribute Families. - -## Get All Attribute Families - -You can get all the Attribute Families from the Bagisto store. You can achieve this job by using the `Attribute Families` API call. - -- Headers - - | Key | Value | - | ------------- | ---------------- | - | Accept | application/json | - -- Single Request Endpoint - - `POST http(s)://example.com/graphql` - -::: tip - - If you are using pagination and want to know more info about responses then check the [explanation](./explanation) portion. - -::: - -**Note**: You can pass all the related fileds that you want in response. - -- Request Query - ~~~query - query attributeFamilies { - attributeFamilies { - paginatorInfo { - count - currentPage - lastPage - total - } - data { - id - code - name - status - isUserDefined - attributeGroups { - id - name - position - isUserDefined - attributeFamilyId - customAttributes { - id - code - adminName - type - position - isRequired - isUnique - validation - valuePerLocale - valuePerChannel - isFilterable - isConfigurable - isVisibleOnFront - isUserDefined - swatchType - useInFlat - isComparable - options { - id - adminName - swatchValue - sortOrder - attributeId - attribute { - id - adminName - } - translations { - id - locale - label - attributeOptionId - } - } - translations { - id - locale - name - attributeId - } - } - } - products { - id - type - sku - parentId - productFlats { - id - name - status - } - } - } - } - } - ~~~ -::: details Response - -~~~json -{ - "data": { - "attributeFamilies": { - "paginatorInfo": { - "count": 1, - "currentPage": 1, - "lastPage": 1, - "total": 1 - }, - "data": [ - { - "id": "1", - "code": "default", - "name": "Default", - "status": false, - "isUserDefined": true, - "attributeGroups": [ - { - "id": "1", - "name": "General", - "position": 1, - "isUserDefined": false, - "attributeFamilyId": "1", - "customAttributes": [ - { - "id": "1", - "code": "sku", - "adminName": "SKU", - "type": "text", - "position": 1, - "isRequired": true, - "isUnique": true, - "validation": null, - "valuePerLocale": false, - "valuePerChannel": false, - "isFilterable": false, - "isConfigurable": false, - "isVisibleOnFront": false, - "isUserDefined": false, - "swatchType": null, - "useInFlat": true, - "isComparable": false, - "options": [], - "translations": [ - { - "id": "1", - "locale": "en", - "name": "SKU", - "attributeId": "1" - } - ] - }, - { - "id": "27", - "code": "product_number", - "adminName": "Product Number", - "type": "text", - "position": 2, - "isRequired": false, - "isUnique": true, - "validation": null, - "valuePerLocale": false, - "valuePerChannel": false, - "isFilterable": false, - "isConfigurable": false, - "isVisibleOnFront": false, - "isUserDefined": false, - "swatchType": null, - "useInFlat": true, - "isComparable": false, - "options": [], - "translations": [ - { - "id": "27", - "locale": "en", - "name": "Product Number", - "attributeId": "27" - } - ] - }, - { - "id": "2", - "code": "name", - "adminName": "Name", - "type": "text", - "position": 3, - "isRequired": true, - "isUnique": false, - "validation": null, - "valuePerLocale": true, - "valuePerChannel": true, - "isFilterable": false, - "isConfigurable": false, - "isVisibleOnFront": false, - "isUserDefined": false, - "swatchType": null, - "useInFlat": true, - "isComparable": true, - "options": [], - "translations": [ - { - "id": "2", - "locale": "en", - "name": "Name", - "attributeId": "2" - } - ] - }, - { - "id": "3", - "code": "url_key", - "adminName": "URL Key", - "type": "text", - "position": 4, - "isRequired": true, - "isUnique": true, - "validation": null, - "valuePerLocale": false, - "valuePerChannel": false, - "isFilterable": false, - "isConfigurable": false, - "isVisibleOnFront": false, - "isUserDefined": false, - "swatchType": null, - "useInFlat": true, - "isComparable": false, - "options": [], - "translations": [ - { - "id": "3", - "locale": "en", - "name": "URL Key", - "attributeId": "3" - } - ] - }, - { - "id": "4", - "code": "tax_category_id", - "adminName": "Tax Category", - "type": "select", - "position": 5, - "isRequired": false, - "isUnique": false, - "validation": null, - "valuePerLocale": false, - "valuePerChannel": true, - "isFilterable": false, - "isConfigurable": false, - "isVisibleOnFront": false, - "isUserDefined": false, - "swatchType": null, - "useInFlat": true, - "isComparable": false, - "options": [], - "translations": [ - { - "id": "4", - "locale": "en", - "name": "Tax Category", - "attributeId": "4" - } - ] - }, - { - "id": "5", - "code": "new", - "adminName": "New", - "type": "boolean", - "position": 6, - "isRequired": false, - "isUnique": false, - "validation": null, - "valuePerLocale": false, - "valuePerChannel": false, - "isFilterable": false, - "isConfigurable": false, - "isVisibleOnFront": false, - "isUserDefined": false, - "swatchType": null, - "useInFlat": true, - "isComparable": false, - "options": [], - "translations": [ - { - "id": "5", - "locale": "en", - "name": "New", - "attributeId": "5" - } - ] - }, - { - "id": "6", - "code": "featured", - "adminName": "Featured", - "type": "boolean", - "position": 7, - "isRequired": false, - "isUnique": false, - "validation": null, - "valuePerLocale": false, - "valuePerChannel": false, - "isFilterable": false, - "isConfigurable": false, - "isVisibleOnFront": false, - "isUserDefined": false, - "swatchType": null, - "useInFlat": true, - "isComparable": false, - "options": [], - "translations": [ - { - "id": "6", - "locale": "en", - "name": "Featured", - "attributeId": "6" - } - ] - }, - { - "id": "7", - "code": "visible_individually", - "adminName": "Visible Individually", - "type": "boolean", - "position": 9, - "isRequired": true, - "isUnique": false, - "validation": null, - "valuePerLocale": false, - "valuePerChannel": false, - "isFilterable": false, - "isConfigurable": false, - "isVisibleOnFront": false, - "isUserDefined": false, - "swatchType": null, - "useInFlat": true, - "isComparable": false, - "options": [], - "translations": [ - { - "id": "7", - "locale": "en", - "name": "Visible Individually", - "attributeId": "7" - } - ] - }, - { - "id": "26", - "code": "guest_checkout", - "adminName": "Guest Checkout", - "type": "boolean", - "position": 8, - "isRequired": true, - "isUnique": false, - "validation": null, - "valuePerLocale": false, - "valuePerChannel": false, - "isFilterable": false, - "isConfigurable": false, - "isVisibleOnFront": false, - "isUserDefined": false, - "swatchType": null, - "useInFlat": true, - "isComparable": false, - "options": [], - "translations": [ - { - "id": "26", - "locale": "en", - "name": "Allow Guest Checkout", - "attributeId": "26" - } - ] - }, - { - "id": "8", - "code": "status", - "adminName": "Status", - "type": "boolean", - "position": 10, - "isRequired": true, - "isUnique": false, - "validation": null, - "valuePerLocale": false, - "valuePerChannel": false, - "isFilterable": false, - "isConfigurable": false, - "isVisibleOnFront": false, - "isUserDefined": false, - "swatchType": null, - "useInFlat": true, - "isComparable": false, - "options": [], - "translations": [ - { - "id": "8", - "locale": "en", - "name": "Status", - "attributeId": "8" - } - ] - }, - { - "id": "23", - "code": "color", - "adminName": "Color", - "type": "select", - "position": 26, - "isRequired": false, - "isUnique": false, - "validation": null, - "valuePerLocale": false, - "valuePerChannel": false, - "isFilterable": true, - "isConfigurable": true, - "isVisibleOnFront": false, - "isUserDefined": true, - "swatchType": null, - "useInFlat": true, - "isComparable": false, - "options": [ - { - "id": "1", - "adminName": "Red", - "swatchValue": null, - "sortOrder": 1, - "attributeId": "23", - "attribute": { - "id": "23", - "adminName": "Color" - }, - "translations": [ - { - "id": "1", - "locale": "en", - "label": "Red", - "attributeOptionId": "1" - } - ] - }, - { - "id": "2", - "adminName": "Green", - "swatchValue": null, - "sortOrder": 2, - "attributeId": "23", - "attribute": { - "id": "23", - "adminName": "Color" - }, - "translations": [ - { - "id": "2", - "locale": "en", - "label": "Green", - "attributeOptionId": "2" - } - ] - }, - { - "id": "3", - "adminName": "Yellow", - "swatchValue": null, - "sortOrder": 3, - "attributeId": "23", - "attribute": { - "id": "23", - "adminName": "Color" - }, - "translations": [ - { - "id": "3", - "locale": "en", - "label": "Yellow", - "attributeOptionId": "3" - } - ] - }, - { - "id": "4", - "adminName": "Black", - "swatchValue": null, - "sortOrder": 4, - "attributeId": "23", - "attribute": { - "id": "23", - "adminName": "Color" - }, - "translations": [ - { - "id": "4", - "locale": "en", - "label": "Black", - "attributeOptionId": "4" - } - ] - }, - { - "id": "5", - "adminName": "White", - "swatchValue": null, - "sortOrder": 5, - "attributeId": "23", - "attribute": { - "id": "23", - "adminName": "Color" - }, - "translations": [ - { - "id": "5", - "locale": "en", - "label": "White", - "attributeOptionId": "5" - } - ] - } - ], - "translations": [ - { - "id": "23", - "locale": "en", - "name": "Color", - "attributeId": "23" - } - ] - }, - { - "id": "24", - "code": "size", - "adminName": "Size", - "type": "select", - "position": 27, - "isRequired": false, - "isUnique": false, - "validation": null, - "valuePerLocale": false, - "valuePerChannel": false, - "isFilterable": true, - "isConfigurable": true, - "isVisibleOnFront": false, - "isUserDefined": true, - "swatchType": null, - "useInFlat": true, - "isComparable": false, - "options": [ - { - "id": "6", - "adminName": "S", - "swatchValue": null, - "sortOrder": 1, - "attributeId": "24", - "attribute": { - "id": "24", - "adminName": "Size" - }, - "translations": [ - { - "id": "6", - "locale": "en", - "label": "S", - "attributeOptionId": "6" - } - ] - }, - { - "id": "7", - "adminName": "M", - "swatchValue": null, - "sortOrder": 2, - "attributeId": "24", - "attribute": { - "id": "24", - "adminName": "Size" - }, - "translations": [ - { - "id": "7", - "locale": "en", - "label": "M", - "attributeOptionId": "7" - } - ] - }, - { - "id": "8", - "adminName": "L", - "swatchValue": null, - "sortOrder": 3, - "attributeId": "24", - "attribute": { - "id": "24", - "adminName": "Size" - }, - "translations": [ - { - "id": "8", - "locale": "en", - "label": "L", - "attributeOptionId": "8" - } - ] - }, - { - "id": "9", - "adminName": "XL", - "swatchValue": null, - "sortOrder": 4, - "attributeId": "24", - "attribute": { - "id": "24", - "adminName": "Size" - }, - "translations": [ - { - "id": "9", - "locale": "en", - "label": "XL", - "attributeOptionId": "9" - } - ] - } - ], - "translations": [ - { - "id": "24", - "locale": "en", - "name": "Size", - "attributeId": "24" - } - ] - }, - { - "id": "25", - "code": "brand", - "adminName": "Brand", - "type": "select", - "position": 28, - "isRequired": false, - "isUnique": false, - "validation": null, - "valuePerLocale": false, - "valuePerChannel": false, - "isFilterable": true, - "isConfigurable": false, - "isVisibleOnFront": true, - "isUserDefined": true, - "swatchType": null, - "useInFlat": true, - "isComparable": false, - "options": [], - "translations": [ - { - "id": "25", - "locale": "en", - "name": "Brand", - "attributeId": "25" - } - ] - } - ] - }, - { - "id": "2", - "name": "Description", - "position": 2, - "isUserDefined": false, - "attributeFamilyId": "1", - "customAttributes": [ - { - "id": "9", - "code": "short_description", - "adminName": "Short Description", - "type": "textarea", - "position": 11, - "isRequired": true, - "isUnique": false, - "validation": null, - "valuePerLocale": true, - "valuePerChannel": true, - "isFilterable": false, - "isConfigurable": false, - "isVisibleOnFront": false, - "isUserDefined": false, - "swatchType": null, - "useInFlat": true, - "isComparable": false, - "options": [], - "translations": [ - { - "id": "9", - "locale": "en", - "name": "Short Description", - "attributeId": "9" - } - ] - }, - { - "id": "10", - "code": "description", - "adminName": "Description", - "type": "textarea", - "position": 12, - "isRequired": true, - "isUnique": false, - "validation": null, - "valuePerLocale": true, - "valuePerChannel": true, - "isFilterable": false, - "isConfigurable": false, - "isVisibleOnFront": false, - "isUserDefined": false, - "swatchType": null, - "useInFlat": true, - "isComparable": true, - "options": [], - "translations": [ - { - "id": "10", - "locale": "en", - "name": "Description", - "attributeId": "10" - } - ] - } - ] - }, - { - "id": "3", - "name": "Meta Description", - "position": 3, - "isUserDefined": false, - "attributeFamilyId": "1", - "customAttributes": [ - { - "id": "16", - "code": "meta_title", - "adminName": "Meta Title", - "type": "textarea", - "position": 18, - "isRequired": false, - "isUnique": false, - "validation": null, - "valuePerLocale": true, - "valuePerChannel": true, - "isFilterable": false, - "isConfigurable": false, - "isVisibleOnFront": false, - "isUserDefined": false, - "swatchType": null, - "useInFlat": true, - "isComparable": false, - "options": [], - "translations": [ - { - "id": "16", - "locale": "en", - "name": "Meta Description", - "attributeId": "16" - } - ] - }, - { - "id": "17", - "code": "meta_keywords", - "adminName": "Meta Keywords", - "type": "textarea", - "position": 20, - "isRequired": false, - "isUnique": false, - "validation": null, - "valuePerLocale": true, - "valuePerChannel": true, - "isFilterable": false, - "isConfigurable": false, - "isVisibleOnFront": false, - "isUserDefined": false, - "swatchType": null, - "useInFlat": true, - "isComparable": false, - "options": [], - "translations": [ - { - "id": "17", - "locale": "en", - "name": "Meta Keywords", - "attributeId": "17" - } - ] - }, - { - "id": "18", - "code": "meta_description", - "adminName": "Meta Description", - "type": "textarea", - "position": 21, - "isRequired": false, - "isUnique": false, - "validation": null, - "valuePerLocale": true, - "valuePerChannel": true, - "isFilterable": false, - "isConfigurable": false, - "isVisibleOnFront": false, - "isUserDefined": true, - "swatchType": null, - "useInFlat": true, - "isComparable": false, - "options": [], - "translations": [ - { - "id": "18", - "locale": "en", - "name": "Meta Description", - "attributeId": "18" - } - ] - } - ] - }, - { - "id": "4", - "name": "Price", - "position": 4, - "isUserDefined": false, - "attributeFamilyId": "1", - "customAttributes": [ - { - "id": "11", - "code": "price", - "adminName": "Price", - "type": "price", - "position": 13, - "isRequired": true, - "isUnique": false, - "validation": "decimal", - "valuePerLocale": false, - "valuePerChannel": false, - "isFilterable": true, - "isConfigurable": false, - "isVisibleOnFront": false, - "isUserDefined": false, - "swatchType": null, - "useInFlat": true, - "isComparable": true, - "options": [], - "translations": [ - { - "id": "11", - "locale": "en", - "name": "Price", - "attributeId": "11" - } - ] - }, - { - "id": "12", - "code": "cost", - "adminName": "Cost", - "type": "price", - "position": 14, - "isRequired": false, - "isUnique": false, - "validation": "decimal", - "valuePerLocale": false, - "valuePerChannel": true, - "isFilterable": false, - "isConfigurable": false, - "isVisibleOnFront": false, - "isUserDefined": true, - "swatchType": null, - "useInFlat": true, - "isComparable": false, - "options": [], - "translations": [ - { - "id": "12", - "locale": "en", - "name": "Cost", - "attributeId": "12" - } - ] - }, - { - "id": "13", - "code": "special_price", - "adminName": "Special Price", - "type": "price", - "position": 15, - "isRequired": false, - "isUnique": false, - "validation": "decimal", - "valuePerLocale": false, - "valuePerChannel": false, - "isFilterable": false, - "isConfigurable": false, - "isVisibleOnFront": false, - "isUserDefined": false, - "swatchType": null, - "useInFlat": true, - "isComparable": false, - "options": [], - "translations": [ - { - "id": "13", - "locale": "en", - "name": "Special Price", - "attributeId": "13" - } - ] - }, - { - "id": "14", - "code": "special_price_from", - "adminName": "Special Price From", - "type": "date", - "position": 16, - "isRequired": false, - "isUnique": false, - "validation": null, - "valuePerLocale": false, - "valuePerChannel": true, - "isFilterable": false, - "isConfigurable": false, - "isVisibleOnFront": false, - "isUserDefined": false, - "swatchType": null, - "useInFlat": true, - "isComparable": false, - "options": [], - "translations": [ - { - "id": "14", - "locale": "en", - "name": "Special Price From", - "attributeId": "14" - } - ] - }, - { - "id": "15", - "code": "special_price_to", - "adminName": "Special Price To", - "type": "date", - "position": 17, - "isRequired": false, - "isUnique": false, - "validation": null, - "valuePerLocale": false, - "valuePerChannel": true, - "isFilterable": false, - "isConfigurable": false, - "isVisibleOnFront": false, - "isUserDefined": false, - "swatchType": null, - "useInFlat": true, - "isComparable": false, - "options": [], - "translations": [ - { - "id": "15", - "locale": "en", - "name": "Special Price To", - "attributeId": "15" - } - ] - } - ] - }, - { - "id": "5", - "name": "Shipping", - "position": 5, - "isUserDefined": false, - "attributeFamilyId": "1", - "customAttributes": [ - { - "id": "19", - "code": "width", - "adminName": "Width", - "type": "text", - "position": 22, - "isRequired": false, - "isUnique": false, - "validation": "decimal", - "valuePerLocale": false, - "valuePerChannel": false, - "isFilterable": false, - "isConfigurable": false, - "isVisibleOnFront": false, - "isUserDefined": true, - "swatchType": null, - "useInFlat": true, - "isComparable": false, - "options": [], - "translations": [ - { - "id": "19", - "locale": "en", - "name": "Width", - "attributeId": "19" - } - ] - }, - { - "id": "20", - "code": "height", - "adminName": "Height", - "type": "text", - "position": 23, - "isRequired": false, - "isUnique": false, - "validation": "decimal", - "valuePerLocale": false, - "valuePerChannel": false, - "isFilterable": false, - "isConfigurable": false, - "isVisibleOnFront": false, - "isUserDefined": true, - "swatchType": null, - "useInFlat": true, - "isComparable": false, - "options": [], - "translations": [ - { - "id": "20", - "locale": "en", - "name": "Height", - "attributeId": "20" - } - ] - }, - { - "id": "21", - "code": "depth", - "adminName": "Depth", - "type": "text", - "position": 24, - "isRequired": false, - "isUnique": false, - "validation": "decimal", - "valuePerLocale": false, - "valuePerChannel": false, - "isFilterable": false, - "isConfigurable": false, - "isVisibleOnFront": false, - "isUserDefined": true, - "swatchType": null, - "useInFlat": true, - "isComparable": false, - "options": [], - "translations": [ - { - "id": "21", - "locale": "en", - "name": "Depth", - "attributeId": "21" - } - ] - }, - { - "id": "22", - "code": "weight", - "adminName": "Weight", - "type": "text", - "position": 25, - "isRequired": true, - "isUnique": false, - "validation": "decimal", - "valuePerLocale": false, - "valuePerChannel": false, - "isFilterable": false, - "isConfigurable": false, - "isVisibleOnFront": false, - "isUserDefined": false, - "swatchType": null, - "useInFlat": true, - "isComparable": false, - "options": [], - "translations": [ - { - "id": "22", - "locale": "en", - "name": "Weight", - "attributeId": "22" - } - ] - } - ] - } - ], - "products": [ - { - "id": "1", - "type": "simple", - "sku": "test-product", - "parentId": null, - "productFlats": [ - { - "id": "1", - "name": "testOutlet", - "status": true - } - ] - }, - { - "id": "3", - "type": "configurable", - "sku": "home-decor-2", - "parentId": null, - "productFlats": [ - { - "id": "3", - "name": "Home Decor-2", - "status": true - } - ] - }, - { - "id": "4", - "type": "simple", - "sku": "home-decor-1-variant-1-6", - "parentId": "3", - "productFlats": [ - { - "id": "4", - "name": "Red-S", - "status": true - } - ] - }, - { - "id": "5", - "type": "simple", - "sku": "home-decor-1-variant-2-6", - "parentId": "3", - "productFlats": [ - { - "id": "5", - "name": "Green-S", - "status": true - } - ] - }, - { - "id": "6", - "type": "virtual", - "sku": "virtual-demo", - "parentId": null, - "productFlats": [ - { - "id": "6", - "name": "Online Tuition Classes", - "status": true - } - ] - }, - { - "id": "7", - "type": "grouped", - "sku": "grouped-demo", - "parentId": null, - "productFlats": [ - { - "id": "7", - "name": "Phone Accessories", - "status": true - } - ] - }, - { - "id": "8", - "type": "downloadable", - "sku": "e-book", - "parentId": null, - "productFlats": [ - { - "id": "8", - "name": "e-book", - "status": true - } - ] - }, - { - "id": "9", - "type": "bundle", - "sku": "bundle-demo", - "parentId": null, - "productFlats": [ - { - "id": "9", - "name": "Bundle Box", - "status": true - } - ] - }, - { - "id": "10", - "type": "booking", - "sku": "appointment-booking", - "parentId": null, - "productFlats": [ - { - "id": "10", - "name": null, - "status": null - } - ] - }, - { - "id": "11", - "type": "booking", - "sku": "appointment-booking1", - "parentId": null, - "productFlats": [ - { - "id": "11", - "name": "Dr. Appointment", - "status": true - } - ] - }, - { - "id": "12", - "type": "booking", - "sku": "event-booking", - "parentId": null, - "productFlats": [ - { - "id": "12", - "name": "Music Show", - "status": true - } - ] - }, - { - "id": "13", - "type": "booking", - "sku": "ac-on-rent", - "parentId": null, - "productFlats": [ - { - "id": "13", - "name": "AC On Rent", - "status": true - } - ] - }, - { - "id": "14", - "type": "booking", - "sku": "hotel-table", - "parentId": null, - "productFlats": [ - { - "id": "14", - "name": "Hotel Table", - "status": true - } - ] - } - ] - } - ] - } - } -} -~~~ -::: - -## Get Attribute Family By ID - -To get the specific Attribute Family, you have to pass an `id` field with query request .By using this resource and request payload, you will get only a single object under the `data` object in response. - -- Headers - - | Key | Value | - | ------------- | --------------------- | - | Accept | application/json | - | Authorization | Bearer `token-string` | - -### Examples - -Let's take an example, - -- Request Query - ~~~Query - query attributeFamily { - attributeFamily(id: 1) { - id - code - name - status - isUserDefined - attributeGroups { - id - name - position - isUserDefined - attributeFamilyId - customAttributes { - id - code - adminName - type - position - isRequired - isUnique - validation - valuePerLocale - valuePerChannel - isFilterable - isConfigurable - isVisibleOnFront - isUserDefined - swatchType - useInFlat - isComparable - options { - id - adminName - swatchValue - sortOrder - attributeId - attribute { - id - adminName - } - translations { - id - locale - label - attributeOptionId - } - } - translations { - id - locale - name - attributeId - } - } - } - } - } - ~~~ -::: details Response - ~~~json - { - "data": { - "attributeFamily": { - "id": "1", - "code": "default", - "name": "Default", - "status": false, - "isUserDefined": true, - "attributeGroups": [ - { - "id": "1", - "name": "General", - "position": 1, - "isUserDefined": false, - "attributeFamilyId": "1", - "customAttributes": [ - { - "id": "1", - "code": "sku", - "adminName": "SKU", - "type": "text", - "position": 1, - "isRequired": true, - "isUnique": true, - "validation": null, - "valuePerLocale": false, - "valuePerChannel": false, - "isFilterable": false, - "isConfigurable": false, - "isVisibleOnFront": false, - "isUserDefined": false, - "swatchType": null, - "useInFlat": true, - "isComparable": false, - "options": [], - "translations": [ - { - "id": "1", - "locale": "en", - "name": "SKU", - "attributeId": "1" - } - ] - }, - { - "id": "27", - "code": "product_number", - "adminName": "Product Number", - "type": "text", - "position": 2, - "isRequired": false, - "isUnique": true, - "validation": null, - "valuePerLocale": false, - "valuePerChannel": false, - "isFilterable": false, - "isConfigurable": false, - "isVisibleOnFront": false, - "isUserDefined": false, - "swatchType": null, - "useInFlat": true, - "isComparable": false, - "options": [], - "translations": [ - { - "id": "27", - "locale": "en", - "name": "Product Number", - "attributeId": "27" - } - ] - }, - { - "id": "2", - "code": "name", - "adminName": "Name", - "type": "text", - "position": 3, - "isRequired": true, - "isUnique": false, - "validation": null, - "valuePerLocale": true, - "valuePerChannel": true, - "isFilterable": false, - "isConfigurable": false, - "isVisibleOnFront": false, - "isUserDefined": false, - "swatchType": null, - "useInFlat": true, - "isComparable": true, - "options": [], - "translations": [ - { - "id": "2", - "locale": "en", - "name": "Name", - "attributeId": "2" - } - ] - }, - { - "id": "3", - "code": "url_key", - "adminName": "URL Key", - "type": "text", - "position": 4, - "isRequired": true, - "isUnique": true, - "validation": null, - "valuePerLocale": false, - "valuePerChannel": false, - "isFilterable": false, - "isConfigurable": false, - "isVisibleOnFront": false, - "isUserDefined": false, - "swatchType": null, - "useInFlat": true, - "isComparable": false, - "options": [], - "translations": [ - { - "id": "3", - "locale": "en", - "name": "URL Key", - "attributeId": "3" - } - ] - }, - { - "id": "4", - "code": "tax_category_id", - "adminName": "Tax Category", - "type": "select", - "position": 5, - "isRequired": false, - "isUnique": false, - "validation": null, - "valuePerLocale": false, - "valuePerChannel": true, - "isFilterable": false, - "isConfigurable": false, - "isVisibleOnFront": false, - "isUserDefined": false, - "swatchType": null, - "useInFlat": true, - "isComparable": false, - "options": [], - "translations": [ - { - "id": "4", - "locale": "en", - "name": "Tax Category", - "attributeId": "4" - } - ] - }, - { - "id": "5", - "code": "new", - "adminName": "New", - "type": "boolean", - "position": 6, - "isRequired": false, - "isUnique": false, - "validation": null, - "valuePerLocale": false, - "valuePerChannel": false, - "isFilterable": false, - "isConfigurable": false, - "isVisibleOnFront": false, - "isUserDefined": false, - "swatchType": null, - "useInFlat": true, - "isComparable": false, - "options": [], - "translations": [ - { - "id": "5", - "locale": "en", - "name": "New", - "attributeId": "5" - } - ] - }, - { - "id": "6", - "code": "featured", - "adminName": "Featured", - "type": "boolean", - "position": 7, - "isRequired": false, - "isUnique": false, - "validation": null, - "valuePerLocale": false, - "valuePerChannel": false, - "isFilterable": false, - "isConfigurable": false, - "isVisibleOnFront": false, - "isUserDefined": false, - "swatchType": null, - "useInFlat": true, - "isComparable": false, - "options": [], - "translations": [ - { - "id": "6", - "locale": "en", - "name": "Featured", - "attributeId": "6" - } - ] - }, - { - "id": "7", - "code": "visible_individually", - "adminName": "Visible Individually", - "type": "boolean", - "position": 9, - "isRequired": true, - "isUnique": false, - "validation": null, - "valuePerLocale": false, - "valuePerChannel": false, - "isFilterable": false, - "isConfigurable": false, - "isVisibleOnFront": false, - "isUserDefined": false, - "swatchType": null, - "useInFlat": true, - "isComparable": false, - "options": [], - "translations": [ - { - "id": "7", - "locale": "en", - "name": "Visible Individually", - "attributeId": "7" - } - ] - }, - { - "id": "26", - "code": "guest_checkout", - "adminName": "Guest Checkout", - "type": "boolean", - "position": 8, - "isRequired": true, - "isUnique": false, - "validation": null, - "valuePerLocale": false, - "valuePerChannel": false, - "isFilterable": false, - "isConfigurable": false, - "isVisibleOnFront": false, - "isUserDefined": false, - "swatchType": null, - "useInFlat": true, - "isComparable": false, - "options": [], - "translations": [ - { - "id": "26", - "locale": "en", - "name": "Allow Guest Checkout", - "attributeId": "26" - } - ] - }, - { - "id": "8", - "code": "status", - "adminName": "Status", - "type": "boolean", - "position": 10, - "isRequired": true, - "isUnique": false, - "validation": null, - "valuePerLocale": false, - "valuePerChannel": false, - "isFilterable": false, - "isConfigurable": false, - "isVisibleOnFront": false, - "isUserDefined": false, - "swatchType": null, - "useInFlat": true, - "isComparable": false, - "options": [], - "translations": [ - { - "id": "8", - "locale": "en", - "name": "Status", - "attributeId": "8" - } - ] - }, - { - "id": "23", - "code": "color", - "adminName": "Color", - "type": "select", - "position": 26, - "isRequired": false, - "isUnique": false, - "validation": null, - "valuePerLocale": false, - "valuePerChannel": false, - "isFilterable": true, - "isConfigurable": true, - "isVisibleOnFront": false, - "isUserDefined": true, - "swatchType": null, - "useInFlat": true, - "isComparable": false, - "options": [ - { - "id": "1", - "adminName": "Red", - "swatchValue": null, - "sortOrder": 1, - "attributeId": "23", - "attribute": { - "id": "23", - "adminName": "Color" - }, - "translations": [ - { - "id": "1", - "locale": "en", - "label": "Red", - "attributeOptionId": "1" - } - ] - }, - { - "id": "2", - "adminName": "Green", - "swatchValue": null, - "sortOrder": 2, - "attributeId": "23", - "attribute": { - "id": "23", - "adminName": "Color" - }, - "translations": [ - { - "id": "2", - "locale": "en", - "label": "Green", - "attributeOptionId": "2" - } - ] - }, - { - "id": "3", - "adminName": "Yellow", - "swatchValue": null, - "sortOrder": 3, - "attributeId": "23", - "attribute": { - "id": "23", - "adminName": "Color" - }, - "translations": [ - { - "id": "3", - "locale": "en", - "label": "Yellow", - "attributeOptionId": "3" - } - ] - }, - { - "id": "4", - "adminName": "Black", - "swatchValue": null, - "sortOrder": 4, - "attributeId": "23", - "attribute": { - "id": "23", - "adminName": "Color" - }, - "translations": [ - { - "id": "4", - "locale": "en", - "label": "Black", - "attributeOptionId": "4" - } - ] - }, - { - "id": "5", - "adminName": "White", - "swatchValue": null, - "sortOrder": 5, - "attributeId": "23", - "attribute": { - "id": "23", - "adminName": "Color" - }, - "translations": [ - { - "id": "5", - "locale": "en", - "label": "White", - "attributeOptionId": "5" - } - ] - } - ], - "translations": [ - { - "id": "23", - "locale": "en", - "name": "Color", - "attributeId": "23" - } - ] - }, - { - "id": "24", - "code": "size", - "adminName": "Size", - "type": "select", - "position": 27, - "isRequired": false, - "isUnique": false, - "validation": null, - "valuePerLocale": false, - "valuePerChannel": false, - "isFilterable": true, - "isConfigurable": true, - "isVisibleOnFront": false, - "isUserDefined": true, - "swatchType": null, - "useInFlat": true, - "isComparable": false, - "options": [ - { - "id": "6", - "adminName": "S", - "swatchValue": null, - "sortOrder": 1, - "attributeId": "24", - "attribute": { - "id": "24", - "adminName": "Size" - }, - "translations": [ - { - "id": "6", - "locale": "en", - "label": "S", - "attributeOptionId": "6" - } - ] - }, - { - "id": "7", - "adminName": "M", - "swatchValue": null, - "sortOrder": 2, - "attributeId": "24", - "attribute": { - "id": "24", - "adminName": "Size" - }, - "translations": [ - { - "id": "7", - "locale": "en", - "label": "M", - "attributeOptionId": "7" - } - ] - }, - { - "id": "8", - "adminName": "L", - "swatchValue": null, - "sortOrder": 3, - "attributeId": "24", - "attribute": { - "id": "24", - "adminName": "Size" - }, - "translations": [ - { - "id": "8", - "locale": "en", - "label": "L", - "attributeOptionId": "8" - } - ] - }, - { - "id": "9", - "adminName": "XL", - "swatchValue": null, - "sortOrder": 4, - "attributeId": "24", - "attribute": { - "id": "24", - "adminName": "Size" - }, - "translations": [ - { - "id": "9", - "locale": "en", - "label": "XL", - "attributeOptionId": "9" - } - ] - } - ], - "translations": [ - { - "id": "24", - "locale": "en", - "name": "Size", - "attributeId": "24" - } - ] - }, - { - "id": "25", - "code": "brand", - "adminName": "Brand", - "type": "select", - "position": 28, - "isRequired": false, - "isUnique": false, - "validation": null, - "valuePerLocale": false, - "valuePerChannel": false, - "isFilterable": true, - "isConfigurable": false, - "isVisibleOnFront": true, - "isUserDefined": true, - "swatchType": null, - "useInFlat": true, - "isComparable": false, - "options": [], - "translations": [ - { - "id": "25", - "locale": "en", - "name": "Brand", - "attributeId": "25" - } - ] - } - ] - }, - { - "id": "2", - "name": "Description", - "position": 2, - "isUserDefined": false, - "attributeFamilyId": "1", - "customAttributes": [ - { - "id": "9", - "code": "short_description", - "adminName": "Short Description", - "type": "textarea", - "position": 11, - "isRequired": true, - "isUnique": false, - "validation": null, - "valuePerLocale": true, - "valuePerChannel": true, - "isFilterable": false, - "isConfigurable": false, - "isVisibleOnFront": false, - "isUserDefined": false, - "swatchType": null, - "useInFlat": true, - "isComparable": false, - "options": [], - "translations": [ - { - "id": "9", - "locale": "en", - "name": "Short Description", - "attributeId": "9" - } - ] - }, - { - "id": "10", - "code": "description", - "adminName": "Description", - "type": "textarea", - "position": 12, - "isRequired": true, - "isUnique": false, - "validation": null, - "valuePerLocale": true, - "valuePerChannel": true, - "isFilterable": false, - "isConfigurable": false, - "isVisibleOnFront": false, - "isUserDefined": false, - "swatchType": null, - "useInFlat": true, - "isComparable": true, - "options": [], - "translations": [ - { - "id": "10", - "locale": "en", - "name": "Description", - "attributeId": "10" - } - ] - } - ] - }, - { - "id": "3", - "name": "Meta Description", - "position": 3, - "isUserDefined": false, - "attributeFamilyId": "1", - "customAttributes": [ - { - "id": "16", - "code": "meta_title", - "adminName": "Meta Title", - "type": "textarea", - "position": 18, - "isRequired": false, - "isUnique": false, - "validation": null, - "valuePerLocale": true, - "valuePerChannel": true, - "isFilterable": false, - "isConfigurable": false, - "isVisibleOnFront": false, - "isUserDefined": false, - "swatchType": null, - "useInFlat": true, - "isComparable": false, - "options": [], - "translations": [ - { - "id": "16", - "locale": "en", - "name": "Meta Description", - "attributeId": "16" - } - ] - }, - { - "id": "17", - "code": "meta_keywords", - "adminName": "Meta Keywords", - "type": "textarea", - "position": 20, - "isRequired": false, - "isUnique": false, - "validation": null, - "valuePerLocale": true, - "valuePerChannel": true, - "isFilterable": false, - "isConfigurable": false, - "isVisibleOnFront": false, - "isUserDefined": false, - "swatchType": null, - "useInFlat": true, - "isComparable": false, - "options": [], - "translations": [ - { - "id": "17", - "locale": "en", - "name": "Meta Keywords", - "attributeId": "17" - } - ] - }, - { - "id": "18", - "code": "meta_description", - "adminName": "Meta Description", - "type": "textarea", - "position": 21, - "isRequired": false, - "isUnique": false, - "validation": null, - "valuePerLocale": true, - "valuePerChannel": true, - "isFilterable": false, - "isConfigurable": false, - "isVisibleOnFront": false, - "isUserDefined": true, - "swatchType": null, - "useInFlat": true, - "isComparable": false, - "options": [], - "translations": [ - { - "id": "18", - "locale": "en", - "name": "Meta Description", - "attributeId": "18" - } - ] - } - ] - }, - { - "id": "4", - "name": "Price", - "position": 4, - "isUserDefined": false, - "attributeFamilyId": "1", - "customAttributes": [ - { - "id": "11", - "code": "price", - "adminName": "Price", - "type": "price", - "position": 13, - "isRequired": true, - "isUnique": false, - "validation": "decimal", - "valuePerLocale": false, - "valuePerChannel": false, - "isFilterable": true, - "isConfigurable": false, - "isVisibleOnFront": false, - "isUserDefined": false, - "swatchType": null, - "useInFlat": true, - "isComparable": true, - "options": [], - "translations": [ - { - "id": "11", - "locale": "en", - "name": "Price", - "attributeId": "11" - } - ] - }, - { - "id": "12", - "code": "cost", - "adminName": "Cost", - "type": "price", - "position": 14, - "isRequired": false, - "isUnique": false, - "validation": "decimal", - "valuePerLocale": false, - "valuePerChannel": true, - "isFilterable": false, - "isConfigurable": false, - "isVisibleOnFront": false, - "isUserDefined": true, - "swatchType": null, - "useInFlat": true, - "isComparable": false, - "options": [], - "translations": [ - { - "id": "12", - "locale": "en", - "name": "Cost", - "attributeId": "12" - } - ] - }, - { - "id": "13", - "code": "special_price", - "adminName": "Special Price", - "type": "price", - "position": 15, - "isRequired": false, - "isUnique": false, - "validation": "decimal", - "valuePerLocale": false, - "valuePerChannel": false, - "isFilterable": false, - "isConfigurable": false, - "isVisibleOnFront": false, - "isUserDefined": false, - "swatchType": null, - "useInFlat": true, - "isComparable": false, - "options": [], - "translations": [ - { - "id": "13", - "locale": "en", - "name": "Special Price", - "attributeId": "13" - } - ] - }, - { - "id": "14", - "code": "special_price_from", - "adminName": "Special Price From", - "type": "date", - "position": 16, - "isRequired": false, - "isUnique": false, - "validation": null, - "valuePerLocale": false, - "valuePerChannel": true, - "isFilterable": false, - "isConfigurable": false, - "isVisibleOnFront": false, - "isUserDefined": false, - "swatchType": null, - "useInFlat": true, - "isComparable": false, - "options": [], - "translations": [ - { - "id": "14", - "locale": "en", - "name": "Special Price From", - "attributeId": "14" - } - ] - }, - { - "id": "15", - "code": "special_price_to", - "adminName": "Special Price To", - "type": "date", - "position": 17, - "isRequired": false, - "isUnique": false, - "validation": null, - "valuePerLocale": false, - "valuePerChannel": true, - "isFilterable": false, - "isConfigurable": false, - "isVisibleOnFront": false, - "isUserDefined": false, - "swatchType": null, - "useInFlat": true, - "isComparable": false, - "options": [], - "translations": [ - { - "id": "15", - "locale": "en", - "name": "Special Price To", - "attributeId": "15" - } - ] - } - ] - }, - { - "id": "5", - "name": "Shipping", - "position": 5, - "isUserDefined": false, - "attributeFamilyId": "1", - "customAttributes": [ - { - "id": "19", - "code": "width", - "adminName": "Width", - "type": "text", - "position": 22, - "isRequired": false, - "isUnique": false, - "validation": "decimal", - "valuePerLocale": false, - "valuePerChannel": false, - "isFilterable": false, - "isConfigurable": false, - "isVisibleOnFront": false, - "isUserDefined": true, - "swatchType": null, - "useInFlat": true, - "isComparable": false, - "options": [], - "translations": [ - { - "id": "19", - "locale": "en", - "name": "Width", - "attributeId": "19" - } - ] - }, - { - "id": "20", - "code": "height", - "adminName": "Height", - "type": "text", - "position": 23, - "isRequired": false, - "isUnique": false, - "validation": "decimal", - "valuePerLocale": false, - "valuePerChannel": false, - "isFilterable": false, - "isConfigurable": false, - "isVisibleOnFront": false, - "isUserDefined": true, - "swatchType": null, - "useInFlat": true, - "isComparable": false, - "options": [], - "translations": [ - { - "id": "20", - "locale": "en", - "name": "Height", - "attributeId": "20" - } - ] - }, - { - "id": "21", - "code": "depth", - "adminName": "Depth", - "type": "text", - "position": 24, - "isRequired": false, - "isUnique": false, - "validation": "decimal", - "valuePerLocale": false, - "valuePerChannel": false, - "isFilterable": false, - "isConfigurable": false, - "isVisibleOnFront": false, - "isUserDefined": true, - "swatchType": null, - "useInFlat": true, - "isComparable": false, - "options": [], - "translations": [ - { - "id": "21", - "locale": "en", - "name": "Depth", - "attributeId": "21" - } - ] - }, - { - "id": "22", - "code": "weight", - "adminName": "Weight", - "type": "text", - "position": 25, - "isRequired": true, - "isUnique": false, - "validation": "decimal", - "valuePerLocale": false, - "valuePerChannel": false, - "isFilterable": false, - "isConfigurable": false, - "isVisibleOnFront": false, - "isUserDefined": false, - "swatchType": null, - "useInFlat": true, - "isComparable": false, - "options": [], - "translations": [ - { - "id": "22", - "locale": "en", - "name": "Weight", - "attributeId": "22" - } - ] - } - ] - } - ] - } - } - } - ~~~ -::: - -## Create a new Attribute Family - - To create a Attribute Family, you have to perform mutation on Attribute Family and paas the related fields in the request. - API call resource will create a new Attribute Family, only if the admin has logged in. - - - Headers - - | Key | Value | - | ------------- | --------------------- | - | Accept | application/json | - | Authorization | Bearer `token-string` | - - ### Examples - - Let's take an example, - -- Request Mutation - ~~~Mutation - mutation createAttributeFamily { - createAttributeFamily(input: { - code: "new_family" - name: "New Family" - attributeGroups: [{ - name: "General" - position: 1 - isUserDefined: false - customAttributes: [{ - id: 1 - }, { - id: 2 - }, { - id: 3 - }, { - id: 4 - }, { - id: 5 - }] - }, { - name: "Description" - position: 2 - isUserDefined: false - customAttributes: [{ - id: 9 - }, { - id: 10 - }] - }, { - name: "Text Group" - position: 3 - isUserDefined: true - customAttributes: [{ - id: 19 - }, { - id: 20 - }] - }] - }) { - id - code - name - status - isUserDefined - attributeGroups { - id - name - position - isUserDefined - attributeFamilyId - customAttributes { - id - code - adminName - type - position - isRequired - isUnique - validation - valuePerLocale - valuePerChannel - isFilterable - isConfigurable - isVisibleOnFront - isUserDefined - swatchType - useInFlat - isComparable - options { - id - adminName - swatchValue - sortOrder - attributeId - attribute { - id - adminName - } - translations { - id - locale - label - attributeOptionId - } - } - translations { - id - locale - name - attributeId - } - } - } - products { - id - type - sku - parentId - productFlats { - id - name - status - } - } - } - } - ~~~ - -::: details Response - ~~~json - { - "data": { - "createAttributeFamily": { - "id": "2", - "code": "new_family", - "name": "New Family", - "status": null, - "isUserDefined": null, - "attributeGroups": [ - { - "id": "7", - "name": "General", - "position": 1, - "isUserDefined": false, - "attributeFamilyId": "2", - "customAttributes": [ - { - "id": "1", - "code": "sku", - "adminName": "SKU", - "type": "text", - "position": 1, - "isRequired": true, - "isUnique": true, - "validation": null, - "valuePerLocale": false, - "valuePerChannel": false, - "isFilterable": false, - "isConfigurable": false, - "isVisibleOnFront": false, - "isUserDefined": false, - "swatchType": null, - "useInFlat": true, - "isComparable": false, - "options": [], - "translations": [ - { - "id": "1", - "locale": "en", - "name": "SKU", - "attributeId": "1" - } - ] - }, - { - "id": "2", - "code": "name", - "adminName": "Name", - "type": "text", - "position": 3, - "isRequired": true, - "isUnique": false, - "validation": null, - "valuePerLocale": true, - "valuePerChannel": true, - "isFilterable": false, - "isConfigurable": false, - "isVisibleOnFront": false, - "isUserDefined": false, - "swatchType": null, - "useInFlat": true, - "isComparable": true, - "options": [], - "translations": [ - { - "id": "2", - "locale": "en", - "name": "Name", - "attributeId": "2" - } - ] - }, - { - "id": "3", - "code": "url_key", - "adminName": "URL Key", - "type": "text", - "position": 4, - "isRequired": true, - "isUnique": true, - "validation": null, - "valuePerLocale": false, - "valuePerChannel": false, - "isFilterable": false, - "isConfigurable": false, - "isVisibleOnFront": false, - "isUserDefined": false, - "swatchType": null, - "useInFlat": true, - "isComparable": false, - "options": [], - "translations": [ - { - "id": "3", - "locale": "en", - "name": "URL Key", - "attributeId": "3" - } - ] - }, - { - "id": "4", - "code": "tax_category_id", - "adminName": "Tax Category", - "type": "select", - "position": 5, - "isRequired": false, - "isUnique": false, - "validation": null, - "valuePerLocale": false, - "valuePerChannel": true, - "isFilterable": false, - "isConfigurable": false, - "isVisibleOnFront": false, - "isUserDefined": false, - "swatchType": null, - "useInFlat": true, - "isComparable": false, - "options": [], - "translations": [ - { - "id": "4", - "locale": "en", - "name": "Tax Category", - "attributeId": "4" - } - ] - }, - { - "id": "5", - "code": "new", - "adminName": "New", - "type": "boolean", - "position": 6, - "isRequired": false, - "isUnique": false, - "validation": null, - "valuePerLocale": false, - "valuePerChannel": false, - "isFilterable": false, - "isConfigurable": false, - "isVisibleOnFront": false, - "isUserDefined": false, - "swatchType": null, - "useInFlat": true, - "isComparable": false, - "options": [], - "translations": [ - { - "id": "5", - "locale": "en", - "name": "New", - "attributeId": "5" - } - ] - } - ] - }, - { - "id": "8", - "name": "Description", - "position": 2, - "isUserDefined": false, - "attributeFamilyId": "2", - "customAttributes": [ - { - "id": "9", - "code": "short_description", - "adminName": "Short Description", - "type": "textarea", - "position": 11, - "isRequired": true, - "isUnique": false, - "validation": null, - "valuePerLocale": true, - "valuePerChannel": true, - "isFilterable": false, - "isConfigurable": false, - "isVisibleOnFront": false, - "isUserDefined": false, - "swatchType": null, - "useInFlat": true, - "isComparable": false, - "options": [], - "translations": [ - { - "id": "9", - "locale": "en", - "name": "Short Description", - "attributeId": "9" - } - ] - }, - { - "id": "10", - "code": "description", - "adminName": "Description", - "type": "textarea", - "position": 12, - "isRequired": true, - "isUnique": false, - "validation": null, - "valuePerLocale": true, - "valuePerChannel": true, - "isFilterable": false, - "isConfigurable": false, - "isVisibleOnFront": false, - "isUserDefined": false, - "swatchType": null, - "useInFlat": true, - "isComparable": true, - "options": [], - "translations": [ - { - "id": "10", - "locale": "en", - "name": "Description", - "attributeId": "10" - } - ] - } - ] - }, - { - "id": "9", - "name": "Text Group", - "position": 3, - "isUserDefined": true, - "attributeFamilyId": "2", - "customAttributes": [ - { - "id": "19", - "code": "width", - "adminName": "Width", - "type": "text", - "position": 22, - "isRequired": false, - "isUnique": false, - "validation": "decimal", - "valuePerLocale": false, - "valuePerChannel": false, - "isFilterable": false, - "isConfigurable": false, - "isVisibleOnFront": false, - "isUserDefined": true, - "swatchType": null, - "useInFlat": true, - "isComparable": false, - "options": [], - "translations": [ - { - "id": "19", - "locale": "en", - "name": "Width", - "attributeId": "19" - } - ] - }, - { - "id": "20", - "code": "height", - "adminName": "Height", - "type": "text", - "position": 23, - "isRequired": false, - "isUnique": false, - "validation": "decimal", - "valuePerLocale": false, - "valuePerChannel": false, - "isFilterable": false, - "isConfigurable": false, - "isVisibleOnFront": false, - "isUserDefined": true, - "swatchType": null, - "useInFlat": true, - "isComparable": false, - "options": [], - "translations": [ - { - "id": "20", - "locale": "en", - "name": "Height", - "attributeId": "20" - } - ] - } - ] - } - ], - "products": [] - } - } - } - ~~~ -::: - -## Update a Attribute Family - -By using this API call you can update the Attribute Family. To do this , you have to perform update mutation on Attribute Family and paas the related fields in the request. -API call will update a Attribute Family, only if the admin has logged in. - - - - Headers - - | Key | Value | - | ------------- | --------------------- | - | Accept | application/json | - | Authorization | Bearer `token-string` | - -### Examples - - Let's take an example, - -- Request Mutation - ~~~Mutation - mutation updateAttributeFamily { - updateAttributeFamily(id: 2, input: { - code: "new_family" - name: "Fashion Family" - attributeGroups: [{ - name: "General" - position: 1 - isUserDefined: false - customAttributes: [{ - id: 1 - }, { - id: 2 - }, { - id: 3 - }, { - id: 4 - }, { - id: 5 - }] - }, { - name: "Description" - position: 2 - isUserDefined: false - customAttributes: [{ - id: 9 - }, { - id: 10 - }] - }, { - name: "Text Group" - position: 3 - isUserDefined: true - customAttributes: [{ - id: 19 - }, { - id: 20 - }] - }] - }) { - id - code - name - status - isUserDefined - attributeGroups { - id - name - position - isUserDefined - attributeFamilyId - customAttributes { - id - code - adminName - type - position - isRequired - isUnique - validation - valuePerLocale - valuePerChannel - isFilterable - isConfigurable - isVisibleOnFront - isUserDefined - swatchType - useInFlat - isComparable - options { - id - adminName - swatchValue - sortOrder - attributeId - attribute { - id - adminName - } - translations { - id - locale - label - attributeOptionId - } - } - translations { - id - locale - name - attributeId - } - } - } - products { - id - type - sku - parentId - productFlats { - id - name - status - } - } - } - } - ~~~ - -::: details Response - ~~~json - { - "data": { - "updateAttributeFamily": { - "id": "2", - "code": "new_family", - "name": "Fashion Family", - "status": false, - "isUserDefined": true, - "attributeGroups": [ - { - "id": "10", - "name": "General", - "position": 1, - "isUserDefined": false, - "attributeFamilyId": "2", - "customAttributes": [ - { - "id": "1", - "code": "sku", - "adminName": "SKU", - "type": "text", - "position": 1, - "isRequired": true, - "isUnique": true, - "validation": null, - "valuePerLocale": false, - "valuePerChannel": false, - "isFilterable": false, - "isConfigurable": false, - "isVisibleOnFront": false, - "isUserDefined": false, - "swatchType": null, - "useInFlat": true, - "isComparable": false, - "options": [], - "translations": [ - { - "id": "1", - "locale": "en", - "name": "SKU", - "attributeId": "1" - } - ] - }, - { - "id": "2", - "code": "name", - "adminName": "Name", - "type": "text", - "position": 3, - "isRequired": true, - "isUnique": false, - "validation": null, - "valuePerLocale": true, - "valuePerChannel": true, - "isFilterable": false, - "isConfigurable": false, - "isVisibleOnFront": false, - "isUserDefined": false, - "swatchType": null, - "useInFlat": true, - "isComparable": true, - "options": [], - "translations": [ - { - "id": "2", - "locale": "en", - "name": "Name", - "attributeId": "2" - } - ] - }, - { - "id": "3", - "code": "url_key", - "adminName": "URL Key", - "type": "text", - "position": 4, - "isRequired": true, - "isUnique": true, - "validation": null, - "valuePerLocale": false, - "valuePerChannel": false, - "isFilterable": false, - "isConfigurable": false, - "isVisibleOnFront": false, - "isUserDefined": false, - "swatchType": null, - "useInFlat": true, - "isComparable": false, - "options": [], - "translations": [ - { - "id": "3", - "locale": "en", - "name": "URL Key", - "attributeId": "3" - } - ] - }, - { - "id": "4", - "code": "tax_category_id", - "adminName": "Tax Category", - "type": "select", - "position": 5, - "isRequired": false, - "isUnique": false, - "validation": null, - "valuePerLocale": false, - "valuePerChannel": true, - "isFilterable": false, - "isConfigurable": false, - "isVisibleOnFront": false, - "isUserDefined": false, - "swatchType": null, - "useInFlat": true, - "isComparable": false, - "options": [], - "translations": [ - { - "id": "4", - "locale": "en", - "name": "Tax Category", - "attributeId": "4" - } - ] - }, - { - "id": "5", - "code": "new", - "adminName": "New", - "type": "boolean", - "position": 6, - "isRequired": false, - "isUnique": false, - "validation": null, - "valuePerLocale": false, - "valuePerChannel": false, - "isFilterable": false, - "isConfigurable": false, - "isVisibleOnFront": false, - "isUserDefined": false, - "swatchType": null, - "useInFlat": true, - "isComparable": false, - "options": [], - "translations": [ - { - "id": "5", - "locale": "en", - "name": "New", - "attributeId": "5" - } - ] - } - ] - }, - { - "id": "11", - "name": "Description", - "position": 2, - "isUserDefined": false, - "attributeFamilyId": "2", - "customAttributes": [ - { - "id": "9", - "code": "short_description", - "adminName": "Short Description", - "type": "textarea", - "position": 11, - "isRequired": true, - "isUnique": false, - "validation": null, - "valuePerLocale": true, - "valuePerChannel": true, - "isFilterable": false, - "isConfigurable": false, - "isVisibleOnFront": false, - "isUserDefined": false, - "swatchType": null, - "useInFlat": true, - "isComparable": false, - "options": [], - "translations": [ - { - "id": "9", - "locale": "en", - "name": "Short Description", - "attributeId": "9" - } - ] - }, - { - "id": "10", - "code": "description", - "adminName": "Description", - "type": "textarea", - "position": 12, - "isRequired": true, - "isUnique": false, - "validation": null, - "valuePerLocale": true, - "valuePerChannel": true, - "isFilterable": false, - "isConfigurable": false, - "isVisibleOnFront": false, - "isUserDefined": false, - "swatchType": null, - "useInFlat": true, - "isComparable": true, - "options": [], - "translations": [ - { - "id": "10", - "locale": "en", - "name": "Description", - "attributeId": "10" - } - ] - } - ] - }, - { - "id": "12", - "name": "Text Group", - "position": 3, - "isUserDefined": true, - "attributeFamilyId": "2", - "customAttributes": [ - { - "id": "19", - "code": "width", - "adminName": "Width", - "type": "text", - "position": 22, - "isRequired": false, - "isUnique": false, - "validation": "decimal", - "valuePerLocale": false, - "valuePerChannel": false, - "isFilterable": false, - "isConfigurable": false, - "isVisibleOnFront": false, - "isUserDefined": true, - "swatchType": null, - "useInFlat": true, - "isComparable": false, - "options": [], - "translations": [ - { - "id": "19", - "locale": "en", - "name": "Width", - "attributeId": "19" - } - ] - }, - { - "id": "20", - "code": "height", - "adminName": "Height", - "type": "text", - "position": 23, - "isRequired": false, - "isUnique": false, - "validation": "decimal", - "valuePerLocale": false, - "valuePerChannel": false, - "isFilterable": false, - "isConfigurable": false, - "isVisibleOnFront": false, - "isUserDefined": true, - "swatchType": null, - "useInFlat": true, - "isComparable": false, - "options": [], - "translations": [ - { - "id": "20", - "locale": "en", - "name": "Height", - "attributeId": "20" - } - ] - } - ] - } - ], - "products": [] - } - } - } - ~~~ -::: - -## Delete a Attribute Family - -To delete a Attribute Family, you have to perform mutation on Attribute Family by passing the id of that Attribute Family. -API call will delete a Attribute Family, only if the admin has logged in. - -- Headers - - | Key | Value | - | ------------- | --------------------- | - | Accept | application/json | - | Authorization | Bearer `token-string` | - -### Examples - - Let's take an example, - -- Request Mutation - ~~~Mutation - mutation deleteAttributeFamily { - deleteAttributeFamily(id: 2) { - success - } - } - ~~~ - -::: details Response - ~~~json - { - "data": { - "deleteAttributeFamily": { - "success": "Family deleted successfully." - } - } - } - ~~~ -::: diff --git a/docs/1.x/graphql-admin-api/attribute-groups.md b/docs/1.x/graphql-admin-api/attribute-groups.md deleted file mode 100644 index 78c1436e..00000000 --- a/docs/1.x/graphql-admin-api/attribute-groups.md +++ /dev/null @@ -1,1450 +0,0 @@ -# Attribute Groups - -In this section, we will see all the APIs which are related to Attribute Groups. - -## Get All Attribute Groups - -You can get all the Attribute Groups from the Bagisto store. You can achieve this job by using the `Attribute Groups` API call. - -- Headers - - | Key | Value | - | ------------- | ---------------- | - | Accept | application/json | - -- Single Request Endpoint - - `POST http(s)://example.com/graphql` - -::: tip - - If you are using pagination and want to know more info about responses then check the [explanation](./explanation) portion. - -::: - -**Note**: You can pass all the related fileds that you want in response. - -- Request Query - ~~~query - query attributeGroups { - attributeGroups { - paginatorInfo { - count - currentPage - lastPage - total - } - data { - id - name - position - isUserDefined - attributeFamilyId - customAttributes { - id - code - adminName - type - position - isRequired - isUnique - validation - valuePerLocale - valuePerChannel - isFilterable - isConfigurable - isVisibleOnFront - isUserDefined - swatchType - useInFlat - isComparable - options { - id - adminName - swatchValue - sortOrder - attributeId - attribute { - id - adminName - } - translations { - id - locale - label - attributeOptionId - } - } - translations { - id - locale - name - attributeId - } - } - } - } - } - ~~~ -::: details Response - -~~~json -{ - "data": { - "attributeGroups": { - "paginatorInfo": { - "count": 5, - "currentPage": 1, - "lastPage": 1, - "total": 5 - }, - "data": [ - { - "id": "1", - "name": "General", - "position": 1, - "isUserDefined": false, - "attributeFamilyId": "1", - "customAttributes": [ - { - "id": "1", - "code": "sku", - "adminName": "SKU", - "type": "text", - "position": 1, - "isRequired": true, - "isUnique": true, - "validation": null, - "valuePerLocale": false, - "valuePerChannel": false, - "isFilterable": false, - "isConfigurable": false, - "isVisibleOnFront": false, - "isUserDefined": false, - "swatchType": null, - "useInFlat": true, - "isComparable": false, - "options": [], - "translations": [ - { - "id": "1", - "locale": "en", - "name": "SKU", - "attributeId": "1" - } - ] - }, - { - "id": "27", - "code": "product_number", - "adminName": "Product Number", - "type": "text", - "position": 2, - "isRequired": false, - "isUnique": true, - "validation": null, - "valuePerLocale": false, - "valuePerChannel": false, - "isFilterable": false, - "isConfigurable": false, - "isVisibleOnFront": false, - "isUserDefined": false, - "swatchType": null, - "useInFlat": true, - "isComparable": false, - "options": [], - "translations": [ - { - "id": "27", - "locale": "en", - "name": "Product Number", - "attributeId": "27" - } - ] - }, - { - "id": "2", - "code": "name", - "adminName": "Name", - "type": "text", - "position": 3, - "isRequired": true, - "isUnique": false, - "validation": null, - "valuePerLocale": true, - "valuePerChannel": true, - "isFilterable": false, - "isConfigurable": false, - "isVisibleOnFront": false, - "isUserDefined": false, - "swatchType": null, - "useInFlat": true, - "isComparable": true, - "options": [], - "translations": [ - { - "id": "2", - "locale": "en", - "name": "Name", - "attributeId": "2" - } - ] - }, - { - "id": "3", - "code": "url_key", - "adminName": "URL Key", - "type": "text", - "position": 4, - "isRequired": true, - "isUnique": true, - "validation": null, - "valuePerLocale": false, - "valuePerChannel": false, - "isFilterable": false, - "isConfigurable": false, - "isVisibleOnFront": false, - "isUserDefined": false, - "swatchType": null, - "useInFlat": true, - "isComparable": false, - "options": [], - "translations": [ - { - "id": "3", - "locale": "en", - "name": "URL Key", - "attributeId": "3" - } - ] - }, - { - "id": "4", - "code": "tax_category_id", - "adminName": "Tax Category", - "type": "select", - "position": 5, - "isRequired": false, - "isUnique": false, - "validation": null, - "valuePerLocale": false, - "valuePerChannel": true, - "isFilterable": false, - "isConfigurable": false, - "isVisibleOnFront": false, - "isUserDefined": false, - "swatchType": null, - "useInFlat": true, - "isComparable": false, - "options": [], - "translations": [ - { - "id": "4", - "locale": "en", - "name": "Tax Category", - "attributeId": "4" - } - ] - }, - { - "id": "5", - "code": "new", - "adminName": "New", - "type": "boolean", - "position": 6, - "isRequired": false, - "isUnique": false, - "validation": null, - "valuePerLocale": false, - "valuePerChannel": false, - "isFilterable": false, - "isConfigurable": false, - "isVisibleOnFront": false, - "isUserDefined": false, - "swatchType": null, - "useInFlat": true, - "isComparable": false, - "options": [], - "translations": [ - { - "id": "5", - "locale": "en", - "name": "New", - "attributeId": "5" - } - ] - }, - { - "id": "6", - "code": "featured", - "adminName": "Featured", - "type": "boolean", - "position": 7, - "isRequired": false, - "isUnique": false, - "validation": null, - "valuePerLocale": false, - "valuePerChannel": false, - "isFilterable": false, - "isConfigurable": false, - "isVisibleOnFront": false, - "isUserDefined": false, - "swatchType": null, - "useInFlat": true, - "isComparable": false, - "options": [], - "translations": [ - { - "id": "6", - "locale": "en", - "name": "Featured", - "attributeId": "6" - } - ] - }, - { - "id": "7", - "code": "visible_individually", - "adminName": "Visible Individually", - "type": "boolean", - "position": 9, - "isRequired": true, - "isUnique": false, - "validation": null, - "valuePerLocale": false, - "valuePerChannel": false, - "isFilterable": false, - "isConfigurable": false, - "isVisibleOnFront": false, - "isUserDefined": false, - "swatchType": null, - "useInFlat": true, - "isComparable": false, - "options": [], - "translations": [ - { - "id": "7", - "locale": "en", - "name": "Visible Individually", - "attributeId": "7" - } - ] - }, - { - "id": "26", - "code": "guest_checkout", - "adminName": "Guest Checkout", - "type": "boolean", - "position": 8, - "isRequired": true, - "isUnique": false, - "validation": null, - "valuePerLocale": false, - "valuePerChannel": false, - "isFilterable": false, - "isConfigurable": false, - "isVisibleOnFront": false, - "isUserDefined": false, - "swatchType": null, - "useInFlat": true, - "isComparable": false, - "options": [], - "translations": [ - { - "id": "26", - "locale": "en", - "name": "Allow Guest Checkout", - "attributeId": "26" - } - ] - }, - { - "id": "8", - "code": "status", - "adminName": "Status", - "type": "boolean", - "position": 10, - "isRequired": true, - "isUnique": false, - "validation": null, - "valuePerLocale": false, - "valuePerChannel": false, - "isFilterable": false, - "isConfigurable": false, - "isVisibleOnFront": false, - "isUserDefined": false, - "swatchType": null, - "useInFlat": true, - "isComparable": false, - "options": [], - "translations": [ - { - "id": "8", - "locale": "en", - "name": "Status", - "attributeId": "8" - } - ] - }, - { - "id": "23", - "code": "color", - "adminName": "Color", - "type": "select", - "position": 26, - "isRequired": false, - "isUnique": false, - "validation": null, - "valuePerLocale": false, - "valuePerChannel": false, - "isFilterable": true, - "isConfigurable": true, - "isVisibleOnFront": false, - "isUserDefined": true, - "swatchType": null, - "useInFlat": true, - "isComparable": false, - "options": [ - { - "id": "1", - "adminName": "Red", - "swatchValue": null, - "sortOrder": 1, - "attributeId": "23", - "attribute": { - "id": "23", - "adminName": "Color" - }, - "translations": [ - { - "id": "1", - "locale": "en", - "label": "Red", - "attributeOptionId": "1" - } - ] - }, - { - "id": "2", - "adminName": "Green", - "swatchValue": null, - "sortOrder": 2, - "attributeId": "23", - "attribute": { - "id": "23", - "adminName": "Color" - }, - "translations": [ - { - "id": "2", - "locale": "en", - "label": "Green", - "attributeOptionId": "2" - } - ] - }, - { - "id": "3", - "adminName": "Yellow", - "swatchValue": null, - "sortOrder": 3, - "attributeId": "23", - "attribute": { - "id": "23", - "adminName": "Color" - }, - "translations": [ - { - "id": "3", - "locale": "en", - "label": "Yellow", - "attributeOptionId": "3" - } - ] - }, - { - "id": "4", - "adminName": "Black", - "swatchValue": null, - "sortOrder": 4, - "attributeId": "23", - "attribute": { - "id": "23", - "adminName": "Color" - }, - "translations": [ - { - "id": "4", - "locale": "en", - "label": "Black", - "attributeOptionId": "4" - } - ] - }, - { - "id": "5", - "adminName": "White", - "swatchValue": null, - "sortOrder": 5, - "attributeId": "23", - "attribute": { - "id": "23", - "adminName": "Color" - }, - "translations": [ - { - "id": "5", - "locale": "en", - "label": "White", - "attributeOptionId": "5" - } - ] - } - ], - "translations": [ - { - "id": "23", - "locale": "en", - "name": "Color", - "attributeId": "23" - } - ] - }, - { - "id": "24", - "code": "size", - "adminName": "Size", - "type": "select", - "position": 27, - "isRequired": false, - "isUnique": false, - "validation": null, - "valuePerLocale": false, - "valuePerChannel": false, - "isFilterable": true, - "isConfigurable": true, - "isVisibleOnFront": false, - "isUserDefined": true, - "swatchType": null, - "useInFlat": true, - "isComparable": false, - "options": [ - { - "id": "6", - "adminName": "S", - "swatchValue": null, - "sortOrder": 1, - "attributeId": "24", - "attribute": { - "id": "24", - "adminName": "Size" - }, - "translations": [ - { - "id": "6", - "locale": "en", - "label": "S", - "attributeOptionId": "6" - } - ] - }, - { - "id": "7", - "adminName": "M", - "swatchValue": null, - "sortOrder": 2, - "attributeId": "24", - "attribute": { - "id": "24", - "adminName": "Size" - }, - "translations": [ - { - "id": "7", - "locale": "en", - "label": "M", - "attributeOptionId": "7" - } - ] - }, - { - "id": "8", - "adminName": "L", - "swatchValue": null, - "sortOrder": 3, - "attributeId": "24", - "attribute": { - "id": "24", - "adminName": "Size" - }, - "translations": [ - { - "id": "8", - "locale": "en", - "label": "L", - "attributeOptionId": "8" - } - ] - }, - { - "id": "9", - "adminName": "XL", - "swatchValue": null, - "sortOrder": 4, - "attributeId": "24", - "attribute": { - "id": "24", - "adminName": "Size" - }, - "translations": [ - { - "id": "9", - "locale": "en", - "label": "XL", - "attributeOptionId": "9" - } - ] - } - ], - "translations": [ - { - "id": "24", - "locale": "en", - "name": "Size", - "attributeId": "24" - } - ] - }, - { - "id": "25", - "code": "brand", - "adminName": "Brand", - "type": "select", - "position": 28, - "isRequired": false, - "isUnique": false, - "validation": null, - "valuePerLocale": false, - "valuePerChannel": false, - "isFilterable": true, - "isConfigurable": false, - "isVisibleOnFront": true, - "isUserDefined": true, - "swatchType": null, - "useInFlat": true, - "isComparable": false, - "options": [], - "translations": [ - { - "id": "25", - "locale": "en", - "name": "Brand", - "attributeId": "25" - } - ] - } - ] - }, - { - "id": "2", - "name": "Description", - "position": 2, - "isUserDefined": false, - "attributeFamilyId": "1", - "customAttributes": [ - { - "id": "9", - "code": "short_description", - "adminName": "Short Description", - "type": "textarea", - "position": 11, - "isRequired": true, - "isUnique": false, - "validation": null, - "valuePerLocale": true, - "valuePerChannel": true, - "isFilterable": false, - "isConfigurable": false, - "isVisibleOnFront": false, - "isUserDefined": false, - "swatchType": null, - "useInFlat": true, - "isComparable": false, - "options": [], - "translations": [ - { - "id": "9", - "locale": "en", - "name": "Short Description", - "attributeId": "9" - } - ] - }, - { - "id": "10", - "code": "description", - "adminName": "Description", - "type": "textarea", - "position": 12, - "isRequired": true, - "isUnique": false, - "validation": null, - "valuePerLocale": true, - "valuePerChannel": true, - "isFilterable": false, - "isConfigurable": false, - "isVisibleOnFront": false, - "isUserDefined": false, - "swatchType": null, - "useInFlat": true, - "isComparable": true, - "options": [], - "translations": [ - { - "id": "10", - "locale": "en", - "name": "Description", - "attributeId": "10" - } - ] - } - ] - }, - { - "id": "3", - "name": "Meta Description", - "position": 3, - "isUserDefined": false, - "attributeFamilyId": "1", - "customAttributes": [ - { - "id": "16", - "code": "meta_title", - "adminName": "Meta Title", - "type": "textarea", - "position": 18, - "isRequired": false, - "isUnique": false, - "validation": null, - "valuePerLocale": true, - "valuePerChannel": true, - "isFilterable": false, - "isConfigurable": false, - "isVisibleOnFront": false, - "isUserDefined": false, - "swatchType": null, - "useInFlat": true, - "isComparable": false, - "options": [], - "translations": [ - { - "id": "16", - "locale": "en", - "name": "Meta Description", - "attributeId": "16" - } - ] - }, - { - "id": "17", - "code": "meta_keywords", - "adminName": "Meta Keywords", - "type": "textarea", - "position": 20, - "isRequired": false, - "isUnique": false, - "validation": null, - "valuePerLocale": true, - "valuePerChannel": true, - "isFilterable": false, - "isConfigurable": false, - "isVisibleOnFront": false, - "isUserDefined": false, - "swatchType": null, - "useInFlat": true, - "isComparable": false, - "options": [], - "translations": [ - { - "id": "17", - "locale": "en", - "name": "Meta Keywords", - "attributeId": "17" - } - ] - }, - { - "id": "18", - "code": "meta_description", - "adminName": "Meta Description", - "type": "textarea", - "position": 21, - "isRequired": false, - "isUnique": false, - "validation": null, - "valuePerLocale": true, - "valuePerChannel": true, - "isFilterable": false, - "isConfigurable": false, - "isVisibleOnFront": false, - "isUserDefined": true, - "swatchType": null, - "useInFlat": true, - "isComparable": false, - "options": [], - "translations": [ - { - "id": "18", - "locale": "en", - "name": "Meta Description", - "attributeId": "18" - } - ] - } - ] - }, - { - "id": "4", - "name": "Price", - "position": 4, - "isUserDefined": false, - "attributeFamilyId": "1", - "customAttributes": [ - { - "id": "11", - "code": "price", - "adminName": "Price", - "type": "price", - "position": 13, - "isRequired": true, - "isUnique": false, - "validation": "decimal", - "valuePerLocale": false, - "valuePerChannel": false, - "isFilterable": true, - "isConfigurable": false, - "isVisibleOnFront": false, - "isUserDefined": false, - "swatchType": null, - "useInFlat": true, - "isComparable": true, - "options": [], - "translations": [ - { - "id": "11", - "locale": "en", - "name": "Price", - "attributeId": "11" - } - ] - }, - { - "id": "12", - "code": "cost", - "adminName": "Cost", - "type": "price", - "position": 14, - "isRequired": false, - "isUnique": false, - "validation": "decimal", - "valuePerLocale": false, - "valuePerChannel": true, - "isFilterable": false, - "isConfigurable": false, - "isVisibleOnFront": false, - "isUserDefined": true, - "swatchType": null, - "useInFlat": true, - "isComparable": false, - "options": [], - "translations": [ - { - "id": "12", - "locale": "en", - "name": "Cost", - "attributeId": "12" - } - ] - }, - { - "id": "13", - "code": "special_price", - "adminName": "Special Price", - "type": "price", - "position": 15, - "isRequired": false, - "isUnique": false, - "validation": "decimal", - "valuePerLocale": false, - "valuePerChannel": false, - "isFilterable": false, - "isConfigurable": false, - "isVisibleOnFront": false, - "isUserDefined": false, - "swatchType": null, - "useInFlat": true, - "isComparable": false, - "options": [], - "translations": [ - { - "id": "13", - "locale": "en", - "name": "Special Price", - "attributeId": "13" - } - ] - }, - { - "id": "14", - "code": "special_price_from", - "adminName": "Special Price From", - "type": "date", - "position": 16, - "isRequired": false, - "isUnique": false, - "validation": null, - "valuePerLocale": false, - "valuePerChannel": true, - "isFilterable": false, - "isConfigurable": false, - "isVisibleOnFront": false, - "isUserDefined": false, - "swatchType": null, - "useInFlat": true, - "isComparable": false, - "options": [], - "translations": [ - { - "id": "14", - "locale": "en", - "name": "Special Price From", - "attributeId": "14" - } - ] - }, - { - "id": "15", - "code": "special_price_to", - "adminName": "Special Price To", - "type": "date", - "position": 17, - "isRequired": false, - "isUnique": false, - "validation": null, - "valuePerLocale": false, - "valuePerChannel": true, - "isFilterable": false, - "isConfigurable": false, - "isVisibleOnFront": false, - "isUserDefined": false, - "swatchType": null, - "useInFlat": true, - "isComparable": false, - "options": [], - "translations": [ - { - "id": "15", - "locale": "en", - "name": "Special Price To", - "attributeId": "15" - } - ] - } - ] - }, - { - "id": "5", - "name": "Shipping", - "position": 5, - "isUserDefined": false, - "attributeFamilyId": "1", - "customAttributes": [ - { - "id": "19", - "code": "width", - "adminName": "Width", - "type": "text", - "position": 22, - "isRequired": false, - "isUnique": false, - "validation": "decimal", - "valuePerLocale": false, - "valuePerChannel": false, - "isFilterable": false, - "isConfigurable": false, - "isVisibleOnFront": false, - "isUserDefined": true, - "swatchType": null, - "useInFlat": true, - "isComparable": false, - "options": [], - "translations": [ - { - "id": "19", - "locale": "en", - "name": "Width", - "attributeId": "19" - } - ] - }, - { - "id": "20", - "code": "height", - "adminName": "Height", - "type": "text", - "position": 23, - "isRequired": false, - "isUnique": false, - "validation": "decimal", - "valuePerLocale": false, - "valuePerChannel": false, - "isFilterable": false, - "isConfigurable": false, - "isVisibleOnFront": false, - "isUserDefined": true, - "swatchType": null, - "useInFlat": true, - "isComparable": false, - "options": [], - "translations": [ - { - "id": "20", - "locale": "en", - "name": "Height", - "attributeId": "20" - } - ] - }, - { - "id": "21", - "code": "depth", - "adminName": "Depth", - "type": "text", - "position": 24, - "isRequired": false, - "isUnique": false, - "validation": "decimal", - "valuePerLocale": false, - "valuePerChannel": false, - "isFilterable": false, - "isConfigurable": false, - "isVisibleOnFront": false, - "isUserDefined": true, - "swatchType": null, - "useInFlat": true, - "isComparable": false, - "options": [], - "translations": [ - { - "id": "21", - "locale": "en", - "name": "Depth", - "attributeId": "21" - } - ] - }, - { - "id": "22", - "code": "weight", - "adminName": "Weight", - "type": "text", - "position": 25, - "isRequired": true, - "isUnique": false, - "validation": "decimal", - "valuePerLocale": false, - "valuePerChannel": false, - "isFilterable": false, - "isConfigurable": false, - "isVisibleOnFront": false, - "isUserDefined": false, - "swatchType": null, - "useInFlat": true, - "isComparable": false, - "options": [], - "translations": [ - { - "id": "22", - "locale": "en", - "name": "Weight", - "attributeId": "22" - } - ] - } - ] - } - ] - } - } -} -~~~ -::: - -## Get Attribute Group By ID - -To get the specific Attribute Group, you have to pass an `id` field with query request .By using this resource and request payload, you will get only a single object under the `data` object in response. - -- Headers - - | Key | Value | - | ------------- | --------------------- | - | Accept | application/json | - | Authorization | Bearer `token-string` | - -### Examples - -Let's take an example, - -- Request Query - ~~~Query - query attributeGroup { - attributeGroup(id: 2) { - id - name - position - isUserDefined - attributeFamilyId - customAttributes { - id - code - adminName - type - position - isRequired - isUnique - validation - valuePerLocale - valuePerChannel - isFilterable - isConfigurable - isVisibleOnFront - isUserDefined - swatchType - useInFlat - isComparable - options { - id - adminName - swatchValue - sortOrder - attributeId - attribute { - id - adminName - } - translations { - id - locale - label - attributeOptionId - } - } - translations { - id - locale - name - attributeId - } - } - } - } - ~~~ -::: details Response - ~~~json - { - "data": { - "attributeGroup": { - "id": "2", - "name": "Description", - "position": 2, - "isUserDefined": false, - "attributeFamilyId": "1", - "customAttributes": [ - { - "id": "9", - "code": "short_description", - "adminName": "Short Description", - "type": "textarea", - "position": 11, - "isRequired": true, - "isUnique": false, - "validation": null, - "valuePerLocale": true, - "valuePerChannel": true, - "isFilterable": false, - "isConfigurable": false, - "isVisibleOnFront": false, - "isUserDefined": false, - "swatchType": null, - "useInFlat": true, - "isComparable": false, - "options": [], - "translations": [ - { - "id": "9", - "locale": "en", - "name": "Short Description", - "attributeId": "9" - } - ] - }, - { - "id": "10", - "code": "description", - "adminName": "Description", - "type": "textarea", - "position": 12, - "isRequired": true, - "isUnique": false, - "validation": null, - "valuePerLocale": true, - "valuePerChannel": true, - "isFilterable": false, - "isConfigurable": false, - "isVisibleOnFront": false, - "isUserDefined": false, - "swatchType": null, - "useInFlat": true, - "isComparable": true, - "options": [], - "translations": [ - { - "id": "10", - "locale": "en", - "name": "Description", - "attributeId": "10" - } - ] - } - ] - } - } - } - ~~~ - -::: - - -## Create a new Attribute Group - - To create a Attribute Group, you have to perform mutation on Attribute Group and paas the related fields in the request. - API call resource will create a new Attribute Group, only if the admin has logged in. - - - Headers - - | Key | Value | - | ------------- | --------------------- | - | Accept | application/json | - | Authorization | Bearer `token-string` | - - ### Examples - - Let's take an example, - -- Request Mutation - ~~~Mutation - mutation createAttributeGroup { - createAttributeGroup(input: { - name: "Dummy Group" - position: 8 - isUserDefined: true - attributeFamilyId: 1 - }) { - id - name - position - isUserDefined - attributeFamilyId - customAttributes { - id - code - adminName - type - position - isRequired - isUnique - validation - valuePerLocale - valuePerChannel - isFilterable - isConfigurable - isVisibleOnFront - isUserDefined - swatchType - useInFlat - isComparable - options { - id - adminName - swatchValue - sortOrder - attributeId - attribute { - id - adminName - } - translations { - id - locale - label - attributeOptionId - } - } - translations { - id - locale - name - attributeId - } - } - } - } - ~~~ - -::: details Response - ~~~json - { - "data": { - "createAttributeGroup": { - "id": "6", - "name": "Dummy Group", - "position": 8, - "isUserDefined": true, - "attributeFamilyId": "1", - "customAttributes": [] - } - } - } - ~~~ -::: - -## Update a Attribute Group - -By using this API call you can update the Attribute Group. To do this , you have to perform update mutation on Attribute Group and paas the related fields in the request. -API call will update a Attribute Group, only if the admin has logged in. - - - - Headers - - | Key | Value | - | ------------- | --------------------- | - | Accept | application/json | - | Authorization | Bearer `token-string` | - -### Examples - - Let's take an example, - -- Request Mutation - ~~~Mutation - mutation updateAttributeGroup { - updateAttributeGroup(id: 6, input: { - name: "New Group" - position: 4 - isUserDefined: true - attributeFamilyId: 1 - }) { - id - name - position - isUserDefined - attributeFamilyId - customAttributes { - id - code - adminName - type - position - isRequired - isUnique - validation - valuePerLocale - valuePerChannel - isFilterable - isConfigurable - isVisibleOnFront - isUserDefined - swatchType - useInFlat - isComparable - options { - id - adminName - swatchValue - sortOrder - attributeId - attribute { - id - adminName - } - translations { - id - locale - label - attributeOptionId - } - } - translations { - id - locale - name - attributeId - } - } - } - } - ~~~ - -::: details Response - ~~~json - { - "data": { - "updateAttributeGroup": { - "id": "6", - "name": "New Group", - "position": 4, - "isUserDefined": true, - "attributeFamilyId": "1", - "customAttributes": [] - } - } - } - ~~~ -::: - -## Delete a Attribute Group - -To delete a Attribute Group, you have to perform mutation on Attribute Group by passing the id of that Attribute Group. -API call will delete a Attribute Group, only if the admin has logged in. - -- Headers - - | Key | Value | - | ------------- | --------------------- | - | Accept | application/json | - | Authorization | Bearer `token-string` | - -### Examples - - Let's take an example, - -- Request Mutation - ~~~Mutation - mutation deleteAttributeGroup { - deleteAttributeGroup(id: 6) { - success - } - } - ~~~ - -::: details Response - ~~~json - { - "data": { - "deleteAttributeGroup": { - "success": "Attribute Group deleted successfully." - } - } - } - ~~~ -::: diff --git a/docs/1.x/graphql-admin-api/attributes.md b/docs/1.x/graphql-admin-api/attributes.md deleted file mode 100644 index 6e542a12..00000000 --- a/docs/1.x/graphql-admin-api/attributes.md +++ /dev/null @@ -1,1556 +0,0 @@ -# Attributes - -In this section, we will see all the APIs which are related to Attributes. - -## Get All Attributes - -You can get all the Attributes from the Bagisto store. You can achieve this job by using the `Attributes` API call. - -- Headers - - | Key | Value | - | ------------- | ---------------- | - | Accept | application/json | - -- Single Request Endpoint - - `POST http(s)://example.com/graphql` - -::: tip - - If you are using pagination and want to know more info about responses then check the [explanation](./explanation) portion. - -::: - -**Note**: You can pass all the related fileds that you want in response. - -- Query - ~~~query - query attributes { - attributes(page: 1) { - paginatorInfo { - count - currentPage - lastPage - total - } - data { - id - code - adminName - type - position - isRequired - isUnique - validation - valuePerLocale - valuePerChannel - isFilterable - isConfigurable - isVisibleOnFront - isUserDefined - swatchType - useInFlat - isComparable - options { - id - adminName - swatchValue - sortOrder - attributeId - attribute { - id - adminName - } - translations { - id - locale - label - attributeOptionId - } - } - translations { - id - locale - name - attributeId - } - } - } - } - ~~~ - -::: details Response - -~~~json -{ - "data": { - "attributes": { - "paginatorInfo": { - "count": 10, - "currentPage": 1, - "lastPage": 3, - "total": 27 - }, - "data": [ - { - "id": "1", - "code": "sku", - "adminName": "SKU", - "type": "text", - "position": 1, - "isRequired": true, - "isUnique": true, - "validation": null, - "valuePerLocale": false, - "valuePerChannel": false, - "isFilterable": false, - "isConfigurable": false, - "isVisibleOnFront": false, - "isUserDefined": false, - "swatchType": null, - "useInFlat": true, - "isComparable": false, - "options": [], - "translations": [ - { - "id": "1", - "locale": "en", - "name": "SKU", - "attributeId": "1" - } - ] - }, - { - "id": "2", - "code": "name", - "adminName": "Name", - "type": "text", - "position": 3, - "isRequired": true, - "isUnique": false, - "validation": null, - "valuePerLocale": true, - "valuePerChannel": true, - "isFilterable": false, - "isConfigurable": false, - "isVisibleOnFront": false, - "isUserDefined": false, - "swatchType": null, - "useInFlat": true, - "isComparable": true, - "options": [], - "translations": [ - { - "id": "2", - "locale": "en", - "name": "Name", - "attributeId": "2" - } - ] - }, - { - "id": "3", - "code": "url_key", - "adminName": "URL Key", - "type": "text", - "position": 4, - "isRequired": true, - "isUnique": true, - "validation": null, - "valuePerLocale": false, - "valuePerChannel": false, - "isFilterable": false, - "isConfigurable": false, - "isVisibleOnFront": false, - "isUserDefined": false, - "swatchType": null, - "useInFlat": true, - "isComparable": false, - "options": [], - "translations": [ - { - "id": "3", - "locale": "en", - "name": "URL Key", - "attributeId": "3" - } - ] - }, - { - "id": "4", - "code": "tax_category_id", - "adminName": "Tax Category", - "type": "select", - "position": 5, - "isRequired": false, - "isUnique": false, - "validation": null, - "valuePerLocale": false, - "valuePerChannel": true, - "isFilterable": false, - "isConfigurable": false, - "isVisibleOnFront": false, - "isUserDefined": false, - "swatchType": null, - "useInFlat": true, - "isComparable": false, - "options": [], - "translations": [ - { - "id": "4", - "locale": "en", - "name": "Tax Category", - "attributeId": "4" - } - ] - }, - { - "id": "5", - "code": "new", - "adminName": "New", - "type": "boolean", - "position": 6, - "isRequired": false, - "isUnique": false, - "validation": null, - "valuePerLocale": false, - "valuePerChannel": false, - "isFilterable": false, - "isConfigurable": false, - "isVisibleOnFront": false, - "isUserDefined": false, - "swatchType": null, - "useInFlat": true, - "isComparable": false, - "options": [], - "translations": [ - { - "id": "5", - "locale": "en", - "name": "New", - "attributeId": "5" - } - ] - }, - { - "id": "6", - "code": "featured", - "adminName": "Featured", - "type": "boolean", - "position": 7, - "isRequired": false, - "isUnique": false, - "validation": null, - "valuePerLocale": false, - "valuePerChannel": false, - "isFilterable": false, - "isConfigurable": false, - "isVisibleOnFront": false, - "isUserDefined": false, - "swatchType": null, - "useInFlat": true, - "isComparable": false, - "options": [], - "translations": [ - { - "id": "6", - "locale": "en", - "name": "Featured", - "attributeId": "6" - } - ] - }, - { - "id": "7", - "code": "visible_individually", - "adminName": "Visible Individually", - "type": "boolean", - "position": 9, - "isRequired": true, - "isUnique": false, - "validation": null, - "valuePerLocale": false, - "valuePerChannel": false, - "isFilterable": false, - "isConfigurable": false, - "isVisibleOnFront": false, - "isUserDefined": false, - "swatchType": null, - "useInFlat": true, - "isComparable": false, - "options": [], - "translations": [ - { - "id": "7", - "locale": "en", - "name": "Visible Individually", - "attributeId": "7" - } - ] - }, - { - "id": "8", - "code": "status", - "adminName": "Status", - "type": "boolean", - "position": 10, - "isRequired": true, - "isUnique": false, - "validation": null, - "valuePerLocale": false, - "valuePerChannel": false, - "isFilterable": false, - "isConfigurable": false, - "isVisibleOnFront": false, - "isUserDefined": false, - "swatchType": null, - "useInFlat": true, - "isComparable": false, - "options": [], - "translations": [ - { - "id": "8", - "locale": "en", - "name": "Status", - "attributeId": "8" - } - ] - }, - { - "id": "9", - "code": "short_description", - "adminName": "Short Description", - "type": "textarea", - "position": 11, - "isRequired": true, - "isUnique": false, - "validation": null, - "valuePerLocale": true, - "valuePerChannel": true, - "isFilterable": false, - "isConfigurable": false, - "isVisibleOnFront": false, - "isUserDefined": false, - "swatchType": null, - "useInFlat": true, - "isComparable": false, - "options": [], - "translations": [ - { - "id": "9", - "locale": "en", - "name": "Short Description", - "attributeId": "9" - } - ] - }, - { - "id": "10", - "code": "description", - "adminName": "Description", - "type": "textarea", - "position": 12, - "isRequired": true, - "isUnique": false, - "validation": null, - "valuePerLocale": true, - "valuePerChannel": true, - "isFilterable": false, - "isConfigurable": false, - "isVisibleOnFront": false, - "isUserDefined": false, - "swatchType": null, - "useInFlat": true, - "isComparable": true, - "options": [], - "translations": [ - { - "id": "10", - "locale": "en", - "name": "Description", - "attributeId": "10" - } - ] - } - ] - } - } -} -~~~ -::: - -## Get Attribute Data By ID - -To get the specific Attribute, you have to pass an `id` field with query request .By using this resource and request payload, you will get only a single object under the `data` object in response. - -- Headers - - | Key | Value | - | ------------- | --------------------- | - | Accept | application/json | - | Authorization | Bearer `token-string` | - -### Examples - -Let's take an example, - -- Request Query - ~~~Query - query attribute { - attribute(id: 1) { - id - code - adminName - type - position - isRequired - isUnique - validation - valuePerLocale - valuePerChannel - isFilterable - isConfigurable - isVisibleOnFront - isUserDefined - swatchType - useInFlat - isComparable - options { - id - adminName - swatchValue - sortOrder - attributeId - attribute { - id - adminName - } - translations { - id - locale - label - attributeOptionId - } - } - translations { - id - locale - name - attributeId - } - } - } - ~~~ - -::: details Response - ~~~json - { - "data": { - "attribute": { - "id": "1", - "code": "sku", - "adminName": "SKU", - "type": "text", - "position": 1, - "isRequired": true, - "isUnique": true, - "validation": null, - "valuePerLocale": false, - "valuePerChannel": false, - "isFilterable": false, - "isConfigurable": false, - "isVisibleOnFront": false, - "isUserDefined": false, - "swatchType": null, - "useInFlat": true, - "isComparable": false, - "options": [], - "translations": [ - { - "id": "1", - "locale": "en", - "name": "SKU", - "attributeId": "1" - } - ] - } - } - } - ~~~ - -::: - -## Get Filtered Attributes - -You can get the filter data from the Attributes by passing the input fileds in the request and that you want in the response. - -- Headers - - | Key | Value | - | ------------- | --------------------- | - | Accept | application/json | - | Authorization | Bearer `token-string` | - -**Note**: You can pass all the related fileds that you want in response. - -### Examples - -Let's take an example, - -- Request Query - -~~~query - query attributes { - attributes( - page: 1, - input: { - code: "size" - } - ) { - paginatorInfo { - count - currentPage - lastPage - total - } - data { - id - code - adminName - type - position - isRequired - isUnique - validation - valuePerLocale - valuePerChannel - isFilterable - isConfigurable - isVisibleOnFront - isUserDefined - swatchType - useInFlat - isComparable - options { - id - adminName - swatchValue - sortOrder - attributeId - attribute { - id - adminName - } - translations { - id - locale - label - attributeOptionId - } - } - translations { - id - locale - name - attributeId - } - } - } - } -~~~ - -::: details Response - ~~~json - { - "data": { - "attributes": { - "paginatorInfo": { - "count": 1, - "currentPage": 1, - "lastPage": 1, - "total": 1 - }, - "data": [ - { - "id": "24", - "code": "size", - "adminName": "Size", - "type": "select", - "position": 27, - "isRequired": false, - "isUnique": false, - "validation": null, - "valuePerLocale": false, - "valuePerChannel": false, - "isFilterable": true, - "isConfigurable": true, - "isVisibleOnFront": false, - "isUserDefined": true, - "swatchType": null, - "useInFlat": true, - "isComparable": false, - "options": [ - { - "id": "6", - "adminName": "S", - "swatchValue": null, - "sortOrder": 1, - "attributeId": "24", - "attribute": { - "id": "24", - "adminName": "Size" - }, - "translations": [ - { - "id": "6", - "locale": "en", - "label": "S", - "attributeOptionId": "6" - } - ] - }, - { - "id": "7", - "adminName": "M", - "swatchValue": null, - "sortOrder": 2, - "attributeId": "24", - "attribute": { - "id": "24", - "adminName": "Size" - }, - "translations": [ - { - "id": "7", - "locale": "en", - "label": "M", - "attributeOptionId": "7" - } - ] - }, - { - "id": "8", - "adminName": "L", - "swatchValue": null, - "sortOrder": 3, - "attributeId": "24", - "attribute": { - "id": "24", - "adminName": "Size" - }, - "translations": [ - { - "id": "8", - "locale": "en", - "label": "L", - "attributeOptionId": "8" - } - ] - }, - { - "id": "9", - "adminName": "XL", - "swatchValue": null, - "sortOrder": 4, - "attributeId": "24", - "attribute": { - "id": "24", - "adminName": "Size" - }, - "translations": [ - { - "id": "9", - "locale": "en", - "label": "XL", - "attributeOptionId": "9" - } - ] - } - ], - "translations": [ - { - "id": "24", - "locale": "en", - "name": "Size", - "attributeId": "24" - } - ] - } - ] - } - } - } - ~~~ -::: - - -## Create a new Attribute - - To create a Attribute, you have to perform mutation on Attribute and paas the related fields in the request. - API call resource will create a new Attribute, only if the admin has logged in. - - - Headers - - | Key | Value | - | ------------- | --------------------- | - | Accept | application/json | - | Authorization | Bearer `token-string` | - - ### Examples - - Let's take an example, - -- Request Mutation - ~~~Mutation - mutation createAttribute { - createAttribute(input: { - code: "multi" - type: "select" - adminName: "Multi Option Attr" - translations: [{ - code: "en" - name: "Age Validation" - }, { - code: "fr" - name: "Validation de l'âge" - }, { - code: "nl" - name: "Leeftijd validatie" - }, { - code: "tr" - name: "Yaş Doğrulaması" - }] - isRequired: true - isUnique: false - validation: "" - valuePerLocale: true - valuePerChannel: true - isFilterable: true - isConfigurable: false - isVisibleOnFront: true - useInFlat: false - isComparable: true - swatchType: "image" - options: [{ - adminName: "Option 1" - swatchValue: "http://admin1.saascust.com/cache/medium/product/572/SpKvqowiHC2dkmvRweIsTXiiqmVZAv7UamsmLl6G.jpeg" - translations: [{ - code: "en" - label: "Option 1" - }, { - code: "fr" - label: "Option 1" - }, { - code: "nl" - label: "Optie 1" - }, { - code: "tr" - label: "seçenek 1" - }] - }, { - adminName: "Option 2" - swatchValue: "http://admin1.saascust.com/cache/medium/product/571/xFs7waxcd6MSOO8mWwBX3topPN9r8bWeHOvHz4Zq.jpeg" - translations: [{ - code: "en" - label: "Option 2" - }, { - code: "fr" - label: "Option 2" - }, { - code: "nl" - label: "Optie 2" - }, { - code: "tr" - label: "seçenek 2" - }] - }] - }) { - id - code - adminName - type - position - isRequired - isUnique - validation - valuePerLocale - valuePerChannel - isFilterable - isConfigurable - isVisibleOnFront - isUserDefined - swatchType - useInFlat - isComparable - options { - id - adminName - swatchValue - sortOrder - attributeId - attribute { - id - adminName - } - translations { - id - locale - label - attributeOptionId - } - } - translations { - id - locale - name - attributeId - } - } - } - ~~~ - -::: details Response - ~~~json - { - "data": { - "createAttribute": { - "id": "28", - "code": "multi", - "adminName": "Multi Option Attr", - "type": "select", - "position": null, - "isRequired": true, - "isUnique": false, - "validation": "", - "valuePerLocale": null, - "valuePerChannel": true, - "isFilterable": true, - "isConfigurable": false, - "isVisibleOnFront": true, - "isUserDefined": true, - "swatchType": "image", - "useInFlat": false, - "isComparable": true, - "options": [ - { - "id": "10", - "adminName": "Option 1", - "swatchValue": null, - "sortOrder": 1, - "attributeId": "28", - "attribute": { - "id": "28", - "adminName": "Multi Option Attr" - }, - "translations": [ - { - "id": "10", - "locale": "en", - "label": "Option 1", - "attributeOptionId": "10" - }, - { - "id": "11", - "locale": "nl", - "label": "Optie 1", - "attributeOptionId": "10" - }, - { - "id": "12", - "locale": "tr", - "label": "seçenek 1", - "attributeOptionId": "10" - } - ] - }, - { - "id": "11", - "adminName": "Option 2", - "swatchValue": null, - "sortOrder": 2, - "attributeId": "28", - "attribute": { - "id": "28", - "adminName": "Multi Option Attr" - }, - "translations": [ - { - "id": "13", - "locale": "en", - "label": "Option 2", - "attributeOptionId": "11" - }, - { - "id": "14", - "locale": "nl", - "label": "Optie 2", - "attributeOptionId": "11" - }, - { - "id": "15", - "locale": "tr", - "label": "seçenek 2", - "attributeOptionId": "11" - } - ] - } - ], - "translations": [ - { - "id": "28", - "locale": "en", - "name": "Age Validation", - "attributeId": "28" - }, - { - "id": "29", - "locale": "nl", - "name": "Leeftijd validatie", - "attributeId": "28" - }, - { - "id": "30", - "locale": "tr", - "name": "Yaş Doğrulaması", - "attributeId": "28" - } - ] - } - } - } - ~~~ -::: - -## Update a Attribute - -By using this API call you can update the Attribute. To do this , you have to perform update mutation on Attribute and paas the related fields in the request. -API call will update a Attribute, only if the admin has logged in. - - - - Headers - - | Key | Value | - | ------------- | --------------------- | - | Accept | application/json | - | Authorization | Bearer `token-string` | - -### Examples - - Let's take an example, - -- Request Mutation - ~~~Mutation - mutation updateAttribute { - updateAttribute(id: 28, input: { - code: "multi" - type: "select" - adminName: "Multi Option Attr" - translations: [{ - code: "en" - name: "Age Validation" - }, { - code: "fr" - name: "Validation de l'âge" - }, { - code: "nl" - name: "Leeftijd validatie" - }, { - code: "tr" - name: "Yaş Doğrulaması" - }] - isRequired: true - isUnique: false - validation: "" - valuePerLocale: true - valuePerChannel: true - isFilterable: true - isConfigurable: false - isVisibleOnFront: true - useInFlat: false - isComparable: true - swatchType: "image" - options: [{ - adminName: "Option 1" - swatchValue: "http://admin1.saascust.com/cache/medium/product/572/SpKvqowiHC2dkmvRweIsTXiiqmVZAv7UamsmLl6G.jpeg" - translations: [{ - code: "en" - label: "Option 1" - }, { - code: "fr" - label: "Option 1" - }, { - code: "nl" - label: "Optie 1" - }, { - code: "tr" - label: "seçenek 1" - }] - }, { - adminName: "Option 2" - swatchValue: "http://admin1.saascust.com/cache/medium/product/571/xFs7waxcd6MSOO8mWwBX3topPN9r8bWeHOvHz4Zq.jpeg" - translations: [{ - code: "en" - label: "Option 2" - }, { - code: "fr" - label: "Option 2" - }, { - code: "nl" - label: "Optie 2" - }, { - code: "tr" - label: "seçenek 2" - }] - }, { - adminName: "Option 3" - swatchValue: "http://super.saascust.com/cache/medium/product/447/85Nd2GkelYxn68czxM4gW8QsBpVNcwrN9JVQsLzp.jpeg" - translations: [{ - code: "en" - label: "Option 3" - }, { - code: "fr" - label: "Option 3" - }, { - code: "nl" - label: "Optie 3" - }, { - code: "tr" - label: "seçenek 3" - }] - }] - }) { - id - code - adminName - type - position - isRequired - isUnique - validation - valuePerLocale - valuePerChannel - isFilterable - isConfigurable - isVisibleOnFront - isUserDefined - swatchType - useInFlat - isComparable - options { - id - adminName - swatchValue - sortOrder - attributeId - attribute { - id - adminName - } - translations { - id - locale - label - attributeOptionId - } - } - translations { - id - locale - name - attributeId - } - } - } - ~~~ - -::: details Response - ~~~json - { - "data": { - "updateAttribute": { - "id": "28", - "code": "multi", - "adminName": "Multi Option Attr", - "type": "select", - "position": null, - "isRequired": true, - "isUnique": false, - "validation": "", - "valuePerLocale": false, - "valuePerChannel": true, - "isFilterable": true, - "isConfigurable": false, - "isVisibleOnFront": true, - "isUserDefined": true, - "swatchType": "image", - "useInFlat": false, - "isComparable": true, - "options": [ - { - "id": "12", - "adminName": "Option 1", - "swatchValue": null, - "sortOrder": 1, - "attributeId": "28", - "attribute": { - "id": "28", - "adminName": "Multi Option Attr" - }, - "translations": [ - { - "id": "16", - "locale": "en", - "label": "Option 1", - "attributeOptionId": "12" - }, - { - "id": "17", - "locale": "nl", - "label": "Optie 1", - "attributeOptionId": "12" - }, - { - "id": "18", - "locale": "tr", - "label": "seçenek 1", - "attributeOptionId": "12" - } - ] - }, - { - "id": "13", - "adminName": "Option 2", - "swatchValue": null, - "sortOrder": 2, - "attributeId": "28", - "attribute": { - "id": "28", - "adminName": "Multi Option Attr" - }, - "translations": [ - { - "id": "19", - "locale": "en", - "label": "Option 2", - "attributeOptionId": "13" - }, - { - "id": "20", - "locale": "nl", - "label": "Optie 2", - "attributeOptionId": "13" - }, - { - "id": "21", - "locale": "tr", - "label": "seçenek 2", - "attributeOptionId": "13" - } - ] - }, - { - "id": "14", - "adminName": "Option 3", - "swatchValue": null, - "sortOrder": 3, - "attributeId": "28", - "attribute": { - "id": "28", - "adminName": "Multi Option Attr" - }, - "translations": [ - { - "id": "22", - "locale": "en", - "label": "Option 3", - "attributeOptionId": "14" - }, - { - "id": "23", - "locale": "nl", - "label": "Optie 3", - "attributeOptionId": "14" - }, - { - "id": "24", - "locale": "tr", - "label": "seçenek 3", - "attributeOptionId": "14" - } - ] - } - ], - "translations": [ - { - "id": "28", - "locale": "en", - "name": "Age Validation", - "attributeId": "28" - }, - { - "id": "29", - "locale": "nl", - "name": "Leeftijd validatie", - "attributeId": "28" - }, - { - "id": "30", - "locale": "tr", - "name": "Yaş Doğrulaması", - "attributeId": "28" - } - ] - } - } - } - ~~~ -::: - -## Delete a Attribute - -To delete a Attribute, you have to perform mutation on Attribute by passing the id of that Attribute. -API call will delete a Attribute, only if the admin has logged in. - -- Headers - - | Key | Value | - | ------------- | --------------------- | - | Accept | application/json | - | Authorization | Bearer `token-string` | - -### Examples - - Let's take an example, - -- Request Mutation - ~~~Mutation - mutation deleteAttribute { - deleteAttribute(id: 28) { - success - } - } - - - ~~~ - -::: details Response - ~~~json - { - "data": { - "deleteAttribute": { - "success": "Attribute deleted successfully." - } - } - } - ~~~ -::: - -## Get All Attribute Options - -You can get all the Attribute Options from the Bagisto store. You can achieve this job by using the `Attribute Options` API call. - -- Headers - - | Key | Value | - | ------------- | ---------------- | - | Accept | application/json | - -- Single Request Endpoint - - `POST http(s)://example.com/graphql` - -::: tip - - If you are using pagination and want to know more info about responses then check the [explanation](./explanation) portion. - -::: - -**Note**: You can pass all the related fileds that you want in response. - -- Query - ~~~query - query attributeOptions { - attributeOptions { - paginatorInfo { - count - currentPage - lastPage - total - } - data { - id - adminName - swatchValue - sortOrder - attributeId - attribute { - id - adminName - } - translations { - id - locale - label - attributeOptionId - } - } - } - } - ~~~ -::: details Response - -~~~json -{ - "data": { - "attributeOptions": { - "paginatorInfo": { - "count": 9, - "currentPage": 1, - "lastPage": 1, - "total": 9 - }, - "data": [ - { - "id": "1", - "adminName": "Red", - "swatchValue": null, - "sortOrder": 1, - "attributeId": "23", - "attribute": { - "id": "23", - "adminName": "Color" - }, - "translations": [ - { - "id": "1", - "locale": "en", - "label": "Red", - "attributeOptionId": "1" - } - ] - }, - { - "id": "2", - "adminName": "Green", - "swatchValue": null, - "sortOrder": 2, - "attributeId": "23", - "attribute": { - "id": "23", - "adminName": "Color" - }, - "translations": [ - { - "id": "2", - "locale": "en", - "label": "Green", - "attributeOptionId": "2" - } - ] - }, - { - "id": "3", - "adminName": "Yellow", - "swatchValue": null, - "sortOrder": 3, - "attributeId": "23", - "attribute": { - "id": "23", - "adminName": "Color" - }, - "translations": [ - { - "id": "3", - "locale": "en", - "label": "Yellow", - "attributeOptionId": "3" - } - ] - }, - { - "id": "4", - "adminName": "Black", - "swatchValue": null, - "sortOrder": 4, - "attributeId": "23", - "attribute": { - "id": "23", - "adminName": "Color" - }, - "translations": [ - { - "id": "4", - "locale": "en", - "label": "Black", - "attributeOptionId": "4" - } - ] - }, - { - "id": "5", - "adminName": "White", - "swatchValue": null, - "sortOrder": 5, - "attributeId": "23", - "attribute": { - "id": "23", - "adminName": "Color" - }, - "translations": [ - { - "id": "5", - "locale": "en", - "label": "White", - "attributeOptionId": "5" - } - ] - }, - { - "id": "6", - "adminName": "S", - "swatchValue": null, - "sortOrder": 1, - "attributeId": "24", - "attribute": { - "id": "24", - "adminName": "Size" - }, - "translations": [ - { - "id": "6", - "locale": "en", - "label": "S", - "attributeOptionId": "6" - } - ] - }, - { - "id": "7", - "adminName": "M", - "swatchValue": null, - "sortOrder": 2, - "attributeId": "24", - "attribute": { - "id": "24", - "adminName": "Size" - }, - "translations": [ - { - "id": "7", - "locale": "en", - "label": "M", - "attributeOptionId": "7" - } - ] - }, - { - "id": "8", - "adminName": "L", - "swatchValue": null, - "sortOrder": 3, - "attributeId": "24", - "attribute": { - "id": "24", - "adminName": "Size" - }, - "translations": [ - { - "id": "8", - "locale": "en", - "label": "L", - "attributeOptionId": "8" - } - ] - }, - { - "id": "9", - "adminName": "XL", - "swatchValue": null, - "sortOrder": 4, - "attributeId": "24", - "attribute": { - "id": "24", - "adminName": "Size" - }, - "translations": [ - { - "id": "9", - "locale": "en", - "label": "XL", - "attributeOptionId": "9" - } - ] - } - ] - } - } -} -~~~ -::: - -## Get Attribute Option By ID - -To get the specific Attribute Option, you have to pass an `id` field with query request .By using this resource and request payload, you will get only a single object under the `data` object in response. - -- Headers - - | Key | Value | - | ------------- | --------------------- | - | Accept | application/json | - | Authorization | Bearer `token-string` | - -### Examples - -Let's take an example, - -- Request Query - ~~~Query - query attributeOption { - attributeOption(id: 4) { - id - adminName - swatchValue - sortOrder - attributeId - attribute { - id - adminName - } - translations { - id - locale - label - attributeOptionId - } - } - } - ~~~ - -::: details Response - ~~~json - { - "data": { - "attributeOption": { - "id": "4", - "adminName": "Black", - "swatchValue": null, - "sortOrder": 4, - "attributeId": "23", - "attribute": { - "id": "23", - "adminName": "Color" - }, - "translations": [ - { - "id": "4", - "locale": "en", - "label": "Black", - "attributeOptionId": "4" - } - ] - } - } - } - ~~~ -::: diff --git a/docs/1.x/graphql-admin-api/categories.md b/docs/1.x/graphql-admin-api/categories.md deleted file mode 100644 index 4d76f57a..00000000 --- a/docs/1.x/graphql-admin-api/categories.md +++ /dev/null @@ -1,880 +0,0 @@ -# Categories - -In this section, we will see all the APIs which are related to Categories. - -## Get All Categories - -You can get all the Categories from the Bagisto store. You can achieve this job by using the `Categories` API call. - -- Headers - - | Key | Value | - | ------------- | ---------------- | - | Accept | application/json | - -- Single Request Endpoint - - `POST http(s)://example.com/graphql` - -::: tip - - If you are using pagination and want to know more info about responses then check the [explanation](./explanation) portion. - -::: - -**Note**: You can pass all the related fileds that you want in response. - -- Query - ~~~query - query categories { - categories { - paginatorInfo { - count - currentPage - lastPage - total - } - data { - id - name - description - slug - urlPath - imageUrl - metaTitle - metaDescription - metaKeywords - position - status - displayMode - parentId - filterableAttributes { - id - adminName - code - type - position - } - translations { - id - name - description - localeId - locale - } - createdAt - updatedAt - } - } - } - ~~~ - -::: details Response - -~~~json -{ - "data": { - "categories": { - "paginatorInfo": { - "count": 2, - "currentPage": 1, - "lastPage": 1, - "total": 2 - }, - "data": [ - { - "id": "1", - "name": "Root", - "description": "Root", - "slug": "root", - "urlPath": "", - "imageUrl": null, - "metaTitle": "", - "metaDescription": "", - "metaKeywords": "", - "position": 1, - "status": true, - "displayMode": "products_and_description", - "parentId": null, - "filterableAttributes": [], - "translations": [ - { - "id": "1", - "name": "Root", - "description": "Root", - "localeId": null, - "locale": "en" - } - ], - "createdAt": "2021-05-05 15:36:44", - "updatedAt": "2021-05-05 15:36:44" - }, - { - "id": "2", - "name": "Shop", - "description": "

Test Category

", - "slug": "shop", - "urlPath": "shop", - "imageUrl": "http://localhost/graphql/public/storage/category/2/veI5gArm9nBKUFPwvvmmoRccLdtlJXhHBtaGzL4a.jpg", - "metaTitle": "", - "metaDescription": "", - "metaKeywords": "", - "position": 1, - "status": true, - "displayMode": "products_and_description", - "parentId": "1", - "filterableAttributes": [ - { - "id": "11", - "adminName": "Price", - "code": "price", - "type": "price", - "position": 13 - }, - { - "id": "23", - "adminName": "Color", - "code": "color", - "type": "select", - "position": 26 - }, - { - "id": "24", - "adminName": "Size", - "code": "size", - "type": "select", - "position": 27 - }, - { - "id": "25", - "adminName": "Brand", - "code": "brand", - "type": "select", - "position": 28 - } - ], - "translations": [ - { - "id": "2", - "name": "Shop", - "description": "

Test Category

", - "localeId": "1", - "locale": "en" - }, - { - "id": "3", - "name": "Shop", - "description": "

Test Category

", - "localeId": "3", - "locale": "nl" - }, - { - "id": "4", - "name": "Shop", - "description": "

Test Category

", - "localeId": "4", - "locale": "tr" - } - ], - "createdAt": "2021-05-27 18:06:22", - "updatedAt": "2021-05-27 18:06:23" - } - ] - } - } -} -~~~ -::: - -## Get Category Data By ID - -To get the specific Category, you have to pass an `id` field with query request .By using this resource and request payload, you will get only a single object under the `data` object in response. - -- Headers - - | Key | Value | - | ------------- | --------------------- | - | Accept | application/json | - | Authorization | Bearer `token-string` | - -### Examples - -Let's take an example, - -- Request Query - ~~~Query - query category { - category(id: 2) { - id - name - description - slug - urlPath - imageUrl - metaTitle - metaDescription - metaKeywords - position - status - displayMode - parentId - filterableAttributes { - id - adminName - code - type - position - } - translations { - id - name - description - localeId - locale - } - createdAt - updatedAt - } - } - ~~~ - -::: details Response - ~~~json - { - "data": { - "category": { - "id": "2", - "name": "Shop", - "description": "

Test Category

", - "slug": "shop", - "urlPath": "shop", - "imageUrl": "http://localhost/graphql/public/storage/category/2/veI5gArm9nBKUFPwvvmmoRccLdtlJXhHBtaGzL4a.jpg", - "metaTitle": "", - "metaDescription": "", - "metaKeywords": "", - "position": 1, - "status": true, - "displayMode": "products_and_description", - "parentId": "1", - "filterableAttributes": [ - { - "id": "11", - "adminName": "Price", - "code": "price", - "type": "price", - "position": 13 - }, - { - "id": "23", - "adminName": "Color", - "code": "color", - "type": "select", - "position": 26 - }, - { - "id": "24", - "adminName": "Size", - "code": "size", - "type": "select", - "position": 27 - }, - { - "id": "25", - "adminName": "Brand", - "code": "brand", - "type": "select", - "position": 28 - } - ], - "translations": [ - { - "id": "2", - "name": "Shop", - "description": "

Test Category

", - "localeId": "1", - "locale": "en" - }, - { - "id": "3", - "name": "Shop", - "description": "

Test Category

", - "localeId": "3", - "locale": "nl" - }, - { - "id": "4", - "name": "Shop", - "description": "

Test Category

", - "localeId": "4", - "locale": "tr" - } - ], - "createdAt": "2021-05-27 18:06:22", - "updatedAt": "2021-05-27 18:06:23" - } - } - } - ~~~ - -::: - -## Get Filtered Categories - -You can get the filter data from the Categories by passing the input fileds in the request and that you want in the response. - -- Headers - - | Key | Value | - | ------------- | --------------------- | - | Accept | application/json | - | Authorization | Bearer `token-string` | - -**Note**: You can pass all the related fileds that you want in response. - -### Examples - -Let's take an example, - -- Request Query - -~~~query - query categories { - categories(page:1, input: { - id:2 - name:"Shop" - }) { - paginatorInfo { - count - currentPage - lastPage - total - } - data { - id - name - description - slug - urlPath - imageUrl - metaTitle - metaDescription - metaKeywords - position - status - displayMode - parentId - filterableAttributes { - id - adminName - code - type - position - } - translations { - id - name - description - localeId - locale - } - createdAt - updatedAt - } - } - } -~~~ - -::: details Response - ~~~json - { - "data": { - "categories": { - "paginatorInfo": { - "count": 1, - "currentPage": 1, - "lastPage": 1, - "total": 1 - }, - "data": [ - { - "id": "2", - "name": "Shop", - "description": "

Test Category

", - "slug": "shop", - "urlPath": "shop", - "imageUrl": "http://localhost/graphql/public/storage/category/2/veI5gArm9nBKUFPwvvmmoRccLdtlJXhHBtaGzL4a.jpg", - "metaTitle": "", - "metaDescription": "", - "metaKeywords": "", - "position": 1, - "status": true, - "displayMode": "products_and_description", - "parentId": "1", - "filterableAttributes": [ - { - "id": "11", - "adminName": "Price", - "code": "price", - "type": "price", - "position": 13 - }, - { - "id": "23", - "adminName": "Color", - "code": "color", - "type": "select", - "position": 26 - }, - { - "id": "24", - "adminName": "Size", - "code": "size", - "type": "select", - "position": 27 - }, - { - "id": "25", - "adminName": "Brand", - "code": "brand", - "type": "select", - "position": 28 - } - ], - "translations": [ - { - "id": "2", - "name": "Shop", - "description": "

Test Category

", - "localeId": "1", - "locale": "en" - }, - { - "id": "3", - "name": "Shop", - "description": "

Test Category

", - "localeId": "3", - "locale": "nl" - }, - { - "id": "4", - "name": "Shop", - "description": "

Test Category

", - "localeId": "4", - "locale": "tr" - } - ], - "createdAt": "2021-05-27 18:06:22", - "updatedAt": "2021-05-27 18:06:23" - } - ] - } - } - } - ~~~ -::: - -## Get All Filterable Attributes - -You can get all the Filterable Attributes from the Bagisto store. You can achieve this job by using the `Filterable Attributes` API call. - -- Headers - - | Key | Value | - | ------------- | ---------------- | - | Accept | application/json | - -- Single Request Endpoint - - `POST http(s)://example.com/graphql` - -::: tip - - If you are using pagination and want to know more info about responses then check the [explanation](./explanation) portion. - -::: - -**Note**: You can pass all the related fileds that you want in response. - -- Query - ~~~query - query filterableAttributes { - filterableAttributes { - id - code - adminName - type - position - isRequired - isUnique - validation - valuePerLocale - valuePerChannel - isFilterable - isConfigurable - isVisibleOnFront - isUserDefined - swatchType - useInFlat - isComparable - } - } - ~~~ - -::: details Response - -~~~json -{ - "data": { - "filterableAttributes": [ - { - "id": "11", - "code": "price", - "adminName": "Price", - "type": "price", - "position": 13, - "isRequired": true, - "isUnique": false, - "validation": "decimal", - "valuePerLocale": false, - "valuePerChannel": false, - "isFilterable": true, - "isConfigurable": false, - "isVisibleOnFront": false, - "isUserDefined": false, - "swatchType": null, - "useInFlat": true, - "isComparable": true - }, - { - "id": "23", - "code": "color", - "adminName": "Color", - "type": "select", - "position": 26, - "isRequired": false, - "isUnique": false, - "validation": null, - "valuePerLocale": false, - "valuePerChannel": false, - "isFilterable": true, - "isConfigurable": true, - "isVisibleOnFront": false, - "isUserDefined": true, - "swatchType": null, - "useInFlat": true, - "isComparable": false - }, - { - "id": "24", - "code": "size", - "adminName": "Size", - "type": "select", - "position": 27, - "isRequired": false, - "isUnique": false, - "validation": null, - "valuePerLocale": false, - "valuePerChannel": false, - "isFilterable": true, - "isConfigurable": true, - "isVisibleOnFront": false, - "isUserDefined": true, - "swatchType": null, - "useInFlat": true, - "isComparable": false - }, - { - "id": "25", - "code": "brand", - "adminName": "Brand", - "type": "select", - "position": 28, - "isRequired": false, - "isUnique": false, - "validation": null, - "valuePerLocale": false, - "valuePerChannel": false, - "isFilterable": true, - "isConfigurable": false, - "isVisibleOnFront": true, - "isUserDefined": true, - "swatchType": null, - "useInFlat": true, - "isComparable": false - } - ] - } -} -~~~ -::: - -## Create a new Category - - To create a Category, you have to perform mutation on Category and paas the related fields in the request. - API call resource will create a new Category, only if the admin has logged in. - - - Headers - - | Key | Value | - | ------------- | --------------------- | - | Accept | application/json | - | Authorization | Bearer `token-string` | - - ### Examples - - Let's take an example, - -- Request Mutation - ~~~Mutation - mutation createCategory { - createCategory(input: { - name:"Women's Cloths" - locale: "all" - slug: "women-cloths" - description: "demo women Cloths description" - status: false - position: 1 - displayMode: "products_and_description" - parentId: 2 - metaTitle: "demo women Cloths meta title" - metaDescription: "demo Cloths meta title" - metaKeywords: "demo women Cloths meta title" - image: "http://graphqlnew.com/storage/category/4/NnPWmwMBRDcpPSfZCIhgska892t9f4zaI10nrMDu.jpg" - }) { - id - name - description - slug - urlPath - imageUrl - metaTitle - metaDescription - metaKeywords - position - status - displayMode - parentId - filterableAttributes { - id - adminName - code - type - position - } - translations { - id - name - description - localeId - locale - } - createdAt - updatedAt - } - } - ~~~ - -::: details Response - ~~~json - { - "data": { - "createCategory": { - "id": "3", - "name": "Women's Cloths", - "description": "demo women Cloths description", - "slug": "women-cloths", - "urlPath": null, - "imageUrl": null, - "metaTitle": "demo women Cloths meta title", - "metaDescription": "demo Cloths meta title", - "metaKeywords": "demo women Cloths meta title", - "position": 1, - "status": false, - "displayMode": "products_and_description", - "parentId": "2", - "filterableAttributes": [], - "translations": [ - { - "id": "5", - "name": "Women's Cloths", - "description": "demo women Cloths description", - "localeId": "1", - "locale": "en" - }, - { - "id": "6", - "name": "Women's Cloths", - "description": "demo women Cloths description", - "localeId": "3", - "locale": "nl" - }, - { - "id": "7", - "name": "Women's Cloths", - "description": "demo women Cloths description", - "localeId": "4", - "locale": "tr" - } - ], - "createdAt": "2021-05-27 18:20:43", - "updatedAt": "2021-05-27 18:20:44" - } - } - } - ~~~ -::: - -## Update a Category - -By using this API call you can update the Category. To do this , you have to perform update mutation on Category and paas the related fields in the request. -API call will update a Category, only if the admin has logged in. - - - - Headers - - | Key | Value | - | ------------- | --------------------- | - | Accept | application/json | - | Authorization | Bearer `token-string` | - -### Examples - - Let's take an example, - -- Request Mutation - ~~~Mutation - mutation updateCategory { - updateCategory(id: 3, input: { - name:"Women Collection" - locale: "fr" - slug: "women-cloths" - description: "Description de la Women Collection" - status: true - position: 1 - displayMode: "products_and_description" - parentId: 2 - metaTitle: "Meta titre de Women Collection" - metaDescription: "Meta description de la Women Collection" - metaKeywords: "Méta-mots-clés Women Collection" - image: "http://graphqlnew.com/storage/category/3/GVATxwzSS8nbWfiA7WWnpnjmsFQMnW9prOrItqpf.jpg" - }) { - id - name - description - slug - urlPath - imageUrl - metaTitle - metaDescription - metaKeywords - position - status - displayMode - parentId - filterableAttributes { - id - adminName - code - type - position - } - translations { - id - name - description - localeId - locale - } - createdAt - updatedAt - } - } - ~~~ - -::: details Response - ~~~json - { - "data": { - "updateCategory": { - "id": "3", - "name": "Women's Cloths", - "description": "demo women Cloths description", - "slug": "women-cloths", - "urlPath": "shop/women-cloths", - "imageUrl": null, - "metaTitle": "demo women Cloths meta title", - "metaDescription": "demo Cloths meta title", - "metaKeywords": "demo women Cloths meta title", - "position": 1, - "status": true, - "displayMode": "products_and_description", - "parentId": "2", - "filterableAttributes": [], - "translations": [ - { - "id": "5", - "name": "Women's Cloths", - "description": "demo women Cloths description", - "localeId": "1", - "locale": "en" - }, - { - "id": "6", - "name": "Women's Cloths", - "description": "demo women Cloths description", - "localeId": "3", - "locale": "nl" - }, - { - "id": "7", - "name": "Women's Cloths", - "description": "demo women Cloths description", - "localeId": "4", - "locale": "tr" - } - ], - "createdAt": "2021-05-27 18:20:43", - "updatedAt": "2021-05-27 18:24:26" - } - } - } - ~~~ -::: - -## Delete a Category - -To delete a Category, you have to perform mutation on Category by passing the id of that Category. -API call will delete a Category, only if the admin has logged in. - -- Headers - - | Key | Value | - | ------------- | --------------------- | - | Accept | application/json | - | Authorization | Bearer `token-string` | - -### Examples - - Let's take an example, - -- Request Mutation - ~~~Mutation - mutation deleteCategory { - deleteCategory(id: 3) { - success - } - } - - ~~~ - -::: details Response - ~~~json - { - "data": { - "deleteCategory": { - "success": "Category deleted successfully." - } - } - } - ~~~ -: \ No newline at end of file diff --git a/docs/1.x/graphql-admin-api/cms.md b/docs/1.x/graphql-admin-api/cms.md deleted file mode 100644 index e4939410..00000000 --- a/docs/1.x/graphql-admin-api/cms.md +++ /dev/null @@ -1,921 +0,0 @@ -## CMS Pages - -In this section, we will see all the APIs which are related to CMS Pages. - -### 1. Get all CMS Page - -You can get all the CMS Page from the Bagisto store. You can achieve this job by using the `CMS Page` API call. - -- Headers - - | Key | Value | - | ------------- | ---------------- | - | Accept | application/json | - -- Single Request Endpoint - - `POST http(s)://example.com/graphql` - -::: tip - - If you are using pagination and want to know more info about responses then check the [explanation](./explanation) portion. - -::: - -**Note**: You can pass all the related fileds that you want in response. - -- Query - ~~~query - query cmspages { - cmsPages(page:1) { - paginatorInfo { - count - currentPage - lastPage - total - } - data { - id - layout - createdAt - updatedAt - translations { - id - urlKey - metaDescription - metaTitle - pageTitle - metaKeywords - htmlContent - locale - cmsPageId - } - channels { - id - code - name - description - theme - homePageContent - footerContent - hostname - defaultLocaleId - baseCurrencyId - rootCategoryId - } - success - } - } - } - ~~~ - -::: details Response - -~~~json -{ - "data": { - "cmsPages": { - "paginatorInfo": { - "count": 10, - "currentPage": 1, - "lastPage": 2, - "total": 11 - }, - "data": [ - { - "id": "1", - "layout": null, - "createdAt": "2021-05-05 15:36:49", - "updatedAt": "2021-05-05 15:36:49", - "translations": [ - { - "id": "1", - "urlKey": "about-us", - "metaDescription": "", - "metaTitle": "about us", - "pageTitle": "About Us", - "metaKeywords": "aboutus", - "htmlContent": "
About us page content
", - "locale": "en", - "cmsPageId": "1" - } - ], - "channels": [], - "success": null - }, - { - "id": "2", - "layout": null, - "createdAt": "2021-05-05 15:36:49", - "updatedAt": "2021-05-05 15:36:49", - "translations": [ - { - "id": "2", - "urlKey": "return-policy", - "metaDescription": "", - "metaTitle": "return policy", - "pageTitle": "Return Policy", - "metaKeywords": "return, policy", - "htmlContent": "
Return policy page content
", - "locale": "en", - "cmsPageId": "2" - } - ], - "channels": [], - "success": null - }, - { - "id": "3", - "layout": null, - "createdAt": "2021-05-05 15:36:49", - "updatedAt": "2021-05-05 15:36:49", - "translations": [ - { - "id": "3", - "urlKey": "refund-policy", - "metaDescription": "", - "metaTitle": "Refund policy", - "pageTitle": "Refund Policy", - "metaKeywords": "refund, policy", - "htmlContent": "
Refund policy page content
", - "locale": "en", - "cmsPageId": "3" - } - ], - "channels": [], - "success": null - }, - { - "id": "4", - "layout": null, - "createdAt": "2021-05-05 15:36:49", - "updatedAt": "2021-05-05 15:36:49", - "translations": [ - { - "id": "4", - "urlKey": "terms-conditions", - "metaDescription": "", - "metaTitle": "Terms & Conditions", - "pageTitle": "Terms & Conditions", - "metaKeywords": "term, conditions", - "htmlContent": "
Terms & conditions page content
", - "locale": "en", - "cmsPageId": "4" - } - ], - "channels": [], - "success": null - }, - { - "id": "5", - "layout": null, - "createdAt": "2021-05-05 15:36:49", - "updatedAt": "2021-05-05 15:36:49", - "translations": [ - { - "id": "5", - "urlKey": "terms-of-use", - "metaDescription": "", - "metaTitle": "Terms of use", - "pageTitle": "Terms of use", - "metaKeywords": "term, use", - "htmlContent": "
Terms of use page content
", - "locale": "en", - "cmsPageId": "5" - } - ], - "channels": [], - "success": null - }, - { - "id": "6", - "layout": null, - "createdAt": "2021-05-05 15:36:49", - "updatedAt": "2021-05-05 15:36:49", - "translations": [ - { - "id": "6", - "urlKey": "contact-us", - "metaDescription": "", - "metaTitle": "Contact Us", - "pageTitle": "Contact Us", - "metaKeywords": "contact, us", - "htmlContent": "
Contact us page content
", - "locale": "en", - "cmsPageId": "6" - } - ], - "channels": [], - "success": null - }, - { - "id": "7", - "layout": null, - "createdAt": "2021-05-05 15:36:49", - "updatedAt": "2021-05-05 15:36:49", - "translations": [ - { - "id": "7", - "urlKey": "cutomer-service", - "metaDescription": "", - "metaTitle": "Customer Service", - "pageTitle": "Customer Service", - "metaKeywords": "customer, service", - "htmlContent": "
Customer service page content
", - "locale": "en", - "cmsPageId": "7" - } - ], - "channels": [], - "success": null - }, - { - "id": "8", - "layout": null, - "createdAt": "2021-05-05 15:36:49", - "updatedAt": "2021-05-05 15:36:49", - "translations": [ - { - "id": "8", - "urlKey": "whats-new", - "metaDescription": "", - "metaTitle": "What's New", - "pageTitle": "What's New", - "metaKeywords": "new", - "htmlContent": "
What's New page content
", - "locale": "en", - "cmsPageId": "8" - } - ], - "channels": [], - "success": null - }, - { - "id": "9", - "layout": null, - "createdAt": "2021-05-05 15:36:49", - "updatedAt": "2021-05-05 15:36:49", - "translations": [ - { - "id": "9", - "urlKey": "payment-policy", - "metaDescription": "", - "metaTitle": "Payment Policy", - "pageTitle": "Payment Policy", - "metaKeywords": "payment, policy", - "htmlContent": "
Payment Policy page content
", - "locale": "en", - "cmsPageId": "9" - } - ], - "channels": [], - "success": null - }, - { - "id": "10", - "layout": null, - "createdAt": "2021-05-05 15:36:49", - "updatedAt": "2021-05-05 15:36:49", - "translations": [ - { - "id": "10", - "urlKey": "shipping-policy", - "metaDescription": "", - "metaTitle": "Shipping Policy", - "pageTitle": "Shipping Policy", - "metaKeywords": "shipping, policy", - "htmlContent": "
Shipping Policy page content
", - "locale": "en", - "cmsPageId": "10" - } - ], - "channels": [], - "success": null - } - ] - } - } -} -~~~ -::: - -### 2. Get CMS Page By ID - -To get the specific CMS Page, you have to pass an `id` field with query request .By using this resource and request payload, you will get only a single object under the `data` object in response. - -- Headers - - | Key | Value | - | ------------- | --------------------- | - | Accept | application/json | - | Authorization | Bearer `token-string` | - -### Examples - -Let's take an example, - -- Request Query - ~~~Query - query cmspage { - cmsPage(id:1) { - id - layout - createdAt - updatedAt - translations { - id - urlKey - metaDescription - metaTitle - pageTitle - metaKeywords - htmlContent - locale - cmsPageId - } - channels { - id - code - name - description - theme - homePageContent - footerContent - hostname - defaultLocaleId - baseCurrencyId - rootCategoryId - } - success - } - } - ~~~ - -::: details Response - ~~~json - { - "data": { - "cmsPage": { - "id": "1", - "layout": null, - "createdAt": "2021-05-05 15:36:49", - "updatedAt": "2021-05-05 15:36:49", - "translations": [ - { - "id": "1", - "urlKey": "about-us", - "metaDescription": "", - "metaTitle": "about us", - "pageTitle": "About Us", - "metaKeywords": "aboutus", - "htmlContent": "
About us page content
", - "locale": "en", - "cmsPageId": "1" - } - ], - "channels": [], - "success": null - } - } - } - ~~~ - -::: - -### 3. Get Filtered CMS Page - -You can get the filter data from the CMS Pages by passing the input fileds in the request and that you want in the response. - -- Headers - - | Key | Value | - | ------------- | --------------------- | - | Accept | application/json | - | Authorization | Bearer `token-string` | - -**Note**: You can pass all the related fileds that you want in response. - -### Examples - -Let's take an example, - -- Request Query - -~~~query - query cmspages { - cmsPages(input: { - id:1 - }, page:1) { - paginatorInfo { - count - currentPage - lastPage - total - } - data { - id - layout - createdAt - updatedAt - translations { - id - urlKey - metaDescription - metaTitle - pageTitle - metaKeywords - htmlContent - locale - cmsPageId - } - channels { - id - code - name - description - theme - homePageContent - footerContent - hostname - defaultLocaleId - baseCurrencyId - rootCategoryId - } - success - } - } - } -~~~ - -::: details Response - ~~~json - { - "data": { - "cmsPages": { - "paginatorInfo": { - "count": 1, - "currentPage": 1, - "lastPage": 1, - "total": 1 - }, - "data": [ - { - "id": "1", - "layout": null, - "createdAt": "2021-05-05 15:36:49", - "updatedAt": "2021-05-05 15:36:49", - "translations": [ - { - "id": "1", - "urlKey": "about-us", - "metaDescription": "", - "metaTitle": "about us", - "pageTitle": "About Us", - "metaKeywords": "aboutus", - "htmlContent": "
About us page content
", - "locale": "en", - "cmsPageId": "1" - } - ], - "channels": [], - "success": null - } - ] - } - } - } - ~~~ - ::: - - -### 4. Get CMS Translations - -You can get the CMS Page Translations from the Bagisto store. You can achieve this job by using the `CMS Page Translations` API call. - -- Headers - - | Key | Value | - | ------------- | ---------------- | - | Accept | application/json | - -- Single Request Endpoint - - `POST http(s)://example.com/graphql` - -::: tip - - If you are using pagination and want to know more info about responses then check the [explanation](./explanation) portion. - -::: - -**Note**: You can pass all the related fileds that you want in response. - -- Query - ~~~query - query cmsPageTranslations { - cmsPageTranslations(input: { - cmsPageId:1 - id:1 - }, page:1) { - paginatorInfo { - count - currentPage - lastPage - total - } - data{ - id - urlKey - metaDescription - metaTitle - pageTitle - metaKeywords - htmlContent - locale - cmsPageId - } - } - } - ~~~ - -::: details Response - -~~~json -{ - "data": { - "cmsPageTranslations": { - "paginatorInfo": { - "count": 1, - "currentPage": 1, - "lastPage": 1, - "total": 1 - }, - "data": [ - { - "id": "1", - "urlKey": "about-us", - "metaDescription": "", - "metaTitle": "about us", - "pageTitle": "About Us", - "metaKeywords": "aboutus", - "htmlContent": "
About us page content
", - "locale": "en", - "cmsPageId": "1" - } - ] - } - } -} -~~~ -::: - -### 5. Get CMS Translations By ID - -To get the specific CMS Translations, you have to pass an `id` field with query request .By using this resource and request payload, you will get only a single object under the `data` object in response. - -- Headers - - | Key | Value | - | ------------- | --------------------- | - | Accept | application/json | - | Authorization | Bearer `token-string` | - -### Examples - -Let's take an example, - -- Request Query - ~~~Query - query cmsPageTranslation { - cmsPageTranslation(id:1,input: { - cmsPageId:1 - id:1 - }) { - id - urlKey - metaDescription - metaTitle - pageTitle - metaKeywords - htmlContent - locale - cmsPageId - } - } - ~~~ - -::: details Response - ~~~json - { - "data": { - "cmsPageTranslation": { - "id": "1", - "urlKey": "about-us", - "metaDescription": "", - "metaTitle": "about us", - "pageTitle": "About Us", - "metaKeywords": "aboutus", - "htmlContent": "
About us page content
", - "locale": "en", - "cmsPageId": "1" - } - } - } - ~~~ - -::: - -### 6. Create a new CMS Page - - To create a CMS Page, you have to perform mutation on CMS Page and paas the related fields in the request. - API call resource will create a new CMS Page, only if the admin has logged in. - - - Headers - - | Key | Value | - | ------------- | --------------------- | - | Accept | application/json | - | Authorization | Bearer `token-string` | - - ### Examples - - Let's take an example, - -- Request Mutation - ~~~Mutation - mutation{ - createCmsPage(input:{ - pageTitle: "test" - channels:1 - htmlContent: "
About us page content
" - metaTitle: "testetest us" - urlKey: "test-us" - metaKeywords: "testsesese" - metaDescription: "teste data" - locale:"en" - }) { - id - layout - createdAt - updatedAt - translations { - id - urlKey - metaDescription - metaTitle - pageTitle - metaKeywords - htmlContent - locale - cmsPageId - } - channels { - id - code - name - description - theme - homePageContent - footerContent - hostname - defaultLocaleId - baseCurrencyId - rootCategoryId - } - success - } - } - ~~~ - -::: details Response - ~~~json - { - "data": { - "createCmsPage": { - "id": "12", - "layout": null, - "createdAt": "2021-05-25 18:32:22", - "updatedAt": "2021-05-25 18:32:22", - "translations": [ - { - "id": "12", - "urlKey": "test-us", - "metaDescription": "teste data", - "metaTitle": "testetest us", - "pageTitle": "test", - "metaKeywords": "testsesese", - "htmlContent": "
About us page content
", - "locale": "en", - "cmsPageId": "12" - }, - { - "id": "13", - "urlKey": "test-us", - "metaDescription": "teste data", - "metaTitle": "testetest us", - "pageTitle": "test", - "metaKeywords": "testsesese", - "htmlContent": "
About us page content
", - "locale": "nl", - "cmsPageId": "12" - }, - { - "id": "14", - "urlKey": "test-us", - "metaDescription": "teste data", - "metaTitle": "testetest us", - "pageTitle": "test", - "metaKeywords": "testsesese", - "htmlContent": "
About us page content
", - "locale": "tr", - "cmsPageId": "12" - } - ], - "channels": [ - { - "id": "1", - "code": "default", - "name": "Default", - "description": null, - "theme": "velocity", - "homePageContent": "\n

@include(\"shop::home.slider\") @include(\"shop::home.featured-products\") @include(\"shop::home.new-products\")

\n
\n
\n \"test\"\n
\n
\n \"test\"\n \"test\"\n
\n
\n ", - "footerContent": "\n \n
\n Connect With Us\n \n
\n ", - "hostname": "http://localhost/graphql/public", - "defaultLocaleId": 1, - "baseCurrencyId": 1, - "rootCategoryId": 1 - } - ], - "success": null - } - } - } - ~~~ -::: - -### 7. Update CMS Page - -By using this API call you can update the CMS Page. To do this , you have to perform update mutation on CMS Page and paas the related fields in the request. -API call will update a CMS Page, only if the admin has logged in. - - - - Headers - - | Key | Value | - | ------------- | --------------------- | - | Accept | application/json | - | Authorization | Bearer `token-string` | - - ### Examples - - Let's take an example, - -- Request Mutation - ~~~Mutation - mutation{ - updateCmsPage(id:12,input:{ - pageTitle: "testUpdate" - channels:1 - htmlContent: "
About us page content
" - metaTitle: "testetest us" - urlKey: "test-us" - metaKeywords: "testsesese" - metaDescription: "teste data" - locale:"en" - }) { - id - layout - createdAt - updatedAt - translations { - id - urlKey - metaDescription - metaTitle - pageTitle - metaKeywords - htmlContent - locale - cmsPageId - } - channels { - id - code - name - description - theme - homePageContent - footerContent - hostname - defaultLocaleId - baseCurrencyId - rootCategoryId - } - success - } - } - ~~~ - -::: details Response - ~~~json - { - "data": { - "updateCmsPage": { - "id": "12", - "layout": null, - "createdAt": "2021-05-25 18:32:22", - "updatedAt": "2021-05-25 18:32:22", - "translations": [ - { - "id": "12", - "urlKey": "test-us", - "metaDescription": "teste data", - "metaTitle": "testetest us", - "pageTitle": "testUpdate", - "metaKeywords": "testsesese", - "htmlContent": "
About us page content
", - "locale": "en", - "cmsPageId": "12" - }, - { - "id": "13", - "urlKey": "test-us", - "metaDescription": "teste data", - "metaTitle": "testetest us", - "pageTitle": "test", - "metaKeywords": "testsesese", - "htmlContent": "
About us page content
", - "locale": "nl", - "cmsPageId": "12" - }, - { - "id": "14", - "urlKey": "test-us", - "metaDescription": "teste data", - "metaTitle": "testetest us", - "pageTitle": "test", - "metaKeywords": "testsesese", - "htmlContent": "
About us page content
", - "locale": "tr", - "cmsPageId": "12" - } - ], - "channels": [ - { - "id": "1", - "code": "default", - "name": "Default", - "description": null, - "theme": "velocity", - "homePageContent": "\n

@include(\"shop::home.slider\") @include(\"shop::home.featured-products\") @include(\"shop::home.new-products\")

\n
\n
\n \"test\"\n
\n
\n \"test\"\n \"test\"\n
\n
\n ", - "footerContent": "\n \n
\n Connect With Us\n \n
\n ", - "hostname": "http://localhost/graphql/public", - "defaultLocaleId": 1, - "baseCurrencyId": 1, - "rootCategoryId": 1 - } - ], - "success": null - } - } - } - ~~~ -::: - -### 8. Delete a CMS Page - -To delete a CMS Page, you have to perform mutation on CMS Page by passing the id of that CMS Page. -API call will delete a CMS Page, only if the admin has logged in. - -- Headers - - | Key | Value | - | ------------- | --------------------- | - | Accept | application/json | - | Authorization | Bearer `token-string` | - -### Examples - - Let's take an example, - -- Request Mutation - ~~~Mutation - mutation{ - deleteCmsPage(id:12){ - success - } - } - - ~~~ - -::: details Response - ~~~json - { - "data": { - "deleteCmsPage": { - "success": "CMS Page deleted successfully." - } - } - } - ~~~ -::: diff --git a/docs/1.x/graphql-admin-api/customers.md b/docs/1.x/graphql-admin-api/customers.md deleted file mode 100644 index 52b5fb9d..00000000 --- a/docs/1.x/graphql-admin-api/customers.md +++ /dev/null @@ -1,1827 +0,0 @@ -## Customers - -In this section, we will see all the APIs which are related to Customer's. - -### 1. Get All Customer's - -You can get all the Customer's from the Bagisto store. You can achieve this job by using the `Customers` API call. - -- Headers - - | Key | Value | - | ------------- | ---------------- | - | Accept | application/json | - -- Single Request Endpoint - - `POST http(s)://example.com/graphql` - -::: tip - - If you are using pagination and want to know more info about responses then check the [explanation](./explanation) portion. - -::: - -- Query - ~~~query - query customers { - customers(page:1) { - paginatorInfo { - count - currentPage - lastPage - total - } - data { - id - firstName - lastName - gender - dateOfBirth - email - phone - password - apiToken - customerGroupId - subscribedToNewsLetter - isVerified - token - notes - status - customerGroup { - id - name - code - isUserDefined - createdAt - updatedAt - } - addresses { - id - customerId - companyName - firstName - lastName - address1 - address2 - country - state - city - postcode - phone - vatId - addressType - defaultAddress - } - defaultAddress { - id - companyName - address1 - address2 - country - state - city - postcode - phone - } - createdAt - updatedAt - } - } - } - ~~~ - -::: details Response - -~~~json -{ - "data": { - "customers": { - "paginatorInfo": { - "count": 1, - "currentPage": 1, - "lastPage": 1, - "total": 1 - }, - "data": [ - { - "id": "1", - "firstName": "Naresh", - "lastName": "Verma", - "gender": "Male", - "dateOfBirth": "1996-03-04", - "email": "naresh.verma327@webkul.com", - "phone": "0324224324343", - "password": "$2y$10$REg4zdIfJ8TgsOJst1uZCuhPn91Zl8jbju1f3jORraWuEDqz88PLy", - "apiToken": null, - "customerGroupId": 2, - "subscribedToNewsLetter": false, - "isVerified": true, - "token": null, - "notes": null, - "status": true, - "customerGroup": { - "id": "2", - "name": "General", - "code": "general", - "isUserDefined": false, - "createdAt": null, - "updatedAt": null - }, - "addresses": [ - { - "id": "1", - "customerId": 1, - "companyName": "Nitinv pvt ltd", - "firstName": "naresh", - "lastName": "Verma", - "address1": "3rd, arv", - "address2": null, - "country": "IN", - "state": "UT", - "city": "Eindhoven", - "postcode": "5642CV", - "phone": "45454545052045", - "vatId": "", - "addressType": "customer", - "defaultAddress": true - } - ], - "defaultAddress": { - "id": "1", - "companyName": "Nitinv pvt ltd", - "address1": "3rd, arv", - "address2": null, - "country": "IN", - "state": "UT", - "city": "Eindhoven", - "postcode": "5642CV", - "phone": "45454545052045" - }, - "createdAt": "2021-05-26 15:42:59", - "updatedAt": "2021-05-26 15:42:59" - } - ] - } - } -} -~~~ -::: - -### 2. Get Customer's By ID - -To get the specific Customer's, you have to pass an `id` field with query request .By using this resource and request payload, you will get only a single object under the `data` object in response. - -- Headers - - | Key | Value | - | ------------- | --------------------- | - | Accept | application/json | - | Authorization | Bearer `token-string` | - -### Examples - -Let's take an example, - -- Request Query - ~~~Query - query customer { - customer(id: 1) { - id - firstName - lastName - gender - dateOfBirth - email - phone - password - apiToken - customerGroupId - subscribedToNewsLetter - isVerified - token - notes - status - customerGroup { - id - name - code - isUserDefined - createdAt - updatedAt - } - addresses { - id - customerId - companyName - firstName - lastName - address1 - address2 - country - state - city - postcode - phone - vatId - addressType - defaultAddress - } - defaultAddress { - id - companyName - address1 - address2 - country - state - city - postcode - phone - } - createdAt - updatedAt - } - } - ~~~ - -::: details Response - ~~~json - { - "data": { - "customer": { - "id": "1", - "firstName": "Naresh", - "lastName": "Verma", - "gender": "Male", - "dateOfBirth": "1996-03-04", - "email": "naresh.verma327@webkul.com", - "phone": "0324224324343", - "password": "$2y$10$REg4zdIfJ8TgsOJst1uZCuhPn91Zl8jbju1f3jORraWuEDqz88PLy", - "apiToken": null, - "customerGroupId": 2, - "subscribedToNewsLetter": false, - "isVerified": true, - "token": null, - "notes": null, - "status": true, - "customerGroup": { - "id": "2", - "name": "General", - "code": "general", - "isUserDefined": false, - "createdAt": null, - "updatedAt": null - }, - "addresses": [ - { - "id": "1", - "customerId": 1, - "companyName": "Nitinv pvt ltd", - "firstName": "naresh", - "lastName": "Verma", - "address1": "3rd, arv", - "address2": null, - "country": "IN", - "state": "UT", - "city": "Eindhoven", - "postcode": "5642CV", - "phone": "45454545052045", - "vatId": "", - "addressType": "customer", - "defaultAddress": true - } - ], - "defaultAddress": { - "id": "1", - "companyName": "Nitinv pvt ltd", - "address1": "3rd, arv", - "address2": null, - "country": "IN", - "state": "UT", - "city": "Eindhoven", - "postcode": "5642CV", - "phone": "45454545052045" - }, - "createdAt": "2021-05-26 15:42:59", - "updatedAt": "2021-05-26 15:42:59" - } - } - } - ~~~ -::: - -### 3. Get Filtered Customer's - -You can get the filter data from the Customer's by passing the input fileds in the request and that you want in the response. - -- Headers - - | Key | Value | - | ------------- | --------------------- | - | Accept | application/json | - | Authorization | Bearer `token-string` | - -**Note**: You can pass all the related fileds that you want in response. - -### Examples - -Let's take an example, - -- Request Query - -~~~query - query customers { - customers(input: { - id:1 - },page:1) { - paginatorInfo { - count - currentPage - lastPage - total - } - data { - id - firstName - lastName - gender - dateOfBirth - email - phone - password - apiToken - customerGroupId - subscribedToNewsLetter - isVerified - token - notes - status - customerGroup { - id - name - code - isUserDefined - createdAt - updatedAt - } - addresses { - id - customerId - companyName - firstName - lastName - address1 - address2 - country - state - city - postcode - phone - vatId - addressType - defaultAddress - } - defaultAddress { - id - companyName - address1 - address2 - country - state - city - postcode - phone - } - createdAt - updatedAt - } - } - } -~~~ - -::: details Response - ~~~json - { - "data": { - "customers": { - "paginatorInfo": { - "count": 1, - "currentPage": 1, - "lastPage": 1, - "total": 1 - }, - "data": [ - { - "id": "1", - "firstName": "Naresh", - "lastName": "Verma", - "gender": "Male", - "dateOfBirth": "1996-03-04", - "email": "naresh.verma327@webkul.com", - "phone": "0324224324343", - "password": "$2y$10$REg4zdIfJ8TgsOJst1uZCuhPn91Zl8jbju1f3jORraWuEDqz88PLy", - "apiToken": null, - "customerGroupId": 2, - "subscribedToNewsLetter": false, - "isVerified": true, - "token": null, - "notes": null, - "status": true, - "customerGroup": { - "id": "2", - "name": "General", - "code": "general", - "isUserDefined": false, - "createdAt": null, - "updatedAt": null - }, - "addresses": [ - { - "id": "1", - "customerId": 1, - "companyName": "Nitinv pvt ltd", - "firstName": "naresh", - "lastName": "Verma", - "address1": "3rd, arv", - "address2": null, - "country": "IN", - "state": "UT", - "city": "Eindhoven", - "postcode": "5642CV", - "phone": "45454545052045", - "vatId": "", - "addressType": "customer", - "defaultAddress": true - } - ], - "defaultAddress": { - "id": "1", - "companyName": "Nitinv pvt ltd", - "address1": "3rd, arv", - "address2": null, - "country": "IN", - "state": "UT", - "city": "Eindhoven", - "postcode": "5642CV", - "phone": "45454545052045" - }, - "createdAt": "2021-05-26 15:42:59", - "updatedAt": "2021-05-26 15:42:59" - } - ] - } - } - } - ~~~ -::: - -### 4. Create a new Customer - - To create a Customer, you have to perform mutation on Customer and paas the related fields in the request. - API call resource will create a new Customer, only if the admin has logged in. - - - Headers - - | Key | Value | - | ------------- | --------------------- | - | Accept | application/json | - | Authorization | Bearer `token-string` | - -### Examples - - Let's take an example, - -- Request Mutation - ~~~Mutation - mutation createCustomer { - createCustomer(input: { - firstName: "Peter" - lastName: "Doe" - email: "peter@example.com" - gender: "Male" - dateOfBirth: "17/04/1994" - customerGroupId: 2 - phone: "987654321" - status: false - }) { - id - firstName - lastName - gender - dateOfBirth - email - phone - password - apiToken - customerGroupId - subscribedToNewsLetter - isVerified - token - notes - status - customerGroup { - id - name - code - isUserDefined - createdAt - updatedAt - } - addresses { - id - customerId - companyName - firstName - lastName - address1 - address2 - country - state - city - postcode - phone - vatId - addressType - defaultAddress - } - defaultAddress { - id - companyName - address1 - address2 - country - state - city - postcode - phone - } - createdAt - updatedAt - } - } - ~~~ - -::: details Response - ~~~json - { - "data": { - "createCustomer": { - "id": "3", - "firstName": "Peter", - "lastName": "Doe", - "gender": "Male", - "dateOfBirth": "1994-04-17", - "email": "peter@example.com", - "phone": "987654321", - "password": "$2y$10$XZdipyt7nrh3qzXF691Uiu9K.Pp2BgfSD5d651hVmlcJNycGs92E.", - "apiToken": null, - "customerGroupId": 2, - "subscribedToNewsLetter": null, - "isVerified": true, - "token": null, - "notes": null, - "status": false, - "customerGroup": { - "id": "2", - "name": "General", - "code": "general", - "isUserDefined": false, - "createdAt": null, - "updatedAt": null - }, - "addresses": [], - "defaultAddress": null, - "createdAt": "2021-05-26 15:54:52", - "updatedAt": "2021-05-26 15:54:52" - } - } - } - ~~~ -::: - -### 5. Update Customer - -By using this API call you can update the Customer. To do this , you have to perform update mutation on Customer and paas the related fields in the request. -API call will update a Customer, only if the admin has logged in. - - - - Headers - - | Key | Value | - | ------------- | --------------------- | - | Accept | application/json | - | Authorization | Bearer `token-string` | - - ### Examples - - Let's take an example, - -- Request Mutation - ~~~Mutation - mutation updateCustomer { - updateCustomer(id:3, input: { - firstName: "Kim" - lastName: "Thomson" - email: "peter1@example.com" - gender: "Female" - dateOfBirth: "2019-10-30" - customerGroupId: 1 - phone: "6543213456" - status: true - }) { - id - firstName - lastName - gender - dateOfBirth - email - phone - password - apiToken - customerGroupId - subscribedToNewsLetter - isVerified - token - notes - status - customerGroup { - id - name - code - isUserDefined - createdAt - updatedAt - } - addresses { - id - customerId - companyName - firstName - lastName - address1 - address2 - country - state - city - postcode - phone - vatId - addressType - defaultAddress - } - defaultAddress { - id - companyName - address1 - address2 - country - state - city - postcode - phone - } - createdAt - updatedAt - } - } - ~~~ - -::: details Response - ~~~json - { - "data": { - "updateCustomer": { - "id": "3", - "firstName": "Kim", - "lastName": "Thomson", - "gender": "Female", - "dateOfBirth": "2019-10-30", - "email": "peter1@example.com", - "phone": "6543213456", - "password": "$2y$10$XZdipyt7nrh3qzXF691Uiu9K.Pp2BgfSD5d651hVmlcJNycGs92E.", - "apiToken": null, - "customerGroupId": 1, - "subscribedToNewsLetter": false, - "isVerified": true, - "token": null, - "notes": null, - "status": true, - "customerGroup": { - "id": "1", - "name": "Guest", - "code": "guest", - "isUserDefined": false, - "createdAt": null, - "updatedAt": null - }, - "addresses": [], - "defaultAddress": null, - "createdAt": "2021-05-26 15:54:52", - "updatedAt": "2021-05-26 15:58:32" - } - } - } - ~~~ -::: - -### 6. Delete a Customer - -To delete a Customer, you have to perform mutation on Customer by passing the id of that Customer. -API call will delete a Customer, only if the admin has logged in. - -- Headers - - | Key | Value | - | ------------- | --------------------- | - | Accept | application/json | - | Authorization | Bearer `token-string` | - -### Examples - -Let's take an example, - -- Request Mutation - ~~~Mutation - mutation deleteCustomer { - deleteCustomer(id: 3) { - success - } - } - ~~~ - -::: details Response - ~~~json - "data": { - "deleteCustomer": { - "success": "Customer deleted successfully." - } - } - ~~~ -::: - -## Customer's Addresses - -In this section, we will see all the APIs which are related to Customer's Addresses. - -### 1. Get All Customer's Addresses - -You can get all the Customer's Addresses from the Bagisto store. You can achieve this job by using the `Customer's Addresses` API call. - -- Headers - - | Key | Value | - | ------------- | ---------------- | - | Accept | application/json | - -- Single Request Endpoint - - `POST http(s)://example.com/graphql` - -::: tip - - If you are using pagination and want to know more info about responses then check the [explanation](./explanation) portion. - -::: - -- Query - ~~~query - query customerAddresses { - customerAddresses { - paginatorInfo { - count - currentPage - lastPage - total - } - data { - id - customerId - companyName - firstName - lastName - address1 - address2 - country - state - city - postcode - phone - vatId - addressType - defaultAddress - createdAt - updatedAt - } - } - } - ~~~ - -::: details Response - -~~~json -{ - "data": { - "customerAddresses": { - "paginatorInfo": { - "count": 1, - "currentPage": 1, - "lastPage": 1, - "total": 1 - }, - "data": [ - { - "id": "1", - "customerId": 1, - "companyName": "Nitinv pvt ltd", - "firstName": "naresh", - "lastName": "Verma", - "address1": "3rd, arv", - "address2": null, - "country": "IN", - "state": "UT", - "city": "Eindhoven", - "postcode": "5642CV", - "phone": "45454545052045", - "vatId": "", - "addressType": "customer", - "defaultAddress": true, - "createdAt": "2021-05-26 15:44:32", - "updatedAt": "2021-05-26 15:44:45" - } - ] - } - } -} -~~~ -::: - -### 2. Get Customer's Addresses By ID - -To get the specific Customer's Addresses, you have to pass an `id` field with query request .By using this resource and request payload, you will get only a single object under the `data` object in response. - -- Headers - - | Key | Value | - | ------------- | --------------------- | - | Accept | application/json | - | Authorization | Bearer `token-string` | - -### Examples - -Let's take an example, - -- Request Query - ~~~Query - query customerAddress { - customerAddress(id: 1) { - id - customerId - companyName - firstName - lastName - address1 - address2 - country - state - city - postcode - phone - vatId - addressType - defaultAddress - createdAt - updatedAt - } - } - ~~~ - -::: details Response - ~~~json - { - "data": { - "customerAddress": { - "id": "1", - "customerId": 1, - "companyName": "Nitinv pvt ltd", - "firstName": "naresh", - "lastName": "Verma", - "address1": "3rd, arv", - "address2": null, - "country": "IN", - "state": "UT", - "city": "Eindhoven", - "postcode": "5642CV", - "phone": "45454545052045", - "vatId": "", - "addressType": "customer", - "defaultAddress": true, - "createdAt": "2021-05-26 15:44:32", - "updatedAt": "2021-05-26 15:44:45" - } - } - } - ~~~ -::: - -### 3. Get Filtered Customer's Addresses - -You can get the filter data from the Customer's Addresses by passing the input fileds in the request and that you want in the response. - -- Headers - - | Key | Value | - | ------------- | --------------------- | - | Accept | application/json | - | Authorization | Bearer `token-string` | - -**Note**: You can pass all the related fileds that you want in response. - -### Examples - -Let's take an example, - -- Request Query - -~~~query - query customerAddresses { - customerAddresses(input: { - customerId: 1 - }) { - paginatorInfo { - count - currentPage - lastPage - total - } - data { - id - customerId - companyName - firstName - lastName - address1 - address2 - country - state - city - postcode - phone - vatId - addressType - defaultAddress - createdAt - updatedAt - } - } - } -~~~ - -::: details Response - ~~~json - { - "data": { - "customerAddresses": { - "paginatorInfo": { - "count": 1, - "currentPage": 1, - "lastPage": 1, - "total": 1 - }, - "data": [ - { - "id": "1", - "customerId": 1, - "companyName": "Nitinv pvt ltd", - "firstName": "naresh", - "lastName": "Verma", - "address1": "3rd, arv", - "address2": null, - "country": "IN", - "state": "UT", - "city": "Eindhoven", - "postcode": "5642CV", - "phone": "45454545052045", - "vatId": "", - "addressType": "customer", - "defaultAddress": true, - "createdAt": "2021-05-26 15:44:32", - "updatedAt": "2021-05-26 15:44:45" - } - ] - } - } - } - ~~~ -::: - -### 4. Create a new Customer Address - - To create a Customer Address, you have to perform mutation on Customer Address and paas the related fields in the request. - API call resource will create a new Customer Address, only if the admin has logged in. - - - Headers - - | Key | Value | - | ------------- | --------------------- | - | Accept | application/json | - | Authorization | Bearer `token-string` | - -### Examples - - Let's take an example, - -- Request Mutation - ~~~Mutation - mutation createCustomerAddress { - createCustomerAddress(input: { - customerId: 1 - companyName: "Webkul" - firstName: "Tom Demo" - lastName: "Martin Demo" - address1: "3180 Bluff" - address2: "Street" - country: "US" - state: "PA" - city: "GLEN CAMPBELL" - postcode: "15742" - phone: "234343544" - vatId: "INV12345678902" - defaultAddress: false - }) { - id - customerId - companyName - firstName - lastName - address1 - address2 - country - state - city - postcode - phone - vatId - addressType - defaultAddress - createdAt - updatedAt - } - } - ~~~ - -::: details Response - ~~~json - { - "data": { - "createCustomerAddress": { - "id": "2", - "customerId": 1, - "companyName": "Webkul", - "firstName": "Tom Demo", - "lastName": "Martin Demo", - "address1": "3180 Bluff", - "address2": "Street", - "country": "US", - "state": "PA", - "city": "GLEN CAMPBELL", - "postcode": "15742", - "phone": "234343544", - "vatId": "INV12345678902", - "addressType": "customer", - "defaultAddress": true, - "createdAt": "2021-05-26 16:17:48", - "updatedAt": "2021-05-26 16:17:48" - } - } - } - ~~~ -::: - -### 5. Update Customer Address - -By using this API call you can update the Customer Address. To do this , you have to perform update mutation on Customer Address and paas the related fields in the request. -API call will update a Customer Address, only if the admin has logged in. - - - - Headers - - | Key | Value | - | ------------- | --------------------- | - | Accept | application/json | - | Authorization | Bearer `token-string` | - -### Examples - - Let's take an example, - -- Request Mutation - ~~~Mutation - mutation updateCustomerAddress { - updateCustomerAddress(id: 2, input: { - customerId: 1 - companyName: "Velocity" - firstName: "Tom" - lastName: "Martin" - address1: "3180 Bluff Street" - address2: "" - country: "IN" - state: "UP" - city: "Noida" - postcode: "201301" - phone: "1234123455" - vatId: "INV12342278902" - }) { - id - customerId - companyName - firstName - lastName - address1 - address2 - country - state - city - postcode - phone - vatId - addressType - defaultAddress - createdAt - updatedAt - } - } - ~~~ - -::: details Response - ~~~json - { - "data": { - "updateCustomerAddress": { - "id": "2", - "customerId": 1, - "companyName": "Velocity", - "firstName": "Tom", - "lastName": "Martin", - "address1": "3180 Bluff Street", - "address2": "", - "country": "IN", - "state": "UP", - "city": "Noida", - "postcode": "201301", - "phone": "1234123455", - "vatId": "INV12342278902", - "addressType": "customer", - "defaultAddress": false, - "createdAt": "2021-05-26 16:17:48", - "updatedAt": "2021-05-26 16:19:58" - } - } - } - ~~~ -::: - -### 6. Delete a Customer Address - -To delete a Customer Address, you have to perform mutation on Customer Address by passing the id of that Customer Address. -API call will delete a Customer Address, only if the admin has logged in. - -- Headers - - | Key | Value | - | ------------- | --------------------- | - | Accept | application/json | - | Authorization | Bearer `token-string` | - -### Examples - - Let's take an example, - -- Request Mutation - ~~~Mutation - mutation deleteCustomerAddress { - deleteCustomerAddress(id: 1) { - success - } - } - - ~~~ - -::: details Response - ~~~json - { - "data": { - "deleteCustomerAddress": { - "success": "Customer's Address deleted successfully." - } - } - } - ~~~ -::: - -## Customer Groups - -In this section, we will see all the APIs which are related to Customer Groups. - -### 1. Get All Customer Groups - -You can get all the Customer Groups from the Bagisto store. You can achieve this job by using the `Customer Groups` API call. - -- Headers - - | Key | Value | - | ------------- | ---------------- | - | Accept | application/json | - -- Single Request Endpoint - - `POST http(s)://example.com/graphql` - -::: tip - - If you are using pagination and want to know more info about responses then check the [explanation](./explanation) portion. - -::: - -- Query - ~~~query - query customerGroups { - customerGroups { - paginatorInfo { - count - currentPage - lastPage - total - } - data { - id - name - code - isUserDefined - createdAt - updatedAt - } - } - } - ~~~ - -::: details Response - -~~~json -{ - "data": { - "customerGroups": { - "paginatorInfo": { - "count": 3, - "currentPage": 1, - "lastPage": 1, - "total": 3 - }, - "data": [ - { - "id": "1", - "name": "Guest", - "code": "guest", - "isUserDefined": false, - "createdAt": null, - "updatedAt": null - }, - { - "id": "2", - "name": "General", - "code": "general", - "isUserDefined": false, - "createdAt": null, - "updatedAt": null - }, - { - "id": "3", - "name": "Wholesale", - "code": "wholesale", - "isUserDefined": false, - "createdAt": null, - "updatedAt": null - } - ] - } - } -} -~~~ -::: - -### 2. Get Customer Group By ID - -To get the specific Customer Group, you have to pass an `id` field with query request .By using this resource and request payload, you will get only a single object under the `data` object in response. - -- Headers - - | Key | Value | - | ------------- | --------------------- | - | Accept | application/json | - | Authorization | Bearer `token-string` | - -### Examples - -Let's take an example, - -- Request Query - ~~~Query - query customerGroup { - customerGroup(id: 2) { - id - name - code - isUserDefined - createdAt - updatedAt - } - } - ~~~ - -::: details Response - ~~~json - { - "data": { - "customerGroup": { - "id": "2", - "name": "General", - "code": "general", - "isUserDefined": false, - "createdAt": null, - "updatedAt": null - } - } - } - ~~~ -::: - -### 3. Get Filtered Customer Groups - -You can get the filter data from the Customer Groups by passing the input fileds in the request and that you want in the response. - -- Headers - - | Key | Value | - | ------------- | --------------------- | - | Accept | application/json | - | Authorization | Bearer `token-string` | - -**Note**: You can pass all the related fileds that you want in response. - -### Examples - -Let's take an example, - -- Request Query - -~~~query - query customerGroups { - customerGroups(input: { - code: "general" - }) { - paginatorInfo { - count - currentPage - lastPage - total - } - data { - id - name - code - isUserDefined - createdAt - updatedAt - } - } - } -~~~ - -::: details Response - ~~~json - { - "data": { - "customerGroups": { - "paginatorInfo": { - "count": 1, - "currentPage": 1, - "lastPage": 1, - "total": 1 - }, - "data": [ - { - "id": "2", - "name": "General", - "code": "general", - "isUserDefined": false, - "createdAt": null, - "updatedAt": null - } - ] - } - } - } - ~~~ -::: - -### 4. Create a new Customer Group - - To create a Customer Group, you have to perform mutation on Customer Group and paas the related fields in the request. - API call resource will create a new Customer Group, only if the admin has logged in. - - - Headers - - | Key | Value | - | ------------- | --------------------- | - | Accept | application/json | - | Authorization | Bearer `token-string` | - -### Examples - - Let's take an example, - -- Request Mutation - ~~~Mutation - mutation createCustomerGroup { - createCustomerGroup(input: { - name: "VIP Group" - code: "vip" - isUserDefined: false - }) { - id - name - code - isUserDefined - createdAt - updatedAt - } - } - ~~~ - -::: details Response - ~~~json - { - "data": { - "createCustomerGroup": { - "id": "4", - "name": "VIP Group", - "code": "vip", - "isUserDefined": false, - "createdAt": "2021-05-26 16:32:06", - "updatedAt": "2021-05-26 16:32:06" - } - } - } - ~~~ -::: - -### 5. Update Customer Group - -By using this API call you can update the Customer Group. To do this , you have to perform update mutation on Customer Group and paas the related fields in the request. -API call will update a Customer Group, only if the admin has logged in. - - - - Headers - - | Key | Value | - | ------------- | --------------------- | - | Accept | application/json | - | Authorization | Bearer `token-string` | - -### Examples - - Let's take an example, - -- Request Mutation - ~~~Mutation - mutation updateCustomerGroup { - updateCustomerGroup(id: 4, input: { - name: "VIP Customers" - code: "vip" - isUserDefined: false - }) { - id - name - code - isUserDefined - createdAt - updatedAt - } - } - ~~~ - -::: details Response - ~~~json - { - "data": { - "updateCustomerGroup": { - "id": "4", - "name": "VIP Customers", - "code": "vip", - "isUserDefined": false, - "createdAt": "2021-05-26 16:32:06", - "updatedAt": "2021-05-26 16:33:57" - } - } - } - ~~~ -::: - -### 6. Delete a Customer Group - -To delete a Customer Group, you have to perform mutation on Customer Group by passing the id of that Customer Group. -API call will delete a Customer Group, only if the admin has logged in. - -- Headers - - | Key | Value | - | ------------- | --------------------- | - | Accept | application/json | - | Authorization | Bearer `token-string` | - -### Examples - - Let's take an example, - -- Request Mutation - ~~~Mutation - mutation deleteCustomerGroup { - deleteCustomerGroup(id: 4) { - success - } - } - - ~~~ - -::: details Response - ~~~json - { - "data": { - "deleteCustomerGroup": { - "success": "Customer group deleted successfully." - } - } - } - ~~~ -::: - -## Subscribers - -In this section, we will see all the APIs which are related to Subscribers. - -### 1. Get All Newsletter Subscribers - -You can get all the Newsletter Subscribers from the Bagisto store. You can achieve this job by using the `Newsletter Subscribers` API call. - -- Headers - - | Key | Value | - | ------------- | ---------------- | - | Accept | application/json | - -- Single Request Endpoint - - `POST http(s)://example.com/graphql` - -::: tip - - If you are using pagination and want to know more info about responses then check the [explanation](./explanation) portion. - -::: - -- Query - ~~~query - query newsletterSubscribers { - newsletterSubscribers { - paginatorInfo { - count - currentPage - lastPage - total - } - data { - id - email - isSubscribed - token - channelId - createdAt - updatedAt - } - } - } - ~~~ - -::: details Response - -~~~json -{ - "data": { - "newsletterSubscribers": { - "paginatorInfo": { - "count": 1, - "currentPage": 1, - "lastPage": 1, - "total": 1 - }, - "data": [ - { - "id": "1", - "email": "gagan@exmaple.com", - "isSubscribed": true, - "token": "60ae2f20a2b4e", - "channelId": 1, - "createdAt": "2021-05-26 16:51:08", - "updatedAt": "2021-05-26 16:51:08" - } - ] - } - } -} -~~~ -::: - -### 2. Get Newsletter Subscriber By ID - -To get the specific Newsletter Subscribers, you have to pass an `id` field with query request .By using this resource and request payload, you will get only a single object under the `data` object in response. - -- Headers - - | Key | Value | - | ------------- | --------------------- | - | Accept | application/json | - | Authorization | Bearer `token-string` | - -### Examples - -Let's take an example, - -- Request Query - ~~~Query - query newsletterSubscriber { - newsletterSubscriber(id: 1) { - id - email - isSubscribed - token - channelId - createdAt - updatedAt - } - } - ~~~ - -::: details Response - ~~~json - { - "data": { - "newsletterSubscriber": { - "id": "1", - "email": "gagan@exmaple.com", - "isSubscribed": true, - "token": "60ae2f20a2b4e", - "channelId": 1, - "createdAt": "2021-05-26 16:51:08", - "updatedAt": "2021-05-26 16:51:08" - } - } - } - ~~~ -::: - - -### 3. Add a new Newsletter Subscriber - - To add a Newsletter Subscriber, you have to perform mutation on Newsletter Subscriber and paas the related fields in the request. - API call resource will add a new Newsletter Subscriber, only if the admin has logged in. - - - Headers - - | Key | Value | - | ------------- | --------------------- | - | Accept | application/json | - | Authorization | Bearer `token-string` | - -### Examples - - Let's take an example, - -- Request Mutation - ~~~Mutation - mutation subscribe { - subscribe(input: { - email: "gagan1@exmaple.com" - }) { - email - isSubscribed - token - channelId - createdAt - updatedAt - } - } - ~~~ - -::: details Response - ~~~json - { - "data": { - "subscribe": { - "email": "gagan1@exmaple.com", - "isSubscribed": true, - "token": "60ae30df240a2", - "channelId": 1, - "createdAt": "2021-05-26 16:58:35", - "updatedAt": "2021-05-26 16:58:35" - } - } - } - ~~~ -::: - -### 4. unsubscribe a Newsletter Subscriber - -By using this API call you can unsubscribe the Newsletter Subscriber. To do this , you have to perform unsubscribe mutation on Newsletter Subscriber and paas the related fields in the request. -API call will unsubscribe a Newsletter Subscriber, only if the admin has logged in. - - - - Headers - - | Key | Value | - | ------------- | --------------------- | - | Accept | application/json | - | Authorization | Bearer `token-string` | - -### Examples - - Let's take an example, - -- Request Mutation - ~~~Mutation - mutation unSubscribe { - unSubscribe(token: "60ae30df240a2") { - id - email - isSubscribed - token - channelId - createdAt - updatedAt - } - } - ~~~ - -::: details Response - ~~~json - { - "data": { - "unSubscribe": { - "id": "2", - "email": "gagan1@exmaple.com", - "isSubscribed": false, - "token": "60ae30df240a2", - "channelId": 1, - "createdAt": "2021-05-26 16:58:35", - "updatedAt": "2021-05-26 17:01:18" - } - } - } - ~~~ -::: - -### 5. Delete a Newsletter Subscriber - -To delete a Newsletter Subscriber, you have to perform mutation on Newsletter Subscriber by passing the id of that Newsletter Subscriber. -API call will delete a Newsletter Subscriber, only if the admin has logged in. - -- Headers - - | Key | Value | - | ------------- | --------------------- | - | Accept | application/json | - | Authorization | Bearer `token-string` | - -### Examples - - Let's take an example, - -- Request Mutation - ~~~Mutation - mutation deleteSubscriber { - deleteSubscriber(email: "gagan1@exmaple.com") { - success - } - } - - ~~~ - -::: details Response - ~~~json - { - "data": { - "deleteSubscriber": { - "success": "Subscriber deleted successfully." - } - } - } - ~~~ -::: diff --git a/docs/1.x/graphql-admin-api/explanation.md b/docs/1.x/graphql-admin-api/explanation.md deleted file mode 100644 index 536008c9..00000000 --- a/docs/1.x/graphql-admin-api/explanation.md +++ /dev/null @@ -1,78 +0,0 @@ -# Explanation - -If you check all the sections in which we have used paginatorInfo, in all the responses, you will find that there are four objects key i.e. `count`, `currentPage`, and `lastPage` and `total`. In this section, we will explain all the four keys. - -Let's take an example of the user section, we have some response in which we got these four keys. - -~~~json -{ - "paginatorInfo": { - "count": {...}, - "currentPage": {...}, - "lastPage": {...}, - "total": {...} - }, -} -~~~ - -## 1. Count Object `count` - -In the count object key, you will find the count of many objects which represent the Bagisto admin users. - -## 2. CurrentPage Object `currentPage` - -In the currentPage object, you will find the current page number. - -## 3. lastPage Object `lastPage` - -`lastPage` object will only used with pagination. you will find the last page number. - -## 3. Total Object `total` - -`total` object will only used with pagination. you will find the total page number. - -By defining the page number you can get the data of that perticular page. - -Let's take an example of the user section, - -- Request -~~~query - query users{ - users(page:1){ - paginatorInfo { - count - currentPage - lastPage - total - } - data{ - id - name - } - } - } - } -~~~ - -- Response - -~~~json - { - "data": { - "users": { - "paginatorInfo": { - "count": 2, - "currentPage": 1, - "lastPage": 1, - "total": 2 - }, - "data": [ - { - "id": "1", - "name": "Example", - } - ] - } - } - } -~~~ \ No newline at end of file diff --git a/docs/1.x/graphql-admin-api/getting-started-with-the-api.md b/docs/1.x/graphql-admin-api/getting-started-with-the-api.md deleted file mode 100644 index 7234175a..00000000 --- a/docs/1.x/graphql-admin-api/getting-started-with-the-api.md +++ /dev/null @@ -1,437 +0,0 @@ -# Authentication - -[[toc]] - -## Introduction - -By default the [Bagisto](https://bagisto.com) GraphQL API makes use of the [JWT package](https://jwt.io/) for token-based authentication. - -So, let's try to authenticate the Admin by using **JWT**. Please send valid **User Agent** header in your request whether you are using postman, curl or some other clients. - -- Single Request Endpoint - - `POST http(s)://example.com/graphql` - -- Headers - - | Key | Value | - | ------ | ---------------- | - | Accept | application/json | - - - -- Query - - ~~~query - mutation { - userLogin(input : { - email: "test@webkul.com" - password: "admin123" - }) - { - status - success - accessToken - tokenType - expiresIn - user { - id - name - email - password - apiToken - roleId - status - createdAt - updatedAt - } - } - } - ~~~ - -- Response - - - Once you send the request, you will get some random token string that will be used to access the API data. - - ~~~json - { - "data": { - "userLogin": { - "status": true, - "success": "Success: User login successfuly.", - "accessToken": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOlwvXC9iYWdzYWFzLmNvbVwvZ3JhcGhxbCIsImlhdCI6MTYyMDA0NTYyMywiZXhwIjoxNjIwMDQ5MjIzLCJuYmYiOjE2MjAwNDU2MjMsImp0aSI6Ikc5M09uck53WVdxNVlPSHUiLCJzdWIiOjksInBydiI6ImQ5MDA0NmUwMDg0MmQ1ZDMzMjA2OTMyNmVmMzhlMzIyMTJmMDhlMTQifQ.uenKsESWx3qhdkB4jcTofmG9EegNhwvAN6KcMZG1GBs", - "tokenType": "Bearer", - "expiresIn": 3600, - "user": { - "id": "9", - "name": "admin test", - "email": "test@webkul.com", - "password": "$2y$10$Iasq3fDPQ14E4/ZCF.l6qOYkq0ODtdIrAiq3i7McMsBDBug7EyqgS", - "apiToken": null, - "roleId": 9, - "status": true, - "createdAt": "2021-02-23 13:47:20", - "updatedAt": "2021-02-23 13:47:20" - } - } - } - } - ~~~ - -## Get Users - -Once you are authenticated, try to access the current Admin data by using **JWT**, use the Single GraphQL API endpoint for this, - -::: tip - -Here we are just showing a example of how to collect data from the GraphQL API with the usage of a **JWT** token. - -::: - -#### Headers - - | Key | Value | - | ------------- | --------------------- | - | Accept | application/json | - | Authorization | Bearer `token-string` | - -::: tip - -As you check the **JWT** authentication we got some token string, we just need to put that token in the request header. For e.g., - -~~~request-header - Accept:application/json - Authorization:Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9... -~~~ - -::: - -- Query - ~~~query - query users{ - users(page:1){ - paginatorInfo { - count - currentPage - lastPage - total - } - data{ - id - name - email - password - apiToken - roleId - status - role{id} - createdAt - updatedAt - success - } - } - } - ~~~ - -::: details Response - -~~~json -{ - "data": { - "users": { - "paginatorInfo": { - "count": 1, - "currentPage": 1, - "lastPage": 1, - "total": 1 - }, - "data": [ - { - "id": "1", - "name": "Example", - "email": "admin@example.com", - "password": "$2y$10$2wE6y44/8NLpL3oiEXb4F.YfcmBYI2SsDUn43eNKxKj7cNOffi5hu", - "apiToken": "VsB2TagdY8Ea2ZdCyr3MTliyGc5fDHNrWraMnjQt5MlYa0o6GdhU5sKZpYl73gHYXgWeljbjddLw22t9", - "roleId": 1, - "status": true, - "role": { - "id": "1" - }, - "createdAt": "2021-05-05 15:36:49", - "updatedAt": "2021-05-05 15:36:49", - "success": null - } - ] - } - } -} -~~~ - -::: - -## Get User By ID - -To get the specific user, you have to pass an `id` on query .By using this resource and request payload, you will get only a single object under the `data` object in response. - -- Headers - - | Key | Value | - | ------------- | --------------------- | - | Accept | application/json | - | Authorization | Bearer `token-string` | - - ### Examples - - Let's take an example, - -- Request Query - ~~~Query - query users{ - user(id:1){ - id - name - email - password - apiToken - roleId - status - role{id} - createdAt - updatedAt - success - } - } - ~~~ - -::: details Response - ~~~json - { - "data": { - "user": { - "id": "1", - "name": "Example", - "email": "admin@example.com", - "password": "$2y$10$2wE6y44/8NLpL3oiEXb4F.YfcmBYI2SsDUn43eNKxKj7cNOffi5hu", - "apiToken": "VsB2TagdY8Ea2ZdCyr3MTliyGc5fDHNrWraMnjQt5MlYa0o6GdhU5sKZpYl73gHYXgWeljbjddLw22t9", - "roleId": 1, - "status": true, - "role": { - "id": "1" - }, - "createdAt": "2021-05-05 15:36:49", - "updatedAt": "2021-05-05 15:36:49", - "success": null - } - } - } - ~~~ - - ::: - - ## Create a new User - - To create a user, you have to perform mutation on users and paas users fields in the request. - API call resource will create a new user, only if the admin has logged in. - - - Headers - - | Key | Value | - | ------------- | --------------------- | - | Accept | application/json | - | Authorization | Bearer `token-string` | - - ### Examples - - Let's take an example, - -- Request Mutation - ~~~Mutation - mutation{ - createUser(input:{ - name:"naresh" - email:"naresh.verma327@webkul.com" - password:"admin123" - passwordConfirmation:"admin123" - roleId:1 - status:true - }){ - id - name - email - password - apiToken - roleId - status - role{id} - createdAt - updatedAt - success - } - } - ~~~ - - ::: details Response - ~~~json - { - "data": { - "createUser": { - "id": "3", - "name": "naresh", - "email": "naresh.verma327@webkul.com", - "password": "$2y$10$zpAn6jjtD/22jDAPpzCeeuYVehzfuyOotdCZVD6ZxnP97t9jH7y3G", - "apiToken": "lPxwBwxUrwiEfLF2zSWdUHCD3BQt6CuqCGwBGW07wO0mvf7ROdoD5361bWVgHWtnnTIvrP9tsLzVyrM1", - "roleId": 1, - "status": true, - "role": { - "id": "1" - }, - "createdAt": "2021-05-05 17:32:54", - "updatedAt": "2021-05-05 17:32:54", - "success": null - } - } - } - ~~~ -::: - - ## Update a User - - To update a user, you have to perform mutation on users by passing the id of that user and users fields in the request query. - API call resource will create a new user, only if the admin has logged in. - - - Headers - - | Key | Value | - | ------------- | --------------------- | - | Accept | application/json | - | Authorization | Bearer `token-string` | - - ### Examples - - Let's take an example, - -- Request Mutation - ~~~Mutation - mutation{ - updateUser(id:3,input:{ - name:"nareshverma" - email:"naresh.verma327@webkul.com" - password:"admin123" - passwordConfirmation:"admin123" - roleId:1 - status:true - }) - { - id - name - email - password - apiToken - roleId - status - role{id} - createdAt - updatedAt - success - } - } - ~~~ - -::: details Response - ~~~json - { - "data": { - "updateUser": { - "id": "3", - "name": "nareshverma", - "email": "naresh.verma327@webkul.com", - "password": "$2y$10$h/p4.yOWgLxKj3Twsc4IFek1KOnSeb.j8VWxRRB.D23rABz1pYP2y", - "apiToken": "lPxwBwxUrwiEfLF2zSWdUHCD3BQt6CuqCGwBGW07wO0mvf7ROdoD5361bWVgHWtnnTIvrP9tsLzVyrM1", - "roleId": 1, - "status": true, - "role": { - "id": "1" - }, - "createdAt": "2021-05-05 17:32:54", - "updatedAt": "2021-05-05 17:40:26", - "success": null - } - } - } - ~~~ -::: - -## Delete a User - -To delete a user, you have to perform mutation on users by passing the id of that user. -API call resource will create a new user, only if the admin has logged in. - -- Headers - - | Key | Value | - | ------------- | --------------------- | - | Accept | application/json | - | Authorization | Bearer `token-string` | - - ### Examples - - Let's take an example, - -- Request Mutation - ~~~Mutation - mutation{ - deleteUser(id:3){ - success - } - } - ~~~ - -::: details Response - ~~~json - { - "data": { - "deleteUser": { - "success": "Admin deleted successfully." - } - } - } - ~~~ -::: - -## Logout - -You can logout the admin by performing the logout mutaion on user. - -- Headers - - | Key | Value | - | ------------- | --------------------- | - | Accept | application/json | - | Authorization | Bearer `token-string` | - - ### Examples - - Let's take an example, - - - Request Mutation - ~~~Mutation - mutation{ - userLogout{ - status - success - } - } - ~~~ - -::: details Response - ~~~json - { - "data": { - "userLogout": { - "status": true, - "success": "Success: User logout successfully." - } - } - } - ~~~ -::: diff --git a/docs/1.x/graphql-admin-api/installation.md b/docs/1.x/graphql-admin-api/installation.md deleted file mode 100644 index 6bffc471..00000000 --- a/docs/1.x/graphql-admin-api/installation.md +++ /dev/null @@ -1,48 +0,0 @@ - -# Installation: - -* You can clone the package from the GitHub [open-source headless laravel](https://bagisto.com/en/headless-ecommerce/) repository. - -~~~ -composer require bagisto/graphql-api dev-main -~~~ - -* Add the below-line inside the **modules** index in **config/concord.php** file: - -~~~ -\Webkul\GraphQLAPI\Providers\ModuleServiceProvider::class, -~~~ - -* Find a file **app/Http/Kernel.php** from root and add these two **middlewares** inside the **$middleware** array: - -~~~ -\Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class, -\Illuminate\Session\Middleware\StartSession::class, -~~~ - -* Add the **JWT_TTL (JWT time to live)** & **JWT_SHOW_BLACKLIST_EXCEPTION** entries in the **.env** file: - -~~~ -JWT_TTL=525600 -JWT_SHOW_BLACKLIST_EXCEPTION=true -~~~ - -#### To install and publish the assests and configurations, run below command from the root in terminal: - -~~~ -php artisan bagisto-graphql:install -~~~ - -### Now to use the graphql-playground for testing the APIs: - -~~~ -http://your-domain.com/graphql-playground -~~~ - -### Or you can also use the Postmen for testing the APIs: - -~~~ -http://your-domain.com/graphql -~~~ - -> That's it, now just execute the project on your specified domain. diff --git a/docs/1.x/graphql-admin-api/products.md b/docs/1.x/graphql-admin-api/products.md deleted file mode 100644 index 28e79e67..00000000 --- a/docs/1.x/graphql-admin-api/products.md +++ /dev/null @@ -1,9487 +0,0 @@ -# Products - -In this section, we will see all the APIs which are related to Products. - -## Get All Products - -You can get all the Products from the Bagisto store. You can achieve this job by using the `Products` API call. - -- Headers - - | Key | Value | - | ------------- | ---------------- | - | Accept | application/json | - -- Single Request Endpoint - - `POST http(s)://example.com/graphql` - -::: tip - - If you are using pagination and want to know more info about responses then check the [explanation](./explanation) portion. - -::: - -**Note**: No need to pass the all fields with the request, Pass the fields that you want in response. - -- Query - ~~~query - query products { - products { - paginatorInfo { - count - currentPage - lastPage - total - } - data { - id - type - attributeFamilyId - sku - parentId - productFlats { - id - sku - name - description - shortDescription - urlKey - new - featured - status - visibleIndividually - thumbnail - price - cost - specialPrice - specialPriceFrom - specialPriceTo - weight - color - colorLabel - size - sizeLabel - locale - channel - productId - parentId - minPrice - maxPrice - metaTitle - metaKeywords - metaDescription - width - height - depth - variants { - id - sku - name - description - shortDescription - urlKey - new - featured - status - visibleIndividually - thumbnail - price - locale - channel - productId - parentId - } - parent { - id - sku - name - description - shortDescription - urlKey - new - featured - status - visibleIndividually - thumbnail - price - cost - specialPrice - specialPriceFrom - specialPriceTo - weight - } - createdAt - updatedAt - } - variants { - id - type - attributeFamilyId - sku - parentId - } - parent { - id - type - attributeFamilyId - sku - parentId - } - attributeFamily { - id - code - name - status - isUserDefined - } - attributeValues { - id - productId - attributeId - locale - channel - textValue - booleanValue - integerValue - floatValue - dateTimeValue - dateValue - jsonValue - attribute { - id - code - adminName - type - } - } - superAttributes { - id - code - adminName - type - position - } - categories { - id - name - description - slug - urlPath - imageUrl - metaTitle - metaDescription - metaKeywords - position - status - displayMode - parentId - filterableAttributes { - id - adminName - code - type - position - } - translations { - id - name - description - localeId - locale - } - createdAt - updatedAt - } - inventories { - id - qty - productId - inventorySourceId - vendorId - inventorySource { - id - code - name - description - contactName - contactEmail - contactNumber - contactFax - country - state - city - street - postcode - priority - latitude - longitude - status - } - } - images { - id - type - path - productId - } - orderedInventories { - id - qty - productId - channelId - } - reviews { - id - title - rating - comment - status - productId - customerId - customerName - createdAt - updatedAt - } - groupedProducts { - id - qty - sortOrder - productId - associatedProductId - associatedProduct { - id - type - attributeFamilyId - sku - parentId - } - } - downloadableSamples { - id - url - file - fileName - type - sortOrder - productId - createdAt - updatedAt - translations { - id - locale - title - productDownloadableSampleId - } - } - downloadableLinks { - id - title - price - url - file - fileName - type - sampleUrl - sampleFile - sampleFileName - sampleType - sortOrder - productId - downloads - translations { - id - locale - title - productDownloadableLinkId - } - } - bundleOptions { - id - type - isRequired - sortOrder - productId - bundleOptionProducts { - id - qty - isUserDefined - sortOrder - isDefault - productBundleOptionId - productId - } - translations { - id - locale - label - productBundleOptionId - } - } - customerGroupPrices { - id - qty - valueType - value - productId - customerGroupId - createdAt - updatedAt - } - booking { - id - type - qty - location - showLocation - availableEveryWeek - availableFrom - availableTo - productId - defaultSlot { - id - bookingType - duration - breakTime - slots { - to - toDay - from - fromDay - } - bookingProductId - } - appointmentSlot { - id - duration - breakTime - sameSlotAllDays - slots { - from - to - } - bookingProductId - } - } - } - } - } - ~~~ - -::: details Response - -~~~json -{ - "data": { - "products": { - "paginatorInfo": { - "count": 1, - "currentPage": 1, - "lastPage": 1, - "total": 1 - }, - "data": [ - { - "id": "1", - "type": "simple", - "attributeFamilyId": 1, - "sku": "test-product", - "parentId": null, - "productFlats": [ - { - "id": "1", - "sku": "test-product", - "name": "testOutlet", - "description": "

testOutlet

", - "shortDescription": "

testOutlet

", - "urlKey": "testoutlet", - "new": true, - "featured": true, - "status": true, - "visibleIndividually": true, - "thumbnail": null, - "price": 5, - "cost": null, - "specialPrice": null, - "specialPriceFrom": null, - "specialPriceTo": null, - "weight": 3, - "color": 1, - "colorLabel": "Red", - "size": 6, - "sizeLabel": "S", - "locale": "en", - "channel": "default", - "productId": "1", - "parentId": null, - "minPrice": 4.5, - "maxPrice": 4.5, - "metaTitle": "", - "metaKeywords": "", - "metaDescription": "", - "width": 0, - "height": 0, - "depth": 0, - "variants": [], - "parent": null, - "createdAt": "2021-05-26 17:43:12", - "updatedAt": "2021-05-26 17:43:12" - } - ], - "variants": [], - "parent": null, - "attributeFamily": { - "id": "1", - "code": "default", - "name": "Default", - "status": false, - "isUserDefined": true - }, - "attributeValues": [ - { - "id": "1", - "productId": "1", - "attributeId": "9", - "locale": "en", - "channel": "default", - "textValue": "

testOutlet

", - "booleanValue": null, - "integerValue": null, - "floatValue": null, - "dateTimeValue": null, - "dateValue": null, - "jsonValue": null, - "attribute": { - "id": "9", - "code": "short_description", - "adminName": "Short Description", - "type": "textarea" - } - }, - { - "id": "2", - "productId": "1", - "attributeId": "10", - "locale": "en", - "channel": "default", - "textValue": "

testOutlet

", - "booleanValue": null, - "integerValue": null, - "floatValue": null, - "dateTimeValue": null, - "dateValue": null, - "jsonValue": null, - "attribute": { - "id": "10", - "code": "description", - "adminName": "Description", - "type": "textarea" - } - }, - { - "id": "3", - "productId": "1", - "attributeId": "1", - "locale": null, - "channel": null, - "textValue": "test-product", - "booleanValue": null, - "integerValue": null, - "floatValue": null, - "dateTimeValue": null, - "dateValue": null, - "jsonValue": null, - "attribute": { - "id": "1", - "code": "sku", - "adminName": "SKU", - "type": "text" - } - }, - { - "id": "4", - "productId": "1", - "attributeId": "2", - "locale": "en", - "channel": "default", - "textValue": "testOutlet", - "booleanValue": null, - "integerValue": null, - "floatValue": null, - "dateTimeValue": null, - "dateValue": null, - "jsonValue": null, - "attribute": { - "id": "2", - "code": "name", - "adminName": "Name", - "type": "text" - } - }, - { - "id": "5", - "productId": "1", - "attributeId": "3", - "locale": null, - "channel": null, - "textValue": "testoutlet", - "booleanValue": null, - "integerValue": null, - "floatValue": null, - "dateTimeValue": null, - "dateValue": null, - "jsonValue": null, - "attribute": { - "id": "3", - "code": "url_key", - "adminName": "URL Key", - "type": "text" - } - }, - { - "id": "6", - "productId": "1", - "attributeId": "4", - "locale": null, - "channel": "default", - "textValue": null, - "booleanValue": null, - "integerValue": 0, - "floatValue": null, - "dateTimeValue": null, - "dateValue": null, - "jsonValue": null, - "attribute": { - "id": "4", - "code": "tax_category_id", - "adminName": "Tax Category", - "type": "select" - } - }, - { - "id": "7", - "productId": "1", - "attributeId": "5", - "locale": null, - "channel": null, - "textValue": null, - "booleanValue": true, - "integerValue": null, - "floatValue": null, - "dateTimeValue": null, - "dateValue": null, - "jsonValue": null, - "attribute": { - "id": "5", - "code": "new", - "adminName": "New", - "type": "boolean" - } - }, - { - "id": "8", - "productId": "1", - "attributeId": "6", - "locale": null, - "channel": null, - "textValue": null, - "booleanValue": true, - "integerValue": null, - "floatValue": null, - "dateTimeValue": null, - "dateValue": null, - "jsonValue": null, - "attribute": { - "id": "6", - "code": "featured", - "adminName": "Featured", - "type": "boolean" - } - }, - { - "id": "9", - "productId": "1", - "attributeId": "7", - "locale": null, - "channel": null, - "textValue": null, - "booleanValue": true, - "integerValue": null, - "floatValue": null, - "dateTimeValue": null, - "dateValue": null, - "jsonValue": null, - "attribute": { - "id": "7", - "code": "visible_individually", - "adminName": "Visible Individually", - "type": "boolean" - } - }, - { - "id": "10", - "productId": "1", - "attributeId": "8", - "locale": null, - "channel": null, - "textValue": null, - "booleanValue": true, - "integerValue": null, - "floatValue": null, - "dateTimeValue": null, - "dateValue": null, - "jsonValue": null, - "attribute": { - "id": "8", - "code": "status", - "adminName": "Status", - "type": "boolean" - } - }, - { - "id": "11", - "productId": "1", - "attributeId": "23", - "locale": null, - "channel": null, - "textValue": null, - "booleanValue": null, - "integerValue": 1, - "floatValue": null, - "dateTimeValue": null, - "dateValue": null, - "jsonValue": null, - "attribute": { - "id": "23", - "code": "color", - "adminName": "Color", - "type": "select" - } - }, - { - "id": "12", - "productId": "1", - "attributeId": "24", - "locale": null, - "channel": null, - "textValue": null, - "booleanValue": null, - "integerValue": 6, - "floatValue": null, - "dateTimeValue": null, - "dateValue": null, - "jsonValue": null, - "attribute": { - "id": "24", - "code": "size", - "adminName": "Size", - "type": "select" - } - }, - { - "id": "13", - "productId": "1", - "attributeId": "26", - "locale": null, - "channel": null, - "textValue": null, - "booleanValue": true, - "integerValue": null, - "floatValue": null, - "dateTimeValue": null, - "dateValue": null, - "jsonValue": null, - "attribute": { - "id": "26", - "code": "guest_checkout", - "adminName": "Guest Checkout", - "type": "boolean" - } - }, - { - "id": "14", - "productId": "1", - "attributeId": "27", - "locale": null, - "channel": null, - "textValue": "", - "booleanValue": null, - "integerValue": null, - "floatValue": null, - "dateTimeValue": null, - "dateValue": null, - "jsonValue": null, - "attribute": { - "id": "27", - "code": "product_number", - "adminName": "Product Number", - "type": "text" - } - }, - { - "id": "15", - "productId": "1", - "attributeId": "16", - "locale": "en", - "channel": "default", - "textValue": "", - "booleanValue": null, - "integerValue": null, - "floatValue": null, - "dateTimeValue": null, - "dateValue": null, - "jsonValue": null, - "attribute": { - "id": "16", - "code": "meta_title", - "adminName": "Meta Title", - "type": "textarea" - } - }, - { - "id": "16", - "productId": "1", - "attributeId": "17", - "locale": "en", - "channel": "default", - "textValue": "", - "booleanValue": null, - "integerValue": null, - "floatValue": null, - "dateTimeValue": null, - "dateValue": null, - "jsonValue": null, - "attribute": { - "id": "17", - "code": "meta_keywords", - "adminName": "Meta Keywords", - "type": "textarea" - } - }, - { - "id": "17", - "productId": "1", - "attributeId": "18", - "locale": "en", - "channel": "default", - "textValue": "", - "booleanValue": null, - "integerValue": null, - "floatValue": null, - "dateTimeValue": null, - "dateValue": null, - "jsonValue": null, - "attribute": { - "id": "18", - "code": "meta_description", - "adminName": "Meta Description", - "type": "textarea" - } - }, - { - "id": "18", - "productId": "1", - "attributeId": "11", - "locale": null, - "channel": null, - "textValue": null, - "booleanValue": null, - "integerValue": null, - "floatValue": 5, - "dateTimeValue": null, - "dateValue": null, - "jsonValue": null, - "attribute": { - "id": "11", - "code": "price", - "adminName": "Price", - "type": "price" - } - }, - { - "id": "19", - "productId": "1", - "attributeId": "12", - "locale": null, - "channel": "default", - "textValue": null, - "booleanValue": null, - "integerValue": null, - "floatValue": null, - "dateTimeValue": null, - "dateValue": null, - "jsonValue": null, - "attribute": { - "id": "12", - "code": "cost", - "adminName": "Cost", - "type": "price" - } - }, - { - "id": "20", - "productId": "1", - "attributeId": "13", - "locale": null, - "channel": null, - "textValue": null, - "booleanValue": null, - "integerValue": null, - "floatValue": null, - "dateTimeValue": null, - "dateValue": null, - "jsonValue": null, - "attribute": { - "id": "13", - "code": "special_price", - "adminName": "Special Price", - "type": "price" - } - }, - { - "id": "21", - "productId": "1", - "attributeId": "14", - "locale": null, - "channel": "default", - "textValue": null, - "booleanValue": null, - "integerValue": null, - "floatValue": null, - "dateTimeValue": null, - "dateValue": null, - "jsonValue": null, - "attribute": { - "id": "14", - "code": "special_price_from", - "adminName": "Special Price From", - "type": "date" - } - }, - { - "id": "22", - "productId": "1", - "attributeId": "15", - "locale": null, - "channel": "default", - "textValue": null, - "booleanValue": null, - "integerValue": null, - "floatValue": null, - "dateTimeValue": null, - "dateValue": null, - "jsonValue": null, - "attribute": { - "id": "15", - "code": "special_price_to", - "adminName": "Special Price To", - "type": "date" - } - }, - { - "id": "23", - "productId": "1", - "attributeId": "19", - "locale": null, - "channel": null, - "textValue": "", - "booleanValue": null, - "integerValue": null, - "floatValue": null, - "dateTimeValue": null, - "dateValue": null, - "jsonValue": null, - "attribute": { - "id": "19", - "code": "width", - "adminName": "Width", - "type": "text" - } - }, - { - "id": "24", - "productId": "1", - "attributeId": "20", - "locale": null, - "channel": null, - "textValue": "", - "booleanValue": null, - "integerValue": null, - "floatValue": null, - "dateTimeValue": null, - "dateValue": null, - "jsonValue": null, - "attribute": { - "id": "20", - "code": "height", - "adminName": "Height", - "type": "text" - } - }, - { - "id": "25", - "productId": "1", - "attributeId": "21", - "locale": null, - "channel": null, - "textValue": "", - "booleanValue": null, - "integerValue": null, - "floatValue": null, - "dateTimeValue": null, - "dateValue": null, - "jsonValue": null, - "attribute": { - "id": "21", - "code": "depth", - "adminName": "Depth", - "type": "text" - } - }, - { - "id": "26", - "productId": "1", - "attributeId": "22", - "locale": null, - "channel": null, - "textValue": "3", - "booleanValue": null, - "integerValue": null, - "floatValue": null, - "dateTimeValue": null, - "dateValue": null, - "jsonValue": null, - "attribute": { - "id": "22", - "code": "weight", - "adminName": "Weight", - "type": "text" - } - } - ], - "superAttributes": [], - "categories": [], - "inventories": [ - { - "id": "1", - "qty": 3, - "productId": "1", - "inventorySourceId": "1", - "vendorId": 0, - "inventorySource": { - "id": "1", - "code": "default", - "name": "Default", - "description": null, - "contactName": "Detroit Warehouse", - "contactEmail": "warehouse@example.com", - "contactNumber": "1234567899", - "contactFax": null, - "country": "US", - "state": "MI", - "city": "Detroit", - "street": "12th Street", - "postcode": "48127", - "priority": 0, - "latitude": null, - "longitude": null, - "status": true - } - }, - { - "id": "2", - "qty": 0, - "productId": "1", - "inventorySourceId": "2", - "vendorId": 0, - "inventorySource": { - "id": "2", - "code": "new", - "name": "demoinventory", - "description": "demo", - "contactName": "jyoti", - "contactEmail": "jyoti@webkul.com", - "contactNumber": "7252756566", - "contactFax": null, - "country": "IN", - "state": "UP", - "city": "Gorakhpur", - "street": "d-54", - "postcode": "273003", - "priority": 1, - "latitude": null, - "longitude": null, - "status": true - } - } - ], - "images": [], - "orderedInventories": [], - "reviews": [], - "groupedProducts": [], - "downloadableSamples": [], - "downloadableLinks": [], - "bundleOptions": [], - "customerGroupPrices": [], - "booking": null - } - ] - } - } -} -~~~ -::: - -## Get Product By ID - -To get the specific Product, you have to pass an `id` field with query request .By using this resource and request payload, you will get only a single object under the `data` object in response. - -- Headers - - | Key | Value | - | ------------- | --------------------- | - | Accept | application/json | - | Authorization | Bearer `token-string` | - -**Note**: You can Pass all the fields of the above request. - -### Examples - -Let's take an example, - -- Request Query - ~~~Query - query product { - product(id: 1) { - id - type - attributeFamilyId - sku - parentId - productFlats { - id - sku - name - description - shortDescription - urlKey - new - featured - status - visibleIndividually - thumbnail - price - cost - specialPrice - specialPriceFrom - specialPriceTo - weight - color - colorLabel - size - sizeLabel - locale - channel - productId - parentId - minPrice - maxPrice - metaTitle - metaKeywords - metaDescription - width - height - depth - createdAt - updatedAt - } - inventories { - id - qty - productId - inventorySourceId - vendorId - inventorySource { - id - code - name - description - contactName - contactEmail - contactNumber - contactFax - country - state - city - street - postcode - priority - latitude - longitude - status - } - } - images { - id - type - path - productId - } - orderedInventories { - id - qty - productId - channelId - } - reviews { - id - title - rating - comment - status - productId - customerId - customerName - createdAt - updatedAt - } - } - } - ~~~ - -::: details Response - ~~~json - { - "data": { - "catalogRule": { - "id": "1", - "name": "test rule", - "description": "test rule", - "startsFrom": "2021-05-25", - "endsTill": "2021-05-27", - "status": true, - "conditionType": true, - "conditions": "null", - "endOtherRules": true, - "actionType": "by_percent", - "discountAmount": 10, - "sortOrder": 1, - "createdAt": "2021-05-26 17:28:54", - "updatedAt": "2021-05-26 17:28:54", - "channels": [ - { - "id": "1", - "code": "default", - "name": "Default", - "description": null, - "theme": "velocity", - "homePageContent": "\n

@include(\"shop::home.slider\") @include(\"shop::home.featured-products\") @include(\"shop::home.new-products\")

\n
\n
\n \"test\"\n
\n
\n \"test\"\n \"test\"\n
\n
\n ", - "footerContent": "\n \n
\n Connect With Us\n \n
\n ", - "hostname": "http://localhost/graphql/public", - "defaultLocaleId": 1, - "baseCurrencyId": 1, - "rootCategoryId": 1, - "homeSeo": "{\"meta_title\": \"Demo store\", \"meta_keywords\": \"Demo store meta keyword\", \"meta_description\": \"Demo store meta description\"}", - "locales": [ - { - "id": "1", - "name": "English", - "code": "en", - "direction": "ltr" - } - ], - "defaultLocale": "{\"id\":1,\"code\":\"en\",\"name\":\"English\",\"created_at\":null,\"updated_at\":null,\"direction\":\"ltr\",\"locale_image\":null}", - "currencies": [ - { - "id": "1", - "name": "US Dollar", - "code": "USD", - "symbol": "$" - } - ], - "inventorySources": [ - { - "id": "1", - "code": "default", - "name": "Default", - "description": null, - "contactName": "Detroit Warehouse", - "contactEmail": "warehouse@example.com", - "contactNumber": "1234567899", - "contactFax": null, - "country": "US", - "state": "MI", - "city": "Detroit", - "street": "12th Street", - "postcode": "48127", - "priority": 0, - "latitude": null, - "longitude": null, - "status": true - } - ], - "baseCurrency": "{\"id\":1,\"code\":\"USD\",\"name\":\"US Dollar\",\"created_at\":null,\"updated_at\":null,\"symbol\":\"$\"}", - "rootCategory": "{\"id\":1,\"position\":1,\"image\":null,\"status\":1,\"_lft\":1,\"_rgt\":14,\"parent_id\":null,\"created_at\":\"2021-05-05T10:06:44.000000Z\",\"updated_at\":\"2021-05-05T10:06:44.000000Z\",\"display_mode\":\"products_and_description\",\"category_icon_path\":null,\"additional\":null,\"name\":\"Root\",\"description\":\"Root\",\"slug\":\"root\",\"url_path\":\"\",\"meta_title\":\"\",\"meta_description\":\"\",\"meta_keywords\":\"\",\"translations\":[{\"id\":1,\"name\":\"Root\",\"slug\":\"root\",\"description\":\"Root\",\"meta_title\":\"\",\"meta_description\":\"\",\"meta_keywords\":\"\",\"category_id\":1,\"locale\":\"en\",\"locale_id\":null,\"url_path\":\"\"}]}", - "logoUrl": null, - "faviconUrl": null - }, - { - "id": "2", - "code": "newca", - "name": "nerty", - "description": "ajsyg", - "theme": "gdg", - "homePageContent": "fhg", - "footerContent": "fh", - "hostname": "http://bag1.com", - "defaultLocaleId": 1, - "baseCurrencyId": 1, - "rootCategoryId": 1, - "homeSeo": "{\"meta_title\": \"gfyj\", \"meta_keywords\": \"gvgh\", \"meta_description\": \"gcg\"}", - "locales": [ - { - "id": "1", - "name": "English", - "code": "en", - "direction": "ltr" - } - ], - "defaultLocale": "{\"id\":1,\"code\":\"en\",\"name\":\"English\",\"created_at\":null,\"updated_at\":null,\"direction\":\"ltr\",\"locale_image\":null}", - "currencies": [ - { - "id": "1", - "name": "US Dollar", - "code": "USD", - "symbol": "$" - } - ], - "inventorySources": [ - { - "id": "1", - "code": "default", - "name": "Default", - "description": null, - "contactName": "Detroit Warehouse", - "contactEmail": "warehouse@example.com", - "contactNumber": "1234567899", - "contactFax": null, - "country": "US", - "state": "MI", - "city": "Detroit", - "street": "12th Street", - "postcode": "48127", - "priority": 0, - "latitude": null, - "longitude": null, - "status": true - } - ], - "baseCurrency": "{\"id\":1,\"code\":\"USD\",\"name\":\"US Dollar\",\"created_at\":null,\"updated_at\":null,\"symbol\":\"$\"}", - "rootCategory": "{\"id\":1,\"position\":1,\"image\":null,\"status\":1,\"_lft\":1,\"_rgt\":14,\"parent_id\":null,\"created_at\":\"2021-05-05T10:06:44.000000Z\",\"updated_at\":\"2021-05-05T10:06:44.000000Z\",\"display_mode\":\"products_and_description\",\"category_icon_path\":null,\"additional\":null,\"name\":\"Root\",\"description\":\"Root\",\"slug\":\"root\",\"url_path\":\"\",\"meta_title\":\"\",\"meta_description\":\"\",\"meta_keywords\":\"\",\"translations\":[{\"id\":1,\"name\":\"Root\",\"slug\":\"root\",\"description\":\"Root\",\"meta_title\":\"\",\"meta_description\":\"\",\"meta_keywords\":\"\",\"category_id\":1,\"locale\":\"en\",\"locale_id\":null,\"url_path\":\"\"}]}", - "logoUrl": null, - "faviconUrl": null - } - ], - "customerGroups": [ - { - "id": "1", - "name": "Guest", - "code": "guest", - "isUserDefined": false, - "createdAt": null, - "updatedAt": null - }, - { - "id": "2", - "name": "General", - "code": "general", - "isUserDefined": false, - "createdAt": null, - "updatedAt": null - }, - { - "id": "3", - "name": "Wholesale", - "code": "wholesale", - "isUserDefined": false, - "createdAt": null, - "updatedAt": null - }, - { - "id": "4", - "name": "VIP Customers", - "code": "vip", - "isUserDefined": false, - "createdAt": "2021-05-26 16:32:06", - "updatedAt": "2021-05-26 16:33:57" - } - ], - "catalogRuleProducts": [], - "catalogRuleProductPrices": [] - } - } - } - ~~~ -::: - -### 3. Get Filtered Products - -You can get the filter data from the Products by passing the input fileds in the request and that you want in the response. - -- Headers - - | Key | Value | - | ------------- | --------------------- | - | Accept | application/json | - | Authorization | Bearer `token-string` | - -**Note**: You can pass all the related fileds that you want in response. - -### Examples - -Let's take an example, - -- Request Query - -~~~query - query products { - products(input:{ - type: "simple" - id: "1" - sku: "test-product" - },page:1) { - paginatorInfo { - count - currentPage - lastPage - total - } - data { - id - type - attributeFamilyId - sku - parentId - productFlats { - id - sku - name - description - shortDescription - urlKey - new - featured - status - visibleIndividually - thumbnail - price - cost - specialPrice - specialPriceFrom - specialPriceTo - weight - color - colorLabel - size - sizeLabel - locale - channel - productId - parentId - minPrice - maxPrice - metaTitle - metaKeywords - metaDescription - width - height - depth - createdAt - updatedAt - } - inventories { - id - qty - productId - inventorySourceId - vendorId - inventorySource { - id - code - name - description - contactName - contactEmail - contactNumber - contactFax - country - state - city - street - postcode - priority - latitude - longitude - status - } - } - images { - id - type - path - productId - } - orderedInventories { - id - qty - productId - channelId - } - reviews { - id - title - rating - comment - status - productId - customerId - customerName - createdAt - updatedAt - } - } - } - } -~~~ - -::: details Response - ~~~json - { - "data": { - "products": { - "paginatorInfo": { - "count": 1, - "currentPage": 1, - "lastPage": 1, - "total": 1 - }, - "data": [ - { - "id": "1", - "type": "simple", - "attributeFamilyId": 1, - "sku": "test-product", - "parentId": null, - "productFlats": [ - { - "id": "1", - "sku": "test-product", - "name": "testOutlet", - "description": "

testOutlet

", - "shortDescription": "

testOutlet

", - "urlKey": "testoutlet", - "new": true, - "featured": true, - "status": true, - "visibleIndividually": true, - "thumbnail": null, - "price": 5, - "cost": null, - "specialPrice": null, - "specialPriceFrom": null, - "specialPriceTo": null, - "weight": 3, - "color": 1, - "colorLabel": "Red", - "size": 6, - "sizeLabel": "S", - "locale": "en", - "channel": "default", - "productId": "1", - "parentId": null, - "minPrice": 4.5, - "maxPrice": 4.5, - "metaTitle": "", - "metaKeywords": "", - "metaDescription": "", - "width": 0, - "height": 0, - "depth": 0, - "createdAt": "2021-05-26 17:43:12", - "updatedAt": "2021-05-26 17:43:12" - } - ], - "inventories": [ - { - "id": "1", - "qty": 3, - "productId": "1", - "inventorySourceId": "1", - "vendorId": 0, - "inventorySource": { - "id": "1", - "code": "default", - "name": "Default", - "description": null, - "contactName": "Detroit Warehouse", - "contactEmail": "warehouse@example.com", - "contactNumber": "1234567899", - "contactFax": null, - "country": "US", - "state": "MI", - "city": "Detroit", - "street": "12th Street", - "postcode": "48127", - "priority": 0, - "latitude": null, - "longitude": null, - "status": true - } - }, - { - "id": "2", - "qty": 0, - "productId": "1", - "inventorySourceId": "2", - "vendorId": 0, - "inventorySource": { - "id": "2", - "code": "new", - "name": "demoinventory", - "description": "demo", - "contactName": "jyoti", - "contactEmail": "jyoti@webkul.com", - "contactNumber": "7252756566", - "contactFax": null, - "country": "IN", - "state": "UP", - "city": "Gorakhpur", - "street": "d-54", - "postcode": "273003", - "priority": 1, - "latitude": null, - "longitude": null, - "status": true - } - } - ], - "images": [], - "orderedInventories": [], - "reviews": [] - } - ] - } - } - } - ~~~ -::: - - -### 4. Delete a Product - -To delete a Product, you have to perform mutation on Product by passing the id of that Product. -API call will delete a Product, only if the admin has logged in. - -- Headers - - | Key | Value | - | ------------- | --------------------- | - | Accept | application/json | - | Authorization | Bearer `token-string` | - -### Examples - - Let's take an example, - -- Request Mutation - ~~~Mutation - mutation deleteProduct { - deleteProduct(id: 2) { - success - } - } - ~~~ - -::: details Response - ~~~json - { - "data": { - "deleteProduct": { - "success": "Product deleted successfully." - } - } - } - ~~~ -::: - -## Simple Products - -In this section, we will see all the APIs which are related to Simple Products. - -### 1. Create a new Simple Product - - To create a Simple Product, you have to perform mutation on Product and paas the related fields in the request. - API call resource will create a new Product, only if the admin has logged in. - - - Headers - - | Key | Value | - | ------------- | --------------------- | - | Accept | application/json | - | Authorization | Bearer `token-string` | - - -### Examples - - Let's take an example, - -- Request Mutation - ~~~Mutation - mutation createProduct { - createProduct(input: { - type: "simple" - attributeFamilyId: 1 - sku: "men-cloths" - }) { - id - type - attributeFamilyId - sku - parentId - productFlats { - id - sku - name - description - shortDescription - urlKey - new - featured - status - visibleIndividually - thumbnail - price - cost - specialPrice - specialPriceFrom - specialPriceTo - weight - color - colorLabel - size - sizeLabel - locale - channel - productId - parentId - minPrice - maxPrice - metaTitle - metaKeywords - metaDescription - width - height - depth - variants { - id - sku - name - description - shortDescription - urlKey - new - featured - status - visibleIndividually - thumbnail - price - locale - channel - productId - parentId - } - parent { - id - sku - name - description - shortDescription - urlKey - new - featured - status - visibleIndividually - thumbnail - price - cost - specialPrice - specialPriceFrom - specialPriceTo - weight - } - createdAt - updatedAt - } - variants { - id - type - attributeFamilyId - sku - parentId - } - parent { - id - type - attributeFamilyId - sku - parentId - } - attributeFamily { - id - code - name - status - isUserDefined - } - attributeValues { - id - productId - attributeId - locale - channel - textValue - booleanValue - integerValue - floatValue - dateTimeValue - dateValue - jsonValue - attribute { - id - code - adminName - type - } - } - superAttributes { - id - code - adminName - type - position - } - categories { - id - name - description - slug - urlPath - imageUrl - metaTitle - metaDescription - metaKeywords - position - status - displayMode - parentId - filterableAttributes { - id - adminName - code - type - position - } - translations { - id - name - description - localeId - locale - } - createdAt - updatedAt - } - inventories { - id - qty - productId - inventorySourceId - vendorId - inventorySource { - id - code - name - description - contactName - contactEmail - contactNumber - contactFax - country - state - city - street - postcode - priority - latitude - longitude - status - } - } - images { - id - type - path - productId - } - orderedInventories { - id - qty - productId - channelId - } - reviews { - id - title - rating - comment - status - productId - customerId - customerName - createdAt - updatedAt - } - groupedProducts { - id - qty - sortOrder - productId - associatedProductId - associatedProduct { - id - type - attributeFamilyId - sku - parentId - } - } - downloadableSamples { - id - url - file - fileName - type - sortOrder - productId - createdAt - updatedAt - translations { - id - locale - title - productDownloadableSampleId - } - } - downloadableLinks { - id - title - price - url - file - fileName - type - sampleUrl - sampleFile - sampleFileName - sampleType - sortOrder - productId - downloads - translations { - id - locale - title - productDownloadableLinkId - } - } - bundleOptions { - id - type - isRequired - sortOrder - productId - bundleOptionProducts { - id - qty - isUserDefined - sortOrder - isDefault - productBundleOptionId - productId - } - translations { - id - locale - label - productBundleOptionId - } - } - customerGroupPrices { - id - qty - valueType - value - productId - customerGroupId - createdAt - updatedAt - } - booking { - id - type - qty - location - showLocation - availableEveryWeek - availableFrom - availableTo - productId - defaultSlot { - id - bookingType - duration - breakTime - slots { - to - toDay - from - fromDay - } - bookingProductId - } - appointmentSlot { - id - duration - breakTime - sameSlotAllDays - slots { - from - to - } - bookingProductId - } - } - } - } - ~~~ - -::: details Response - ~~~json - { - "data": { - "createProduct": { - "id": "2", - "type": "simple", - "attributeFamilyId": 1, - "sku": "men-cloths", - "parentId": null, - "productFlats": [ - { - "id": "2", - "sku": "", - "name": null, - "description": null, - "shortDescription": null, - "urlKey": null, - "new": null, - "featured": null, - "status": null, - "visibleIndividually": null, - "thumbnail": null, - "price": null, - "cost": null, - "specialPrice": null, - "specialPriceFrom": null, - "specialPriceTo": null, - "weight": null, - "color": null, - "colorLabel": null, - "size": null, - "sizeLabel": null, - "locale": "en", - "channel": "default", - "productId": "2", - "parentId": null, - "minPrice": null, - "maxPrice": null, - "metaTitle": null, - "metaKeywords": null, - "metaDescription": null, - "width": null, - "height": null, - "depth": null, - "variants": [], - "parent": null, - "createdAt": "2021-05-26 20:55:15", - "updatedAt": "2021-05-26 20:55:15" - } - ], - "variants": [], - "parent": null, - "attributeFamily": { - "id": "1", - "code": "default", - "name": "Default", - "status": false, - "isUserDefined": true - }, - "attributeValues": [], - "superAttributes": [], - "categories": [], - "inventories": [], - "images": [], - "orderedInventories": [], - "reviews": [], - "groupedProducts": [], - "downloadableSamples": [], - "downloadableLinks": [], - "bundleOptions": [], - "customerGroupPrices": [], - "booking": null - } - } - } - ~~~ -::: - -### 2. Update Product - -By using this API call you can update the Product. To do this , you have to perform update mutation on Product and paas the related fields in the request. -API call will update a Product, only if the admin has logged in. - - - - Headers - - | Key | Value | - | ------------- | --------------------- | - | Accept | application/json | - | Authorization | Bearer `token-string` | - -**Note**: You can pass all the related fileds with request that you want in the response. - -### Examples - - Let's take an example, - -- Request Mutation - ~~~Mutation - mutation updateProduct { - updateProduct(id: 2, input: { - channel: "default" - locale: "en" - sku: "men-cloths" - name: "Men Cloths" - urlKey: "men-cloths" - taxCategoryId: 1 - new: true - featured: true - visibleIndividually: true - status: true - guestCheckout: true - color: 3 - size: 9 - shortDescription: "

Home Decor Short Description

" - description: "

Home Decor Description

" - metaTitle: "Home Decor Meta Title" - metaKeywords: "Home Decor Meta Keywords" - metaDescription: "Home Decor Meta Description" - price: 12.55 - cost: 11.50 - specialPrice: 11.30 - specialPriceFrom: "2021-02-08" - specialPriceTo: "2021-02-28" - width: 30 - height: 24 - depth: 11 - weight: 5.20 - customerGroupPrices: [{ - customerGroupId: 2 - qty: 2 - valueType: "fixed" - value: 10 - }, { - customerGroupId: 3 - qty: 3 - valueType: "discount" - value: 2 - }] - inventories: [{ - inventorySourceId: 1 - qty: 111 - }, { - inventorySourceId: 2 - qty: 222 - }] - categories: 1 - channels: [1] - upSell: [1] - images: [ - "http://graphqlnew.com/themes/velocity/assets/images/banner.png", - "http://graphqlnew.com/themes/velocity/assets/images/kids.png", - "http://graphqlnew.com/themes/velocity/assets/images/headphones.png" - ] - }) { - id - type - attributeFamilyId - sku - parentId - productFlats { - id - sku - name - description - shortDescription - urlKey - new - featured - status - visibleIndividually - thumbnail - price - cost - specialPrice - specialPriceFrom - specialPriceTo - weight - color - colorLabel - size - sizeLabel - locale - channel - productId - parentId - minPrice - maxPrice - metaTitle - metaKeywords - metaDescription - width - height - depth - createdAt - updatedAt - } - inventories { - id - qty - productId - inventorySourceId - vendorId - inventorySource { - id - code - name - description - contactName - contactEmail - contactNumber - contactFax - country - state - city - street - postcode - priority - latitude - longitude - status - } - } - images { - id - type - path - productId - } - orderedInventories { - id - qty - productId - channelId - } - reviews { - id - title - rating - comment - status - productId - customerId - customerName - createdAt - updatedAt - } - } - } - ~~~ - -::: details Response - ~~~json - { - "data": { - "updateProduct": { - "id": "2", - "type": "simple", - "attributeFamilyId": 1, - "sku": "men-cloths", - "parentId": null, - "productFlats": [ - { - "id": "2", - "sku": "men-cloths", - "name": "Men Cloths", - "description": "

Home Decor Description

", - "shortDescription": "

Home Decor Short Description

", - "urlKey": "men-cloths", - "new": true, - "featured": true, - "status": true, - "visibleIndividually": true, - "thumbnail": null, - "price": 12.55, - "cost": 11.5, - "specialPrice": 11.3, - "specialPriceFrom": "2021-02-08", - "specialPriceTo": "2021-02-28", - "weight": 5.2, - "color": 3, - "colorLabel": "Yellow", - "size": 9, - "sizeLabel": "XL", - "locale": "en", - "channel": "default", - "productId": "2", - "parentId": null, - "minPrice": 11.295, - "maxPrice": 11.295, - "metaTitle": "Home Decor Meta Title", - "metaKeywords": "Home Decor Meta Keywords", - "metaDescription": "Home Decor Meta Description", - "width": 30, - "height": 24, - "depth": 11, - "createdAt": "2021-05-26 20:55:15", - "updatedAt": "2021-05-26 20:55:15" - } - ], - "inventories": [ - { - "id": "3", - "qty": 111, - "productId": "2", - "inventorySourceId": "1", - "vendorId": 0, - "inventorySource": { - "id": "1", - "code": "default", - "name": "Default", - "description": null, - "contactName": "Detroit Warehouse", - "contactEmail": "warehouse@example.com", - "contactNumber": "1234567899", - "contactFax": null, - "country": "US", - "state": "MI", - "city": "Detroit", - "street": "12th Street", - "postcode": "48127", - "priority": 0, - "latitude": null, - "longitude": null, - "status": true - } - }, - { - "id": "4", - "qty": 222, - "productId": "2", - "inventorySourceId": "2", - "vendorId": 0, - "inventorySource": { - "id": "2", - "code": "new", - "name": "demoinventory", - "description": "demo", - "contactName": "jyoti", - "contactEmail": "jyoti@webkul.com", - "contactNumber": "7252756566", - "contactFax": null, - "country": "IN", - "state": "UP", - "city": "Gorakhpur", - "street": "d-54", - "postcode": "273003", - "priority": 1, - "latitude": null, - "longitude": null, - "status": true - } - } - ], - "images": [], - "orderedInventories": [], - "reviews": [] - } - } - } - ~~~ -::: - - -## Configurable Products - -In this section, we will see all the APIs which are related to Configurable Products. - -### 1. Create a new Configurable Product - - To create a Configurable Product, you have to perform mutation on Configurable Product and paas the related fields in the request. - API call resource will create a new Configurable Product, only if the admin has logged in. - - - Headers - - | Key | Value | - | ------------- | --------------------- | - | Accept | application/json | - | Authorization | Bearer `token-string` | - -**Note**: Here you can pass Only those filed with the request that you want in the response. - -### Examples - - Let's take an example, - -- Request Mutation - ~~~Mutation - mutation createProduct { - createProduct(input: { - type: "configurable" - attributeFamilyId: 1 - sku: "home-decor-2" - # use super_attributes and family index in configurable type product only - superAttributes: [{ - attributeCode: "color" - values: [1, 2] - }, { - attributeCode: "size" - values: [6] - }] - family: 1 - }) { - id - type - attributeFamilyId - sku - parentId - productFlats { - id - sku - name - description - shortDescription - urlKey - new - featured - status - visibleIndividually - thumbnail - price - cost - specialPrice - specialPriceFrom - specialPriceTo - weight - color - colorLabel - size - sizeLabel - locale - channel - productId - parentId - minPrice - maxPrice - metaTitle - metaKeywords - metaDescription - width - height - depth - variants { - id - sku - name - description - shortDescription - urlKey - new - featured - status - visibleIndividually - thumbnail - price - locale - channel - productId - parentId - } - parent { - id - sku - name - description - shortDescription - urlKey - new - featured - status - visibleIndividually - thumbnail - price - cost - specialPrice - specialPriceFrom - specialPriceTo - weight - } - createdAt - updatedAt - } - variants { - id - type - attributeFamilyId - sku - parentId - } - parent { - id - type - attributeFamilyId - sku - parentId - } - attributeFamily { - id - code - name - status - isUserDefined - } - attributeValues { - id - productId - attributeId - locale - channel - textValue - booleanValue - integerValue - floatValue - dateTimeValue - dateValue - jsonValue - attribute { - id - code - adminName - type - } - } - superAttributes { - id - code - adminName - type - position - } - categories { - id - name - description - slug - urlPath - imageUrl - metaTitle - metaDescription - metaKeywords - position - status - displayMode - parentId - filterableAttributes { - id - adminName - code - type - position - } - translations { - id - name - description - localeId - locale - } - createdAt - updatedAt - } - inventories { - id - qty - productId - inventorySourceId - vendorId - inventorySource { - id - code - name - description - contactName - contactEmail - contactNumber - contactFax - country - state - city - street - postcode - priority - latitude - longitude - status - } - } - images { - id - type - path - productId - } - orderedInventories { - id - qty - productId - channelId - } - reviews { - id - title - rating - comment - status - productId - customerId - customerName - createdAt - updatedAt - } - groupedProducts { - id - qty - sortOrder - productId - associatedProductId - associatedProduct { - id - type - attributeFamilyId - sku - parentId - } - } - downloadableSamples { - id - url - file - fileName - type - sortOrder - productId - createdAt - updatedAt - translations { - id - locale - title - productDownloadableSampleId - } - } - downloadableLinks { - id - title - price - url - file - fileName - type - sampleUrl - sampleFile - sampleFileName - sampleType - sortOrder - productId - downloads - translations { - id - locale - title - productDownloadableLinkId - } - } - bundleOptions { - id - type - isRequired - sortOrder - productId - bundleOptionProducts { - id - qty - isUserDefined - sortOrder - isDefault - productBundleOptionId - productId - } - translations { - id - locale - label - productBundleOptionId - } - } - customerGroupPrices { - id - qty - valueType - value - productId - customerGroupId - createdAt - updatedAt - } - booking { - id - type - qty - location - showLocation - availableEveryWeek - availableFrom - availableTo - productId - defaultSlot { - id - bookingType - duration - breakTime - slots { - to - toDay - from - fromDay - } - bookingProductId - } - appointmentSlot { - id - duration - breakTime - sameSlotAllDays - slots { - from - to - } - bookingProductId - } - } - } - } - ~~~ - -::: details Response - ~~~json - { - "data": { - "createProduct": { - "id": "3", - "type": "configurable", - "attributeFamilyId": 1, - "sku": "home-decor-2", - "parentId": null, - "productFlats": [ - { - "id": "3", - "sku": "", - "name": null, - "description": null, - "shortDescription": null, - "urlKey": null, - "new": null, - "featured": null, - "status": null, - "visibleIndividually": null, - "thumbnail": null, - "price": null, - "cost": null, - "specialPrice": null, - "specialPriceFrom": null, - "specialPriceTo": null, - "weight": null, - "color": null, - "colorLabel": null, - "size": null, - "sizeLabel": null, - "locale": "en", - "channel": "default", - "productId": "3", - "parentId": null, - "minPrice": 0, - "maxPrice": null, - "metaTitle": null, - "metaKeywords": null, - "metaDescription": null, - "width": null, - "height": null, - "depth": null, - "variants": [ - { - "id": "4", - "sku": "home-decor-2-variant-1-6", - "name": "", - "description": null, - "shortDescription": null, - "urlKey": null, - "new": null, - "featured": null, - "status": true, - "visibleIndividually": null, - "thumbnail": null, - "price": 0, - "locale": "en", - "channel": "default", - "productId": "4", - "parentId": 3 - }, - { - "id": "5", - "sku": "home-decor-2-variant-2-6", - "name": "", - "description": null, - "shortDescription": null, - "urlKey": null, - "new": null, - "featured": null, - "status": true, - "visibleIndividually": null, - "thumbnail": null, - "price": 0, - "locale": "en", - "channel": "default", - "productId": "5", - "parentId": 3 - } - ], - "parent": null, - "createdAt": "2021-05-27 10:40:11", - "updatedAt": "2021-05-27 10:40:11" - } - ], - "variants": [ - { - "id": "4", - "type": "simple", - "attributeFamilyId": 1, - "sku": "home-decor-2-variant-1-6", - "parentId": "3" - }, - { - "id": "5", - "type": "simple", - "attributeFamilyId": 1, - "sku": "home-decor-2-variant-2-6", - "parentId": "3" - } - ], - "parent": null, - "attributeFamily": { - "id": "1", - "code": "default", - "name": "Default", - "status": false, - "isUserDefined": true - }, - "attributeValues": [], - "superAttributes": [ - { - "id": "23", - "code": "color", - "adminName": "Color", - "type": "select", - "position": 26 - }, - { - "id": "24", - "code": "size", - "adminName": "Size", - "type": "select", - "position": 27 - } - ], - "categories": [], - "inventories": [], - "images": [], - "orderedInventories": [], - "reviews": [], - "groupedProducts": [], - "downloadableSamples": [], - "downloadableLinks": [], - "bundleOptions": [], - "customerGroupPrices": [], - "booking": null - } - } - } - ~~~ -::: - -### 2. Update Configurable Product - -By using this API call you can update the Configurable Product. To do this , you have to perform update mutation on Configurable Product and paas the related fields in the request. -API call will update a Configurable Product, only if the admin has logged in. - - - - Headers - - | Key | Value | - | ------------- | --------------------- | - | Accept | application/json | - | Authorization | Bearer `token-string` | - -### Examples - - Let's take an example, - -- Request Mutation - ~~~Mutation - mutation updateProduct { - updateProduct(id: 3, input: { - channel: "default" - locale: "en" - sku: "home-decor-2" - name: "Home Decor-2" - urlKey: "home-decor-2" - taxCategoryId: 1 - new: true - featured: true - visibleIndividually: true - status: true - guestCheckout: true - color: 3 - size: 9 - shortDescription: "

Home Decor Short Description

" - description: "

Home Decor Description

" - metaTitle: "Home Decor Meta Title" - metaKeywords: "Home Decor Meta Keywords" - metaDescription: "Home Decor Meta Description" - price: 12.55 - cost: 11.50 - specialPrice: 11.30 - specialPriceFrom: "2021-02-08" - specialPriceTo: "2021-02-28" - width: 30 - height: 24 - depth: 11 - weight: 5.20 - customerGroupPrices: [{ - customerGroupId: 2 - qty: 2 - valueType: "fixed" - value: 10 - }, { - customerGroupId: 3 - qty: 3 - valueType: "discount" - value: 2 - }] - inventories: [{ - inventorySourceId: 1 - qty: 111 - }, { - inventorySourceId: 2 - qty: 222 - }] - channels: [1] - upSell: [1] - images: [ - "http://graphqlnew.com/themes/velocity/assets/images/banner.png", - "http://graphqlnew.com/themes/velocity/assets/images/kids.png", - "http://graphqlnew.com/themes/velocity/assets/images/headphones.png" - ] - # variants index passed only in case of configurable type product - variants: [{ - variantId: 4 - sku: "home-decor-1-variant-1-6" - name: "Red-S" - color: 1 - size: 6 - inventories: [{ - inventorySourceId: 1 - qty: 111 - }, { - inventorySourceId: 2 - qty: 222 - }] - price: 10.0000 - weight: 1 - status: true - }, { - variantId: 5 - sku: "home-decor-1-variant-2-6" - name: "Green-S" - color: 2 - size: 6 - inventories: [{ - inventorySourceId: 1 - qty: 23 - }, { - inventorySourceId: 2 - qty: 32 - }] - price: 7.5000 - weight: 1.45 - status: true - }] - }) { - id - type - attributeFamilyId - sku - parentId - productFlats { - id - sku - name - description - shortDescription - urlKey - new - featured - status - visibleIndividually - thumbnail - price - cost - specialPrice - specialPriceFrom - specialPriceTo - weight - color - colorLabel - size - sizeLabel - locale - channel - productId - parentId - minPrice - maxPrice - metaTitle - metaKeywords - metaDescription - width - height - depth - variants { - id - sku - name - description - shortDescription - urlKey - new - featured - status - visibleIndividually - thumbnail - price - locale - channel - productId - parentId - } - parent { - id - sku - name - description - shortDescription - urlKey - new - featured - status - visibleIndividually - thumbnail - price - cost - specialPrice - specialPriceFrom - specialPriceTo - weight - } - createdAt - updatedAt - } - variants { - id - type - attributeFamilyId - sku - parentId - } - parent { - id - type - attributeFamilyId - sku - parentId - } - attributeFamily { - id - code - name - status - isUserDefined - } - attributeValues { - id - productId - attributeId - locale - channel - textValue - booleanValue - integerValue - floatValue - dateTimeValue - dateValue - jsonValue - attribute { - id - code - adminName - type - } - } - superAttributes { - id - code - adminName - type - position - } - categories { - id - name - description - slug - urlPath - imageUrl - metaTitle - metaDescription - metaKeywords - position - status - displayMode - parentId - filterableAttributes { - id - adminName - code - type - position - } - translations { - id - name - description - localeId - locale - } - createdAt - updatedAt - } - inventories { - id - qty - productId - inventorySourceId - vendorId - inventorySource { - id - code - name - description - contactName - contactEmail - contactNumber - contactFax - country - state - city - street - postcode - priority - latitude - longitude - status - } - } - images { - id - type - path - productId - } - orderedInventories { - id - qty - productId - channelId - } - reviews { - id - title - rating - comment - status - productId - customerId - customerName - createdAt - updatedAt - } - customerGroupPrices { - id - qty - valueType - value - productId - customerGroupId - createdAt - updatedAt - } - } - } - } - ~~~ - -::: details Response - ~~~json - { - "data": { - "updateProduct": { - "id": "3", - "type": "configurable", - "attributeFamilyId": 1, - "sku": "home-decor-2", - "parentId": null, - "productFlats": [ - { - "id": "3", - "sku": "home-decor-2", - "name": "Home Decor-2", - "description": "

Home Decor Description

", - "shortDescription": "

Home Decor Short Description

", - "urlKey": "home-decor-2", - "new": true, - "featured": true, - "status": true, - "visibleIndividually": true, - "thumbnail": null, - "price": 12.55, - "cost": 11.5, - "specialPrice": 11.3, - "specialPriceFrom": "2021-02-08", - "specialPriceTo": "2021-02-28", - "weight": 5.2, - "color": 3, - "colorLabel": "Yellow", - "size": 9, - "sizeLabel": "XL", - "locale": "en", - "channel": "default", - "productId": "3", - "parentId": null, - "minPrice": 0, - "maxPrice": 0, - "metaTitle": "Home Decor Meta Title", - "metaKeywords": "Home Decor Meta Keywords", - "metaDescription": "Home Decor Meta Description", - "width": 30, - "height": 24, - "depth": 11, - "variants": [ - { - "id": "4", - "sku": "home-decor-1-variant-1-6", - "name": "Red-S", - "description": null, - "shortDescription": null, - "urlKey": null, - "new": null, - "featured": null, - "status": true, - "visibleIndividually": null, - "thumbnail": null, - "price": 10, - "locale": "en", - "channel": "default", - "productId": "4", - "parentId": 3 - }, - { - "id": "5", - "sku": "home-decor-1-variant-2-6", - "name": "Green-S", - "description": null, - "shortDescription": null, - "urlKey": null, - "new": null, - "featured": null, - "status": true, - "visibleIndividually": null, - "thumbnail": null, - "price": 7.5, - "locale": "en", - "channel": "default", - "productId": "5", - "parentId": 3 - } - ], - "parent": null, - "createdAt": "2021-05-27 10:40:11", - "updatedAt": "2021-05-27 10:40:11" - } - ], - "variants": [ - { - "id": "4", - "type": "simple", - "attributeFamilyId": 1, - "sku": "home-decor-1-variant-1-6", - "parentId": "3" - }, - { - "id": "5", - "type": "simple", - "attributeFamilyId": 1, - "sku": "home-decor-1-variant-2-6", - "parentId": "3" - } - ], - "parent": null, - "attributeFamily": { - "id": "1", - "code": "default", - "name": "Default", - "status": false, - "isUserDefined": true - }, - "attributeValues": [ - { - "id": "76", - "productId": "3", - "attributeId": "9", - "locale": "en", - "channel": "default", - "textValue": "

Home Decor Short Description

", - "booleanValue": null, - "integerValue": null, - "floatValue": null, - "dateTimeValue": null, - "dateValue": null, - "jsonValue": null, - "attribute": { - "id": "9", - "code": "short_description", - "adminName": "Short Description", - "type": "textarea" - } - }, - { - "id": "77", - "productId": "3", - "attributeId": "10", - "locale": "en", - "channel": "default", - "textValue": "

Home Decor Description

", - "booleanValue": null, - "integerValue": null, - "floatValue": null, - "dateTimeValue": null, - "dateValue": null, - "jsonValue": null, - "attribute": { - "id": "10", - "code": "description", - "adminName": "Description", - "type": "textarea" - } - }, - { - "id": "78", - "productId": "3", - "attributeId": "1", - "locale": null, - "channel": null, - "textValue": "home-decor-2", - "booleanValue": null, - "integerValue": null, - "floatValue": null, - "dateTimeValue": null, - "dateValue": null, - "jsonValue": null, - "attribute": { - "id": "1", - "code": "sku", - "adminName": "SKU", - "type": "text" - } - }, - { - "id": "79", - "productId": "3", - "attributeId": "2", - "locale": "en", - "channel": "default", - "textValue": "Home Decor-2", - "booleanValue": null, - "integerValue": null, - "floatValue": null, - "dateTimeValue": null, - "dateValue": null, - "jsonValue": null, - "attribute": { - "id": "2", - "code": "name", - "adminName": "Name", - "type": "text" - } - }, - { - "id": "80", - "productId": "3", - "attributeId": "3", - "locale": null, - "channel": null, - "textValue": "home-decor-2", - "booleanValue": null, - "integerValue": null, - "floatValue": null, - "dateTimeValue": null, - "dateValue": null, - "jsonValue": null, - "attribute": { - "id": "3", - "code": "url_key", - "adminName": "URL Key", - "type": "text" - } - }, - { - "id": "81", - "productId": "3", - "attributeId": "4", - "locale": null, - "channel": "default", - "textValue": null, - "booleanValue": null, - "integerValue": 1, - "floatValue": null, - "dateTimeValue": null, - "dateValue": null, - "jsonValue": null, - "attribute": { - "id": "4", - "code": "tax_category_id", - "adminName": "Tax Category", - "type": "select" - } - }, - { - "id": "82", - "productId": "3", - "attributeId": "5", - "locale": null, - "channel": null, - "textValue": null, - "booleanValue": true, - "integerValue": null, - "floatValue": null, - "dateTimeValue": null, - "dateValue": null, - "jsonValue": null, - "attribute": { - "id": "5", - "code": "new", - "adminName": "New", - "type": "boolean" - } - }, - { - "id": "83", - "productId": "3", - "attributeId": "6", - "locale": null, - "channel": null, - "textValue": null, - "booleanValue": true, - "integerValue": null, - "floatValue": null, - "dateTimeValue": null, - "dateValue": null, - "jsonValue": null, - "attribute": { - "id": "6", - "code": "featured", - "adminName": "Featured", - "type": "boolean" - } - }, - { - "id": "84", - "productId": "3", - "attributeId": "7", - "locale": null, - "channel": null, - "textValue": null, - "booleanValue": true, - "integerValue": null, - "floatValue": null, - "dateTimeValue": null, - "dateValue": null, - "jsonValue": null, - "attribute": { - "id": "7", - "code": "visible_individually", - "adminName": "Visible Individually", - "type": "boolean" - } - }, - { - "id": "85", - "productId": "3", - "attributeId": "8", - "locale": null, - "channel": null, - "textValue": null, - "booleanValue": true, - "integerValue": null, - "floatValue": null, - "dateTimeValue": null, - "dateValue": null, - "jsonValue": null, - "attribute": { - "id": "8", - "code": "status", - "adminName": "Status", - "type": "boolean" - } - }, - { - "id": "86", - "productId": "3", - "attributeId": "23", - "locale": null, - "channel": null, - "textValue": null, - "booleanValue": null, - "integerValue": 3, - "floatValue": null, - "dateTimeValue": null, - "dateValue": null, - "jsonValue": null, - "attribute": { - "id": "23", - "code": "color", - "adminName": "Color", - "type": "select" - } - }, - { - "id": "87", - "productId": "3", - "attributeId": "24", - "locale": null, - "channel": null, - "textValue": null, - "booleanValue": null, - "integerValue": 9, - "floatValue": null, - "dateTimeValue": null, - "dateValue": null, - "jsonValue": null, - "attribute": { - "id": "24", - "code": "size", - "adminName": "Size", - "type": "select" - } - }, - { - "id": "88", - "productId": "3", - "attributeId": "26", - "locale": null, - "channel": null, - "textValue": null, - "booleanValue": true, - "integerValue": null, - "floatValue": null, - "dateTimeValue": null, - "dateValue": null, - "jsonValue": null, - "attribute": { - "id": "26", - "code": "guest_checkout", - "adminName": "Guest Checkout", - "type": "boolean" - } - }, - { - "id": "89", - "productId": "3", - "attributeId": "16", - "locale": "en", - "channel": "default", - "textValue": "Home Decor Meta Title", - "booleanValue": null, - "integerValue": null, - "floatValue": null, - "dateTimeValue": null, - "dateValue": null, - "jsonValue": null, - "attribute": { - "id": "16", - "code": "meta_title", - "adminName": "Meta Title", - "type": "textarea" - } - }, - { - "id": "90", - "productId": "3", - "attributeId": "17", - "locale": "en", - "channel": "default", - "textValue": "Home Decor Meta Keywords", - "booleanValue": null, - "integerValue": null, - "floatValue": null, - "dateTimeValue": null, - "dateValue": null, - "jsonValue": null, - "attribute": { - "id": "17", - "code": "meta_keywords", - "adminName": "Meta Keywords", - "type": "textarea" - } - }, - { - "id": "91", - "productId": "3", - "attributeId": "18", - "locale": "en", - "channel": "default", - "textValue": "Home Decor Meta Description", - "booleanValue": null, - "integerValue": null, - "floatValue": null, - "dateTimeValue": null, - "dateValue": null, - "jsonValue": null, - "attribute": { - "id": "18", - "code": "meta_description", - "adminName": "Meta Description", - "type": "textarea" - } - }, - { - "id": "92", - "productId": "3", - "attributeId": "11", - "locale": null, - "channel": null, - "textValue": null, - "booleanValue": null, - "integerValue": null, - "floatValue": 12.55, - "dateTimeValue": null, - "dateValue": null, - "jsonValue": null, - "attribute": { - "id": "11", - "code": "price", - "adminName": "Price", - "type": "price" - } - }, - { - "id": "93", - "productId": "3", - "attributeId": "12", - "locale": null, - "channel": "default", - "textValue": null, - "booleanValue": null, - "integerValue": null, - "floatValue": 11.5, - "dateTimeValue": null, - "dateValue": null, - "jsonValue": null, - "attribute": { - "id": "12", - "code": "cost", - "adminName": "Cost", - "type": "price" - } - }, - { - "id": "94", - "productId": "3", - "attributeId": "13", - "locale": null, - "channel": null, - "textValue": null, - "booleanValue": null, - "integerValue": null, - "floatValue": 11.3, - "dateTimeValue": null, - "dateValue": null, - "jsonValue": null, - "attribute": { - "id": "13", - "code": "special_price", - "adminName": "Special Price", - "type": "price" - } - }, - { - "id": "95", - "productId": "3", - "attributeId": "14", - "locale": null, - "channel": "default", - "textValue": null, - "booleanValue": null, - "integerValue": null, - "floatValue": null, - "dateTimeValue": null, - "dateValue": "2021-02-08", - "jsonValue": null, - "attribute": { - "id": "14", - "code": "special_price_from", - "adminName": "Special Price From", - "type": "date" - } - }, - { - "id": "96", - "productId": "3", - "attributeId": "15", - "locale": null, - "channel": "default", - "textValue": null, - "booleanValue": null, - "integerValue": null, - "floatValue": null, - "dateTimeValue": null, - "dateValue": "2021-02-28", - "jsonValue": null, - "attribute": { - "id": "15", - "code": "special_price_to", - "adminName": "Special Price To", - "type": "date" - } - }, - { - "id": "97", - "productId": "3", - "attributeId": "19", - "locale": null, - "channel": null, - "textValue": "30", - "booleanValue": null, - "integerValue": null, - "floatValue": null, - "dateTimeValue": null, - "dateValue": null, - "jsonValue": null, - "attribute": { - "id": "19", - "code": "width", - "adminName": "Width", - "type": "text" - } - }, - { - "id": "98", - "productId": "3", - "attributeId": "20", - "locale": null, - "channel": null, - "textValue": "24", - "booleanValue": null, - "integerValue": null, - "floatValue": null, - "dateTimeValue": null, - "dateValue": null, - "jsonValue": null, - "attribute": { - "id": "20", - "code": "height", - "adminName": "Height", - "type": "text" - } - }, - { - "id": "99", - "productId": "3", - "attributeId": "21", - "locale": null, - "channel": null, - "textValue": "11", - "booleanValue": null, - "integerValue": null, - "floatValue": null, - "dateTimeValue": null, - "dateValue": null, - "jsonValue": null, - "attribute": { - "id": "21", - "code": "depth", - "adminName": "Depth", - "type": "text" - } - }, - { - "id": "100", - "productId": "3", - "attributeId": "22", - "locale": null, - "channel": null, - "textValue": "5.2", - "booleanValue": null, - "integerValue": null, - "floatValue": null, - "dateTimeValue": null, - "dateValue": null, - "jsonValue": null, - "attribute": { - "id": "22", - "code": "weight", - "adminName": "Weight", - "type": "text" - } - } - ], - "superAttributes": [ - { - "id": "23", - "code": "color", - "adminName": "Color", - "type": "select", - "position": 26 - }, - { - "id": "24", - "code": "size", - "adminName": "Size", - "type": "select", - "position": 27 - } - ], - "categories": [], - "inventories": [ - { - "id": "5", - "qty": 111, - "productId": "3", - "inventorySourceId": "1", - "vendorId": 0, - "inventorySource": { - "id": "1", - "code": "default", - "name": "Default", - "description": null, - "contactName": "Detroit Warehouse", - "contactEmail": "warehouse@example.com", - "contactNumber": "1234567899", - "contactFax": null, - "country": "US", - "state": "MI", - "city": "Detroit", - "street": "12th Street", - "postcode": "48127", - "priority": 0, - "latitude": null, - "longitude": null, - "status": true - } - }, - { - "id": "6", - "qty": 222, - "productId": "3", - "inventorySourceId": "2", - "vendorId": 0, - "inventorySource": { - "id": "2", - "code": "new", - "name": "demoinventory", - "description": "demo", - "contactName": "jyoti", - "contactEmail": "jyoti@webkul.com", - "contactNumber": "7252756566", - "contactFax": null, - "country": "IN", - "state": "UP", - "city": "Gorakhpur", - "street": "d-54", - "postcode": "273003", - "priority": 1, - "latitude": null, - "longitude": null, - "status": true - } - } - ], - "images": [], - "orderedInventories": [], - "reviews": [], - "customerGroupPrices": [ - { - "id": "9", - "qty": 2, - "valueType": "fixed", - "value": 10, - "productId": "3", - "customerGroupId": "2", - "createdAt": "2021-05-27 11:35:35", - "updatedAt": "2021-05-27 11:35:35" - }, - { - "id": "10", - "qty": 3, - "valueType": "discount", - "value": 2, - "productId": "3", - "customerGroupId": "3", - "createdAt": "2021-05-27 11:35:35", - "updatedAt": "2021-05-27 11:35:35" - } - ], - } - } - } - ~~~ -::: - -## Virtual Products - -In this section, we will see all the APIs which are related to Virtual Products. - -### 1. Create a new Virtual Product - - To create a Virtual Product, you have to perform mutation on Virtual Product and paas the related fields in the request. - API call resource will create a new Virtual Product, only if the admin has logged in. - - - Headers - - | Key | Value | - | ------------- | --------------------- | - | Accept | application/json | - | Authorization | Bearer `token-string` | - -**Note**: Here you can pass Only those filed with the request that you want in the response. - -### Examples - - Let's take an example, - -- Request Mutation - ~~~Mutation - mutation createProduct { - createProduct(input: { - type: "virtual" - attributeFamilyId: 1 - sku: "virtual-demo" - }) { - id - type - attributeFamilyId - sku - parentId - productFlats { - id - sku - name - description - shortDescription - urlKey - new - featured - status - visibleIndividually - thumbnail - price - cost - specialPrice - specialPriceFrom - specialPriceTo - weight - color - colorLabel - size - sizeLabel - locale - channel - productId - parentId - minPrice - maxPrice - metaTitle - metaKeywords - metaDescription - width - height - depth - variants { - id - sku - name - description - shortDescription - urlKey - new - featured - status - visibleIndividually - thumbnail - price - locale - channel - productId - parentId - } - parent { - id - sku - name - description - shortDescription - urlKey - new - featured - status - visibleIndividually - thumbnail - price - cost - specialPrice - specialPriceFrom - specialPriceTo - weight - } - createdAt - updatedAt - } - attributeFamily { - id - code - name - status - isUserDefined - } - - inventories { - id - qty - productId - inventorySourceId - vendorId - inventorySource { - id - code - name - description - contactName - contactEmail - contactNumber - contactFax - country - state - city - street - postcode - priority - latitude - longitude - status - } - } - images { - id - type - path - productId - } - orderedInventories { - id - qty - productId - channelId - } - customerGroupPrices { - id - qty - valueType - value - productId - customerGroupId - createdAt - updatedAt - } - } - } - ~~~ -::: details Response - ~~~json - { - "data": { - "createProduct": { - "id": "6", - "type": "virtual", - "attributeFamilyId": 1, - "sku": "virtual-demo", - "parentId": null, - "productFlats": [ - { - "id": "6", - "sku": "", - "name": null, - "description": null, - "shortDescription": null, - "urlKey": null, - "new": null, - "featured": null, - "status": null, - "visibleIndividually": null, - "thumbnail": null, - "price": null, - "cost": null, - "specialPrice": null, - "specialPriceFrom": null, - "specialPriceTo": null, - "weight": null, - "color": null, - "colorLabel": null, - "size": null, - "sizeLabel": null, - "locale": "en", - "channel": "default", - "productId": "6", - "parentId": null, - "minPrice": null, - "maxPrice": null, - "metaTitle": null, - "metaKeywords": null, - "metaDescription": null, - "width": null, - "height": null, - "depth": null, - "variants": [], - "parent": null, - "createdAt": "2021-05-27 12:07:19", - "updatedAt": "2021-05-27 12:07:19" - } - ], - "attributeFamily": { - "id": "1", - "code": "default", - "name": "Default", - "status": false, - "isUserDefined": true - }, - "inventories": [], - "images": [], - "orderedInventories": [], - "reviews": [], - "customerGroupPrices": [], - } - } - } - ~~~ -::: - -### 2. Update Virtual Product - -By using this API call you can update the Virtual Product. To do this , you have to perform update mutation on Virtual Product and paas the related fields in the request. -API call will update a Virtual Product, only if the admin has logged in. - - - - Headers - - | Key | Value | - | ------------- | --------------------- | - | Accept | application/json | - | Authorization | Bearer `token-string` | - -### Examples - - Let's take an example, - -- Request Mutation - ~~~Mutation - mutation updateProduct { - updateProduct(id: 6, input: { - channel: "default" - locale: "en" - sku: "virtual-demo" - name: "Online Tuition Classes" - urlKey: "online-tuition-classes" - taxCategoryId: 1 - new: true - featured: true - visibleIndividually: true - status: true - guestCheckout: true - color: 3 - size: 9 - shortDescription: "

Home Decor Short Description

" - description: "

Home Decor Description

" - metaTitle: "Home Decor Meta Title" - metaKeywords: "Home Decor Meta Keywords" - metaDescription: "Home Decor Meta Description" - price: 12.55 - cost: 0 - specialPrice: 11.30 - specialPriceFrom: "2021-02-08" - specialPriceTo: "2021-02-28" - customerGroupPrices: [{ - customerGroupId: null - qty: 2 - valueType: "fixed" - value: 5 - }] - inventories: [{ - inventorySourceId: 1 - qty: 111 - }, { - inventorySourceId: 2 - qty: 222 - }] - channels: [1] - upSell: 1 - images: [ - "https://cdn.pixabay.com/photo/2021/02/01/12/28/fisherman-5970480_960_720.jpg", - "http://graphqlnew.com/themes/velocity/assets/images/kids.png", - "http://graphqlnew.com/themes/velocity/assets/images/headphones.png" - ] - }) { - id - type - attributeFamilyId - sku - parentId - productFlats { - id - sku - name - description - shortDescription - urlKey - new - featured - status - visibleIndividually - thumbnail - price - cost - specialPrice - specialPriceFrom - specialPriceTo - weight - color - colorLabel - size - sizeLabel - locale - channel - productId - parentId - minPrice - maxPrice - metaTitle - metaKeywords - metaDescription - width - height - depth - variants { - id - sku - name - description - shortDescription - urlKey - new - featured - status - visibleIndividually - thumbnail - price - locale - channel - productId - parentId - } - parent { - id - sku - name - description - shortDescription - urlKey - new - featured - status - visibleIndividually - thumbnail - price - cost - specialPrice - specialPriceFrom - specialPriceTo - weight - } - createdAt - updatedAt - } - - attributeFamily { - id - code - name - status - isUserDefined - } - inventories { - id - qty - productId - inventorySourceId - vendorId - inventorySource { - id - code - name - description - contactName - contactEmail - contactNumber - contactFax - country - state - city - street - postcode - priority - latitude - longitude - status - } - } - images { - id - type - path - productId - } - orderedInventories { - id - qty - productId - channelId - } - customerGroupPrices { - id - qty - valueType - value - productId - customerGroupId - createdAt - updatedAt - } - } - } - ~~~ - -::: details Response - ~~~json - { - "data": { - "updateProduct": { - "id": "6", - "type": "virtual", - "attributeFamilyId": 1, - "sku": "virtual-demo", - "parentId": null, - "productFlats": [ - { - "id": "6", - "sku": "virtual-demo", - "name": "Online Tuition Classes", - "description": "

Home Decor Description

", - "shortDescription": "

Home Decor Short Description

", - "urlKey": "online-tuition-classes", - "new": true, - "featured": true, - "status": true, - "visibleIndividually": true, - "thumbnail": null, - "price": 12.55, - "cost": 0, - "specialPrice": 11.3, - "specialPriceFrom": "2021-02-08", - "specialPriceTo": "2021-02-28", - "weight": null, - "color": 3, - "colorLabel": "Yellow", - "size": 9, - "sizeLabel": "XL", - "locale": "en", - "channel": "default", - "productId": "6", - "parentId": null, - "minPrice": 11.295, - "maxPrice": 11.295, - "metaTitle": "Home Decor Meta Title", - "metaKeywords": "Home Decor Meta Keywords", - "metaDescription": "Home Decor Meta Description", - "width": null, - "height": null, - "depth": null, - "variants": [], - "parent": null, - "createdAt": "2021-05-27 12:07:19", - "updatedAt": "2021-05-27 12:07:19" - } - ], - "attributeFamily": { - "id": "1", - "code": "default", - "name": "Default", - "status": false, - "isUserDefined": true - }, - "inventories": [ - { - "id": "11", - "qty": 111, - "productId": "6", - "inventorySourceId": "1", - "vendorId": 0, - "inventorySource": { - "id": "1", - "code": "default", - "name": "Default", - "description": null, - "contactName": "Detroit Warehouse", - "contactEmail": "warehouse@example.com", - "contactNumber": "1234567899", - "contactFax": null, - "country": "US", - "state": "MI", - "city": "Detroit", - "street": "12th Street", - "postcode": "48127", - "priority": 0, - "latitude": null, - "longitude": null, - "status": true - } - }, - { - "id": "12", - "qty": 222, - "productId": "6", - "inventorySourceId": "2", - "vendorId": 0, - "inventorySource": { - "id": "2", - "code": "new", - "name": "demoinventory", - "description": "demo", - "contactName": "jyoti", - "contactEmail": "jyoti@webkul.com", - "contactNumber": "7252756566", - "contactFax": null, - "country": "IN", - "state": "UP", - "city": "Gorakhpur", - "street": "d-54", - "postcode": "273003", - "priority": 1, - "latitude": null, - "longitude": null, - "status": true - } - } - ], - "images": [ - { - "id": "2", - "type": null, - "path": "product/6/fisherman-5970480_960_720.jpg", - "productId": "6" - } - ], - "orderedInventories": [], - "customerGroupPrices": [ - { - "id": "12", - "qty": 2, - "valueType": "fixed", - "value": 5, - "productId": "6", - "customerGroupId": null, - "createdAt": "2021-05-27 12:17:34", - "updatedAt": "2021-05-27 12:17:34" - } - ] - } - } - ~~~ -::: - -## Grouped Products - -In this section, we will see all the APIs which are related to Grouped Products. - -### 1. Create a new Grouped Product - - To create a Grouped Product, you have to perform mutation on Grouped Product and paas the related fields in the request. - API call resource will create a new Grouped Product, only if the admin has logged in. - - - Headers - - | Key | Value | - | ------------- | --------------------- | - | Accept | application/json | - | Authorization | Bearer `token-string` | - -**Note**: Here you can pass Only those filed with the request that you want in the response. - -### Examples - - Let's take an example, - -- Request Mutation - ~~~Mutation - mutation createProduct { - createProduct(input: { - type: "grouped" - attributeFamilyId: 1 - sku: "grouped-demo" - }) { - id - type - attributeFamilyId - sku - parentId - productFlats { - id - sku - name - description - shortDescription - urlKey - new - featured - status - visibleIndividually - thumbnail - price - cost - specialPrice - specialPriceFrom - specialPriceTo - weight - color - colorLabel - size - sizeLabel - locale - channel - productId - parentId - minPrice - maxPrice - metaTitle - metaKeywords - metaDescription - width - height - depth - variants { - id - sku - name - description - shortDescription - urlKey - new - featured - status - visibleIndividually - thumbnail - price - locale - channel - productId - parentId - } - parent { - id - sku - name - description - shortDescription - urlKey - new - featured - status - visibleIndividually - thumbnail - price - cost - specialPrice - specialPriceFrom - specialPriceTo - weight - } - createdAt - updatedAt - } - attributeFamily { - id - code - name - status - isUserDefined - } - images { - id - type - path - productId - } - } - } - ~~~ -::: details Response - ~~~json - { - "data": { - "createProduct": { - "id": "7", - "type": "grouped", - "attributeFamilyId": 1, - "sku": "grouped-demo", - "parentId": null, - "productFlats": [ - { - "id": "7", - "sku": "", - "name": null, - "description": null, - "shortDescription": null, - "urlKey": null, - "new": null, - "featured": null, - "status": null, - "visibleIndividually": null, - "thumbnail": null, - "price": null, - "cost": null, - "specialPrice": null, - "specialPriceFrom": null, - "specialPriceTo": null, - "weight": null, - "color": null, - "colorLabel": null, - "size": null, - "sizeLabel": null, - "locale": "en", - "channel": "default", - "productId": "7", - "parentId": null, - "minPrice": 0, - "maxPrice": 0, - "metaTitle": null, - "metaKeywords": null, - "metaDescription": null, - "width": null, - "height": null, - "depth": null, - "variants": [], - "parent": null, - "createdAt": "2021-05-27 12:29:56", - "updatedAt": "2021-05-27 12:29:56" - } - ], - "attributeFamily": { - "id": "1", - "code": "default", - "name": "Default", - "status": false, - "isUserDefined": true - }, - "images": [], - } - } - } - ~~~ -::: - -### 2. Update Grouped Product - -By using this API call you can update the Grouped Product. To do this , you have to perform update mutation on Grouped Product and paas the related fields in the request. -API call will update a Grouped Product, only if the admin has logged in. - - - - Headers - - | Key | Value | - | ------------- | --------------------- | - | Accept | application/json | - | Authorization | Bearer `token-string` | - -### Examples - - Let's take an example, - -- Request Mutation - ~~~Mutation - mutation updateProduct { - updateProduct(id: 7, input: { - channel: "default" - locale: "en" - sku: "grouped-demo" - name: "Phone Accessories" - urlKey: "phone-accessories" - taxCategoryId: 1 - new: true - featured: true - visibleIndividually: true - status: true - guestCheckout: true - color: 3 - size: 9 - shortDescription: "

Home Decor Short Description

" - description: "

Home Decor Description

" - metaTitle: "Home Decor Meta Title" - metaKeywords: "Home Decor Meta Keywords" - metaDescription: "Home Decor Meta Description" - price: 0 - links: [{ - associatedProductId: 1 - qty: 3 - sortOrder: 0 - }] - channels: [1] - upSell: 1 - images: [ - "https://cdn.pixabay.com/photo/2016/12/19/08/39/mobile-phone-1917737_960_720.jpg", - "https://cdn.pixabay.com/photo/2014/08/05/10/27/iphone-410311_960_720.jpg" - ] - }) { - id - type - attributeFamilyId - sku - parentId - productFlats { - id - sku - name - description - shortDescription - urlKey - new - featured - status - visibleIndividually - thumbnail - price - cost - specialPrice - specialPriceFrom - specialPriceTo - weight - color - colorLabel - size - sizeLabel - locale - channel - productId - parentId - minPrice - maxPrice - metaTitle - metaKeywords - metaDescription - width - height - depth - variants { - id - sku - name - description - shortDescription - urlKey - new - featured - status - visibleIndividually - thumbnail - price - locale - channel - productId - parentId - } - parent { - id - sku - name - description - shortDescription - urlKey - new - featured - status - visibleIndividually - thumbnail - price - cost - specialPrice - specialPriceFrom - specialPriceTo - weight - } - createdAt - updatedAt - } - attributeFamily { - id - code - name - status - isUserDefined - } - inventories { - id - qty - productId - inventorySourceId - vendorId - inventorySource { - id - code - name - description - contactName - contactEmail - contactNumber - contactFax - country - state - city - street - postcode - priority - latitude - longitude - status - } - } - images { - id - type - path - productId - } - orderedInventories { - id - qty - productId - channelId - } - groupedProducts { - id - qty - sortOrder - productId - associatedProductId - associatedProduct { - id - type - attributeFamilyId - sku - parentId - } - } - } - } - ~~~ - -::: details Response - ~~~json - { - "data": { - "updateProduct": { - "id": "7", - "type": "grouped", - "attributeFamilyId": 1, - "sku": "grouped-demo", - "parentId": null, - "productFlats": [ - { - "id": "7", - "sku": "grouped-demo", - "name": "Phone Accessories", - "description": "

Home Decor Description

", - "shortDescription": "

Home Decor Short Description

", - "urlKey": "phone-accessories", - "new": true, - "featured": true, - "status": true, - "visibleIndividually": true, - "thumbnail": null, - "price": 0, - "cost": null, - "specialPrice": null, - "specialPriceFrom": null, - "specialPriceTo": null, - "weight": null, - "color": 3, - "colorLabel": "Yellow", - "size": 9, - "sizeLabel": "XL", - "locale": "en", - "channel": "default", - "productId": "7", - "parentId": null, - "minPrice": 4.5, - "maxPrice": 4.5, - "metaTitle": "Home Decor Meta Title", - "metaKeywords": "Home Decor Meta Keywords", - "metaDescription": "Home Decor Meta Description", - "width": null, - "height": null, - "depth": null, - "variants": [], - "parent": null, - "createdAt": "2021-05-27 12:29:56", - "updatedAt": "2021-05-27 12:29:56" - } - ], - "attributeFamily": { - "id": "1", - "code": "default", - "name": "Default", - "status": false, - "isUserDefined": true - }, - "inventories": [], - "images": [ - { - "id": "5", - "type": null, - "path": "product/7/mobile-phone-1917737_960_720.jpg", - "productId": "7" - }, - { - "id": "6", - "type": null, - "path": "product/7/iphone-410311_960_720.jpg", - "productId": "7" - } - ], - "orderedInventories": [], - "groupedProducts": [ - { - "id": "4", - "qty": 3, - "sortOrder": 0, - "productId": "7", - "associatedProductId": "1", - "associatedProduct": { - "id": "1", - "type": "simple", - "attributeFamilyId": 1, - "sku": "test-product", - "parentId": null - } - } - ] - } - } - ~~~ -::: - -## Downloadable Products - -In this section, we will see all the APIs which are related to Downloadable Products. - -### 1. Create a new Downloadable Product - - To create a Downloadable Product, you have to perform mutation on Downloadable Product and paas the related fields in the request. - API call resource will create a new Downloadable Product, only if the admin has logged in. - - - Headers - - | Key | Value | - | ------------- | --------------------- | - | Accept | application/json | - | Authorization | Bearer `token-string` | - -**Note**: Here you can pass Only those filed with the request that you want in the response. - -### Examples - - Let's take an example, - -- Request Mutation - ~~~Mutation - mutation createProduct { - createProduct(input: { - type: "downloadable" - attributeFamilyId: 1 - sku: "e-book" - }) { - id - type - attributeFamilyId - sku - parentId - productFlats { - id - sku - name - description - shortDescription - urlKey - new - featured - status - visibleIndividually - thumbnail - price - cost - specialPrice - specialPriceFrom - specialPriceTo - weight - color - colorLabel - size - sizeLabel - locale - channel - productId - parentId - minPrice - maxPrice - metaTitle - metaKeywords - metaDescription - width - height - depth - variants { - id - sku - name - description - shortDescription - urlKey - new - featured - status - visibleIndividually - thumbnail - price - locale - channel - productId - parentId - } - parent { - id - sku - name - description - shortDescription - urlKey - new - featured - status - visibleIndividually - thumbnail - price - cost - specialPrice - specialPriceFrom - specialPriceTo - weight - } - createdAt - updatedAt - } - } - } - ~~~ -::: details Response - ~~~json - { - "data": { - "createProduct": { - "id": "8", - "type": "downloadable", - "attributeFamilyId": 1, - "sku": "e-book", - "parentId": null, - "productFlats": [ - { - "id": "8", - "sku": "", - "name": null, - "description": null, - "shortDescription": null, - "urlKey": null, - "new": null, - "featured": null, - "status": null, - "visibleIndividually": null, - "thumbnail": null, - "price": null, - "cost": null, - "specialPrice": null, - "specialPriceFrom": null, - "specialPriceTo": null, - "weight": null, - "color": null, - "colorLabel": null, - "size": null, - "sizeLabel": null, - "locale": "en", - "channel": "default", - "productId": "8", - "parentId": null, - "minPrice": null, - "maxPrice": null, - "metaTitle": null, - "metaKeywords": null, - "metaDescription": null, - "width": null, - "height": null, - "depth": null, - "variants": [], - "parent": null, - "createdAt": "2021-05-27 12:52:39", - "updatedAt": "2021-05-27 12:52:39" - } - ] - } - } - } - ~~~ -::: - -### 2. Update Downloadable Product - -By using this API call you can update the Downloadable Product. To do this , you have to perform update mutation on Downloadable Product and paas the related fields in the request. -API call will update a Downloadable Product, only if the admin has logged in. - - - - Headers - - | Key | Value | - | ------------- | --------------------- | - | Accept | application/json | - | Authorization | Bearer `token-string` | - -### Examples - - Let's take an example, - -- Request Mutation - ~~~Mutation - mutation updateProduct { - updateProduct(id: 8, input: { - channel: "default" - locale: "en" - sku: "e-book" - name: "e-book" - urlKey: "e-book" - taxCategoryId: 1 - new: true - featured: true - visibleIndividually: true - status: true - guestCheckout: true - color: 3 - size: 9 - shortDescription: "

Home Decor Short Description

" - description: "

Home Decor Description

" - metaTitle: "Home Decor Meta Title" - metaKeywords: "Home Decor Meta Keywords" - metaDescription: "Home Decor Meta Description" - price: 12.55 - cost: 11.50 - specialPrice: 11.30 - specialPriceFrom: "2021-02-08" - specialPriceTo: "2021-02-28" - width: 30 - height: 24 - depth: 11 - weight: 5.20 - customerGroupPrices: [{ - customerGroupId: 2 - qty: 2 - valueType: "fixed" - value: 10 - }, { - customerGroupId: 3 - qty: 3 - valueType: "discount" - value: 2 - }] - inventories: [{ - inventorySourceId: 1 - qty: 111 - }, { - inventorySourceId: 2 - qty: 222 - }] - channels: [1] - images: [ - "https://cdn.pixabay.com/photo/2015/05/07/11/02/guitar-756326_960_720.jpg" - ] - downloadableLinks: [{ - locales: { - code: "en" - title: "Link 1" - } - price: 2 - type: "url" - url: "https://cdn.pixabay.com/photo/2015/07/14/12/46/hot-air-balloon-844872__340.jpg" - sampleType: "url" - sampleUrl: "https://cdn.pixabay.com/photo/2019/12/17/13/11/manipulation-4701594__340.jpg" - downloads: 5 - sortOrder: 0 - }, { - locales: { - code: "en" - title: "Link 2" - } - price: 4 - type: "url" - url: "https://cdn.pixabay.com/photo/2015/01/20/13/13/ipad-605439_960_720.jpg" - sampleType: "url" - sampleUrl: "https://cdn.pixabay.com/photo/2015/05/07/11/02/guitar-756326_960_720.jpg" - downloads: 8 - sortOrder: 1 - }, { - locales: { - code: "en" - title: "Link 3" - } - price: 6 - type: "url" - url: "https://cdn.pixabay.com/photo/2021/02/01/13/37/cars-5970663_960_720.png" - sampleType: "url" - sampleUrl: "" - downloads: 3 - sortOrder: 2 - }] - downloadableSamples: [{ - locales: { - code: "en" - title: "Sample 1" - } - type: "url" - url: "https://cdn.pixabay.com/photo/2015/06/08/15/09/photography-801891_960_720.jpg" - sortOrder: 0 - }] - }) { - id - type - attributeFamilyId - sku - parentId - productFlats { - id - sku - name - description - shortDescription - urlKey - new - featured - status - visibleIndividually - thumbnail - price - cost - specialPrice - specialPriceFrom - specialPriceTo - weight - color - colorLabel - size - sizeLabel - locale - channel - productId - parentId - minPrice - maxPrice - metaTitle - metaKeywords - metaDescription - width - height - depth - variants { - id - sku - name - description - shortDescription - urlKey - new - featured - status - visibleIndividually - thumbnail - price - locale - channel - productId - parentId - } - parent { - id - sku - name - description - shortDescription - urlKey - new - featured - status - visibleIndividually - thumbnail - price - cost - specialPrice - specialPriceFrom - specialPriceTo - weight - } - createdAt - updatedAt - } - attributeFamily { - id - code - name - status - isUserDefined - } - inventories { - id - qty - productId - inventorySourceId - vendorId - inventorySource { - id - code - name - description - contactName - contactEmail - contactNumber - contactFax - country - state - city - street - postcode - priority - latitude - longitude - status - } - } - images { - id - type - path - productId - } - orderedInventories { - id - qty - productId - channelId - } - downloadableSamples { - id - url - file - fileName - type - sortOrder - productId - createdAt - updatedAt - translations { - id - locale - title - productDownloadableSampleId - } - } - downloadableLinks { - id - title - price - url - file - fileName - type - sampleUrl - sampleFile - sampleFileName - sampleType - sortOrder - productId - downloads - translations { - id - locale - title - productDownloadableLinkId - } - } - customerGroupPrices { - id - qty - valueType - value - productId - customerGroupId - createdAt - updatedAt - } - } - } - ~~~ - -::: details Response - ~~~json - { - "data": { - "updateProduct": { - "id": "8", - "type": "downloadable", - "attributeFamilyId": 1, - "sku": "e-book", - "parentId": null, - "productFlats": [ - { - "id": "8", - "sku": "e-book", - "name": "e-book", - "description": "

Home Decor Description

", - "shortDescription": "

Home Decor Short Description

", - "urlKey": "e-book", - "new": true, - "featured": true, - "status": true, - "visibleIndividually": true, - "thumbnail": null, - "price": 12.55, - "cost": 11.5, - "specialPrice": 11.3, - "specialPriceFrom": "2021-02-08", - "specialPriceTo": "2021-02-28", - "weight": 5.2, - "color": 3, - "colorLabel": "Yellow", - "size": 9, - "sizeLabel": "XL", - "locale": "en", - "channel": "default", - "productId": "8", - "parentId": null, - "minPrice": 11.295, - "maxPrice": 11.295, - "metaTitle": "Home Decor Meta Title", - "metaKeywords": "Home Decor Meta Keywords", - "metaDescription": "Home Decor Meta Description", - "width": 30, - "height": 24, - "depth": 11, - "variants": [], - "parent": null, - "createdAt": "2021-05-27 12:52:39", - "updatedAt": "2021-05-27 12:52:39" - } - ], - "variants": [], - "parent": null, - "attributeFamily": { - "id": "1", - "code": "default", - "name": "Default", - "status": false, - "isUserDefined": true - }, - "inventories": [ - { - "id": "13", - "qty": 111, - "productId": "8", - "inventorySourceId": "1", - "vendorId": 0, - "inventorySource": { - "id": "1", - "code": "default", - "name": "Default", - "description": null, - "contactName": "Detroit Warehouse", - "contactEmail": "warehouse@example.com", - "contactNumber": "1234567899", - "contactFax": null, - "country": "US", - "state": "MI", - "city": "Detroit", - "street": "12th Street", - "postcode": "48127", - "priority": 0, - "latitude": null, - "longitude": null, - "status": true - } - }, - { - "id": "14", - "qty": 222, - "productId": "8", - "inventorySourceId": "2", - "vendorId": 0, - "inventorySource": { - "id": "2", - "code": "new", - "name": "demoinventory", - "description": "demo", - "contactName": "jyoti", - "contactEmail": "jyoti@webkul.com", - "contactNumber": "7252756566", - "contactFax": null, - "country": "IN", - "state": "UP", - "city": "Gorakhpur", - "street": "d-54", - "postcode": "273003", - "priority": 1, - "latitude": null, - "longitude": null, - "status": true - } - } - ], - "images": [ - { - "id": "8", - "type": null, - "path": "product/8/guitar-756326_960_720.jpg", - "productId": "8" - } - ], - "orderedInventories": [], - "downloadableSamples": [ - { - "id": "2", - "url": "https://cdn.pixabay.com/photo/2015/06/08/15/09/photography-801891_960_720.jpg", - "file": null, - "fileName": null, - "type": "url", - "sortOrder": 0, - "productId": "8", - "createdAt": "2021-05-27 13:04:03", - "updatedAt": "2021-05-27 13:04:03", - "translations": [ - { - "id": "2", - "locale": "en", - "title": "Sample 1", - "productDownloadableSampleId": "2" - } - ] - } - ], - "downloadableLinks": [ - { - "id": "4", - "title": "Link 3", - "price": 6, - "url": "https://cdn.pixabay.com/photo/2021/02/01/13/37/cars-5970663_960_720.png", - "file": null, - "fileName": null, - "type": "url", - "sampleUrl": "", - "sampleFile": null, - "sampleFileName": null, - "sampleType": "url", - "sortOrder": 2, - "productId": "8", - "downloads": 3, - "translations": [ - { - "id": "4", - "locale": "en", - "title": "Link 3", - "productDownloadableLinkId": "4" - } - ] - }, - { - "id": "5", - "title": "Link 2", - "price": 4, - "url": "https://cdn.pixabay.com/photo/2015/01/20/13/13/ipad-605439_960_720.jpg", - "file": null, - "fileName": null, - "type": "url", - "sampleUrl": "https://cdn.pixabay.com/photo/2015/05/07/11/02/guitar-756326_960_720.jpg", - "sampleFile": null, - "sampleFileName": null, - "sampleType": "url", - "sortOrder": 1, - "productId": "8", - "downloads": 8, - "translations": [ - { - "id": "5", - "locale": "en", - "title": "Link 2", - "productDownloadableLinkId": "5" - } - ] - } - ], - "customerGroupPrices": [ - { - "id": "15", - "qty": 2, - "valueType": "fixed", - "value": 10, - "productId": "8", - "customerGroupId": "2", - "createdAt": "2021-05-27 13:04:03", - "updatedAt": "2021-05-27 13:04:03" - }, - { - "id": "16", - "qty": 3, - "valueType": "discount", - "value": 2, - "productId": "8", - "customerGroupId": "3", - "createdAt": "2021-05-27 13:04:03", - "updatedAt": "2021-05-27 13:04:03" - } - ] - } - } - } - ~~~ -::: - -## Bundle Products - -In this section, we will see all the APIs which are related to Bundle Products. - -### 1. Create a new Bundle Product - - To create a Bundle Product, you have to perform mutation on Bundle Product and paas the related fields in the request. - API call resource will create a new Bundle Product, only if the admin has logged in. - - - Headers - - | Key | Value | - | ------------- | --------------------- | - | Accept | application/json | - | Authorization | Bearer `token-string` | - -**Note**: Here you can pass Only those filed with the request that you want in the response. - -### Examples - - Let's take an example, - -- Request Mutation - ~~~Mutation - mutation createProduct { - createProduct(input: { - type: "bundle" - attributeFamilyId: 1 - sku: "bundle-demo" - }) { - id - type - attributeFamilyId - sku - parentId - productFlats { - id - sku - name - description - shortDescription - urlKey - new - featured - status - visibleIndividually - thumbnail - price - cost - specialPrice - specialPriceFrom - specialPriceTo - weight - color - colorLabel - size - sizeLabel - locale - channel - productId - parentId - minPrice - maxPrice - metaTitle - metaKeywords - metaDescription - width - height - depth - variants { - id - sku - name - description - shortDescription - urlKey - new - featured - status - visibleIndividually - thumbnail - price - locale - channel - productId - parentId - } - parent { - id - sku - name - description - shortDescription - urlKey - new - featured - status - visibleIndividually - thumbnail - price - cost - specialPrice - specialPriceFrom - specialPriceTo - weight - } - createdAt - updatedAt - } - attributeFamily { - id - code - name - status - isUserDefined - } - inventories { - id - qty - productId - inventorySourceId - vendorId - inventorySource { - id - code - name - description - contactName - contactEmail - contactNumber - contactFax - country - state - city - street - postcode - priority - latitude - longitude - status - } - } - images { - id - type - path - productId - } - orderedInventories { - id - qty - productId - channelId - } - bundleOptions { - id - type - isRequired - sortOrder - productId - bundleOptionProducts { - id - qty - isUserDefined - sortOrder - isDefault - productBundleOptionId - productId - } - translations { - id - locale - label - productBundleOptionId - } - } - } - } - ~~~ -::: details Response - ~~~json - { - "data": { - "createProduct": { - "id": "9", - "type": "bundle", - "attributeFamilyId": 1, - "sku": "bundle-demo", - "parentId": null, - "productFlats": [ - { - "id": "9", - "sku": "", - "name": null, - "description": null, - "shortDescription": null, - "urlKey": null, - "new": null, - "featured": null, - "status": null, - "visibleIndividually": null, - "thumbnail": null, - "price": null, - "cost": null, - "specialPrice": null, - "specialPriceFrom": null, - "specialPriceTo": null, - "weight": null, - "color": null, - "colorLabel": null, - "size": null, - "sizeLabel": null, - "locale": "en", - "channel": "default", - "productId": "9", - "parentId": null, - "minPrice": 0, - "maxPrice": 0, - "metaTitle": null, - "metaKeywords": null, - "metaDescription": null, - "width": null, - "height": null, - "depth": null, - "variants": [], - "parent": null, - "createdAt": "2021-05-27 13:11:58", - "updatedAt": "2021-05-27 13:11:58" - } - ], - "variants": [], - "parent": null, - "attributeFamily": { - "id": "1", - "code": "default", - "name": "Default", - "status": false, - "isUserDefined": true - }, - "groupedProducts": [], - } - } - } - ~~~ -::: - -### 2. Update Bundle Product - -By using this API call you can update the Bundle Product. To do this , you have to perform update mutation on Bundle Product and paas the related fields in the request. -API call will update a Bundle Product, only if the admin has logged in. - - - - Headers - - | Key | Value | - | ------------- | --------------------- | - | Accept | application/json | - | Authorization | Bearer `token-string` | - -### Examples - - Let's take an example, - -- Request Mutation - ~~~Mutation - mutation updateProduct { - updateProduct(id: 9, input: { - channel: "default" - locale: "en" - sku: "bundle-demo" - name: "Bundle Box" - urlKey: "bundle-demo" - taxCategoryId: 1 - new: true - featured: true - visibleIndividually: true - status: true - guestCheckout: true - color: 3 - size: 9 - shortDescription: "

Home Decor Short Description

" - description: "

Home Decor Description

" - metaTitle: "Home Decor Meta Title" - metaKeywords: "Home Decor Meta Keywords" - metaDescription: "Home Decor Meta Description" - price: 12.55 - cost: 11.50 - specialPrice: 11.30 - specialPriceFrom: "2021-02-08" - specialPriceTo: "2021-02-28" - width: 30 - height: 24 - depth: 11 - weight: 5.20 - customerGroupPrices: [{ - customerGroupId: 2 - qty: 2 - valueType: "fixed" - value: 10 - }, { - customerGroupId: 3 - qty: 3 - valueType: "discount" - value: 2 - }] - inventories: [{ - inventorySourceId: 1 - qty: 111 - }, { - inventorySourceId: 2 - qty: 222 - }] - channels: [1] - upSell: 1 - images: [ - "https://cdn.pixabay.com/photo/2021/02/01/13/37/cars-5970663_960_720.png" - ] - bundleOptions: [{ - locales: { - code: "en" - label: "Select 1" - } - type: "select" - isRequired: true - sortOrder: 0 - products: [{ - isDefault: true - productId: 1 - qty: 1 - sortOrder: 1 - }] - }, { - - locales: { - code: "en" - label: "Radio 1" - } - type: "radio" - isRequired: true - sortOrder: 1 - products: [{ - productId: 1 - qty: 2 - sortOrder: 1 - }] - }, { - locales: { - code: "en" - label: "Checkbox 1" - } - type: "checkbox" - isRequired: false - sortOrder: 3 - products: [{ - productId: 1 - qty: 4 - sortOrder: 2 - }] - }, { - locales: { - code: "en" - label: "Multi Select 1" - } - type: "multiselect" - isRequired: true - sortOrder: 4 - products: [{ - productId: 1 - qty: 1 - sortOrder: 3 - }] - }] - }) { - id - type - attributeFamilyId - sku - parentId - productFlats { - id - sku - name - description - shortDescription - urlKey - new - featured - status - visibleIndividually - thumbnail - price - cost - specialPrice - specialPriceFrom - specialPriceTo - weight - color - colorLabel - size - sizeLabel - locale - channel - productId - parentId - minPrice - maxPrice - metaTitle - metaKeywords - metaDescription - width - height - depth - variants { - id - sku - name - description - shortDescription - urlKey - new - featured - status - visibleIndividually - thumbnail - price - locale - channel - productId - parentId - } - parent { - id - sku - name - description - shortDescription - urlKey - new - featured - status - visibleIndividually - thumbnail - price - cost - specialPrice - specialPriceFrom - specialPriceTo - weight - } - createdAt - updatedAt - } - attributeFamily { - id - code - name - status - isUserDefined - } - inventories { - id - qty - productId - inventorySourceId - vendorId - inventorySource { - id - code - name - description - contactName - contactEmail - contactNumber - contactFax - country - state - city - street - postcode - priority - latitude - longitude - status - } - } - images { - id - type - path - productId - } - orderedInventories { - id - qty - productId - channelId - } - bundleOptions { - id - type - isRequired - sortOrder - productId - bundleOptionProducts { - id - qty - isUserDefined - sortOrder - isDefault - productBundleOptionId - productId - } - translations { - id - locale - label - productBundleOptionId - } - } - customerGroupPrices { - id - qty - valueType - value - productId - customerGroupId - createdAt - updatedAt - } - } - } - ~~~ - -::: details Response - ~~~json - { - "data": { - "updateProduct": { - "id": "9", - "type": "bundle", - "attributeFamilyId": 1, - "sku": "bundle-demo", - "parentId": null, - "productFlats": [ - { - "id": "9", - "sku": "bundle-demo", - "name": "Bundle Box", - "description": "

Home Decor Description

", - "shortDescription": "

Home Decor Short Description

", - "urlKey": "bundle-demo", - "new": true, - "featured": true, - "status": true, - "visibleIndividually": true, - "thumbnail": null, - "price": 12.55, - "cost": 11.5, - "specialPrice": 11.3, - "specialPriceFrom": "2021-02-08", - "specialPriceTo": "2021-02-28", - "weight": 5.2, - "color": 3, - "colorLabel": "Yellow", - "size": 9, - "sizeLabel": "XL", - "locale": "en", - "channel": "default", - "productId": "9", - "parentId": null, - "minPrice": 13.5, - "maxPrice": 31.5, - "metaTitle": "Home Decor Meta Title", - "metaKeywords": "Home Decor Meta Keywords", - "metaDescription": "Home Decor Meta Description", - "width": 30, - "height": 24, - "depth": 11, - "variants": [], - "parent": null, - "createdAt": "2021-05-27 13:11:58", - "updatedAt": "2021-05-27 13:11:58" - } - ], - "attributeFamily": { - "id": "1", - "code": "default", - "name": "Default", - "status": false, - "isUserDefined": true - }, - "inventories": [ - { - "id": "15", - "qty": 111, - "productId": "9", - "inventorySourceId": "1", - "vendorId": 0, - "inventorySource": { - "id": "1", - "code": "default", - "name": "Default", - "description": null, - "contactName": "Detroit Warehouse", - "contactEmail": "warehouse@example.com", - "contactNumber": "1234567899", - "contactFax": null, - "country": "US", - "state": "MI", - "city": "Detroit", - "street": "12th Street", - "postcode": "48127", - "priority": 0, - "latitude": null, - "longitude": null, - "status": true - } - }, - { - "id": "16", - "qty": 222, - "productId": "9", - "inventorySourceId": "2", - "vendorId": 0, - "inventorySource": { - "id": "2", - "code": "new", - "name": "demoinventory", - "description": "demo", - "contactName": "jyoti", - "contactEmail": "jyoti@webkul.com", - "contactNumber": "7252756566", - "contactFax": null, - "country": "IN", - "state": "UP", - "city": "Gorakhpur", - "street": "d-54", - "postcode": "273003", - "priority": 1, - "latitude": null, - "longitude": null, - "status": true - } - } - ], - "images": [ - { - "id": "10", - "type": null, - "path": "product/9/cars-5970663_960_720.png", - "productId": "9" - } - ], - "orderedInventories": [], - "bundleOptions": [ - { - "id": "10", - "type": "checkbox", - "isRequired": false, - "sortOrder": 3, - "productId": "9", - "bundleOptionProducts": [ - { - "id": "14", - "qty": 4, - "isUserDefined": true, - "sortOrder": 2, - "isDefault": false, - "productBundleOptionId": "10", - "productId": "1" - } - ], - "translations": [ - { - "id": "10", - "locale": "en", - "label": "Checkbox 1", - "productBundleOptionId": "10" - } - ] - }, - { - "id": "11", - "type": "radio", - "isRequired": true, - "sortOrder": 1, - "productId": "9", - "bundleOptionProducts": [ - { - "id": "15", - "qty": 2, - "isUserDefined": true, - "sortOrder": 1, - "isDefault": true, - "productBundleOptionId": "11", - "productId": "1" - } - ], - "translations": [ - { - "id": "11", - "locale": "en", - "label": "Radio 1", - "productBundleOptionId": "11" - } - ] - }, - { - "id": "12", - "type": "multiselect", - "isRequired": true, - "sortOrder": 4, - "productId": "9", - "bundleOptionProducts": [ - { - "id": "16", - "qty": 1, - "isUserDefined": true, - "sortOrder": 3, - "isDefault": true, - "productBundleOptionId": "12", - "productId": "1" - } - ], - "translations": [ - { - "id": "12", - "locale": "en", - "label": "Multi Select 1", - "productBundleOptionId": "12" - } - ] - } - ], - "customerGroupPrices": [ - { - "id": "29", - "qty": 2, - "valueType": "fixed", - "value": 10, - "productId": "9", - "customerGroupId": "2", - "createdAt": "2021-05-27 13:37:23", - "updatedAt": "2021-05-27 13:37:23" - }, - { - "id": "30", - "qty": 3, - "valueType": "discount", - "value": 2, - "productId": "9", - "customerGroupId": "3", - "createdAt": "2021-05-27 13:37:23", - "updatedAt": "2021-05-27 13:37:23" - } - ] - } - } - } - ~~~ -::: - -## Booking Products - -In this section, we will see all the APIs which are related to Booking Products. - -### 1. Create a new Booking Product - - To create a Booking Product, you have to perform mutation on Booking Product and paas the related fields in the request. - API call resource will create a new Booking Product, only if the admin has logged in. - - - Headers - - | Key | Value | - | ------------- | --------------------- | - | Accept | application/json | - | Authorization | Bearer `token-string` | - -**Note**: Here you can pass Only those filed with the request that you want in the response. - -### Examples - - Let's take an example, - -- Request Mutation - ~~~Mutation - mutation createProduct { - createProduct(input: { - type: "booking" - attributeFamilyId: 1 - sku: "appointment-booking1" - }) { - id - type - attributeFamilyId - sku - parentId - productFlats { - id - sku - name - description - shortDescription - urlKey - new - featured - status - visibleIndividually - thumbnail - price - cost - specialPrice - specialPriceFrom - specialPriceTo - weight - color - colorLabel - size - sizeLabel - locale - channel - productId - parentId - minPrice - maxPrice - metaTitle - metaKeywords - metaDescription - width - height - depth - variants { - id - sku - name - description - shortDescription - urlKey - new - featured - status - visibleIndividually - thumbnail - price - locale - channel - productId - parentId - } - parent { - id - sku - name - description - shortDescription - urlKey - new - featured - status - visibleIndividually - thumbnail - price - cost - specialPrice - specialPriceFrom - specialPriceTo - weight - } - createdAt - updatedAt - } - attributeFamily { - id - code - name - status - isUserDefined - } - orderedInventories { - id - qty - productId - channelId - } - booking { - id - type - qty - location - showLocation - availableEveryWeek - availableFrom - availableTo - productId - defaultSlot { - id - bookingType - duration - breakTime - slots { - to - toDay - from - fromDay - } - bookingProductId - } - } - } - } - ~~~ -::: details Response - ~~~json - { - "data": { - "createProduct": { - "id": "11", - "type": "booking", - "attributeFamilyId": 1, - "sku": "appointment-booking1", - "parentId": null, - "productFlats": [ - { - "id": "11", - "sku": "", - "name": null, - "description": null, - "shortDescription": null, - "urlKey": null, - "new": null, - "featured": null, - "status": null, - "visibleIndividually": null, - "thumbnail": null, - "price": null, - "cost": null, - "specialPrice": null, - "specialPriceFrom": null, - "specialPriceTo": null, - "weight": null, - "color": null, - "colorLabel": null, - "size": null, - "sizeLabel": null, - "locale": "en", - "channel": "default", - "productId": "11", - "parentId": null, - "minPrice": null, - "maxPrice": null, - "metaTitle": null, - "metaKeywords": null, - "metaDescription": null, - "width": null, - "height": null, - "depth": null, - "variants": [], - "parent": null, - "createdAt": "2021-05-27 15:32:06", - "updatedAt": "2021-05-27 15:32:06" - } - ], - "attributeFamily": { - "id": "1", - "code": "default", - "name": "Default", - "status": false, - "isUserDefined": true - }, - "orderedInventories": [], - "booking": null - } - } - } - ~~~ -::: - -### 2. Update Default Booking Product - -By using this API call you can update the Default Booking Product. To do this , you have to perform update mutation on Default Booking Product and paas the related fields in the request. -API call will update a Default Booking Product, only if the admin has logged in. - - - - Headers - - | Key | Value | - | ------------- | --------------------- | - | Accept | application/json | - | Authorization | Bearer `token-string` | - -### Examples - - Let's take an example, - -- Request Mutation - ~~~Mutation - mutation updateProduct { - updateProduct(id: 11, input: { - channel: "default" - locale: "en" - sku: "booking-prod" - name: "Appointment" - urlKey: "appointment" - taxCategoryId: 1 - new: true - featured: true - visibleIndividually: true - status: true - guestCheckout: true - color: 3 - size: 9 - shortDescription: "

Home Decor Short Description

" - description: "

Home Decor Description

" - metaTitle: "Home Decor Meta Title" - metaKeywords: "Home Decor Meta Keywords" - metaDescription: "Home Decor Meta Description" - price: 12.55 - cost: 11.50 - specialPrice: 11.30 - specialPriceFrom: "2021-02-08" - specialPriceTo: "2021-02-28" - width: 30 - height: 24 - depth: 11 - weight: 5.20 - customerGroupPrices: [{ - customerGroupId: 2 - qty: 2 - valueType: "fixed" - value: 10 - }, { - customerGroupId: 3 - qty: 3 - valueType: "discount" - value: 2 - }] - channels: [1] - images: [ - "https://cdn.pixabay.com/photo/2015/11/03/08/58/meeting-1019875_960_720.jpg" - ] - booking: { - type: "default" - location: "Noida" - qty: 120 - availableFrom: "2021-02-10 12:00:00" - availableTo: "2021-02-28 12:00:00" - bookingType: "one" - slots: [{ - fromDay: 1 - from: "09:00" - toDay: 5 - to: "12:00" - }, { - fromDay: 1 - from: "12:30" - toDay: 5 - to: "15:00" - }, { - fromDay: 4 - from: "17:00" - toDay: 6 - to: "20:00" - }] - } - }) { - id - type - attributeFamilyId - sku - parentId - productFlats { - id - sku - name - description - shortDescription - urlKey - new - featured - status - visibleIndividually - thumbnail - price - cost - specialPrice - specialPriceFrom - specialPriceTo - weight - color - colorLabel - size - sizeLabel - locale - channel - productId - parentId - minPrice - maxPrice - metaTitle - metaKeywords - metaDescription - width - height - depth - variants { - id - sku - name - description - shortDescription - urlKey - new - featured - status - visibleIndividually - thumbnail - price - locale - channel - productId - parentId - } - parent { - id - sku - name - description - shortDescription - urlKey - new - featured - status - visibleIndividually - thumbnail - price - cost - specialPrice - specialPriceFrom - specialPriceTo - weight - } - createdAt - updatedAt - } - attributeFamily { - id - code - name - status - isUserDefined - } - orderedInventories { - id - qty - productId - channelId - } - booking { - id - type - qty - location - showLocation - availableEveryWeek - availableFrom - availableTo - productId - defaultSlot { - id - bookingType - duration - breakTime - slots { - to - toDay - from - fromDay - } - bookingProductId - } - } - } - } - ~~~ - -::: details Response - ~~~json - { - "data": { - "updateProduct": { - "id": "11", - "type": "booking", - "attributeFamilyId": 1, - "sku": "booking-prod", - "parentId": null, - "productFlats": [ - { - "id": "11", - "sku": "booking-prod", - "name": "Appointment", - "description": "

Home Decor Description

", - "shortDescription": "

Home Decor Short Description

", - "urlKey": "appointment", - "new": true, - "featured": true, - "status": true, - "visibleIndividually": true, - "thumbnail": null, - "price": 12.55, - "cost": 11.5, - "specialPrice": 11.3, - "specialPriceFrom": "2021-02-08", - "specialPriceTo": "2021-02-28", - "weight": 5.2, - "color": 3, - "colorLabel": "Yellow", - "size": 9, - "sizeLabel": "XL", - "locale": "en", - "channel": "default", - "productId": "11", - "parentId": null, - "minPrice": 11.295, - "maxPrice": 11.295, - "metaTitle": "Home Decor Meta Title", - "metaKeywords": "Home Decor Meta Keywords", - "metaDescription": "Home Decor Meta Description", - "width": 30, - "height": 24, - "depth": 11, - "variants": [], - "parent": null, - "createdAt": "2021-05-27 15:32:06", - "updatedAt": "2021-05-27 15:37:06" - } - ], - "attributeFamily": { - "id": "1", - "code": "default", - "name": "Default", - "status": false, - "isUserDefined": true - }, - "superAttributes": [], - "categories": [], - "inventories": [], - "images": [ - { - "id": "12", - "type": null, - "path": "product/11/meeting-1019875_960_720.jpg", - "productId": "11" - } - ], - "orderedInventories": [], - "reviews": [], - "groupedProducts": [], - "downloadableSamples": [], - "downloadableLinks": [], - "bundleOptions": [], - "customerGroupPrices": [ - { - "id": "33", - "qty": 2, - "valueType": "fixed", - "value": 10, - "productId": "11", - "customerGroupId": "2", - "createdAt": "2021-05-27 15:46:37", - "updatedAt": "2021-05-27 15:46:37" - }, - { - "id": "34", - "qty": 3, - "valueType": "discount", - "value": 2, - "productId": "11", - "customerGroupId": "3", - "createdAt": "2021-05-27 15:46:37", - "updatedAt": "2021-05-27 15:46:37" - } - ], - "booking": { - "id": "1", - "type": "default", - "qty": 120, - "location": "Noida", - "showLocation": false, - "availableEveryWeek": null, - "availableFrom": "2021-02-10 12:00:00", - "availableTo": "2021-02-28 12:00:00", - "productId": "11", - "defaultSlot": { - "id": "1", - "bookingType": "one", - "duration": null, - "breakTime": null, - "slots": [ - { - "to": "12:00", - "toDay": 5, - "from": "09:00", - "fromDay": 1 - }, - { - "to": "15:00", - "toDay": 5, - "from": "12:30", - "fromDay": 1 - }, - { - "to": "20:00", - "toDay": 6, - "from": "17:00", - "fromDay": 4 - } - ], - "bookingProductId": "1" - }, - "appointmentSlot": null - } - } - } - } - ~~~ -::: - -### 3. Update Appointment Booking Product - -By using this API call you can update the Appointment Booking Product. To do this , you have to perform update mutation on Appointment Booking Product and paas the related fields in the request. -API call will update a Appointment Booking Product, only if the admin has logged in. - - - - Headers - - | Key | Value | - | ------------- | --------------------- | - | Accept | application/json | - | Authorization | Bearer `token-string` | - -### Examples - - Let's take an example, - -- Request Mutation - ~~~Mutation - mutation updateProduct { - updateProduct(id: 11, input: { - channel: "default" - locale: "en" - sku: "appointment-booking1" - name: "Dr. Appointment" - urlKey: "dr-appointment" - taxCategoryId: 1 - new: true - featured: true - visibleIndividually: true - status: true - guestCheckout: true - color: 3 - size: 9 - shortDescription: "

Home Decor Short Description

" - description: "

Home Decor Description

" - metaTitle: "Home Decor Meta Title" - metaKeywords: "Home Decor Meta Keywords" - metaDescription: "Home Decor Meta Description" - price: 12.55 - cost: 11.50 - specialPrice: 11.30 - specialPriceFrom: "2021-02-08" - specialPriceTo: "2021-02-28" - width: 30 - height: 24 - depth: 11 - weight: 5.20 - customerGroupPrices: [{ - customerGroupId: 2 - qty: 2 - valueType: "fixed" - value: 10 - }] - channels: [1] - images: [ - "https://cdn.pixabay.com/photo/2015/11/03/08/58/meeting-1019875_960_720.jpg" - ] - booking: { - type: "appointment" - location: "Dehradun" - qty: 14 - availableEveryWeek: false - availableFrom: "2021-02-10 12:00:00" - availableTo: "2021-02-28 12:00:00" - duration: 45 - breakTime: 15 - - # # In case same_slot_all_days: set to true - # same_slot_all_days: true - # slots: [{ - # from: "09:00" - # to: "09:45" - # }, { - # from: "10:00" - # to: "10:45" - # }, { - # from: "11:00" - # to: "11:45" - # }, { - # from: "14:00" - # to: "14:45" - # }] - - # In case same_slot_all_days: set to false - sameSlotAllDays: false - slots: [{ - day: 0 - from: "09:00" - to: "09:45" - }, { - day: 0 - from: "10:00" - to: "10:45" - }, { - day: 1 - from: "11:00" - to: "11:45" - }, { - day: 5 - from: "09:00" - to: "09:45" - }, { - day: 5 - from: "11:00" - to: "11:45" - }, { - day: 5 - from: "12:00" - to: "12:45" - }] - } - }) { - id - type - attributeFamilyId - sku - parentId - productFlats { - id - sku - name - description - shortDescription - urlKey - new - featured - status - visibleIndividually - thumbnail - price - cost - specialPrice - specialPriceFrom - specialPriceTo - weight - color - colorLabel - size - sizeLabel - locale - channel - productId - parentId - minPrice - maxPrice - metaTitle - metaKeywords - metaDescription - width - height - depth - variants { - id - sku - name - description - shortDescription - urlKey - new - featured - status - visibleIndividually - thumbnail - price - locale - channel - productId - parentId - } - parent { - id - sku - name - description - shortDescription - urlKey - new - featured - status - visibleIndividually - thumbnail - price - cost - specialPrice - specialPriceFrom - specialPriceTo - weight - } - createdAt - updatedAt - } - attributeFamily { - id - code - name - status - isUserDefined - } - inventories { - id - qty - productId - inventorySourceId - vendorId - inventorySource { - id - code - name - description - contactName - contactEmail - contactNumber - contactFax - country - state - city - street - postcode - priority - latitude - longitude - status - } - } - images { - id - type - path - productId - } - orderedInventories { - id - qty - productId - channelId - } - customerGroupPrices { - id - qty - valueType - value - productId - customerGroupId - createdAt - updatedAt - } - booking { - id - type - qty - location - showLocation - availableEveryWeek - availableFrom - availableTo - productId - appointmentSlot { - id - duration - breakTime - sameSlotAllDays - slots { - id - from - to - } - bookingProductId - } - } - sameDaySlots { - id - day - from - to - } - differentDaySlots { - id - day - from - to - } - } - } - ~~~ - -::: details Response - ~~~json - { - "data": { - "updateProduct": { - "id": "11", - "type": "booking", - "attributeFamilyId": 1, - "sku": "appointment-booking1", - "parentId": null, - "productFlats": [ - { - "id": "11", - "sku": "appointment-booking1", - "name": "Dr. Appointment", - "description": "

Home Decor Description

", - "shortDescription": "

Home Decor Short Description

", - "urlKey": "dr-appointment", - "new": true, - "featured": true, - "status": true, - "visibleIndividually": true, - "thumbnail": null, - "price": 12.55, - "cost": 11.5, - "specialPrice": 11.3, - "specialPriceFrom": "2021-02-08", - "specialPriceTo": "2021-02-28", - "weight": 5.2, - "color": 3, - "colorLabel": "Yellow", - "size": 9, - "sizeLabel": "XL", - "locale": "en", - "channel": "default", - "productId": "11", - "parentId": null, - "minPrice": 11.295, - "maxPrice": 11.295, - "metaTitle": "Home Decor Meta Title", - "metaKeywords": "Home Decor Meta Keywords", - "metaDescription": "Home Decor Meta Description", - "width": 30, - "height": 24, - "depth": 11, - "variants": [], - "parent": null, - "createdAt": "2021-05-27 15:32:06", - "updatedAt": "2021-05-27 15:51:37" - } - ], - "attributeFamily": { - "id": "1", - "code": "default", - "name": "Default", - "status": false, - "isUserDefined": true - }, - "inventories": [], - "images": [ - { - "id": "13", - "type": null, - "path": "product/11/meeting-1019875_960_720.jpg", - "productId": "11" - } - ], - "orderedInventories": [], - "customerGroupPrices": [ - { - "id": "37", - "qty": 2, - "valueType": "fixed", - "value": 10, - "productId": "11", - "customerGroupId": "2", - "createdAt": "2021-05-27 15:52:03", - "updatedAt": "2021-05-27 15:52:03" - } - ], - "booking": { - "id": "1", - "type": "appointment", - "qty": 14, - "location": "Dehradun", - "showLocation": false, - "availableEveryWeek": false, - "availableFrom": "2021-02-10 12:00:00", - "availableTo": "2021-02-28 12:00:00", - "productId": "11", - "appointmentSlot": { - "id": "1", - "duration": 45, - "breakTime": 15, - "sameSlotAllDays": false, - "slots": [ - { - "id": null, - "from": null, - "to": null - }, - { - "id": null, - "from": null, - "to": null - }, - { - "id": null, - "from": null, - "to": null - }, - { - "id": null, - "from": null, - "to": null - }, - { - "id": null, - "from": null, - "to": null - }, - { - "id": null, - "from": null, - "to": null - }, - { - "id": null, - "from": null, - "to": null - } - ], - "bookingProductId": "1" - } - }, - "sameDaySlots": [], - "differentDaySlots": [ - { - "id": "0_slot_0", - "day": 0, - "from": "09:00", - "to": "09:45" - }, - { - "id": "0_slot_1", - "day": 0, - "from": "10:00", - "to": "10:45" - }, - { - "id": "1_slot_0", - "day": 1, - "from": "11:00", - "to": "11:45" - }, - { - "id": "5_slot_0", - "day": 5, - "from": "09:00", - "to": "09:45" - }, - { - "id": "5_slot_1", - "day": 5, - "from": "11:00", - "to": "11:45" - }, - { - "id": "5_slot_2", - "day": 5, - "from": "12:00", - "to": "12:45" - } - ] - } - } - } - ~~~ -::: - -### 4. Create a new Event Booking Product - - To create a Event Booking Product, you have to perform mutation on Booking Product and paas the related fields in the request. - API call resource will create a new Event Booking Product, only if the admin has logged in. - - - Headers - - | Key | Value | - | ------------- | --------------------- | - | Accept | application/json | - | Authorization | Bearer `token-string` | - -**Note**: Here you can pass Only those filed with the request that you want in the response. - -### Examples - - Let's take an example, - -- Request Mutation - ~~~Mutation - mutation createProduct { - createProduct(input: { - type: "booking" - attributeFamilyId: 1 - sku: "event-booking" - }) { - id - type - attributeFamilyId - sku - parentId - productFlats { - id - sku - name - description - shortDescription - urlKey - new - featured - status - visibleIndividually - thumbnail - price - cost - specialPrice - specialPriceFrom - specialPriceTo - weight - color - colorLabel - size - sizeLabel - locale - channel - productId - parentId - minPrice - maxPrice - metaTitle - metaKeywords - metaDescription - width - height - depth - variants { - id - sku - name - description - shortDescription - urlKey - new - featured - status - visibleIndividually - thumbnail - price - locale - channel - productId - parentId - } - parent { - id - sku - name - description - shortDescription - urlKey - new - featured - status - visibleIndividually - thumbnail - price - cost - specialPrice - specialPriceFrom - specialPriceTo - weight - } - createdAt - updatedAt - } - variants { - id - type - attributeFamilyId - sku - parentId - } - parent { - id - type - attributeFamilyId - sku - parentId - } - attributeFamily { - id - code - name - status - isUserDefined - } - inventories { - id - qty - productId - inventorySourceId - vendorId - inventorySource { - id - code - name - description - contactName - contactEmail - contactNumber - contactFax - country - state - city - street - postcode - priority - latitude - longitude - status - } - } - images { - id - type - path - productId - } - orderedInventories { - id - qty - productId - channelId - } - customerGroupPrices { - id - qty - valueType - value - productId - customerGroupId - createdAt - updatedAt - } - booking { - id - type - qty - location - showLocation - availableEveryWeek - availableFrom - availableTo - productId - defaultSlot { - id - bookingType - duration - breakTime - slots { - to - toDay - from - fromDay - } - bookingProductId - } - appointmentSlot { - id - duration - breakTime - sameSlotAllDays - slots { - from - to - } - bookingProductId - } - } - } - } - ~~~ -::: details Response - ~~~json - { - "data": { - "createProduct": { - "id": "12", - "type": "booking", - "attributeFamilyId": 1, - "sku": "event-booking", - "parentId": null, - "productFlats": [ - { - "id": "12", - "sku": "", - "name": null, - "description": null, - "shortDescription": null, - "urlKey": null, - "new": null, - "featured": null, - "status": null, - "visibleIndividually": null, - "thumbnail": null, - "price": null, - "cost": null, - "specialPrice": null, - "specialPriceFrom": null, - "specialPriceTo": null, - "weight": null, - "color": null, - "colorLabel": null, - "size": null, - "sizeLabel": null, - "locale": "en", - "channel": "default", - "productId": "12", - "parentId": null, - "minPrice": null, - "maxPrice": null, - "metaTitle": null, - "metaKeywords": null, - "metaDescription": null, - "width": null, - "height": null, - "depth": null, - "variants": [], - "parent": null, - "createdAt": "2021-05-27 16:04:24", - "updatedAt": "2021-05-27 16:04:24" - } - ], - "variants": [], - "parent": null, - "attributeFamily": { - "id": "1", - "code": "default", - "name": "Default", - "status": false, - "isUserDefined": true - }, - "inventories": [], - "images": [], - "orderedInventories": [], - "customerGroupPrices": [], - "booking": null - } - } - } - ~~~ -::: - -### 5. Update Event Booking Product - -By using this API call you can update the Event Booking Product. To do this , you have to perform update mutation on Event Booking Product and paas the related fields in the request. -API call will update a Event Booking Product, only if the admin has logged in. - - - - Headers - - | Key | Value | - | ------------- | --------------------- | - | Accept | application/json | - | Authorization | Bearer `token-string` | - -### Examples - - Let's take an example, - -- Request Mutation - ~~~Mutation - mutation updateProduct { - updateProduct(id: 12, input: { - channel: "default" - locale: "en" - sku: "event-booking" - name: "Music Show" - urlKey: "music-show" - taxCategoryId: 1 - new: true - featured: true - visibleIndividually: true - status: true - guestCheckout: true - color: 3 - size: 9 - shortDescription: "

Home Decor Short Description

" - description: "

Home Decor Description

" - metaTitle: "Home Decor Meta Title" - metaKeywords: "Home Decor Meta Keywords" - metaDescription: "Home Decor Meta Description" - price: 12.55 - cost: 11.50 - width: 30 - height: 24 - depth: 11 - weight: 5.20 - customerGroupPrices: [{ - customerGroupId: 2 - qty: 2 - valueType: "fixed" - value: 10 - }] - channels: [1] - images: [ - "https://cdn.pixabay.com/photo/2015/11/03/08/58/meeting-1019875_960_720.jpg" - ] - booking: { - type: "event" - location: "Meerut" - availableFrom: "2021-02-10 12:00:00" - availableTo: "2021-02-28 12:00:00" - tickets: [{ - locales: { - locale: "en" - name: "First Show" - description: "First Music Show " - } - price: 4 - qty: 50 - }, { - locales: { - locale: "en" - name: "Evening Show" - description: "Evening Music Show" - } - price: 7 - qty: 40 - }] - } - }) { - id - type - attributeFamilyId - sku - parentId - productFlats { - id - sku - name - description - shortDescription - urlKey - new - featured - status - visibleIndividually - thumbnail - price - cost - weight - color - colorLabel - size - sizeLabel - locale - channel - productId - parentId - minPrice - maxPrice - metaTitle - metaKeywords - metaDescription - width - height - depth - variants { - id - sku - name - description - shortDescription - urlKey - new - featured - status - visibleIndividually - thumbnail - price - locale - channel - productId - parentId - } - parent { - id - sku - name - description - shortDescription - urlKey - new - featured - status - visibleIndividually - thumbnail - price - cost - specialPrice - specialPriceFrom - specialPriceTo - weight - } - createdAt - updatedAt - } - attributeFamily { - id - code - name - status - isUserDefined - } - inventories { - id - qty - productId - inventorySourceId - vendorId - inventorySource { - id - code - name - description - contactName - contactEmail - contactNumber - contactFax - country - state - city - street - postcode - priority - latitude - longitude - status - } - } - images { - id - type - path - productId - } - orderedInventories { - id - qty - productId - channelId - } - customerGroupPrices { - id - qty - valueType - value - productId - customerGroupId - createdAt - updatedAt - } - booking { - id - type - location - showLocation - availableFrom - availableTo - productId - eventTickets { - id - price - qty - translations { - locale - name - description - } - bookingProductId - } - } - } - } - ~~~ - -::: details Response - ~~~json - { - "data": { - "updateProduct": { - "id": "12", - "type": "booking", - "attributeFamilyId": 1, - "sku": "event-booking", - "parentId": null, - "productFlats": [ - { - "id": "12", - "sku": "event-booking", - "name": "Music Show", - "description": "

Home Decor Description

", - "shortDescription": "

Home Decor Short Description

", - "urlKey": "music-show", - "new": true, - "featured": true, - "status": true, - "visibleIndividually": true, - "thumbnail": null, - "price": 12.55, - "cost": 11.5, - "weight": 5.2, - "color": 3, - "colorLabel": "Yellow", - "size": 9, - "sizeLabel": "XL", - "locale": "en", - "channel": "default", - "productId": "12", - "parentId": null, - "minPrice": 11.295, - "maxPrice": 11.295, - "metaTitle": "Home Decor Meta Title", - "metaKeywords": "Home Decor Meta Keywords", - "metaDescription": "Home Decor Meta Description", - "width": 30, - "height": 24, - "depth": 11, - "variants": [], - "parent": null, - "createdAt": "2021-05-27 16:04:24", - "updatedAt": "2021-05-27 16:04:24" - } - ], - "attributeFamily": { - "id": "1", - "code": "default", - "name": "Default", - "status": false, - "isUserDefined": true - }, - "inventories": [], - "images": [ - { - "id": "15", - "type": null, - "path": "product/12/meeting-1019875_960_720.jpg", - "productId": "12" - } - ], - "orderedInventories": [], - "customerGroupPrices": [ - { - "id": "39", - "qty": 2, - "valueType": "fixed", - "value": 10, - "productId": "12", - "customerGroupId": "2", - "createdAt": "2021-05-27 16:18:30", - "updatedAt": "2021-05-27 16:18:30" - } - ], - "booking": { - "id": "2", - "type": "event", - "location": "Meerut", - "showLocation": false, - "availableFrom": "2021-02-10 12:00:00", - "availableTo": "2021-02-28 12:00:00", - "productId": "12", - "eventTickets": [ - { - "id": "3", - "price": 4, - "qty": 50, - "translations": [ - { - "locale": "en", - "name": "First Show", - "description": "First Music Show" - } - ], - "bookingProductId": "2" - }, - { - "id": "4", - "price": 7, - "qty": 40, - "translations": [ - { - "locale": "en", - "name": "Evening Show", - "description": "Evening Music Show" - } - ], - "bookingProductId": "2" - } - ] - } - } - } - } - ~~~ -::: - -### 6. Create a new Rental Booking Product - - To create a Event Rental Booking Product, you have to perform mutation on Rental Booking Product and paas the related fields in the request. - API call resource will create a new Event Rental Booking Product, only if the admin has logged in. - - - Headers - - | Key | Value | - | ------------- | --------------------- | - | Accept | application/json | - | Authorization | Bearer `token-string` | - -**Note**: Here you can pass Only those filed with the request that you want in the response. - -### Examples - - Let's take an example, - -- Request Mutation - ~~~Mutation - mutation createProduct { - createProduct(input: { - type: "booking" - attributeFamilyId: 1 - sku: "ac-on-rent" - }) { - id - type - attributeFamilyId - sku - parentId - productFlats { - id - sku - name - description - shortDescription - urlKey - new - featured - status - visibleIndividually - thumbnail - price - cost - specialPrice - specialPriceFrom - specialPriceTo - weight - color - colorLabel - size - sizeLabel - locale - channel - productId - parentId - minPrice - maxPrice - metaTitle - metaKeywords - metaDescription - width - height - depth - variants { - id - sku - name - description - shortDescription - urlKey - new - featured - status - visibleIndividually - thumbnail - price - locale - channel - productId - parentId - } - parent { - id - sku - name - description - shortDescription - urlKey - new - featured - status - visibleIndividually - thumbnail - price - cost - specialPrice - specialPriceFrom - specialPriceTo - weight - } - createdAt - updatedAt - } - variants { - id - type - attributeFamilyId - sku - parentId - } - parent { - id - type - attributeFamilyId - sku - parentId - } - attributeFamily { - id - code - name - status - isUserDefined - } - inventories { - id - qty - productId - inventorySourceId - vendorId - inventorySource { - id - code - name - description - contactName - contactEmail - contactNumber - contactFax - country - state - city - street - postcode - priority - latitude - longitude - status - } - } - images { - id - type - path - productId - } - orderedInventories { - id - qty - productId - channelId - } - customerGroupPrices { - id - qty - valueType - value - productId - customerGroupId - createdAt - updatedAt - } - booking { - id - type - qty - location - showLocation - availableEveryWeek - availableFrom - availableTo - productId - defaultSlot { - id - bookingType - duration - breakTime - slots { - to - toDay - from - fromDay - } - bookingProductId - } - appointmentSlot { - id - duration - breakTime - sameSlotAllDays - slots { - from - to - } - bookingProductId - } - } - } - } - ~~~ -::: details Response - ~~~json - { - "data": { - "createProduct": { - "id": "13", - "type": "booking", - "attributeFamilyId": 1, - "sku": "ac-on-rent", - "parentId": null, - "productFlats": [ - { - "id": "13", - "sku": "", - "name": null, - "description": null, - "shortDescription": null, - "urlKey": null, - "new": null, - "featured": null, - "status": null, - "visibleIndividually": null, - "thumbnail": null, - "price": null, - "cost": null, - "weight": null, - "color": null, - "colorLabel": null, - "size": null, - "sizeLabel": null, - "locale": "en", - "channel": "default", - "productId": "13", - "parentId": null, - "minPrice": null, - "maxPrice": null, - "metaTitle": null, - "metaKeywords": null, - "metaDescription": null, - "width": null, - "height": null, - "depth": null, - "variants": [], - "parent": null, - "createdAt": "2021-05-27 16:30:11", - "updatedAt": "2021-05-27 16:30:11" - } - ], - "attributeFamily": { - "id": "1", - "code": "default", - "name": "Default", - "status": false, - "isUserDefined": true - }, - "inventories": [], - "images": [], - "orderedInventories": [], - "customerGroupPrices": [], - "booking": null - } - } - } - ~~~ -::: - -### 7. Update Rental Booking Product - -By using this API call you can update the Rental Booking Product. To do this , you have to perform update mutation on Rental Booking Product and paas the related fields in the request. -API call will update a Rental Booking Product, only if the admin has logged in. - - - - Headers - - | Key | Value | - | ------------- | --------------------- | - | Accept | application/json | - | Authorization | Bearer `token-string` | - -### Examples - - Let's take an example, - -- Request Mutation - ~~~Mutation - mutation updateProduct { - updateProduct(id: 13, input: { - channel: "default" - locale: "en" - sku: "ac-on-rent" - name: "AC On Rent" - urlKey: "ac-on-rent" - taxCategoryId: 1 - new: true - featured: true - visibleIndividually: true - status: true - guestCheckout: true - color: 3 - size: 9 - shortDescription: "

Home Decor Short Description

" - description: "

Home Decor Description

" - metaTitle: "Home Decor Meta Title" - metaKeywords: "Home Decor Meta Keywords" - metaDescription: "Home Decor Meta Description" - price: 12.55 - cost: 11.50 - specialPrice: 11.30 - specialPriceFrom: "2021-02-08" - specialPriceTo: "2021-02-28" - width: 30 - height: 24 - depth: 11 - weight: 5.20 - inventories: [{ - inventorySourceId: 1 - qty: 111 - }] - channels: [1] - images: [ - "http://graphqlnew.com/themes/velocity/assets/images/kids.png", - ] - booking: { - type: "rental" - location: "UK" - qty: 23 - availableEveryWeek: false - availableFrom: "2021-02-10 12:00:00" - availableTo: "2021-02-28 12:00:00" - sameSlotAllDays: false - rentalSlot: { - rentingType: "hourly" - dailyPrice: null - hourlyPrice: 4.20 - slots: [{ - day: 0 - from: "09:00" - to: "09:45" - }, { - day: 0 - from: "10:00" - to: "10:45" - }, { - day: 2 - from: "11:00" - to: "11:45" - }, { - day: 2 - from: "12:00" - to: "12:45" - }] - } - } - }) { - id - type - attributeFamilyId - sku - parentId - productFlats { - id - sku - name - description - shortDescription - urlKey - new - featured - status - visibleIndividually - thumbnail - price - cost - weight - color - colorLabel - size - sizeLabel - locale - channel - productId - parentId - minPrice - maxPrice - metaTitle - metaKeywords - metaDescription - width - height - depth - variants { - id - sku - name - description - shortDescription - urlKey - new - featured - status - visibleIndividually - thumbnail - price - locale - channel - productId - parentId - } - parent { - id - sku - name - description - shortDescription - urlKey - new - featured - status - visibleIndividually - thumbnail - price - cost - specialPrice - specialPriceFrom - specialPriceTo - weight - } - createdAt - updatedAt - } - attributeFamily { - id - code - name - status - isUserDefined - } - inventories { - id - qty - productId - inventorySourceId - vendorId - inventorySource { - id - code - name - description - contactName - contactEmail - contactNumber - contactFax - country - state - city - street - postcode - priority - latitude - longitude - status - } - } - images { - id - type - path - productId - } - orderedInventories { - id - qty - productId - channelId - } - customerGroupPrices { - id - qty - valueType - value - productId - customerGroupId - createdAt - updatedAt - } - booking { - id - type - location - showLocation - availableFrom - availableTo - productId - eventTickets { - id - price - qty - translations { - locale - name - description - } - bookingProductId - } - } - sameDaySlots { - id - day - from - to - } - differentDaySlots { - id - day - from - to - } - } - } - ~~~ - -::: details Response - ~~~json - { - "data": { - "updateProduct": { - "id": "13", - "type": "booking", - "attributeFamilyId": 1, - "sku": "ac-on-rent", - "parentId": null, - "productFlats": [ - { - "id": "13", - "sku": "ac-on-rent", - "name": "AC On Rent", - "description": "

Home Decor Description

", - "shortDescription": "

Home Decor Short Description

", - "urlKey": "ac-on-rent", - "new": true, - "featured": true, - "status": true, - "visibleIndividually": true, - "thumbnail": null, - "price": 12.55, - "cost": 11.5, - "weight": 5.2, - "color": 3, - "colorLabel": "Yellow", - "size": 9, - "sizeLabel": "XL", - "locale": "en", - "channel": "default", - "productId": "13", - "parentId": null, - "minPrice": 11.295, - "maxPrice": 11.295, - "metaTitle": "Home Decor Meta Title", - "metaKeywords": "Home Decor Meta Keywords", - "metaDescription": "Home Decor Meta Description", - "width": 30, - "height": 24, - "depth": 11, - "variants": [], - "parent": null, - "createdAt": "2021-05-27 16:30:11", - "updatedAt": "2021-05-27 16:30:11" - } - ], - "attributeFamily": { - "id": "1", - "code": "default", - "name": "Default", - "status": false, - "isUserDefined": true - }, - "inventories": [ - { - "id": "17", - "qty": 111, - "productId": "13", - "inventorySourceId": "1", - "vendorId": 0, - "inventorySource": { - "id": "1", - "code": "default", - "name": "Default", - "description": null, - "contactName": "Detroit Warehouse", - "contactEmail": "warehouse@example.com", - "contactNumber": "1234567899", - "contactFax": null, - "country": "US", - "state": "MI", - "city": "Detroit", - "street": "12th Street", - "postcode": "48127", - "priority": 0, - "latitude": null, - "longitude": null, - "status": true - } - } - ], - "images": [], - "orderedInventories": [], - "customerGroupPrices": [], - "booking": { - "type": "rental", - "location": "UK", - "qty": 23, - "availableEveryWeek": false, - "availableFrom": "2021-02-10 12:00:00", - "availableTo": "2021-02-28 12:00:00", - "rentalSlot": { - "rentingType": "hourly", - "dailyPrice": null, - "hourlyPrice": 4.2, - "slots": [ - { - "from": null, - "to": null - }, - { - "from": null, - "to": null - } - ] - } - }, - "sameDaySlots": [], - "differentDaySlots": [ - { - "id": null, - "day": 0, - "from": "09:00", - "to": "09:45" - }, - { - "id": null, - "day": 0, - "from": "10:00", - "to": "10:45" - }, - { - "id": null, - "day": 2, - "from": "11:00", - "to": "11:45" - }, - { - "id": null, - "day": 2, - "from": "12:00", - "to": "12:45" - } - ] - } - } - } - ~~~ -::: - -### 8. Create a new Table Booking Product - - To create a Event Table Booking Product, you have to perform mutation on Table Booking Product and paas the related fields in the request. - API call resource will create a new Event Table Booking Product, only if the admin has logged in. - - - Headers - - | Key | Value | - | ------------- | --------------------- | - | Accept | application/json | - | Authorization | Bearer `token-string` | - -**Note**: Here you can pass Only those filed with the request that you want in the response. - -### Examples - - Let's take an example, - -- Request Mutation - ~~~Mutation - mutation createProduct { - createProduct(input: { - type: "booking" - attributeFamilyId: 1 - sku: "hotel-table" - }) { - id - type - attributeFamilyId - sku - parentId - productFlats { - id - sku - name - description - shortDescription - urlKey - new - featured - status - visibleIndividually - thumbnail - price - cost - specialPrice - specialPriceFrom - specialPriceTo - weight - color - colorLabel - size - sizeLabel - locale - channel - productId - parentId - minPrice - maxPrice - metaTitle - metaKeywords - metaDescription - width - height - depth - variants { - id - sku - name - description - shortDescription - urlKey - new - featured - status - visibleIndividually - thumbnail - price - locale - channel - productId - parentId - } - parent { - id - sku - name - description - shortDescription - urlKey - new - featured - status - visibleIndividually - thumbnail - price - cost - specialPrice - specialPriceFrom - specialPriceTo - weight - } - createdAt - updatedAt - } - variants { - id - type - attributeFamilyId - sku - parentId - } - parent { - id - type - attributeFamilyId - sku - parentId - } - attributeFamily { - id - code - name - status - isUserDefined - } - inventories { - id - qty - productId - inventorySourceId - vendorId - inventorySource { - id - code - name - description - contactName - contactEmail - contactNumber - contactFax - country - state - city - street - postcode - priority - latitude - longitude - status - } - } - images { - id - type - path - productId - } - orderedInventories { - id - qty - productId - channelId - } - customerGroupPrices { - id - qty - valueType - value - productId - customerGroupId - createdAt - updatedAt - } - booking { - id - type - qty - location - showLocation - availableEveryWeek - availableFrom - availableTo - productId - defaultSlot { - id - bookingType - duration - breakTime - slots { - to - toDay - from - fromDay - } - bookingProductId - } - appointmentSlot { - id - duration - breakTime - sameSlotAllDays - slots { - from - to - } - bookingProductId - } - } - } - } - ~~~ -::: details Response - ~~~json - { - "data": { - "createProduct": { - "id": "14", - "type": "booking", - "attributeFamilyId": 1, - "sku": "hotel-table", - "parentId": null, - "productFlats": [ - { - "id": "14", - "sku": "", - "name": null, - "description": null, - "shortDescription": null, - "urlKey": null, - "new": null, - "featured": null, - "status": null, - "visibleIndividually": null, - "thumbnail": null, - "price": null, - "cost": null, - "weight": null, - "color": null, - "colorLabel": null, - "size": null, - "sizeLabel": null, - "locale": "en", - "channel": "default", - "productId": "14", - "parentId": null, - "minPrice": null, - "maxPrice": null, - "metaTitle": null, - "metaKeywords": null, - "metaDescription": null, - "width": null, - "height": null, - "depth": null, - "variants": [], - "parent": null, - "createdAt": "2021-05-27 16:45:57", - "updatedAt": "2021-05-27 16:45:57" - } - ], - "attributeFamily": { - "id": "1", - "code": "default", - "name": "Default", - "status": false, - "isUserDefined": true - }, - "inventories": [], - "images": [], - "orderedInventories": [], - "customerGroupPrices": [], - "booking": null - } - } - } - ~~~ -::: - -### 7. Update Table Booking Product - -By using this API call you can update the Table Booking Product. To do this , you have to perform update mutation on Table Booking Product and paas the related fields in the request. -API call will update a Table Booking Product, only if the admin has logged in. - - - - Headers - - | Key | Value | - | ------------- | --------------------- | - | Accept | application/json | - | Authorization | Bearer `token-string` | - -### Examples - - Let's take an example, - -- Request Mutation - ~~~Mutation - mutation updateProduct { - updateProduct(id: 14, input: { - channel: "default" - locale: "en" - sku: "hotel-table" - name: "Hotel Table" - urlKey: "hotel-table" - taxCategoryId: 1 - new: true - featured: true - visibleIndividually: true - status: true - guestCheckout: true - color: 3 - size: 9 - shortDescription: "

Home Decor Short Description

" - description: "

Home Decor Description

" - metaTitle: "Home Decor Meta Title" - metaKeywords: "Home Decor Meta Keywords" - metaDescription: "Home Decor Meta Description" - price: 12.55 - cost: 11.50 - specialPrice: 11.30 - specialPriceFrom: "2021-02-08" - specialPriceTo: "2021-02-28" - width: 30 - height: 24 - depth: 11 - weight: 5.20 - customerGroupPrices: [{ - customerGroupId: 2 - qty: 2 - valueType: "fixed" - value: 10 - }] - inventories: [{ - inventorySourceId: 1 - qty: 111 - }, { - inventorySourceId: 2 - qty: 222 - }] - channels: [1] - images: [ - "http://graphqlnew.com/themes/velocity/assets/images/headphones.png" - ] - booking: { - type: "table" - location: "Hisar" - qty: 5 - duration: 45 - breakTime: 15 - availableEveryWeek: true - availableFrom: "2021-02-11 12:00:00" - availableTo: "2021-02-18 12:00:00" - sameSlotAllDays: true - tableSlot: { - priceType: "guest" - guestLimit: 5 - preventSchedulingBefore: 3 - slots: [{ - day: 0 - from: "09:00" - to: "09:45" - }, { - day: 1 - from: "10:00" - to: "10:45" - }, { - day: 2 - from: "11:00" - to: "11:45" - }, { - day: 3 - from: "12:00" - to: "12:45" - }] - } - } - }) { - id - type - attributeFamilyId - sku - parentId - productFlats { - id - sku - name - description - shortDescription - urlKey - new - featured - status - visibleIndividually - thumbnail - price - cost - weight - color - colorLabel - size - sizeLabel - locale - channel - productId - parentId - minPrice - maxPrice - metaTitle - metaKeywords - metaDescription - width - height - depth - variants { - id - sku - name - description - shortDescription - urlKey - new - featured - status - visibleIndividually - thumbnail - price - locale - channel - productId - parentId - } - parent { - id - sku - name - description - shortDescription - urlKey - new - featured - status - visibleIndividually - thumbnail - price - cost - specialPrice - specialPriceFrom - specialPriceTo - weight - } - createdAt - updatedAt - } - attributeFamily { - id - code - name - status - isUserDefined - } - inventories { - id - qty - productId - inventorySourceId - vendorId - inventorySource { - id - code - name - description - contactName - contactEmail - contactNumber - contactFax - country - state - city - street - postcode - priority - latitude - longitude - status - } - } - images { - id - type - path - productId - } - orderedInventories { - id - qty - productId - channelId - } - customerGroupPrices { - id - qty - valueType - value - productId - customerGroupId - createdAt - updatedAt - } - booking { - id - type - location - showLocation - availableFrom - availableTo - productId - eventTickets { - id - price - qty - translations { - locale - name - description - } - bookingProductId - } - } - sameDaySlots { - id - day - from - to - } - differentDaySlots { - id - day - from - to - } - } - } - ~~~ - -::: details Response - ~~~json - { - "data": { - "updateProduct": { - "id": "14", - "type": "booking", - "attributeFamilyId": 1, - "sku": "hotel-table", - "parentId": null, - "productFlats": [ - { - "id": "14", - "sku": "hotel-table", - "name": "Hotel Table", - "description": "

Home Decor Description

", - "shortDescription": "

Home Decor Short Description

", - "urlKey": "hotel-table", - "new": true, - "featured": true, - "status": true, - "visibleIndividually": true, - "thumbnail": null, - "price": 12.55, - "cost": 11.5, - "weight": 5.2, - "color": 3, - "colorLabel": "Yellow", - "size": 9, - "sizeLabel": "XL", - "locale": "en", - "channel": "default", - "productId": "14", - "parentId": null, - "minPrice": 11.295, - "maxPrice": 11.295, - "metaTitle": "Home Decor Meta Title", - "metaKeywords": "Home Decor Meta Keywords", - "metaDescription": "Home Decor Meta Description", - "width": 30, - "height": 24, - "depth": 11, - "variants": [], - "parent": null, - "createdAt": "2021-05-27 16:45:57", - "updatedAt": "2021-05-27 16:45:57" - } - ], - "attributeFamily": { - "id": "1", - "code": "default", - "name": "Default", - "status": false, - "isUserDefined": true - }, - "inventories": [ - { - "id": "19", - "qty": 111, - "productId": "14", - "inventorySourceId": "1", - "vendorId": 0, - "inventorySource": { - "id": "1", - "code": "default", - "name": "Default", - "description": null, - "contactName": "Detroit Warehouse", - "contactEmail": "warehouse@example.com", - "contactNumber": "1234567899", - "contactFax": null, - "country": "US", - "state": "MI", - "city": "Detroit", - "street": "12th Street", - "postcode": "48127", - "priority": 0, - "latitude": null, - "longitude": null, - "status": true - } - }, - { - "id": "20", - "qty": 222, - "productId": "14", - "inventorySourceId": "2", - "vendorId": 0, - "inventorySource": { - "id": "2", - "code": "new", - "name": "demoinventory", - "description": "demo", - "contactName": "jyoti", - "contactEmail": "jyoti@webkul.com", - "contactNumber": "7252756566", - "contactFax": null, - "country": "IN", - "state": "UP", - "city": "Gorakhpur", - "street": "d-54", - "postcode": "273003", - "priority": 1, - "latitude": null, - "longitude": null, - "status": true - } - } - ], - "images": [], - "orderedInventories": [], - "customerGroupPrices": [ - { - "id": "42", - "qty": 2, - "valueType": "fixed", - "value": 10, - "productId": "14", - "customerGroupId": "2", - "createdAt": "2021-05-27 16:51:26", - "updatedAt": "2021-05-27 16:51:26" - } - ], - "booking": { - "type": "table", - "location": "Hisar", - "qty": 5, - "availableEveryWeek": true, - "availableFrom": "2021-02-11 12:00:00", - "availableTo": "2021-02-18 12:00:00", - "tableSlot": { - "priceType": "guest", - "guestLimit": 5, - "duration": 45, - "breakTime": 15, - "sameSlotAllDays": true, - "preventSchedulingBefore": true, - "slots": [ - { - "from": "09:00", - "to": "09:45" - }, - { - "from": "10:00", - "to": "10:45" - }, - { - "from": "11:00", - "to": "11:45" - }, - { - "from": "12:00", - "to": "12:45" - } - ] - } - }, - "sameDaySlots": [ - { - "id": null, - "day": 0, - "from": "09:00", - "to": "09:45" - }, - { - "id": null, - "day": 1, - "from": "10:00", - "to": "10:45" - }, - { - "id": null, - "day": 2, - "from": "11:00", - "to": "11:45" - }, - { - "id": null, - "day": 3, - "from": "12:00", - "to": "12:45" - } - ], - "differentDaySlots": [] - } - } - } - ~~~ -::: diff --git a/docs/1.x/graphql-admin-api/promotions.md b/docs/1.x/graphql-admin-api/promotions.md deleted file mode 100644 index ce5b05d9..00000000 --- a/docs/1.x/graphql-admin-api/promotions.md +++ /dev/null @@ -1,2197 +0,0 @@ -## Catalog Rules - -In this section, we will see all the APIs which are related to Catalog Rules. - -### 1. Get All Catalog Rules - -You can get all the Catalog Rules from the Bagisto store. You can achieve this job by using the `Catalog Rules` API call. - -- Headers - - | Key | Value | - | ------------- | ---------------- | - | Accept | application/json | - -- Single Request Endpoint - - `POST http(s)://example.com/graphql` - -::: tip - - If you are using pagination and want to know more info about responses then check the [explanation](./explanation) portion. - -::: - -**Note**: You can pass all the related fileds that you want in response. - -- Query - ~~~query - query catalogRules { - catalogRules { - paginatorInfo { - count - currentPage - lastPage - total - } - data { - id - name - description - startsFrom - endsTill - status - conditionType - conditions - endOtherRules - actionType - discountAmount - sortOrder - createdAt - updatedAt - channels { - id - code - name - description - theme - homePageContent - footerContent - hostname - defaultLocaleId - baseCurrencyId - rootCategoryId - homeSeo - locales { - id - name - code - direction - } - defaultLocale - currencies { - id - name - code - symbol - } - inventorySources { - id - code - name - description - contactName - contactEmail - contactNumber - contactFax - country - state - city - street - postcode - priority - latitude - longitude - status - } - baseCurrency - rootCategory - logoUrl - faviconUrl - } - customerGroups { - id - name - code - isUserDefined - createdAt - updatedAt - } - catalogRuleProducts { - id - startsFrom - endsTill - discountAmount - actionType - endOtherRules - sortOrder - catalogRuleId - channelId - customerGroupId - productId - product { - id - type - attributeFamilyId - sku - parentId - variants { - id - type - attributeFamilyId - sku - parentId - } - } - } - catalogRuleProductPrices { - id - price - ruleDate - startsFrom - endsTill - productId - catalogRuleId - channelId - customerGroupId - } - } - } - } - ~~~ - -::: details Response - -~~~json -{ - "data": { - "catalogRules": { - "paginatorInfo": { - "count": 1, - "currentPage": 1, - "lastPage": 1, - "total": 1 - }, - "data": [ - { - "id": "1", - "name": "test rule", - "description": "test rule", - "startsFrom": "2021-05-25", - "endsTill": "2021-05-27", - "status": true, - "conditionType": true, - "conditions": "null", - "endOtherRules": true, - "actionType": "by_percent", - "discountAmount": 10, - "sortOrder": 1, - "createdAt": "2021-05-26 17:28:54", - "updatedAt": "2021-05-26 17:28:54", - "channels": [ - { - "id": "1", - "code": "default", - "name": "Default", - "description": null, - "theme": "velocity", - "homePageContent": "\n

@include(\"shop::home.slider\") @include(\"shop::home.featured-products\") @include(\"shop::home.new-products\")

\n
\n
\n \"test\"\n
\n
\n \"test\"\n \"test\"\n
\n
\n ", - "footerContent": "\n \n
\n Connect With Us\n \n
\n ", - "hostname": "http://localhost/graphql/public", - "defaultLocaleId": 1, - "baseCurrencyId": 1, - "rootCategoryId": 1, - "homeSeo": "{\"meta_title\": \"Demo store\", \"meta_keywords\": \"Demo store meta keyword\", \"meta_description\": \"Demo store meta description\"}", - "locales": [ - { - "id": "1", - "name": "English", - "code": "en", - "direction": "ltr" - } - ], - "defaultLocale": "{\"id\":1,\"code\":\"en\",\"name\":\"English\",\"created_at\":null,\"updated_at\":null,\"direction\":\"ltr\",\"locale_image\":null}", - "currencies": [ - { - "id": "1", - "name": "US Dollar", - "code": "USD", - "symbol": "$" - } - ], - "inventorySources": [ - { - "id": "1", - "code": "default", - "name": "Default", - "description": null, - "contactName": "Detroit Warehouse", - "contactEmail": "warehouse@example.com", - "contactNumber": "1234567899", - "contactFax": null, - "country": "US", - "state": "MI", - "city": "Detroit", - "street": "12th Street", - "postcode": "48127", - "priority": 0, - "latitude": null, - "longitude": null, - "status": true - } - ], - "baseCurrency": "{\"id\":1,\"code\":\"USD\",\"name\":\"US Dollar\",\"created_at\":null,\"updated_at\":null,\"symbol\":\"$\"}", - "rootCategory": "{\"id\":1,\"position\":1,\"image\":null,\"status\":1,\"_lft\":1,\"_rgt\":14,\"parent_id\":null,\"created_at\":\"2021-05-05T10:06:44.000000Z\",\"updated_at\":\"2021-05-05T10:06:44.000000Z\",\"display_mode\":\"products_and_description\",\"category_icon_path\":null,\"additional\":null,\"name\":\"Root\",\"description\":\"Root\",\"slug\":\"root\",\"url_path\":\"\",\"meta_title\":\"\",\"meta_description\":\"\",\"meta_keywords\":\"\",\"translations\":[{\"id\":1,\"name\":\"Root\",\"slug\":\"root\",\"description\":\"Root\",\"meta_title\":\"\",\"meta_description\":\"\",\"meta_keywords\":\"\",\"category_id\":1,\"locale\":\"en\",\"locale_id\":null,\"url_path\":\"\"}]}", - "logoUrl": null, - "faviconUrl": null - }, - { - "id": "2", - "code": "newca", - "name": "nerty", - "description": "ajsyg", - "theme": "gdg", - "homePageContent": "fhg", - "footerContent": "fh", - "hostname": "http://bag1.com", - "defaultLocaleId": 1, - "baseCurrencyId": 1, - "rootCategoryId": 1, - "homeSeo": "{\"meta_title\": \"gfyj\", \"meta_keywords\": \"gvgh\", \"meta_description\": \"gcg\"}", - "locales": [ - { - "id": "1", - "name": "English", - "code": "en", - "direction": "ltr" - } - ], - "defaultLocale": "{\"id\":1,\"code\":\"en\",\"name\":\"English\",\"created_at\":null,\"updated_at\":null,\"direction\":\"ltr\",\"locale_image\":null}", - "currencies": [ - { - "id": "1", - "name": "US Dollar", - "code": "USD", - "symbol": "$" - } - ], - "inventorySources": [ - { - "id": "1", - "code": "default", - "name": "Default", - "description": null, - "contactName": "Detroit Warehouse", - "contactEmail": "warehouse@example.com", - "contactNumber": "1234567899", - "contactFax": null, - "country": "US", - "state": "MI", - "city": "Detroit", - "street": "12th Street", - "postcode": "48127", - "priority": 0, - "latitude": null, - "longitude": null, - "status": true - } - ], - "baseCurrency": "{\"id\":1,\"code\":\"USD\",\"name\":\"US Dollar\",\"created_at\":null,\"updated_at\":null,\"symbol\":\"$\"}", - "rootCategory": "{\"id\":1,\"position\":1,\"image\":null,\"status\":1,\"_lft\":1,\"_rgt\":14,\"parent_id\":null,\"created_at\":\"2021-05-05T10:06:44.000000Z\",\"updated_at\":\"2021-05-05T10:06:44.000000Z\",\"display_mode\":\"products_and_description\",\"category_icon_path\":null,\"additional\":null,\"name\":\"Root\",\"description\":\"Root\",\"slug\":\"root\",\"url_path\":\"\",\"meta_title\":\"\",\"meta_description\":\"\",\"meta_keywords\":\"\",\"translations\":[{\"id\":1,\"name\":\"Root\",\"slug\":\"root\",\"description\":\"Root\",\"meta_title\":\"\",\"meta_description\":\"\",\"meta_keywords\":\"\",\"category_id\":1,\"locale\":\"en\",\"locale_id\":null,\"url_path\":\"\"}]}", - "logoUrl": null, - "faviconUrl": null - } - ], - "customerGroups": [ - { - "id": "1", - "name": "Guest", - "code": "guest", - "isUserDefined": false, - "createdAt": null, - "updatedAt": null - }, - { - "id": "2", - "name": "General", - "code": "general", - "isUserDefined": false, - "createdAt": null, - "updatedAt": null - }, - { - "id": "3", - "name": "Wholesale", - "code": "wholesale", - "isUserDefined": false, - "createdAt": null, - "updatedAt": null - }, - { - "id": "4", - "name": "VIP Customers", - "code": "vip", - "isUserDefined": false, - "createdAt": "2021-05-26 16:32:06", - "updatedAt": "2021-05-26 16:33:57" - } - ], - "catalogRuleProducts": [], - "catalogRuleProductPrices": [] - } - ] - } - } -} -~~~ -::: - -### 2. Get Catalog Rule By ID - -To get the specific Catalog Rule, you have to pass an `id` field with query request .By using this resource and request payload, you will get only a single object under the `data` object in response. - -- Headers - - | Key | Value | - | ------------- | --------------------- | - | Accept | application/json | - | Authorization | Bearer `token-string` | - -### Examples - -Let's take an example, - -- Request Query - ~~~Query - query catalogRule { - catalogRule(id: 1) { - id - name - description - startsFrom - endsTill - status - conditionType - conditions - endOtherRules - actionType - discountAmount - sortOrder - createdAt - updatedAt - channels { - id - code - name - description - theme - homePageContent - footerContent - hostname - defaultLocaleId - baseCurrencyId - rootCategoryId - homeSeo - locales { - id - name - code - direction - } - defaultLocale - currencies { - id - name - code - symbol - } - inventorySources { - id - code - name - description - contactName - contactEmail - contactNumber - contactFax - country - state - city - street - postcode - priority - latitude - longitude - status - } - baseCurrency - rootCategory - logoUrl - faviconUrl - } - customerGroups { - id - name - code - isUserDefined - createdAt - updatedAt - } - catalogRuleProducts { - id - startsFrom - endsTill - discountAmount - actionType - endOtherRules - sortOrder - catalogRuleId - channelId - customerGroupId - productId - product { - id - type - attributeFamilyId - sku - parentId - variants { - id - type - attributeFamilyId - sku - parentId - } - } - } - catalogRuleProductPrices { - id - price - ruleDate - startsFrom - endsTill - productId - catalogRuleId - channelId - customerGroupId - } - } - } - ~~~ - -::: details Response - ~~~json - { - "data": { - "catalogRule": { - "id": "1", - "name": "test rule", - "description": "test rule", - "startsFrom": "2021-05-25", - "endsTill": "2021-05-27", - "status": true, - "conditionType": true, - "conditions": "null", - "endOtherRules": true, - "actionType": "by_percent", - "discountAmount": 10, - "sortOrder": 1, - "createdAt": "2021-05-26 17:28:54", - "updatedAt": "2021-05-26 17:28:54", - "channels": [ - { - "id": "1", - "code": "default", - "name": "Default", - "description": null, - "theme": "velocity", - "homePageContent": "\n

@include(\"shop::home.slider\") @include(\"shop::home.featured-products\") @include(\"shop::home.new-products\")

\n
\n
\n \"test\"\n
\n
\n \"test\"\n \"test\"\n
\n
\n ", - "footerContent": "\n \n
\n Connect With Us\n \n
\n ", - "hostname": "http://localhost/graphql/public", - "defaultLocaleId": 1, - "baseCurrencyId": 1, - "rootCategoryId": 1, - "homeSeo": "{\"meta_title\": \"Demo store\", \"meta_keywords\": \"Demo store meta keyword\", \"meta_description\": \"Demo store meta description\"}", - "locales": [ - { - "id": "1", - "name": "English", - "code": "en", - "direction": "ltr" - } - ], - "defaultLocale": "{\"id\":1,\"code\":\"en\",\"name\":\"English\",\"created_at\":null,\"updated_at\":null,\"direction\":\"ltr\",\"locale_image\":null}", - "currencies": [ - { - "id": "1", - "name": "US Dollar", - "code": "USD", - "symbol": "$" - } - ], - "inventorySources": [ - { - "id": "1", - "code": "default", - "name": "Default", - "description": null, - "contactName": "Detroit Warehouse", - "contactEmail": "warehouse@example.com", - "contactNumber": "1234567899", - "contactFax": null, - "country": "US", - "state": "MI", - "city": "Detroit", - "street": "12th Street", - "postcode": "48127", - "priority": 0, - "latitude": null, - "longitude": null, - "status": true - } - ], - "baseCurrency": "{\"id\":1,\"code\":\"USD\",\"name\":\"US Dollar\",\"created_at\":null,\"updated_at\":null,\"symbol\":\"$\"}", - "rootCategory": "{\"id\":1,\"position\":1,\"image\":null,\"status\":1,\"_lft\":1,\"_rgt\":14,\"parent_id\":null,\"created_at\":\"2021-05-05T10:06:44.000000Z\",\"updated_at\":\"2021-05-05T10:06:44.000000Z\",\"display_mode\":\"products_and_description\",\"category_icon_path\":null,\"additional\":null,\"name\":\"Root\",\"description\":\"Root\",\"slug\":\"root\",\"url_path\":\"\",\"meta_title\":\"\",\"meta_description\":\"\",\"meta_keywords\":\"\",\"translations\":[{\"id\":1,\"name\":\"Root\",\"slug\":\"root\",\"description\":\"Root\",\"meta_title\":\"\",\"meta_description\":\"\",\"meta_keywords\":\"\",\"category_id\":1,\"locale\":\"en\",\"locale_id\":null,\"url_path\":\"\"}]}", - "logoUrl": null, - "faviconUrl": null - }, - { - "id": "2", - "code": "newca", - "name": "nerty", - "description": "ajsyg", - "theme": "gdg", - "homePageContent": "fhg", - "footerContent": "fh", - "hostname": "http://bag1.com", - "defaultLocaleId": 1, - "baseCurrencyId": 1, - "rootCategoryId": 1, - "homeSeo": "{\"meta_title\": \"gfyj\", \"meta_keywords\": \"gvgh\", \"meta_description\": \"gcg\"}", - "locales": [ - { - "id": "1", - "name": "English", - "code": "en", - "direction": "ltr" - } - ], - "defaultLocale": "{\"id\":1,\"code\":\"en\",\"name\":\"English\",\"created_at\":null,\"updated_at\":null,\"direction\":\"ltr\",\"locale_image\":null}", - "currencies": [ - { - "id": "1", - "name": "US Dollar", - "code": "USD", - "symbol": "$" - } - ], - "inventorySources": [ - { - "id": "1", - "code": "default", - "name": "Default", - "description": null, - "contactName": "Detroit Warehouse", - "contactEmail": "warehouse@example.com", - "contactNumber": "1234567899", - "contactFax": null, - "country": "US", - "state": "MI", - "city": "Detroit", - "street": "12th Street", - "postcode": "48127", - "priority": 0, - "latitude": null, - "longitude": null, - "status": true - } - ], - "baseCurrency": "{\"id\":1,\"code\":\"USD\",\"name\":\"US Dollar\",\"created_at\":null,\"updated_at\":null,\"symbol\":\"$\"}", - "rootCategory": "{\"id\":1,\"position\":1,\"image\":null,\"status\":1,\"_lft\":1,\"_rgt\":14,\"parent_id\":null,\"created_at\":\"2021-05-05T10:06:44.000000Z\",\"updated_at\":\"2021-05-05T10:06:44.000000Z\",\"display_mode\":\"products_and_description\",\"category_icon_path\":null,\"additional\":null,\"name\":\"Root\",\"description\":\"Root\",\"slug\":\"root\",\"url_path\":\"\",\"meta_title\":\"\",\"meta_description\":\"\",\"meta_keywords\":\"\",\"translations\":[{\"id\":1,\"name\":\"Root\",\"slug\":\"root\",\"description\":\"Root\",\"meta_title\":\"\",\"meta_description\":\"\",\"meta_keywords\":\"\",\"category_id\":1,\"locale\":\"en\",\"locale_id\":null,\"url_path\":\"\"}]}", - "logoUrl": null, - "faviconUrl": null - } - ], - "customerGroups": [ - { - "id": "1", - "name": "Guest", - "code": "guest", - "isUserDefined": false, - "createdAt": null, - "updatedAt": null - }, - { - "id": "2", - "name": "General", - "code": "general", - "isUserDefined": false, - "createdAt": null, - "updatedAt": null - }, - { - "id": "3", - "name": "Wholesale", - "code": "wholesale", - "isUserDefined": false, - "createdAt": null, - "updatedAt": null - }, - { - "id": "4", - "name": "VIP Customers", - "code": "vip", - "isUserDefined": false, - "createdAt": "2021-05-26 16:32:06", - "updatedAt": "2021-05-26 16:33:57" - } - ], - "catalogRuleProducts": [], - "catalogRuleProductPrices": [] - } - } - } - ~~~ -::: - -### 3. Get Filtered Catalog Rule - -You can get the filter data from the Catalog Rule by passing the input fileds in the request and that you want in the response. - -- Headers - - | Key | Value | - | ------------- | --------------------- | - | Accept | application/json | - | Authorization | Bearer `token-string` | - -**Note**: You can pass all the related fileds that you want in response. - -### Examples - -Let's take an example, - -- Request Query - -~~~query - query catalogRules { - catalogRules(input:{ - id:1 - name: "test rule" - start: "2021-05-25" - end: "2021-05-27" - status: true - priority:1 - }) { - paginatorInfo { - count - currentPage - lastPage - total - } - data { - id - name - description - startsFrom - endsTill - status - conditionType - conditions - endOtherRules - actionType - discountAmount - sortOrder - createdAt - updatedAt - catalogRuleProducts { - id - startsFrom - endsTill - discountAmount - actionType - endOtherRules - sortOrder - catalogRuleId - channelId - customerGroupId - productId - product { - id - type - attributeFamilyId - sku - parentId - variants { - id - type - attributeFamilyId - sku - parentId - } - } - } - catalogRuleProductPrices { - id - price - ruleDate - startsFrom - endsTill - productId - catalogRuleId - channelId - customerGroupId - } - } - } - } -~~~ - -::: details Response - ~~~json - { - "data": { - "catalogRules": { - "paginatorInfo": { - "count": 1, - "currentPage": 1, - "lastPage": 1, - "total": 1 - }, - "data": [ - { - "id": "1", - "name": "test rule", - "description": "test rule", - "startsFrom": "2021-05-25", - "endsTill": "2021-05-27", - "status": true, - "conditionType": true, - "conditions": "null", - "endOtherRules": true, - "actionType": "by_percent", - "discountAmount": 10, - "sortOrder": 1, - "createdAt": "2021-05-26 17:28:54", - "updatedAt": "2021-05-26 17:28:54", - "catalogRuleProducts": [ - { - "id": "1", - "startsFrom": "2021-05-25 00:00:01", - "endsTill": "2021-05-27 23:59:59", - "discountAmount": 10, - "actionType": "by_percent", - "endOtherRules": true, - "sortOrder": 1, - "catalogRuleId": "1", - "channelId": "1", - "customerGroupId": "2", - "productId": "1", - "product": { - "id": "1", - "type": "simple", - "attributeFamilyId": 1, - "sku": "test-product", - "parentId": null, - "variants": [] - } - } - ], - "catalogRuleProductPrices": [ - { - "id": "1", - "price": 4.5, - "ruleDate": "2021-05-26", - "startsFrom": "2021-05-25 00:00:01", - "endsTill": "2021-05-27 23:59:59", - "productId": "1", - "catalogRuleId": "1", - "channelId": "1", - "customerGroupId": "1" - }, - ] - } - ] - } - } - } - ~~~ -::: - -### 4. Get Catalog Rule Products - -You can get the Catalog Rule Products from the Bagisto store. You can achieve this job by using the `Catalog Rules` API call. - -- Headers - - | Key | Value | - | ------------- | ---------------- | - | Accept | application/json | - -- Single Request Endpoint - - `POST http(s)://example.com/graphql` - -::: tip - - If you are using pagination and want to know more info about responses then check the [explanation](./explanation) portion. - -::: - -**Note**: You can pass all the related fileds that you want in response. - -- Query - ~~~query - query catalogRuleProducts { - catalogRuleProducts(input: { - catalogRuleId: 1 - }) { - paginatorInfo { - count - currentPage - lastPage - total - } - data { - id - startsFrom - endsTill - discountAmount - actionType - endOtherRules - sortOrder - catalogRuleId - channelId - customerGroupId - productId - product { - id - type - attributeFamilyId - sku - parentId - variants { - id - type - attributeFamilyId - sku - parentId - } - } - } - } - } - ~~~ - -::: details Response - -~~~json -{ - "data": { - "catalogRuleProducts": { - "paginatorInfo": { - "count": 8, - "currentPage": 1, - "lastPage": 1, - "total": 8 - }, - "data": [ - { - "id": "1", - "startsFrom": "2021-05-25 00:00:01", - "endsTill": "2021-05-27 23:59:59", - "discountAmount": 10, - "actionType": "by_percent", - "endOtherRules": true, - "sortOrder": 1, - "catalogRuleId": "1", - "channelId": "1", - "customerGroupId": "2", - "productId": "1", - "product": { - "id": "1", - "type": "simple", - "attributeFamilyId": 1, - "sku": "test-product", - "parentId": null, - "variants": [] - } - } - ] - } - } -} -~~~ -::: - - - -### 5. Get Catalog Rule Product By Id - -You can get the Catalog Rule Products By Id from the Bagisto store. You can achieve this job by using the `Catalog Rule Product` API call. - -- Headers - - | Key | Value | - | ------------- | ---------------- | - | Accept | application/json | - -- Single Request Endpoint - - `POST http(s)://example.com/graphql` - -::: tip - - If you are using pagination and want to know more info about responses then check the [explanation](./explanation) portion. - -::: - -**Note**: You can pass all the related fileds that you want in response. - -- Query - ~~~query - query catalogRuleProduct { - catalogRuleProduct( - id: 1, - input: { - catalogRuleId: 1 - } - ) { - id - startsFrom - endsTill - discountAmount - actionType - endOtherRules - sortOrder - catalogRuleId - channelId - customerGroupId - productId - product { - id - type - attributeFamilyId - sku - parentId - variants { - id - type - attributeFamilyId - sku - parentId - } - } - } - } - ~~~ - -::: details Response - -~~~json -{ - "data": { - "catalogRuleProduct": { - "id": "1", - "startsFrom": "2021-05-25 00:00:01", - "endsTill": "2021-05-27 23:59:59", - "discountAmount": 10, - "actionType": "by_percent", - "endOtherRules": true, - "sortOrder": 1, - "catalogRuleId": "1", - "channelId": "1", - "customerGroupId": "2", - "productId": "1", - "product": { - "id": "1", - "type": "simple", - "attributeFamilyId": 1, - "sku": "test-product", - "parentId": null, - "variants": [] - } - } - } -} -~~~ -::: - -### 6. Get Catalog Rule Products Prices - -You can get the Catalog Rule Products Prices from the Bagisto store. You can achieve this job by using the `Catalog Rule Products Price` API call. - -- Headers - - | Key | Value | - | ------------- | ---------------- | - | Accept | application/json | - -- Single Request Endpoint - - `POST http(s)://example.com/graphql` - -::: tip - - If you are using pagination and want to know more info about responses then check the [explanation](./explanation) portion. - -::: - -**Note**: You can pass all the related fileds that you want in response. - -- Query - ~~~query - query catalogRuleProductPrices { - catalogRuleProductPrices(input: { - catalogRuleId: 1, - productId: 1, - customerGroupId: 1, - channelId: 1 - }) { - paginatorInfo { - count - currentPage - lastPage - total - } - data { - id - price - ruleDate - startsFrom - endsTill - productId - catalogRuleId - channelId - customerGroupId - } - } - } - ~~~ - -::: details Response - -~~~json -{ - "data": { - "catalogRuleProductPrices": { - "paginatorInfo": { - "count": 3, - "currentPage": 1, - "lastPage": 1, - "total": 3 - }, - "data": [ - { - "id": "1", - "price": 4.5, - "ruleDate": "2021-05-26", - "startsFrom": "2021-05-25 00:00:01", - "endsTill": "2021-05-27 23:59:59", - "productId": "1", - "catalogRuleId": "1", - "channelId": "1", - "customerGroupId": "1" - }, - { - "id": "2", - "price": 4.5, - "ruleDate": "2021-05-25", - "startsFrom": "2021-05-25 00:00:01", - "endsTill": "2021-05-27 23:59:59", - "productId": "1", - "catalogRuleId": "1", - "channelId": "1", - "customerGroupId": "1" - }, - { - "id": "3", - "price": 4.5, - "ruleDate": "2021-05-27", - "startsFrom": "2021-05-25 00:00:01", - "endsTill": "2021-05-27 23:59:59", - "productId": "1", - "catalogRuleId": "1", - "channelId": "1", - "customerGroupId": "1" - } - ] - } - } -} -~~~ -::: - - - -### 7. Get Catalog Rule Product Prices By Id - -You can get the Catalog Rule Product Prices By Id from the Bagisto store. You can achieve this job by using the `Catalog Rule Product Price` API call. - -- Headers - - | Key | Value | - | ------------- | ---------------- | - | Accept | application/json | - -- Single Request Endpoint - - `POST http(s)://example.com/graphql` - -::: tip - - If you are using pagination and want to know more info about responses then check the [explanation](./explanation) portion. - -::: - -**Note**: You can pass all the related fileds that you want in response. - -- Query - ~~~query - query catalogRuleProductPrice { - catalogRuleProductPrice( - id: 1, - input: { - catalogRuleId: 1, - productId: 1, - customerGroupId: 1, - channelId: 1 - } - ) { - id - price - ruleDate - startsFrom - endsTill - productId - catalogRuleId - channelId - customerGroupId - } - } - ~~~ - -::: details Response - -~~~json -{ - "data": { - "catalogRuleProductPrice": { - "id": "1", - "price": 4.5, - "ruleDate": "2021-05-26", - "startsFrom": "2021-05-25 00:00:01", - "endsTill": "2021-05-27 23:59:59", - "productId": "1", - "catalogRuleId": "1", - "channelId": "1", - "customerGroupId": "1" - } - } -} -~~~ -::: - -### 8. Create a new Catalog Rule - - To create a Catalog Rule, you have to perform mutation on Catalog Rule and paas the related fields in the request. - API call resource will create a new Catalog Rule, only if the admin has logged in. - - - Headers - - | Key | Value | - | ------------- | --------------------- | - | Accept | application/json | - | Authorization | Bearer `token-string` | - -**Note**: You can pass all the related fileds that you want in response. - -### Examples - - Let's take an example, - -- Request Mutation - ~~~Mutation - mutation createCatalogRule { - createCatalogRule(input: { - name: "test1" - status:true - description: "testetsetste" - channels:1 - customerGroups:1 - startsFrom: "2021-05-26 17:28:54" - endsTill: "2021-05-27 17:28:54" - conditionType: 1 - sortOrder:1 - actionType: "by_percent" - discountAmount: 10 - endOtherRules:false - }) { - id - name - description - startsFrom - endsTill - status - conditionType - conditions - endOtherRules - actionType - discountAmount - sortOrder - createdAt - updatedAt - } - } - ~~~ - -::: details Response - ~~~json - { - "data": { - "createCatalogRule": { - "id": "2", - "name": "test1", - "description": "testetsetste", - "startsFrom": "2021-05-26", - "endsTill": "2021-05-27", - "status": true, - "conditionType": true, - "conditions": "null", - "endOtherRules": false, - "actionType": "by_percent", - "discountAmount": 10, - "sortOrder": 1, - "createdAt": "2021-05-26 19:35:43", - "updatedAt": "2021-05-26 19:35:43" - } - } - } - ~~~ -::: - -### 9. Update Catalog Rule - -By using this API call you can update the Catalog Rule. To do this , you have to perform update mutation on Catalog Rule and paas the related fields in the request. -API call will update a Catalog Rule, only if the admin has logged in. - - - - Headers - - | Key | Value | - | ------------- | --------------------- | - | Accept | application/json | - | Authorization | Bearer `token-string` | - - ### Examples - - Let's take an example, - -- Request Mutation - ~~~Mutation - mutation updateCatalogRule { - updateCatalogRule(id: 2,input: { - name: "testupdated" - status:true - description: "testetsetste" - channels:1 - customerGroups:1 - startsFrom: "2021-05-26 17:28:54" - endsTill: "2021-05-27 17:28:54" - conditionType: 1 - sortOrder:1 - actionType: "by_percent" - discountAmount: 10 - endOtherRules:false - }) { - id - name - description - startsFrom - endsTill - status - conditionType - conditions - endOtherRules - actionType - discountAmount - sortOrder - createdAt - updatedAt - } - } - ~~~ - -::: details Response - ~~~json - { - "data": { - "updateCatalogRule": { - "id": "2", - "name": "test1", - "description": "testetsetste", - "startsFrom": "2021-05-26", - "endsTill": "2021-05-27", - "status": true, - "conditionType": true, - "conditions": "null", - "endOtherRules": false, - "actionType": "by_percent", - "discountAmount": 10, - "sortOrder": 1, - "createdAt": "2021-05-26 19:35:43", - "updatedAt": "2021-05-26 19:35:43" - } - } - } - ~~~ -::: - -### 10. Delete a Catalog Rule - -To delete a Catalog Rule, you have to perform mutation on Catalog Rule by passing the id of that Catalog Rule. -API call will delete a Catalog Rule, only if the admin has logged in. - -- Headers - - | Key | Value | - | ------------- | --------------------- | - | Accept | application/json | - | Authorization | Bearer `token-string` | - -### Examples - - Let's take an example, - -- Request Mutation - ~~~Mutation - mutation deleteCatalogRule { - deleteCatalogRule(id: 2) { - success - } - } - - ~~~ - -::: details Response - ~~~json - { - "data": { - "deleteCatalogRule": { - "success": "Catalog Rule deleted successfully." - } - } - } - ~~~ -::: - -## Cart Rules - -In this section, we will see all the APIs which are related to Catalog Rules. - -### 1. Get All Cart Rules - -You can get all the Cart Rules from the Bagisto store. You can achieve this job by using the `Cart Rules` API call. - -- Headers - - | Key | Value | - | ------------- | ---------------- | - | Accept | application/json | - -- Single Request Endpoint - - `POST http(s)://example.com/graphql` - -::: tip - - If you are using pagination and want to know more info about responses then check the [explanation](./explanation) portion. - -::: - -- Query - ~~~query - query cartRules { - cartRules { - paginatorInfo { - count - currentPage - lastPage - total - } - data { - id - name - description - startsFrom - endsTill - status - couponType - useAutoGeneration - usagePerCustomer - usesPerCoupon - timesUsed - conditionType - conditions - actions - endOtherRules - usesAttributeConditions - actionType - discountAmount - discountQuantity - discountStep - applyToShipping - freeShipping - sortOrder - createdAt - updatedAt - cartRuleChannels { - id - code - name - description - theme - homePageContent - footerContent - hostname - defaultLocaleId - baseCurrencyId - rootCategoryId - homeSeo - locales { - id - name - code - direction - } - defaultLocale - currencies { - id - name - code - symbol - } - inventorySources { - id - code - name - description - contactName - contactEmail - contactNumber - contactFax - country - state - city - street - postcode - priority - latitude - longitude - status - } - baseCurrency - rootCategory - logoUrl - faviconUrl - } - cartRuleCustomerGroups { - id - name - code - isUserDefined - createdAt - updatedAt - } - cartRuleCoupon { - id - code - usageLimit - usagePerCustomer - isPrimary - timesUsed - expiredAt - type - cartRuleId - createdAt - updatedAt - couponUsage { - id - timesUsed - cartRuleCouponId - } - } - } - } - } - ~~~ - -::: details Response - -~~~json -{ - "data": { - "cartRules": { - "paginatorInfo": { - "count": 1, - "currentPage": 1, - "lastPage": 1, - "total": 1 - }, - "data": [ - { - "id": "1", - "name": "test cartrule", - "description": "test cartrule", - "startsFrom": "2021-05-26 12:00:00", - "endsTill": "2021-05-27 12:00:00", - "status": true, - "couponType": 1, - "useAutoGeneration": false, - "usagePerCustomer": 2, - "usesPerCoupon": 2, - "timesUsed": 0, - "conditionType": "1", - "conditions": null, - "actions": null, - "endOtherRules": false, - "usesAttributeConditions": false, - "actionType": "by_percent", - "discountAmount": 10, - "discountQuantity": 1, - "discountStep": 1, - "applyToShipping": false, - "freeShipping": false, - "sortOrder": 1, - "createdAt": "2021-05-26 19:49:08", - "updatedAt": "2021-05-26 19:49:08", - "cartRuleChannels": [ - { - "id": "1", - "code": "default", - "name": "Default", - "description": null, - "theme": "velocity", - "homePageContent": "\n

@include(\"shop::home.slider\") @include(\"shop::home.featured-products\") @include(\"shop::home.new-products\")

\n
\n
\n \"test\"\n
\n
\n \"test\"\n \"test\"\n
\n
\n ", - "footerContent": "\n \n
\n Connect With Us\n \n
\n ", - "hostname": "http://localhost/graphql/public", - "defaultLocaleId": 1, - "baseCurrencyId": 1, - "rootCategoryId": 1, - "homeSeo": "{\"meta_title\": \"Demo store\", \"meta_keywords\": \"Demo store meta keyword\", \"meta_description\": \"Demo store meta description\"}", - "locales": [ - { - "id": "1", - "name": "English", - "code": "en", - "direction": "ltr" - } - ], - "defaultLocale": "{\"id\":1,\"code\":\"en\",\"name\":\"English\",\"created_at\":null,\"updated_at\":null,\"direction\":\"ltr\",\"locale_image\":null}", - "currencies": [ - { - "id": "1", - "name": "US Dollar", - "code": "USD", - "symbol": "$" - } - ], - "inventorySources": [ - { - "id": "1", - "code": "default", - "name": "Default", - "description": null, - "contactName": "Detroit Warehouse", - "contactEmail": "warehouse@example.com", - "contactNumber": "1234567899", - "contactFax": null, - "country": "US", - "state": "MI", - "city": "Detroit", - "street": "12th Street", - "postcode": "48127", - "priority": 0, - "latitude": null, - "longitude": null, - "status": true - } - ], - "baseCurrency": "{\"id\":1,\"code\":\"USD\",\"name\":\"US Dollar\",\"created_at\":null,\"updated_at\":null,\"symbol\":\"$\"}", - "rootCategory": "{\"id\":1,\"position\":1,\"image\":null,\"status\":1,\"_lft\":1,\"_rgt\":14,\"parent_id\":null,\"created_at\":\"2021-05-05T10:06:44.000000Z\",\"updated_at\":\"2021-05-05T10:06:44.000000Z\",\"display_mode\":\"products_and_description\",\"category_icon_path\":null,\"additional\":null,\"name\":\"Root\",\"description\":\"Root\",\"slug\":\"root\",\"url_path\":\"\",\"meta_title\":\"\",\"meta_description\":\"\",\"meta_keywords\":\"\",\"translations\":[{\"id\":1,\"name\":\"Root\",\"slug\":\"root\",\"description\":\"Root\",\"meta_title\":\"\",\"meta_description\":\"\",\"meta_keywords\":\"\",\"category_id\":1,\"locale\":\"en\",\"locale_id\":null,\"url_path\":\"\"}]}", - "logoUrl": null, - "faviconUrl": null - }, - { - "id": "2", - "code": "newca", - "name": "nerty", - "description": "ajsyg", - "theme": "gdg", - "homePageContent": "fhg", - "footerContent": "fh", - "hostname": "http://bag1.com", - "defaultLocaleId": 1, - "baseCurrencyId": 1, - "rootCategoryId": 1, - "homeSeo": "{\"meta_title\": \"gfyj\", \"meta_keywords\": \"gvgh\", \"meta_description\": \"gcg\"}", - "locales": [ - { - "id": "1", - "name": "English", - "code": "en", - "direction": "ltr" - } - ], - "defaultLocale": "{\"id\":1,\"code\":\"en\",\"name\":\"English\",\"created_at\":null,\"updated_at\":null,\"direction\":\"ltr\",\"locale_image\":null}", - "currencies": [ - { - "id": "1", - "name": "US Dollar", - "code": "USD", - "symbol": "$" - } - ], - "inventorySources": [ - { - "id": "1", - "code": "default", - "name": "Default", - "description": null, - "contactName": "Detroit Warehouse", - "contactEmail": "warehouse@example.com", - "contactNumber": "1234567899", - "contactFax": null, - "country": "US", - "state": "MI", - "city": "Detroit", - "street": "12th Street", - "postcode": "48127", - "priority": 0, - "latitude": null, - "longitude": null, - "status": true - } - ], - "baseCurrency": "{\"id\":1,\"code\":\"USD\",\"name\":\"US Dollar\",\"created_at\":null,\"updated_at\":null,\"symbol\":\"$\"}", - "rootCategory": "{\"id\":1,\"position\":1,\"image\":null,\"status\":1,\"_lft\":1,\"_rgt\":14,\"parent_id\":null,\"created_at\":\"2021-05-05T10:06:44.000000Z\",\"updated_at\":\"2021-05-05T10:06:44.000000Z\",\"display_mode\":\"products_and_description\",\"category_icon_path\":null,\"additional\":null,\"name\":\"Root\",\"description\":\"Root\",\"slug\":\"root\",\"url_path\":\"\",\"meta_title\":\"\",\"meta_description\":\"\",\"meta_keywords\":\"\",\"translations\":[{\"id\":1,\"name\":\"Root\",\"slug\":\"root\",\"description\":\"Root\",\"meta_title\":\"\",\"meta_description\":\"\",\"meta_keywords\":\"\",\"category_id\":1,\"locale\":\"en\",\"locale_id\":null,\"url_path\":\"\"}]}", - "logoUrl": null, - "faviconUrl": null - } - ], - "cartRuleCustomerGroups": [ - { - "id": "2", - "name": "General", - "code": "general", - "isUserDefined": false, - "createdAt": null, - "updatedAt": null - } - ], - "cartRuleCoupon": { - "id": "1", - "code": "TEST", - "usageLimit": 2, - "usagePerCustomer": 2, - "isPrimary": true, - "timesUsed": 0, - "expiredAt": "2021-05-27", - "type": 0, - "cartRuleId": "1", - "createdAt": "2021-05-26 19:49:09", - "updatedAt": "2021-05-26 19:49:09", - "couponUsage": [] - } - } - ] - } - } -} -~~~ -::: - -### 2. Get Cart Rule By ID - -To get the specific Cart Rule, you have to pass an `id` field with query request .By using this resource and request payload, you will get only a single object under the `data` object in response. - -- Headers - - | Key | Value | - | ------------- | --------------------- | - | Accept | application/json | - | Authorization | Bearer `token-string` | - -**Note**: You can pass all the related fileds that you want in response. - -### Examples - -Let's take an example, - -- Request Query - ~~~Query - query cartRule { - cartRule(id: 1) { - id - name - description - startsFrom - endsTill - status - couponType - useAutoGeneration - usagePerCustomer - usesPerCoupon - timesUsed - conditionType - conditions - actions - endOtherRules - usesAttributeConditions - actionType - discountAmount - discountQuantity - discountStep - applyToShipping - freeShipping - sortOrder - createdAt - updatedAt - cartRuleChannels { - id - code - name - description - theme - homePageContent - footerContent - hostname - defaultLocaleId - baseCurrencyId - rootCategoryId - homeSeo - } - } - } - ~~~ - -::: details Response - ~~~json - { - "data": { - "cartRule": { - "id": "1", - "name": "test cartrule", - "description": "test cartrule", - "startsFrom": "2021-05-26 12:00:00", - "endsTill": "2021-05-27 12:00:00", - "status": true, - "couponType": 1, - "useAutoGeneration": false, - "usagePerCustomer": 2, - "usesPerCoupon": 2, - "timesUsed": 0, - "conditionType": "1", - "conditions": null, - "actions": null, - "endOtherRules": false, - "usesAttributeConditions": false, - "actionType": "by_percent", - "discountAmount": 10, - "discountQuantity": 1, - "discountStep": 1, - "applyToShipping": false, - "freeShipping": false, - "sortOrder": 1, - "createdAt": "2021-05-26 19:49:08", - "updatedAt": "2021-05-26 19:49:08", - "cartRuleChannels": [ - { - "id": "1", - "code": "default", - "name": "Default", - "description": null, - "theme": "velocity", - "footerContent": "\n \n
\n Connect With Us\n \n
\n ", - "hostname": "http://localhost/graphql/public", - "defaultLocaleId": 1, - "baseCurrencyId": 1, - "rootCategoryId": 1, - "homeSeo": "{\"meta_title\": \"Demo store\", \"meta_keywords\": \"Demo store meta keyword\", \"meta_description\": \"Demo store meta description\"}" - }, - { - "id": "2", - "code": "newca", - "name": "nerty", - "description": "ajsyg", - "theme": "gdg", - "footerContent": "fh", - "hostname": "http://bag1.com", - "defaultLocaleId": 1, - "baseCurrencyId": 1, - "rootCategoryId": 1, - "homeSeo": "{\"meta_title\": \"gfyj\", \"meta_keywords\": \"gvgh\", \"meta_description\": \"gcg\"}" - } - ] - } - } - } - ~~~ -::: - -### 3. Get Filtered Cart Rule - -You can get the filter data from the Cart Rule by passing the input fileds in the request and that you want in the response. - -- Headers - - | Key | Value | - | ------------- | --------------------- | - | Accept | application/json | - | Authorization | Bearer `token-string` | - -**Note**: You can pass all the related fileds that you want in response. - -### Examples - -Let's take an example, - -- Request Query - -~~~query - query cartRules { - cartRules(input: { - id:1 - name: "test cartrule" - }, page: 1) { - paginatorInfo { - count - currentPage - lastPage - total - } - data { - id - name - description - startsFrom - endsTill - status - couponType - useAutoGeneration - usagePerCustomer - usesPerCoupon - timesUsed - conditionType - conditions - actions - endOtherRules - usesAttributeConditions - actionType - discountAmount - discountQuantity - discountStep - applyToShipping - freeShipping - sortOrder - createdAt - updatedAt - } - } - } -~~~ - -::: details Response - ~~~json - { - "data": { - "cartRules": { - "paginatorInfo": { - "count": 1, - "currentPage": 1, - "lastPage": 1, - "total": 1 - }, - "data": [ - { - "id": "1", - "name": "test cartrule", - "description": "test cartrule", - "startsFrom": "2021-05-26 12:00:00", - "endsTill": "2021-05-27 12:00:00", - "status": true, - "couponType": 1, - "useAutoGeneration": false, - "usagePerCustomer": 2, - "usesPerCoupon": 2, - "timesUsed": 0, - "conditionType": "1", - "conditions": null, - "actions": null, - "endOtherRules": false, - "usesAttributeConditions": false, - "actionType": "by_percent", - "discountAmount": 10, - "discountQuantity": 1, - "discountStep": 1, - "applyToShipping": false, - "freeShipping": false, - "sortOrder": 1, - "createdAt": "2021-05-26 19:49:08", - "updatedAt": "2021-05-26 19:49:08" - } - ] - } - } - } - ~~~ -::: - - -### 8. Create a new Cart Rule - - To create a Cart Rule, you have to perform mutation on Cart Rule and paas the related fields in the request. - API call resource will create a new Cart Rule, only if the admin has logged in. - - - Headers - - | Key | Value | - | ------------- | --------------------- | - | Accept | application/json | - | Authorization | Bearer `token-string` | - -**Note**: You can pass all the related fileds that you want in response. - -### Examples - - Let's take an example, - -- Request Mutation - ~~~Mutation - mutation createCartRule { - createCartRule(input: { - name: "cartrule1" - description: "cartrule1" - channels:1 - customerGroups:1 - startsFrom: "2021-05-26 19:49:08" - endsTill: "2021-05-27 19:49:08" - status: true - couponType: 1 - useAutoGeneration:true - usagePerCustomer:1 - usesPerCoupon:1 - timesUsed:1 - conditionType:false - endOtherRules:false - usesAttributeConditions: false - actionType: "by_percent" - discountAmount: 10 - discountQuantity: 1 - discountStep: 1 - applyToShipping:false - freeShipping: true - sortOrder:1 - couponCode: "CARTTEsT" - }) { - id - name - description - startsFrom - endsTill - status - couponType - useAutoGeneration - usagePerCustomer - usesPerCoupon - timesUsed - conditionType - conditions - actions - endOtherRules - usesAttributeConditions - actionType - discountAmount - discountQuantity - discountStep - applyToShipping - freeShipping - sortOrder - createdAt - updatedAt - } - } - ~~~ - -::: details Response - ~~~json - { - "data": { - "createCartRule": { - "id": "2", - "name": "cartrule1", - "description": "cartrule1", - "startsFrom": "2021-05-26 19:49:08", - "endsTill": "2021-05-27 19:49:08", - "status": true, - "couponType": 1, - "useAutoGeneration": true, - "usagePerCustomer": 1, - "usesPerCoupon": 1, - "timesUsed": 1, - "conditionType": "", - "conditions": null, - "actions": null, - "endOtherRules": false, - "usesAttributeConditions": false, - "actionType": "by_percent", - "discountAmount": 10, - "discountQuantity": 1, - "discountStep": 1, - "applyToShipping": false, - "freeShipping": true, - "sortOrder": 1, - "createdAt": "2021-05-26 20:09:03", - "updatedAt": "2021-05-26 20:09:03" - } - } - } - ~~~ -::: - -### 9. Update Cart Rule - -By using this API call you can update the Cart Rule. To do this , you have to perform update mutation on Cart Rule and paas the related fields in the request. -API call will update a Cart Rule, only if the admin has logged in. - - - - Headers - - | Key | Value | - | ------------- | --------------------- | - | Accept | application/json | - | Authorization | Bearer `token-string` | - - ### Examples - - Let's take an example, - -- Request Mutation - ~~~Mutation - mutation updateCartRule { - updateCartRule(id: 2,input: { - name: "cartrule1upadted" - description: "cartrule1upadted" - channels:1 - customerGroups:1 - startsFrom: "2021-05-26 19:49:08" - endsTill: "2021-05-27 19:49:08" - status: true - couponType: 1 - useAutoGeneration:true - usagePerCustomer:1 - usesPerCoupon:1 - timesUsed:1 - conditionType:false - endOtherRules:false - usesAttributeConditions: false - actionType: "by_percent" - discountAmount: 10 - discountQuantity: 1 - discountStep: 1 - applyToShipping:false - freeShipping: true - sortOrder:1 - couponCode: "CARTTEsT" - }) { - id - name - description - startsFrom - endsTill - status - couponType - useAutoGeneration - usagePerCustomer - usesPerCoupon - timesUsed - conditionType - conditions - actions - endOtherRules - usesAttributeConditions - actionType - discountAmount - discountQuantity - discountStep - applyToShipping - freeShipping - sortOrder - createdAt - updatedAt - } - } - ~~~ - -::: details Response - ~~~json - { - "data": { - "updateCartRule": { - "id": "2", - "name": "cartrule1", - "description": "cartrule1", - "startsFrom": "2021-05-26 19:49:08", - "endsTill": "2021-05-27 19:49:08", - "status": true, - "couponType": 1, - "useAutoGeneration": true, - "usagePerCustomer": 1, - "usesPerCoupon": 1, - "timesUsed": 1, - "conditionType": "0", - "conditions": null, - "actions": null, - "endOtherRules": false, - "usesAttributeConditions": false, - "actionType": "by_percent", - "discountAmount": 10, - "discountQuantity": 1, - "discountStep": 1, - "applyToShipping": false, - "freeShipping": true, - "sortOrder": 1, - "createdAt": "2021-05-26 20:09:03", - "updatedAt": "2021-05-26 20:09:03" - } - } - } - ~~~ -::: - -### 10. Delete a Cart Rule - -To delete a Cart Rule, you have to perform mutation on Cart Rule by passing the id of that Cart Rule. -API call will delete a Cart Rule, only if the admin has logged in. - -- Headers - - | Key | Value | - | ------------- | --------------------- | - | Accept | application/json | - | Authorization | Bearer `token-string` | - -### Examples - - Let's take an example, - -- Request Mutation - ~~~Mutation - mutation deleteCartRule { - deleteCartRule(id: 2) { - success - } - } - ~~~ - -::: details Response - ~~~json - { - "data": { - "deleteCartRule": { - "success": "Cart Rule deleted successfully." - } - } - } - ~~~ -::: \ No newline at end of file diff --git a/docs/1.x/graphql-admin-api/sales.md b/docs/1.x/graphql-admin-api/sales.md deleted file mode 100644 index 6619d16b..00000000 --- a/docs/1.x/graphql-admin-api/sales.md +++ /dev/null @@ -1,1771 +0,0 @@ -# Orders - -In this section, we will see all the APIs which are related to Orders. - -## Get All Orders - -You can get all the Orders from the Bagisto store. You can achieve this job by using the `Orders` API call. - -- Headers - - | Key | Value | - | ------------- | ---------------- | - | Accept | application/json | - -- Single Request Endpoint - - `POST http(s)://example.com/graphql` - -::: tip - - If you are using pagination and want to know more info about responses then check the [explanation](./explanation) portion. - -::: - -**Note**: You can pass all the related fileds that you want in response. - -- Query - ~~~query - query orders { - orders(page:1){ - paginatorInfo { - count - currentPage - lastPage - total - } - data{ - id - incrementId - status - channelName - isGuest - customerEmail - customerFirstName - customerLastName - customerCompanyName - customerVatId - shippingMethod - shippingTitle - shippingDescription - couponCode - isGift - totalItemCount - totalQtyOrdered - baseCurrencyCode - channelCurrencyCode - orderCurrencyCode - grandTotal - baseGrandTotal - grandTotalInvoiced - baseGrandTotalInvoiced - grandTotalRefunded - baseGrandTotalRefunded - subTotal - baseSubTotal - subTotalInvoiced - baseSubTotalInvoiced - subTotalRefunded - baseSubTotalRefunded - discountPercent - discountAmount - baseDiscountAmount - discountInvoiced - baseDiscountInvoiced - discountRefunded - baseDiscountRefunded - taxAmount - baseTaxAmount - taxAmountInvoiced - baseTaxAmountInvoiced - taxAmountRefunded - baseTaxAmountRefunded - shippingAmount - baseShippingAmount - shippingInvoiced - baseShippingInvoiced - shippingRefunded - baseShippingRefunded - customerId - customerType - channelId - channelType - cartId - appliedCartRuleIds - shippingDiscountAmount - baseShippingDiscountAmount - createdAt - updatedAt - billingAddress{id} - shippingAddress{id} - refunds{ - id - incrementId - state - emailSent - totalQty - } - addresses{ - id - } - items{ - id - } - comments{ - id - } - shipments{ - id - status - totalQty - totalWeight - carrierCode - carrierTitle - } - invoices{ - id - incrementId - state - } - customer{ - id - } - payment{ - id - } - channel{ - id - } - cart{ - id - } - success - } - } - } - ~~~ - -::: details Response - -~~~json -{ - "data": { - "orders": { - "paginatorInfo": { - "count": 1, - "currentPage": 1, - "lastPage": 1, - "total": 1 - }, - "data": [ - { - "id": 1, - "incrementId": "1", - "status": "pending", - "channelName": "Default", - "isGuest": 1, - "customerEmail": "naresh.verma3271@webkul.com", - "customerFirstName": "Naresh", - "customerLastName": "Verma", - "customerCompanyName": null, - "customerVatId": null, - "shippingMethod": "flatrate_flatrate", - "shippingTitle": "Flat Rate - Flat Rate", - "shippingDescription": "Flat Rate Shipping", - "couponCode": null, - "isGift": 0, - "totalItemCount": 1, - "totalQtyOrdered": 1, - "baseCurrencyCode": "USD", - "channelCurrencyCode": "USD", - "orderCurrencyCode": "USD", - "grandTotal": 14.5, - "baseGrandTotal": 14.5, - "grandTotalInvoiced": 0, - "baseGrandTotalInvoiced": 0, - "grandTotalRefunded": 0, - "baseGrandTotalRefunded": 0, - "subTotal": 4.5, - "baseSubTotal": 4.5, - "subTotalInvoiced": 0, - "baseSubTotalInvoiced": 0, - "subTotalRefunded": 0, - "baseSubTotalRefunded": 0, - "discountPercent": 0, - "discountAmount": 0, - "baseDiscountAmount": 0, - "discountInvoiced": 0, - "baseDiscountInvoiced": 0, - "discountRefunded": 0, - "baseDiscountRefunded": 0, - "taxAmount": 0, - "baseTaxAmount": 0, - "taxAmountInvoiced": 0, - "baseTaxAmountInvoiced": 0, - "taxAmountRefunded": 0, - "baseTaxAmountRefunded": 0, - "shippingAmount": 10, - "baseShippingAmount": 10, - "shippingInvoiced": 0, - "baseShippingInvoiced": 0, - "shippingRefunded": 0, - "baseShippingRefunded": 0, - "customerId": null, - "customerType": null, - "channelId": 1, - "channelType": "Webkul\\Core\\Models\\Channel", - "cartId": "1", - "appliedCartRuleIds": "", - "shippingDiscountAmount": 0, - "baseShippingDiscountAmount": 0, - "createdAt": "2021-05-27 19:45:28", - "updatedAt": "2021-05-27 19:45:28", - "billingAddress": { - "id": 6 - }, - "shippingAddress": { - "id": 5 - }, - "refunds": [], - "addresses": [ - { - "id": 5 - }, - { - "id": 6 - } - ], - "items": [ - { - "id": "1" - } - ], - "comments": [], - "shipments": [], - "invoices": [], - "customer": null, - "payment": { - "id": "1" - }, - "channel": { - "id": "1" - }, - "cart": { - "id": "1" - }, - "success": null - } - ] - } - } -} -~~~ -::: - -## Get Order By ID - -To get the specific Order, you have to pass an `id` field with query request .By using this resource and request payload, you will get only a single object under the `data` object in response. - -- Headers - - | Key | Value | - | ------------- | --------------------- | - | Accept | application/json | - | Authorization | Bearer `token-string` | - -### Examples - -Let's take an example, - -- Request Query - ~~~Query - query order { - order(id:1){ - id - incrementId - status - channelName - isGuest - customerEmail - customerFirstName - customerLastName - customerCompanyName - customerVatId - shippingMethod - shippingTitle - shippingDescription - couponCode - isGift - totalItemCount - totalQtyOrdered - baseCurrencyCode - channelCurrencyCode - orderCurrencyCode - grandTotal - baseGrandTotal - grandTotalInvoiced - baseGrandTotalInvoiced - grandTotalRefunded - baseGrandTotalRefunded - subTotal - baseSubTotal - subTotalInvoiced - baseSubTotalInvoiced - subTotalRefunded - baseSubTotalRefunded - discountPercent - discountAmount - baseDiscountAmount - discountInvoiced - baseDiscountInvoiced - discountRefunded - baseDiscountRefunded - taxAmount - baseTaxAmount - taxAmountInvoiced - baseTaxAmountInvoiced - taxAmountRefunded - baseTaxAmountRefunded - shippingAmount - baseShippingAmount - shippingInvoiced - baseShippingInvoiced - shippingRefunded - baseShippingRefunded - customerId - customerType - channelId - channelType - cartId - appliedCartRuleIds - shippingDiscountAmount - baseShippingDiscountAmount - createdAt - updatedAt - billingAddress{id} - shippingAddress{id} - refunds{ - id - incrementId - state - emailSent - totalQty - } - addresses{ - id - } - items{ - id - } - comments{ - id - } - shipments{ - id - status - totalQty - totalWeight - carrierCode - carrierTitle - } - invoices{ - id - incrementId - state - } - customer{ - id - } - payment{ - id - } - channel{ - id - } - cart{ - id - } - success - } - } - ~~~ - -::: details Response - ~~~json - { - "data": { - "order": { - "id": 1, - "incrementId": "1", - "status": "pending", - "channelName": "Default", - "isGuest": 1, - "customerEmail": "naresh.verma3271@webkul.com", - "customerFirstName": "Naresh", - "customerLastName": "Verma", - "customerCompanyName": null, - "customerVatId": null, - "shippingMethod": "flatrate_flatrate", - "shippingTitle": "Flat Rate - Flat Rate", - "shippingDescription": "Flat Rate Shipping", - "couponCode": null, - "isGift": 0, - "totalItemCount": 1, - "totalQtyOrdered": 1, - "baseCurrencyCode": "USD", - "channelCurrencyCode": "USD", - "orderCurrencyCode": "USD", - "grandTotal": 14.5, - "baseGrandTotal": 14.5, - "grandTotalInvoiced": 0, - "baseGrandTotalInvoiced": 0, - "grandTotalRefunded": 0, - "baseGrandTotalRefunded": 0, - "subTotal": 4.5, - "baseSubTotal": 4.5, - "subTotalInvoiced": 0, - "baseSubTotalInvoiced": 0, - "subTotalRefunded": 0, - "baseSubTotalRefunded": 0, - "discountPercent": 0, - "discountAmount": 0, - "baseDiscountAmount": 0, - "discountInvoiced": 0, - "baseDiscountInvoiced": 0, - "discountRefunded": 0, - "baseDiscountRefunded": 0, - "taxAmount": 0, - "baseTaxAmount": 0, - "taxAmountInvoiced": 0, - "baseTaxAmountInvoiced": 0, - "taxAmountRefunded": 0, - "baseTaxAmountRefunded": 0, - "shippingAmount": 10, - "baseShippingAmount": 10, - "shippingInvoiced": 0, - "baseShippingInvoiced": 0, - "shippingRefunded": 0, - "baseShippingRefunded": 0, - "customerId": null, - "customerType": null, - "channelId": 1, - "channelType": "Webkul\\Core\\Models\\Channel", - "cartId": "1", - "appliedCartRuleIds": "", - "shippingDiscountAmount": 0, - "baseShippingDiscountAmount": 0, - "createdAt": "2021-05-27 19:45:28", - "updatedAt": "2021-05-27 19:45:28", - "billingAddress": { - "id": 6 - }, - "shippingAddress": { - "id": 5 - }, - "refunds": [], - "addresses": [ - { - "id": 5 - }, - { - "id": 6 - } - ], - "items": [ - { - "id": "1" - } - ], - "comments": [], - "shipments": [], - "invoices": [], - "customer": null, - "payment": { - "id": "1" - }, - "channel": { - "id": "1" - }, - "cart": { - "id": "1" - }, - "success": null - } - } - } - ~~~ - -::: - -## Get Filtered Orders - -You can get the filter data from the Orders by passing the input fileds in the request and that you want in the response. - -- Headers - - | Key | Value | - | ------------- | --------------------- | - | Accept | application/json | - | Authorization | Bearer `token-string` | - -**Note**: You can pass all the related fileds that you want in response for Filter Data. - -### Examples - -Let's take an example, - -- Request Query - -~~~query - query orders { - orders(page:1, input: { - status: "pending" - }){ - paginatorInfo { - count - currentPage - lastPage - total - } - data{ - id - incrementId - status - channelName - isGuest - customerEmail - customerFirstName - customerLastName - customerCompanyName - customerVatId - shippingMethod - shippingTitle - shippingDescription - couponCode - isGift - totalItemCount - totalQtyOrdered - baseCurrencyCode - channelCurrencyCode - orderCurrencyCode - grandTotal - baseGrandTotal - grandTotalInvoiced - baseGrandTotalInvoiced - grandTotalRefunded - baseGrandTotalRefunded - subTotal - baseSubTotal - subTotalInvoiced - baseSubTotalInvoiced - subTotalRefunded - baseSubTotalRefunded - discountPercent - discountAmount - baseDiscountAmount - discountInvoiced - baseDiscountInvoiced - discountRefunded - baseDiscountRefunded - taxAmount - baseTaxAmount - taxAmountInvoiced - baseTaxAmountInvoiced - taxAmountRefunded - baseTaxAmountRefunded - shippingAmount - baseShippingAmount - shippingInvoiced - baseShippingInvoiced - shippingRefunded - baseShippingRefunded - customerId - customerType - channelId - channelType - cartId - appliedCartRuleIds - shippingDiscountAmount - baseShippingDiscountAmount - createdAt - updatedAt - billingAddress{id} - shippingAddress{id} - refunds{ - id - incrementId - state - emailSent - totalQty - } - addresses{ - id - } - items{ - id - } - comments{ - id - } - shipments{ - id - status - totalQty - totalWeight - carrierCode - carrierTitle - } - invoices{ - id - incrementId - state - } - customer{ - id - } - payment{ - id - } - channel{ - id - } - cart{ - id - } - success - } - } - } -~~~ - -::: details Response - ~~~json - { - "data": { - "orders": { - "paginatorInfo": { - "count": 1, - "currentPage": 1, - "lastPage": 1, - "total": 1 - }, - "data": [ - { - "id": 1, - "incrementId": "1", - "status": "pending", - "channelName": "Default", - "isGuest": 1, - "customerEmail": "naresh.verma3271@webkul.com", - "customerFirstName": "Naresh", - "customerLastName": "Verma", - "customerCompanyName": null, - "customerVatId": null, - "shippingMethod": "flatrate_flatrate", - "shippingTitle": "Flat Rate - Flat Rate", - "shippingDescription": "Flat Rate Shipping", - "couponCode": null, - "isGift": 0, - "totalItemCount": 1, - "totalQtyOrdered": 1, - "baseCurrencyCode": "USD", - "channelCurrencyCode": "USD", - "orderCurrencyCode": "USD", - "grandTotal": 14.5, - "baseGrandTotal": 14.5, - "grandTotalInvoiced": 0, - "baseGrandTotalInvoiced": 0, - "grandTotalRefunded": 0, - "baseGrandTotalRefunded": 0, - "subTotal": 4.5, - "baseSubTotal": 4.5, - "subTotalInvoiced": 0, - "baseSubTotalInvoiced": 0, - "subTotalRefunded": 0, - "baseSubTotalRefunded": 0, - "discountPercent": 0, - "discountAmount": 0, - "baseDiscountAmount": 0, - "discountInvoiced": 0, - "baseDiscountInvoiced": 0, - "discountRefunded": 0, - "baseDiscountRefunded": 0, - "taxAmount": 0, - "baseTaxAmount": 0, - "taxAmountInvoiced": 0, - "baseTaxAmountInvoiced": 0, - "taxAmountRefunded": 0, - "baseTaxAmountRefunded": 0, - "shippingAmount": 10, - "baseShippingAmount": 10, - "shippingInvoiced": 0, - "baseShippingInvoiced": 0, - "shippingRefunded": 0, - "baseShippingRefunded": 0, - "customerId": null, - "customerType": null, - "channelId": 1, - "channelType": "Webkul\\Core\\Models\\Channel", - "cartId": "1", - "appliedCartRuleIds": "", - "shippingDiscountAmount": 0, - "baseShippingDiscountAmount": 0, - "createdAt": "2021-05-27 19:45:28", - "updatedAt": "2021-05-27 19:45:28", - "billingAddress": { - "id": 6 - }, - "shippingAddress": { - "id": 5 - }, - "refunds": [], - "addresses": [ - { - "id": 5 - }, - { - "id": 6 - } - ], - "items": [ - { - "id": "1" - } - ], - "comments": [], - "shipments": [], - "invoices": [], - "customer": null, - "payment": { - "id": "1" - }, - "channel": { - "id": "1" - }, - "cart": { - "id": "1" - }, - "success": null - } - ] - } - } - } - ~~~ -::: - - -## Get All Invoices - -You can get all the Invoices from the Bagisto store. You can achieve this job by using the `Invoices` API call. - -- Headers - - | Key | Value | - | ------------- | ---------------- | - | Accept | application/json | - -- Single Request Endpoint - - `POST http(s)://example.com/graphql` - -::: tip - - If you are using pagination and want to know more info about responses then check the [explanation](./explanation) portion. - -::: - -**Note**: You can pass all the related fileds that you want in response. - -- Query - ~~~query - query invoices{ - invoices(page:1){ - paginatorInfo { - count - currentPage - lastPage - total - } - data{ - id - incrementId - state - emailSent - totalQty - baseCurrencyCode - channelCurrencyCode - orderCurrencyCode - subTotal - baseSubTotal - grandTotal - baseGrandTotal - shippingAmount - baseShippingAmount - taxAmount - baseTaxAmount - discountAmount - baseDiscountAmount - orderId - orderAddressId - createdAt - updatedAt - transactionId - items{ - id - sku - } - order{ - id - - } - } - } - } - ~~~ - -::: details Response - -~~~json -{ - "data": { - "invoices": { - "paginatorInfo": { - "count": 1, - "currentPage": 1, - "lastPage": 1, - "total": 1 - }, - "data": [ - { - "id": 1, - "incrementId": null, - "state": "paid", - "emailSent": 0, - "totalQty": 1, - "baseCurrencyCode": "USD", - "channelCurrencyCode": "USD", - "orderCurrencyCode": "USD", - "subTotal": 4.5, - "baseSubTotal": 4.5, - "grandTotal": 14.5, - "baseGrandTotal": 14.5, - "shippingAmount": 10, - "baseShippingAmount": 10, - "taxAmount": 0, - "baseTaxAmount": 0, - "discountAmount": 0, - "baseDiscountAmount": 0, - "orderId": 1, - "orderAddressId": 6, - "createdAt": "2021-05-27 19:56:11", - "updatedAt": "2021-05-27 19:56:11", - "transactionId": null, - "items": [ - { - "id": "1", - "sku": "test-product" - } - ], - "order": { - "id": 1 - } - } - ] - } - } -} -~~~ -::: - -## Get Invoice By ID - -To get the specific Invoice, you have to pass an `id` field with query request .By using this resource and request payload, you will get only a single object under the `data` object in response. - -- Headers - - | Key | Value | - | ------------- | --------------------- | - | Accept | application/json | - | Authorization | Bearer `token-string` | - -### Examples - -Let's take an example, - -- Request Query - ~~~Query - query invoice{ - invoice(id:1){ - id - incrementId - state - emailSent - totalQty - baseCurrencyCode - channelCurrencyCode - orderCurrencyCode - subTotal - baseSubTotal - grandTotal - baseGrandTotal - shippingAmount - baseShippingAmount - taxAmount - baseTaxAmount - discountAmount - baseDiscountAmount - orderId - orderAddressId - createdAt - updatedAt - transactionId - items{ - id - sku - } - order{ - id - - } - } - } - - ~~~ - -::: details Response - ~~~json - { - "data": { - "invoice": { - "id": 1, - "incrementId": null, - "state": "paid", - "emailSent": 0, - "totalQty": 1, - "baseCurrencyCode": "USD", - "channelCurrencyCode": "USD", - "orderCurrencyCode": "USD", - "subTotal": 4.5, - "baseSubTotal": 4.5, - "grandTotal": 14.5, - "baseGrandTotal": 14.5, - "shippingAmount": 10, - "baseShippingAmount": 10, - "taxAmount": 0, - "baseTaxAmount": 0, - "discountAmount": 0, - "baseDiscountAmount": 0, - "orderId": 1, - "orderAddressId": 6, - "createdAt": "2021-05-27 19:56:11", - "updatedAt": "2021-05-27 19:56:11", - "transactionId": null, - "items": [ - { - "id": "1", - "sku": "test-product" - } - ], - "order": { - "id": 1 - } - } - } - } - ~~~ - -::: - - -## Create a new Order Invoice - - To create a Order Invoice , you have to perform mutation on Order Invoice and paas the related fields in the request. - API call resource will create a new Order Invoice , only if the admin has logged in. - - - Headers - - | Key | Value | - | ------------- | --------------------- | - | Accept | application/json | - | Authorization | Bearer `token-string` | - -**Note**: You can pass all the related fileds that you want in response. - - ### Examples - - Let's take an example, - -- Request Mutation - ~~~Mutation - mutation createInvoice{ - createInvoice(input:{ - orderId: 1 - invoiceData: { - orderItemId:1 - quantity:1 - } - }){ - id - incrementId - state - emailSent - totalQty - baseCurrencyCode - channelCurrencyCode - orderCurrencyCode - subTotal - baseSubTotal - grandTotal - baseGrandTotal - shippingAmount - baseShippingAmount - taxAmount - baseTaxAmount - discountAmount - baseDiscountAmount - orderId - orderAddressId - createdAt - updatedAt - transactionId - items{id} - order{id} - } - } - ~~~ - -::: details Response - ~~~json - { - "data": { - "createInvoice": { - "id": 1, - "incrementId": null, - "state": "paid", - "emailSent": null, - "totalQty": 1, - "baseCurrencyCode": "USD", - "channelCurrencyCode": "USD", - "orderCurrencyCode": "USD", - "subTotal": 4.5, - "baseSubTotal": 4.5, - "grandTotal": 14.5, - "baseGrandTotal": 14.5, - "shippingAmount": 10, - "baseShippingAmount": 10, - "taxAmount": 0, - "baseTaxAmount": 0, - "discountAmount": 0, - "baseDiscountAmount": 0, - "orderId": 1, - "orderAddressId": 6, - "createdAt": "2021-05-27 19:56:11", - "updatedAt": "2021-05-27 19:56:11", - "transactionId": null, - "items": [ - { - "id": "1" - } - ], - "order": { - "id": 1 - } - } - } - } - ~~~ -::: - - -## Get All Shipments - -You can get all the Shipments from the Bagisto store. You can achieve this job by using the `Shipments` API call. - -- Headers - - | Key | Value | - | ------------- | ---------------- | - | Accept | application/json | - -- Single Request Endpoint - - `POST http(s)://example.com/graphql` - -::: tip - - If you are using pagination and want to know more info about responses then check the [explanation](./explanation) portion. - -::: - -**Note**: You can pass all the related fileds that you want in response. - -- Query - ~~~query - query shipments { - shipments(page:1){ - paginatorInfo { - count - currentPage - lastPage - total - } - data{ - id - status - totalQty - totalWeight - carrierCode - carrierTitle - trackNumber - emailSent - customerId - customerType - orderId - orderAddressId - createdAt - updatedAt - inventorySourceId - inventorySourceName - order{ - id - } - items{ - id - } - inventorySource{ - id - code - name - } - customer{ - id - firstName - lastName - } - } - } - } - ~~~ - -::: details Response - -~~~json -{ - "data": { - "shipments": { - "paginatorInfo": { - "count": 1, - "currentPage": 1, - "lastPage": 1, - "total": 1 - }, - "data": [ - { - "id": 1, - "status": null, - "totalQty": 1, - "totalWeight": null, - "carrierCode": null, - "carrierTitle": "newship", - "trackNumber": "7nh6354", - "emailSent": 0, - "customerId": null, - "customerType": null, - "orderId": 1, - "orderAddressId": 5, - "createdAt": "2021-05-27 20:17:30", - "updatedAt": "2021-05-27 20:17:31", - "inventorySourceId": 1, - "inventorySourceName": "Default", - "order": { - "id": 1 - }, - "items": [ - { - "id": 1 - } - ], - "inventorySource": { - "id": "1", - "code": "default", - "name": "Default" - }, - "customer": null - } - ] - } - } -} -~~~ -::: - -## Get Shipment By ID - -To get the specific Shipment, you have to pass an `id` field with query request .By using this resource and request payload, you will get only a single object under the `data` object in response. - -- Headers - - | Key | Value | - | ------------- | --------------------- | - | Accept | application/json | - | Authorization | Bearer `token-string` | - -### Examples - -Let's take an example, - -- Request Query - ~~~Query - query shipment { - shipment(id:1){ - id - status - totalQty - totalWeight - carrierCode - carrierTitle - trackNumber - emailSent - customerId - customerType - orderId - orderAddressId - createdAt - updatedAt - inventorySourceId - inventorySourceName - order{ - id - } - items{ - id - } - inventorySource{ - id - code - name - } - customer{ - id - firstName - lastName - } - } - } - ~~~ - -::: details Response - ~~~json - { - "data": { - "shipment": { - "id": 1, - "status": null, - "totalQty": 1, - "totalWeight": null, - "carrierCode": null, - "carrierTitle": "newship", - "trackNumber": "7nh6354", - "emailSent": 0, - "customerId": null, - "customerType": null, - "orderId": 1, - "orderAddressId": 5, - "createdAt": "2021-05-27 20:17:30", - "updatedAt": "2021-05-27 20:17:31", - "inventorySourceId": 1, - "inventorySourceName": "Default", - "order": { - "id": 1 - }, - "items": [ - { - "id": 1 - } - ], - "inventorySource": { - "id": "1", - "code": "default", - "name": "Default" - }, - "customer": null - } - } - } - ~~~ - -::: - -## Create a new Order Shipment - - To create a Order Shipment , you have to perform mutation on Order Shipment and paas the related fields in the request. - API call resource will create a new Order Shipment , only if the admin has logged in. - - - Headers - - | Key | Value | - | ------------- | --------------------- | - | Accept | application/json | - | Authorization | Bearer `token-string` | - -**Note**: You can pass all the related fileds that you want in response. - - ### Examples - - Let's take an example, - -- Request Mutation - ~~~Mutation - mutation{ - createShipment(input:{ - orderId:1 - carrierTitle:"newship" - trackNumber:"7nh6354" - inventorySourceId:1 - shipmentData:{ - orderItemId:1 - quantity:1 - } - }){ - id - status - totalQty - totalWeight - carrierCode - carrierTitle - trackNumber - emailSent - customerId - customerType - orderId - orderAddressId - createdAt - updatedAt - inventorySourceId - inventorySourceName - order{id} - items{id} - inventorySource{id} - customer{id} - } - } - ~~~ - -::: details Response - ~~~json - { - "data": { - "createShipment": { - "id": 1, - "status": null, - "totalQty": 1, - "totalWeight": null, - "carrierCode": null, - "carrierTitle": "newship", - "trackNumber": "7nh6354", - "emailSent": null, - "customerId": null, - "customerType": null, - "orderId": 1, - "orderAddressId": 5, - "createdAt": "2021-05-27 20:17:30", - "updatedAt": "2021-05-27 20:17:31", - "inventorySourceId": 1, - "inventorySourceName": "Default", - "order": { - "id": 1 - }, - "items": [ - { - "id": 1 - } - ], - "inventorySource": { - "id": "1" - }, - "customer": null - } - } - } - ~~~ -::: - -## Get All Refunds - -You can get all the Refunds from the Bagisto store. You can achieve this job by using the `Refunds` API call. - -- Headers - - | Key | Value | - | ------------- | ---------------- | - | Accept | application/json | - -- Single Request Endpoint - - `POST http(s)://example.com/graphql` - -::: tip - - If you are using pagination and want to know more info about responses then check the [explanation](./explanation) portion. - -::: - -**Note**: You can pass all the related fileds that you want in response. - -- Query - ~~~query - query refunds { - refunds(page:1){ - paginatorInfo { - count - currentPage - lastPage - total - } - data{ - id - incrementId - state - emailSent - totalQty - baseCurrencyCode - channelCurrencyCode - orderCurrencyCode - adjustmentRefund - baseAdjustmentRefund - adjustmentFee - baseAdjustmentFee - subTotal - baseSubTotal - grandTotal - baseGrandTotal - shippingAmount - baseShippingAmount - taxAmount - baseTaxAmount - discountPercent - discountAmount - baseDiscountAmount - orderId - createdAt - updatedAt - items{ - id - } - order{ - id - } - success - } - } - } - ~~~ - -::: details Response - -~~~json -{ - "data": { - "refunds": { - "paginatorInfo": { - "count": 1, - "currentPage": 1, - "lastPage": 1, - "total": 1 - }, - "data": [ - { - "id": 1, - "incrementId": null, - "state": "refunded", - "emailSent": 0, - "totalQty": 1, - "baseCurrencyCode": "USD", - "channelCurrencyCode": "USD", - "orderCurrencyCode": "USD", - "adjustmentRefund": 0, - "baseAdjustmentRefund": 0, - "adjustmentFee": 0, - "baseAdjustmentFee": 0, - "subTotal": 4.5, - "baseSubTotal": 4.5, - "grandTotal": 14.5, - "baseGrandTotal": 14.5, - "shippingAmount": 10, - "baseShippingAmount": 10, - "taxAmount": 0, - "baseTaxAmount": 0, - "discountPercent": 0, - "discountAmount": 0, - "baseDiscountAmount": 0, - "orderId": 1, - "createdAt": "2021-05-27 20:27:29", - "updatedAt": "2021-05-27 20:27:29", - "items": [ - { - "id": 1 - } - ], - "order": { - "id": 1 - }, - "success": null - } - ] - } - } -} -~~~ -::: - -## Get Refund By ID - -To get the specific Refund, you have to pass an `id` field with query request .By using this resource and request payload, you will get only a single object under the `data` object in response. - -- Headers - - | Key | Value | - | ------------- | --------------------- | - | Accept | application/json | - | Authorization | Bearer `token-string` | - -### Examples - -Let's take an example, - -- Request Query - ~~~Query - query refund { - refund(id:1){ - id - incrementId - state - emailSent - totalQty - baseCurrencyCode - channelCurrencyCode - orderCurrencyCode - adjustmentRefund - baseAdjustmentRefund - adjustmentFee - baseAdjustmentFee - subTotal - baseSubTotal - grandTotal - baseGrandTotal - shippingAmount - baseShippingAmount - taxAmount - baseTaxAmount - discountPercent - discountAmount - baseDiscountAmount - orderId - createdAt - updatedAt - items{ - id - } - order{ - id - } - success - } - } - ~~~ - -::: details Response - ~~~json - { - "data": { - "refund": { - "id": 1, - "incrementId": null, - "state": "refunded", - "emailSent": 0, - "totalQty": 1, - "baseCurrencyCode": "USD", - "channelCurrencyCode": "USD", - "orderCurrencyCode": "USD", - "adjustmentRefund": 0, - "baseAdjustmentRefund": 0, - "adjustmentFee": 0, - "baseAdjustmentFee": 0, - "subTotal": 4.5, - "baseSubTotal": 4.5, - "grandTotal": 14.5, - "baseGrandTotal": 14.5, - "shippingAmount": 10, - "baseShippingAmount": 10, - "taxAmount": 0, - "baseTaxAmount": 0, - "discountPercent": 0, - "discountAmount": 0, - "baseDiscountAmount": 0, - "orderId": 1, - "createdAt": "2021-05-27 20:27:29", - "updatedAt": "2021-05-27 20:27:29", - "items": [ - { - "id": 1 - } - ], - "order": { - "id": 1 - }, - "success": null - } - } - } - ~~~ - -::: - -## Create a new Order Refund - - To create a Order Refund , you have to perform mutation on Order Refund and paas the related fields in the request. - API call resource will create a new Order Refund , only if the admin has logged in. - - - Headers - - | Key | Value | - | ------------- | --------------------- | - | Accept | application/json | - | Authorization | Bearer `token-string` | - -**Note**: You can pass all the related fileds that you want in response. - - ### Examples - - Let's take an example, - -- Request Mutation - ~~~Mutation - mutation{ - createRefund(input:{ - orderId:1 - refundShipping:10 - adjustmentRefund:0 - adjustmentFee:0 - refundData:{ - orderItemId:1 - quantity:1 - } - }){ - id - incrementId - state - emailSent - totalQty - baseCurrencyCode - channelCurrencyCode - orderCurrencyCode - adjustmentRefund - baseAdjustmentRefund - adjustmentFee - baseAdjustmentFee - subTotal - baseSubTotal - grandTotal - baseGrandTotal - shippingAmount - baseShippingAmount - taxAmount - baseTaxAmount - discountPercent - discountAmount - baseDiscountAmount - orderId - createdAt - updatedAt - items{id} - order{id} - success - } - } - - ~~~ - -::: details Response - ~~~json - { - "data": { - "createRefund": { - "id": 1, - "incrementId": null, - "state": "refunded", - "emailSent": null, - "totalQty": 1, - "baseCurrencyCode": "USD", - "channelCurrencyCode": "USD", - "orderCurrencyCode": "USD", - "adjustmentRefund": 0, - "baseAdjustmentRefund": 0, - "adjustmentFee": 0, - "baseAdjustmentFee": 0, - "subTotal": 4.5, - "baseSubTotal": 4.5, - "grandTotal": 14.5, - "baseGrandTotal": 14.5, - "shippingAmount": 10, - "baseShippingAmount": 10, - "taxAmount": 0, - "baseTaxAmount": 0, - "discountPercent": null, - "discountAmount": 0, - "baseDiscountAmount": 0, - "orderId": 1, - "createdAt": "2021-05-27 20:27:29", - "updatedAt": "2021-05-27 20:27:29", - "items": [ - { - "id": 1 - } - ], - "order": { - "id": 1 - }, - "success": "Refund created successfully." - } - } - } - ~~~ -::: - -## Cancel an Order - - To Cancel an Order , you have to perform mutation on Order and paas the related fields in the request. - API call resource will Cancel an Order , only if the admin has logged in. - - - Headers - - | Key | Value | - | ------------- | --------------------- | - | Accept | application/json | - | Authorization | Bearer `token-string` | - - - ### Examples - - Let's take an example, - -- Request Mutation - ~~~Mutation - mutation cancelORder{ - cancelOrder(id:2) - {success} - } - ~~~ - -::: details Response - ~~~json - { - "data": { - "cancelOrder": { - "success": "Order canceled successfully." - } - } - } - ~~~ -::: \ No newline at end of file diff --git a/docs/1.x/graphql-admin-api/settings.md b/docs/1.x/graphql-admin-api/settings.md deleted file mode 100644 index fcb3be7d..00000000 --- a/docs/1.x/graphql-admin-api/settings.md +++ /dev/null @@ -1,3578 +0,0 @@ -## Locales - -In this section, we will see all the APIs which are related to locales. - -### 1. Get all locales - -You can get all the locales from the Bagisto store. You can achieve this job by using the `locales` API call. - -- Headers - - | Key | Value | - | ------------- | ---------------- | - | Accept | application/json | - -- Single Request Endpoint - - `POST http(s)://example.com/graphql` - -::: tip - - If you are using pagination and want to know more info about responses then check the [explanation](./explanation) portion. - -::: - -- Query - ~~~query - query locales{ - locales(page:1){ - paginatorInfo { - count - currentPage - lastPage - total - } - data{ - id - name - code - direction - success - } - } - } - ~~~ - -::: details Response - -~~~json -{ - "data": { - "locales": { - "paginatorInfo": { - "count": 4, - "currentPage": 1, - "lastPage": 1, - "total": 4 - }, - "data": [ - { - "id": "1", - "name": "English", - "code": "en", - "direction": "ltr", - "success": null - }, - { - "id": "2", - "name": "French", - "code": "fr", - "direction": "ltr", - "success": null - }, - { - "id": "3", - "name": "Dutch", - "code": "nl", - "direction": "ltr", - "success": null - }, - { - "id": "4", - "name": "Türkçe", - "code": "tr", - "direction": "ltr", - "success": null - } - ] - } - } -} -~~~ -::: - -### 2. Get Locale By ID - -To get the specific Locale, you have to pass an `id` field with query request .By using this resource and request payload, you will get only a single object under the `data` object in response. - -- Headers - - | Key | Value | - | ------------- | --------------------- | - | Accept | application/json | - | Authorization | Bearer `token-string` | - -### Examples - -Let's take an example, - -- Request Query - ~~~Query - query locales{ - locale(id:1){ - id - name - code - direction - success - } - } - ~~~ - -::: details Response - ~~~json - { - "data": { - "locale": { - "id": "1", - "name": "English", - "code": "en", - "direction": "ltr", - "success": null - } - } - } - ~~~ - -::: - -### 3. Get Filtered Locale - -You can get the filter data from the Locales by passing the input fileds in the request and that you want in the response. - -- Headers - - | Key | Value | - | ------------- | --------------------- | - | Accept | application/json | - | Authorization | Bearer `token-string` | - -### Examples - -Let's take an example, - -- Request Query - -~~~query - query locales{ - locales(input: { - code: "en" - name: "English" - direction: "ltr" - }){ - paginatorInfo { - count - currentPage - lastPage - total - } - data{ - id - name - code - direction - success - } - } - } -~~~ - -::: details Response - ~~~json - { - "data": { - "locales": { - "paginatorInfo": { - "count": 1, - "currentPage": 1, - "lastPage": 1, - "total": 1 - }, - "data": [ - { - "id": "1", - "name": "English", - "code": "en", - "direction": "ltr", - "success": null - } - ] - } - } - } - ~~~ - ::: - -### 4. Create a new Locale - - To create a Locale, you have to perform mutation on Locale and paas the related fields in the request. - API call resource will create a new Locale, only if the admin has logged in. - - - Headers - - | Key | Value | - | ------------- | --------------------- | - | Accept | application/json | - | Authorization | Bearer `token-string` | - - ### Examples - - Let's take an example, - -- Request Mutation - ~~~Mutation - mutation{ - createChannel(input:{ - code:"newca" - name:"nerty" - description:"ajsyg" - theme:"gdg" - homePageContent:"fhg" - footerContent:"fh" - hostname:"http://bag1.com" - defaultLocaleId:1 - baseCurrencyId:1 - rootCategoryId:1 - locales:1 - currencies:1 - inventorySources:1 - seoTitle:"gfyj" - seoDescription:"gcg" - seoKeywords:"gvgh" - }) - { - id - code - name - description - theme - homePageContent - footerContent - hostname - defaultLocaleId - baseCurrencyId - rootCategoryId - homeSeo - locales{id} - defaultLocale - currencies{id} - inventorySources{id} - baseCurrency - rootCategory - logoUrl - faviconUrl - success - } - } - ~~~ - -::: details Response - ~~~json - { - "data": { - "createChannel": { - "id": "2", - "code": "newca", - "name": "nerty", - "description": "ajsyg", - "theme": "gdg", - "homePageContent": "fhg", - "footerContent": "fh", - "hostname": "http://bag1.com", - "defaultLocaleId": 1, - "baseCurrencyId": 1, - "rootCategoryId": 1, - "homeSeo": "{\"meta_title\":\"gfyj\",\"meta_description\":\"gcg\",\"meta_keywords\":\"gvgh\"}", - "locales": [ - { - "id": "1" - } - ], - "defaultLocale": "{\"id\":1,\"code\":\"en\",\"name\":\"English\",\"created_at\":null,\"updated_at\":null,\"direction\":\"ltr\",\"locale_image\":null}", - "currencies": [ - { - "id": "1" - } - ], - "inventorySources": [ - { - "id": "1" - } - ], - "baseCurrency": "{\"id\":1,\"code\":\"USD\",\"name\":\"US Dollar\",\"created_at\":null,\"updated_at\":null,\"symbol\":\"$\"}", - "rootCategory": "{\"id\":1,\"position\":1,\"image\":null,\"status\":1,\"_lft\":1,\"_rgt\":14,\"parent_id\":null,\"created_at\":\"2021-05-05T10:06:44.000000Z\",\"updated_at\":\"2021-05-05T10:06:44.000000Z\",\"display_mode\":\"products_and_description\",\"category_icon_path\":null,\"additional\":null,\"name\":\"Root\",\"description\":\"Root\",\"slug\":\"root\",\"url_path\":\"\",\"meta_title\":\"\",\"meta_description\":\"\",\"meta_keywords\":\"\",\"translations\":[{\"id\":1,\"name\":\"Root\",\"slug\":\"root\",\"description\":\"Root\",\"meta_title\":\"\",\"meta_description\":\"\",\"meta_keywords\":\"\",\"category_id\":1,\"locale\":\"en\",\"locale_id\":null,\"url_path\":\"\"}]}", - "logoUrl": null, - "faviconUrl": null, - "success": null - } - } - } - ~~~ -::: - -### 5. Update Locale - -By using this API call you can update the Locale. To do this , you have to perform update mutation on Locale and paas the related fields in the request. -API call will update a Locale, only if the admin has logged in. - - - - Headers - - | Key | Value | - | ------------- | --------------------- | - | Accept | application/json | - | Authorization | Bearer `token-string` | - - ### Examples - - Let's take an example, - -- Request Mutation - ~~~Mutation - mutation{ - updateLocale(id:2,input:{ - code:"trr" - name:"Türkçe" - direction:"LTR" - }){ - id - name - code - direction - success - } - } - ~~~ - -::: details Response - ~~~json - { - "data": { - "updateLocale": { - "id": "2", - "name": "Türkçe", - "code": "trr", - "direction": "LTR", - "success": null - } - } - } - ~~~ -::: - -### 6. Delete a Locale - -To delete a Locale, you have to perform mutation on Locale by passing the id of that Locale. -API call will delete a Locale, only if the admin has logged in. - -- Headers - - | Key | Value | - | ------------- | --------------------- | - | Accept | application/json | - | Authorization | Bearer `token-string` | - -### Examples - - Let's take an example, - -- Request Mutation - ~~~Mutation - mutation{ - deleteLocale(id:2){ - success - } - } - ~~~ - -::: details Response - ~~~json - { - "data": { - "deleteLocale": { - "success": "Locale deleted successfully." - } - } - } - ~~~ -::: - - - -## Currency - -In this section, we will see all the APIs which are related to Currencies. - -### 1. Get all Currencies - -You can get all the Currencies from the Bagisto store. You can achieve this job by using the `Currencies` API call. - -- Headers - - | Key | Value | - | ------------- | ---------------- | - | Accept | application/json | - -- Single Request Endpoint - - `POST http(s)://example.com/graphql` - -::: tip - - If you are using pagination and want to know more info about responses then check the [explanation](./explanation) portion. - -::: - -- Query - ~~~query - query currencies{ - currencies(page:1){ - paginatorInfo { - count - currentPage - lastPage - total - } - data{ - id - name - code - symbol - exchangeRate { - id - targetCurrency - rate - createdAt - updatedAt - currency { - name - code - symbol - } - success - } - createdAt - updatedAt - success - } - } - } - ~~~ - -::: details Response - -~~~json -{ - "data": { - "currencies": { - "paginatorInfo": { - "count": 2, - "currentPage": 1, - "lastPage": 1, - "total": 2 - }, - "data": [ - { - "id": "1", - "name": "US Dollar", - "code": "USD", - "symbol": "$", - "exchangeRate": null, - "createdAt": null, - "updatedAt": null, - "success": null - }, - { - "id": "2", - "name": "Euro", - "code": "EUR", - "symbol": "€", - "exchangeRate": null, - "createdAt": null, - "updatedAt": null, - "success": null - } - ] - } - } -} -~~~ -::: - -### 2. Get Currency By ID - -To get the specific Currency, you have to pass an `id` field with query request .By using this resource and request payload, you will get only a single object under the `data` object in response. - -- Headers - - | Key | Value | - | ------------- | --------------------- | - | Accept | application/json | - | Authorization | Bearer `token-string` | - -### Examples - -Let's take an example, - -- Request Query - ~~~Query - query currency{ - currency(id:1){ - id - name - code - symbol - exchangeRate { - id - targetCurrency - rate - createdAt - updatedAt - - success - } - createdAt - updatedAt - success - } - } - ~~~ - -::: details Response - ~~~json - { - "data": { - "currency": { - "id": "1", - "name": "US Dollar", - "code": "USD", - "symbol": "$", - "exchangeRate": null, - "createdAt": null, - "updatedAt": null, - "success": null - } - } - } - ~~~ - -::: - -### 3. Get Filtered Currency - -You can get the filter data from the Currencies by passing the input fileds in the request and that you want in the response. - -- Headers - - | Key | Value | - | ------------- | --------------------- | - | Accept | application/json | - | Authorization | Bearer `token-string` | - -### Examples - -Let's take an example, - -- Request Query - -~~~query - query currencies{ - currencies(input:{ - id: 1 - code: "USD" - }){ - paginatorInfo { - count - currentPage - lastPage - total - } - data{ - id - name - code - symbol - exchangeRate { - id - targetCurrency - rate - createdAt - updatedAt - currency { - name - code - symbol - } - success - } - createdAt - updatedAt - success - } - } - } -~~~ - -::: details Response - ~~~json - { - "data": { - "currencies": { - "paginatorInfo": { - "count": 1, - "currentPage": 1, - "lastPage": 1, - "total": 1 - }, - "data": [ - { - "id": "1", - "name": "US Dollar", - "code": "USD", - "symbol": "$", - "exchangeRate": null, - "createdAt": null, - "updatedAt": null, - "success": null - } - ] - } - } - } - ~~~ - ::: - -### 4. Create a new Currency - - To create a Currency, you have to perform mutation on Currency and paas the related fields in the request. - API call will create a new Currency, only if the admin has logged in. - - - Headers - - | Key | Value | - | ------------- | --------------------- | - | Accept | application/json | - | Authorization | Bearer `token-string` | - - ### Examples - - Let's take an example, - -- Request Mutation - ~~~Mutation - mutation{ - createCurrency(input:{ - name:"newcurrency" - code:"new" - symbol:"%" - }){ - id - name - code - symbol - exchangeRate{id} - createdAt - updatedAt - success - } - } - ~~~ - -::: details Response - ~~~json - { - "data": { - "createCurrency": { - "id": "3", - "name": "newcurrency", - "code": "NEW", - "symbol": "%", - "exchangeRate": null, - "createdAt": "2021-05-21 11:11:18", - "updatedAt": "2021-05-21 11:11:18", - "success": null - } - } - } - ~~~ -::: - -### 5. Update Currency - -By using this API call you can update the Currency. To do this , you have to perform update mutation on Currency and paas the related fields in the request. -API call will update a Currency, only if the admin has logged in. - - - - Headers - - | Key | Value | - | ------------- | --------------------- | - | Accept | application/json | - | Authorization | Bearer `token-string` | - - ### Examples - - Let's take an example, - -- Request Mutation - ~~~Mutation - mutation{ - updateCurrency(id:3,input:{ - name:"ind" - code:"IND" - symbol:"&" - }) - { - id - name - code - symbol - exchangeRate{id} - createdAt - updatedAt - success - } - } - ~~~ - -::: details Response - ~~~json - { - "data": { - "updateCurrency": { - "id": "3", - "name": "ind", - "code": "IND", - "symbol": "&", - "exchangeRate": null, - "createdAt": "2021-05-21 11:11:18", - "updatedAt": "2021-05-21 11:15:49", - "success": null - } - } - } - ~~~ -::: - -### 6. Delete a Currency - -To delete a Currency, you have to perform mutation on Currency by passing the id of that Currency. -API call will delete a Currency, only if the admin has logged in. - -- Headers - - | Key | Value | - | ------------- | --------------------- | - | Accept | application/json | - | Authorization | Bearer `token-string` | - - ### Examples - - Let's take an example, - -- Request Mutation - ~~~Mutation - mutation{ - deleteCurrency(id:3) - { - success - } - } - ~~~ - -::: details Response - ~~~json - { - "data": { - "deleteCurrency": { - "success": "Currency deleted successfully." - } - } - } - ~~~ -::: - - - -## Exchange Rates - -In this section, we will see all the APIs which are related to Exchange Rates. - -### 1. Get all Exchange Rates - -You can get all the Exchange Rates from the Bagisto store. You can achieve this job by using the `Exchange Rates` API call. - -- Headers - - | Key | Value | - | ------------- | ---------------- | - | Accept | application/json | - -- Single Request Endpoint - - `POST http(s)://example.com/graphql` - -::: tip - - If you are using pagination and want to know more info about responses then check the [explanation](./explanation) portion. - -::: - -- Query - ~~~query - query exchangeRates{ - exchangeRates(page:1){ - paginatorInfo { - count - currentPage - lastPage - total - } - data{ - id - targetCurrency - rate - createdAt - updatedAt - currency { - id - name - code - symbol - success - } - success - } - } - } - ~~~ - -::: details Response - -~~~json -{ - "data": { - "exchangeRates": { - "paginatorInfo": { - "count": 1, - "currentPage": 1, - "lastPage": 1, - "total": 1 - }, - "data": [ - { - "id": "1", - "targetCurrency": 2, - "rate": 1.5, - "createdAt": "2021-05-21 11:57:49", - "updatedAt": "2021-05-21 11:57:49", - "currency": { - "id": "2", - "name": "Euro", - "code": "EUR", - "symbol": "€", - "success": null - }, - "success": null - } - ] - } - } -} -~~~ -::: - -### 2. Get Exchange Rate By ID - -To get the specific Exchange Rate, you have to pass an `id` field with query request .By using this resource and request payload, you will get only a single object under the `data` object in response. - -- Headers - - | Key | Value | - | ------------- | --------------------- | - | Accept | application/json | - | Authorization | Bearer `token-string` | - -### Examples - -Let's take an example, - -- Request Query - ~~~Query - query exchangeRate{ - exchangeRate(id:1){ - - id - targetCurrency - rate - createdAt - updatedAt - currency { - id - name - code - symbol - success - } - success - } - } - ~~~ - -::: details Response - ~~~json - { - "data": { - "exchangeRate": { - "id": "1", - "targetCurrency": 2, - "rate": 1.5, - "createdAt": "2021-05-21 11:57:49", - "updatedAt": "2021-05-21 11:57:49", - "currency": { - "id": "2", - "name": "Euro", - "code": "EUR", - "symbol": "€", - "success": null - }, - "success": null - } - } - } - ~~~ - -::: - -### 3. Get Filtered Exchange Rates - -You can get the filter data from the Exchange Rates by passing the input fileds in the request and that you want in the response. - -- Headers - - | Key | Value | - | ------------- | --------------------- | - | Accept | application/json | - | Authorization | Bearer `token-string` | - -### Examples - -Let's take an example, - -- Request Query - -~~~query - query exchangeRates{ - exchangeRates(input: { - id : 1 - currency: "EUR" - }, page:1){ - paginatorInfo { - count - currentPage - lastPage - total - } - data{ - id - targetCurrency - rate - createdAt - updatedAt - currency { - id - name - code - symbol - success - } - success - } - } - } -~~~ - -::: details Response - ~~~json - { - "data": { - "exchangeRates": { - "paginatorInfo": { - "count": 1, - "currentPage": 1, - "lastPage": 1, - "total": 1 - }, - "data": [ - { - "id": "1", - "targetCurrency": 2, - "rate": 1.5, - "createdAt": "2021-05-21 11:57:49", - "updatedAt": "2021-05-21 11:57:49", - "currency": { - "id": "2", - "name": "Euro", - "code": "EUR", - "symbol": "€", - "success": null - }, - "success": null - } - ] - } - } - ~~~ - ::: - -### 4. Create a new Exchange Rate - - To create a Exchange Rate, you have to perform mutation on Exchange Rate and paas the related fields in the request. - API call will create a new Exchange Rate, only if the admin has logged in. - - - Headers - - | Key | Value | - | ------------- | --------------------- | - | Accept | application/json | - | Authorization | Bearer `token-string` | - - ### Examples - - Let's take an example, - -- Request Mutation - ~~~Mutation - mutation{ - createExchangeRate(input:{ - targetCurrency:2 - rate:5 - }){ - id - targetCurrency - rate - createdAt - updatedAt - # currency{id} - success - } - } - ~~~ - -::: details Response - ~~~json - { - "data": { - "createExchangeRate": { - "id": "2", - "targetCurrency": 2, - "rate": 5, - "createdAt": "2021-05-21 13:09:42", - "updatedAt": "2021-05-21 13:09:42", - "success": null - } - } - } - ~~~ -::: - -### 5. Update Exchange Rate - -By using this API call you can update the Exchange Rate. To do this , you have to perform update mutation on Exchange Rate and paas the related fields in the request. -API call will update a Exchange Rate, only if the admin has logged in. - - - - Headers - - | Key | Value | - | ------------- | --------------------- | - | Accept | application/json | - | Authorization | Bearer `token-string` | - - ### Examples - - Let's take an example, - -- Request Mutation - ~~~Mutation - mutation{ - updateExchangeRate(id:2,input:{ - targetCurrency:2 - rate:2.5 - }){ - id - targetCurrency - rate - createdAt - updatedAt - currency{id} - success - } - } - ~~~ - -::: details Response - ~~~json - { - "data": { - "updateExchangeRate": { - "id": "2", - "targetCurrency": 2, - "rate": 2.5, - "createdAt": "2021-05-21 13:09:42", - "updatedAt": "2021-05-21 13:22:17", - "currency": { - "id": "2" - }, - "success": null - } - } - } - ~~~ -::: - -### 6. Delete a Exchange Rate - -To delete a Exchange Rate, you have to perform mutation on Exchange Rate by passing the id of that Exchange Rate. -API call will delete a Exchange Rate, only if the admin has logged in. - -- Headers - - | Key | Value | - | ------------- | --------------------- | - | Accept | application/json | - | Authorization | Bearer `token-string` | - - ### Examples - - Let's take an example, - -- Request Mutation - ~~~Mutation - mutation{ - deleteExchangeRate(id:2){ - success - } - } - ~~~ - -::: details Response - ~~~json - { - "data": { - "deleteExchangeRate": { - "success": "Exchange Rate deleted successfully." - } - } - } - ~~~ -::: - -## Inventory Sources - -In this section, we will see all the APIs which are related to Inventory Sources. - -### 1. Get all Inventory Sources - -You can get all the Inventory Sources from the Bagisto store. You can achieve this job by using the `invetory-sources` API call. - -- Headers - - | Key | Value | - | ------------- | ---------------- | - | Accept | application/json | - -- Single Request Endpoint - - `POST http(s)://example.com/graphql` - -::: tip - - If you are using pagination and want to know more info about responses then check the [explanation](./explanation) portion. - -::: - -- Query - ~~~query - query inventorySources{ - inventorySources(page:1){ - paginatorInfo { - count - currentPage - lastPage - total - } - data{ - id - code - name - description - contactName - contactEmail - contactNumber - contactFax - country - state - city - street - postcode - priority - latitude - longitude - status - success - } - } - } - ~~~ - -::: details Response - -~~~json -{ - "data": { - "inventorySources": { - "paginatorInfo": { - "count": 1, - "currentPage": 1, - "lastPage": 1, - "total": 1 - }, - "data": [ - { - "id": "1", - "code": "default", - "name": "Default", - "description": null, - "contactName": "Detroit Warehouse", - "contactEmail": "warehouse@example.com", - "contactNumber": "1234567899", - "contactFax": null, - "country": "US", - "state": "MI", - "city": "Detroit", - "street": "12th Street", - "postcode": "48127", - "priority": 0, - "latitude": null, - "longitude": null, - "status": true, - "success": null - } - ] - } - } -} -~~~ -::: - -### 2. Get Inventory Source By ID - -To get the specific Inventory Source, you have to pass an `id` field with query request .By using this resource and request payload, you will get only a single object under the `data` object in response. - -- Headers - - | Key | Value | - | ------------- | --------------------- | - | Accept | application/json | - | Authorization | Bearer `token-string` | - -### Examples - -Let's take an example, - -- Request Query - ~~~Query - query inventorySource{ - inventorySource(id:1){ - id - code - name - description - contactName - contactEmail - contactNumber - contactFax - country - state - city - street - postcode - priority - latitude - longitude - status - success - } - } - ~~~ - -::: details Response - ~~~json - { - "data": { - "inventorySource": { - "id": "1", - "code": "default", - "name": "Default", - "description": null, - "contactName": "Detroit Warehouse", - "contactEmail": "warehouse@example.com", - "contactNumber": "1234567899", - "contactFax": null, - "country": "US", - "state": "MI", - "city": "Detroit", - "street": "12th Street", - "postcode": "48127", - "priority": 0, - "latitude": null, - "longitude": null, - "status": true, - "success": null - } - } - } - ~~~ - -::: - -### 3. Get Filtered Inventory Source - -You can get the filter data from the Inventory Sources by passing the input fileds in the request and that you want in the response. - -- Headers - - | Key | Value | - | ------------- | --------------------- | - | Accept | application/json | - | Authorization | Bearer `token-string` | - -### Examples - -Let's take an example, - -- Request Query - -~~~query - query inventorySources{ - inventorySources(input: { - id: 1 - code: "default" - name: "Default" - priority: 0 - status: true - },page:1){ - paginatorInfo { - count - currentPage - lastPage - total - } - data{ - id - code - name - description - contactName - contactEmail - contactNumber - contactFax - country - state - city - street - postcode - priority - latitude - longitude - status - success - } - } - } -~~~ - -::: details Response - ~~~json - { - "data": { - "inventorySources": { - "paginatorInfo": { - "count": 1, - "currentPage": 1, - "lastPage": 1, - "total": 1 - }, - "data": [ - { - "id": "1", - "code": "default", - "name": "Default", - "description": null, - "contactName": "Detroit Warehouse", - "contactEmail": "warehouse@example.com", - "contactNumber": "1234567899", - "contactFax": null, - "country": "US", - "state": "MI", - "city": "Detroit", - "street": "12th Street", - "postcode": "48127", - "priority": 0, - "latitude": null, - "longitude": null, - "status": true, - "success": null - } - ] - } - } - } - ~~~ - ::: - -### 4. Create a new Inventory Source - - To create a Inventory Source, you have to perform mutation on Inventory Source and paas the related fields in the request. - API call resource will create a new Inventory Source, only if the admin has logged in. - - - Headers - - | Key | Value | - | ------------- | --------------------- | - | Accept | application/json | - | Authorization | Bearer `token-string` | - -### Examples - - Let's take an example, - -- Request Mutation - ~~~Mutation - mutation{ - createInventorySource(input:{ - code:"demo" - name:"demoinventory" - description:"demo" - contactName:"naresh.verma" - contactEmail:"naresh.verma327@webkul.com" - contactNumber:"7252756566" - country:"IN" - state:"UK" - city:"nainital" - street:"ramnagar" - postcode:"263140" - priority:1 - status:true - }){ - id - code - name - description - contactName - contactEmail - contactNumber - contactFax - country - state - city - street - postcode - priority - latitude - longitude - status - success - } - } - ~~~ - -::: details Response - ~~~json - { - "data": { - "createInventorySource": { - "id": "3", - "code": "demo", - "name": "demoinventory", - "description": "demo", - "contactName": "naresh.verma", - "contactEmail": "naresh.verma327@webkul.com", - "contactNumber": "7252756566", - "contactFax": null, - "country": "IN", - "state": "UK", - "city": "nainital", - "street": "ramnagar", - "postcode": "263140", - "priority": 1, - "latitude": null, - "longitude": null, - "status": true, - "success": null - } - } - } - ~~~ -::: - -### 5. Update Inventory Source - -By using this API call you can update the Inventory Source. To do this , you have to perform update mutation on Inventory Source and paas the related fields in the request. -API call will update a Inventory Source, only if the admin has logged in. - - - - Headers - - | Key | Value | - | ------------- | --------------------- | - | Accept | application/json | - | Authorization | Bearer `token-string` | - -### Examples - - Let's take an example, - -- Request Mutation - ~~~Mutation - mutation{ - updateInventorySource(id:3,input:{ - code:"demoupdate" - name:"demoinventory" - description:"demo" - contactName:"naresh.verma" - contactEmail:"naresh.verma327@webkul.com" - contactNumber:"7252756566" - country:"IN" - state:"UK" - city:"nainital" - street:"ramnagar" - postcode:"263140" - priority:1 - status:true - }){ - id - code - name - description - contactName - contactEmail - contactNumber - contactFax - country - state - city - street - postcode - priority - latitude - longitude - status - success - } - } - ~~~ - -::: details Response - ~~~json - { - "data": { - "updateInventorySource": { - "id": "3", - "code": "demoupdate", - "name": "demoinventory", - "description": "demo", - "contactName": "naresh.verma", - "contactEmail": "naresh.verma327@webkul.com", - "contactNumber": "7252756566", - "contactFax": null, - "country": "IN", - "state": "UK", - "city": "nainital", - "street": "ramnagar", - "postcode": "263140", - "priority": 1, - "latitude": null, - "longitude": null, - "status": true, - "success": null - } - } - } - ~~~ -::: - -### 6. Delete a Inventory Source - -To delete a Inventory Source, you have to perform mutation on Inventory Source by passing the id of that Inventory Source. -API call will delete a Inventory Source, only if the admin has logged in. - -- Headers - - | Key | Value | - | ------------- | --------------------- | - | Accept | application/json | - | Authorization | Bearer `token-string` | - - ### Examples - - Let's take an example, - -- Request Mutation - ~~~Mutation - mutation{ - deleteInventorySource(id:3){ - success - } - } - - ~~~ - -::: details Response - ~~~json - { - "data": { - "deleteInventorySource": { - "success": "Inventory source deleted successfully." - } - } - } - ~~~ -::: - -## Channels - -In this section, we will see all the APIs which are related to channels. - -### 1. Get all channels - -You can get all the channels from the Bagisto store. You can achieve this job by using the `channels` API call. - -- Headers - - | Key | Value | - | ------------- | ---------------- | - | Accept | application/json | - -- Single Request Endpoint - - `POST http(s)://example.com/graphql` - -::: tip - - If you are using pagination and want to know more info about responses then check the [explanation](./explanation) portion. - -::: - -- Query - ~~~query - query channels{ - channels(page:1){ - paginatorInfo { - count - currentPage - lastPage - total - } - data { - id - code - name - description - theme - homePageContent - footerContent - hostname - defaultLocaleId - baseCurrencyId - rootCategoryId - homeSeo - locales{id} - defaultLocale - currencies{id} - inventorySources{id} - baseCurrency - rootCategory - logoUrl - faviconUrl - success - } - } - } - ~~~ -::: tip - - You can use all fields to get the all related data. like here we have used `locales` field and and under this resource we have user id , so you can get all the related fields to locale here by defining the locale fields in the request query. - -::: - -::: details Response - -~~~json -{ - "data": { - "channels": { - "paginatorInfo": { - "count": 1, - "currentPage": 1, - "lastPage": 1, - "total": 1 - }, - "data": [ - { - "id": "1", - "code": "default", - "name": "Default", - "description": null, - "theme": "velocity", - "homePageContent": "\n

@include(\"shop::home.slider\") @include(\"shop::home.featured-products\") @include(\"shop::home.new-products\")

\n
\n
\n \"test\"\n
\n
\n \"test\"\n \"test\"\n
\n
\n ", - "footerContent": "\n \n
\n Connect With Us\n \n
\n ", - "hostname": "http://localhost/graphql/public", - "defaultLocaleId": 1, - "baseCurrencyId": 1, - "rootCategoryId": 1, - "homeSeo": "{\"meta_title\": \"Demo store\", \"meta_keywords\": \"Demo store meta keyword\", \"meta_description\": \"Demo store meta description\"}", - "locales": [ - { - "id": "1" - } - ], - "defaultLocale": "{\"id\":1,\"code\":\"en\",\"name\":\"English\",\"created_at\":null,\"updated_at\":null,\"direction\":\"ltr\",\"locale_image\":null}", - "currencies": [ - { - "id": "1" - } - ], - "inventorySources": [ - { - "id": "1" - } - ], - "baseCurrency": "{\"id\":1,\"code\":\"USD\",\"name\":\"US Dollar\",\"created_at\":null,\"updated_at\":null,\"symbol\":\"$\"}", - "rootCategory": "{\"id\":1,\"position\":1,\"image\":null,\"status\":1,\"_lft\":1,\"_rgt\":14,\"parent_id\":null,\"created_at\":\"2021-05-05T10:06:44.000000Z\",\"updated_at\":\"2021-05-05T10:06:44.000000Z\",\"display_mode\":\"products_and_description\",\"category_icon_path\":null,\"additional\":null,\"name\":\"Root\",\"description\":\"Root\",\"slug\":\"root\",\"url_path\":\"\",\"meta_title\":\"\",\"meta_description\":\"\",\"meta_keywords\":\"\",\"translations\":[{\"id\":1,\"name\":\"Root\",\"slug\":\"root\",\"description\":\"Root\",\"meta_title\":\"\",\"meta_description\":\"\",\"meta_keywords\":\"\",\"category_id\":1,\"locale\":\"en\",\"locale_id\":null,\"url_path\":\"\"}]}", - "logoUrl": null, - "faviconUrl": null, - "success": null - } - ] - } - } -} -~~~ -::: - -### 2. Get Channel By ID - -To get the specific channel, you have to pass an `id` field with query request .By using this resource and request payload, you will get only a single object under the `data` object in response. - -- Headers - - | Key | Value | - | ------------- | --------------------- | - | Accept | application/json | - | Authorization | Bearer `token-string` | - -### Examples - -Let's take an example, - -- Request Query - ~~~Query - query channels{ - channel(id:1){ - id - code - name - description - theme - homePageContent - footerContent - hostname - defaultLocaleId - baseCurrencyId - rootCategoryId - homeSeo - locales{id} - defaultLocale - currencies{id} - inventorySources{id} - baseCurrency - rootCategory - logoUrl - faviconUrl - success - } - } - ~~~ - -::: details Response - ~~~json - { - "data": { - "channel": { - "id": "1", - "code": "default", - "name": "Default", - "description": null, - "theme": "velocity", - "homePageContent": "\n

@include(\"shop::home.slider\") @include(\"shop::home.featured-products\") @include(\"shop::home.new-products\")

\n
\n
\n \"test\"\n
\n
\n \"test\"\n \"test\"\n
\n
\n ", - "footerContent": "\n \n
\n Connect With Us\n \n
\n ", - "hostname": "http://localhost/graphql/public", - "defaultLocaleId": 1, - "baseCurrencyId": 1, - "rootCategoryId": 1, - "homeSeo": "{\"meta_title\": \"Demo store\", \"meta_keywords\": \"Demo store meta keyword\", \"meta_description\": \"Demo store meta description\"}", - "locales": [ - { - "id": "1" - } - ], - "defaultLocale": "{\"id\":1,\"code\":\"en\",\"name\":\"English\",\"created_at\":null,\"updated_at\":null,\"direction\":\"ltr\",\"locale_image\":null}", - "currencies": [ - { - "id": "1" - } - ], - "inventorySources": [ - { - "id": "1" - } - ], - "baseCurrency": "{\"id\":1,\"code\":\"USD\",\"name\":\"US Dollar\",\"created_at\":null,\"updated_at\":null,\"symbol\":\"$\"}", - "rootCategory": "{\"id\":1,\"position\":1,\"image\":null,\"status\":1,\"_lft\":1,\"_rgt\":14,\"parent_id\":null,\"created_at\":\"2021-05-05T10:06:44.000000Z\",\"updated_at\":\"2021-05-05T10:06:44.000000Z\",\"display_mode\":\"products_and_description\",\"category_icon_path\":null,\"additional\":null,\"name\":\"Root\",\"description\":\"Root\",\"slug\":\"root\",\"url_path\":\"\",\"meta_title\":\"\",\"meta_description\":\"\",\"meta_keywords\":\"\",\"translations\":[{\"id\":1,\"name\":\"Root\",\"slug\":\"root\",\"description\":\"Root\",\"meta_title\":\"\",\"meta_description\":\"\",\"meta_keywords\":\"\",\"category_id\":1,\"locale\":\"en\",\"locale_id\":null,\"url_path\":\"\"}]}", - "logoUrl": null, - "faviconUrl": null, - "success": null - } - } - } - ~~~ - -::: - -### 3. Get Filtered Channels - -You can get the filter data from the channels by passing the input fileds in the request and that you want in the response. - -- Headers - - | Key | Value | - | ------------- | --------------------- | - | Accept | application/json | - | Authorization | Bearer `token-string` | - -### Examples - -Let's take an example, - -- Request Query - -~~~query -query channels{ - channels(input: { - id: 1 - code: "default" - hostname: "http://localhost/graphql/public" - }){ - paginatorInfo { - count - currentPage - lastPage - total - } - data{ - id - code - name - description - theme - homePageContent - footerContent - hostname - defaultLocaleId - baseCurrencyId - rootCategoryId - homeSeo - locales{ - id - } - defaultLocale - currencies{ - id - } - inventorySources{ - id - } - baseCurrency - rootCategory - logoUrl - faviconUrl - success - } - } -} -~~~ - -::: details Response - ~~~json - { - "data": { - "channels": { - "paginatorInfo": { - "count": 1, - "currentPage": 1, - "lastPage": 1, - "total": 1 - }, - "data": [ - { - "id": "1", - "code": "default", - "name": "Default", - "description": null, - "theme": "velocity", - "homePageContent": "\n

@include(\"shop::home.slider\") @include(\"shop::home.featured-products\") @include(\"shop::home.new-products\")

\n
\n
\n \"test\"\n
\n
\n \"test\"\n \"test\"\n
\n
\n ", - "footerContent": "\n \n
\n Connect With Us\n \n
\n ", - "hostname": "http://localhost/graphql/public", - "defaultLocaleId": 1, - "baseCurrencyId": 1, - "rootCategoryId": 1, - "homeSeo": "{\"meta_title\": \"Demo store\", \"meta_keywords\": \"Demo store meta keyword\", \"meta_description\": \"Demo store meta description\"}", - "locales": [ - { - "id": "1" - } - ], - "defaultLocale": "{\"id\":1,\"code\":\"en\",\"name\":\"English\",\"created_at\":null,\"updated_at\":null,\"direction\":\"ltr\",\"locale_image\":null}", - "currencies": [ - { - "id": "1" - } - ], - "inventorySources": [ - { - "id": "1" - } - ], - "baseCurrency": "{\"id\":1,\"code\":\"USD\",\"name\":\"US Dollar\",\"created_at\":null,\"updated_at\":null,\"symbol\":\"$\"}", - "rootCategory": "{\"id\":1,\"position\":1,\"image\":null,\"status\":1,\"_lft\":1,\"_rgt\":14,\"parent_id\":null,\"created_at\":\"2021-05-05T10:06:44.000000Z\",\"updated_at\":\"2021-05-05T10:06:44.000000Z\",\"display_mode\":\"products_and_description\",\"category_icon_path\":null,\"additional\":null,\"name\":\"Root\",\"description\":\"Root\",\"slug\":\"root\",\"url_path\":\"\",\"meta_title\":\"\",\"meta_description\":\"\",\"meta_keywords\":\"\",\"translations\":[{\"id\":1,\"name\":\"Root\",\"slug\":\"root\",\"description\":\"Root\",\"meta_title\":\"\",\"meta_description\":\"\",\"meta_keywords\":\"\",\"category_id\":1,\"locale\":\"en\",\"locale_id\":null,\"url_path\":\"\"}]}", - "logoUrl": null, - "faviconUrl": null, - "success": null - } - ] - } - } - } - ~~~ - ::: - -### 4. Create a new Channel - - To create a Channel, you have to perform mutation on Channel and paas the related fields in the request. - API call resource will create a new Channel, only if the admin has logged in. - - - Headers - - | Key | Value | - | ------------- | --------------------- | - | Accept | application/json | - | Authorization | Bearer `token-string` | - - ### Examples - - Let's take an example, - -- Request Mutation - ~~~Mutation - mutation{ - createChannel(input:{ - code:"newca" - name:"nerty" - description:"ajsyg" - theme:"gdg" - homePageContent:"fhg" - footerContent:"fh" - hostname:"http://bag1.com" - defaultLocaleId:1 - baseCurrencyId:1 - rootCategoryId:1 - locales:1 - currencies:1 - inventorySources:1 - seoTitle:"gfyj" - seoDescription:"gcg" - seoKeywords:"gvgh" - }) - { - id - code - name - description - theme - homePageContent - footerContent - hostname - defaultLocaleId - baseCurrencyId - rootCategoryId - homeSeo - locales{id} - defaultLocale - currencies{id} - inventorySources{id} - baseCurrency - rootCategory - logoUrl - faviconUrl - success - } - } - ~~~ - -::: details Response - ~~~json - { - "data": { - "createChannel": { - "id": "2", - "code": "newca", - "name": "nerty", - "description": "ajsyg", - "theme": "gdg", - "homePageContent": "fhg", - "footerContent": "fh", - "hostname": "http://bag1.com", - "defaultLocaleId": 1, - "baseCurrencyId": 1, - "rootCategoryId": 1, - "homeSeo": "{\"meta_title\":\"gfyj\",\"meta_description\":\"gcg\",\"meta_keywords\":\"gvgh\"}", - "locales": [ - { - "id": "1" - } - ], - "defaultLocale": "{\"id\":1,\"code\":\"en\",\"name\":\"English\",\"created_at\":null,\"updated_at\":null,\"direction\":\"ltr\",\"locale_image\":null}", - "currencies": [ - { - "id": "1" - } - ], - "inventorySources": [ - { - "id": "1" - } - ], - "baseCurrency": "{\"id\":1,\"code\":\"USD\",\"name\":\"US Dollar\",\"created_at\":null,\"updated_at\":null,\"symbol\":\"$\"}", - "rootCategory": "{\"id\":1,\"position\":1,\"image\":null,\"status\":1,\"_lft\":1,\"_rgt\":14,\"parent_id\":null,\"created_at\":\"2021-05-05T10:06:44.000000Z\",\"updated_at\":\"2021-05-05T10:06:44.000000Z\",\"display_mode\":\"products_and_description\",\"category_icon_path\":null,\"additional\":null,\"name\":\"Root\",\"description\":\"Root\",\"slug\":\"root\",\"url_path\":\"\",\"meta_title\":\"\",\"meta_description\":\"\",\"meta_keywords\":\"\",\"translations\":[{\"id\":1,\"name\":\"Root\",\"slug\":\"root\",\"description\":\"Root\",\"meta_title\":\"\",\"meta_description\":\"\",\"meta_keywords\":\"\",\"category_id\":1,\"locale\":\"en\",\"locale_id\":null,\"url_path\":\"\"}]}", - "logoUrl": null, - "faviconUrl": null, - "success": null - } - } - } - ~~~ -::: - -### 5. Update Channel - -By using this API call you can update the channel. To do this , you have to perform update mutation on Channel and paas the related fields in the request. - API call resource will update a Channel, only if the admin has logged in. - - - - Headers - - | Key | Value | - | ------------- | --------------------- | - | Accept | application/json | - | Authorization | Bearer `token-string` | - - ### Examples - - Let's take an example, - -- Request Mutation - ~~~Mutation - mutation{ - updateChannel(id:3,input:{ - code:"newca" - name:"newchannel" - description:"fjy" - theme:"default" - homePageContent:"wfedh" - footerContent:"wygdeyjufw" - hostname:"http:newhost" - defaultLocaleId:1 - baseCurrencyId:1 - rootCategoryId:1 - locales:1 - currencies:1 - inventorySources:1 - seoTitle:"hghefd" - seoDescription:"whfj" - seoKeywords:"wedf" - }) - { - id - code - name - description - theme - homePageContent - footerContent - hostname - defaultLocaleId - baseCurrencyId - rootCategoryId - homeSeo - locales{id} - defaultLocale - currencies{id} - inventorySources{id} - baseCurrency - rootCategory - logoUrl - faviconUrl - success - } - } - ~~~ - -::: details Response - ~~~json - { - "data": { - "updateChannel": { - "id": "3", - "code": "newchannel", - "name": "newchannel", - "description": "fjy", - "theme": "default", - "homePageContent": "wfedh", - "footerContent": "wygdeyjufw", - "hostname": "http:newhost", - "defaultLocaleId": 1, - "baseCurrencyId": 1, - "rootCategoryId": 1, - "homeSeo": "{\"meta_title\":\"hghefd\",\"meta_description\":\"whfj\",\"meta_keywords\":\"wedf\"}", - "locales": [ - { - "id": "1" - } - ], - "defaultLocale": "{\"id\":1,\"code\":\"en\",\"name\":\"English\",\"created_at\":null,\"updated_at\":null,\"direction\":\"ltr\",\"locale_image\":null}", - "currencies": [ - { - "id": "1" - } - ], - "inventorySources": [ - { - "id": "1" - } - ], - "baseCurrency": "{\"id\":1,\"code\":\"USD\",\"name\":\"US Dollar\",\"created_at\":null,\"updated_at\":null,\"symbol\":\"$\"}", - "rootCategory": "{\"id\":1,\"position\":1,\"image\":null,\"status\":1,\"_lft\":1,\"_rgt\":14,\"parent_id\":null,\"created_at\":\"2021-05-05T10:06:44.000000Z\",\"updated_at\":\"2021-05-05T10:06:44.000000Z\",\"display_mode\":\"products_and_description\",\"category_icon_path\":null,\"additional\":null,\"name\":\"Root\",\"description\":\"Root\",\"slug\":\"root\",\"url_path\":\"\",\"meta_title\":\"\",\"meta_description\":\"\",\"meta_keywords\":\"\",\"translations\":[{\"id\":1,\"name\":\"Root\",\"slug\":\"root\",\"description\":\"Root\",\"meta_title\":\"\",\"meta_description\":\"\",\"meta_keywords\":\"\",\"category_id\":1,\"locale\":\"en\",\"locale_id\":null,\"url_path\":\"\"}]}", - "logoUrl": null, - "faviconUrl": null, - "success": null - } - } - } - ~~~ -::: - -### 6. Delete a Channel - -To delete a Channel, you have to perform mutation on Channel by passing the id of that Channel. -API call resource will channel a Channel, only if the admin has logged in. - -- Headers - - | Key | Value | - | ------------- | --------------------- | - | Accept | application/json | - | Authorization | Bearer `token-string` | - - ### Examples - - Let's take an example, - -- Request Mutation - ~~~Mutation - mutation{ - deleteChannel(id:3) - { - success - } - } - ~~~ - -::: details Response - ~~~json - { - "data": { - "deleteChannel": { - "success": "Channel deleted successfully." - } - } - } - ~~~ -::: - -## Sliders - -In this section, we will see all the APIs which are related to Slider. - -### 1. Get all Slider - -You can get all the Slider from the Bagisto store. You can achieve this job by using the `slider` API call. - -- Headers - - | Key | Value | - | ------------- | ---------------- | - | Accept | application/json | - -- Single Request Endpoint - - `POST http(s)://example.com/graphql` - -::: tip - - If you are using pagination and want to know more info about responses then check the [explanation](./explanation) portion. - -::: - -- Query - ~~~query - query sliders{ - sliders(page:1){ - paginatorInfo { - count - currentPage - lastPage - total - } - data{ - id - title - path - content - channelId - locale - sliderPath - imgPath - channel{ - id - } - } - } - } - ~~~ - -::: details Response - -~~~json -{ - "data": { - "sliders": { - "paginatorInfo": { - "count": 1, - "currentPage": 1, - "lastPage": 1, - "total": 1 - }, - "data": [ - { - "id": "1", - "title": "testslider", - "path": "slider_images/Default/1L0uZrZrMaadZGRh8pNCLcKXNhrhQugs84AXRkui.jpg", - "content": "

testcontent

", - "channelId": "1", - "locale": "en", - "sliderPath": "test", - "imgPath": null, - "channel": { - "id": "1" - } - } - ] - } - } -} -~~~ -::: - -### 2. Get Slider By ID - -To get the specific Slider, you have to pass an `id` field with query request .By using this resource and request payload, you will get only a single object under the `data` object in response. - -- Headers - - | Key | Value | - | ------------- | --------------------- | - | Accept | application/json | - | Authorization | Bearer `token-string` | - -### Examples - -Let's take an example, - -- Request Query - ~~~Query - query slider{ - slider(id:1){ - id - title - path - content - channelId - locale - sliderPath - imgPath - channel{ - id - } - } - } - ~~~ - -::: details Response - ~~~json - { - "data": { - "slider": { - "id": "1", - "title": "testslider", - "path": "slider_images/Default/1L0uZrZrMaadZGRh8pNCLcKXNhrhQugs84AXRkui.jpg", - "content": "

testcontent

", - "channelId": "1", - "locale": "en", - "sliderPath": "test", - "imgPath": null, - "channel": { - "id": "1" - } - } - } - } - ~~~ - -::: - -### 3. Get Filtered Sliders - -You can get the filter data from the Sliders by passing the input fileds in the request and that you want in the response. - -- Headers - - | Key | Value | - | ------------- | --------------------- | - | Accept | application/json | - | Authorization | Bearer `token-string` | - -### Examples - -Let's take an example, - -- Request Query - -~~~query - query sliders{ - sliders(input: { - id:1 - title: "testslider" - locale: "en" - },page:1){ - paginatorInfo { - count - currentPage - lastPage - total - } - data{ - id - title - path - content - channelId - locale - sliderPath - imgPath - channel{ - id - } - } - } - } -~~~ - -::: details Response - ~~~json - { - "data": { - "sliders": { - "paginatorInfo": { - "count": 1, - "currentPage": 1, - "lastPage": 1, - "total": 1 - }, - "data": [ - { - "id": "1", - "title": "testslider", - "path": "slider_images/Default/1L0uZrZrMaadZGRh8pNCLcKXNhrhQugs84AXRkui.jpg", - "content": "

testcontent

", - "channelId": "1", - "locale": "en", - "sliderPath": "test", - "imgPath": null, - "channel": { - "id": "1" - } - } - ] - } - } - } - ~~~ -::: - -## User Roles - -In this section, we will see all the APIs which are related to User Roles. - -### 1. Get all User Roles - -You can get all the User Roles from the Bagisto store. You can achieve this job by using the `user roles` API call. - -- Headers - - | Key | Value | - | ------------- | ---------------- | - | Accept | application/json | - -- Single Request Endpoint - - `POST http(s)://example.com/graphql` - -::: tip - - If you are using pagination and want to know more info about responses then check the [explanation](./explanation) portion. - -::: - -- Query - ~~~query - query roles{ - roles(page:1){ - paginatorInfo { - count - currentPage - lastPage - total - } - data{ - id - name - description - permissionType - permissions - createdAt - updatedAt - success - } - } - } - ~~~ - -::: details Response - -~~~json -{ - "data": { - "roles": { - "paginatorInfo": { - "count": 1, - "currentPage": 1, - "lastPage": 1, - "total": 1 - }, - "data": [ - { - "id": "1", - "name": "Administrator", - "description": "Administrator role", - "permissionType": "all", - "permissions": null, - "createdAt": null, - "updatedAt": null, - "success": null - } - ] - } - } -} -~~~ -::: - -### 2. Get User Roles By ID - -To get the specific User Roles, you have to pass an `id` field with query request .By using this resource and request payload, you will get only a single object under the `data` object in response. - -- Headers - - | Key | Value | - | ------------- | --------------------- | - | Accept | application/json | - | Authorization | Bearer `token-string` | - -### Examples - -Let's take an example, - -- Request Query - ~~~Query - query role{ - role(id:1){ - id - name - description - permissionType - permissions - createdAt - updatedAt - success - } - } - ~~~ - -::: details Response - ~~~json - { - "data": { - "role": { - "id": "1", - "name": "Administrator", - "description": "Administrator role", - "permissionType": "all", - "permissions": null, - "createdAt": null, - "updatedAt": null, - "success": null - } - } - } - ~~~ - -::: - -### 3. Get Filtered User Roles - -You can get the filter data from the User Roles by passing the input fileds in the request and that you want in the response. - -- Headers - - | Key | Value | - | ------------- | --------------------- | - | Accept | application/json | - | Authorization | Bearer `token-string` | - -### Examples - -Let's take an example, - -- Request Query - -~~~query - query roles{ - roles(input: { - name: "Administrator" - permissionType: "all" - }, page:1){ - paginatorInfo { - count - currentPage - lastPage - total - } - data{ - id - name - description - permissionType - permissions - createdAt - updatedAt - success - } - } - } -~~~ - -::: details Response - ~~~json - { - "data": { - "roles": { - "paginatorInfo": { - "count": 1, - "currentPage": 1, - "lastPage": 1, - "total": 1 - }, - "data": [ - { - "id": "1", - "name": "Administrator", - "description": "Administrator role", - "permissionType": "all", - "permissions": null, - "createdAt": null, - "updatedAt": null, - "success": null - } - ] - } - } - } - ~~~ -::: - -### 4. Create a new User Roles - - To create a User Roles, you have to perform mutation on User Roles and paas the related fields in the request. - API call resource will create a new User Roles, only if the admin has logged in. - - - Headers - - | Key | Value | - | ------------- | --------------------- | - | Accept | application/json | - | Authorization | Bearer `token-string` | - - ### Examples - - Let's take an example, - -- Request Mutation - ~~~Mutation - mutation{ - createRole(input:{ - name:"custom" - description:"rle description fo user" - permissionType:"Custom" - permissions:["dashboard","sales","sales.orders"] - }){ - id - name - description - permissionType - permissions - createdAt - updatedAt - success - } - } - ~~~ - -::: details Response - ~~~json - { - "data": { - "createRole": { - "id": "2", - "name": "custom", - "description": "rle description fo user", - "permissionType": "Custom", - "permissions": [ - "dashboard", - "sales", - "sales.orders" - ], - "createdAt": "2021-05-21 17:35:21", - "updatedAt": "2021-05-21 17:35:21", - "success": null - } - } - } - ~~~ -::: - -### 5. Update User Roles - -By using this API call you can update the User Roles. To do this , you have to perform update mutation on User Roles and paas the related fields in the request. - API call resource will update a User Roles, only if the admin has logged in. - - - - Headers - - | Key | Value | - | ------------- | --------------------- | - | Accept | application/json | - | Authorization | Bearer `token-string` | - - ### Examples - - Let's take an example, - -- Request Mutation - ~~~Mutation - mutation{ - updateRole(id:2,input:{ - name:"custom" - description:"hsdh" - permissionType:"Custom" - permissions:["Dashboard","Sales","Sales.Orders","Sales.Invoice","Sales.Shipment"] - }) - { - id - name - description - permissionType - permissions - createdAt - updatedAt - success - } - } - ~~~ - -::: details Response - ~~~json - { - "data": { - "updateRole": { - "id": "2", - "name": "custom", - "description": "hsdh", - "permissionType": "Custom", - "permissions": [ - "Dashboard", - "Sales", - "Sales.Orders", - "Sales.Invoice", - "Sales.Shipment" - ], - "createdAt": "2021-05-21 17:35:21", - "updatedAt": "2021-05-21 17:38:35", - "success": null - } - } - } - ~~~ -::: - -### 6. Delete a User Roles - -To delete a User Roles, you have to perform mutation on User Roles by passing the id of that User Roles. -API call resource will User Roles a User Roles, only if the admin has logged in. - -- Headers - - | Key | Value | - | ------------- | --------------------- | - | Accept | application/json | - | Authorization | Bearer `token-string` | - - ### Examples - - Let's take an example, - -- Request Mutation - ~~~Mutation - mutation{ - deleteRole(id:2){ - success - } - } - ~~~ - -::: details Response - ~~~json - { - "data": { - "deleteRole": { - "success": "Role deleted successfully." - } - } - } - ~~~ -::: - -## Tax Rates - -In this section, we will see all the APIs which are related to Tax Rates. - -### 1. Get all Tax Rates - -You can get all the Tax Rates from the Bagisto store. You can achieve this job by using the `tax rates` API call. - -- Headers - - | Key | Value | - | ------------- | ---------------- | - | Accept | application/json | - -- Single Request Endpoint - - `POST http(s)://example.com/graphql` - -::: tip - - If you are using pagination and want to know more info about responses then check the [explanation](./explanation) portion. - -::: - -- Query - ~~~query - query taxRates{ - taxRates(page:1){ - paginatorInfo { - count - currentPage - lastPage - total - } - data{ - id - identifier - isZip - zipCode - zipFrom - zipTo - state - country - taxRate - taxCategories{ - id - code - name - } - success - } - } - } - ~~~ - -::: details Response - -~~~json -{ - "data": { - "taxRates": { - "paginatorInfo": { - "count": 1, - "currentPage": 1, - "lastPage": 1, - "total": 1 - }, - "data": [ - { - "id": "1", - "identifier": "test", - "isZip": 1, - "zipCode": null, - "zipFrom": "46077", - "zipTo": "46080", - "state": "KL", - "country": "IN", - "taxRate": 3, - "taxCategories": [], - "success": null - } - ] - } - } -} -~~~ -::: - -### 2. Get Tax Rates By ID - -To get the specific Tax Rates, you have to pass an `id` field with query request .By using this resource and request payload, you will get only a single object under the `data` object in response. - -- Headers - - | Key | Value | - | ------------- | --------------------- | - | Accept | application/json | - | Authorization | Bearer `token-string` | - -### Examples - -Let's take an example, - -- Request Query - ~~~Query - query taxRate{ - taxRate(id:1){ - id - identifier - isZip - zipCode - zipFrom - zipTo - state - country - taxRate - taxCategories{ - id - code - name - } - success - } - } - ~~~ - -::: details Response - ~~~json - { - "data": { - "taxRate": { - "id": "1", - "identifier": "test", - "isZip": 1, - "zipCode": null, - "zipFrom": "46077", - "zipTo": "46080", - "state": "KL", - "country": "IN", - "taxRate": 3, - "taxCategories": [], - "success": null - } - } - } - ~~~ - -::: - -### 3. Get Filtered Tax Rates - -You can get the filter data from the Tax Rates by passing the input fileds in the request and that you want in the response. - -- Headers - - | Key | Value | - | ------------- | --------------------- | - | Accept | application/json | - | Authorization | Bearer `token-string` | - -### Examples - -Let's take an example, - -- Request Query - -~~~query - query taxRates{ - taxRates(input: { - id: 1 - identifier: "test" - isZip: 1 - }, page:1){ - paginatorInfo { - count - currentPage - lastPage - total - } - data{ - id - identifier - isZip - zipCode - zipFrom - zipTo - state - country - taxRate - taxCategories{ - id - code - name - } - success - } - } - } -~~~ - -::: details Response - ~~~json - { - "data": { - "taxRates": { - "paginatorInfo": { - "count": 1, - "currentPage": 1, - "lastPage": 1, - "total": 1 - }, - "data": [ - { - "id": "1", - "identifier": "test", - "isZip": 1, - "zipCode": null, - "zipFrom": "46077", - "zipTo": "46080", - "state": "KL", - "country": "IN", - "taxRate": 3, - "taxCategories": [], - "success": null - } - ] - } - } - } - ~~~ -::: - -### 4. Create a new Tax Rate - - To create a Tax Rate, you have to perform mutation on Tax Rate and paas the related fields in the request. - API call resource will create a new Tax Rate, only if the admin has logged in. - - - Headers - - | Key | Value | - | ------------- | --------------------- | - | Accept | application/json | - | Authorization | Bearer `token-string` | - - ### Examples - - Let's take an example, - -- Request Mutation - ~~~Mutation - mutation{ - createTaxRate(input:{ - identifier:"taxrate3" - isZip:1 - zipFrom:"201301" - zipTo:"273003" - state:"UP" - country:"IN" - taxRate:5 - }){ - id - identifier - isZip - zipCode - zipFrom - zipTo - state - country - taxRate - taxCategories{id} - success - } - } - ~~~ - -::: details Response - ~~~json - { - "data": { - "createTaxRate": { - "id": "2", - "identifier": "taxrate3", - "isZip": 1, - "zipCode": null, - "zipFrom": "201301", - "zipTo": "273003", - "state": "UP", - "country": "IN", - "taxRate": 5, - "taxCategories": [], - "success": null - } - } - } - ~~~ -::: - -### 5. Update Tax Rate - -By using this API call you can update the Tax Rate. To do this , you have to perform update mutation on Tax Rate and paas the related fields in the request. - API call resource will update a Tax Rate, only if the admin has logged in. - - - - Headers - - | Key | Value | - | ------------- | --------------------- | - | Accept | application/json | - | Authorization | Bearer `token-string` | - - ### Examples - - Let's take an example, - -- Request Mutation - ~~~Mutation - mutation{ - updateTaxRate(id:2,input:{ - identifier:"NEW" - isZip:1 - zipCode:"0" - zipFrom:"201301" - zipTo:"273003" - state:"UP" - country:"IN" - taxRate:2 - }){ - id - identifier - isZip - zipCode - zipFrom - zipTo - state - country - taxRate - taxCategories{id} - success - } - } - ~~~ - -::: details Response - ~~~json - { - "data": { - "updateTaxRate": { - "id": "2", - "identifier": "NEW", - "isZip": 1, - "zipCode": "0", - "zipFrom": "201301", - "zipTo": "273003", - "state": "UP", - "country": "IN", - "taxRate": 2, - "taxCategories": [], - "success": null - } - } - } - ~~~ -::: - -### 6. Delete a Tax Rate - -To delete a Tax Rate, you have to perform mutation on Tax Rate by passing the id of that Tax Rate. -API call resource will Tax Rate a Tax Rate, only if the admin has logged in. - -- Headers - - | Key | Value | - | ------------- | --------------------- | - | Accept | application/json | - | Authorization | Bearer `token-string` | - - ### Examples - - Let's take an example, - -- Request Mutation - ~~~Mutation - mutation{ - deleteTaxRate(id:2){ - success - } - } - ~~~ - -::: details Response - ~~~json - { - "data": { - "deleteTaxRate": { - "success": "Tax Rate deleted successfully." - } - } - } - ~~~ -::: - -## Tax Categories - -In this section, we will see all the APIs which are related to Tax Categories. - -### 1. Get all Tax Categories - -You can get all the Tax Categories from the Bagisto store. You can achieve this job by using the `tax categories` API call. - -- Headers - - | Key | Value | - | ------------- | ---------------- | - | Accept | application/json | - -- Single Request Endpoint - - `POST http(s)://example.com/graphql` - -::: tip - - If you are using pagination and want to know more info about responses then check the [explanation](./explanation) portion. - -::: - -- Query - ~~~query - query taxCategories{ - taxCategories(page:1){ - paginatorInfo { - count - currentPage - lastPage - total - } - data{ - id - code - name - description - taxRates{id} - success - } - } - } - ~~~ - -::: details Response - -~~~json -{ - "data": { - "taxCategories": { - "paginatorInfo": { - "count": 1, - "currentPage": 1, - "lastPage": 1, - "total": 1 - }, - "data": [ - { - "id": "1", - "code": "test1", - "name": "testCategory", - "description": "testCategory", - "taxRates": [ - { - "id": "1" - } - ], - "success": null - } - ] - } - } -} -~~~ -::: - -### 2. Get Tax Category By ID - -To get the specific Tax Category, you have to pass an `id` field with query request .By using this resource and request payload, you will get only a single object under the `data` object in response. - -- Headers - - | Key | Value | - | ------------- | --------------------- | - | Accept | application/json | - | Authorization | Bearer `token-string` | - -### Examples - -Let's take an example, - -- Request Query - ~~~Query - query taxCategory{ - taxCategory(id:1){ - id - code - name - description - taxRates{ - id - identifier - isZip - zipCode - zipFrom - zipTo - state - country - taxRate - } - success - } - } - ~~~ - -::: details Response - ~~~json - { - "data": { - "taxCategory": { - "id": "1", - "code": "test1", - "name": "testCategory", - "description": "testCategory", - "taxRates": [ - { - "id": "1", - "identifier": "test", - "isZip": 1, - "zipCode": null, - "zipFrom": "46077", - "zipTo": "46080", - "state": "KL", - "country": "IN", - "taxRate": 3 - } - ], - "success": null - } - } - } - ~~~ - -::: - -### 3. Get Filtered Tax Categories - -You can get the filter data from the Tax Categories by passing the input fileds in the request and that you want in the response. - -- Headers - - | Key | Value | - | ------------- | --------------------- | - | Accept | application/json | - | Authorization | Bearer `token-string` | - -### Examples - -Let's take an example, - -- Request Query - -~~~query - query taxCategories{ - taxCategories(input: { - id: 1 - code: "test1" - name: "testCategory" - },page:1){ - paginatorInfo { - count - currentPage - lastPage - total - - } - data{ - id - code - name - description - taxRates{id} - success - } - } - } -~~~ - -::: details Response - ~~~json - { - "data": { - "taxCategories": { - "paginatorInfo": { - "count": 1, - "currentPage": 1, - "lastPage": 1, - "total": 1 - }, - "data": [ - { - "id": "1", - "code": "test1", - "name": "testCategory", - "description": "testCategory", - "taxRates": [ - { - "id": "1" - } - ], - "success": null - } - ] - } - } - } - ~~~ -::: - -### 4. Create a new Tax Category - - To create a Tax Category, you have to perform mutation on Tax Category and paas the related fields in the request. - API call resource will create a new Tax Category, only if the admin has logged in. - - - Headers - - | Key | Value | - | ------------- | --------------------- | - | Accept | application/json | - | Authorization | Bearer `token-string` | - - ### Examples - - Let's take an example, - -- Request Mutation - ~~~Mutation - mutation{ - createTaxCategory(input:{ - code:"taxablegoods" - name:"TaxableGoods" - description:"hgasgsja" - taxrates:1 - }) - { - id - code - name - description - taxRates{id} - success - } - } - ~~~ - -::: details Response - ~~~json - { - "data": { - "createTaxCategory": { - "id": "2", - "code": "taxablegoods", - "name": "TaxableGoods", - "description": "hgasgsja", - "taxRates": [ - { - "id": "1" - } - ], - "success": null - } - } - } - ~~~ -::: - -### 5. Update Tax Category - -By using this API call you can update the Tax Category. To do this , you have to perform update mutation on Tax Category and paas the related fields in the request. - API call resource will update a Tax Category, only if the admin has logged in. - - - - Headers - - | Key | Value | - | ------------- | --------------------- | - | Accept | application/json | - | Authorization | Bearer `token-string` | - - ### Examples - - Let's take an example, - -- Request Mutation - ~~~Mutation - mutation{ - updateTaxCategory(id:2,input:{ - code:"taxable" - name:"TaxableGoods" - description:"adding taxrate" - taxrates:1 - - }){ - id - code - name - description - taxRates{id} - success - } - } - ~~~ - -::: details Response - ~~~json - { - "data": { - "updateTaxCategory": { - "id": "2", - "code": "taxable", - "name": "TaxableGoods", - "description": "adding taxrate", - "taxRates": [ - { - "id": "1" - } - ], - "success": null - } - } - } - ~~~ -::: - -### 6. Delete a Tax Category - -To delete a Tax Category, you have to perform mutation on Tax Category by passing the id of that Tax Category. -API call resource will Tax Category a Tax Category, only if the admin has logged in. - -- Headers - - | Key | Value | - | ------------- | --------------------- | - | Accept | application/json | - | Authorization | Bearer `token-string` | - - ### Examples - - Let's take an example, - -- Request Mutation - ~~~Mutation - mutation{ - deleteTaxCategory(id:2){ - success - } - } - ~~~ - -::: details Response - ~~~json - { - "data": { - "deleteTaxCategory": { - "success": "Tax Category deleted successfully." - } - } - } - ~~~ -::: diff --git a/docs/1.x/graphql-admin-api/velocity.md b/docs/1.x/graphql-admin-api/velocity.md deleted file mode 100644 index 8f575069..00000000 --- a/docs/1.x/graphql-admin-api/velocity.md +++ /dev/null @@ -1,897 +0,0 @@ -## Meta Data - -In this section, we will see all the APIs which are related to Velocity Meta Data. - -### 1. Get MetaData - -You can get all the MetaData from the Bagisto store. You can achieve this job by using the `MetaData` API call. - -- Headers - - | Key | Value | - | ------------- | ---------------- | - | Accept | application/json | - -- Single Request Endpoint - - `POST http(s)://example.com/graphql` - -::: tip - - If you are using pagination and want to know more info about responses then check the [explanation](./explanation) portion. - -::: - -**Note**: You can pass all the related fileds that you want in response. - -- Query - ~~~query - query velocityMetaData { - velocityMetaData(page: 1) { - paginatorInfo { - count - currentPage - lastPage - total - } - data { - id - homePageContent - footerLeftContent - footerMiddleContent - slider - advertisement - sidebarCategoryCount - featuredProductCount - newProductsCount - subscriptionBarContent - productViewImages - productPolicy - locale - channel - headerContentCount - createdAt - updatedAt - } - } - } - ~~~ - -::: details Response - -~~~json -{ - "data": { - "velocityMetaData": { - "paginatorInfo": { - "count": 1, - "currentPage": 1, - "lastPage": 1, - "total": 1 - }, - "data": [ - { - "id": "1", - "homePageContent": "

@include('shop::home.advertisements.advertisement-four')@include('shop::home.featured-products') @include('shop::home.product-policy') @include('shop::home.advertisements.advertisement-three') @include('shop::home.new-products') @include('shop::home.advertisements.advertisement-two')

", - "footerLeftContent": "

We love to craft softwares and solve the real world problems with the binaries. We are highly committed to our goals. We invest our resources to create world class easy to use softwares and applications for the enterprise business with the top notch, on the edge technology expertise.

", - "footerMiddleContent": "", - "slider": true, - "advertisement": "null", - "sidebarCategoryCount": 9, - "featuredProductCount": 10, - "newProductsCount": 10, - "subscriptionBarContent": "", - "productViewImages": null, - "productPolicy": "
Free Shipping on Order $20 or More
Product Replace & Return Available
Product Exchange and EMI Available
", - "locale": "en", - "channel": "default", - "headerContentCount": "5", - "createdAt": null, - "updatedAt": null - } - ] - } - } -} -~~~ -::: - -### 2. Get Meta Data By ID - -To get the specific Meta Data, you have to pass an `id` field with query request .By using this resource and request payload, you will get only a single object under the `data` object in response. - -- Headers - - | Key | Value | - | ------------- | --------------------- | - | Accept | application/json | - | Authorization | Bearer `token-string` | - -### Examples - -Let's take an example, - -- Request Query - ~~~Query - query metaData { - metaData(id: 1){ - id - homePageContent - footerLeftContent - footerMiddleContent - slider - advertisement - sidebarCategoryCount - featuredProductCount - newProductsCount - subscriptionBarContent - productViewImages - productPolicy - locale - channel - headerContentCount - createdAt - updatedAt - } - } - ~~~ - -::: details Response - ~~~json - { - "data": { - "metaData": { - "id": "1", - "homePageContent": "

@include('shop::home.advertisements.advertisement-four')@include('shop::home.featured-products') @include('shop::home.product-policy') @include('shop::home.advertisements.advertisement-three') @include('shop::home.new-products') @include('shop::home.advertisements.advertisement-two')

", - "footerLeftContent": "

We love to craft softwares and solve the real world problems with the binaries. We are highly committed to our goals. We invest our resources to create world class easy to use softwares and applications for the enterprise business with the top notch, on the edge technology expertise.

", - "footerMiddleContent": "", - "slider": true, - "advertisement": "null", - "sidebarCategoryCount": 9, - "featuredProductCount": 10, - "newProductsCount": 10, - "subscriptionBarContent": "", - "productViewImages": null, - "productPolicy": "
Free Shipping on Order $20 or More
Product Replace & Return Available
Product Exchange and EMI Available
", - "locale": "en", - "channel": "default", - "headerContentCount": "5", - "createdAt": null, - "updatedAt": null - } - } - } - ~~~ - -::: - -### 3. Update Meta Data - -By using this API call you can update the Meta Data. To do this , you have to perform update mutation on Meta Data and paas the related fields in the request. -API call will update a Meta Data, only if the admin has logged in. - - - - Headers - - | Key | Value | - | ------------- | --------------------- | - | Accept | application/json | - | Authorization | Bearer `token-string` | - - ### Examples - - Let's take an example, - -- Request Mutation - ~~~Mutation - mutation{ - updateMetaData(id:1,input:{ - homePageContent: "

@include('shop::home.advertisements.advertisement-four')@include('shop::home.featured-products') @include('shop::home.product-policy') @include('shop::home.advertisements.advertisement-three') @include('shop::home.new-products') @include('shop::home.advertisements.advertisement-two')

", - footerLeftContent: "

We love to craft softwares and solve the real world problems with the binaries. We are highly committed to our goals. We invest our resources to create world class easy to use softwares and applications for the enterprise business with the top notch, on the edge technology expertise.

", - footerMiddleContent: "", - slider: true, - sidebarCategoryCount: 9, - featuredProductCount: 5, - newProductsCount: 5, - subscriptionBarContent: "", - productPolicy: "
Free Shipping on Order $20 or More
Product Replace & Return Available
Product Exchange and EMI Available
", - locale: "en", - channel: "default", - headerContentCount: 9, - images: { - advertisementFour: [ - "https://demo.bagisto.com/bagisto-182-75-44-194/cache/large/product/157/tnyNbLh4GDwMy0P3qwbP5OcFU0nr9g9j0zhNyFiA.jpeg" - "https://demo.bagisto.com/bagisto-182-75-44-194/cache/large/product/157/tnyNbLh4GDwMy0P3qwbP5OcFU0nr9g9j0zhNyFiA.jpeg" - ] - advertisementThree: [ - "https://demo.bagisto.com/bagisto-182-75-44-194/cache/large/product/157/tnyNbLh4GDwMy0P3qwbP5OcFU0nr9g9j0zhNyFiA.jpeg" - "https://demo.bagisto.com/stripe-common/themes/velocity/assets/images/big-sale-banner.png" - ] - advertisementTwo: [ - "https://demo.bagisto.com/bagisto-182-75-44-194/cache/large/product/157/tnyNbLh4GDwMy0P3qwbP5OcFU0nr9g9j0zhNyFiA.jpeg" - "https://demo.bagisto.com/bagisto-182-75-44-194/cache/large/product/157/tnyNbLh4GDwMy0P3qwbP5OcFU0nr9g9j0zhNyFiA.jpeg" - ] - } - }) { - id - homePageContent - footerLeftContent - footerMiddleContent - slider - advertisement - sidebarCategoryCount - featuredProductCount - newProductsCount - subscriptionBarContent - productViewImages - productPolicy - locale - channel - headerContentCount - createdAt - updatedAt - } - } - ~~~ - -::: details Response - ~~~json - { - "data": { - "updateMetaData": { - "id": "1", - "homePageContent": "

@include('shop::home.advertisements.advertisement-four')@include('shop::home.featured-products') @include('shop::home.product-policy') @include('shop::home.advertisements.advertisement-three') @include('shop::home.new-products') @include('shop::home.advertisements.advertisement-two')

", - "footerLeftContent": "

We love to craft softwares and solve the real world problems with the binaries. We are highly committed to our goals. We invest our resources to create world class easy to use softwares and applications for the enterprise business with the top notch, on the edge technology expertise.

", - "footerMiddleContent": "", - "slider": true, - "advertisement": "null", - "sidebarCategoryCount": 9, - "featuredProductCount": 5, - "newProductsCount": 5, - "subscriptionBarContent": "", - "productViewImages": null, - "productPolicy": "
Free Shipping on Order $20 or More
Product Replace & Return Available
Product Exchange and EMI Available
", - "locale": "en", - "channel": "default", - "headerContentCount": "9", - "createdAt": null, - "updatedAt": "2021-05-26 13:22:10" - } - } - } - ~~~ -::: - -## Header Content - -In this section, we will see all the APIs which are related to Velocity Meta Data. - -### 1. Get Header Content - -You can get all the Header Content from the Bagisto store. You can achieve this job by using the `Header Content` API call. - -- Headers - - | Key | Value | - | ------------- | ---------------- | - | Accept | application/json | - -- Single Request Endpoint - - `POST http(s)://example.com/graphql` - -::: tip - - If you are using pagination and want to know more info about responses then check the [explanation](./explanation) portion. - -::: - -**Note**: You can pass all the related fileds that you want in response. - -- Query - ~~~query - query headerContents { - headerContents { - paginatorInfo { - count - currentPage - lastPage - total - } - data { - id - contentType - position - status - translations { - id - contentId - title - customTitle - customHeading - pageLink - linkTarget - catalogType - products - description - locale - createdAt - updatedAt - } - } - } - } - ~~~ - -::: details Response - -~~~json -{ - "data": { - "headerContents": { - "paginatorInfo": { - "count": 1, - "currentPage": 1, - "lastPage": 1, - "total": 1 - }, - "data": [ - { - "id": "1", - "contentType": "category", - "position": 1, - "status": true, - "translations": [ - { - "id": "1", - "contentId": "1", - "title": "Test Header Content", - "customTitle": null, - "customHeading": null, - "pageLink": "test", - "linkTarget": false, - "catalogType": null, - "products": null, - "description": null, - "locale": "en", - "createdAt": null, - "updatedAt": null - }, - { - "id": "2", - "contentId": "1", - "title": "Test Header Content", - "customTitle": null, - "customHeading": null, - "pageLink": null, - "linkTarget": false, - "catalogType": null, - "products": null, - "description": null, - "locale": "nl", - "createdAt": null, - "updatedAt": null - }, - { - "id": "3", - "contentId": "1", - "title": "Test Header Content", - "customTitle": null, - "customHeading": null, - "pageLink": null, - "linkTarget": false, - "catalogType": null, - "products": null, - "description": null, - "locale": "tr", - "createdAt": null, - "updatedAt": null - } - ] - } - ] - } - } -} -~~~ -::: - -### 2. Get Header Content By ID - -To get the specific Header Content, you have to pass an `id` field with query request .By using this resource and request payload, you will get only a single object under the `data` object in response. - -- Headers - - | Key | Value | - | ------------- | --------------------- | - | Accept | application/json | - | Authorization | Bearer `token-string` | - -### Examples - -Let's take an example, - -- Request Query - ~~~Query - query headerContent { - headerContent(id: 1) { - id - contentType - position - status - translations { - id - contentId - title - customTitle - customHeading - pageLink - linkTarget - catalogType - products - description - locale - createdAt - updatedAt - } - } - } - ~~~ - -::: details Response - ~~~json - { - "data": { - "headerContent": { - "id": "1", - "contentType": "category", - "position": 1, - "status": true, - "translations": [ - { - "id": "1", - "contentId": "1", - "title": "Test Header Content", - "customTitle": null, - "customHeading": null, - "pageLink": "test", - "linkTarget": false, - "catalogType": null, - "products": null, - "description": null, - "locale": "en", - "createdAt": null, - "updatedAt": null - }, - { - "id": "2", - "contentId": "1", - "title": "Test Header Content", - "customTitle": null, - "customHeading": null, - "pageLink": null, - "linkTarget": false, - "catalogType": null, - "products": null, - "description": null, - "locale": "nl", - "createdAt": null, - "updatedAt": null - }, - { - "id": "3", - "contentId": "1", - "title": "Test Header Content", - "customTitle": null, - "customHeading": null, - "pageLink": null, - "linkTarget": false, - "catalogType": null, - "products": null, - "description": null, - "locale": "tr", - "createdAt": null, - "updatedAt": null - } - ] - } - } - } - ~~~ -::: - -### 3. Get Filtered Header Content - -You can get the filter data from the Header Content by passing the input fileds in the request and that you want in the response. - -- Headers - - | Key | Value | - | ------------- | --------------------- | - | Accept | application/json | - | Authorization | Bearer `token-string` | - -**Note**: You can pass all the related fileds that you want in response. - -### Examples - -Let's take an example, - -- Request Query - -~~~query - query headerContents { - headerContents(input: { - id:1 - contentType: "category" - }, page: 1) { - paginatorInfo { - count - currentPage - lastPage - total - } - data { - id - contentType - position - status - translations { - id - contentId - title - customTitle - customHeading - pageLink - linkTarget - catalogType - products - description - locale - createdAt - updatedAt - } - } - } - } -~~~ - -::: details Response - ~~~json - { - "data": { - "headerContents": { - "paginatorInfo": { - "count": 1, - "currentPage": 1, - "lastPage": 1, - "total": 1 - }, - "data": [ - { - "id": "1", - "contentType": "category", - "position": 1, - "status": true, - "translations": [ - { - "id": "1", - "contentId": "1", - "title": "Test Header Content", - "customTitle": null, - "customHeading": null, - "pageLink": "test", - "linkTarget": false, - "catalogType": null, - "products": null, - "description": null, - "locale": "en", - "createdAt": null, - "updatedAt": null - }, - { - "id": "2", - "contentId": "1", - "title": "Test Header Content", - "customTitle": null, - "customHeading": null, - "pageLink": null, - "linkTarget": false, - "catalogType": null, - "products": null, - "description": null, - "locale": "nl", - "createdAt": null, - "updatedAt": null - }, - { - "id": "3", - "contentId": "1", - "title": "Test Header Content", - "customTitle": null, - "customHeading": null, - "pageLink": null, - "linkTarget": false, - "catalogType": null, - "products": null, - "description": null, - "locale": "tr", - "createdAt": null, - "updatedAt": null - } - ] - } - ] - } - } - } - ~~~ -::: - -### 4. Create a new Header Content - - To create a Header Content, you have to perform mutation on Header Content and paas the related fields in the request. - API call resource will create a new Header Content, only if the admin has logged in. - - - Headers - - | Key | Value | - | ------------- | --------------------- | - | Accept | application/json | - | Authorization | Bearer `token-string` | - - ### Examples - - Let's take an example, - -- Request Mutation - ~~~Mutation - mutation createHeaderContent { - createHeaderContent(input: { - title: "Test" - position: 2 - status: false - contentType: "category" - locale: "en" - pageLink: "test" - linkTarget: true - }) { - id - contentType - position - status - translations { - id - contentId - title - customTitle - customHeading - pageLink - linkTarget - catalogType - products - description - locale - createdAt - updatedAt - } - } - } - ~~~ - -::: details Response - ~~~json - { - "data": { - "createHeaderContent": { - "id": "2", - "contentType": "category", - "position": 2, - "status": false, - "translations": [ - { - "id": "4", - "contentId": "2", - "title": "Test", - "customTitle": null, - "customHeading": null, - "pageLink": null, - "linkTarget": false, - "catalogType": null, - "products": null, - "description": null, - "locale": "en", - "createdAt": null, - "updatedAt": null - }, - { - "id": "5", - "contentId": "2", - "title": "Test", - "customTitle": null, - "customHeading": null, - "pageLink": null, - "linkTarget": false, - "catalogType": null, - "products": null, - "description": null, - "locale": "nl", - "createdAt": null, - "updatedAt": null - }, - { - "id": "6", - "contentId": "2", - "title": "Test", - "customTitle": null, - "customHeading": null, - "pageLink": null, - "linkTarget": false, - "catalogType": null, - "products": null, - "description": null, - "locale": "tr", - "createdAt": null, - "updatedAt": null - } - ] - } - } - } - ~~~ -::: - -### 5. Update Header Content - -By using this API call you can update the Header Content. To do this , you have to perform update mutation on Header Content and paas the related fields in the request. -API call will update a Header Content, only if the admin has logged in. - - - - Headers - - | Key | Value | - | ------------- | --------------------- | - | Accept | application/json | - | Authorization | Bearer `token-string` | - - ### Examples - - Let's take an example, - -- Request Mutation - ~~~Mutation - mutation updateHeaderContent { - updateHeaderContent( - id: 1, - input: { - title: "Test" - position: 2 - status: true - contentType: "category" - locale: "en" - pageLink: "test" - linkTarget: false - } - ) { - id - contentType - position - status - translations { - id - contentId - title - customTitle - customHeading - pageLink - linkTarget - catalogType - products - description - locale - createdAt - updatedAt - } - } - } - ~~~ - -::: details Response - ~~~json - { - "data": { - "updateHeaderContent": { - "id": "1", - "contentType": "category", - "position": 2, - "status": true, - "translations": [ - { - "id": "1", - "contentId": "1", - "title": "Test", - "customTitle": null, - "customHeading": null, - "pageLink": "test", - "linkTarget": false, - "catalogType": null, - "products": null, - "description": null, - "locale": "en", - "createdAt": null, - "updatedAt": null - }, - { - "id": "2", - "contentId": "1", - "title": "Test Header Content", - "customTitle": null, - "customHeading": null, - "pageLink": null, - "linkTarget": false, - "catalogType": null, - "products": null, - "description": null, - "locale": "nl", - "createdAt": null, - "updatedAt": null - }, - { - "id": "3", - "contentId": "1", - "title": "Test Header Content", - "customTitle": null, - "customHeading": null, - "pageLink": null, - "linkTarget": false, - "catalogType": null, - "products": null, - "description": null, - "locale": "tr", - "createdAt": null, - "updatedAt": null - } - ] - } - } - } - ~~~ -::: - -### 6. Delete a Header Content - -To delete a Header Content, you have to perform mutation on Header Content by passing the id of that Header Content. -API call will delete a Header Content, only if the admin has logged in. - -- Headers - - | Key | Value | - | ------------- | --------------------- | - | Accept | application/json | - | Authorization | Bearer `token-string` | - -### Examples - - Let's take an example, - -- Request Mutation - ~~~Mutation - mutation deleteHeaderContent { - deleteHeaderContent(id: 1) { - success - } - } - - ~~~ - -::: details Response - ~~~json - { - "data": { - "deleteHeaderContent": { - "success": "Header Content deleted successfully." - } - } - } - ~~~ -: \ No newline at end of file diff --git a/docs/1.x/graphql-shop-api/README.md b/docs/1.x/graphql-shop-api/README.md deleted file mode 100644 index a07c400a..00000000 --- a/docs/1.x/graphql-shop-api/README.md +++ /dev/null @@ -1,38 +0,0 @@ -# Bagisto GraphQL Shop APIs - -Bagisto GraphQL Shop API is a medium to use the features of the core Bagisto Shop System. By using Bagisto GraphQL Shop API, you can integrate your application to serve the default content of Bagisto. - -**To download and contribute: [Bagisto GraphQL API GitHub](https://github.com/bagisto/headless-ecommerce/)** - - -## Key Features - -- Bagisto GraphQL API provides a complete and understandable description of the data. -- Authentication: Customer Authentication with Login Details. -- Authentication: Admin Authentication with Login Details. -- Provide access to performed CRUD operations. -- Provide the option to filter the responses based on attribute fields. -- The Framework supports the pagination which helps to increase the performance of application. -- Get many resources in a single request. - -## Request - -- `http(s)://example.com/graphql` - -## Where can I use Bagisto GraphQL APIs? - -We can use the Bagisto GraphQL APIs in different areas. Some of them are: - -- To build a PWA (Progressive Web Application) application, which uses modern web capabilities to deliver an application like experience to the users and provide more user friendly experience than a web application. - -- Use to integrate an Online-Shopping Mobile Application with the Bagisto Store to help the customers make purchase. - -- Use to integrate with CRM (Customer Relationship Management) systems Like: HubSpot, Salesforce etc. which allows you to manage the business relationships with your customers to help you grow your business. - -- To provide exactly what you need and nothing more. - -- To get Predictable result. - -- Applications using GraphQL can be quick even on slow mobile network connections. - -- Applications for devices where bandwidth usage matters. \ No newline at end of file diff --git a/docs/1.x/graphql-shop-api/addresses.md b/docs/1.x/graphql-shop-api/addresses.md deleted file mode 100644 index 753b5e9f..00000000 --- a/docs/1.x/graphql-shop-api/addresses.md +++ /dev/null @@ -1,368 +0,0 @@ -# Customer Addresses - -In this section, we will see all the APIs which are related to Customer Addresses. - -## Get Customer Addresses - -You can get all the Customer Addresses from the Bagisto store. You can achieve this job by using the `Customer Addresses` API call. - -- Headers - - | Key | Value | - | ------------- | ---------------- | - | Accept | application/json | - -- Single Request Endpoint - - `POST http(s)://example.com/graphql` - -::: tip - - If you are using pagination and want to know more info about responses then check the [explanation](./explanation) portion. - -::: - -- Query - ~~~query - query addresses { - addresses { - id - customerId - companyName - firstName - lastName - address1 - address2 - country - state - city - postcode - phone - vatId - addressType - defaultAddress - createdAt - updatedAt - } - } - ~~~ - -::: details Response - -~~~json -{ - "data": { - "addresses": [ - { - "id": "11", - "customerId": 5, - "companyName": "Webkul", - "firstName": "Tom Demo", - "lastName": "Martin Demo", - "address1": "3180 Bluff", - "address2": "Street", - "country": "US", - "state": "PA", - "city": "GLEN CAMPBELL", - "postcode": "15742", - "phone": "234343544", - "vatId": "INV12345678904", - "addressType": "customer", - "defaultAddress": false, - "createdAt": "2021-05-28 12:59:29", - "updatedAt": "2021-05-28 12:59:29" - }, - { - "id": "12", - "customerId": 5, - "companyName": "Webkul2", - "firstName": "Tom Demo2", - "lastName": "Martin Demo2", - "address1": "3180 Bluff", - "address2": "Street", - "country": "US", - "state": "PA", - "city": "GLEN CAMPBELL", - "postcode": "15742222222", - "phone": "234343544", - "vatId": "INV12345678904", - "addressType": "customer", - "defaultAddress": false, - "createdAt": "2021-05-28 12:59:46", - "updatedAt": "2021-05-28 12:59:46" - } - ] - } -} -~~~ -::: - -## Get Customer Address By ID - -To get the specific Customer Address, you have to pass an `id` field with query request .By using this resource and request payload, you will get only a single object under the `data` object in response. - -- Headers - - | Key | Value | - | ------------- | --------------------- | - | Accept | application/json | - | Authorization | Bearer `token-string` | - -### Examples - -Let's take an example, - -- Request Query - ~~~Query - query address { - address(id: 11) { - id - customerId - companyName - firstName - lastName - address1 - address2 - country - state - city - postcode - phone - vatId - addressType - defaultAddress - createdAt - updatedAt - } - } - ~~~ - -::: details Response - ~~~json - { - "data": { - "address": { - "id": "11", - "customerId": 5, - "companyName": "Webkul", - "firstName": "Tom Demo", - "lastName": "Martin Demo", - "address1": "3180 Bluff", - "address2": "Street", - "country": "US", - "state": "PA", - "city": "GLEN CAMPBELL", - "postcode": "15742", - "phone": "234343544", - "vatId": "INV12345678904", - "addressType": "customer", - "defaultAddress": false, - "createdAt": "2021-05-28 12:59:29", - "updatedAt": "2021-05-28 12:59:29" - } - } - } - ~~~ -::: - - -## Create a new Customer Address - - To create a Customer Address, you have to perform mutation on Customer Address and paas the related fields in the request. - API call resource will create a new Customer Address, only if the Customer has logged in. - - - Headers - - | Key | Value | - | ------------- | --------------------- | - | Accept | application/json | - | Authorization | Bearer `token-string` | - -### Examples - - Let's take an example, - -- Request Mutation - ~~~Mutation - mutation createAddress { - createAddress(input: { - companyName: "Webkul2" - firstName: "Tom Demo2" - lastName: "Martin Demo2" - address1: "3180 Bluff" - address2: "Street" - country: "US" - state: "PA" - city: "GLEN CAMPBELL" - postcode: "15742222222" - phone: "234343544" - vatId: "INV12345678904" - }) { - id - customerId - companyName - firstName - lastName - address1 - address2 - country - state - city - postcode - phone - vatId - addressType - defaultAddress - createdAt - updatedAt - } - } - ~~~ - -::: details Response - ~~~json - { - "data": { - "createAddress": { - "id": "12", - "customerId": 5, - "companyName": "Webkul2", - "firstName": "Tom Demo2", - "lastName": "Martin Demo2", - "address1": "3180 Bluff", - "address2": "Street", - "country": "US", - "state": "PA", - "city": "GLEN CAMPBELL", - "postcode": "15742222222", - "phone": "234343544", - "vatId": "INV12345678904", - "addressType": "customer", - "defaultAddress": false, - "createdAt": "2021-05-28 12:59:46", - "updatedAt": "2021-05-28 12:59:46" - } - } - } - ~~~ -::: - -## Update Customer Address - -By using this API call you can update the Customer Address. To do this , you have to perform update mutation on Customer Address and paas the related fields in the request. -API call will update a Customer Address, only if the customer has logged in. - - - - Headers - - | Key | Value | - | ------------- | --------------------- | - | Accept | application/json | - | Authorization | Bearer `token-string` | - -### Examples - - Let's take an example, - -- Request Mutation - ~~~Mutation - mutation updateAddress { - updateAddress(id: 11, input: { - companyName: "Velocity" - firstName: "Tom" - lastName: "Martin" - address1: "3180 Bluff Street" - address2: "" - country: "IN" - state: "UP" - city: "Noida" - postcode: "201301" - phone: "1234123455" - vatId: "INV12342278902" - }) { - id - customerId - companyName - firstName - lastName - address1 - address2 - country - state - city - postcode - phone - vatId - addressType - defaultAddress - createdAt - updatedAt - } - } - ~~~ - -::: details Response - ~~~json - { - "data": { - "updateAddress": { - "id": "11", - "customerId": 5, - "companyName": "Velocity", - "firstName": "Tom", - "lastName": "Martin", - "address1": "3180 Bluff Street", - "address2": "", - "country": "IN", - "state": "UP", - "city": "Noida", - "postcode": "201301", - "phone": "1234123455", - "vatId": "INV12342278902", - "addressType": "customer", - "defaultAddress": false, - "createdAt": "2021-05-28 12:59:29", - "updatedAt": "2021-05-28 13:07:52" - } - } - } - ~~~ -::: - -## Delete a Customer Address - -To delete a Customer Address, you have to perform mutation on Customer Address by passing the id of that Customer Address. -API call will delete a Customer Address, only if the customer has logged in. - -- Headers - - | Key | Value | - | ------------- | --------------------- | - | Accept | application/json | - | Authorization | Bearer `token-string` | - -### Examples - - Let's take an example, - -- Request Mutation - ~~~Mutation - mutation deleteAddress { - deleteAddress(id: 11) { - success - } - } - - ~~~ - -::: details Response - ~~~json - { - "data": { - "deleteCustomerAddress": { - "success": "Customer's Address deleted successfully." - } - } - } - ~~~ -::: diff --git a/docs/1.x/graphql-shop-api/cart.md b/docs/1.x/graphql-shop-api/cart.md deleted file mode 100644 index 9d6f02ae..00000000 --- a/docs/1.x/graphql-shop-api/cart.md +++ /dev/null @@ -1,3822 +0,0 @@ -# Cart - -In this section, we will see all the APIs which are related to Customer Cart. - -## Get Cart - -You can get all the Cart from the Bagisto store. You can achieve this job by using the `Cart` API call. - -- Headers - - | Key | Value | - | ------------- | ---------------- | - | Accept | application/json | - -- Single Request Endpoint - - `POST http(s)://example.com/graphql` - -::: tip - - If you are using pagination and want to know more info about responses then check the [explanation](./explanation) portion. - -::: - -- Query - ~~~query - query cartDetail { - cartDetail { - id - customerEmail - customerFirstName - customerLastName - shippingMethod - couponCode - isGift - itemsCount - itemsQty - exchangeRate - globalCurrencyCode - baseCurrencyCode - channelCurrencyCode - cartCurrencyCode - grandTotal - baseGrandTotal - subTotal - baseSubTotal - taxTotal - baseTaxTotal - discountAmount - baseDiscountAmount - checkoutMethod - isGuest - isActive - conversionTime - customerId - channelId - appliedCartRuleIds - createdAt - updatedAt - items { - id - quantity - sku - type - name - couponCode - weight - totalWeight - baseTotalWeight - price - basePrice - total - baseTotal - taxPercent - taxAmount - baseTaxAmount - discountPercent - discountAmount - baseDiscountAmount - additional - parentId - productId - cartId - taxCategoryId - customPrice - appliedCartRuleIds - createdAt - updatedAt - product { - id - type - attributeFamilyId - sku - parentId - productFlats { - id - sku - name - description - shortDescription - urlKey - new - featured - status - visibleIndividually - thumbnail - price - cost - specialPrice - specialPriceFrom - specialPriceTo - weight - color - colorLabel - size - sizeLabel - locale - channel - productId - parentId - minPrice - maxPrice - metaTitle - metaKeywords - metaDescription - width - height - depth - variants { - id - sku - name - description - shortDescription - urlKey - new - featured - status - visibleIndividually - thumbnail - price - locale - channel - productId - parentId - } - parent { - id - sku - name - description - shortDescription - urlKey - new - featured - status - visibleIndividually - thumbnail - price - cost - specialPrice - specialPriceFrom - specialPriceTo - weight - } - createdAt - updatedAt - } - variants { - id - type - attributeFamilyId - sku - parentId - } - parent { - id - type - attributeFamilyId - sku - parentId - } - attributeFamily { - id - code - name - status - isUserDefined - } - attributeValues { - id - productId - attributeId - locale - channel - textValue - booleanValue - integerValue - floatValue - dateTimeValue - dateValue - jsonValue - attribute { - id - code - adminName - type - } - } - superAttributes { - id - code - adminName - type - position - } - categories { - id - name - description - slug - urlPath - imageUrl - metaTitle - metaDescription - metaKeywords - position - status - displayMode - parentId - filterableAttributes { - id - adminName - code - type - position - } - translations { - id - name - description - localeId - locale - } - createdAt - updatedAt - } - inventories { - id - qty - productId - inventorySourceId - vendorId - inventorySource { - id - code - name - description - contactName - contactEmail - contactNumber - contactFax - country - state - city - street - postcode - priority - latitude - longitude - status - } - } - images { - id - type - path - productId - } - orderedInventories { - id - qty - productId - channelId - } - reviews { - id - title - rating - comment - status - productId - customerId - createdAt - updatedAt - } - groupedProducts { - id - qty - sortOrder - productId - associatedProductId - associatedProduct { - id - type - attributeFamilyId - sku - parentId - } - } - downloadableSamples { - id - url - file - fileName - type - sortOrder - productId - createdAt - updatedAt - translations { - id - locale - title - productDownloadableSampleId - } - } - downloadableLinks { - id - title - price - url - file - fileName - type - sampleUrl - sampleFile - sampleFileName - sampleType - sortOrder - productId - downloads - translations { - id - locale - title - productDownloadableLinkId - } - } - bundleOptions { - id - type - isRequired - sortOrder - productId - bundleOptionProducts { - id - qty - isUserDefined - sortOrder - isDefault - productBundleOptionId - productId - } - translations { - id - locale - label - productBundleOptionId - } - } - customerGroupPrices { - id - qty - valueType - value - productId - customerGroupId - createdAt - updatedAt - } - booking { - id - type - qty - location - showLocation - availableEveryWeek - availableFrom - availableTo - productId - defaultSlot { - id - bookingType - duration - breakTime - slots { - to - toDay - from - fromDay - } - bookingProductId - } - appointmentSlot { - id - duration - breakTime - sameSlotAllDays - slots { - from - to - } - bookingProductId - } - } - } - } - } - } - ~~~ - -::: details Response - -~~~json -{ - "data": { - "cartDetail": { - "id": "6", - "customerEmail": "naresh.verma327@webkul.com", - "customerFirstName": "Naresh", - "customerLastName": "Verma", - "shippingMethod": null, - "couponCode": null, - "isGift": false, - "itemsCount": 1, - "itemsQty": 1, - "exchangeRate": null, - "globalCurrencyCode": "USD", - "baseCurrencyCode": "USD", - "channelCurrencyCode": "USD", - "cartCurrencyCode": "USD", - "grandTotal": 5, - "baseGrandTotal": 5, - "subTotal": 5, - "baseSubTotal": 5, - "taxTotal": 0, - "baseTaxTotal": 0, - "discountAmount": 0, - "baseDiscountAmount": 0, - "checkoutMethod": null, - "isGuest": false, - "isActive": true, - "conversionTime": null, - "customerId": "5", - "channelId": "1", - "appliedCartRuleIds": "", - "createdAt": "2021-05-28 17:25:25", - "updatedAt": "2021-05-28 17:25:26", - "items": [ - { - "id": "6", - "quantity": 1, - "sku": "test-product", - "type": "simple", - "name": "testOutlet", - "couponCode": null, - "weight": 3, - "totalWeight": 3, - "baseTotalWeight": 3, - "price": 5, - "basePrice": 5, - "total": 5, - "baseTotal": 5, - "taxPercent": 0, - "taxAmount": 0, - "baseTaxAmount": 0, - "discountPercent": 0, - "discountAmount": 0, - "baseDiscountAmount": 0, - "additional": "{\"quantity\":1,\"product_id\":\"1\"}", - "parentId": null, - "productId": "1", - "cartId": "6", - "taxCategoryId": null, - "customPrice": null, - "appliedCartRuleIds": "", - "createdAt": "2021-05-28 17:25:25", - "updatedAt": "2021-05-28 17:25:26", - "product": { - "id": "1", - "type": "simple", - "attributeFamilyId": 1, - "sku": "test-product", - "parentId": null, - "productFlats": [ - { - "id": "1", - "sku": "test-product", - "name": "testOutlet", - "description": "

testOutlet

", - "shortDescription": "

testOutlet

", - "urlKey": "testoutlet", - "new": true, - "featured": true, - "status": true, - "visibleIndividually": true, - "thumbnail": null, - "price": 5, - "cost": null, - "specialPrice": null, - "specialPriceFrom": null, - "specialPriceTo": null, - "weight": 3, - "color": 1, - "colorLabel": "Red", - "size": 6, - "sizeLabel": "S", - "locale": "en", - "channel": "default", - "productId": "1", - "parentId": null, - "minPrice": 5, - "maxPrice": 5, - "metaTitle": "", - "metaKeywords": "", - "metaDescription": "", - "width": 0, - "height": 0, - "depth": 0, - "variants": [], - "parent": null, - "createdAt": "2021-05-26 17:43:12", - "updatedAt": "2021-05-26 17:43:12" - } - ], - "variants": [], - "parent": null, - "attributeFamily": { - "id": "1", - "code": "default", - "name": "Default", - "status": false, - "isUserDefined": true - }, - "attributeValues": [ - { - "id": "1", - "productId": "1", - "attributeId": "9", - "locale": "en", - "channel": "default", - "textValue": "

testOutlet

", - "booleanValue": null, - "integerValue": null, - "floatValue": null, - "dateTimeValue": null, - "dateValue": null, - "jsonValue": null, - "attribute": { - "id": "9", - "code": "short_description", - "adminName": "Short Description", - "type": "textarea" - } - }, - { - "id": "2", - "productId": "1", - "attributeId": "10", - "locale": "en", - "channel": "default", - "textValue": "

testOutlet

", - "booleanValue": null, - "integerValue": null, - "floatValue": null, - "dateTimeValue": null, - "dateValue": null, - "jsonValue": null, - "attribute": { - "id": "10", - "code": "description", - "adminName": "Description", - "type": "textarea" - } - }, - { - "id": "3", - "productId": "1", - "attributeId": "1", - "locale": null, - "channel": null, - "textValue": "test-product", - "booleanValue": null, - "integerValue": null, - "floatValue": null, - "dateTimeValue": null, - "dateValue": null, - "jsonValue": null, - "attribute": { - "id": "1", - "code": "sku", - "adminName": "SKU", - "type": "text" - } - }, - { - "id": "4", - "productId": "1", - "attributeId": "2", - "locale": "en", - "channel": "default", - "textValue": "testOutlet", - "booleanValue": null, - "integerValue": null, - "floatValue": null, - "dateTimeValue": null, - "dateValue": null, - "jsonValue": null, - "attribute": { - "id": "2", - "code": "name", - "adminName": "Name", - "type": "text" - } - }, - { - "id": "5", - "productId": "1", - "attributeId": "3", - "locale": null, - "channel": null, - "textValue": "testoutlet", - "booleanValue": null, - "integerValue": null, - "floatValue": null, - "dateTimeValue": null, - "dateValue": null, - "jsonValue": null, - "attribute": { - "id": "3", - "code": "url_key", - "adminName": "URL Key", - "type": "text" - } - }, - { - "id": "6", - "productId": "1", - "attributeId": "4", - "locale": null, - "channel": "default", - "textValue": null, - "booleanValue": null, - "integerValue": 0, - "floatValue": null, - "dateTimeValue": null, - "dateValue": null, - "jsonValue": null, - "attribute": { - "id": "4", - "code": "tax_category_id", - "adminName": "Tax Category", - "type": "select" - } - }, - { - "id": "7", - "productId": "1", - "attributeId": "5", - "locale": null, - "channel": null, - "textValue": null, - "booleanValue": true, - "integerValue": null, - "floatValue": null, - "dateTimeValue": null, - "dateValue": null, - "jsonValue": null, - "attribute": { - "id": "5", - "code": "new", - "adminName": "New", - "type": "boolean" - } - }, - { - "id": "8", - "productId": "1", - "attributeId": "6", - "locale": null, - "channel": null, - "textValue": null, - "booleanValue": true, - "integerValue": null, - "floatValue": null, - "dateTimeValue": null, - "dateValue": null, - "jsonValue": null, - "attribute": { - "id": "6", - "code": "featured", - "adminName": "Featured", - "type": "boolean" - } - }, - { - "id": "9", - "productId": "1", - "attributeId": "7", - "locale": null, - "channel": null, - "textValue": null, - "booleanValue": true, - "integerValue": null, - "floatValue": null, - "dateTimeValue": null, - "dateValue": null, - "jsonValue": null, - "attribute": { - "id": "7", - "code": "visible_individually", - "adminName": "Visible Individually", - "type": "boolean" - } - }, - { - "id": "10", - "productId": "1", - "attributeId": "8", - "locale": null, - "channel": null, - "textValue": null, - "booleanValue": true, - "integerValue": null, - "floatValue": null, - "dateTimeValue": null, - "dateValue": null, - "jsonValue": null, - "attribute": { - "id": "8", - "code": "status", - "adminName": "Status", - "type": "boolean" - } - }, - { - "id": "11", - "productId": "1", - "attributeId": "23", - "locale": null, - "channel": null, - "textValue": null, - "booleanValue": null, - "integerValue": 1, - "floatValue": null, - "dateTimeValue": null, - "dateValue": null, - "jsonValue": null, - "attribute": { - "id": "23", - "code": "color", - "adminName": "Color", - "type": "select" - } - }, - { - "id": "12", - "productId": "1", - "attributeId": "24", - "locale": null, - "channel": null, - "textValue": null, - "booleanValue": null, - "integerValue": 6, - "floatValue": null, - "dateTimeValue": null, - "dateValue": null, - "jsonValue": null, - "attribute": { - "id": "24", - "code": "size", - "adminName": "Size", - "type": "select" - } - }, - { - "id": "13", - "productId": "1", - "attributeId": "26", - "locale": null, - "channel": null, - "textValue": null, - "booleanValue": true, - "integerValue": null, - "floatValue": null, - "dateTimeValue": null, - "dateValue": null, - "jsonValue": null, - "attribute": { - "id": "26", - "code": "guest_checkout", - "adminName": "Guest Checkout", - "type": "boolean" - } - }, - { - "id": "14", - "productId": "1", - "attributeId": "27", - "locale": null, - "channel": null, - "textValue": "", - "booleanValue": null, - "integerValue": null, - "floatValue": null, - "dateTimeValue": null, - "dateValue": null, - "jsonValue": null, - "attribute": { - "id": "27", - "code": "product_number", - "adminName": "Product Number", - "type": "text" - } - }, - { - "id": "15", - "productId": "1", - "attributeId": "16", - "locale": "en", - "channel": "default", - "textValue": "", - "booleanValue": null, - "integerValue": null, - "floatValue": null, - "dateTimeValue": null, - "dateValue": null, - "jsonValue": null, - "attribute": { - "id": "16", - "code": "meta_title", - "adminName": "Meta Title", - "type": "textarea" - } - }, - { - "id": "16", - "productId": "1", - "attributeId": "17", - "locale": "en", - "channel": "default", - "textValue": "", - "booleanValue": null, - "integerValue": null, - "floatValue": null, - "dateTimeValue": null, - "dateValue": null, - "jsonValue": null, - "attribute": { - "id": "17", - "code": "meta_keywords", - "adminName": "Meta Keywords", - "type": "textarea" - } - }, - { - "id": "17", - "productId": "1", - "attributeId": "18", - "locale": "en", - "channel": "default", - "textValue": "", - "booleanValue": null, - "integerValue": null, - "floatValue": null, - "dateTimeValue": null, - "dateValue": null, - "jsonValue": null, - "attribute": { - "id": "18", - "code": "meta_description", - "adminName": "Meta Description", - "type": "textarea" - } - }, - { - "id": "18", - "productId": "1", - "attributeId": "11", - "locale": null, - "channel": null, - "textValue": null, - "booleanValue": null, - "integerValue": null, - "floatValue": 5, - "dateTimeValue": null, - "dateValue": null, - "jsonValue": null, - "attribute": { - "id": "11", - "code": "price", - "adminName": "Price", - "type": "price" - } - }, - { - "id": "19", - "productId": "1", - "attributeId": "12", - "locale": null, - "channel": "default", - "textValue": null, - "booleanValue": null, - "integerValue": null, - "floatValue": null, - "dateTimeValue": null, - "dateValue": null, - "jsonValue": null, - "attribute": { - "id": "12", - "code": "cost", - "adminName": "Cost", - "type": "price" - } - }, - { - "id": "20", - "productId": "1", - "attributeId": "13", - "locale": null, - "channel": null, - "textValue": null, - "booleanValue": null, - "integerValue": null, - "floatValue": null, - "dateTimeValue": null, - "dateValue": null, - "jsonValue": null, - "attribute": { - "id": "13", - "code": "special_price", - "adminName": "Special Price", - "type": "price" - } - }, - { - "id": "21", - "productId": "1", - "attributeId": "14", - "locale": null, - "channel": "default", - "textValue": null, - "booleanValue": null, - "integerValue": null, - "floatValue": null, - "dateTimeValue": null, - "dateValue": null, - "jsonValue": null, - "attribute": { - "id": "14", - "code": "special_price_from", - "adminName": "Special Price From", - "type": "date" - } - }, - { - "id": "22", - "productId": "1", - "attributeId": "15", - "locale": null, - "channel": "default", - "textValue": null, - "booleanValue": null, - "integerValue": null, - "floatValue": null, - "dateTimeValue": null, - "dateValue": null, - "jsonValue": null, - "attribute": { - "id": "15", - "code": "special_price_to", - "adminName": "Special Price To", - "type": "date" - } - }, - { - "id": "23", - "productId": "1", - "attributeId": "19", - "locale": null, - "channel": null, - "textValue": "", - "booleanValue": null, - "integerValue": null, - "floatValue": null, - "dateTimeValue": null, - "dateValue": null, - "jsonValue": null, - "attribute": { - "id": "19", - "code": "width", - "adminName": "Width", - "type": "text" - } - }, - { - "id": "24", - "productId": "1", - "attributeId": "20", - "locale": null, - "channel": null, - "textValue": "", - "booleanValue": null, - "integerValue": null, - "floatValue": null, - "dateTimeValue": null, - "dateValue": null, - "jsonValue": null, - "attribute": { - "id": "20", - "code": "height", - "adminName": "Height", - "type": "text" - } - }, - { - "id": "25", - "productId": "1", - "attributeId": "21", - "locale": null, - "channel": null, - "textValue": "", - "booleanValue": null, - "integerValue": null, - "floatValue": null, - "dateTimeValue": null, - "dateValue": null, - "jsonValue": null, - "attribute": { - "id": "21", - "code": "depth", - "adminName": "Depth", - "type": "text" - } - }, - { - "id": "26", - "productId": "1", - "attributeId": "22", - "locale": null, - "channel": null, - "textValue": "3", - "booleanValue": null, - "integerValue": null, - "floatValue": null, - "dateTimeValue": null, - "dateValue": null, - "jsonValue": null, - "attribute": { - "id": "22", - "code": "weight", - "adminName": "Weight", - "type": "text" - } - } - ], - "superAttributes": [], - "categories": [], - "inventories": [ - { - "id": "1", - "qty": 3, - "productId": "1", - "inventorySourceId": "1", - "vendorId": 0, - "inventorySource": { - "id": "1", - "code": "default", - "name": "Default", - "description": null, - "contactName": "Detroit Warehouse", - "contactEmail": "warehouse@example.com", - "contactNumber": "1234567899", - "contactFax": null, - "country": "US", - "state": "MI", - "city": "Detroit", - "street": "12th Street", - "postcode": "48127", - "priority": 0, - "latitude": null, - "longitude": null, - "status": true - } - }, - { - "id": "2", - "qty": 0, - "productId": "1", - "inventorySourceId": "2", - "vendorId": 0, - "inventorySource": { - "id": "2", - "code": "new", - "name": "demoinventory", - "description": "demo", - "contactName": "jyoti", - "contactEmail": "jyoti@webkul.com", - "contactNumber": "7252756566", - "contactFax": null, - "country": "IN", - "state": "UP", - "city": "Gorakhpur", - "street": "d-54", - "postcode": "273003", - "priority": 1, - "latitude": null, - "longitude": null, - "status": true - } - } - ], - "images": [], - "orderedInventories": [ - { - "id": "1", - "qty": 0, - "productId": "1", - "channelId": "1" - } - ], - "reviews": [ - { - "id": "1", - "title": "Where does it come from?", - "rating": 4, - "comment": "Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old.", - "status": true, - "productId": "1", - "customerId": "5", - "createdAt": "2021-05-28 15:41:51", - "updatedAt": "2021-05-28 15:41:51" - } - ], - "groupedProducts": [], - "downloadableSamples": [], - "downloadableLinks": [], - "bundleOptions": [], - "customerGroupPrices": [], - "booking": null - } - } - ] - } - } -} -~~~ -::: - -## Get Cart Items - -You can get all the Cart Items from the Bagisto store. You can achieve this job by using the `Cart Items` API call. - -- Headers - - | Key | Value | - | ------------- | ---------------- | - | Accept | application/json | - -- Single Request Endpoint - - `POST http(s)://example.com/graphql` - -::: tip - - If you are using pagination and want to know more info about responses then check the [explanation](./explanation) portion. - -::: - -- Query - ~~~query - query cartItems { - cartItems { - id - quantity - sku - type - name - couponCode - weight - totalWeight - baseTotalWeight - price - basePrice - total - baseTotal - taxPercent - taxAmount - baseTaxAmount - discountPercent - discountAmount - baseDiscountAmount - additional - parentId - productId - cartId - taxCategoryId - customPrice - appliedCartRuleIds - createdAt - updatedAt - product { - id - type - attributeFamilyId - sku - parentId - productFlats { - id - sku - name - description - shortDescription - urlKey - new - featured - status - visibleIndividually - thumbnail - price - cost - specialPrice - specialPriceFrom - specialPriceTo - weight - color - colorLabel - size - sizeLabel - locale - channel - productId - parentId - minPrice - maxPrice - metaTitle - metaKeywords - metaDescription - width - height - depth - variants { - id - sku - name - description - shortDescription - urlKey - new - featured - status - visibleIndividually - thumbnail - price - locale - channel - productId - parentId - } - parent { - id - sku - name - description - shortDescription - urlKey - new - featured - status - visibleIndividually - thumbnail - price - cost - specialPrice - specialPriceFrom - specialPriceTo - weight - } - createdAt - updatedAt - } - variants { - id - type - attributeFamilyId - sku - parentId - } - parent { - id - type - attributeFamilyId - sku - parentId - } - attributeFamily { - id - code - name - status - isUserDefined - } - attributeValues { - id - productId - attributeId - locale - channel - textValue - booleanValue - integerValue - floatValue - dateTimeValue - dateValue - jsonValue - attribute { - id - code - adminName - type - } - } - superAttributes { - id - code - adminName - type - position - } - categories { - id - name - description - slug - urlPath - imageUrl - metaTitle - metaDescription - metaKeywords - position - status - displayMode - parentId - filterableAttributes { - id - adminName - code - type - position - } - translations { - id - name - description - localeId - locale - } - createdAt - updatedAt - } - inventories { - id - qty - productId - inventorySourceId - vendorId - inventorySource { - id - code - name - description - contactName - contactEmail - contactNumber - contactFax - country - state - city - street - postcode - priority - latitude - longitude - status - } - } - images { - id - type - path - productId - } - orderedInventories { - id - qty - productId - channelId - } - reviews { - id - title - rating - comment - status - productId - customerId - createdAt - updatedAt - } - groupedProducts { - id - qty - sortOrder - productId - associatedProductId - associatedProduct { - id - type - attributeFamilyId - sku - parentId - } - } - downloadableSamples { - id - url - file - fileName - type - sortOrder - productId - createdAt - updatedAt - translations { - id - locale - title - productDownloadableSampleId - } - } - downloadableLinks { - id - title - price - url - file - fileName - type - sampleUrl - sampleFile - sampleFileName - sampleType - sortOrder - productId - downloads - translations { - id - locale - title - productDownloadableLinkId - } - } - bundleOptions { - id - type - isRequired - sortOrder - productId - bundleOptionProducts { - id - qty - isUserDefined - sortOrder - isDefault - productBundleOptionId - productId - } - translations { - id - locale - label - productBundleOptionId - } - } - customerGroupPrices { - id - qty - valueType - value - productId - customerGroupId - createdAt - updatedAt - } - booking { - id - type - qty - location - showLocation - availableEveryWeek - availableFrom - availableTo - productId - defaultSlot { - id - bookingType - duration - breakTime - slots { - to - toDay - from - fromDay - } - bookingProductId - } - appointmentSlot { - id - duration - breakTime - sameSlotAllDays - slots { - from - to - } - bookingProductId - } - } - } - } - } - ~~~ -::: details Response - -~~~json -{ - "data": { - "cartItems": [ - { - "id": "6", - "quantity": 1, - "sku": "test-product", - "type": "simple", - "name": "testOutlet", - "couponCode": null, - "weight": 3, - "totalWeight": 3, - "baseTotalWeight": 3, - "price": 5, - "basePrice": 5, - "total": 5, - "baseTotal": 5, - "taxPercent": 0, - "taxAmount": 0, - "baseTaxAmount": 0, - "discountPercent": 0, - "discountAmount": 0, - "baseDiscountAmount": 0, - "additional": "{\"quantity\":1,\"product_id\":\"1\"}", - "parentId": null, - "productId": "1", - "cartId": "6", - "taxCategoryId": null, - "customPrice": null, - "appliedCartRuleIds": "", - "createdAt": "2021-05-28 17:25:25", - "updatedAt": "2021-05-28 17:25:26", - "product": { - "id": "1", - "type": "simple", - "attributeFamilyId": 1, - "sku": "test-product", - "parentId": null, - "productFlats": [ - { - "id": "1", - "sku": "test-product", - "name": "testOutlet", - "description": "

testOutlet

", - "shortDescription": "

testOutlet

", - "urlKey": "testoutlet", - "new": true, - "featured": true, - "status": true, - "visibleIndividually": true, - "thumbnail": null, - "price": 5, - "cost": null, - "specialPrice": null, - "specialPriceFrom": null, - "specialPriceTo": null, - "weight": 3, - "color": 1, - "colorLabel": "Red", - "size": 6, - "sizeLabel": "S", - "locale": "en", - "channel": "default", - "productId": "1", - "parentId": null, - "minPrice": 5, - "maxPrice": 5, - "metaTitle": "", - "metaKeywords": "", - "metaDescription": "", - "width": 0, - "height": 0, - "depth": 0, - "variants": [], - "parent": null, - "createdAt": "2021-05-26 17:43:12", - "updatedAt": "2021-05-26 17:43:12" - } - ], - "variants": [], - "parent": null, - "attributeFamily": { - "id": "1", - "code": "default", - "name": "Default", - "status": false, - "isUserDefined": true - }, - "attributeValues": [ - { - "id": "1", - "productId": "1", - "attributeId": "9", - "locale": "en", - "channel": "default", - "textValue": "

testOutlet

", - "booleanValue": null, - "integerValue": null, - "floatValue": null, - "dateTimeValue": null, - "dateValue": null, - "jsonValue": null, - "attribute": { - "id": "9", - "code": "short_description", - "adminName": "Short Description", - "type": "textarea" - } - }, - { - "id": "2", - "productId": "1", - "attributeId": "10", - "locale": "en", - "channel": "default", - "textValue": "

testOutlet

", - "booleanValue": null, - "integerValue": null, - "floatValue": null, - "dateTimeValue": null, - "dateValue": null, - "jsonValue": null, - "attribute": { - "id": "10", - "code": "description", - "adminName": "Description", - "type": "textarea" - } - }, - { - "id": "3", - "productId": "1", - "attributeId": "1", - "locale": null, - "channel": null, - "textValue": "test-product", - "booleanValue": null, - "integerValue": null, - "floatValue": null, - "dateTimeValue": null, - "dateValue": null, - "jsonValue": null, - "attribute": { - "id": "1", - "code": "sku", - "adminName": "SKU", - "type": "text" - } - }, - { - "id": "4", - "productId": "1", - "attributeId": "2", - "locale": "en", - "channel": "default", - "textValue": "testOutlet", - "booleanValue": null, - "integerValue": null, - "floatValue": null, - "dateTimeValue": null, - "dateValue": null, - "jsonValue": null, - "attribute": { - "id": "2", - "code": "name", - "adminName": "Name", - "type": "text" - } - }, - { - "id": "5", - "productId": "1", - "attributeId": "3", - "locale": null, - "channel": null, - "textValue": "testoutlet", - "booleanValue": null, - "integerValue": null, - "floatValue": null, - "dateTimeValue": null, - "dateValue": null, - "jsonValue": null, - "attribute": { - "id": "3", - "code": "url_key", - "adminName": "URL Key", - "type": "text" - } - }, - { - "id": "6", - "productId": "1", - "attributeId": "4", - "locale": null, - "channel": "default", - "textValue": null, - "booleanValue": null, - "integerValue": 0, - "floatValue": null, - "dateTimeValue": null, - "dateValue": null, - "jsonValue": null, - "attribute": { - "id": "4", - "code": "tax_category_id", - "adminName": "Tax Category", - "type": "select" - } - }, - { - "id": "7", - "productId": "1", - "attributeId": "5", - "locale": null, - "channel": null, - "textValue": null, - "booleanValue": true, - "integerValue": null, - "floatValue": null, - "dateTimeValue": null, - "dateValue": null, - "jsonValue": null, - "attribute": { - "id": "5", - "code": "new", - "adminName": "New", - "type": "boolean" - } - }, - { - "id": "8", - "productId": "1", - "attributeId": "6", - "locale": null, - "channel": null, - "textValue": null, - "booleanValue": true, - "integerValue": null, - "floatValue": null, - "dateTimeValue": null, - "dateValue": null, - "jsonValue": null, - "attribute": { - "id": "6", - "code": "featured", - "adminName": "Featured", - "type": "boolean" - } - }, - { - "id": "9", - "productId": "1", - "attributeId": "7", - "locale": null, - "channel": null, - "textValue": null, - "booleanValue": true, - "integerValue": null, - "floatValue": null, - "dateTimeValue": null, - "dateValue": null, - "jsonValue": null, - "attribute": { - "id": "7", - "code": "visible_individually", - "adminName": "Visible Individually", - "type": "boolean" - } - }, - { - "id": "10", - "productId": "1", - "attributeId": "8", - "locale": null, - "channel": null, - "textValue": null, - "booleanValue": true, - "integerValue": null, - "floatValue": null, - "dateTimeValue": null, - "dateValue": null, - "jsonValue": null, - "attribute": { - "id": "8", - "code": "status", - "adminName": "Status", - "type": "boolean" - } - }, - { - "id": "11", - "productId": "1", - "attributeId": "23", - "locale": null, - "channel": null, - "textValue": null, - "booleanValue": null, - "integerValue": 1, - "floatValue": null, - "dateTimeValue": null, - "dateValue": null, - "jsonValue": null, - "attribute": { - "id": "23", - "code": "color", - "adminName": "Color", - "type": "select" - } - }, - { - "id": "12", - "productId": "1", - "attributeId": "24", - "locale": null, - "channel": null, - "textValue": null, - "booleanValue": null, - "integerValue": 6, - "floatValue": null, - "dateTimeValue": null, - "dateValue": null, - "jsonValue": null, - "attribute": { - "id": "24", - "code": "size", - "adminName": "Size", - "type": "select" - } - }, - { - "id": "13", - "productId": "1", - "attributeId": "26", - "locale": null, - "channel": null, - "textValue": null, - "booleanValue": true, - "integerValue": null, - "floatValue": null, - "dateTimeValue": null, - "dateValue": null, - "jsonValue": null, - "attribute": { - "id": "26", - "code": "guest_checkout", - "adminName": "Guest Checkout", - "type": "boolean" - } - }, - { - "id": "14", - "productId": "1", - "attributeId": "27", - "locale": null, - "channel": null, - "textValue": "", - "booleanValue": null, - "integerValue": null, - "floatValue": null, - "dateTimeValue": null, - "dateValue": null, - "jsonValue": null, - "attribute": { - "id": "27", - "code": "product_number", - "adminName": "Product Number", - "type": "text" - } - }, - { - "id": "15", - "productId": "1", - "attributeId": "16", - "locale": "en", - "channel": "default", - "textValue": "", - "booleanValue": null, - "integerValue": null, - "floatValue": null, - "dateTimeValue": null, - "dateValue": null, - "jsonValue": null, - "attribute": { - "id": "16", - "code": "meta_title", - "adminName": "Meta Title", - "type": "textarea" - } - }, - { - "id": "16", - "productId": "1", - "attributeId": "17", - "locale": "en", - "channel": "default", - "textValue": "", - "booleanValue": null, - "integerValue": null, - "floatValue": null, - "dateTimeValue": null, - "dateValue": null, - "jsonValue": null, - "attribute": { - "id": "17", - "code": "meta_keywords", - "adminName": "Meta Keywords", - "type": "textarea" - } - }, - { - "id": "17", - "productId": "1", - "attributeId": "18", - "locale": "en", - "channel": "default", - "textValue": "", - "booleanValue": null, - "integerValue": null, - "floatValue": null, - "dateTimeValue": null, - "dateValue": null, - "jsonValue": null, - "attribute": { - "id": "18", - "code": "meta_description", - "adminName": "Meta Description", - "type": "textarea" - } - }, - { - "id": "18", - "productId": "1", - "attributeId": "11", - "locale": null, - "channel": null, - "textValue": null, - "booleanValue": null, - "integerValue": null, - "floatValue": 5, - "dateTimeValue": null, - "dateValue": null, - "jsonValue": null, - "attribute": { - "id": "11", - "code": "price", - "adminName": "Price", - "type": "price" - } - }, - { - "id": "19", - "productId": "1", - "attributeId": "12", - "locale": null, - "channel": "default", - "textValue": null, - "booleanValue": null, - "integerValue": null, - "floatValue": null, - "dateTimeValue": null, - "dateValue": null, - "jsonValue": null, - "attribute": { - "id": "12", - "code": "cost", - "adminName": "Cost", - "type": "price" - } - }, - { - "id": "20", - "productId": "1", - "attributeId": "13", - "locale": null, - "channel": null, - "textValue": null, - "booleanValue": null, - "integerValue": null, - "floatValue": null, - "dateTimeValue": null, - "dateValue": null, - "jsonValue": null, - "attribute": { - "id": "13", - "code": "special_price", - "adminName": "Special Price", - "type": "price" - } - }, - { - "id": "21", - "productId": "1", - "attributeId": "14", - "locale": null, - "channel": "default", - "textValue": null, - "booleanValue": null, - "integerValue": null, - "floatValue": null, - "dateTimeValue": null, - "dateValue": null, - "jsonValue": null, - "attribute": { - "id": "14", - "code": "special_price_from", - "adminName": "Special Price From", - "type": "date" - } - }, - { - "id": "22", - "productId": "1", - "attributeId": "15", - "locale": null, - "channel": "default", - "textValue": null, - "booleanValue": null, - "integerValue": null, - "floatValue": null, - "dateTimeValue": null, - "dateValue": null, - "jsonValue": null, - "attribute": { - "id": "15", - "code": "special_price_to", - "adminName": "Special Price To", - "type": "date" - } - }, - { - "id": "23", - "productId": "1", - "attributeId": "19", - "locale": null, - "channel": null, - "textValue": "", - "booleanValue": null, - "integerValue": null, - "floatValue": null, - "dateTimeValue": null, - "dateValue": null, - "jsonValue": null, - "attribute": { - "id": "19", - "code": "width", - "adminName": "Width", - "type": "text" - } - }, - { - "id": "24", - "productId": "1", - "attributeId": "20", - "locale": null, - "channel": null, - "textValue": "", - "booleanValue": null, - "integerValue": null, - "floatValue": null, - "dateTimeValue": null, - "dateValue": null, - "jsonValue": null, - "attribute": { - "id": "20", - "code": "height", - "adminName": "Height", - "type": "text" - } - }, - { - "id": "25", - "productId": "1", - "attributeId": "21", - "locale": null, - "channel": null, - "textValue": "", - "booleanValue": null, - "integerValue": null, - "floatValue": null, - "dateTimeValue": null, - "dateValue": null, - "jsonValue": null, - "attribute": { - "id": "21", - "code": "depth", - "adminName": "Depth", - "type": "text" - } - }, - { - "id": "26", - "productId": "1", - "attributeId": "22", - "locale": null, - "channel": null, - "textValue": "3", - "booleanValue": null, - "integerValue": null, - "floatValue": null, - "dateTimeValue": null, - "dateValue": null, - "jsonValue": null, - "attribute": { - "id": "22", - "code": "weight", - "adminName": "Weight", - "type": "text" - } - } - ], - "superAttributes": [], - "categories": [], - "inventories": [ - { - "id": "1", - "qty": 3, - "productId": "1", - "inventorySourceId": "1", - "vendorId": 0, - "inventorySource": { - "id": "1", - "code": "default", - "name": "Default", - "description": null, - "contactName": "Detroit Warehouse", - "contactEmail": "warehouse@example.com", - "contactNumber": "1234567899", - "contactFax": null, - "country": "US", - "state": "MI", - "city": "Detroit", - "street": "12th Street", - "postcode": "48127", - "priority": 0, - "latitude": null, - "longitude": null, - "status": true - } - }, - { - "id": "2", - "qty": 0, - "productId": "1", - "inventorySourceId": "2", - "vendorId": 0, - "inventorySource": { - "id": "2", - "code": "new", - "name": "demoinventory", - "description": "demo", - "contactName": "jyoti", - "contactEmail": "jyoti@webkul.com", - "contactNumber": "7252756566", - "contactFax": null, - "country": "IN", - "state": "UP", - "city": "Gorakhpur", - "street": "d-54", - "postcode": "273003", - "priority": 1, - "latitude": null, - "longitude": null, - "status": true - } - } - ], - "images": [], - "orderedInventories": [ - { - "id": "1", - "qty": 0, - "productId": "1", - "channelId": "1" - } - ], - "reviews": [ - { - "id": "1", - "title": "Where does it come from?", - "rating": 4, - "comment": "Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old.", - "status": true, - "productId": "1", - "customerId": "5", - "createdAt": "2021-05-28 15:41:51", - "updatedAt": "2021-05-28 15:41:51" - } - ], - "groupedProducts": [], - "downloadableSamples": [], - "downloadableLinks": [], - "bundleOptions": [], - "customerGroupPrices": [], - "booking": null - } - } - ] - } -} -~~~ -::: - - -## Get Cart Item By Id - -You can get the Specific Cart Items from the Bagisto store by passing the `id` field with the request. You can achieve this job by using the `Cart Items` API call. - -- Headers - - | Key | Value | - | ------------- | ---------------- | - | Accept | application/json | - -- Single Request Endpoint - - `POST http(s)://example.com/graphql` - -::: tip - - If you are using pagination and want to know more info about responses then check the [explanation](./explanation) portion. - -::: - -- Query - ~~~query - query cartItem { - cartItem(id: 8) { - id - quantity - sku - type - name - couponCode - weight - totalWeight - baseTotalWeight - price - basePrice - total - baseTotal - taxPercent - taxAmount - baseTaxAmount - discountPercent - discountAmount - baseDiscountAmount - additional - parentId - productId - cartId - taxCategoryId - customPrice - appliedCartRuleIds - createdAt - updatedAt - product { - id - type - attributeFamilyId - sku - parentId - productFlats { - id - sku - name - description - shortDescription - urlKey - new - featured - status - visibleIndividually - thumbnail - price - cost - specialPrice - specialPriceFrom - specialPriceTo - weight - color - colorLabel - size - sizeLabel - locale - channel - productId - parentId - minPrice - maxPrice - metaTitle - metaKeywords - metaDescription - width - height - depth - variants { - id - sku - name - description - shortDescription - urlKey - new - featured - status - visibleIndividually - thumbnail - price - locale - channel - productId - parentId - } - parent { - id - sku - name - description - shortDescription - urlKey - new - featured - status - visibleIndividually - thumbnail - price - cost - specialPrice - specialPriceFrom - specialPriceTo - weight - } - createdAt - updatedAt - } - variants { - id - type - attributeFamilyId - sku - parentId - } - parent { - id - type - attributeFamilyId - sku - parentId - } - attributeFamily { - id - code - name - status - isUserDefined - } - attributeValues { - id - productId - attributeId - locale - channel - textValue - booleanValue - integerValue - floatValue - dateTimeValue - dateValue - jsonValue - attribute { - id - code - adminName - type - } - } - superAttributes { - id - code - adminName - type - position - } - categories { - id - name - description - slug - urlPath - imageUrl - metaTitle - metaDescription - metaKeywords - position - status - displayMode - parentId - filterableAttributes { - id - adminName - code - type - position - } - translations { - id - name - description - localeId - locale - } - createdAt - updatedAt - } - inventories { - id - qty - productId - inventorySourceId - vendorId - inventorySource { - id - code - name - description - contactName - contactEmail - contactNumber - contactFax - country - state - city - street - postcode - priority - latitude - longitude - status - } - } - images { - id - type - path - productId - } - orderedInventories { - id - qty - productId - channelId - } - reviews { - id - title - rating - comment - status - productId - customerId - createdAt - updatedAt - } - groupedProducts { - id - qty - sortOrder - productId - associatedProductId - associatedProduct { - id - type - attributeFamilyId - sku - parentId - } - } - downloadableSamples { - id - url - file - fileName - type - sortOrder - productId - createdAt - updatedAt - translations { - id - locale - title - productDownloadableSampleId - } - } - downloadableLinks { - id - title - price - url - file - fileName - type - sampleUrl - sampleFile - sampleFileName - sampleType - sortOrder - productId - downloads - translations { - id - locale - title - productDownloadableLinkId - } - } - bundleOptions { - id - type - isRequired - sortOrder - productId - bundleOptionProducts { - id - qty - isUserDefined - sortOrder - isDefault - productBundleOptionId - productId - } - translations { - id - locale - label - productBundleOptionId - } - } - customerGroupPrices { - id - qty - valueType - value - productId - customerGroupId - createdAt - updatedAt - } - booking { - id - type - qty - location - showLocation - availableEveryWeek - availableFrom - availableTo - productId - defaultSlot { - id - bookingType - duration - breakTime - slots { - to - toDay - from - fromDay - } - bookingProductId - } - appointmentSlot { - id - duration - breakTime - sameSlotAllDays - slots { - from - to - } - bookingProductId - } - } - } - } - } - ~~~ -::: details Response - -~~~json -{ - "data": { - "cartItem": { - "id": "8", - "quantity": 1, - "sku": "test-product", - "type": "simple", - "name": "testOutlet", - "couponCode": null, - "weight": 3, - "totalWeight": 3, - "baseTotalWeight": 3, - "price": 5, - "basePrice": 5, - "total": 5, - "baseTotal": 5, - "taxPercent": 0, - "taxAmount": 0, - "baseTaxAmount": 0, - "discountPercent": 0, - "discountAmount": 0, - "baseDiscountAmount": 0, - "additional": "{\"quantity\":1,\"product_id\":\"1\"}", - "parentId": null, - "productId": "1", - "cartId": "8", - "taxCategoryId": null, - "customPrice": null, - "appliedCartRuleIds": "", - "createdAt": "2021-05-28 18:06:51", - "updatedAt": "2021-05-28 18:06:52", - "product": { - "id": "1", - "type": "simple", - "attributeFamilyId": 1, - "sku": "test-product", - "parentId": null, - "productFlats": [ - { - "id": "1", - "sku": "test-product", - "name": "testOutlet", - "description": "

testOutlet

", - "shortDescription": "

testOutlet

", - "urlKey": "testoutlet", - "new": true, - "featured": true, - "status": true, - "visibleIndividually": true, - "thumbnail": null, - "price": 5, - "cost": null, - "specialPrice": null, - "specialPriceFrom": null, - "specialPriceTo": null, - "weight": 3, - "color": 1, - "colorLabel": "Red", - "size": 6, - "sizeLabel": "S", - "locale": "en", - "channel": "default", - "productId": "1", - "parentId": null, - "minPrice": 5, - "maxPrice": 5, - "metaTitle": "", - "metaKeywords": "", - "metaDescription": "", - "width": 0, - "height": 0, - "depth": 0, - "variants": [], - "parent": null, - "createdAt": "2021-05-26 17:43:12", - "updatedAt": "2021-05-26 17:43:12" - } - ], - "variants": [], - "parent": null, - "attributeFamily": { - "id": "1", - "code": "default", - "name": "Default", - "status": false, - "isUserDefined": true - }, - "attributeValues": [ - { - "id": "1", - "productId": "1", - "attributeId": "9", - "locale": "en", - "channel": "default", - "textValue": "

testOutlet

", - "booleanValue": null, - "integerValue": null, - "floatValue": null, - "dateTimeValue": null, - "dateValue": null, - "jsonValue": null, - "attribute": { - "id": "9", - "code": "short_description", - "adminName": "Short Description", - "type": "textarea" - } - }, - { - "id": "2", - "productId": "1", - "attributeId": "10", - "locale": "en", - "channel": "default", - "textValue": "

testOutlet

", - "booleanValue": null, - "integerValue": null, - "floatValue": null, - "dateTimeValue": null, - "dateValue": null, - "jsonValue": null, - "attribute": { - "id": "10", - "code": "description", - "adminName": "Description", - "type": "textarea" - } - }, - { - "id": "3", - "productId": "1", - "attributeId": "1", - "locale": null, - "channel": null, - "textValue": "test-product", - "booleanValue": null, - "integerValue": null, - "floatValue": null, - "dateTimeValue": null, - "dateValue": null, - "jsonValue": null, - "attribute": { - "id": "1", - "code": "sku", - "adminName": "SKU", - "type": "text" - } - }, - { - "id": "4", - "productId": "1", - "attributeId": "2", - "locale": "en", - "channel": "default", - "textValue": "testOutlet", - "booleanValue": null, - "integerValue": null, - "floatValue": null, - "dateTimeValue": null, - "dateValue": null, - "jsonValue": null, - "attribute": { - "id": "2", - "code": "name", - "adminName": "Name", - "type": "text" - } - }, - { - "id": "5", - "productId": "1", - "attributeId": "3", - "locale": null, - "channel": null, - "textValue": "testoutlet", - "booleanValue": null, - "integerValue": null, - "floatValue": null, - "dateTimeValue": null, - "dateValue": null, - "jsonValue": null, - "attribute": { - "id": "3", - "code": "url_key", - "adminName": "URL Key", - "type": "text" - } - }, - { - "id": "6", - "productId": "1", - "attributeId": "4", - "locale": null, - "channel": "default", - "textValue": null, - "booleanValue": null, - "integerValue": 0, - "floatValue": null, - "dateTimeValue": null, - "dateValue": null, - "jsonValue": null, - "attribute": { - "id": "4", - "code": "tax_category_id", - "adminName": "Tax Category", - "type": "select" - } - }, - { - "id": "7", - "productId": "1", - "attributeId": "5", - "locale": null, - "channel": null, - "textValue": null, - "booleanValue": true, - "integerValue": null, - "floatValue": null, - "dateTimeValue": null, - "dateValue": null, - "jsonValue": null, - "attribute": { - "id": "5", - "code": "new", - "adminName": "New", - "type": "boolean" - } - }, - { - "id": "8", - "productId": "1", - "attributeId": "6", - "locale": null, - "channel": null, - "textValue": null, - "booleanValue": true, - "integerValue": null, - "floatValue": null, - "dateTimeValue": null, - "dateValue": null, - "jsonValue": null, - "attribute": { - "id": "6", - "code": "featured", - "adminName": "Featured", - "type": "boolean" - } - }, - { - "id": "9", - "productId": "1", - "attributeId": "7", - "locale": null, - "channel": null, - "textValue": null, - "booleanValue": true, - "integerValue": null, - "floatValue": null, - "dateTimeValue": null, - "dateValue": null, - "jsonValue": null, - "attribute": { - "id": "7", - "code": "visible_individually", - "adminName": "Visible Individually", - "type": "boolean" - } - }, - { - "id": "10", - "productId": "1", - "attributeId": "8", - "locale": null, - "channel": null, - "textValue": null, - "booleanValue": true, - "integerValue": null, - "floatValue": null, - "dateTimeValue": null, - "dateValue": null, - "jsonValue": null, - "attribute": { - "id": "8", - "code": "status", - "adminName": "Status", - "type": "boolean" - } - }, - { - "id": "11", - "productId": "1", - "attributeId": "23", - "locale": null, - "channel": null, - "textValue": null, - "booleanValue": null, - "integerValue": 1, - "floatValue": null, - "dateTimeValue": null, - "dateValue": null, - "jsonValue": null, - "attribute": { - "id": "23", - "code": "color", - "adminName": "Color", - "type": "select" - } - }, - { - "id": "12", - "productId": "1", - "attributeId": "24", - "locale": null, - "channel": null, - "textValue": null, - "booleanValue": null, - "integerValue": 6, - "floatValue": null, - "dateTimeValue": null, - "dateValue": null, - "jsonValue": null, - "attribute": { - "id": "24", - "code": "size", - "adminName": "Size", - "type": "select" - } - }, - { - "id": "13", - "productId": "1", - "attributeId": "26", - "locale": null, - "channel": null, - "textValue": null, - "booleanValue": true, - "integerValue": null, - "floatValue": null, - "dateTimeValue": null, - "dateValue": null, - "jsonValue": null, - "attribute": { - "id": "26", - "code": "guest_checkout", - "adminName": "Guest Checkout", - "type": "boolean" - } - }, - { - "id": "14", - "productId": "1", - "attributeId": "27", - "locale": null, - "channel": null, - "textValue": "", - "booleanValue": null, - "integerValue": null, - "floatValue": null, - "dateTimeValue": null, - "dateValue": null, - "jsonValue": null, - "attribute": { - "id": "27", - "code": "product_number", - "adminName": "Product Number", - "type": "text" - } - }, - { - "id": "15", - "productId": "1", - "attributeId": "16", - "locale": "en", - "channel": "default", - "textValue": "", - "booleanValue": null, - "integerValue": null, - "floatValue": null, - "dateTimeValue": null, - "dateValue": null, - "jsonValue": null, - "attribute": { - "id": "16", - "code": "meta_title", - "adminName": "Meta Title", - "type": "textarea" - } - }, - { - "id": "16", - "productId": "1", - "attributeId": "17", - "locale": "en", - "channel": "default", - "textValue": "", - "booleanValue": null, - "integerValue": null, - "floatValue": null, - "dateTimeValue": null, - "dateValue": null, - "jsonValue": null, - "attribute": { - "id": "17", - "code": "meta_keywords", - "adminName": "Meta Keywords", - "type": "textarea" - } - }, - { - "id": "17", - "productId": "1", - "attributeId": "18", - "locale": "en", - "channel": "default", - "textValue": "", - "booleanValue": null, - "integerValue": null, - "floatValue": null, - "dateTimeValue": null, - "dateValue": null, - "jsonValue": null, - "attribute": { - "id": "18", - "code": "meta_description", - "adminName": "Meta Description", - "type": "textarea" - } - }, - { - "id": "18", - "productId": "1", - "attributeId": "11", - "locale": null, - "channel": null, - "textValue": null, - "booleanValue": null, - "integerValue": null, - "floatValue": 5, - "dateTimeValue": null, - "dateValue": null, - "jsonValue": null, - "attribute": { - "id": "11", - "code": "price", - "adminName": "Price", - "type": "price" - } - }, - { - "id": "19", - "productId": "1", - "attributeId": "12", - "locale": null, - "channel": "default", - "textValue": null, - "booleanValue": null, - "integerValue": null, - "floatValue": null, - "dateTimeValue": null, - "dateValue": null, - "jsonValue": null, - "attribute": { - "id": "12", - "code": "cost", - "adminName": "Cost", - "type": "price" - } - }, - { - "id": "20", - "productId": "1", - "attributeId": "13", - "locale": null, - "channel": null, - "textValue": null, - "booleanValue": null, - "integerValue": null, - "floatValue": null, - "dateTimeValue": null, - "dateValue": null, - "jsonValue": null, - "attribute": { - "id": "13", - "code": "special_price", - "adminName": "Special Price", - "type": "price" - } - }, - { - "id": "21", - "productId": "1", - "attributeId": "14", - "locale": null, - "channel": "default", - "textValue": null, - "booleanValue": null, - "integerValue": null, - "floatValue": null, - "dateTimeValue": null, - "dateValue": null, - "jsonValue": null, - "attribute": { - "id": "14", - "code": "special_price_from", - "adminName": "Special Price From", - "type": "date" - } - }, - { - "id": "22", - "productId": "1", - "attributeId": "15", - "locale": null, - "channel": "default", - "textValue": null, - "booleanValue": null, - "integerValue": null, - "floatValue": null, - "dateTimeValue": null, - "dateValue": null, - "jsonValue": null, - "attribute": { - "id": "15", - "code": "special_price_to", - "adminName": "Special Price To", - "type": "date" - } - }, - { - "id": "23", - "productId": "1", - "attributeId": "19", - "locale": null, - "channel": null, - "textValue": "", - "booleanValue": null, - "integerValue": null, - "floatValue": null, - "dateTimeValue": null, - "dateValue": null, - "jsonValue": null, - "attribute": { - "id": "19", - "code": "width", - "adminName": "Width", - "type": "text" - } - }, - { - "id": "24", - "productId": "1", - "attributeId": "20", - "locale": null, - "channel": null, - "textValue": "", - "booleanValue": null, - "integerValue": null, - "floatValue": null, - "dateTimeValue": null, - "dateValue": null, - "jsonValue": null, - "attribute": { - "id": "20", - "code": "height", - "adminName": "Height", - "type": "text" - } - }, - { - "id": "25", - "productId": "1", - "attributeId": "21", - "locale": null, - "channel": null, - "textValue": "", - "booleanValue": null, - "integerValue": null, - "floatValue": null, - "dateTimeValue": null, - "dateValue": null, - "jsonValue": null, - "attribute": { - "id": "21", - "code": "depth", - "adminName": "Depth", - "type": "text" - } - }, - { - "id": "26", - "productId": "1", - "attributeId": "22", - "locale": null, - "channel": null, - "textValue": "3", - "booleanValue": null, - "integerValue": null, - "floatValue": null, - "dateTimeValue": null, - "dateValue": null, - "jsonValue": null, - "attribute": { - "id": "22", - "code": "weight", - "adminName": "Weight", - "type": "text" - } - } - ], - "superAttributes": [], - "categories": [], - "inventories": [ - { - "id": "1", - "qty": 3, - "productId": "1", - "inventorySourceId": "1", - "vendorId": 0, - "inventorySource": { - "id": "1", - "code": "default", - "name": "Default", - "description": null, - "contactName": "Detroit Warehouse", - "contactEmail": "warehouse@example.com", - "contactNumber": "1234567899", - "contactFax": null, - "country": "US", - "state": "MI", - "city": "Detroit", - "street": "12th Street", - "postcode": "48127", - "priority": 0, - "latitude": null, - "longitude": null, - "status": true - } - }, - { - "id": "2", - "qty": 0, - "productId": "1", - "inventorySourceId": "2", - "vendorId": 0, - "inventorySource": { - "id": "2", - "code": "new", - "name": "demoinventory", - "description": "demo", - "contactName": "jyoti", - "contactEmail": "jyoti@webkul.com", - "contactNumber": "7252756566", - "contactFax": null, - "country": "IN", - "state": "UP", - "city": "Gorakhpur", - "street": "d-54", - "postcode": "273003", - "priority": 1, - "latitude": null, - "longitude": null, - "status": true - } - } - ], - "images": [], - "orderedInventories": [ - { - "id": "1", - "qty": 0, - "productId": "1", - "channelId": "1" - } - ], - "reviews": [ - { - "id": "1", - "title": "Where does it come from?", - "rating": 4, - "comment": "Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old.", - "status": true, - "productId": "1", - "customerId": "5", - "createdAt": "2021-05-28 15:41:51", - "updatedAt": "2021-05-28 15:41:51" - } - ], - "groupedProducts": [], - "downloadableSamples": [], - "downloadableLinks": [], - "bundleOptions": [], - "customerGroupPrices": [], - "booking": null - } - } - } -} -~~~ -::: - - -## Add Item To Cart - -You can Add a product to Cart. You can achieve this job by using the `Cart` API call. - -- Headers - - | Key | Value | - | ------------- | ---------------- | - | Accept | application/json | - -- Single Request Endpoint - - `POST http(s)://example.com/graphql` - -::: tip - - If you are using pagination and want to know more info about responses then check the [explanation](./explanation) portion. - -::: - -- Query - ~~~query - mutation addItemToCart { - addItemToCart(input: { - productId: 1 - quantity: 1 - - # Only use while adding configurable product to cart - # selectedConfigurableOption: 4 - # superAttribute: [{ - # attributeId: 23 - # attributeOptionId: 4 - # }, { - # attributeId: 24 - # attributeOptionId: 6 - # }] - - # Only use while adding grouped product to cart - # qty: [{ - # productId: 5 - # quantity: 3 - # }, { - # productId: 1 - # quantity: 2 - # }] - - # Only use while adding downloadable product to cart - # links: [6, 8] - - # Only use while adding bundled product to cart - # bundleOptions: [{ - # bundleOptionId: 9 - # bundleOptionProductId: [8] - # qty: 2 - # }, { - # bundleOptionId: 10 - # bundleOptionProductId: [10] - # qty: 3 - # }, { - # bundleOptionId: 11 - # bundleOptionProductId: [11, 12] - # }, { - # bundleOptionId: 13 - # bundleOptionProductId: [15] - # }] - - # Only use while adding booking(default, appointment, rental, table) product to cart - # booking: { - # date: "2021-02-15" - # slot: { - # from: 1613374200 - # to: 1613376900 - # } - # note: "Booking Table" - - # # Only use while adding booking(event) product to cart - # qty: [{ - # ticketId: 11 - # quantity: 2 - # }, { - # ticketId: 12 - # quantity: 1 - # }] - # } - }) { - success - cart { - id - customerEmail - customerFirstName - customerLastName - shippingMethod - couponCode - isGift - itemsCount - itemsQty - exchangeRate - globalCurrencyCode - baseCurrencyCode - channelCurrencyCode - cartCurrencyCode - grandTotal - baseGrandTotal - subTotal - baseSubTotal - taxTotal - baseTaxTotal - discountAmount - baseDiscountAmount - checkoutMethod - isGuest - isActive - conversionTime - customerId - channelId - appliedCartRuleIds - createdAt - updatedAt - } - } - } - ~~~ - -::: details Response - -~~~json -{ - "data": { - "addToWishlist": { - "success": "Item Successfully Added To Wishlist", - "wishlist": { - "id": "1", - "channelId": "1", - "productId": "1", - "customerId": "5", - "itemOptions": null, - "additional": "null", - "movedToCart": null, - "shared": null, - "timeOfMoving": null, - "createdAt": "2021-05-28 15:59:00", - "updatedAt": "2021-05-28 15:59:00", - "customer": { - "id": "5", - "firstName": "Naresh", - "lastName": "Verma", - "name": "Naresh Verma", - "gender": null, - "dateOfBirth": null, - "email": "naresh.verma327@webkul.com", - "phone": null, - "password": "$2y$10$tIP1ciRlUCI0ahjsYsjHsenTvXen1PBQKfRu0OklpufOAjf/ruC2O", - "apiToken": "r1bxG3wNl2No0mbTEEJnD6hWkADKcsMA8jnHDnA0zteEw2RRhaqAuUxehzqx7pARAS6WA9jLG3sanFhg", - "customerGroupId": 2, - "subscribedToNewsLetter": false, - "isVerified": true, - "token": "d5308d5f06d01d3393501cb6ebf4ae06", - "notes": null, - "status": true, - "createdAt": "2021-05-28 12:54:56", - "updatedAt": "2021-05-28 12:54:56" - }, - "product": { - "id": "1", - "type": "simple", - "attributeFamilyId": 1, - "sku": "test-product", - "parentId": null, - "createdAt": "2021-05-26 17:43:12", - "updatedAt": "2021-05-26 17:43:12" - }, - "channel": { - "id": "1", - "code": "default", - "name": "Default", - "description": null, - "theme": "velocity", - "homePageContent": "\n

@include(\"shop::home.slider\") @include(\"shop::home.featured-products\") @include(\"shop::home.new-products\")

\n
\n
\n \"test\"\n
\n
\n \"test\"\n \"test\"\n
\n
\n ", - "footerContent": "\n \n
\n Connect With Us\n \n
\n ", - "hostname": "http://localhost/graphql/public", - "defaultLocaleId": 1, - "baseCurrencyId": 1, - "rootCategoryId": 1, - "homeSeo": "{\"meta_title\": \"Demo store\", \"meta_keywords\": \"Demo store meta keyword\", \"meta_description\": \"Demo store meta description\"}", - "defaultLocale": "{\"id\":1,\"code\":\"en\",\"name\":\"English\",\"created_at\":null,\"updated_at\":null,\"direction\":\"ltr\",\"locale_image\":null}", - "baseCurrency": "{\"id\":1,\"code\":\"USD\",\"name\":\"US Dollar\",\"created_at\":null,\"updated_at\":null,\"symbol\":\"$\"}", - "rootCategory": "{\"id\":1,\"position\":1,\"image\":null,\"status\":1,\"_lft\":1,\"_rgt\":16,\"parent_id\":null,\"created_at\":\"2021-05-05T10:06:44.000000Z\",\"updated_at\":\"2021-05-05T10:06:44.000000Z\",\"display_mode\":\"products_and_description\",\"category_icon_path\":null,\"additional\":null,\"name\":\"Root\",\"description\":\"Root\",\"slug\":\"root\",\"url_path\":\"\",\"meta_title\":\"\",\"meta_description\":\"\",\"meta_keywords\":\"\",\"translations\":[{\"id\":1,\"name\":\"Root\",\"slug\":\"root\",\"description\":\"Root\",\"meta_title\":\"\",\"meta_description\":\"\",\"meta_keywords\":\"\",\"category_id\":1,\"locale\":\"en\",\"locale_id\":null,\"url_path\":\"\"}]}", - "logoUrl": null, - "faviconUrl": null, - "success": null - } - } - } - } -} -~~~ -::: - -## Update Cart Item - -To Update Cart Item You need to pass the cart item id and quantityt with the request. You can achieve this job by using the `CartUpdate` API call. - -- Headers - - | Key | Value | - | ------------- | ---------------- | - | Accept | application/json | - -- Single Request Endpoint - - `POST http(s)://example.com/graphql` - -::: tip - - If you are using pagination and want to know more info about responses then check the [explanation](./explanation) portion. - -::: - -- Query - ~~~query - mutation updateItemToCart { - updateItemToCart(input: { - qty: [{ - cartItemId: 6 - quantity: 3 - }] - }) { - success - cart { - id - customerEmail - customerFirstName - customerLastName - shippingMethod - couponCode - isGift - itemsCount - itemsQty - exchangeRate - globalCurrencyCode - baseCurrencyCode - channelCurrencyCode - cartCurrencyCode - grandTotal - baseGrandTotal - subTotal - baseSubTotal - taxTotal - baseTaxTotal - discountAmount - baseDiscountAmount - checkoutMethod - isGuest - isActive - conversionTime - customerId - channelId - appliedCartRuleIds - createdAt - updatedAt - } - } - } - ~~~ - -::: details Response - -~~~json -{ - "data": { - "addToWishlist": { - "success": "Item Successfully Added To Wishlist", - "wishlist": { - "id": "1", - "channelId": "1", - "productId": "1", - "customerId": "5", - "itemOptions": null, - "additional": "null", - "movedToCart": null, - "shared": null, - "timeOfMoving": null, - "createdAt": "2021-05-28 15:59:00", - "updatedAt": "2021-05-28 15:59:00", - "customer": { - "id": "5", - "firstName": "Naresh", - "lastName": "Verma", - "name": "Naresh Verma", - "gender": null, - "dateOfBirth": null, - "email": "naresh.verma327@webkul.com", - "phone": null, - "password": "$2y$10$tIP1ciRlUCI0ahjsYsjHsenTvXen1PBQKfRu0OklpufOAjf/ruC2O", - "apiToken": "r1bxG3wNl2No0mbTEEJnD6hWkADKcsMA8jnHDnA0zteEw2RRhaqAuUxehzqx7pARAS6WA9jLG3sanFhg", - "customerGroupId": 2, - "subscribedToNewsLetter": false, - "isVerified": true, - "token": "d5308d5f06d01d3393501cb6ebf4ae06", - "notes": null, - "status": true, - "createdAt": "2021-05-28 12:54:56", - "updatedAt": "2021-05-28 12:54:56" - }, - "product": { - "id": "1", - "type": "simple", - "attributeFamilyId": 1, - "sku": "test-product", - "parentId": null, - "createdAt": "2021-05-26 17:43:12", - "updatedAt": "2021-05-26 17:43:12" - }, - "channel": { - "id": "1", - "code": "default", - "name": "Default", - "description": null, - "theme": "velocity", - "homePageContent": "\n

@include(\"shop::home.slider\") @include(\"shop::home.featured-products\") @include(\"shop::home.new-products\")

\n
\n
\n \"test\"\n
\n
\n \"test\"\n \"test\"\n
\n
\n ", - "footerContent": "\n \n
\n Connect With Us\n \n
\n ", - "hostname": "http://localhost/graphql/public", - "defaultLocaleId": 1, - "baseCurrencyId": 1, - "rootCategoryId": 1, - "homeSeo": "{\"meta_title\": \"Demo store\", \"meta_keywords\": \"Demo store meta keyword\", \"meta_description\": \"Demo store meta description\"}", - "defaultLocale": "{\"id\":1,\"code\":\"en\",\"name\":\"English\",\"created_at\":null,\"updated_at\":null,\"direction\":\"ltr\",\"locale_image\":null}", - "baseCurrency": "{\"id\":1,\"code\":\"USD\",\"name\":\"US Dollar\",\"created_at\":null,\"updated_at\":null,\"symbol\":\"$\"}", - "rootCategory": "{\"id\":1,\"position\":1,\"image\":null,\"status\":1,\"_lft\":1,\"_rgt\":16,\"parent_id\":null,\"created_at\":\"2021-05-05T10:06:44.000000Z\",\"updated_at\":\"2021-05-05T10:06:44.000000Z\",\"display_mode\":\"products_and_description\",\"category_icon_path\":null,\"additional\":null,\"name\":\"Root\",\"description\":\"Root\",\"slug\":\"root\",\"url_path\":\"\",\"meta_title\":\"\",\"meta_description\":\"\",\"meta_keywords\":\"\",\"translations\":[{\"id\":1,\"name\":\"Root\",\"slug\":\"root\",\"description\":\"Root\",\"meta_title\":\"\",\"meta_description\":\"\",\"meta_keywords\":\"\",\"category_id\":1,\"locale\":\"en\",\"locale_id\":null,\"url_path\":\"\"}]}", - "logoUrl": null, - "faviconUrl": null, - "success": null - } - } - } - } -} -~~~ -::: - -## Remove Cart Item - -To remove a Cart Item , you have to pass an `id` field with query request .By using this resource and request payload, you will get only a single object under the `data` object in response. - -- Headers - - | Key | Value | - | ------------- | --------------------- | - | Accept | application/json | - | Authorization | Bearer `token-string` | - -### Examples - -Let's take an example, - -- Request Query - ~~~Query - mutation removeCartItem { - removeCartItem(id: 6) { - success - cart { - id - customerEmail - customerFirstName - customerLastName - shippingMethod - couponCode - isGift - itemsCount - itemsQty - exchangeRate - globalCurrencyCode - baseCurrencyCode - channelCurrencyCode - cartCurrencyCode - grandTotal - baseGrandTotal - subTotal - baseSubTotal - taxTotal - baseTaxTotal - discountAmount - baseDiscountAmount - checkoutMethod - isGuest - isActive - conversionTime - customerId - channelId - appliedCartRuleIds - createdAt - updatedAt - } - } - } - ~~~ - -::: details Response - ~~~json - { - "data": { - "removeCartItem": { - "success": "Success: Cart item has been removed successfully.", - "cart": null - } - } - } - ~~~ -::: - -## Move To Wishlist - -You can move a cart item from cart to wishlist from the Bagisto store. You can achieve this job by using the `Move To Wishlist` API call. - -- Headers - - | Key | Value | - | ------------- | ---------------- | - | Accept | application/json | - -- Single Request Endpoint - - `POST http(s)://example.com/graphql` - -::: tip - - If you are using pagination and want to know more info about responses then check the [explanation](./explanation) portion. - -::: - -- Query - ~~~query - mutation moveToWishlist { - moveToWishlist(id: 7) { - success - cart { - id - customerEmail - customerFirstName - customerLastName - shippingMethod - couponCode - isGift - itemsCount - itemsQty - exchangeRate - globalCurrencyCode - baseCurrencyCode - channelCurrencyCode - cartCurrencyCode - grandTotal - baseGrandTotal - subTotal - baseSubTotal - taxTotal - baseTaxTotal - discountAmount - baseDiscountAmount - checkoutMethod - isGuest - isActive - conversionTime - customerId - channelId - appliedCartRuleIds - createdAt - updatedAt - } - } - } - ~~~ - -::: details Response - ~~~json - { - "data": { - "moveToWishlist": { - "success": "Success: Cart item moved to wishlist successfully.", - "cart": null - } - } - } - ~~~ -::: \ No newline at end of file diff --git a/docs/1.x/graphql-shop-api/checkout.md b/docs/1.x/graphql-shop-api/checkout.md deleted file mode 100644 index 427461dc..00000000 --- a/docs/1.x/graphql-shop-api/checkout.md +++ /dev/null @@ -1,525 +0,0 @@ -# Checkout - -In this section, we will see all the APIs which are related to Checkout Process. - -**Note** Make sure customer have item in the cart. - -## Get Checkout addresses - -You can get all the Checkout addresses from the Bagisto store. You can achieve this job by using the `checkoutAddresses` API call. - -- Headers - - | Key | Value | - | ------------- | ---------------- | - | Accept | application/json | - -- Single Request Endpoint - - `POST http(s)://example.com/graphql` - -::: tip - - If you are using pagination and want to know more info about responses then check the [explanation](./explanation) portion. - -::: - -- Query - ~~~query - query checkoutAddresses { - checkoutAddresses { - success - isGuest - customer { - id - firstName - lastName - name - gender - dateOfBirth - email - phone - password - apiToken - customerGroupId - subscribedToNewsLetter - isVerified - token - notes - status - createdAt - updatedAt - } - addresses { - id - address - } - addressList { - id - customerId - companyName - firstName - lastName - address1 - address2 - country - state - city - postcode - phone - vatId - addressType - createdAt - updatedAt - } - cartCount - defaultCountry - } - } - ~~~ - -::: details Response - -~~~json -{ - "data": { - "checkoutAddresses": { - "success": "Success: Customer's addresses fetched successfully.", - "isGuest": false, - "customer": { - "id": "5", - "firstName": "Naresh", - "lastName": "Verma", - "name": "Naresh Verma", - "gender": null, - "dateOfBirth": null, - "email": "naresh.verma327@webkul.com", - "phone": null, - "password": "$2y$10$tIP1ciRlUCI0ahjsYsjHsenTvXen1PBQKfRu0OklpufOAjf/ruC2O", - "apiToken": "r1bxG3wNl2No0mbTEEJnD6hWkADKcsMA8jnHDnA0zteEw2RRhaqAuUxehzqx7pARAS6WA9jLG3sanFhg", - "customerGroupId": 2, - "subscribedToNewsLetter": false, - "isVerified": true, - "token": "d5308d5f06d01d3393501cb6ebf4ae06", - "notes": null, - "status": true, - "createdAt": "2021-05-28 12:54:56", - "updatedAt": "2021-05-28 12:54:56" - }, - "addresses": [ - { - "id": 12, - "address": "Naresh Verma\n 3180 Bluff, GLEN CAMPBELL, PA, US, \n 15742222222\n T: 234343544" - } - ], - "addressList": [ - { - "id": "12", - "customerId": 5, - "companyName": "Webkul2", - "firstName": "Tom Demo2", - "lastName": "Martin Demo2", - "address1": "3180 Bluff", - "address2": "Street", - "country": "US", - "state": "PA", - "city": "GLEN CAMPBELL", - "postcode": "15742222222", - "phone": "234343544", - "vatId": "INV12345678904", - "addressType": "customer", - "createdAt": "2021-05-28 12:59:46", - "updatedAt": "2021-05-28 12:59:46" - } - ], - "cartCount": 1, - "defaultCountry": "IN" - } - } -} -~~~ -::: - -## Get Shipping Methods - -After you get the checkout addresses you need to select the address for checkout or you can pass the billing and shipping address for the checkout. You can achieve this job by using the `shippingMethods` API call. - -- Headers - - | Key | Value | - | ------------- | ---------------- | - | Accept | application/json | - -- Single Request Endpoint - - `POST http(s)://example.com/graphql` - -**Note** No need to save the shipping method for `Virtual` and `Downloadable` and `Booking` type Product. You can jump to `savePayment` Mutation. [Save Payment API](#save-payment-methods) - -- Query - ~~~query - mutation shippingMethods { - shippingMethods(input: { - billingAddressId: 12 - shippingAddressId: 12 - billing: { - companyName: "C. Trades" - firstName: "Doug" - lastName: "D Nelson" - email: "doug@example.com" - address1: "836 Hog" - address2: " Camp Road" - city: "Wheeling" - country: "US" - state: "Illinois" - postcode: "60090" - phone: "708-491-5303" - useForShipping: false - saveAsAddress: true - } - shipping: { - companyName: "C. Trades" - firstName: "Doug" - lastName: "D Nelson" - email: "doug@example.com" - address1: "2252 Charmaine Lane" - address2: "" - city: "ROCKLEDGE" - country: "US" - state: "Georgia" - postcode: "30454" - phone: "806-494-1788" - saveAsAddress: true - } - }) { - success - cartTotal - cartCount - shippingMethods { - title - methods { - code - label - price - formattedPrice - basePrice - formattedBasePrice - } - } - paymentMethods { - method - method_title - description - sort - } - jumpToSection - } - } - ~~~ -::: details Response - -~~~json -{ - "data": { - "shippingMethods": { - "success": "Success: Cart address save successfully.", - "cartTotal": "$10.00", - "cartCount": 1, - "shippingMethods": [ - { - "title": "Flat Rate", - "methods": { - "code": "flatrate_flatrate", - "label": "Flat Rate", - "price": 20, - "formattedPrice": "$20.00", - "basePrice": 20, - "formattedBasePrice": "$20.00" - } - }, - { - "title": "Free Shipping", - "methods": { - "code": "free_free", - "label": "Free Shipping", - "price": 0, - "formattedPrice": "$0.00", - "basePrice": 0, - "formattedBasePrice": "$0.00" - } - } - ], - "paymentMethods": null, - "jumpToSection": "shipping" - } - } -} -~~~ -::: - - -## Get Payment Methods - -Ater You selected the address for checkout and get the list of shipping methods, now you can call the paymentMethods mutation to select the shipping method and to get the list of the payment methods. You can achieve this job by using the `paymentMethods` API call. - -**Note** You need to pass the shipping method `code` with the request to select that shipping method. - -- Headers - - | Key | Value | - | ------------- | ---------------- | - | Accept | application/json | - -- Single Request Endpoint - - `POST http(s)://example.com/graphql` - -- Query - ~~~query - mutation paymentMethods { - paymentMethods(input: { - shippingMethod: "flatrate_flatrate" - }) { - success - cartTotal - cartCount - paymentMethods { - method - method_title - description - sort - } - jumpToSection - } - } - ~~~ -::: details Response - -~~~json -{ - "data": { - "paymentMethods": { - "success": "Success: Shipment has been selected successfully.", - "cartTotal": "$10.00", - "cartCount": 1, - "paymentMethods": [ - { - "method": "paypal_smart_button", - "method_title": "PayPal Smart Button", - "description": "PayPal", - "sort": 0 - }, - { - "method": "cashondelivery", - "method_title": "Cash On Delivery", - "description": "Cash On Delivery", - "sort": 1 - }, - { - "method": "moneytransfer", - "method_title": "Money Transfer", - "description": "Money Transfer", - "sort": 2 - }, - { - "method": "paypal_standard", - "method_title": "PayPal Standard", - "description": "PayPal Standard", - "sort": 3 - } - ], - "jumpToSection": "payment" - } - } -} -~~~ -::: - - -## Save Payment Methods - -Ater You selected the shipping methods for checkout and get the list of Payment methods, now you can call the savePayment mutation to select the payment method and to get checkout review. You can achieve this job by using the `savePayment` API call. - -**Note** You need to pass the payment `method` with the request to select that payment method. - -- Headers - - | Key | Value | - | ------------- | ---------------- | - | Accept | application/json | - -- Single Request Endpoint - - `POST http(s)://example.com/graphql` - -- Query - ~~~query - mutation savePayment { - savePayment(input: { - payment: { - method: "cashondelivery" - } - }) { - success - jumpToSection - cart { - id - customerEmail - customerFirstName - customerLastName - shippingMethod - couponCode - isGift - itemsCount - itemsQty - exchangeRate - globalCurrencyCode - baseCurrencyCode - channelCurrencyCode - cartCurrencyCode - grandTotal - baseGrandTotal - subTotal - baseSubTotal - taxTotal - baseTaxTotal - discountAmount - baseDiscountAmount - checkoutMethod - isGuest - isActive - conversionTime - customerId - channelId - appliedCartRuleIds - createdAt - updatedAt - } - } - } - ~~~ - -::: details Response - -~~~json -{ - "data": { - "savePayment": { - "success": "Success: Payment method selected successfully.", - "jumpToSection": "review", - "cart": { - "id": "10", - "customerEmail": "naresh.verma327@webkul.com", - "customerFirstName": "Naresh", - "customerLastName": "Verma", - "shippingMethod": "flatrate_flatrate", - "couponCode": null, - "isGift": false, - "itemsCount": 1, - "itemsQty": 2, - "exchangeRate": null, - "globalCurrencyCode": "USD", - "baseCurrencyCode": "USD", - "channelCurrencyCode": "USD", - "cartCurrencyCode": "USD", - "grandTotal": 30, - "baseGrandTotal": 30, - "subTotal": 10, - "baseSubTotal": 10, - "taxTotal": 0, - "baseTaxTotal": 0, - "discountAmount": 0, - "baseDiscountAmount": 0, - "checkoutMethod": null, - "isGuest": false, - "isActive": true, - "conversionTime": null, - "customerId": "5", - "channelId": "1", - "appliedCartRuleIds": "", - "createdAt": "2021-05-28 18:39:13", - "updatedAt": "2021-05-28 18:54:39" - } - } - } -} -~~~ -::: - -## Apply Coupon - -After saving the payment method for checkout you can apply coupon code for checkout process. You can achieve this job by using the `applyCoupon` API call. - -- Headers - - | Key | Value | - | ------------- | ---------------- | - | Accept | application/json | - -- Single Request Endpoint - - `POST http(s)://example.com/graphql` - -- Query - ~~~query - mutation applyCoupon { - applyCoupon(input: { - code: "C84U8FTR4TEM" - }) { - success - message - } - } - ~~~ - -::: details Response - -~~~json -{ - "data": { - "applyCoupon": { - "success": false, - "message": "Coupon code is invalid." - } - } -} -~~~ -::: - -## Place Order - -After Following all the above checkout process steps place your order. to perform this action you have to call the `placeOrder` API. - -- Headers - - | Key | Value | - | ------------- | --------------------- | - | Accept | application/json | - | Authorization | Bearer `token-string` | - -### Examples - -Let's take an example, - -- Request Query - ~~~Query - mutation placeOrder { - placeOrder { - success - redirectUrl - } - } - ~~~ - -::: details Response - ~~~json - { - "data": { - "placeOrder": { - "success": "1", - "redirectUrl": null - } - } - } - ~~~ -::: \ No newline at end of file diff --git a/docs/1.x/graphql-shop-api/compare.md b/docs/1.x/graphql-shop-api/compare.md deleted file mode 100644 index 313825bc..00000000 --- a/docs/1.x/graphql-shop-api/compare.md +++ /dev/null @@ -1,589 +0,0 @@ -# Compare - -In this section, we will see all the APIs which are related to Customer Compare Products. - -## Get Compare Products - -You can get all the Compare Products from the Bagisto store. You can achieve this job by using the `Compare Products` API call. - -- Headers - - | Key | Value | - | ------------- | ---------------- | - | Accept | application/json | - -- Single Request Endpoint - - `POST http(s)://example.com/graphql` - -::: tip - - If you are using pagination and want to know more info about responses then check the [explanation](./explanation) portion. - -::: - -**Note** You can pass all the input fields to filter the Compare Product data. - - -- Query - ~~~query - query compareProducts { - compareProducts(input: { - page: 1 - limit: 10 - # id: 2 - # productFlatId: 49 - # productName: "Music Show" - # price: 11.30 - }) { - id - productFlatId - customerId - createdAt - updatedAt - productFlat { - id - sku - name - description - shortDescription - urlKey - new - featured - status - visibleIndividually - thumbnail - price - cost - specialPrice - specialPriceFrom - specialPriceTo - weight - color - colorLabel - size - sizeLabel - locale - channel - productId - parentId - minPrice - maxPrice - metaTitle - metaKeywords - metaDescription - width - height - depth - createdAt - updatedAt - } - customer { - id - firstName - lastName - name - gender - dateOfBirth - email - phone - password - apiToken - customerGroupId - subscribedToNewsLetter - isVerified - token - notes - status - createdAt - updatedAt - } - } - } - ~~~ - -::: details Response - -~~~json -{ - "data": { - "compareProducts": [ - { - "id": "1", - "productFlatId": "1", - "customerId": "5", - "createdAt": "2021-05-28 16:33:03", - "updatedAt": "2021-05-28 16:33:03", - "productFlat": { - "id": "1", - "sku": "test-product", - "name": "testOutlet", - "description": "

testOutlet

", - "shortDescription": "

testOutlet

", - "urlKey": "testoutlet", - "new": true, - "featured": true, - "status": true, - "visibleIndividually": true, - "thumbnail": null, - "price": 5, - "cost": null, - "specialPrice": null, - "specialPriceFrom": null, - "specialPriceTo": null, - "weight": 3, - "color": 1, - "colorLabel": "Red", - "size": 6, - "sizeLabel": "S", - "locale": "en", - "channel": "default", - "productId": "1", - "parentId": null, - "minPrice": 5, - "maxPrice": 5, - "metaTitle": "", - "metaKeywords": "", - "metaDescription": "", - "width": 0, - "height": 0, - "depth": 0, - "createdAt": "2021-05-26 17:43:12", - "updatedAt": "2021-05-26 17:43:12" - }, - "customer": { - "id": "5", - "firstName": "Naresh", - "lastName": "Verma", - "name": "Naresh Verma", - "gender": null, - "dateOfBirth": null, - "email": "naresh.verma327@webkul.com", - "phone": null, - "password": "$2y$10$tIP1ciRlUCI0ahjsYsjHsenTvXen1PBQKfRu0OklpufOAjf/ruC2O", - "apiToken": "r1bxG3wNl2No0mbTEEJnD6hWkADKcsMA8jnHDnA0zteEw2RRhaqAuUxehzqx7pARAS6WA9jLG3sanFhg", - "customerGroupId": 2, - "subscribedToNewsLetter": false, - "isVerified": true, - "token": "d5308d5f06d01d3393501cb6ebf4ae06", - "notes": null, - "status": true, - "createdAt": "2021-05-28 12:54:56", - "updatedAt": "2021-05-28 12:54:56" - } - } - ] - } -} -~~~ -::: - -## Get Compare Product By ID - -To get the specific Compare Product, you have to pass an `id` field with query request .By using this resource and request payload, you will get only a single object under the `data` object in response. - -- Headers - - | Key | Value | - | ------------- | --------------------- | - | Accept | application/json | - | Authorization | Bearer `token-string` | - -### Examples - -Let's take an example, - -- Request Query - ~~~Query - query compareProduct { - compareProduct(id: 1) { - id - productFlatId - customerId - createdAt - updatedAt - productFlat { - id - sku - name - description - shortDescription - urlKey - new - featured - status - visibleIndividually - thumbnail - price - cost - specialPrice - specialPriceFrom - specialPriceTo - weight - color - colorLabel - size - sizeLabel - locale - channel - productId - parentId - minPrice - maxPrice - metaTitle - metaKeywords - metaDescription - width - height - depth - createdAt - updatedAt - } - customer { - id - firstName - lastName - name - gender - dateOfBirth - email - phone - password - apiToken - customerGroupId - subscribedToNewsLetter - isVerified - token - notes - status - createdAt - updatedAt - } - } - } - ~~~ - -::: details Response - ~~~json - { - "data": { - "compareProduct": { - "id": "1", - "productFlatId": "1", - "customerId": "5", - "createdAt": "2021-05-28 16:33:03", - "updatedAt": "2021-05-28 16:33:03", - "productFlat": { - "id": "1", - "sku": "test-product", - "name": "testOutlet", - "description": "

testOutlet

", - "shortDescription": "

testOutlet

", - "urlKey": "testoutlet", - "new": true, - "featured": true, - "status": true, - "visibleIndividually": true, - "thumbnail": null, - "price": 5, - "cost": null, - "specialPrice": null, - "specialPriceFrom": null, - "specialPriceTo": null, - "weight": 3, - "color": 1, - "colorLabel": "Red", - "size": 6, - "sizeLabel": "S", - "locale": "en", - "channel": "default", - "productId": "1", - "parentId": null, - "minPrice": 5, - "maxPrice": 5, - "metaTitle": "", - "metaKeywords": "", - "metaDescription": "", - "width": 0, - "height": 0, - "depth": 0, - "createdAt": "2021-05-26 17:43:12", - "updatedAt": "2021-05-26 17:43:12" - }, - "customer": { - "id": "5", - "firstName": "Naresh", - "lastName": "Verma", - "name": "Naresh Verma", - "gender": null, - "dateOfBirth": null, - "email": "naresh.verma327@webkul.com", - "phone": null, - "password": "$2y$10$tIP1ciRlUCI0ahjsYsjHsenTvXen1PBQKfRu0OklpufOAjf/ruC2O", - "apiToken": "r1bxG3wNl2No0mbTEEJnD6hWkADKcsMA8jnHDnA0zteEw2RRhaqAuUxehzqx7pARAS6WA9jLG3sanFhg", - "customerGroupId": 2, - "subscribedToNewsLetter": false, - "isVerified": true, - "token": "d5308d5f06d01d3393501cb6ebf4ae06", - "notes": null, - "status": true, - "createdAt": "2021-05-28 12:54:56", - "updatedAt": "2021-05-28 12:54:56" - } - } - } - } - ~~~ -::: - - - -## Add To Compare - -You can Add a product to Compare. You can achieve this job by using the `Compare` API call. - -- Headers - - | Key | Value | - | ------------- | ---------------- | - | Accept | application/json | - -- Single Request Endpoint - - `POST http(s)://example.com/graphql` - -::: tip - - If you are using pagination and want to know more info about responses then check the [explanation](./explanation) portion. - -::: - -- Query - ~~~query - mutation addToCompare { - addToCompare(input: { - productFlatId: 1 - }) { - success - compareProduct { - id - productFlatId - customerId - createdAt - updatedAt - productFlat { - id - sku - name - description - shortDescription - urlKey - new - featured - status - visibleIndividually - thumbnail - price - cost - specialPrice - specialPriceFrom - specialPriceTo - weight - color - colorLabel - size - sizeLabel - locale - channel - productId - parentId - minPrice - maxPrice - metaTitle - metaKeywords - metaDescription - width - height - depth - createdAt - updatedAt - } - customer { - id - firstName - lastName - name - gender - dateOfBirth - email - phone - password - apiToken - customerGroupId - subscribedToNewsLetter - isVerified - token - notes - status - createdAt - updatedAt - } - } - } - } - ~~~ - -::: details Response - -~~~json -{ - "data": { - "addToCompare": { - "success": "Item successfully added to compare list", - "compareProduct": { - "id": "1", - "productFlatId": "1", - "customerId": "5", - "createdAt": "2021-05-28 16:33:03", - "updatedAt": "2021-05-28 16:33:03", - "productFlat": { - "id": "1", - "sku": "test-product", - "name": "testOutlet", - "description": "

testOutlet

", - "shortDescription": "

testOutlet

", - "urlKey": "testoutlet", - "new": true, - "featured": true, - "status": true, - "visibleIndividually": true, - "thumbnail": null, - "price": 5, - "cost": null, - "specialPrice": null, - "specialPriceFrom": null, - "specialPriceTo": null, - "weight": 3, - "color": 1, - "colorLabel": "Red", - "size": 6, - "sizeLabel": "S", - "locale": "en", - "channel": "default", - "productId": "1", - "parentId": null, - "minPrice": 5, - "maxPrice": 5, - "metaTitle": "", - "metaKeywords": "", - "metaDescription": "", - "width": 0, - "height": 0, - "depth": 0, - "createdAt": "2021-05-26 17:43:12", - "updatedAt": "2021-05-26 17:43:12" - }, - "customer": { - "id": "5", - "firstName": "Naresh", - "lastName": "Verma", - "name": "Naresh Verma", - "gender": null, - "dateOfBirth": null, - "email": "naresh.verma327@webkul.com", - "phone": null, - "password": "$2y$10$tIP1ciRlUCI0ahjsYsjHsenTvXen1PBQKfRu0OklpufOAjf/ruC2O", - "apiToken": "r1bxG3wNl2No0mbTEEJnD6hWkADKcsMA8jnHDnA0zteEw2RRhaqAuUxehzqx7pARAS6WA9jLG3sanFhg", - "customerGroupId": 2, - "subscribedToNewsLetter": false, - "isVerified": true, - "token": "d5308d5f06d01d3393501cb6ebf4ae06", - "notes": null, - "status": true, - "createdAt": "2021-05-28 12:54:56", - "updatedAt": "2021-05-28 12:54:56" - } - } - } - } -} -~~~ -::: - -## Remove Product From Compare - -To remove a product from the Compare, you have to pass an `id` field with query request .By using this resource and request payload, you will get only a single object under the `data` object in response. - -- Headers - - | Key | Value | - | ------------- | --------------------- | - | Accept | application/json | - | Authorization | Bearer `token-string` | - -### Examples - -Let's take an example, - -- Request Query - ~~~Query - mutation removeFromCompareProduct { - removeFromCompareProduct(input: { - productFlatId: 1 - }) { - status - success - } - } - ~~~ - -::: details Response - ~~~json - { - "data": { - "removeFromCompareProduct": { - "status": true, - "success": "Item successfully removed from compare list" - } - } - } - ~~~ -: - -## Remove All Product From Compare - -To remove all product from the Compare, you have to pass related fields with query request . - -- Headers - - | Key | Value | - | ------------- | --------------------- | - | Accept | application/json | - | Authorization | Bearer `token-string` | - -### Examples - -Let's take an example, - -- Request Query - ~~~Query - mutation removeAllCompareProducts { - removeAllCompareProducts { - status - success - } - } - ~~~ - -::: details Response - ~~~json - { - "data": { - "removeAllCompareProducts": { - "status": true, - "success": "All Items successfully removed from compare list" - } - } - } - ~~~ -::: \ No newline at end of file diff --git a/docs/1.x/graphql-shop-api/downloadable-links.md b/docs/1.x/graphql-shop-api/downloadable-links.md deleted file mode 100644 index ae04a397..00000000 --- a/docs/1.x/graphql-shop-api/downloadable-links.md +++ /dev/null @@ -1,549 +0,0 @@ -# Downloadable Links - -In this section, we will see all the APIs which are related to Customer Downloadable Links. - -## Get All Downloadable Links - -You can get all the Downloadable Links from the Bagisto store. You can achieve this job by using the `Downloadable Links` API call. - -- Headers - - | Key | Value | - | ------------- | ---------------- | - | Accept | application/json | - -- Single Request Endpoint - - `POST http(s)://example.com/graphql` - -::: tip - - If you are using pagination and want to know more info about responses then check the [explanation](./explanation) portion. - -::: - -**Note** You can pass all the input fields to filter the Downloadable link data. - - -- Query - ~~~query - query downloadableLinkPurchases { - downloadableLinkPurchases(input: { - page: 1 - limit: 10 - # id: 1 - # orderId: 3 - # orderItemId: 9 - # productName: "e-book" - # linkName: "link 1" - # status: "available" - # downloadBought: 3 - # downloadUsed: 1 - }) { - id - productName - name - url - file - fileName - type - downloadBought - downloadUsed - status - customerId - orderId - orderItemId - createdAt - updatedAt - customer { - id - firstName - lastName - name - gender - dateOfBirth - email - phone - password - apiToken - customerGroupId - subscribedToNewsLetter - isVerified - token - notes - status - } - order { - id - incrementId - status - channelName - isGuest - customerEmail - customerFirstName - customerLastName - customerCompanyName - customerVatId - shippingMethod - shippingTitle - shippingDescription - couponCode - isGift - totalItemCount - totalQtyOrdered - baseCurrencyCode - channelCurrencyCode - orderCurrencyCode - grandTotal - baseGrandTotal - grandTotalInvoiced - baseGrandTotalInvoiced - grandTotalRefunded - baseGrandTotalRefunded - subTotal - baseSubTotal - subTotalInvoiced - baseSubTotalInvoiced - subTotalRefunded - baseSubTotalRefunded - discountPercent - discountAmount - baseDiscountAmount - discountInvoiced - baseDiscountInvoiced - discountRefunded - baseDiscountRefunded - taxAmount - baseTaxAmount - taxAmountInvoiced - baseTaxAmountInvoiced - taxAmountRefunded - baseTaxAmountRefunded - shippingAmount - baseShippingAmount - shippingInvoiced - baseShippingInvoiced - shippingRefunded - baseShippingRefunded - customerId - customerType - channelId - channelType - cartId - appliedCartRuleIds - shippingDiscountAmount - baseShippingDiscountAmount - createdAt - updatedAt - } - orderItem { - id - sku - type - name - couponCode - weight - totalWeight - qtyOrdered - qtyShipped - qtyInvoiced - qtyCanceled - qtyRefunded - price - basePrice - total - baseTotal - } - } - } - ~~~ - -::: details Response - -~~~json -{ - "data": { - "downloadableLinkPurchases": [ - { - "id": "1", - "productName": "e-book", - "name": "Link 3", - "url": "https://cdn.pixabay.com/photo/2021/02/01/13/37/cars-5970663_960_720.png", - "file": null, - "fileName": null, - "type": "url", - "downloadBought": 3, - "downloadUsed": 0, - "status": true, - "customerId": "5", - "orderId": "4", - "orderItemId": "4", - "createdAt": "2021-05-28 17:03:10", - "updatedAt": "2021-05-28 17:03:35", - "customer": { - "id": "5", - "firstName": "Naresh", - "lastName": "Verma", - "name": "Naresh Verma", - "gender": null, - "dateOfBirth": null, - "email": "naresh.verma327@webkul.com", - "phone": null, - "password": "$2y$10$tIP1ciRlUCI0ahjsYsjHsenTvXen1PBQKfRu0OklpufOAjf/ruC2O", - "apiToken": "r1bxG3wNl2No0mbTEEJnD6hWkADKcsMA8jnHDnA0zteEw2RRhaqAuUxehzqx7pARAS6WA9jLG3sanFhg", - "customerGroupId": 2, - "subscribedToNewsLetter": false, - "isVerified": true, - "token": "d5308d5f06d01d3393501cb6ebf4ae06", - "notes": null, - "status": true - }, - "order": { - "id": 4, - "incrementId": "4", - "status": "completed", - "channelName": "Default", - "isGuest": 0, - "customerEmail": "naresh.verma327@webkul.com", - "customerFirstName": "Naresh", - "customerLastName": "Verma", - "customerCompanyName": null, - "customerVatId": null, - "shippingMethod": null, - "shippingTitle": null, - "shippingDescription": null, - "couponCode": null, - "isGift": 0, - "totalItemCount": 1, - "totalQtyOrdered": 1, - "baseCurrencyCode": "USD", - "channelCurrencyCode": "USD", - "orderCurrencyCode": "USD", - "grandTotal": 18.55, - "baseGrandTotal": 18.55, - "grandTotalInvoiced": 18.55, - "baseGrandTotalInvoiced": 18.55, - "grandTotalRefunded": 0, - "baseGrandTotalRefunded": 0, - "subTotal": 18.55, - "baseSubTotal": 18.55, - "subTotalInvoiced": 18.55, - "baseSubTotalInvoiced": 18.55, - "subTotalRefunded": 0, - "baseSubTotalRefunded": 0, - "discountPercent": 0, - "discountAmount": 0, - "baseDiscountAmount": 0, - "discountInvoiced": 0, - "baseDiscountInvoiced": 0, - "discountRefunded": 0, - "baseDiscountRefunded": 0, - "taxAmount": 0, - "baseTaxAmount": 0, - "taxAmountInvoiced": 0, - "baseTaxAmountInvoiced": 0, - "taxAmountRefunded": 0, - "baseTaxAmountRefunded": 0, - "shippingAmount": 0, - "baseShippingAmount": 0, - "shippingInvoiced": 0, - "baseShippingInvoiced": 0, - "shippingRefunded": 0, - "baseShippingRefunded": 0, - "customerId": 5, - "customerType": "Webkul\\Customer\\Models\\Customer", - "channelId": 1, - "channelType": "Webkul\\Core\\Models\\Channel", - "cartId": "5", - "appliedCartRuleIds": "", - "shippingDiscountAmount": 0, - "baseShippingDiscountAmount": 0, - "createdAt": "2021-05-28 17:03:10", - "updatedAt": "2021-05-28 17:03:35" - }, - "orderItem": { - "id": "4", - "sku": "e-book", - "type": "downloadable", - "name": "e-book", - "couponCode": null, - "weight": 5.2, - "totalWeight": 5.2, - "qtyOrdered": 1, - "qtyShipped": 0, - "qtyInvoiced": 1, - "qtyCanceled": 0, - "qtyRefunded": 0, - "price": 18.55, - "basePrice": 18.55, - "total": 18.55, - "baseTotal": 18.55 - } - } - ] - } -} -~~~ -::: - -## Get Downloadable Link By ID - -To get the specific Downloadable Link, you have to pass an `id` field with query request .By using this resource and request payload, you will get only a single object under the `data` object in response. - -- Headers - - | Key | Value | - | ------------- | --------------------- | - | Accept | application/json | - | Authorization | Bearer `token-string` | - -### Examples - -Let's take an example, - -- Request Query - ~~~Query - query downloadableLinkPurchase { - downloadableLinkPurchase(id: 1) { - id - productName - name - url - file - fileName - type - downloadBought - downloadUsed - status - customerId - orderId - orderItemId - createdAt - updatedAt - customer { - id - firstName - lastName - name - gender - dateOfBirth - email - phone - password - apiToken - customerGroupId - subscribedToNewsLetter - isVerified - token - notes - status - } - order { - id - incrementId - status - channelName - isGuest - customerEmail - customerFirstName - customerLastName - customerCompanyName - customerVatId - shippingMethod - shippingTitle - shippingDescription - couponCode - isGift - totalItemCount - totalQtyOrdered - baseCurrencyCode - channelCurrencyCode - orderCurrencyCode - grandTotal - baseGrandTotal - grandTotalInvoiced - baseGrandTotalInvoiced - grandTotalRefunded - baseGrandTotalRefunded - subTotal - baseSubTotal - subTotalInvoiced - baseSubTotalInvoiced - subTotalRefunded - baseSubTotalRefunded - discountPercent - discountAmount - baseDiscountAmount - discountInvoiced - baseDiscountInvoiced - discountRefunded - baseDiscountRefunded - taxAmount - baseTaxAmount - taxAmountInvoiced - baseTaxAmountInvoiced - taxAmountRefunded - baseTaxAmountRefunded - shippingAmount - baseShippingAmount - shippingInvoiced - baseShippingInvoiced - shippingRefunded - baseShippingRefunded - customerId - customerType - channelId - channelType - cartId - appliedCartRuleIds - shippingDiscountAmount - baseShippingDiscountAmount - createdAt - updatedAt - } - orderItem { - id - sku - type - name - couponCode - weight - totalWeight - qtyOrdered - qtyShipped - qtyInvoiced - qtyCanceled - qtyRefunded - price - basePrice - total - baseTotal - } - } - } - ~~~ - -::: details Response - ~~~json - { - "data": { - "downloadableLinkPurchase": { - "id": "1", - "productName": "e-book", - "name": "Link 3", - "url": "https://cdn.pixabay.com/photo/2021/02/01/13/37/cars-5970663_960_720.png", - "file": null, - "fileName": null, - "type": "url", - "downloadBought": 3, - "downloadUsed": 0, - "status": true, - "customerId": "5", - "orderId": "4", - "orderItemId": "4", - "createdAt": "2021-05-28 17:03:10", - "updatedAt": "2021-05-28 17:03:35", - "customer": { - "id": "5", - "firstName": "Naresh", - "lastName": "Verma", - "name": "Naresh Verma", - "gender": null, - "dateOfBirth": null, - "email": "naresh.verma327@webkul.com", - "phone": null, - "password": "$2y$10$tIP1ciRlUCI0ahjsYsjHsenTvXen1PBQKfRu0OklpufOAjf/ruC2O", - "apiToken": "r1bxG3wNl2No0mbTEEJnD6hWkADKcsMA8jnHDnA0zteEw2RRhaqAuUxehzqx7pARAS6WA9jLG3sanFhg", - "customerGroupId": 2, - "subscribedToNewsLetter": false, - "isVerified": true, - "token": "d5308d5f06d01d3393501cb6ebf4ae06", - "notes": null, - "status": true - }, - "order": { - "id": 4, - "incrementId": "4", - "status": "completed", - "channelName": "Default", - "isGuest": 0, - "customerEmail": "naresh.verma327@webkul.com", - "customerFirstName": "Naresh", - "customerLastName": "Verma", - "customerCompanyName": null, - "customerVatId": null, - "shippingMethod": null, - "shippingTitle": null, - "shippingDescription": null, - "couponCode": null, - "isGift": 0, - "totalItemCount": 1, - "totalQtyOrdered": 1, - "baseCurrencyCode": "USD", - "channelCurrencyCode": "USD", - "orderCurrencyCode": "USD", - "grandTotal": 18.55, - "baseGrandTotal": 18.55, - "grandTotalInvoiced": 18.55, - "baseGrandTotalInvoiced": 18.55, - "grandTotalRefunded": 0, - "baseGrandTotalRefunded": 0, - "subTotal": 18.55, - "baseSubTotal": 18.55, - "subTotalInvoiced": 18.55, - "baseSubTotalInvoiced": 18.55, - "subTotalRefunded": 0, - "baseSubTotalRefunded": 0, - "discountPercent": 0, - "discountAmount": 0, - "baseDiscountAmount": 0, - "discountInvoiced": 0, - "baseDiscountInvoiced": 0, - "discountRefunded": 0, - "baseDiscountRefunded": 0, - "taxAmount": 0, - "baseTaxAmount": 0, - "taxAmountInvoiced": 0, - "baseTaxAmountInvoiced": 0, - "taxAmountRefunded": 0, - "baseTaxAmountRefunded": 0, - "shippingAmount": 0, - "baseShippingAmount": 0, - "shippingInvoiced": 0, - "baseShippingInvoiced": 0, - "shippingRefunded": 0, - "baseShippingRefunded": 0, - "customerId": 5, - "customerType": "Webkul\\Customer\\Models\\Customer", - "channelId": 1, - "channelType": "Webkul\\Core\\Models\\Channel", - "cartId": "5", - "appliedCartRuleIds": "", - "shippingDiscountAmount": 0, - "baseShippingDiscountAmount": 0, - "createdAt": "2021-05-28 17:03:10", - "updatedAt": "2021-05-28 17:03:35" - }, - "orderItem": { - "id": "4", - "sku": "e-book", - "type": "downloadable", - "name": "e-book", - "couponCode": null, - "weight": 5.2, - "totalWeight": 5.2, - "qtyOrdered": 1, - "qtyShipped": 0, - "qtyInvoiced": 1, - "qtyCanceled": 0, - "qtyRefunded": 0, - "price": 18.55, - "basePrice": 18.55, - "total": 18.55, - "baseTotal": 18.55 - } - } - } - } - ~~~ -::: \ No newline at end of file diff --git a/docs/1.x/graphql-shop-api/getting-started-with-the-api.md b/docs/1.x/graphql-shop-api/getting-started-with-the-api.md deleted file mode 100644 index c46fc2b6..00000000 --- a/docs/1.x/graphql-shop-api/getting-started-with-the-api.md +++ /dev/null @@ -1,429 +0,0 @@ -# Authentication - -[[toc]] - -## Introduction - -By default the [Bagisto](https://bagisto.com) GraphQL API makes use of the [JWT package](https://jwt.io/) for token-based authentication. - -So, let's try to authenticate the Customer by using **JWT**. Please send valid **User Agent** header in your request whether you are using postman, curl or some other clients. - -To check the customer's API (front APIs), you have to put all the shop schemas at the end in the schema file (i.e. packages/Webkul/GraphQLAPI/graphql/schema.graphql). - -**Note** Put all shop schemas #import /shop/*/*.graphql after #import /promotion/*.graphql this line. - -- Single Request Endpoint - - `POST http(s)://example.com/graphql` - -- Headers - - | Key | Value | - | ------ | ---------------- | - | Accept | application/json | - - - -- Query - - ~~~query - mutation customerLogin { - customerLogin(input: { - email: "test@webkul.com" - password: "admin123" - }) { - status - success - accessToken - tokenType - expiresIn - customer { - id - firstName - lastName - name - gender - dateOfBirth - email - phone - password - apiToken - customerGroupId - subscribedToNewsLetter - isVerified - token - notes - status - createdAt - updatedAt - } - } - } - ~~~ - -- Response - - - Once you send the request, you will get some random token string that will be used to access the API data. - - ~~~json - { - "data": { - "customerLogin": { - "status": true, - "success": "Success: Customer login successfully.", - "accessToken": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOlwvXC9sb2NhbGhvc3RcL2dyYXBocWxcL3B1YmxpY1wvZ3JhcGhxbCIsImlhdCI6MTYyMjE4NDAyNywiZXhwIjoxNjUzNzIwMDI3LCJuYmYiOjE2MjIxODQwMjcsImp0aSI6ImRTa3JpSjZqU2d1QTBQVG4iLCJzdWIiOjMsInBydiI6IjhmY2EwODhhYmFlMmY5YThmODRhNWYwYmY2YTY1MjQ0OTA1NWJlMDAifQ.YXUdp9S1cDCGUkLdv7NijMgx0bcX5KbokcjSIMwEE0U", - "tokenType": "Bearer", - "expiresIn": 31536000, - "customer": { - "id": "3", - "firstName": "test", - "lastName": "test", - "name": "Test Test", - "gender": null, - "dateOfBirth": null, - "email": "test@webkul.com", - "phone": null, - "password": "$2y$10$QSz44sL1TcKwNYBHcX6go.OIMjxN1eakuJnHYrB.Rj0jyM172yfXW", - "apiToken": "wWFsZbvoXPdL0NdWxK4cR23SAd6UJnVDDqsMrBgYmUeJvoCzEJDl4b9rn7eR9ckFC5mIaZmVg9vmXamd", - "customerGroupId": 2, - "subscribedToNewsLetter": false, - "isVerified": true, - "token": "4274363173b91b41790653255c037bbd", - "notes": null, - "status": true, - "createdAt": "2021-05-28 11:59:21", - "updatedAt": "2021-05-28 11:59:21" - } - } - } - } - ~~~ - -## Get Customer Details - -Once you are authenticated, try to access the current User data by using **JWT**, use the Single GraphQL API endpoint for this, - -::: tip - -Here we are just showing a example of how to collect data from the GraphQL API with the usage of a **JWT** token. - -::: - -#### Headers - - | Key | Value | - | ------------- | --------------------- | - | Accept | application/json | - | Authorization | Bearer `token-string` | - -::: tip - -As you check the **JWT** authentication we got some token string, we just need to put that token in the request header. For e.g., - -~~~request-header - Accept:application/json - Authorization:Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9... -~~~ - -::: - -- Query - ~~~query - query accountInfo { - accountInfo { - id - firstName - lastName - name - gender - dateOfBirth - email - phone - password - apiToken - customerGroupId - subscribedToNewsLetter - isVerified - token - notes - status - createdAt - updatedAt - } - } - ~~~ - -::: details Response - -~~~json -{ - "data": { - "accountInfo": { - "id": "3", - "firstName": "test", - "lastName": "test", - "name": "Test Test", - "gender": null, - "dateOfBirth": null, - "email": "test@webkul.com", - "phone": null, - "password": "$2y$10$QSz44sL1TcKwNYBHcX6go.OIMjxN1eakuJnHYrB.Rj0jyM172yfXW", - "apiToken": "wWFsZbvoXPdL0NdWxK4cR23SAd6UJnVDDqsMrBgYmUeJvoCzEJDl4b9rn7eR9ckFC5mIaZmVg9vmXamd", - "customerGroupId": 2, - "subscribedToNewsLetter": false, - "isVerified": true, - "token": "4274363173b91b41790653255c037bbd", - "notes": null, - "status": true, - "createdAt": "2021-05-28 11:59:21", - "updatedAt": "2021-05-28 11:59:21" - } - } -} -~~~ - -::: - - -## Register a new Customer - - To Register a new Customer, you have to perform mutation on customer and paas related fields in the request. - - - Headers - - | Key | Value | - | ------------- | --------------------- | - | Accept | application/json | - | Authorization | Bearer `token-string` | - - ### Examples - - Let's take an example, - -- Request Mutation - ~~~Mutation - mutation customerRegister { - customerRegister(input: { - firstName: "John" - lastName: "Doe" - email: "john@example.com" - password: "demo12345" - passwordConfirmation: "demo12345" - }) { - status - success - } - } - ~~~ - -::: details Response - ~~~json - { - "data": { - "customerRegister": { - "status": true, - "success": "Account created successfully." - } - } - } - ~~~ -::: - -## Update a Customer - - To update a Customer, you have to perform mutation on Customer by passing related fields of logged in customer in the request query. - API call resource will update a Customer, only if the customer has logged in. - - - Headers - - | Key | Value | - | ------------- | --------------------- | - | Accept | application/json | - | Authorization | Bearer `token-string` | - - ### Examples - - Let's take an example, - -- Request Mutation - ~~~Mutation - mutation updateAccount { - updateAccount(input: { - firstName: "John" - lastName: "Doe" - email: "john@example.com" - gender: "Male" - dateOfBirth: "2019-10-30" - phone: "345789876" - oldpassword: "demo12345" - password: "demo123456" - passwordConfirmation: "demo123456" - }) { - id - firstName - lastName - name - gender - dateOfBirth - email - phone - password - apiToken - customerGroupId - subscribedToNewsLetter - isVerified - token - notes - status - createdAt - updatedAt - } - } - ~~~ - -::: details Response - ~~~json - { - "data": { - "updateAccount": { - "id": "4", - "firstName": "John", - "lastName": "Doe", - "name": "John Doe", - "gender": "Male", - "dateOfBirth": "2019-10-30", - "email": "john@example.com", - "phone": "345789876", - "password": "$2y$10$u8P14NRoevQmJM0VVO.7hOKX98hrtArPd9WawkL7ljHywJtYMS/QS", - "apiToken": "7LaahSQCR9tQYVy894pZ7C79C9uIksxGbks0svVG5fzqjP023532jIWoMR2oW0McnQdpIBQttHbn2J2d", - "customerGroupId": 2, - "subscribedToNewsLetter": false, - "isVerified": true, - "token": "e043dc2f63147521a14bb9109f779247", - "notes": null, - "status": true, - "createdAt": "2021-05-28 12:18:22", - "updatedAt": "2021-05-28 12:24:51" - } - } - } - ~~~ -::: - -## Forgot Password - -If you Forgot Password, you have to perform mutation on Customer by passing the registered email of that Customer. and a mail will be received on that email id. - -- Headers - - | Key | Value | - | ------------- | --------------------- | - | Accept | application/json | - | Authorization | Bearer `token-string` | - - ### Examples - - Let's take an example, - -- Request Mutation - ~~~Mutation - mutation forgotPassword { - forgotPassword(input: { - email: "john@example.com" - }) { - status - success - } - } - ~~~ - -::: details Response - ~~~json - { - "data": { - "forgotPassword": { - "status": true, - "success": "We have e-mailed your reset password link." - } - } - } - ~~~ -::: - -## Delete a Customer - -To delete a Customer, you have to perform mutation on Customer by passing the Password of that Customer. - -- Headers - - | Key | Value | - | ------------- | --------------------- | - | Accept | application/json | - | Authorization | Bearer `token-string` | - - ### Examples - - Let's take an example, - -- Request Mutation - ~~~Mutation - mutation deleteAccount { - deleteAccount(input: { - password: "demo123456" - }) { - status - success - } - } - ~~~ - -::: details Response - ~~~json - { - "data": { - "deleteAccount": { - "status": true, - "success": "Customer deleted successfully." - } - } - } - ~~~ -::: - -## Logout - -You can logout the Customer by performing the logout mutaion on customer. - -- Headers - - | Key | Value | - | ------------- | --------------------- | - | Accept | application/json | - | Authorization | Bearer `token-string` | - - ### Examples - - Let's take an example, - - - Request Mutation - ~~~Mutation - mutation customerLogout { - customerLogout { - status - success - } - } - ~~~ - -::: details Response - ~~~json - { - "data": { - "customerLogout": { - "status": true, - "success": "Success: Customer logout successfully." - } - } - } - ~~~ -::: diff --git a/docs/1.x/graphql-shop-api/homepage.md b/docs/1.x/graphql-shop-api/homepage.md deleted file mode 100644 index 36ff1d9e..00000000 --- a/docs/1.x/graphql-shop-api/homepage.md +++ /dev/null @@ -1,706 +0,0 @@ -# Home Page Content - -In this section, we will see all the APIs which are related to Home Page Content. - -## Get New Products - -You can get New Products of home page from the Bagisto store by passing the count of products. You can achieve this job by using the `newProducts` API call. - -- Headers - - | Key | Value | - | ------------- | ---------------- | - | Accept | application/json | - -- Single Request Endpoint - - `POST http(s)://example.com/graphql` - -- Query - ~~~query - query newProducts{ - newProducts(count:3){ - id - sku - name - description - shortDescription - urlKey - new - featured - status - visibleIndividually - thumbnail - price - cost - specialPrice - specialPriceFrom - specialPriceTo - weight - color - colorLabel - size - sizeLabel - locale - channel - productId - parentId - minPrice - maxPrice - metaTitle - metaKeywords - metaDescription - width - height - depth - product{ - id - } - variants { - id - } - parent { - id - } - createdAt - updatedAt - } - } - ~~~ - -::: details Response - -~~~json -{ - "data": { - "newProducts": [ - { - "id": "8", - "sku": "e-book", - "name": "e-book", - "description": "

Home Decor Description

", - "shortDescription": "

Home Decor Short Description

", - "urlKey": "e-book", - "new": true, - "featured": true, - "status": true, - "visibleIndividually": true, - "thumbnail": null, - "price": 12.55, - "cost": 11.5, - "specialPrice": 11.3, - "specialPriceFrom": "2021-02-08", - "specialPriceTo": "2021-02-28", - "weight": 5.2, - "color": 3, - "colorLabel": "Yellow", - "size": 9, - "sizeLabel": "XL", - "locale": "en", - "channel": "default", - "productId": "8", - "parentId": null, - "minPrice": 11.295, - "maxPrice": 11.295, - "metaTitle": "Home Decor Meta Title", - "metaKeywords": "Home Decor Meta Keywords", - "metaDescription": "Home Decor Meta Description", - "width": 30, - "height": 24, - "depth": 11, - "product": { - "id": "8" - }, - "variants": [], - "parent": null, - "createdAt": "2021-05-27 12:52:39", - "updatedAt": "2021-05-27 12:52:39" - }, - { - "id": "12", - "sku": "event-booking", - "name": "Music Show", - "description": "

Home Decor Description

", - "shortDescription": "

Home Decor Short Description

", - "urlKey": "music-show", - "new": true, - "featured": true, - "status": true, - "visibleIndividually": true, - "thumbnail": null, - "price": 12.55, - "cost": 11.5, - "specialPrice": null, - "specialPriceFrom": null, - "specialPriceTo": null, - "weight": 5.2, - "color": 3, - "colorLabel": "Yellow", - "size": 9, - "sizeLabel": "XL", - "locale": "en", - "channel": "default", - "productId": "12", - "parentId": null, - "minPrice": 11.295, - "maxPrice": 11.295, - "metaTitle": "Home Decor Meta Title", - "metaKeywords": "Home Decor Meta Keywords", - "metaDescription": "Home Decor Meta Description", - "width": 30, - "height": 24, - "depth": 11, - "product": { - "id": "12" - }, - "variants": [], - "parent": null, - "createdAt": "2021-05-27 16:04:24", - "updatedAt": "2021-05-27 16:04:24" - }, - { - "id": "9", - "sku": "bundle-demo", - "name": "Bundle Box", - "description": "

Home Decor Description

", - "shortDescription": "

Home Decor Short Description

", - "urlKey": "bundle-demo", - "new": true, - "featured": true, - "status": true, - "visibleIndividually": true, - "thumbnail": null, - "price": 12.55, - "cost": 11.5, - "specialPrice": 11.3, - "specialPriceFrom": "2021-02-08", - "specialPriceTo": "2021-02-28", - "weight": 5.2, - "color": 3, - "colorLabel": "Yellow", - "size": 9, - "sizeLabel": "XL", - "locale": "en", - "channel": "default", - "productId": "9", - "parentId": null, - "minPrice": 13.5, - "maxPrice": 31.5, - "metaTitle": "Home Decor Meta Title", - "metaKeywords": "Home Decor Meta Keywords", - "metaDescription": "Home Decor Meta Description", - "width": 30, - "height": 24, - "depth": 11, - "product": { - "id": "9" - }, - "variants": [], - "parent": null, - "createdAt": "2021-05-27 13:11:58", - "updatedAt": "2021-05-27 13:11:58" - } - ] - } -} -~~~ -::: - -## Get Featured Products - -You can get Featured Products Products of home page from the Bagisto store by passing the count of products. You can achieve this job by using the `featuredProducts` API call. - -- Headers - - | Key | Value | - | ------------- | ---------------- | - | Accept | application/json | - -- Single Request Endpoint - - `POST http(s)://example.com/graphql` - -- Query - ~~~query - query featuredProducts{ - featuredProducts(count:3){ - id - sku - name - description - shortDescription - urlKey - new - featured - status - visibleIndividually - thumbnail - price - cost - specialPrice - specialPriceFrom - specialPriceTo - weight - color - colorLabel - size - sizeLabel - locale - channel - productId - parentId - minPrice - maxPrice - metaTitle - metaKeywords - metaDescription - width - height - depth - product{ - id - } - variants { - id - } - parent { - id - } - createdAt - updatedAt - } - } - ~~~ - -::: details Response - -~~~json -{ - "data": { - "featuredProducts": [ - { - "id": "8", - "sku": "e-book", - "name": "e-book", - "description": "

Home Decor Description

", - "shortDescription": "

Home Decor Short Description

", - "urlKey": "e-book", - "new": true, - "featured": true, - "status": true, - "visibleIndividually": true, - "thumbnail": null, - "price": 12.55, - "cost": 11.5, - "specialPrice": 11.3, - "specialPriceFrom": "2021-02-08", - "specialPriceTo": "2021-02-28", - "weight": 5.2, - "color": 3, - "colorLabel": "Yellow", - "size": 9, - "sizeLabel": "XL", - "locale": "en", - "channel": "default", - "productId": "8", - "parentId": null, - "minPrice": 11.295, - "maxPrice": 11.295, - "metaTitle": "Home Decor Meta Title", - "metaKeywords": "Home Decor Meta Keywords", - "metaDescription": "Home Decor Meta Description", - "width": 30, - "height": 24, - "depth": 11, - "product": { - "id": "8" - }, - "variants": [], - "parent": null, - "createdAt": "2021-05-27 12:52:39", - "updatedAt": "2021-05-27 12:52:39" - }, - { - "id": "12", - "sku": "event-booking", - "name": "Music Show", - "description": "

Home Decor Description

", - "shortDescription": "

Home Decor Short Description

", - "urlKey": "music-show", - "new": true, - "featured": true, - "status": true, - "visibleIndividually": true, - "thumbnail": null, - "price": 12.55, - "cost": 11.5, - "specialPrice": null, - "specialPriceFrom": null, - "specialPriceTo": null, - "weight": 5.2, - "color": 3, - "colorLabel": "Yellow", - "size": 9, - "sizeLabel": "XL", - "locale": "en", - "channel": "default", - "productId": "12", - "parentId": null, - "minPrice": 11.295, - "maxPrice": 11.295, - "metaTitle": "Home Decor Meta Title", - "metaKeywords": "Home Decor Meta Keywords", - "metaDescription": "Home Decor Meta Description", - "width": 30, - "height": 24, - "depth": 11, - "product": { - "id": "12" - }, - "variants": [], - "parent": null, - "createdAt": "2021-05-27 16:04:24", - "updatedAt": "2021-05-27 16:04:24" - }, - { - "id": "9", - "sku": "bundle-demo", - "name": "Bundle Box", - "description": "

Home Decor Description

", - "shortDescription": "

Home Decor Short Description

", - "urlKey": "bundle-demo", - "new": true, - "featured": true, - "status": true, - "visibleIndividually": true, - "thumbnail": null, - "price": 12.55, - "cost": 11.5, - "specialPrice": 11.3, - "specialPriceFrom": "2021-02-08", - "specialPriceTo": "2021-02-28", - "weight": 5.2, - "color": 3, - "colorLabel": "Yellow", - "size": 9, - "sizeLabel": "XL", - "locale": "en", - "channel": "default", - "productId": "9", - "parentId": null, - "minPrice": 13.5, - "maxPrice": 31.5, - "metaTitle": "Home Decor Meta Title", - "metaKeywords": "Home Decor Meta Keywords", - "metaDescription": "Home Decor Meta Description", - "width": 30, - "height": 24, - "depth": 11, - "product": { - "id": "9" - }, - "variants": [], - "parent": null, - "createdAt": "2021-05-27 13:11:58", - "updatedAt": "2021-05-27 13:11:58" - } - ] - } -} -~~~ -::: - -## Get Home Sliders - -To get the Home Page Slider you have to call the `homeSliders` API. - -- Headers - - | Key | Value | - | ------------- | --------------------- | - | Accept | application/json | - -Let's take an example, - -- Request Query - ~~~Query - query homeSliders{ - homeSliders(count:10){ - id - title - path - content - channelId - locale - sliderPath - imgPath - channel { - id - } - } - } - ~~~ - -::: details Response - ~~~json - { - "data": { - "homeSliders": [ - { - "id": "1", - "title": "testslider", - "path": "slider_images/Default/1L0uZrZrMaadZGRh8pNCLcKXNhrhQugs84AXRkui.jpg", - "content": "

testcontent

", - "channelId": "1", - "locale": "en", - "sliderPath": "test", - "imgPath": null, - "channel": { - "id": "1" - } - } - ] - } - } - ~~~ -::: - - -## Get Advertisements - -To get the Advertisements you have to call the `advertisements` API. - -- Headers - - | Key | Value | - | ------------- | --------------------- | - | Accept | application/json | - -Let's take an example, - -- Request Query - ~~~Query - query advertisements{ - advertisements{ - advertisementFour { - path - } - advertisementThree { - path - } - advertisementTwo { - path - } - } - } - ~~~ - -::: details Response - ~~~json - { - "data": { - "advertisements": [ - { - "advertisementFour": [ - { - "path": "velocity/images/tnyNbLh4GDwMy0P3qwbP5OcFU0nr9g9j0zhNyFiA.jpeg" - }, - { - "path": "velocity/images/tnyNbLh4GDwMy0P3qwbP5OcFU0nr9g9j0zhNyFiA.jpeg" - } - ], - "advertisementThree": [ - { - "path": "velocity/images/tnyNbLh4GDwMy0P3qwbP5OcFU0nr9g9j0zhNyFiA.jpeg" - }, - { - "path": "velocity/images/big-sale-banner.png" - } - ], - "advertisementTwo": [ - { - "path": "velocity/images/tnyNbLh4GDwMy0P3qwbP5OcFU0nr9g9j0zhNyFiA.jpeg" - }, - { - "path": "velocity/images/tnyNbLh4GDwMy0P3qwbP5OcFU0nr9g9j0zhNyFiA.jpeg" - } - ] - } - ] - } - } - ~~~ -::: - -## Get Home Category - -To get the Home Category you have to call the `homeCategories` API. - -- Headers - - | Key | Value | - | ------------- | --------------------- | - | Accept | application/json | - -Let's take an example, - -- Request Query - ~~~Query - query homeCategories{ - homeCategories{ - id - name - description - slug - urlPath - image - imageUrl - metaTitle - metaDescription - metaKeywords - position - status - displayMode - parentId - additional - filterableAttributes { - id - code - adminName - type - validation - position - isFilterable - } - translations { - id - name - slug - description - metaTitle - metaDescription - metaKeywords - category_id - locale - localeId - urlPath - } - createdAt - updatedAt - count - success - } - } - ~~~ - -::: details Response - ~~~json - { - "data": { - "homeCategories": [ - { - "id": "2", - "name": "Shop", - "description": "

Test Category

", - "slug": "shop", - "urlPath": "shop", - "image": "category/2/veI5gArm9nBKUFPwvvmmoRccLdtlJXhHBtaGzL4a.jpg", - "imageUrl": "http://localhost/graphql/public/storage/category/2/veI5gArm9nBKUFPwvvmmoRccLdtlJXhHBtaGzL4a.jpg", - "metaTitle": "", - "metaDescription": "", - "metaKeywords": "", - "position": 1, - "status": true, - "displayMode": "products_and_description", - "parentId": "1", - "additional": null, - "filterableAttributes": [ - { - "id": "11", - "code": "price", - "adminName": "Price", - "type": "price", - "validation": "decimal", - "position": 13, - "isFilterable": 1 - }, - { - "id": "23", - "code": "color", - "adminName": "Color", - "type": "select", - "validation": null, - "position": 26, - "isFilterable": 1 - }, - { - "id": "24", - "code": "size", - "adminName": "Size", - "type": "select", - "validation": null, - "position": 27, - "isFilterable": 1 - }, - { - "id": "25", - "code": "brand", - "adminName": "Brand", - "type": "select", - "validation": null, - "position": 28, - "isFilterable": 1 - } - ], - "translations": [ - { - "id": "2", - "name": "Shop", - "slug": "shop", - "description": "

Test Category

", - "metaTitle": "", - "metaDescription": "", - "metaKeywords": "", - "category_id": "2", - "locale": "en", - "localeId": "1", - "urlPath": "shop" - }, - { - "id": "3", - "name": "Shop", - "slug": "shop", - "description": "

Test Category

", - "metaTitle": "", - "metaDescription": "", - "metaKeywords": "", - "category_id": "2", - "locale": "nl", - "localeId": "3", - "urlPath": "shop" - }, - { - "id": "4", - "name": "Shop", - "slug": "shop", - "description": "

Test Category

", - "metaTitle": "", - "metaDescription": "", - "metaKeywords": "", - "category_id": "2", - "locale": "tr", - "localeId": "4", - "urlPath": "shop" - } - ], - "createdAt": "2021-05-27 18:06:22", - "updatedAt": "2021-05-27 18:06:23", - "count": 0, - "success": null - } - ] - } - } - ~~~ -::: - diff --git a/docs/1.x/graphql-shop-api/orders.md b/docs/1.x/graphql-shop-api/orders.md deleted file mode 100644 index 4a776cf1..00000000 --- a/docs/1.x/graphql-shop-api/orders.md +++ /dev/null @@ -1,2600 +0,0 @@ -# Orders - -In this section, we will see all the APIs which are related to Customer Orders. - -## Get Customer Orders - -You can get all the Customer Orders from the Bagisto store. You can achieve this job by using the `Customer Orders` API call. - -- Headers - - | Key | Value | - | ------------- | ---------------- | - | Accept | application/json | - -- Single Request Endpoint - - `POST http(s)://example.com/graphql` - -::: tip - - If you are using pagination and want to know more info about responses then check the [explanation](./explanation) portion. - -::: - -- Query - ~~~query - query ordersList { - ordersList(input: { - page: 1 - limit: 10 - }) { - id - incrementId - status - channelName - isGuest - customerEmail - customerFirstName - customerLastName - customerCompanyName - customerVatId - shippingMethod - shippingTitle - shippingDescription - couponCode - isGift - totalItemCount - totalQtyOrdered - baseCurrencyCode - channelCurrencyCode - orderCurrencyCode - grandTotal - baseGrandTotal - grandTotalInvoiced - baseGrandTotalInvoiced - grandTotalRefunded - baseGrandTotalRefunded - subTotal - baseSubTotal - subTotalInvoiced - baseSubTotalInvoiced - subTotalRefunded - baseSubTotalRefunded - discountPercent - discountAmount - baseDiscountAmount - discountInvoiced - baseDiscountInvoiced - discountRefunded - baseDiscountRefunded - taxAmount - baseTaxAmount - taxAmountInvoiced - baseTaxAmountInvoiced - taxAmountRefunded - baseTaxAmountRefunded - shippingAmount - baseShippingAmount - shippingInvoiced - baseShippingInvoiced - shippingRefunded - baseShippingRefunded - customerId - customerType - channelId - channelType - cartId - appliedCartRuleIds - shippingDiscountAmount - baseShippingDiscountAmount - createdAt - updatedAt - billingAddress { - id - customerId - cartId - orderId - firstName - lastName - gender - companyName - address1 - address2 - postcode - city - state - country - email - phone - vatId - defaultAddress - } - shippingAddress { - id - customerId - cartId - orderId - firstName - lastName - gender - companyName - address1 - address2 - postcode - city - state - country - email - phone - vatId - defaultAddress - } - items { - id - sku - type - name - couponCode - weight - totalWeight - qtyOrdered - qtyShipped - qtyInvoiced - qtyCanceled - qtyRefunded - price - basePrice - total - baseTotal - totalInvoiced - baseTotalInvoiced - amountRefunded - baseAmountRefunded - discountPercent - discountAmount - baseDiscountAmount - discountInvoiced - baseDiscountInvoiced - discountRefunded - baseDiscountRefunded - taxPercent - taxAmount - baseTaxAmount - taxAmountInvoiced - baseTaxAmountInvoiced - taxAmountRefunded - baseTaxAmountRefunded - productId - productType - orderId - parentId - additional - createdAt - updatedAt - product { - id - type - attributeFamilyId - sku - parentId - createdAt - updatedAt - } - child { - id - sku - type - name - couponCode - weight - totalWeight - qtyOrdered - qtyShipped - qtyInvoiced - qtyCanceled - qtyRefunded - price - basePrice - total - baseTotal - totalInvoiced - baseTotalInvoiced - } - invoiceItems { - id - sku - type - name - description - qty - price - basePrice - total - baseTotal - taxAmount - baseTaxAmount - productId - productType - orderItemId - invoiceId - parentId - } - shipmentItems { - id - name - description - sku - qty - weight - price - basePrice - total - baseTotal - productId - productType - orderItemId - shipmentId - } - refundItems { - id - name - description - sku - qty - price - basePrice - total - baseTotal - taxAmount - baseTaxAmount - discountPercent - discountAmount - baseDiscountAmount - productId - productType - orderItemId - refundId - parentId - } - } - shipments { - id - status - totalQty - totalWeight - carrierCode - carrierTitle - trackNumber - emailSent - customerId - customerType - orderId - orderAddressId - createdAt - updatedAt - } - } - } - ~~~ - -::: details Response - -~~~json -{ - "data": { - "ordersList": [ - { - "id": 3, - "incrementId": "3", - "status": "pending", - "channelName": "Default", - "isGuest": 0, - "customerEmail": "naresh.verma327@webkul.com", - "customerFirstName": "Naresh", - "customerLastName": "Verma", - "customerCompanyName": null, - "customerVatId": null, - "shippingMethod": "flatrate_flatrate", - "shippingTitle": "Flat Rate - Flat Rate", - "shippingDescription": "Flat Rate Shipping", - "couponCode": null, - "isGift": 0, - "totalItemCount": 1, - "totalQtyOrdered": 1, - "baseCurrencyCode": "USD", - "channelCurrencyCode": "USD", - "orderCurrencyCode": "USD", - "grandTotal": 15, - "baseGrandTotal": 15, - "grandTotalInvoiced": 0, - "baseGrandTotalInvoiced": 0, - "grandTotalRefunded": 0, - "baseGrandTotalRefunded": 0, - "subTotal": 5, - "baseSubTotal": 5, - "subTotalInvoiced": 0, - "baseSubTotalInvoiced": 0, - "subTotalRefunded": 0, - "baseSubTotalRefunded": 0, - "discountPercent": 0, - "discountAmount": 0, - "baseDiscountAmount": 0, - "discountInvoiced": 0, - "baseDiscountInvoiced": 0, - "discountRefunded": 0, - "baseDiscountRefunded": 0, - "taxAmount": 0, - "baseTaxAmount": 0, - "taxAmountInvoiced": 0, - "baseTaxAmountInvoiced": 0, - "taxAmountRefunded": 0, - "baseTaxAmountRefunded": 0, - "shippingAmount": 10, - "baseShippingAmount": 10, - "shippingInvoiced": 0, - "baseShippingInvoiced": 0, - "shippingRefunded": 0, - "baseShippingRefunded": 0, - "customerId": 5, - "customerType": "Webkul\\Customer\\Models\\Customer", - "channelId": 1, - "channelType": "Webkul\\Core\\Models\\Channel", - "cartId": "3", - "appliedCartRuleIds": "", - "shippingDiscountAmount": 0, - "baseShippingDiscountAmount": 0, - "createdAt": "2021-05-28 14:28:51", - "updatedAt": "2021-05-28 14:28:51", - "billingAddress": { - "id": 16, - "customerId": 5, - "cartId": null, - "orderId": 3, - "firstName": "Tom Demo2", - "lastName": "Martin Demo2", - "gender": null, - "companyName": "Webkul2", - "address1": "3180 Bluff", - "address2": "Street", - "postcode": "15742222222", - "city": "GLEN CAMPBELL", - "state": "PA", - "country": "US", - "email": "naresh.verma327@webkul.com", - "phone": "234343544", - "vatId": "INV12345678904", - "defaultAddress": 0 - }, - "shippingAddress": { - "id": 15, - "customerId": 5, - "cartId": null, - "orderId": 3, - "firstName": "Tom Demo2", - "lastName": "Martin Demo2", - "gender": null, - "companyName": "Webkul2", - "address1": "3180 Bluff", - "address2": "Street", - "postcode": "15742222222", - "city": "GLEN CAMPBELL", - "state": "PA", - "country": "US", - "email": "naresh.verma327@webkul.com", - "phone": "234343544", - "vatId": "INV12345678904", - "defaultAddress": 0 - }, - "items": [ - { - "id": "3", - "sku": "test-product", - "type": "simple", - "name": "testOutlet", - "couponCode": null, - "weight": 3, - "totalWeight": 3, - "qtyOrdered": 1, - "qtyShipped": 0, - "qtyInvoiced": 0, - "qtyCanceled": 0, - "qtyRefunded": 0, - "price": 5, - "basePrice": 5, - "total": 5, - "baseTotal": 5, - "totalInvoiced": 0, - "baseTotalInvoiced": 0, - "amountRefunded": 0, - "baseAmountRefunded": 0, - "discountPercent": 0, - "discountAmount": 0, - "baseDiscountAmount": 0, - "discountInvoiced": 0, - "baseDiscountInvoiced": 0, - "discountRefunded": 0, - "baseDiscountRefunded": 0, - "taxPercent": 0, - "taxAmount": 0, - "baseTaxAmount": 0, - "taxAmountInvoiced": 0, - "baseTaxAmountInvoiced": 0, - "taxAmountRefunded": 0, - "baseTaxAmountRefunded": 0, - "productId": "1", - "productType": "Webkul\\GraphQLAPI\\Models\\Catalog\\Product", - "orderId": "3", - "parentId": null, - "additional": "{\"_token\":\"CdIv16Fyz7kXgGr6zs8P3brDWldnU5U0jsCZOGdI\",\"locale\":\"en\",\"quantity\":\"1\",\"product_id\":\"1\"}", - "createdAt": "2021-05-28 14:28:51", - "updatedAt": "2021-05-28 14:28:51", - "product": { - "id": "1", - "type": "simple", - "attributeFamilyId": 1, - "sku": "test-product", - "parentId": null, - "createdAt": "2021-05-26 17:43:12", - "updatedAt": "2021-05-26 17:43:12" - }, - "child": null, - "invoiceItems": [], - "shipmentItems": [], - "refundItems": [] - } - ], - "shipments": [] - } - ] - } -} -~~~ -::: - -## Get Customer Order By ID - -To get the specific Customer Order, you have to pass an `id` field with query request .By using this resource and request payload, you will get only a single object under the `data` object in response. - -- Headers - - | Key | Value | - | ------------- | --------------------- | - | Accept | application/json | - | Authorization | Bearer `token-string` | - -### Examples - -Let's take an example, - -- Request Query - ~~~Query - query orderDetail { - orderDetail(id: 3) { - id - incrementId - status - channelName - isGuest - customerEmail - customerFirstName - customerLastName - customerCompanyName - customerVatId - shippingMethod - shippingTitle - shippingDescription - couponCode - isGift - totalItemCount - totalQtyOrdered - baseCurrencyCode - channelCurrencyCode - orderCurrencyCode - grandTotal - baseGrandTotal - grandTotalInvoiced - baseGrandTotalInvoiced - grandTotalRefunded - baseGrandTotalRefunded - subTotal - baseSubTotal - subTotalInvoiced - baseSubTotalInvoiced - subTotalRefunded - baseSubTotalRefunded - discountPercent - discountAmount - baseDiscountAmount - discountInvoiced - baseDiscountInvoiced - discountRefunded - baseDiscountRefunded - taxAmount - baseTaxAmount - taxAmountInvoiced - baseTaxAmountInvoiced - taxAmountRefunded - baseTaxAmountRefunded - shippingAmount - baseShippingAmount - shippingInvoiced - baseShippingInvoiced - shippingRefunded - baseShippingRefunded - customerId - customerType - channelId - channelType - cartId - appliedCartRuleIds - shippingDiscountAmount - baseShippingDiscountAmount - createdAt - updatedAt - billingAddress { - id - customerId - cartId - orderId - firstName - lastName - gender - companyName - address1 - address2 - postcode - city - state - country - email - phone - vatId - defaultAddress - } - shippingAddress { - id - customerId - cartId - orderId - firstName - lastName - gender - companyName - address1 - address2 - postcode - city - state - country - email - phone - vatId - defaultAddress - } - items { - id - sku - type - name - couponCode - weight - totalWeight - qtyOrdered - qtyShipped - qtyInvoiced - qtyCanceled - qtyRefunded - price - basePrice - total - baseTotal - totalInvoiced - baseTotalInvoiced - amountRefunded - baseAmountRefunded - discountPercent - discountAmount - baseDiscountAmount - discountInvoiced - baseDiscountInvoiced - discountRefunded - baseDiscountRefunded - taxPercent - taxAmount - baseTaxAmount - taxAmountInvoiced - baseTaxAmountInvoiced - taxAmountRefunded - baseTaxAmountRefunded - productId - productType - orderId - parentId - additional - createdAt - updatedAt - product { - id - type - attributeFamilyId - sku - parentId - createdAt - updatedAt - } - child { - id - sku - type - name - couponCode - weight - totalWeight - qtyOrdered - qtyShipped - qtyInvoiced - qtyCanceled - qtyRefunded - price - basePrice - total - baseTotal - totalInvoiced - baseTotalInvoiced - } - invoiceItems { - id - sku - type - name - description - qty - price - basePrice - total - baseTotal - taxAmount - baseTaxAmount - productId - productType - orderItemId - invoiceId - parentId - } - shipmentItems { - id - name - description - sku - qty - weight - price - basePrice - total - baseTotal - productId - productType - orderItemId - shipmentId - } - refundItems { - id - name - description - sku - qty - price - basePrice - total - baseTotal - taxAmount - baseTaxAmount - discountPercent - discountAmount - baseDiscountAmount - productId - productType - orderItemId - refundId - parentId - } - } - shipments { - id - status - totalQty - totalWeight - carrierCode - carrierTitle - trackNumber - emailSent - customerId - customerType - orderId - orderAddressId - createdAt - updatedAt - } - } - } - ~~~ - -::: details Response - ~~~json - { - "data": { - "orderDetail": { - "id": 3, - "incrementId": "3", - "status": "pending", - "channelName": "Default", - "isGuest": 0, - "customerEmail": "naresh.verma327@webkul.com", - "customerFirstName": "Naresh", - "customerLastName": "Verma", - "customerCompanyName": null, - "customerVatId": null, - "shippingMethod": "flatrate_flatrate", - "shippingTitle": "Flat Rate - Flat Rate", - "shippingDescription": "Flat Rate Shipping", - "couponCode": null, - "isGift": 0, - "totalItemCount": 1, - "totalQtyOrdered": 1, - "baseCurrencyCode": "USD", - "channelCurrencyCode": "USD", - "orderCurrencyCode": "USD", - "grandTotal": 15, - "baseGrandTotal": 15, - "grandTotalInvoiced": 0, - "baseGrandTotalInvoiced": 0, - "grandTotalRefunded": 0, - "baseGrandTotalRefunded": 0, - "subTotal": 5, - "baseSubTotal": 5, - "subTotalInvoiced": 0, - "baseSubTotalInvoiced": 0, - "subTotalRefunded": 0, - "baseSubTotalRefunded": 0, - "discountPercent": 0, - "discountAmount": 0, - "baseDiscountAmount": 0, - "discountInvoiced": 0, - "baseDiscountInvoiced": 0, - "discountRefunded": 0, - "baseDiscountRefunded": 0, - "taxAmount": 0, - "baseTaxAmount": 0, - "taxAmountInvoiced": 0, - "baseTaxAmountInvoiced": 0, - "taxAmountRefunded": 0, - "baseTaxAmountRefunded": 0, - "shippingAmount": 10, - "baseShippingAmount": 10, - "shippingInvoiced": 0, - "baseShippingInvoiced": 0, - "shippingRefunded": 0, - "baseShippingRefunded": 0, - "customerId": 5, - "customerType": "Webkul\\Customer\\Models\\Customer", - "channelId": 1, - "channelType": "Webkul\\Core\\Models\\Channel", - "cartId": "3", - "appliedCartRuleIds": "", - "shippingDiscountAmount": 0, - "baseShippingDiscountAmount": 0, - "createdAt": "2021-05-28 14:28:51", - "updatedAt": "2021-05-28 14:28:51", - "billingAddress": { - "id": 16, - "customerId": 5, - "cartId": null, - "orderId": 3, - "firstName": "Tom Demo2", - "lastName": "Martin Demo2", - "gender": null, - "companyName": "Webkul2", - "address1": "3180 Bluff", - "address2": "Street", - "postcode": "15742222222", - "city": "GLEN CAMPBELL", - "state": "PA", - "country": "US", - "email": "naresh.verma327@webkul.com", - "phone": "234343544", - "vatId": "INV12345678904", - "defaultAddress": 0 - }, - "shippingAddress": { - "id": 15, - "customerId": 5, - "cartId": null, - "orderId": 3, - "firstName": "Tom Demo2", - "lastName": "Martin Demo2", - "gender": null, - "companyName": "Webkul2", - "address1": "3180 Bluff", - "address2": "Street", - "postcode": "15742222222", - "city": "GLEN CAMPBELL", - "state": "PA", - "country": "US", - "email": "naresh.verma327@webkul.com", - "phone": "234343544", - "vatId": "INV12345678904", - "defaultAddress": 0 - }, - "items": [ - { - "id": "3", - "sku": "test-product", - "type": "simple", - "name": "testOutlet", - "couponCode": null, - "weight": 3, - "totalWeight": 3, - "qtyOrdered": 1, - "qtyShipped": 0, - "qtyInvoiced": 0, - "qtyCanceled": 0, - "qtyRefunded": 0, - "price": 5, - "basePrice": 5, - "total": 5, - "baseTotal": 5, - "totalInvoiced": 0, - "baseTotalInvoiced": 0, - "amountRefunded": 0, - "baseAmountRefunded": 0, - "discountPercent": 0, - "discountAmount": 0, - "baseDiscountAmount": 0, - "discountInvoiced": 0, - "baseDiscountInvoiced": 0, - "discountRefunded": 0, - "baseDiscountRefunded": 0, - "taxPercent": 0, - "taxAmount": 0, - "baseTaxAmount": 0, - "taxAmountInvoiced": 0, - "baseTaxAmountInvoiced": 0, - "taxAmountRefunded": 0, - "baseTaxAmountRefunded": 0, - "productId": "1", - "productType": "Webkul\\GraphQLAPI\\Models\\Catalog\\Product", - "orderId": "3", - "parentId": null, - "additional": "{\"_token\":\"CdIv16Fyz7kXgGr6zs8P3brDWldnU5U0jsCZOGdI\",\"locale\":\"en\",\"quantity\":\"1\",\"product_id\":\"1\"}", - "createdAt": "2021-05-28 14:28:51", - "updatedAt": "2021-05-28 14:28:51", - "product": { - "id": "1", - "type": "simple", - "attributeFamilyId": 1, - "sku": "test-product", - "parentId": null, - "createdAt": "2021-05-26 17:43:12", - "updatedAt": "2021-05-26 17:43:12" - }, - "child": null, - "invoiceItems": [], - "shipmentItems": [], - "refundItems": [] - } - ], - "shipments": [] - } - } - } - ~~~ -::: - - - -## Get Customer Invoices - -You can get all the Customer Invoices from the Bagisto store. You can achieve this job by using the `Customer Invoices` API call. - -- Headers - - | Key | Value | - | ------------- | ---------------- | - | Accept | application/json | - -- Single Request Endpoint - - `POST http(s)://example.com/graphql` - -::: tip - - If you are using pagination and want to know more info about responses then check the [explanation](./explanation) portion. - -::: - -**Note** You can pass all the input fields to filter the invoice data. - -- Query - ~~~query - query viewInvoices { - viewInvoices(input: { - page: 1 - limit: 10 - # id: 1 - # orderId: 3 - # quantity: 1 - # grandTotal: 5.35 - # baseGrandTotal: 5.35 - # invoiceDate: "2021-02-12 20:36:26" - }) { - id - incrementId - state - emailSent - totalQty - baseCurrencyCode - channelCurrencyCode - orderCurrencyCode - subTotal - baseSubTotal - grandTotal - baseGrandTotal - shippingAmount - baseShippingAmount - taxAmount - baseTaxAmount - discountAmount - baseDiscountAmount - orderId - orderAddressId - createdAt - updatedAt - transactionId - items { - id - sku - type - name - description - qty - price - basePrice - total - baseTotal - taxAmount - baseTaxAmount - productId - productType - orderItemId - invoiceId - parentId - additional - discountPercent - discountAmount - baseDiscountAmount - createdAt - updatedAt - orderItem { - id - sku - type - name - couponCode - weight - totalWeight - qtyOrdered - qtyShipped - qtyInvoiced - qtyCanceled - qtyRefunded - price - basePrice - total - baseTotal - totalInvoiced - baseTotalInvoiced - amountRefunded - baseAmountRefunded - discountPercent - discountAmount - baseDiscountAmount - discountInvoiced - baseDiscountInvoiced - discountRefunded - baseDiscountRefunded - taxPercent - taxAmount - baseTaxAmount - taxAmountInvoiced - baseTaxAmountInvoiced - taxAmountRefunded - baseTaxAmountRefunded - productId - productType - orderId - parentId - additional - createdAt - updatedAt - } - product { - id - type - attributeFamilyId - sku - parentId - createdAt - updatedAt - } - } - } - } - ~~~ - -::: details Response - -~~~json -{ - "data": { - "viewInvoices": [ - { - "id": 2, - "incrementId": null, - "state": "paid", - "emailSent": 0, - "totalQty": 1, - "baseCurrencyCode": "USD", - "channelCurrencyCode": "USD", - "orderCurrencyCode": "USD", - "subTotal": 5, - "baseSubTotal": 5, - "grandTotal": 15, - "baseGrandTotal": 15, - "shippingAmount": 10, - "baseShippingAmount": 10, - "taxAmount": 0, - "baseTaxAmount": 0, - "discountAmount": 0, - "baseDiscountAmount": 0, - "orderId": 3, - "orderAddressId": 16, - "createdAt": "2021-05-28 14:30:32", - "updatedAt": "2021-05-28 14:30:32", - "transactionId": null, - "items": [ - { - "id": "2", - "sku": "test-product", - "type": "simple", - "name": "testOutlet", - "description": null, - "qty": 1, - "price": 5, - "basePrice": 5, - "total": 5, - "baseTotal": 5, - "taxAmount": 0, - "baseTaxAmount": 0, - "productId": "1", - "productType": "Webkul\\GraphQLAPI\\Models\\Catalog\\Product", - "orderItemId": "3", - "invoiceId": "2", - "parentId": null, - "additional": "{\"_token\":\"CdIv16Fyz7kXgGr6zs8P3brDWldnU5U0jsCZOGdI\",\"locale\":\"en\",\"quantity\":\"1\",\"product_id\":\"1\"}", - "discountPercent": 0, - "discountAmount": 0, - "baseDiscountAmount": 0, - "createdAt": "2021-05-28 14:30:32", - "updatedAt": "2021-05-28 14:30:32", - "orderItem": { - "id": "3", - "sku": "test-product", - "type": "simple", - "name": "testOutlet", - "couponCode": null, - "weight": 3, - "totalWeight": 3, - "qtyOrdered": 1, - "qtyShipped": 1, - "qtyInvoiced": 1, - "qtyCanceled": 0, - "qtyRefunded": 0, - "price": 5, - "basePrice": 5, - "total": 5, - "baseTotal": 5, - "totalInvoiced": 5, - "baseTotalInvoiced": 5, - "amountRefunded": 0, - "baseAmountRefunded": 0, - "discountPercent": 0, - "discountAmount": 0, - "baseDiscountAmount": 0, - "discountInvoiced": 0, - "baseDiscountInvoiced": 0, - "discountRefunded": 0, - "baseDiscountRefunded": 0, - "taxPercent": 0, - "taxAmount": 0, - "baseTaxAmount": 0, - "taxAmountInvoiced": 0, - "baseTaxAmountInvoiced": 0, - "taxAmountRefunded": 0, - "baseTaxAmountRefunded": 0, - "productId": "1", - "productType": "Webkul\\GraphQLAPI\\Models\\Catalog\\Product", - "orderId": "3", - "parentId": null, - "additional": "{\"_token\":\"CdIv16Fyz7kXgGr6zs8P3brDWldnU5U0jsCZOGdI\",\"locale\":\"en\",\"quantity\":\"1\",\"product_id\":\"1\"}", - "createdAt": "2021-05-28 14:28:51", - "updatedAt": "2021-05-28 14:31:00" - }, - "product": { - "id": "1", - "type": "simple", - "attributeFamilyId": 1, - "sku": "test-product", - "parentId": null, - "createdAt": "2021-05-26 17:43:12", - "updatedAt": "2021-05-26 17:43:12" - } - } - ] - } - ] - } -} -~~~ -::: - -## Get Customer Invoice By ID - -To get the specific Customer Order Invoice, you have to pass an `id` field with query request .By using this resource and request payload, you will get only a single object under the `data` object in response. - -- Headers - - | Key | Value | - | ------------- | --------------------- | - | Accept | application/json | - | Authorization | Bearer `token-string` | - -### Examples - -Let's take an example, - -- Request Query - ~~~Query - query viewInvoice { - viewInvoice(id: 2) { - id - incrementId - state - emailSent - totalQty - baseCurrencyCode - channelCurrencyCode - orderCurrencyCode - subTotal - baseSubTotal - grandTotal - baseGrandTotal - shippingAmount - baseShippingAmount - taxAmount - baseTaxAmount - discountAmount - baseDiscountAmount - orderId - orderAddressId - createdAt - updatedAt - transactionId - items { - id - sku - type - name - description - qty - price - basePrice - total - baseTotal - taxAmount - baseTaxAmount - productId - productType - orderItemId - invoiceId - parentId - additional - discountPercent - discountAmount - baseDiscountAmount - createdAt - updatedAt - orderItem { - id - sku - type - name - couponCode - weight - totalWeight - qtyOrdered - qtyShipped - qtyInvoiced - qtyCanceled - qtyRefunded - price - basePrice - total - baseTotal - totalInvoiced - baseTotalInvoiced - amountRefunded - baseAmountRefunded - discountPercent - discountAmount - baseDiscountAmount - discountInvoiced - baseDiscountInvoiced - discountRefunded - baseDiscountRefunded - taxPercent - taxAmount - baseTaxAmount - taxAmountInvoiced - baseTaxAmountInvoiced - taxAmountRefunded - baseTaxAmountRefunded - productId - productType - orderId - parentId - additional - createdAt - updatedAt - } - product { - id - type - attributeFamilyId - sku - parentId - createdAt - updatedAt - } - } - } - } - ~~~ - -::: details Response - ~~~json - { - "data": { - "viewInvoice": { - "id": 2, - "incrementId": null, - "state": "paid", - "emailSent": 0, - "totalQty": 1, - "baseCurrencyCode": "USD", - "channelCurrencyCode": "USD", - "orderCurrencyCode": "USD", - "subTotal": 5, - "baseSubTotal": 5, - "grandTotal": 15, - "baseGrandTotal": 15, - "shippingAmount": 10, - "baseShippingAmount": 10, - "taxAmount": 0, - "baseTaxAmount": 0, - "discountAmount": 0, - "baseDiscountAmount": 0, - "orderId": 3, - "orderAddressId": 16, - "createdAt": "2021-05-28 14:30:32", - "updatedAt": "2021-05-28 14:30:32", - "transactionId": null, - "items": [ - { - "id": "2", - "sku": "test-product", - "type": "simple", - "name": "testOutlet", - "description": null, - "qty": 1, - "price": 5, - "basePrice": 5, - "total": 5, - "baseTotal": 5, - "taxAmount": 0, - "baseTaxAmount": 0, - "productId": "1", - "productType": "Webkul\\GraphQLAPI\\Models\\Catalog\\Product", - "orderItemId": "3", - "invoiceId": "2", - "parentId": null, - "additional": "{\"_token\":\"CdIv16Fyz7kXgGr6zs8P3brDWldnU5U0jsCZOGdI\",\"locale\":\"en\",\"quantity\":\"1\",\"product_id\":\"1\"}", - "discountPercent": 0, - "discountAmount": 0, - "baseDiscountAmount": 0, - "createdAt": "2021-05-28 14:30:32", - "updatedAt": "2021-05-28 14:30:32", - "orderItem": { - "id": "3", - "sku": "test-product", - "type": "simple", - "name": "testOutlet", - "couponCode": null, - "weight": 3, - "totalWeight": 3, - "qtyOrdered": 1, - "qtyShipped": 1, - "qtyInvoiced": 1, - "qtyCanceled": 0, - "qtyRefunded": 0, - "price": 5, - "basePrice": 5, - "total": 5, - "baseTotal": 5, - "totalInvoiced": 5, - "baseTotalInvoiced": 5, - "amountRefunded": 0, - "baseAmountRefunded": 0, - "discountPercent": 0, - "discountAmount": 0, - "baseDiscountAmount": 0, - "discountInvoiced": 0, - "baseDiscountInvoiced": 0, - "discountRefunded": 0, - "baseDiscountRefunded": 0, - "taxPercent": 0, - "taxAmount": 0, - "baseTaxAmount": 0, - "taxAmountInvoiced": 0, - "baseTaxAmountInvoiced": 0, - "taxAmountRefunded": 0, - "baseTaxAmountRefunded": 0, - "productId": "1", - "productType": "Webkul\\GraphQLAPI\\Models\\Catalog\\Product", - "orderId": "3", - "parentId": null, - "additional": "{\"_token\":\"CdIv16Fyz7kXgGr6zs8P3brDWldnU5U0jsCZOGdI\",\"locale\":\"en\",\"quantity\":\"1\",\"product_id\":\"1\"}", - "createdAt": "2021-05-28 14:28:51", - "updatedAt": "2021-05-28 14:31:00" - }, - "product": { - "id": "1", - "type": "simple", - "attributeFamilyId": 1, - "sku": "test-product", - "parentId": null, - "createdAt": "2021-05-26 17:43:12", - "updatedAt": "2021-05-26 17:43:12" - } - } - ] - } - } - } - ~~~ -::: - -## Get Customer Shipments - -You can get all the Customer Shipments from the Bagisto store. You can achieve this job by using the `Customer Shipments` API call. - -- Headers - - | Key | Value | - | ------------- | ---------------- | - | Accept | application/json | - -- Single Request Endpoint - - `POST http(s)://example.com/graphql` - -::: tip - - If you are using pagination and want to know more info about responses then check the [explanation](./explanation) portion. - -::: - -**Note** You can pass all the input fields to filter the shipment data. - -- Query - ~~~query - query viewShipments { - viewShipments(input: { - page: 1 - limit: 10 - # orderId: 3 - # carrierTitle: "DHL" - # trackNumber: "3333" - # shipmentDateFrom: "2021-02-16 00:00:01" - # shipmentDateTo: "2021-02-16 23:00:00" - # shipmentDate: "2021-02-16 19:17:21" - }) { - id - status - totalQty - totalWeight - carrierCode - carrierTitle - trackNumber - emailSent - customerId - customerType - orderId - orderAddressId - createdAt - updatedAt - inventorySourceId - inventorySourceName - order { - id - incrementId - status - channelName - isGuest - customerEmail - customerFirstName - customerLastName - customerCompanyName - customerVatId - shippingMethod - shippingTitle - shippingDescription - couponCode - isGift - totalItemCount - totalQtyOrdered - baseCurrencyCode - channelCurrencyCode - orderCurrencyCode - grandTotal - baseGrandTotal - grandTotalInvoiced - baseGrandTotalInvoiced - grandTotalRefunded - baseGrandTotalRefunded - subTotal - baseSubTotal - subTotalInvoiced - baseSubTotalInvoiced - subTotalRefunded - baseSubTotalRefunded - discountPercent - discountAmount - baseDiscountAmount - discountInvoiced - baseDiscountInvoiced - discountRefunded - baseDiscountRefunded - taxAmount - baseTaxAmount - taxAmountInvoiced - baseTaxAmountInvoiced - taxAmountRefunded - baseTaxAmountRefunded - shippingAmount - baseShippingAmount - shippingInvoiced - baseShippingInvoiced - shippingRefunded - baseShippingRefunded - customerId - customerType - channelId - channelType - cartId - appliedCartRuleIds - shippingDiscountAmount - baseShippingDiscountAmount - createdAt - updatedAt - } - items { - id - name - description - sku - qty - weight - price - basePrice - total - baseTotal - productId - productType - orderItemId - shipmentId - additional - createdAt - updatedAt - } - inventorySource { - id - code - name - description - contactName - contactEmail - contactNumber - contactFax - country - state - city - street - postcode - priority - latitude - longitude - } - customer { - id - firstName - lastName - name - gender - dateOfBirth - email - phone - password - apiToken - customerGroupId - subscribedToNewsLetter - isVerified - token - notes - status - customerGroup { - id - name - code - isUserDefined - createdAt - updatedAt - } - createdAt - updatedAt - } - } - } - ~~~ - -::: details Response - -~~~json -{ - "data": { - "viewShipments": [ - { - "id": 2, - "status": null, - "totalQty": 1, - "totalWeight": null, - "carrierCode": null, - "carrierTitle": "FEDEX", - "trackNumber": "32414zx", - "emailSent": 0, - "customerId": 5, - "customerType": "Webkul\\Customer\\Models\\Customer", - "orderId": 3, - "orderAddressId": 15, - "createdAt": "2021-05-28 14:31:00", - "updatedAt": "2021-05-28 14:31:00", - "inventorySourceId": 1, - "inventorySourceName": "Default", - "order": { - "id": 3, - "incrementId": "3", - "status": "completed", - "channelName": "Default", - "isGuest": 0, - "customerEmail": "naresh.verma327@webkul.com", - "customerFirstName": "Naresh", - "customerLastName": "Verma", - "customerCompanyName": null, - "customerVatId": null, - "shippingMethod": "flatrate_flatrate", - "shippingTitle": "Flat Rate - Flat Rate", - "shippingDescription": "Flat Rate Shipping", - "couponCode": null, - "isGift": 0, - "totalItemCount": 1, - "totalQtyOrdered": 1, - "baseCurrencyCode": "USD", - "channelCurrencyCode": "USD", - "orderCurrencyCode": "USD", - "grandTotal": 15, - "baseGrandTotal": 15, - "grandTotalInvoiced": 15, - "baseGrandTotalInvoiced": 15, - "grandTotalRefunded": 0, - "baseGrandTotalRefunded": 0, - "subTotal": 5, - "baseSubTotal": 5, - "subTotalInvoiced": 5, - "baseSubTotalInvoiced": 5, - "subTotalRefunded": 0, - "baseSubTotalRefunded": 0, - "discountPercent": 0, - "discountAmount": 0, - "baseDiscountAmount": 0, - "discountInvoiced": 0, - "baseDiscountInvoiced": 0, - "discountRefunded": 0, - "baseDiscountRefunded": 0, - "taxAmount": 0, - "baseTaxAmount": 0, - "taxAmountInvoiced": 0, - "baseTaxAmountInvoiced": 0, - "taxAmountRefunded": 0, - "baseTaxAmountRefunded": 0, - "shippingAmount": 10, - "baseShippingAmount": 10, - "shippingInvoiced": 10, - "baseShippingInvoiced": 10, - "shippingRefunded": 0, - "baseShippingRefunded": 0, - "customerId": 5, - "customerType": "Webkul\\Customer\\Models\\Customer", - "channelId": 1, - "channelType": "Webkul\\Core\\Models\\Channel", - "cartId": "3", - "appliedCartRuleIds": "", - "shippingDiscountAmount": 0, - "baseShippingDiscountAmount": 0, - "createdAt": "2021-05-28 14:28:51", - "updatedAt": "2021-05-28 14:31:00" - }, - "items": [ - { - "id": 2, - "name": "testOutlet", - "description": null, - "sku": "test-product", - "qty": 1, - "weight": 3, - "price": 5, - "basePrice": 5, - "total": 5, - "baseTotal": 5, - "productId": "1", - "productType": "Webkul\\GraphQLAPI\\Models\\Catalog\\Product", - "orderItemId": "3", - "shipmentId": "2", - "additional": "{\"_token\":\"CdIv16Fyz7kXgGr6zs8P3brDWldnU5U0jsCZOGdI\",\"locale\":\"en\",\"quantity\":\"1\",\"product_id\":\"1\"}", - "createdAt": "2021-05-28 14:31:00", - "updatedAt": "2021-05-28 14:31:00" - } - ], - "inventorySource": { - "id": "1", - "code": "default", - "name": "Default", - "description": null, - "contactName": "Detroit Warehouse", - "contactEmail": "warehouse@example.com", - "contactNumber": "1234567899", - "contactFax": null, - "country": "US", - "state": "MI", - "city": "Detroit", - "street": "12th Street", - "postcode": "48127", - "priority": 0, - "latitude": null, - "longitude": null - }, - "customer": { - "id": "5", - "firstName": "Naresh", - "lastName": "Verma", - "name": "Naresh Verma", - "gender": null, - "dateOfBirth": null, - "email": "naresh.verma327@webkul.com", - "phone": null, - "password": "$2y$10$tIP1ciRlUCI0ahjsYsjHsenTvXen1PBQKfRu0OklpufOAjf/ruC2O", - "apiToken": "r1bxG3wNl2No0mbTEEJnD6hWkADKcsMA8jnHDnA0zteEw2RRhaqAuUxehzqx7pARAS6WA9jLG3sanFhg", - "customerGroupId": 2, - "subscribedToNewsLetter": false, - "isVerified": true, - "token": "d5308d5f06d01d3393501cb6ebf4ae06", - "notes": null, - "status": true, - "customerGroup": { - "id": "2", - "name": "General", - "code": "general", - "isUserDefined": false, - "createdAt": null, - "updatedAt": null - }, - "createdAt": "2021-05-28 12:54:56", - "updatedAt": "2021-05-28 12:54:56" - } - } - ] - } -} -~~~ -::: - -## Get Customer Shipment By ID - -To get the specific Customer Order Shipment, you have to pass an `id` field with query request .By using this resource and request payload, you will get only a single object under the `data` object in response. - -- Headers - - | Key | Value | - | ------------- | --------------------- | - | Accept | application/json | - | Authorization | Bearer `token-string` | - -### Examples - -Let's take an example, - -- Request Query - ~~~Query - query viewShipment { - viewShipment(id: 2) { - id - status - totalQty - totalWeight - carrierCode - carrierTitle - trackNumber - emailSent - customerId - customerType - orderId - orderAddressId - createdAt - updatedAt - inventorySourceId - inventorySourceName - order { - id - incrementId - status - channelName - isGuest - customerEmail - customerFirstName - customerLastName - customerCompanyName - customerVatId - shippingMethod - shippingTitle - shippingDescription - couponCode - isGift - totalItemCount - totalQtyOrdered - baseCurrencyCode - channelCurrencyCode - orderCurrencyCode - grandTotal - baseGrandTotal - grandTotalInvoiced - baseGrandTotalInvoiced - grandTotalRefunded - baseGrandTotalRefunded - subTotal - baseSubTotal - subTotalInvoiced - baseSubTotalInvoiced - subTotalRefunded - baseSubTotalRefunded - discountPercent - discountAmount - baseDiscountAmount - discountInvoiced - baseDiscountInvoiced - discountRefunded - baseDiscountRefunded - taxAmount - baseTaxAmount - taxAmountInvoiced - baseTaxAmountInvoiced - taxAmountRefunded - baseTaxAmountRefunded - shippingAmount - baseShippingAmount - shippingInvoiced - baseShippingInvoiced - shippingRefunded - baseShippingRefunded - customerId - customerType - channelId - channelType - cartId - appliedCartRuleIds - shippingDiscountAmount - baseShippingDiscountAmount - createdAt - updatedAt - } - items { - id - name - description - sku - qty - weight - price - basePrice - total - baseTotal - productId - productType - orderItemId - shipmentId - additional - createdAt - updatedAt - } - inventorySource { - id - code - name - description - contactName - contactEmail - contactNumber - contactFax - country - state - city - street - postcode - priority - latitude - longitude - } - customer { - id - firstName - lastName - name - gender - dateOfBirth - email - phone - password - apiToken - customerGroupId - subscribedToNewsLetter - isVerified - token - notes - status - customerGroup { - id - name - code - isUserDefined - createdAt - updatedAt - } - createdAt - updatedAt - } - } - } - ~~~ - -::: details Response - ~~~json - { - "data": { - "viewShipment": { - "id": 2, - "status": null, - "totalQty": 1, - "totalWeight": null, - "carrierCode": null, - "carrierTitle": "FEDEX", - "trackNumber": "32414zx", - "emailSent": 0, - "customerId": 5, - "customerType": "Webkul\\Customer\\Models\\Customer", - "orderId": 3, - "orderAddressId": 15, - "createdAt": "2021-05-28 14:31:00", - "updatedAt": "2021-05-28 14:31:00", - "inventorySourceId": 1, - "inventorySourceName": "Default", - "order": { - "id": 3, - "incrementId": "3", - "status": "completed", - "channelName": "Default", - "isGuest": 0, - "customerEmail": "naresh.verma327@webkul.com", - "customerFirstName": "Naresh", - "customerLastName": "Verma", - "customerCompanyName": null, - "customerVatId": null, - "shippingMethod": "flatrate_flatrate", - "shippingTitle": "Flat Rate - Flat Rate", - "shippingDescription": "Flat Rate Shipping", - "couponCode": null, - "isGift": 0, - "totalItemCount": 1, - "totalQtyOrdered": 1, - "baseCurrencyCode": "USD", - "channelCurrencyCode": "USD", - "orderCurrencyCode": "USD", - "grandTotal": 15, - "baseGrandTotal": 15, - "grandTotalInvoiced": 15, - "baseGrandTotalInvoiced": 15, - "grandTotalRefunded": 0, - "baseGrandTotalRefunded": 0, - "subTotal": 5, - "baseSubTotal": 5, - "subTotalInvoiced": 5, - "baseSubTotalInvoiced": 5, - "subTotalRefunded": 0, - "baseSubTotalRefunded": 0, - "discountPercent": 0, - "discountAmount": 0, - "baseDiscountAmount": 0, - "discountInvoiced": 0, - "baseDiscountInvoiced": 0, - "discountRefunded": 0, - "baseDiscountRefunded": 0, - "taxAmount": 0, - "baseTaxAmount": 0, - "taxAmountInvoiced": 0, - "baseTaxAmountInvoiced": 0, - "taxAmountRefunded": 0, - "baseTaxAmountRefunded": 0, - "shippingAmount": 10, - "baseShippingAmount": 10, - "shippingInvoiced": 10, - "baseShippingInvoiced": 10, - "shippingRefunded": 0, - "baseShippingRefunded": 0, - "customerId": 5, - "customerType": "Webkul\\Customer\\Models\\Customer", - "channelId": 1, - "channelType": "Webkul\\Core\\Models\\Channel", - "cartId": "3", - "appliedCartRuleIds": "", - "shippingDiscountAmount": 0, - "baseShippingDiscountAmount": 0, - "createdAt": "2021-05-28 14:28:51", - "updatedAt": "2021-05-28 14:31:00" - }, - "items": [ - { - "id": 2, - "name": "testOutlet", - "description": null, - "sku": "test-product", - "qty": 1, - "weight": 3, - "price": 5, - "basePrice": 5, - "total": 5, - "baseTotal": 5, - "productId": "1", - "productType": "Webkul\\GraphQLAPI\\Models\\Catalog\\Product", - "orderItemId": "3", - "shipmentId": "2", - "additional": "{\"_token\":\"CdIv16Fyz7kXgGr6zs8P3brDWldnU5U0jsCZOGdI\",\"locale\":\"en\",\"quantity\":\"1\",\"product_id\":\"1\"}", - "createdAt": "2021-05-28 14:31:00", - "updatedAt": "2021-05-28 14:31:00" - } - ], - "inventorySource": { - "id": "1", - "code": "default", - "name": "Default", - "description": null, - "contactName": "Detroit Warehouse", - "contactEmail": "warehouse@example.com", - "contactNumber": "1234567899", - "contactFax": null, - "country": "US", - "state": "MI", - "city": "Detroit", - "street": "12th Street", - "postcode": "48127", - "priority": 0, - "latitude": null, - "longitude": null - }, - "customer": { - "id": "5", - "firstName": "Naresh", - "lastName": "Verma", - "name": "Naresh Verma", - "gender": null, - "dateOfBirth": null, - "email": "naresh.verma327@webkul.com", - "phone": null, - "password": "$2y$10$tIP1ciRlUCI0ahjsYsjHsenTvXen1PBQKfRu0OklpufOAjf/ruC2O", - "apiToken": "r1bxG3wNl2No0mbTEEJnD6hWkADKcsMA8jnHDnA0zteEw2RRhaqAuUxehzqx7pARAS6WA9jLG3sanFhg", - "customerGroupId": 2, - "subscribedToNewsLetter": false, - "isVerified": true, - "token": "d5308d5f06d01d3393501cb6ebf4ae06", - "notes": null, - "status": true, - "customerGroup": { - "id": "2", - "name": "General", - "code": "general", - "isUserDefined": false, - "createdAt": null, - "updatedAt": null - }, - "createdAt": "2021-05-28 12:54:56", - "updatedAt": "2021-05-28 12:54:56" - } - } - } - } - ~~~ -::: - -## Get Customer Refunds - -You can get all the Customer Refunds from the Bagisto store. You can achieve this job by using the `Customer Refunds` API call. - -- Headers - - | Key | Value | - | ------------- | ---------------- | - | Accept | application/json | - -- Single Request Endpoint - - `POST http(s)://example.com/graphql` - -::: tip - - If you are using pagination and want to know more info about responses then check the [explanation](./explanation) portion. - -::: - -**Note** You can pass all the input fields to filter the refund data. - -- Query - ~~~query - query viewRefunds { - viewRefunds(input: { - page: 1 - limit: 10 - # id: 1 - # orderId: 1 - # quantity: 2 - # adjustmentRefund: 1.22 - # adjustmentFee: 3.45 - # shippingAmount: 47.50 - # taxAmount: 1.13 - # discountAmount: 1.45 - # grandTotal: 5.35 - # baseGrandTotal: 5.35 - # refundDate: "2021-02-12 20:36:26" - }) { - id - incrementId - state - emailSent - totalQty - baseCurrencyCode - channelCurrencyCode - orderCurrencyCode - adjustmentRefund - baseAdjustmentRefund - adjustmentFee - baseAdjustmentFee - subTotal - baseSubTotal - grandTotal - baseGrandTotal - shippingAmount - baseShippingAmount - taxAmount - baseTaxAmount - discountPercent - discountAmount - baseDiscountAmount - orderId - createdAt - updatedAt - items { - id - name - description - sku - qty - price - basePrice - total - baseTotal - taxAmount - baseTaxAmount - discountPercent - discountAmount - baseDiscountAmount - productId - productType - orderItemId - refundId - parentId - additional - createdAt - updatedAt - } - order { - id - incrementId - status - channelName - isGuest - customerEmail - customerFirstName - customerLastName - customerCompanyName - customerVatId - shippingMethod - shippingTitle - shippingDescription - couponCode - isGift - totalItemCount - totalQtyOrdered - baseCurrencyCode - channelCurrencyCode - orderCurrencyCode - grandTotal - baseGrandTotal - grandTotalInvoiced - baseGrandTotalInvoiced - grandTotalRefunded - baseGrandTotalRefunded - subTotal - baseSubTotal - subTotalInvoiced - baseSubTotalInvoiced - subTotalRefunded - baseSubTotalRefunded - discountPercent - discountAmount - baseDiscountAmount - discountInvoiced - baseDiscountInvoiced - discountRefunded - baseDiscountRefunded - taxAmount - baseTaxAmount - taxAmountInvoiced - baseTaxAmountInvoiced - taxAmountRefunded - baseTaxAmountRefunded - shippingAmount - baseShippingAmount - shippingInvoiced - baseShippingInvoiced - shippingRefunded - baseShippingRefunded - customerId - customerType - channelId - channelType - cartId - appliedCartRuleIds - shippingDiscountAmount - baseShippingDiscountAmount - createdAt - updatedAt - } - } - } - ~~~ - -::: details Response - -~~~json -{ - "data": { - "viewRefunds": [ - { - "id": 2, - "incrementId": null, - "state": "refunded", - "emailSent": 0, - "totalQty": 1, - "baseCurrencyCode": "USD", - "channelCurrencyCode": "USD", - "orderCurrencyCode": "USD", - "adjustmentRefund": 0, - "baseAdjustmentRefund": 0, - "adjustmentFee": 0, - "baseAdjustmentFee": 0, - "subTotal": 5, - "baseSubTotal": 5, - "grandTotal": 15, - "baseGrandTotal": 15, - "shippingAmount": 10, - "baseShippingAmount": 10, - "taxAmount": 0, - "baseTaxAmount": 0, - "discountPercent": 0, - "discountAmount": 0, - "baseDiscountAmount": 0, - "orderId": 3, - "createdAt": "2021-05-28 15:22:34", - "updatedAt": "2021-05-28 15:22:34", - "items": [ - { - "id": 2, - "name": "testOutlet", - "description": null, - "sku": "test-product", - "qty": 1, - "price": 5, - "basePrice": 5, - "total": 5, - "baseTotal": 5, - "taxAmount": 0, - "baseTaxAmount": 0, - "discountPercent": 0, - "discountAmount": 0, - "baseDiscountAmount": 0, - "productId": 1, - "productType": "Webkul\\GraphQLAPI\\Models\\Catalog\\Product", - "orderItemId": 3, - "refundId": 2, - "parentId": null, - "additional": "{\"_token\":\"CdIv16Fyz7kXgGr6zs8P3brDWldnU5U0jsCZOGdI\",\"locale\":\"en\",\"quantity\":\"1\",\"product_id\":\"1\"}", - "createdAt": "2021-05-28 15:22:34", - "updatedAt": "2021-05-28 15:22:34" - } - ], - "order": { - "id": 3, - "incrementId": "3", - "status": "closed", - "channelName": "Default", - "isGuest": 0, - "customerEmail": "naresh.verma327@webkul.com", - "customerFirstName": "Naresh", - "customerLastName": "Verma", - "customerCompanyName": null, - "customerVatId": null, - "shippingMethod": "flatrate_flatrate", - "shippingTitle": "Flat Rate - Flat Rate", - "shippingDescription": "Flat Rate Shipping", - "couponCode": null, - "isGift": 0, - "totalItemCount": 1, - "totalQtyOrdered": 1, - "baseCurrencyCode": "USD", - "channelCurrencyCode": "USD", - "orderCurrencyCode": "USD", - "grandTotal": 15, - "baseGrandTotal": 15, - "grandTotalInvoiced": 15, - "baseGrandTotalInvoiced": 15, - "grandTotalRefunded": 15, - "baseGrandTotalRefunded": 15, - "subTotal": 5, - "baseSubTotal": 5, - "subTotalInvoiced": 5, - "baseSubTotalInvoiced": 5, - "subTotalRefunded": 5, - "baseSubTotalRefunded": 5, - "discountPercent": 0, - "discountAmount": 0, - "baseDiscountAmount": 0, - "discountInvoiced": 0, - "baseDiscountInvoiced": 0, - "discountRefunded": 0, - "baseDiscountRefunded": 0, - "taxAmount": 0, - "baseTaxAmount": 0, - "taxAmountInvoiced": 0, - "baseTaxAmountInvoiced": 0, - "taxAmountRefunded": 0, - "baseTaxAmountRefunded": 0, - "shippingAmount": 10, - "baseShippingAmount": 10, - "shippingInvoiced": 10, - "baseShippingInvoiced": 10, - "shippingRefunded": 10, - "baseShippingRefunded": 10, - "customerId": 5, - "customerType": "Webkul\\Customer\\Models\\Customer", - "channelId": 1, - "channelType": "Webkul\\Core\\Models\\Channel", - "cartId": "3", - "appliedCartRuleIds": "", - "shippingDiscountAmount": 0, - "baseShippingDiscountAmount": 0, - "createdAt": "2021-05-28 14:28:51", - "updatedAt": "2021-05-28 15:22:34" - } - } - ] - } -} -~~~ -::: - -## Get Customer Refund By ID - -To get the specific Customer Order Refund, you have to pass an `id` field with query request .By using this resource and request payload, you will get only a single object under the `data` object in response. - -- Headers - - | Key | Value | - | ------------- | --------------------- | - | Accept | application/json | - | Authorization | Bearer `token-string` | - -### Examples - -Let's take an example, - -- Request Query - ~~~Query - query viewRefund { - viewRefund(id: 2) { - id - incrementId - state - emailSent - totalQty - baseCurrencyCode - channelCurrencyCode - orderCurrencyCode - adjustmentRefund - baseAdjustmentRefund - adjustmentFee - baseAdjustmentFee - subTotal - baseSubTotal - grandTotal - baseGrandTotal - shippingAmount - baseShippingAmount - taxAmount - baseTaxAmount - discountPercent - discountAmount - baseDiscountAmount - orderId - createdAt - updatedAt - items { - id - name - description - sku - qty - price - basePrice - total - baseTotal - taxAmount - baseTaxAmount - discountPercent - discountAmount - baseDiscountAmount - productId - productType - orderItemId - refundId - parentId - additional - createdAt - updatedAt - } - order { - id - incrementId - status - channelName - isGuest - customerEmail - customerFirstName - customerLastName - customerCompanyName - customerVatId - shippingMethod - shippingTitle - shippingDescription - couponCode - isGift - totalItemCount - totalQtyOrdered - baseCurrencyCode - channelCurrencyCode - orderCurrencyCode - grandTotal - baseGrandTotal - grandTotalInvoiced - baseGrandTotalInvoiced - grandTotalRefunded - baseGrandTotalRefunded - subTotal - baseSubTotal - subTotalInvoiced - baseSubTotalInvoiced - subTotalRefunded - baseSubTotalRefunded - discountPercent - discountAmount - baseDiscountAmount - discountInvoiced - baseDiscountInvoiced - discountRefunded - baseDiscountRefunded - taxAmount - baseTaxAmount - taxAmountInvoiced - baseTaxAmountInvoiced - taxAmountRefunded - baseTaxAmountRefunded - shippingAmount - baseShippingAmount - shippingInvoiced - baseShippingInvoiced - shippingRefunded - baseShippingRefunded - customerId - customerType - channelId - channelType - cartId - appliedCartRuleIds - shippingDiscountAmount - baseShippingDiscountAmount - createdAt - updatedAt - } - } - } - ~~~ - -::: details Response - ~~~json - { - "data": { - "viewRefund": { - "id": 2, - "incrementId": null, - "state": "refunded", - "emailSent": 0, - "totalQty": 1, - "baseCurrencyCode": "USD", - "channelCurrencyCode": "USD", - "orderCurrencyCode": "USD", - "adjustmentRefund": 0, - "baseAdjustmentRefund": 0, - "adjustmentFee": 0, - "baseAdjustmentFee": 0, - "subTotal": 5, - "baseSubTotal": 5, - "grandTotal": 15, - "baseGrandTotal": 15, - "shippingAmount": 10, - "baseShippingAmount": 10, - "taxAmount": 0, - "baseTaxAmount": 0, - "discountPercent": 0, - "discountAmount": 0, - "baseDiscountAmount": 0, - "orderId": 3, - "createdAt": "2021-05-28 15:22:34", - "updatedAt": "2021-05-28 15:22:34", - "items": [ - { - "id": 2, - "name": "testOutlet", - "description": null, - "sku": "test-product", - "qty": 1, - "price": 5, - "basePrice": 5, - "total": 5, - "baseTotal": 5, - "taxAmount": 0, - "baseTaxAmount": 0, - "discountPercent": 0, - "discountAmount": 0, - "baseDiscountAmount": 0, - "productId": 1, - "productType": "Webkul\\GraphQLAPI\\Models\\Catalog\\Product", - "orderItemId": 3, - "refundId": 2, - "parentId": null, - "additional": "{\"_token\":\"CdIv16Fyz7kXgGr6zs8P3brDWldnU5U0jsCZOGdI\",\"locale\":\"en\",\"quantity\":\"1\",\"product_id\":\"1\"}", - "createdAt": "2021-05-28 15:22:34", - "updatedAt": "2021-05-28 15:22:34" - } - ], - "order": { - "id": 3, - "incrementId": "3", - "status": "closed", - "channelName": "Default", - "isGuest": 0, - "customerEmail": "naresh.verma327@webkul.com", - "customerFirstName": "Naresh", - "customerLastName": "Verma", - "customerCompanyName": null, - "customerVatId": null, - "shippingMethod": "flatrate_flatrate", - "shippingTitle": "Flat Rate - Flat Rate", - "shippingDescription": "Flat Rate Shipping", - "couponCode": null, - "isGift": 0, - "totalItemCount": 1, - "totalQtyOrdered": 1, - "baseCurrencyCode": "USD", - "channelCurrencyCode": "USD", - "orderCurrencyCode": "USD", - "grandTotal": 15, - "baseGrandTotal": 15, - "grandTotalInvoiced": 15, - "baseGrandTotalInvoiced": 15, - "grandTotalRefunded": 15, - "baseGrandTotalRefunded": 15, - "subTotal": 5, - "baseSubTotal": 5, - "subTotalInvoiced": 5, - "baseSubTotalInvoiced": 5, - "subTotalRefunded": 5, - "baseSubTotalRefunded": 5, - "discountPercent": 0, - "discountAmount": 0, - "baseDiscountAmount": 0, - "discountInvoiced": 0, - "baseDiscountInvoiced": 0, - "discountRefunded": 0, - "baseDiscountRefunded": 0, - "taxAmount": 0, - "baseTaxAmount": 0, - "taxAmountInvoiced": 0, - "baseTaxAmountInvoiced": 0, - "taxAmountRefunded": 0, - "baseTaxAmountRefunded": 0, - "shippingAmount": 10, - "baseShippingAmount": 10, - "shippingInvoiced": 10, - "baseShippingInvoiced": 10, - "shippingRefunded": 10, - "baseShippingRefunded": 10, - "customerId": 5, - "customerType": "Webkul\\Customer\\Models\\Customer", - "channelId": 1, - "channelType": "Webkul\\Core\\Models\\Channel", - "cartId": "3", - "appliedCartRuleIds": "", - "shippingDiscountAmount": 0, - "baseShippingDiscountAmount": 0, - "createdAt": "2021-05-28 14:28:51", - "updatedAt": "2021-05-28 15:22:34" - } - } - } - } - ~~~ -::: diff --git a/docs/1.x/graphql-shop-api/reviews.md b/docs/1.x/graphql-shop-api/reviews.md deleted file mode 100644 index 53580746..00000000 --- a/docs/1.x/graphql-shop-api/reviews.md +++ /dev/null @@ -1,482 +0,0 @@ -# Reviews - -In this section, we will see all the APIs which are related to Customer Reviews. - -## Get Customer Reviews - -You can get all the Customer Reviews from the Bagisto store. You can achieve this job by using the `Customer Reviews` API call. - -- Headers - - | Key | Value | - | ------------- | ---------------- | - | Accept | application/json | - -- Single Request Endpoint - - `POST http(s)://example.com/graphql` - -::: tip - - If you are using pagination and want to know more info about responses then check the [explanation](./explanation) portion. - -::: - -**Note** You can pass all the input fields to filter the Review data. - -- Query - ~~~query - query reviewsList { - reviewsList(input: { - page: 1 - limit: 10 - # id: 3 - # title: "Why do we use it?" - # rating: 3 - # customerName: "Anna Gole" - # productName: "e-book" - # productId: 9 - # status: "approved" - }) { - id - title - rating - comment - status - createdAt - updatedAt - productId - customerId - customerName - product { - id - type - attributeFamilyId - sku - parentId - createdAt - updatedAt - productFlats { - id - sku - name - description - shortDescription - urlKey - new - featured - status - visibleIndividually - thumbnail - price - cost - specialPrice - specialPriceFrom - specialPriceTo - weight - color - colorLabel - size - sizeLabel - locale - channel - productId - parentId - minPrice - maxPrice - metaTitle - metaKeywords - metaDescription - width - height - depth - createdAt - updatedAt - } - } - } - } - ~~~ - -::: details Response - -~~~json -{ - "data": { - "reviewsList": [ - { - "id": "1", - "title": "Where does it come from?", - "rating": 4, - "comment": "Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old.", - "status": true, - "createdAt": "2021-05-28 15:41:51", - "updatedAt": "2021-05-28 15:41:51", - "productId": "1", - "customerId": "5", - "customerName": "Naresh Verma", - "product": { - "id": "1", - "type": "simple", - "attributeFamilyId": 1, - "sku": "test-product", - "parentId": null, - "createdAt": "2021-05-26 17:43:12", - "updatedAt": "2021-05-26 17:43:12", - "productFlats": [ - { - "id": "1", - "sku": "test-product", - "name": "testOutlet", - "description": "

testOutlet

", - "shortDescription": "

testOutlet

", - "urlKey": "testoutlet", - "new": true, - "featured": true, - "status": true, - "visibleIndividually": true, - "thumbnail": null, - "price": 5, - "cost": null, - "specialPrice": null, - "specialPriceFrom": null, - "specialPriceTo": null, - "weight": 3, - "color": 1, - "colorLabel": "Red", - "size": 6, - "sizeLabel": "S", - "locale": "en", - "channel": "default", - "productId": "1", - "parentId": null, - "minPrice": 5, - "maxPrice": 5, - "metaTitle": "", - "metaKeywords": "", - "metaDescription": "", - "width": 0, - "height": 0, - "depth": 0, - "createdAt": "2021-05-26 17:43:12", - "updatedAt": "2021-05-26 17:43:12" - } - ] - } - } - ] - } -} -~~~ -::: - -## Get Customer Review By ID - -To get the specific Customer Review, you have to pass an `id` field with query request .By using this resource and request payload, you will get only a single object under the `data` object in response. - -- Headers - - | Key | Value | - | ------------- | --------------------- | - | Accept | application/json | - | Authorization | Bearer `token-string` | - -### Examples - -Let's take an example, - -- Request Query - ~~~Query - query reviewDetail { - reviewDetail(id: 1) { - id - title - rating - comment - status - createdAt - updatedAt - productId - customerId - customerName - product { - id - type - attributeFamilyId - sku - parentId - createdAt - updatedAt - productFlats { - id - sku - name - description - shortDescription - urlKey - new - featured - status - visibleIndividually - thumbnail - price - cost - specialPrice - specialPriceFrom - specialPriceTo - weight - color - colorLabel - size - sizeLabel - locale - channel - productId - parentId - minPrice - maxPrice - metaTitle - metaKeywords - metaDescription - width - height - depth - createdAt - updatedAt - } - } - } - } - ~~~ - -::: details Response - ~~~json - { - "data": { - "reviewDetail": { - "id": "1", - "title": "Where does it come from?", - "rating": 4, - "comment": "Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old.", - "status": true, - "createdAt": "2021-05-28 15:41:51", - "updatedAt": "2021-05-28 15:41:51", - "productId": "1", - "customerId": "5", - "customerName": "Naresh Verma", - "product": { - "id": "1", - "type": "simple", - "attributeFamilyId": 1, - "sku": "test-product", - "parentId": null, - "createdAt": "2021-05-26 17:43:12", - "updatedAt": "2021-05-26 17:43:12", - "productFlats": [ - { - "id": "1", - "sku": "test-product", - "name": "testOutlet", - "description": "

testOutlet

", - "shortDescription": "

testOutlet

", - "urlKey": "testoutlet", - "new": true, - "featured": true, - "status": true, - "visibleIndividually": true, - "thumbnail": null, - "price": 5, - "cost": null, - "specialPrice": null, - "specialPriceFrom": null, - "specialPriceTo": null, - "weight": 3, - "color": 1, - "colorLabel": "Red", - "size": 6, - "sizeLabel": "S", - "locale": "en", - "channel": "default", - "productId": "1", - "parentId": null, - "minPrice": 5, - "maxPrice": 5, - "metaTitle": "", - "metaKeywords": "", - "metaDescription": "", - "width": 0, - "height": 0, - "depth": 0, - "createdAt": "2021-05-26 17:43:12", - "updatedAt": "2021-05-26 17:43:12" - } - ] - } - } - } - } - ~~~ -::: - - - -## Create a new Review - - To create a Review, you have to perform mutation on Review and paas the related fields in the request. - API call resource will create a new Review, only if the Customer has logged in. - - - Headers - - | Key | Value | - | ------------- | --------------------- | - | Accept | application/json | - | Authorization | Bearer `token-string` | - -### Examples - - Let's take an example, - -- Request Mutation - ~~~Mutation - mutation createReview { - createReview(input: { - name: "Ruby J So" - title: "Where does it come from?" - rating: 4 - comment: "Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old." - productId: 1 - }) { - success - review { - id - title - rating - comment - status - createdAt - updatedAt - productId - customerId - customerName - product { - id - type - attributeFamilyId - sku - parentId - createdAt - updatedAt - productFlats { - id - sku - name - description - shortDescription - urlKey - new - featured - status - visibleIndividually - thumbnail - price - cost - specialPrice - specialPriceFrom - specialPriceTo - weight - color - colorLabel - size - sizeLabel - locale - channel - productId - parentId - minPrice - maxPrice - metaTitle - metaKeywords - metaDescription - width - height - depth - createdAt - updatedAt - } - } - } - } - } - ~~~ - -::: details Response - ~~~json - { - "data": { - "createReview": { - "success": "Product Review submitted successfully.", - "review": { - "id": "1", - "title": "Where does it come from?", - "rating": 4, - "comment": "Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old.", - "status": true, - "createdAt": "2021-05-28 15:41:51", - "updatedAt": "2021-05-28 15:41:51", - "productId": "1", - "customerId": "5", - "customerName": "Naresh Verma", - "product": { - "id": "1", - "type": "simple", - "attributeFamilyId": 1, - "sku": "test-product", - "parentId": null, - "createdAt": "2021-05-26 17:43:12", - "updatedAt": "2021-05-26 17:43:12", - "productFlats": [ - { - "id": "1", - "sku": "test-product", - "name": "testOutlet", - "description": "

testOutlet

", - "shortDescription": "

testOutlet

", - "urlKey": "testoutlet", - "new": true, - "featured": true, - "status": true, - "visibleIndividually": true, - "thumbnail": null, - "price": 5, - "cost": null, - "specialPrice": null, - "specialPriceFrom": null, - "specialPriceTo": null, - "weight": 3, - "color": 1, - "colorLabel": "Red", - "size": 6, - "sizeLabel": "S", - "locale": "en", - "channel": "default", - "productId": "1", - "parentId": null, - "minPrice": 5, - "maxPrice": 5, - "metaTitle": "", - "metaKeywords": "", - "metaDescription": "", - "width": 0, - "height": 0, - "depth": 0, - "createdAt": "2021-05-26 17:43:12", - "updatedAt": "2021-05-26 17:43:12" - } - ] - } - } - } - } - } - ~~~ -::: diff --git a/docs/1.x/graphql-shop-api/wishlists.md b/docs/1.x/graphql-shop-api/wishlists.md deleted file mode 100644 index bfa17147..00000000 --- a/docs/1.x/graphql-shop-api/wishlists.md +++ /dev/null @@ -1,622 +0,0 @@ -# Wishlists - -In this section, we will see all the APIs which are related to Customer Product Wishlists. - -## Get Wishlists - -You can get all the Wishlists from the Bagisto store. You can achieve this job by using the `Wishlists` API call. - -- Headers - - | Key | Value | - | ------------- | ---------------- | - | Accept | application/json | - -- Single Request Endpoint - - `POST http(s)://example.com/graphql` - -::: tip - - If you are using pagination and want to know more info about responses then check the [explanation](./explanation) portion. - -::: - -**Note** You can pass all the input fields to filter the Wishlist data. - - -- Query - ~~~query - query wishlists { - wishlists(input: { - page: 1 - limit: 10 - # id: 3 - # productId: 16 - # productName: "Music Show" - # channelId: 1 - }) { - id - channelId - productId - customerId - itemOptions - additional - movedToCart - shared - timeOfMoving - createdAt - updatedAt - customer { - id - firstName - lastName - name - gender - dateOfBirth - email - phone - password - apiToken - customerGroupId - subscribedToNewsLetter - isVerified - token - notes - status - createdAt - updatedAt - } - product { - id - type - attributeFamilyId - sku - parentId - createdAt - updatedAt - } - channel { - id - code - name - description - theme - homePageContent - footerContent - hostname - defaultLocaleId - baseCurrencyId - rootCategoryId - homeSeo - defaultLocale - baseCurrency - rootCategory - logoUrl - faviconUrl - success - } - } - } - ~~~ - -::: details Response - -~~~json -{ - "data": { - "wishlists": [ - { - "id": "1", - "channelId": "1", - "productId": "1", - "customerId": "5", - "itemOptions": null, - "additional": "null", - "movedToCart": null, - "shared": null, - "timeOfMoving": null, - "createdAt": "2021-05-28 15:59:00", - "updatedAt": "2021-05-28 15:59:00", - "customer": { - "id": "5", - "firstName": "Naresh", - "lastName": "Verma", - "name": "Naresh Verma", - "gender": null, - "dateOfBirth": null, - "email": "naresh.verma327@webkul.com", - "phone": null, - "password": "$2y$10$tIP1ciRlUCI0ahjsYsjHsenTvXen1PBQKfRu0OklpufOAjf/ruC2O", - "apiToken": "r1bxG3wNl2No0mbTEEJnD6hWkADKcsMA8jnHDnA0zteEw2RRhaqAuUxehzqx7pARAS6WA9jLG3sanFhg", - "customerGroupId": 2, - "subscribedToNewsLetter": false, - "isVerified": true, - "token": "d5308d5f06d01d3393501cb6ebf4ae06", - "notes": null, - "status": true, - "createdAt": "2021-05-28 12:54:56", - "updatedAt": "2021-05-28 12:54:56" - }, - "product": { - "id": "1", - "type": "simple", - "attributeFamilyId": 1, - "sku": "test-product", - "parentId": null, - "createdAt": "2021-05-26 17:43:12", - "updatedAt": "2021-05-26 17:43:12" - }, - "channel": { - "id": "1", - "code": "default", - "name": "Default", - "description": null, - "theme": "velocity", - "homePageContent": "\n

@include(\"shop::home.slider\") @include(\"shop::home.featured-products\") @include(\"shop::home.new-products\")

\n
\n
\n \"test\"\n
\n
\n \"test\"\n \"test\"\n
\n
\n ", - "footerContent": "\n \n
\n Connect With Us\n \n
\n ", - "hostname": "http://localhost/graphql/public", - "defaultLocaleId": 1, - "baseCurrencyId": 1, - "rootCategoryId": 1, - "homeSeo": "{\"meta_title\": \"Demo store\", \"meta_keywords\": \"Demo store meta keyword\", \"meta_description\": \"Demo store meta description\"}", - "defaultLocale": "{\"id\":1,\"code\":\"en\",\"name\":\"English\",\"created_at\":null,\"updated_at\":null,\"direction\":\"ltr\",\"locale_image\":null}", - "baseCurrency": "{\"id\":1,\"code\":\"USD\",\"name\":\"US Dollar\",\"created_at\":null,\"updated_at\":null,\"symbol\":\"$\"}", - "rootCategory": "{\"id\":1,\"position\":1,\"image\":null,\"status\":1,\"_lft\":1,\"_rgt\":16,\"parent_id\":null,\"created_at\":\"2021-05-05T10:06:44.000000Z\",\"updated_at\":\"2021-05-05T10:06:44.000000Z\",\"display_mode\":\"products_and_description\",\"category_icon_path\":null,\"additional\":null,\"name\":\"Root\",\"description\":\"Root\",\"slug\":\"root\",\"url_path\":\"\",\"meta_title\":\"\",\"meta_description\":\"\",\"meta_keywords\":\"\",\"translations\":[{\"id\":1,\"name\":\"Root\",\"slug\":\"root\",\"description\":\"Root\",\"meta_title\":\"\",\"meta_description\":\"\",\"meta_keywords\":\"\",\"category_id\":1,\"locale\":\"en\",\"locale_id\":null,\"url_path\":\"\"}]}", - "logoUrl": null, - "faviconUrl": null, - "success": null - } - } - ] - } -} -~~~ -::: - -## Get Wishlist By ID - -To get the specific Wishlist, you have to pass an `id` field with query request .By using this resource and request payload, you will get only a single object under the `data` object in response. - -- Headers - - | Key | Value | - | ------------- | --------------------- | - | Accept | application/json | - | Authorization | Bearer `token-string` | - -### Examples - -Let's take an example, - -- Request Query - ~~~Query - query wishlist { - wishlist(id: 1) { - id - channelId - productId - customerId - itemOptions - additional - movedToCart - shared - timeOfMoving - createdAt - updatedAt - customer { - id - firstName - lastName - name - gender - dateOfBirth - email - phone - password - apiToken - customerGroupId - subscribedToNewsLetter - isVerified - token - notes - status - createdAt - updatedAt - } - product { - id - type - attributeFamilyId - sku - parentId - createdAt - updatedAt - } - channel { - id - code - name - description - theme - homePageContent - footerContent - hostname - defaultLocaleId - baseCurrencyId - rootCategoryId - homeSeo - defaultLocale - baseCurrency - rootCategory - logoUrl - faviconUrl - success - } - } - } - ~~~ - -::: details Response - ~~~json - { - "data": { - "wishlist": { - "id": "1", - "channelId": "1", - "productId": "1", - "customerId": "5", - "itemOptions": null, - "additional": "null", - "movedToCart": null, - "shared": null, - "timeOfMoving": null, - "createdAt": "2021-05-28 15:59:00", - "updatedAt": "2021-05-28 15:59:00", - "customer": { - "id": "5", - "firstName": "Naresh", - "lastName": "Verma", - "name": "Naresh Verma", - "gender": null, - "dateOfBirth": null, - "email": "naresh.verma327@webkul.com", - "phone": null, - "password": "$2y$10$tIP1ciRlUCI0ahjsYsjHsenTvXen1PBQKfRu0OklpufOAjf/ruC2O", - "apiToken": "r1bxG3wNl2No0mbTEEJnD6hWkADKcsMA8jnHDnA0zteEw2RRhaqAuUxehzqx7pARAS6WA9jLG3sanFhg", - "customerGroupId": 2, - "subscribedToNewsLetter": false, - "isVerified": true, - "token": "d5308d5f06d01d3393501cb6ebf4ae06", - "notes": null, - "status": true, - "createdAt": "2021-05-28 12:54:56", - "updatedAt": "2021-05-28 12:54:56" - }, - "product": { - "id": "1", - "type": "simple", - "attributeFamilyId": 1, - "sku": "test-product", - "parentId": null, - "createdAt": "2021-05-26 17:43:12", - "updatedAt": "2021-05-26 17:43:12" - }, - "channel": { - "id": "1", - "code": "default", - "name": "Default", - "description": null, - "theme": "velocity", - "homePageContent": "\n

@include(\"shop::home.slider\") @include(\"shop::home.featured-products\") @include(\"shop::home.new-products\")

\n
\n
\n \"test\"\n
\n
\n \"test\"\n \"test\"\n
\n
\n ", - "footerContent": "\n \n
\n Connect With Us\n \n
\n ", - "hostname": "http://localhost/graphql/public", - "defaultLocaleId": 1, - "baseCurrencyId": 1, - "rootCategoryId": 1, - "homeSeo": "{\"meta_title\": \"Demo store\", \"meta_keywords\": \"Demo store meta keyword\", \"meta_description\": \"Demo store meta description\"}", - "defaultLocale": "{\"id\":1,\"code\":\"en\",\"name\":\"English\",\"created_at\":null,\"updated_at\":null,\"direction\":\"ltr\",\"locale_image\":null}", - "baseCurrency": "{\"id\":1,\"code\":\"USD\",\"name\":\"US Dollar\",\"created_at\":null,\"updated_at\":null,\"symbol\":\"$\"}", - "rootCategory": "{\"id\":1,\"position\":1,\"image\":null,\"status\":1,\"_lft\":1,\"_rgt\":16,\"parent_id\":null,\"created_at\":\"2021-05-05T10:06:44.000000Z\",\"updated_at\":\"2021-05-05T10:06:44.000000Z\",\"display_mode\":\"products_and_description\",\"category_icon_path\":null,\"additional\":null,\"name\":\"Root\",\"description\":\"Root\",\"slug\":\"root\",\"url_path\":\"\",\"meta_title\":\"\",\"meta_description\":\"\",\"meta_keywords\":\"\",\"translations\":[{\"id\":1,\"name\":\"Root\",\"slug\":\"root\",\"description\":\"Root\",\"meta_title\":\"\",\"meta_description\":\"\",\"meta_keywords\":\"\",\"category_id\":1,\"locale\":\"en\",\"locale_id\":null,\"url_path\":\"\"}]}", - "logoUrl": null, - "faviconUrl": null, - "success": null - } - } - } - } - ~~~ -::: - - - -## Add To Wishlist - -You can Add a product to wishlist. You can achieve this job by using the `Wishlist` API call. - -- Headers - - | Key | Value | - | ------------- | ---------------- | - | Accept | application/json | - -- Single Request Endpoint - - `POST http(s)://example.com/graphql` - -::: tip - - If you are using pagination and want to know more info about responses then check the [explanation](./explanation) portion. - -::: - -- Query - ~~~query - mutation addToWishlist { - addToWishlist(input: { - productId: 1 - }) { - success - wishlist { - id - channelId - productId - customerId - itemOptions - additional - movedToCart - shared - timeOfMoving - createdAt - updatedAt - customer { - id - firstName - lastName - name - gender - dateOfBirth - email - phone - password - apiToken - customerGroupId - subscribedToNewsLetter - isVerified - token - notes - status - createdAt - updatedAt - } - product { - id - type - attributeFamilyId - sku - parentId - createdAt - updatedAt - } - channel { - id - code - name - description - theme - homePageContent - footerContent - hostname - defaultLocaleId - baseCurrencyId - rootCategoryId - homeSeo - defaultLocale - baseCurrency - rootCategory - logoUrl - faviconUrl - success - } - } - } - } - ~~~ - -::: details Response - -~~~json -{ - "data": { - "addToWishlist": { - "success": "Item Successfully Added To Wishlist", - "wishlist": { - "id": "1", - "channelId": "1", - "productId": "1", - "customerId": "5", - "itemOptions": null, - "additional": "null", - "movedToCart": null, - "shared": null, - "timeOfMoving": null, - "createdAt": "2021-05-28 15:59:00", - "updatedAt": "2021-05-28 15:59:00", - "customer": { - "id": "5", - "firstName": "Naresh", - "lastName": "Verma", - "name": "Naresh Verma", - "gender": null, - "dateOfBirth": null, - "email": "naresh.verma327@webkul.com", - "phone": null, - "password": "$2y$10$tIP1ciRlUCI0ahjsYsjHsenTvXen1PBQKfRu0OklpufOAjf/ruC2O", - "apiToken": "r1bxG3wNl2No0mbTEEJnD6hWkADKcsMA8jnHDnA0zteEw2RRhaqAuUxehzqx7pARAS6WA9jLG3sanFhg", - "customerGroupId": 2, - "subscribedToNewsLetter": false, - "isVerified": true, - "token": "d5308d5f06d01d3393501cb6ebf4ae06", - "notes": null, - "status": true, - "createdAt": "2021-05-28 12:54:56", - "updatedAt": "2021-05-28 12:54:56" - }, - "product": { - "id": "1", - "type": "simple", - "attributeFamilyId": 1, - "sku": "test-product", - "parentId": null, - "createdAt": "2021-05-26 17:43:12", - "updatedAt": "2021-05-26 17:43:12" - }, - "channel": { - "id": "1", - "code": "default", - "name": "Default", - "description": null, - "theme": "velocity", - "homePageContent": "\n

@include(\"shop::home.slider\") @include(\"shop::home.featured-products\") @include(\"shop::home.new-products\")

\n
\n
\n \"test\"\n
\n
\n \"test\"\n \"test\"\n
\n
\n ", - "footerContent": "\n \n
\n Connect With Us\n \n
\n ", - "hostname": "http://localhost/graphql/public", - "defaultLocaleId": 1, - "baseCurrencyId": 1, - "rootCategoryId": 1, - "homeSeo": "{\"meta_title\": \"Demo store\", \"meta_keywords\": \"Demo store meta keyword\", \"meta_description\": \"Demo store meta description\"}", - "defaultLocale": "{\"id\":1,\"code\":\"en\",\"name\":\"English\",\"created_at\":null,\"updated_at\":null,\"direction\":\"ltr\",\"locale_image\":null}", - "baseCurrency": "{\"id\":1,\"code\":\"USD\",\"name\":\"US Dollar\",\"created_at\":null,\"updated_at\":null,\"symbol\":\"$\"}", - "rootCategory": "{\"id\":1,\"position\":1,\"image\":null,\"status\":1,\"_lft\":1,\"_rgt\":16,\"parent_id\":null,\"created_at\":\"2021-05-05T10:06:44.000000Z\",\"updated_at\":\"2021-05-05T10:06:44.000000Z\",\"display_mode\":\"products_and_description\",\"category_icon_path\":null,\"additional\":null,\"name\":\"Root\",\"description\":\"Root\",\"slug\":\"root\",\"url_path\":\"\",\"meta_title\":\"\",\"meta_description\":\"\",\"meta_keywords\":\"\",\"translations\":[{\"id\":1,\"name\":\"Root\",\"slug\":\"root\",\"description\":\"Root\",\"meta_title\":\"\",\"meta_description\":\"\",\"meta_keywords\":\"\",\"category_id\":1,\"locale\":\"en\",\"locale_id\":null,\"url_path\":\"\"}]}", - "logoUrl": null, - "faviconUrl": null, - "success": null - } - } - } - } -} -~~~ -::: - -## Remove From Wishlist - -To remove a product from the wishlist, you have to pass an `id` field with query request .By using this resource and request payload, you will get only a single object under the `data` object in response. - -- Headers - - | Key | Value | - | ------------- | --------------------- | - | Accept | application/json | - | Authorization | Bearer `token-string` | - -### Examples - -Let's take an example, - -- Request Query - ~~~Query - mutation removeFromWishlist { - removeFromWishlist(input: { - productId: 1 - }) { - status - success - } - } - ~~~ - -::: details Response - ~~~json - { - "data": { - "removeFromWishlist": { - "status": true, - "success": "Item Successfully Removed From Wishlist" - } - } - } - ~~~ -: - -## Remove All From Wishlist - -To remove all product from the wishlist, you have to pass related fields with query request . - -- Headers - - | Key | Value | - | ------------- | --------------------- | - | Accept | application/json | - | Authorization | Bearer `token-string` | - -### Examples - -Let's take an example, - -- Request Query - ~~~Query - mutation removeAllWishlists { - removeAllWishlists { - status - success - } - } - ~~~ - -::: details Response - ~~~json - { - "data": { - "removeAllWishlists": { - "status": true, - "success": "All The Items From Your Wishlist Have Been Removed" - } - } - } - ~~~ -: - -## Move To Cart From Wishlist - -You can move a product from wishlist to cart from the Bagisto store. You can achieve this job by using the `Move To Cart From Wishlist` API call. - -- Headers - - | Key | Value | - | ------------- | ---------------- | - | Accept | application/json | - -- Single Request Endpoint - - `POST http(s)://example.com/graphql` - -::: tip - - If you are using pagination and want to know more info about responses then check the [explanation](./explanation) portion. - -::: - -- Query - ~~~query - mutation moveToCart { - moveToCart(id: 2) { - status - success - } - } - ~~~ - -::: details Response - -~~~json -{ - "data": { - "moveToCart": { - "status": true, - "success": "Item successfully moved To cart" - } - } -} -~~~ -::: - diff --git a/docs/1.x/introduction/README.md b/docs/1.x/introduction/README.md deleted file mode 100644 index 9e78c2d3..00000000 --- a/docs/1.x/introduction/README.md +++ /dev/null @@ -1,18 +0,0 @@ -# Introduction -**Bagisto** is a E-Commerce framework built on top of the hottest opensource technologies such as [Laravel](https://laravel.com), a [PHP](https://php.net) framework and [Vue.js](https://vuejs.org/), a progressive Javascript framework. - -**Bagisto** is a viable option to reduce your time, cost and workforce for building online stores or migrating from a physical store to an online platform. - -It is suitable for all small or large E-Commerce business demands using a simple set-up procedure. -Built on top of [Laravel](https://laravel.com) and equipped with an easy product information management. - -The framework is very flexible and easy to use even for non-tech users. -**Bagisto** features an administration panel with a dashboard, sales data, a catalog for products and customer management. - -To learn more about **Bagisto's** features and try a demo, check out our website [https://bagisto.com](https://bagisto.com). -Get quickly updated on the current version and recently released features, see [Bagisto roadmap](https://bagisto.com/roadmap/). -You can get started with the source code by checking out the repo on GitHub at [bagisto/bagisto](https://github.com/bagisto/bagisto). - - - - diff --git a/docs/1.x/introduction/docker.md b/docs/1.x/introduction/docker.md deleted file mode 100644 index b935b09c..00000000 --- a/docs/1.x/introduction/docker.md +++ /dev/null @@ -1,206 +0,0 @@ -# Docker - -[[toc]] - -## Introduction -[Docker](https://www.docker.com/) is an open platform for developing, shipping, and running applications. Docker enables you to separate your applications from your infrastructure so you can deliver software quickly. With Docker, you can manage your infrastructure in the same ways you manage your applications. Docker can also be used for defining and running multi-container Docker applications using Docker-Compose tool. - -With the help of docker-compose, you can define containers to be build, their configuration, links, volumes, ports etc in a single file and it gets launched by a single command. -You can also add multiple servers and services just by adding them to docker-compose configuration file. This configuration file is in [YAML](https://en.wikipedia.org/wiki/YAML) format. - -#### Application Data and Database Volume Persistance -It is recommended to keep your application files and database data volume on the docker host and mount them on the running container, this to ensure that the application and database data persistance even in the case of containers' failure or termination, In this way even if you destroy containers, your data won't get lost unless you remove them forcefully. -This compose configuration file mounts the application directory `app` and database volume `dbvolume` from host to running docker containers at the time of containers launch. - -## Installation & Setup - -### First steps -Before you can launch Bagisto in a docker environment you need to install the latest version of Docker and Docker Compose. - -- [Docker](https://docs.docker.com/install/) -- [Docker-compose](https://docs.docker.com/compose/install/) -- [Composer](https://getcomposer.org) (optional) - -### Configure the docker container -Once Docker and docker-compose have been installed, we need to create a **docker-compose.yml** file. -The **docker-compose.yml** configuration file requires following inputs from the user: - -#### Webserver configuration -In the `web_server` service block, assign your system working user uid to the `USER_UID` enviroment variable. -Run the following command `id -u` on linux or Macos to get your user id -```shell -id -u -``` - -#### Database configuration -In the `database_server` service block, assign mysql database name, mysql database user name, mysql database user password and mysql root password to `MYSQL_DATABASE`, `MYSQL_USER`, `MYSQL_PASSWORD` and `MYSQL_ROOT_PASSWORD` environment. - - -#### Clone configuration from Github -You can make use of our repository from Github by cloning this in your new directory -```shell -git clone https://github.com/bagisto/bagisto-docker.git . -``` -#### Configure manually -- Create a new folder for example **bagisto-docker** and create **docker-compose.yml** manually inside it. -- Add the following content to **docker-compose.yml** -```yml -version: '3' - -services: - - web_server: - image: webkul/apache-php:latest - container_name: apache2 - restart: always - volumes: - - ./app:/var/www/html - working_dir: /var/www/html/ - environment: - USER_UID: 'mention your system user ID here. ex: 1001, 1000, 33, etc' - networks: - - bagisto-network - ports: - - '80:80' - expose: - - '80' - depends_on: - - database_server - links: - - database_server - - database_server: - image: mysql:5.7 - container_name: mysql - restart: always - environment: - MYSQL_DATABASE: 'mention the name of the database to be created here. eg: mydatabase' - MYSQL_USER: 'mention database user here. eg: mydatabase_user' - MYSQL_PASSWORD: 'mention database user password here. ex: mystrongPassword' - MYSQL_ROOT_PASSWORD: 'mention mysql root password here. ex: mysqlstrongpass' - MYSQL_ROOT_HOST: '%' - networks: - - bagisto-network - ports: - - '3306:3306' - expose: - - '3306' - volumes: - - ./dbvolume:/var/lib/mysql - -volumes: - dbvolume: - app: - -networks: - bagisto-network: - ``` - -#### Download the docker image -The following command will download the docker images for apache-php version 7.3 and mysql version 5.7. -```shell -docker-compose pull -``` - -### Launching the docker container -The following command will create a network, launch a webserver and database containers with names `apache2` and `mysql`. -It will also create a new `app` and `dbvolume` directory inside your current directory and mount it to respective docker containers as mentioned in docker-compose.yml. -It binds your `host port 80` with the apache2 container port 80 and `host port 3306` with mysql container port 3306. If you want to run containers on ports other than 80 and 3306, modify their values in **docker-compose.yml** file. - -``` -docker-compose up -d -``` - -### Monitor your container(s): -Check your running docker containers with the following commands - -`docker ps` OR `docker-compose ps` -```shell -CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES -62a10346b84a webkul/apache-php:latest "/usr/bin/supervisord" About an hour ago Up About an hour 0.0.0.0:80->80/tcp apache2 -90a0a2e0e46b mysql:5.7 "docker-entrypoint.s…" About an hour ago Up About an hour 0.0.0.0:3306->3306/tcp, 33060/tcp mysql -``` - -## Configuring Bagisto -Once our environment is ready we can start installing Bagisto. You can either install Bagisto from [Github](#install-without-composer) or with [composer](#install-with-composer) - -### Install without composer -Download the [latest release](https://bagisto.com/en/download) inside `app/bagisto` directory. -Open the `.env` file inside **app/bagisto** and set the following environment variables listed below: - -```editorconfig -APP_URL=https://127.0.0.1 -DB_CONNECTION=mysql -DB_HOST=mysql -DB_PORT=3306 -DB_DATABASE= -DB_USERNAME= -DB_PASSWORD= -``` - -Run the following commands to install Bagisto. -```shell -docker exec -i apache2 bash -c "su - www-data -s /bin/bash -c 'php bagisto/artisan migrate'" -docker exec -i apache2 bash -c "su - www-data -s /bin/bash -c 'php bagisto/artisan db:seed'" -docker exec -i apache2 bash -c "su - www-data -s /bin/bash -c 'php bagisto/artisan vendor:publish'" -docker exec -i apache2 bash -c "su - www-data -s /bin/bash -c 'php bagisto/artisan storage:link'" -docker exec -i apache2 bash -c "su - www-data -s /bin/bash -c 'composer dump-autoload -d bagisto'" -``` - -Mention the database details same as docker-compose.yml and admin details. - - -### Install with composer -The following commands will be exexcuted within the docker container -```shell -docker exec -i apache2 bash -c "su - www-data -s /bin/bash -c 'composer create-project bagisto/bagisto'" -``` - -Open the .env file inside `app/bagisto` directory and set the following environment variables listed below: - -```editorconfig -APP_URL=https://127.0.0.1 -DB_CONNECTION=mysql -DB_HOST=mysql -DB_PORT=3306 -DB_DATABASE= -DB_USERNAME= -DB_PASSWORD= -``` - -Run the following commands to install Bagisto. -```shell -docker exec -i apache2 bash -c "su - www-data -s /bin/bash -c 'php bagisto/artisan migrate'" -docker exec -i apache2 bash -c "su - www-data -s /bin/bash -c 'php bagisto/artisan db:seed'" -docker exec -i apache2 bash -c "su - www-data -s /bin/bash -c 'php bagisto/artisan vendor:publish'" -docker exec -i apache2 bash -c "su - www-data -s /bin/bash -c 'php bagisto/artisan storage:link'" -docker exec -i apache2 bash -c "su - www-data -s /bin/bash -c 'composer dump-autoload -d bagisto'" -``` - -Bagisto has been installed and is ready. Browse your server IP address or domain name on the web browser. - -### Configure Apache -The Apache documentroot is by default assigned to **/var/www/html/public_html**. while the **app** directory on host is mapped with the **html** directory inside the container. -We need to create a symlink of `bagisto/public` in `app` directory to `/var/www/html/public_html`. - -Run the following command on Linux or MacOS -```bash -cd app; ln -snf bagisto/public public_html -``` - -Run the following command on Windows -```command-line -cd app -mklink bagisto/public public_html -``` -### Ready - -#### Login as a administrator: -You can directly visit the admin interface [http://your_server_endpoint/admin](http://your_server_endpoint/admin/) and authenticate with the following credentials. - -| Email | Password | -| --------- | ------- | -| admin@example.com | admin123 | - -#### Login as a customer -You can directly visit your store on [http://your_server_endpoint/](http://your_server_endpoint/). diff --git a/docs/1.x/introduction/installation.md b/docs/1.x/introduction/installation.md deleted file mode 100644 index 39f65503..00000000 --- a/docs/1.x/introduction/installation.md +++ /dev/null @@ -1,72 +0,0 @@ -# Installation - -## Use Our GUI Installer -1. [Download Bagisto](https://bagisto.com/en/download/) -2. Extract the contents of the zip file. -3. Point your HTTP server to the public/ directory of the project and open it on your browser.
For example: - - `https://example.com/` -4. This will detect Bagisto and start the installer. - -## Install Bagisto Using _composer_ - -``` -composer create-project bagisto/bagisto -``` - -- Start the installation script. -```sh -php artisan bagisto:install -``` - -### Features of above installation command -::: warning -It will check existence of the .env file, if it exists then please update the file manually with the below details. -::: - -``` -- APP_TIMEZONE -- APP_LOCALE -- LOG_CHANNEL -- APP_CURRENCY -- DB_DATABASE -- DB_USERNAME -- DB_PASSWORD -``` - -::: warning -If the .env file does not exists then it will ask to provide the details on command prompts. - -::: -- To start the installation, provide the details of the following command prompts: -```sh -- Please select the default locale or press enter to continue [en]: -- Please enter the default timezone [Asia/Kolkata]: -- Please enter the default currency [USD]: -- What is the database name to be used by Bagisto?: -- What is your database username?: -- What is your database password?: -``` - -# Start Using Bagisto - -### On a production server - -- Open your domain on the browser.
For example: - - `https://example.com/` - -### On your local device - -```sh -php artisan serve -``` - -### How to log in to your domain as an admin - -Go to `https://example.com/admin/`, in case `php artisan bagisto:install` is opted, use the following credentials. -``` -email: admin@example.com -password: admin123 -``` - -### How to log in to your domain as a customer -You can directly register on `https://example.com/customer/register` as a customer, and then log in to your domain. diff --git a/docs/1.x/introduction/requirements.md b/docs/1.x/introduction/requirements.md deleted file mode 100644 index cb379927..00000000 --- a/docs/1.x/introduction/requirements.md +++ /dev/null @@ -1,42 +0,0 @@ -# Requirements - -Before installing Bagisto, make sure the server meets the following requirements: - -## Server configuration - -- **SERVER**: Apache 2 or NGINX -- **RAM**: 4GB or higher -- **Node**: 8.11.3 LTS or higher -- **PHP**: 7.4 or higher -- **Composer**: 1.6.5 or higher - -## PHP Extensions - -Make sure the following extensions are installed and enabled. You can check using the `phpinfo()` page or the `php -m` command. - -- php-intl extension - -- php-gd extension - - ::: tip - You must install the `php-gd` extension properly otherwise, the image does not work properly in the project. - ::: - -## PHP Configuration - -Open your php configuration file **php.ini** and change the following settings. - - ~~~ini - memory_limit = 4G - max_execution_time = 360 - date.timezone = Europe/Brussels <- Change this to your own timezone. - ~~~ - -::: tip Restart your web server - Whenever you make changes to the PHP configuration file, you must restart Apache or NGINX. -::: - -## Supported Database Servers - -- **MySQL**: 5.7.23 or higher -- **MariaDB**: 10.2.7 or higher diff --git a/docs/1.x/introduction/upgrade-to-latest-bagisto.md b/docs/1.x/introduction/upgrade-to-latest-bagisto.md deleted file mode 100644 index deca615e..00000000 --- a/docs/1.x/introduction/upgrade-to-latest-bagisto.md +++ /dev/null @@ -1,138 +0,0 @@ -# Upgrade to the latest version of Bagisto - -To upgrade your current version to the latest version of Bagisto, you need to follow some steps, - -- First, you need to download the latest version of Bagisto. - -- You can download Bagisto from the following links, - - - [Download From Official Bagisto Site](https://bagisto.com/en/download/) - - [Download From Github](https://github.com/bagisto/bagisto) - -- After downloading the Bagisto zip file, you need to extract where you want to deploy it. -- After extract the file, you need to go to the root folder of the extracted folder and run the below command in the terminal. - - ~~~sh - composer create-project - ~~~ - -- After the command has been executed, now go to your `.env` file, provide your old project database credentials for which you want to upgrade Bagisto, and run the following command, - - ~~~sh - php artisan optimize - - # -- OR - - php artisan config:cache - ~~~ - -- Now, your new changes have been cached and now your project is ready to run the migrate command, - - ~~~sh - php artisan migrate - ~~~ - - ::: danger - Here we have not provided you the seeder command because the seeder command always resets all the settings, categories and etc. If some tables need default settings then we advise you to add manually. - ::: - -- Now, its time to create a symlink so that public assets can be linked to storage, - - ~~~sh - php artisan storage:link - ~~~ - -- Copy all the content of the previous version's folder (e.g. `old-project/storage/app/public`) to the latest version's folder (e.g. `new-project/storage/app/public`). - - ::: tip - If your existing project also depends on some local storage, or you have changed some paths, or you want previous logs also then make sure you add all those also. - ::: - -- Once this is finished run the following command to publish your new files, - - ~~~sh - php artisan vendor:publish --all - ~~~ - - ::: warning - Don't use the `--force` flag, this will reset all your views. Use only when you know what you are doing. - ::: - -You are now at the latest version. Still, we want to mention that if you have done a lot of customizations then that portion of compatibility should be handled at your end. - -## Bagisto Changes - -### These are the changes from the version 1.3.3 to 1.4.0 - -#### Added one composer dependency (High Severity) - -- Added `diglactic/laravel-breadcrumbs` for breadcrumbs in the frontend shop. Make sure to run the `composer install`, if you are upgrading the existing project. -- Moved all the old APIs to a separate package i.e. `bagisto/legacy-api`. If you are getting exceptions then just go to `bootstrap/cache` and delete all the files and then run `composer install`. After the installation, run `php artisan optimize`. - -#### Changes from the datagrid (High Severity) - -- Implemented the ajaxified datagrid, see [#5756](https://github.com/bagisto/bagisto/pull/5756) - -#### Revamped admin theme (High Severity) - -- Added a new admin theme with features of multi-locale switcher, real time notification for admin upon order creation or updation and dark theme for admin panel. - -#### Changes in factories (Medium Severity) - -- Dropped laravel legacy factories dependencies and refactored all models to use Laravel 8 class factories. If you have used it in modules try to upgrade or just install the dependency when needed. - -#### Changes in routes (Medium Severity) - -- In admin, shop and velocity packages, this file `packages/Webkul//src/Http/routes.php` is moved to `packages/Webkul//src/Routes/web.php` this path. So if you are upgrading the existing project just make sure the provider registry is updated. - -### These are the changes from the version 1.3.1 to 1.3.2 - -#### Changes from the web vital (Medium Severity) - -- For the velocity theme, the `velocity.js` file is divided into two files i.e. `velocity-core.js` and the `velocity.js` file. In `velocity-core.js`, all core dependencies like jQuery, bootstrap js, Vue js are added and in `velocity.js` all the components are present which is bootstrapped by the `velocity-core.js`. - -- All these components are minified now, `quantity-changer`, `mini-cart`, `slider-component`, and `searchbar-component`. - -- These components are added `hot-categories`, `popular-categories`, `sidebar-header`, `right-side-header` and `mobile-header`. - -- In `velocity.js`, this component `VueToast` has been removed. As no traces were found in the core. If you are using this then make sure you add it to your module dependencies. - -- This folder i.e. `packages/Webkul/Velocity/src/Resources/views/shop/UI` is completely removed. The files inside this folder contain the components which are already minified so not needed. Make sure if you included these files in your modules, use the direct component rather than including the file. - -- In this folder i.e. `packages/Webkul/Velocity/src/Resources/views/shop/layouts/particals` three files (`compare.blade.php`, `wishlist.blade.php` and `search-bar.blade.php`) are given. All these files are having individual components. For `compare.blade.php` and `wislist.blade.php`, you can use the `isText` prop to disable the text for mobile. - -- Reference PR: [#5020](https://github.com/bagisto/bagisto/pull/5020) - -#### Changes from security fixes (High Severity) - -- These routes i.e. `address.delete`, `customer.orders.cancel`, `customer.review.delete`, `customer.review.deleteall`, `shop.movetowishlist`, `customer.wishlist.add`, `customer.wishlist.remove` and `customer.wishlist.removeall` methods are changed from `GET` to `DELETE` and `POST` respectively. `GET` is only use for retrieving data. - -- Maybe if you forgot to change then surely this will impact your project. Make sure it should be updated and also run `php artisan optimize` command. - -- Reference PR: [#4996](https://github.com/bagisto/bagisto/pull/4996), [#4998](https://github.com/bagisto/bagisto/pull/4998) and [#5052](https://github.com/bagisto/bagisto/pull/5052) - -#### Downloadable product medias are moved to private disk (Medium Severity) - -- If someone facing broken downloadale links, this is because of the privatization of the paid links, in this case move your downloadable links folder to a private disk, and the broken link got fixed. - -- If still broken then take a reference from the below PR and adjust the storage data. - -- Reference PR: [#4966](https://github.com/bagisto/bagisto/pull/4966) - -#### Changes from invoice prefixes (Medium Severity) - -- Moved sequencer class from shop package to sales package, as orders and invoices are part of the sales. This will not impact as there is only one key and that one is in the repository. - -- Enhanced and scaled the `Sequencer` class. - -- As per the existing project perspective, `increment_id` by default is going null, so for displaying portion it will first check `increment_id` if not found then it will give the actual `id`. - -- In the core config, moved all the invoice settings to the new tab name `Invoice Settings` so make sure reset the value for the `Invoice Slip Design`. - -- Reference PR: [#4956](https://github.com/bagisto/bagisto/pull/4956) - -#### Changes from `.env` (Low Severity) - -- Just capitalized the `fixer_api_key` in `.env` to have consistency and `.env` standard. - -- If you have this key in your `.env` and you are using this just make sure you capitalize your key also. diff --git a/docs/1.x/packages/README.md b/docs/1.x/packages/README.md deleted file mode 100644 index 08bfc691..00000000 --- a/docs/1.x/packages/README.md +++ /dev/null @@ -1,63 +0,0 @@ -# Package development - -A package is a unit added to your application for enhancement which includes routes, controllers, views, and configuration specifically. Packages are created to manage your large applications into smaller units. - -In Bagisto, we have created plenty of packages at path `packages/Webkul/`. You can find a basic tree-structure of the package below: - -~~~directory-structure -- ACME/HelloWorld/ - - publishable/assets - - css/ - - images/ - - js/ - - src/ - - Config/ - - acl.php - - admin-menu.php - - Console/ - - Commands/ - - Contracts/ - - Database/ - - Migrations/ - - Seeders/ - - Events/ - - Http/ - - Controllers/ - - Admin/ - - HelloWorldController.php - - Shop/ - - HelloWorldController.php - - Middleware/ - - Requests/ - - admin-routes.php - - shop-routes.php - - Listeners/ - - Mail/ - - Models/ - - Providers/ - - HelloWorldServiceProvider.php - - ModuleServiceProvider.php - - Repositories/ - - Resources/ - - assets/ - - images/ - - js/ - - app.js - - sass/ - - admin.scss - - default.scss - - velocity.scss - - lang/ - - views/ - - admin/ - - layouts/ - - style.blade.php - - index.blade.php - - shop/ - - default/ - - index.blade.php - - velocity/ - - index.blade.php - - package.json - - webpack.mix.js -~~~ diff --git a/docs/1.x/packages/add-menu-in-admin.md b/docs/1.x/packages/add-menu-in-admin.md deleted file mode 100644 index a3f5b34d..00000000 --- a/docs/1.x/packages/add-menu-in-admin.md +++ /dev/null @@ -1,70 +0,0 @@ -# Add menu in admin - -- In your package's source directory i.e. `packages/ACME/HelloWorld/src`, create the `Config` folder and create a file named `admin-menu.php`. - -~~~php - 'helloworld', - 'name' => 'Hello World', - 'route' => 'helloworld.admin.index', - 'sort' => 1, - 'icon-class' => 'dashboard-icon', - ] -]; -~~~ - -- In this file, we provide the name of the menu, route & its icon. - -| Params | Description | -| ---------- | --------------------------------------------------- | -| key | Unique key for menu icon. | -| name | Name of menu icon. | -| route | Route name for your menu icon. | -| sort | Sort number on which your menu icon should display. | -| icon-class | Class for menu icon. | - -- For the route, just add the named route which specified above i.e. `helloworld.admin.index`, - - ~~~php - Route::view('/admin/hello-world', 'helloworld::admin.index')->name('helloworld.admin.index'); - ~~~ - -- After that, we need to merge this `menu.php` folder with a core menu file. For this, we use the method `mergeConfigFrom()` in the register method of the service provider. - - ~~~php - mergeConfigFrom( - dirname(__DIR__) . '/Config/admin-menu.php', 'menu.admin' - ); - } - } - ~~~ - -- Run this command i.e. `php artisan optimize`. - -- Now, the menu will display in the admin panel. You can change the icon according to your needs. - -![Admin Menu Output](../../assets/1.x/images/package-development/admin-menu-output.png) \ No newline at end of file diff --git a/docs/1.x/packages/create-acl.md b/docs/1.x/packages/create-acl.md deleted file mode 100644 index 34abd04f..00000000 --- a/docs/1.x/packages/create-acl.md +++ /dev/null @@ -1,79 +0,0 @@ -# Access control list - -In addition to providing authentication services out of the box, Bagisto also provides a functionality **ACL** (Access Control List). - -With this feature the administrator can allow/disallow other users to access parts of Bagisto. - -## Create a new ACL file - -Create a new file named `acl.php` in your package **Config** folder, for example, `packages/ACME/HelloWorld/src/Config` and add the following code. - -~~~php - 'helloworld', - 'name' => 'HelloWorld', - 'route' => 'helloworld.admin.index', - 'sort' => 2 - ] -]; -~~~ - -If you check the above code we have created an array for an individual's menu with the parameters (key, name, route & sort). - -Just like that, we need to define the menu here which we want to include in our ACL. - -## Merge configuration - -After that, we need to merge the ACL config also just like we have done with menu items, - - ~~~php - mergeConfigFrom( - dirname(__DIR__) . '/Config/admin-menu.php', 'menu.admin' - ); - - $this->mergeConfigFrom( - dirname(__DIR__) . '/Config/acl.php', 'acl' - ); - } - } - ~~~ - -After setting up, just run this command `php artisan optimize` to cached the latest changes. - -Now check the latest ACL. - -![Admin ACL Output](../../assets/1.x/images/package-development/admin-acl-output.png) - -## Checking roles and permissions - -- If you check the `Admin` model in the namespace `Webkul\User\Models`, you will see the relationship binding with the `Role` model in the same namespace. From here you can grab all the permissions of the current user. - -- We have provided the `bouncer()` helper, which helps you to check the permissions. Let's check the current user has permission or not, - - ~~~php - bouncer()->hasPermission($permission) - ~~~ diff --git a/docs/1.x/packages/create-custom-configuration.md b/docs/1.x/packages/create-custom-configuration.md deleted file mode 100644 index 7ad5ccd9..00000000 --- a/docs/1.x/packages/create-custom-configuration.md +++ /dev/null @@ -1,267 +0,0 @@ -# Create custom configuration - -Creating a custom configuration ease the task for a developer or any non-developer person. Generally, in Bagisto, you can find it in admin panel **Configuration Menu**. - -## Steps to create custom configuration - -- To create a custom configuration for your application, you just need to create a `system.php` file in the `Config` folder of your package. - -- Inside the file, you can include the code below, - - ~~~php - 'helloworld', - 'name' => 'Hello World', - 'sort' => 1 - ], [ - 'key' => 'helloworld.settings', - 'name' => 'Custom Settings', - 'sort' => 1, - ], [ - 'key' => 'helloworld.settings.settings', - 'name' => 'Custom Groupings', - 'sort' => 1, - 'fields' => [ - [ - 'name' => 'status', - 'title' => 'Status', - 'type' => 'boolean', - 'channel_based' => true, - 'locale_based' => false - ] - ] - ] - ]; - ~~~ - -### Explanation for the keys - -- **key** : This key accept the unique value and nested with '.' (dot) operator. - -- **name** : This key accept the value as a placeholder for your configuration. Generally, in Bagisto, we consider writing it using translation. - -- **sort** : This key accept the sort position for the configuration menu. - -- **fields** : This key accept the array for the value of the custom configuration. - -- We need to merge these custom config also, - - ~~~php - mergeConfigFrom( - dirname(__DIR__) . '/Config/admin-menu.php', 'menu.admin' - ); - - $this->mergeConfigFrom( - dirname(__DIR__) . '/Config/acl.php', 'acl' - ); - - $this->mergeConfigFrom( - dirname(__DIR__) . '/Config/system.php', 'core' - ); - } - } - ~~~ - -- Run this command i.e. `php artisan optimize`. - -- Now, check the configuration, - - ![Admin ACL Output](../../assets/1.x/images/package-development/admin-custom-config-output.png) - -## Supported Field Types - -There are several field types supported by the Bagisto. Let us know all of them, - -- Text Type -- Number Type -- Boolean Type -- Select Type -- Textarea Type -- Image Type - -Let's get started with the first one. - -### Text Type - -This field type will give you the input field of type text. - -#### Example - -~~~php -return [ - ... - [ - 'key' => 'general.general.custom-types', - 'name' => 'admin::app.admin.system.custom-types', - 'sort' => 1, - 'fields' => [ - [ - 'name' => 'text_type', - 'title' => 'admin::app.admin.system.text-type', - 'type' => 'text', - 'default_value' => '', - ], - ], - ], - ... -]; -~~~ - -### Number Type - -This field type will give you the input field of type number. - -#### Example - -~~~php -return [ - ... - [ - 'key' => 'general.general.custom-types', - 'name' => 'admin::app.admin.system.custom-types', - 'sort' => 1, - 'fields' => [ - [ - 'name' => 'number_type', - 'title' => 'admin::app.admin.system.number-type', - 'type' => 'number', - ], - ], - ], - ... -]; -~~~ - -### Boolean Type - -This field type will give you the enable/disable switch. - -#### Example - -~~~php -return [ - ... - [ - 'key' => 'general.general.custom-types', - 'name' => 'admin::app.admin.system.custom-types', - 'sort' => 1, - 'fields' => [ - [ - 'name' => 'boolean_type', - 'title' => 'admin::app.admin.system.boolean-type', - 'type' => 'boolean', - ], - ], - ], - ... -]; -~~~ - -### Select Type - -This field type will give you the select field with mentioned options. - -#### Example - -~~~php -return [ - ... - [ - 'key' => 'general.general.custom-types', - 'name' => 'admin::app.admin.system.custom-types', - 'sort' => 1, - 'fields' => [ - [ - 'name' => 'select_type', - 'title' => 'admin::app.admin.system.select-type', - 'type' => 'select', - 'options' => [ - [ - 'title' => 'option_1', - 'value' => 'value_1', - ], [ - 'title' => 'option_2', - 'value' => 'vallue_2', - ], - ], - ], - ], - ], - ... -]; -~~~ - -### Textarea Type - -This field type will give you the textarea field mostly used for long text. - -#### Example - -~~~php -return [ - ... - [ - 'key' => 'general.general.custom-types', - 'name' => 'admin::app.admin.system.custom-types', - 'sort' => 1, - 'fields' => [ - [ - 'name' => 'textarea_type', - 'title' => 'admin::app.admin.system.textarea-type', - 'type' => 'textarea' - ], - ], - ], - ... -]; -~~~ - -### Image Type - -This field type will give you the file upload option for uploading the images. - -#### Example - -~~~php -return [ - ... - [ - 'key' => 'general.general.custom-types', - 'name' => 'admin::app.admin.system.custom-types', - 'sort' => 1, - 'fields' => [ - [ - 'name' => 'image_type', - 'title' => 'admin::app.admin.system.image-type', - 'type' => 'image', - 'validation' => 'mimes:bmp,jpeg,jpg,png,webp', - ], - ], - ], - ... -]; -~~~ diff --git a/docs/1.x/packages/create-migrations.md b/docs/1.x/packages/create-migrations.md deleted file mode 100644 index a688ee39..00000000 --- a/docs/1.x/packages/create-migrations.md +++ /dev/null @@ -1,26 +0,0 @@ -# Create migrations - -You can create migration in two ways, - -1. By using Bagisto Package Generator. -2. By normal laravel command and then manually copy to the respective folder. - -## By using Bagisto Package Generator - -This command will create a new migration class in `packages/ACME/HelloWorld/src/Database/Migrations` directory. - -`php artisan package:make-migration CreateUsersTable ACME/HelloWorld` - -## By normal laravel command and then manually copy to the respective folder - -To create a migration, use the `make:migration` artisan command: - -`php artisan make:migration create_users_table` - -The new migration will be placed in your `database/migrations` directory. Each migration file name contains a timestamp which allows Laravel to determine the order of the migrations. - -The --table and --create options may also be used to indicate the name of the table and whether the migration will be creating a new table. - -You may also specify a --path option when creating the migration. The path should be relative to the root directory of your installation: - -`php artisan make:migration create_demo_table --path=packages/ACME/HelloWorld/src/Database/Migrations` \ No newline at end of file diff --git a/docs/1.x/packages/create-models.md b/docs/1.x/packages/create-models.md deleted file mode 100644 index eeccb32e..00000000 --- a/docs/1.x/packages/create-models.md +++ /dev/null @@ -1,23 +0,0 @@ -# Create models - -## Create model by using Bagisto Package Generator - -- This command will create a following files, - - New model class in `packages/ACME/HelloWorld/src/Models` directory. - - New model proxy class in `packages/ACME/HelloWorld/src/Models` directory. - - New model contract in `packages/ACME/HelloWorld/src/Contracts` directory. - - `php artisan package:make-model User ACME/HelloWorld` - -## Create model by normal laravel commands - -- Models typically live in the `app` directory, but you are free to place them anywhere that can be auto-loaded according to your `composer.json` file. All Eloquent models extend `Illuminate\Database\Eloquent\Model` class. - -- The simple way to create a model is executing the command `make:model` artisan command, - - `php artisan make:model User` - -- After creating model, to generate database migration, you may append `--migration or -m option` artisan command as stated below, - - `php artisan make:model User --migration` - `php artisan make:model User -m` \ No newline at end of file diff --git a/docs/1.x/packages/create-package.md b/docs/1.x/packages/create-package.md deleted file mode 100644 index 42d3ca36..00000000 --- a/docs/1.x/packages/create-package.md +++ /dev/null @@ -1,832 +0,0 @@ -# Create a new package - -There are two ways to create a package. - -1. By using Bagisto Package Generator (**Recommended**) -2. By manually setting up all files (**Expert Level**) - -## 1. By using Bagisto Package Generator - -- You need to install [Bagisto Package Generator](https://github.com/bagisto/bagisto-package-generator). - -- If you have not installed this package then you need to go to the root folder of **Bagisto** and run the following command - - ```php - composer require bagisto/bagisto-package-generator - ``` - -- Now, to generate your package you need to use the following command, - - - If the package directory does not exist, - - ```php - php artisan package:make ACME/HelloWorld - ``` - - - If somehow the package directory is already present then you can use the force command as well. For that you just need to pass the '**--force**' command. - - ```php - php artisan package:make ACME/HelloWorld --force - ``` - -- Now check your `packages` directory, everything is setup for you. - -- After that, you need to register your service provider in `config/app.php`. - - ```php - [ - ... - ACME\HelloWorld\Providers\HelloWorldServiceProvider::class, - ... - ] - ... - ]; - ``` - -- Add you package namespace in `psr-4` key in `composer.json` file for auto loading which is located in Bagisto root directory. - - ```json - "autoload": { - ... - "psr-4": { - ... - "ACME\\HelloWorld\\": "packages/ACME/HelloWorld/src" - ... - } - ... - } - ``` - -- Run the below listed command: - - ```php - composer dump-autoload - php artisan optimize - ``` - - ```php - php artisan vendor:publish --force - - -> Press the number before "ACME\HelloWorld\Providers\HelloWorldServiceProvider" and then press enter to publish all assets and configurations. - ``` - -::: details Check output in the browser - -![helloworld-admin-browser-output](../../assets/1.x/images/package-development/hello-world-package-output.png) - -::: - -- Now start creating something cool. - -## 2. By manually setting up all files - -By manually setting up package, we assume that you are familiar with packages directory structures and flow. If not then you can find a basic tree structure of package below, - -::: details Basic tree structure of the package - -``` -- ACME/HelloWorld/ - - publishable/assets - - css/ - - images/ - - js/ - - src/ - - Config/ - - acl.php - - admin-menu.php - - Console/ - - Commands/ - - Contracts/ - - Database/ - - Migrations/ - - Seeders/ - - Events/ - - Http/ - - Controllers/ - - Admin/ - - HelloWorldController.php - - Shop/ - - HelloWorldController.php - - Middleware/ - - Requests/ - - admin-routes.php - - shop-routes.php - - Listeners/ - - Mail/ - - Models/ - - Providers/ - - HelloWorldServiceProvider.php - - ModuleServiceProvider.php - - Repositories/ - - Resources/ - - assets/ - - images/ - - js/ - - app.js - - sass/ - - admin.scss - - default.scss - - velocity.scss - - lang/ - - views/ - - admin/ - - layouts/ - - style.blade.php - - index.blade.php - - shop/ - - default/ - - index.blade.php - - velocity/ - - index.blade.php - - package.json - - webpack.mix.js -``` - -::: - -Let's start with first step by creating the packages folder. - -### Step-1 - -- In `packages` folder, create a folder with your company name and inside that create a folder with your package name. Let's say `ACME/HelloWorld`. So, your basic structure will look like this, - - ``` - - packages/ - - ACME/HelloWorld/ - ``` - -### Step-2 - -- In your package folder, create a folder named as `src`. This is the place where you need to put all your files related to your package. Now, your updated structure will look like this, - - ``` - - packages/ - - ACME/HelloWorld/ - - src/ - ``` - -### Step-3 - -- In `src` folder, create a folder named as `Providers` and inside that folder, create a file named as `PackagenameServiceProvider.php`. Let's say `HelloWorldServiceProvider.php`. - - ::: tip - If you want to do this with the **Bagisto Package Generator** then you need to type the following command, it will generate the service provider for you. - - ```php - php artisan package:make-provider HelloWorldServiceProvider ACME/HelloWorld - ``` - - If somehow the file already exists then you can use `--force` to overwrite the file. - ::: - -- Copy the below code and paste it in `HelloWorldServiceProvider.php`, - - ```php - [ - ... - ACME\HelloWorld\Providers\HelloWorldServiceProvider::class, - ... - ] - ... - ]; - ``` - -### Step-5 - -- Add your package namespace in `psr-4` key in `composer.json` file for auto loading which is located in Bagisto root directory. - - ```json - "autoload": { - ... - "psr-4": { - ... - "ACME\\HelloWorld\\": "packages/ACME/HelloWorld/src" - ... - } - ... - } - ``` - -- Run `composer dump-autoload`. - -### Step-6 - -- Now, you need to add routing & views in your package. - - - **For routes**: Create a `Http` folder in `packages/ACME/HelloWorld/src` and create two files named as `admin-routes.php` and `shop-routes.php`. So the updated structure will look like below, - - ::: details Updated directory structure - - ``` - - packages/ - - ACME/HelloWorld/ - - src/ - ... - - Http/ - - admin-routes.php - - shop-routes.php - ``` - - ::: - - - `admin-routes.php`: This file is for the admin routes. Add below codes to this file, - - ```php - ['web', 'admin']], function () { - Route::prefix(config('app.admin_url'))->group(function () { - - // all admin routes will place here - }); - }); - ``` - - - `shop-routes.php`: This file is for the shop routes. Add below codes to this file, - - ```php - ['web', 'theme', 'locale', 'currency']], function () { - - // all shop routes will be place here - - }); - ``` - - ::: tip - - - If you don't want to do it manually, then you can use our **Bagisto Package Generator**. For that you need to use this command, - - - For **admin-routes.php**, - - ```php - php artisan package:make-admin-route ACME/HelloWorld - ``` - - - For **shop-routes.php**, - - ```php - php artisan package:make-shop-route ACME/HelloWorld - ``` - - ::: - - - **For views**: Create `Resources` folder in `packages/ACME/HelloWorld/src` path. In `Resources` folder, create another folder named as `views`. Now, in the `views` folder, we need to create a two more folder i.e. `admin` and `shop`. So updated structure will look like this, - - ::: details Updated directory structure - - ``` - - packages/ - - ACME/HelloWorld/ - - src/ - ... - - Resources/ - ... - - views/ - - admin/ - - shop/ - ``` - - ::: - - - Inside each folder i.e. `admin` and `shop` create a file named as `index.blade.php`. Add some data to `index.blade.php`, - - - `admin/index.blade.php` - - ```html -

Hello World Admin

- ``` - - - `shop/index.blade.php` - - ```html -

Hello World Shop

- ``` - -- Now, we need to register our routes and views to service provider’s boot method i.e. `packages/ACME/HelloWorld/src/Providers/HelloWorldServiceProvider.php` - - ```php - loadRoutesFrom(__DIR__ . '/../Http/admin-routes.php'); - - $this->loadRoutesFrom(__DIR__ . '/../Http/shop-routes.php'); - - $this->loadViewsFrom(__DIR__ . '/../Resources/views', 'helloworld'); - } - - /** - * Register services. - * - * @return void - */ - public function register() - { - - } - } - ``` - -### Step-7 - -- Now, we need to create a route and render a view on that route. - -- Go to `packages/ACME/HelloWorld/src/Http/shop-routes.php` file and create a route to render view. - - ```php - ['web', 'theme', 'locale', 'currency']], function () { - - // all shop routes will be place here - Route::view('/hello-world', 'helloworld::shop.index'); - - }); - ``` - -- Same for admin routes in file `packages/ACME/HelloWorld/src/Http/admin-routes.php`. - - ```php - ['web', 'admin']], function () { - - // all admin routes will place here - Route::view('/admin/hello-world', 'helloworld::admin.index'); - - }); - ``` - -- Now, check your route in your browser, - - ::: details Admin Output - - ![Admin Browser Output](../../assets/1.x/images/package-development/helloworld-admin-browser-output.png) - - ::: - - ::: details Shop Output - - ![Shop Browser Output](../../assets/1.x/images/package-development/helloworld-shop-browser-output.png) - - ::: - -### Step-8 - -- Now, we are going to create a language file for our package. For this create a `lang` folder in the `packages/ACME/HelloWorld/src/Resources` path. - -- In `lang` folder, you can create a different folder for language translations like for English 'en', Hindi ‘hn’ etc. Moving forward, we will create a folder name `en` (say language code) and in that folder, create a file name as `app.php` to perform language translation. - - ::: details Updated directory structure - - ``` - - packages/ - - ACME/HelloWorld/ - - src/ - ... - - Resources/ - ... - - lang/ - - en/ - - app.php - ``` - - ::: - -- Now, we need to register the language file to the service provider. - - ```php - loadRoutesFrom(__DIR__ . '/../Http/admin-routes.php'); - - $this->loadRoutesFrom(__DIR__ . '/../Http/shop-routes.php'); - - $this->loadViewsFrom(__DIR__ . '/../Resources/views', 'helloworld'); - - $this->loadTranslationsFrom(__DIR__ . '/../Resources/lang', 'helloworld'); - } - - /** - * Register services. - * - * @return void - */ - public function register() - { - - } - } - ``` - -- Now we can write a translation in `app.php` like below, - - ```php - [ - 'name' => 'Prateek Srivastava' - ] - ]; - ``` - -- Add below code to your blade file. - - ```html - {{ __('helloworld::app.hello-world.name') }} - ``` - - ::: details Admin Output - - ![Translation Output](../../assets/1.x/images/package-development/hello-world-admin-translation-output.png) - - ::: - - ::: details Shop Output - - ![Translation Output](../../assets/1.x/images/package-development/hello-world-shop-translation-output.png) - - ::: - -### Step-9 - -- Now we will add CSS, JS and images to our package. - -- In `Resources` folder creates a folder name `assets` & create `sass`, `js` and `images` folder. - - - In **sass** folder, add file **_app.scss_** - - - In **js** folder, add file **app.js** - -::: details Updated directory structure - -```php -- packages/ - - ACME/HelloWorld/ - - src/ - ... - - Resources/ - - assets/ - - sass/ - - app.scss - - js/ - - app.js - - images/ -``` - -::: - -- To add assets, create `package.json` and `webpack.mix.js` file inside the root of your package i.e. `packages/ACME/HelloWorld`. - -- Copy below code to `package.json`, - - ```json - { - "scripts": { - "dev": "npm run development", - "development": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js", - "watch": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --watch --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js", - "watch-poll": "npm run watch -- --watch-poll", - "hot": "cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js", - "prod": "npm run production", - "production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --no-progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js" - }, - - "devDependencies": { - "cross-env": "^7.0.2", - "laravel-mix": "^5.0.1", - "laravel-mix-merge-manifest": "^0.1.2" - } - } - ``` - -- Copy below code to `webpack.mix.js`, - - ```javascript - const mix = require("laravel-mix"); - - if (mix == "undefined") { - const { mix } = require("laravel-mix"); - } - - require("laravel-mix-merge-manifest"); - - if (mix.inProduction()) { - var publicPath = "publishable/assets"; - } else { - var publicPath = "../../../public/vendor/webkul/helloworld/assets"; - } - - mix.setPublicPath(publicPath).mergeManifest(); - - mix.disableNotifications(); - - mix - .js([__dirname + "/src/Resources/assets/js/app.js"], "js/helloworld.js") - .copyDirectory( - __dirname + "/src/Resources/assets/images", - publicPath + "/images" - ) - .sass( - __dirname + "/src/Resources/assets/sass/app.scss", - "css/helloworld.css" - ) - .options({ - processCssUrls: false, - }); - - if (mix.inProduction()) { - mix.version(); - } - ``` - -- After doing this go to the root of your package i.e. `packages/ACME/HelloWorld` and run `npm install` which will install all dependencies. - -- Now, `app.js` and `app.scss` is ready. Write all your css and js here. - -- When you done with your changes, then run `npm run prod` which will compiled all your css, js and images to the publishable folder. Then register your publishable in `HelloWorldServiceProvider`, - - ::: tip - - You can use `npm run watch` also, this will watch all your changes and put all your changes to the public path. When you done with all your changes then run `npm run prod` to compile all your changes and move to publishable folder. - - ::: - - ```php - loadRoutesFrom(__DIR__ . '/../Http/admin-routes.php'); - - $this->loadRoutesFrom(__DIR__ . '/../Http/shop-routes.php'); - - $this->loadViewsFrom(__DIR__ . '/../Resources/views', 'helloworld'); - - $this->loadTranslationsFrom(__DIR__ . '/../Resources/lang', 'helloworld'); - - $this->publishes([ - __DIR__ . '/../../publishable/assets' => public_path('vendor/webkul/helloworld/assets'), - ], 'public'); - } - - /** - * Register services. - * - * @return void - */ - public function register() - { - - } - } - ``` - -- After doing this we need to add an event listener so that admin layouts include our CSS. For this we need to add an Event Listener in service provider. But before adding event, let's create a `layouts` folder in `packages/ACME/Test/src/Resources/views/admin` and inside that create a file called `style.blade.php` & mention compiled CSS path inside this file. - - ```html - - ``` - -- **For Event Listener:** Add facade 'Event' into your `HelloWorldServiceProvider.php` file, - - ```php - loadRoutesFrom(__DIR__ . '/../Http/admin-routes.php'); - - $this->loadRoutesFrom(__DIR__ . '/../Http/shop-routes.php'); - - $this->loadViewsFrom(__DIR__ . '/../Resources/views', 'helloworld'); - - $this->loadTranslationsFrom(__DIR__ . '/../Resources/lang', 'helloworld'); - - $this->publishes([ - __DIR__ . '/../../publishable/assets' => public_path('vendor/webkul/helloworld/assets'), - ], 'public'); - - Event::listen('bagisto.admin.layout.head', function($viewRenderEventManager) { - $viewRenderEventManager->addTemplate('helloworld::admin.layouts.style'); - }); - } - - /** - * Register services. - * - * @return void - */ - public function register() - { - - } - } - ``` - -- Till now, we configured our package HelloWorld and now we need to extend the default layout of our admin panel by using `@extends('admin::layouts.master')` in file `packages/ACME/HelloWorld/src/Resources/views/admin/index.blade.php`. Below is the simple template which you can copy to your `index.blade.php` file, - - ```html - @extends('admin::layouts.master') @section('page_title') Package HelloWorld - @stop @section('content-wrapper') - -
- - -
-
- - @stop - ``` - -- If you don’t want to include this one then you can create your own master file which includes your packages CSS & JS. - -- Run `php artisan vendor:publish --all --force`. This will move all your publishable assets to their respective directory which you mentioned in the service provider. - -### Step-10 - -- Now we will add Database to our package. Create a `Database` folder in `packages/ACME/HelloWorld/src` path and inside `Database` folder create `Migrations` and `Seeders` folder. - -- Now, we need to add migrations to our service provider to load them. - - ```php - loadRoutesFrom(__DIR__ . '/../Http/admin-routes.php'); - - $this->loadRoutesFrom(__DIR__ . '/../Http/shop-routes.php'); - - $this->loadViewsFrom(__DIR__ . '/../Resources/views', 'helloworld'); - - $this->loadTranslationsFrom(__DIR__ . '/../Resources/lang', 'helloworld'); - - $this->publishes([ - __DIR__ . '/../../publishable/assets' => public_path('vendor/webkul/helloworld/assets'), - ], 'public'); - - Event::listen('bagisto.admin.layout.head', function($viewRenderEventManager) { - $viewRenderEventManager->addTemplate('helloworld::helloworld.layouts.style'); - }); - - $this->loadMigrationsFrom(__DIR__ .'/../Database/Migrations'); - } - - /** - * Register services. - * - * @return void - */ - public function register() - { - - } - } - ``` - -- Now start adding your migration files. diff --git a/docs/1.x/packages/store-data-through-repositories.md b/docs/1.x/packages/store-data-through-repositories.md deleted file mode 100644 index d06e89ef..00000000 --- a/docs/1.x/packages/store-data-through-repositories.md +++ /dev/null @@ -1,130 +0,0 @@ -# Store data through Repository - -## Contracts, Repositories and Proxies - -### Contracts - -Laravel's Contracts are a set of interfaces that define the core services provided by the framework. For example, an `Illuminate\Contracts\Queue\Queue` contract defines the methods needed for queueing jobs, while the `Illuminate\Contracts\Mail\Mailer` contract defines the methods needed for sending an e-mail. - -Each contract has a corresponding implementation provided by the framework. For example, Laravel provides a queue implementation with a variety of drivers, and a mailer implementation that is powered by SwiftMailer. - -All of the Laravel contracts live in their own GitHub repository. This provides a quick reference point for all available contracts, as well as a single, decoupled package that may be utilized by package developers. - -### Repositories - -Generally, we wrote all of our application logic in the controller. There’s an alternative approach of development that abstracts some calls into PHP classes called Repositories. The idea is that we can decouple models from controllers and assign a readable name's to complicated queries. - -This file defines our Repository class. Instances of this class have a model property that we tie to an Eloquent model. Once this is bound in the constructor we can call Eloquent methods like findOrFail, update or all from the class methods. - -### Proxies - -Proxies as their name state will drive you to the actual model class. The concept of model proxies has been introduced to override the functionality of the existing Model. It is a type of model inheritance without creating a new table in the database. - -## Steps to store data through repository - -- For creating models, create a file named as `HelloWorld.php` in `packages/ACME/HelloWorld/src/Models`, and copy the below code in file, - - ~~~php - Note: If you have created model by using **Bagisto Package Generator**, then you can skip the model proxy and contract creation step. - -- Now, at the same location create a model proxy file as `HelloWorldProxy.php`. This Proxy class will extends `Konekt\Concord\Proxies\ModelProxy`. Copy the below code in file, - - ~~~php - [ - ACME\HelloWorld\Providers\ModuleServiceProvider::class - ] - ]; - ~~~ - -- Now, you are all set to go. diff --git a/docs/1.x/themes/README.md b/docs/1.x/themes/README.md deleted file mode 100644 index f2cb0a16..00000000 --- a/docs/1.x/themes/README.md +++ /dev/null @@ -1,7 +0,0 @@ -# Themes - -We hope that now you know how to create a package, if not then you may refer to [Package Development](../packages) section. - -Creating a custom theme for Bagisto had been a hot topic lately. More and more users are actively trying our framework and we’re genuinely overwhelmed by it. - -Creating a custom theme for Bagisto is super easy with just a few lines of configuration code. Similarly following the traditional way of creating view files in Laravel would be enough. diff --git a/docs/1.x/themes/change-email-template.md b/docs/1.x/themes/change-email-template.md deleted file mode 100644 index a8536864..00000000 --- a/docs/1.x/themes/change-email-template.md +++ /dev/null @@ -1,98 +0,0 @@ -# Change email template - -In this section, we are explaining how to change the email templates in Bagisto. As we all know, everyone wants some customization according to their own taste that's why knowing about changing the email template is also quite helpful for some users. - -## Email template flow - -Before diving into template change first we should know how the email template works in the Bagisto. - -There are several mail notification classes like `CancelOrderAdminNotification`, `NewCustomerNotification`, and many more present in the `Webkul\Admin\Mail` namespace. Let's check one of these files, we are taking `CancelOrderAdminNotification` class as an example. - -~~~php -order = $order; - } - - public function build() - { - return $this->from(core()->getSenderEmailDetails()['email'], core()->getSenderEmailDetails()['name']) - ->to(core()->getAdminEmailDetails()['email']) - ->subject(trans('shop::app.mail.order.cancel.subject')) - ->view('shop::emails.sales.order-cancel-admin'); - } -} -~~~ - -If you check the `build()` method in the above class. You will come to know that the main view file i.e. `view('shop::emails.sales.order-cancel-admin')` is loaded from the shop package. - -Now check the view file mentioned in the `view('shop::emails.sales.order-cancel-admin')` method. If you check at this path `packages/Webkul/Shop/src/Resources/views/emails/sales/order-cancel-admin.blade.php`, you will get this file. Let's explore this one, if you check this file you will come to know that the main layout component i.e. `shop::emails.layouts.master` is used. - -~~~php -@component('shop::emails.layouts.master') - ... -@endcomponent -~~~ - -And this is responsible for your layouts. You can also explore that file if you want. Now we will move on to how to change these layouts. - -## Changing email template - -Now, we are changing the template. The recommended way to change the template is by overriding the package's view. If you check the above flow you will come to know that all views for emails are defined in the shop package. So we need to override the view for the shop package. - -Let's override the view of the same file which we explained above i.e. `view('shop::emails.sales.order-cancel-admin')`. - -As this is a Laravel stuff, Bagisto also registers two locations for your views i.e. the application's `resources/themes` directory mentioned in the `config/themes.php` and the directory you specify. So, if you are using the `default` theme i.e. `shop` package, then Bagisto will first check if a custom version of the view has been placed in the `resources/themes/default` directory. Then, if the view has not been customized, Bagisto will search the package view directory. - -Now, for overriding we are creating the same structure in the application's `resources/themes/default` directory. - -~~~directory-structure -- resources/ - - themes/ - - default/ - - views/ - - emails/ - - sales/ - - order-cancel-admin.blade.php -~~~ - -Let's say this file i.e. `order-cancel-admin.blade.php` is having some random paragraphs like below, - -~~~order-cancel-admin.blade.php -... - -Lorem ipsum dolor sit amet consectetur adipisicing elit. Laborum porro cumque numquam neque dicta quo, accusantium, perferendis sed beatae nesciunt eum impedit vel doloribus dolor excepturi vero tenetur perspiciatis saepe? - -... -~~~ - -Now, test the mail. - -## Mail Sample - -![Mail Sample](../../assets/1.x/images/themes/mail-sample.png) diff --git a/docs/1.x/themes/create-admin-theme.md b/docs/1.x/themes/create-admin-theme.md deleted file mode 100644 index 4d17b089..00000000 --- a/docs/1.x/themes/create-admin-theme.md +++ /dev/null @@ -1,101 +0,0 @@ ---- -title: Create a admin theme ---- - -# Create an new admin theme - -In the Bagisto root directory go to the **config** folder and open `themes.php`. -Now search for the keys `admin-default` and `admin-themes`. It will look like this, - -```php - 'default', - - 'admin-themes' => [ - 'default' => [ - 'views_path' => 'resources/admin-themes/default/views', - 'assets_path' => 'public/admin-themes/default/assets', - 'name' => 'Default' - ] - ] - ]; -``` - -| Key | Description| -| --- | ---------- | -| admin-default | is used to set the current theme. | -| admin-themes | is used to store a list of themes | - -Now add one more theme into `admin-themes`. - -```php - 'default', - - 'admin-themes' => [ - 'default' => [ - 'views_path' => 'resources/admin-themes/default/views', - 'assets_path' => 'public/admin-themes/default/assets', - 'name' => 'Default' - ], - - 'theme1' => [ - 'views_path' => 'resources/admin-themes/theme1/views', - 'assets_path' => 'public/admin-themes/theme1/assets', - 'name' => 'Theme 1' - ] - ] - ]; -``` - -As you see we have added the view and assets path in the `theme1` array. -Now set your views and assets folder according to your mentioned path. - -The resources structure will look like this, - -~~~php - - resources - - admin-themes - - theme1 - - views -~~~ - -Assets structure will look like this, - -~~~php - - public - - admin-themes - - theme1 - - assets -~~~ - -Now lets replace the dashboard page. -Just create the exact dashboard's directory structure for `theme1` as present in `default`. -So it will look like this, - -~~~php - - resources - - admin-themes - - theme1 - - views - - dashboard - - index.blade.php -~~~ - -Add some lines to the `index.blade.php`, - -~~~php - Theme 1 Sample -~~~ - -Now everything is setup. Just one thing is pending i.e. we need to activate the theme. So, for that we need to change the `admin-default` key in file `config/themes.php`. - -~~~php - ... - 'admin-default' => 'theme1', - ... -~~~ - -Now check the dashboard page. \ No newline at end of file diff --git a/docs/1.x/themes/create-theme.md b/docs/1.x/themes/create-theme.md deleted file mode 100644 index 5e98ae56..00000000 --- a/docs/1.x/themes/create-theme.md +++ /dev/null @@ -1,87 +0,0 @@ ---- -title: Create a store theme ---- - -# Create a store theme - -Please follow the steps mentioned below that how to create a custom theme in Bagisto. - -Go to your project’s root directory and check for **config** folder. -Inside **config** folder, you will find a file called **_themes.php_** like directory below: - - - app/ - - bin/ - - bootstrap/ - - config/ - - themes.php - - database/ - - packages/Webkul - - - -Check contents of **_themes.php_** file, it holds all necessary information of creating a custom theme. - -```php - 'default', - - 'themes' => [ - 'default' => [ - 'views_path' => 'resources/themes/default/views', - 'assets_path' => 'public/themes/default/assets', - 'name' => 'Default' - ], - - // 'bliss' => [ - // 'views_path' => 'resources/themes/bliss/views', - // 'assets_path' => 'public/themes/bliss/assets', - // 'name' => 'Bliss', - // 'parent' => 'default' - // ] - ] -]; -``` - - - -Let’s go through the parameters of **_themes.php_** file. Because understanding those parameters will help you in creating a custom theme. - -##### An Explanation For These Parameters: - -- default: Declared at the top signifies the currently active or default theme in Bagisto. It is assigned with the value 'default’. The default(string) indicates the name of the currently active theme. - -- themes: This parameter is where you’ve to define all essentials for your own custom theme. Multiple themes can also be created and used at the same time in Bagisto. - - - Inside 'themes’ there is another array by name 'default' which is your currently active theme containing some key-value pairs. - - - default: Inside array 'default', it holds few more key-value pairs. such as 'views_path', 'assets_path', 'name’ all those are explained below: - - - views_path: It’ll take the path of your views or blade files that you want to put up in your custom theme. - - - assets_path: Responsible for your assets i.e. images, CSS and javascript files, etc. - - - name: Defines a global name for your theme inside Bagisto. - - - parent: This is a magic parameter that you can find in the commented code below the sub-array 'default'. Using this parameter you can make use of existing themes inside Bagisto and just customize them even further. This parameter will take the value of the 'name’ parameter listed in the 3rd point above. - - - -Finally, define your own paths and name of your custom theme inside **_themes.php_** file, and start creating view files. Do not forget to cover all get routes of shop package having a parameter called 'view’. You can get route file of shop package located at `packages/Webkul/Shop/src/Http/routes.php` - - - -Make sure the name of the blade file should be the same one as passed in this GET route file like this: - -```php -//Store front header nav-menu fetch - Route::get('/categories/{slug}', 'Webkul\Shop\Http\Controllers\CategoryController@index') - ->defaults('_config', [ - 'view' => 'shop::products.index' - ])->name('shop.categories.index'); -``` - - - -For all views check all GET routes as they hold a view parameter with the value of view to be used. diff --git a/docs/1.x/themes/customize-hompepage-menu.md b/docs/1.x/themes/customize-hompepage-menu.md deleted file mode 100644 index d7288347..00000000 --- a/docs/1.x/themes/customize-hompepage-menu.md +++ /dev/null @@ -1,27 +0,0 @@ -# Customize homepage menu - -In this section, we will give you an overview of the menu items. How you can access the menu items and how it can be used for customization. In both themes i.e. default and velocity, we are displaying the categories in the menu items. - -## Accessing categories - -If you check the shop package, you will come to know that we have used the `CategoryRepository` class in the namespace `Webkul\Category\Repositories\CategoryRepository`. - -In this class, there is a method named `getVisibleCategoryTree`. This method will give you the listing of all the categories. You just need to pass the main root category id. - -## Sample from default theme - -If you check the blade file in the default theme, here is the below code, - -~~~php -foreach (app('Webkul\Category\Repositories\CategoryRepository')->getVisibleCategoryTree(core()->getCurrentChannel()->root_category_id) as $category) { - ... -} -~~~ - -Now loop through these and customize your menu according to your needs. - -::: tip - -There are several more categories methods present in the repository. Just go ahead explore those also. - -::: diff --git a/docs/1.x/themes/integrate-image-search-in-theme.md b/docs/1.x/themes/integrate-image-search-in-theme.md deleted file mode 100644 index a06599da..00000000 --- a/docs/1.x/themes/integrate-image-search-in-theme.md +++ /dev/null @@ -1,72 +0,0 @@ -# Integrate image search in theme - -In this section, we will show you how you can integrate image search with your new theme. If you check our **default theme** and **velocity theme**, you will come to know that we are using the [Tensorflow](https://www.tensorflow.org/js) JS and loading the model named **Tensorflow** MobileNet. - -The **Tensorflow** JS model does not need any knowledge for machine learning. You just need to pass any browser-based image elements `` and it will return an array that is best suited according to their predictions and their confidences. - -## Usage - -Make sure all your scripts are loaded in the footer, if you check the **default theme** and **velocity theme** we are using the yielding. So you can also use the same yielding. So we are assuming that you have added `scripts` yield in your main layouts. - -- Let's start with the loading of the library and model, - - ~~~php - @push('scripts') - - - @endpush - ~~~ - -- As **Tensorflow** model only need the image element. So, we are just taking the sample image element. - - ~~~php - @push('scripts') - - - - - @endpush - ~~~ - - ::: tip - - This is the sample image element, you can add file input to get the image from the user. - - ::: - -- Now, the main part just pass your image element to the model, - - ~~~php - @push('scripts') - - - - - - - @endpush - ~~~ - -- Now you have all the predictions. Just pass all your predictions to your search input. - - ::: tip - - Make query string from the predictions and redirect to the search route. - - ::: - -## Conclusion - -If you check the whole flow, you will come to know that we are passing an image element to **Tensorflow**'s model in return we are getting the array of predictions and from that predictions, we are making the query strings and redirecting to the search route. diff --git a/docs/1.x/themes/tracer.md b/docs/1.x/themes/tracer.md deleted file mode 100644 index 68cbc6f4..00000000 --- a/docs/1.x/themes/tracer.md +++ /dev/null @@ -1,32 +0,0 @@ -# Blade file tracer - -[[toc]] - -## Introduction -When you want to change or create a theme it can become difficult to find out which part contains the code that you need to work on. -This is why we added the blade file tracer as it will help developers, contributors & partners who deal with Bagisto to find the blade file of the templates/views and understand the structure of the project. - -## Configuration -Let’s start to make this easier with just a simple config change. -Go to your Bagisto root directory and open the file **config/view.php**, inside this file change the `tracer` value to `true`. - -```php - /* - |-------------------------------------------------------------------------- - | Blade File Tracer - |-------------------------------------------------------------------------- - | - | Shows blade file path in front - | - */ - - 'tracer' => true, -``` - -Now return to your Bagisto root directory and run the following commands -```bash -php artisan view:clear -php artisan config:cache -``` - -Now you are ready to visit your Storefront & Admin, you will see the blade file hint path in each block of your template. diff --git a/docs/1.x/translations/README.md b/docs/1.x/translations/README.md deleted file mode 100644 index e69de29b..00000000 diff --git a/docs/1.x/translations/change-the-language-of-error-validations-on-your-store.md b/docs/1.x/translations/change-the-language-of-error-validations-on-your-store.md deleted file mode 100644 index 4880528d..00000000 --- a/docs/1.x/translations/change-the-language-of-error-validations-on-your-store.md +++ /dev/null @@ -1,27 +0,0 @@ -# Change the language of error validations on your store - -If you want to make your website easily accessible to customers in multiple languages and expand your business to a global level, then language translation is imperative for your website. - -This will help you get more traffic and further generate sales. - -By using language translation in Bagisto, you can easily localize your website for many global or regional languages. - -Your customer can easily translate your whole website just by a single click which also plays a major role in website SEO in the respective region and to show validation messages as per your locale, you need to follow these below steps: - -## Steps to change the language of error validation - -1. Within Shop package, go to src/Resources/assets/js/lang/locales.js - -2. define your error translation for your locale code as shown below in the screenshot - - ![error-translation](../../assets/1.x/images/user-guide/locale-trans.png) - -3. Now, within **app.js**, add `ar: { messages: locales.messages.ar }` for your locale code in dictionary property such as ar for arabic - - ~~~javascript - Vue.use(VeeValidate, { - dictionary: { - ar: { messages: locales.messages.ar } - } - }); - ~~~ \ No newline at end of file diff --git a/docs/1.x/translations/translation-based-on-locale.md b/docs/1.x/translations/translation-based-on-locale.md deleted file mode 100644 index 61cfd3c2..00000000 --- a/docs/1.x/translations/translation-based-on-locale.md +++ /dev/null @@ -1,68 +0,0 @@ -# Translation based on locale - -If you want to make your website easily accessible to customers in multiple languages and expand your business to a global platform then language translation is crucial for your website. It will help you generate more traffic and increase sales. - -By using language translation in Bagisto, you can easily localize your website for many global or regional languages. Your customer can easily translate your whole website just by a single click which also plays a major role in website SEO in the respective region and to show translation as per your locale, you need to follow these below steps: - -## Steps to apply Translation Based on Locale - -You can easily perform language translation for both Admin dashboard and the front-end view - -**Translation For Front-End View** - -Kindly follow the steps as needed on the admin dashboard. - -**Step 1:-** On Admin Sidebar, click on Setting>>Locales>>Add Locale - -![locale](../../assets/1.x/images/user-guide/locale.png) - -**Step 2:-** Enter the code and Name of locale (here I am taking an example of Arabic language or you can select as per your choice) and click on Save Locale. - -![add-locale-bagisto](../../assets/1.x/images/user-guide/add-locale-bagisto.png) - -**Step 3:-** Next, you need to set the Channels.Click on Setting>> Channels. Open the selected Channel in Edit Mode. Under Currencies and Locales - -Locale:- You can select either one or multi-select locales as per your choice. - -Default Locale:- You have to set your default Locale so that if the Customer will not select any locale then it will be showing in the Default Locale set by you - -Once the settings have been done, click on Save Channels. - -![channel-setting-in-bagisto](../../assets/1.x/images/user-guide/channel-setting-in-bagisto.png) - -**Step 4:-** Next, you need to change locale in the below main section: Products, Categories, and Attributes - -![language-changes](../../assets/1.x/images/user-guide/language-changes.png) - -**Step 5:-** Under Attributes Section, click on Attributes which you want to change. Next, open selected attribute in Edit Mode. Enter the attribute name in Arabic after which click on Save Attribute. Here I am giving an example of Attribute “Pattern“. - -![arrabic-attribute](../../assets/1.x/images/user-guide/arrabic-attribute.png) - -**Step 6:-** Under Categories Section, click on Categories. Enter the category name in Arabic and enter the description in Arabic after which click Save Category. - -![catageory-in-arabic](../../assets/1.x/images/user-guide/catageory-in-arabic.png) - -**Step 7:-** Under Product Section, click on Product. Open the selected product in Edit Mode and enter the product name in Arabic and Short Description in Arabic - -![product-in-arabic](../../assets/1.x/images/user-guide/product-in-arabic.png) - - -**_Steps To Perform On The Front End_** - -**Step 1:-** At the bottom of the front end there is an option of Locale so you can select your Locale - -![translation](../../assets/1.x/images/user-guide/translation.png) - -When you will select Locale in English then the front end will be visible like this: - -![front-end](../../assets/1.x/images/user-guide/front-end.png) - -When you will select the locale in Arabic from the front end then it will be visible like this: - -![front-end-in-arabic](../../assets/1.x/images/user-guide/front-end-in-arabic.png) - -**Translation For Admin View** - -You need to specify the locale in config/app.php file of the root as shown in the screenshot, replace 'en' with your locale code. - -![locale-setup](../../assets/1.x/images/user-guide/locale-setup.png) diff --git a/docs/1.x/user-guides/README.md b/docs/1.x/user-guides/README.md deleted file mode 100644 index e69de29b..00000000 diff --git a/docs/1.x/user-guides/cart-catalog-rule.md b/docs/1.x/user-guides/cart-catalog-rule.md deleted file mode 100644 index 7b4bd51b..00000000 --- a/docs/1.x/user-guides/cart-catalog-rule.md +++ /dev/null @@ -1,16 +0,0 @@ ---- -title: Revampment of cart & catalog rule | Bagisto Web APIs Documentation -layout: default ---- - -## Revamping the Catalog & Cart Rule - -There is a revamping of cart & catalog rule at the code level. The user needs to upgrade their bagisto version to v0.1.9 for the usage of our cart & catalog rule. To upgrade the module, the points below must be followed: - -1. Initially, the user needs to take a backup of their project database. - -2. Take a pull from [Bagisto v0.1.9](https://github.com/bagisto/bagisto/tree/v0.1.9){: target="\_blank" .link-color}. There may be some conflicts, you need to resolve it by own. - -3. Run `php artisan migrate` and `php artisan db:seed` command. - -**Note** : The changes in core packages will be removed, if done. \ No newline at end of file diff --git a/docs/1.x/user-guides/cart-rule.md b/docs/1.x/user-guides/cart-rule.md deleted file mode 100644 index b96114ba..00000000 --- a/docs/1.x/user-guides/cart-rule.md +++ /dev/null @@ -1,52 +0,0 @@ ---- -title: Cart Rules | Bagisto ---- - -# Cart Rules - -To Add cart-rules, you need to explore promotions menu -> Cart Rules. Here, we have a option to Add Cart Rule -. Options you will find in creating cart rules as below: - -- **General Information** - - 1. Rule Name: the name of cart rule is given - 2. Description: the description of cart rule is given - 3. Start: From the date & time, the cart rule will be applicable - 4. End: upto the date & time, the cart rule will be applicable - 5. Customer Groups: Bydefault, we have provided three option of customer group as 'guest', 'general', 'wholesale'. But, if needed, we can create customer groups from **customers -> groups menu**. - 6. Channels: this multi-select box shows the available channels - 7. Is active: this accepts the boolean value of enable/disable cart rule - 8. Use Coupon: this accepts the boolean value for enable/disable coupons - 9. Priority: this sets the priority of one cart rule over another - -- **Conditions** - - Within this, two dropdown options are available - - 1. All Conditions are true: We have an option to add condition based on which cart rule will implement if all the conditions are true. - 2. Any condition is true: We have an option to add condition based on which cart rule will implement if in all listed condition any condition is true. - -- **Actions** - -The section provides actions on cart rules on multiple criteria. For this, we have an multiple form-fields i.e., - -1. **_Apply_**: - - - Percentage of product - - Apply as fixed amount - -2. **_Discount Amount_**: This field based on above _apply_ field i.e., - - - If percentage of product is selected then this field accepts the percent value which will be the amount of percentage apply as a discount on product. - - - If apply as fixed amount is selected then the specified amount in this field will be deducted/reduced from the product price - -3. **_Buy Atleast_**: It accepts numeric value that determine how many product quantity need to be purchase to apply cart rule/discount - -4. **_Max. Quantity Allowed To Be Discounted_**: In this, we specifies on how many product quantity discount will be applied. - -5. **_Free Shipping_**: Accepts boolean value for enable/disable free shipping means **_no delivery charges_** - -6. **_Apply to shipping_**: Accepts boolean value and determines whether discount applies to shipping cost or not. - -7. **_End other rules_**: Accepts boolean value to enable/disbale other discount i.e., If non-couponables rules are applied such as offer, sale etc. Then, there is no need to apply coupons. diff --git a/docs/1.x/user-guides/social-auth.md b/docs/1.x/user-guides/social-auth.md deleted file mode 100644 index 43d727c3..00000000 --- a/docs/1.x/user-guides/social-auth.md +++ /dev/null @@ -1,76 +0,0 @@ -# Social Authentication - -[[toc]] - -## Introduction -In addition to the default authentication, Bagisto also provide a convenient way to authenticate with multiple OAuth providers. -The following social networks are provided out of the box: [Facebook](https://facebook.com) [GitHub](https://github.com) [Google](https://google.com) [LinkedIn](https://linkedin.com) and [Twitter](https://twitter.com) - -Once you configured one of the social networks, your customers can authenticate by one of these social networks by just a single buttons, there is no need to fill various fields. - -## Configuration -To get started, you need to enable this feature first in the admin interface, navigate to configure>>Customer>>Social login. -Here you can enable / disable social authentication providers as shown in the below image. - -![admin_social_auth](../../assets/1.x/images/user-guide/social/admin_social_auth.png) - -## Configuring Github - -### Register a new OAuth application -Before you can allow you customers to authenticate with Github, you first need to create a [GitHub application](https://github.com/settings/applications/new). -::: tip Authorization callback URL -You can find the **Authorization callback URL** inside the .env file and change yourhost.com with your domain name. -::: - -![github_oauth_step1](../../assets/1.x/images/user-guide/social/github-OAuth-step1.png) - -Once your new OAuth Application is registered, click on the name of your new application to get the **Client ID** and **Client Secret**. -![github_oauth_step2](../../assets/1.x/images/user-guide/social/github-OAuth-step3.png) - -### Configure credentials for the OAuth application -Now that you have the **Github Client ID**, **Client Secret** and **Authorization callback URL**, you just need to add these to your **.env** file. -Remember to change the GITHUB_CALLBACK_URL yourhost.com with your domain name. - -``` -GITHUB_CLIENT_ID= -GITHUB_CLIENT_SECRET= -GITHUB_CALLBACK_URL=https://yourhost.com/customer/social-login/github/callback -``` - -## Configuring Google - -### Register a new OAuth application -Before you can allow you customers to authenticate with Google, you first need to create a [Google application](https://console.developers.google.com/project). -1. Go to your API & Services ->Library -![github_oauth_step1](../../assets/1.x/images/user-guide/social/google-OAuth-step1.png) -2. Now click on Google+API under the section Social. -![github_oauth_step1](../../assets/1.x/images/user-guide/social/google-OAuth-step2.png) -3. Now, click the **Enable button** to enable the Google+ API. -![github_oauth_step1](../../assets/1.x/images/user-guide/social/google-OAuth-step3.png) -4. Now, click My Project to create a new project. -![github_oauth_step1](../../assets/1.x/images/user-guide/social/google-OAuth-step4.png) -5. On clicking My Project, a pop-up will appear. Click “New Project” link. -![github_oauth_step1](../../assets/1.x/images/user-guide/social/google-OAuth-step5.png) -6. Enter the name for your store so that you can identify your project. Please note that you should not include any Google word for your project name. -![github_oauth_step1](../../assets/1.x/images/user-guide/social/google-OAuth-step6.png) -7. Meanwhile, go to the Credentials menu option and then click on Create credentials. -![github_oauth_step1](../../assets/1.x/images/user-guide/social/google-OAuth-step7.png) -8. After that, click on **OAuth client ID**. -![github_oauth_step1](../../assets/1.x/images/user-guide/social/google-OAuth-step8.png) -9. Select the Application type and enter the Authorized JavaScript origins and the Authorized redirect URLs, once that is done click the **Create** button. -::: tip OAuth Redirect URL -Set the OAuth Redirect URL like this: www.example.com/socialsignup/google/callback/ -::: -![github_oauth_step1](../../assets/1.x/images/user-guide/social/google-OAuth-step9.png) -10. After clicking the **Create** button in the above step you will get the Client Id and Client Secret. -![github_oauth_step1](../../assets/1.x/images/user-guide/social/google-OAuth-step10.png) - -### Configure credentials for the OAuth application -Now that you have the **Google Client ID**, **Client Secret** and **Authorization callback URL**, you just need to add these to your **.env** file. -Remember to change the GOOGLE_CALLBACK_UR yourhost.com with your domain name. - -``` -GOOGLE_CLIENT_ID= -GOOGLE_CLIENT_SECRET= -GOOGLE_CALLBACK_URL=https://yourhost.com/customer/social-login/google/callback -``` \ No newline at end of file diff --git a/docs/1.x/user-guides/tax-rates.md b/docs/1.x/user-guides/tax-rates.md deleted file mode 100644 index c1454bf0..00000000 --- a/docs/1.x/user-guides/tax-rates.md +++ /dev/null @@ -1,23 +0,0 @@ -# Tax Rates - -In e-commerce, there are various taxes involved while purchasing the product. These taxes and the rate of taxes differ from country to country. - -In this section, we will focus only on the tax configuration. If you want to know more details about tax categories, tax rates, then feel free to check out out this [blog](https://bagisto.com/en/taxes-in-bagisto/). - -## Pricing - -If you check the configuration in the backend i.e. **Configuration > Taxes > Catalog**, you will see the '**Tax Inclusive**' button in the pricing section, - - ![Pricing Config](../../assets/1.x/images/user-guide/tax-rates/pricing-config.png) - -If this button is enabled then all the products in the shop will show tax-inclusive rates. - -## Default Location Calculation - -Now, in the same configuration, you will also see the '**Default Location Calculation**' with some fields, let us discuss all of them, - - ![Default Location Calculation Config](../../assets/1.x/images/user-guide/tax-rates/default-location-calculation-config.png) - -These are the default fields that can be handled by the admin. Let's say if the address of the customer or guest is not found, then in last, it will select the value from these configs. - -Even if these configs are not set then in last it will check in the `config/app.php` file. If still it's not found then tax will not be applied. diff --git a/docs/CNAME b/docs/CNAME index 58946797..20054f10 100644 --- a/docs/CNAME +++ b/docs/CNAME @@ -1 +1 @@ -devdocs.bagisto.com +docs.bagisto.com diff --git a/docs/README.md b/docs/README.md index b45496b3..f4a419d4 100644 --- a/docs/README.md +++ b/docs/README.md @@ -1,9 +1,9 @@ --- home: true -heroText: Bagisto Developer Portal +heroText: Bagisto User Guide tagline: Find detailed documentation and code examples. actionText: Get Started → -actionLink: /2.x/prologue/ +actionLink: /2.x/products/ features: - title: Package creation details: Learn how to create a new package for Bagisto. diff --git a/docs/assets/1.5.x/images/advanced-topics/limiting-error-messages.png b/docs/assets/1.5.x/images/advanced-topics/limiting-error-messages.png deleted file mode 100644 index c2b9485e..00000000 Binary files a/docs/assets/1.5.x/images/advanced-topics/limiting-error-messages.png and /dev/null differ diff --git a/docs/assets/1.5.x/images/advanced-topics/mail-sample.png b/docs/assets/1.5.x/images/advanced-topics/mail-sample.png deleted file mode 100644 index 5bc4a05e..00000000 Binary files a/docs/assets/1.5.x/images/advanced-topics/mail-sample.png and /dev/null differ diff --git a/docs/assets/1.5.x/images/advanced-topics/product-index.png b/docs/assets/1.5.x/images/advanced-topics/product-index.png deleted file mode 100644 index 7b889997..00000000 Binary files a/docs/assets/1.5.x/images/advanced-topics/product-index.png and /dev/null differ diff --git a/docs/assets/1.5.x/images/package-development/admin-acl-output.png b/docs/assets/1.5.x/images/package-development/admin-acl-output.png deleted file mode 100644 index 9530ff9b..00000000 Binary files a/docs/assets/1.5.x/images/package-development/admin-acl-output.png and /dev/null differ diff --git a/docs/assets/1.5.x/images/package-development/admin-menu-output.png b/docs/assets/1.5.x/images/package-development/admin-menu-output.png deleted file mode 100644 index 055dd51c..00000000 Binary files a/docs/assets/1.5.x/images/package-development/admin-menu-output.png and /dev/null differ diff --git a/docs/assets/1.5.x/images/package-development/blog-admin-lang-output.png b/docs/assets/1.5.x/images/package-development/blog-admin-lang-output.png deleted file mode 100644 index 5547ac84..00000000 Binary files a/docs/assets/1.5.x/images/package-development/blog-admin-lang-output.png and /dev/null differ diff --git a/docs/assets/1.5.x/images/package-development/blog-admin-output.png b/docs/assets/1.5.x/images/package-development/blog-admin-output.png deleted file mode 100644 index 8b1cec70..00000000 Binary files a/docs/assets/1.5.x/images/package-development/blog-admin-output.png and /dev/null differ diff --git a/docs/assets/1.5.x/images/package-development/blog-package-output.png b/docs/assets/1.5.x/images/package-development/blog-package-output.png deleted file mode 100644 index d586cfd3..00000000 Binary files a/docs/assets/1.5.x/images/package-development/blog-package-output.png and /dev/null differ diff --git a/docs/assets/1.5.x/images/package-development/blog-shop-lang-output.png b/docs/assets/1.5.x/images/package-development/blog-shop-lang-output.png deleted file mode 100644 index 848d3dc7..00000000 Binary files a/docs/assets/1.5.x/images/package-development/blog-shop-lang-output.png and /dev/null differ diff --git a/docs/assets/1.5.x/images/package-development/blog-shop-output.png b/docs/assets/1.5.x/images/package-development/blog-shop-output.png deleted file mode 100644 index cef8f7ab..00000000 Binary files a/docs/assets/1.5.x/images/package-development/blog-shop-output.png and /dev/null differ diff --git a/docs/assets/1.5.x/images/package-development/custom-config-output.png b/docs/assets/1.5.x/images/package-development/custom-config-output.png deleted file mode 100644 index ac3fc89c..00000000 Binary files a/docs/assets/1.5.x/images/package-development/custom-config-output.png and /dev/null differ diff --git a/docs/assets/1.x/images/advanced-topics/best-security-practices/limiting-error-messages.png b/docs/assets/1.x/images/advanced-topics/best-security-practices/limiting-error-messages.png deleted file mode 100644 index c2b9485e..00000000 Binary files a/docs/assets/1.x/images/advanced-topics/best-security-practices/limiting-error-messages.png and /dev/null differ diff --git a/docs/assets/1.x/images/advanced-topics/elastic-search/installed-elastic-info.png b/docs/assets/1.x/images/advanced-topics/elastic-search/installed-elastic-info.png deleted file mode 100644 index 638feca2..00000000 Binary files a/docs/assets/1.x/images/advanced-topics/elastic-search/installed-elastic-info.png and /dev/null differ diff --git a/docs/assets/1.x/images/advanced-topics/elastic-search/product-index.png b/docs/assets/1.x/images/advanced-topics/elastic-search/product-index.png deleted file mode 100644 index e5e3669a..00000000 Binary files a/docs/assets/1.x/images/advanced-topics/elastic-search/product-index.png and /dev/null differ diff --git a/docs/assets/1.x/images/api/bagisto_add_create.jpg b/docs/assets/1.x/images/api/bagisto_add_create.jpg deleted file mode 100644 index 20030893..00000000 Binary files a/docs/assets/1.x/images/api/bagisto_add_create.jpg and /dev/null differ diff --git a/docs/assets/1.x/images/api/bagisto_add_getId.jpg b/docs/assets/1.x/images/api/bagisto_add_getId.jpg deleted file mode 100644 index 0dbb9ee3..00000000 Binary files a/docs/assets/1.x/images/api/bagisto_add_getId.jpg and /dev/null differ diff --git a/docs/assets/1.x/images/api/bagisto_add_info.jpg b/docs/assets/1.x/images/api/bagisto_add_info.jpg deleted file mode 100644 index f6e8d193..00000000 Binary files a/docs/assets/1.x/images/api/bagisto_add_info.jpg and /dev/null differ diff --git a/docs/assets/1.x/images/api/bagisto_add_no_pag.jpg b/docs/assets/1.x/images/api/bagisto_add_no_pag.jpg deleted file mode 100644 index b48d2795..00000000 Binary files a/docs/assets/1.x/images/api/bagisto_add_no_pag.jpg and /dev/null differ diff --git a/docs/assets/1.x/images/api/bagisto_add_save.jpg b/docs/assets/1.x/images/api/bagisto_add_save.jpg deleted file mode 100644 index cef49653..00000000 Binary files a/docs/assets/1.x/images/api/bagisto_add_save.jpg and /dev/null differ diff --git a/docs/assets/1.x/images/api/bagisto_addresses.jpg b/docs/assets/1.x/images/api/bagisto_addresses.jpg deleted file mode 100644 index cabe4631..00000000 Binary files a/docs/assets/1.x/images/api/bagisto_addresses.jpg and /dev/null differ diff --git a/docs/assets/1.x/images/api/bagisto_addresses_pag.jpg b/docs/assets/1.x/images/api/bagisto_addresses_pag.jpg deleted file mode 100644 index c487f1d3..00000000 Binary files a/docs/assets/1.x/images/api/bagisto_addresses_pag.jpg and /dev/null differ diff --git a/docs/assets/1.x/images/api/bagisto_attribute.jpg b/docs/assets/1.x/images/api/bagisto_attribute.jpg deleted file mode 100644 index 3f1ef7a1..00000000 Binary files a/docs/assets/1.x/images/api/bagisto_attribute.jpg and /dev/null differ diff --git a/docs/assets/1.x/images/api/bagisto_cart.jpg b/docs/assets/1.x/images/api/bagisto_cart.jpg deleted file mode 100644 index 4b498419..00000000 Binary files a/docs/assets/1.x/images/api/bagisto_cart.jpg and /dev/null differ diff --git a/docs/assets/1.x/images/api/bagisto_cart_add.jpg b/docs/assets/1.x/images/api/bagisto_cart_add.jpg deleted file mode 100644 index 62931661..00000000 Binary files a/docs/assets/1.x/images/api/bagisto_cart_add.jpg and /dev/null differ diff --git a/docs/assets/1.x/images/api/bagisto_cart_empty.jpg b/docs/assets/1.x/images/api/bagisto_cart_empty.jpg deleted file mode 100644 index 9f528b93..00000000 Binary files a/docs/assets/1.x/images/api/bagisto_cart_empty.jpg and /dev/null differ diff --git a/docs/assets/1.x/images/api/bagisto_cart_guest.jpg b/docs/assets/1.x/images/api/bagisto_cart_guest.jpg deleted file mode 100644 index 6983ccea..00000000 Binary files a/docs/assets/1.x/images/api/bagisto_cart_guest.jpg and /dev/null differ diff --git a/docs/assets/1.x/images/api/bagisto_cart_remove_item.jpg b/docs/assets/1.x/images/api/bagisto_cart_remove_item.jpg deleted file mode 100644 index c50e63ea..00000000 Binary files a/docs/assets/1.x/images/api/bagisto_cart_remove_item.jpg and /dev/null differ diff --git a/docs/assets/1.x/images/api/bagisto_cart_update.jpg b/docs/assets/1.x/images/api/bagisto_cart_update.jpg deleted file mode 100644 index ec3a6fe4..00000000 Binary files a/docs/assets/1.x/images/api/bagisto_cart_update.jpg and /dev/null differ diff --git a/docs/assets/1.x/images/api/bagisto_cat_descendant.jpg b/docs/assets/1.x/images/api/bagisto_cat_descendant.jpg deleted file mode 100644 index e4980e46..00000000 Binary files a/docs/assets/1.x/images/api/bagisto_cat_descendant.jpg and /dev/null differ diff --git a/docs/assets/1.x/images/api/bagisto_cat_link.jpg b/docs/assets/1.x/images/api/bagisto_cat_link.jpg deleted file mode 100644 index 48d9cf62..00000000 Binary files a/docs/assets/1.x/images/api/bagisto_cat_link.jpg and /dev/null differ diff --git a/docs/assets/1.x/images/api/bagisto_cat_meta.jpg b/docs/assets/1.x/images/api/bagisto_cat_meta.jpg deleted file mode 100644 index 21f158ef..00000000 Binary files a/docs/assets/1.x/images/api/bagisto_cat_meta.jpg and /dev/null differ diff --git a/docs/assets/1.x/images/api/bagisto_cat_no_pagination.jpg b/docs/assets/1.x/images/api/bagisto_cat_no_pagination.jpg deleted file mode 100644 index dbc5dc88..00000000 Binary files a/docs/assets/1.x/images/api/bagisto_cat_no_pagination.jpg and /dev/null differ diff --git a/docs/assets/1.x/images/api/bagisto_cat_pagination.jpg b/docs/assets/1.x/images/api/bagisto_cat_pagination.jpg deleted file mode 100644 index 83ab43d8..00000000 Binary files a/docs/assets/1.x/images/api/bagisto_cat_pagination.jpg and /dev/null differ diff --git a/docs/assets/1.x/images/api/bagisto_cat_path.jpg b/docs/assets/1.x/images/api/bagisto_cat_path.jpg deleted file mode 100644 index 9905f0de..00000000 Binary files a/docs/assets/1.x/images/api/bagisto_cat_path.jpg and /dev/null differ diff --git a/docs/assets/1.x/images/api/bagisto_cat_single.jpg b/docs/assets/1.x/images/api/bagisto_cat_single.jpg deleted file mode 100644 index e9c79a2d..00000000 Binary files a/docs/assets/1.x/images/api/bagisto_cat_single.jpg and /dev/null differ diff --git a/docs/assets/1.x/images/api/bagisto_config.jpg b/docs/assets/1.x/images/api/bagisto_config.jpg deleted file mode 100644 index 7c47ca26..00000000 Binary files a/docs/assets/1.x/images/api/bagisto_config.jpg and /dev/null differ diff --git a/docs/assets/1.x/images/api/bagisto_config_attr.jpg b/docs/assets/1.x/images/api/bagisto_config_attr.jpg deleted file mode 100644 index a24e5542..00000000 Binary files a/docs/assets/1.x/images/api/bagisto_config_attr.jpg and /dev/null differ diff --git a/docs/assets/1.x/images/api/bagisto_cust_details.jpg b/docs/assets/1.x/images/api/bagisto_cust_details.jpg deleted file mode 100644 index dc833c00..00000000 Binary files a/docs/assets/1.x/images/api/bagisto_cust_details.jpg and /dev/null differ diff --git a/docs/assets/1.x/images/api/bagisto_cust_forgot.jpg b/docs/assets/1.x/images/api/bagisto_cust_forgot.jpg deleted file mode 100644 index 893f9431..00000000 Binary files a/docs/assets/1.x/images/api/bagisto_cust_forgot.jpg and /dev/null differ diff --git a/docs/assets/1.x/images/api/bagisto_cust_id.jpg b/docs/assets/1.x/images/api/bagisto_cust_id.jpg deleted file mode 100644 index 4bc452cc..00000000 Binary files a/docs/assets/1.x/images/api/bagisto_cust_id.jpg and /dev/null differ diff --git a/docs/assets/1.x/images/api/bagisto_cust_login.jpg b/docs/assets/1.x/images/api/bagisto_cust_login.jpg deleted file mode 100644 index 487a609d..00000000 Binary files a/docs/assets/1.x/images/api/bagisto_cust_login.jpg and /dev/null differ diff --git a/docs/assets/1.x/images/api/bagisto_cust_logout.jpg b/docs/assets/1.x/images/api/bagisto_cust_logout.jpg deleted file mode 100644 index c1629d34..00000000 Binary files a/docs/assets/1.x/images/api/bagisto_cust_logout.jpg and /dev/null differ diff --git a/docs/assets/1.x/images/api/bagisto_cust_profile.jpg b/docs/assets/1.x/images/api/bagisto_cust_profile.jpg deleted file mode 100644 index 357011e0..00000000 Binary files a/docs/assets/1.x/images/api/bagisto_cust_profile.jpg and /dev/null differ diff --git a/docs/assets/1.x/images/api/bagisto_cust_reg_error.jpg b/docs/assets/1.x/images/api/bagisto_cust_reg_error.jpg deleted file mode 100644 index ea7c1c26..00000000 Binary files a/docs/assets/1.x/images/api/bagisto_cust_reg_error.jpg and /dev/null differ diff --git a/docs/assets/1.x/images/api/bagisto_cust_register.jpg b/docs/assets/1.x/images/api/bagisto_cust_register.jpg deleted file mode 100644 index 9550e77e..00000000 Binary files a/docs/assets/1.x/images/api/bagisto_cust_register.jpg and /dev/null differ diff --git a/docs/assets/1.x/images/api/bagisto_cust_wishlists.jpg b/docs/assets/1.x/images/api/bagisto_cust_wishlists.jpg deleted file mode 100644 index 1c2d5d17..00000000 Binary files a/docs/assets/1.x/images/api/bagisto_cust_wishlists.jpg and /dev/null differ diff --git a/docs/assets/1.x/images/api/bagisto_cust_wrong.jpg b/docs/assets/1.x/images/api/bagisto_cust_wrong.jpg deleted file mode 100644 index e6d77d5e..00000000 Binary files a/docs/assets/1.x/images/api/bagisto_cust_wrong.jpg and /dev/null differ diff --git a/docs/assets/1.x/images/api/bagisto_invoices.jpg b/docs/assets/1.x/images/api/bagisto_invoices.jpg deleted file mode 100644 index fab7cf1f..00000000 Binary files a/docs/assets/1.x/images/api/bagisto_invoices.jpg and /dev/null differ diff --git a/docs/assets/1.x/images/api/bagisto_invoices_id.jpg b/docs/assets/1.x/images/api/bagisto_invoices_id.jpg deleted file mode 100644 index d7d94bc8..00000000 Binary files a/docs/assets/1.x/images/api/bagisto_invoices_id.jpg and /dev/null differ diff --git a/docs/assets/1.x/images/api/bagisto_invoices_order_id.jpg b/docs/assets/1.x/images/api/bagisto_invoices_order_id.jpg deleted file mode 100644 index 0afca3c4..00000000 Binary files a/docs/assets/1.x/images/api/bagisto_invoices_order_id.jpg and /dev/null differ diff --git a/docs/assets/1.x/images/api/bagisto_move_to_wishlist.jpg b/docs/assets/1.x/images/api/bagisto_move_to_wishlist.jpg deleted file mode 100644 index 0070037f..00000000 Binary files a/docs/assets/1.x/images/api/bagisto_move_to_wishlist.jpg and /dev/null differ diff --git a/docs/assets/1.x/images/api/bagisto_orders.jpg b/docs/assets/1.x/images/api/bagisto_orders.jpg deleted file mode 100644 index 426fa756..00000000 Binary files a/docs/assets/1.x/images/api/bagisto_orders.jpg and /dev/null differ diff --git a/docs/assets/1.x/images/api/bagisto_orders_custId.jpg b/docs/assets/1.x/images/api/bagisto_orders_custId.jpg deleted file mode 100644 index 986d90cc..00000000 Binary files a/docs/assets/1.x/images/api/bagisto_orders_custId.jpg and /dev/null differ diff --git a/docs/assets/1.x/images/api/bagisto_orders_cust_no_pag.jpg b/docs/assets/1.x/images/api/bagisto_orders_cust_no_pag.jpg deleted file mode 100644 index 8eacf765..00000000 Binary files a/docs/assets/1.x/images/api/bagisto_orders_cust_no_pag.jpg and /dev/null differ diff --git a/docs/assets/1.x/images/api/bagisto_orders_cust_pag.jpg b/docs/assets/1.x/images/api/bagisto_orders_cust_pag.jpg deleted file mode 100644 index df263e7f..00000000 Binary files a/docs/assets/1.x/images/api/bagisto_orders_cust_pag.jpg and /dev/null differ diff --git a/docs/assets/1.x/images/api/bagisto_orders_id.jpg b/docs/assets/1.x/images/api/bagisto_orders_id.jpg deleted file mode 100644 index 2b24b306..00000000 Binary files a/docs/assets/1.x/images/api/bagisto_orders_id.jpg and /dev/null differ diff --git a/docs/assets/1.x/images/api/bagisto_orders_no_pag.jpg b/docs/assets/1.x/images/api/bagisto_orders_no_pag.jpg deleted file mode 100644 index d17cf7e8..00000000 Binary files a/docs/assets/1.x/images/api/bagisto_orders_no_pag.jpg and /dev/null differ diff --git a/docs/assets/1.x/images/api/bagisto_orders_page.jpg b/docs/assets/1.x/images/api/bagisto_orders_page.jpg deleted file mode 100644 index 76e03ea8..00000000 Binary files a/docs/assets/1.x/images/api/bagisto_orders_page.jpg and /dev/null differ diff --git a/docs/assets/1.x/images/api/bagisto_prod_all.jpg b/docs/assets/1.x/images/api/bagisto_prod_all.jpg deleted file mode 100644 index 28dd9b90..00000000 Binary files a/docs/assets/1.x/images/api/bagisto_prod_all.jpg and /dev/null differ diff --git a/docs/assets/1.x/images/api/bagisto_prod_category.jpg b/docs/assets/1.x/images/api/bagisto_prod_category.jpg deleted file mode 100644 index 8ff27690..00000000 Binary files a/docs/assets/1.x/images/api/bagisto_prod_category.jpg and /dev/null differ diff --git a/docs/assets/1.x/images/api/bagisto_prod_color.jpg b/docs/assets/1.x/images/api/bagisto_prod_color.jpg deleted file mode 100644 index e7e5bade..00000000 Binary files a/docs/assets/1.x/images/api/bagisto_prod_color.jpg and /dev/null differ diff --git a/docs/assets/1.x/images/api/bagisto_prod_id.jpg b/docs/assets/1.x/images/api/bagisto_prod_id.jpg deleted file mode 100644 index 3f052fc2..00000000 Binary files a/docs/assets/1.x/images/api/bagisto_prod_id.jpg and /dev/null differ diff --git a/docs/assets/1.x/images/api/bagisto_prod_name.jpg b/docs/assets/1.x/images/api/bagisto_prod_name.jpg deleted file mode 100644 index aaf27f53..00000000 Binary files a/docs/assets/1.x/images/api/bagisto_prod_name.jpg and /dev/null differ diff --git a/docs/assets/1.x/images/api/bagisto_prod_new.jpg b/docs/assets/1.x/images/api/bagisto_prod_new.jpg deleted file mode 100644 index 56c72f34..00000000 Binary files a/docs/assets/1.x/images/api/bagisto_prod_new.jpg and /dev/null differ diff --git a/docs/assets/1.x/images/api/bagisto_prod_price_config.jpg b/docs/assets/1.x/images/api/bagisto_prod_price_config.jpg deleted file mode 100644 index 5f2a4a87..00000000 Binary files a/docs/assets/1.x/images/api/bagisto_prod_price_config.jpg and /dev/null differ diff --git a/docs/assets/1.x/images/api/bagisto_prod_price_simple.jpg b/docs/assets/1.x/images/api/bagisto_prod_price_simple.jpg deleted file mode 100644 index 69ca8dfa..00000000 Binary files a/docs/assets/1.x/images/api/bagisto_prod_price_simple.jpg and /dev/null differ diff --git a/docs/assets/1.x/images/api/bagisto_prod_size.jpg b/docs/assets/1.x/images/api/bagisto_prod_size.jpg deleted file mode 100644 index 9e790c19..00000000 Binary files a/docs/assets/1.x/images/api/bagisto_prod_size.jpg and /dev/null differ diff --git a/docs/assets/1.x/images/api/bagisto_prod_sku.jpg b/docs/assets/1.x/images/api/bagisto_prod_sku.jpg deleted file mode 100644 index 90d7eec8..00000000 Binary files a/docs/assets/1.x/images/api/bagisto_prod_sku.jpg and /dev/null differ diff --git a/docs/assets/1.x/images/api/bagisto_prod_url_key.jpg b/docs/assets/1.x/images/api/bagisto_prod_url_key.jpg deleted file mode 100644 index 2d978b02..00000000 Binary files a/docs/assets/1.x/images/api/bagisto_prod_url_key.jpg and /dev/null differ diff --git a/docs/assets/1.x/images/api/bagisto_reviews.jpg b/docs/assets/1.x/images/api/bagisto_reviews.jpg deleted file mode 100644 index b72f32cc..00000000 Binary files a/docs/assets/1.x/images/api/bagisto_reviews.jpg and /dev/null differ diff --git a/docs/assets/1.x/images/api/bagisto_reviews_cust_id.jpg b/docs/assets/1.x/images/api/bagisto_reviews_cust_id.jpg deleted file mode 100644 index 603ccb07..00000000 Binary files a/docs/assets/1.x/images/api/bagisto_reviews_cust_id.jpg and /dev/null differ diff --git a/docs/assets/1.x/images/api/bagisto_reviews_cust_no_page.jpg b/docs/assets/1.x/images/api/bagisto_reviews_cust_no_page.jpg deleted file mode 100644 index 66af604b..00000000 Binary files a/docs/assets/1.x/images/api/bagisto_reviews_cust_no_page.jpg and /dev/null differ diff --git a/docs/assets/1.x/images/api/bagisto_reviews_cust_page.jpg b/docs/assets/1.x/images/api/bagisto_reviews_cust_page.jpg deleted file mode 100644 index 808d3e48..00000000 Binary files a/docs/assets/1.x/images/api/bagisto_reviews_cust_page.jpg and /dev/null differ diff --git a/docs/assets/1.x/images/api/bagisto_reviews_id.jpg b/docs/assets/1.x/images/api/bagisto_reviews_id.jpg deleted file mode 100644 index 7c38ccbc..00000000 Binary files a/docs/assets/1.x/images/api/bagisto_reviews_id.jpg and /dev/null differ diff --git a/docs/assets/1.x/images/api/bagisto_reviews_no_page.jpg b/docs/assets/1.x/images/api/bagisto_reviews_no_page.jpg deleted file mode 100644 index 15be166d..00000000 Binary files a/docs/assets/1.x/images/api/bagisto_reviews_no_page.jpg and /dev/null differ diff --git a/docs/assets/1.x/images/api/bagisto_reviews_page.jpg b/docs/assets/1.x/images/api/bagisto_reviews_page.jpg deleted file mode 100644 index abbbfcb2..00000000 Binary files a/docs/assets/1.x/images/api/bagisto_reviews_page.jpg and /dev/null differ diff --git a/docs/assets/1.x/images/api/bagisto_reviews_prod_id.jpg b/docs/assets/1.x/images/api/bagisto_reviews_prod_id.jpg deleted file mode 100644 index c68614da..00000000 Binary files a/docs/assets/1.x/images/api/bagisto_reviews_prod_id.jpg and /dev/null differ diff --git a/docs/assets/1.x/images/api/bagisto_save_address.jpg b/docs/assets/1.x/images/api/bagisto_save_address.jpg deleted file mode 100644 index f6842d04..00000000 Binary files a/docs/assets/1.x/images/api/bagisto_save_address.jpg and /dev/null differ diff --git a/docs/assets/1.x/images/api/bagisto_save_order.jpg b/docs/assets/1.x/images/api/bagisto_save_order.jpg deleted file mode 100644 index 62e2099b..00000000 Binary files a/docs/assets/1.x/images/api/bagisto_save_order.jpg and /dev/null differ diff --git a/docs/assets/1.x/images/api/bagisto_save_payment.jpg b/docs/assets/1.x/images/api/bagisto_save_payment.jpg deleted file mode 100644 index a296fc10..00000000 Binary files a/docs/assets/1.x/images/api/bagisto_save_payment.jpg and /dev/null differ diff --git a/docs/assets/1.x/images/api/bagisto_save_shipping.jpg b/docs/assets/1.x/images/api/bagisto_save_shipping.jpg deleted file mode 100644 index c4fc5aa1..00000000 Binary files a/docs/assets/1.x/images/api/bagisto_save_shipping.jpg and /dev/null differ diff --git a/docs/assets/1.x/images/api/bagisto_ship_order_id.jpg b/docs/assets/1.x/images/api/bagisto_ship_order_id.jpg deleted file mode 100644 index 028e675e..00000000 Binary files a/docs/assets/1.x/images/api/bagisto_ship_order_id.jpg and /dev/null differ diff --git a/docs/assets/1.x/images/api/bagisto_shipment_id.jpg b/docs/assets/1.x/images/api/bagisto_shipment_id.jpg deleted file mode 100644 index 691089a7..00000000 Binary files a/docs/assets/1.x/images/api/bagisto_shipment_id.jpg and /dev/null differ diff --git a/docs/assets/1.x/images/api/bagisto_shipments.jpg b/docs/assets/1.x/images/api/bagisto_shipments.jpg deleted file mode 100644 index 93c0b789..00000000 Binary files a/docs/assets/1.x/images/api/bagisto_shipments.jpg and /dev/null differ diff --git a/docs/assets/1.x/images/api/bagisto_wishlist_add.jpg b/docs/assets/1.x/images/api/bagisto_wishlist_add.jpg deleted file mode 100644 index f516bb81..00000000 Binary files a/docs/assets/1.x/images/api/bagisto_wishlist_add.jpg and /dev/null differ diff --git a/docs/assets/1.x/images/api/bagisto_wishlist_cust.jpg b/docs/assets/1.x/images/api/bagisto_wishlist_cust.jpg deleted file mode 100644 index fbd47ae3..00000000 Binary files a/docs/assets/1.x/images/api/bagisto_wishlist_cust.jpg and /dev/null differ diff --git a/docs/assets/1.x/images/api/bagisto_wishlist_no_page.jpg b/docs/assets/1.x/images/api/bagisto_wishlist_no_page.jpg deleted file mode 100644 index fd75cec5..00000000 Binary files a/docs/assets/1.x/images/api/bagisto_wishlist_no_page.jpg and /dev/null differ diff --git a/docs/assets/1.x/images/api/bagisto_wishlist_page.jpg b/docs/assets/1.x/images/api/bagisto_wishlist_page.jpg deleted file mode 100644 index 4c10d2af..00000000 Binary files a/docs/assets/1.x/images/api/bagisto_wishlist_page.jpg and /dev/null differ diff --git a/docs/assets/1.x/images/api/demo_products.jpg b/docs/assets/1.x/images/api/demo_products.jpg deleted file mode 100644 index b976b2cb..00000000 Binary files a/docs/assets/1.x/images/api/demo_products.jpg and /dev/null differ diff --git a/docs/assets/1.x/images/package-development/admin-acl-output.png b/docs/assets/1.x/images/package-development/admin-acl-output.png deleted file mode 100644 index ef254c2a..00000000 Binary files a/docs/assets/1.x/images/package-development/admin-acl-output.png and /dev/null differ diff --git a/docs/assets/1.x/images/package-development/admin-custom-config-output.png b/docs/assets/1.x/images/package-development/admin-custom-config-output.png deleted file mode 100644 index 2dc5275a..00000000 Binary files a/docs/assets/1.x/images/package-development/admin-custom-config-output.png and /dev/null differ diff --git a/docs/assets/1.x/images/package-development/admin-menu-output.png b/docs/assets/1.x/images/package-development/admin-menu-output.png deleted file mode 100644 index 4009c0f1..00000000 Binary files a/docs/assets/1.x/images/package-development/admin-menu-output.png and /dev/null differ diff --git a/docs/assets/1.x/images/package-development/hello-world-admin-translation-output.png b/docs/assets/1.x/images/package-development/hello-world-admin-translation-output.png deleted file mode 100644 index fe02296b..00000000 Binary files a/docs/assets/1.x/images/package-development/hello-world-admin-translation-output.png and /dev/null differ diff --git a/docs/assets/1.x/images/package-development/hello-world-package-output.png b/docs/assets/1.x/images/package-development/hello-world-package-output.png deleted file mode 100644 index dd4a556e..00000000 Binary files a/docs/assets/1.x/images/package-development/hello-world-package-output.png and /dev/null differ diff --git a/docs/assets/1.x/images/package-development/hello-world-shop-translation-output.png b/docs/assets/1.x/images/package-development/hello-world-shop-translation-output.png deleted file mode 100644 index 7f21be68..00000000 Binary files a/docs/assets/1.x/images/package-development/hello-world-shop-translation-output.png and /dev/null differ diff --git a/docs/assets/1.x/images/package-development/helloworld-admin-browser-output.png b/docs/assets/1.x/images/package-development/helloworld-admin-browser-output.png deleted file mode 100644 index 8d218fb7..00000000 Binary files a/docs/assets/1.x/images/package-development/helloworld-admin-browser-output.png and /dev/null differ diff --git a/docs/assets/1.x/images/package-development/helloworld-shop-browser-output.png b/docs/assets/1.x/images/package-development/helloworld-shop-browser-output.png deleted file mode 100644 index 65622e78..00000000 Binary files a/docs/assets/1.x/images/package-development/helloworld-shop-browser-output.png and /dev/null differ diff --git a/docs/assets/1.x/images/themes/mail-sample.png b/docs/assets/1.x/images/themes/mail-sample.png deleted file mode 100644 index 5bc4a05e..00000000 Binary files a/docs/assets/1.x/images/themes/mail-sample.png and /dev/null differ diff --git a/docs/assets/1.x/images/user-guide/add-locale-bagisto.png b/docs/assets/1.x/images/user-guide/add-locale-bagisto.png deleted file mode 100644 index 2b2591d6..00000000 Binary files a/docs/assets/1.x/images/user-guide/add-locale-bagisto.png and /dev/null differ diff --git a/docs/assets/1.x/images/user-guide/arrabic-attribute.png b/docs/assets/1.x/images/user-guide/arrabic-attribute.png deleted file mode 100644 index b77cafb3..00000000 Binary files a/docs/assets/1.x/images/user-guide/arrabic-attribute.png and /dev/null differ diff --git a/docs/assets/1.x/images/user-guide/catageory-in-arabic.png b/docs/assets/1.x/images/user-guide/catageory-in-arabic.png deleted file mode 100644 index 27b07a6a..00000000 Binary files a/docs/assets/1.x/images/user-guide/catageory-in-arabic.png and /dev/null differ diff --git a/docs/assets/1.x/images/user-guide/channel-setting-in-bagisto.png b/docs/assets/1.x/images/user-guide/channel-setting-in-bagisto.png deleted file mode 100644 index 2c523770..00000000 Binary files a/docs/assets/1.x/images/user-guide/channel-setting-in-bagisto.png and /dev/null differ diff --git a/docs/assets/1.x/images/user-guide/front-end-in-arabic.png b/docs/assets/1.x/images/user-guide/front-end-in-arabic.png deleted file mode 100644 index 407f7c77..00000000 Binary files a/docs/assets/1.x/images/user-guide/front-end-in-arabic.png and /dev/null differ diff --git a/docs/assets/1.x/images/user-guide/front-end.png b/docs/assets/1.x/images/user-guide/front-end.png deleted file mode 100644 index dde4d7e6..00000000 Binary files a/docs/assets/1.x/images/user-guide/front-end.png and /dev/null differ diff --git a/docs/assets/1.x/images/user-guide/language-changes.png b/docs/assets/1.x/images/user-guide/language-changes.png deleted file mode 100644 index f2958b8f..00000000 Binary files a/docs/assets/1.x/images/user-guide/language-changes.png and /dev/null differ diff --git a/docs/assets/1.x/images/user-guide/locale-setup.png b/docs/assets/1.x/images/user-guide/locale-setup.png deleted file mode 100644 index e5e75cb1..00000000 Binary files a/docs/assets/1.x/images/user-guide/locale-setup.png and /dev/null differ diff --git a/docs/assets/1.x/images/user-guide/locale-trans.png b/docs/assets/1.x/images/user-guide/locale-trans.png deleted file mode 100644 index 9129fe8a..00000000 Binary files a/docs/assets/1.x/images/user-guide/locale-trans.png and /dev/null differ diff --git a/docs/assets/1.x/images/user-guide/locale.png b/docs/assets/1.x/images/user-guide/locale.png deleted file mode 100644 index 0e4ecb10..00000000 Binary files a/docs/assets/1.x/images/user-guide/locale.png and /dev/null differ diff --git a/docs/assets/1.x/images/user-guide/product-in-arabic (1).png b/docs/assets/1.x/images/user-guide/product-in-arabic (1).png deleted file mode 100644 index 4eb2c723..00000000 Binary files a/docs/assets/1.x/images/user-guide/product-in-arabic (1).png and /dev/null differ diff --git a/docs/assets/1.x/images/user-guide/product-in-arabic.png b/docs/assets/1.x/images/user-guide/product-in-arabic.png deleted file mode 100644 index 4eb2c723..00000000 Binary files a/docs/assets/1.x/images/user-guide/product-in-arabic.png and /dev/null differ diff --git a/docs/assets/1.x/images/user-guide/social/admin_social_auth.png b/docs/assets/1.x/images/user-guide/social/admin_social_auth.png deleted file mode 100644 index 56b5f81d..00000000 Binary files a/docs/assets/1.x/images/user-guide/social/admin_social_auth.png and /dev/null differ diff --git a/docs/assets/1.x/images/user-guide/social/github-OAuth-step1.png b/docs/assets/1.x/images/user-guide/social/github-OAuth-step1.png deleted file mode 100644 index c0798ae6..00000000 Binary files a/docs/assets/1.x/images/user-guide/social/github-OAuth-step1.png and /dev/null differ diff --git a/docs/assets/1.x/images/user-guide/social/github-OAuth-step2.png b/docs/assets/1.x/images/user-guide/social/github-OAuth-step2.png deleted file mode 100644 index 5aab231f..00000000 Binary files a/docs/assets/1.x/images/user-guide/social/github-OAuth-step2.png and /dev/null differ diff --git a/docs/assets/1.x/images/user-guide/social/github-OAuth-step3.png b/docs/assets/1.x/images/user-guide/social/github-OAuth-step3.png deleted file mode 100644 index a6739e3c..00000000 Binary files a/docs/assets/1.x/images/user-guide/social/github-OAuth-step3.png and /dev/null differ diff --git a/docs/assets/1.x/images/user-guide/social/google-OAuth-step1.png b/docs/assets/1.x/images/user-guide/social/google-OAuth-step1.png deleted file mode 100644 index 892d998e..00000000 Binary files a/docs/assets/1.x/images/user-guide/social/google-OAuth-step1.png and /dev/null differ diff --git a/docs/assets/1.x/images/user-guide/social/google-OAuth-step10.png b/docs/assets/1.x/images/user-guide/social/google-OAuth-step10.png deleted file mode 100644 index b2a85a27..00000000 Binary files a/docs/assets/1.x/images/user-guide/social/google-OAuth-step10.png and /dev/null differ diff --git a/docs/assets/1.x/images/user-guide/social/google-OAuth-step2.png b/docs/assets/1.x/images/user-guide/social/google-OAuth-step2.png deleted file mode 100644 index d54d81e7..00000000 Binary files a/docs/assets/1.x/images/user-guide/social/google-OAuth-step2.png and /dev/null differ diff --git a/docs/assets/1.x/images/user-guide/social/google-OAuth-step3.png b/docs/assets/1.x/images/user-guide/social/google-OAuth-step3.png deleted file mode 100644 index 8b3c46ec..00000000 Binary files a/docs/assets/1.x/images/user-guide/social/google-OAuth-step3.png and /dev/null differ diff --git a/docs/assets/1.x/images/user-guide/social/google-OAuth-step4.png b/docs/assets/1.x/images/user-guide/social/google-OAuth-step4.png deleted file mode 100644 index 0c5ad562..00000000 Binary files a/docs/assets/1.x/images/user-guide/social/google-OAuth-step4.png and /dev/null differ diff --git a/docs/assets/1.x/images/user-guide/social/google-OAuth-step5.png b/docs/assets/1.x/images/user-guide/social/google-OAuth-step5.png deleted file mode 100644 index 3252e17a..00000000 Binary files a/docs/assets/1.x/images/user-guide/social/google-OAuth-step5.png and /dev/null differ diff --git a/docs/assets/1.x/images/user-guide/social/google-OAuth-step6.png b/docs/assets/1.x/images/user-guide/social/google-OAuth-step6.png deleted file mode 100644 index 96db7464..00000000 Binary files a/docs/assets/1.x/images/user-guide/social/google-OAuth-step6.png and /dev/null differ diff --git a/docs/assets/1.x/images/user-guide/social/google-OAuth-step7.png b/docs/assets/1.x/images/user-guide/social/google-OAuth-step7.png deleted file mode 100644 index 0fa1b04d..00000000 Binary files a/docs/assets/1.x/images/user-guide/social/google-OAuth-step7.png and /dev/null differ diff --git a/docs/assets/1.x/images/user-guide/social/google-OAuth-step8.png b/docs/assets/1.x/images/user-guide/social/google-OAuth-step8.png deleted file mode 100644 index 13cb025d..00000000 Binary files a/docs/assets/1.x/images/user-guide/social/google-OAuth-step8.png and /dev/null differ diff --git a/docs/assets/1.x/images/user-guide/social/google-OAuth-step9.png b/docs/assets/1.x/images/user-guide/social/google-OAuth-step9.png deleted file mode 100644 index 3f7dff8b..00000000 Binary files a/docs/assets/1.x/images/user-guide/social/google-OAuth-step9.png and /dev/null differ diff --git a/docs/assets/1.x/images/user-guide/tax-rates/default-location-calculation-config.png b/docs/assets/1.x/images/user-guide/tax-rates/default-location-calculation-config.png deleted file mode 100644 index accf9f27..00000000 Binary files a/docs/assets/1.x/images/user-guide/tax-rates/default-location-calculation-config.png and /dev/null differ diff --git a/docs/assets/1.x/images/user-guide/tax-rates/pricing-config.png b/docs/assets/1.x/images/user-guide/tax-rates/pricing-config.png deleted file mode 100644 index b5a9d304..00000000 Binary files a/docs/assets/1.x/images/user-guide/tax-rates/pricing-config.png and /dev/null differ diff --git a/docs/assets/1.x/images/user-guide/translation.png b/docs/assets/1.x/images/user-guide/translation.png deleted file mode 100644 index 41ac6365..00000000 Binary files a/docs/assets/1.x/images/user-guide/translation.png and /dev/null differ diff --git a/docs/assets/2.x/images/advanced-topics/limiting-error-messages.png b/docs/assets/2.x/images/advanced-topics/limiting-error-messages.png deleted file mode 100644 index c2b9485e..00000000 Binary files a/docs/assets/2.x/images/advanced-topics/limiting-error-messages.png and /dev/null differ diff --git a/docs/assets/2.x/images/advanced-topics/mail-sample.png b/docs/assets/2.x/images/advanced-topics/mail-sample.png deleted file mode 100644 index 5bc4a05e..00000000 Binary files a/docs/assets/2.x/images/advanced-topics/mail-sample.png and /dev/null differ diff --git a/docs/assets/2.x/images/advanced-topics/product-index.png b/docs/assets/2.x/images/advanced-topics/product-index.png deleted file mode 100644 index 7b889997..00000000 Binary files a/docs/assets/2.x/images/advanced-topics/product-index.png and /dev/null differ diff --git a/docs/assets/2.x/images/grouped-product/editProduct.png b/docs/assets/2.x/images/grouped-product/editProduct.png deleted file mode 100644 index e4f3a205..00000000 Binary files a/docs/assets/2.x/images/grouped-product/editProduct.png and /dev/null differ diff --git a/docs/assets/2.x/images/grouped-product/grouped.png b/docs/assets/2.x/images/grouped-product/grouped.png deleted file mode 100644 index 5c85f76c..00000000 Binary files a/docs/assets/2.x/images/grouped-product/grouped.png and /dev/null differ diff --git a/docs/assets/2.x/images/package-development/admin-acl-output.png b/docs/assets/2.x/images/package-development/admin-acl-output.png deleted file mode 100644 index bbe45727..00000000 Binary files a/docs/assets/2.x/images/package-development/admin-acl-output.png and /dev/null differ diff --git a/docs/assets/2.x/images/package-development/admin-menu-output.png b/docs/assets/2.x/images/package-development/admin-menu-output.png deleted file mode 100644 index 1583f2ac..00000000 Binary files a/docs/assets/2.x/images/package-development/admin-menu-output.png and /dev/null differ diff --git a/docs/assets/2.x/images/package-development/blog-admin-lang-output.png b/docs/assets/2.x/images/package-development/blog-admin-lang-output.png deleted file mode 100644 index 5547ac84..00000000 Binary files a/docs/assets/2.x/images/package-development/blog-admin-lang-output.png and /dev/null differ diff --git a/docs/assets/2.x/images/package-development/blog-admin-output.png b/docs/assets/2.x/images/package-development/blog-admin-output.png deleted file mode 100644 index 8b1cec70..00000000 Binary files a/docs/assets/2.x/images/package-development/blog-admin-output.png and /dev/null differ diff --git a/docs/assets/2.x/images/package-development/blog-package-output.png b/docs/assets/2.x/images/package-development/blog-package-output.png deleted file mode 100644 index 1583f2ac..00000000 Binary files a/docs/assets/2.x/images/package-development/blog-package-output.png and /dev/null differ diff --git a/docs/assets/2.x/images/package-development/blog-shop-lang-output.png b/docs/assets/2.x/images/package-development/blog-shop-lang-output.png deleted file mode 100644 index 848d3dc7..00000000 Binary files a/docs/assets/2.x/images/package-development/blog-shop-lang-output.png and /dev/null differ diff --git a/docs/assets/2.x/images/package-development/blog-shop-output.png b/docs/assets/2.x/images/package-development/blog-shop-output.png deleted file mode 100644 index cef8f7ab..00000000 Binary files a/docs/assets/2.x/images/package-development/blog-shop-output.png and /dev/null differ diff --git a/docs/assets/2.x/images/package-development/custom-config-output-1.png b/docs/assets/2.x/images/package-development/custom-config-output-1.png deleted file mode 100644 index 27013ede..00000000 Binary files a/docs/assets/2.x/images/package-development/custom-config-output-1.png and /dev/null differ diff --git a/docs/assets/2.x/images/package-development/custom-config-output-2.png b/docs/assets/2.x/images/package-development/custom-config-output-2.png deleted file mode 100644 index 32be0654..00000000 Binary files a/docs/assets/2.x/images/package-development/custom-config-output-2.png and /dev/null differ diff --git a/package-lock.json b/package-lock.json index 6dbdd50b..348aaf76 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2101,9 +2101,9 @@ "dev": true }, "node_modules/@types/node": { - "version": "20.11.2", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.2.tgz", - "integrity": "sha512-cZShBaVa+UO1LjWWBPmWRR4+/eY/JR/UIEcDlVsw3okjWEu+rB7/mH6X3B/L+qJVHDLjk9QW/y2upp9wp1yDXA==", + "version": "20.11.4", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.4.tgz", + "integrity": "sha512-6I0fMH8Aoy2lOejL3s4LhyIYX34DPwY8bl5xlNjBvUEk8OHrcuzsFt+Ied4LvJihbtXPM+8zUqdydfIti86v9g==", "dev": true, "dependencies": { "undici-types": "~5.26.4" @@ -4421,9 +4421,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001576", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001576.tgz", - "integrity": "sha512-ff5BdakGe2P3SQsMsiqmt1Lc8221NR1VzHj5jXN5vBny9A6fpze94HiVV/n7XRosOlsShJcvMv5mdnpjOGCEgg==", + "version": "1.0.30001577", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001577.tgz", + "integrity": "sha512-rs2ZygrG1PNXMfmncM0B5H1hndY5ZCC9b5TkFaVNfZ+AUlyqcMyVIQtc3fsezi0NUCk5XZfDf9WS6WxMxnfdrg==", "dev": true, "funding": [ { @@ -6089,9 +6089,9 @@ "dev": true }, "node_modules/electron-to-chromium": { - "version": "1.4.630", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.630.tgz", - "integrity": "sha512-osHqhtjojpCsACVnuD11xO5g9xaCyw7Qqn/C2KParkMv42i8jrJJgx3g7mkHfpxwhy9MnOJr8+pKOdZ7qzgizg==", + "version": "1.4.632", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.632.tgz", + "integrity": "sha512-JGmudTwg7yxMYvR/gWbalqqQiyu7WTFv2Xu3vw4cJHXPFxNgAk0oy8UHaer8nLF4lZJa+rNoj6GsrKIVJTV6Tw==", "dev": true }, "node_modules/elliptic": { @@ -12228,13 +12228,13 @@ } }, "node_modules/safe-array-concat": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.0.1.tgz", - "integrity": "sha512-6XbUAseYE2KtOuGueyeobCySj9L4+66Tn6KQMOPQJrAJEowYKW/YR/MGJZl7FdydUdaFu4LYyDZjxf4/Nmo23Q==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.1.0.tgz", + "integrity": "sha512-ZdQ0Jeb9Ofti4hbt5lX3T2JcAamT9hfzYU1MNB+z/jaEbB6wfFfPIR/zEORmZqobkCCJhSjodobH6WHNmJ97dg==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.2.1", + "call-bind": "^1.0.5", + "get-intrinsic": "^1.2.2", "has-symbols": "^1.0.3", "isarray": "^2.0.5" },