diff --git a/.github/workflows/enforce-labels.yml b/.github/workflows/enforce-labels.yml index b3255bda96b..46766daeea7 100644 --- a/.github/workflows/enforce-labels.yml +++ b/.github/workflows/enforce-labels.yml @@ -9,7 +9,7 @@ jobs: steps: - uses: yogevbd/enforce-label-action@2.1.0 with: - REQUIRED_LABELS_ANY: "202306,new,updated,small changes" - REQUIRED_LABELS_ANY_DESCRIPTION: "Select at least one label ['202306','new','updated', 'small changes']" + REQUIRED_LABELS_ANY: "202400,new,updated,small changes" + REQUIRED_LABELS_ANY_DESCRIPTION: "Select at least one label ['202400','new','updated', 'small changes']" BANNED_LABELS: "do not merge" BANNED_LABELS_DESCRIPTION: "You are not allowed to merge PRs with the DO NOT MERGE label" \ No newline at end of file diff --git a/_data/sidebars/marketplace_dev_sidebar.yml b/_data/sidebars/marketplace_dev_sidebar.yml index d19576e8191..6fe2454c42e 100644 --- a/_data/sidebars/marketplace_dev_sidebar.yml +++ b/_data/sidebars/marketplace_dev_sidebar.yml @@ -24,7 +24,6 @@ entries: url: /docs/marketplace/dev/setup/spryker-marketplace-setup.html include_versions: - "202204.0" - - title: Marketplace architecture overview url: /docs/marketplace/dev/architecture-overview/architecture-overview.html nested: @@ -39,7 +38,6 @@ entries: - title: Marketplace in the Back Office url: /docs/marketplace/dev/architecture-overview/marketplace-in-back-office.html - - title: Feature walkthroughs url: /docs/marketplace/dev/feature-walkthroughs/feature-walkthroughs.html nested: @@ -249,7 +247,6 @@ entries: - title: Marketplace Merchant Portal Product Offer Management url: /docs/marketplace/dev/feature-walkthroughs/marketplace-merchant-portal-product-offer-management-feature-walkthrough.html - - title: Feature integration guides url: /docs/marketplace/dev/feature-integration-guides/feature-integration-guides.html include_versions: @@ -650,7 +647,6 @@ entries: url: /docs/marketplace/dev/feature-integration-guides/glue/marketplace-shopping-lists-feature-integration.html include_versions: - "202204.0" - - title: Glue API guides url: /docs/marketplace/dev/glue-api-guides/glue-api-guides.html nested: @@ -867,7 +863,6 @@ entries: - title: Managing shopping list items url: /docs/marketplace/dev/glue-api-guides/shopping-lists/managing-shopping-list-items.html - - title: Data export nested: - title: Data export Merchant Orders .csv files format @@ -1017,7 +1012,6 @@ entries: include_versions: - "202108.0" - "202204.0" - - title: Front-end url: /docs/marketplace/dev/front-end/front-end.html include_versions: @@ -1514,4 +1508,31 @@ entries: include_versions: - "202204.0" - "202212.0" - - "202307.0" \ No newline at end of file + - "202307.0" + - title: Technical enhancement guides + include versions: + - "202204.0" + - "202212.0" + - "202307.0" + nested: + - title: Migration guide - Upgrade to Angular v12 + url: /docs/marketplace/dev/technical-enhancement/migration-guide-upgrade-to-angular-v12.html + include versions: + - "202204.0" + - "202212.0" + - "202307.0" + - title: Migration guide - Upgrade to Angular v15 + url: /docs/marketplace/dev/technical-enhancement/migration-guide-upgrade-to-angular-v15.html + include versions: + - "202307.0" + - title: HowTos + url: /docs/marketplace/dev/howtos/howtos.html + nested: + - title: "HowTo: Create a new Angular module with application" + url: /docs/marketplace/dev/howtos/how-to-create-a-new-angular-module-with-application.html + - title: "How-To: Create a new Gui table column type" + url: /docs/marketplace/dev/howtos/how-to-add-new-guitable-column-type.html + - title: "How-To: Split products by stores" + url: /docs/marketplace/dev/howtos/how-to-split-products-by-stores.html + - title: "How-To: Upgrade Spryker instance to the Marketplace" + url: /docs/marketplace/dev/howtos/how-to-upgrade-spryker-instance-to-marketplace.html \ No newline at end of file diff --git a/_data/sidebars/pbc_all_sidebar.yml b/_data/sidebars/pbc_all_sidebar.yml index eefef2af143..80b23548749 100644 --- a/_data/sidebars/pbc_all_sidebar.yml +++ b/_data/sidebars/pbc_all_sidebar.yml @@ -187,8 +187,16 @@ entries: url: /docs/pbc/all/cart-and-checkout/base-shop/install-and-upgrade/install-features/install-the-cart-feature-dynamic-multistore.html include_versions: - "202307.0" + - title: Cart Notes + url: /docs/pbc/all/cart-and-checkout/base-shop/install-and-upgrade/install-features/install-the-cart-notes-feature.html + include_versions: + - "202307.0" - title: Cart + Non-splittable Products url: /docs/pbc/all/cart-and-checkout/base-shop/install-and-upgrade/install-features/install-the-cart-non-splittable-products-feature.html + - title: Cart + Prices + url: /docs/pbc/all/cart-and-checkout/base-shop/install-and-upgrade/install-features/install-the-cart-prices-feature.html + include_versions: + - "202307.0" - title: Cart + Product url: /docs/pbc/all/cart-and-checkout/base-shop/install-and-upgrade/install-features/install-the-cart-product-feature.html - title: Cart + Product Bundles @@ -472,12 +480,12 @@ entries: url: /docs/pbc/all/content-management-system/base-shop/install-and-upgrade/install-features/install-the-cms-product-lists-catalog-feature.html - title: Content Items url: /docs/pbc/all/content-management-system/base-shop/install-and-upgrade/install-features/install-the-content-items-feature.html + - title: File Manager + url: /docs/pbc/all/content-management-system/base-shop/install-and-upgrade/install-features/install-the-file-manager-feature.html - title: Navigation url: /docs/pbc/all/content-management-system/base-shop/install-and-upgrade/install-features/install-the-navigation-feature.html - title: Product Sets url: /docs/pbc/all/content-management-system/base-shop/install-and-upgrade/install-features/install-the-product-sets-feature.html - include_versions: - - "202212.0" - title: Install Glue API nested: - title: CMS @@ -1004,7 +1012,7 @@ entries: - title: Dynamic Multistore url: /docs/pbc/all/dynamic-multistore/dynamic-multistore.html include_versions: - - "202307.0" + - "202307.0" nested: - title: Base shop nested: @@ -1024,6 +1032,8 @@ entries: url: /docs/pbc/all/dynamic-multistore/base-shop/install-and-upgrade/install-features/install-dynamic-multistore-cms-feature.html - title: Dynamic Multistore + Customer Account Management url: /docs/pbc/all/dynamic-multistore/base-shop/install-and-upgrade/install-features/install-dynamic-multistore-customer-account-management-feature.html + - title: Dynamic Multistore + Prices + url: /docs/pbc/all/dynamic-multistore/base-shop/install-and-upgrade/install-features/install-dynamic-multistore-prices-feature.html - title: Dynamic Multistore + Product url: /docs/pbc/all/dynamic-multistore/base-shop/install-and-upgrade/install-features/install-dynamic-multistore-product-feature.html - title: Install Dynamic Multistore diff --git a/_data/sidebars/scos_dev_sidebar.yml b/_data/sidebars/scos_dev_sidebar.yml index ba53063a38c..2ee461c1994 100644 --- a/_data/sidebars/scos_dev_sidebar.yml +++ b/_data/sidebars/scos_dev_sidebar.yml @@ -986,6 +986,14 @@ entries: - "201907.0" - "202108.0" - "202204.0" + - title: Dynamic data API + include_versions: + - "202307.0" + nested: + - title: How to send a request in Dynamic Data API + url: /docs/scos/dev/glue-api-guides/dynamic-data-api/how-to-guides/how-to-send-request-in-dynamic-data-api.html + - title: How to configure Dynamic Data API endpoints. + url: /docs/scos/dev/glue-api-guides/dynamic-data-api/how-to-guides/how-to-configure-dynamic-data-api.html - title: Feature integration guides url: /docs/scos/dev/feature-integration-guides/feature-integration-guides.html include_versions: @@ -1357,6 +1365,10 @@ entries: url: /docs/scos/dev/feature-integration-guides/glue-api/decoupled-glue-infrastructure/glue-api-documentation-generation.html include_versions: - "202204.0" + - title: Dynamic Data API integration + url: /docs/scos/dev/feature-integration-guides/glue-api/dynamic-data-api/dynamic-data-api-integration.html + include_versions: + - "202307.0" - title: Agent Assist url: /docs/scos/dev/feature-integration-guides/agent-assist-feature-integration.html include_versions: @@ -3962,6 +3974,10 @@ entries: url: /docs/scos/dev/tutorials-and-howtos/howtos/howto-reduce-jenkins-execution-costs-without-refactoring.html - title: "HowTo: Create an Angular module with application" url: /docs/scos/dev/tutorials-and-howtos/howtos/howto-create-an-angular-module-with-application.html + - title: "HowTo: Set up multiple stores" + url: /docs/scos/dev/tutorials-and-howtos/howtos/howto-set-up-multiple-stores.html + - title: "HowTo: Set up stores with multiple locales" + url: /docs/scos/dev/tutorials-and-howtos/howtos/howto-set-up-stores-with-multiple-locales.html - title: "HowTo: Split products by stores" url: /docs/scos/dev/tutorials-and-howtos/howtos/howto-split-products-by-stores.html - title: Technology partner guides @@ -4637,6 +4653,8 @@ entries: url: /docs/scos/dev/guidelines/keeping-a-project-upgradable/upgradability-guidelines/minimum-allowed-shop-version.html - title: Multidimensional array url: /docs/scos/dev/guidelines/keeping-a-project-upgradable/upgradability-guidelines/multidimensional-array.html + - title: Npm checker + url: /docs/scos/dev/guidelines/keeping-a-project-upgradable/upgradability-guidelines/npm-checker.html - title: PHP version url: /docs/scos/dev/guidelines/keeping-a-project-upgradable/upgradability-guidelines/php-version.html - title: Plugin registration with restrictions diff --git a/_scripts/sidebar_checker/sidebar_checker.sh b/_scripts/sidebar_checker/sidebar_checker.sh index afcd81ec060..2bb7c598792 100644 --- a/_scripts/sidebar_checker/sidebar_checker.sh +++ b/_scripts/sidebar_checker/sidebar_checker.sh @@ -10,7 +10,7 @@ SIDEBARS=("_data/sidebars/acp_user_sidebar.yml" "_data/sidebars/cloud_dev_sideba TITLES=("ACP User" "Cloud Dev" "Marketplace Dev" "Marketplace User" "PBC All" "SCOS Dev" "SCOS User" "SCU Dev" "SDK Dev") # Define the folders to ignore -IGNORED_FOLDERS=("201811.0" "201903.0" "201907.0" "202001.0" "202005.0" "202009.0" "202108.0", "202307.0", "202400.0") +IGNORED_FOLDERS=("201811.0" "201903.0" "201907.0" "202001.0" "202005.0" "202009.0" "202108.0", "202204.0", "202212.0", "202400.0") # Define output file path OUTPUT_FILE="_scripts/sidebar_checker/missing-documents.yml" diff --git a/docs/marketplace/dev/technical-enhancement/202212.0/migration-guide-upgrade-to-angular-v12.md b/docs/marketplace/dev/technical-enhancement/202212.0/migration-guide-upgrade-to-angular-v12.md index 067d6ab551a..d0dc341ad2c 100644 --- a/docs/marketplace/dev/technical-enhancement/202212.0/migration-guide-upgrade-to-angular-v12.md +++ b/docs/marketplace/dev/technical-enhancement/202212.0/migration-guide-upgrade-to-angular-v12.md @@ -4,6 +4,7 @@ description: Use the guide to update versions of the Angular and related modules template: module-migration-guide-template redirect_from: - /docs/marketplace/dev/front-end/extending-the-project/migration-guide-upgrade-to-angular-v12.html + - /docs/marketplace/dev/technical-enhancement/202212.0/migration-guide-upgrade-to-angular-v12.html --- ## Upgrading from version 9.* to version 12.* diff --git a/docs/marketplace/dev/technical-enhancement/202212.0/technical-enhancement.md b/docs/marketplace/dev/technical-enhancement/202212.0/technical-enhancement.md deleted file mode 100644 index e79926bf763..00000000000 --- a/docs/marketplace/dev/technical-enhancement/202212.0/technical-enhancement.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -title: Technical enhancement guides -description: Describes how to upgrade to Angluar v12 -last_updated: Jan 12, 2023 -template: concept-topic-template ---- - -This section contains the following article: -* [Migration guide – Upgrade to Angular v12](/docs/marketplace/dev/technical-enhancement/{{page.version}}/migration-guide-upgrade-to-angular-v12.html) diff --git a/docs/marketplace/dev/technical-enhancement/202307.0/migration-guide-upgrade-to-angular-v12.md b/docs/marketplace/dev/technical-enhancement/202307.0/migration-guide-upgrade-to-angular-v12.md index 067d6ab551a..3a89865b913 100644 --- a/docs/marketplace/dev/technical-enhancement/202307.0/migration-guide-upgrade-to-angular-v12.md +++ b/docs/marketplace/dev/technical-enhancement/202307.0/migration-guide-upgrade-to-angular-v12.md @@ -1,9 +1,11 @@ --- title: Migration guide - Upgrade to Angular v12 -description: Use the guide to update versions of the Angular and related modules. +description: Use the guide to update versions of Angular and related modules. template: module-migration-guide-template redirect_from: - /docs/marketplace/dev/front-end/extending-the-project/migration-guide-upgrade-to-angular-v12.html + - /docs/marketplace/dev/technical-enhancement/202212.0/migration-guide-upgrade-to-angular-v12.html + - /docs/marketplace/dev/technical-enhancement/202307.0/migration-guide-upgrade-to-angular-v12.html --- ## Upgrading from version 9.* to version 12.* diff --git a/docs/marketplace/dev/technical-enhancement/202307.0/migration-guide-upgrade-to-angular-v15.md b/docs/marketplace/dev/technical-enhancement/202307.0/migration-guide-upgrade-to-angular-v15.md index c6ad826dfaf..a36380558e9 100644 --- a/docs/marketplace/dev/technical-enhancement/202307.0/migration-guide-upgrade-to-angular-v15.md +++ b/docs/marketplace/dev/technical-enhancement/202307.0/migration-guide-upgrade-to-angular-v15.md @@ -1,6 +1,6 @@ --- title: Migration guide - Upgrade to Angular v15 -description: Use the guide to update versions of the Angular and related modules. +description: Use the guide to update versions of Angular and related modules. last_updated: Mar 24, 2023 template: module-migration-guide-template --- diff --git a/docs/marketplace/dev/technical-enhancement/202307.0/technical-enhancement.md b/docs/marketplace/dev/technical-enhancement/202307.0/technical-enhancement.md deleted file mode 100644 index e79926bf763..00000000000 --- a/docs/marketplace/dev/technical-enhancement/202307.0/technical-enhancement.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -title: Technical enhancement guides -description: Describes how to upgrade to Angluar v12 -last_updated: Jan 12, 2023 -template: concept-topic-template ---- - -This section contains the following article: -* [Migration guide – Upgrade to Angular v12](/docs/marketplace/dev/technical-enhancement/{{page.version}}/migration-guide-upgrade-to-angular-v12.html) diff --git a/docs/pbc/all/miscellaneous/202307.0/third-party-integrations/marketing-and-conversion/analytics/fact-finder/exporting-product-data-for-fact-finder.md b/docs/pbc/all/miscellaneous/202307.0/third-party-integrations/marketing-and-conversion/analytics/fact-finder/exporting-product-data-for-fact-finder.md index c39e14abfe0..22c2c484b7b 100644 --- a/docs/pbc/all/miscellaneous/202307.0/third-party-integrations/marketing-and-conversion/analytics/fact-finder/exporting-product-data-for-fact-finder.md +++ b/docs/pbc/all/miscellaneous/202307.0/third-party-integrations/marketing-and-conversion/analytics/fact-finder/exporting-product-data-for-fact-finder.md @@ -33,7 +33,7 @@ related: - title: Installing and configuring FACT-Finder web components link: docs/scos/dev/technology-partner-guides/page.version/marketing-and-conversion/analytics/fact-finder/installing-and-configuring-fact-finder-web-components.html --- - + ## Output Folder Define an output folder where the CSV files will be generated by adding the following line in your configuration file: diff --git a/docs/pbc/all/product-information-management/202307.0/marketplace/install-and-upgrade/install-features/install-the-marketplace-product-options-feature.md b/docs/pbc/all/product-information-management/202307.0/marketplace/install-and-upgrade/install-features/install-the-marketplace-product-options-feature.md index 02865407084..11365a46eca 100644 --- a/docs/pbc/all/product-information-management/202307.0/marketplace/install-and-upgrade/install-features/install-the-marketplace-product-options-feature.md +++ b/docs/pbc/all/product-information-management/202307.0/marketplace/install-and-upgrade/install-features/install-the-marketplace-product-options-feature.md @@ -6,8 +6,9 @@ template: feature-integration-guide-template redirect_from: - /docs/marketplace/dev/feature-integration-guides/202307.0/marketplace-product-option-feature-integration.html - /docs/marketplace/dev/feature-integration-guides/202307.0/marketplace-product-options-feature-integration.html + - /docs/pbc/all/product-information-management/202307.0/marketplace/marketplace-product-options-feature-integration.html related: - - title: Marketplace Product Options feature walkthrough + - title: Marketplace Product Options feature overview link: docs/pbc/all/product-information-management/page.version/marketplace/marketplace-product-options-feature-overview.html --- diff --git a/docs/pbc/all/product-information-management/202307.0/marketplace/install-and-upgrade/install-features/marketplace-product-options-feature-integration.md b/docs/pbc/all/product-information-management/202307.0/marketplace/install-and-upgrade/install-features/marketplace-product-options-feature-integration.md deleted file mode 100644 index 51a22291a4d..00000000000 --- a/docs/pbc/all/product-information-management/202307.0/marketplace/install-and-upgrade/install-features/marketplace-product-options-feature-integration.md +++ /dev/null @@ -1,398 +0,0 @@ ---- -title: Marketplace Product Options feature integration -last_updated: Jan 16, 2023 -Description: This document describes the process how to integrate the Marketplace Product Options feature into a Spryker project. -template: feature-integration-guide-template -redirect_from: - - /docs/pbc/all/product-information-management/202307.0/marketplace/marketplace-product-options-feature-integration.html -related: - - title: Marketplace Product Options feature walkthrough - link: docs/pbc/all/product-information-management/page.version/marketplace/marketplace-product-options-feature-overview.html ---- - -This document describes how to integrate the [Marketplace Product Options feature](/docs/pbc/all/product-information-management/{{page.version}}/marketplace/marketplace-product-options-feature-overview.html) into a Spryker project. - -## Install feature core - -Follow the steps below to install the Marketplace Product Options feature core. - -### Prerequisites - -Install the required features: - -| NAME | VERSION | INTEGRATION GUIDE | -| --------------- | ------- | ---------- | -| Spryker Core | {{page.version}} | [Spryker Core feature integration](/docs/pbc/all/miscellaneous/{{page.version}}/install-and-upgrade/install-features/install-the-spryker-core-feature.html) | -| Product Options | {{page.version}} | [Product Options feature integration](https://spryker.atlassian.net/wiki/spaces/DOCS/pages/903151851/EMPTY+Product+Options+Feature+Integration+-+ongoing) | -| Marketplace Merchant | {{page.version}} | [Marketplace Merchant feature integration](/docs/pbc/all/merchant-management/{{page.version}}/marketplace/install-and-upgrade/install-features/install-the-marketplace-merchant-feature.html) | - - -### 1) Install the required modules using Composer - -```bash -composer require spryker-feature/marketplace-product-options:"{{page.version}}" --update-with-dependencies -``` - -{% info_block warningBox "Verification" %} - -Make sure the following modules have been installed: - -| MODULE | EXPECTED DIRECTORY | -|-|-| -| MerchantProductOption | vendor/spryker/merchant-product-option | -| MerchantProductOptionDataImport | vendor/spryker/merchant-product-option-data-import | -| MerchantProductOptionGui | vendor/spryker/merchant-product-option-gui | -| MerchantProductOptionStorage | vendor/spryker/merchant-product-option-storage | - -{% endinfo_block %} - - -### 2) Set up the database schema and transfer objects - -1. Adjust the schema definition to guarantee a unique identifier for each option group: - -**src/Pyz/Zed/DataImport/Persistence/Propel/Schema/spy_product_option.schema.xml** - -```xml - - - - - - - - - -
-
- -``` - -2. Apply database changes and to generate entity and transfer changes: - -```bash -console transfer:generate -console propel:install -console transfer:generate -``` - - -{% info_block warningBox "Verification" %} - -Verify that the following changes have been implemented by checking your database: - -| DATABASE ENTITY | TYPE | EVENT | -|-|-|-| -| spy_merchant_product_option_group | table | created | -| spy_product_option_group.key | column | created | - -Make sure that the following changes were applied in transfer objects: - -| TRANSFER | TYPE | EVENT | PATH | -| - | - | - | - | -| MerchantProductOptionGroup | class | created | src/Generated/Shared/Transfer/MerchantProductOptionGroupTransfer | -| MerchantProductOptionGroupCriteria | class | created | src/Generated/Shared/Transfer/MerchantProductOptionGroupCriteriaTransfer | -| MerchantProductOptionGroupCollection | class | created | src/Generated/Shared/Transfer/MerchantProductOptionGroupCollectionTransfer | -| MerchantProductOptionGroupConditions | class | created | src/Generated/Shared/Transfer/MerchantProductOptionGroupConditionsTransfer | -| Pagination | class | created | src/Generated/Shared/Transfer/PaginationTransfer | -| ProductOptionGroup.merchant | attribute | created | src/Generated/Shared/Transfer/ProductOptionGroupTransfer | - -{% endinfo_block %} - -### 3) Add translations - -1. Append glossary according to your configuration: - -**data/import/common/common/glossary.csv** - -```yaml -checkout.item.option.pre.condition.validation.error.exists,"Product option of %name% is not available anymore.",en_US -checkout.item.option.pre.condition.validation.error.exists,"Produktoption von %name% ist nicht mehr verfügbar.",de_DE -``` - -2. Import data: - -```bash -console data:import glossary -``` - -{% info_block warningBox "Verification" %} - -Make sure that the configured data is added to the `spy_glossary_key` and `spy_glossary_translation` tables in the database. - -{% endinfo_block %} - -### 4) Import data - -1. Prepare your data according to your requirements using the demo data: - -**data/import/common/common/marketplace/merchant_product_option_group.csv** - -``` -product_option_group_key,merchant_reference,approval_status,merchant_sku -insurance,MER000001,approved,spr-425453 -``` - -2. Add the `product_option_group_key` column to `product_option.csv`: - -**data/import/common/common/product_option.csv** - -``` -abstract_product_skus,option_group_id,tax_set_name,group_name_translation_key,group_name.en_US,group_name.de_DE,option_name_translation_key,option_name.en_US,option_name.de_DE,sku,product_option_group_key -ilyakubanov marked this conversation as resolved. -"012,013,014,015,016,017,018,019,020,021,022,023,024,025,026,027,028,029,030,031,032,033,034,035,036,037,038,039,040,041,042,043,044,045,046,047,048,049,050,051,052,053,054,055,056,057,058,059,060,061,062,063,064,065,066,067,068,069,070,071,072,073,074,075,076,077,078,079,080,081,082,083,084,085,086,087,088,089,090,091,092,093,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,200,201,202,203,204,205",1,Entertainment Electronics,product.option.group.name.warranty,Warranty,Garantie,product.option.warranty_1,One (1) year limited warranty,Ein (1) Jahr begrenzte Garantie,OP_1_year_warranty,warranty -,1,Entertainment Electronics,product.option.group.name.warranty,Warranty,Garantie,product.option.warranty_2,Two (2) year limited warranty,Zwei (2) Jahre begrenzte Garantie,OP_2_year_warranty,warranty -,1,Entertainment Electronics,product.option.group.name.warranty,Warranty,Garantie,product.option.warranty_3,Three (3) year limited warranty,Drei (3) Jahre begrenzte Garantie,OP_3_year_warranty,warranty -"001,002,003,004,005,006,007,008,009,010,011,012,024,025,026,027,028,029,030,031,032,033,034,035,036,037,038,039,040,041,042,043,044,045,046,047,048,049,050,051,052,053,054,055,056,057,058,059,060,061,062,063,064,065,066,067,068,069,070,083,084,085,086,087,088,089,090,091,092,093,094,095,096,097,098,099,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214",2,Entertainment Electronics,product.option.group.name.insurance,Insurance,Versicherungsschutz,product.option.insurance,Two (2) year insurance coverage,Zwei (2) Jahre Versicherungsschutz,OP_insurance,insurance -"001,002,003,004,005,006,007,008,009,010,018,019,020,021,022,023,024,025,026,027,028,029,030,031,032,033,034,035,036,037,038,039,040,041,042,043,044,045,046,047,048,049,050,051,052,053,054,055,056,057,058,059,060,061,062,063,064,065,066,067,068,069,070,071,084,085,086,087,088,089,090,091,092,093,094,095,096,097,098,099,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210",3,Entertainment Electronics,product.option.group.name.gift_wrapping,Gift wrapping,Geschenkverpackung,product.option.gift_wrapping,Gift wrapping,Geschenkverpackung,OP_gift_wrapping,wrapping -``` - -#### Register data importer - -Add merchant product option group import entities to import configuration for all needed application stores: - -**data/import/local/full_EU.yml** - -```yml -version: 0 - -actions: - - data_entity: merchant-product-option-group - source: data/import/common/common/marketplace/merchant_product_option_group.csv -``` - - -**data/import/local/full_US.yml** - -```yml -version: 0 - -actions: - - data_entity: merchant-product-option-group - source: data/import/common/common/marketplace/merchant_product_option_group.csv -``` - - -2. To enable the data import, register the following plugin: - -| PLUGIN | DESCRIPTION | PREREQUISITES | NAMESPACE | -|-|-|-|-| -| MerchantProductOptionGroupDataImportPlugin | Validates Merchant reference and inserts merchant product option groups into the datanbase. | None | Spryker\Zed\MerchantProductOptionDataImport\Communication\Plugin\DataImport | - -**src/Pyz/Zed/DataImport/DataImportDependencyProvider.php** - -```php -filterByName($dataSet[self::KEY_GROUP_NAME_TRANSLATION_KEY]) - ->filterByKey($dataSet[self::KEY_PRODUCT_OPTION_GROUP_KEY]) - ->findOneOrCreate(); - $productOptionGroupEntity - ->setName($dataSet[static::KEY_OPTION_NAME_TRANSLATION_KEY]) - ->setActive($this->isActive($dataSet, $productOptionGroupEntity)) - ->setFkTaxSet($dataSet[TaxSetNameToIdTaxSetStep::KEY_TARGET]) - ->save(); - ... - } -} -``` - -4. Import data: - -```bash -console data:import merchant-product-option-group -``` - -{% info_block warningBox "Verification" %} - -Make sure that the Merchant Product Option Group data is in the `spy_merchant_product_option_group` table. - -{% endinfo_block %} - -### 5) Set up behavior - -Enable the following behaviors by registering the plugins: - -| PLUGIN | DESCRIPTION | PREREQUISITES | NAMESPACE | -|-|-|-|-| -| MerchantProductOptionListActionViewDataExpanderPlugin | Expands data with the merchant collection. | None | Spryker\Zed\MerchantGui\Communication\Plugin\ProductOptionGui | -| MerchantProductOptionListTableQueryCriteriaExpanderPlugin | Extends `QueryCriteriaTransfer` with the merchant product option group criteria for expanding default query running in `ProductOptionListTable`. | None | Spryker\Zed\MerchantProductOptionGui\Communication\Plugin\ProductOptionGui | -| MerchantProductOptionGroupExpanderPlugin | Expands a product option group data with the related merchant. | None | Spryker\Zed\MerchantProductOption\Communication\Plugin\ProductOption | -| MerchantProductOptionCollectionFilterPlugin | Filters merchant product option group transfers by approval status and excludes the product options with the not approved merchant groups. | None | Spryker\Zed\MerchantProductOptionStorage\Communication\Plugin\ProductOptionStorage | -| MerchantProductOptionGroupWritePublisherPlugin | Retrieves all abstract product IDs using the merchant product option group IDs from the event transfers. | None | Spryker\Zed\MerchantProductOptionStorage\Communication\Plugin\Publisher\MerchantProductOption | -| MerchantProductOptionGroupPublisherTriggerPlugin | Allows publishing or republishing merchant product option group storage data manually. | None | Spryker\Zed\MerchantProductOptionStorage\Communication\Plugin\Publisher | - - -
-src/Pyz/Zed/ProductOption/ProductOptionDependencyProvider.php - -```php - - */ - protected function getProductOptionListActionViewDataExpanderPlugins(): array - { - return [ - new MerchantProductOptionListActionViewDataExpanderPlugin(), - ]; - } - - /** - * @return array<\Spryker\Zed\ProductOptionGuiExtension\Dependency\Plugin\ProductOptionListTableQueryCriteriaExpanderPluginInterface> - */ - protected function getProductOptionListTableQueryCriteriaExpanderPlugins(): array - { - return [ - new MerchantProductOptionListTableQueryCriteriaExpanderPlugin(), - ]; - } - - /** - * @return array<\Spryker\Zed\ProductOptionExtension\Dependency\Plugin\ProductOptionGroupExpanderPluginInterface> - */ - protected function getProductOptionGroupExpanderPlugins(): array - { - return [ - new MerchantProductOptionGroupExpanderPlugin(), - ]; - } -} -``` -
- -**src/Pyz/Zed/ProductOptionStorage/ProductOptionStorageDependencyProvider.php** - -```php - - */ - protected function getProductOptionCollectionFilterPlugins(): array - { - return [ - new MerchantProductOptionCollectionFilterPlugin(), - ]; - } -} -``` - -
-src/Pyz/Zed/Publisher/PublisherDependencyProvider.php - -```php -getMerchantProductOptionStoragePlugins(), - ]; - } - - /** - * @return array<\Spryker\Zed\PublisherExtension\Dependency\Plugin\PublisherPluginInterface> - */ - protected function getMerchantProductOptionStoragePlugins(): array - { - return [ - new MerchantProductOptionGroupWritePublisherPlugin(), - ]; - } - - /** - * @return array<\Spryker\Zed\PublisherExtension\Dependency\Plugin\PublisherTriggerPluginInterface> - */ - protected function getPublisherTriggerPlugins(): array - { - return [ - new MerchantProductOptionGroupPublisherTriggerPlugin(), - ]; - } -} -``` -
- -{% info_block warningBox "Verification" %} - -Make sure the following is true: -* Merchants can create product option groups and values in the Merchant Portal. -* Merchant product option information is shown on a product details page when it is approved and active. -* Merchant product option information is displayed in the cart, checkout, and user account. -* Merchant product options are a part of the marketplace or merchant order, and all totals are calculated correctly. - -{% endinfo_block %} - -## Related features - -| FEATURE | REQUIRED FOR THE CURRENT FEATURE | INTEGRATION GUIDE | -| -------------- | -------------------------------- | ----------------- | -| Marketplace Product Options + Cart | | [Marketplace Product Options + Cart feature integration](/docs/marketplace/dev/feature-integration-guides/{{page.version}}/marketplace-product-option-cart-feature-integration.html) | -| Marketplace Product Options + Checkout | | [Marketplace Product Options + Checkout feature integration](/docs/marketplace/dev/feature-integration-guides/{{page.version}}/marketplace-product-option-checkout-feature-integration.html) | diff --git a/docs/scos/dev/glue-api-guides/202304.0/dynamic-data-api/how-to-guides/how-to-configure-dynamic-data-api.md b/docs/scos/dev/glue-api-guides/202304.0/dynamic-data-api/how-to-guides/how-to-configure-dynamic-data-api.md deleted file mode 100644 index 8b751ea3069..00000000000 --- a/docs/scos/dev/glue-api-guides/202304.0/dynamic-data-api/how-to-guides/how-to-configure-dynamic-data-api.md +++ /dev/null @@ -1,118 +0,0 @@ ---- -title: How to configure Dynamic Data API endpoints. -description: This guide shows how to configure the Dynamic Data API endpoints. -last_updated: June 23, 2023 -template: howto-guide-template ---- - -This guide shows how to configure the Dynamic Data API endpoints. - -In order to incorporate a new endpoint for interacting with entities in the database, -it is necessary to add a corresponding row to the `spy_dynamic_entity_configuration` table. - -The `spy_dynamic_entity_configuration` table represents the configuration for dynamic entity endpoints in the system. It has the following columns: - -| COLUMN | SPECIFICATION | -| --- | --- | -| id_dynamic_entity_configuration | The unique ID for the configuration. | -| table_alias | An alias used in the request URL to refer to the endpoint. | -| table_name | The name of the corresponding table in the database to operate on. | -| is_active | Indicates whether the endpoint is enabled or disabled. | -| definition | A JSON-formatted string containing the configuration details for each field in the table. | -| created_at | Represents the date and time when the configuration was created. | -| updated_at | Represents the date and time when the configuration was last updated. | - -{% info_block infoBox %} - -Currently, the process entails manually executing SQL queries as there is no existing user interface (UI) feature in Spryker for it. -However, future releases are expected to introduce an UI solution for adding new rows to the `spy_dynamic_entity_configuration` table. - -{% endinfo_block %} - -Let's dive deeper into the configuration of the `spy_dynamic_entity_definition.definition` field. - -Below is an example snippet illustrating the structure of a possible definition value based on `spy_country` table: - -```json -{ - "identifier": "id_country", - "fields": [ - { - "fieldName": "id_country", - "fieldVisibleName": "id_country", - "isEditable": false, - "isCreatable": false, - "type": "integer", - "validation": { - "isRequired": false - } - }, - { - "fieldName": "iso2_code", - "fieldVisibleName": "iso2_code", - "type": "string", - "isEditable": true, - "isCreatable": true, - "validation": { - "isRequired": true, - "maxLength": 2, - "minLength": 2 - } - } - ] -} -``` - -And now, let's delve into the meaning of each field within the snippet. Here's a breakdown of the purpose of each field: - -| FIELD | SPECIFICATION | -| --- | --- | -| identifier | The name of the column in the table that serves as an identifier. It can be any chosen column from the table, typically used as a unique ID for each record. | -| fields | An array containing the descriptions of the columns from the table. It allows customization of which columns are included for interaction. By specifying the desired columns in the "fields" array, the API will only expose and operate on those specific columns. Any columns not included in the array will be inaccessible through API requests. | -| fieldName | The actual name of the column in the database table. | -| fieldVisibleName | The name used for interacting with the field through API requests. It provides a more user-friendly and descriptive name compared to the physical column name. | -| type | The data type of the field. It specifies the expected data format for the field, enabling proper validation and handling of values during API interactions. | -| isEditable | A flag indicating whether the field can be modified. When set to "true," the field is editable, allowing updates to its value. | -| isCreatable | A flag indicating whether the field can be set. If set to "true," the field can be included in requests to provide an initial value during record creation. | -| validation | Contains validation configurations. Proper validation ensures that the provided data meets the specified criteria. | -| required | A validation attribute that determines whether the field is required or optional. When set to "true," the field must be provided in API requests. | -| maxLength/minLength | An optional validation attribute that specifies the minimum/maximum length allowed for the field defined with a string type. It enforces a lower boundary, ensuring that the field's value meets or exceeds the defined minimum requirement. | -| max/min | An optional validation attribute that specifies the minimum/maximum value allowed for the field defined with an integer type. It enforces a lower boundary, ensuring that the field's value meets or exceeds the defined minimum requirement. | - -{% info_block infoBox %} - -It is recommended to set `isEditable` and `isCreatable` to `false` for fields that serve as identifiers or keys, ensuring their immutability and preserving the integrity of the data model. - -{% endinfo_block %} - -{% info_block infoBox %} - -When configuring the definition for the field responsible for the numerable values, keep in mind that an integer data type is a non-decimal number -between -2147483648 and 2147483647 in 32-bit systems, and between -9223372036854775808 and 9223372036854775807 in 64-bit systems. -However, if there is a need to use values outside this range or if the person providing the configuration anticipates -larger values, the field can be set as a string type instead. - -{% endinfo_block %} - -{% info_block infoBox %} - -So far the Dynamic Data API supports the following types for the configured fields: boolean, integer, string and decimal. - -{% endinfo_block %} - -Let's say you want to have a new endpoint `/dynamic-data/country` to operate with data in `spy_country` table in database. - -Based on the provided information, the SQL transaction for interacting with the `spy_country` table through the API request via `dynamic-entity/country` would be as follows: - -```sql -BEGIN; -INSERT INTO `spy_dynamic_entity_configuration` VALUES ('country', 'spy_country', 1, '{\"identifier\":\"id_country\",\"fields\":[{\"fieldName\":\"id_country\",\"fieldVisibleName\":\"id_country\",\"isEditable\":false,\"isCreatable\":false,\"type\":\"integer\",\"validation\":{\"isRequired\":false}},{\"fieldName\":\"iso2_code\",\"fieldVisibleName\":\"iso2_code\",\"type\":\"string\",\"isEditable\":true,\"isCreatable\":true,\"validation\":{\"isRequired\":true,\"maxLength\":2,\"minLength\":2}},{\"fieldName\":\"iso3_code\",\"fieldVisibleName\":\"iso3_code\",\"type\":\"string\",\"isEditable\":true,\"isCreatable\":true,\"validation\":{\"isRequired\":true,\"maxLength\":3,\"minLength\":3}},{\"fieldName\":\"name\",\"fieldVisibleName\":\"name\",\"type\":\"string\",\"isEditable\":true,\"isCreatable\":true,\"validation\":{\"isRequired\":true,\"maxLength\":255,\"minLength\":1}},{\"fieldName\":\"postal_code_mandatory\",\"fieldVisibleName\":\"postal_code_mandatory\",\"type\":\"boolean\",\"isEditable\":true,\"isCreatable\":true,\"validation\":{\"isRequired\":false}},{\"fieldName\":\"postal_code_regex\",\"isEditable\":\"false\",\"isCreatable\":\"false\",\"fieldVisibleName\":\"postal_code_regex\",\"type\":\"string\",\"validation\":{\"isRequired\":false,\"maxLength\":500,\"minLength\":1}}]}'); -COMMIT; -``` - -{% info_block warningBox "Verification" %} - -If everything is set up correctly, you can follow [How to send request in Dynamic Data API](/docs/scos/dev/glue-api-guides/{{page.version}}/dynamic-data-api/how-to-guides/how-to-send-request-in-dynamic-data-api.html) to discover how to request your API endpoint. -Or if you're in the middle of the integration process for the Dynamic Data API follow [Dynamic Data API integration](/docs/scos/dev/feature-integration-guides/{{page.version}}/glue-api/dynamic-data-api-integration.html) to proceed with it. - -{% endinfo_block %} diff --git a/docs/scos/dev/glue-api-guides/202304.0/dynamic-data-api/how-to-guides/how-to-send-request-in-dynamic-data-api.md b/docs/scos/dev/glue-api-guides/202304.0/dynamic-data-api/how-to-guides/how-to-send-request-in-dynamic-data-api.md deleted file mode 100644 index 13bc30f9000..00000000000 --- a/docs/scos/dev/glue-api-guides/202304.0/dynamic-data-api/how-to-guides/how-to-send-request-in-dynamic-data-api.md +++ /dev/null @@ -1,473 +0,0 @@ ---- -title: How send a request in Dynamic Data API -description: This guide shows how to send a request in Dynamic Data API. -last_updated: June 23, 2023 -template: howto-guide-template ---- - -This guide shows how to send a request in Dynamic Data API. - -{% info_block infoBox %} - -Ensure the Dynamic Data API is integrated (follow [Dynamic Data API integration](/docs/scos/dev/feature-integration-guides/{{page.version}}/glue-api/dynamic-data-api-integration.html)) -and configured (follow [How to configure Dynamic Data API](/docs/scos/dev/glue-api-guides/{{page.version}}/dynamic-data-api/how-to-guides/how-to-configure-dynamic-data-api.html)) -as described in the guides. - -{% endinfo_block %} - -Let's say you have an endpoint `/dynamic-data/country` to operate with data in `spy_country` table in database. - -The Dynamic Data API is a non-resource-based API and routes directly to a controller all specified endpoints. - -By default, all routes within the Dynamic Data API are protected to ensure data security. -To access the API, you need to obtain an access token by sending a POST request to the `/token/` endpoint with the appropriate credentials: - -```bash -POST /token/ HTTP/1.1 -Host: glue-backend.mysprykershop.com -Content-Type: application/x-www-form-urlencoded -Accept: application/json -Content-Length: 67 - -grant_type=password&username={username}&password={password} -``` - -### Sending a `GET` request - -To retrieve a collection of countries, a `GET` request should be sent to the `/dynamic-entity/country` endpoint. -This request needs to include the necessary headers, such as Content-Type, Accept, and Authorization, with the access token provided. - -The response body will contain all the columns from the `spy_country` table that have been configured in the `spy_dynamic_entity_definition.definition`. -Each column will be represented using the `fieldVisibleName` as the key, providing a comprehensive view of the table's data in the API response. - -Pagination allows for efficient data retrieval by specifying the desired range of results. -To implement pagination, include the desired page limit and offset in the request: - -```bash -GET /dynamic-entity/country?page[offset]=1&page[limit]=2 HTTP/1.1 -Host: glue-backend.mysprykershop.com -Content-Type: application/json -Accept: application/json -Authorization: Bearer {your_token} -``` - -{% info_block warningBox "Verification" %} - -If everything is set up correctly you will get the following response: - -```json -[ - { - "id_country": 2, - "iso2_code": "AD", - "iso3_code": "AND", - "name": "Andorra", - "postal_code_mandatory": true, - "postal_code_regex": "AD\\d{3}" - }, - { - "id_country": 3, - "iso2_code": "AE", - "iso3_code": "ARE", - "name": "United Arab Emirates", - "postal_code_mandatory": false, - "postal_code_regex": null - } -] -``` - -{% endinfo_block %} - -{% info_block infoBox %} - -Note, by default the API `GET` request returns up to 20 records. - -{% endinfo_block %} - -Filtering enables targeted data retrieval, refining the response to match the specified criteria. -To apply filtering to the results based on specific fields, include the appropriate filter parameter in the request: - -```bash -GET /dynamic-entity/country?filter[country.iso2_code]=AA HTTP/1.1 -Host: glue-backend.mysprykershop.com -Content-Type: application/json -Accept: application/json -Authorization: Bearer {your_token} -``` - -{% info_block warningBox "Verification" %} - -If everything is set up correctly you will get the following response: - -```json -[ - { - "id_country": 1, - "iso2_code": "AA", - "iso3_code": "UUD", - "name": "Create", - "postal_code_mandatory": false, - "postal_code_regex": null - } -] -``` - -{% endinfo_block %} - -{% info_block infoBox %} - -Note, so far when you combine multiple filters in a single request, the system applies an "AND" condition to the retrieved results. - -{% endinfo_block %} - -To retrieve a country by a specific ID, you can send a `GET` request with the following parameters: - -```bash -GET /dynamic-entity/country/3 HTTP/1.1 -Host: glue-backend.mysprykershop.com -Content-Type: application/json -Accept: application/json -Authorization: Bearer {your_token} -``` -{% info_block warningBox "Verification" %} - -If everything is set up correctly you will get the following response: - -```json -[ - { - "id_country": 3, - "iso2_code": "AE", - "iso3_code": "ARE", - "name": "United Arab Emirates", - "postal_code_mandatory": false, - "postal_code_regex": null - } -] -``` - -{% endinfo_block %} - -{% info_block infoBox %} - -Note if a current endpoint is not configured in `spy_dynamic_entity_configuration` and it's not found you'll get the following response: - -```json -[ - { - "message": "Not found", - "status": 404, - "code": "007" - } -] -``` - -{% endinfo_block %} - -### Sending `POST` request - -To create a collection of countries, submit the following HTTP request: - -```bash -POST /dynamic-entity/country HTTP/1.1 -Host: glue-backend.mysprykershop.com -Content-Type: application/json -Accept: application/json -Authorization: Bearer {your_token} -Content-Length: 154 - -{ - "data": [ - { - "iso2_code": "WA", - "iso3_code": "WWA", - "name": "FOO" - } - ] -} -``` - -{% info_block warningBox "Verification" %} - -If everything is set up correctly you will get the following response: - -```json -[ - { - "iso2_code": "WA", - "iso3_code": "WWA", - "name": "FOO", - "id_country": 257 - } -] -``` - -The response payload includes all the specified fields from the request body, along with the ID of the newly created entity. - -{% endinfo_block %} - -{% info_block infoBox %} - -Note that all fields included in the request payload are marked as `isCreatable: true` in the configuration. -Therefore, the API will create a new record with all the provided fields. -However, if any of the provided fields are configured as `isCreatable: false` it will result in an error. - -Let's configure `isCreatable: false` for `iso3_code` and send the same request. -You will receive the following error response because a non-creatable field `iso3_code` is provided: - -```json -[ - { - "message": "Modification of immutable field `iso3_code` is prohibited.", - "status": 400, - "code": "1304" - } -] -``` - -{% endinfo_block %} - -{% info_block infoBox %} - -It is important to consider that certain database-specific configurations may result in issues independent of entity configurations. - -For instance, in the case of MariaDB, it is not possible to set the ID value for an auto-incremented field. -Additionally, for the `iso2_code` field in the `spy_country` table, it must have a unique value. -Therefore, before creating a new record, it is necessary to verify that you do not pass a duplicated value for this field. -Otherwise, you will receive the following response: - -```json -[ - { - "message": "Failed to persist the data. Please verify the provided data and try again. Entry is duplicated.", - "status": 400, - "code": "1309" - } -] -``` - -This response is caused by a caught Propel exception, specifically an integrity constraint violation `(Integrity constraint violation: 1062 Duplicate entry 'WA' for key 'spy_country-iso2_code')`. - -{% endinfo_block %} - -### Sending `PATCH` request - -To update a collection of countries, submit the following HTTP request: - -```bash -PATCH /dynamic-entity/country HTTP/1.1 -Host: glue-backend.mysprykershop.com -Content-Type: application/json -Accept: application/json -Authorization: Bearer {your_token} -Content-Length: 174 -{ - "data": [ - { - "id_country": 1, - "iso2_code": "WB", - "iso3_code": "WWB", - "name": "FOO" - } - ] -} -``` - -{% info_block warningBox "Verification" %} - -If everything is set up correctly you will get the following response: - -```json -[ - { - "iso2_code": "WB", - "iso3_code": "WWB", - "name": "FOO", - "id_country": 1 - } -] -``` - -The response payload includes all the specified fields from the request body. - -{% endinfo_block %} - -{% info_block infoBox %} - -It is also possible to send a `PATCH` request for a specific ID instead of a collection, use the following request: - -```bash -PATCH /dynamic-entity/country/1 HTTP/1.1 -Host: glue-backend.mysprykershop.com -Content-Type: application/json -Accept: application/json -Authorization: Bearer {your_token} -Content-Length: 143 -{ - "data": { - "iso2_code": "WB", - "iso3_code": "WWB", - "name": "FOO" - } -} -``` - -{% endinfo_block %} - -{% info_block infoBox %} - -Note that all fields included in the request payload are marked as `isEditable: true` in the configuration. -Therefore, the API will update the found record with all the provided fields. -However, if any of the provided fields are configured as `isEditable: false` it will result in an error. - -Let's configure `isEditable: false` for `iso3_code` and send the same request. - -You will receive the following error response because a non-editable field `iso3_code` is provided: - -```json -[ - { - "message": "Modification of immutable field `iso3_code` is prohibited.", - "status": 400, - "code": "1304" - } -] -``` - -{% endinfo_block %} - -{% info_block infoBox %} - -If `id_country` is not provided you will get the following response: - -```json -[ - { - "message": "Incomplete Request - missing identifier.", - "status": 400, - "code": "1310" - } -] -``` - -If `id_country` is not found you will get the following response: - -```json -[ - { - "message": "The entity could not be found in the database.", - "status": 404, - "code": "1303" - } -] -``` - -{% endinfo_block %} - -{% info_block infoBox %} - -Similarly to the `POST` request, it is important to consider database-specific configurations when sending a `PATCH` request. - -{% endinfo_block %} - -### Sending `PUT` request - -When you send a PUT request, you provide the updated representation of the resource in the request -payload. The server then replaces the entire existing resource with the new representation provided. If the resource does not exist at the specified URL, a PUT request can also create a new resource. - -Let's send the following `PUT` request to update the existing entity: - -```bash -PUT /dynamic-entity/country HTTP/1.1 -Host: glue-backend.mysprykershop.com -Content-Type: application/json -Accept: application/json -Authorization: Bearer {your_token} -Content-Length: 263 -{ - "data": [ - { - "id_country": 1, - "iso2_code": "WB", - "iso3_code": "WWB", - "name": "FOO" - } - ] -} -``` - -{% info_block warningBox "Verification" %} - -If everything is set up correctly you will get the following response: - -```json -[ - { - "iso2_code": "WB", - "iso3_code": "WWB", - "name": "FOO", - "postal_code_mandatory": null, - "postal_code_regex": null, - "id_country": 1 - } -] -``` - -The response payload includes all touched fields for the provided resource. - -{% endinfo_block %} - -{% info_block infoBox %} - -It is also possible to send a `PUT` request for a specific ID instead of a collection using the following request: - -```bash -PUT /dynamic-entity/country/1 HTTP/1.1 -Host: glue-backend.mysprykershop.com -Content-Type: application/json -Accept: application/json -Authorization: Bearer {your_token} -Content-Length: 143 -{ - "data": { - "iso2_code": "WB", - "iso3_code": "WWB", - "name": "FOO" - } -} -``` - -{% endinfo_block %} - -{% info_block infoBox %} - -When using `PUT` requests, it's important to consider that the same rules and configurations apply -as with `PATCH` and `POST` requests. This means that the `isEditable` attribute determines whether existing -items can be modified during a `PUT` request. Additionally, the `isCreatable` attribute is used for non-existing -items that are created automatically according to the `PUT` request RFC. - -In technical terms, the `PUT` request follows the same guidelines as `PATCH` and `POST` requests in relation to -the definition and database-specific configurations. The `isEditable` attribute governs the update capability -of existing items during a `PUT` request, ensuring that only editable fields can be modified. Similarly, the `isCreatable` -attribute pertains to non-existing items and governs their automatic creation as part of the `PUT` request process, -adhering to the standards outlined in the `PUT` request RFC. It's crucial to adhere to these rules and configurations -to ensure accurate and consistent data manipulation during `PUT` operations. - -{% endinfo_block %} - -#### Error codes - -Bellow you can find a list of error codes that you can receive when sending `GET`, `POST`, `PATCH` or `PUT` requests. - -| Error code | Message | Description | -| --- | --- | --- | -| 1301 | Invalid or missing data format. Please ensure that the data is provided in the correct format. Example request body: `{'data':[{...},{...},..]}` | The request body is not valid. Please review the data format for validity. Ensure that the data is provided in the correct format. An example request body would be: `{'data':[{...data entity...},{...data entity...},...]}`. `data` If the data format is invalid or missing, an error message will be displayed. | -| 1302 | Failed to persist the data. Please verify the provided data and try again. | The data could not be persisted in the database. Please verify the provided data entities and try again. | -| 1303 | The entity could not be found in the database. | The requested entity could not be found in the database for retrieval or update. | -| 1304 | Modification of immutable field `field` is prohibited. | The field is prohibited from being modified. Please check the configuration for this field. | -| 1305 | Invalid data type for field: `field` | The specified field has an incorrect type. Please check the configuration for this field and correct the value. | -| 1306 | Invalid data value for field: `field`, row number: `row`. Field rules: `validation rules`. | The error indicates a data row and a field that does not comply with the validation rules in the configuration. Here is an example of the error: `Invalid data value for field: id, row number: 2. Field rules: min: 0, max: 127`. | -| 1307 | The required field must not be empty. Field: `field` | The specified field is required according to the configuration. The field was not provided. Please check the data you are sending and try again. | -| 1308 | Entity not found by identifier, and new identifier can not be persisted. Please update the request. | The entity could not be found using the provided identifier, and a new identifier cannot be persisted. Please update your request accordingly or check configuration for identifier field. | -| 1309 | Failed to persist the data. Please verify the provided data and try again. Entry is duplicated. | Failed to persist the data. Please verify the provided data and try again. This error may occur if a record with the same information already exists in the database. | -| 1310 | Incomplete Request - missing identifier. | The request is incomplete. The identifier is missing. Please check the request and try again. | \ No newline at end of file diff --git a/docs/scos/dev/glue-api-guides/202307.0/dynamic-data-api/how-to-guides/how-to-send-request-in-dynamic-data-api.md b/docs/scos/dev/glue-api-guides/202307.0/dynamic-data-api/how-to-guides/how-to-send-request-in-dynamic-data-api.md index e90d6c6477d..0bc0e5d813b 100644 --- a/docs/scos/dev/glue-api-guides/202307.0/dynamic-data-api/how-to-guides/how-to-send-request-in-dynamic-data-api.md +++ b/docs/scos/dev/glue-api-guides/202307.0/dynamic-data-api/how-to-guides/how-to-send-request-in-dynamic-data-api.md @@ -1,5 +1,5 @@ --- -title: How send a request in Dynamic Data API +title: How to send a request in Dynamic Data API description: This guide shows how to send a request in Dynamic Data API. last_updated: June 23, 2023 template: howto-guide-template diff --git a/docs/scos/dev/tutorials-and-howtos/howtos/howto-set-up-multiple-stores.md b/docs/scos/dev/tutorials-and-howtos/howtos/howto-set-up-multiple-stores.md index bc12b1333f0..25f2b23bf49 100644 --- a/docs/scos/dev/tutorials-and-howtos/howtos/howto-set-up-multiple-stores.md +++ b/docs/scos/dev/tutorials-and-howtos/howtos/howto-set-up-multiple-stores.md @@ -1,5 +1,5 @@ --- -title: Set up multiple stores +title: "HowTo: Set up multiple stores" description: Learn how to set up multiple stores for your project. last_updated: Dec 22, 2022 template: howto-guide-template diff --git a/docs/scos/dev/tutorials-and-howtos/howtos/howto-set-up-stores-with-multiple-locales.md b/docs/scos/dev/tutorials-and-howtos/howtos/howto-set-up-stores-with-multiple-locales.md index 1f17bd5c840..be599133db2 100644 --- a/docs/scos/dev/tutorials-and-howtos/howtos/howto-set-up-stores-with-multiple-locales.md +++ b/docs/scos/dev/tutorials-and-howtos/howtos/howto-set-up-stores-with-multiple-locales.md @@ -1,5 +1,5 @@ --- -title: Set up stores with multiple locales +title: "HowTo: Set up stores with multiple locales" description: Use the guide to configure different locales for your store. last_updated: Jun 16, 2021 template: howto-guide-template