From df57164fa8f6bdedcd73dfab29cf076695048f86 Mon Sep 17 00:00:00 2001 From: Andrii Tserkovnyi Date: Mon, 11 Sep 2023 11:33:11 +0300 Subject: [PATCH] remove --- _config.yml | 1 - _data/sidebars/scos_user_sidebar.yml | 6 - .../data-export-orders-.csv-files-format.md | 161 -- .../dev/data-export/202005.0/data-export.md | 280 --- .../202005.0/creating-a-data-importer.md | 433 ---- .../about-data-import-categories.md | 22 - .../catalog-setup/catalog-setup.md | 49 - .../catalog-setup/categories/categories.md | 22 - .../file-details-category-template.csv.md | 33 - .../categories/file-details-category.csv.md | 56 - ...file-details-product-price-schedule.csv.md | 43 - .../pricing/file-details-product-price.csv.md | 43 - .../catalog-setup/pricing/pricing.md | 26 - ...file-details-product-abstract-store.csv.md | 37 - .../file-details-product-abstract.csv.md | 65 - .../file-details-product-attribute-key.csv.md | 32 - .../file-details-product-concrete.csv.md | 52 - .../file-details-product-image.csv.md | 44 - ...etails-product-management-attribute.csv.md | 44 - .../catalog-setup/products/products.md | 31 - .../stocks/file-details-product-stock.csv.md | 44 - .../catalog-setup/stocks/stocks.md | 19 - .../commerce-setup/commerce-setup.md | 30 - .../file-details-currency.csv.md | 40 - .../file-details-customer.csv.md | 42 - .../file-details-glossary.csv.md | 35 - .../file-details-payment-method-store.csv.md | 35 - .../file-details-payment-method.csv.md | 35 - .../file-details-sales-order-threshold.csv.md | 40 - .../file-details-shipment-method-store.csv.md | 36 - .../file-details-shipment-price.csv.md | 45 - .../file-details-shipment.csv.md | 35 - .../commerce-setup/file-details-tax.csv.md | 36 - .../file-details-warehouse-store.csv.md | 40 - .../file-details-warehouse.csv.md | 42 - .../content-management/content-management.md | 53 - ...-details-cms-block-category-postion.csv.md | 33 - .../file-details-cms-block-category.csv.md | 36 - .../file-details-cms-block-store.csv.md | 35 - .../file-details-cms-block.csv.md | 41 - .../file-details-cms-page-store.csv.md | 36 - .../file-details-cms-page.csv.md | 45 - .../file-details-cms-slot-block.csv.md | 44 - .../file-details-cms-slot-template.csv.md | 34 - .../file-details-cms-slot.csv.md | 38 - .../file-details-cms-template.csv.md | 33 - .../file-details-content-banner.csv.md | 47 - .../file-details-content-navigation.csv.md | 55 - ...tails-content-product-abstract-list.csv.md | 39 - .../file-details-content-product-set.csv.md | 38 - .../discounts/discounts.md | 28 - .../file-details-discount-amount.csv.md | 38 - .../file-details-discount-store.csv.md | 35 - .../file-details-discount-voucher.csv.md | 50 - .../discounts/file-details-discount.csv.md | 48 - .../merchandising-setup.md | 41 - .../file-details-product-alternative.csv.md | 42 - .../file-details-product-discontinued.csv.md | 35 - .../file-details-product-group.csv.md | 35 - .../file-details-product-label.csv.md | 43 - .../file-details-product-quantity.csv.md | 36 - .../file-details-product-relation.csv.md | 38 - .../file-details-product-review.csv.md | 41 - ...etails-product-search-attribute-map.csv.md | 37 - ...le-details-product-search-attribute.csv.md | 40 - .../file-details-product-set.csv.md | 47 - .../product-merchandising.md | 38 - .../miscellaneous/file-details-comment.csv.md | 37 - .../file-details-mime-type.csv.md | 39 - .../miscellaneous/miscellaneous.md | 20 - .../file-details-navigation-node.csv.md | 44 - .../file-details-navigation.csv.md | 35 - .../navigation-setup/navigation-setup.md | 20 - ...ls-gift-card-abstract-configuration.csv.md | 35 - ...ls-gift-card-concrete-configuration.csv.md | 34 - .../gift-cards/gift-cards.md | 23 - .../file-details-product-option-price.csv.md | 37 - .../file-details-product-option.csv.md | 41 - .../product-options/product-options.md | 23 - .../special-product-types-import-category.md | 23 - .../special-product-types.md | 28 - .../data-importer-speed-optimization.md | 198 -- ...a-importers-overview-and-implementation.md | 308 --- ...on-order-of-data-importers-in-demo-shop.md | 165 -- .../importing-demo-shop-data.md | 21 - ...mporting-data-with-a-configuration-file.md | 116 - ...rting-data-with-the-queue-data-importer.md | 402 ---- .../agent-assist-feature-integration.md | 294 --- ...scontinued-products-feature-integration.md | 80 - ...lternative-products-feature-integration.md | 545 ----- ...nventory-management-feature-integration.md | 78 - ...ducts-product-label-feature-integration.md | 143 -- ...e-products-wishlist-feature-integration.md | 77 - .../approval-process-feature-integration.md | 626 ----- ...-stock-notification-feature-integration.md | 403 ---- .../202005.0/cart-integration.md | 824 ------- ...splittable-products-feature-integration.md | 59 - .../category-filters-feature-integration.md | 210 -- .../category-image-feature-integration.md | 413 ---- ...t-quotation-process-feature-integration.md | 129 - .../checkout-workflow-integration-guide.md | 48 - .../cms-block-widget-feature-integration.md | 104 - .../cms-catalog-feature-integration.md | 382 --- .../202005.0/cms-feature-integration.md | 1839 -------------- ...oduct-lists-catalog-feature-integration.md | 77 - .../202005.0/comments-feature-integration.md | 311 --- ...ts-order-management-feature-integration.md | 140 -- ...nts-persistent-cart-feature-integration.md | 99 - .../company-account-feature-integration.md | 654 ----- ...nt-order-management-feature-integration.md | 377 --- ...configurable-bundle-feature-integration.md | 1310 ---------- .../content-items-feature-integration.md | 614 ----- ...tom-order-reference-feature-integration.md | 282 --- .../customer-access-feature-integration.md | 349 --- ...-account-management-feature-integration.md | 210 -- ...nt-order-management-feature-integration.md | 91 - .../discount-promotion-feature-integration.md | 395 --- .../202005.0/enabling-gift-cards.md | 64 - .../202005.0/enabling-the-content-widget.md | 253 -- .../202005.0/feature-integration-guides.md | 18 - .../gift-cards-feature-integration.md | 1225 ---------- ...lternative-products-feature-integration.md | 88 - .../glue-api-cart-feature-integration.md | 338 --- .../glue-api-catalog-feature-integration.md | 147 -- ...category-management-feature-integration.md | 99 - .../glue-api-checkout-feature-integration.md | 515 ---- ...api-company-account-feature-integration.md | 702 ------ ...e-api-content-items-feature-integration.md | 106 - ...api-customer-access-feature-integration.md | 212 -- ...-account-management-feature-integration.md | 671 ------ ...pi-glue-application-feature-integration.md | 414 ---- ...glue-api-installation-and-configuration.md | 722 ------ ...i-measurement-units-feature-integration.md | 702 ------ ...glue-api-navigation-feature-integration.md | 449 ---- ...pi-order-management-feature-integration.md | 322 --- .../glue-api-payments-feature-integration.md | 285 --- ...roduct-availability-feature-integration.md | 136 -- .../glue-api-product-feature-integration.md | 413 ---- ...-product-image-sets-feature-integration.md | 129 - ...-api-product-labels-feature-integration.md | 127 - ...api-product-options-feature-integration.md | 244 -- ...e-api-product-price-feature-integration.md | 138 -- ...-rating-and-reviews-feature-integration.md | 592 ----- ...i-product-relations-feature-integration.md | 96 - ...tions-and-discounts-feature-integration.md | 1028 -------- ...t-schema-validation-feature-integration.md | 213 -- .../glue-api-shipment-feature-integration.md | 273 --- ...-api-shopping-lists-feature-integration.md | 342 --- ...ue-api-spryker-core-feature-integration.md | 478 ---- .../glue-api-wishlist-feature-integration.md | 180 -- .../installing-the-category-cms-blocks.md | 353 --- .../installing-the-product-cms-block.md | 187 -- ...nventory-management-feature-integration.md | 246 -- .../measurement-units-feature-integration.md | 862 ------- ...chant-b2b-contracts-feature-integration.md | 168 -- ...chant-custom-prices-feature-integration.md | 469 ---- ...roduct-restrictions-feature-integration.md | 336 --- ...-merchant-relations-feature-integration.md | 71 - ...minimum-order-value-feature-integration.md | 637 ----- ...lti-store-cms-block-feature-integration.md | 54 - ...ulti-store-products-feature-integration.md | 62 - .../multiple-carts-feature-integration.md | 616 ----- ...e-carts-quick-order-feature-integration.md | 113 - ...tiple-carts-reorder-feature-integration.md | 57 - .../202005.0/navigation-module-integration.md | 236 -- .../order-management-feature-integration.md | 1092 --------- .../packaging-units-feature-integration.md | 993 -------- .../202005.0/payment-provider-integration.md | 13 - .../202005.0/payments-feature-integration.md | 245 -- .../permissions-feature-integration.md | 66 - ...istent-cart-sharing-feature-integration.md | 242 -- ...haring-shared-carts-feature-integration.md | 219 -- .../202005.0/prices-feature-integration.md | 329 --- ...r-merchant-relation-feature-integration.md | 386 --- .../product-cart-feature-integration.md | 94 - .../202005.0/product-feature-integration.md | 328 --- .../product-group-cart-feature-integration.md | 72 - ...roup-product-labels-feature-integration.md | 73 - ...-rating-and-reviews-feature-integration.md | 67 - .../product-groups-feature-integration.md | 385 --- ...configurable-bundle-feature-integration.md | 354 --- .../product-label-1.0-feature-integrtion.md | 214 -- .../product-labels-feature-integration.md | 224 -- ...oduct-lists-catalog-feature-integration.md | 109 - .../product-lists-feature-integration.md | 802 ------- ...ct-order-management-feature-integration.md | 86 - ...-rating-and-reviews-feature-integration.md | 209 -- .../product-relations-feature-integration.md | 472 ---- .../product-set-feature-integration.md | 176 -- .../queue-data-import-feature-integration.md | 52 - ...scontinued-products-feature-integration.md | 56 - .../quick-add-to-cart-feature-integration.md | 362 --- ...t-measurement-units-feature-integration.md | 88 - ...splittable-products-feature-integration.md | 59 - ...art-packaging-units-feature-integration.md | 56 - ...cart-shopping-lists-feature-integration.md | 95 - ...ss-approval-process-feature-integration.md | 84 - .../quotation-process-feature-integration.md | 785 ------ ...cess-multiple-carts-feature-integration.md | 54 - .../reclamations-feature-integration.md | 113 - .../resource-sharing-feature-integration.md | 180 -- .../sales-data-export-feature-integration.md | 184 -- .../scheduled-prices-feature-integration.md | 322 --- ...r-concrete-products-feature-integration.md | 175 -- .../shared-carts-feature-integration.md | 701 ------ ...nt-approval-process-feature-integration.md | 195 -- .../shipment-cart-feature-integration.md | 123 - .../202005.0/shipment-feature-integration.md | 276 --- .../shopping-lists-feature-integration.md | 1311 ---------- ...sts-product-options-feature-integration.md | 217 -- ...er-core-back-office-feature-integration.md | 309 --- .../spryker-core-feature-integration.md | 732 ------ .../volume-prices-feature-integration.md | 304 --- .../approval-process-feature-walkthrough.md | 33 - ...bility-notification-feature-walkthrough.md | 35 - .../calculation-3-0.md | 279 --- .../calculation-data-structure.md | 144 -- .../calculator-plugins.md | 82 - .../cart-feature-walkthrough.md | 24 - .../cart-functionality.md | 63 - .../202005.0/catalog-feature-walkthrough.md | 18 - ...category-management-feature-walkthrough.md | 20 - .../cms-feature-walkthrough.md | 33 - .../202005.0/comments-feature-walkthrough.md | 31 - .../company-account-feature-walkthrough.md | 52 - .../company-account-module-relations.md | 22 - ...er-login-by-token-reference-information.md | 80 - .../content-item-types-module-relations.md | 86 - .../content-items-feature-walkthrough.md | 19 - ...-account-management-feature-walkthrough.md | 24 - ...ce-information-customer-module-overview.md | 89 - .../gift-cards-feature-walkthrough.md | 19 - ...nventory-management-feature-walkthrough.md | 153 -- ...g-and-notifications-feature-walkthrough.md | 20 - .../202005.0/merchant-feature-walkthrough.md | 20 - ...roduct-restrictions-feature-walkthrough.md | 30 - .../restricted-products-behavior.md | 241 -- .../multiple-carts-feature-walkthrough.md | 20 - .../navigation-feature-walkthrough.md | 20 - ...navigation-module-reference-information.md | 51 - ...custom-order-reference-module-relations.md | 14 - .../order-management-feature-wakthrough.md | 43 - .../sales-module-reference-information.md | 42 - .../packaging-units-feature-walkthrough.md | 19 - .../202005.0/payments-feature-walkthrough.md | 31 - ...t-cart-sharing-feature-module-relations.md | 7 - ...istent-cart-sharing-feature-walkthrough.md | 33 - .../money-module-reference-information.md | 116 - .../prices-feature-walkthrough.md | 19 - .../product-barcode-feature-walkthrough.md | 14 - .../product-bundles-feature-walkthrough.md | 12 - .../product-groups-feature-walkthrough.md | 18 - .../product-labels-feature-walkthrough.md | 22 - .../product-lists-feature-walkthrough.md | 19 - .../product-options-feature-walkthrough.md | 22 - ...duct-rating-reviews-feature-walkthrough.md | 19 - .../product-relations-feature-walkthrough.md | 29 - .../product-relations-module-relations.md | 18 - .../product-sets-feature-walkthrough.md | 39 - .../product-sets-module-relations.md | 19 - ...romotions-discounts-feature-walkthrough.md | 21 - .../quick-add-to-cart-feature-walkthrough.md | 40 - .../quotation-process-feature-walkthrough.md | 35 - .../quotation-process-module-relations.md | 14 - .../reclamations-feature-walkthrough.md | 18 - .../202005.0/refunds-feature-walkthrough.md | 18 - .../202005.0/reorder-feature-walkthrough.md | 18 - .../resource-sharing-feature-walkthrough.md | 18 - .../scheduled-prices-feature-walkthrough.md | 19 - .../shared-carts-feature-walkthrough.md | 18 - .../shipment-feature-walkthrough.md | 31 - ...s-in-the-database-reference-information.md | 15 - ...nt-method-plugins-reference-information.md | 173 -- .../shopping-lists-feature-walkthrough.md | 20 - ...er-core-back-office-feature-walkthrough.md | 20 - .../user-and-rights-overview.md | 116 - .../how-translations-are-managed.md | 35 - .../spryker-core-feature-walkthrough.md | 20 - .../url-redirects-overview.md | 23 - .../tax-feature-walkthrough.md | 20 - .../tax-module-reference-information.md | 152 -- .../202005.0/wishlist-feature-walkthrough.md | 19 - .../checking-out/checking-out-purchases.md | 1110 --------- ...guring-outdated-refresh-token-life-time.md | 40 - .../202005.0/glue-infrastructure.md | 439 ---- .../glue-api-guides/202005.0/glue-rest-api.md | 61 - .../glue-api-guides/202005.0/glue-spryks.md | 182 -- ...t-requests-and-caching-with-entity-tags.md | 89 - .../authenticating-as-a-company-user.md | 410 ---- .../b2b-account-management.md | 18 - .../retrieving-business-units.md | 331 --- .../retrieving-companies.md | 151 -- .../retrieving-company-roles.md | 187 -- .../retrieving-company-users.md | 452 ---- .../managing-carts-of-registered-users.md | 2111 ----------------- .../guest-carts/managing-guest-carts.md | 1947 --------------- .../202005.0/managing-carts/managing-carts.md | 20 - .../sharing-company-user-carts.md | 562 ----- .../authenticating-as-a-customer.md | 218 -- .../managing-customers/managing-customers.md | 618 ----- .../retrieving-customer-orders.md | 560 ----- .../managing-product-ratings-and-reviews.md | 407 ---- .../retrieving-alternative-products.md | 410 ---- ...retrieving-and-applying-product-options.md | 701 ------ .../retrieving-product-information.md | 1198 ---------- .../retrieving-product-labels.md | 381 --- .../retrieving-related-products.md | 1149 --------- .../managing-returns/creating-a-return.md | 231 -- ...etrieving-return-management-information.md | 51 - .../retrieving-return-reasons.md | 74 - .../retrieving-returnable-items.md | 229 -- .../retrieving-the-returned-items.md | 273 --- .../managing-shopping-lists.md | 1131 --------- .../managing-wishlists/managing-wishlists.md | 329 --- .../resolving-search-engine-friendly-urls.md | 219 -- .../202005.0/rest-api-reference.md | 34 - ...ing-autocomplete-and-search-suggestions.md | 272 --- .../retrieving-category-trees.md | 543 ----- ...ing-abstract-product-list-content-items.md | 1284 ---------- .../retrieving-banner-content-items.md | 85 - .../retrieving-content-item-data.md | 18 - .../202005.0/retrieving-discounts.md | 379 --- .../202005.0/retrieving-measurement-units.md | 91 - .../202005.0/retrieving-navigation-trees.md | 1148 --------- .../202005.0/retrieving-promotional-items.md | 46 - .../retrieving-protected-resources.md | 77 - .../retrieving-store-configuration.md | 127 - .../202005.0/searching-the-product-catalog.md | 558 ----- .../202005.0/security-and-authentication.md | 135 -- .../hosting-providers/integrating-heroku.md | 192 -- .../exporting-product-data-for-fact-finder.md | 95 - ...-configuring-fact-finder-web-components.md | 379 --- .../installing-and-configuring-fact-finder.md | 41 - ...-and-configuring-the-fact-finder-ng-api.md | 562 ----- .../fact-finder/integrating-fact-finder.md | 169 -- .../using-fact-finder-campaigns.md | 209 -- ...using-fact-finder-recommendation-engine.md | 122 - .../using-fact-finder-search-suggestions.md | 73 - .../fact-finder/using-fact-finder-search.md | 209 -- .../fact-finder/using-fact-finder-tracking.md | 188 -- .../installing-and-confiugring-minubo.md | 114 - .../episerver/episerver-api.md | 36 - .../episerver-order-reference-commands.md | 124 - .../installing-and-configuring-episerver.md | 53 - .../episerver/integrating-episerver.md | 488 ---- .../installing-and-configuring-inxmail.md | 40 - .../inxmail/integrating-inxmail.md | 63 - .../inxmail/inxmail-api-requests.md | 30 - .../inxmail-order-referenced-commands.md | 49 - .../econda/adding-the-econda-tracking-code.md | 257 -- .../econda/exporting-econda-data.md | 327 --- .../econda/installing-econda.md | 11 - .../integrating-econda-cross-selling.md | 146 -- .../econda/integrating-econda-front-end.md | 166 -- .../econda/integrating-econda.md | 31 - ...g-and-configuring-tideways-with-vagrant.md | 33 - .../loggly/configuring-loggly.md | 140 -- .../loggly/loggly.md | 142 -- .../configuring-new-relic-logging.md | 117 - ...lic\342\200\223with\342\200\223vagrant.md" | 51 - ...o-punchout-catalogs-feature-integration.md | 114 - ...ogs-product-bundles-feature-integration.md | 61 - .../punchout-catalog-feature-integration.md | 1692 ------------- ...-filtering-of-payment-methods-for-adyen.md | 52 - .../adyen/installing-and-configuring-adyen.md | 136 -- .../integrating-adyen-payment-methods.md | 480 ---- .../adyen/integrating-adyen.md | 327 --- .../installing-and-configuring-afterpay.md | 113 - .../afterpay/integrating-afterpay.md | 120 - .../amazon-pay-sandbox-simulations.md | 122 - .../amazon-pay/amazon-pay-state-machine.md | 115 - .../amazon-pay/configuring-amazon-pay.md | 278 --- .../handling-orders-with-amazon-pay-api.md | 161 -- ...y-configuration-for-the-legacy-demoshop.md | 207 -- .../amazon-pay-email-notifications.md | 76 - ...nd-information-about-shipping-addresses.md | 105 - .../amazon-pay-refund.md | 36 - ...pay-with-amazon-button-on-the-cart-page.md | 59 - .../amazon-pay-sandbox-simulations.md | 39 - .../amazon-pay-state-machine.md | 109 - .../amazon-pay-support-of-bundled-products.md | 86 - ...hop-handling-orders-with-amazon-pay-api.md | 147 -- ...nd-information-about-shipping-addresses.md | 126 - .../arvato/arvato-risk-check.md | 61 - .../arvato/arvato-store-order.md | 42 - .../installing-and-configuring-arvato.md | 67 - .../arvato/v.1.0/arvato-risk-check-1.0.md | 59 - .../installing-and-configuring-arvato-1.0.md | 61 - ...invoice-payments-to-a-preauthorize-mode.md | 377 --- .../billpay/integrating-billpay.md | 91 - .../braintree-performing-requests.md | 72 - .../braintree/braintree-request-workflow.md | 27 - .../installing-and-configuring-braintree.md | 276 --- .../computop/computop-api-calls.md | 62 - .../computop/computop-oms-plugins.md | 52 - .../installing-and-configuring-computop.md | 73 - .../computop-sofort.md | 75 - ...credit-card-payment-method-for-computop.md | 83 - ...ntegrating-the-crif-method-for-computop.md | 212 -- ...irect-debit-payment-method-for-computop.md | 73 - ...easy-credit-payment-method-for-computop.md | 72 - ...g-the-ideal-payment-method-for-computop.md | 65 - ...e-paydirekt-payment-method-for-computop.md | 73 - ...-the-paynow-payment-method-for-computop.md | 364 --- ...-the-paypal-payment-method-for-computop.md | 64 - .../crefopay/crefopay-callbacks.md | 33 - .../crefopay-capture-and-refund-processes.md | 52 - .../crefopay-enabling-b2b-payments.md | 47 - .../crefopay/crefopay-notifications.md | 17 - .../crefopay/crefopay-payment-methods.md | 79 - .../payment-partners/crefopay/crefopay.md | 22 - .../installing-and-configuring-crefopay.md | 100 - .../crefopay/integrating-crefopay.md | 635 ----- .../heidelpay/configuring-heidelpay.md | 86 - .../heidelpay/heidelpay-oms-workflow.md | 16 - .../heidelpay-workflow-for-errors.md | 45 - .../heidelpay/installing-heidelpay.md | 47 - .../heidelpay/integrating-heidelpay.md | 286 --- ...ard-secure-payment-method-for-heidelpay.md | 117 - ...rect-debit-payment-method-for-heidelpay.md | 413 ---- ...asy-credit-payment-method-for-heidelpay.md | 552 ----- ...-the-ideal-payment-method-for-heidelpay.md | 67 - ...ecured-b2c-payment-method-for-heidelpay.md | 221 -- ...-authorize-payment-method-for-heidelpay.md | 86 - ...ypal-debit-payment-method-for-heidelpay.md | 89 - ...the-sofort-payment-method-for-heidelpay.md | 85 - ...arketplace-payment-method-for-heidelpay.md | 51 - .../klarna/klarna-invoice-pay-in-14-days.md | 66 - .../klarna/klarna-part-payment-flexible.md | 53 - .../klarna/klarna-payment-workflow.md | 29 - ...a-state-machine-commands-and-conditions.md | 90 - .../installing-and-configuring-payolution.md | 234 -- ...stallment-payment-method-for-payolution.md | 56 - ...e-invoice-payment-method-for-payolution.md | 95 - .../payolution-performing-requests.md | 106 - .../payolution/payolution-request-flow.md | 36 - ...and-configuring-ratenkauf-by-easycredit.md | 1021 -------- ...rom-the-backend-application-for-ratepay.md | 45 - ...direct-debit-payment-method-for-ratepay.md | 72 - ...-installment-payment-method-for-ratepay.md | 83 - ...-the-invoice-payment-method-for-ratepay.md | 76 - ...e-prepayment-payment-method-for-ratepay.md | 69 - .../ratepay-core-module-structure-diagram.md | 34 - .../ratepay/ratepay-facade-methods.md | 51 - .../ratepay/ratepay-payment-workflow.md | 59 - ...y-state-machine-commands-and-conditions.md | 74 - .../ratepay/ratepay-state-machines.md | 16 - .../installing-and-configuring-akeneo.md | 537 ----- ...nstalling-and-configuring-seven-senders.md | 22 - .../integrating-seven-senders.md | 89 - .../seven-senders-api-requests.md | 28 - .../seven-senders/seven-senders-mappers.md | 43 - .../seven-senders-persistance-layer.md | 39 - .../configuring-debugging-in-docker.md | 91 - .../202005.0/deploy-file-reference-1.0.md | 757 ------ .../docker-environment-infrastructure.md | 26 - .../dev/the-docker-sdk/202005.0/services.md | 410 ---- .../the-docker-sdk/202005.0/the-docker-sdk.md | 34 - .../release-notes/release-notes-2018.12.0.md | 96 - .../release-notes-code-releases-may-2020.md | 164 -- ...ty-release-notes-code-releases-may-2020.md | 102 - 461 files changed, 90376 deletions(-) delete mode 100644 docs/scos/dev/data-export/202005.0/data-export-orders-.csv-files-format.md delete mode 100644 docs/scos/dev/data-export/202005.0/data-export.md delete mode 100644 docs/scos/dev/data-import/202005.0/creating-a-data-importer.md delete mode 100644 docs/scos/dev/data-import/202005.0/data-import-categories/about-data-import-categories.md delete mode 100644 docs/scos/dev/data-import/202005.0/data-import-categories/catalog-setup/catalog-setup.md delete mode 100644 docs/scos/dev/data-import/202005.0/data-import-categories/catalog-setup/categories/categories.md delete mode 100644 docs/scos/dev/data-import/202005.0/data-import-categories/catalog-setup/categories/file-details-category-template.csv.md delete mode 100644 docs/scos/dev/data-import/202005.0/data-import-categories/catalog-setup/categories/file-details-category.csv.md delete mode 100644 docs/scos/dev/data-import/202005.0/data-import-categories/catalog-setup/pricing/file-details-product-price-schedule.csv.md delete mode 100644 docs/scos/dev/data-import/202005.0/data-import-categories/catalog-setup/pricing/file-details-product-price.csv.md delete mode 100644 docs/scos/dev/data-import/202005.0/data-import-categories/catalog-setup/pricing/pricing.md delete mode 100644 docs/scos/dev/data-import/202005.0/data-import-categories/catalog-setup/products/file-details-product-abstract-store.csv.md delete mode 100644 docs/scos/dev/data-import/202005.0/data-import-categories/catalog-setup/products/file-details-product-abstract.csv.md delete mode 100644 docs/scos/dev/data-import/202005.0/data-import-categories/catalog-setup/products/file-details-product-attribute-key.csv.md delete mode 100644 docs/scos/dev/data-import/202005.0/data-import-categories/catalog-setup/products/file-details-product-concrete.csv.md delete mode 100644 docs/scos/dev/data-import/202005.0/data-import-categories/catalog-setup/products/file-details-product-image.csv.md delete mode 100644 docs/scos/dev/data-import/202005.0/data-import-categories/catalog-setup/products/file-details-product-management-attribute.csv.md delete mode 100644 docs/scos/dev/data-import/202005.0/data-import-categories/catalog-setup/products/products.md delete mode 100644 docs/scos/dev/data-import/202005.0/data-import-categories/catalog-setup/stocks/file-details-product-stock.csv.md delete mode 100644 docs/scos/dev/data-import/202005.0/data-import-categories/catalog-setup/stocks/stocks.md delete mode 100644 docs/scos/dev/data-import/202005.0/data-import-categories/commerce-setup/commerce-setup.md delete mode 100644 docs/scos/dev/data-import/202005.0/data-import-categories/commerce-setup/file-details-currency.csv.md delete mode 100644 docs/scos/dev/data-import/202005.0/data-import-categories/commerce-setup/file-details-customer.csv.md delete mode 100644 docs/scos/dev/data-import/202005.0/data-import-categories/commerce-setup/file-details-glossary.csv.md delete mode 100644 docs/scos/dev/data-import/202005.0/data-import-categories/commerce-setup/file-details-payment-method-store.csv.md delete mode 100644 docs/scos/dev/data-import/202005.0/data-import-categories/commerce-setup/file-details-payment-method.csv.md delete mode 100644 docs/scos/dev/data-import/202005.0/data-import-categories/commerce-setup/file-details-sales-order-threshold.csv.md delete mode 100644 docs/scos/dev/data-import/202005.0/data-import-categories/commerce-setup/file-details-shipment-method-store.csv.md delete mode 100644 docs/scos/dev/data-import/202005.0/data-import-categories/commerce-setup/file-details-shipment-price.csv.md delete mode 100644 docs/scos/dev/data-import/202005.0/data-import-categories/commerce-setup/file-details-shipment.csv.md delete mode 100644 docs/scos/dev/data-import/202005.0/data-import-categories/commerce-setup/file-details-tax.csv.md delete mode 100644 docs/scos/dev/data-import/202005.0/data-import-categories/commerce-setup/file-details-warehouse-store.csv.md delete mode 100644 docs/scos/dev/data-import/202005.0/data-import-categories/commerce-setup/file-details-warehouse.csv.md delete mode 100644 docs/scos/dev/data-import/202005.0/data-import-categories/content-management/content-management.md delete mode 100644 docs/scos/dev/data-import/202005.0/data-import-categories/content-management/file-details-cms-block-category-postion.csv.md delete mode 100644 docs/scos/dev/data-import/202005.0/data-import-categories/content-management/file-details-cms-block-category.csv.md delete mode 100644 docs/scos/dev/data-import/202005.0/data-import-categories/content-management/file-details-cms-block-store.csv.md delete mode 100644 docs/scos/dev/data-import/202005.0/data-import-categories/content-management/file-details-cms-block.csv.md delete mode 100644 docs/scos/dev/data-import/202005.0/data-import-categories/content-management/file-details-cms-page-store.csv.md delete mode 100644 docs/scos/dev/data-import/202005.0/data-import-categories/content-management/file-details-cms-page.csv.md delete mode 100644 docs/scos/dev/data-import/202005.0/data-import-categories/content-management/file-details-cms-slot-block.csv.md delete mode 100644 docs/scos/dev/data-import/202005.0/data-import-categories/content-management/file-details-cms-slot-template.csv.md delete mode 100644 docs/scos/dev/data-import/202005.0/data-import-categories/content-management/file-details-cms-slot.csv.md delete mode 100644 docs/scos/dev/data-import/202005.0/data-import-categories/content-management/file-details-cms-template.csv.md delete mode 100644 docs/scos/dev/data-import/202005.0/data-import-categories/content-management/file-details-content-banner.csv.md delete mode 100644 docs/scos/dev/data-import/202005.0/data-import-categories/content-management/file-details-content-navigation.csv.md delete mode 100644 docs/scos/dev/data-import/202005.0/data-import-categories/content-management/file-details-content-product-abstract-list.csv.md delete mode 100644 docs/scos/dev/data-import/202005.0/data-import-categories/content-management/file-details-content-product-set.csv.md delete mode 100644 docs/scos/dev/data-import/202005.0/data-import-categories/merchandising-setup/discounts/discounts.md delete mode 100644 docs/scos/dev/data-import/202005.0/data-import-categories/merchandising-setup/discounts/file-details-discount-amount.csv.md delete mode 100644 docs/scos/dev/data-import/202005.0/data-import-categories/merchandising-setup/discounts/file-details-discount-store.csv.md delete mode 100644 docs/scos/dev/data-import/202005.0/data-import-categories/merchandising-setup/discounts/file-details-discount-voucher.csv.md delete mode 100644 docs/scos/dev/data-import/202005.0/data-import-categories/merchandising-setup/discounts/file-details-discount.csv.md delete mode 100644 docs/scos/dev/data-import/202005.0/data-import-categories/merchandising-setup/merchandising-setup.md delete mode 100644 docs/scos/dev/data-import/202005.0/data-import-categories/merchandising-setup/product-merchandising/file-details-product-alternative.csv.md delete mode 100644 docs/scos/dev/data-import/202005.0/data-import-categories/merchandising-setup/product-merchandising/file-details-product-discontinued.csv.md delete mode 100644 docs/scos/dev/data-import/202005.0/data-import-categories/merchandising-setup/product-merchandising/file-details-product-group.csv.md delete mode 100644 docs/scos/dev/data-import/202005.0/data-import-categories/merchandising-setup/product-merchandising/file-details-product-label.csv.md delete mode 100644 docs/scos/dev/data-import/202005.0/data-import-categories/merchandising-setup/product-merchandising/file-details-product-quantity.csv.md delete mode 100644 docs/scos/dev/data-import/202005.0/data-import-categories/merchandising-setup/product-merchandising/file-details-product-relation.csv.md delete mode 100644 docs/scos/dev/data-import/202005.0/data-import-categories/merchandising-setup/product-merchandising/file-details-product-review.csv.md delete mode 100644 docs/scos/dev/data-import/202005.0/data-import-categories/merchandising-setup/product-merchandising/file-details-product-search-attribute-map.csv.md delete mode 100644 docs/scos/dev/data-import/202005.0/data-import-categories/merchandising-setup/product-merchandising/file-details-product-search-attribute.csv.md delete mode 100644 docs/scos/dev/data-import/202005.0/data-import-categories/merchandising-setup/product-merchandising/file-details-product-set.csv.md delete mode 100644 docs/scos/dev/data-import/202005.0/data-import-categories/merchandising-setup/product-merchandising/product-merchandising.md delete mode 100644 docs/scos/dev/data-import/202005.0/data-import-categories/miscellaneous/file-details-comment.csv.md delete mode 100644 docs/scos/dev/data-import/202005.0/data-import-categories/miscellaneous/file-details-mime-type.csv.md delete mode 100644 docs/scos/dev/data-import/202005.0/data-import-categories/miscellaneous/miscellaneous.md delete mode 100644 docs/scos/dev/data-import/202005.0/data-import-categories/navigation-setup/file-details-navigation-node.csv.md delete mode 100644 docs/scos/dev/data-import/202005.0/data-import-categories/navigation-setup/file-details-navigation.csv.md delete mode 100644 docs/scos/dev/data-import/202005.0/data-import-categories/navigation-setup/navigation-setup.md delete mode 100644 docs/scos/dev/data-import/202005.0/data-import-categories/special-product-types/gift-cards/file-details-gift-card-abstract-configuration.csv.md delete mode 100644 docs/scos/dev/data-import/202005.0/data-import-categories/special-product-types/gift-cards/file-details-gift-card-concrete-configuration.csv.md delete mode 100644 docs/scos/dev/data-import/202005.0/data-import-categories/special-product-types/gift-cards/gift-cards.md delete mode 100644 docs/scos/dev/data-import/202005.0/data-import-categories/special-product-types/product-options/file-details-product-option-price.csv.md delete mode 100644 docs/scos/dev/data-import/202005.0/data-import-categories/special-product-types/product-options/file-details-product-option.csv.md delete mode 100644 docs/scos/dev/data-import/202005.0/data-import-categories/special-product-types/product-options/product-options.md delete mode 100644 docs/scos/dev/data-import/202005.0/data-import-categories/special-product-types/special-product-types-import-category.md delete mode 100644 docs/scos/dev/data-import/202005.0/data-import-categories/special-product-types/special-product-types.md delete mode 100644 docs/scos/dev/data-import/202005.0/data-importer-speed-optimization.md delete mode 100644 docs/scos/dev/data-import/202005.0/data-importers-overview-and-implementation.md delete mode 100644 docs/scos/dev/data-import/202005.0/demo-shop-data-import/execution-order-of-data-importers-in-demo-shop.md delete mode 100644 docs/scos/dev/data-import/202005.0/demo-shop-data-import/importing-demo-shop-data.md delete mode 100644 docs/scos/dev/data-import/202005.0/importing-data-with-a-configuration-file.md delete mode 100644 docs/scos/dev/data-import/202005.0/importing-data-with-the-queue-data-importer.md delete mode 100644 docs/scos/dev/feature-integration-guides/202005.0/agent-assist-feature-integration.md delete mode 100644 docs/scos/dev/feature-integration-guides/202005.0/alternative-products-discontinued-products-feature-integration.md delete mode 100644 docs/scos/dev/feature-integration-guides/202005.0/alternative-products-feature-integration.md delete mode 100644 docs/scos/dev/feature-integration-guides/202005.0/alternative-products-inventory-management-feature-integration.md delete mode 100644 docs/scos/dev/feature-integration-guides/202005.0/alternative-products-product-label-feature-integration.md delete mode 100644 docs/scos/dev/feature-integration-guides/202005.0/alternative-products-wishlist-feature-integration.md delete mode 100644 docs/scos/dev/feature-integration-guides/202005.0/approval-process-feature-integration.md delete mode 100644 docs/scos/dev/feature-integration-guides/202005.0/back-in-stock-notification-feature-integration.md delete mode 100644 docs/scos/dev/feature-integration-guides/202005.0/cart-integration.md delete mode 100644 docs/scos/dev/feature-integration-guides/202005.0/cart-non-splittable-products-feature-integration.md delete mode 100644 docs/scos/dev/feature-integration-guides/202005.0/category-filters-feature-integration.md delete mode 100644 docs/scos/dev/feature-integration-guides/202005.0/category-image-feature-integration.md delete mode 100644 docs/scos/dev/feature-integration-guides/202005.0/checkout-quotation-process-feature-integration.md delete mode 100644 docs/scos/dev/feature-integration-guides/202005.0/checkout-workflow-integration-guide.md delete mode 100644 docs/scos/dev/feature-integration-guides/202005.0/cms-block-widget-feature-integration.md delete mode 100644 docs/scos/dev/feature-integration-guides/202005.0/cms-catalog-feature-integration.md delete mode 100644 docs/scos/dev/feature-integration-guides/202005.0/cms-feature-integration.md delete mode 100644 docs/scos/dev/feature-integration-guides/202005.0/cms-product-lists-catalog-feature-integration.md delete mode 100644 docs/scos/dev/feature-integration-guides/202005.0/comments-feature-integration.md delete mode 100644 docs/scos/dev/feature-integration-guides/202005.0/comments-order-management-feature-integration.md delete mode 100644 docs/scos/dev/feature-integration-guides/202005.0/comments-persistent-cart-feature-integration.md delete mode 100644 docs/scos/dev/feature-integration-guides/202005.0/company-account-feature-integration.md delete mode 100644 docs/scos/dev/feature-integration-guides/202005.0/company-account-order-management-feature-integration.md delete mode 100644 docs/scos/dev/feature-integration-guides/202005.0/configurable-bundle-feature-integration.md delete mode 100644 docs/scos/dev/feature-integration-guides/202005.0/content-items-feature-integration.md delete mode 100644 docs/scos/dev/feature-integration-guides/202005.0/custom-order-reference-feature-integration.md delete mode 100644 docs/scos/dev/feature-integration-guides/202005.0/customer-access-feature-integration.md delete mode 100644 docs/scos/dev/feature-integration-guides/202005.0/customer-account-management-feature-integration.md delete mode 100644 docs/scos/dev/feature-integration-guides/202005.0/customer-account-management-order-management-feature-integration.md delete mode 100644 docs/scos/dev/feature-integration-guides/202005.0/discount-promotion-feature-integration.md delete mode 100644 docs/scos/dev/feature-integration-guides/202005.0/enabling-gift-cards.md delete mode 100644 docs/scos/dev/feature-integration-guides/202005.0/enabling-the-content-widget.md delete mode 100644 docs/scos/dev/feature-integration-guides/202005.0/feature-integration-guides.md delete mode 100644 docs/scos/dev/feature-integration-guides/202005.0/gift-cards-feature-integration.md delete mode 100644 docs/scos/dev/feature-integration-guides/202005.0/glue-api/glue-api-alternative-products-feature-integration.md delete mode 100644 docs/scos/dev/feature-integration-guides/202005.0/glue-api/glue-api-cart-feature-integration.md delete mode 100644 docs/scos/dev/feature-integration-guides/202005.0/glue-api/glue-api-catalog-feature-integration.md delete mode 100644 docs/scos/dev/feature-integration-guides/202005.0/glue-api/glue-api-category-management-feature-integration.md delete mode 100644 docs/scos/dev/feature-integration-guides/202005.0/glue-api/glue-api-checkout-feature-integration.md delete mode 100644 docs/scos/dev/feature-integration-guides/202005.0/glue-api/glue-api-company-account-feature-integration.md delete mode 100644 docs/scos/dev/feature-integration-guides/202005.0/glue-api/glue-api-content-items-feature-integration.md delete mode 100644 docs/scos/dev/feature-integration-guides/202005.0/glue-api/glue-api-customer-access-feature-integration.md delete mode 100644 docs/scos/dev/feature-integration-guides/202005.0/glue-api/glue-api-customer-account-management-feature-integration.md delete mode 100644 docs/scos/dev/feature-integration-guides/202005.0/glue-api/glue-api-glue-application-feature-integration.md delete mode 100644 docs/scos/dev/feature-integration-guides/202005.0/glue-api/glue-api-installation-and-configuration.md delete mode 100644 docs/scos/dev/feature-integration-guides/202005.0/glue-api/glue-api-measurement-units-feature-integration.md delete mode 100644 docs/scos/dev/feature-integration-guides/202005.0/glue-api/glue-api-navigation-feature-integration.md delete mode 100644 docs/scos/dev/feature-integration-guides/202005.0/glue-api/glue-api-order-management-feature-integration.md delete mode 100644 docs/scos/dev/feature-integration-guides/202005.0/glue-api/glue-api-payments-feature-integration.md delete mode 100644 docs/scos/dev/feature-integration-guides/202005.0/glue-api/glue-api-product-availability-feature-integration.md delete mode 100644 docs/scos/dev/feature-integration-guides/202005.0/glue-api/glue-api-product-feature-integration.md delete mode 100644 docs/scos/dev/feature-integration-guides/202005.0/glue-api/glue-api-product-image-sets-feature-integration.md delete mode 100644 docs/scos/dev/feature-integration-guides/202005.0/glue-api/glue-api-product-labels-feature-integration.md delete mode 100644 docs/scos/dev/feature-integration-guides/202005.0/glue-api/glue-api-product-options-feature-integration.md delete mode 100644 docs/scos/dev/feature-integration-guides/202005.0/glue-api/glue-api-product-price-feature-integration.md delete mode 100644 docs/scos/dev/feature-integration-guides/202005.0/glue-api/glue-api-product-rating-and-reviews-feature-integration.md delete mode 100644 docs/scos/dev/feature-integration-guides/202005.0/glue-api/glue-api-product-relations-feature-integration.md delete mode 100644 docs/scos/dev/feature-integration-guides/202005.0/glue-api/glue-api-promotions-and-discounts-feature-integration.md delete mode 100644 docs/scos/dev/feature-integration-guides/202005.0/glue-api/glue-api-rest-schema-validation-feature-integration.md delete mode 100644 docs/scos/dev/feature-integration-guides/202005.0/glue-api/glue-api-shipment-feature-integration.md delete mode 100644 docs/scos/dev/feature-integration-guides/202005.0/glue-api/glue-api-shopping-lists-feature-integration.md delete mode 100644 docs/scos/dev/feature-integration-guides/202005.0/glue-api/glue-api-spryker-core-feature-integration.md delete mode 100644 docs/scos/dev/feature-integration-guides/202005.0/glue-api/glue-api-wishlist-feature-integration.md delete mode 100644 docs/scos/dev/feature-integration-guides/202005.0/installing-the-category-cms-blocks.md delete mode 100644 docs/scos/dev/feature-integration-guides/202005.0/installing-the-product-cms-block.md delete mode 100644 docs/scos/dev/feature-integration-guides/202005.0/inventory-management-feature-integration.md delete mode 100644 docs/scos/dev/feature-integration-guides/202005.0/measurement-units-feature-integration.md delete mode 100644 docs/scos/dev/feature-integration-guides/202005.0/merchant-b2b-contracts-feature-integration.md delete mode 100644 docs/scos/dev/feature-integration-guides/202005.0/merchant-custom-prices-feature-integration.md delete mode 100644 docs/scos/dev/feature-integration-guides/202005.0/merchant-product-restrictions-feature-integration.md delete mode 100644 docs/scos/dev/feature-integration-guides/202005.0/merchants-and-merchant-relations-feature-integration.md delete mode 100644 docs/scos/dev/feature-integration-guides/202005.0/minimum-order-value-feature-integration.md delete mode 100644 docs/scos/dev/feature-integration-guides/202005.0/multi-store-cms-block-feature-integration.md delete mode 100644 docs/scos/dev/feature-integration-guides/202005.0/multi-store-products-feature-integration.md delete mode 100644 docs/scos/dev/feature-integration-guides/202005.0/multiple-carts-feature-integration.md delete mode 100644 docs/scos/dev/feature-integration-guides/202005.0/multiple-carts-quick-order-feature-integration.md delete mode 100644 docs/scos/dev/feature-integration-guides/202005.0/multiple-carts-reorder-feature-integration.md delete mode 100644 docs/scos/dev/feature-integration-guides/202005.0/navigation-module-integration.md delete mode 100644 docs/scos/dev/feature-integration-guides/202005.0/order-management-feature-integration.md delete mode 100644 docs/scos/dev/feature-integration-guides/202005.0/packaging-units-feature-integration.md delete mode 100644 docs/scos/dev/feature-integration-guides/202005.0/payment-provider-integration.md delete mode 100644 docs/scos/dev/feature-integration-guides/202005.0/payments-feature-integration.md delete mode 100644 docs/scos/dev/feature-integration-guides/202005.0/permissions-feature-integration.md delete mode 100644 docs/scos/dev/feature-integration-guides/202005.0/persistent-cart-sharing-feature-integration.md delete mode 100644 docs/scos/dev/feature-integration-guides/202005.0/persistent-cart-sharing-shared-carts-feature-integration.md delete mode 100644 docs/scos/dev/feature-integration-guides/202005.0/prices-feature-integration.md delete mode 100644 docs/scos/dev/feature-integration-guides/202005.0/prices-per-merchant-relation-feature-integration.md delete mode 100644 docs/scos/dev/feature-integration-guides/202005.0/product-cart-feature-integration.md delete mode 100644 docs/scos/dev/feature-integration-guides/202005.0/product-feature-integration.md delete mode 100644 docs/scos/dev/feature-integration-guides/202005.0/product-group-cart-feature-integration.md delete mode 100644 docs/scos/dev/feature-integration-guides/202005.0/product-group-product-labels-feature-integration.md delete mode 100644 docs/scos/dev/feature-integration-guides/202005.0/product-group-product-rating-and-reviews-feature-integration.md delete mode 100644 docs/scos/dev/feature-integration-guides/202005.0/product-groups-feature-integration.md delete mode 100644 docs/scos/dev/feature-integration-guides/202005.0/product-images-configurable-bundle-feature-integration.md delete mode 100644 docs/scos/dev/feature-integration-guides/202005.0/product-label-1.0-feature-integrtion.md delete mode 100644 docs/scos/dev/feature-integration-guides/202005.0/product-labels-feature-integration.md delete mode 100644 docs/scos/dev/feature-integration-guides/202005.0/product-lists-catalog-feature-integration.md delete mode 100644 docs/scos/dev/feature-integration-guides/202005.0/product-lists-feature-integration.md delete mode 100644 docs/scos/dev/feature-integration-guides/202005.0/product-order-management-feature-integration.md delete mode 100644 docs/scos/dev/feature-integration-guides/202005.0/product-rating-and-reviews-feature-integration.md delete mode 100644 docs/scos/dev/feature-integration-guides/202005.0/product-relations-feature-integration.md delete mode 100644 docs/scos/dev/feature-integration-guides/202005.0/product-set-feature-integration.md delete mode 100644 docs/scos/dev/feature-integration-guides/202005.0/queue-data-import-feature-integration.md delete mode 100644 docs/scos/dev/feature-integration-guides/202005.0/quick-add-to-cart-discontinued-products-feature-integration.md delete mode 100644 docs/scos/dev/feature-integration-guides/202005.0/quick-add-to-cart-feature-integration.md delete mode 100644 docs/scos/dev/feature-integration-guides/202005.0/quick-add-to-cart-measurement-units-feature-integration.md delete mode 100644 docs/scos/dev/feature-integration-guides/202005.0/quick-add-to-cart-non-splittable-products-feature-integration.md delete mode 100644 docs/scos/dev/feature-integration-guides/202005.0/quick-add-to-cart-packaging-units-feature-integration.md delete mode 100644 docs/scos/dev/feature-integration-guides/202005.0/quick-add-to-cart-shopping-lists-feature-integration.md delete mode 100644 docs/scos/dev/feature-integration-guides/202005.0/quotation-process-approval-process-feature-integration.md delete mode 100644 docs/scos/dev/feature-integration-guides/202005.0/quotation-process-feature-integration.md delete mode 100644 docs/scos/dev/feature-integration-guides/202005.0/quotation-process-multiple-carts-feature-integration.md delete mode 100644 docs/scos/dev/feature-integration-guides/202005.0/reclamations-feature-integration.md delete mode 100644 docs/scos/dev/feature-integration-guides/202005.0/resource-sharing-feature-integration.md delete mode 100644 docs/scos/dev/feature-integration-guides/202005.0/sales-data-export-feature-integration.md delete mode 100644 docs/scos/dev/feature-integration-guides/202005.0/scheduled-prices-feature-integration.md delete mode 100644 docs/scos/dev/feature-integration-guides/202005.0/search-widget-for-concrete-products-feature-integration.md delete mode 100644 docs/scos/dev/feature-integration-guides/202005.0/shared-carts-feature-integration.md delete mode 100644 docs/scos/dev/feature-integration-guides/202005.0/shipment-approval-process-feature-integration.md delete mode 100644 docs/scos/dev/feature-integration-guides/202005.0/shipment-cart-feature-integration.md delete mode 100644 docs/scos/dev/feature-integration-guides/202005.0/shipment-feature-integration.md delete mode 100644 docs/scos/dev/feature-integration-guides/202005.0/shopping-lists-feature-integration.md delete mode 100644 docs/scos/dev/feature-integration-guides/202005.0/shopping-lists-product-options-feature-integration.md delete mode 100644 docs/scos/dev/feature-integration-guides/202005.0/spryker-core-back-office-feature-integration.md delete mode 100644 docs/scos/dev/feature-integration-guides/202005.0/spryker-core-feature-integration.md delete mode 100644 docs/scos/dev/feature-integration-guides/202005.0/volume-prices-feature-integration.md delete mode 100644 docs/scos/dev/feature-walkthroughs/202005.0/approval-process-feature-walkthrough.md delete mode 100644 docs/scos/dev/feature-walkthroughs/202005.0/availability-notification-feature-walkthrough.md delete mode 100644 docs/scos/dev/feature-walkthroughs/202005.0/cart-feature-walkthrough/calculation-3-0.md delete mode 100644 docs/scos/dev/feature-walkthroughs/202005.0/cart-feature-walkthrough/calculation-data-structure.md delete mode 100644 docs/scos/dev/feature-walkthroughs/202005.0/cart-feature-walkthrough/calculator-plugins.md delete mode 100644 docs/scos/dev/feature-walkthroughs/202005.0/cart-feature-walkthrough/cart-feature-walkthrough.md delete mode 100644 docs/scos/dev/feature-walkthroughs/202005.0/cart-feature-walkthrough/cart-functionality.md delete mode 100644 docs/scos/dev/feature-walkthroughs/202005.0/catalog-feature-walkthrough.md delete mode 100644 docs/scos/dev/feature-walkthroughs/202005.0/category-management-feature-walkthrough.md delete mode 100644 docs/scos/dev/feature-walkthroughs/202005.0/cms-feature-walkthrough/cms-feature-walkthrough.md delete mode 100644 docs/scos/dev/feature-walkthroughs/202005.0/comments-feature-walkthrough.md delete mode 100644 docs/scos/dev/feature-walkthroughs/202005.0/company-account-feature-walkthrough/company-account-feature-walkthrough.md delete mode 100644 docs/scos/dev/feature-walkthroughs/202005.0/company-account-feature-walkthrough/company-account-module-relations.md delete mode 100644 docs/scos/dev/feature-walkthroughs/202005.0/company-account-feature-walkthrough/customer-login-by-token-reference-information.md delete mode 100644 docs/scos/dev/feature-walkthroughs/202005.0/content-items-feature-walkthrough/content-item-types-module-relations.md delete mode 100644 docs/scos/dev/feature-walkthroughs/202005.0/content-items-feature-walkthrough/content-items-feature-walkthrough.md delete mode 100644 docs/scos/dev/feature-walkthroughs/202005.0/customer-account-management-feature-walkthrough/customer-account-management-feature-walkthrough.md delete mode 100644 docs/scos/dev/feature-walkthroughs/202005.0/customer-account-management-feature-walkthrough/reference-information-customer-module-overview.md delete mode 100644 docs/scos/dev/feature-walkthroughs/202005.0/gift-cards-feature-walkthrough.md delete mode 100644 docs/scos/dev/feature-walkthroughs/202005.0/inventory-management-feature-walkthrough/inventory-management-feature-walkthrough.md delete mode 100644 docs/scos/dev/feature-walkthroughs/202005.0/mailing-and-notifications-feature-walkthrough.md delete mode 100644 docs/scos/dev/feature-walkthroughs/202005.0/merchant-feature-walkthrough.md delete mode 100644 docs/scos/dev/feature-walkthroughs/202005.0/merchant-product-restrictions-feature-walkthrough/merchant-product-restrictions-feature-walkthrough.md delete mode 100644 docs/scos/dev/feature-walkthroughs/202005.0/merchant-product-restrictions-feature-walkthrough/restricted-products-behavior.md delete mode 100644 docs/scos/dev/feature-walkthroughs/202005.0/multiple-carts-feature-walkthrough.md delete mode 100644 docs/scos/dev/feature-walkthroughs/202005.0/navigation-feature-walkthrough/navigation-feature-walkthrough.md delete mode 100644 docs/scos/dev/feature-walkthroughs/202005.0/navigation-feature-walkthrough/navigation-module-reference-information.md delete mode 100644 docs/scos/dev/feature-walkthroughs/202005.0/order-management-feature-walkthrough/custom-order-reference-module-relations.md delete mode 100644 docs/scos/dev/feature-walkthroughs/202005.0/order-management-feature-walkthrough/order-management-feature-wakthrough.md delete mode 100644 docs/scos/dev/feature-walkthroughs/202005.0/order-management-feature-walkthrough/sales-module-reference-information.md delete mode 100644 docs/scos/dev/feature-walkthroughs/202005.0/packaging-units-feature-walkthrough.md delete mode 100644 docs/scos/dev/feature-walkthroughs/202005.0/payments-feature-walkthrough.md delete mode 100644 docs/scos/dev/feature-walkthroughs/202005.0/persistent-cart-sharing-feature-walkthrough/persistent-cart-sharing-feature-module-relations.md delete mode 100644 docs/scos/dev/feature-walkthroughs/202005.0/persistent-cart-sharing-feature-walkthrough/persistent-cart-sharing-feature-walkthrough.md delete mode 100644 docs/scos/dev/feature-walkthroughs/202005.0/prices-feature-walkthrough/money-module-reference-information.md delete mode 100644 docs/scos/dev/feature-walkthroughs/202005.0/prices-feature-walkthrough/prices-feature-walkthrough.md delete mode 100644 docs/scos/dev/feature-walkthroughs/202005.0/product-barcode-feature-walkthrough.md delete mode 100644 docs/scos/dev/feature-walkthroughs/202005.0/product-bundles-feature-walkthrough.md delete mode 100644 docs/scos/dev/feature-walkthroughs/202005.0/product-groups-feature-walkthrough.md delete mode 100644 docs/scos/dev/feature-walkthroughs/202005.0/product-labels-feature-walkthrough.md delete mode 100644 docs/scos/dev/feature-walkthroughs/202005.0/product-lists-feature-walkthrough.md delete mode 100644 docs/scos/dev/feature-walkthroughs/202005.0/product-options-feature-walkthrough.md delete mode 100644 docs/scos/dev/feature-walkthroughs/202005.0/product-rating-reviews-feature-walkthrough.md delete mode 100644 docs/scos/dev/feature-walkthroughs/202005.0/product-relations-feature-walkthrough/product-relations-feature-walkthrough.md delete mode 100644 docs/scos/dev/feature-walkthroughs/202005.0/product-relations-feature-walkthrough/product-relations-module-relations.md delete mode 100644 docs/scos/dev/feature-walkthroughs/202005.0/product-sets-feature-walkthrough/product-sets-feature-walkthrough.md delete mode 100644 docs/scos/dev/feature-walkthroughs/202005.0/product-sets-feature-walkthrough/product-sets-module-relations.md delete mode 100644 docs/scos/dev/feature-walkthroughs/202005.0/promotions-discounts-feature-walkthrough.md delete mode 100644 docs/scos/dev/feature-walkthroughs/202005.0/quick-add-to-cart-feature-walkthrough/quick-add-to-cart-feature-walkthrough.md delete mode 100644 docs/scos/dev/feature-walkthroughs/202005.0/quotation-process-feature-walkthrough/quotation-process-feature-walkthrough.md delete mode 100644 docs/scos/dev/feature-walkthroughs/202005.0/quotation-process-feature-walkthrough/quotation-process-module-relations.md delete mode 100644 docs/scos/dev/feature-walkthroughs/202005.0/reclamations-feature-walkthrough.md delete mode 100644 docs/scos/dev/feature-walkthroughs/202005.0/refunds-feature-walkthrough.md delete mode 100644 docs/scos/dev/feature-walkthroughs/202005.0/reorder-feature-walkthrough.md delete mode 100644 docs/scos/dev/feature-walkthroughs/202005.0/resource-sharing-feature-walkthrough.md delete mode 100644 docs/scos/dev/feature-walkthroughs/202005.0/scheduled-prices-feature-walkthrough.md delete mode 100644 docs/scos/dev/feature-walkthroughs/202005.0/shared-carts-feature-walkthrough.md delete mode 100644 docs/scos/dev/feature-walkthroughs/202005.0/shipment-feature-walkthrough/shipment-feature-walkthrough.md delete mode 100644 docs/scos/dev/feature-walkthroughs/202005.0/shipment-feature-walkthrough/shipment-method-entities-in-the-database-reference-information.md delete mode 100644 docs/scos/dev/feature-walkthroughs/202005.0/shipment-feature-walkthrough/shipment-method-plugins-reference-information.md delete mode 100644 docs/scos/dev/feature-walkthroughs/202005.0/shopping-lists-feature-walkthrough.md delete mode 100644 docs/scos/dev/feature-walkthroughs/202005.0/spryker-core-back-office-feature-walkthrough/spryker-core-back-office-feature-walkthrough.md delete mode 100644 docs/scos/dev/feature-walkthroughs/202005.0/spryker-core-back-office-feature-walkthrough/user-and-rights-overview.md delete mode 100644 docs/scos/dev/feature-walkthroughs/202005.0/spryker-core-feature-walkthrough/how-translations-are-managed.md delete mode 100644 docs/scos/dev/feature-walkthroughs/202005.0/spryker-core-feature-walkthrough/spryker-core-feature-walkthrough.md delete mode 100644 docs/scos/dev/feature-walkthroughs/202005.0/spryker-core-feature-walkthrough/url-redirects-overview.md delete mode 100644 docs/scos/dev/feature-walkthroughs/202005.0/tax-feature-walkthrough/tax-feature-walkthrough.md delete mode 100644 docs/scos/dev/feature-walkthroughs/202005.0/tax-feature-walkthrough/tax-module-reference-information.md delete mode 100644 docs/scos/dev/feature-walkthroughs/202005.0/wishlist-feature-walkthrough.md delete mode 100644 docs/scos/dev/glue-api-guides/202005.0/checking-out/checking-out-purchases.md delete mode 100644 docs/scos/dev/glue-api-guides/202005.0/configuring-outdated-refresh-token-life-time.md delete mode 100644 docs/scos/dev/glue-api-guides/202005.0/glue-infrastructure.md delete mode 100644 docs/scos/dev/glue-api-guides/202005.0/glue-rest-api.md delete mode 100644 docs/scos/dev/glue-api-guides/202005.0/glue-spryks.md delete mode 100644 docs/scos/dev/glue-api-guides/202005.0/handling-concurrent-rest-requests-and-caching-with-entity-tags.md delete mode 100644 docs/scos/dev/glue-api-guides/202005.0/managing-b2b-account/authenticating-as-a-company-user.md delete mode 100644 docs/scos/dev/glue-api-guides/202005.0/managing-b2b-account/b2b-account-management.md delete mode 100644 docs/scos/dev/glue-api-guides/202005.0/managing-b2b-account/retrieving-business-units.md delete mode 100644 docs/scos/dev/glue-api-guides/202005.0/managing-b2b-account/retrieving-companies.md delete mode 100644 docs/scos/dev/glue-api-guides/202005.0/managing-b2b-account/retrieving-company-roles.md delete mode 100644 docs/scos/dev/glue-api-guides/202005.0/managing-b2b-account/retrieving-company-users.md delete mode 100644 docs/scos/dev/glue-api-guides/202005.0/managing-carts/carts-of-registered-users/managing-carts-of-registered-users.md delete mode 100644 docs/scos/dev/glue-api-guides/202005.0/managing-carts/guest-carts/managing-guest-carts.md delete mode 100644 docs/scos/dev/glue-api-guides/202005.0/managing-carts/managing-carts.md delete mode 100644 docs/scos/dev/glue-api-guides/202005.0/managing-carts/sharing-company-user-carts/sharing-company-user-carts.md delete mode 100644 docs/scos/dev/glue-api-guides/202005.0/managing-customers/authenticating-as-a-customer.md delete mode 100644 docs/scos/dev/glue-api-guides/202005.0/managing-customers/managing-customers.md delete mode 100644 docs/scos/dev/glue-api-guides/202005.0/managing-customers/retrieving-customer-orders.md delete mode 100644 docs/scos/dev/glue-api-guides/202005.0/managing-products/managing-product-ratings-and-reviews.md delete mode 100644 docs/scos/dev/glue-api-guides/202005.0/managing-products/retrieving-alternative-products.md delete mode 100644 docs/scos/dev/glue-api-guides/202005.0/managing-products/retrieving-and-applying-product-options.md delete mode 100644 docs/scos/dev/glue-api-guides/202005.0/managing-products/retrieving-product-information.md delete mode 100644 docs/scos/dev/glue-api-guides/202005.0/managing-products/retrieving-product-labels.md delete mode 100644 docs/scos/dev/glue-api-guides/202005.0/managing-products/retrieving-related-products.md delete mode 100644 docs/scos/dev/glue-api-guides/202005.0/managing-returns/creating-a-return.md delete mode 100644 docs/scos/dev/glue-api-guides/202005.0/managing-returns/retrieving-return-management-information.md delete mode 100644 docs/scos/dev/glue-api-guides/202005.0/managing-returns/retrieving-return-reasons.md delete mode 100644 docs/scos/dev/glue-api-guides/202005.0/managing-returns/retrieving-returnable-items.md delete mode 100644 docs/scos/dev/glue-api-guides/202005.0/managing-returns/retrieving-the-returned-items.md delete mode 100644 docs/scos/dev/glue-api-guides/202005.0/managing-shopping-lists/managing-shopping-lists.md delete mode 100644 docs/scos/dev/glue-api-guides/202005.0/managing-wishlists/managing-wishlists.md delete mode 100644 docs/scos/dev/glue-api-guides/202005.0/resolving-search-engine-friendly-urls.md delete mode 100644 docs/scos/dev/glue-api-guides/202005.0/rest-api-reference.md delete mode 100644 docs/scos/dev/glue-api-guides/202005.0/retrieving-autocomplete-and-search-suggestions.md delete mode 100644 docs/scos/dev/glue-api-guides/202005.0/retrieving-categories/retrieving-category-trees.md delete mode 100644 docs/scos/dev/glue-api-guides/202005.0/retrieving-content-items/retrieving-abstract-product-list-content-items.md delete mode 100644 docs/scos/dev/glue-api-guides/202005.0/retrieving-content-items/retrieving-banner-content-items.md delete mode 100644 docs/scos/dev/glue-api-guides/202005.0/retrieving-content-items/retrieving-content-item-data.md delete mode 100644 docs/scos/dev/glue-api-guides/202005.0/retrieving-discounts.md delete mode 100644 docs/scos/dev/glue-api-guides/202005.0/retrieving-measurement-units.md delete mode 100644 docs/scos/dev/glue-api-guides/202005.0/retrieving-navigation-trees.md delete mode 100644 docs/scos/dev/glue-api-guides/202005.0/retrieving-promotional-items.md delete mode 100644 docs/scos/dev/glue-api-guides/202005.0/retrieving-protected-resources.md delete mode 100644 docs/scos/dev/glue-api-guides/202005.0/retrieving-store-configuration.md delete mode 100644 docs/scos/dev/glue-api-guides/202005.0/searching-the-product-catalog.md delete mode 100644 docs/scos/dev/glue-api-guides/202005.0/security-and-authentication.md delete mode 100644 docs/scos/dev/technology-partner-guides/202005.0/hosting-providers/integrating-heroku.md delete mode 100644 docs/scos/dev/technology-partner-guides/202005.0/marketing-and-conversion/analytics/fact-finder/exporting-product-data-for-fact-finder.md delete mode 100644 docs/scos/dev/technology-partner-guides/202005.0/marketing-and-conversion/analytics/fact-finder/installing-and-configuring-fact-finder-web-components.md delete mode 100644 docs/scos/dev/technology-partner-guides/202005.0/marketing-and-conversion/analytics/fact-finder/installing-and-configuring-fact-finder.md delete mode 100644 docs/scos/dev/technology-partner-guides/202005.0/marketing-and-conversion/analytics/fact-finder/installing-and-configuring-the-fact-finder-ng-api.md delete mode 100644 docs/scos/dev/technology-partner-guides/202005.0/marketing-and-conversion/analytics/fact-finder/integrating-fact-finder.md delete mode 100644 docs/scos/dev/technology-partner-guides/202005.0/marketing-and-conversion/analytics/fact-finder/using-fact-finder-campaigns.md delete mode 100644 docs/scos/dev/technology-partner-guides/202005.0/marketing-and-conversion/analytics/fact-finder/using-fact-finder-recommendation-engine.md delete mode 100644 docs/scos/dev/technology-partner-guides/202005.0/marketing-and-conversion/analytics/fact-finder/using-fact-finder-search-suggestions.md delete mode 100644 docs/scos/dev/technology-partner-guides/202005.0/marketing-and-conversion/analytics/fact-finder/using-fact-finder-search.md delete mode 100644 docs/scos/dev/technology-partner-guides/202005.0/marketing-and-conversion/analytics/fact-finder/using-fact-finder-tracking.md delete mode 100644 docs/scos/dev/technology-partner-guides/202005.0/marketing-and-conversion/analytics/installing-and-confiugring-minubo.md delete mode 100644 docs/scos/dev/technology-partner-guides/202005.0/marketing-and-conversion/customer-communication/episerver/episerver-api.md delete mode 100644 docs/scos/dev/technology-partner-guides/202005.0/marketing-and-conversion/customer-communication/episerver/episerver-order-reference-commands.md delete mode 100644 docs/scos/dev/technology-partner-guides/202005.0/marketing-and-conversion/customer-communication/episerver/installing-and-configuring-episerver.md delete mode 100644 docs/scos/dev/technology-partner-guides/202005.0/marketing-and-conversion/customer-communication/episerver/integrating-episerver.md delete mode 100644 docs/scos/dev/technology-partner-guides/202005.0/marketing-and-conversion/customer-communication/inxmail/installing-and-configuring-inxmail.md delete mode 100644 docs/scos/dev/technology-partner-guides/202005.0/marketing-and-conversion/customer-communication/inxmail/integrating-inxmail.md delete mode 100644 docs/scos/dev/technology-partner-guides/202005.0/marketing-and-conversion/customer-communication/inxmail/inxmail-api-requests.md delete mode 100644 docs/scos/dev/technology-partner-guides/202005.0/marketing-and-conversion/customer-communication/inxmail/inxmail-order-referenced-commands.md delete mode 100644 docs/scos/dev/technology-partner-guides/202005.0/marketing-and-conversion/personalization-and-cross-selling/econda/adding-the-econda-tracking-code.md delete mode 100644 docs/scos/dev/technology-partner-guides/202005.0/marketing-and-conversion/personalization-and-cross-selling/econda/exporting-econda-data.md delete mode 100644 docs/scos/dev/technology-partner-guides/202005.0/marketing-and-conversion/personalization-and-cross-selling/econda/installing-econda.md delete mode 100644 docs/scos/dev/technology-partner-guides/202005.0/marketing-and-conversion/personalization-and-cross-selling/econda/integrating-econda-cross-selling.md delete mode 100644 docs/scos/dev/technology-partner-guides/202005.0/marketing-and-conversion/personalization-and-cross-selling/econda/integrating-econda-front-end.md delete mode 100644 docs/scos/dev/technology-partner-guides/202005.0/marketing-and-conversion/personalization-and-cross-selling/econda/integrating-econda.md delete mode 100644 docs/scos/dev/technology-partner-guides/202005.0/operational-tools-monitoring-legal-etc/installing-and-configuring-tideways-with-vagrant.md delete mode 100644 docs/scos/dev/technology-partner-guides/202005.0/operational-tools-monitoring-legal-etc/loggly/configuring-loggly.md delete mode 100644 docs/scos/dev/technology-partner-guides/202005.0/operational-tools-monitoring-legal-etc/loggly/loggly.md delete mode 100644 docs/scos/dev/technology-partner-guides/202005.0/operational-tools-monitoring-legal-etc/new-relic/configuring-new-relic-logging.md delete mode 100644 "docs/scos/dev/technology-partner-guides/202005.0/operational-tools-monitoring-legal-etc/new-relic/installing-and-configuring-new-relic\342\200\223with\342\200\223vagrant.md" delete mode 100644 docs/scos/dev/technology-partner-guides/202005.0/order-management-erpoms/punchout-catalogs/eco-punchout-catalogs-feature-integration.md delete mode 100644 docs/scos/dev/technology-partner-guides/202005.0/order-management-erpoms/punchout-catalogs/eco-punchout-catalogs-product-bundles-feature-integration.md delete mode 100644 docs/scos/dev/technology-partner-guides/202005.0/order-management-erpoms/punchout-catalogs/punchout-catalog-feature-integration.md delete mode 100644 docs/scos/dev/technology-partner-guides/202005.0/payment-partners/adyen/enabling-filtering-of-payment-methods-for-adyen.md delete mode 100644 docs/scos/dev/technology-partner-guides/202005.0/payment-partners/adyen/installing-and-configuring-adyen.md delete mode 100644 docs/scos/dev/technology-partner-guides/202005.0/payment-partners/adyen/integrating-adyen-payment-methods.md delete mode 100644 docs/scos/dev/technology-partner-guides/202005.0/payment-partners/adyen/integrating-adyen.md delete mode 100644 docs/scos/dev/technology-partner-guides/202005.0/payment-partners/afterpay/installing-and-configuring-afterpay.md delete mode 100644 docs/scos/dev/technology-partner-guides/202005.0/payment-partners/afterpay/integrating-afterpay.md delete mode 100644 docs/scos/dev/technology-partner-guides/202005.0/payment-partners/amazon-pay/amazon-pay-sandbox-simulations.md delete mode 100644 docs/scos/dev/technology-partner-guides/202005.0/payment-partners/amazon-pay/amazon-pay-state-machine.md delete mode 100644 docs/scos/dev/technology-partner-guides/202005.0/payment-partners/amazon-pay/configuring-amazon-pay.md delete mode 100644 docs/scos/dev/technology-partner-guides/202005.0/payment-partners/amazon-pay/handling-orders-with-amazon-pay-api.md delete mode 100644 docs/scos/dev/technology-partner-guides/202005.0/payment-partners/amazon-pay/legacy-demoshop-integration/amazon-pay-configuration-for-the-legacy-demoshop.md delete mode 100644 docs/scos/dev/technology-partner-guides/202005.0/payment-partners/amazon-pay/legacy-demoshop-integration/amazon-pay-email-notifications.md delete mode 100644 docs/scos/dev/technology-partner-guides/202005.0/payment-partners/amazon-pay/legacy-demoshop-integration/amazon-pay-order-reference-and-information-about-shipping-addresses.md delete mode 100644 docs/scos/dev/technology-partner-guides/202005.0/payment-partners/amazon-pay/legacy-demoshop-integration/amazon-pay-refund.md delete mode 100644 docs/scos/dev/technology-partner-guides/202005.0/payment-partners/amazon-pay/legacy-demoshop-integration/amazon-pay-rendering-a-pay-with-amazon-button-on-the-cart-page.md delete mode 100644 docs/scos/dev/technology-partner-guides/202005.0/payment-partners/amazon-pay/legacy-demoshop-integration/amazon-pay-sandbox-simulations.md delete mode 100644 docs/scos/dev/technology-partner-guides/202005.0/payment-partners/amazon-pay/legacy-demoshop-integration/amazon-pay-state-machine.md delete mode 100644 docs/scos/dev/technology-partner-guides/202005.0/payment-partners/amazon-pay/legacy-demoshop-integration/amazon-pay-support-of-bundled-products.md delete mode 100644 docs/scos/dev/technology-partner-guides/202005.0/payment-partners/amazon-pay/legacy-demoshop-integration/legacy-demoshop-handling-orders-with-amazon-pay-api.md delete mode 100644 docs/scos/dev/technology-partner-guides/202005.0/payment-partners/amazon-pay/obtaining-an-amazon-order-reference-and-information-about-shipping-addresses.md delete mode 100644 docs/scos/dev/technology-partner-guides/202005.0/payment-partners/arvato/arvato-risk-check.md delete mode 100644 docs/scos/dev/technology-partner-guides/202005.0/payment-partners/arvato/arvato-store-order.md delete mode 100644 docs/scos/dev/technology-partner-guides/202005.0/payment-partners/arvato/installing-and-configuring-arvato.md delete mode 100644 docs/scos/dev/technology-partner-guides/202005.0/payment-partners/arvato/v.1.0/arvato-risk-check-1.0.md delete mode 100644 docs/scos/dev/technology-partner-guides/202005.0/payment-partners/arvato/v.1.0/installing-and-configuring-arvato-1.0.md delete mode 100644 docs/scos/dev/technology-partner-guides/202005.0/payment-partners/billpay/billpay-switching-invoice-payments-to-a-preauthorize-mode.md delete mode 100644 docs/scos/dev/technology-partner-guides/202005.0/payment-partners/billpay/integrating-billpay.md delete mode 100644 docs/scos/dev/technology-partner-guides/202005.0/payment-partners/braintree/braintree-performing-requests.md delete mode 100644 docs/scos/dev/technology-partner-guides/202005.0/payment-partners/braintree/braintree-request-workflow.md delete mode 100644 docs/scos/dev/technology-partner-guides/202005.0/payment-partners/braintree/installing-and-configuring-braintree.md delete mode 100644 docs/scos/dev/technology-partner-guides/202005.0/payment-partners/computop/computop-api-calls.md delete mode 100644 docs/scos/dev/technology-partner-guides/202005.0/payment-partners/computop/computop-oms-plugins.md delete mode 100644 docs/scos/dev/technology-partner-guides/202005.0/payment-partners/computop/installing-and-configuring-computop.md delete mode 100644 docs/scos/dev/technology-partner-guides/202005.0/payment-partners/computop/integrating-payment-methods-for-computop/computop-sofort.md delete mode 100644 docs/scos/dev/technology-partner-guides/202005.0/payment-partners/computop/integrating-payment-methods-for-computop/integrating-the-credit-card-payment-method-for-computop.md delete mode 100644 docs/scos/dev/technology-partner-guides/202005.0/payment-partners/computop/integrating-payment-methods-for-computop/integrating-the-crif-method-for-computop.md delete mode 100644 docs/scos/dev/technology-partner-guides/202005.0/payment-partners/computop/integrating-payment-methods-for-computop/integrating-the-direct-debit-payment-method-for-computop.md delete mode 100644 docs/scos/dev/technology-partner-guides/202005.0/payment-partners/computop/integrating-payment-methods-for-computop/integrating-the-easy-credit-payment-method-for-computop.md delete mode 100644 docs/scos/dev/technology-partner-guides/202005.0/payment-partners/computop/integrating-payment-methods-for-computop/integrating-the-ideal-payment-method-for-computop.md delete mode 100644 docs/scos/dev/technology-partner-guides/202005.0/payment-partners/computop/integrating-payment-methods-for-computop/integrating-the-paydirekt-payment-method-for-computop.md delete mode 100644 docs/scos/dev/technology-partner-guides/202005.0/payment-partners/computop/integrating-payment-methods-for-computop/integrating-the-paynow-payment-method-for-computop.md delete mode 100644 docs/scos/dev/technology-partner-guides/202005.0/payment-partners/computop/integrating-payment-methods-for-computop/integrating-the-paypal-payment-method-for-computop.md delete mode 100644 docs/scos/dev/technology-partner-guides/202005.0/payment-partners/crefopay/crefopay-callbacks.md delete mode 100644 docs/scos/dev/technology-partner-guides/202005.0/payment-partners/crefopay/crefopay-capture-and-refund-processes.md delete mode 100644 docs/scos/dev/technology-partner-guides/202005.0/payment-partners/crefopay/crefopay-enabling-b2b-payments.md delete mode 100644 docs/scos/dev/technology-partner-guides/202005.0/payment-partners/crefopay/crefopay-notifications.md delete mode 100644 docs/scos/dev/technology-partner-guides/202005.0/payment-partners/crefopay/crefopay-payment-methods.md delete mode 100644 docs/scos/dev/technology-partner-guides/202005.0/payment-partners/crefopay/crefopay.md delete mode 100644 docs/scos/dev/technology-partner-guides/202005.0/payment-partners/crefopay/installing-and-configuring-crefopay.md delete mode 100644 docs/scos/dev/technology-partner-guides/202005.0/payment-partners/crefopay/integrating-crefopay.md delete mode 100644 docs/scos/dev/technology-partner-guides/202005.0/payment-partners/heidelpay/configuring-heidelpay.md delete mode 100644 docs/scos/dev/technology-partner-guides/202005.0/payment-partners/heidelpay/heidelpay-oms-workflow.md delete mode 100644 docs/scos/dev/technology-partner-guides/202005.0/payment-partners/heidelpay/heidelpay-workflow-for-errors.md delete mode 100644 docs/scos/dev/technology-partner-guides/202005.0/payment-partners/heidelpay/installing-heidelpay.md delete mode 100644 docs/scos/dev/technology-partner-guides/202005.0/payment-partners/heidelpay/integrating-heidelpay.md delete mode 100644 docs/scos/dev/technology-partner-guides/202005.0/payment-partners/heidelpay/integrating-payment-methods-for-heidelpay/integrating-the-credit-card-secure-payment-method-for-heidelpay.md delete mode 100644 docs/scos/dev/technology-partner-guides/202005.0/payment-partners/heidelpay/integrating-payment-methods-for-heidelpay/integrating-the-direct-debit-payment-method-for-heidelpay.md delete mode 100644 docs/scos/dev/technology-partner-guides/202005.0/payment-partners/heidelpay/integrating-payment-methods-for-heidelpay/integrating-the-easy-credit-payment-method-for-heidelpay.md delete mode 100644 docs/scos/dev/technology-partner-guides/202005.0/payment-partners/heidelpay/integrating-payment-methods-for-heidelpay/integrating-the-ideal-payment-method-for-heidelpay.md delete mode 100644 docs/scos/dev/technology-partner-guides/202005.0/payment-partners/heidelpay/integrating-payment-methods-for-heidelpay/integrating-the-invoice-secured-b2c-payment-method-for-heidelpay.md delete mode 100644 docs/scos/dev/technology-partner-guides/202005.0/payment-partners/heidelpay/integrating-payment-methods-for-heidelpay/integrating-the-paypal-authorize-payment-method-for-heidelpay.md delete mode 100644 docs/scos/dev/technology-partner-guides/202005.0/payment-partners/heidelpay/integrating-payment-methods-for-heidelpay/integrating-the-paypal-debit-payment-method-for-heidelpay.md delete mode 100644 docs/scos/dev/technology-partner-guides/202005.0/payment-partners/heidelpay/integrating-payment-methods-for-heidelpay/integrating-the-sofort-payment-method-for-heidelpay.md delete mode 100644 docs/scos/dev/technology-partner-guides/202005.0/payment-partners/heidelpay/integrating-payment-methods-for-heidelpay/integrating-the-split-payment-marketplace-payment-method-for-heidelpay.md delete mode 100644 docs/scos/dev/technology-partner-guides/202005.0/payment-partners/klarna/klarna-invoice-pay-in-14-days.md delete mode 100644 docs/scos/dev/technology-partner-guides/202005.0/payment-partners/klarna/klarna-part-payment-flexible.md delete mode 100644 docs/scos/dev/technology-partner-guides/202005.0/payment-partners/klarna/klarna-payment-workflow.md delete mode 100644 docs/scos/dev/technology-partner-guides/202005.0/payment-partners/klarna/klarna-state-machine-commands-and-conditions.md delete mode 100644 docs/scos/dev/technology-partner-guides/202005.0/payment-partners/payolution/installing-and-configuring-payolution.md delete mode 100644 docs/scos/dev/technology-partner-guides/202005.0/payment-partners/payolution/integrating-the-installment-payment-method-for-payolution.md delete mode 100644 docs/scos/dev/technology-partner-guides/202005.0/payment-partners/payolution/integrating-the-invoice-payment-method-for-payolution.md delete mode 100644 docs/scos/dev/technology-partner-guides/202005.0/payment-partners/payolution/payolution-performing-requests.md delete mode 100644 docs/scos/dev/technology-partner-guides/202005.0/payment-partners/payolution/payolution-request-flow.md delete mode 100644 docs/scos/dev/technology-partner-guides/202005.0/payment-partners/ratenkauf-by-easycredit/installing-and-configuring-ratenkauf-by-easycredit.md delete mode 100644 docs/scos/dev/technology-partner-guides/202005.0/payment-partners/ratepay/disabling-address-updates-from-the-backend-application-for-ratepay.md delete mode 100644 docs/scos/dev/technology-partner-guides/202005.0/payment-partners/ratepay/integrating-payment-methods-for-ratepay/integrating-the-direct-debit-payment-method-for-ratepay.md delete mode 100644 docs/scos/dev/technology-partner-guides/202005.0/payment-partners/ratepay/integrating-payment-methods-for-ratepay/integrating-the-installment-payment-method-for-ratepay.md delete mode 100644 docs/scos/dev/technology-partner-guides/202005.0/payment-partners/ratepay/integrating-payment-methods-for-ratepay/integrating-the-invoice-payment-method-for-ratepay.md delete mode 100644 docs/scos/dev/technology-partner-guides/202005.0/payment-partners/ratepay/integrating-payment-methods-for-ratepay/integrating-the-prepayment-payment-method-for-ratepay.md delete mode 100644 docs/scos/dev/technology-partner-guides/202005.0/payment-partners/ratepay/ratepay-core-module-structure-diagram.md delete mode 100644 docs/scos/dev/technology-partner-guides/202005.0/payment-partners/ratepay/ratepay-facade-methods.md delete mode 100644 docs/scos/dev/technology-partner-guides/202005.0/payment-partners/ratepay/ratepay-payment-workflow.md delete mode 100644 docs/scos/dev/technology-partner-guides/202005.0/payment-partners/ratepay/ratepay-state-machine-commands-and-conditions.md delete mode 100644 docs/scos/dev/technology-partner-guides/202005.0/payment-partners/ratepay/ratepay-state-machines.md delete mode 100644 docs/scos/dev/technology-partner-guides/202005.0/product-information-pimerp/akeneo/installing-and-configuring-akeneo.md delete mode 100644 docs/scos/dev/technology-partner-guides/202005.0/shipment/seven-senders/installing-and-configuring-seven-senders.md delete mode 100644 docs/scos/dev/technology-partner-guides/202005.0/shipment/seven-senders/integrating-seven-senders.md delete mode 100644 docs/scos/dev/technology-partner-guides/202005.0/shipment/seven-senders/seven-senders-api-requests.md delete mode 100644 docs/scos/dev/technology-partner-guides/202005.0/shipment/seven-senders/seven-senders-mappers.md delete mode 100644 docs/scos/dev/technology-partner-guides/202005.0/shipment/seven-senders/seven-senders-persistance-layer.md delete mode 100644 docs/scos/dev/the-docker-sdk/202005.0/configuring-debugging-in-docker.md delete mode 100644 docs/scos/dev/the-docker-sdk/202005.0/deploy-file-reference-1.0.md delete mode 100644 docs/scos/dev/the-docker-sdk/202005.0/docker-environment-infrastructure.md delete mode 100644 docs/scos/dev/the-docker-sdk/202005.0/services.md delete mode 100644 docs/scos/dev/the-docker-sdk/202005.0/the-docker-sdk.md delete mode 100644 docs/scos/user/intro-to-spryker/releases/release-notes/release-notes-2018.12.0.md delete mode 100644 docs/scos/user/intro-to-spryker/releases/release-notes/release-notes-code-releases-may-2020/release-notes-code-releases-may-2020.md delete mode 100644 docs/scos/user/intro-to-spryker/releases/release-notes/release-notes-code-releases-may-2020/security-release-notes-code-releases-may-2020.md diff --git a/_config.yml b/_config.yml index 0bdd83a4d69..ca26a0e2d97 100644 --- a/_config.yml +++ b/_config.yml @@ -172,7 +172,6 @@ defaults: role: "all" versions: - '202005.0': 'Code releases 05.20' '202009.0': '202009.0' '202108.0': '202108.0' '202204.0': '202204.0' diff --git a/_data/sidebars/scos_user_sidebar.yml b/_data/sidebars/scos_user_sidebar.yml index 0b4af64d094..0a4bb608bea 100644 --- a/_data/sidebars/scos_user_sidebar.yml +++ b/_data/sidebars/scos_user_sidebar.yml @@ -49,12 +49,6 @@ entries: url: /docs/scos/user/intro-to-spryker/releases/release-notes/release-notes-202102.0/performance-release-notes-202102.0.html - title: "Security release notes: 202102.0 SEC" url: /docs/scos/user/intro-to-spryker/releases/release-notes/release-notes-202102.0/security-release-notes-202102.0-sec.html - - title: Release notes Code Releases May, 2020 - nested: - - title: Security Release Notes Code Releases May, 2020 - url: /docs/scos/user/intro-to-spryker/releases/release-notes/release-notes-code-releases-may-2020/security-release-notes-code-releases-may-2020.html - - title: Release Notes Code Releases May, 2020 - url: /docs/scos/user/intro-to-spryker/releases/release-notes/release-notes-code-releases-may-2020/release-notes-code-releases-may-2020.html - title: Docs release notes url: /docs/scos/user/intro-to-spryker/docs-release-notes.html - title: What's new diff --git a/docs/scos/dev/data-export/202005.0/data-export-orders-.csv-files-format.md b/docs/scos/dev/data-export/202005.0/data-export-orders-.csv-files-format.md deleted file mode 100644 index c29a780ac7f..00000000000 --- a/docs/scos/dev/data-export/202005.0/data-export-orders-.csv-files-format.md +++ /dev/null @@ -1,161 +0,0 @@ ---- -title: Data Export Orders .csv Files Format -description: The article explains the format of the orders.csv, order-items.csv, order-expenses.csv export files -last_updated: Sep 14, 2020 -template: data-export-template -originalLink: https://documentation.spryker.com/v5/docs/data-export-orders-csv-files-format -originalArticleId: f95897ec-f411-4f43-a70a-1ae6152b1efd -redirect_from: - - /v5/docs/data-export-orders-csv-files-format - - /v5/docs/en/data-export-orders-csv-files-format -related: - - title: Exporting Data - link: docs/scos/dev/data-export/page.version/data-export.html - - title: Sales Data Export feature integration - link: docs/scos/dev/feature-integration-guides/page.version/sales-data-export-feature-integration.html ---- - -This article contains content of the following files you get when [exporting data on orders](/docs/scos/dev/data-export/{{page.version}}/data-export.html) generated in Spryker: - -* orders.csv -* order-items.csv -* order-expenses.csv - -## Orders - -These are the header fields included in the order.csv file: - -| DEFAULT SEQUENCE | CSV COLUMN HEADER NAME | REQUIRED | TYPE | OTHER REQUIREMENTS / COMMENTS | DESCRIPTION | -| --- | --- | --- | --- | --- | --- | -| 1 | order_reference | Yes | String | Unique | Order reference identifier. | -| 2 | customer_reference | No | String | | Customer reference identifier. | -| 3 | order_created_at | No | Date Time | | Timestamp of this order creation. | -| 4 | order_updated_at | No | Date Time | | Last update timestamp of this order. | -| 5 | order_store | No | String | | The name of the store where the order was place. | -| 6 | email | No | String | | E-mail of the customer. | -| 7 | salutation | No | String | | Salutation used with the customer. | -| 8 | first_name | No | String | | Customer’s first name. | -| 9 | last_name | No | String | | Customer’s last name. | -| 10 | order_note | No | String | | Note added to the order. | -| 11 | currency_iso_code | No | String | | Indicates the currency used in the order. | -| 12 | price_mode | No | Enum (NET_MODE, GROSS_MODE) | | Indicates if the order was calculated in a net or gross price mode. | -| 13 | locale_name | No | String | | Sales order’s locale used during the checkout. The Sales Order has a relation to the Locale which was used during the checkout so that the same locale can be used for communication. | -| 14 | billing_address_salutation | No | ENUM (Mr, Mrs, Dr, Ms) | | Customer salutation used with the billing address. | -| 15 | billing_address_first_name | Yes | String | | Customer’s first name used in the billing address. | -| 16 | billing_address_last_name | Yes | String | | Customer’s last name used in the billing address. | -| 17 | billing_address_middle_name | No | String | | Customer’s middle name used in the billing address. | -| 18 | billing_address_email | No | String | | E-mail used with the billing address. | -| 19 | billing_address_cell_phone | No | String | | Cell phone used with the billing address. | -| 20 | billing_address_phone | No | String | | Phone used with the billing address. | -| 21 | billing_address_address1 | No | String | | Address first line of the billing address. Billing address is the address to which the invoice or bill is registered. | -| 22 | billing_address_address2 | No | String | | Address second line of the billing address. | -| 23 | billing_address_address3 | No | String | | Address third line of the billing address. | -| 24 | billing_address_city | Yes | String | | City of the billing address. | -| 25 | billing_address_zip_code | Yes | String | | Zip code of the billing address. | -| 26 | billing_address_po_box | No | String | | P.O. Box of the billing address. | -| 27 | billing_address_company | No | String | | Company used in the billing address. | -| 28 | billing_address_description | No | String | | Description used with the billing address. | -| 29 | billing_address_comment | No | String | | Comment used with the billing address. | -| 30 | billing_address_country | Yes | String | | Country of the billing address. | -| 31 | billing_address_region | No | String | | Region of the billing address. | -| 32 | order_totals_canceled_total | No | Number | The original value is multiplied by 100, before stored in this field. | Canceled total of the order totals. | -| 33 | order_totals_discount_total | No | Number | The original value is multiplied by 100, before stored in this field. | Discount total of the order totals. | -| 34 | order_totals_grand_total | No | Number | The original value is multiplied by 100, before stored in this field. | Grand total of the order totals. | -| 35 | order_totals_order_expense_total | No | Number | The original value is multiplied by 100, before stored in this field. | Order expense total of the order totals. | -| 36 | order_totals_refund_total | No | Number | The original value is multiplied by 100, before stored in this field. | Refund total of the order totals. | -| 37 | order_totals_subtotal | No | Number | The original value is multiplied by 100, before stored in this field. | Subtotal of the order totals. | -| 38 | order_totals_tax_total | No | Number | The original value is multiplied by 100, before stored in this field. | Tax total of the order totals. | -| 39 | order_comments | No | Object | The comments are presented in a JSON array format:
*order_comments
{% raw %}{{{% endraw %}username, message, createdat, updated_at}, …}* | Comments added by the customer to the sales order.
Username may be a different name from the customer first, middle or last name, e. g. a nickname. - | - - Check out the [orders.csv sample file](https://spryker.s3.eu-central-1.amazonaws.com/docs/Developer+Guide/Development+Guide/Data+Export/orders.csv). - -## Order items - -These are the header fields included in the order_items.csv file: - -| DEFAULT SEQUENCE | CSV COLUMN HEADER NAME | REQUIRED | TYPE | OTHER REQUIREMENTS / COMMENTS | DESCRIPTION | -| --- | --- | --- | --- | --- | --- | -| 1 | order_reference | Yes | String | | Order reference identifier. | -| 2 | order_item_reference | No | String | Unique | Order item reference identifier. | -| 3 | product_name | No | String | | Product name of the order item. | -| 4 | product_sku | Yes | String | | SKU of the order item. | -| 5 | canceled_amount | No | Number | Default = 0 | Canceled amount of the order item. | -| 6 | order_item_note | No | String | | Note of the order item. | -| 7 | discount_amount_aggregation | No | Number | Default = 0 | Discount amount aggregation of the order item. | -| 8 | discount_amount_full_aggregation | No | Number | Default = 0 | Discount amount full aggregation of the order item. | -| 9 | expense_price_aggregation | No | Number | Default = 0 | Expense price aggregation of the order item. | -| 10 | gross_price | No | Number | The original value is multiplied by 100, before stored in this field. | Gross price of the order item. | -| 11 | net_price | No | Number | The original value is multiplied by 100, before stored in this field. | Net price of the order item. | -| 12 | price | No | Number | The original value is multiplied by 100, before stored in this field. | Price of the order item. | -| 13 | price_to_pay_aggregation | No | Number | The original value is multiplied by 100, before stored in this field. | Price to pay aggregation of the order item. | -| 14 | product_option_price_aggregation | No | Number | The original value is multiplied by 100, before stored in this field. | Product option price aggregation of the order item. | -| 15 | quantity | Yes | Number | Default = 1 | Quantity of items in this order item. | -| 16 | refundable_amount | No | Number | The original value is multiplied by 100, before stored in this field. | Refundable amount of the order item. | -| 17 | subtotal_aggregation | No | Number | The original value is multiplied by 100, before stored in this field. | Subtotal aggregation of the order item. | -| 18 | tax_amount | No | Number | The original value is multiplied by 100, before stored in this field. | Tax amount of the order item. | -| 19 | tax_amount_after_cancellation | No | Number | The original value is multiplied by 100, before stored in this field. | Tax amount after cancellation of the order item. | -| 20 | tax_amount_full_aggregation | No | Number | The original value is multiplied by 100, before stored in this field. | Tax amount full aggregation of the order item. | -| 21 | tax_rate | No | Number | | Tax rate of the order item. | -| 22 | tax_rate_average_aggregation | No | Number | | Tax rate average aggregation of the order item. | -| 23 | order_item_created_at | No | Date Time | | Timestamp of this order item creation. | -| 24 | order_item_update_at | No | Date Time | | Last update timestamp of this order item. | -| 25 | order_item_state | Yes | String | | State of this order item. Project specific states defined in Spryker project state-machine are: Pay, Ship, Stock-update, Close, Return, Refund. | -| 26 | order_item_state_description | No | String | | State description of this order item. | -| 27 | order_item_process | No | String | | Process of this order item. | -| 28 | order_item_bundle_id | No | Number | | Bundle product information identifier of the order item. | -| 29 | order_item_bundle_note | No | String | | Note of the ordered item bundle product. | -| 30 | order_item_bundle_gross_price | Yes | Number | | Gross price of the ordered item bundle product. | -| 31 | order_item_bundle_image | No | String | | Image of the order item bundle product. | -| 32 | order_item_bundle_product_name | Yes | String | | Bundle product name of the order item. | -| 33 | order_item_bundle_net_price | No | Number | Default = 0 | Net price of the ordered item bundle. | -| 34 | order_item_bundle_price | No | Number | Default = 0 | Price of the ordered item bundle. | -| 35 | order_item_bundle_product_sku | Yes | String | | SKU of the product bundle in the order item. | -| 36 | order_shipment_id | No | Number | | Order shipment identifier. | -| 37 | shipment_carrier_name | No | String | | Name of the shipment carrier. | -| 38 | shipment_delivery_time | No | String | | Delivery time of the shipment. | -| 39 | shipment_method_name | No | String | | Name of the shipment method. | -| 40 | shipment_requested_delivery_date | No | Date | | Requested delivery date of the shipment. | -| 41 | shipping_address_salutation | No | String | | Customer salutation used with shipping address. | -| 42 | shipping_address_first_name | No | String | | Customer’s first name used in shipping address. | -| 43 | shipping_address_last_name | No | String | | Customer’s last name used in shipping address. | -| 44 | shipping_address_middle_name | No | String | | Customer’s middle name used in shipping address. | -| 45 | shipping_address_email | No | String | | E-mail used with shipping address. | -| 46 | shipping_address_cell_phone | No | String | | Cell phone used with shipping address. | -| 47 | shipping_address_phone | No | String | | Phone used with shipping address. | -| 48 | shipping_address_address1 | No | String | | Address first line of shipping address.
Shipping address is the address to where the order is shipped. | -| 49 | shipping_address_address2 | No | String | | Address second line of shipping address. | -| 50 | shipping_address_address3 | No | String | | Address third line of shipping address. | -| 51 | shipping_address_city | No | String | | City of shipping address. | -| 52 | shipping_address_zip_code | Yes | String | | Zip code of shipping address. | -| 53 | shipping_address_po_box | No | String | | P.O. Box of shipping address. | -| 54 | shipping_address_company | No | String | | Company used in shipping address. | -| 55 | shipping_address_description | No | String | | Description used with shipping address. | -| 56 | shipping_address_comment | No | String | | Comment used with shipping address. | -| 57 | shipping_address_country | Yes | String | | Country of shipping address. | -| 58 | shipping_address_region | No | String | | Region of shipping address. | - - Check out the [order-items.csv sample file](https://spryker.s3.eu-central-1.amazonaws.com/docs/Developer+Guide/Development+Guide/Data+Export/order-items.csv). - -## Order expenses - -| DEFAULT SEQUENCE | CSV COLUMN HEADER NAME | REQUIRED | TYPE | OTHER REQUIREMENTS / COMMENTS | DESCRIPTION | -| --- | --- | --- | --- | --- | --- | -| 1 | order_reference | Yes | String | | Order reference identifier. | -| 2 | order_shipment_id | No | Number | |Order shipment identification. | -| 3 | canceled_amount | No | Number | Default = 0 | Expense canceled amount. | -| 4 | discount_amount_aggregation | No | Number | Default = 0 | Expense discount amount aggregation. | -| 5 | gross_price | Yes | Number | The original value is multiplied by 100, before stored in this field | Gross price of the expense. | -| 6 | name | No | String | | Name of the expense. | -| 7 | net_price | No | Number | The original value is multiplied by 100, before stored in this field. | Net price of the expense. | -| 8 | price | No | Number | The original value is multiplied by 100, before stored in this field. | Price of the expense. | -| 9 |price_to_pay_aggregation | No | Number |The original value is multiplied by 100, before stored in this field. |Expense price to pay aggregation. | -| 10 | refundable_amount | No | Number | The original value is multiplied by 100, before stored in this field. |Refundable amount of the expense. | -| 11 | tax_amount | No | Number |The original value is multiplied by 100, before stored in this field. | Tax amount of the expense. | -| 12 | tax_amount_after_cancellation | No | Number | The original value is multiplied by 100, before stored in this field. | Expense tax amount after cancellation. | -| 13 | tax_rate | No | Number | | Tax rate of the expense. | -| 14 | type | No | String | | Type of expense. | -| 15 | expense_created_at | Yes | Date Time | |Timestamp of this sales expense creation. | -| 16 |expense_updated_at | Yes | Date Time | | Last update timestamp of this sales expense. | - - Check out the [order-expenses.csv sample file](https://spryker.s3.eu-central-1.amazonaws.com/docs/Developer+Guide/Development+Guide/Data+Export/order-expenses.csv). diff --git a/docs/scos/dev/data-export/202005.0/data-export.md b/docs/scos/dev/data-export/202005.0/data-export.md deleted file mode 100644 index 00104da8ab3..00000000000 --- a/docs/scos/dev/data-export/202005.0/data-export.md +++ /dev/null @@ -1,280 +0,0 @@ ---- -title: Exporting Data -description: This article will teach you how to export data from a Spryker shop to an external system -last_updated: Sep 14, 2020 -template: data-export-template -originalLink: https://documentation.spryker.com/v5/docs/exporting-data -originalArticleId: b97e760e-9445-4fe6-a799-158a6247f8c4 -redirect_from: - - /v5/docs/exporting-data - - /v5/docs/en/exporting-data - - /docs/scos/dev/data-export/202005.0/yml-export-configuration-file -related: - - title: Sales Data Export feature integration - link: docs/scos/dev/feature-integration-guides/page.version/sales-data-export-feature-integration.html - - title: Data Export Orders .csv Files Format - link: docs/scos/dev/data-export/page.version/data-export-orders-.csv-files-format.html ---- - -{% info_block warningBox "BETA version" %} - -The Data Export is currently a BETA feature. - -{% endinfo_block %} - -To quickly populate an external system like ERP or OMS with data from your Spryker shop, you can export it as CSV files from the Spryker shop and then import them into the external system. - -For now, you can export only order data, which includes data on: - -* Orders -* Order items -* Order expenses - -{% info_block infoBox "Export file format" %} - -Currently, we only support .csv as a format for file exports out of the box. - -{% endinfo_block %} - -To export the order data, you need to: - -1. Make sure you have the [Sales Data Export feature installed](/docs/scos/dev/feature-integration-guides/{{page.version}}/sales-data-export-feature-integration.html) for your project.. -2. Specify necessary configurations in the YML export configuration file residing in `./data/export/config/`. See [YML Export Configuration File](#yml-export-configuration-file) for details on the YML export config file structure and configuration options. -3. Run `console data:export --config file-name.yml`, where `file-name.yml` is the name of the YML export configuration file. The command creates export CSV files in `./data/export/`folder for each *data_entity* of the YML file. For each store specified in the YML file, a separate file is created. See [Structure of the .yml Export Configuration File](/docs/scos/dev/data-export/{{page.version}}/data-export.html#structure) for an example of how the export works. - -{% info_block infoBox "Multi-store support" %} - -Spryker Data Export supports the multi-store functionality, which means that you can export data for multiple stores. - -{% endinfo_block %} - -## YML export configuration file - - - -The YML export configuration file allows you to define what orders you want to export. The following content is exported: - -* order -* order-item -* order-expense - -By default, the YML export configuration file resides in `./data/export/config/`. You can adjust your YML export configuration file, but when doing so, stick to its [structure](/docs/scos/dev/data-export/{{page.version}}/data-export.html#structure) and take the possible [data filtering options](/docs/scos/dev/data-export/{{page.version}}/data-export.html#filter) into account. - -{% info_block warningBox "Note" %} - -The root of data export files is configured globally, and it is not changeable by data export. - -{% endinfo_block %} - - - -### Structure of the YML export configuration file - -Structure of the YML export configuration file is as follows: - -```yml -defaults: - filter_criteria: &default_filter_criteria - order_created_at: - type: between - from: '' - to: '' - -actions: - - data_entity: order - destination: '{data_entity}s__{timestamp}.{extension}' - filter_criteria: - <<: *default_filter_criteria - store_name: [] - - data_entity: order - destination: '{data_entity}s__{timestamp}.{extension}' - filter_criteria: - <<: *default_filter_criteria - store_name: [] - - data_entity: order - destination: '{data_entity}s__{timestamp}.{extension}' - filter_criteria: - <<: *default_filter_criteria - store_name: [] - - - data_entity: order-item - destination: '{data_entity}s__{timestamp}.{extension}' - filter_criteria: - <<: *default_filter_criteria - store_name: [] - - - data_entity: order-expense - destination: '{data_entity}s__{timestamp}.{extension}' - filter_criteria: - <<: *default_filter_criteria - store_name: [] -``` - -Type of content to export is defined in section *actions* by *data_entity* and must be *order*, *order-item* and *order-expense* . You can define what stores you want to run export for, and specify order dates you want to export data for. See [Setting the Filter Criteria](/docs/scos/dev/data-export/{{page.version}}/data-export.html#filter) in a YML File for details on how to export order data for specific stores and time period. - -Check out the default YML export configuration file [order_export_config.yml](https://github.com/spryker-shop/suite/blob/master/data/export/production/order_export_config.yml) for example. It’s configuration presupposes batch export of the three data entities: *order*, *order-item*, *order-expense.* - -When running the command for data export with this file,` console data:export --config order_export_config.yml`, exported CSV files are created in `data/export`. For each data entity and store, a separate file is generated, namely: - -* order-expenses_AT.csv -* order-expenses_DE.csv -* order-items_AT.csv -* order-items_DE.csv -* orders_AT.csv -* orders_DE.csv - -See[ Data Export Ordres .csv Files Format](/docs/scos/dev/data-export/{{page.version}}/data-export-orders-.csv-files-format.html) for details on the content of each of the files. - - -### Setting the filter criteria in a YML file - -You can set the following filter criteria for the order data export in your YML export configuration file: - -* *Store names*: stores from which the data are exported. -* *Date and time range*: interval *from* what date and time *to* what date and time the order was created, including the *from* and the *to* values. If you use the label `order_updated_at`, the range is relative to the date and time the order was updated. - -#### Defining the stores for order data export - -To define the stores you want to export the order data for, specify them in *destination* for the specific data entities. Keep in mind that you have to create individual files for each data entity and for each store if your filter criteria include *store_name*. - -For example, if you want to export the *order-expenses* data for the DE store, and *order-items* data for DE and AT stores, your YML file should look like this: - -```yml -defaults: - filter_criteria: &default_filter_criteria - order_created_at: - type: between - from: '2020-05-01 00:00:00' - to: '2020-12-31 23:59:59' - -actions: - - data_entity: order-expense - destination: '{data_entity}s_DE_{timestamp}.{extension}' - filter_criteria: - <<: *default_filter_criteria - store_name: [DE] - - - data_entity: order-item - destination: '{data_entity}s_DE_{timestamp}.{extension}' - filter_criteria: - <<: *default_filter_criteria - store_name: [DE] - - data_entity: order-item - destination: '{data_entity}s_AT_{timestamp}.{extension}' - filter_criteria: - <<: *default_filter_criteria - store_name: [AT] - ``` - -#### Defining the date and time range for order data export - -The default date and time range filter criteria, for example, the order creation dates filter applied to all *data_entity* items by default, is specified in the *defaults* section: - -```yml -defaults: - filter_criteria: &default_filter_criteria - order_created_at: - type: between - from: '2020-05-01 08:00:00' - to: '2020-06-07 08:00:00' - ``` - -{% info_block infoBox "Info" %} - -To use the the date and time range filter criteria of the *defaults* section, and apply the filter criteria to *data_entity* items of the *actions* section, `<<: *default_filter_criteria` must be declared in the `filter_criteria` parameter of each *data_entity* item. - -{% endinfo_block %} - -You can change the filter criteria for any * data_entity* items by replacing `<<: *default_filter_criteria` with the values you need. - -For example, suppose that for the *order-expenses* data entity in the AT store you want to export only orders that were created on May 15th, 2020. In this case, you replace the `<<: *default_filter_criteria` line under `filter_criteria` for *order-expenses* in AT store with this: - -```yml -order_created_at: - type: between - from: '2020-05-15 00:00:00' - to: '2020-05-15 23:59:59' - ``` - -Example: - -```yml -defaults: -filter_criteria: &default_filter_criteria - order_created_at: - type: between - from: '2020-05-01 00:00:00' - to: '2020-06-07 23:59:59' - -actions: - - data_entity: order-expense - destination: '{data_entity}s_DE.{extension}' - filter_criteria: - <<: *default_filter_criteria - store_name: DE - - data_entity: order-expense - destination: '{data_entity}s_AT.{extension}' - filter_criteria: - order_created_at: - type: between - from: '2020-05-15 00:00:00' - to: '2020-05-15 23:59:59' - store_name: AT - ... -``` - -After running the command with the changed filter criteria for *order-expense*, the *order-expenses_AT.csv* file will only contain the orders created on May 15th, 2020. The other files will contain the orders created from May 1st till July 6th, as specified in *&default_filter_criteria* of the *defaults* section. - -## Overwriting existing .csv files upon repeated command run - -When exporting data, the newly generated CSV files overwrite the existing ones. Currently, this behavior is not configurable. - -If you wish to generate new CSV files without overwriting eventual existing ones, you may use a *{timestamp}* tag in the name of the file to be generated. For example, if you use the default structure of the YML export configuration file, upon repeated launch of the `console data:export --config file-name.yml`, the already existing export CSV files will be generated with different file names according to the *{timestamp}* on the moment of its creation, and therefore will not be overwritten. -And vice versa: if you want to overwrite the existing files, remove *{timestamp}* from the *destination* parameter of the YML file for the necessary *data_entity* items, for example: - -Initial file: - -```yml -defaults: - filter_criteria: &default_filter_criteria - order_created_at: - type: between - from: '2020-05-01 08:00:00' - to: '2020-06-07 08:00:00' - -actions: - - data_entity: order-expense - destination: '{data_entity}s_DE_{timestamp}.{extension}' - filter_criteria: - <<: *default_filter_criteria - store_name: DE - - data_entity: order-expense - destination: '{data_entity}s_AT_{timestamp}.{extension}' - filter_criteria: - <<: *default_filter_criteria - store_name: AT - ... -``` -File with the removed *{timestamp}*: - -```yml -defaults: - filter_criteria: &default_filter_criteria - order_created_at: - type: between - from: '2020-05-01 08:00:00' - to: '2020-06-07 08:00:00' - -actions: - - data_entity: order-expense - destination: '{data_entity}s_DE.{extension}' - filter_criteria: - <<: *default_filter_criteria - store_name: DE - - data_entity: order-expense - destination: '{data_entity}s_AT.{extension}' - filter_criteria: - <<: *default_filter_criteria - store_name: AT - ... - ``` diff --git a/docs/scos/dev/data-import/202005.0/creating-a-data-importer.md b/docs/scos/dev/data-import/202005.0/creating-a-data-importer.md deleted file mode 100644 index 22997501e91..00000000000 --- a/docs/scos/dev/data-import/202005.0/creating-a-data-importer.md +++ /dev/null @@ -1,433 +0,0 @@ ---- -title: Creating a Data Importer -description: The following article describes how to build your own DataImport for a specific type. All steps in this article are built on real life example for importing product images. -last_updated: Sep 14, 2020 -template: data-import-template -originalLink: https://documentation.spryker.com/v5/docs/ht-data-import -originalArticleId: 9f55c735-9168-4d40-9519-bad08890870e -redirect_from: - - /v5/docs/ht-data-import - - /v5/docs/en/ht-data-import ---- - -The following article describes how to build your data importer for a specific type. All steps in this article are built on the real-life example for importing product images. - -{% info_block infoBox "File Import Formats" %} - -Currently, we only support CSV as a format for file imports out of the box. However, you can create your own file reader if you want to use a different format. - -{% endinfo_block %} - -## Prerequisites -Before you start creating a data importer, you need to know what data it should include. We recommend you start by checking out the respective database tables you want to fill with data. The image below shows the table relation for product images. -![Database schema](https://spryker.s3.eu-central-1.amazonaws.com/docs/Tutorials/HowTos/HowTo+Add+New+DataImport+Type/product_image_import_database_schema.png) - -From this schema, you can easily identify the data columns you need for your import file. So the relevant fields to fill are: - -* name (spy_product_image_set) -* external_url_large (spy_product_image) -* external_url_small (spy_product_image) -* fk_locale (spy_product_image_set) -* fk_product (spy_product_image_set) -* fk_product_abstract (spy_product_image_set) - -{% info_block infoBox "Info" %} - -All `fk_*` fields are foreign keys to other database tables. We can not know the id's of the related entities so we need to fill in those fields with a unique identifier. - -{% endinfo_block %} - -For the database field `fk_locale` we will use the name of the locale for which we need the id (e.g. de_DE). This value will then be used later to fetch the id for the given locale name. -We will use the same technique for the `fk_product` and `fk_product_abstract` fields. - -{% info_block infoBox "Info" %} - -To identify the data for your import file, you can also check out the .csv files of individual data importers listed in [About Data Import Categories](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/about-data-import-categories.html). - -{% endinfo_block %} - -Now that you know what data your import file should include, you can proceed with the first step of creating a data importer: creating an import file. - -## Create an Import File -Since only .csv format is supported for import out of the box, we will start with creating a .csv file in any preferred editor. - -Your .csv file for the product images import will contain the following header columns: - -* image_set_name -* external_url_large -* external_url_small -* locale -* concrete_sku -* abstract_sku - -Now, you can start to fill in some data into the new file. We recommend adding only a couple of entries to check after the first import run if all needed data is imported. - -Once you populate all columns, your CSV file should be similar to this one: -![CSV file](https://spryker.s3.eu-central-1.amazonaws.com/docs/Tutorials/HowTos/HowTo+Add+New+DataImport+Type/product_image_import_csv_file_example.png) - -Save the new file under `data/import/*`. - -That’s it - your import file is ready. Now you have to configure the data importer. - -## Configure the Data Importer -Every import type needs its own `DataImporterConfiguration`. To add it, open the `DataImportConfig` class and add a constant for the import type. - -{% info_block infoBox %} -The constant is used to identify an import type. More information about it will follow later in this article. In our case we will use const `IMPORT_TYPE_PRODUCT_IMAGE = 'product-image';`. -{% endinfo_block %} - -You also need to define the new data importer in the [configuration .yml file](/docs/scos/dev/data-import/{{page.version}}/importing-data-with-a-configuration-file.html). Add the following lines to the `/data/import/config/full_import_config.yml` configuration file: - -``` -actions: - ... - - data_entity: product-image - source: data/import/icecat_biz_data/product_image.csv -``` -where: -* `data_entity` represents the name of your data importer; -* `source` indicates the path to your `.csv` file with data to import. - -## Create a Writer Step - -{% info_block infoBox "Steps" %} -(Each importer needs at least one step to write the data from the file to a database. You can add as many steps as you need to your `DataSetStepBroker`. -{% endinfo_block %} - -First, we will create a new class called `ProductImageWriterStep` in `"*/Zed/DataImport/Business/Model/ProductImage/"` with this content: - -**ProductImageWriterStep** - -```php -getCsvDataImporterWriterAwareFromConfig( - $this->getConfig()->buildImporterConfigurationByDataImportConfigAction($dataImportConfigurationActionTransfer) - ); - - $dataSetStepBroker = $this->createTransactionAwareDataSetStepBroker(ProductImageWriterStep::BULK_SIZE); - $dataSetStepBroker - ->addStep(new ProductImageWriterStep()); - - $dataImporter->addDataSetStepBroker($dataSetStepBroker); - - return $dataImporter; -} -``` -2. Add the new DataImporter in `DataImportBusinessFactory::getDataImporterByType()`: - -```php -public function getDataImporterByType(DataImportConfigurationActionTransfer $dataImportConfigurationActionTransfer): ?DataImporterInterface -{ - switch ($dataImportConfigurationActionTransfer->getDataEntity()) { - ... - case DataImportConfig::IMPORT_TYPE_PRODUCT_IMAGE: - return $this->createProductImageImporter($dataImportConfigurationActionTransfer); - } -} -``` - -In the `DataImportBusinessFactory::getImporter()` we now add the new `DataImporter` with `$dataImporterCollection->addDataImporter($this->createProductImageImporter())`. - -3. Register a new console command in `ConsoleDependencyProvider` to allow execution of the import command from the console. Since the `DataImport` module brings a generic console command which can be used several times to add a console command for each data import type, you only need to register it once as follows: - -```php -/** - * @param \Spryker\Zed\Kernel\Container $container - * - * @return \Symfony\Component\Console\Command\Command[] - */ -public function getConsoleCommands(Container $container) -{ - $commands = [ - new DataImportConsole(), - ... - new DataImportConsole(DataImportConsole::DEFAULT_NAME . ':' . DataImportConfig::IMPORT_TYPE_PRODUCT_IMAGE), - ... - ]; -} -``` - -Now you have a new console command `data:import:product-image` available. When you run `vendor/bin/console` you will see a new entry: `data:import:product-image This command executes your "product-image" importer.` - -## Execute the Data Importer -As mentioned in the previous step, the DataImport module brings a generic command which can be used several times. You need to at least register it once without a constructor argument. - -{% info_block infoBox "Info" %} - -This command will execute all the `DataImporter` registered in your `full_import_config.yml` one by one. - -{% endinfo_block %} - -As you already made it in the example above, you can add the command with a new name over and over again. This brings in the ability to execute only a specific data importer. - -When you now execute `vendor/bin/console data:import:product-image` you will see the debug output from the `ProductImageWriterStep`. - -There are a lot of options that you can set for an import. If you need to debug one specific line of an import file, you can use offset and limit like this `vendor/bin/console data:import:product-image -o 43 -l 1`. - -{% info_block infoBox "Info" %} - -This will then only execute the data set at potion 43 of your import file. - -{% endinfo_block %} - - -The `DataImporter` catches exceptions by default and continues to import data. In development mode, you can use the throw-exception option to throw the occurred exception instead of catching it. - -{% info_block infoBox "Info" %} - -There are a couple more options, you can see them when you execute `vendor/bin/console data:import:product-image -h`, the console command will then print the help page for the given command. - -{% endinfo_block %} - -## Finalize the Data Importer -We have made sure that the data importer can be executed, but we only print a debug message right now. We need to do some additional things to really save some data. Follow the steps below to finalize your data importer. - -### 1. Convert Logical Identifier to Foreign Keys -As mentioned in the [Prerequisites](#prerequisites), we can not use foreign keys in our import file - we need a logical identifier that can now be used to get the foreign key of a related entity. - -There are several ways of how we can get the logical identifier. For example, we could add a new Step e.g. `LocaleNameToIdLocaleStep`. However, in our case, it’s better to use a Repository, which provides us with a getter to retrieve the `id_locale` by its name. We will take this approach and do the following: - - 1. Add `LocaleRepository` to get the foreign key of a locale by its name: - -```php -loadLocaleMap(); - } - - return static::$localeMap[$locale]; - } - - /** - * @return void - */ - private function loadLocaleMap() - { - $localeCollection = SpyLocaleQuery::create() - ->select([SpyLocaleTableMap::COL_ID_LOCALE, SpyLocaleTableMap::COL_LOCALE_NAME]) - ->find(); - - foreach ($localeCollection as $locale) { - static::$localeMap[$locale[SpyLocaleTableMap::COL_LOCALE_NAME]] = $locale[SpyLocaleTableMap::COL_ID_LOCALE]; - } - } - -} -``` - -This `Repository` is very simple but does what we need right now. - -2. Add the following code, as we need to change our `ProductImageWriterStep` to use it: - -```php -/** - * @var \Pyz\Zed\DataImport\Business\Model\Locale\Repository\LocaleRepositoryInterface - */ -protected $localeRepository; - -/** - * @param \Pyz\Zed\DataImport\Business\Model\Locale\Repository\LocaleRepositoryInterface $localeRepository - */ -public function __construct(LocaleRepositoryInterface $localeRepository) -{ - $this->localeRepository = $localeRepository; -} -``` - -Now, we need to inject this new Repository into our `ProductImageWriterStep` inside of the business factory. -{% info_block infoBox "Info" %} - -When this is done we can use it like this: `$idLocale = $this->localeRepository->getIdLocaleByLocale($dataSet[static::KEY_LOCALE]);` - -{% endinfo_block %} - -We need to add a similar `Repository` to retrieve the **ID** of an abstract or concrete product by its SKU. This is then also added to our `ProductImageWriterStep` as already done with `LocaleRepository`. - -### 2. Find or Create Entities -We will now create the `spy_product_image_set`, `spy_product_image`, `spy_product_image_set_to_product_image` and entities. - -With the first run of an importer, all entities are new and we need to do an insert. When the importer is executed more than once, it updates the existing entities. To execute this approach, we use Propel's `findOrCreate()` method. Do the following: - -1. Find or create `spy_product_image_set`. Add the following code to the `ProductImageWriterStep`: - -```php -/** - * @param \Spryker\Zed\DataImport\Business\Model\DataSet\DataSetInterface $dataSet - * - * @return \Orm\Zed\ProductImage\Persistence\SpyProductImageSet - */ -protected function findOrCreateImageSet(DataSetInterface $dataSet) -{ - $idLocale = $this->getIdLocaleByLocale($dataSet); - - $query = SpyProductImageSetQuery::create() - ->filterByName($dataSet[static::KEY_IMAGE_SET_NAME]) - ->filterByFkLocale($idLocale); - - if (!empty($dataSet[static::KEY_ABSTRACT_SKU])) { - $idProductAbstract = $this->productRepository->getIdProductAbstractByAbstractSku($dataSet[static::KEY_ABSTRACT_SKU]); - $query->filterByFkProductAbstract($idProductAbstract); - } - - if (!empty($dataSet[static::KEY_CONCRETE_SKU])) { - $idProduct = $this->productRepository->getIdProductByConcreteSku($dataSet[static::KEY_CONCRETE_SKU]); - $query->filterByFkProduct($idProduct); - } - - $productImageSetEntity = $query->findOneOrCreate(); - if ($productImageSetEntity->isNew() || $productImageSetEntity->isModified()) { - $productImageSetEntity->save(); - } - - return $productImageSetEntity; -} - -/** - * @param \Spryker\Zed\DataImport\Business\Model\DataSet\DataSetInterface $dataSet - * - * @return int - */ -protected function getIdLocaleByLocale(DataSetInterface $dataSet) -{ - $idLocale = null; - - if (!empty($dataSet[static::KEY_LOCALE])) { - $idLocale = $this->localeRepository->getIdLocaleByLocale($dataSet[static::KEY_LOCALE]); - } - - return $idLocale; -} -``` - -We want to allow `fk_locale` to be null. Either `fk_product` or `fk_product_abstract` must be set. For performance reasons, we save the entity only when it's new or modified. - -2. Find or create the `spy_product_image` by adding the following code to the `ProductImageWriterStep`: - -```php -/** - * We expect that the large URL is the unique identifier for an image. - * - * @param \Spryker\Zed\DataImport\Business\Model\DataSet\DataSetInterface $dataSet - * - * @return \Orm\Zed\ProductImage\Persistence\SpyProductImage - */ -protected function findOrCreateImage(DataSetInterface $dataSet) -{ - $productImageEntity = SpyProductImageQuery::create() - ->filterByExternalUrlLarge($dataSet[static::KEY_EXTERNAL_URL_LARGE]) - ->findOneOrCreate(); - - $productImageEntity - ->setExternalUrlSmall($dataSet[static::KEY_EXTERNAL_URL_SMALL]); - - if ($productImageEntity->isNew() || $productImageEntity->isModified()) { - $productImageEntity->save(); - } - - return $productImageEntity; -} -``` - -3. Add the relation `spy_product_image_set_to_product_image` by adding the following code to `ProductImageWriterStep`: - -```php -/** - * @param \Orm\Zed\ProductImage\Persistence\SpyProductImageSet $imageSetEntity - * @param \Orm\Zed\ProductImage\Persistence\SpyProductImage $productImageEntity - * - * @return void - */ -protected function updateOrCreateImageToImageSetRelation(SpyProductImageSet $imageSetEntity, SpyProductImage $productImageEntity) -{ - $productImageSetToProductImageEntity = SpyProductImageSetToProductImageQuery::create() - ->filterByFkProductImageSet($imageSetEntity->getIdProductImageSet()) - ->filterByFkProductImage($productImageEntity->getIdProductImage()) - ->findOneOrCreate(); - - $productImageSetToProductImageEntity - ->setSortOrder(0); - - if ($productImageSetToProductImageEntity->isNew() || $productImageSetToProductImageEntity->isModified()) { - $productImageSetToProductImageEntity->save(); - } -} -``` - -### 3. Fill the Execute Method: - -```php -/** - * @param \Spryker\Zed\DataImport\Business\Model\DataSet\DataSetInterface $dataSet - * - * @return void - */ -public function execute(DataSetInterface $dataSet) -{ - $imageSetEntity = $this->findOrCreateImageSet($dataSet); - $productImageEntity = $this->findOrCreateImage($dataSet); - - $this->updateOrCreateImageToImageSetRelation($imageSetEntity, $productImageEntity); -} -``` - -## 7. Run the Importer -That’s it! Now when you run the console command `vendor/bin/console data:import:product-image`, you will see an output similar to this one: - -![Importer command](https://spryker.s3.eu-central-1.amazonaws.com/docs/Tutorials/HowTos/HowTo+Add+New+DataImport+Type/product_image_import_console_output.png) diff --git a/docs/scos/dev/data-import/202005.0/data-import-categories/about-data-import-categories.md b/docs/scos/dev/data-import/202005.0/data-import-categories/about-data-import-categories.md deleted file mode 100644 index 6b2c7c04d40..00000000000 --- a/docs/scos/dev/data-import/202005.0/data-import-categories/about-data-import-categories.md +++ /dev/null @@ -1,22 +0,0 @@ ---- -title: About Data Import Categories -last_updated: Sep 14, 2020 -template: data-import-template -originalLink: https://documentation.spryker.com/v5/docs/about-data-import-categories -originalArticleId: 9c3eb792-4511-493c-afff-4c14e3423ba8 -redirect_from: - - /v5/docs/about-data-import-categories - - /v5/docs/en/about-data-import-categories ---- - -Each functional entity (category) has its own set of data importers. To import data for these categories, you have to run their data importers containing the .csv files with data. -This section provides details on data importers' Demo Shop group categories and their correspondent .csv files. Here you will information on all the .csv file fields, dependencies, as well as examples and templates of the .csv files. -For details on building your import files, choose the Demo Shop category you want to import data for, and follow the information contained therein: - -* [Commerce Setup](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/commerce-setup/commerce-setup.html): to set up the multi-store environment, glossary, warehouses, tax levels, shipping and payment methods. -* [Catalog Setup](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/catalog-setup/catalog-setup.html): to import all the product-related data necessary for selling products/services in your online store. -* [Special Product Types](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/special-product-types/special-product-types.html): to import all the necessary data related to the special product types information in the online store. For example, this category includes data on Gift Cards and Product Options. -* [Merchandising Setup](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/merchandising-setup/merchandising-setup.html): to import all the necessary data related to the merchandising information in the online store. For example, this category includes data on Product Labels, Product Relations, Discounts, etc. -* [Navigation Setup](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/navigation-setup/navigation-setup.html): to import all the necessary data related to the navigation in the online store. -* [Content Management](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/content-management/content-management.html): to import all the necessary data related to content elements in the online store. For example, this category includes data on CMS Pages, Blocks, Templates etc. -* [Miscellaneous](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/miscellaneous/miscellaneous.html): to import several additional data not related to any category to sell the products/services online. For example, this category includes data on Comments and Mime Types. diff --git a/docs/scos/dev/data-import/202005.0/data-import-categories/catalog-setup/catalog-setup.md b/docs/scos/dev/data-import/202005.0/data-import-categories/catalog-setup/catalog-setup.md deleted file mode 100644 index 3c21cfac190..00000000000 --- a/docs/scos/dev/data-import/202005.0/data-import-categories/catalog-setup/catalog-setup.md +++ /dev/null @@ -1,49 +0,0 @@ ---- -title: Catalog Setup -last_updated: Sep 14, 2020 -template: data-import-template -originalLink: https://documentation.spryker.com/v5/docs/catalog-setup -originalArticleId: 42991e95-5293-496c-a79b-ca5136f2f12a -redirect_from: - - /v5/docs/catalog-setup - - /v5/docs/en/catalog-setup ---- - -**Catalog Setup** contains data required to sell products and build their main structure. - -{% info_block warningBox "Important" %} - -We recommend setting up the Catalog after having done the [Commerce Setup](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/commerce-setup/commerce-setup.html) (which provides the overall structure of the store). - -{% endinfo_block %} - -This section will help you import the necessary product-related data to be able to sell products/services in your online store. We have structured it into four main categories focusing on the following topics: - -* [Categories](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/catalog-setup/categories/categories.html) -* [Products](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/catalog-setup/products/products.html) -* [Pricing](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/catalog-setup/pricing/pricing.html) -* [Stocks](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/catalog-setup/stocks/stocks.html) - -Within the [Categories](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/catalog-setup/categories/categories.html) section, you will find all information about the data imports required to set up categories that can be used in your online store as well as whether they are active, searchable in the menu, etc. - -The [Products](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/catalog-setup/products/products.html) section will help you import all data defining the products' properties such as the abstract products, the concrete products, product images, and any type of related attributes which describe the products' properties (e.g., their specifications, colors, sizes, etc.). - -In the [Pricing](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/catalog-setup/pricing/pricing.html) section, you will be able to import the data necessary to set up prices for all the products you would like to sell in your online store, including advanced pricing such as scheduled prices (e.g., for special sales campaigns like Black Friday). - -In the [Stocks](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/catalog-setup/stocks/stocks.html) section, we describe the data import containing the number of product units stored in your warehouses as well as any type of products and services which are never out of stock (e.g., software downloads). - - -{% info_block warningBox "Import order" %} - -By default, most of the product data is stored in a separate subfolder in `data/import/icecat_biz_data`. The order in which the files are imported is **very strict**: -1. Any product-related entities such as categories, attributes, and tax sets must be imported before the actual products. -2. [product_abstract.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/catalog-setup/products/file-details-product-abstract.csv.html) and for multi-store setups [product_abstract_store.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/catalog-setup/products/file-details-product-abstract-store.csv.html). -3. [product_concrete.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/catalog-setup/products/file-details-product-concrete.csv.html). -4. Other product data such as images, product sets, etc. in any order. - -{% endinfo_block %} - - - - - diff --git a/docs/scos/dev/data-import/202005.0/data-import-categories/catalog-setup/categories/categories.md b/docs/scos/dev/data-import/202005.0/data-import-categories/catalog-setup/categories/categories.md deleted file mode 100644 index 170222863ab..00000000000 --- a/docs/scos/dev/data-import/202005.0/data-import-categories/catalog-setup/categories/categories.md +++ /dev/null @@ -1,22 +0,0 @@ ---- -title: Categories -last_updated: Sep 14, 2020 -template: data-import-template -originalLink: https://documentation.spryker.com/v5/docs/categories -originalArticleId: 3f7676b3-1279-45df-9799-392a1401af0b -redirect_from: - - /v5/docs/categories - - /v5/docs/en/categories ---- - -**Categories** contains data required to set up categories in your online store. We have structured this section according to the two .csv files that you will have to use to import the data: - -* [category.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/catalog-setup/categories/file-details-category.csv.html): allows you to import all relevant information about the categories such as categories names, key, descriptions and additional settings like activating them or allowing customers to search for them. -* [category_template.csv:](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/catalog-setup/categories/file-details-category-template.csv.html) allows you to import any category templates. - -The table below provides details on Categories data importers, their purpose, .csv files, dependencies, and other details. Each data importer contains links to .csv files used to import the corresponding data, including specifications of mandatory and unique fields, dependencies, detailed explanations, recommendations, templates, and content examples. - -| Data Importer | Purpose | Console Command| FILES | Dependencies | -| --- | --- | --- | --- |--- | -| **Category** | Imports information about product categories definition. |`data:import:category` | [category.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/catalog-setup/categories/file-details-category.csv.html)| [category_template.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/catalog-setup/categories/file-details-category-template.csv.html)| -| **Category Template** | Imports information relative to product category templates. |`data:import:category-template` |[category_template.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/catalog-setup/categories/file-details-category-template.csv.html) |None| diff --git a/docs/scos/dev/data-import/202005.0/data-import-categories/catalog-setup/categories/file-details-category-template.csv.md b/docs/scos/dev/data-import/202005.0/data-import-categories/catalog-setup/categories/file-details-category-template.csv.md deleted file mode 100644 index 4a56df5020d..00000000000 --- a/docs/scos/dev/data-import/202005.0/data-import-categories/catalog-setup/categories/file-details-category-template.csv.md +++ /dev/null @@ -1,33 +0,0 @@ ---- -title: File details- category_template.csv -last_updated: May 13, 2020 -template: data-import-template -originalLink: https://documentation.spryker.com/v5/docs/file-details-category-templatecsv -originalArticleId: 87edad35-fe53-4fad-9c78-1f6c5ea358d1 -redirect_from: - - /v5/docs/file-details-category-templatecsv - - /v5/docs/en/file-details-category-templatecsv ---- - -This article contains content of the **category_template.csv** file to configure Category Template information on your Spryker Demo Shop. - -## Import file parameters -These are the header fields to be included in the .csv file: - -| Field Name | Mandatory | Type | Other Requirements/Comments | Description | -| --- | --- | --- | --- | --- | -| **template_name** | Yes | String |N/A | Name of the category template. | -| **template_path** | Yes (*unique*) | String |Must be a valid path to a twig file and it is a unique field, for example, the file cannot have more than one line with the same template path. | Path of the category template. | -*N/A: Not applicable. - -## Dependencies - -This file has no dependencies. - -## Import template file and content example -A template and an example of the *category_template.csv* file can be downloaded here: - -| File | Description | -| --- | --- | -| [category_template.csv template]() | Category Template .csv template file (empty content, contains headers only). | -| [category_template.csv]() | Category Template .csv file containing a Demo Shop data sample. | diff --git a/docs/scos/dev/data-import/202005.0/data-import-categories/catalog-setup/categories/file-details-category.csv.md b/docs/scos/dev/data-import/202005.0/data-import-categories/catalog-setup/categories/file-details-category.csv.md deleted file mode 100644 index 575b9f8a6d7..00000000000 --- a/docs/scos/dev/data-import/202005.0/data-import-categories/catalog-setup/categories/file-details-category.csv.md +++ /dev/null @@ -1,56 +0,0 @@ ---- -title: File details- category.csv -last_updated: Sep 14, 2020 -template: data-import-template -originalLink: https://documentation.spryker.com/v5/docs/file-details-categorycsv -originalArticleId: 7f99a945-d7e0-4264-87b0-f109110b6416 -redirect_from: - - /v5/docs/file-details-categorycsv - - /v5/docs/en/file-details-categorycsv ---- - -This article contains content of the **category.csv** file to configure [Category](/docs/scos/user/features/{{page.version}}/category-management-feature-overview.html) information on your Spryker Demo Shop. - -## Import file parameters - -{% info_block infoBox "Info" %} - -*ANY_LOCALE_NAME: Locale data is dynamic in data importers. It means that ANY_LOCALE_NAME postifx can be changed, removed, and any number of columns with different locales can be added to the .csv files. For the fields below, it could be replaced by 2 sets of fields: one for *de_DE* and another for *en_US* -**N/A: Not applicable. - -{% endinfo_block %} - -These are the header fields to be included in the .csv file: - -| Field Name | Mandatory | Type | Other Requirements/Comments | Description | -| --- | --- | --- | --- | --- | -| **category_key** | Yes (*unique*) | String |This value can set as `parent_category_key` for the lines below, allowing multi-level relations | Category key identifier. | -| **parent_category_key** | Yes | String | Must have an existing value if the category is not the "root" category.| Parent category key identifier. | -| **name.{ANY_LOCALE_NAME}***
Example value: *name.de_DE* | Yes (*unique*) | String | Name of categories in available locations. The set of these fields depends on available locations in some projects. | Category name in the specified location (DE for our exmaple). | -| **meta_title.{ANY_LOCALE_NAME}**
Example value: *meta_title.de_DE* | No | String | N/A | Title in the specified location (DE for our example). | -| **meta_description.{ANY_LOCALE_NAME}**
Example value: *meta_description.de_DE* | No | String | N/A | Description in the specified location (DE for our example). | -| **meta_keywords.{ANY_LOCALE_NAME}**
Example value: *meta_keywords.de_DE* | No | String | N/A | Keywords in the specified location (DE for our example). | -| **is_active** | No | Boolean | True (1), if it is active. False (0), if it is not active.| Indicates if the category is active or not. | -| **is_in_menu** | No | Boolean |True (1), if it is in the menu. False (0), if it is not in the menu. | Indicates if the category is in the menu or not. | -| **is_clickable** | No | Boolean |True (1), if it is clickable. False (0), if it is not clickable. | Indicates if the category is clickable or not. | -| **is_searchable** | No | Boolean | True (1), if it is searchable. False (0), if it is not searchable.| Indicates if it is a searchable category in the menu or not. | -| **is_root** | No | Boolean |True (1), if it is root. False (0), if it is not root. | Indicates if it is a root category or not. | -| **is_main** | No | Boolean | True (1), if it is main. False (0), if it is not main.|Indicates if it is a main category or not. | -| **node_order** | No | Integer | N/A| Order of the category node. | -| **template_name** | No | String |N/A | Template name of the category. | -| **category_image_name.{ANY_LOCALE_NAME}** | No | String |N/A | Name of the image for the category in the locale. | - - -## Dependencies - -This file has the following dependency: -* [category_template.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/catalog-setup/categories/file-details-category-template.csv.html) - -## Import template file and content example -A template and an example of the *category.csv* file can be downloaded here: - -| File | Description | -| --- | --- | -| [category.csv template](https://spryker.s3.eu-central-1.amazonaws.com/docs/Developer+Guide/Back-End/Data+Manipulation/Data+Ingestion/Data+Import/Data+Import+Categories/Catalog+Setup/Categories/category_template.csv) | Category .csv template file (empty content, contains headers only). | -| [category.csv](https://spryker.s3.eu-central-1.amazonaws.com/docs/Developer+Guide/Back-End/Data+Manipulation/Data+Ingestion/Data+Import/Data+Import+Categories/Catalog+Setup/Categories/category.csv) | Category .csv file containing a Demo Shop data sample. | - diff --git a/docs/scos/dev/data-import/202005.0/data-import-categories/catalog-setup/pricing/file-details-product-price-schedule.csv.md b/docs/scos/dev/data-import/202005.0/data-import-categories/catalog-setup/pricing/file-details-product-price-schedule.csv.md deleted file mode 100644 index 21b6e667cde..00000000000 --- a/docs/scos/dev/data-import/202005.0/data-import-categories/catalog-setup/pricing/file-details-product-price-schedule.csv.md +++ /dev/null @@ -1,43 +0,0 @@ ---- -title: File details- product_price_schedule.csv -last_updated: Sep 14, 2020 -template: data-import-template -originalLink: https://documentation.spryker.com/v5/docs/file-details-product-price-schedulecsv -originalArticleId: c74e05cd-96a6-41b1-a741-8ccb0bcf9882 -redirect_from: - - /v5/docs/file-details-product-price-schedulecsv - - /v5/docs/en/file-details-product-price-schedulecsv ---- - -This article contains content of the **product_price_schedule.csv** file to configure [Product Price Schedule](/docs/scos/user/features/{{page.version}}/scheduled-prices-feature-overview.html) information on your Spryker Demo Shop. - -## Import file parameters -These are the header fields to be included in the .csv file: - -| Field Name | Mandatory | Type | Other Requirements/Comments | Description | -| --- | --- | --- | --- | --- | -| **abstract_sku** | Yes (if `concrete_sku` is empty) | String Either this field or `concrete_sku` needs to be filled, as the prices need to be assigned to a product. | SKU of the abstract product to which the price should apply. | -| **concrete_sku** | Yes (if `abstract_sku` is empty) | String |Either this field or `abstract_sku` needs to be filled, as the prices need to be assigned to a product. | SKU of the concrete product to which the price should apply. | -| **price_type** | Yes | String |N/A* | Defines the price type. | -| **store** | Yes | String |N/A | Store to which this price should apply. | -| **currency** | Yes | String |N/A* | Defines in which currency the price is. | -| **value_net** | Yes | Integer |N/A | Sets the net price. | -| **value_gross** | Yes | Integer |N/A | Sets the gross price. | -| **from_included** | Yes | Date |N/A | Sets the date from which these price conditions are valid. | -| **to_included** | Yes | Date |N/A | Sets the date to which these price conditions are valid. | -*N/A: Not applicable. - -## Dependencies - -This file has the following dependencies: -* [product_abstract.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/catalog-setup/products/file-details-product-abstract.csv.html) -* [product_concrete.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/catalog-setup/products/file-details-product-concrete.csv.html) -* *stores.php* configuration file of the Demo Shop PHP project - -## Import template file and content example -A template and an example of the *product_price_schedule.csv* file can be downloaded here: - -| File | Description | -| --- | --- | -| [product_price_schedule.csvtemplate](https://spryker.s3.eu-central-1.amazonaws.com/docs/Developer+Guide/Back-End/Data+Manipulation/Data+Ingestion/Data+Import/Data+Import+Categories/Catalog+Setup/Pricing/Template+product_price_schedule.csv) | Product Price Schedule .csv template file (empty content, contains headers only). | -| [product_price_schedule.csv.csv](https://spryker.s3.eu-central-1.amazonaws.com/docs/Developer+Guide/Back-End/Data+Manipulation/Data+Ingestion/Data+Import/Data+Import+Categories/Catalog+Setup/Pricing/product_price_schedule.csv) | Product Price Schedule .csv file containing a Demo Shop data sample. | diff --git a/docs/scos/dev/data-import/202005.0/data-import-categories/catalog-setup/pricing/file-details-product-price.csv.md b/docs/scos/dev/data-import/202005.0/data-import-categories/catalog-setup/pricing/file-details-product-price.csv.md deleted file mode 100644 index 8316ca3d51a..00000000000 --- a/docs/scos/dev/data-import/202005.0/data-import-categories/catalog-setup/pricing/file-details-product-price.csv.md +++ /dev/null @@ -1,43 +0,0 @@ ---- -title: File details- product_price.csv -last_updated: Sep 14, 2020 -template: data-import-template -originalLink: https://documentation.spryker.com/v5/docs/file-details-product-pricecsv -originalArticleId: 8a8d6a9b-7783-4acf-8c42-e20edb874472 -redirect_from: - - /v5/docs/file-details-product-pricecsv - - /v5/docs/en/file-details-product-pricecsv ---- - -This article contains content of the **product_price.csv** file to configure [prices](/docs/scos/user/features/{{page.version}}/prices-feature-overview/prices-feature-overview.html) of the products/services in your Spryker Demo Dhop. - -## Import file parameters -These are the header fields to be included in the .csv file: - -| Field Name | Mandatory | Type | Other Requirements/Comments | Description | -| --- | --- | --- | --- | --- | -| **abstract_sku** | Yes (if `concrete_sku` is empty) | String |Either this field or `concrete_sku` needs to be filled. | SKU of the abstract product to which the price should apply. | -| **concrete_sku** | Yes (if `abstract_sku` is empty) | String |Either this field or `abstract_sku` needs to be filled. | SKU of the concrete product to which the price should apply. | -| **price_type** | No | String |N/A* | Defines the price type. | -| **store** | Yes | String |N/A | Store to which this price should apply. | -| **currency** | No | String |N/A | Defines in which currency the price is. | -| **value_net** | No | Integer |N/A | Sets the net price. | -| **value_gross** | No | Integer |N/A | Sets the gross price. | -| **price_data.volume_prices** | No | String |N/A | Price data which can be used to define alternative prices, i.e volume prices, overwriting the given net or gross price values. | -*N/A: Not applicable. - -## Dependencies - -This file has the following dependencies: - -* [product_abstract.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/catalog-setup/products/file-details-product-abstract.csv.html) -* [product_concrete.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/catalog-setup/products/file-details-product-concrete.csv.html) -* *stores.php* configuration file of the Demo Shop PHP project - -## Import template file and content example -A template and an example of the *product_price.csv* file can be downloaded here: - -| File | Description | -| --- | --- | -| [product_price.csv template](https://spryker.s3.eu-central-1.amazonaws.com/docs/Developer+Guide/Back-End/Data+Manipulation/Data+Ingestion/Data+Import/Data+Import+Categories/Catalog+Setup/Pricing/Template+product_price.csv) | Product Price .csv template file (empty content, contains headers only). | -| [product_price.csv](https://spryker.s3.eu-central-1.amazonaws.com/docs/Developer+Guide/Back-End/Data+Manipulation/Data+Ingestion/Data+Import/Data+Import+Categories/Catalog+Setup/Pricing/product_price.csv) | Product Price .csv file containing a Demo Shop data sample. | diff --git a/docs/scos/dev/data-import/202005.0/data-import-categories/catalog-setup/pricing/pricing.md b/docs/scos/dev/data-import/202005.0/data-import-categories/catalog-setup/pricing/pricing.md deleted file mode 100644 index 733b1e9b707..00000000000 --- a/docs/scos/dev/data-import/202005.0/data-import-categories/catalog-setup/pricing/pricing.md +++ /dev/null @@ -1,26 +0,0 @@ ---- -title: Pricing -last_updated: Sep 14, 2020 -template: data-import-template -originalLink: https://documentation.spryker.com/v5/docs/pricing -originalArticleId: be38950b-4c60-496a-9fb7-b3e70aa20992 -redirect_from: - - /v5/docs/pricing - - /v5/docs/en/pricing ---- - -The **Pricing** category contains all prices-related data you need to manage and use prices in your online store. We have structured this section according to the following .csv files that you will have to use to import the data: - -* [product_price.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/catalog-setup/pricing/file-details-product-price.csv.html): allows you to define the price-related information for each product. This data defines the price type, whether is gross or net, its value, the store and currency to which the price applies, and other price data (for example, volumes price). -* [product_price_schedule.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/catalog-setup/pricing/file-details-product-price-schedule.csv.html): use this file to schedule a specific price for a product. For that you have to define the price type, whether it is gross or net, its value, the store and currency to which the price applies, the activation date of that price, and its validity. - -The table below provides details on Pricing data importers, their purpose, .csv files, dependencies, and other details. Each data importer contains links to .csv files used to import the corresponding data, including specifications of mandatory and unique fields, dependencies, detailed explanations, recommendations, templates, and content examples. - -| Data Importer | Purpose | Console Command| FILES | Dependencies | -| --- | --- | --- | --- |--- | -| **Product Price** | Imports information relative to product prices. |`data:import:product-price` | [product_price.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/catalog-setup/pricing/file-details-product-price.csv.html)|
  • [product_abstract.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/catalog-setup/products/file-details-product-abstract.csv.html)
  • [product_concrete.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/catalog-setup/products/file-details-product-concrete.csv.html)
  • **stores.php** configuration file of demo shop PHP project
| -| **Product Price Schedule** | Imports information about product scheduled prices. |`data:import:product-price-schedule` |[product_price_schedule.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/catalog-setup/pricing/file-details-product-price-schedule.csv.html) |
  • [product_abstract.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/catalog-setup/products/file-details-product-abstract.csv.html)
  • [product_concrete.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/catalog-setup/products/file-details-product-concrete.csv.html)
  • **stores.php** configuration file of demo shop PHP project
  • | - - - - diff --git a/docs/scos/dev/data-import/202005.0/data-import-categories/catalog-setup/products/file-details-product-abstract-store.csv.md b/docs/scos/dev/data-import/202005.0/data-import-categories/catalog-setup/products/file-details-product-abstract-store.csv.md deleted file mode 100644 index c77b964485c..00000000000 --- a/docs/scos/dev/data-import/202005.0/data-import-categories/catalog-setup/products/file-details-product-abstract-store.csv.md +++ /dev/null @@ -1,37 +0,0 @@ ---- -title: File details- product_abstract_store.csv -last_updated: Sep 14, 2020 -template: data-import-template -originalLink: https://documentation.spryker.com/v5/docs/file-details-product-abstract-storecsv -originalArticleId: c6b0072d-cda5-407f-a5e2-e81a49fe1252 -redirect_from: - - /v5/docs/file-details-product-abstract-storecsv - - /v5/docs/en/file-details-product-abstract-storecsv ---- - -This article contains content of the **product_abstract_store.csv** file to configure Product Abstract Store information on your Spryker Demo Shop. - -## Headers and Mandatory Fields - -These are the header fields to be included in the .csv file: - -| Field Name | Mandatory | Type | Other Requirements/Comments | Description | -| --- | --- | --- | --- | --- | -| **product_abstract_sku** | Yes (unique) | String |N/A* | SKU identifier of the abstract product. | -| **store_name** | Yes | String |N/A | Name of the store that has this product. | -*N/A: Not applicable. - -## Dependencies - -This file has the following dependencies: -* [product_abstract.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/catalog-setup/products/file-details-product-abstract.csv.html) -* *stores.php* configuration file of the demo shop PHP project - -## Import template file and content example - -A template and an example of the *product_abstract_store.csv* file can be downloaded here: - -| File | Description | -| --- | --- | -| [product_abstract_store.csv template](https://spryker.s3.eu-central-1.amazonaws.com/docs/Developer+Guide/Back-End/Data+Manipulation/Data+Ingestion/Data+Import/Data+Import+Categories/Catalog+Setup/Products/Template+product_abstract_store.csv) | Product Abstract Store .csv template file (empty content, contains headers only). | -| [product_abstract_store.csv](https://spryker.s3.eu-central-1.amazonaws.com/docs/Developer+Guide/Back-End/Data+Manipulation/Data+Ingestion/Data+Import/Data+Import+Categories/Catalog+Setup/Products/product_abstract_store.csv) | Product Abstract Store .csv file containing a Demo Shop data sample. | diff --git a/docs/scos/dev/data-import/202005.0/data-import-categories/catalog-setup/products/file-details-product-abstract.csv.md b/docs/scos/dev/data-import/202005.0/data-import-categories/catalog-setup/products/file-details-product-abstract.csv.md deleted file mode 100644 index 9d822a7f558..00000000000 --- a/docs/scos/dev/data-import/202005.0/data-import-categories/catalog-setup/products/file-details-product-abstract.csv.md +++ /dev/null @@ -1,65 +0,0 @@ ---- -title: File details- product_abstract.csv -last_updated: Sep 14, 2020 -template: data-import-template -originalLink: https://documentation.spryker.com/v5/docs/file-details-product-abstractcsv -originalArticleId: 3c2ff3b4-c66d-4fad-abb1-4adec332d7e1 -redirect_from: - - /v5/docs/file-details-product-abstractcsv - - /v5/docs/en/file-details-product-abstractcsv ---- - -This article contains content of the **product_abstract.csv** file to configure [Abstract Product](/docs/scos/user/features/{{page.version}}/product-feature-overview/product-feature-overview.html) information on your Spryker Demo Shop. - -## Import file parameters -These are the header fields to be included in the .csv file: - -| Field Name | Mandatory | Type | Other Requirements/Comments | Description | -| --- | --- | --- | --- | --- | -| **category_key** | Yes | String |N/A* | Identifier of category key name. | -| **category_product_order** | No | Integer |N/A | Order of the product presentation inside a category. | -| **abstract_sku** | Yes (*unique*) | String |N/A | SKU identifier of the abstract product. | -| **name.{ANY_LOCALE_NAME}***
    Example value: *name.en_US* | Yes | String |N/A | Name of the product in the specified location (US for our example). | -| **url.{ANY_LOCALE_NAME}**
    Example value: *value_1.en_US* | Yes | String |N/A | URL page of the product image in the specified location (US for our example). | -| **is_featured** | No | String |If it is empty, will be “False”.
    False = 0
    True = 1 | Indicates if it is a featured product. | -| **attribute_key_{NUMBER}***
    Example value: *attribute_key_1*
    | Yes (if this attribute is defined) | String |N/A | Product attribute key for the attribute. | -| **value_{NUMBER}**
    Example value: *value_1*
    |Yes (if this attribute is defined) | String |N/A | Product value for the attribute. | -| **attribute_key_{NUMBER}.{ANY_LOCALE_NAME}**
    Example value: *attribute_key_1.en_US*
    | No | String |N/A | Product attribute key, for the first attribute, translated in the specified locale (US for our example). | -| **value_{NUMBER}.{ANY_LOCALE_NAME}**
    Example value: *value_1.en_US*
    |No | String |N/A | Product value for the attribute, translated in the specified locale (US for our example). | -| **color_code** | No | String |N/A | Product colour code. | -| **description.{ANY_LOCALE_NAME}**
    Example value: *description.en_US* | No | String |N/A | Product description, translated in the specified locale (US for our example). | -| **icecat_pdp_url** | No | String |N/A | Icecat product catalogue URL service. | -| **tax_set_name** | No | String |N/A | Name of the tax set. | -| **meta_title.{ANY_LOCALE_NAME}**
    Example value: *meta_title.en_US* | No | String |N/A | Meta title of the product in the specified locale (US for our example). | -| **meta_keywords.{ANY_LOCALE_NAME}**
    Example value: *meta_keywords.en_US* | No | String |N/A | Meta keywords of the product in the specified locale (US for our example). | -| **meta_description.{ANY_LOCALE_NAME}**
    Example value: *meta_description.en_US* | No | String |N/A | Meta description of the product in the specified locale (US for our example). | -| **icecat_license** | No | String |N/A | Icecat product catalogue licence code. | -| **new_from** | No | Date |N/A | To be considered a new product from this presented date. | -| **new_to** | No | String |N/A | To be considered a new product until this presented date. | -*N/A: Not applicable. -** ANY_LOCALE_NAME: Locale date is dynamic in data importers. It means that ANY_LOCALE_NAME postifx can be changed, removed, and any number of columns with different locales can be added to the .csv files. -** NUMBER: Any number of the attribute-value column pair can be added - -## Dependencies - -This file has the following dependencies: - -* [ category.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/catalog-setup/categories/file-details-category.csv.html) -* [glossary.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/commerce-setup/file-details-glossary.csv.html) -* [tax.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/commerce-setup/file-details-tax.csv.html) - -## Recommendations & Other Information -For each attribute, where N is a number starting in 1, it is mandatory to have both fields: - -* `attribute_key_N` -* `value_N` - -The amount of attributes is not limited. - -## Import template file and content example -A template and an example of the *product_abstract.csv* file can be downloaded here: - -| File | Description | -| --- | --- | -| [product_abstract.csv template](https://spryker.s3.eu-central-1.amazonaws.com/docs/Developer+Guide/Back-End/Data+Manipulation/Data+Ingestion/Data+Import/Data+Import+Categories/Catalog+Setup/Products/Template+product_abstract.csv) | Product Abstract .csv template file (empty content, contains headers only). | -| [product_abstract.csv](https://spryker.s3.eu-central-1.amazonaws.com/docs/Developer+Guide/Back-End/Data+Manipulation/Data+Ingestion/Data+Import/Data+Import+Categories/Catalog+Setup/Products/product_abstract.csv) | Product Abstract .csv file containing a Demo Shop data sample. | diff --git a/docs/scos/dev/data-import/202005.0/data-import-categories/catalog-setup/products/file-details-product-attribute-key.csv.md b/docs/scos/dev/data-import/202005.0/data-import-categories/catalog-setup/products/file-details-product-attribute-key.csv.md deleted file mode 100644 index 276eee23519..00000000000 --- a/docs/scos/dev/data-import/202005.0/data-import-categories/catalog-setup/products/file-details-product-attribute-key.csv.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -title: File details- product_attribute_key.csv -last_updated: Sep 14, 2020 -template: data-import-template -originalLink: https://documentation.spryker.com/v5/docs/file-details-product-attribute-keycsv -originalArticleId: ba042e14-f2c3-40d5-9367-0ddea93d3de9 -redirect_from: - - /v5/docs/file-details-product-attribute-keycsv - - /v5/docs/en/file-details-product-attribute-keycsv ---- - -This article contains content of the **product_attribute_key.csv** file to configure [Product Attribute](/docs/scos/user/features/{{page.version}}/product-feature-overview/product-attributes-overview.html) information on your Spryker Demo Shop. - -## Import file parameters -These are the header fields to be included in the .csv file: - -| Field Name | Mandatory | Type | Other Requirements/Comments | Description | -| --- | --- | --- | --- | --- | -| **attribute_key** | Yes (*unique*) | String |N/A* | Product attribute key name. | -| **is_supe** | No | Boolean |If empty it will be imported as *False* (0).
    False = 0 = It is not a super attribute.
    True = 1 = It is a super attribute. | Indicates whether it is a super attribute or not. | -*N/A: Not applicable. - -## Dependencies -This file has no dependencies. - -## Import template file and content example -A template and an example of the *product_attribute_key.csv* file can be downloaded here: - -| File | Description | -| --- | --- | -| [product_attribute_key.csv template](https://spryker.s3.eu-central-1.amazonaws.com/docs/Developer+Guide/Back-End/Data+Manipulation/Data+Ingestion/Data+Import/Data+Import+Categories/Catalog+Setup/Products/Template+product_attribute_key.csv) | Product Attribute Key .csv template file (empty content, contains headers only). | -| [product_attribute_key.csv](https://spryker.s3.eu-central-1.amazonaws.com/docs/Developer+Guide/Back-End/Data+Manipulation/Data+Ingestion/Data+Import/Data+Import+Categories/Catalog+Setup/Products/product_attribute_key.csv) | Product Attribute Key .csv file containing a Demo Shop data sample. | diff --git a/docs/scos/dev/data-import/202005.0/data-import-categories/catalog-setup/products/file-details-product-concrete.csv.md b/docs/scos/dev/data-import/202005.0/data-import-categories/catalog-setup/products/file-details-product-concrete.csv.md deleted file mode 100644 index dbfa546ee48..00000000000 --- a/docs/scos/dev/data-import/202005.0/data-import-categories/catalog-setup/products/file-details-product-concrete.csv.md +++ /dev/null @@ -1,52 +0,0 @@ ---- -title: File details- product_concrete.csv -last_updated: Sep 14, 2020 -template: data-import-template -originalLink: https://documentation.spryker.com/v5/docs/file-details-product-concretecsv -originalArticleId: bf535214-3304-423a-ae82-27044cdd4ec6 -redirect_from: - - /v5/docs/file-details-product-concretecsv - - /v5/docs/en/file-details-product-concretecsv ---- - -This article contains content of the **product_concrete.csv** file to configure [Concrete Product](/docs/scos/user/features/{{page.version}}/product-feature-overview/product-feature-overview.html) information on your Spryker Demo Shop. - -## Import file parameters -These are the header fields to be included in the .csv file: - -| Field Name | Mandatory | Type | Other Requirements/Comments | Description | -| --- | --- | --- | --- | --- | -| **abstract_sku** | Yes | String |N/A | Name of the product, in locale US. | -| **old_sku** | No | String |N/A | Old SKU identifier. | -| **concrete_sku** | Yes (*unique*) | String |N/A | SKU identifier of the concrete product. | -| **name.{ANY_LOCALE_NAME}***
    Example value: *name.en_US* | Yes | String |N/A | Name of the product in the specified location (US for our example). | -| **attribute_key_{NUMBER}***
    Example value: *attribute_key_1*
    | Yes (if this attribute is defined) | String |N/A | Product attribute key for the attribute. | -| **value_{NUMBER}**
    Example value: *value_1*
    |Yes (if this attribute is defined) | String |N/A | Product value for the attribute. | -| **attribute_key_{NUMBER}.{ANY_LOCALE_NAME}**
    Example value: *attribute_key_1.en_US*
    | No | String |N/A | Product attribute key, for the first attribute, translated in the specified locale (US for our example). | -| **value_{NUMBER}.{ANY_LOCALE_NAME}**
    Example value: *value_1.en_US*
    |No | String |N/A | Product value for the attribute, translated in the specified locale (US for our example). | -| **icecat_pdp_url** | No | String |N/A | Icecat product catalogue URL service. | -| **description.{ANY_LOCALE_NAME}**
    Example value: *description.en_US* | No | String |N/A | Product description, translated in the specified locale (US for our example). | -| **is_searchable.{ANY_LOCALE_NAME}**
    Example value: *is_searchable.en_US*| No | Integer |N/A | Indicates if the product is searchable in the specified locale (US for our example). | -| **icecat_license** | No | String |N/A | Icecat product catalogue licence code. | -| **bundled** | No | String |N/A | Products SKUs separated by comas, that are part of the bundle. | -| **is_quantity_splittable** | No | Boolean |If it is empty, will be *False*.
    False = 0
    True = 1 | To be considered a new product until this presented date. | -*N/A: Not applicable. -** ANY_LOCALE_NAME: Locale date is dynamic in data importers. It means that ANY_LOCALE_NAME postifx can be changed, removed, and any number of columns with different locales can be added to the .csv files. -** NUMBER: Any number of the attribute-value column pair can be added - -## Dependencies - -This file has the following dependencies: - -*[ product_abstract.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/catalog-setup/products/file-details-product-abstract.csv.html) - -## Recommendations & Other Information -Every concrete product is linked to an abstract one via the `abstract_sku` field. - -## Import template file and content example -A template and an example of the *product_concrete.csv* file can be downloaded here: - -| File | Description | -| --- | --- | -| [product_concrete.csv template](https://spryker.s3.eu-central-1.amazonaws.com/docs/Developer+Guide/Back-End/Data+Manipulation/Data+Ingestion/Data+Import/Data+Import+Categories/Catalog+Setup/Products/Template+product_concrete.csv) | Product Abstract .csv template file (empty content, contains headers only). | -| [product_concrete.csv](https://spryker.s3.eu-central-1.amazonaws.com/docs/Developer+Guide/Back-End/Data+Manipulation/Data+Ingestion/Data+Import/Data+Import+Categories/Catalog+Setup/Products/product_concrete.csv) | Product Abstract .csv file containing a Demo Shop data sample. | diff --git a/docs/scos/dev/data-import/202005.0/data-import-categories/catalog-setup/products/file-details-product-image.csv.md b/docs/scos/dev/data-import/202005.0/data-import-categories/catalog-setup/products/file-details-product-image.csv.md deleted file mode 100644 index 3cd5da2225b..00000000000 --- a/docs/scos/dev/data-import/202005.0/data-import-categories/catalog-setup/products/file-details-product-image.csv.md +++ /dev/null @@ -1,44 +0,0 @@ ---- -title: File details- product_image.csv -last_updated: Sep 14, 2020 -template: data-import-template -originalLink: https://documentation.spryker.com/v5/docs/file-details-product-imagecsv -originalArticleId: 7e3f3571-5f74-4405-8df3-283b732397ce -redirect_from: - - /v5/docs/file-details-product-imagecsv - - /v5/docs/en/file-details-product-imagecsv ---- - -This article contains content of the **product_image.csv** file to configure [Product Image](/docs/scos/user/features/{{page.version}}/product-feature-overview/product-images-overview.html) information on your Spryker Demo Shop. - -## Import file parameters - -These are the header fields to be included in the .csv file: - -| Field Name | Mandatory | Type | Other Requirements/Comments | Description | -| --- | --- | --- | --- | --- | -| **image_set_name** | Yes | String |N/A* | Name of the image set. | -| **external_url_large** | Yes | String |N/A | External link to the image of the product. | -| **external_url_small** | Yes | String |N/A | Tiny link to the image of the product. | -| **locale** | Yes | String |N/A |Locale of the image. | -| **abstract_sku** | Yes (if there is no product concrete SKU) | String |For each image there should be at least one value of an SKU from either `abstract_sku` or`concrete_sku`. | SKU of the abstract product. | -| **concrete_sku** | Yes (if there is no product abstract SKU) | String |For each image there should be at least one value of an SKU from either `abstract_sku` or `concrete_sku`. | SKU of the concrete product. | -| **sort_order** | No | Integer |N/A | Order of image presentation. | -| **product_image_set_key** | No | String |N/A | Key of the product image set. | -*N/A: Not applicable. - -## Dependencies - -This file has the following dependencies: - -* [product_abstract.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/catalog-setup/products/file-details-product-abstract.csv.html) -* [product_concrete.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/catalog-setup/products/file-details-product-concrete.csv.html) - -## Import template file and content example - -A template and an example of the *product_image.csv* file can be downloaded here: - -| File | Description | -| --- | --- | -| [product_image.csv template](https://spryker.s3.eu-central-1.amazonaws.com/docs/Developer+Guide/Back-End/Data+Manipulation/Data+Ingestion/Data+Import/Data+Import+Categories/Catalog+Setup/Products/Template+product_image.csv) | Payment Method Store .csv template file (empty content, contains headers only). | -| [product_image.csv](https://spryker.s3.eu-central-1.amazonaws.com/docs/Developer+Guide/Back-End/Data+Manipulation/Data+Ingestion/Data+Import/Data+Import+Categories/Catalog+Setup/Products/product_image.csv) | Payment Method Store .csv file containing a Demo Shop data sample. | diff --git a/docs/scos/dev/data-import/202005.0/data-import-categories/catalog-setup/products/file-details-product-management-attribute.csv.md b/docs/scos/dev/data-import/202005.0/data-import-categories/catalog-setup/products/file-details-product-management-attribute.csv.md deleted file mode 100644 index 114a759e2ac..00000000000 --- a/docs/scos/dev/data-import/202005.0/data-import-categories/catalog-setup/products/file-details-product-management-attribute.csv.md +++ /dev/null @@ -1,44 +0,0 @@ ---- -title: File details- product_management_attribute.csv -last_updated: Sep 14, 2020 -template: data-import-template -originalLink: https://documentation.spryker.com/v5/docs/file-details-product-management-attributecsv -originalArticleId: 80fbd522-ca60-4be6-84a7-ba20e7a1479a -redirect_from: - - /v5/docs/file-details-product-management-attributecsv - - /v5/docs/en/file-details-product-management-attributecsv ---- - -This article contains content of the **product_management_attribute.csv** file to configure [Product Attribute](/docs/scos/user/features/{{page.version}}/product-feature-overview/product-attributes-overview.html) information on your Spryker Demo Shop. - -## Import file parameters -These are the header fields to be included in the .csv file: - -| Field Name | Mandatory | Type | Other Requirements/Comments | Description | -| --- | --- | --- | --- | --- | -| **key** | Yes | String |N/A* | Key identifier of the product attribute. | -| **input_type** | Yes | String |Value from a pre-defined list. | Input type of the product attribute, for example, text, number, select, etc. | -| **allow_input** | No | String |*yes/no* field. Will be set to *no* if an empty value is provided. |Indicates if custom values can be entered in this product attribute. | -| **is_multiple** | No | String |*yes/no* field. Will be set to *no* if an empty value is provided. |Indicates if the attribute can have multiple values. | -| **values** | No | String |N/A | Selectable values. Field *values* is a string defining possible attribute values, separated by commas. For example, "16 GB, 32 GB, 64 GB, 128 GB" means that attribute can accept values "16 GB", "32 GB", "64 GB", "128 GB". | -| **key_translation.en_US** | No | String |N/A | Translation attribute key to the locale US language. | -| **key_translation.de_DE** | No | String |N/A | Translation attribute key to the locale DE language. | -| **value_translations.en_US** | No | String |N/A | Translation attribute value to the locale US language. | -| **value_translations.de_DE** | No | String |N/A | Translation attribute value to the locale DE language. | - -*N/A: Not applicable. - -## Dependencies - -This file has the following dependencies: - -* [ product_attribute_key.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/catalog-setup/products/file-details-product-attribute-key.csv.html) -* [glossary.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/commerce-setup/file-details-glossary.csv.html) - -## Import template file and content example -A template and an example of the *product_management_attribute.csv* file can be downloaded here: - -| File | Description | -| --- | --- | -| [product_management_attribute.csv template](https://spryker.s3.eu-central-1.amazonaws.com/docs/Developer+Guide/Back-End/Data+Manipulation/Data+Ingestion/Data+Import/Data+Import+Categories/Catalog+Setup/Products/Template+product_management_attribute.csv) | Product Management Attribute .csv template file (empty content, contains headers only). | -| [product_management_attribute.csv](https://spryker.s3.eu-central-1.amazonaws.com/docs/Developer+Guide/Back-End/Data+Manipulation/Data+Ingestion/Data+Import/Data+Import+Categories/Catalog+Setup/Products/product_management_attribute.csv) | Product Management Attribute .csv file containing a Demo Shop data sample. | diff --git a/docs/scos/dev/data-import/202005.0/data-import-categories/catalog-setup/products/products.md b/docs/scos/dev/data-import/202005.0/data-import-categories/catalog-setup/products/products.md deleted file mode 100644 index 47118dbc687..00000000000 --- a/docs/scos/dev/data-import/202005.0/data-import-categories/catalog-setup/products/products.md +++ /dev/null @@ -1,31 +0,0 @@ ---- -title: Products -last_updated: Sep 14, 2020 -template: data-import-template -originalLink: https://documentation.spryker.com/v5/docs/products-category -originalArticleId: f6810ef9-5c8c-4d74-97ba-c0da85e15a9d -redirect_from: - - /v5/docs/products-category - - /v5/docs/en/products-category ---- - -The **Products** category contains all products-related data you need to manage and sell products in your online store. We have structured this section according to the following .csv files that you will have to use to import the data: - -* [product_attribute_key.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/catalog-setup/products/file-details-product-attribute-key.csv.html): allows you to define whether specific attributes should be considered super attributes. -* [product_management_attribute.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/catalog-setup/products/file-details-product-management-attribute.csv.html): allows you to define additional product attributes, including type of attribute (text or number), as well as set custom and multiple values. -* [product_abstract.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/catalog-setup/products/file-details-product-abstract.csv.html): includes the information needed for setting up abstract products and encompasses a wide range of information such as names, categories, attributes, descriptions, keywords, tax rates, etc. -* [product_abstract_store.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/catalog-setup/products/file-details-product-abstract-store.csv.html): in the case of multi-store setups, allows you to define in which stores you wish to sell those abstract products. -* [product_concrete.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/catalog-setup/products/file-details-product-concrete.csv.html): allows you to import concrete product information, including their descriptions, attributes' values, searchability, relations to abstract products, and more information. -* [product_image.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/catalog-setup/products/file-details-product-image.csv.html): allows you to import the images of the concrete products, local ones, as well as the ones via URLs. - -The table below provides details on Products data importers, their purpose, .csv files, dependencies, and other details. Each data importer contains links to .csv files used to import the corresponding data, including specifications of mandatory and unique fields, dependencies, detailed explanations, recommendations, templates, and content examples. - -| Data Importer | Purpose | Console Command| FILES | Dependencies | -| --- | --- | --- | --- |--- | -| **Product Attribute Key** | Imports information relative to product attribute super attribute identification. |`data:import:product-attribute-key` |[product_attribute_key.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/catalog-setup/products/file-details-product-attribute-key.csv.html) |None | -| **Product Management Attribute** | Imports information to configure settings of additional product attributes. |`data:import:product-management-attribute` |[product_management_attribute.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/catalog-setup/products/file-details-product-management-attribute.csv.html) |[product_attribute_key.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/catalog-setup/products/file-details-product-attribute-key.csv.html) | -| **Product Abstract** |Imports information about the abstract products. |`data:import:product-abstract` |[product_abstract.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/catalog-setup/products/file-details-product-abstract.csv.html) | [category.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/catalog-setup/categories/file-details-category.csv.html)| -| **Product Abstract Store** | Imports information that links the abstract products with the available stores of the shop. |`data:import:product-abstract-store` |[product_abstract_store.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/catalog-setup/products/file-details-product-abstract-store.csv.html) |
    • [product_abstract.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/catalog-setup/products/file-details-product-abstract.csv.html)
    • **stores.php** configuration file of demo shop PHP project
    | -| **Product Concrete** |Imports information about the concrete products.
    Every concrete product is linked to an abstract product. |`data:import:product-concrete` |[product_concrete.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/catalog-setup/products/file-details-product-concrete.csv.html) |[product_abstract.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/catalog-setup/products/file-details-product-abstract.csv.html) | -| **Product Image** |Imports information about product images. |`data:import:product-image` |[product_image.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/catalog-setup/products/file-details-product-image.csv.html) |
    • [product_abstract.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/catalog-setup/products/file-details-product-abstract.csv.html)
    • [product_concrete.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/catalog-setup/products/file-details-product-concrete.csv.html)
    (Each image needs to be assigned to an SKU from either one of these files).| - diff --git a/docs/scos/dev/data-import/202005.0/data-import-categories/catalog-setup/stocks/file-details-product-stock.csv.md b/docs/scos/dev/data-import/202005.0/data-import-categories/catalog-setup/stocks/file-details-product-stock.csv.md deleted file mode 100644 index a70fca0ce88..00000000000 --- a/docs/scos/dev/data-import/202005.0/data-import-categories/catalog-setup/stocks/file-details-product-stock.csv.md +++ /dev/null @@ -1,44 +0,0 @@ ---- -title: File details- product_stock.csv -last_updated: Sep 14, 2020 -template: data-import-template -originalLink: https://documentation.spryker.com/v5/docs/file-details-product-stockcsv -originalArticleId: f3089a44-6ec4-485b-ad5f-eb739156e2b3 -redirect_from: - - /v5/docs/file-details-product-stockcsv - - /v5/docs/en/file-details-product-stockcsv ---- - -This article contains content of the **product_stock.csv** file to configure [Product Stock](/docs/scos/user/features/{{page.version}}/inventory-management-feature-overview.html) information on your Spryker Demo Shop. - -## Import file parameters -These are the header fields to be included in the .csv file: - -| Field Name | Mandatory | Type | Other Requirements/Comments | Description | -| --- | --- | --- | --- | --- | -| **concrete_sku** | Yes | String |N/A* | SKU reference that identifies the concrete product. | -| **name** | Yes | String | The *name* value is imported from the `warehouse.csv` file. | | -| **quantity** | Yes | Integer |N/A | Number of product items remaining in stock. The number of articles available in the warehouse. | -| **is_never_out_of_stock** | No | Boolean |True = 1
    False = 0 | Used for non-tangible products that never run out-of-stock (for example, a software licence, a service, etc.). The value must be 1 (*true*) if it is a non-tangible product. | -| **is_bundle** | No | Boolean |True = 1
    False = 0 | Indicates if the product is a a bundle or not. The value will be equal to 1 (*true*) if the product is a bundle. | -*N/A: Not applicable. - -## Dependencies - -This file has the following dependencies: - -* [product_concrete.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/catalog-setup/products/file-details-product-concrete.csv.html) -* [warehouse.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/commerce-setup/file-details-warehouse.csv.html) - -## Recommendation & Other Information -The *product_stock.csv* file contains information about the amount of product articles stored on the warehouses. - -The product is identified by `concrete_sku` field (imported from *product_concrete.csv*), field name is a valid name of a warehouse (imported from *warehouse.csv*), field quantity is a number of product items/articles remaining in stock. - -## Import template file and content example -A template and an example of the *product_stock.csv* file can be downloaded here: - -| File | Description | -| --- | --- | -| [product_stock.csv template](https://spryker.s3.eu-central-1.amazonaws.com/docs/Developer+Guide/Back-End/Data+Manipulation/Data+Ingestion/Data+Import/Data+Import+Categories/Catalog+Setup/Stocks/Template+product_stock.csv) | Payment Method Store .csv template file (empty content, contains headers only). | -| [product_stock.csv](https://spryker.s3.eu-central-1.amazonaws.com/docs/Developer+Guide/Back-End/Data+Manipulation/Data+Ingestion/Data+Import/Data+Import+Categories/Catalog+Setup/Stocks/product_stock.csv) | Payment Method Store .csv file containing a Demo Shop data sample. | diff --git a/docs/scos/dev/data-import/202005.0/data-import-categories/catalog-setup/stocks/stocks.md b/docs/scos/dev/data-import/202005.0/data-import-categories/catalog-setup/stocks/stocks.md deleted file mode 100644 index 4c3187641c1..00000000000 --- a/docs/scos/dev/data-import/202005.0/data-import-categories/catalog-setup/stocks/stocks.md +++ /dev/null @@ -1,19 +0,0 @@ ---- -title: Stocks -last_updated: Sep 14, 2020 -template: data-import-template -originalLink: https://documentation.spryker.com/v5/docs/stocks -originalArticleId: a678ab44-0c39-43a2-81b9-7e01cc27bb41 -redirect_from: - - /v5/docs/stocks - - /v5/docs/en/stocks ---- - -The **Stocks** category contains all data you need to manage stocks in your online store. -By importing the [product_stock.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/catalog-setup/stocks/file-details-product-stock.csv.html) file you can define the number of product units stored in each of the warehouses. - -The table below provides details on the Stocks data importer, its purpose, .csv file, dependencies, and other details. The data importer contains links to .csv files used to import the corresponding data, including specifications of mandatory and unique fields, dependencies, detailed explanations, recommendations, templates, and content examples. - -| Data Importer | Purpose | Console Command| FILES | Dependencies | -| --- | --- | --- | --- |--- | -| **Product Stock** | Imports information about stock, the number of product units stored in each of the warehouses. |`data:import:product-stock` |[product_stock.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/catalog-setup/stocks/file-details-product-stock.csv.html) |
    • [product_concrete.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/catalog-setup/products/file-details-product-concrete.csv.html)
    • [warehouse.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/commerce-setup/file-details-warehouse.csv.html)
    | diff --git a/docs/scos/dev/data-import/202005.0/data-import-categories/commerce-setup/commerce-setup.md b/docs/scos/dev/data-import/202005.0/data-import-categories/commerce-setup/commerce-setup.md deleted file mode 100644 index aa505362793..00000000000 --- a/docs/scos/dev/data-import/202005.0/data-import-categories/commerce-setup/commerce-setup.md +++ /dev/null @@ -1,30 +0,0 @@ ---- -title: Commerce Setup -last_updated: Sep 14, 2020 -template: data-import-template -originalLink: https://documentation.spryker.com/v5/docs/commerce-setup -originalArticleId: 6d8ef35a-b699-44b6-bf6f-afc79d72474b -redirect_from: - - /v5/docs/commerce-setup - - /v5/docs/en/commerce-setup ---- - -The **Commerce Setup** category contains data required to set up the multi-store environment, warehouses, tax levels, shipping and payment methods, etc. so you could start selling products/services online. -The table below provides details on Commerce Setup data importers, their purpose, .csv files, dependencies, and other details. Each data importer contains links to .csv files used to import the corresponding data, including specifications of mandatory and unique fields, dependencies, detailed explanations, recommendations, templates, and content examples. - - -| Data Importer | Purpose | Console Command| FILES | Dependencies | -| --- | --- | --- | --- |--- | -| **Store** | Imports basic information about the stores. |`data:import:store` | There is no CSV file to import the store setup information.
    Store names and other setup information is set in the **stores.php** configuration file in the demo shop PHP project. | **stores.php** configuration file of Demo Shop| -| **Currency** | Imports information about currencies used in the store(s). The **currency.csv** file provides an easy way to load information about currencies used in Spryker Demo Shop. It allows to load information like: ISO code, currency symbol, and the name of the currency.|`data:import:currency` | [currency.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/commerce-setup/file-details-currency.csv.html) | None| -| **Customer** | Imports information about customers.|`data:import:customer` | [customer.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/commerce-setup/file-details-customer.csv.html) | None| -| **Glossary** | Imports information relative to the several locales.|`data:import:glossary` | [glossary.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/commerce-setup/file-details-glossary.csv.html) | None| -| **Tax** |Imports information about taxes.|`data:import:tax` | [tax.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/commerce-setup/file-details-tax.csv.html) | None| -| **Shipment** |Imports information about shipment methods.|`data:import:shipment` | [shipment.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/commerce-setup/file-details-shipment.csv.html) | None| -| **Shipment Price** |Imports information about the price of each shipment method, applied in each store.|`data:import:shipment-price` | [shipment_price.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/commerce-setup/file-details-shipment-price.csv.html) |
    • [shipment.cs](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/commerce-setup/file-details-shipment.csv.html)v
    • [currency.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/commerce-setup/file-details-currency.csv.html)
    • **stores.php** configuration file of demo shop PHP project
    | -| **Shipment Method Store** | Links a *shipment method* to a specific *store*.|`shipment_method_store.csv` | [shipment_method_store.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/commerce-setup/file-details-shipment-method-store.csv.html) |
    • [shipment.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/commerce-setup/file-details-shipment.csv.html)
    • **stores.php** configuration file of demo shop PHP project
    | -| **Sales Order Threshold** | Imports information about sales order thresholds. The CSV file content defines certain thresholds for specific stores and currencies.|`data:import sales-order-threshold` | [sales_order_threshold.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/commerce-setup/file-details-sales-order-threshold.csv.html) |
    • [currency.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/commerce-setup/file-details-currency.csv.html)
    • [glossary.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/commerce-setup/file-details-glossary.csv.html)
    • **stores.php** configuration file of demo shop PHP project
    | -| **Warehouse** | Imports information about warehouses (for example, name of the warehouse, and if it is available or not).|`data:import:stock` | [warehouse.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/commerce-setup/file-details-warehouse.csv.html) | None| -| **Warehouse Store** | Imports information about the Warehouse / Store relation configuration indicating which warehouse serves which store(s).|` data:import:stock-store`| [warehouse_store.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/commerce-setup/file-details-warehouse-store.csv.html) |
    • [warehouse.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/commerce-setup/file-details-warehouse.csv.html)
    • **stores.php** configuration file of demo shop PHP project
    | -| **Payment Method** | Imports information about *payment methods* as well as *payment providers*.|`data:import:payment-method` | [payment_method.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/commerce-setup/file-details-payment-method.csv.html) | None| -| **Payment Method Store** |Imports information about payment methods per store. The CSV file links the *payment method* with each *store*.|`data:import:payment-method-store`| [payment_method_store.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/commerce-setup/file-details-payment-method-store.csv.html) |
    • [payment_method.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/commerce-setup/file-details-payment-method.csv.html)
    • **stores.php** configuration file of demo shop PHP project
    | diff --git a/docs/scos/dev/data-import/202005.0/data-import-categories/commerce-setup/file-details-currency.csv.md b/docs/scos/dev/data-import/202005.0/data-import-categories/commerce-setup/file-details-currency.csv.md deleted file mode 100644 index e37e2bfb934..00000000000 --- a/docs/scos/dev/data-import/202005.0/data-import-categories/commerce-setup/file-details-currency.csv.md +++ /dev/null @@ -1,40 +0,0 @@ ---- -title: File details- currency.csv -last_updated: Sep 14, 2020 -template: data-import-template -originalLink: https://documentation.spryker.com/v5/docs/file-details-currencycsv -originalArticleId: 01900909-5374-4dee-833e-ce1cdc25fef2 -redirect_from: - - /v5/docs/file-details-currencycsv - - /v5/docs/en/file-details-currencycsv ---- - -This article contains content of the **currency.csv** file to configure [Currency](/docs/scos/user/features/{{page.version}}/prices-feature-overview/prices-feature-overview.html) information on your Spryker Demo Shop. - -## Import file parameters -These are the header fields to be included in the .csv file: - -| | Field Name | Mandatory | Type | Other Requirements/Comments | Description | -| --- | --- | --- | --- | --- | --- | -| 1 | **iso_code** | Yes | String | N/A* | Currency ISO code.
    For more details check [ISO 4217 CURRENCY CODES](https://www.iso.org/iso-4217-currency-codes.html). | -| 2 | **currency_symbol** | Yes | String | N/A | Currency symbol. | -| 3 | **name** | Yes | String |N/A | Currency name. | -*N/A: Not applicable. - -## Dependencies -This file has no dependencies. - -## Recommendations - -It is recommended to fill all three columns, when adding a new record, except if the “currency” being added is not an ISO standard currency (for example, system of points, or product/service exchange, etc.). - -Default currency might be set up when setting up the store. Check [here](https://github.com/spryker-shop/b2c-demo-shop/blob/master/config/Shared/stores.php#L38). - -## Import template file and content example -A template and an example of the *currency.csv* file can be downloaded here: - -| File | Description | -| --- | --- | -| [currency.csv template](https://spryker.s3.eu-central-1.amazonaws.com/docs/Developer+Guide/Back-End/Data+Manipulation/Data+Ingestion/Data+Import/Data+Import+Categories/Commerce+Setup/Template+currency.csv) | Currency .csv template file (empty content, contains headers only). | -| [currency.csv](https://spryker.s3.eu-central-1.amazonaws.com/docs/Developer+Guide/Back-End/Data+Manipulation/Data+Ingestion/Data+Import/Data+Import+Categories/Commerce+Setup/currency.csv) | Currency .csv file containing a Demo Shop data sample. | - diff --git a/docs/scos/dev/data-import/202005.0/data-import-categories/commerce-setup/file-details-customer.csv.md b/docs/scos/dev/data-import/202005.0/data-import-categories/commerce-setup/file-details-customer.csv.md deleted file mode 100644 index 41105d236a2..00000000000 --- a/docs/scos/dev/data-import/202005.0/data-import-categories/commerce-setup/file-details-customer.csv.md +++ /dev/null @@ -1,42 +0,0 @@ ---- -title: File details- customer.csv -last_updated: Sep 14, 2020 -template: data-import-template -originalLink: https://documentation.spryker.com/v5/docs/file-details-customercsv -originalArticleId: d789860c-5ce2-41b9-ba3b-e0714e3cb4eb -redirect_from: - - /v5/docs/file-details-customercsv - - /v5/docs/en/file-details-customercsv ---- - -This article contains content of the **customer.csv** file to configure [Customer](/docs/scos/user/features/{{page.version}}/customer-account-management-feature-overview/customer-account-management-feature-overview.html) information on your Spryker Demo Shop. - -## Import file parameters -These are the header fields to be included in the .csv file: - -| Field Name | Mandatory | Type | Other Requirements/Comments | Description | -| --- | --- | --- | --- | --- | -| **customer_reference** | Yes (*unique*) | String | Must end with a number. | Reference of the Customer. | -| **locale_name** | No | String | N/A* | Locale name. | -| **phone** | No | String | N/A | Customer’s phone number. | -| **email** | Yes (*unique*) | String | N/A | Customer’s e-mail | -| **salutation** | Yes | String | Values must be:
    • Mr
    • Mrs
    • Dr, or
    • Ms
    | Used salutation.
    The value must be within the list of values predefined in the `spyCustomerTableMap.php` file. | -| **first_name** | Yes | String | N/A | Customer’s first name. | -| **last_name** | Yes | String | N/A | Customer’s last name. | -| **company** | No | String | N/A | Customer’s Company | -| **gender** | Yes | String | Values must be:
    • Male, or
    • Female
    | Customer’s gender.
    The value must be within the list of values predefined in the `spyCustomerTableMap.php`file. | -| **date_of_birth** | No | Date | N/A | Customer’s date of birth. | -| **password** | No | String | N/A | Customer’s password. | -| **registered** | No | Date | N/A | Customer’s date of registration. | -*N/A: Not applicable. - -## Dependencies -This file has no dependencies. - -## Import template file and content example -A template and an example of the *customer.csv* file can be downloaded here: - -| File | Description | -| --- | --- | -| [customer.csv template](https://spryker.s3.eu-central-1.amazonaws.com/docs/Developer+Guide/Back-End/Data+Manipulation/Data+Ingestion/Data+Import/Data+Import+Categories/Commerce+Setup/Template+customer.csv) | Customer .csv template file (empty content, contains headers only). | -| [customer.csv](https://spryker.s3.eu-central-1.amazonaws.com/docs/Developer+Guide/Back-End/Data+Manipulation/Data+Ingestion/Data+Import/Data+Import+Categories/Commerce+Setup/customer.csv) | Customer .csv file containing a Demo Shop data sample. | diff --git a/docs/scos/dev/data-import/202005.0/data-import-categories/commerce-setup/file-details-glossary.csv.md b/docs/scos/dev/data-import/202005.0/data-import-categories/commerce-setup/file-details-glossary.csv.md deleted file mode 100644 index 1c5b3bc81cc..00000000000 --- a/docs/scos/dev/data-import/202005.0/data-import-categories/commerce-setup/file-details-glossary.csv.md +++ /dev/null @@ -1,35 +0,0 @@ ---- -title: File details- glossary.csv -last_updated: Sep 14, 2020 -template: data-import-template -originalLink: https://documentation.spryker.com/v5/docs/file-details-glossarycsv -originalArticleId: ca662124-7a04-470e-b3ec-a4549a2b9ec2 -redirect_from: - - /v5/docs/file-details-glossarycsv - - /v5/docs/en/file-details-glossarycsv ---- - -This article contains content of the **glossary.csv** file to configure [Customer](/docs/scos/user/back-office-user-guides/{{page.version}}/administration/glossary/glossary.html) information on your Spryker Demo Shop. - -## Import file parameters -These are the header fields to be included in the .csv file: - -| File Name | Mandatory | Type | Other Requirements/Comments | Description | -| --- | --- | --- | --- | --- | -| key | Yes | String | N/A* | Glossary key, which is used in the templates contained in the shop application. | -| translation | Yes | String | N/A | Translation value of the key for the specific locale. | -| locale | Yes | String | N/A | Locale of the translation. | -*N/A: Not applicable. - -## Dependencies -This file has no dependencies. - -## Import template file and content example - -A template and an example of the *glossary.csv* file can be downloaded here: - - -| File | Description | -| --- | --- | -| glossary.csv template | Glossary .csv template file (empty content, contains headers only). | -| glossary.csv | Glossary .csv file containing a Demo Shop data sample. | diff --git a/docs/scos/dev/data-import/202005.0/data-import-categories/commerce-setup/file-details-payment-method-store.csv.md b/docs/scos/dev/data-import/202005.0/data-import-categories/commerce-setup/file-details-payment-method-store.csv.md deleted file mode 100644 index 489e2358d0e..00000000000 --- a/docs/scos/dev/data-import/202005.0/data-import-categories/commerce-setup/file-details-payment-method-store.csv.md +++ /dev/null @@ -1,35 +0,0 @@ ---- -title: File details- payment_method_store.csv -last_updated: Sep 14, 2020 -template: data-import-template -originalLink: https://documentation.spryker.com/v5/docs/file-details-payment-method-storecsv -originalArticleId: b782df6e-3463-4233-bf6c-2b463c9f71c6 -redirect_from: - - /v5/docs/file-details-payment-method-storecsv - - /v5/docs/en/file-details-payment-method-storecsv ---- - -This article contains content of the **payment_method_store.csv** file to configure Payment Method Store information on your Spryker Demo Shop. - -## Import file parameters -These are the header fields to be included in the .csv file: - -| Field Name | Mandatory | Type | Other Requirements/Comments | Description | -| --- | --- | --- | --- | --- | -| **payment_method_key** | Yes | String |Value should be imported from the [payment_method.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/commerce-setup/file-details-payment-method.csv.html) file. | Identifier of the payment method. | -| **store** | Yes | String | Value must be within an existing store name, set in the *store.php* configuration file of the demo shop PHP project. | Name of the store. | -*N/A: Not applicable. - -## Dependencies - -This file has the following dependencies: -* [payment_method.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/commerce-setup/file-details-payment-method.csv.html) -* *stores.php* configuration file of the demo shop PHP project - -## Import template file and content example -A template and an example of the *payment_method_store.csv* file can be downloaded here: - -| File | Description | -| --- | --- | -| [payment_method_store.csv template](https://spryker.s3.eu-central-1.amazonaws.com/docs/Developer+Guide/Back-End/Data+Manipulation/Data+Ingestion/Data+Import/Data+Import+Categories/Commerce+Setup/Template+payment_method_store.csv) | Payment Method Store .csv template file (empty content, contains headers only). | -| [payment_method_store.csv](https://spryker.s3.eu-central-1.amazonaws.com/docs/Developer+Guide/Back-End/Data+Manipulation/Data+Ingestion/Data+Import/Data+Import+Categories/Commerce+Setup/payment_method_store.csv) | Payment Method Store .csv file containing a Demo Shop data sample. | diff --git a/docs/scos/dev/data-import/202005.0/data-import-categories/commerce-setup/file-details-payment-method.csv.md b/docs/scos/dev/data-import/202005.0/data-import-categories/commerce-setup/file-details-payment-method.csv.md deleted file mode 100644 index de9d4acf672..00000000000 --- a/docs/scos/dev/data-import/202005.0/data-import-categories/commerce-setup/file-details-payment-method.csv.md +++ /dev/null @@ -1,35 +0,0 @@ ---- -title: File details- payment_method.csv -last_updated: Sep 14, 2020 -template: data-import-template -originalLink: https://documentation.spryker.com/v5/docs/file-details-payment-methodcsv -originalArticleId: fc831614-7a67-49fe-b005-d54f5f3b0975 -redirect_from: - - /v5/docs/file-details-payment-methodcsv - - /v5/docs/en/file-details-payment-methodcsv ---- - -This article contains content of the **payment_method.csv** file to configure [Payment Method](/docs/scos/user/features/{{page.version}}/payment/payment.html) information on your Spryker Demo Shop. - -## Import file parameters -These are the header fields to be included in the .csv file: - -| Field Name | Mandatory | Type | Other Requirements/Comments | Description | -| --- | --- | --- | --- | --- | -| **payment_method_key** | Yes | String | N/A*| Identifier of the payment method. | -| **payment_method_name** | Yes | String | N/A | Name of the payment method. | -| **payment_provider_key** | Yes | String | N/A | Identifier of the payment provider. | -| **payment_provider_name** | Yes | String | N/A| Name of the payment provider. | -| **is_active** | No | Boolean |
    • True = 1
    • False = 0
    • If empty, it will be set to 0 (false).
    • | Status indicating whether the payment method is active or not. | -*N/A: Not applicable. - -## Dependencies -This file has no dependencies. - -## Import template file and content example -A template and an example of the *payment_method.csv* file can be downloaded here: - -| File | Description | -| --- | --- | -| [payment_method.csv template](https://spryker.s3.eu-central-1.amazonaws.com/docs/Developer+Guide/Back-End/Data+Manipulation/Data+Ingestion/Data+Import/Data+Import+Categories/Commerce+Setup/Template+payment_method.csv) | Payment Method .csv template file (empty content, contains headers only). | -| [payment_method.csv](https://spryker.s3.eu-central-1.amazonaws.com/docs/Developer+Guide/Back-End/Data+Manipulation/Data+Ingestion/Data+Import/Data+Import+Categories/Commerce+Setup/payment_method.csv) | Payment Method .csv file containing a Demo Shop data sample. | diff --git a/docs/scos/dev/data-import/202005.0/data-import-categories/commerce-setup/file-details-sales-order-threshold.csv.md b/docs/scos/dev/data-import/202005.0/data-import-categories/commerce-setup/file-details-sales-order-threshold.csv.md deleted file mode 100644 index d120de74c99..00000000000 --- a/docs/scos/dev/data-import/202005.0/data-import-categories/commerce-setup/file-details-sales-order-threshold.csv.md +++ /dev/null @@ -1,40 +0,0 @@ ---- -title: File details- sales_order_threshold.csv -last_updated: Sep 14, 2020 -template: data-import-template -originalLink: https://documentation.spryker.com/v5/docs/file-details-sales-order-thresholdcsv -originalArticleId: c8d1e68f-b779-4d18-92e4-dd512bbc2297 -redirect_from: - - /v5/docs/file-details-sales-order-thresholdcsv - - /v5/docs/en/file-details-sales-order-thresholdcsv ---- - -This article contains content of the **sales_order_threshold.csv** file to configure [Sales Order Threshold](/docs/scos/user/features/{{page.version}}/checkout-feature-overview/order-thresholds-overview.html) information on your Spryker Demo Shop. - -## Import file parameters -These are the header fields to be included in the .csv file: - -| Field Name | Mandatory | Type | Other Requirements/Comments | Description | -| --- | --- | --- | --- | --- | -| **store** | Yes | String | N/A*| Name of the store. | -| **currency** | Yes | String | N/A | Currency ISO code. | -| **threshold_type_key** | Yes | String | N/A | Identifier of the threshold type. | -| **threshold** | Yes | Integer | N/A| Threshold value. | -| **fee** | No | Integer | N/A | Threshold fee. | -| **message_glossary_key** | Yes | String | N/A | Identifier of the glossary message. | -*N/A: Not applicable. - -## Dependencies -This file has the following dependencies: - -* [currency.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/commerce-setup/file-details-currency.csv.html) -* [glossary.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/commerce-setup/file-details-glossary.csv.html) -* s*tores.php* configuration file of the demo shop PHP project - -## Import template file and content example -A template and an example of the *sales_order_threshold.csv* file can be downloaded here: - -| File | Description | -| --- | --- | -| [sales_order_threshold.csv template](https://spryker.s3.eu-central-1.amazonaws.com/docs/Developer+Guide/Back-End/Data+Manipulation/Data+Ingestion/Data+Import/Data+Import+Categories/Commerce+Setup/Template+sales_order_threshold.csv) | Sales Order Threshold .csv template file (empty content, contains headers only). | -| [sales_order_threshold.csv](https://spryker.s3.eu-central-1.amazonaws.com/docs/Developer+Guide/Back-End/Data+Manipulation/Data+Ingestion/Data+Import/Data+Import+Categories/Commerce+Setup/sales_order_threshold.csv) | Sales Order Threshold .csv file containing a Demo Shop data sample. | diff --git a/docs/scos/dev/data-import/202005.0/data-import-categories/commerce-setup/file-details-shipment-method-store.csv.md b/docs/scos/dev/data-import/202005.0/data-import-categories/commerce-setup/file-details-shipment-method-store.csv.md deleted file mode 100644 index de240b055c8..00000000000 --- a/docs/scos/dev/data-import/202005.0/data-import-categories/commerce-setup/file-details-shipment-method-store.csv.md +++ /dev/null @@ -1,36 +0,0 @@ ---- -title: File details- shipment_method_store.csv -last_updated: Sep 14, 2020 -template: data-import-template -originalLink: https://documentation.spryker.com/v5/docs/file-details-shipment-method-storecsv -originalArticleId: e8ad47a1-4e94-4211-9564-dda73b7b0e4c -redirect_from: - - /v5/docs/file-details-shipment-method-storecsv - - /v5/docs/en/file-details-shipment-method-storecsv ---- - -This article contains information about the [Shipment Method](/docs/scos/user/features/{{page.version}}/shipment-feature-overview.html) and Store relation to be added to your Spryker Demo Shop. - -The *shipment_method_store.csv* file contains the links between each shipment method used by each existing store. - -## Import file parameters -These are the header fields to be included in the .csv file: - -| Field Name | Mandatory | Type | Other Requirements/Comments | Description | -| --- | --- | --- | --- | --- | -| **shipment_method_key** | Yes | String | Can be imported from the content that was loaded using the [shipment.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/commerce-setup/file-details-shipment.csv.html) file.| Identifier of the shipment method. | -| **store** | Yes | String |Must be one of the existing store names. The store names are initially already defined in* stores.php* configuration file. | Name of the store. | - -## Dependencies -This file has the following dependencies: - -* [shipment.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/commerce-setup/file-details-shipment.csv.html) -* *stores.php* configuration file of demo shop PHP project - -## Import template file and content example -A template and an example *shipment_method_store.csv* file can be downloaded here: - -| File | Description | -| --- | --- | -| [shipment_method_store.csv template](https://spryker.s3.eu-central-1.amazonaws.com/docs/Developer+Guide/Back-End/Data+Manipulation/Data+Ingestion/Data+Import/Data+Import+Categories/Commerce+Setup/Template+shipment_method_store.csv) | Shipment Method Store .csv template file (empty content, contains headers only). | -| [shipment_method_store.csv](https://spryker.s3.eu-central-1.amazonaws.com/docs/Developer+Guide/Back-End/Data+Manipulation/Data+Ingestion/Data+Import/Data+Import+Categories/Commerce+Setup/shipment_method_store.csv) | Shipment Method Store .csv file containing a Demo Shop data sample. | diff --git a/docs/scos/dev/data-import/202005.0/data-import-categories/commerce-setup/file-details-shipment-price.csv.md b/docs/scos/dev/data-import/202005.0/data-import-categories/commerce-setup/file-details-shipment-price.csv.md deleted file mode 100644 index 206f5c98b5d..00000000000 --- a/docs/scos/dev/data-import/202005.0/data-import-categories/commerce-setup/file-details-shipment-price.csv.md +++ /dev/null @@ -1,45 +0,0 @@ ---- -title: File details- shipment_price.csv -last_updated: Sep 14, 2020 -template: data-import-template -originalLink: https://documentation.spryker.com/v5/docs/file-details-shipment-pricecsv -originalArticleId: 9d5fdbf2-8b88-4fb8-a282-56e931718498 -redirect_from: - - /v5/docs/file-details-shipment-pricecsv - - /v5/docs/en/file-details-shipment-pricecsv ---- - -This article contains content of the **shipment_price.csv** file to configure [Shipment Price](/docs/scos/user/features/{{page.version}}/shipment-feature-overview.html) information on your Spryker Demo Dhop. - -## Import file parameters -These are the header fields to be included in the .csv file: - -| Field Name | Mandatory | Type | Other Requirements/Comments | Description | -| --- | --- | --- | --- | --- | -| **shipment_method_key** | Yes | String | Value previously imported already by its data importer using the [shipment.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/commerce-setup/file-details-shipment.csv.html) file.| Identifier of the shipment method. | -| **store** | Yes | String | Value previously defined in the *stores.php* project configuration. | Name of the store. | -| **currency** | Yes | String | Value previously imported already by its data importer using the [currency.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/commerce-setup/file-details-currency.csv.html) file. | Currency ISO code. | -| **value_net** | No |Integer | Empty price values will be imported as zeros. | Net value of the shipment cost. | -| **value_gross** | No | String |Empty price values will be imported as zeros. | Gross value of the shipment cost. | -*N/A: Not applicable. - -## Dependencies -This file has the following dependencies: - -* [shipment.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/commerce-setup/file-details-shipment.csv.html) -* [currency.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/commerce-setup/file-details-currency.csv.html) -* s*tores.ph*p configuration file of the demo shop PHP project - -## Recommendations & Other Information - -Field *value* must be *integer* as it is the internal format to store money (currency) in Spryker demo shop. Float values get converted into integer by multiplying by 100 (for example, if the shipment cost is 5.50 EUR, the value in CSV file should be 550). - -Fields *shipment_method_key*, *store* and *currency* are mandatory, and must be valid (imported already from existing database values, or created manually using precedent CSV files: *shipment_method.csv* and *currency.csv* and *stores.php* configuration project file). Empty value fields will be imported as zeros. - -## Import template file and content example -A template and an example of the *shipment_price.csv* file can be downloaded here: - -| File | Description | -| --- | --- | -| [shipment_price.csv](https://spryker.s3.eu-central-1.amazonaws.com/docs/Developer+Guide/Back-End/Data+Manipulation/Data+Ingestion/Data+Import/Data+Import+Categories/Commerce+Setup/Template+shipment_price.csv) | Shipment price .csv template file (empty content, contains headers only). | -| [shipment_price.csv](https://spryker.s3.eu-central-1.amazonaws.com/docs/Developer+Guide/Back-End/Data+Manipulation/Data+Ingestion/Data+Import/Data+Import+Categories/Commerce+Setup/shipment_price.csv) | Shipment price .csv file containing a Demo Shop data sample. | diff --git a/docs/scos/dev/data-import/202005.0/data-import-categories/commerce-setup/file-details-shipment.csv.md b/docs/scos/dev/data-import/202005.0/data-import-categories/commerce-setup/file-details-shipment.csv.md deleted file mode 100644 index d616c0ff3b0..00000000000 --- a/docs/scos/dev/data-import/202005.0/data-import-categories/commerce-setup/file-details-shipment.csv.md +++ /dev/null @@ -1,35 +0,0 @@ ---- -title: File details- shipment.csv -last_updated: Sep 14, 2020 -template: data-import-template -originalLink: https://documentation.spryker.com/v5/docs/file-details-shipmentcsv -originalArticleId: fb880466-9902-4424-b390-5083fbcad371 -redirect_from: - - /v5/docs/file-details-shipmentcsv - - /v5/docs/en/file-details-shipmentcsv ---- - -This article contains content of the **shipment.csv** file to configure [Shipment](/docs/scos/user/features/{{page.version}}/shipment-feature-overview.html) information on your Spryker Demo Shop. - -## Import file parameters -These are the header fields to be included in the .csv file: - -| Field Name | Mandatory | Type | Other Requirements/Comments | Description | -| --- | --- | --- | --- | --- | -| **shipment_method_key** | Yes (*unique*) | String | N/A*| Identifier of the shipment method. | -| **name** | Yes | String | N/A | Name of the shipment method. | -| **carrier** | Yes | String | N/A | Name of the shipment carrier. | -| **taxSetName** | Yes | String | N/A| Name of the tax set. | - -N/A: Not applicable. - -## Dependencies -This file has no dependencies. - -## Import template file and content example -A template and an example of the *shipment.csv* file can be downloaded here: - -| File | Description | -| --- | --- | -| [shipment.csv template](https://spryker.s3.eu-central-1.amazonaws.com/docs/Developer+Guide/Back-End/Data+Manipulation/Data+Ingestion/Data+Import/Data+Import+Categories/Commerce+Setup/Template+shipment.csv) | Shipment .csv template file (empty content, contains headers only). | -| [shipment.csv](https://spryker.s3.eu-central-1.amazonaws.com/docs/Developer+Guide/Back-End/Data+Manipulation/Data+Ingestion/Data+Import/Data+Import+Categories/Commerce+Setup/shipment.csv) | Shipment .csv file containing a Demo Shop data sample. | diff --git a/docs/scos/dev/data-import/202005.0/data-import-categories/commerce-setup/file-details-tax.csv.md b/docs/scos/dev/data-import/202005.0/data-import-categories/commerce-setup/file-details-tax.csv.md deleted file mode 100644 index ddfff8ca8e4..00000000000 --- a/docs/scos/dev/data-import/202005.0/data-import-categories/commerce-setup/file-details-tax.csv.md +++ /dev/null @@ -1,36 +0,0 @@ ---- -title: File details- tax.csv -last_updated: Sep 14, 2020 -template: data-import-template -originalLink: https://documentation.spryker.com/v5/docs/file-details-taxcsv -originalArticleId: 35aaaa94-0661-47e1-9782-b5059e56e52b -redirect_from: - - /v5/docs/file-details-taxcsv - - /v5/docs/en/file-details-taxcsv ---- - -This article contains content of the **tax.csv** file to configure [Tax](/docs/scos/user/features/{{page.version}}/tax-feature-overview.html) information on your Spryker Demo Shop. - -## Import file parameters -These are the header fields to be included in the .csv file: - - -| Field Name | Mandatory | Type | Other Requirements/Comments | Description | -| --- | --- | --- | --- | --- | -| **tax_set_name** | Yes | String | N/A* | Name of the tax set. Set of tax rates that can be applied to a specific product. | -| **country_name** | Yes | String | N/A | Country to which the tax refers to. | -| **tax_rate_name** | Yes | String | N/A| Name of the tax rate.
      Tax rate is the ratio (usually expressed as a percentage) at which a business or person is taxed. | -| **tax_rate_percent** | Yes | Float | N/A| Tax rate, expressed as a percentage. | - *N/A: Not applicable. - - ## Dependencies -This file has no dependencies. - -## Import template file and content example -A template and an example of the *tax.csv* file can be downloaded here: - -| File | Description | -| --- | --- | -| [tax.csv template](https://spryker.s3.eu-central-1.amazonaws.com/docs/Developer+Guide/Back-End/Data+Manipulation/Data+Ingestion/Data+Import/Data+Import+Categories/Commerce+Setup/Template+tax.csv) | Tax .csv template file (empty content, contains headers only). | -| [tax.csv](https://spryker.s3.eu-central-1.amazonaws.com/docs/Developer+Guide/Back-End/Data+Manipulation/Data+Ingestion/Data+Import/Data+Import+Categories/Commerce+Setup/tax.csv) | Tax .csv file containing a Demo Shop data sample. | - diff --git a/docs/scos/dev/data-import/202005.0/data-import-categories/commerce-setup/file-details-warehouse-store.csv.md b/docs/scos/dev/data-import/202005.0/data-import-categories/commerce-setup/file-details-warehouse-store.csv.md deleted file mode 100644 index c10b5404c02..00000000000 --- a/docs/scos/dev/data-import/202005.0/data-import-categories/commerce-setup/file-details-warehouse-store.csv.md +++ /dev/null @@ -1,40 +0,0 @@ ---- -title: File details- warehouse_store.csv -last_updated: Sep 14, 2020 -template: data-import-template -originalLink: https://documentation.spryker.com/v5/docs/file-details-warehouse-storecsv -originalArticleId: 2665f6a8-3420-40ea-84c5-28490fc62abf -redirect_from: - - /v5/docs/file-details-warehouse-storecsv - - /v5/docs/en/file-details-warehouse-storecsv ---- - -This article contains content of the **warehouse_store** file to configure Warehouse / Store relation on your Spryker Demo Shop. - -## Import file parameters -These are the header fields to be included in the .csv file: - -| Field Name | Mandatory | Type | Other Requirements/Comments | Description | -| --- | --- | --- | --- | --- | -| **warehouse_name** | Yes | String | Must be a valid warehouse name imported from [warehouse.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/commerce-setup/file-details-warehouse.csv.html). | Name of the warehouse. | -| **store_name** | Yes | String | Must be a valid store name imported from the existing *stores.php* configuration file of demo shop PHP project. | Name of the store. | - -## Dependencies -This file has the following dependencies: - -* [warehouse.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/commerce-setup/file-details-warehouse.csv.html) -* *stores.php* configuration file of demo shop PHP project (where stores are defined initially) - -## Recommendations & other information -Check the [HowTo: Import Warehouse Data](/docs/scos/dev/tutorials/{{page.version}}/howtos/feature-howtos/data-imports/howto-import-warehouse-data.html) -The console command `data:import:stock-store` uses `…/vendor/spryker/stock-data-import/data/import/warehouse_store.csv`. - -The* warehouse_store.csv* file can also be created under the `…/data/import` folder. - -## Import template file and content example -A template and an example of the *warehouse_store.csv* file can be downloaded here: - -| File | Description | -| --- | --- | -| [warehouse_store.csv template](https://spryker.s3.eu-central-1.amazonaws.com/docs/Developer+Guide/Back-End/Data+Manipulation/Data+Ingestion/Data+Import/Data+Import+Categories/Commerce+Setup/Template+warehouse_store.csv) | Warehouse Store .csv template file (empty content, contains headers only). | -| [warehouse_store.csv](https://spryker.s3.eu-central-1.amazonaws.com/docs/Developer+Guide/Back-End/Data+Manipulation/Data+Ingestion/Data+Import/Data+Import+Categories/Commerce+Setup/warehouse_store.csv) | Warehouse Store .csv file containing a Demo Shop data sample. | diff --git a/docs/scos/dev/data-import/202005.0/data-import-categories/commerce-setup/file-details-warehouse.csv.md b/docs/scos/dev/data-import/202005.0/data-import-categories/commerce-setup/file-details-warehouse.csv.md deleted file mode 100644 index 143d18202c7..00000000000 --- a/docs/scos/dev/data-import/202005.0/data-import-categories/commerce-setup/file-details-warehouse.csv.md +++ /dev/null @@ -1,42 +0,0 @@ ---- -title: File details- warehouse.csv -last_updated: Sep 14, 2020 -template: data-import-template -originalLink: https://documentation.spryker.com/v5/docs/file-details-warehousecsv -originalArticleId: 11ccd59d-1d0d-4588-82fa-97d16a5867cd -redirect_from: - - /v5/docs/file-details-warehousecsv - - /v5/docs/en/file-details-warehousecsv ---- - -This article contains content of the **warehouse.csv** file to configure [Warehouse](/docs/scos/user/features/{{page.version}}/inventory-management-feature-overview.html) information on your Spryker Demo Shop. - -## Import file parameters -These are the header fields to be included in the .csv file: - -| Field Name | Mandatory | Type | Other Requirements/Comments | Description | -| --- | --- | --- | --- | --- | -| **name** | Yes | String | N/A*| Name of the warehouse. | -| **is_active** | No | Boolean |
      • True = 1
      • False = 0
      • If empty, it will be assumed 0 (false)
      |Status of the warehouse, specified in a boolean value: 1 (true) or 0 (false), where 1 indicates that the warehouse is available and 0 indicates that the warehouse is unavailable. By default, the warehouse is not active.| -*N/A: Not applicable. - -## Dependencies -This file has no dependencies. - -## Recommendations & Other Information -Check the [HowTo: Import Warehouse Data](/docs/scos/dev/tutorials/{{page.version}}/howtos/feature-howtos/data-imports/howto-import-warehouse-data.html). -{% info_block infoBox "Note" %} - -The *warehouse.csv* file replaces *stock.csv* previously used. - -{% endinfo_block %} -By default, *warehouse.csv* exists only in folder `…/vendor/spryker/stock-data-import/data/import/warehouse.csv`, but can be also be copied into `…/data/import` folder. - - -## Import template file and content example -A template and an example of the *warehouse.csv* file can be downloaded here: - -| File | Description | -| --- | --- | -| [warehouse.csv template](https://spryker.s3.eu-central-1.amazonaws.com/docs/Developer+Guide/Back-End/Data+Manipulation/Data+Ingestion/Data+Import/Data+Import+Categories/Commerce+Setup/Template+warehouse.csv) | Warehouse .csv template file (empty content, contains headers only). | -| [warehouse.csv](https://spryker.s3.eu-central-1.amazonaws.com/docs/Developer+Guide/Back-End/Data+Manipulation/Data+Ingestion/Data+Import/Data+Import+Categories/Commerce+Setup/warehouse.csv) | Warehouse .csv file containing a Demo Shop data sample. | diff --git a/docs/scos/dev/data-import/202005.0/data-import-categories/content-management/content-management.md b/docs/scos/dev/data-import/202005.0/data-import-categories/content-management/content-management.md deleted file mode 100644 index 0da4bba4c6d..00000000000 --- a/docs/scos/dev/data-import/202005.0/data-import-categories/content-management/content-management.md +++ /dev/null @@ -1,53 +0,0 @@ ---- -title: Content Management -last_updated: Sep 14, 2020 -template: data-import-template -originalLink: https://documentation.spryker.com/v5/docs/content-management -originalArticleId: 30c7f204-d9b9-4b4e-8ace-10f90d5b80b3 -redirect_from: - - /v5/docs/content-management - - /v5/docs/en/content-management ---- - -The **Content Management** category contains data required to create and manage content elements, such es CMS pages, blocks, etc. for your online store. - -The table below provides details on Content Management data importers, their purpose, .csv files, dependencies, and other details. Each data importer contains links to .csv files used to import the corresponding data, including specifications of mandatory and unique fields, dependencies, detailed explanations, recommendations, templates, and content examples. - -| Data Importer | Purpose | Console Command| FILES | Dependencies | -| --- | --- | --- | --- |--- | -| **CMS Template** | Imports information about CMS templates. |`data:import:cms-template` |[ cms_template.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/content-management/file-details-cms-template.csv.html)|None | -| **CMS Slot Template** | Imports information about the CMS slot templates. |`data:import cms-slot-template ` | [cms_slot_template.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/content-management/file-details-cms-slot-template.csv.html)| None| -| **CMS Slot** | Imports information about CMS slots. |`data:import cms-slot` |[cms_slot.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/content-management/file-details-cms-slot.csv.html) |None | -| **CMS Block** | Imports information about CMS blocks. |`data:import:cms-block` | [cms_block.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/content-management/file-details-cms-block.csv.html)|None | -| **CMS Block Category** |Imports information about CMS block categories. |`data:import:cms-block-category` | [cms_block_category.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/content-management/file-details-cms-block-category.csv.html)|[cms_block_category_position.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/content-management/file-details-cms-block-category-postion.csv.html) | -| **CMS Block Category Position** |Imports information about CMS block category positions. |`data:import:cms-block-category-position` |[cms_block_category_position.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/content-management/file-details-cms-block-category-postion.csv.html)|None | -| **CMS Slot Block** | Imports information used to set the relations between CMS slots and CMS blocks.|`data:import cms-slot-block` | [cms_block_store.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/content-management/file-details-cms-block-store.csv.html)|
      • [cms_slot.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/content-management/file-details-cms-slot.csv.html)
      • [cms_block.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/content-management/file-details-cms-block.csv.html)
      | -| **CMS Block Store** | Imports information used to link the CMS blocks to specific stores. |`data:import:cms-block-store` | [cms_block_store.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/content-management/file-details-cms-block-store.csv.html)|
      • [cms_block.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/content-management/file-details-cms-block.csv.html)
      • **stores.php** configuration file of demo shop PHP project
      | -| **CMS Page** | Imports information about CMS pages. |`data:import cms-page` |[cms_page.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/content-management/file-details-cms-page.csv.html) |[cms_template.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/content-management/file-details-cms-template.csv.html) | -| **CMS Page Store** | Imports information about CMS pages to specific stores. |`data:import cms-page-store` |[cms_page_store.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/content-management/file-details-cms-page-store.csv.html) |
      • [cms_page.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/content-management/file-details-cms-page.csv.html)
      • **stores.php** configuration file of demo shop PHP project
      | -| **Content Banner** | Imports information used in banners' content. |`data:import content-banner` |[content_banner.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/content-management/file-details-content-banner.csv.html) |[glossary.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/commerce-setup/file-details-glossary.csv.html) | -| **Content Product Abstract List** |Imports information used to import the content related to abstract products. |`data:import content-product-abstract-list` |[content_product_abstract_list.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/content-management/file-details-content-product-abstract-list.csv.html) |[product_abstract.csv ](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/catalog-setup/products/file-details-product-abstract.csv.html)| -| **Content Product Set** |Imports information used to load content linked to product sets. |`data:import content-product-set ` | [content_product_set.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/content-management/file-details-content-product-set.csv.html)| [product_set.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/merchandising-setup/product-merchandising/file-details-product-set.csv.html)| - - - -{% info_block warningBox "Import order" %} - -The order in which the files are imported is **very strict**. For this reason, the data importers should be executed in the following order: - -1. [CMS Template](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/content-management/file-details-cms-template.csv.html) -2. [CMS Block](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/content-management/file-details-cms-block.csv.html) -3. [CMS Block Store](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/content-management/file-details-cms-block-store.csv.html) -4. [CMS Block Category Position](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/content-management/file-details-cms-block-category-postion.csv.html) -5. [CMS Block Category](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/content-management/file-details-cms-block-category.csv.html) -6. [Content Banner](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/content-management/file-details-content-banner.csv.html) -7. [Content Product Abstract List](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/content-management/file-details-content-product-abstract-list.csv.html) -8. [Content Product Set](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/content-management/file-details-content-product-set.csv.html) -9. [CMS Page](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/content-management/file-details-cms-page.csv.html) -10. [CMS Page Store](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/content-management/file-details-cms-page-store.csv.html) -1. [CMS Slot Template](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/content-management/file-details-cms-slot-template.csv.html) -2. [CMS Slot](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/content-management/file-details-cms-slot.csv.html) -3. [CMS Slot Block](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/content-management/file-details-cms-block-store.csv.html) - - -{% endinfo_block %} diff --git a/docs/scos/dev/data-import/202005.0/data-import-categories/content-management/file-details-cms-block-category-postion.csv.md b/docs/scos/dev/data-import/202005.0/data-import-categories/content-management/file-details-cms-block-category-postion.csv.md deleted file mode 100644 index a06a4de9b3f..00000000000 --- a/docs/scos/dev/data-import/202005.0/data-import-categories/content-management/file-details-cms-block-category-postion.csv.md +++ /dev/null @@ -1,33 +0,0 @@ ---- -title: File details- cms_block_category_postion.csv -last_updated: Jun 1, 2020 -template: data-import-template -originalLink: https://documentation.spryker.com/v5/docs/file-details-cms-block-category-postioncsv -originalArticleId: 50b3e68a-6e3c-481c-8047-73783e3eabfe -redirect_from: - - /v5/docs/file-details-cms-block-category-postioncsv - - /v5/docs/en/file-details-cms-block-category-postioncsv ---- - -This article contains content of the **cms_block_category_postion.csv** file to configure CMS Block Category Position information on your Spryker Demo Shop. - -## Import file parameters -These are the header fields to be included in the .csv file: - -| Field Name | Mandatory | Type | Other Requirements/Comments | Description | -| --- | --- | --- | --- | --- | -| **ms_block_category** | Yes | String |N/A* |Name of the CMS block category position. | - -*N/A: Not applicable. - -## Dependencies - -This file has no dependencies. - -## Import template file and content example -A template and an example of the *cms_block_category_postion.csv* file can be downloaded here: - -| File | Description | -| --- | --- | -| [cms_block_category_postion.csv template](https://spryker.s3.eu-central-1.amazonaws.com/docs/Developer+Guide/Back-End/Data+Manipulation/Data+Ingestion/Data+Import/Data+Import+Categories/Content+Management/cms_block_category_position_template.csv) | CMS Block Category Position .csv template file (empty content, contains headers only). | -| [cms_block_category_postion.csv](https://spryker.s3.eu-central-1.amazonaws.com/docs/Developer+Guide/Back-End/Data+Manipulation/Data+Ingestion/Data+Import/Data+Import+Categories/Content+Management/cms_block_category_position.csv) | CMS Block Category Position .csv file containing a Demo Shop data sample. | diff --git a/docs/scos/dev/data-import/202005.0/data-import-categories/content-management/file-details-cms-block-category.csv.md b/docs/scos/dev/data-import/202005.0/data-import-categories/content-management/file-details-cms-block-category.csv.md deleted file mode 100644 index 9c2ea87b55c..00000000000 --- a/docs/scos/dev/data-import/202005.0/data-import-categories/content-management/file-details-cms-block-category.csv.md +++ /dev/null @@ -1,36 +0,0 @@ ---- -title: File details- cms_block_category.csv -last_updated: Sep 14, 2020 -template: data-import-template -originalLink: https://documentation.spryker.com/v5/docs/file-details-cms-block-categorycsv -originalArticleId: bf9aba65-8d22-4b54-8296-b166090f452b -redirect_from: - - /v5/docs/file-details-cms-block-categorycsv - - /v5/docs/en/file-details-cms-block-categorycsv ---- - -This article contains content of the **cms_block_category.csv** file to configure CMS Block Category information on your Spryker Demo Shop. - -## Import file parameters -These are the header fields to be included in the .csv file: - -| Field Name | Mandatory | Type | Other Requirements/Comments | Description | -| --- | --- | --- | --- | --- | -| **block_key** | Yes | String |N/A* | Identifier key of the Block.| -| **category_key** | Yes | String |N/A | Identifier key of the category. | -| **category_template_name** | Yes | String |N/A | Name of the category template. | -| **cms_block_category_position_name** | No | String |N/A | Name of the CMS block category position. | -*N/A: Not applicable. - -## Dependencies - -This file has the following dependency: -* [cms_block_category_position.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/content-management/file-details-cms-block-category-postion.csv.html) - -## Import template file and content example -A template and an example of the *cms_block_category.csv* file can be downloaded here: - -| File | Description | -| --- | --- | -| [cms_block_category.csv template](https://spryker.s3.eu-central-1.amazonaws.com/docs/Developer+Guide/Back-End/Data+Manipulation/Data+Ingestion/Data+Import/Data+Import+Categories/Content+Management/cms_block_category_template.csv) | CMS Block Category .csv template file (empty content, contains headers only). | -| [cms_block_category.csv](https://spryker.s3.eu-central-1.amazonaws.com/docs/Developer+Guide/Back-End/Data+Manipulation/Data+Ingestion/Data+Import/Data+Import+Categories/Content+Management/cms_block_category.csv) | PCMS Block Category .csv file containing a Demo Shop data sample. | diff --git a/docs/scos/dev/data-import/202005.0/data-import-categories/content-management/file-details-cms-block-store.csv.md b/docs/scos/dev/data-import/202005.0/data-import-categories/content-management/file-details-cms-block-store.csv.md deleted file mode 100644 index 83dec3a802c..00000000000 --- a/docs/scos/dev/data-import/202005.0/data-import-categories/content-management/file-details-cms-block-store.csv.md +++ /dev/null @@ -1,35 +0,0 @@ ---- -title: File details- cms_block_store.csv -last_updated: Sep 14, 2020 -template: data-import-template -originalLink: https://documentation.spryker.com/v5/docs/file-details-cms-block-storecsv -originalArticleId: d59bc9b2-daea-44dc-b0fa-c67cf858ab83 -redirect_from: - - /v5/docs/file-details-cms-block-storecsv - - /v5/docs/en/file-details-cms-block-storecsv ---- - -This article contains content of the **cms_block_store.csv** file to configure CMS Block Store information on your Spryker Demo Shop. - -## Import file parameters -These are the header fields to be included in the .csv file: - -| Field Name | Mandatory | Type | Other Requirements/Comments | Description | -| --- | --- | --- | --- | --- | -| **block_key** | Yes | String |N/A* | Key identifier of the block. | -| **store_name** | Yes | String |N/A | Name of the store. | -*N/A: Not applicable. - -## Dependencies - -This file has the following dependencies: -* [cms_block.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/content-management/file-details-cms-block.csv.html) -* *stores.php* configuration file of the demo shop PHP project - -## Import template file and content example -A template and an example of the *cms_block_store.csv* file can be downloaded here: - -| File | Description | -| --- | --- | -| [cms_block_store.csv template](https://spryker.s3.eu-central-1.amazonaws.com/docs/Developer+Guide/Back-End/Data+Manipulation/Data+Ingestion/Data+Import/Data+Import+Categories/Content+Management/Template+cms_block_store.csv) | CMS Block Store .csv template file (empty content, contains headers only). | -| [cms_block_store.csv](https://spryker.s3.eu-central-1.amazonaws.com/docs/Developer+Guide/Back-End/Data+Manipulation/Data+Ingestion/Data+Import/Data+Import+Categories/Content+Management/cms_block_store.csv) | CMS Block Store .csv file containing a Demo Shop data sample. | diff --git a/docs/scos/dev/data-import/202005.0/data-import-categories/content-management/file-details-cms-block.csv.md b/docs/scos/dev/data-import/202005.0/data-import-categories/content-management/file-details-cms-block.csv.md deleted file mode 100644 index 44eb7a6843a..00000000000 --- a/docs/scos/dev/data-import/202005.0/data-import-categories/content-management/file-details-cms-block.csv.md +++ /dev/null @@ -1,41 +0,0 @@ ---- -title: File details- cms_block.csv -last_updated: Sep 14, 2020 -template: data-import-template -originalLink: https://documentation.spryker.com/v5/docs/file-details-cms-blockcsv -originalArticleId: 56746518-c68b-4402-8cf8-0e0fc809ecd2 -redirect_from: - - /v5/docs/file-details-cms-blockcsv - - /v5/docs/en/file-details-cms-blockcsv ---- - -This article contains content of the **cms_block.csv** file to configure [CMS Block](/docs/scos/user/features/{{page.version}}/cms-feature-overview/cms-block.html) information on your Spryker Demo Shop. - -## Import file parameters -These are the header fields to be included in the .csv file: - -| Field Name | Mandatory | Type | Other Requirements/Comments | Description | -| --- | --- | --- | --- | --- | -| **block_key** | Yes | String |N/A* |Block key identifier | -| **block_name** | Yes (*unique*) | String |Human-readable name. | Name of the block. | -| **template_name** | No | String |N/A | Alphabetical identifier of the slot. It will be shown in the Back Office. | -| **template_path** | No | String |Must be a valid path to a twig template. | Path to the Twig file template. | -| **active** | No | Boolean |
      • Inactive = 0
      • Active = 1
      • If empty during the import, the block will be imported as inactive.
      | Indicates if the block is active or inactive. | -| **placeholder.title.{ANY_LOCALE_NAME}** **
      Example value: *placeholder.title.en_US* | No | String | N/A | Placeholder for block title, translated into the specified locale (US for our example). | -| **placeholder.description.{ANY_LOCALE_NAME}**
      Example value: *placeholder.description.en_US* | No | String | N/A | Placeholder for block description, translated into the specified locale (US for our example). | -| **placeholder.link.{ANY_LOCALE_NAME}**
      Example value: *placeholder.link.en_US* | No | String | N/A | Placeholder for block link, translated into the specified locale (US for our example). | -| **placeholder.content.{ANY_LOCALE_NAME}**
      Example value: *placeholder.content.en_US* | No | String | N/A | Placeholder for block content, translated into the specified locale (US for our example). | -*N/A: Not applicable. -** ANY_LOCALE_NAME: Locale date is dynamic in data importers. It means that ANY_LOCALE_NAME postifx can be changed, removed, and any number of columns with different locales can be added to the .csv files. - -## Dependencies - -This file has no dependencies. - -## Import template file and content example -A template and an example of the *cms_block.csv* file can be downloaded here: - -| File | Description | -| --- | --- | -| [cms_block.csv template](https://spryker.s3.eu-central-1.amazonaws.com/docs/Developer+Guide/Back-End/Data+Manipulation/Data+Ingestion/Data+Import/Data+Import+Categories/Content+Management/Template+cms_block.csv) | CMS Block .csv template file (empty content, contains headers only). | -| [cms_block.csv](https://spryker.s3.eu-central-1.amazonaws.com/docs/Developer+Guide/Back-End/Data+Manipulation/Data+Ingestion/Data+Import/Data+Import+Categories/Content+Management/cms_block.csv) | CMS Block .csv file containing a Demo Shop data sample. | diff --git a/docs/scos/dev/data-import/202005.0/data-import-categories/content-management/file-details-cms-page-store.csv.md b/docs/scos/dev/data-import/202005.0/data-import-categories/content-management/file-details-cms-page-store.csv.md deleted file mode 100644 index 7530b3569e0..00000000000 --- a/docs/scos/dev/data-import/202005.0/data-import-categories/content-management/file-details-cms-page-store.csv.md +++ /dev/null @@ -1,36 +0,0 @@ ---- -title: File details- cms_page_store.csv -last_updated: Sep 14, 2020 -template: data-import-template -originalLink: https://documentation.spryker.com/v5/docs/file-details-cms-page-storecsv -originalArticleId: 22886315-a1c1-4d6b-8c3e-e96577adf8cc -redirect_from: - - /v5/docs/file-details-cms-page-storecsv - - /v5/docs/en/file-details-cms-page-storecsv ---- - -This article contains content of the **cms_page_store.csv** file to configure CMS Page Store information on your Spryker Demo Shop. - -## Import file parameters -These are the header fields to be included in the .csv file: - -| Field Name | Mandatory | Type | Other Requirements/Comments | Description | -| --- | --- | --- | --- | --- | -| **page_key** | Yes (*unique*) | String |N/A* | Unique identifier of the page. | -| **store_name** | Yes | String |N/A | Store name identifier. | -*N/A: Not applicable. - -## Dependencies - -This file has the following dependencies: -* [cms_page.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/content-management/file-details-cms-page.csv.html) -* *stores.php* configuration file of the demo shop PHP project - -## Import template file and content example -A template and an example of the *cms_page_store.csv* file can be downloaded here: - -| File | Description | -| --- | --- | -| [cms_page_store.csv template](https://spryker.s3.eu-central-1.amazonaws.com/docs/Developer+Guide/Back-End/Data+Manipulation/Data+Ingestion/Data+Import/Data+Import+Categories/Content+Management/Template+cms_page_store.csv) | CMS Page Store .csv template file (empty content, contains headers only). | -| [cms_page_store.csv](https://spryker.s3.eu-central-1.amazonaws.com/docs/Developer+Guide/Back-End/Data+Manipulation/Data+Ingestion/Data+Import/Data+Import+Categories/Content+Management/cms_page_store.csv) | CMS Page Store .csv file containing a Demo Shop data sample. | - diff --git a/docs/scos/dev/data-import/202005.0/data-import-categories/content-management/file-details-cms-page.csv.md b/docs/scos/dev/data-import/202005.0/data-import-categories/content-management/file-details-cms-page.csv.md deleted file mode 100644 index d935c853a11..00000000000 --- a/docs/scos/dev/data-import/202005.0/data-import-categories/content-management/file-details-cms-page.csv.md +++ /dev/null @@ -1,45 +0,0 @@ ---- -title: File details- cms_page.csv -last_updated: Sep 14, 2020 -template: data-import-template -originalLink: https://documentation.spryker.com/v5/docs/file-details-cms-pagecsv -originalArticleId: 798b81f0-2dcb-4b97-92dd-76563d13c8fe -redirect_from: - - /v5/docs/file-details-cms-pagecsv - - /v5/docs/en/file-details-cms-pagecsv ---- - -This article contains content of the **cms_page.csv** file to configure [CMS Page](/docs/scos/user/features/{{page.version}}/cms-feature-overview/cms-pages-overview.html) information on your Spryker Demo Shop. - -## Import file parameters -These are the header fields to be included in the .csv file: - -| Field Name | Mandatory | Type | Other Requirements/Comments | Description | -| --- | --- | --- | --- | --- | -| **template_name** | Yes | String |N/A* | Name of the page template. | -| **is_searchable** | No | Boolean |Searchable = True = 1
      Not searchable = False = 0 | Indicates if the page is searchable or not. | -| **is_active** | No | Boolean |Active = True = 1
      Inactive = False = 0 | Indicates if the page is active or not. | -| **publish** | No | Boolean |Published = True = 1
      Inactive = False = 0 | Indicates if the page is published or not. | -| **page_key** | Yes (*unique*) | String |N/A | Identifier of the page. | -| **url.{ANY_LOCALE_NAME}** **
      Example value: *url.en_US* | No | String |N/A | Page URL, translated into the specified locale (US for our example). | -| **name.{ANY_LOCALE_NAME}**
      Example value: *name.en_US* | No | String |N/A | Page name, translated into the specified locale (US for our example). | -| **meta_title.{ANY_LOCALE_NAME}**
      Example value: *meta_title.en_US* | No | String |N/A | Page meta data title, translated into the specified locale (US for our example). | -| **meta_keywords.{ANY_LOCALE_NAME}**
      Example value: *meta_keywords.en_US* | No | String |N/A | Page meta data keywords, translated into the specified locale (US for our example). | -| **meta_description.{ANY_LOCALE_NAME}**
      Example value: *meta_description.en_US* | No | String |N/A | Page meta data description, translated into the specified locale (US for our example). | -| **placeholder.title.{ANY_LOCALE_NAME}**
      Example value: *placeholder.title.en_US* | No | String |N/A | Page placeholder to the title, translated into the specified locale (US for our example). | -| **placeholder.content.{ANY_LOCALE_NAME}**
      Example value: *placeholder.content.en_US* | No | String |N/A | Page placeholder to the content, translated into the specified locale (US for our example). | -*N/A: Not applicable. -** ANY_LOCALE_NAME: Locale date is dynamic in data importers. It means that ANY_LOCALE_NAME postifx can be changed, removed, and any number of columns with different locales can be added to the .csv files. - -## Dependencies - -This file has the following dependency: -* [cms_template.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/content-management/file-details-cms-template.csv.html) - -## Import template file and content example -A template and an example of the *cms_page.csv* file can be downloaded here: - -| File | Description | -| --- | --- | -| [cms_page.csv template](https://spryker.s3.eu-central-1.amazonaws.com/docs/Developer+Guide/Back-End/Data+Manipulation/Data+Ingestion/Data+Import/Data+Import+Categories/Content+Management/Template+cms_page.csv) | CMS Page .csv template file (empty content, contains headers only). | -| [cms_page.csv](https://spryker.s3.eu-central-1.amazonaws.com/docs/Developer+Guide/Back-End/Data+Manipulation/Data+Ingestion/Data+Import/Data+Import+Categories/Content+Management/cms_page.csv) | CMS Page .csv file containing a Demo Shop data sample. | diff --git a/docs/scos/dev/data-import/202005.0/data-import-categories/content-management/file-details-cms-slot-block.csv.md b/docs/scos/dev/data-import/202005.0/data-import-categories/content-management/file-details-cms-slot-block.csv.md deleted file mode 100644 index 7f5f083e40d..00000000000 --- a/docs/scos/dev/data-import/202005.0/data-import-categories/content-management/file-details-cms-slot-block.csv.md +++ /dev/null @@ -1,44 +0,0 @@ ---- -title: File details- cms_slot_block.csv -last_updated: Sep 14, 2020 -template: data-import-template -originalLink: https://documentation.spryker.com/v5/docs/file-details-cms-slot-blockcsv -originalArticleId: fedd9a70-a76c-41b8-80d5-95211b03d786 -redirect_from: - - /v5/docs/file-details-cms-slot-blockcsv - - /v5/docs/en/file-details-cms-slot-blockcsv ---- - -This article contains content of the **cms_slot_block.csv** file to configure [CMS Slot Block](/docs/scos/user/features/{{page.version}}/cms-feature-overview/templates-and-slots-overview.html) information on your Spryker Demo Shop. - -## Import file parameters -These are the header fields to be included in the .csv file: - -| Field Name | Mandatory | Type | Other Requirements/Comments | Description | -| --- | --- | --- | --- | --- | -| **template_path** | Yes | String |Must be a valid path to a twig template. | Path to the Twig file template. | -| **slot_key** | Yes | String |N/A* | Slot key identifier. | -| **block_key** | Yes | String |N/A |Block key identifier. | -| **position** | Yes | Integer |N/A | Position of the block in the slot. | -| **conditions.productCategory.all** | No | String |N/A | Conditions for all product categories. | -| **conditions.productCategory.skus** | No | String |N/A | Conditions for product category and product SKUs. | -| **conditions.productCategory.category_key** | No | String |N/A | Conditions for product category and category key identifiers. | -| **conditions.category.all** | No | String |N/A | Conditions for all categories. | -| **conditions.category.category_key** | No | String |N/A |Conditions for categories and product category key identifiers. | -| **conditions.cms_page.all** | No | String |N/A | Conditions for all CMS pages. | -| **conditions.cms_page.page_key** | No | String |N/A | Conditions for Page key identifiers and CMS pages. | -*N/A: Not applicable. - -## Dependencies - -This file has the following dependencies: -* [cms_slot.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/content-management/file-details-cms-slot.csv.html) -* [cms_block.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/content-management/file-details-cms-block.csv.html) - -## Import template file and content example -A template and an example of the *cms_slot_block.csv* file can be downloaded here: - -| File | Description | -| --- | --- | -| [cms_slot_block.csv template](https://spryker.s3.eu-central-1.amazonaws.com/docs/Developer+Guide/Back-End/Data+Manipulation/Data+Ingestion/Data+Import/Data+Import+Categories/Content+Management/Template+cms_slot_block.csv) | CMS Slot Block .csv template file (empty content, contains headers only). | -| [cms_slot_block.csv](https://spryker.s3.eu-central-1.amazonaws.com/docs/Developer+Guide/Back-End/Data+Manipulation/Data+Ingestion/Data+Import/Data+Import+Categories/Content+Management/cms_slot_block.csv) | CMS Slot Block .csv file containing a Demo Shop data sample. | diff --git a/docs/scos/dev/data-import/202005.0/data-import-categories/content-management/file-details-cms-slot-template.csv.md b/docs/scos/dev/data-import/202005.0/data-import-categories/content-management/file-details-cms-slot-template.csv.md deleted file mode 100644 index 3f2c022aeec..00000000000 --- a/docs/scos/dev/data-import/202005.0/data-import-categories/content-management/file-details-cms-slot-template.csv.md +++ /dev/null @@ -1,34 +0,0 @@ ---- -title: File details- cms_slot_template.csv -last_updated: Sep 14, 2020 -template: data-import-template -originalLink: https://documentation.spryker.com/v5/docs/file-details-cms-slot-templatecsv -originalArticleId: 57332170-57b4-4d0a-8f1c-797477270334 -redirect_from: - - /v5/docs/file-details-cms-slot-templatecsv - - /v5/docs/en/file-details-cms-slot-templatecsv ---- - -This article contains content of the **cms_slot_template.csv** file to configure [CMS Slot Template](/docs/scos/dev/tutorials/{{page.version}}/howtos/feature-howtos/cms/howto-create-cms-templates.html#template-with-slots) information on your Spryker Demo Shop. - -## Import file parameters -These are the header fields to be included in the .csv file: - -| Field Name | Mandatory | Type | Other Requirements/Comments | Description | -| --- | --- | --- | --- | --- | -| **template_path** | Yes | String |Must be a valid path to a twig template. | Path to the Twig file template. | -| **name** | Yes | String |Human-readable. | Alphabetical identifier of the slot. It will be shown in the Back Office. | -| **description** | No | String |N/A* | Description of the slot. It will be shown in the Back Office. | -*N/A: Not applicable. - -## Dependencies - -This file has no dependencies. - -## Import template file and content example -A template and an example of the *cms_slot_template.csv* file can be downloaded here: - -| File | Description | -| --- | --- | -| [cms_slot_template.csv template](https://spryker.s3.eu-central-1.amazonaws.com/docs/Developer+Guide/Back-End/Data+Manipulation/Data+Ingestion/Data+Import/Data+Import+Categories/Content+Management/Template+cms_slot_template.csv) | CMS Slot Template .csv template file (empty content, contains headers only). | -| [cms_slot_template.csv](https://spryker.s3.eu-central-1.amazonaws.com/docs/Developer+Guide/Back-End/Data+Manipulation/Data+Ingestion/Data+Import/Data+Import+Categories/Content+Management/cms_slot_template.csv) | CMS Slot Template .csv file containing a Demo Shop data sample. | diff --git a/docs/scos/dev/data-import/202005.0/data-import-categories/content-management/file-details-cms-slot.csv.md b/docs/scos/dev/data-import/202005.0/data-import-categories/content-management/file-details-cms-slot.csv.md deleted file mode 100644 index 655cf313d35..00000000000 --- a/docs/scos/dev/data-import/202005.0/data-import-categories/content-management/file-details-cms-slot.csv.md +++ /dev/null @@ -1,38 +0,0 @@ ---- -title: File details- cms_slot.csv -last_updated: Sep 14, 2020 -template: data-import-template -originalLink: https://documentation.spryker.com/v5/docs/file-details-cms-slotcsv -originalArticleId: 2e523a11-600f-4b5e-8117-b1d04b54e626 -redirect_from: - - /v5/docs/file-details-cms-slotcsv - - /v5/docs/en/file-details-cms-slotcsv ---- - -This article contains content of the **cms_slot.csv** file to configure [CMS Slot](/docs/scos/user/features/{{page.version}}/cms-feature-overview/templates-and-slots-overview.html) information on your Spryker Demo Shop. - -## Import file parameters -These are the header fields to be included in the .csv file: - -| Field Name | Mandatory | Type | Other Requirements/Comments | Description | -| --- | --- | --- | --- | --- | -| **template_path** | Yes | String |Must be a valid path to a twig template. | Path to the Twig file template. | -| **slot_key** | Yes (*unique*) | String |N/A | Identifier of the slot that is used by slot widget when rendering the content of this slot | -| **content_provider** | Yes | String |Must be a valid type of content provider. | Defines the source of content of this slot. | -| **name** | Yes | String |N/A | Alphabetical identifier of the slot. It will be shown in the Back Office. | -| **description** | Yes | String |N/A | Description of the slot. It will be shown in the Back Office. | -| **is_active** | No | Boolean |
      • Inactive = 0
      • Active = 1
      • If empty during the import, the slots will be imported as inactive.
      • | Indicates if the slot is active or inactive.
        If the slot is inactive, it is not rendered in the Storefront by the slot widget. | - -*N/A: Not applicable. - -## Dependencies - -This file has no dependencies. - -## Import template file and content example -A template and an example of the *cms_slot.csv* file can be downloaded here: - -| File | Description | -| --- | --- | -| [cms_slot.csv template](https://spryker.s3.eu-central-1.amazonaws.com/docs/Developer+Guide/Back-End/Data+Manipulation/Data+Ingestion/Data+Import/Data+Import+Categories/Content+Management/Template+cms_slot.csv) | CMS Slot .csv template file (empty content, contains headers only). | -| [cms_slot.csv](https://spryker.s3.eu-central-1.amazonaws.com/docs/Developer+Guide/Back-End/Data+Manipulation/Data+Ingestion/Data+Import/Data+Import+Categories/Content+Management/cms_slot.csv) | CMS Slot file containing a Demo Shop data sample. | diff --git a/docs/scos/dev/data-import/202005.0/data-import-categories/content-management/file-details-cms-template.csv.md b/docs/scos/dev/data-import/202005.0/data-import-categories/content-management/file-details-cms-template.csv.md deleted file mode 100644 index d255d1c6edc..00000000000 --- a/docs/scos/dev/data-import/202005.0/data-import-categories/content-management/file-details-cms-template.csv.md +++ /dev/null @@ -1,33 +0,0 @@ ---- -title: File details- cms_template.csv -last_updated: Sep 14, 2020 -template: data-import-template -originalLink: https://documentation.spryker.com/v5/docs/file-details-cms-templatecsv -originalArticleId: b2d21813-fa76-4202-a8c2-52b1e9981235 -redirect_from: - - /v5/docs/file-details-cms-templatecsv - - /v5/docs/en/file-details-cms-templatecsv ---- - -This article contains content of the **cms_template.csv** file to configure [CMS Template](/docs/scos/dev/tutorials/{{page.version}}/howtos/feature-howtos/cms/howto-create-cms-templates.html#cms-page-template) information on your Spryker Demo Shop. - -## Import file parameters -These are the header fields to be included in the .csv file: - -| Field Name | Mandatory | Type | Other Requirements/Comments | Description | -| --- | --- | --- | --- | --- | -| **template_name** | Yes (*unique*) | String |N/A* | Name of the template. | -| **template_path** | Yes (*unique*) | String |Must be a valid path to a twig file template. | Path to the Twig file template. | -*N/A: Not applicable. - -## Dependencies - -This file has tno dependencies. - -## Import template file and content example -A template and an example of the *cms_template.csv* file can be downloaded here: - -| File | Description | -| --- | --- | -| [cms_template.csv template](https://spryker.s3.eu-central-1.amazonaws.com/docs/Developer+Guide/Back-End/Data+Manipulation/Data+Ingestion/Data+Import/Data+Import+Categories/Content+Management/Template+cms_template.csv) | CMS Template .csv template file (empty content, contains headers only). | -| [cms_template.csv](https://spryker.s3.eu-central-1.amazonaws.com/docs/Developer+Guide/Back-End/Data+Manipulation/Data+Ingestion/Data+Import/Data+Import+Categories/Content+Management/cms_template.csv) | CMS Template .csv file containing a Demo Shop data sample. | diff --git a/docs/scos/dev/data-import/202005.0/data-import-categories/content-management/file-details-content-banner.csv.md b/docs/scos/dev/data-import/202005.0/data-import-categories/content-management/file-details-content-banner.csv.md deleted file mode 100644 index fc30c6d54bf..00000000000 --- a/docs/scos/dev/data-import/202005.0/data-import-categories/content-management/file-details-content-banner.csv.md +++ /dev/null @@ -1,47 +0,0 @@ ---- -title: File details- content_banner.csv -last_updated: Sep 14, 2020 -template: data-import-template -originalLink: https://documentation.spryker.com/v5/docs/file-details-content-bannercsv -originalArticleId: fd73da08-dba6-4b81-a7cc-4aaa0f8eb6a3 -redirect_from: - - /v5/docs/file-details-content-bannercsv - - /v5/docs/en/file-details-content-bannercsv ---- - -This article contains content of the **content_banner.csv** file to configure [Content Banner](/docs/scos/user/features/{{page.version}}/content-items-feature-overview.html#content-item) information on your Spryker Demo Shop. - -## Import file parameters -These are the header fields to be included in the .csv file: - -| Field Name | Mandatory | Type | Other Requirements/Comments | Description | -| --- | --- | --- | --- | --- | -| **key** | Yes (*unique*) | String |N/A* | Unique identifier of the content. | -| **name** | Yes | String |Human-readable name. | Name of the content. | -| **description** | Yes | String |N/A | Description of the content. | -| **title.default** | Yes | String |N/A |Default title of the content. | -| **title.{ANY_LOCALE_NAME}** **
        Example value: *title.en_US* | No | String | N/A | Title of the content, translated into the specified locale (US for our example). -| **subtitle.default** | Yes | String |N/A | -Default subtitle of the content. | -| **subtitle.{ANY_LOCALE_NAME}**
        Example value: *subtitle.en_US* | No | String | N/A | Subttitle of the content, translated into the specified locale (US for our example). -| **image_url.default** | Yes | String |N/A | Default image URL of the content. | -| **image_url.{ANY_LOCALE_NAME}**
        Example value: *image_url.en_US* | No | String | N/A | Image URL of the content, translated into the specified locale (US for our example). -| **click_url.default** | Yes | String |N/A | Default click URL of the content. | -| **click_url.{ANY_LOCALE_NAME}**
        Example value: *click_url.en_US* | No | String | N/A | Click URL of the content, translated into the specified locale (US for our example). -| **alt_text.default** | Yes | String |N/A | Default alt text of the content. | -| **alt_text.{ANY_LOCALE_NAME}**
        Example value: *alt_text.en_US* | No | String | N/A | Alt text of the content, translated into the specified locale (US for our example). -*N/A: Not applicable. - -## Dependencies - -This file has the following dependencies: -* [glossary.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/commerce-setup/file-details-glossary.csv.html) - -## Import template file and content example -A template and an example of the *content_banner.csv* file can be downloaded here: - -| File | Description | -| --- | --- | -| [content_banner.csv template](https://spryker.s3.eu-central-1.amazonaws.com/docs/Developer+Guide/Back-End/Data+Manipulation/Data+Ingestion/Data+Import/Data+Import+Categories/Content+Management/Template+content_banner.csv) | Content Banner .csv template file (empty content, contains headers only). | -| [content_banner.csv](https://spryker.s3.eu-central-1.amazonaws.com/docs/Developer+Guide/Back-End/Data+Manipulation/Data+Ingestion/Data+Import/Data+Import+Categories/Content+Management/content_banner.csv) | Content Banner .csv file containing a Demo Shop data sample. | - diff --git a/docs/scos/dev/data-import/202005.0/data-import-categories/content-management/file-details-content-navigation.csv.md b/docs/scos/dev/data-import/202005.0/data-import-categories/content-management/file-details-content-navigation.csv.md deleted file mode 100644 index bba0dac7933..00000000000 --- a/docs/scos/dev/data-import/202005.0/data-import-categories/content-management/file-details-content-navigation.csv.md +++ /dev/null @@ -1,55 +0,0 @@ ---- -title: File details- content_navigation.csv -description: Description of the import file of the navigation content item. -last_updated: Sep 14, 2020 -template: data-import-template -originalLink: https://documentation.spryker.com/v5/docs/file-details-content-navigationcsv -originalArticleId: 12bda020-509e-4e0a-ba28-4094d1540909 -redirect_from: - - /v5/docs/file-details-content-navigationcsv - - /v5/docs/en/file-details-content-navigationcsv ---- - -This article contains content of the content_navigation.csv file to configure [Content Navigation](/docs/scos/user/features/{{page.version}}/content-items-feature-overview.html#content-item) information on your Spryker Demo Shop. - -## Import file parameters -These are the header fields to be included in the .csv file: - - -| | Field Name | Required | Type | Other Requirements | Description | -| --- | --- | --- | --- | --- | --- | -| 1 | key | v (unique)| *string* | N/A | Unique identifier of the content item. | -| 2 | name | v | *string* | Human-readable name. | Name of the content. | -| 3 | description | | *string* | N/A | Description of the content. | -| 4 | navigation_key.default | v | *string* | Key of an existing navigation element. | Default unique identifier of a [navigation element](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/navigation-setup/file-details-navigation.csv.html). | -| 5 | navigation_key.en_US | | *string* | Key of an existing navigation element. | Unique identifier of a [navigation element](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/navigation-setup/file-details-navigation.csv.html) for the `en_US` [locale](/docs/scos/dev/back-end-development/data-manipulation/datapayload-conversion/multi-language-setup.html). | -| 6 | title.de_DE | | *string* | Key of an existing navigation element. | Unique identifier of a [navigation element](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/navigation-setup/file-details-navigation.csv.html) for the `de_DE` [locale](/docs/scos/dev/back-end-development/data-manipulation/datapayload-conversion/multi-language-setup.html). | - - -N/A: Not applicable. - -## Dependencies -This file has the following dependencies: - -* [navigation.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/navigation-setup/file-details-navigation.csv.html) - -## Import template file and content example -A template and an example **content_navigation.csv** file can be downloaded here: - - -| FILES | Description | -| --- | --- | -| [content_navigation.csv Template](https://spryker.s3.eu-central-1.amazonaws.com/docs/Developer+Guide/Back-End/Data+Manipulation/Data+Ingestion/Data+Import/Data+Import+Categories/Content+Management/Template+content_navigation.csv) | Content Navigation CSV template file (empty content, contains headers only). | -| [content_navigation.csv](https://spryker.s3.eu-central-1.amazonaws.com/docs/Developer+Guide/Back-End/Data+Manipulation/Data+Ingestion/Data+Import/Data+Import+Categories/Content+Management/content_navigation.csv) | Content Navigation CSV file containing a Demo Shop data sample. | - - - - - - - - - - - - diff --git a/docs/scos/dev/data-import/202005.0/data-import-categories/content-management/file-details-content-product-abstract-list.csv.md b/docs/scos/dev/data-import/202005.0/data-import-categories/content-management/file-details-content-product-abstract-list.csv.md deleted file mode 100644 index ebb8b3755ee..00000000000 --- a/docs/scos/dev/data-import/202005.0/data-import-categories/content-management/file-details-content-product-abstract-list.csv.md +++ /dev/null @@ -1,39 +0,0 @@ ---- -title: File details- content_product_abstract_list.csv -last_updated: Sep 14, 2020 -template: data-import-template -originalLink: https://documentation.spryker.com/v5/docs/file-details-content-product-abstract-listcsv -originalArticleId: 697dd47e-1a75-478f-95f2-e5c2f6eff09b -redirect_from: - - /v5/docs/file-details-content-product-abstract-listcsv - - /v5/docs/en/file-details-content-product-abstract-listcsv ---- - -This article contains content of the **content_product_abstract_list.csv** file to configure [Content Product Abstract List](/docs/scos/user/features/{{page.version}}/content-items-feature-overview.html#content-item) information on your Spryker Demo Shop. - -## Import file parameters -These are the header fields to be included in the .csv file: - -| Field Name | Mandatory | Type | Other Requirements/Comments | Description | -| --- | --- | --- | --- | --- | -| **key** | Yes (*unique*) | String |N/A* | -Unique identifier of the content. | -| **name** | Yes | String |Human-readable name. | Name of the content. | -| **description** | No | String |N/A | Description of the content. | -| **skus.default** | Yes | String |N/A | Default list of product abstract SKUs. | -| **skus.{ANY_LOCALE_NAME}** **
        Example value: *skus.en_US* | No | String | N/A |List of product abstract SKUs, translated into the specified locale (US for our example). | -*N/A: Not applicable. -** ANY_LOCALE_NAME: Locale date is dynamic in data importers. It means that ANY_LOCALE_NAME postifx can be changed, removed, and any number of columns with different locales can be added to the .csv files. - -## Dependencies - -This file has the following dependency: -* [product_abstract.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/catalog-setup/products/file-details-product-abstract.csv.html) - -## Import template file and content example -A template and an example of the *content_product_abstract_list.csv* file can be downloaded here: - -| File | Description | -| --- | --- | -| [content_product_abstract_list.csv template](https://spryker.s3.eu-central-1.amazonaws.com/docs/Developer+Guide/Back-End/Data+Manipulation/Data+Ingestion/Data+Import/Data+Import+Categories/Content+Management/Template+content_product_abstract_list.csv) | Content Product Abstract List .csv template file (empty content, contains headers only). | -| [content_product_abstract_list.csv](https://spryker.s3.eu-central-1.amazonaws.com/docs/Developer+Guide/Back-End/Data+Manipulation/Data+Ingestion/Data+Import/Data+Import+Categories/Content+Management/content_product_abstract_list.csv) | Content Product Abstract List .csv file containing a Demo Shop data sample. | diff --git a/docs/scos/dev/data-import/202005.0/data-import-categories/content-management/file-details-content-product-set.csv.md b/docs/scos/dev/data-import/202005.0/data-import-categories/content-management/file-details-content-product-set.csv.md deleted file mode 100644 index 7bac6dd7d53..00000000000 --- a/docs/scos/dev/data-import/202005.0/data-import-categories/content-management/file-details-content-product-set.csv.md +++ /dev/null @@ -1,38 +0,0 @@ ---- -title: File details- content_product_set.csv -last_updated: Sep 14, 2020 -template: data-import-template -originalLink: https://documentation.spryker.com/v5/docs/file-details-content-product-setcsv -originalArticleId: 04807df6-88e4-433e-bd4c-a85720bfd9fd -redirect_from: - - /v5/docs/file-details-content-product-setcsv - - /v5/docs/en/file-details-content-product-setcsv ---- - -This article contains content of the **content_product_set.csv** file to configure [Content Product Set](/docs/scos/user/features/{{page.version}}/content-items-feature-overview.html#content-item) information on your Spryker Demo Shop. - -## Import file parameters -These are the header fields to be included in the .csv file: - -| Field Name | Mandatory | Type | Other Requirements/Comments | Description | -| --- | --- | --- | --- | --- | -| **key** | Yes (*unique*) | String |N/A* | Unique identifier of the content. | -| **name** | Yes | String | Human-readable name. | Name of the content. | -| **description** | Yes | String |N/A | Description of the content. | -| **product_set_key.default** | Yes | String |N/A | Default key identifier of the product set. | -| **product_set_key.{ANY_LOCALE_NAME}** **
        Example value: *product_set_key.en_US* | No | String |N/A | Key identifier of the product set, translated | - -*N/A: Not applicable. - -## Dependencies - -This file has the following dependencies: -* [product_set.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/merchandising-setup/product-merchandising/file-details-product-set.csv.html) - -## Import template file and content example -A template and an example of the *content_product_set.csv* file can be downloaded here: - -| File | Description | -| --- | --- | -| [content_product_set.csv template](https://spryker.s3.eu-central-1.amazonaws.com/docs/Developer+Guide/Back-End/Data+Manipulation/Data+Ingestion/Data+Import/Data+Import+Categories/Content+Management/Template+content_product_set.csv) | Content Product Set .csv template file (empty content, contains headers only). | -| [content_product_set.csv](https://spryker.s3.eu-central-1.amazonaws.com/docs/Developer+Guide/Back-End/Data+Manipulation/Data+Ingestion/Data+Import/Data+Import+Categories/Content+Management/content_product_set.csv) | Content Product Set .csv file containing a Demo Shop data sample. | diff --git a/docs/scos/dev/data-import/202005.0/data-import-categories/merchandising-setup/discounts/discounts.md b/docs/scos/dev/data-import/202005.0/data-import-categories/merchandising-setup/discounts/discounts.md deleted file mode 100644 index a52eaf3c7a1..00000000000 --- a/docs/scos/dev/data-import/202005.0/data-import-categories/merchandising-setup/discounts/discounts.md +++ /dev/null @@ -1,28 +0,0 @@ ---- -title: Discounts -last_updated: Sep 14, 2020 -template: data-import-template -originalLink: https://documentation.spryker.com/v5/docs/discounts -originalArticleId: cfd3cda4-1fd3-424c-a0d3-9449c03924dd -redirect_from: - - /v5/docs/discounts - - /v5/docs/en/discounts ---- - -The **Discounts** category contains all data you need to manage product discount information in the online store. -We have structured this section according to the following .csv files that you will have to use to import the data: - -* [discount.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/merchandising-setup/discounts/file-details-discount.csv.html): allows you to imort general information about the discounts and their attributes. -* [discount_amount.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/merchandising-setup/discounts/file-details-discount-amount.csv.html): allows you to imort data used to set the values of the discounts imported with *discount.csv*. -* [discount_store.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/merchandising-setup/discounts/file-details-discount-store.csv.html): allows you to link the discounts with the stores. -* [discount_voucher.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/merchandising-setup/discounts/file-details-discount-voucher.csv.html) allows you to import information about vouchers. - -The table below provides details on Product Merchandising data importers, their purpose, .csv files, dependencies, and other details. Each data importer contains links to .csv files used to import the corresponding data, including specifications of mandatory and unique fields, dependencies, detailed explanations, recommendations, templates, and content examples. - -| Data Importer | Purpose | Console Command| FILES | Dependencies | -| --- | --- | --- | --- |--- | -| **Discount** |Imports information about the discounts and their attributes. |`data:import:discount`| [discount.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/merchandising-setup/discounts/file-details-discount.csv.html) | None| -| **Discount Amount** | Imports information used to set the values of the discounts imported with *discount.csv*. |`data:import:discount-amount`| [discount_amount.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/merchandising-setup/discounts/file-details-discount-amount.csv.html) |
        • discount.csv
        • discount_store.csv
        | -| **Discount Store** |Imports information about this file links the discounts with the stores. |`data:import:discount-store`| [discount_store.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/merchandising-setup/discounts/file-details-discount-store.csv.html) |
        • [discount.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/merchandising-setup/discounts/file-details-discount.csv.html)
        • **stores.php** configuration file of demo shop PHP project.
        • | -| **Discount Voucher** | Imports information used to create the discount voucher.|`data:import:discount-voucher`| [discount_voucher.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/merchandising-setup/discounts/file-details-discount-voucher.csv.html) | [discount.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/merchandising-setup/discounts/file-details-discount.csv.html) | - diff --git a/docs/scos/dev/data-import/202005.0/data-import-categories/merchandising-setup/discounts/file-details-discount-amount.csv.md b/docs/scos/dev/data-import/202005.0/data-import-categories/merchandising-setup/discounts/file-details-discount-amount.csv.md deleted file mode 100644 index 58ac4b308ea..00000000000 --- a/docs/scos/dev/data-import/202005.0/data-import-categories/merchandising-setup/discounts/file-details-discount-amount.csv.md +++ /dev/null @@ -1,38 +0,0 @@ ---- -title: File details- discount_amount.csv -last_updated: Sep 14, 2020 -template: data-import-template -originalLink: https://documentation.spryker.com/v5/docs/file-details-discount-amountcsv -originalArticleId: a11c9502-7550-4f62-9e20-9dffda241a3e -redirect_from: - - /v5/docs/file-details-discount-amountcsv - - /v5/docs/en/file-details-discount-amountcsv ---- - -This article contains content of the **discount_amount.csv** file to configure Discount Amount information on your Spryker Demo Shop. - -## Import file parameters -These are the header fields to be included in the .csv file: - -| Field Name | Mandatory | Type | Other Requirements/Comments | Description | -| --- | --- | --- | --- | --- | -| **discount_key** | No | String |N/A* | Key identifier of the discount. | -| **store** | No | String |N/A | Name of the store to which the discount applies to. | -| **currency** | No | String |N/A | Currency ISO code of the discount. | -| **value_net** | No | Number |N/A | Net value of the discount. | -| **value_gross** | No | Number |N/A | Gross value of the discount. | -*N/A: Not applicable. - -## Dependencies - -This file has the following dependencies: -* [discount.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/merchandising-setup/discounts/file-details-discount.csv.html) -* [discount_store.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/merchandising-setup/discounts/file-details-discount-store.csv.html) - -## Import template file and content example -A template and an example of the *discount_amount.csv* file can be downloaded here: - -| File | Description | -| --- | --- | -| [discount_amount.csv template](https://spryker.s3.eu-central-1.amazonaws.com/docs/Developer+Guide/Back-End/Data+Manipulation/Data+Ingestion/Data+Import/Data+Import+Categories/Merchandising+Setup/Discounts/Template+discount_amount.csv) | Discount Amount .csv template file (empty content, contains headers only). | -| [discount_amount.csv](https://spryker.s3.eu-central-1.amazonaws.com/docs/Developer+Guide/Back-End/Data+Manipulation/Data+Ingestion/Data+Import/Data+Import+Categories/Merchandising+Setup/Discounts/discount_amount.csv) | Discount Amount .csv file containing a Demo Shop data sample. | diff --git a/docs/scos/dev/data-import/202005.0/data-import-categories/merchandising-setup/discounts/file-details-discount-store.csv.md b/docs/scos/dev/data-import/202005.0/data-import-categories/merchandising-setup/discounts/file-details-discount-store.csv.md deleted file mode 100644 index ce0475df040..00000000000 --- a/docs/scos/dev/data-import/202005.0/data-import-categories/merchandising-setup/discounts/file-details-discount-store.csv.md +++ /dev/null @@ -1,35 +0,0 @@ ---- -title: File details- discount_store.csv -last_updated: Sep 14, 2020 -template: data-import-template -originalLink: https://documentation.spryker.com/v5/docs/file-details-discount-storecsv -originalArticleId: ce6578b2-67e0-44a6-a510-0d719c98cd5a -redirect_from: - - /v5/docs/file-details-discount-storecsv - - /v5/docs/en/file-details-discount-storecsv ---- - -This article contains content of the **discount_store.csv** file to configure Discount Store information on your Spryker Demo Shop. - -## Import file parameters -These are the header fields to be included in the .csv file: - -| Field Name | Mandatory | Type | Other Requirements/Comments | Description | -| --- | --- | --- | --- | --- | -| **discount_key** | Yes | String |`discount_key` must be included in the *discount.csv* file. | | -| **store_name** | Yes | String |N/A* | Name of the store to which the discount applies. | -*N/A: Not applicable. - -## Dependencies - -This file has the following dependencies: -* [discount.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/merchandising-setup/discounts/file-details-discount.csv.html) -* *stores.php* configuration file of the demo shop PHP project - -## Import template file and content example -A template and an example of the *discount_store.csv* file can be downloaded here: - -| File | Description | -| --- | --- | -| [discount_store.csv template](https://spryker.s3.eu-central-1.amazonaws.com/docs/Developer+Guide/Back-End/Data+Manipulation/Data+Ingestion/Data+Import/Data+Import+Categories/Merchandising+Setup/Discounts/Template+discount_store.csv) | Discount Store .csv template file (empty content, contains headers only). | -| [discount_store.csv](https://spryker.s3.eu-central-1.amazonaws.com/docs/Developer+Guide/Back-End/Data+Manipulation/Data+Ingestion/Data+Import/Data+Import+Categories/Merchandising+Setup/Discounts/discount_store.csv) | Discount Store .csv file containing a Demo Shop data sample. | diff --git a/docs/scos/dev/data-import/202005.0/data-import-categories/merchandising-setup/discounts/file-details-discount-voucher.csv.md b/docs/scos/dev/data-import/202005.0/data-import-categories/merchandising-setup/discounts/file-details-discount-voucher.csv.md deleted file mode 100644 index 7b1096fcb64..00000000000 --- a/docs/scos/dev/data-import/202005.0/data-import-categories/merchandising-setup/discounts/file-details-discount-voucher.csv.md +++ /dev/null @@ -1,50 +0,0 @@ ---- -title: File details- discount_voucher.csv -last_updated: Sep 14, 2020 -template: data-import-template -originalLink: https://documentation.spryker.com/v5/docs/file-details-discount-vouchercsv -originalArticleId: 3ed551a3-ba93-47db-a4bf-4a5d0c762d05 -redirect_from: - - /v5/docs/file-details-discount-vouchercsv - - /v5/docs/en/file-details-discount-vouchercsv ---- - -This article contains content of the **discount_voucher.csv** file to configure Discount Voucher information on your Spryker Demo Shop. - -## Import file parameters -These are the header fields to be included in the .csv file: - -| Field Name | Mandatory | Type | Other Requirements/Comments | Description | -| --- | --- | --- | --- | --- | -| **discount_key** | Yes | String |`discount_key` must exist in the *discounts.csv* file | Key identifier of the discount. | -| **quantity** | Yes | Number |N/A* | Number of vouchers that will be generated. | -| **custom_code** | Yes | String |N/A | Customised code of the voucher, composed by two parts:
          • a prefix of the voucher code that can be set directly in this field,
          • a random part with the amount of random symbols equals to the value of random_generated_code_length field.
          | -| **random_generated_code_length** | Yes | String |If quantity >= 1 then `random_generated_code_length` cannot be empty. | Random part of the voucher code with the amount of random symbols equals to the value of `random_generated_code_length` field. | -| **max_number_of_uses** | No | Number |If empty it will be set to 0. | Maximum number of this voucher usage. | -| **voucher_batch** | Yes | Number |`voucher_batch` must be previously created during *discount.csv* import, then the batch value must be a different number for each row in the file. | Voucher batch groups vouchers into batches. It identifies a voucher belonging to the same voucher pool. | -| **is_active** | No | Boolean | If empty, will be set to False = 0.
          • True = 1
          • False = 0
          • | Indicates if discount voucher is active or not. | -*N/A: Not applicable. - -## Dependencies - -This file has the following dependency: -* [ discount.csv ](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/merchandising-setup/discounts/file-details-discount.csv.html) - -## Recommendations & other information -The generated voucher code consists of two parts: - -* `custom_code` which is a prefix of the voucher code that can be set directly at `custom_code`, and -* a random part with the amount of random symbols equals to the value of `random_generated_code_length` field. - -If a quantity is equal to or greater than 1, then` random_generated_code_length` should be non-empty as the generated code is unique. - -Field `voucher_batch` is necessary when different vouchers belong to the same voucher pool. It must have been previously created during *discount.csv* import, then the batch value must be a different number for each row in the file. - - ## Import template file and content example -A template and an example of the *discount_voucher.csv* file can be downloaded here: - -| File | Description | -| --- | --- | -| [discount_voucher.csv template](https://spryker.s3.eu-central-1.amazonaws.com/docs/Developer+Guide/Back-End/Data+Manipulation/Data+Ingestion/Data+Import/Data+Import+Categories/Merchandising+Setup/Discounts/Template+discount_voucher.csv) | Discount Voucher .csv template file (empty content, contains headers only). | -| [discount_voucher.csv](https://spryker.s3.eu-central-1.amazonaws.com/docs/Developer+Guide/Back-End/Data+Manipulation/Data+Ingestion/Data+Import/Data+Import+Categories/Merchandising+Setup/Discounts/discount_voucher.csv) | Discount Voucher .csv file containing a Demo Shop data sample. | - diff --git a/docs/scos/dev/data-import/202005.0/data-import-categories/merchandising-setup/discounts/file-details-discount.csv.md b/docs/scos/dev/data-import/202005.0/data-import-categories/merchandising-setup/discounts/file-details-discount.csv.md deleted file mode 100644 index 48c58c9d670..00000000000 --- a/docs/scos/dev/data-import/202005.0/data-import-categories/merchandising-setup/discounts/file-details-discount.csv.md +++ /dev/null @@ -1,48 +0,0 @@ ---- -title: File details- discount.csv -last_updated: Sep 14, 2020 -template: data-import-template -originalLink: https://documentation.spryker.com/v5/docs/file-details-discountcsv -originalArticleId: 8cfdac97-98af-45e6-af5d-293a381d969d -redirect_from: - - /v5/docs/file-details-discountcsv - - /v5/docs/en/file-details-discountcsv ---- - -This article contains content of the **discount.csv** file to configure [Discount](/docs/scos/user/features/{{page.version}}/promotions-discounts-feature-overview.html) information on your Spryker Demo Shop. - -## Import file parameters -These are the header fields to be included in the .csv file: - -| Field Name | Mandatory | Type | Other Requirements/Comments | Description | -| --- | --- | --- | --- | --- | -| **discount_key** | Yes (*unique*) | String |N/A* | Key identifier of the discount. | -| **display_name** | Yes (*unique*) | String |N/A | Unique display name of the discount. | -| **description** | Yes | String |N/A |Description of the discount. | -| **amount** | No | Number |N/A | Discount amount. | -| **calculator_plugin** | No | String |N/A | Name of the plugin used to calculate the product discount. | -| **is_exclusive** | No | Boolean |True = 1
            False = 0 | Indicates if the discount is exclusive or not. | -| **is_active** | Boolean | String |True = 1
            False = 0| Indicates if the discount is active or not. | -| **valid_from** | No | Date |N/A | Indicates the date from which the discount is valid. | -| **valid_to** | No | String |N/A | Indicates the date to which the discount is valid. | -| **decision_rule_query_string** | No | String |N/A | Query with the decision rule to assign the discount. | -| **collector_query_string** | No | String |N/A | Query with the rule to collect the discount. | -| **discount_type** | No | String |*discount_type* can be either:
            • cart_rule
            • voucher
            | Type of discount. | -| **promotion_sku** | No | String |N/A | SKU of the promotion. | -| **promotion_quantity** | No | Number |N/A | Quantity of product items that have this discount. | - -*N/A: Not applicable. - -## Dependencies -This file has no dependencies. - -## Recommendations & other information -If `discount_type` is set to *voucher* then a voucher pool will be created from this data. - -## Import template file and content example -A template and an example of the *discount.csv* file can be downloaded here: - -| File | Description | -| --- | --- | -| [discount.csv template](https://spryker.s3.eu-central-1.amazonaws.com/docs/Developer+Guide/Back-End/Data+Manipulation/Data+Ingestion/Data+Import/Data+Import+Categories/Merchandising+Setup/Discounts/Template+discount.csv) | Discount .csv template file (empty content, contains headers only). | -| [discount.csv](https://spryker.s3.eu-central-1.amazonaws.com/docs/Developer+Guide/Back-End/Data+Manipulation/Data+Ingestion/Data+Import/Data+Import+Categories/Merchandising+Setup/Discounts/discount.csv) | Discount .csv file containing a Demo Shop data sample. | diff --git a/docs/scos/dev/data-import/202005.0/data-import-categories/merchandising-setup/merchandising-setup.md b/docs/scos/dev/data-import/202005.0/data-import-categories/merchandising-setup/merchandising-setup.md deleted file mode 100644 index 1809a98365a..00000000000 --- a/docs/scos/dev/data-import/202005.0/data-import-categories/merchandising-setup/merchandising-setup.md +++ /dev/null @@ -1,41 +0,0 @@ ---- -title: Merchandising Setup -last_updated: Sep 14, 2020 -template: data-import-template -originalLink: https://documentation.spryker.com/v5/docs/merchandising-setup -originalArticleId: 3e1e0a19-a73f-4709-9930-742579a13f92 -redirect_from: - - /v5/docs/merchandising-setup - - /v5/docs/en/merchandising-setup ---- - -The **Merchandising Setup** category contains data required to manage the merchandising information in the online store. We have structured it into two main categories focusing on the following topics: - -* [Product Merchandising](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/merchandising-setup/product-merchandising/product-merchandising.html) -* [ Discounts](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/merchandising-setup/discounts/discounts.html) - -Within the [Product Merchandising](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/merchandising-setup/product-merchandising/product-merchandising.html) section, you will find all information about the data imports required to manage product merchandising, which includes management of the Product Groups, Product Labels, Product Sets, etc. - -In the [ Discounts](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/merchandising-setup/discounts/discounts.html) section, you will be able to import all data related to product discounts. - -{% info_block warningBox "Import order" %} - -The order in which the files are imported is **very strict**. For this reason, the data importers should be executed in the following order: - -1. [Discount](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/merchandising-setup/discounts/file-details-discount.csv.html) -2. [Discount Store](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/merchandising-setup/discounts/file-details-discount-store.csv.html) -3. [Discount Voucher](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/merchandising-setup/discounts/file-details-discount-voucher.csv.html) -4. [Product Group](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/merchandising-setup/product-merchandising/file-details-product-group.csv.html) -5. [Product Relation](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/merchandising-setup/product-merchandising/file-details-product-relation.csv.html) -6. [Product Review](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/merchandising-setup/product-merchandising/file-details-product-review.csv.html) -7. [Product Label](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/merchandising-setup/product-merchandising/file-details-product-label.csv.html) -8. [Product Set](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/merchandising-setup/product-merchandising/file-details-product-set.csv.html) -9. [Product Search Attribute Map](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/merchandising-setup/product-merchandising/file-details-product-search-attribute-map.csv.html) -10. [Product Search Attribute](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/merchandising-setup/product-merchandising/file-details-product-search-attribute.csv.html) -1. [Discount Amount](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/merchandising-setup/discounts/file-details-discount-amount.csv.html) -2. [Product Discontinued](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/merchandising-setup/product-merchandising/file-details-product-discontinued.csv.html) -3. [Product Alternative](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/merchandising-setup/product-merchandising/file-details-product-alternative.csv.html) -4. [Product Quantity](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/merchandising-setup/product-merchandising/file-details-product-quantity.csv.html) - - -{% endinfo_block %} diff --git a/docs/scos/dev/data-import/202005.0/data-import-categories/merchandising-setup/product-merchandising/file-details-product-alternative.csv.md b/docs/scos/dev/data-import/202005.0/data-import-categories/merchandising-setup/product-merchandising/file-details-product-alternative.csv.md deleted file mode 100644 index 613bc4c6d67..00000000000 --- a/docs/scos/dev/data-import/202005.0/data-import-categories/merchandising-setup/product-merchandising/file-details-product-alternative.csv.md +++ /dev/null @@ -1,42 +0,0 @@ ---- -title: File details- product_alternative.csv -last_updated: Sep 14, 2020 -template: data-import-template -originalLink: https://documentation.spryker.com/v5/docs/file-details-product-alternativecsv -originalArticleId: 78a707f7-ef45-4e6f-94e9-902c3a9003a4 -redirect_from: - - /v5/docs/file-details-product-alternativecsv - - /v5/docs/en/file-details-product-alternativecsv ---- - -This article contains content of the **product_alternative.csv** file to configure [Alternative Product](/docs/scos/user/features/{{page.version}}/alternative-products-feature-overview.html) information on your Spryker Demo Shop. - -## Import file parameters -These are the header fields to be included in the .csv file: - -| Field Name | Mandatory | Type | Other Requirements/Comments | Description | -| --- | --- | --- | --- | --- | -| **concrete_sku** | Yes | String |N/A* | SKU of the concrete product to which this alternative is applied. | -| **alternative_product_concrete_sku** | Yes (*if `alternative_product_abstract_sku `is empty*) | String |N/A | SKU of the alternative concrete product. | -| **alternative_product_abstract_sku** | Yes (*if `alternative_product_concrete_sku` is empty*) | String |N/A | SKU of the alternative abstract product. | -*N/A: Not applicable. - -## Dependencies - -This file has the following dependencies: - -* [product_concrete.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/catalog-setup/products/file-details-product-concrete.csv.html) -* [product_abstract.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/catalog-setup/products/file-details-product-abstract.csv.html) - -## Recommendations & other information -It does not exist on by default on the project level. It can be created in order to override the CSV file from module: - -* `vendor/spryker/product-alternative-data-import/data/import/product_alternative.csv` - -## Import template file and content example -A template and an example of the *product_alternative.csv* file can be downloaded here: - -| File | Description | -| --- | --- | -| [product_alternative.csv template](https://spryker.s3.eu-central-1.amazonaws.com/docs/Developer+Guide/Back-End/Data+Manipulation/Data+Ingestion/Data+Import/Data+Import+Categories/Merchandising+Setup/Product+Merchandising/Template+product_alternative.csv) | Product Alternative .csv template file (empty content, contains headers only). | -| [product_alternative.csv](https://spryker.s3.eu-central-1.amazonaws.com/docs/Developer+Guide/Back-End/Data+Manipulation/Data+Ingestion/Data+Import/Data+Import+Categories/Merchandising+Setup/Product+Merchandising/product_alternative.csv) | Product Alternative .csv file containing a Demo Shop data sample. | diff --git a/docs/scos/dev/data-import/202005.0/data-import-categories/merchandising-setup/product-merchandising/file-details-product-discontinued.csv.md b/docs/scos/dev/data-import/202005.0/data-import-categories/merchandising-setup/product-merchandising/file-details-product-discontinued.csv.md deleted file mode 100644 index 4db51c6006b..00000000000 --- a/docs/scos/dev/data-import/202005.0/data-import-categories/merchandising-setup/product-merchandising/file-details-product-discontinued.csv.md +++ /dev/null @@ -1,35 +0,0 @@ ---- -title: File details- product_discontinued.csv -last_updated: Sep 14, 2020 -template: data-import-template -originalLink: https://documentation.spryker.com/v5/docs/file-details-product-discontinuedcsv -originalArticleId: 141cd600-707d-4c78-a009-feec3b900725 -redirect_from: - - /v5/docs/file-details-product-discontinuedcsv - - /v5/docs/en/file-details-product-discontinuedcsv ---- - -This article contains content of the **product_discontinued.csv** file to configure [Discontinued Product](/docs/scos/user/features/{{page.version}}/product-feature-overview/discontinued-products-overview.html) information on your Spryker Demo Shop. - -## Import file parameters -These are the header fields to be included in the .csv file: - -| Field Name | Mandatory | Type | Other Requirements/Comments | Description | -| --- | --- | --- | --- | --- | -| **sku_concrete** | Yes | String |N/A* | SKU of the concrete discontinued product. | -| **note.{ANY_LOCALE_NAME}**
            Example value: *note.en_US* | No | String |N/A | Note translated into the specified locale (US for our example). | -*N/A: Not applicable. -**ANY_LOCALE_NAME: Locale date is dynamic in data importers. It means that ANY_LOCALE_NAME postifx can be changed, removed, and any number of columns with different locales can be added to the .csv files. - -## Dependencies - -This file has the following dependency: -* [product_concrete.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/catalog-setup/products/file-details-product-concrete.csv.html) - -## Import template file and content example -A template and an example of the *product_discontinued.csv* file can be downloaded here: - -| File | Description | -| --- | --- | -| [product_discontinued.csv template](https://spryker.s3.eu-central-1.amazonaws.com/docs/Developer+Guide/Back-End/Data+Manipulation/Data+Ingestion/Data+Import/Data+Import+Categories/Merchandising+Setup/Product+Merchandising/Template+product_discontinued.csv) | Product Discontinued .csv template file (empty content, contains headers only). | -| [product_discontinued.csv](https://spryker.s3.eu-central-1.amazonaws.com/docs/Developer+Guide/Back-End/Data+Manipulation/Data+Ingestion/Data+Import/Data+Import+Categories/Merchandising+Setup/Product+Merchandising/product_discontinued.csv) | Product Discontinued .csv file containing a Demo Shop data sample. | diff --git a/docs/scos/dev/data-import/202005.0/data-import-categories/merchandising-setup/product-merchandising/file-details-product-group.csv.md b/docs/scos/dev/data-import/202005.0/data-import-categories/merchandising-setup/product-merchandising/file-details-product-group.csv.md deleted file mode 100644 index ff1c5d12470..00000000000 --- a/docs/scos/dev/data-import/202005.0/data-import-categories/merchandising-setup/product-merchandising/file-details-product-group.csv.md +++ /dev/null @@ -1,35 +0,0 @@ ---- -title: File details- product_group.csv -last_updated: Sep 14, 2020 -template: data-import-template -originalLink: https://documentation.spryker.com/v5/docs/file-details-product-groupcsv -originalArticleId: 5bdfd476-304d-45c7-8c7b-1b24aadd698a -redirect_from: - - /v5/docs/file-details-product-groupcsv - - /v5/docs/en/file-details-product-groupcsv ---- - -This article contains content of the **product_group.csv** file to configure [Product Group](/docs/scos/user/features/{{page.version}}/product-groups-feature-overview.html) information on your Spryker Demo Shop. - -## Import file parameters -These are the header fields to be included in the .csv file: - -| Field Name | Mandatory | Type | Other Requirements/Comments | Description | -| --- | --- | --- | --- | --- | -| **group_key** | Yes (*unique*) | String |N/A* | Product group unique string identifier. | -| **abstract_sku** | Yes | String |N/A | SKU of the abstract product. | -| **position** | No | Integer |N/A | The position of the product within that group. | -*N/A: Not applicable. - -## Dependencies - -This file has the following dependency: -* [product_abstract.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/catalog-setup/products/file-details-product-abstract.csv.html) - -## Import template file and content example -A template and an example of the *product_group.csv* file can be downloaded here: - -| File | Description | -| --- | --- | -| [product_group.csv template](https://spryker.s3.eu-central-1.amazonaws.com/docs/Developer+Guide/Back-End/Data+Manipulation/Data+Ingestion/Data+Import/Data+Import+Categories/Merchandising+Setup/Product+Merchandising/Template+product_group.csv) | Payment Method Store .csv template file (empty content, contains headers only). | -| [product_group.csv](https://spryker.s3.eu-central-1.amazonaws.com/docs/Developer+Guide/Back-End/Data+Manipulation/Data+Ingestion/Data+Import/Data+Import+Categories/Merchandising+Setup/Product+Merchandising/product_group.csv) | Payment Method Store .csv file containing a Demo Shop data sample. | diff --git a/docs/scos/dev/data-import/202005.0/data-import-categories/merchandising-setup/product-merchandising/file-details-product-label.csv.md b/docs/scos/dev/data-import/202005.0/data-import-categories/merchandising-setup/product-merchandising/file-details-product-label.csv.md deleted file mode 100644 index 9427471865a..00000000000 --- a/docs/scos/dev/data-import/202005.0/data-import-categories/merchandising-setup/product-merchandising/file-details-product-label.csv.md +++ /dev/null @@ -1,43 +0,0 @@ ---- -title: File details- product_label.csv -last_updated: Sep 14, 2020 -template: data-import-template -originalLink: https://documentation.spryker.com/v5/docs/file-details-product-labelcsv -originalArticleId: 98ff0cde-73d6-4340-a1c4-36e7f929bc0b -redirect_from: - - /v5/docs/file-details-product-labelcsv - - /v5/docs/en/file-details-product-labelcsv ---- - -This article contains content of the **product_label.csv** file to configure [Product Label](/docs/scos/user/features/{{page.version}}/product-labels-feature-overview.html) information on your Spryker Demo Shop. - - -## Import file parameters -These are the header fields to be included in the .csv file: - -| Field Name | Mandatory | Type | Other Requirements/Comments | Description | -| --- | --- | --- | --- | --- | -| **name** | Yes | String |N/A* | Name of the label. | -| **is_active** | No | Boolean |N/A | Indicates if the label is active. | -| **is_dynamic** | No | Boolean |N/A | Indicates if the label is dynamic. | -| **is_exclusive** | No | Boolean |N/A | Indicates if the label is exclusive. | -| **front_end_reference** | No | String |N/A | Front end reference of the label. | -| **valid_from** | No | Date |N/A | Label valid from this date. | -| **valid_to** | No | Date |N/A | Label valid to this date. | -| **name.{ANY_LOCALE_NAME}** **
            Example value: *name.en_US* | No | String |N/A | Name of the label, in the available locale (US for our example). | -| **product_abstract_skus** | No | String |N/A* | List of comma-separated product abstract SKUs. | -*N/A: Not applicable. -**ANY_LOCALE_NAME: Locale date is dynamic in data importers. It means that ANY_LOCALE_NAME postifx can be changed, removed, and any number of columns with different locales can be added to the .csv files. - -## Dependencies - -This file has the following dependency: -* [product_abstract.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/catalog-setup/products/file-details-product-abstract.csv.html) - -## Import template file and content example -A template and an example of the *product_label.csv* file can be downloaded here: - -| File | Description | -| --- | --- | -| [product_label.csv template](https://spryker.s3.eu-central-1.amazonaws.com/docs/Developer+Guide/Back-End/Data+Manipulation/Data+Ingestion/Data+Import/Data+Import+Categories/Merchandising+Setup/Product+Merchandising/Template+product_label.csv) | Product Label .csv template file (empty content, contains headers only). | -| [product_label.csv](https://spryker.s3.eu-central-1.amazonaws.com/docs/Developer+Guide/Back-End/Data+Manipulation/Data+Ingestion/Data+Import/Data+Import+Categories/Merchandising+Setup/Product+Merchandising/product_label.csv) | Product Label .csv file containing a Demo Shop data sample. | diff --git a/docs/scos/dev/data-import/202005.0/data-import-categories/merchandising-setup/product-merchandising/file-details-product-quantity.csv.md b/docs/scos/dev/data-import/202005.0/data-import-categories/merchandising-setup/product-merchandising/file-details-product-quantity.csv.md deleted file mode 100644 index 8574f1f7cff..00000000000 --- a/docs/scos/dev/data-import/202005.0/data-import-categories/merchandising-setup/product-merchandising/file-details-product-quantity.csv.md +++ /dev/null @@ -1,36 +0,0 @@ ---- -title: File details- product_quantity.csv -last_updated: Sep 14, 2020 -template: data-import-template -originalLink: https://documentation.spryker.com/v5/docs/file-details-product-quantitycsv -originalArticleId: 7438b515-34f6-4f94-816d-c8c23548ab81 -redirect_from: - - /v5/docs/file-details-product-quantitycsv - - /v5/docs/en/file-details-product-quantitycsv ---- - -This article contains content of the **product_quantity.csv** file to configure [Product Quantity](/docs/scos/user/features/{{page.version}}/product-information-management/product-quantity-restrictions/product-quantity-restrictions.html) Store information on your Spryker Demo Shop. - -## Import file parameters -These are the header fields to be included in the .csv file: - -| Field Name | Mandatory | Type | Other Requirements/Comments | Description | -| --- | --- | --- | --- | --- | -| **concrete_sku** | Yes | String |N/A* | SKU of the concrete product. | -| **quantity_min** | Number | String |N/A |Minimum quantity of the product in cart. | -| **quantity_max** | Number | String |N/A | Maximum quantity of the product in cart. | -| **quantity_interval** | Number | String |N/A | Inreval restrictions. | -*N/A: Not applicable. - -## Dependencies - -This file has the following dependency: -* [product_concrete.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/catalog-setup/products/file-details-product-concrete.csv.html) - -## Import template file and content example -A template and an example of the *product_quantity.csv* file can be downloaded here: - -| File | Description | -| --- | --- | -| [product_quantity.csv template](https://spryker.s3.eu-central-1.amazonaws.com/docs/Developer+Guide/Back-End/Data+Manipulation/Data+Ingestion/Data+Import/Data+Import+Categories/Merchandising+Setup/Product+Merchandising/Template+product_quantity.csv) | Product Quantity .csv template file (empty content, contains headers only). | -| [product_quantity.csv](https://spryker.s3.eu-central-1.amazonaws.com/docs/Developer+Guide/Back-End/Data+Manipulation/Data+Ingestion/Data+Import/Data+Import+Categories/Merchandising+Setup/Product+Merchandising/product_quantity.csv) | Product Quantity .csv file containing a Demo Shop data sample. | diff --git a/docs/scos/dev/data-import/202005.0/data-import-categories/merchandising-setup/product-merchandising/file-details-product-relation.csv.md b/docs/scos/dev/data-import/202005.0/data-import-categories/merchandising-setup/product-merchandising/file-details-product-relation.csv.md deleted file mode 100644 index 17e0e8ef404..00000000000 --- a/docs/scos/dev/data-import/202005.0/data-import-categories/merchandising-setup/product-merchandising/file-details-product-relation.csv.md +++ /dev/null @@ -1,38 +0,0 @@ ---- -title: File details- product_relation.csv -last_updated: Sep 14, 2020 -template: data-import-template -originalLink: https://documentation.spryker.com/v5/docs/file-details-product-relationcsv -originalArticleId: 52fb1d3f-242a-4fb0-9069-6d4c4fe24281 -redirect_from: - - /v5/docs/file-details-product-relationcsv - - /v5/docs/en/file-details-product-relationcsv ---- - -This article contains content of the **product_relation.csv** file to configure [Product Relation](/docs/scos/user/features/{{page.version}}/product-relations-feature-overview.html) information on your Spryker Demo Shop. - -## Import file parameters -These are the header fields to be included in the .csv file: - -| Field Name | Mandatory | Type | Other Requirements/Comments | Description | -| --- | --- | --- | --- | --- | -| **product** | Yes | String |N/A* | SKU of the abstract product. | -| **relation_type** | No | String |N/A | Type of relation. | -| **rule** | No | String |N/A | Query which defines the relation between the product and the other products. | -| **product_relation_key** | Yes | String |N/A | Key that is used to assign store relations. | -| **is_active** | No | Integer |N/A | Defines if the product relation is active. | -| **is_rebuild_scheduled** | No | Integer |N/A | Defines if the list of related products should be regularly updated by running a cronjob. | -*N/A: Not applicable. - -## Dependencies - -This file has the following dependency: -* [product_abstract.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/catalog-setup/products/file-details-product-abstract.csv.html) - -## Import template file and content example -A template and an example of the *product_relation.csv* file can be downloaded here: - -| File | Description | -| --- | --- | -| [product_relation.csv template](https://spryker.s3.eu-central-1.amazonaws.com/docs/Developer+Guide/Back-End/Data+Manipulation/Data+Ingestion/Data+Import/Data+Import+Categories/Merchandising+Setup/Product+Merchandising/Template+product_relation.csv) | Product Relation .csv template file (empty content, contains headers only). | -| [product_relation.csv](https://spryker.s3.eu-central-1.amazonaws.com/docs/Developer+Guide/Back-End/Data+Manipulation/Data+Ingestion/Data+Import/Data+Import+Categories/Merchandising+Setup/Product+Merchandising/product_relation.csv) | Product Relation .csv file containing a Demo Shop data sample. | diff --git a/docs/scos/dev/data-import/202005.0/data-import-categories/merchandising-setup/product-merchandising/file-details-product-review.csv.md b/docs/scos/dev/data-import/202005.0/data-import-categories/merchandising-setup/product-merchandising/file-details-product-review.csv.md deleted file mode 100644 index 1fcbe21f6f1..00000000000 --- a/docs/scos/dev/data-import/202005.0/data-import-categories/merchandising-setup/product-merchandising/file-details-product-review.csv.md +++ /dev/null @@ -1,41 +0,0 @@ ---- -title: File details- product_review.csv -last_updated: Sep 14, 2020 -template: data-import-template -originalLink: https://documentation.spryker.com/v5/docs/file-details-product-reviewcsv -originalArticleId: d72715d5-d3b7-4dea-9af1-b14e82ad0f80 -redirect_from: - - /v5/docs/file-details-product-reviewcsv - - /v5/docs/en/file-details-product-reviewcsv - - /docs/scos/dev/data-import/202005.0/data-import-categories/merchandising-setup/product-merchandising/%5Bproduct_review.csv%5D(/docs/scos/dev/data-import/202005.0/data-import-categories/merchandising-setup/product-merchandising/file-details-product-review.csv.html) ---- - -This article contains content of the **product_review.csv** file to configure [Product Review](/docs/scos/user/features/{{page.version}}/product-rating-and-reviews-feature-overview.html) information on your Spryker Demo Shop. - -## Import file parameters -These are the header fields to be included in the .csv file: - -| Field Name | Mandatory | Type | Other Requirements/Comments | Description | -| --- | --- | --- | --- | --- | -| **customer_reference** | Yes | String |N/A* | Reference identifier of the customer. | -| **abstract_product_sku** | Yes | String |N/A | SKU of the abstract product. | -| **locale_name** | No | String |N/A | Identification of the locale of the review. | -| **nickname** | No | String |N/A | Nickname of the review owner. | -| **summary** | No | String |N/A | Summary of the review. | -| **description** | No | String |N/A | Description of the review. | -| **rating** | Yes | Number |N/A | Review rating. | -| **status** | Yes | String |Possible values: *pending*, *approved*, *rejected*. | Review status. | -*N/A: Not applicable. - -## Dependencies - -This file has the following dependency: -* [product_abstract.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/catalog-setup/products/file-details-product-abstract.csv.html) - -## Import template file and content example -A template and an example of the *product_review.csv* file can be downloaded here: - -| File | Description | -| --- | --- | -| [product_review.csv template](https://spryker.s3.eu-central-1.amazonaws.com/docs/Developer+Guide/Back-End/Data+Manipulation/Data+Ingestion/Data+Import/Data+Import+Categories/Merchandising+Setup/Product+Merchandising/Template+product_review.csv) | Product Review .csv template file (empty content, contains headers only). | -| [product_review.csv](https://spryker.s3.eu-central-1.amazonaws.com/docs/Developer+Guide/Back-End/Data+Manipulation/Data+Ingestion/Data+Import/Data+Import+Categories/Merchandising+Setup/Product+Merchandising/product_review.csv) | Product Review .csv file containing a Demo Shop data sample. | diff --git a/docs/scos/dev/data-import/202005.0/data-import-categories/merchandising-setup/product-merchandising/file-details-product-search-attribute-map.csv.md b/docs/scos/dev/data-import/202005.0/data-import-categories/merchandising-setup/product-merchandising/file-details-product-search-attribute-map.csv.md deleted file mode 100644 index a05db8a95f1..00000000000 --- a/docs/scos/dev/data-import/202005.0/data-import-categories/merchandising-setup/product-merchandising/file-details-product-search-attribute-map.csv.md +++ /dev/null @@ -1,37 +0,0 @@ ---- -title: File details- product_search_attribute_map.csv -last_updated: Sep 14, 2020 -template: data-import-template -originalLink: https://documentation.spryker.com/v5/docs/file-details-product-search-attribute-mapcsv -originalArticleId: b59cc055-9844-4dcf-8e90-36767b169283 -redirect_from: - - /v5/docs/file-details-product-search-attribute-mapcsv - - /v5/docs/en/file-details-product-search-attribute-mapcsv ---- - -This article contains content of the **product_search_attribute_map.csv** file to configure Product Search Attribute Map information on your Spryker Demo Shop. - -## Import file parameters -These are the header fields to be included in the .csv file: - -| Field Name | Mandatory | Type | Other Requirements/Comments | Description | -| --- | --- | --- | --- | --- | -| **attribute_key** | Yes | String |N/A* | Identifier of an attribute. | -| **target_field** | No | String | Any constant from the class `src/Generated/Shared/Search/PageIndexMap.php` | Elasticsearch property. | -*N/A: Not applicable. - -## Dependencies - -This file has the following dependency: -* [product_attribute_key.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/catalog-setup/products/file-details-product-attribute-key.csv.html) - -Recommendations & other information -This file maps the product attributes that are imported in the *product_attribute_key.csv* file with Elasticsearch-specific properties. - -## Import template file and content example -A template and an example of the *product_search_attribute_map.csv* file can be downloaded here: - -| File | Description | -| --- | --- | -| [product_search_attribute_map.csv template](https://spryker.s3.eu-central-1.amazonaws.com/docs/Developer+Guide/Back-End/Data+Manipulation/Data+Ingestion/Data+Import/Data+Import+Categories/Merchandising+Setup/Product+Merchandising/Template+product_search_attribute_map.csv) | Product Search Attribute Map .csv template file (empty content, contains headers only). | -| [product_search_attribute_map.csv](https://spryker.s3.eu-central-1.amazonaws.com/docs/Developer+Guide/Back-End/Data+Manipulation/Data+Ingestion/Data+Import/Data+Import+Categories/Merchandising+Setup/Product+Merchandising/product_search_attribute_map.csv) | Product Search Attribute Map .csv file containing a Demo Shop data sample. | diff --git a/docs/scos/dev/data-import/202005.0/data-import-categories/merchandising-setup/product-merchandising/file-details-product-search-attribute.csv.md b/docs/scos/dev/data-import/202005.0/data-import-categories/merchandising-setup/product-merchandising/file-details-product-search-attribute.csv.md deleted file mode 100644 index a3782bc311c..00000000000 --- a/docs/scos/dev/data-import/202005.0/data-import-categories/merchandising-setup/product-merchandising/file-details-product-search-attribute.csv.md +++ /dev/null @@ -1,40 +0,0 @@ ---- -title: File details- product_search_attribute.csv -last_updated: Sep 14, 2020 -template: data-import-template -originalLink: https://documentation.spryker.com/v5/docs/file-details-product-search-attributecsv -originalArticleId: 257d522c-7afb-4235-b5fc-c1ae6d90d374 -redirect_from: - - /v5/docs/file-details-product-search-attributecsv - - /v5/docs/en/file-details-product-search-attributecsv ---- - -This article contains content of the **product_search_attribute.csv** file to configure Product Search Attribute information on your Spryker Demo Shop. - -## Import file parameters -These are the header fields to be included in the .csv file: - -| Field Name | Mandatory | Type | Other Requirements/Comments | Description | -| --- | --- | --- | --- | --- | -| **key** | Yes | String |N/A* | Key identifier string of the product search attribute. | -| **filter_type** | No | String |N/A | Type of search filter, Elasticsearch-specific. | -| **position** | No | Number |N/A | Position of the product search attribute, Elasticsearch specific. | -| **key.{ANY_LOCALE_NAME}** **
            Example value: *key.en_US* | Yes | String |N/A | Key identifier string of the product search attribute, translated in the specified locale US for our example). | -*N/A: Not applicable. -**ANY_LOCALE_NAME: Locale date is dynamic in data importers. It means that ANY_LOCALE_NAME postifx can be changed, removed, and any number of columns with different locales can be added to the .csv files. - -## Dependencies - -This file has the following dependency: -* [product_attribute_key.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/catalog-setup/products/file-details-product-attribute-key.csv.html) - -## Recommendations & other information -The attribute key is previously loaded from *productattributekey.csv*, which can be translated in key.* fields. - -## Import template file and content example -A template and an example of the *product_search_attribute.csv* file can be downloaded here: - -| File | Description | -| --- | --- | -| [product_search_attribute.csv template](https://spryker.s3.eu-central-1.amazonaws.com/docs/Developer+Guide/Back-End/Data+Manipulation/Data+Ingestion/Data+Import/Data+Import+Categories/Merchandising+Setup/Product+Merchandising/Template+product_search_attribute.csv) | Product Search Attribute .csv template file (empty content, contains headers only). | -| [product_search_attribute.csv](https://spryker.s3.eu-central-1.amazonaws.com/docs/Developer+Guide/Back-End/Data+Manipulation/Data+Ingestion/Data+Import/Data+Import+Categories/Merchandising+Setup/Product+Merchandising/product_search_attribute.csv) | Product Search Attribute .csv file containing a Demo Shop data sample. | diff --git a/docs/scos/dev/data-import/202005.0/data-import-categories/merchandising-setup/product-merchandising/file-details-product-set.csv.md b/docs/scos/dev/data-import/202005.0/data-import-categories/merchandising-setup/product-merchandising/file-details-product-set.csv.md deleted file mode 100644 index 7ec0d72f4fa..00000000000 --- a/docs/scos/dev/data-import/202005.0/data-import-categories/merchandising-setup/product-merchandising/file-details-product-set.csv.md +++ /dev/null @@ -1,47 +0,0 @@ ---- -title: File details- product_set.csv -last_updated: Sep 14, 2020 -template: data-import-template -originalLink: https://documentation.spryker.com/v5/docs/file-details-product-setcsv -originalArticleId: 1b93dade-15af-44a8-9e6b-9ca3a77c9e5d -redirect_from: - - /v5/docs/file-details-product-setcsv - - /v5/docs/en/file-details-product-setcsv ---- - -This article contains content of the **product_set.csv** file to configure [Product Set](/docs/scos/user/features/{{page.version}}/product-sets-feature-overview.html) information on your Spryker Demo Shop. - -## Import file parameters -These are the header fields to be included in the .csv file: - -| Field Name | Mandatory | Type | Other Requirements/Comments | Description | -| --- | --- | --- | --- | --- | -| **product_set_key** | Yes (*unique*) | String |N/A* | Key identifier of the product set. | -| **weight** | No | Number |N/A | Weight of the product set. | -| **is_active** | No | Boolean |True = 1
            False = 0 | Indicates if the product set is active or not. | -| **abstract_skus** | Yes | String |N/A | String containing SKUs of the abstract products, separate by comas, which are part of the product set. | -| **name.{ANY_LOCALE_NAME}** **
            Example value: *name.en_US* | No | String |N/A |Name of the product set, translated in the specified locale (US for our example). | -| **url.{ANY_LOCALE_NAME}**
            Example value: *url.en_US* | No | String |N/A | URL of the product set, used in the specified locale (US for our example). | -| **description.{ANY_LOCALE_NAME}**
            Example value: *description.en_US* | No | String |N/A | Description of the product set, translated in the specified locale (US for our example). | -| **meta_title.{ANY_LOCALE_NAME}**
            Example value: *meta_title.en_US* | No | String |N/A |Meta data title of the product set, translated in the specified locale (US for our example). | -| **meta_keywords.{ANY_LOCALE_NAME}**
            Example value: *meta_keywords.en_US* | No | String |N/A | Meta data keywords of the product set, translated in the specified locale (US for our example).| -| **image_set.1** | No | String |N/A | Image of the product set. | -| **image_small.1.1** | No | String |N/A | Small image of the first product of the product set. | -| **image_large.1.1** | No | String |N/A | Large image of the first product of the product set. | -| **image_small.1.2** | No | String |N/A | Small image of the second product of the product set. | -| **image_large.1.2** | No | String |N/A | Large image of the second product of the product set. | -*N/A: Not applicable. -**ANY_LOCALE_NAME: Locale date is dynamic in data importers. It means that ANY_LOCALE_NAME postifx can be changed, removed, and any number of columns with different locales can be added to the .csv files. - -## Dependencies - -This file has the following dependency: -* [product_abstract.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/catalog-setup/products/file-details-product-abstract.csv.html) - -## Import template file and content example -A template and an example of the *product_set.csv* file can be downloaded here: - -| File | Description | -| --- | --- | -| [product_set.csv template](https://spryker.s3.eu-central-1.amazonaws.com/docs/Developer+Guide/Back-End/Data+Manipulation/Data+Ingestion/Data+Import/Data+Import+Categories/Merchandising+Setup/Product+Merchandising/Template+product_set.csv) | Product Set .csv template file (empty content, contains headers only). | -| [product_set.csv](https://spryker.s3.eu-central-1.amazonaws.com/docs/Developer+Guide/Back-End/Data+Manipulation/Data+Ingestion/Data+Import/Data+Import+Categories/Merchandising+Setup/Product+Merchandising/product_set.csv) | Product Set .csv file containing a Demo Shop data sample. | diff --git a/docs/scos/dev/data-import/202005.0/data-import-categories/merchandising-setup/product-merchandising/product-merchandising.md b/docs/scos/dev/data-import/202005.0/data-import-categories/merchandising-setup/product-merchandising/product-merchandising.md deleted file mode 100644 index 2281e58f917..00000000000 --- a/docs/scos/dev/data-import/202005.0/data-import-categories/merchandising-setup/product-merchandising/product-merchandising.md +++ /dev/null @@ -1,38 +0,0 @@ ---- -title: Product Merchandising -last_updated: Sep 14, 2020 -template: data-import-template -originalLink: https://documentation.spryker.com/v5/docs/product-merchandising -originalArticleId: e0f6f670-f766-4d02-92ea-f6c887af3bf8 -redirect_from: - - /v5/docs/product-merchandising - - /v5/docs/en/product-merchandising ---- - -The **Product Merchandising** category contains all data you need to manage merchandising information in your online store. We have structured this section according to the following .csv files that you will have to use to import the data: - -* [product_group.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/merchandising-setup/product-merchandising/file-details-product-group.csv.html): allows you to create product groups. -* [product_label.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/merchandising-setup/product-merchandising/file-details-product-label.csv.html): allows you to create labels to assign to products. You can use the "New" or "Special sales", etc. labels to promote the products. -* product_relation.csv: allows you to define which products are related to each other. -* [product_review.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/merchandising-setup/product-merchandising/file-details-product-review.csv.html): allows you to load information about product reviews. -* [product_search_attribute.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/merchandising-setup/product-merchandising/file-details-product-search-attribute.csv.html): sets additional search attributes for products. -* [product_search_attribute_map.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/merchandising-setup/product-merchandising/file-details-product-search-attribute-map.csv.html): maps the product attributes that are imported in the *product_attribute_key.csv* file with Elasticsearch-specific properties. -* [product_set.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/merchandising-setup/product-merchandising/file-details-product-set.csv.html): allows you to define product sets. -* p[roduct_discontinued.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/merchandising-setup/product-merchandising/file-details-product-discontinued.csv.html): allows you to define discontinued products. -* [product_alternative.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/merchandising-setup/product-merchandising/file-details-product-alternative.csv.html): allows you to define alternative products. -* [product_quantity.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/merchandising-setup/product-merchandising/file-details-product-quantity.csv.html): allows you to set product quantity restrictions. - -The table below provides details on Product Merchandising data importers, their purpose, .csv files, dependencies, and other details. Each data importer contains links to .csv files used to import the corresponding data, including specifications of mandatory and unique fields, dependencies, detailed explanations, recommendations, templates, and content examples. - -| Data Importer | Purpose | Console Command| FILES | Dependencies | -| --- | --- | --- | --- |--- | -| **Product Group** | Imports information used to create product groups. |`data:import:product-group`| [product_group.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/merchandising-setup/product-merchandising/file-details-product-group.csv.html) |[product_abstract.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/catalog-setup/products/file-details-product-abstract.csv.html) | -| **Product Label** | Imports information used to define the labels that can be assigned to the products, such as special sales labels.|`data:import:product-label`| [product_label.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/merchandising-setup/product-merchandising/file-details-product-label.csv.html) |[product_abstract.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/catalog-setup/products/file-details-product-abstract.csv.html) | -| **Product Relation** | Imports information used to define which products are related to each other. |`data:import:product-relation`| [product_relation.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/merchandising-setup/product-merchandising/file-details-product-relation.csv.html) |[product_abstract.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/catalog-setup/products/file-details-product-abstract.csv.html) | -| **Product Review** | Imports information about product reviews. |`data:import:product-review `| [product_review.cs]([product_review.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/merchandising-setup/product-merchandising/file-details-product-review.csv.html))v |
            • [product_abstract.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/catalog-setup/products/file-details-product-abstract.csv.html)
            • [customer.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/commerce-setup/file-details-customer.csv.html)
            | -| **Product Search Attribute** | Imports information used to set additional search attributes. |`data:import:product-search-attribute `| [product_search_attribute.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/merchandising-setup/product-merchandising/file-details-product-search-attribute.csv.html) |[product_attribute_key.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/catalog-setup/products/file-details-product-attribute-key.csv.html) | -| **Product Search Attribute Map** | Imports information to map the product attributes that are imported in the *product_attribute_key.csv* file with Elasticsearch-specific properties. |`data:import:product-search-attribute-map `| [product_search_attribute_map.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/merchandising-setup/product-merchandising/file-details-product-search-attribute-map.csv.html) |[product_attribute_key.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/catalog-setup/products/file-details-product-attribute-key.csv.html) | -| **Product Set ** | Imports relevant information about the product sets. |`data:import:product-set`| [product_set.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/merchandising-setup/product-merchandising/file-details-product-set.csv.html) |[product_abstract.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/catalog-setup/products/file-details-product-abstract.csv.html) | -| **Product Discontinued** | Imports information identifying products that have been discontinued. |`data:import:product-discontinued`| [product_discontinued.csv ](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/merchandising-setup/product-merchandising/file-details-product-discontinued.csv.html)|[product_concrete.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/catalog-setup/products/file-details-product-concrete.csv.html) | -| **Product Alternative** | Imports information identifying alternative products to ones that have been discontinued. |`data:import:product-alternative`| [product_alternative.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/merchandising-setup/product-merchandising/file-details-product-alternative.csv.html) |
            • [product_concrete.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/catalog-setup/products/file-details-product-concrete.csv.html)
            • [product_abstract.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/catalog-setup/products/file-details-product-abstract.csv.html)
            • | -| **Product Quantity** | Contains information about product quantity restrictions (e.g. a customer cannot buy less than 100 units of an item). |`data:import:product-quantity `| [product_quantity.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/merchandising-setup/product-merchandising/file-details-product-quantity.csv.html) |[product_concrete.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/catalog-setup/products/file-details-product-concrete.csv.html) | diff --git a/docs/scos/dev/data-import/202005.0/data-import-categories/miscellaneous/file-details-comment.csv.md b/docs/scos/dev/data-import/202005.0/data-import-categories/miscellaneous/file-details-comment.csv.md deleted file mode 100644 index 2a39f5aa4e8..00000000000 --- a/docs/scos/dev/data-import/202005.0/data-import-categories/miscellaneous/file-details-comment.csv.md +++ /dev/null @@ -1,37 +0,0 @@ ---- -title: File details- comment.csv -last_updated: Sep 14, 2020 -template: data-import-template -originalLink: https://documentation.spryker.com/v5/docs/file-details-commentcsv -originalArticleId: 1facba35-37d7-420f-a9f2-fdb7a0bd3d91 -redirect_from: - - /v5/docs/file-details-commentcsv - - /v5/docs/en/file-details-commentcsv ---- - -This article contains content of the **comment.csv** file to configure [Comment](/docs/scos/user/features/{{page.version}}/comments-feature-overview.html) information on your Spryker Demo Shop. - -## Import file parameters -These are the header fields to be included in the .csv file: - -| Field Name | Mandatory | Type | Other Requirements/Comments | Description | -| --- | --- | --- | --- | --- | -| **message_key** | No | String |N/A* | Identifier of the message with the comment. | -| **owner_type** | No | String |N/A | Owner type that issued the comment. | -| **owner_key** | No | String |N/A | Owner key identifier who issued the comment. | -| **customer_reference** | No | String |N/A |Reference of the customer. | -| **message** | No | String |N/A |Message with the comment. | -*N/A: Not applicable. - -## Dependencies - -This file has the following dependency: -* [customer.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/commerce-setup/file-details-customer.csv.html) - -## Import template file and content example -A template and an example of the *comment.csv* file can be downloaded here: - -| File | Description | -| --- | --- | -| [comment.csv template](https://spryker.s3.eu-central-1.amazonaws.com/docs/Developer+Guide/Back-End/Data+Manipulation/Data+Ingestion/Data+Import/Data+Import+Categories/Miscellaneous/Template+comment.csv) | Comment .csv template file (empty content, contains headers only). | -| [comment.csv](https://spryker.s3.eu-central-1.amazonaws.com/docs/Developer+Guide/Back-End/Data+Manipulation/Data+Ingestion/Data+Import/Data+Import+Categories/Miscellaneous/comment.csv) | Comment .csv file containing a Demo Shop data sample. | diff --git a/docs/scos/dev/data-import/202005.0/data-import-categories/miscellaneous/file-details-mime-type.csv.md b/docs/scos/dev/data-import/202005.0/data-import-categories/miscellaneous/file-details-mime-type.csv.md deleted file mode 100644 index ca4b0894f24..00000000000 --- a/docs/scos/dev/data-import/202005.0/data-import-categories/miscellaneous/file-details-mime-type.csv.md +++ /dev/null @@ -1,39 +0,0 @@ ---- -title: File details- mime_type.csv -last_updated: May 25, 2020 -template: data-import-template -originalLink: https://documentation.spryker.com/v5/docs/file-details-mime-typecsv -originalArticleId: 9e8f470c-153e-4792-95db-28889f514520 -redirect_from: - - /v5/docs/file-details-mime-typecsv - - /v5/docs/en/file-details-mime-typecsv ---- - -This article contains content of the **mime_type.csv** file to configure Mime Type information on your Spryker Demo Shop. - -{% info_block warningBox "Info" %} - -This file does not exist by default on the project level. It can be created in the `data/import `folder in order to override the CSV file from the *file-manager-data-import* module: `vendor/spryker/file-manager-data-import/data/import/mime_type.csv` - -{% endinfo_block %} - -## Import file parameters -These are the header fields to be included in the .csv file: - -| Field Name | Mandatory | Type | Other Requirements/Comments | Description | -| --- | --- | --- | --- | --- | -| **name** | Yes | String |Must be a valid MIME type. | Name of the MIME type. | -| **is_allowed** | Yes | Boolean |
              • True = 1
              • False = 0
              • | Indicates if the MIME type is allowed or not. | -*N/A: Not applicable. - -## Dependencies - -This file hasno dependencies. - -## Import template file and content example -A template and an example of the *mime_type.csv* file can be downloaded here: - -| File | Description | -| --- | --- | -| [mime_type.csv template](https://spryker.s3.eu-central-1.amazonaws.com/docs/Developer+Guide/Back-End/Data+Manipulation/Data+Ingestion/Data+Import/Data+Import+Categories/Miscellaneous/Template+mime_type.csv) | Mime Type .csv template file (empty content, contains headers only). | -| [mime_type.csv](https://spryker.s3.eu-central-1.amazonaws.com/docs/Developer+Guide/Back-End/Data+Manipulation/Data+Ingestion/Data+Import/Data+Import+Categories/Miscellaneous/mime_type.csv) | Mime Type .csv file containing a Demo Shop data sample. | diff --git a/docs/scos/dev/data-import/202005.0/data-import-categories/miscellaneous/miscellaneous.md b/docs/scos/dev/data-import/202005.0/data-import-categories/miscellaneous/miscellaneous.md deleted file mode 100644 index 5a758d462f2..00000000000 --- a/docs/scos/dev/data-import/202005.0/data-import-categories/miscellaneous/miscellaneous.md +++ /dev/null @@ -1,20 +0,0 @@ ---- -title: Miscellaneous -last_updated: Sep 14, 2020 -template: data-import-template -originalLink: https://documentation.spryker.com/v5/docs/miscellaneous -originalArticleId: 21cd7d59-300f-4c76-9f9a-6ff25fc7cc64 -redirect_from: - - /v5/docs/miscellaneous - - /v5/docs/en/miscellaneous ---- - -The **Miscellaneous** category contains several additional data that you need to sell the products/services online. This category contains a group of data importers and csv content files that do not fit under the previous categories. - -The table below provides details on Miscellaneous data importers, their purpose, .csv files, dependencies, and other details. Each data importer contains links to .csv files used to import the corresponding data, including specifications of mandatory and unique fields, dependencies, detailed explanations, recommendations, templates, and content examples. - -| Data Importer | Purpose | Console Command| FILES | Dependencies | -| --- | --- | --- | --- |--- | -| **Comment** | Imports information relative to customer comments. | |[comment.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/miscellaneous/file-details-comment.csv.html)|[customer.csv ](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/commerce-setup/file-details-customer.csv.html)| -| **Mime Type** | Imports information relative to existing MIME types allowed in the platform.|`data:import mime-type` | [mime_type.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/miscellaneous/file-details-mime-type.csv.html)| None| - diff --git a/docs/scos/dev/data-import/202005.0/data-import-categories/navigation-setup/file-details-navigation-node.csv.md b/docs/scos/dev/data-import/202005.0/data-import-categories/navigation-setup/file-details-navigation-node.csv.md deleted file mode 100644 index 413df038f23..00000000000 --- a/docs/scos/dev/data-import/202005.0/data-import-categories/navigation-setup/file-details-navigation-node.csv.md +++ /dev/null @@ -1,44 +0,0 @@ ---- -title: File details- navigation_node.csv -last_updated: Sep 14, 2020 -template: data-import-template -originalLink: https://documentation.spryker.com/v5/docs/file-details-navigation-nodecsv -originalArticleId: 4788d7e2-b52a-492b-b0eb-8d1460c725fd -redirect_from: - - /v5/docs/file-details-navigation-nodecsv - - /v5/docs/en/file-details-navigation-nodecsv ---- - -This article contains content of the **navigation_node.csv** file to configure [Navigation Node](/docs/scos/user/back-office-user-guides/{{page.version}}/content/navigation/references/navigation-reference-information.html#navigation-node-types) information on your Spryker Demo Shop. - -## Import file parameters -These are the header fields to be included in the .csv file: - -| Field Name | Mandatory | Type | Other Requirements/Comments | Description | -| --- | --- | --- | --- | --- | -| **navigation_key** | Yes | String |N/A* | Navigation entity key identifier. | -| **node_key** | Yes (*unique*) | String |N/A | Identifies a node. | -| **parent_node_key** | Yes | String |N/A | Identifies the parent node. Defines the hierarchy of the nodes. | -| **node_type** | Yes | String |Possible values are: category, link, cms_page, external_url, label, ….) | Type of node. | -| **title.{ANY_LOCALE_NAME}** **
                Example value: *title.en_US* | Yes | String |N/A | Tittle of the node (US locale for our example). | -| **url.{ANY_LOCALE_NAME}** **
                Example value: *url.en_US* | Yes | String |N/A | URL of the node (US locale for our example). | -| **css_class.{ANY_LOCALE_NAME}** **
                Example value: *css_class.en_US* | Yes | String |N/A | Class of the node (US locale for our example). | -| **valid_from** | Yes | Date |N/A | Date from which the navigation node is valid.| -| **valid_to** | Yes | Date |N/A | Date to which the navigation node is valid.| -*N/A: Not applicable. -** ANY_LOCALE_NAME: Locale date is dynamic in data importers. It means that ANY_LOCALE_NAME postifx can be changed, removed, and any number of columns with different locales can be added to the .csv files. - -## Dependencies - -This file has the following dependencies: - -* [navigation.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/navigation-setup/file-details-navigation.csv.html) -* [glossary.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/commerce-setup/file-details-glossary.csv.html) - -## Import template file and content example -A template and an example of the *navigation_node.csv* file can be downloaded here: - -| File | Description | -| --- | --- | -| [navigation_node.csv template](https://spryker.s3.eu-central-1.amazonaws.com/docs/Developer+Guide/Back-End/Data+Manipulation/Data+Ingestion/Data+Import/Data+Import+Categories/Navigation+Setup/Template+navigation_node.csv) | Navigation Node .csv template file (empty content, contains headers only). | -| [navigation_node.csv](https://spryker.s3.eu-central-1.amazonaws.com/docs/Developer+Guide/Back-End/Data+Manipulation/Data+Ingestion/Data+Import/Data+Import+Categories/Navigation+Setup/navigation_node.csv) | Navigation Node .csv file containing a Demo Shop data sample. | diff --git a/docs/scos/dev/data-import/202005.0/data-import-categories/navigation-setup/file-details-navigation.csv.md b/docs/scos/dev/data-import/202005.0/data-import-categories/navigation-setup/file-details-navigation.csv.md deleted file mode 100644 index 16231521800..00000000000 --- a/docs/scos/dev/data-import/202005.0/data-import-categories/navigation-setup/file-details-navigation.csv.md +++ /dev/null @@ -1,35 +0,0 @@ ---- -title: File details- navigation.csv -last_updated: Sep 14, 2020 -template: data-import-template -originalLink: https://documentation.spryker.com/v5/docs/file-details-navigationcsv -originalArticleId: f11a79c0-37bc-45a2-b994-5100031bb06a -redirect_from: - - /v5/docs/file-details-navigationcsv - - /v5/docs/en/file-details-navigationcsv ---- - -This article contains content of the **navigation.csv** file to configure [Navigation](/docs/scos/user/features/{{page.version}}/navigation-feature-overview.html) information on your Spryker Demo Shop. - -## Import file parameters -These are the header fields to be included in the .csv file: - -| Field Name | Mandatory | Type | Other Requirements/Comments | Description | -| --- | --- | --- | --- | --- | -| **key** | v | String |N/A* | Navigation entity key. | -| **name** | v | String |N/A | Navigation entity name. | -| **is_active** | v | Boolean |N/A | Defines if the navigation element is active. | -*N/A: Not applicable. - -## Dependencies - -This file has no dependencies. - -## Import template file and content example -A template and an example of the *navigation.csv* file can be downloaded here: - -| File | Description | -| --- | --- | -| [navigation.csv template](https://spryker.s3.eu-central-1.amazonaws.com/docs/Developer+Guide/Back-End/Data+Manipulation/Data+Ingestion/Data+Import/Data+Import+Categories/Navigation+Setup/Template+navigation.csv) | Navigation .csv template file (empty content, contains headers only). | -| [navigation.csv](https://spryker.s3.eu-central-1.amazonaws.com/docs/Developer+Guide/Back-End/Data+Manipulation/Data+Ingestion/Data+Import/Data+Import+Categories/Navigation+Setup/navigation.csv) | Navigation .csv file containing a Demo Shop data sample. | - diff --git a/docs/scos/dev/data-import/202005.0/data-import-categories/navigation-setup/navigation-setup.md b/docs/scos/dev/data-import/202005.0/data-import-categories/navigation-setup/navigation-setup.md deleted file mode 100644 index f21036b8086..00000000000 --- a/docs/scos/dev/data-import/202005.0/data-import-categories/navigation-setup/navigation-setup.md +++ /dev/null @@ -1,20 +0,0 @@ ---- -title: Navigation Setup -last_updated: Sep 14, 2020 -template: data-import-template -originalLink: https://documentation.spryker.com/v5/docs/navigation-setup -originalArticleId: 71fb8765-7559-4655-87be-333d8cb46812 -redirect_from: - - /v5/docs/navigation-setup - - /v5/docs/en/navigation-setup ---- - -The **Navigation Setup** category contains data required to build navigation for the online store. - -The table below provides details on Navigation Setup data importers, their purpose, .csv files, dependencies, and other details. Each data importer contains links to .csv files used to import the corresponding data, including specifications of mandatory and unique fields, dependencies, detailed explanations, recommendations, templates, and content examples. - - -| Data Importer | Purpose | Console Command| FILES | Dependencies | -| --- | --- | --- | --- |--- | -| **Navigation** |Imports information about the navigation entities. |`data:import:navigation` | [navigation.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/navigation-setup/file-details-navigation.csv.html) |None | -| **Navigation Node** | Imports information about the navigation nodes. |`data:import:navigation-node` |[ navigation_node.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/navigation-setup/file-details-navigation-node.csv.html) |
                • [navigation.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/navigation-setup/file-details-navigation.csv.html)
                • [glossary.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/commerce-setup/file-details-glossary.csv.html)
                | diff --git a/docs/scos/dev/data-import/202005.0/data-import-categories/special-product-types/gift-cards/file-details-gift-card-abstract-configuration.csv.md b/docs/scos/dev/data-import/202005.0/data-import-categories/special-product-types/gift-cards/file-details-gift-card-abstract-configuration.csv.md deleted file mode 100644 index e2b14423805..00000000000 --- a/docs/scos/dev/data-import/202005.0/data-import-categories/special-product-types/gift-cards/file-details-gift-card-abstract-configuration.csv.md +++ /dev/null @@ -1,35 +0,0 @@ ---- -title: File details- gift_card_abstract_configuration.csv -last_updated: Sep 14, 2020 -template: data-import-template -originalLink: https://documentation.spryker.com/v5/docs/file-details-gift-card-abstract-configurationcsv -originalArticleId: c0eeeba8-90a3-4f25-bbd7-bbda769bac32 -redirect_from: - - /v5/docs/file-details-gift-card-abstract-configurationcsv - - /v5/docs/en/file-details-gift-card-abstract-configurationcsv ---- - -This article contains content of the **gift_card_abstract_configuration.csv** file to configure [Gift Card](/docs/scos/user/features/{{page.version}}/gift-cards-feature-overview.html) Abstract Configuration information on your Spryker Demo Shop. A **Gift Card Product** is a regular product in the shop which represents a Gift Card that Customer can buy. The **Gift Card Abstract Product** represents a type of Gift Cards with a code pattern (e.g. "XMAS-", “Happy-B”, etc.). - -## Import file parameters -These are the header fields to be included in the .csv file: - -| Field Name | Mandatory | Type | Other Requirements/Comments | Description | -| --- | --- | --- | --- | --- | -| **abstract_sku** | Yes | String |N/A* | SKU identifier of the Gift Card Abstract Product. | -| **pattern** | No | String |N/A | Pattern that is used to create the unique code of the produced Gift Card after the purchase. | -*N/A: Not applicable. - -## Dependencies - -This file has the following dependencies: -* [product_abstract.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/catalog-setup/products/file-details-product-abstract.csv.html) - -## Import template file and content example -A template and an example of the *gift_card_abstract_configuration.csv* file can be downloaded here: - -| File | Description | -| --- | --- | -| [gift_card_abstract_configuration.csv template](https://spryker.s3.eu-central-1.amazonaws.com/docs/Developer+Guide/Back-End/Data+Manipulation/Data+Ingestion/Data+Import/Data+Import+Categories/Special+Product+Types/Gift+Cards/Template+gift_card_abstract_configuration.csv) | Gift Card Abstract Configuration .csv template file (empty content, contains headers only). | -| [gift_card_abstract_configuration.csv](https://spryker.s3.eu-central-1.amazonaws.com/docs/Developer+Guide/Back-End/Data+Manipulation/Data+Ingestion/Data+Import/Data+Import+Categories/Special+Product+Types/Gift+Cards/gift_card_abstract_configuration.csv) |Gift Card Abstract Configuration .csv file containing a Demo Shop data sample. | - diff --git a/docs/scos/dev/data-import/202005.0/data-import-categories/special-product-types/gift-cards/file-details-gift-card-concrete-configuration.csv.md b/docs/scos/dev/data-import/202005.0/data-import-categories/special-product-types/gift-cards/file-details-gift-card-concrete-configuration.csv.md deleted file mode 100644 index 8774029b61c..00000000000 --- a/docs/scos/dev/data-import/202005.0/data-import-categories/special-product-types/gift-cards/file-details-gift-card-concrete-configuration.csv.md +++ /dev/null @@ -1,34 +0,0 @@ ---- -title: File details- gift_card_concrete_configuration.csv -last_updated: Sep 14, 2020 -template: data-import-template -originalLink: https://documentation.spryker.com/v5/docs/file-details-gift-card-concrete-configurationcsv -originalArticleId: 03acbbf6-ee0f-4c2a-b665-6fd733f059bd -redirect_from: - - /v5/docs/file-details-gift-card-concrete-configurationcsv - - /v5/docs/en/file-details-gift-card-concrete-configurationcsv ---- - -This article contains content of the **gift_card_concrete_configuration.csv** file to configure [Gift Card](/docs/scos/user/features/{{page.version}}/gift-cards-feature-overview.html) Concrete Configuration information on your Spryker Demo Shop. A **Gift Card Product** is a regular product in the shop which represents a Gift Card that Customer can buy. In this file, you can configure the ammount of money that will be loaded in the Gift Card. - -## Import file parameters -These are the header fields to be included in the .csv file: - -| Field Name | Mandatory | Type | Other Requirements/Comments | Description | -| --- | --- | --- | --- | --- | -| **sku** | Yes | String |N/A* | SKU identifier of the Concrete Gift Card Product. | -| **value** | Yes | Integer |N/A |The amount of money that will be loaded in the Gift Card. | -*N/A: Not applicable. - -## Dependencies - -This file has the following dependencies: -* [product_concrete.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/catalog-setup/products/file-details-product-concrete.csv.html) - -## Import template file and content example -A template and an example of the *gift_card_concrete_configuration.csv* file can be downloaded here: - -| File | Description | -| --- | --- | -| [gift_card_concrete_configuration.csv template]() | Gift Card Concrete Configuration .csv template file (empty content, contains headers only). | -| [gift_card_concrete_configuration.csv]() | Gift Card Concrete Configuration .csv file containing a Demo Shop data sample. | diff --git a/docs/scos/dev/data-import/202005.0/data-import-categories/special-product-types/gift-cards/gift-cards.md b/docs/scos/dev/data-import/202005.0/data-import-categories/special-product-types/gift-cards/gift-cards.md deleted file mode 100644 index cebe93d4723..00000000000 --- a/docs/scos/dev/data-import/202005.0/data-import-categories/special-product-types/gift-cards/gift-cards.md +++ /dev/null @@ -1,23 +0,0 @@ ---- -title: Gift Cards -last_updated: Sep 14, 2020 -template: data-import-template -originalLink: https://documentation.spryker.com/v5/docs/gift-cards-import -originalArticleId: 314e09e2-99e3-4571-a7c6-89cceacae64d -redirect_from: - - /v5/docs/gift-cards-import - - /v5/docs/en/gift-cards-import ---- - -The **Gift Cards** category contains all data you need to manage gift cards information in your online store. We have structured this section according to the following .csv files that you will have to use to import the data: - -* [gift_card_abstract_configuration.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/special-product-types/gift-cards/file-details-gift-card-abstract-configuration.csv.html): allows you to load information about the different types of gift cards. -* [gift_card_concrete_configuration.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/special-product-types/gift-cards/file-details-gift-card-concrete-configuration.csv.html): allows you to define the amount of money for each gift card. - -The table below provides details on Gift Cards data importers, their purpose, .csv files, dependencies, and other details. Each data importer contains links to .csv files used to import the corresponding data, including specifications of mandatory and unique fields, dependencies, detailed explanations, recommendations, templates, and content examples. - -| Data Importer | Purpose | Console Command| FILES | Dependencies | -| --- | --- | --- | --- |--- | -| **Gift Card Abstract Configuration** | Imports gift card product configuration information. A Gift Card Product is a regular product in the shop which represents a Gift Card that Customer can buy. The Gift Card Abstract Product configuration represents a type of Gift Cards with a code pattern (for example, “Xmas”, “Happy-B”, etc.). |`data:import:gift-card-abstract-configuration ` | [gift_card_abstract_configuration.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/special-product-types/gift-cards/file-details-gift-card-abstract-configuration.csv.html) |[product_abstract.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/catalog-setup/products/file-details-product-abstract.csv.html) | -| **Gift Card Concrete Configuration** | Imports gift card product configuration information. This data is used to configure the amount of money that will be top-up (loaded) in the Gift Card. |`data:import:gift-card-concrete-configuration` |[gift_card_concrete_configuration.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/special-product-types/gift-cards/file-details-gift-card-concrete-configuration.csv.html)| [product_concrete.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/catalog-setup/products/file-details-product-concrete.csv.html) | - diff --git a/docs/scos/dev/data-import/202005.0/data-import-categories/special-product-types/product-options/file-details-product-option-price.csv.md b/docs/scos/dev/data-import/202005.0/data-import-categories/special-product-types/product-options/file-details-product-option-price.csv.md deleted file mode 100644 index 6b1e802044f..00000000000 --- a/docs/scos/dev/data-import/202005.0/data-import-categories/special-product-types/product-options/file-details-product-option-price.csv.md +++ /dev/null @@ -1,37 +0,0 @@ ---- -title: File details- product_option_price.csv -last_updated: Sep 14, 2020 -template: data-import-template -originalLink: https://documentation.spryker.com/v5/docs/file-details-product-option-pricecsv -originalArticleId: 40018220-6873-4910-ac41-3f5b8d685c96 -redirect_from: - - /v5/docs/file-details-product-option-pricecsv - - /v5/docs/en/file-details-product-option-pricecsv ---- - -This article contains content of the **product_option_price.csv** file to configure Product Option Price information on your Spryker Demo Shop. Importing the Product Option Price data sets the net and gross prices for each of the Product Options, per store and per currency. - -## Import file parameters -These are the header fields to be included in the .csv file: - -| Field Name | Mandatory | Type | Other Requirements/Comments | Description | -| --- | --- | --- | --- | --- | -| **product_option_sku** | Yes | String |N/A* | SKU identifier of the Product Option.| -| **store** | Yes | String |N/A | Name of the store that contains this product option. | -| **currency** | Yes | String |N/A | Currency used with this product option. | -| **value_net** | No | Integer |The original value is multiplied by 100, before stored in this field. | Net price value of the Product Option. | -| **value_gross** | No | Integer |The original value is multiplied by 100, before stored in this field. | Gross price value of the Product Option. | -*N/A: Not applicable. - -## Dependencies - -This file has the following dependencies: -* [product_option.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/special-product-types/product-options/file-details-product-option.csv.html) - -## Import template file and content example -A template and an example of the *product_option_price.csv* file can be downloaded here: - -| File | Description | -| --- | --- | -| [product_option_price.csv template](https://spryker.s3.eu-central-1.amazonaws.com/docs/Developer+Guide/Back-End/Data+Manipulation/Data+Ingestion/Data+Import/Data+Import+Categories/Special+Product+Types/Product+Options/Template+product_option_price.csv) | Payment Method Store .csv template file (empty content, contains headers only). | -| [product_option_price.csv](https://spryker.s3.eu-central-1.amazonaws.com/docs/Developer+Guide/Back-End/Data+Manipulation/Data+Ingestion/Data+Import/Data+Import+Categories/Special+Product+Types/Product+Options/product_option_price.csv) | Payment Method Store .csv file containing a Demo Shop data sample. | diff --git a/docs/scos/dev/data-import/202005.0/data-import-categories/special-product-types/product-options/file-details-product-option.csv.md b/docs/scos/dev/data-import/202005.0/data-import-categories/special-product-types/product-options/file-details-product-option.csv.md deleted file mode 100644 index 5ad91448f07..00000000000 --- a/docs/scos/dev/data-import/202005.0/data-import-categories/special-product-types/product-options/file-details-product-option.csv.md +++ /dev/null @@ -1,41 +0,0 @@ ---- -title: File details- product_option.csv -last_updated: Sep 14, 2020 -template: data-import-template -originalLink: https://documentation.spryker.com/v5/docs/file-details-product-optioncsv -originalArticleId: 62f8c37d-175d-40ea-a4da-7e9b28013cf5 -redirect_from: - - /v5/docs/file-details-product-optioncsv - - /v5/docs/en/file-details-product-optioncsv ---- - -This article contains content of the **product_option.csv** file to configure [Product Option](/docs/scos/user/features/{{page.version}}/product-options-feature-overview.html) information on your Spryker Demo Shop. - -## Import file parameters -These are the header fields to be included in the .csv file: - -| Field Name | Mandatory | Type | Other Requirements/Comments | Description | -| --- | --- | --- | --- | --- | -| **abstract_product_skus** | No | String |N/A* | List of Abstract Product SKUs separated by comma. | -| **option_group_id** | Yes | String |If doesn't exist then it will be automatically created. | Identifier of the Product Option Group. | -| **tax_set_name** | No | String |N/A | Name of the tax set. | -| **group_name_translation_key** | No | String |N/A | Translation key of the name of the group in different locales.| -| **group_name.{ANY_LOCALE_NAME}***
                Example value: *group_name.en_US* | No | String |N/A* | Name of the group in the specified locale (US for our example). | -| **option_name_translation_key** | No | String |N/A | Translation key of the name of the option in different locales. | -| **option_name.{ANY_LOCALE_NAME}**
                Example value: *option_name.en_US* ** | No | String |N/A | Name of the option in the specified locale (US for our example). | -| **sku** | No (unique) | String |N/A | SKU identifier of the Product Option. | -*N/A: Not applicable. -**ANY_LOCALE_NAME: Locale date is dynamic in data importers. It means that ANY_LOCALE_NAME postifx can be changed, removed, and any number of columns with different locales can be added to the .csv files. - -## Dependencies - -This file has the following dependencies: -* [product_abstract.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/catalog-setup/products/file-details-product-abstract.csv.html) - -## Import template file and content example -A template and an example of the *product_option.csv* file can be downloaded here: - -| File | Description | -| --- | --- | -| [product_option.csv template](https://spryker.s3.eu-central-1.amazonaws.com/docs/Developer+Guide/Back-End/Data+Manipulation/Data+Ingestion/Data+Import/Data+Import+Categories/Special+Product+Types/Product+Options/Template+product_option.csv) | Payment Method Store .csv template file (empty content, contains headers only). | -| [product_option.csv](https://spryker.s3.eu-central-1.amazonaws.com/docs/Developer+Guide/Back-End/Data+Manipulation/Data+Ingestion/Data+Import/Data+Import+Categories/Special+Product+Types/Product+Options/product_option.csv) | Payment Method Store .csv file containing a Demo Shop data sample. | diff --git a/docs/scos/dev/data-import/202005.0/data-import-categories/special-product-types/product-options/product-options.md b/docs/scos/dev/data-import/202005.0/data-import-categories/special-product-types/product-options/product-options.md deleted file mode 100644 index 53598c8297c..00000000000 --- a/docs/scos/dev/data-import/202005.0/data-import-categories/special-product-types/product-options/product-options.md +++ /dev/null @@ -1,23 +0,0 @@ ---- -title: Product Options -last_updated: Sep 14, 2020 -template: data-import-template -originalLink: https://documentation.spryker.com/v5/docs/product-options-import -originalArticleId: f9c5dc22-3cb6-47a9-a89f-0b7fc4fbf18c -redirect_from: - - /v5/docs/product-options-import - - /v5/docs/en/product-options-import ---- - -The **Product Opitons** category contains all data you need to manage product options in your online store. We have structured this section according to the following .csv files that you will have to use to import the data: - -* [product_option.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/special-product-types/product-options/file-details-product-option.csv.html): allows you to define product options, like insurance, warranty or gift wrapping, and its abstract products. -* [product_option_price.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/special-product-types/product-options/file-details-product-option-price.csv.html): allows you to define the net and gross prices for each product option. - -The table below provides details on Product Opitons data importers, their purpose, .csv files, dependencies, and other details. Each data importer contains links to .csv files used to import the corresponding data, including specifications of mandatory and unique fields, dependencies, detailed explanations, recommendations, templates, and content examples. - -| Data Importer | Purpose | Console Command| FILES | Dependencies | -| --- | --- | --- | --- |--- | -| **Product Option** | Imports information about product options, like insurance, warranty or gift wrapping, and the list of Abstract Product SKUs to which the Product Option is available. |`data:import:product-option` | [product_option.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/special-product-types/product-options/file-details-product-option.csv.html) |None | -| **Product Option Price** | Imports information to set the prices net and gross for each of Product Option, per store and per currency. |`data:import:product-option-price` |[product_option_price.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/special-product-types/product-options/file-details-product-option-price.csv.html)| [product_option.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/special-product-types/product-options/file-details-product-option.csv.html) | - diff --git a/docs/scos/dev/data-import/202005.0/data-import-categories/special-product-types/special-product-types-import-category.md b/docs/scos/dev/data-import/202005.0/data-import-categories/special-product-types/special-product-types-import-category.md deleted file mode 100644 index 6cb11189224..00000000000 --- a/docs/scos/dev/data-import/202005.0/data-import-categories/special-product-types/special-product-types-import-category.md +++ /dev/null @@ -1,23 +0,0 @@ ---- -title: Special product types import category -last_updated: Jun 17, 2021 -template: data-import-template ---- - -The *Special product types* import category contains the data related the special product types information in the online store. - -In the [Product Options](/docs/scos/user/features/{{page.version}}/product-options-feature-overview.html) section, you will find all information about the data imports required to to manage product options in your online store. - -In the [Gift Cards](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/special-product-types/gift-cards/gift-cards.html) section, you will be able to import the data necessary to manage gift cards information in your online store. - -{% info_block warningBox "Import order" %} - -The order in which the files are imported is *very strict*. Execute the following data importers in the provided order: - -1. [Product Option](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/special-product-types/product-options/file-details-product-option.csv.html) -2. [Product Option Price](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/special-product-types/product-options/file-details-product-option-price.csv.html) -3. [Gift Card Abstract Configuration](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/special-product-types/gift-cards/file-details-gift-card-abstract-configuration.csv.html) -4. [Gift Card Concrete Configuration](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/special-product-types/gift-cards/file-details-gift-card-concrete-configuration.csv.html) - - -{% endinfo_block %} diff --git a/docs/scos/dev/data-import/202005.0/data-import-categories/special-product-types/special-product-types.md b/docs/scos/dev/data-import/202005.0/data-import-categories/special-product-types/special-product-types.md deleted file mode 100644 index 75cdab54dc4..00000000000 --- a/docs/scos/dev/data-import/202005.0/data-import-categories/special-product-types/special-product-types.md +++ /dev/null @@ -1,28 +0,0 @@ ---- -title: Special Product Types -last_updated: Sep 14, 2020 -template: data-import-template -originalLink: https://documentation.spryker.com/v5/docs/special-product-types -originalArticleId: d118a354-3763-4cdb-8d10-7205cf31e147 -redirect_from: - - /v5/docs/special-product-types - - /v5/docs/en/special-product-types ---- - -**Special Product Types** contains data related the special product types information in the online store. - -Within the [Product Options](/docs/scos/user/features/{{page.version}}/product-options-feature-overview.html) section, you will find all information about the data imports required to to manage product options in your online store. - -In the [Gift Cards](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/special-product-types/gift-cards/gift-cards.html) section, you will be able to import the data necessary to manage gift cards information in your online store. - -{% info_block warningBox "Import order" %} - -The order in which the files are imported is **very strict**. For this reason, the data importers should be executed in the following order: - -1. [Product Option](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/special-product-types/product-options/file-details-product-option.csv.html) -2. [Product Option Price](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/special-product-types/product-options/file-details-product-option-price.csv.html) -3. [Gift Card Abstract Configuration](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/special-product-types/gift-cards/file-details-gift-card-abstract-configuration.csv.html) -4. [Gift Card Concrete Configuration](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/special-product-types/gift-cards/file-details-gift-card-concrete-configuration.csv.html) - - -{% endinfo_block %} diff --git a/docs/scos/dev/data-import/202005.0/data-importer-speed-optimization.md b/docs/scos/dev/data-import/202005.0/data-importer-speed-optimization.md deleted file mode 100644 index 7c3cd2e22b1..00000000000 --- a/docs/scos/dev/data-import/202005.0/data-importer-speed-optimization.md +++ /dev/null @@ -1,198 +0,0 @@ ---- -title: Data Importer Speed Optimization -description: This article defines the best practices for Spryker modules that need to work with two infrastructure concepts like DataImport and Publish & Synchronize. -last_updated: Apr 3, 2020 -template: data-import-template -originalLink: https://documentation.spryker.com/v5/docs/dataimporter-speed-optimization -originalArticleId: cf5c0a7b-88d1-4891-b74f-90a62f9e928d -redirect_from: - - /v5/docs/dataimporter-speed-optimization - - /v5/docs/en/dataimporter-speed-optimization ---- - -## Concept -**"Writing code is the easy part of every feature but writing a scalable and fast solution is a challenge"** - -This article will define the best practices for Spryker modules that need to work with two infrastructure concepts like DataImport and Publish & Synchronize. After several reviews and tests, we found that we need to define these rules to help developers to write more scalable and high-performance code when they implementing their features. Most of the time when developers create features, they don't consider very high traffic or heavy data processing for big data. This article is going to describe all necessary requirements when you want to create new features and they should work with big data, for example, you want to create a new DataImport or a new P&S module which save millions of entities into a database in a very short amount of time. - -## Rules for Data Importers -`DataImport` module is responsible for reading data from different formats like CSV, JSON, etc and import them into a database with proper Spryker data structure. Usually importing of data is a time-consuming process and we need to follow some best practices to increase the performance. Here you will find some of them: - -### Single vs Batch operation -Assuming you are writing a data importer for `ProductAbstract`, you might want to find a category for each product abstract, your very basic code would be something like this: -```php -protected function importProductAbstract(DataSetInterface $dataSet): void -{ - $categoryKey = $dataSet['category_key']; - $productCategory = SpyCategoryQuery::create()->findOneByCategoryKey($categoryKey); - $dataSet['product_category'] = $productCategory; - - $this->importProductCategories($dataSet); -} -``` -This will work fine and you already achieved to your goals, but can you see the problem here? - -Here is the problem: -```php -protected function importProductAbstract(DataSetInterface $dataSet): void -{ - ... - $productCategory = SpyCategoryQuery::create()->findOneByCategoryKey($categoryKey); // expensive call - ... -} -``` -`importProductAbstract` method will call for each line of your CSV, imagine if you have one CSV file with 1,000,000 lines, it means you will run this query again and again for 1 million times! The possible solution is to avoid single processing and implementing a batch query for it. - -The current solution for DataImport is to add another step before the main step to gather all the information you need for the next steps. like querying all categories and remember them in memory and the next step can do a fast PHP look up from that result in memory. -{% info_block warningBox "Note" %} -`DataImport` v1.4.x doesn't support the batch processing by default and the next version will provide a very clear solution for it -{% endinfo_block %} - -### ORM vs PDO -ORM (Object-relational mapping) is a very good approach when we are working on very big and complex software but it's not always the answer to all problems especially when it comes to batch processing. ORM is slow by design as they need to handle so many internal hydration and mapping. - -Here is an example of using the Propel ORM, this is a very clean and nice approach but not optimized enough for importing big data. - -```php -protected function createOrUpdateProductAbstract(DataSetInterface $dataSet): SpyProductAbstract -{ - $productAbstractEntityTransfer = $this->getProductAbstractTransfer($dataSet); - - $productAbstractEntity = SpyProductAbstractQuery::create() - ->filterBySku($productAbstractEntityTransfer->getSku()) - ->findOneOrCreate() - ->save() - ; - - return $productAbstractEntity; -} -``` - -This approach has two problems: - -1. It runs two queries, one SELECT for `findOneOrCreate` and one INSERT or UPDATE for `save`. -2. Single process approach (repeated per each entry) - -The solution is: - -1. Avoid ORM, you can use a very simple raw SQL but you should also avoid complex raw or big raw SQL queries. -2. Implement `DataSetWriterInterface` to achieve the batch processing approach, prepare one by one and write them once (Take a look at `ProductAbstractWriter` in `Dataimport` as an example). - -### Facade Calls -Sometimes you may need to run some validation or business logic for each data set, the easiest and safest way would be a Facade API call, that's totally fine, but then imagine if these APIs also call some heavy queries very deep! this has a huge side effect on your performance during importing millions of data. - -Here you can see for each product stock, there are two facade calls, each facade call may run more than 5 queries, this means for importing 1,000,000 data, you will have 10,000,000 queries! (this will never finish!) -```php -protected function updateBundleAvailability(): void -{ - foreach (static::$stockProductCollection as $stockProduct) { - if (!$stockProduct[ProductStockHydratorStep::KEY_IS_BUNDLE]) { - continue; - } - $this->productBundleFacade->updateBundleAvailability($stockProduct[ProductStockHydratorStep::KEY_CONCRETE_SKU]); - $this->productBundleFacade->updateAffectedBundlesAvailability($stockProduct[ProductStockHydratorStep::KEY_CONCRETE_SKU]); - } -} -``` -The solution is: - -1. Implement a new Facade API for batch operation -2. Only call facade if they are very lightweight and they don't run any query to a database - -### Memory management -Let's say you already started to work with the batch operation, one of the challenges would be to keep the memory as low as possible. Sometimes you create variables and try to remember them always, but you may need them only until the end of the batch operation, so it's better to release them as soon as possible. - -### Database vendor approach -In Spryker we are supporting both PostgreSQL and MySQL, both are very powerful and come with very promising and handy features. When we are working with databases, it's always good to know these features, one of the very cool features that we like is [CTE](https://www.postgresql.org/docs/9.1/queries-with.html), If you think you are inserting or updating very big data like millions of millions, use CTE as a replaceable for multiple inserts/update. you can find some of Spryker implementation in our demo shops. - -## Rules for Publish and Synchronize -P&S is a concept for transferring data from Zed database to Yves databases like Redis and ES, This operation is separated into two isolated processes which call ** Publish** and **Synchronize**. Publishing is a process to aggregating data and writing it to Database and Queue. Synchronization is a process to read an aggregated message from a queue and write it to external endpoints. The performance issues mostly come from **Publishing** part. Again we need to follow the best practices to increase the performance. Here you will find some of them: - -### Single vs Batch Operation -When you are creating a new listener you should consider these rules: - -* Run your logic against a chunk of event messages not per each. -* Don't run the query inside of for-loop -* Try to save them with a bulk operation, not one by one - -Take a look at this example: -```php -public function publish(array $productAbstractIds): void -{ - foreach ($productAbstractIds as $idProductAbstract) { - $productAbstractProductListStorageEntity = $this->queryProductAbstractProductListEntity($idProductAbstract); - } - -} -``` -Here we are passing a set of ids and then we try to run a query for each product abstract. Imagine if you have 2000 events as a chunk, then you have 2000 queries to a database. - -We can easily fix this by changing the query and run query only once per 2000 ids. -```php -public function publish(array $productAbstractIds): void -{ - $productAbstractProductListStorageEntities = $this->queryProductAbstractProductListEntities($productAbstractIds); -} -``` -### Facade calls -Another point that we need to be very careful here is to call Facade API without any thinking through, we must make sure that these APIs will not run queries inside same as DataImport rule. You are allowed to call Facade API but if: - -* There is no query inside -* Facade API designed for batch operation (`findPriceForSku` vs `findPricesForSkus`) - -### Triggering Events -DataImporters are triggering events manually, this is happening because of performance reasons : - -Triggering events automatically will generate so many duplicates events during data importing, (e.g: Inserting a Product into `spy_product` and `spy_product_localized_attrbite` table will generate two events with the same `id_product`) -Events will be triggered one by one -You can always switch the Event Triggering process with two methods: -```php -use Spryker\Zed\EventBehavior\EventBehaviorConfig; -... - - public function foo() - { - /** - * Disable the events triggering automatically - */ - EventBehaviorConfig::disableEvent(); - - // 1.Create many entities in multiple tables (e.g API bulk import, nightly update jobs) - // 2.Trigger proper events if it's necessary ($eventFacade->triggerBulk('ProductAbstractPublish', $eventTransfers)) - - /** - * Enable the events triggering automatically - */ - EventBehaviorConfig::enableEvent(); - } -``` - - ### P&S and CTE - -Sometimes the amount of the data which needs be synced is very high, for this reason, we can not rely on a standard ORM solution for storing data in the database tables. we recommend you to use bulk insert operation whenever you have more than hundreds of thousand of data. you can still use the CTE technique which was used in DataImporter before. Spryker suite comes with several examples of using CTE technique in Storage and Search module you can replace them by overwriting the Business Factory in the modules: -{% info_block warningBox "Note" %} -These examples only tested for PostgreSQL -{% endinfo_block %} - - -* `src/Pyz/Zed/PriceProductStorage/Business/Storage/PriceProductAbstractStorageWriter.php` -* `src/Pyz/Zed/PriceProductStorage/Business/Storage/PriceProductConcreteStorageWriter.php` -* `src/Pyz/Zed/ProductPageSearch/Business/Publisher/ProductAbstractPagePublisher.php` -* `src/Pyz/Zed/ProductPageSearch/Business/Publisher/ProductConcretePageSearchPublisher.php` -* `src/Pyz/Zed/ProductStorage/Business/Storage/ProductAbstractStorageWriter.php` -* `src/Pyz/Zed/ProductStorage/Business/Storage/ProductConcreteStorageWriter.php` -* `src/Pyz/Zed/UrlStorage/Business/Storage/UrlStorageWriter.php` - -Example classes are going to be replaced with a Core CTE solution. - -## Conclusion -When we are facing some batch operation, we need to think about big data and performance under heavy loading, we are not allowed to write same code that only does the job, it needs to be scalable and fast for high usages. Below you can find our main points: - -* Create batch queries and processes -* Don’t use ORM for batch processing as it’s slow by design -* Don’t run separated queries for each data-set -* Don’t call any facade logic if they are slow or run internal queries -* Release memory after each bulk operations to prevent memory issues -* Use CTE technique (supported by PostgreSQL and MySQL) - - diff --git a/docs/scos/dev/data-import/202005.0/data-importers-overview-and-implementation.md b/docs/scos/dev/data-import/202005.0/data-importers-overview-and-implementation.md deleted file mode 100644 index 1d745aafc4c..00000000000 --- a/docs/scos/dev/data-import/202005.0/data-importers-overview-and-implementation.md +++ /dev/null @@ -1,308 +0,0 @@ ---- -title: Data Importers Overview and Implementation -description: This article includes the list of data importers provided in Spryker Commerce OS. -last_updated: Sep 14, 2020 -template: data-import-template -originalLink: https://documentation.spryker.com/v5/docs/data-importers-review-implementation -originalArticleId: 00193c8f-de9c-4a7d-9447-d6abdce54dac -redirect_from: - - /v5/docs/data-importers-review-implementation - - /v5/docs/en/data-importers-review-implementation ---- - -Currently, there are the following importers in Spryker Commerce OS: - -* Product Alternative Importer **(Beta)** - **B2B/B2C** -* Product Discontinued Importer **(Beta)** - **B2B/B2C** -* Product Packaging Unit Importer **(Beta)** - **B2B/B2C** -* Combined Product - **B2B/B2C** -* Company Importer **(Beta)** - **B2B/B2C** -* Company Business Unit Importer **(Beta)** - **B2B/B2C** -* Company Unit Address Importer **(Beta)** - **B2B/B2C** -* Company Unit Address Label Importer **(Beta)** - **B2B/B2C** -* Company User on Behalf Importer **(Beta)** - **B2B/B2C** -* Multi-Cart Importer **(Beta)** - **B2B/B2C** -* Shared Cart Importer **(Beta)** - **B2B/B2C** -* Shopping List Importer **(Beta)** - **B2B/B2C** -* Shopping List Company Business Unit Importer **(Beta)** - **B2B/B2C** -* Shopping List Company User Importer **(Beta)** - **B2B/B2C** -* Shopping List Item Importer **(Beta)** - **B2B/B2C** -* Product Abstract Importer - **B2B/B2C** -* Product Abstract Store Importer - **B2B/B2C** -* Product Concrete Importer - **B2B/B2C** -* Product Price Importer - **B2B/B2C** -* Product Image Importer - **B2B/B2C** -* Product Stock Importer - **B2B/B2C** -* Product Review Importer - **B2B/B2C** -* Product Relation Importer - **B2B/B2C** -* Product Attribute Key Importer - **B2B/B2C** -* Product Group Importer - **B2B/B2C** -* Product Label Importer - **B2B/B2C** -* Product Management Attribute Importer - **B2B/B2C** -* Product Option Importer - **B2B/B2C** -* Product Option Price Importer - **B2B/B2C** -* Product Relation Importer - **B2B/B2C** -* Product Search Attribute Importer - **B2B/B2C** -* Product Search Attribute Map Importer - **B2B/B2C** -* Product Set Importer - **B2B/B2C** -* Category Template Importer - **B2B/B2C** -* CMS Block Importer - **B2B/B2C** -* CMS Block Category Importer - **B2B/B2C** -* CMS Block Category Position Importer - **B2B/B2C** -* CMS Block Store Importer - **B2B/B2C** -* CMS Page Importer - **B2B/B2C** -* CMS Slot Templates Importer - **B2B/B2C** -* CMS Slots Importer - **B2B/B2C** -* CMS Slot-Block Relationship Importer - **B2B/B2C** -* CMS Template Importer - **B2B/B2C** -* Abstract Product List Content Item Importer - **B2B/B2C** -* Product Set Content Item Importer - **B2B/B2C** -* Banner Content Item Importer - **B2B/B2C** -* Company Unit Address Label Relation Importer - **B2B/B2C** -* Currency Importer - **B2B/B2C** -* Customer Importer - **B2B/B2C** -* Discount Importer - **B2B/B2C** -* Discount Amount Importer - **B2B/B2C** -* Discount Store Importer - **B2B/B2C** -* Discount Voucher Importer - **B2B/B2C** -* Glossary Importer - **B2B/B2C** -* Navigation Importer - **B2B/B2C** -* Navigation Node Importer - **B2B/B2C** -* Order Source Importer - **B2B/B2C** -* Shipment Importer - **B2B/B2C** -* Shipment Price Importer - **B2B/B2C** -* Stock Importer - **B2B/B2C** -* Tax Importer - **B2B/B2C** -* Payment Method Importer - **B2B/B2C** -* Shipment Store Importer - **B2B/B2C** - -Each of the importers can be executed one by one with the separate command (for example, `./vendor/bin/console data:import:product-abstract`). - -However, if you want to execute specific import types **in bulk**, you can create a config.yml configuration file with the following structure: - -``` -action: - - data_entity: company - ... - - data_entity: product-abstract - source: data/import/icecat_biz_data/product_abstract.csv - ... - ``` - - where: - -* `data_entity` represents the name of your data importer. -* `source` describes the path to your .csv file with data to import. If the source is not specified, then .csv file defined in the module’s `Config` will be used. - -Then you can run the `./vendor/bin/console data:import --config=path/to/config.yml` command to import all the data from the config.yml file. See[ Importing Data](/docs/scos/dev/data-import/{{page.version}}/importing-data-with-a-configuration-file.html) for more details about this and other import commands you can use. - -On the project level, you can set a default configuration file path in `DataImportConfig::getDefaultYamlConfigPath()` so this file will be used when `--config` option is not specified, for example, when you run the `./vendor/bin/console data:import` command. - -Be advised that some of the importers are related to the data that is imported by another one. For example, *Product Concrete Importer* will not work if there are no abstract products in a database because a particular product cannot exist without an abstract. The same goes for all data with relations. Therefore, make sure to check the database relations or dependencies in [Execution Order of Data Importers in Demo Shop](/docs/scos/dev/data-import/{{page.version}}/importing-demo-shop-data/execution-order-of-data-importers-in-demo-shop.html) before running the importers. - -## Implementation overview -Currently, we have two approaches to data importers. Most of the importers are project-based, but there are a few module-based importers. The main difference is the way the importer should be enabled. - -**Modular Data Importers (coming from vendor):** - -* Product Alternative Importer **(Beta)** -* Product Discontinued Importer **(Beta)** -* Product Packaging Unit Importer **(Beta)** -* Company Importer **(Beta)** -* Company Business Unit Importer **(Beta)** -* Company Unit Address Importer **(Beta)** -* Company Unit Address Label Importer **(Beta)** -* Company User on Behalf Importer **(Beta)** -* Multi-Cart Importer **(Beta)** -* Shared Cart Importer **(Beta)** -* Shopping List Importer **(Beta)** -* Shopping List Company Business Unit Importer **(Beta)** -* Shopping List Company User Importer **(Beta)** -* Shopping List Item Importer **(Beta)** -* CMS Slot Templates Importer -* CMS Slots Importer -* CMS Slot-Block Relationship Importer -* Stock Importer **(Beta)** -* Payment Method Importer **(Beta)** -* Shipment Importer **(Beta)** -* Shipment Price Importer **(Beta)** -* Shipment Store Importer **(Beta)** - -To use a module-based importer, add it to the plugin stack. See the example below. - -```php -getCsvDataImporterFromConfig($this->getConfig()->getOrderSourceDataImporterConfiguration()); - - $dataSetStepBroker = $this->createTransactionAwareDataSetStepBroker(); - //Add step - $dataSetStepBroker->addStep(new OrderSourceWriterStep()); - - $dataImporter->addDataSetStepBroker($dataSetStepBroker); - - return $dataImporter; - } -} -``` - -2. Call this method using the `DataImportBusinessFactory::getDataImporterByType()` method: - -```php -getDataEntity()) { - ... - case DataImportConfig::IMPORT_TYPE_ORDER_SOURCE: - return $this->createOrderSourceImporter($dataImportConfigurationActionTransfer); - } -} -``` -That’s it. Your data importer is now appended to the DataImport module. - -Also, there are **bulk importers** that can be used if you have a huge amount of data to import, and existing importers may be slow. - -Bulk importers were implemented only on the project level and they are currently compatible only with a PostgreSQL database. - -The bulk importers are as follows: - -* Product Abstract Importer -* Product Abstract Store Importer -* Product Concrete Importer -* Product Price Importer -* Product Image Importer -* Product Stock Importer - -You can enable a bulk importer in `Pyz\Zed\DataImport\Business\DataImportBusinessFactory`: - -```php -For example, [data/import/common](https://github.com/spryker-shop/suite/tree/master/data/import/common) contains default .yml] files for import. The .yml files in their turn contain a list of .csv import files. For example, there are the .yml files like:
                • [catalog_setup_import_config_US.yml](https://github.com/spryker-shop/suite/blob/master/data/import/common/catalog_setup_import_config_US.yml) containing files
                  • category_template.csv
                  • category.csv
                  • product_attribute_key.csv
                • [content_management_import_config_US.yml](https://github.com/spryker-shop/suite/blob/master/data/import/common/content_management_import_config_US.yml) containing files
                  • cms_template.csv
                  • cms_block.csv
                  • cms_block_store.csv
                The default .yml files define the order in which all the .csv files are imported as well as specify their location.
                For information on location of the default .yml and .csv files on the project level, see [Location of the .yml and .csv files](/docs/scos/dev/data-import/{{page.version}}/importing-data-with-a-configuration-file.html#location-of-the-yml-and-csv-files).
                | **All** .csv files are imported in the order they are represented in the default .yml files, from top to bottom. | -| `console data:import:{data_entity}` where `{data_entity}` is a specific `data_entity` in the default .yml file. | The command triggers import of data from all.csv files that refer to the specified `data_entity` of a default .yml file. | Imports **all .csv files** in the default .yml file defined as source for the specific `data_entity`. For example, you can have a .yml file like this:![image](https://spryker.s3.eu-central-1.amazonaws.com/docs/Developer+Guide/Back-End/Data+Manipulation/Data+Ingestion/Data+Import/Importing+Data/yml+sample.png) After running console `data:import:tax`, data from `tax1.csv` and `tax2.csv` will be imported. | -| `console data:import: --config=xxx/ccc/file-name.yml`, where `data_entity` is a specific `data_entity` in the custom .yml file and `xxx/ccc/file-name.yml` is the location of the custom .yml file. | The command triggers import of data from all.csv files that refer to the specified `data_entity` of a custom .yml file. | Imports **all .csv files** in the custom .yml file defined in `source` for the specific `data_entity`. | -| `console data:import --config=xxx/ccc/file-name.yml`, where `xxx/ccc/file-name.yml` is the location of the custom .yml file. | The command tells the system to run the specific custom .yml file instead of the default ones. | The .yml file specified in this command is used as the import configuration file. The default .yml files are ignored.
                **All** .csv files contained in the custom .yml file are imported. The import is done in the order as in the .yml file, from top to bottom. | - -## Location of the .yml and .csv Files - - -When running the `console data:import` command, you tell the system to import .csv files from all the default .yml import configuration files. The table below shows where those files reside in the Spryker Commerce OS by default, and where you can define their location on the project level. - -| | Location of the default YAML import configuration files | Location of .csv files listed in the default YAML configuration files | -| --- | --- | --- | -| Spryker Commerce OS | …data/import/common/
                Example: [Master Suite repository](https://github.com/spryker-shop/suite/tree/master/data/import/common) | …data/import/common/common/
                Example: [Master Suite repository](https://github.com/spryker-shop/suite/tree/master/data/import/common/common) | -| Project Level | In `src/Pyz/Zed/DataImport/DataImportConfig.php`, method `getDefaultYamlConfigPath()` defines the default location of the default YAML files | For the custom project-level importers, there are no default .csv files, so the path to the .csv files is defined only in the YAML import files. This means, if the source is not specified, the file will not be imported. | diff --git a/docs/scos/dev/data-import/202005.0/importing-data-with-the-queue-data-importer.md b/docs/scos/dev/data-import/202005.0/importing-data-with-the-queue-data-importer.md deleted file mode 100644 index 5c8e89e5fbc..00000000000 --- a/docs/scos/dev/data-import/202005.0/importing-data-with-the-queue-data-importer.md +++ /dev/null @@ -1,402 +0,0 @@ ---- -title: Importing Data with the Queue Data Importer -description: This article describes the process of importing data with the Queue Data Importer in the Spryker OS. -last_updated: Apr 3, 2020 -template: data-import-template -originalLink: https://documentation.spryker.com/v5/docs/importing-data-with-queue-data-importer -originalArticleId: 5cfb24cd-de7f-44fc-b585-2c6b75e4a26c -redirect_from: - - /v5/docs/importing-data-with-queue-data-importer - - /v5/docs/en/importing-data-with-queue-data-importer -related: - - title: Queue Data Import feature integration - link: docs/scos/dev/feature-integration-guides/page.version/queue-data-import-feature-integration.html ---- - -Queue data import adds the ability to import data with the help of message queues. It is meant to increase data import performance by using performance-related abilities/properties of message queues, like: - -* Parallel message consumption by multiple consumers using round-robin -* Fast transmitting of large amounts of data -* Bulk message processing - -Besides, Queue Data Import also provides the ability to use different import groups. - -## Why You Need It -The main goal of using Queue Data Import is the ability to import data in parallel. Once the data is stored in a queue, it can be consumed by several consumers at a time, thus roughly dividing total import execution time by the number of consumers. - -## How Does It Work? -Regular data import is done as a single-step process: the data is read from some data source and then stored in persistent storage (usually a database). - -Queue data import is intended to be done in two separate steps. - -1. **Step 1** is about importing the data from the original data source into the queue. -a. Each resource (e.g., abstract product data) is meant to be imported to its dedicated queue. -b. In general, during this step, data should not be preprocessed in any way and should go to a queue as is. -2. During **Step 2**, data previously stored in a queue is consumed from the queue and imported into persistent storage. - -## How to Export Data from CSV to Queue (Step 1) -The **DataImport** module was extended with the new classes that are responsible for providing the preconfigured queue writer instances to the data import facilities. It is completely configured on the project level. - -To be able to import data into a message queue, an instance of `Spryker\Zed\DataImport\Business\DataWriter\QueueWriter\QueueWriter` should be used as a data writer during import. Two pieces of configuration have to be provided to a queue writer's `::write()` method: - -1. Queue name - a name of the resource-based queue which will store the imported data between the steps (for example, `import.product_abstract`) -2. Chunk size - the size of the chunks in which the data will be written to a queue - -First, a dedicated configuration method has to be defined in `Pyz\Zed\DataImport\DataImportConfig`: - -Pyz\Zed\DataImport\DataImportConfig - -```php -setQueueName(static::PRODUCT_ABSTRACT_QUEUE) - ->setChunkSize($this->getQueueWriterChunkSize()); - } - ..... -} -``` - -Here, you need to specify the names for the queues: - -1. the main queue, which will hold the data -1. the error queue (the name of the main queue suffixed with .error) - -You need to specify the name for the method, which will create an instance of `DataImportQueueWriterConfigurationTransfer` and initialize it with the main queue name and the size of a chunk the data will be written in. - -Next, a plugin class, which will configure and hook up queue writer with data importer, needs to be created. This plugin must extend `Spryker\Zed\DataImport\Communication\Plugin\AbstractQueueWriterPlugin` and has to provide implementations for its two abstract methods: - -Pyz\Zed\DataImport\Communication\Plugin\ProductAbstract\ProductAbstractQueueWriterPlugin - -```php -getConfig()->getProductAbstractQueueWriterConfiguration()->getQueueName(); - } - - protected function getChunkSize(): int - { - return $this->getConfig()->getProductAbstractQueueWriterConfiguration()->getChunkSize(); - } -} -``` - -The plugin should call the newly created method from the config class, thus providing the configuration values to the queue writer instance. - -{% info_block warningBox "Note" %} - -Additional plugins must be created for other resources, should they need to be imported with the help of message queues. - -{% endinfo_block %} - -After that, the names of the new queues need to be added to the `RabbitMq` module configuration class. Go to `Pyz\Client\RabbitMq\RabbitMqConfig` and register the new queues for the resource. - -Pyz\Client\RabbitMq\RabbitMqConfig - -```php -append($this->createQueueOption(DataImportConfig::PRODUCT_ABSTRACT_QUEUE, DataImportConfig::PRODUCT_ABSTRACT_QUEUE_ERROR)); - ...... - - return $queueOptionCollection; -} -``` - -The last step is to enable Queue data import. Go to `Pyz\Zed\DataImport\Business\DataImportBusinessFactory`. - -First of all, remove all the old code related to importing the selected resource data. - -Then, add a method for creating `DataSetWriterCollection` based on that plugin and another one for creating data importer, which will work on top of this collection. Add a call to this method to `DataImportBusinessFactory::getImporter()`. - -Pyz\Zed\DataImport\Business\DataImportBusinessFactory - -```php -createDataImporterCollection(); - ..... - $dataImporterCollection->addDataImporter($this->getProductAbstractQueueWriter()); - ..... - return $dataImporterCollection; - } - - public function getProductAbstractQueueWriter() - { - $dataImporter = $this->getCsvDataImporterWriterAwareFromConfig($this->getConfig()->getProductAbstractDataImporterConfiguration()); - $dataImporter->setImportGroup(DataImportConfig::IMPORT_GROUP_QUEUE_WRITERS); - $dataImporter->setDataSetWriter($this->createProductAbstractQueueDataImportWriters()); - - return $dataImporter; - } - - protected function createProductAbstractQueueDataImportWriters(): DataSetWriterInterface - { - return new DataSetWriterCollection($this->createProductAbstractQueueWriterPlugins()); - } - - protected function createProductAbstractQueueWriterPlugins(): array - { - return [ - new ProductAbstractQueueWriterPlugin(), - ]; - } - ..... -} -``` - -Pay attention to the `::setImportGroup()` method call on the data importer instance. By calling this method, an import group can be set for each separate data import. Import groups allow you to run importers separately on a per-group basis by supplying the group name as an option for the data import console command. Three groups are supported out of the box: **FULL, QUEUE_READERS, QUEUE_WRITERS**. With no call to `::setImportGroup`, data importer is placed into the **FULL** group by default. -{% info_block warningBox "Note" %} - -It is not recommended to use the **QUEUE_READERS** group. This executes all the configured queue importers during one import run. Because in a lot of scenarios the order, in which the data is imported, matters and because of the possibility of the race condition, this can lead to various malfunctions/inconsistencies in the imported data. We recommend structuring the import process in a way that would allow importing data with the help of the message queues apart from other imported resources. - -{% endinfo_block %} - -Now, whenever you run `vendor/bin/console data:import` with the `--group` option set to QUEUE_WRITERS, product abstract data will be stored in the dedicated queue. - -```bash -vendor/bin/console data:import --group=QUEUE_WRITERS -``` -{% info_block errorBox "Important!" %} - -Import groups should not be used together with import types. For example, this command is illegal and will lead to an exception: -```bash -vendor/bin/console data:import:product-abstract --group=QUEUE_WRITERS -``` - -{% endinfo_block %} - -{% info_block warningBox "Note" %} - -We also highly recommend preparing the properly structured data for the import in queues from the very beginning instead of actually importing it from CSV, XML, etc. as the first step. In this case, a queue can be treated as an original source of data for import which would make the overall process more convenient. - -{% endinfo_block %} - -## How to Export Data from Queue to Database (Step 2) -Add a new constant and a public method to `Pyz\Zed\DataImport\DataImportConfig`. The method should call `Spryker\Zed\DataImport::buildQueueDataImporterConfiguration()`, passing three arguments: - -* The name of the queue to consume messages from (should match the name of the queue used in **Step 1**) -* Import type -* Queue consumer options - -Pyz\Zed\DataImport\DataImportConfig - -```php -buildQueueDataImporterConfiguration( - 'import.product_abstract', - static::IMPORT_TYPE_PRODUCT_ABSTRACT_QUEUE, - $this->getQueueConsumerOptions() - ); - } - - protected function getQueueConsumerOptions(): array - { - return [ - 'rabbitmq' => (new RabbitMqConsumerOptionTransfer())->setConsumerExclusive(false)->setNoWait(false), - ]; - } - ..... -} -``` - -Notice that a new import type has been introduced. It needs to be registered in `Pyz\Zed\Console\ConsoleDependencyProvider::getConsoleCommands()`. - -Pyz\Zed\Console\ConsoleDependencyProvider - -```php -addDataImporter($this->getProductAbstractQueueWriter()); - ..... - $dataImporterCollection->addDataImporter($this->createProductAbstractQueueImporter()); - ..... - } - - protected function createProductAbstractQueueImporter(): QueueDataImporterInterface - { - $dataImporter = $this->createQueueDataImporter($this->getConfig()->getProductAbstractQueueImporterConfiguration()); - - $dataSetStepBroker = $this->createTransactionAwareDataSetStepBroker(ProductAbstractHydratorStep::BULK_SIZE); - $dataSetStepBroker - ->addStep($this->createAddLocalesStep()) - ->addStep($this->createAddCategoryKeysStep()) - ->addStep($this->createTaxSetNameToIdTaxSetStep(ProductAbstractHydratorStep::KEY_TAX_SET_NAME)) - ->addStep($this->createAttributesExtractorStep()) - ->addStep($this->createProductLocalizedAttributesExtractorStep([ - ProductAbstractHydratorStep::KEY_NAME, - ProductAbstractHydratorStep::KEY_URL, - ProductAbstractHydratorStep::KEY_DESCRIPTION, - ProductAbstractHydratorStep::KEY_META_TITLE, - ProductAbstractHydratorStep::KEY_META_DESCRIPTION, - ProductAbstractHydratorStep::KEY_META_KEYWORDS, - ])) - ->addStep(new ProductAbstractHydratorStep()); - $dataImporter->addDataSetStepBroker($dataSetStepBroker); - $dataImporter->setDataSetWriter($this->createProductAbstractDataImportWriters()); - - return $dataImporter; - } - ..... -} -``` - -Pay attention to `Spryker\Zed\DataImport\Business\DataImportBusinessFactory::createQueueDataImporter()`. Instead of creating the regular data importer instance, this method will create an instance of the `Spryker\Zed\DataImport\Business\DataImporter\Queue\QueueDataImporter` class, which is responsible for handling the queue-related tasks such as message acknowledgment after successful data import. During data import, an instance of this class is preconfigured to run as part of the **QUEUE_READERS** group. - -Finally, make changes to all bulk data set writers, which store data internally and then flush it to the database in bulk once a configured threshold is reached. First, you should use `Spryker\Zed\DataImport\Business\DataImporter\Queue\DataSetWriterPersistenceStateAwareTrait` inside these writers. Then you should: - -1. switch the persistence state to false at the very beginning of the ::write() method by calling `Spryker\Zed\DataImport\Business\DataImporter\Queue\DataSetWriterPersistenceStateAwareTrait::setDataSetWriterPersistenceState(false)` -2. switch the persistence state to true once the buffered data has been saved to the database by calling `Spryker\Zed\DataImport\Business\DataImporter\Queue\DataSetWriterPersistenceStateAwareTrait::setDataSetWriterPersistenceState(true)` - -This is needed for proper acknowledgment of the corresponding messages in the import queue. - -Pyz\Zed\DataImport\Business\Model\ProductAbstract\Writer\ProductAbstractBulkPdoDataSetWriter - -```php -setDataSetWriterPersistenceState(false); - - // storing data sets in the internal buffer - } - - ..... - - /** - * Called once the data in the internal buffer is ready to be saved. - */ - protected function flush(): void - { - // writing data from the buffer to database - - $this->setDataSetWriterPersistenceState(true); - } -} -``` - -To perform data importing from the queue into the persistent storage, run `vendor/bin/console data:import` with the `--group` option set to `QUEUE_READERS`. -```bash -vendor/bin/console data:import --group=QUEUE_READERS -``` - -{% info_block infoBox "Info" %} - -It is possible to perform both steps (as well as all the other enabled imports) by executing the console command only once. Simply don't use the --group option, or set it to FULL. In this case, the data will be imported into a queue and then immediately consumed from the queue and saved to the persistent storage. All the other importers will be executed as usual. Just make sure that the Step 1 importer is configured to run before the Step 2 importer. - -{% endinfo_block %} diff --git a/docs/scos/dev/feature-integration-guides/202005.0/agent-assist-feature-integration.md b/docs/scos/dev/feature-integration-guides/202005.0/agent-assist-feature-integration.md deleted file mode 100644 index f49294803a4..00000000000 --- a/docs/scos/dev/feature-integration-guides/202005.0/agent-assist-feature-integration.md +++ /dev/null @@ -1,294 +0,0 @@ ---- -title: Agent Assist feature integration -description: Agent Assist enables agent users to log in to shop to perform actions on customers’ behalf. This guide describes how to install Agent Assist in your project. -last_updated: Aug 12, 2020 -template: feature-integration-guide-template -originalLink: https://documentation.spryker.com/v5/docs/agent-assist-feature-integration -originalArticleId: 0b675e6b-0c78-4111-a22d-b51a8e672c53 -redirect_from: - - /v5/docs/agent-assist-feature-integration - - /v5/docs/en/agent-assist-feature-integration ---- - -## Install Feature Core - -### Prerequisites - -Install the required features: - -| Name | Version | -| --- | --- | -| Spryker Core | master | -| Spryker Core Back Office | master | -| Customer Account Management | master | - -### 1) Install the required modules using Composer - -Run the following command(s) to install the required modules: - -```bash -composer require spryker-feature/agent-assist:"^master" --update-with-dependencies -``` - -{% info_block warningBox "Verification" %} -Make sure that the following modules were installed:
                ModuleExpected Directory
                `Agent``vendor/spryker/agent`
                `AgentGui``vendor/spryker/agent-gui`
                -{% endinfo_block %} - -### 2) Set up the Database Schema - -Run the following commands to 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 the following changes by checking your database:
                Database EntityTypeEvent
                `spy_user.is_agent`columncreated
                -{% endinfo_block %} - -### 3) Set up Behavior - -#### Configure User Zed UI for Agent Handling - -Enable the following behaviors by registering the plugins: - -| Plugin | Description | Prerequisites | Namespace | -| --- | --- | --- | --- | -| `UserAgentFormExpanderPlugin` | Adds "is an agent" checkbox to the Zed User form. | None | `Spryker\Zed\AgentGui\Communication\Plugin` | -| `UserAgentTableConfigExpanderPlugin` | Adds "is an agent" column to the Zed Users table. | None | `Spryker\Zed\AgentGui\Communication\Plugin` | -| `UserAgentTableDataExpanderPlugin` | Fills "is an agent" column in the Zed Users table. | None | `Spryker\Zed\AgentGui\Communication\Plugin` | - -**src/Pyz/Zed/User/UserDependencyProvider.php** - - ```php - PluginDescriptionPrerequisitesNamespace`UserAgentFormExpanderPlugin`Adds "is an agent" checkbox to the Zed User form.None`Spryker\Zed\AgentGui\Communication\Plugin``UserAgentTableConfigExpanderPlugin`Adds "is an agent" column to the Zed Users table.None`Spryker\Zed\AgentGui\Communication\Plugin``UserAgentTableDataExpanderPlugin`Fills "is an agent" column in the Zed Users table.None`Spryker\Zed\AgentGui\Communication\Plugin` -{% endinfo_block %} - -## Install feature frontend - -### Prerequisites - -Install the required features: - -| Name | Version | -| --- | --- | -| Spryker Core E-commerce | master | - -### 1) Install the required modules using Composer - -Run the following command(s) to install the required modules: - -```bash -composer require spryker-feature/agent-assist:"^master" --update-with-dependencies -``` - -{% info_block warningBox "Verification" %} -Verify if the following modules were installed:
                ModuleExpected Directory
                `AgentPage``vendor/spryker-shop/agent-page`
                `AgentWidget``vendor/spryker-shop/agent-widget`
                -{% endinfo_block %} - -### 2) Add Translations - -Append glossary according to your configuration: - -src/data/import/glossary.csv - - ```yaml - agent.authentication.failed,Authentication failed,en_US -agent.authentication.failed,Authentifizierung fehlgeschlagen,de_DE -agent.login.title,Access your account,en_US -agent.login.title,Ich bin bereits Kunde,de_DE -agent.confirm_user_selection,Confirm,en_US -agent.confirm_user_selection,Bestätigen,de_DE -agent.login.email,Email,en_US -agent.login.email,E-Mail,de_DE -agent.login.password,Password,en_US -agent.login.password,Passwort,de_DE -agent.control_bar.username,Agent: %username%,en_US -agent.control_bar.username,Agent: %username%,de_DE -agent.control_bar.customer_name,Customer: %username%,en_US -agent.control_bar.customer_name,Kunde: %username%,de_DE -agent.control_bar.logout_as_customer,End Customer Assistance,en_US -agent.control_bar.logout_as_customer,Kunden-Assistenz beenden,de_DE -agent.control_bar.logout,Logout,en_US -agent.control_bar.logout,Abmelden,de_DE -agent.autocomplete.no_results,No results found,en_US -agent.autocomplete.no_results,Keine Ergebnisse gefunden,de_DE -autocomplete.placeholder,Search,en_US -autocomplete.placeholder,Suche,de_DE -``` - -Run the following command(s) to add the glossary keys: - -```bash -console data:import:glossary -``` -{% info_block warningBox "Verification" %} -Make sure that in the database the configured data are added to the `spy_glossary` table. -{% endinfo_block %} - -### 3) Enable Controllers - -#### Service Provider List - -Register service provider(s) in the Yves application: - -| Provider | Namespace | Specification | -| --- | --- | --- | -| `AgentPageSecurityServiceProvider` | `SprykerShop\Yves\AgentPage\Plugin\Provider` | Registers security firewalls, access rules, impersonate rules and login/logout handlers for Agent users. | - -**src/Pyz/Yves/ShopApplication/YvesBootstrap.php** - - ```php - application->register(new AgentPageSecurityServiceProvider()); # AgentFeature - } -} -``` -#### Route List - -Register the following route provider plugins: - -| Provider | Namespace | -| --- | --- | -| `AgentPageRouteProviderPlugin` | `SprykerShop\Yves\AgentPage\Plugin\Router` | -| `AgentWidgetRouteProviderPlugin` | `SprykerShop\Yves\AgentWidget\Plugin\Router` | - -**src/Pyz/Yves/Router/RouterDependencyProvider.php** - -```php -- Try to open the link: `http://mysprykershop.com/agent/secured`
                - You should be redirected to `http://mysprykershop.com/agent/login` -{% endinfo_block %} - -{% info_block warningBox "Verification" %} -Verify the `AgentPageControllerProvider` opening the agent login page by the link: `http://mysprykershop.com/agent/login](http://mysprykershop.com/agent/login` -{% endinfo_block %} - -{% info_block warningBox "Verification" %} -Verify the `AgentWidgetControllerProvider` searching customers from Agent control bar after Agent login. -{% endinfo_block %} - -### 4) Set up Widgets - -Register the following global widget(s): - -| Widget | Specification | Namespace | -| --- | --- | --- | -| `AgentControlBarWidget` | Allows agents to select customers and impersonate. | `SprykerShop\Yves\AgentWidget\Widget` | - -**src/Pyz/Yves/ShopApplication/ShopApplicationDependencyProvider.php** - - ```php - ModuleTest`AgentControlBarWidget`Login as an Agent. The control bar widget should appear above the site header. -{% endinfo_block %} diff --git a/docs/scos/dev/feature-integration-guides/202005.0/alternative-products-discontinued-products-feature-integration.md b/docs/scos/dev/feature-integration-guides/202005.0/alternative-products-discontinued-products-feature-integration.md deleted file mode 100644 index 22e1152785b..00000000000 --- a/docs/scos/dev/feature-integration-guides/202005.0/alternative-products-discontinued-products-feature-integration.md +++ /dev/null @@ -1,80 +0,0 @@ ---- -title: Alternative Products + Discontinued Products feature integration -description: This guide describes all the steps needed to be performed in order to integrate the Alternative Products + Discontinued Products features into your project. -last_updated: Apr 24, 2020 -template: feature-integration-guide-template -originalLink: https://documentation.spryker.com/v5/docs/alternative-products-discontinued-products-feature-integration -originalArticleId: 0218d00c-f8a9-4bb4-abb3-510e46ac5628 -redirect_from: - - /v5/docs/alternative-products-discontinued-products-feature-integration - - /v5/docs/en/alternative-products-discontinued-products-feature-integration ---- - -## Install Feature Core -### Prerequisites -Please review and install the necessary features before beginning the integration. - -| Name | Version | -| --- | --- | -| Alternative Products | master | -| Discontinued Products | master | - -### 1) Set up Behavior -Register the following plugins: - -| Plugin | Specification | Prerequisites | Namespace | -| --- | --- | --- | --- | -| `DiscontinuedCheckAlternativeProductApplicablePlugin` | Checks if product alternatives should be shown for the product. | Expects `SKU `and `idProductConcrete` to be set for `ProductViewTransfer`. | `Spryker\Client\ProductDiscontinuedStorage\Plugin\ProductAlternativeStorage` | -| `DiscontinuedCheckAlternativeProductApplicablePlugin` | Checks if product alternatives should be shown for the product. | None | `Spryker\Zed\ProductDiscontinued\Communication\Plugin\ProductAlternative` | - -**src/Pyz/Client/ProductAlternativeStorage/ProductAlternativeStorageDependencyProvider.php** - -```php - - - - - - - -
                -
                - ``` - -Set up synchronization queue pools so that non-multi-store entities (not store specific entities) get synchronized among stores: - -**src/Pyz/Zed/ProductAlternativeStorage/Persistence/Propel/Schema/spy_product_alternative_storage.schema.xml** - -```html - - - - - - - -
                - - - - - -
                - -
                -``` - -Run the following commands to apply the database changes and generate entity and transfer changes: - -```bash -console transfer:generate -console propel:install -console transfer:generate -``` - -{% info_block warningBox "Verification" %} - -Make sure that the following changes have been applied by checking your database: - -|Database Entity|Type|Event| -|--- |--- |--- | -|`spy_product_alternative`|table|created| -|`spy_product_alternative_storage`|table|created| -|`spy_product_replacement_for_storage`|table|created| - -{% endinfo_block %} - -{% info_block warningBox "Verification" %} - -Make sure that the following changes have been applied in transfer objects: - -|Transfer|Type|Event|Path| -|--- |--- |--- |--- | -|`SpyProductAlternativeEntityTransfer`|class|created|`src/Generated/Shared/Transfer/SpyProductAlternativeEntityTransfer`| -|`SpyProductAlternativeStorageEntityTransfer`|class|created|`src/Generated/Shared/Transfer/SpyProductAlternativeStorageEntityTransfer`| -|`SpyProductReplacementForStorageEntityTransfer`|class|created|`src/Generated/Shared/Transfer/SpyProductReplacementForStorageEntityTransfer`| -|`ProductAlternative`|class|created|`src/Generated/Shared/Transfer/ProductAlternative`| -|`ProductAlternativeResponse`|class|created|`src/Generated/Shared/Transfer/ProductAlternativeResponse`| -|`ResponseMessage`|class|created|`src/Generated/Shared/Transfer/ResponseMessage`| -|`ProductAlternativeCollection`|class|created|`src/Generated/Shared/Transfer/ProductAlternativeCollection`| -|`ProductAlternativeCreateRequest`|class|created|`src/Generated/Shared/Transfer/ProductAlternativeCreateRequest`| -|`ProductAlternativeListItem`|class|created|`src/Generated/Shared/Transfer/ProductAlternativeListItem`| -|`ProductAlternativeList`|class|created|`src/Generated/Shared/Transfer/ProductAlternativeList`| -|`ProductAlternativeStorage`|class|created|`src/Generated/Shared/Transfer/ProductAlternativeStorage`| -|`ProductReplacementStorage`|class|created|`src/Generated/Shared/Transfer/ProductReplacementStorage`| - -{% endinfo_block %} - -{% info_block warningBox "Verification" %} -Make sure that the changes have been implemented successfully. For this purpose, trigger the following methods and make sure that the above events have been triggered: - -|Path|Method Name| -|--- |--- | -|`src/Orm/Zed/ProductAlternative/Persistence/Base/SpyProductAlternative.php`|`prepareSaveEventName()``addSaveEventToMemory()``addDeleteEventToMemory()`| - -{% endinfo_block %} - -### 3) Configure Export to Redis - -{% info_block infoBox "Info" %} - -This step will publish tables on change (create, edit, delete to the `spy_product_alternative_storage`, `spy_product_replacement_for_storage` and synchronize the data to Storage. - -{% endinfo_block %} - -#### Set up Event Listeners - -| Plugin | Specification | Prerequisites | Namespace | -|---|---|---|---| -| `ProductAlternativeStorageEventSubscriber` | Registers listeners that are responsible to publish alternative products storage entity changes when a related entity change event occurs. | None | `Spryker\Zed\ProductAlternativeStorage\Communication\Plugin\Event\Subscriber` | - -**src/Pyz/Zed/Event/EventDependencyProvider.php** - -```php -add(new ProductAlternativeStorageEventSubscriber()); - - return $eventSubscriberCollection; - } -} -``` - -#### Set up Re-Generate and Re-Sync Features - -| Plugin | Specification | Prerequisites | Namespace | -|---|---|---|---| -| `ProductAlternativeSynchronizationDataPlugin` | Allows synchronizing the whole storage table content into Storage. | None | `Spryker\Zed\ProductAlternativeStorage\Communication\Plugin\Synchronization` | -| `ProductReplacementForSynchronizationDataPlugin` | Allows synchronizing the whole storage table content into Storage. | None | `Spryker\Zed\ProductAlternativeStorage\Communication\Plugin\Synchronization` | - -**src/Pyz/Zed/ProductAlternativeStorage/ProductAlternativeStorageConfig.php** - -```php -ModuleExpected Directory`ProductAlternativeProductLabelConnector``vendor/spryker/product-alternative-product-label-connector` -{% endinfo_block %} - -### 2) Import Data -#### Add Infrastructural Data -|Plugin|Specification|Prerequisites|Namespace| -|---|---|---|---| -|`ProductAlternativeProductLabelConnectorInstallerPlugin`|Installs the configured infrastructural alternative product labels.|None|`Spryker\Zed\ProductAlternativeProductLabelConnector\Communication\Plugin\Installer`| - -Add the following to your project: - -**src/Pyz/Zed/Installer/InstallerDependencyProvider.php** - - ```php -The plugin is called when the `ProductLabelRelationUpdaterConsole` command is executed.|None|`Spryker\Zed\ProductAlternativeProductLabelConnector\Communication\Plugin`| - -**src/Pyz/Zed/ProductAlternative/ProductAlternativeDependencyProvider.php** - -```php -When you add product alternatives, it adds the corresponding label to the product.
                When you remove product alternatives, it removes the corresponding label from the product. -{% endinfo_block %} diff --git a/docs/scos/dev/feature-integration-guides/202005.0/alternative-products-wishlist-feature-integration.md b/docs/scos/dev/feature-integration-guides/202005.0/alternative-products-wishlist-feature-integration.md deleted file mode 100644 index 6d556acbaf1..00000000000 --- a/docs/scos/dev/feature-integration-guides/202005.0/alternative-products-wishlist-feature-integration.md +++ /dev/null @@ -1,77 +0,0 @@ ---- -title: Alternative Products + Wishlist feature integration -description: The guide walks you through the process of installing the Alternative products and Wishlist features into the project. -last_updated: Apr 24, 2020 -template: feature-integration-guide-template -originalLink: https://documentation.spryker.com/v5/docs/alternative-products-wishlist-feature-integration -originalArticleId: ed4a5eb0-212f-4064-90f3-a734d7d885f1 -redirect_from: - - /v5/docs/alternative-products-wishlist-feature-integration - - /v5/docs/en/alternative-products-wishlist-feature-integration ---- - -## Install feature frontend -### Prerequisites -To start feature integration, review and install the necessary features: -|Name|Version| -|---|---| -|Alternative Products|{{page.version}}| -|Wishlist|{{page.version}}| - -### 1) Add Translations -Append glossary according to your configuration: - -**src/data/import/glossary.csv** - -```yaml -product_alternative_widget.add_to_wishlist,Add to Wishlist,en_US -product_alternative_widget.add_to_wishlist,Zur Wunschliste hinzufügen,de_DE -``` - -Run the following console command to import data: - -```yaml -console data:import glossary -``` -{% info_block warningBox "Verification" %} -Make sure that in the database the configured data are added to the `spy_glossary` table. -{% endinfo_block %} - -### 2) Set up Widgets -Register the following plugins to enable widgets: -|Plugin|Description|Prerequisites|Namespace| -|---|---|---|---| -|`WishlistProductAlternativeWidget`|Displays a list of alternative products on wishlist page.|None|`SprykerShop\Yves\ProductAlternativeWidget\Widget`| - -**src/Pyz/Yves/ShopApplication/ShopApplicationDependencyProvider.php** - -```php -ModuleTest`WishlistProductAlternativeWidget`Assign some alternative products in Zed, and make sure that they are displayed on the wishlist page of the product to which they were assigned. -{% endinfo_block %} diff --git a/docs/scos/dev/feature-integration-guides/202005.0/approval-process-feature-integration.md b/docs/scos/dev/feature-integration-guides/202005.0/approval-process-feature-integration.md deleted file mode 100644 index 04fa61a90a0..00000000000 --- a/docs/scos/dev/feature-integration-guides/202005.0/approval-process-feature-integration.md +++ /dev/null @@ -1,626 +0,0 @@ ---- -title: Approval Process feature integration -description: This guide describes all steps needed to be performed in order to integrate the Approval Process feature into your project. -last_updated: Apr 24, 2020 -template: feature-integration-guide-template -originalLink: https://documentation.spryker.com/v5/docs/approval-process-feature-integration -originalArticleId: fb80b923-f754-4d42-82a9-9603ca5a7590 -redirect_from: - - /v5/docs/approval-process-feature-integration - - /v5/docs/en/approval-process-feature-integration -related: - - title: Quotation Process + Approval Process feature integration - link: docs/scos/dev/feature-integration-guides/page.version/quotation-process-approval-process-feature-integration.html - - title: Shipment + Approval Process feature integration - link: docs/scos/dev/feature-integration-guides/page.version/shipment-approval-process-feature-integration.html ---- - -## Install Feature Core -### Prerequisites -To start feature integration, review and install the necessary features: - -| Name | Version | -| --- | --- | -| Company Account | {{page.version}}| -| Shared Carts | {{page.version}} | -| Checkout | {{page.version}} | -| Spryker Core | {{page.version}} | - -### 1) Install the required modules using Composer - -Run the following command to install the required modules: - -```bash -composer require spryker-feature/approval-process:"^{{page.version}}" --update-with-dependencies -``` -{% info_block warningBox "Verification" %} - -Make sure that the following modules were installed: - -| Module | Expected Directory | -| --- | --- | -| `QuoteApproval` | `vendor/spryker/quote-approval` | - -{% endinfo_block %} - - -### 2) Set up Configuration -Add the following configuration to your project: - -**src/Pyz/Shared/QuoteApproval/QuoteApprovalConfig.php** - -```php -Open the `https://mysprykershop.com/multi-cart/`, table should contain the quote approval status column. | -| QuoteApproveRequestWidget | Open the `https://mysprykershop.com/checkout/summary/` - should contain widget request for approval with list approvers. | -| QuoteApprovalWidget | Open the `https://mysprykershop.com/cart/` - should contain widget approver functionality with buttons to approve or decline. | - -{% endinfo_block %} - -### 4) Enable Controllers - -Register the following plugin: - -| Widget | Description | Prerequisites | Namespace | -| --- | --- | --- | --- | -| `QuoteApprovalControllerProvider` | Provides routes used in the `QuoteApprovalWidget`.| None | `SprykerShop\Yves\QuoteApprovalWidget\Plugin\Provider` | - -**src/Pyz/Yves/ShopApplication/YvesBootstrap.php** - - ```php -ModuleExpected Directory`AvailabilityNotification``vendor/spryker/availability-notification` -{% endinfo_block %} - -### 2) Set Up Database Schema and Transfer Objects - -Run the following commands to apply database changes, generate entities and transfer changes: -```bash -console transfer:generate -console propel:install -console transfer:generate -``` - -{% info_block warningBox "Verification" %} -Make sure that the following changes have been implemented in your database:
                Database EntityTypeEvent
                `spy_availability_notification_subscription`TableCreated
                -{% endinfo_block %} - -{% info_block warningBox "Verification" %} -Make sure that propel entities have been generated successfully by checking their existence. Also, change the generated entity classes to extend from Spryker core classes.
                Class pathExtends
                `src/Orm/Zed/AvailabilityNotification/Persistence/SpyAvailabilityNotificationSubscription.php``Spryker\Zed\AvailabilityNotification\Persistence\Propel\AbstractSpyAvailabilityNotificationSubscription`
                `src/Orm/Zed/AvailabilityNotification/Persistence/SpyAvailabilityNotificationSubscriptionQuery.php``Spryker\Zed\AvailabilityNotification\Persistence\Propel\AbstractSpyAvailabilityNotificationSubscriptionQuery`
                -{% endinfo_block %} - -{% info_block warningBox "Verification" %} -Make sure that the following changes have been implemented in transfer objects:
                Transfer TypeEventPath
                `AvailabilityNotificationSubscriptionTransfer`classcreated`src/Generated/Shared/Transfer/AvailabilityNotificationSubscriptionTransfer.php`
                `AvailabilityNotificationSubscriptionResponseTransfer`classcreated`src/Generated/Shared/Transfer/AvailabilityNotificationSubscriptionResponseTransfer.php`
                `AvailabilityNotificationSubscriptionRequestTransfer`classcreated`src/Generated/Shared/Transfer/AvailabilityNotificationSubscriptionRequestTransfer.php`
                `AvailabilityNotificationSubscriptionMailDataTransfer`classcreated`src/Generated/Shared/Transfer/AvailabilityNotificationSubscriptionMailDataTransfer.php`
                `AvailabilityNotificationDataTransfer`classcreated`src/Generated/Shared/Transfer/AvailabilityNotificationDataTransfer.php`
                `CustomerTransfer.availabilityNotificationSubscriptionSkus`columncreated`src/Generated/Shared/Transfer/CustomerTransfer.php`
                `MailTransfer.availabilityNotificationSubscriptionMailData`columncreated`src/Generated/Shared/Transfer/MailTransfer.php`
                -{% endinfo_block %} - -### 3) Set Up Behavior - -#### Listening the `availability_notification` Event - -Add the following plugin in your project: - -| Plugin | Specification | Prerequisites | Namespace | -| --- | --- | --- | --- | -| `AvailabilityNotificationSubscriber` | This plugin is responsible for listening and processing product availability changes. | None | `Spryker\Zed\AvailabilityNotification\Business\Subscription` | - -**src/Pyz/Zed/Event/EventDependencyProvider.php** - -```php -add(new AvailabilityNotificationSubscriber()); - - return $eventSubscriberCollection; - } -} -``` - - {% info_block warningBox "Verification" %} -To verify that `AvailabilityNotificationSubscriber` is working:
                1. add a new product and make it unavailable;
                2. on Yves, as a customer, subscribe to its availability notifications;
                3. make the product available;
                4. check your mailbox for the email about the product's availability.
                -{% endinfo_block %} - -#### Email Handling - -Add the following plugins in your project: - -| Plugin | Specification | Prerequisites | Namespace | -| --- | --- | --- | --- | -| `AvailabilityNotificationSubscriptionMailTypePlugin` | Handles the email sent after subscribing to product availability notification. | None | `Spryker\Zed\AvailabilityNotification\Communication\Plugin\Mail` | -| `AvailabilityNotificationUnsubscribedMailTypePlugin` | Handles the email sent after unsubscribing from product availability notification. | None | `Spryker\Zed\AvailabilityNotification\Communication\Plugin\Mail` | -| `AvailabilityNotificationMailTypePlugin` | Handles the email sent after product's availability status change. | None | `Spryker\Zed\AvailabilityNotification\Communication\Plugin\Mail` | - -**src/Pyz/Zed/Mail/MailDependencyProvider.php** - -```php -extend(static::MAIL_TYPE_COLLECTION, function (MailTypeCollectionAddInterface $mailCollection) { - $mailCollection - ... - ->add(new AvailabilityNotificationUnsubscribedMailTypePlugin()) - ->add(new AvailabilityNotificationSubscriptionMailTypePlugin()) - ->add(new AvailabilityNotificationMailTypePlugin()) - ... - ; - - return $mailCollection; - }); - - ... - - return $container; - } -} -``` - -{% info_block warningBox "Verification" %} - To verify that `AvailabilityNotificationSubscriptionMailTypePlugin`, `AvailabilityNotificationUnsubscribedMailTypePlugin` and `AvailabilityNotificationMailTypePlugin` are working:
                1. add a new product;
                2. on YVES, as a customer, subscribe to its availability notifications;
                3. switch the availability status of the product several times;
                4. check your mailbox for the emails about the product's status being switched to available and unavailable.
                -{% endinfo_block %} - -#### Customer Behavior - -Add the following plugins in your project: - -| Plugin | Specification | Prerequisites | Namespace | -| --- | --- | --- | --- | -| `AvailabilityNotificationAnonymizerPlugin` | Anonymizes customer data during customer anonymization. | None | `Spryker\Zed\AvailabilityNotification\Communication\Plugin\CustomerAnonymizer` | -| `AvailabilityNotificationSubscriptionCustomerTransferExpanderPlugin` | Expands `CustomerTransfer` with availability notification subscriptions data. | None | `Spryker\Zed\AvailabilityNotification\Communication\Plugin\Customer` | - -**src/Pyz/Zed/Customer/CustomerDependencyProvider.php** - -```php -
              • add a new product;
              • on Yves, as a company user, subscribe to its availability notifications;
              • Check that the corresponding line is added to `spy_availability_notification_subscription` table;
              • delete this user;
              • check that the line is deleted from `spy_availability_notification_subscription` table.
              • -{% endinfo_block %} - -{% info_block warningBox "Verification" %} -To verify that `AvailabilityNotificationSubscriptionCustomerTransferExpanderPlugin` is working:
                1. add a new product;
                2. on Yves, as a company user, subscribe to its availability notifications;
                3. on Yves, go to account overview> *Newsletters* page;
                4. check that you are subscribed to the product's availability notifications.
                -{% endinfo_block %} - -## Install feature frontend - -### Prerequisites - -Ensure that the related features are installed: - -| Name | Version | -| --- | --- | -| Mailing & Notifications | {{page.version}} | -| Inventory Management | {{page.version}} | -| Product | {{page.version}} | -| Spryker Core | {{page.version}} | - -### 1) Install the required modules using Composer - -Run the following command to install the required modules: -```bash -composer require "spryker-feature/availability-notification":"^{{page.version}}" --update-with-dependencies -``` - -{% info_block warningBox "Verification" %} -Make sure that the following modules have been installed:
                ModuleExpected Directory
                `AvailabilityNotificationPage``vendor/spryker-shop/availability-notification-page`
                `AvailabilityNotificationPageWidget``vendor/spryker-shop/availability-notification-widget`
                -{% endinfo_block %} - -### 2) Add Translations - -Feature-specific glossary keys: - -
                - /data/import/glossary.csv - - ```yaml -availability_notification.notify_me,Notify me when back in stock,en_US -availability_notification.notify_me,"Benachrichtigen Sie mich, wenn der Artikel wieder verfügbar ist",de_DE -availability_notification.do_not_notify_me,Do not notify me when back in stock,en_US -availability_notification.do_not_notify_me,"Benachrichtigen Sie mich nicht, wenn der Artikel wieder verfügbar ist",de_DE -availability_notification.subscribed,Successfully subscribed,en_US -availability_notification.subscribed,Erfolgreich abonniert,de_DE -availability_notification.unsubscribed,Successfully unsubscribed,en_US -availability_notification.unsubscribed,Erfolgreich abgemeldet,de_DE -availability_notification.successfully_unsubscribed,"Successfully unsubscribed",en_US -availability_notification.successfully_unsubscribed,"Erfolgreich abbestellt",de_DE -availability_notification.successfully_unsubscribed_text,"You have successfully unsubscribed from being notified when the product is available again",en_US -availability_notification.successfully_unsubscribed_text,"Sie haben erfolgreich eine Benachrichtigung erhalten, wenn das produkt wieder verfügbar ist",de_DE -availability_notification_subscription.mail.subscribed.head,"We just informed our purchase team about your subscription!",en_US -availability_notification_subscription.mail.subscribed.head,"Wir haben unser Einkaufsteam gerade über Ihr Abonnement informiert!",de_DE -availability_notification_subscription.mail.subscribed.body,"You will receive an email when the product will be available again",en_US -availability_notification_subscription.mail.subscribed.body,"Sie erhalten eine E-Mail, sobald das Produkt wieder verfügbar ist",de_DE -availability_notification_subscription.mail.subscribed.subject,"We just informed our purchase team about your subscription!",en_US -availability_notification_subscription.mail.subscribed.subject,"Abonnement für Produktverfügbarkeit",de_DE -availability_notification_subscription.mail.unsubscribed.subject,"You will not be notified when the product %name% will be available again.",en_US -availability_notification_subscription.mail.unsubscribed.subject,"Sie werden nicht benachrichtigt, wenn das Produkt %name% wieder verfügbar ist.",de_DE -availability_notification_subscription.mail.unsubscribed.body,"You will not be notified when the product %name% will be available again.",en_US -availability_notification_subscription.mail.unsubscribed.body,"Sie werden nicht benachrichtigt, wenn das Produkt %name% wieder verfügbar ist.",de_DE -availability_notification_subscription.mail.notification.buy_now,"Buy now",en_US -availability_notification_subscription.mail.notification.buy_now,"Kaufe jetzt",de_DE -availability_notification_subscription.mail.notification.subject,"%name% is available again!",en_US -availability_notification_subscription.mail.notification.subject,"%name% ist wieder verfügbar!",de_DE -availability_notification_subscription.mail.notification.head,"%name% is available again!",en_US -availability_notification_subscription.mail.notification.head,"%name% ist wieder verfügbar",de_DE -availability_notification_subscription.mail.notification.body,"The wait is over, you can not add this product inside your cart.",en_US -availability_notification_subscription.mail.notification.body,"Das Warten hat ein Ende, Sie können dieses Produkt nicht in Ihren Warenkorb legen.",de_DE -availability_notification_subscription.mail.copyright,"Copyright © current year company name, All rights reserved.

                ",en_US -availability_notification_subscription.mail.copyright,"Copyright © Name des aktuellen Jahres, Alle Rechte vorbehalten.

                ",de_DE -availability_notification_subscription.mail.unsubscribe,"Want to change how you receive these emails?
                You can unsubscribe from this list.",en_US -availability_notification_subscription.mail.unsubscribe,"Möchten Sie ändern, wie Sie diese E-Mails erhalten?
                Sie können aus dieser Liste austragen.",de_DE -availability_notification.email_address,"Email address",en_US -availability_notification.email_address,"E-Mail-Addresse",de_DE -``` -
                -
                - -Run the following console command to import data: -```bash -console data:import glossary -``` - -{% info_block warningBox "Verification" %} -Make sure that, in the database, the configured data is added to the `spy_glossary` table. -{% endinfo_block %} - -### 3)Enable Controllers - -Register the following controller providers in Yves application: - -| Provider | Namespace | Enabled Controller | Controller specification | -| --- | --- | --- | --- | -| `AvailabilityNotificationPageControllerProvider` | `SprykerShop\Yves\AvailabilityNotificationPage\Plugin\Provider` | `AvailabilityNotificationPageController` | Provides the functionality of subscription removal by subscription key. | -| `AvailabilityNotificationWidgetControllerProvider` | `SprykerShop\Yves\AvailabilityNotificationWidget\Plugin\Provider` | `AvailabilityNotificationSubscriptionController` | Provides subscription management functionality for `AvailabilityNotificationWidget`. | - -**src/Pyz/Yves/ShopApplication/YvesBootstrap.php** - -```php -
              • `http://mysprykershop.com/availability-notification/unsubscribe-by-key/{32 characters key}`
              • `http://mysprykershop.com/en/availability-notification/unsubscribe-by-key/{32 characters key}`
              • `http://mysprykershop.com/de/availability-notification/unsubscribe-by-key/{32 characters key}`
              -{% endinfo_block %} - -If you have any other languages configured, the corresponding links must be available too. - -### 4) Set up Widgets - -Register the following plugins to enable widgets: - -| Widget | Description | Namespace | -| --- | --- | --- | -| `AvailabilityNotificationSubscriptionWidget` | Renders the subscription form in the *product details* page | `SprykerShop\Yves\AvailabilityNotificationWidget\Widget` | - -**src/Pyz/Yves/ShopApplication/ShopApplicationDependencyProvider.php** - -```php -getClient()->getQuote(); - $isItemReplacedInCart = $this->getFactory()->createCartItemsAttributeProvider() - ->tryToReplaceItem( - $sku, - $quantity, - array_replace($selectedAttributes, $preselectedAttributes), - $quoteTransfer->getItems(), - $groupKey, - $optionValueIds - ); - if ($isItemReplacedInCart) { - return $this->redirectResponseInternal(CartControllerProvider::ROUTE_CART); - } - $this->addInfoMessage('cart.item_attributes_needed'); - return $this->redirectResponseInternal( - CartControllerProvider::ROUTE_CART, - $this->getFactory() - ->createCartItemsAttributeProvider()->formatUpdateActionResponse($sku, $selectedAttributes) - ); -} -``` - -To support cart item attribute rendering, add the following parameter to index action: - -``` -array $selectedAttributes = null -``` - -Add the following line to the function's body: - -``` -$itemAttributesBySku = $this->getFactory() - ->createCartItemsAttributeProvider()->getItemsAttributes($quoteTransfer, $selectedAttributes); -``` - -
              -The full indexAction code should be as follows: - -```php -/** - * @param array|null $selectedAttributes - * - * @return array - */ -public function indexAction(array $selectedAttributes = null) -{ - $quoteTransfer = $this->getClient() - ->getQuote(); - $voucherForm = $this->getFactory() - ->createVoucherForm(); - $cartItems = $this->getFactory() - ->createProductBundleGrouper() - ->getGroupedBundleItems($quoteTransfer->getItems(), $quoteTransfer->getBundleItems()); - $stepBreadcrumbsTransfer = $this->getFactory() - ->getCheckoutBreadcrumbPlugin() - ->generateStepBreadcrumbs($quoteTransfer); - $itemAttributesBySku = $this->getFactory() - ->createCartItemsAttributeProvider()->getItemsAttributes($quoteTransfer, $selectedAttributes); - return $this->viewResponse([ - 'cart' => $quoteTransfer, - 'cartItems' => $cartItems, - 'attributes' => $itemAttributesBySku, - 'voucherForm' => $voucherForm->createView(), - 'stepBreadcrumbs' => $stepBreadcrumbsTransfer, - ]); -} -``` - -
              -
              - -### Additional Classes: -To complete the feature integration: - -
              -Add `src/Pyz/Yves/Cart/Plugin/Provider/AttributeVariantsProvider.php` by copying the following code: - -```php -cartVariantAttributeMapperPlugin = $cartVariantAttributeMapperPlugin; - $this->cartItemHandler = $cartItemHandler; - } - /** - * @param \Generated\Shared\Transfer\QuoteTransfer $quoteTransfer - * @param array|null $itemAttributes - * - * @return array - */ - public function getItemsAttributes(QuoteTransfer $quoteTransfer, array $itemAttributes = null) - { - $itemAttributesBySku = $this->cartVariantAttributeMapperPlugin - ->buildMap($quoteTransfer->getItems()); - return $this->cartItemHandler - ->narrowDownOptions($quoteTransfer->getItems(), $itemAttributesBySku, $itemAttributes); - } - /** - * @param string $sku - * @param int $quantity - * @param array $selectedAttributes - * @param \ArrayObject $items - * @param string|null $groupKey - * @param array $optionValueIds - * - * @return bool - */ - public function tryToReplaceItem($sku, $quantity, $selectedAttributes, ArrayObject $items, $groupKey = null, $optionValueIds = []) - { - $storageProductTransfer = $this->cartItemHandler->getProductStorageTransfer($sku, $selectedAttributes, $items); - if ($storageProductTransfer->getIsVariant() === true) { - $this->cartItemHandler->replaceCartItem($sku, $storageProductTransfer, $quantity, $groupKey, $optionValueIds); - return true; - } - return false; - } - /** - * @param string $sku - * @param array $selectedAttributes - * - * @return array - */ - public function formatUpdateActionResponse($sku, array $selectedAttributes) - { - return [ - StorageProductTransfer::SELECTED_ATTRIBUTES => [$sku => $this->arrayRemoveEmpty($selectedAttributes)], - ]; - } - /** - * Removes empty nodes from array - * - * @param array $haystack - * - * @return array - */ - protected function arrayRemoveEmpty(array $haystack) - { - foreach ($haystack as $key => $value) { - if (is_array($value)) { - $haystack[$key] = $this->arrayRemoveEmpty($haystack[$key]); - } - if (empty($haystack[$key])) { - unset($haystack[$key]); - } - } - return $haystack; - } -} -``` - -
              -
              - -
              -Also, add `src/Pyz/Yves/Cart/Handler/CartItemHandler.php`: -```php -cartOperationHandler = $cartOperationHandler; - $this->cartClient = $cartClient; - $this->productClient = $productClient; - $this->storageProductMapperPlugin = $storageProductMapperPlugin; - } - /** - * @param string $sku - * @param array $selectedAttributes - * @param \ArrayObject|\Generated\Shared\Transfer\StorageProductTransfer[] $items - * @return \Generated\Shared\Transfer\StorageProductTransfer - */ - public function getProductStorageTransfer($sku, array $selectedAttributes, ArrayObject $items) - { - return $this->mapSelectedAttributesToStorageProduct($sku, $selectedAttributes, $items); - } - /** - * @param string $currentItemSku - * @param \Generated\Shared\Transfer\StorageProductTransfer $storageProductTransfer - * @param int $quantity - * @param string $groupKey - * @param array $optionValueIds - * - * @return void - */ - public function replaceCartItem( - $currentItemSku, - StorageProductTransfer $storageProductTransfer, - $quantity, - $groupKey, - array $optionValueIds - ) { - $newItemSku = $storageProductTransfer->getSku(); - $this->cartOperationHandler->add($newItemSku, $quantity, $optionValueIds); - $this->setFlashMessagesFromLastZedRequest($this->cartClient); - if (count($this->cartClient->getZedStub()->getErrorMessages()) === 0) { - $this->cartOperationHandler->remove($currentItemSku, $groupKey); - } - } - /** - * @param string $sku - * @param array $selectedAttributes - * @param \ArrayObject|\Generated\Shared\Transfer\StorageProductTransfer[] $items - * - * @return \Generated\Shared\Transfer\StorageProductTransfer - */ - public function mapSelectedAttributesToStorageProduct($sku, array $selectedAttributes, ArrayObject $items) - { - foreach ($items as $item) { - if ($item->getSku() === $sku) { - return $this->getStorageProductForSelectedAttributes($selectedAttributes, $item); - } - } - return new StorageProductTransfer(); - } - /** - * @param array $selectedAttributes - * @param \Generated\Shared\Transfer\ItemTransfer $item - * - * @return \Generated\Shared\Transfer\StorageProductTransfer - */ - protected function getStorageProductForSelectedAttributes(array $selectedAttributes, $item) - { - $productData = $this->productClient->getProductAbstractFromStorageByIdForCurrentLocale( - $item->getIdProductAbstract() - ); - return $this->storageProductMapperPlugin->mapStorageProduct($productData, $selectedAttributes); - } - /** - * @param string $sku - * @param \ArrayObject|\Generated\Shared\Transfer\ItemTransfer[] $items - * - * @return \Generated\Shared\Transfer\ItemTransfer - */ - protected function findItemInCartBySku($sku, ArrayObject $items) - { - foreach ($items as $item) { - if ($item->getSku() === $sku) { - return $item; - } - } - } - /** - * @param \ArrayObject|\Generated\Shared\Transfer\StorageProductTransfer[] $items - * @param array $itemAttributesBySku - * @param array|null $selectedAttributes - * - * @return array - */ - public function narrowDownOptions( - ArrayObject $items, - array $itemAttributesBySku, - array $selectedAttributes = null - ) { - if (count($selectedAttributes) === 0) { - return $itemAttributesBySku; - } - foreach ($selectedAttributes as $sku => $attributes) { - $itemAttributesBySku = $this->setSelectedAttributesAsSelected($itemAttributesBySku, $attributes, $sku); - $availableAttributes = $this->getAvailableAttributesForItem($items, $selectedAttributes, $sku); - $itemAttributesBySku = $this->removeAttributesThatAreNotAvailableForItem($itemAttributesBySku, $sku, $availableAttributes); - } - return $itemAttributesBySku; - } - /** - * @param array $itemAttributesBySku - * @param array $attributes - * @param string $sku - * - * @return array - */ - protected function setSelectedAttributesAsSelected(array $itemAttributesBySku, array $attributes, $sku) - { - foreach ($attributes as $key => $attribute) { - unset($itemAttributesBySku[$sku][$key]); - $itemAttributesBySku[$sku][$key][$attribute][CartVariantConstants::SELECTED] = true; - $itemAttributesBySku[$sku][$key][$attribute][CartVariantConstants::AVAILABLE] = true; - } - return $itemAttributesBySku; - } - /** - * @param \ArrayObject $items - * @param array $itemAttributes - * @param string $sku - * - * @return array - */ - protected function getAvailableAttributesForItem(ArrayObject $items, array $itemAttributes, $sku) - { - $storageProductTransfer = $this->getProductStorageTransfer($sku, $itemAttributes[$sku], $items); - $availableAttributes = $storageProductTransfer->getAvailableAttributes(); - return $availableAttributes; - } - /** - * @SuppressWarnings(PHPMD.UnusedLocalVariable) - * - * @param array $itemAttributesBySku - * @param string $sku - * @param array $availableAttributes - * - * @return array - */ - protected function removeAttributesThatAreNotAvailableForItem(array $itemAttributesBySku, $sku, array $availableAttributes) - { - foreach ($itemAttributesBySku[$sku] as $key => $attributes) { - foreach ($attributes as $attributeName => $options) { - if (array_key_exists($key, $availableAttributes)) { - if (in_array($attributeName, $availableAttributes[$key]) === false) { - unset($itemAttributesBySku[$sku][$key][$attributeName]); - } - } - } - } - return $itemAttributesBySku; - } -} -``` - -
              -
              - -
              -Add src/Pyz/Yves/Cart/Handler/CartItemHandlerInterface.php - -```php - -
              - -
              -Add `src/Pyz/Yves/Cart/Plugin/Provider/AttributeVariantsProvider.php` - -```php -cartVariantAttributeMapperPlugin = $cartVariantAttributeMapperPlugin; - $this->cartItemHandler = $cartItemHandler; - } - /** - * @param \Generated\Shared\Transfer\QuoteTransfer $quoteTransfer - * @param array|null $itemAttributes - * - * @return array - */ - public function getItemsAttributes(QuoteTransfer $quoteTransfer, array $itemAttributes = null) - { - $itemAttributesBySku = $this->cartVariantAttributeMapperPlugin - ->buildMap($quoteTransfer->getItems()); - return $this->cartItemHandler - ->narrowDownOptions($quoteTransfer->getItems(), $itemAttributesBySku, $itemAttributes); - } - /** - * @param string $sku - * @param int $quantity - * @param array $selectedAttributes - * @param \ArrayObject $items - * @param string|null $groupKey - * @param array $optionValueIds - * - * @return bool - */ - public function tryToReplaceItem($sku, $quantity, $selectedAttributes, ArrayObject $items, $groupKey = null, $optionValueIds = []) - { - $storageProductTransfer = $this->cartItemHandler->getProductStorageTransfer($sku, $selectedAttributes, $items); - if ($storageProductTransfer->getIsVariant() === true) { - $this->cartItemHandler->replaceCartItem($sku, $storageProductTransfer, $quantity, $groupKey, $optionValueIds); - return true; - } - return false; - } - /** - * @param string $sku - * @param array $selectedAttributes - * - * @return array - */ - public function formatUpdateActionResponse($sku, array $selectedAttributes) - { - return [ - StorageProductTransfer::SELECTED_ATTRIBUTES => [$sku => $this->arrayRemoveEmpty($selectedAttributes)], - ]; - } - /** - * Removes empty nodes from array - * - * @param array $haystack - * - * @return array - */ - protected function arrayRemoveEmpty(array $haystack) - { - foreach ($haystack as $key => $value) { - if (is_array($value)) { - $haystack[$key] = $this->arrayRemoveEmpty($haystack[$key]); - } - if (empty($haystack[$key])) { - unset($haystack[$key]); - } - } - return $haystack; - } -} -``` - -
              -
              - ---> - -### AttributeMapCollector -To support the mapping between attributes and availability, we need to collect additional data in our attribute map collector. You can do that by adding a single line with `SpyProductTableMap::COL_SKU` to the `getConreteProducts` function. - -The full function is as follows: - -```php -/** - * @param int $idProductAbstract - * - * @return \Orm\Zed\Product\Persistence\SpyProduct[]|\Propel\Runtime\Collection\ObjectCollection - */ -protected function getConcreteProducts($idProductAbstract) -{ - return SpyProductQuery::create() - ->select([ - SpyProductTableMap::COL_ID_PRODUCT, - SpyProductTableMap::COL_ATTRIBUTES, - SpyProductTableMap::COL_SKU, - ]) - ->withColumn(SpyProductLocalizedAttributesTableMap::COL_ATTRIBUTES, 'localized_attributes') - ->useSpyProductLocalizedAttributesQuery() - ->filterByFkLocale($this->locale->getIdLocale()) - ->endUse() - ->filterByFkProductAbstract($idProductAbstract) - ->filterByIsActive(true) - ->find() - ->toArray(null, false, TableMap::TYPE_CAMELNAME); -} -``` - -The `filterConcreteProductIds` function was changed to the following: - -```php -/** - * @param array $concreteProducts - * - * @return array - */ -protected function filterConcreteProductIds(array $concreteProducts) -{ - $concreteProductIds = array_map(function ($product) { - return $product[SpyProductTableMap::COL_ID_PRODUCT]; - }, $concreteProducts); - foreach ($concreteProducts as $product) { - $concreteProductIds[$product[SpyProductTableMap::COL_SKU]] = $product[SpyProductTableMap::COL_ID_PRODUCT]; - } - asort($concreteProductIds); - return $concreteProductIds; -} -``` - - diff --git a/docs/scos/dev/feature-integration-guides/202005.0/cart-non-splittable-products-feature-integration.md b/docs/scos/dev/feature-integration-guides/202005.0/cart-non-splittable-products-feature-integration.md deleted file mode 100644 index c0171016194..00000000000 --- a/docs/scos/dev/feature-integration-guides/202005.0/cart-non-splittable-products-feature-integration.md +++ /dev/null @@ -1,59 +0,0 @@ ---- -title: Cart- Non-splittable Products feature integration -description: The guide describes the process of installing the Cart and Non-Splittable Products features into your project -last_updated: Apr 24, 2020 -template: feature-integration-guide-template -originalLink: https://documentation.spryker.com/v5/docs/cart-non-splittable-products-feature-integration -originalArticleId: 332cfb32-c125-49f5-9112-ef2fe60df7b9 -redirect_from: - - /v5/docs/cart-non-splittable-products-feature-integration - - /v5/docs/en/cart-non-splittable-products-feature-integration ---- - -## Install Feature Core -### Prerequisites -Install the required features: - -| Name | Version | -| --- | --- | -| Cart | {{page.version}} | -| Non-splittable Products |{{page.version}} | - -### 1) Set up Behavior -#### Adjust Concrete Product Quantity -Add the following plugins to your project: - -| Plugin | Specification | Prerequisites | Namespace | -| --- | --- | --- | --- | -| `CartChangeTransferQuantityNormalizerPlugin` | The plugin is responsible for adjusting concrete products quantity and adding notification messages about that. | The `ProductQuantity` and `ProductQuantityStorage` modules should be installed. | `Spryker\Zed\ProductQuantity\Communication\Plugin\Cart` | - -**src/Pyz/Zed/Cart/CartDependencyProvider.php** - -```php - - Example: collector plugin list extension - -```php - new ProductCategoryFilterCollectorPlugin(), - ]; - }; - - - // ... - } - } -``` - -
              - - -7. Make sure the new Zed user interface assets are built. Run `npm run zed` (or antelope build zed - for older versions) for that. -8. Update Zed’s navigation cache to show the new items for the Product Category Filter management user interface by running `vendor/bin/console application:build-navigation-cache`. - -You should now be able to use the Zed UI of Category Filters to re-order, remove or add search filters to specific categories, and the collectors should also be able to push those category settings to storage. -Check out our [Demoshop implementation](https://github.com/spryker/demoshop) for frontend implementation example and the general idea. - -### Updating Filters For a Category -To use the setup category filter, `CatalogController::indexAction` needs to call `ProductCategoryFilterClient::updateFacetsByCategory`. - -For example, it might look like this: - -```php -query->get('q', ''); - - $parameters = $request->query->all(); - $parameters[PageIndexMap::CATEGORY] = $categoryNode['node_id']; - - $searchResults = $this - ->getClient() - ->catalogSearch($searchString, $parameters); - - $currentLocale = $this - ->getFactory() - ->getLocaleClient() - ->getCurrentLocale(); - - $productCategoryFilterClient = $this->getFactory()->getProductCategoryFilterClient(); - - $searchResults[FacetResultFormatterPlugin::NAME] = $productCategoryFilterClient - ->updateFacetsByCategory( - $searchResults[FacetResultFormatterPlugin::NAME], - $productCategoryFilterClient->getProductCategoryFiltersForCategoryByLocale($parameters[PageIndexMap::CATEGORY], $currentLocale) - ); //This line here is the one that updates the facets with the category filters. - - $pageTitle = ($categoryNode['meta_title']) ?: $categoryNode['name']; - $metaAttributes = [ - 'idCategory' => $parameters['category'], - 'category' => $categoryNode, - 'page_title' => $pageTitle, - 'page_description' => $categoryNode['meta_description'], - 'page_keywords' => $categoryNode['meta_keywords'], - 'searchString' => $searchString, - ]; - - $searchResults = array_merge($searchResults, $metaAttributes); - - return $this->envelopeResult($searchResults, $categoryNode['node_id']); - } -} -``` - -It is also necessary to add `ProductCategoryFilterClient` to `CatalogFactory`: - -```php -getProvidedDependency(CatalogDependencyProvider::CLIENT_PRODUCT_CATEGORY_FILTER); - } -} -``` - -Add an additional dependency to `CatalogDependencyProvider` to look like this: - -```php -addProductCategoryFilterClient($container); - - return $container; - } - - /** - * @param \Spryker\Yves\Kernel\Container $container - * - * @return \Spryker\Yves\Kernel\Container - */ - protected function addProductCategoryFilterClient(Container $container) - { - $container[static::CLIENT_PRODUCT_CATEGORY_FILTER] = function (Container $container) { - return $container->getLocator()->productCategoryFilter()->client(); - }; - - return $container; - } -} -``` - - - -[//]: # (by Ahmed Sabaa) diff --git a/docs/scos/dev/feature-integration-guides/202005.0/category-image-feature-integration.md b/docs/scos/dev/feature-integration-guides/202005.0/category-image-feature-integration.md deleted file mode 100644 index c13caf404c1..00000000000 --- a/docs/scos/dev/feature-integration-guides/202005.0/category-image-feature-integration.md +++ /dev/null @@ -1,413 +0,0 @@ ---- -title: Category Image feature integration -description: The guide walks you through the process of installing the Category Image feature in your project. -last_updated: Apr 24, 2020 -template: feature-integration-guide-template -originalLink: https://documentation.spryker.com/v5/docs/category-image-feature-integration -originalArticleId: e68ec37e-e2b6-4bf8-8996-e5dbb7cf2846 -redirect_from: - - /v5/docs/category-image-feature-integration - - /v5/docs/en/category-image-feature-integration ---- - -## Install Feature Core -### Prerequisites -Please overview and install the necessary features before beginning the integration step. - -| Name | Version | -| --- | --- | -| Category | {{page.version}} | -| Spryker Core | {{page.version}} | - -### 1) Install the required modules using Composer -Run the following command(s) to install the required modules: - -```bash -composer require spryker-feature/category-image:"^{{page.version}}" --update-with-dependencies -``` -{% info_block warningBox "Verification" %} -Make sure that the following modules were installed:
              ModuleExpected Directory
              `CategoryImage``vendor/spryker/category-image`
              `CategoryImageGui``vendor/spryker/category-image-gui`
              `CategoryImageStorage``vendor/spryker/category-image-storage`
              `CategoryExtension``vendor/spryker/category-extension`
              -{% endinfo_block %} - - -### 2) Set up Database Schema and Transfer Objects -Adjust the schema definition so entity changes will trigger events. - -| Affected entity | Triggered events | -| --- | --- | -| `spy_category_image_set` | `Entity.spy_category_image_set.create`
              `Entity.spy_category_image_set.update`
              `Entity.spy_category_image_set.delete` | -| `spy_category_image` | `Entity.spy_category_image_set.create`
              `Entity.spy_category_image_set.update`
              `Entity.spy_category_image_set.delete` | -| `spy_category_image_set_to_category_image` | `Entity.spy_category_image_set_to_category_image.create`
              `Entity.spy_category_image_set_to_category_image.update`
              `Entity.spy_category_image_set_to_category_image.delete` | - -**src/Pyz/Zed/CategoryImage/Persistence/Propel/Schema/spy_category_image.schema.xml** - -```html - - - - - - - -
              - - - - - -
              - - - - - -
              -
              -``` - -Set up synchronization queue pools so non-multi-store entities (not store specific entities) are synchronized among stores: - -**src/Pyz/Zed/CategoryImageStorage/Persistence/Propel/Schema/spy_category_image_storage.schema.xml** - -```html - - - - - - - -
              -
              -``` - -Run the following commands to apply database changes and generate entity and transfer changes: - -```bash -console transfer:generate -console propel:install -console transfer:generate -``` - -{% info_block warningBox "Verification" %} -Make sure that the following changes have been applied by checking your database.
              Database EntityTypeEvent
              `spy_category_image_set`tablecreated
              `spy_category_image`tablecreated
              `spy_category_image_set_to_category_image`tablecreated
              `spy_category_image_storage`tablecreated
              -{% endinfo_block %} - -{% info_block warningBox “Verification” %} - -Make sure that propel entities have been generated successfully by checking their existence. Also, change the generated entity classes to extend from Spryker core classes.
              Class pathExtends
              `src/Orm/Zed/CategoryImage/Persistence/Base/SpyCategoryImage.php``Spryker\Zed\CategoryImage\Persistence\Propel\AbstractSpyCategoryImage`
              `src/Orm/Zed/CategoryImage/Persistence/Base/SpyCategoryImageQuery.php``Spryker\Zed\CategoryImage\Persistence\Propel\AbstractSpyCategoryImageQuery`
              `src/Orm/Zed/CategoryImage/Persistence/Base/SpyCategoryImageSet.php``Spryker\Zed\CategoryImage\Persistence\Propel\AbstractSpyCategoryImageSet`
              `src/Orm/Zed/CategoryImage/Persistence/Base/SpyCategoryImageSetQuery.php``Spryker\Zed\CategoryImage\Persistence\Propel\AbstractSpyCategoryImageSetQuery`
              `src/Orm/Zed/CategoryImage/Persistence/Base/SpyCategoryImageSetToCategoryImage.php``Spryker\Zed\CategoryImage\Persistence\Propel\AbstractSpyCategoryImageSetToCategoryImage`
              `src/Orm/Zed/CategoryImage/Persistence/Base/SpyCategoryImageSetToCategoryImageQuery.php``Spryker\Zed\CategoryImage\Persistence\Propel\AbstractSpyCategoryImageSetToCategoryImageQuery`
              `src/Orm/Zed/CategoryImageStorage/Persistence/Base/SpyCategoryImageStorage.php``Spryker\Zed\CategoryImageStorage\Persistence\Propel\AbstractSpyCategoryImageStorage`
              `src/Orm/Zed/CategoryImageStorage/Persistence/Base/SpyCategoryImageStorageQuery.php``Spryker\Zed\CategoryImageStorage\Persistence\Propel\AbstractSpyCategoryImageStorageQuery`
              -{% endinfo_block %} - -{% info_block warningBox "Verification" %} -Make sure that the following changes have been implemented in transfer objects:
              TransferTypeEventPath
              `CategoryImageSetTransfer`classcreated`src/Generated/Shared/Transfer/CategoryImageSetTransfer.php`
              `CategoryImageTransfer`classcreated`src/Generated/Shared/Transfer/CategoryImageTransfer.php`
              `CategoryTransfer`classcreated`src/Generated/Shared/Transfer/CategoryTransfer.php`
              -{% endinfo_block %} - - -### 3) Configure Export to Redis -#### Set up Event Listeners - -{% info_block infoBox %} -In this step, you will enable publishing of table changes (create, edit, delete -{% endinfo_block %} to `spy_category_image_storage` and synchronization of data to Storage.) - -| Plugin | Specification | Prerequisites | Namespace | -| --- | --- | --- | --- | -| `CategoryImageStorageEventSubscriber` | Registers listeners that are responsible for publishing category image information to storage when a related entity changes. | None | `Spryker\Zed\CategoryImageStorage\Communication\Plugin\Event\Subscriber` | - -**src/Pyz/Zed/Event/EventDependencyProvider.php** - -```php -add(new CategoryImageStorageEventSubscriber()); - - return $eventSubscriberCollection; - } -} -``` - -**src/Pyz/Zed/CategoryImageStorage/CategoryImageStorageConfig.php** - -```php -ModuleExpected Directory`CategoryImageStorageWidget``vendor/spryker-shop/category-image-storage-widget` -{% endinfo_block %} - -### 2) Set up Widgets -Register the following global widgets: - -| Widget | Description | Namespace | -| --- | --- | --- | -| `CategoryImageStorageWidget` | Finds the given category image set in Storage and displays its first image in a given size format. | `SprykerShop\Yves\CategoryImageStorageWidget\Widget` | - -**src/Pyz/Yves/ShopApplication/ShopApplicationDependencyProvider.php** - -```php -ModuleTest`CategoryImageStorageWidget`Make sure you have category image data in your storage. Then, render the widget for all the categories that have images assigned. -{% endinfo_block %} - diff --git a/docs/scos/dev/feature-integration-guides/202005.0/checkout-quotation-process-feature-integration.md b/docs/scos/dev/feature-integration-guides/202005.0/checkout-quotation-process-feature-integration.md deleted file mode 100644 index a47d40b006c..00000000000 --- a/docs/scos/dev/feature-integration-guides/202005.0/checkout-quotation-process-feature-integration.md +++ /dev/null @@ -1,129 +0,0 @@ ---- -title: Checkout + Quotation Process feature integration -description: The guide describes the process of installing the Checkout + Quotation process feature into your project. -last_updated: Apr 27, 2020 -template: feature-integration-guide-template -originalLink: https://documentation.spryker.com/v5/docs/checkout-quotation-process-feature-integration -originalArticleId: bd62a07a-6e55-4b43-b767-9ae71e479f44 -redirect_from: - - /v5/docs/checkout-quotation-process-feature-integration - - /v5/docs/en/checkout-quotation-process-feature-integration -related: - - title: Quotation Process feature integration - link: docs/scos/dev/feature-integration-guides/page.version/quotation-process-feature-integration.html ---- - -## Install Feature Core -### Prerequisites -Install the required features: - -| Name | Version | -| --- | --- | -| Checkout | {{page.version}} | -| Quotation Process | {{page.version}} | - -### 1) Set up Behavior -Register the following plugins: - -| Plugin | Specification | Prerequisites | Namespace | -| --- | --- | --- | --- | -| `QuoteRequestPreCheckPlugin` | Prevents the checkout for quote in the quotation process. | None | `Spryker\Zed\QuoteRequest\Communication\Plugin\Checkout` | -| `CloseQuoteRequestCheckoutPostSaveHookPlugin` | Closes a quote request after the order has been placed from it. | None | `Spryker\Zed\QuoteRequest\Communication\Plugin\Checkout` | - -**Pyz\Zed\Checkout\CheckoutDependencyProvider.php** - -```php -Make sure that after you placed an order form quote request, a quote request has a closed status. -{% endinfo_block %} - -## Install feature frontend -### Prerequisites -Please overview and install the necessary features before beginning the integration step. - -| Name | Version | -| --- | --- | -| Checkout | {{page.version}} | -| Quotation Process | {{page.version}} | - -### Set up Behavior -#### Set up Quote Request Workflow -Enable the following behaviors by registering the plugins: - -| Plugin | Specification | Prerequisites | Namespace | -| --- | --- | --- | --- | -| `QuoteRequestAgentCheckoutWorkflowStepResolverStrategyPlugin` | Modifies checkout steps for agent RFQ edit workflow. | None | `SprykerShop\Yves\QuoteRequestAgentPage\Plugin\CheckoutPage` | -| `QuoteWithCustomShipmentPriceCheckoutWorkflowStepResolverStrategyPlugin` | Modifies checkout steps for a quote with source shipment price workflow. | None | `SprykerShop\Yves\QuoteRequestPage\Plugin\CheckoutPage` | -| `QuoteRequestCheckoutWorkflowStepResolverStrategyPlugin` | Modifies checkout steps for buyer RFQ edit workflow. | None | `SprykerShop\Yves\QuoteRequestPage\Plugin\CheckoutPage` | - -**Pyz\Yves\CheckoutPage\CheckoutPageDependencyProvider.php** - -```php - (new CheckoutWorkflowPluginContainer( - $this->getCheckoutPreConditions($container), - $this->getCheckoutOrderSavers($container), - $this->getCheckoutPostHooks($container), - $this->getCheckoutPreSaveHooks($container) - )), - CheckoutConstants::KEY_WORKFLOW_ALTERNATIVE_CHECKOUT => (new CheckoutWorkflowPluginContainer( - [], - [ - new SalesOrderSaverPlugin(), - ], - [], - [] - )), - ]; -} -``` - -After this, pass workflow id as a second parameter in the `placeOrder()` call of `CheckoutFacade`. - -```bash -$this->getCheckoutFacade()->placeOrder($quoteTransfer, CheckoutConstants::KEY_WORKFLOW_ALTERNATIVE_CHECKOUT); -``` diff --git a/docs/scos/dev/feature-integration-guides/202005.0/cms-block-widget-feature-integration.md b/docs/scos/dev/feature-integration-guides/202005.0/cms-block-widget-feature-integration.md deleted file mode 100644 index 43f1d5876ec..00000000000 --- a/docs/scos/dev/feature-integration-guides/202005.0/cms-block-widget-feature-integration.md +++ /dev/null @@ -1,104 +0,0 @@ ---- -title: CMS Block Widget feature integration -description: The CMS Block Widget feature allows adding content snippets to a page. This guide walks you through the process of integrating the feature into your project. -last_updated: Apr 24, 2020 -template: feature-integration-guide-template -originalLink: https://documentation.spryker.com/v5/docs/cms-block-widget-integration -originalArticleId: dc7e095d-083b-44f8-91b9-87362a8e0f73 -redirect_from: - - /v5/docs/cms-block-widget-integration - - /v5/docs/en/cms-block-widget-integration ---- - -## Install feature frontend -### Prerequisites -Please overview and install the necessary features before beginning the integration step. - -| Name | Version | -| --- | --- | -| CMS |{{page.version}} | - -### 1) Install the required modules using Composer -#### Implementation -Run the following command(s) to install the required modules: -`composer require spryker/cms-content-widget-cms-block-connector:"^1.0.0" --update-with-dependencie` - -{% info_block warningBox "Verification" %} -Make sure that the following modules were installed:
              ModuleExpected Directory
              `CmsContentWidgetCmsBlockConnector``vendor/spryker/cms-content-widget-cms-block-connector`
              -{% endinfo_block %} - - -### 2) Set up Configuration -#### Implementation -Add the following configuration to your project: - -**src/Pyz/Zed/CmsContentWidget/CmsContentWidgetConfig.php** - -```php - new CmsContentWidgetCmsBlockConnectorConfigurationProvider(), - ]; -} -``` - -{% info_block warningBox "Verification" %} -Verify that the new `cms_block` option is visible in the widget drop-down on the CMS Block Editor in Zed UI. -{% endinfo_block %} - - -### 3) Set up Widgets -#### Implementation -Add the following plugin to your project: - -|Plugin | Specification | Prerequisites | Namespace | -| --- | --- | --- | --- | -| `CmsBlockContentWidgetPlugin`| Creates a new Widget for editing CMS Blocks. |None | `Spryker\Yves\CmsContentWidgetCmsBlockConnector\Plugin` | - -**src/Pyz/Yves/CmsContentWidget/CmsContentWidgetDependencyProvider.php** - -```php - new CmsBlockContentWidgetPlugin( - new CmsContentWidgetCmsBlockConnectorConfigurationProvider() - ), - ]; - } -} -``` - -{% info_block warningBox "Verification" %} -1. Create two new CMS blocks:
              • BlockA - Add some text to it.
              • BlockB - Add a cms_block(['BlockA'] -{% endinfo_block %} reference to it.

              2. Add BlockB to a CMS Page.
              3. Verify that the new `cms_block` option is rendered correctly in Yves when viewing the new CMS Page.) diff --git a/docs/scos/dev/feature-integration-guides/202005.0/cms-catalog-feature-integration.md b/docs/scos/dev/feature-integration-guides/202005.0/cms-catalog-feature-integration.md deleted file mode 100644 index f8f54d1d776..00000000000 --- a/docs/scos/dev/feature-integration-guides/202005.0/cms-catalog-feature-integration.md +++ /dev/null @@ -1,382 +0,0 @@ ---- -title: CMS + Catalog feature integration -description: The CMS Page Search Catalog feature allows viewing search results for subcategory pages. The guide describes how to enable the feature in the project. -last_updated: Aug 12, 2020 -template: feature-integration-guide-template -originalLink: https://documentation.spryker.com/v5/docs/cms-pages-in-search-results-integration -originalArticleId: d5638ff5-d656-4546-b6d7-d48a69928db7 -redirect_from: - - /v5/docs/cms-pages-in-search-results-integration - - /v5/docs/en/cms-pages-in-search-results-integration ---- - -## Install Feature Core - -### Prerequisites - -Install the required features: - -| Name | Version | -| --- | --- | -| Catalog | {{page.version}} | -| Cms | {{page.version}} | - -### 1) Set up Behavior - -#### Configure the CMS Page Search Query. - -Add the following Query Expander Plugins to your project: - -| Plugin | Specification | Prerequisites | Namespace | -| --- | --- | --- | --- | -| `StoreQueryExpanderPlugin` | Extends a search query by filtering down results to the current Store. | None | `\Spryker\Client\Search\Plugin\Elasticsearch\QueryExpander\StoreQueryExpanderPlugin` | -| `LocalizedQueryExpanderPlugin` | Extends a search query by filtering down results to the current Locale. | None | `\Spryker\Client\Search\Plugin\Elasticsearch\QueryExpander\LocalizedQueryExpanderPlugin` | -| `SortedCmsPageQueryExpanderPlugin` | Extends a search query by sorting parameters. | None | `\Spryker\Client\CmsPageSearch\Plugin\Elasticsearch\QueryExpander\SortedCmsPageQueryExpanderPlugin` | -| `PaginatedCmsPageQueryExpanderPlugin` | Extends a search query by pagination parameters. | None | `\Spryker\Client\CmsPageSearch\Plugin\Elasticsearch\QueryExpander\PaginatedCmsPageQueryExpanderPlugin` | -| `IsActiveQueryExpanderPlugin` | Extends a search query by filtering down only active results. | None | `\Spryker\Client\Search\Plugin\Elasticsearch\QueryExpander\IsActiveQueryExpanderPlugin` | -| `IsActiveInDateRangeQueryExpanderPlugin` | Extends a search query by filtering down results to be active by the current date time. | None | `\Spryker\Client\Search\Plugin\Elasticsearch\QueryExpander\IsActiveInDateRangeQueryExpanderPlugin` | - -Add the following Result Formatter Plugins to your project: - -| Plugin | Specification | Prerequisites | Namespace | -| --- | --- | --- | --- | -| `SortedCmsPageSearchResultFormatterPlugin` | Formats the sort-related raw search result data. | None | `\Spryker\Client\CmsPageSearch\Plugin\Elasticsearch\ResultFormatter\SortedCmsPageSearchResultFormatterPlugin` | -| `PaginatedCmsPageResultFormatterPlugin` | Formats the pagination-related raw search result data. | None | `\Spryker\Client\CmsPageSearch\Plugin\Elasticsearch\ResultFormatter\PaginatedCmsPageResultFormatterPlugin` | -| `RawCmsPageSearchResultFormatterPlugin` | Formats the CMS page hits related raw search result data. | None | `\Spryker\Client\CmsPageSearch\Plugin\Elasticsearch\ResultFormatter\RawCmsPageSearchResultFormatterPlugin` | - -**src/Pyz/Client/CmsPageSearch/CmsPageSearchDependencyProvider.php** - -```php - - - - - - - -
              - - - - - -
              - -
              -``` - -**src/Pyz/Zed/CmsBlock/Persistence/Propel/Schema/spy_cms_block.schema.xml** - -```xml - - - - - - - -
              - - - - - -
              - - - - - -
              - -
              -``` - -**src/Pyz/Zed/CmsSlot/Persistence/Propel/Schema/spy_cms_slot.schema.xml** - -```xml - - - - - - - -
              - -
              -``` - -2. Run the following commands to apply database changes and generate entity and transfer changes: - -```bash -console transfer:generate -console propel:install -``` - -{% info_block warningBox "Verification" %} -Make sure that the following changes have been applied by checking your database. - -|Database entity|Type|Event| -|--- |--- |--- | -|`spy_cms_block`|table|created| -|`spy_cms_block_glossary_key_mapping`|table|created| -|`spy_cms_block_storage`|table|created| -|`spy_cms_block_store`|table|created| -|`spy_cms_block_template`|table|created| -|`spy_cms_glossary_key_mapping`|table|created| -|`spy_cms_page`|table|created| -|`spy_cms_page_localized_attributes`|table|created| -|`spy_cms_page_search`|table|created| -|`spy_cms_page_storage`|table|created| -|`spy_cms_page_store`|table|created| -|`spy_cms_slot`|table|created| -|`spy_cms_slot_block`|table|created| -|`spy_cms_slot_block_storage`|table|created| -|`spy_cms_slot_storage`|table|created| -|`spy_cms_slot_template`|table|created| -|`spy_cms_slot_to_cms_slot_template`|table|created| -|`spy_cms_template`|table|created| -|`spy_cms_version`|table|created| - -{% endinfo_block %} - -{% info_block warningBox "Verification" %} -Make sure that the following changes have been applied in transfer objects: - -|Transfer|Type|Event|Path| -|--- |--- |--- |--- | -|`SpyCmsTemplateEntity`|class|created|`src/Generated/Shared/Transfer/SpyCmsTemplateEntityTransfer`| -|`SpyCmsPageEntity`|class|created|`src/Generated/Shared/Transfer/SpyCmsPageEntityTransfer`| -|`SpyCmsPageStoreEntity`|class|created|`src/Generated/Shared/Transfer/SpyCmsPageStoreEntityTransfer`| -|`SpyCmsGlossaryKeyMappingEntity`|class|created|`src/Generated/Shared/Transfer/SpyCmsGlossaryKeyMappingEntityTransfer`| -|`SpyCmsVersionEntity`|class|created|`src/Generated/Shared/Transfer/SpyCmsVersionEntityTransfer`| -|`SpyCmsBlockTemplateEntity`|class|created|`src/Generated/Shared/Transfer/SpyCmsBlockTemplateEntityTransfer`| -|`SpyCmsBlockGlossaryKeyMappingEntity`|class|created|`src/Generated/Shared/Transfer/SpyCmsBlockGlossaryKeyMappingEntityTransfer`| -|`SpyCmsBlockEntity`|class|created|`src/Generated/Shared/Transfer/SpyCmsBlockEntityTransfer`| -|`SpyCmsBlockStorageEntity`|class|created|`src/Generated/Shared/Transfer/SpyCmsBlockStorageEntityTransfer`| -|`SpyCmsBlockStoreEntity`|class|created|`src/Generated/Shared/Transfer/SpyCmsBlockStoreEntityTransfer`| -|`SpyCmsPageStorageEntity`|class|created|`src/Generated/Shared/Transfer/SpyCmsPageStorageEntityTransfer`| -|`SpyCmsBlockProductStorageEntity`|class|created|`src/Generated/Shared/Transfer/SpyCmsBlockProductStorageEntityTransfer`| -|`SpyCmsBlockCategoryStorageEntity`|class|created|`src/Generated/Shared/Transfer/SpyCmsBlockCategoryStorageEntityTransfer`| -|`SpyCmsSlotEntity`|class|created|`src/Generated/Shared/Transfer/SpyCmsSlotEntityTransfer`| -|`SpyCmsSlotBlockEntity`|class|created|`src/Generated/Shared/Transfer/SpyCmsSlotBlockEntityTransfer`| -|`SpyCmsSlotStorageEntity`|class|created|`src/Generated/Shared/Transfer/SpyCmsSlotStorageEntityTransfer`| -|`SpyCmsSlotTemplateEntity`|class|created|`src/Generated/Shared/Transfer/SpyCmsSlotTemplateEntity`| -|`SpyCmsSlotToCmsSlotTemplateEntity`|class|created|`src/Generated/Shared/Transfer/SpyCmsSlotToCmsSlotTemplateEntity`| -|`CmsTemplate`|class|created|`src/Generated/Shared/Transfer/CmsTemplateTransfer`| -|`Page`|class|created|`src/Generated/Shared/Transfer/PageTransfer`| -|`CmsPageLocalizedAttributes`|class|created|`src/Generated/Shared/Transfer/CmsPageLocalizedAttributesTransfer`| -|`PageKeyMapping`|class|created|`src/Generated/Shared/Transfer/PageKeyMappingTransfer`| -|`CmsBlock`|class|created|`src/Generated/Shared/Transfer/CmsBlockTransfer`| -|`CmsPage`|class|created|`src/Generated/Shared/Transfer/CmsPageTransfer`| -|`CmsPageAttributes`|class|created|`src/Generated/Shared/Transfer/CmsPageAttributesTransfer`| -|`CmsGlossary`|class|created|`src/Generated/Shared/Transfer/CmsGlossaryTransfer`| -|`CmsGlossaryAttributes`|class|created|`src/Generated/Shared/Transfer/CmsGlossaryAttributesTransfer`| -|`CmsPlaceholderTranslation`|class|created|`src/Generated/Shared/Transfer/CmsPlaceholderTranslationTransfer`| -|`CmsVersion`|class|created|`src/Generated/Shared/Transfer/CmsVersionTransfer`| -|`CmsVersionData`|class|created|`src/Generated/Shared/Transfer/CmsVersionDataTransfer`| -|`LocaleCmsPageData`|class|created|`src/Generated/Shared/Transfer/LocaleCmsPageDataTransfer`| -|`FlattenedLocaleCmsPageDataRequest`|class|created|`src/Generated/Shared/Transfer/FlattenedLocaleCmsPageDataRequestTransfer`| -|`StoreRelation`|class|created|`src/Generated/Shared/Transfer/StoreRelationTransfer`| -|`Store`|class|created|`src/Generated/Shared/Transfer/StoreTransfer`| -|`CmsBlockGlossary`|class|created|`src/Generated/Shared/Transfer/CmsBlockGlossaryTransfer`| -|`CmsBlockGlossaryPlaceholder`|class|created|`src/Generated/Shared/Transfer/CmsBlockGlossaryPlaceholderTransfer`| -|`CmsBlockGlossaryPlaceholderTranslation`|class|created|`src/Generated/Shared/Transfer/CmsBlockGlossaryPlaceholderTranslationTransfer`| -|`CmsBlockTemplate`|class|created|`src/Generated/Shared/Transfer/CmsBlockTemplateTransfer`| -|`Category`|class|created|`src/Generated/Shared/Transfer/CategoryTransfer`| -|`CmsBlockCategoryPosition`|class|created|`src/Generated/Shared/Transfer/CmsBlockCategoryPositionTransfer`| -|`CmsBlockProduct`|class|created|`src/Generated/Shared/Transfer/CmsBlockProductTransfer`| -|`CmsContentWidgetConfigurationList`|class|created|`src/Generated/Shared/Transfer/CmsContentWidgetConfigurationListTransfer`| -|`CmsContentWidgetConfiguration`|class|created|`src/Generated/Shared/Transfer/CmsContentWidgetConfigurationTransfer`| -|`CmsContentWidgetFunctions`|class|created|`src/Generated/Shared/Transfer/CmsContentWidgetFunctionsTransfer`| -|`CmsContentWidgetFunction`|class|created|`src/Generated/Shared/Transfer/CmsContentWidgetFunctionTransfer`| -|`CmsPageMetaAttributes`|class|created|`src/Generated/Shared/Transfer/CmsPageMetaAttributesTransfer`| -|`CmsSlot`|class|created|`src/Generated/Shared/Transfer/CmsSlotTransfer`| -|`CmsSlotBlock`|class|created|`src/Generated/Shared/Transfer/CmsSlotBlockTransfer`| -|`CmsSlotBlockCollection`|class|created|`src/Generated/Shared/Transfer/CmsSlotBlockCollectionTransfer`| -|`CmsSlotBlockCondition`|class|created|`src/Generated/Shared/Transfer/CmsSlotBlockConditionTransfer`| -|`CmsSlotBlockCriteria`|class|created|`src/Generated/Shared/Transfer/CmsSlotBlockCriteriaTransfer`| -|`CmsSlotBlockStorage`|class|created|`src/Generated/Shared/Transfer/CmsSlotBlockStorageTransfer`| -|`CmsSlotCriteria`|class|created|`src/Generated/Shared/Transfer/CmsSlotCriteriaTransfer`| -|`CmsSlotExternalData`|class|created|`src/Generated/Shared/Transfer/CmsSlotExternalDataTransfer`| -|`CmsSlotParams`|class|created|`src/Generated/Shared/Transfer/CmsSlotParamsTransfer`| -|`CmsSlotStorage`|class|created|`src/Generated/Shared/Transfer/CmsSlotStorageTransfer`| -|`CmsSlotTemplate`|class|created|`src/Generated/Shared/Transfer/CmsSlotTemplateTransfer`| -|`CmsSlotTemplateConfiguration`|class|created|`src/Generated/Shared/Transfer/CmsSlotTemplateConfigurationTransfer`| -|`ConstraintViolation`|class|created|`src/Generated/Shared/Transfer/ConstraintViolationTransfer`| -|`Filter`|class|created|`src/Generated/Shared/Transfer/FilterTransfer`| -|`Message`|class|created|`src/Generated/Shared/Transfer/MessageTransfer`| -|`ValidationResponse`|class|created|`src/Generated/Shared/Transfer/ValidationResponseTransfer`| - -{% endinfo_block %} - -### 3) Add Translations -Run the following command to update translations: - -```bash -console translator:generate-cache -``` - -{% info_block warningBox "Verification" %} - -You can switch the language in the **Back Office > User Control > User section > Edit > Interface language**. Make sure that the **Content Management** section is translatable. - -{% endinfo_block %} - -### 4) Configure Export to Redis and Elasticsearch -1. Set up event listeners. By doing this step, you enable tables to be published upon a change - create, edit or delete. - -| Plugin | Specification | Prerequisites | Namespace | -| --- | --- | --- | --- | -| `CmsStorageEventSubscriber` | Registers listeners that are responsible for publishing CMS pages to storage when a related entity changes. | None | `Spryker\Zed\CmsStorage\Communication\Plugin\Event\Subscriber` | -| `CmsBlockStorageEventSubscriber` | Registers listeners that are responsible for publishing CMS blocks to storage when a related entity changes. | None | `Spryker\Zed\CmsBlockStorage\Communication\Plugin\Event\Subscriber` | -| `CmsPageSearchEventSubscriber` | Registers listeners that are responsible for publishing CMS pages to Elasticsearch when a related entity changes. | None | `Spryker\Zed\CmsPageSearch\Communication\Plugin\Event\Subscriber` | -| `CmsSlotStorageEventSubscriber` | Registers listeners that are responsible for publishing slots to storage when a related entity changes. | None | `Spryker\Zed\CmsSlotStorage\Communication\Plugin\Event\Subscriber` | -| `CmsSlotBlockStorageEventSubscriber` | Registers listeners that are responsible for publishing slots to CMS block relations to storage when a related entity changes. | None | `Spryker\Zed\CmsSlotBlockStorage\Communication\Plugin\Event\Subscriber` | `ContentStorageEventSubscriber` | Registers listeners that are responsible for publishing content items to storage when a related entity changes. | None | `Spryker\Zed\ContentStorage\Communication\Plugin\Event\Subscriber` -| `CmsBlockCategoryStorageEventSubscriber` | Registers listeners that are responsible for publishing category to CMS block relations to storage when a related entity changes (optional) | None | `Spryker\Zed\CmsBlockCategoryStorage\Communication\Plugin\Event\Subscriber` | -| `CmsBlockProductStorageEventSubscriber` | Registers listeners that are responsible for publishing product to CMS block relations to storage when a related entity changes (optional) | None | `Spryker\Zed\CmsBlockProductStorage\Communication\Plugin\Event\Subscriber` | - -**Pyz\Zed\Event\EventDependencyProvider** - -```php -add(new CmsStorageEventSubscriber()); - $eventSubscriberCollection->add(new CmsBlockStorageEventSubscriber()); - $eventSubscriberCollection->add(new CmsSlotBlockStorageEventSubscriber()); - $eventSubscriberCollection->add(new CmsSlotStorageEventSubscriber()); - $eventSubscriberCollection->add(new ContentStorageEventSubscriber()); - - // Optional subscribers, use only if you need CMS Block relationship with categories or products. - $eventSubscriberCollection->add(new CmsBlockCategoryStorageEventSubscriber()); - $eventSubscriberCollection->add(new CmsBlockProductStorageEventSubscriber()); - - - /** - * Search Events - */ - $eventSubscriberCollection->add(new CmsPageSearchEventSubscriber()); - - return $eventSubscriberCollection; - } -} -``` - -2. Add Queue configuration. - -**Pyz\Zed\Queue\QueueDependencyProvider** - -```php - new SynchronizationStorageQueueMessageProcessorPlugin(), - CmsPageSearchConstants::CMS_SYNC_SEARCH_QUEUE => new SynchronizationSearchQueueMessageProcessorPlugin(), - ]; - } -} -``` - -**Pyz\Client\RabbitMq\RabbitMqConfig** - -```php -append($this->createQueueOption(CmsStorageConstants::CMS_SYNC_STORAGE_QUEUE, CmsStorageConstants::CMS_SYNC_STORAGE_ERROR_QUEUE)); - $queueOptionCollection->append($this->createQueueOption(CmsPageSearchConstants::CMS_SYNC_SEARCH_QUEUE, CmsPageSearchConstants::CMS_SYNC_SEARCH_ERROR_QUEUE)); - - return $queueOptionCollection; - } -} -``` - -3. Set up re-generate and re-sync features. - -**src/Pyz/Zed/CmsSlotStorage/CmsSlotStorageConfig.php** - -```php -Storage TypeTarget EntityExample Expected Data IdentifierRedis`CmsBlock``cms_block:de:de_de:blck-1`Redis`CmsBlockCategory``cms_block_category:5`Redis`CmsBlockProduct``cms_block_product:93`Redis`CmsPage``cms_page:de:de_de:1`Redis`CmsSlot``cms_slot:slt-1`Redis`CmsSlotBlock``cms_slot_block:@productdetailpage/views/pdp/pdp.twig:slt-5`Elasticsearch`CmsPage``cms_page:de:de_de:6` -{% endinfo_block %} - -**Example Expected Data Fragment: Redis, CmsBlock** - -```json -{ - "id_cms_block": 1, - "fk_template": 1, - "is_active": true, - "key": "blck-1", - "name": "Teaser for home page", - "valid_from": null, - "valid_to": null, - "CmsBlockTemplate": { - "id_cms_block_template": 1, - "template_name": "Title and description block", - "template_path": "@CmsBlock\/template\/title_and_description_block.twig" - }, - "SpyCmsBlockGlossaryKeyMappings": [ - { - "id_cms_block_glossary_key_mapping": 1, - "fk_cms_block": 1, - "fk_glossary_key": 1594, - "placeholder": "title", - "GlossaryKey": { - "id_glossary_key": 1594, - "is_active": true, - "key": "generated.cms.cms-block.Title-and-description-block.title.idCmsBlock.1.uniqueId.1" - } - }, - { - "id_cms_block_glossary_key_mapping": 2, - "fk_cms_block": 1, - "fk_glossary_key": 1595, - "placeholder": "description", - "GlossaryKey": { - "id_glossary_key": 1595, - "is_active": true, - "key": "generated.cms.cms-block.Title-and-description-block.description.idCmsBlock.1.uniqueId.1" - } - } - ], - "SpyCmsBlockStores": [ - { - "id_cms_block_store": 6, - "fk_cms_block": 1, - "fk_store": 3, - "SpyStore": { - "id_store": 3, - "name": "US" - } - }, - { - "id_cms_block_store": 5, - "fk_cms_block": 1, - "fk_store": 2, - "SpyStore": { - "id_store": 2, - "name": "AT" - } - }, - { - "id_cms_block_store": 4, - "fk_cms_block": 1, - "fk_store": 1, - "SpyStore": { - "id_store": 1, - "name": "DE" - } - } - ], - "content_widget_parameter_map": [], - "_timestamp": 1574922736.1419849 -} -``` - -**Example Expected Data Fragment: Redis, CmsBlockCategory** - -```json -{ - "id_category": 5, - "cms_block_categories": [ - { - "position": "top", - "block_names": [ - "CMS block for category Computers" - ], - "block_keys": [ - "blck-7" - ] - } - ], - "_timestamp": 1574922738.1811531 -} -``` - -**Example Expected Data Fragment: Redis, CmsBlockProduct** - -```json -{ - "id_product_abstract": 93, - "block_names": - [ - "Product SEO content" - ], - "block_keys": - [ - "blck-3" - ] -} -``` - -**Example Expected Data Fragment: Redis, CmsPage** - -```json -{ - "id_cms_page": 1, - "name": "Impressum", - "template_path": "@Cms\/templates\/placeholders-title-content\/placeholders-title-content.twig", - "placeholders": { - "title": "

              Impressum<\/h2>", - "content": "content page" - }, - "meta_title": "Impressum", - "meta_keywords": "Impressum", - "meta_description": "Impressum", - "url": "\/de\/impressum", - "valid_from": null, - "valid_to": null, - "is_active": true, - "is_searchable": null, - "store_name": null, - "content_widget_parameter_map": [], - "_timestamp": 1574922739.2661631 -} -``` - -**Example Expected Data Fragment: Redis, CmsSlot** - -```json -{ - "key": "slt-1", - "content_provider_type": "SprykerCmsSlotBlock", - "name": "Main", - "description": "As homepage is all content so it has one slot.", - "is_active": true, - "_timestamp": 1574922740.299572 -} -``` - -**Example Expected Data Fragment: Redis, CmsSlotBlock** - -```json -{ - "cmsSlotBlocks": [ - { - "cmsBlockKey": "blck-3", - "conditions": { - "productCategory": { - "all": false, - "productIds": [ - 35, - 66, - 78, - 86, - 93, - 139 - ], - "categoryIds": [] - } - } - } - ], - "_timestamp": 1574937317.705245 -} -``` - -**Example Expected Data Fragment: Elasticsearch, CmsPage** - -```json -{ - "store":"DE", - "locale":"de_DE", - "type":"cms_page", - "is-active":true, - "search-result-data": { - "id_cms_page":6, - "name":"Demo Landing Page", - "type":"cms_page", - "url":"/de/demo-landing-page", - }, - "full-text-boosted": [ - "Demo Landing Page", - ], - "full-text": [ - "Demo Landing Page", - "demo,cms page, landing page", - "This is a demo landing page with different content widgets.", - "

              DAS IST EINE GROßARTIGE LANDING PAGE

              ,

              {% raw %}{{{% endraw %} content_banner(\'a396f4cb-2318-5b33-8d85-413354ca5673\', \'top-title\'} {% raw %}}}{% endraw %}


              " - ], - "suggestion-terms": [ - "Demo Landing Page" - ], - "completion-terms": [ - "Demo Landing Page" - ], - "string-sort": { - "name":"Demo Landing Page" - } -} -``` - -### 6) Import Data -#### Import Cms Pages -1. Prepare your pages data according to your requirements using our demo data: - -
              -vendor/spryker/cms-page-data-import/data/import/cms_page.csv - -```yaml -template_name,is_searchable,is_active,publish,page_key,url.de_DE,url.en_US,name.de_DE,name.en_US,meta_title.de_DE,meta_title.en_US,meta_keywords.de_DE,meta_keywords.en_US,meta_description.de_DE,meta_description.en_US,placeholder.title.de_DE,placeholder.title.en_US,placeholder.content.de_DE,placeholder.content.en_US -static full page,1,1,1,page_1,/de/impressum,/en/imprint,Impressum,Imprint,Impressum,Imprint,Impressum,Imprint,Impressum,Imprint,

              Impressum

              ,

              About

              ,"

              Demoshop
              - Julie-Wolfthornstraße 1
              10555 Berlin

              - -

              Telefon: 030 5678909
              - E-Mail: info@spryker.com
              -

              - -

              Vertreten durch:
              Spryker
              Geschäftsführer: Max Mustermann
              Registergericht: Hamburg
              Registernummer: - 56789

              - -

              Registereintrag:
              Eingetragen im Handelsregister.
              Registergericht: Hamburg
              Registernummer: - 34567888456789

              - -

              Umsatzsteuer-ID:
              Umsatzsteuer-Identifikationsnummer nach §27a Umsatzsteuergesetz:
              34567

              - -

              Quelle: www.experten-branchenbuch.de



              - -

              Datenschutzerklärung:

              - -

              Datenschutz
              Nachfolgend möchten wir Sie über unsere Datenschutzerklärung informieren. Sie finden - hier Informationen über die Erhebung und Verwendung persönlicher Daten bei der Nutzung unserer Webseite. Wir - beachten dabei das für Deutschland geltende Datenschutzrecht. Sie können diese Erklärung jederzeit auf unserer - Webseite abrufen. -

              - Wir weisen ausdrücklich darauf hin, dass die Datenübertragung im Internet (z.B. bei der Kommunikation per E-Mail) - Sicherheitslücken aufweisen und nicht lückenlos vor dem Zugriff durch Dritte geschützt werden kann. -

              - Die Verwendung der Kontaktdaten unseres Impressums zur gewerblichen Werbung ist ausdrücklich nicht erwünscht, es sei - denn wir hatten zuvor unsere schriftliche Einwilligung erteilt oder es besteht bereits eine Geschäftsbeziehung. Der - Anbieter und alle auf dieser Website genannten Personen widersprechen hiermit jeder kommerziellen Verwendung und - Weitergabe ihrer Daten. -

              - Personenbezogene Daten -
              - Sie können unsere Webseite ohne Angabe personenbezogener Daten besuchen. Soweit auf unseren Seiten personenbezogene - Daten (wie Name, Anschrift oder E-Mail Adresse) erhoben werden, erfolgt dies, soweit möglich, auf freiwilliger - Basis. Diese Daten werden ohne Ihre ausdrückliche Zustimmung nicht an Dritte weitergegeben. Sofern zwischen Ihnen - und uns ein Vertragsverhältnis begründet, inhaltlich ausgestaltet oder geändert werden soll oder Sie an uns eine - Anfrage stellen, erheben und verwenden wir personenbezogene Daten von Ihnen, soweit dies zu diesen Zwecken - erforderlich ist (Bestandsdaten). Wir erheben, verarbeiten und nutzen personenbezogene Daten soweit dies - erforderlich ist, um Ihnen die Inanspruchnahme des Webangebots zu ermöglichen (Nutzungsdaten). Sämtliche - personenbezogenen Daten werden nur solange gespeichert wie dies für den geannten Zweck (Bearbeitung Ihrer Anfrage - oder Abwicklung eines Vertrags) erforderlich ist. Hierbei werden steuer- und handelsrechtliche Aufbewahrungsfristen - berücksichtigt. Auf Anordnung der zuständigen Stellen dürfen wir im Einzelfall Auskunft über diese Daten - (Bestandsdaten) erteilen, soweit dies für Zwecke der Strafverfolgung, zur Gefahrenabwehr, zur Erfüllung der - gesetzlichen Aufgaben der Verfassungsschutzbehörden oder des Militärischen Abschirmdienstes oder zur Durchsetzung - der Rechte am geistigen Eigentum erforderlich ist.

              - -

              Auskunftsrecht
              Sie haben das jederzeitige Recht, sich unentgeltlich und unverzüglich über die zu - Ihrer Person erhobenen Daten zu erkundigen. Sie haben das jederzeitige Recht, Ihre Zustimmung zur Verwendung Ihrer - angegeben persönlichen Daten mit Wirkung für die Zukunft zu widerrufen. Zur Auskunftserteilung wenden Sie sich bitte - an den Anbieter unter den Kontaktdaten im Impressum.

              ","

              Demoshop
              - Julie-Wolfthornstraße 1
              10555 Berlin

              - -

              Telephone: 030 5678909
              - E-Mail: info@spryker.com
              -

              - -

              Represented by
              Spryker
              Managing Director: Max Mustermann
              Register Court: Hamburg
              Register Number: - 56789

              - -

              Register Entry:
              Entry in Handelsregister.
              Register Court: Hamburg
              Register number: - 34567888456789

              - -

              Source: Muster-Vorlagen.net – Impressum Generator



              - -

              Disclaimer:

              - -

              Accountability for content
              - The contents of our pages have been created with the utmost care. However, we cannot guarantee the contents' accuracy, - completeness or topicality. According to statutory provisions, we are furthermore responsible for our own content on these - web pages. In this context, please note that we are accordingly not obliged to monitor merely the transmitted or saved information - of third parties, or investigate circumstances pointing to illegal activity. Our obligations to remove or block the use of - information under generally applicable laws remain unaffected by this as per §§ 8 to 10 of the Telemedia Act (TMG). -

              - - Accountability for links
              - Responsibility for the content of external links (to web pages of third parties) lies solely with the operators of the - linked pages. No violations were evident to us at the time of linking. Should any legal infringement become known to us, we - will remove the respective link immediately.

              - -

              Copyright
              - Our web pages and their contents are subject to German copyright law. Unless expressly permitted by law (§ 44a et seq. - of the copyright law), every form of utilizing, reproducing or processing works subject to copyright protection on our web - pages requires the prior consent of the respective owner of the rights. Individual reproductions of a work are allowed only - for private use, so must not serve either directly or indirectly for earnings. Unauthorized utilization of copyrighted works - is punishable (§ 106 of the copyright law).

              " -static full page,1,1,1,page_2,/de/agb,/en/gtc,AGB,GTC,AGB,GTC,AGB,GTC,AGB,GTC,

              Allgemeine Geschäftsbedingungen (AGB)

              ,

              General Terms and Conditions (GTC)

              ,"

              Allgemeine Geschäftsbedingungen (AGB)

              - ]]> - - - content - -

              -§ 1 Geltungsbereich & Abwehrklausel -

              - -
              (1) Für die über diesen Internet-Shop begründeten Rechtsbeziehungen zwischen dem Betreiber des - Shops (nachfolgend „Anbieter“) und seinen Kunden gelten ausschließlich die folgenden Allgemeinen - Geschäftsbedingungen in der jeweiligen Fassung zum Zeitpunkt der Bestellung. -

              - (2) Abweichende Allgemeine Geschäftsbedingungen des Kunden werden zurückgewiesen. -
              -

              -§ 2 Zustandekommen des Vertrages -

              - -
              (1) Die Präsentation der Waren im Internet-Shop stellt kein bindendes Angebot des Anbieters auf - Abschluss eines Kaufvertrages dar. Der Kunde wird hierdurch lediglich aufgefordert, durch eine Bestellung ein - Angebot abzugeben. -

              - (2) Durch das Absenden der Bestellung im Internet-Shop gibt der Kunde ein verbindliches Angebot gerichtet auf den - Abschluss eines Kaufvertrages über die im Warenkorb enthaltenen Waren ab. Mit dem Absenden der Bestellung erkennt - der Kunde auch diese Geschäftsbedingungen als für das Rechtsverhältnis mit dem Anbieter allein maßgeblich an. -

              - (3) Der Anbieter bestätigt den Eingang der Bestellung des Kunden durch Versendung einer Bestätigungs-E-Mail. Diese - Bestellbestätigung stellt noch nicht die Annahme des Vertragsangebotes durch den Anbieter dar. Sie dient lediglich - der Information des Kunden, dass die Bestellung beim Anbieter eingegangen ist. Die Erklärung der Annahme des - Vertragsangebotes erfolgt durch die Auslieferung der Ware oder eine ausdrückliche Annahmeerklärung. -
              -

              - -§ 3 Eigentumsvorbehalt -

              - -
              Die gelieferte Ware verbleibt bis zur vollständigen Bezahlung im Eigentum des Anbieters. - -
              -

              -§ 4 Fälligkeit -

              - -
              Die Zahlung des Kaufpreises ist mit Vertragsschluss fällig.
              - -

              -§ 5 Gewährleistung -

              - -
              (1) Die Gewährleistungsrechte des Kunden richten sich nach den allgemeinen gesetzlichen - Vorschriften, soweit nachfolgend nichts anderes bestimmt ist. Für Schadensersatzansprüche des Kunden gegenüber dem - Anbieter gilt die Regelung in § 6 dieser AGB. -

              - (2) Die Verjährungsfrist für Gewährleistungsansprüche des Kunden beträgt bei Verbrauchern bei neu hergestellten - Sachen 2 Jahre, bei gebrauchten Sachen 1 Jahr. Gegenüber Unternehmern beträgt die Verjährungsfrist bei neu - hergestellten Sachen und bei gebrauchten Sachen 1 Jahr. - Die vorstehende Verkürzung der Verjährungsfristen gilt nicht für Schadensersatzansprüche des Kunden aufgrund einer - Verletzung des Lebens, des Körpers, der Gesundheit sowie für Schadensersatzansprüche aufgrund einer Verletzung - wesentlicher Vertragspflichten. Wesentliche Vertragspflichten sind solche, deren Erfüllung zur Erreichung des Ziels - des Vertrags notwendig ist, z.B. hat der Anbieter dem Kunden die Sache frei von Sach- und Rechtsmängeln zu übergeben - und - das Eigentum an ihr zu verschaffen. - Die vorstehende Verkürzung der Verjährungsfristen gilt ebenfalls nicht für Schadensersatzansprüche, die auf einer - vorsätzlichen oder grob fahrlässigen Pflichtverletzung des Anbieters, seiner gesetzlichen Vertreter oder - Erfüllungsgehilfen beruhen. - Gegenüber Unternehmern ebenfalls ausgenommen von der Verkürzung der Verjährungsfristen ist - der Rückgriffsanspruch nach § 478 BGB. - -

              - (3) Eine Garantie wird von dem Anbieter nicht erklärt. - -
              -

              -§ 6 Haftungsausschluss -

              - -
              (1) Schadensersatzansprüche des Kunden sind ausgeschlossen, soweit nachfolgend nichts anderes - bestimmt ist. Der vorstehende Haftungsausschluss gilt auch zugunsten der gesetzlichen Vertreter und - Erfüllungsgehilfen des Anbieters, sofern der Kunde Ansprüche gegen diese geltend macht. -

              - (2) Von dem unter Ziffer 1 bestimmten Haftungsausschluss ausgenommen sind Schadensersatzansprüche aufgrund einer - Verletzung des Lebens, des Körpers, der Gesundheit und Schadensersatzansprüche aus der Verletzung wesentlicher - Vertragspflichten. Wesentliche Vertragspflichten sind solche, deren Erfüllung zur Erreichung des Ziels des Vertrags - notwendig ist, z.B. hat der Anbieter dem Kunden die Sache frei von Sach- und Rechtsmängeln zu übergeben und - das Eigentum an ihr zu verschaffen. Von dem Haftungsausschluss ebenfalls ausgenommen ist die Haftung für Schäden, - die auf einer vorsätzlichen oder grob fahrlässigen Pflichtverletzung des Anbieters, seiner gesetzlichen Vertreter - oder Erfüllungsgehilfen beruhen. -

              - (3) Vorschriften des Produkthaftungsgesetzes (ProdHaftG) bleiben unberührt. - -
              -

              -§ 7 Abtretungs- und Verpfändungsverbot -

              - -
              Die Abtretung oder Verpfändung von dem Kunden gegenüber dem Anbieter zustehenden - Ansprüchen oder Rechten ist ohne Zustimmung des Anbieters ausgeschlossen, sofern der Kunde - nicht ein berechtigtes Interesse an der Abtretung oder Verpfändung nachweist. - -
              -

              -§ 8 Aufrechnung -

              - -
              Ein Aufrechnungsrecht des Kunden besteht nur, wenn seine zur Aufrechnung gestellte Forderung - rechtskräftig festgestellt wurde oder unbestritten ist. - -
              -

              -§ 9 Rechtswahl & Gerichtsstand -

              - -
              (1) Auf die vertraglichen Beziehungen zwischen dem Anbieter und dem Kunden findet das Recht der - Bundesrepublik Deutschland Anwendung. Von dieser Rechtswahl ausgenommen sind die - zwingenden Verbraucherschutzvorschriften des Landes, in dem der Kunde seinen gewöhnlichen - Aufenthalt hat. Die Anwendung des UN-Kaufrechts ist ausgeschlossen. -

              - (2) Gerichtsstand für alle Streitigkeiten aus dem Vertragsverhältnis zwischen dem Kunden und dem Anbieter ist der - Sitz des Anbieters, sofern es sich bei dem Kunden um einen Kaufmann, eine juristische Person des öffentlichen Rechts - oder ein öffentlich-rechtliches Sondervermögen handelt. - -
              -

              -§ 10 Salvatorische Klausel - -
              Sollte eine Bestimmung dieser Allgemeinen Geschäftsbedingungen unwirksam sein, wird davon die - Wirksamkeit der übrigen Bestimmungen nicht berührt. -
              -

              - -
              -
              -Quelle: kluge-recht.de -
              ","
              -

              -General Terms -

              - -
              (1) This privacy policy has been compiled to better serve those who are concerned with how their -'Personally identifiable information' (PII) is being used online. PII, as used in US privacy law and information security, -is information that can be used on its own or with other information to identify, contact, or locate a single person, or -to identify an individual in context. Please read our privacy policy carefully to get a clear understanding of how we collect, -use, protect or otherwise handle your Personally Identifiable Information in accordance with our website. -

              - (2) We do not collect information from visitors of our site or other details to help you with your experience. -
              -

              -Using your Information -

              - -
              We may use the information we collect from you when you register, make a purchase, sign up -for our newsletter, respond to a survey or marketing communication, surf the website, or use certain other site features -in the following ways: -

              - To personalize user's experience and to allow us to deliver the type of content and product offerings in which you - are most interested. -
              -

              - -Protecting visitor information -

              - -
              Our website is scanned on a regular basis for security holes and known vulnerabilities in -order to make your visit to our site as safe as possible. Your personal information is contained behind secured networks -and is only accessible by a limited number of persons who have special access rights to such systems, and are required to - keep the information confidential. In addition, all sensitive/credit information you supply is encrypted via Secure Socket - Layer (SSL) technology. -
              -

              -Cookies -

              - -
              We do not use cookies for tracking purposes. You can choose to have your computer warn you each time a -cookie is being sent, or you can choose to turn off all cookies. You do this through your browser (like Internet Explorer) -settings. Each browser is a little different, so look at your browser's Help menu to learn the correct way to modify your cookies. -If you disable cookies off, some features will be disabled that make your site experience more efficient and some of our services will -not function properly. -
              - -

              -Google -

              - -
              Google's advertising requirements can be summed up by Google's Advertising Principles. They are put -in place to provide a positive experience for users. https://support.google.com/adwordspolicy/answer/1316548?hl=en -We use Google AdSense Advertising on our website. Google, as a third-party vendor, uses cookies to serve ads on our site. -Google's use of the DART cookie enables it to serve ads to our users based on previous visits to our site and other sites on -the Internet. Users may opt-out of the use of the DART cookie by visiting the Google Ad and Content Network privacy policy. -
              -

              -Implementation -

              - -
              We along with third-party vendors, such as Google use first-party cookies (such as the Google Analytics -cookies) and third-party cookies (such as the DoubleClick cookie) or other third-party identifiers together to compile data -regarding user interactions with ad impressions and other ad service functions as they relate to our website. - Users can set preferences for how Google advertises to you using the Google Ad Settings page. Alternatively, you can opt - out by visiting the Network Advertising initiative opt out page or permanently using the Google Analytics Opt Out Browser add on. -
              -

              - - -
              -
              -
              " -static full page,1,1,1,page_3,/de/datenschutz,/en/privacy,Datenschutzerklärung,Data Privacy,Datenschutzerklärung,Data Privacy,Datenschutzerklärung,Data Privacy,Datenschutzerklärung,Data Privacy,

              Datenschutzerklärung

              ,

              Data Privacy Policy

              ,"

              Die Nutzung unserer Seite ist ohne eine Angabe von personenbezogenen Daten möglich. Für die Nutzung einzelner - Services unserer Seite können sich hierfür abweichende Regelungen ergeben, die in diesem Falle nachstehend gesondert - erläutert werden. Ihre personenbezogenen Daten (z.B. Name, Anschrift, E-Mail, Telefonnummer, u.ä.) werden von uns - nur gemäß den Bestimmungen des deutschen Datenschutzrechts verarbeitet. Daten sind dann personenbezogen, wenn sie - eindeutig einer bestimmten natürlichen Person zugeordnet werden können. Die rechtlichen Grundlagen des Datenschutzes - finden Sie im Bundesdatenschutzgesetz (BDSG) und dem Telemediengesetz (TMG). Nachstehende Regelungen informieren Sie - insoweit über die Art, den Umfang und Zweck der Erhebung, die Nutzung und die Verarbeitung von personenbezogenen - Daten durch den Anbieter

              - -

              Wir weisen darauf hin, dass die internetbasierte Datenübertragung Sicherheitslücken aufweist, ein lückenloser Schutz - vor Zugriffen durch Dritte somit unmöglich ist.

              - -

              Auskunft/Widerruf/Löschung

              - -

              Sie können sich aufgrund des Bundesdatenschutzgesetzes bei Fragen zur Erhebung, Verarbeitung oder Nutzung Ihrer - personenbezogenen Daten und deren Berichtigung, Sperrung, Löschung oder einem Widerruf einer erteilten Einwilligung - unentgeltlich an uns wenden. Wir weisen darauf hin, dass Ihnen ein Recht auf Berichtigung falscher Daten oder - Löschung personenbezogener Daten zusteht, sollte diesem Anspruch keine gesetzliche Aufbewahrungspflicht - entgegenstehen.

              - -

              - Muster-Datenschutzerklärung - der Anwaltskanzlei Weiß & Partner

              ","

              Our website may be used without entering personal information. Different rules may apply to certain services on our site, - however, and are explained separately below. We collect personal information from you (e.g. name, address, email address, - telephone number, etc.) in accordance with the provisions of German data protection statutes. Information is considered - personal if it can be associated exclusively to a specific natural person. The legal framework for data protection may be found - in the German Federal Data Protection Act (BDSG) and the Telemedia Act (TMG). The provisions below serve to provide information - as to the manner, extent and purpose for collecting, using and processing personal information by the provider.

              - -

              Please be aware that data transfer via the internet is subject to security risks and, therefore, complete protection -against third-party access to transferred data cannot be ensured.

              - -

              Information/Cancellation/Deletion

              - -

              On the basis of the Federal Data Protection Act, you may contact us at no cost if you have questions relating to the -collection, processing or use of your personal information, if you wish to request the correction, blocking or deletion of the -same, or if you wish to cancel explicitly granted consent. Please note that you have the right to have incorrect data corrected or -to have personal data deleted, where such claim is not barred by any legal obligation to retain this data.

              - -

              - Sample Data Privacy Policy Statement - provided by the Law Offices of Weiß & Partner

              " -static full page,1,0,1,page_4,/de/loremde,/en/lorem,Lorem ipsum,Lorem ipsum,Lorem ipsum,Lorem ipsum,Lorem ipsum,Lorem ipsum,Lorem ipsum,Lorem ipsum,Lorem ipsum,Lorem ipsum,"{% raw %}{{{% endraw %} chart('testChart', 'testChart') {% raw %}}}{% endraw %}
              Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem.","{% raw %}{{{% endraw %} chart('testChart', 'testChart') {% raw %}}}{% endraw %}
              Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem." -static full page,1,1,0,page_5,/de/dolorde,/en/dolor,Dolor sit amet,Dolor sit amet,Dolor sit amet,Dolor sit amet,Dolor sit amet,Dolor sit amet,Dolor sit amet,Dolor sit amet,Lorem ipsum,Lorem ipsum,"Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem.","Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem." -static full page,1,1,1,page_6,/de/demo-landing-page,/en/demo-landing-page,Demo Landing Page,Demo Landing Page,Demo Landing Page,Demo Landing Page,"demo,cms page, landing page","demo,cms page, landing page",This is a demo landing page with different content widgets.,This is a demo landing page with different content widgets.,"

              DAS IST EINE GROßARTIGE LANDING PAGE

              ","

              THIS IS A GREAT LANDING PAGE

              ","

              Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras non erat felis. Suspendisse nulla quam, dictum vitae malesuada a, ullamcorper eu urna. Sed diam tellus, feugiat iaculis consequat eu, commodo in dui. Integer ac ipsum urna. Aliquam rhoncus varius felis at dignissim. Nulla id justo id nunc lacinia efficitur. Etiam nec vehicula lorem. Phasellus ut lacus eu lorem luctus luctus. Quisque id vestibulum lectus, vel aliquam erat. Praesent ut erat quis magna varius tempor et sed sapien. Cras ac turpis id ligula gravida dignissim in sed nisl. Suspendisse scelerisque eros vel risus sagittis, in ultricies odio commodo. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae.

              Duis nunc dolor, vestibulum eu cursus ut, facilisis eget justo. Ut quis placerat mauris. In cursus enim purus, a mollis felis cursus non. Mauris rutrum a ante a rutrum. Aliquam gravida tortor et cursus pharetra. Ut id sagittis arcu, eu convallis felis. Integer fermentum convallis lorem, eu posuere ex ultricies scelerisque. Suspendisse et consectetur mauris, vel rhoncus elit. Sed ultrices eget lacus quis rutrum. Aliquam erat volutpat. Aliquam varius mauris purus, non imperdiet turpis tempor vel. Donec vitae scelerisque mi.


              Dies ist eine Liste von Produkten auf einer CMS Seite:

              - -{% raw %}{{{% endraw %} product(['093', '066', '035', '083', '021','055']) {% raw %}}}{% endraw %} - -


              Sed volutpat felis non elit elementum fermentum. Sed sit amet nunc lacinia ligula malesuada pretium. Duis imperdiet sem id nibh tristique, non convallis nunc luctus. Fusce congue vestibulum purus in rhoncus. Suspendisse eu nisl non diam ornare convallis. Nullam cursus, magna vitae porttitor consectetur, leo justo volutpat augue, vitae gravida eros metus ac diam. Donec iaculis diam at massa posuere posuere. Ut molestie, mauris nec tempus aliquam, massa mauris pellentesque ligula, eu mattis quam diam nec magna. Nunc ante odio, pulvinar ac nisl quis, efficitur eleifend enim. Nam consectetur placerat ligula, nec aliquet eros feugiat quis.

              Sed eget imperdiet dolor. Nullam fringilla facilisis odio eu mattis. Morbi nibh erat, ornare et malesuada vel, commodo vel ligula. Donec maximus odio dolor, in aliquam mi tempus eu. Vivamus imperdiet imperdiet hendrerit. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Donec quis dapibus libero, id sagittis dolor. Sed efficitur malesuada turpis sit amet efficitur. Etiam mattis ex elit, sit amet cursus sapien maximus id. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas.


              Dies ist eine Liste von Produkt-Gruppen auf einer CMS Seite:

              - -{% raw %}{{{% endraw %} product_group(['095', '009', '052', '005', '188', '090', '084', '195']) {% raw %}}}{% endraw %} - -


              Curabitur ipsum nulla, mollis vel tellus a, tristique tempor sapien. Mauris ut urna molestie, cursus nunc eget, lacinia erat. Donec efficitur, nisl a porta dapibus, nisi ipsum efficitur ipsum, eu auctor turpis ipsum vel sapien. Maecenas molestie risus odio. Suspendisse lobortis dapibus nisi non accumsan. Ut mattis tincidunt odio eu convallis. Nulla leo neque, scelerisque eu sagittis vitae, consectetur vel lacus. Aliquam erat volutpat. Nam euismod aliquet urna eget congue.


              Dies ist ein Produkt-Set auf einer CMS Seite:

              -{% raw %}{{{% endraw %} product_set(['2_sony_set']) {% raw %}}}{% endraw %}","

              Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras non erat felis. Suspendisse nulla quam, dictum vitae malesuada a, ullamcorper eu urna. Sed diam tellus, feugiat iaculis consequat eu, commodo in dui. Integer ac ipsum urna. Aliquam rhoncus varius felis at dignissim. Nulla id justo id nunc lacinia efficitur. Etiam nec vehicula lorem. Phasellus ut lacus eu lorem luctus luctus. Quisque id vestibulum lectus, vel aliquam erat. Praesent ut erat quis magna varius tempor et sed sapien. Cras ac turpis id ligula gravida dignissim in sed nisl. Suspendisse scelerisque eros vel risus sagittis, in ultricies odio commodo. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae.

              Duis nunc dolor, vestibulum eu cursus ut, facilisis eget justo. Ut quis placerat mauris. In cursus enim purus, a mollis felis cursus non. Mauris rutrum a ante a rutrum. Aliquam gravida tortor et cursus pharetra. Ut id sagittis arcu, eu convallis felis. Integer fermentum convallis lorem, eu posuere ex ultricies scelerisque. Suspendisse et consectetur mauris, vel rhoncus elit. Sed ultrices eget lacus quis rutrum. Aliquam erat volutpat. Aliquam varius mauris purus, non imperdiet turpis tempor vel. Donec vitae scelerisque mi.


              This is a list of products in a CMS page:

              - -{% raw %}{{{% endraw %} product(['093', '066', '035', '083', '021','055']) {% raw %}}}{% endraw %} - -


              Sed volutpat felis non elit elementum fermentum. Sed sit amet nunc lacinia ligula malesuada pretium. Duis imperdiet sem id nibh tristique, non convallis nunc luctus. Fusce congue vestibulum purus in rhoncus. Suspendisse eu nisl non diam ornare convallis. Nullam cursus, magna vitae porttitor consectetur, leo justo volutpat augue, vitae gravida eros metus ac diam. Donec iaculis diam at massa posuere posuere. Ut molestie, mauris nec tempus aliquam, massa mauris pellentesque ligula, eu mattis quam diam nec magna. Nunc ante odio, pulvinar ac nisl quis, efficitur eleifend enim. Nam consectetur placerat ligula, nec aliquet eros feugiat quis.

              Sed eget imperdiet dolor. Nullam fringilla facilisis odio eu mattis. Morbi nibh erat, ornare et malesuada vel, commodo vel ligula. Donec maximus odio dolor, in aliquam mi tempus eu. Vivamus imperdiet imperdiet hendrerit. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Donec quis dapibus libero, id sagittis dolor. Sed efficitur malesuada turpis sit amet efficitur. Etiam mattis ex elit, sit amet cursus sapien maximus id. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas.


              This is a list of product groups in a CMS page:

              - -{% raw %}{{{% endraw %} product_group(['095', '009', '052', '005', '188', '090', '084', '195']) {% raw %}}}{% endraw %} - -


              Curabitur ipsum nulla, mollis vel tellus a, tristique tempor sapien. Mauris ut urna molestie, cursus nunc eget, lacinia erat. Donec efficitur, nisl a porta dapibus, nisi ipsum efficitur ipsum, eu auctor turpis ipsum vel sapien. Maecenas molestie risus odio. Suspendisse lobortis dapibus nisi non accumsan. Ut mattis tincidunt odio eu convallis. Nulla leo neque, scelerisque eu sagittis vitae, consectetur vel lacus. Aliquam erat volutpat. Nam euismod aliquet urna eget congue.


              This a product set in a CMS page:

              -{% raw %}{{{% endraw %} product_set(['2_sony_set']) {% raw %}}}{% endraw %}" -``` -
              - -| Column | Is obligatory? | Data type | Data example | Data explanation | -| --- | --- | --- | --- | --- | -| `template_name` | mandatory | string | `static full` | Template name. | -| `is_searchable` | mandatory | bool | 1 | Flag that defines if entity is searchable. | -| `is_active` | mandatory | bool | 0 | Flag that defines if entity is active. | -| `publish` | mandatory | bool | 1 | Flag that defines if entity is published. | -| `page_key` | mandatory | string | `page_5` | Unique page identifier. | -| `url.*(de_DE,en_US)` | mandatory | string | `/de/lorem` | Page URL. | -| `name.*(de_DE,en_US)` | mandatory | string | `Lorem ipsum` | Page name. | -| `meta_title.*(de_DE,en_US)` | mandatory | string | `Lorem ipsum` | Meta title. | -| `meta_keywords.*(de_DE,en_US)` | mandatory | string | `Lorem ipsum` | Meta keywords. | -| `meta_description.*(de_DE,en_US)` | mandatory | string | `Lorem ipsum` | Meta description. | -| `placeholder.title.*(de_DE,en_US)` | mandatory | string | `Lorem ipsum` | Title сontent. | -| `placeholder.content.*(de_DE,en_US)` | mandatory | string | `Lorem ipsum` | Page content. | - -**vendor/spryker/cms-page-data-import/data/import/cms_page_store.csv** - -```yaml -page_key,store_name -page_1,DE -page_1,AT -page_1,US -page_2,DE -page_2,AT -page_2,US -page_3,DE -page_3,AT -page_3,US -page_4,DE -page_4,AT -page_4,US -page_5,DE -page_5,AT -page_5,US -page_6,DE -page_6,AT -page_6,US -``` - -| Column | Is obligatory? | Data type | Data example | Data explanation | -| --- | --- | --- | --- | --- | -| `page_key` | mandatory | string | `page_5` | Unique page identifier. | -| `store_name` | mandatory | string | `DE` | Unique store identifier. | - -**vendor/spryker/cms-slot-data-import/data/import/cms_slot_template.csv** - -```yaml -template_path,name,description -@ShopUI/templates/page-layout-main/page-layout-main.twig,"Main Layout","Defines the main layout of the Store of areas that are repeatable sections across the Store." -@HomePage/views/home/home.twig,"Home Page","Defines the main layout of the Home Page everything below Header and above Footer." -@CatalogPage/views/catalog/catalog.twig,Category,"Defines the main layout of the Categories Page, everything below Header and above Footer. Same template is used for all the Categories." -@ProductDetailPage/views/pdp/pdp.twig,"Product","Defines the main layout of the Product Page, everything below Header and above Footer. Same template is used for all the Products." -``` - -| Column | Is obligatory? | Data type | Data example | Data explanation | -| --- | --- | --- | --- | --- | -| `template_path` | mandatory | string | `@HomePage/views/home/home.twig` | Unique path to the corresponding Twig file. | -| `name` | mandatory | string | Home Page | Template name used in the Back Office. | -| `description` | no | string | text | Template description used in the Back Office. | - -**vendor/spryker/cms-slot-data-import/data/import/cms_slot.csv** - -```yaml -template_path,slot_key,content_provider,name,description,is_active -@ShopUI/templates/page-layout-main/page-layout-main.twig,slt-1,SprykerCmsSlotBlock,"Header Top","A content area in the Header section, that is below the logo and search section and above main navigation. ",1 -@ShopUI/templates/page-layout-main/page-layout-main.twig,slt-2,SprykerCmsSlotBlock,"Header Bottom","A content area in the Header section, that is at the bottom of the Header, below the main navigation.",1 -@ShopUI/templates/page-layout-main/page-layout-main.twig,slt-3,SprykerCmsSlotBlock,Footer,"A content area in the Footer section, that is above the all the fixed content in the Footer.",1 -@HomePage/views/home/home.twig,slt-4,SprykerCmsSlotBlock,"Home Page Main","Homepage is fully a content page so it has one slot to have as many blocks as needed.",1 -@CatalogPage/views/catalog/catalog.twig,slt-5,SprykerCmsSlotBlock,Top,"A content area in the Header section.",1 -@CatalogPage/views/catalog/catalog.twig,slt-6,SprykerCmsSlotBlock,Middle,"A content area in the Body section.",1 -@CatalogPage/views/catalog/catalog.twig,slt-7,SprykerCmsSlotBlock,Bottom,"A content area in the Footer section.",1 -@ProductDetailPage/views/pdp/pdp.twig,slt-8,SprykerCmsSlotBlock,Bottom,"A content area in the Footer section.",1 -``` - -| Column | Is obligatory? | Data type | Data example | Data explanation | -| --- | --- | --- | --- | --- | -| `template_path` | mandatory | string | `@HomePage/views/home/home.twig` | Path to the Twig template to which slot is assigned. | -| `slot_key` | mandatory | string | `slt-4` |Unique slot identifier. | -| `content_provider` | mandatory | string | `SprykerCmsSlotBlock` | Unique content provider identifier. | -| `name` | mandatory | string | `Home Page Main` | Slot name used in the Back Office. | -| `description` | no | string | `text` | Slot description used in the Back Office. | -| `is_active` | mandatory | bool | 1 | Flag that defines if slot is active. | - -**vendor/spryker/cms-slot-block-data-import/data/import/cms_slot_block.csv** - -```yaml -template_path,slot_key,block_key,position,conditions.productCategory.all,conditions.productCategory.skus,conditions.productCategory.category_key,conditions.category.all,conditions.category.category_key,conditions.cms_page.all,conditions.cms_page.page_key -"@HomePage/views/home/home.twig",slt-1,blck-2,1,,,,,,1, -"@HomePage/views/home/home.twig",slt-1,blck-1,2,,,,,,0,"page_1,page_2" -"@CatalogPage/views/catalog/catalog.twig",slt-2,blck-4,1,,,,0,"smartphones,smartwatches,tablets,notebooks",, -"@CatalogPage/views/catalog/catalog.twig",slt-3,blck-5,1,,,,0,"smartphones,smartwatches,tablets,notebooks",, -"@CatalogPage/views/catalog/catalog.twig",slt-4,blck-6,1,,,,0,"smartphones,smartwatches,tablets,notebooks",, -"@ProductDetailPage/views/pdp/pdp.twig",slt-5,blck-3,1,0,"035,066,078,086,093,139",,,,, -``` - -| Column | Is obligatory? | Data type | Data example | Data explanation | -| --- | --- | --- | --- | --- | -| `template_path` | mandatory | string | `@HomePage/views/home/home.twig` | Path to the Twig template to which this CMS block to slot assignment belongs. | -| `slot_key` | mandatory | string | `slt-4` | Unique slot identifier. | -| `block_key` | mandatory | string | `blck-2` | Unique CMS block identifier. | -| `position` | mandatory | integer | 1 | CMS Block position in the slot. | -| `conditions` | no | mixed | | Slot-CMS block conditions data. | - -2. Register the following plugin to enable data import: - -**Pyz\Zed\DataImport\DataImportDependencyProvider** - -```php - **Content Management** > **Pages** > **List of CMS pages**; - * in the Back Office > **Content Management** > **Pages**/**Blocks** > *create/edit placeholder* pages. - -{% endinfo_block %} - -## Install feature frontend -### 1) Install the required modules using Composer -Run the following command(s) to install the required modules: - -```bash -composer require spryker-feature/cms:"^{{page.version}}" --update-with-dependencies -``` - -{% info_block warningBox "Verification" %} -Make sure that the following modules have been installed:
              ModuleExpected Directory
              `CmsBlockWidget``vendor/spryker-shop/cms-block-widget`
              `CmsPage``vendor/spryker-shop/cms-page`
              `CmsSearchPage``vendor/spryker-shop/cms-search-page`
              `CmsSlotBlockWidget``vendor/spryker-shop/cms-slot-block-widget`
              `ShopCmsSlot``vendor/spryker-shop/shop-cms-slot`
              `ShopCmsSlotExtension``vendor/spryker-shop/shop-cms-slot-extension`
              -{% endinfo_block %} - -### 2) Add Translations -1. Append glossary according to your configuration: - -**src/data/import/glossary.csv** - -```yaml -cms.preview.access_denied,You are not logged in or you do not have permission to access this page.,en_US -cms.preview.access_denied,Du bist nicht eingeloggt oder hast keine Berechtigung diese Seite zu betreten.,de_DE -cms.page.sort.relevance,Nach Relevanz sortieren,de_DE -cms.page.sort.relevance,Sort by relevance,en_US -cms.page.sort.name_asc,Nach Name aufsteigend sortieren,de_DE -cms.page.sort.name_asc,Sort by name ascending,en_US -cms.page.sort.name_desc,Nach Name absteigend sortieren,de_DE -cms.page.sort.name_desc,Sort by name descending,en_US -cms.page.itemsFound,Artikel gefunden,de_DE -cms.page.itemsFound,Items found,en_US -``` - -2. Run the following console command to import data: - -```bash -console data:import glossary -``` - -{% info_block warningBox "Verification" %} - -Make sure that in the configured data has been added to the `spy_glossary` table. - -{% endinfo_block %} - -### 3) Enable Controllers -Register route provider(s) in the Yves application: - -**Pyz\Yves\Router\RouterDependencyProvider** - -```php -
            • Config file contains `$config[CmsGuiConstants::CMS_PAGE_PREVIEW_URI] = '/en/cms/preview/%d'; .`
            • The `spryker/customer-user-connector` package is installed.
            • The `spryker/customer-user-connector-gui` package is installed.
            • The `\Spryker\Zed\CustomerUserConnectorGui\Communication\Plugin\UserTableActionExpanderPlugin` plugin is enabled in `\Pyz\Zed\User\UserDependencyProvider::getUserTableActionExpanderPlugins()`.
            • You assigned a customer to your Back Office user.
            • | - -{% info_block warningBox "Verification" %} - -1. Open the *search* page in `http://mysprykershop.com/search/cms?q=`. -2. Log in as the customer assigned to your Back Office user in Yves and open the *preview* page in `http://mysprykershop.com/en/cms/preview/{unpublished CMS page ID}`. - -{% endinfo_block %} - -### 4) Set up Widgets -Enable Twig plugins: - -| Plugin | Specification | Namespace | -| --- | --- | --- | -| `CmsBlockTwigPlugin` | Provides the list of plugins for CMS block widget. See the [table](#plugin-table). | `SprykerShop\Yves\CmsBlockWidget\Plugin` | -| `CmsTwigPlugin` | Provides the spyCms function. | `SprykerShop\Yves\CmsPage\Plugin\Twig` | -| `CmsContentWidgetTwigPlugin` | Provides the list of plugins for enabling content widgets. You can use them inside CMS blocks and page content. However, we recommend using the [Content Items Widgets feature](/docs/scos/user/features{{page.version}}/cms/content-item-widgets/content-item-widgets-overview.html) instead. | `Spryker\Yves\CmsContentWidget\Plugin\Twig` | -| `ShopCmsSlotTwigPlugin` | Provides the `cms_slot` Twig tag. | `SprykerShop\Yves\ShopCmsSlot\Plugin\Twig` | - -**Pyz\Yves\Twig\TwigDependencyProvider** - -```php - - -| Plugin | Specification | Namespace | -| --- | --- | --- | -| `CmsBlockWidgetTwigPlugin` | Provides the `spyCmsBlock` twig function for rendering block. |`SprykerShop\Yves\CmsBlockWidget\Plugin\Twig` | -| `CmsBlockPlaceholderTwigPlugin` | Provides the `spyCmsBlockPlaceholder` Twig function for placeholder. | `Spryker\Yves\CmsBlock\Plugin\Twig` | - -**Pyz\Yves\CmsBlockWidget\CmsBlockWidgetDependencyProvider** - -```php - new CmsSlotBlockWidgetCmsSlotContentPlugin(), - ]; - } -} -``` - -{% info_block warningBox "Verification" %} - -Verify the changes by adding a slot widget to a page. See [Templates & Slots Feature Overview](/docs/scos/user/features/{{page.version}}/cms-feature-overview/templates-and-slots-overview.html) for references. - -{% endinfo_block %} - -### Set up SprykerCmsBlocks Content Provider Behavior - -{% info_block warningBox “Verification” %} - -Follow the further steps only if you are going to use the [visibility conidtions](/docs/scos/user/features/{{page.version}}/cms-feature-overview/templates-and-slots-overview.html#visibility-conditions) functionality with `SprykerCmsBlocks` content provider for slots. -{% endinfo_block %} - -#### 1) Install the required modules using Composer -Run the following command(s) to install the required modules: - -```bash -composer require spryker/cms-slot-block-product-category-connector:"^1.0.0" sspryker/cms-slot-block-product-category-gui:"^1.0.0" spryker/cms-slot-block-category-connector:"^1.0.0" sspryker/cms-slot-block-category-gui:"^1.0.0" spryker/cms-slot-block-cms-connector:"^1.0.0" spryker/cms-slot-block-cms-gui:"^1.0.0" --update-with-dependencies -``` - -{% info_block warningBox "Verification" %} -Make sure that the following modules have been installed:
              ModuleExpected Directory
              `CmsSlotBlock``vendor/spryker/cms-slot-block`
              `CmsSlotBlockProductCategoryConnector``vendor/spryker/cms-slot-block-product-category-connector`
              `CmsSlotBlockProductCategoryGui``vendor/spryker/cms-slot-block-product-category-gui`
              `CmsSlotBlockCategoryConnector``vendor/spryker/cms-slot-block-category-connector`
              `CmsSlotBlockCategoryGui``vendor/spryker/cms-slot-block-category-gui`
              `CmsSlotBlockCmsConnector``vendor/spryker/cms-slot-block-cms-connector`
              `CmsSlotBlockCmsGui``vendor/spryker/cms-slot-block-cms-gui`
              -{% endinfo_block %} - -#### 2) Set up Configuration -Add the relation of CMS slot template to condition key: - -**Pyz\Zed\CmsSlotBlock\CmsSlotBlockConfig** - -```php - [ - CmsSlotBlockProductCategoryConnectorConfig::CONDITION_KEY, - ], - '@CatalogPage/views/catalog-with-cms-slot/catalog-with-cms-slot.twig' => [ - CmsSlotBlockCategoryConnectorConfig::CONDITION_KEY, - ], - '@Cms/templates/placeholders-title-content-slot/placeholders-title-content-slot.twig' => [ - CmsSlotBlockCmsConnectorConfig::CONDITION_KEY, - ], - ]; - } -} -``` - -#### 3) Enable plugins -1. Prepare the Back Office form plugins: - -| Plugin | Specification | Namespace | -| --- | --- | --- | -| `ProductCategorySlotBlockConditionFormPlugin` | Extends `CmsSlotBlockForm` with a product category condition form. | `Spryker\Zed\CmsSlotBlockProductCategoryGui\Communication\Plugin` | -| `CategorySlotBlockConditionFormPlugin` | Extends `CmsSlotBlockForm` with a category condition form. | `Spryker\Zed\CmsSlotBlockCategoryGui\Communication\Plugin` | -| `CmsSlotBlockConditionFormPlugin` | Extends `CmsSlotBlockForm` by with a CMS condition form. | `Spryker\Zed\CmsSlotBlockCmsGui\Communication\Plugin` | - -**Pyz\Zed\CmsSlotBlockGui\CmsSlotBlockGuiDependencyProvider** - -```php - **Content Management** > **Slots** section. -1. In the **List of Templates**, choose the template for which you've created the visibility condition. -1. Choose a slot in the **List of Slots for {name} Template**. -1. Select or [assign](/docs/scos/user/back-office-user-guides/{{page.version}}/content/slots/managing-slots.html#assigning-cms-blocks-to-slots) a CMS block to a slot in the **List of Blocks for {name} Slot**. -1. Make sure that for each CMS block, there is an additional form allowing you to define the visibility condition you have created. - - -{% endinfo_block %} - -2. Add a visibility resolver plugin to the `CmsSlotBlock` client: - -| Plugin | Specification | Namespace | -| --- | --- | --- | -| `ProductCategoryCmsSlotBlockConditionResolverPlugin` | Provides visibility resolver for products and product categories. | `Spryker\Client\CmsSlotBlockProductCategoryConnector\Plugin\CmsSlotBlock` | -| `CategoryCmsSlotBlockConditionResolverPlugin` | Provides a visibility resolver for categories. | `Spryker\Client\CmsSlotBlockCategoryConnector\Plugin\CmsSlotBlock` | -| `CmsPageCmsSlotBlockConditionResolverPlugin` | Provides a visibility resolver for CMS pages. | `Spryker\Client\CmsSlotBlockCmsConnector\Plugin\CmsSlotBlock` | - -**Pyz\Client\CmsSlotBlock\CmsSlotBlockDependencyProvider** - -```php -ModuleExpected Directory`Comment``vendor/spryker/comment``CommentDataImport``vendor/spryker/comment-data-import` -{% endinfo_block %} - -### 2) Set up Configuration -Add the following configuration to your project: - -| Configuration | Specification | Namespace | -| --- | --- | --- | -| `CommentConfig::getAvailableCommentTags()` | Used to allow saving comment tags to the database. | `Pyz\Shared\Comment` | -| A regular expression (See below in `config/Shared/config_default.php`) | Used to close access for not logged customers. | None | - -**src/Pyz/Zed/Comment/CommentConfig.php** - -```php -Database EntityTypeEvent`spy_comment`tablecreated`spy_comment_tag`tablecreated`spy_comment_thread`tablecreated`spy_comment_to_comment_tag`tablecreated -{% endinfo_block %} - -{% info_block warningBox "Verification" %} -Make sure that the following changes in transfer objects:
              TransferTypeEventPath
              `SpyCommentEntityTransfer`classcreated`src/Generated/Shared/Transfer/SpyCommentEntityTransfer`
              `SpyCommentTagEntityTransfer`classcreated`src/Generated/Shared/Transfer/SpyCommentTagEntityTransfer`
              `SpyCommentThreadEntityTransfer`classcreated`src/Generated/Shared/Transfer/SpyCommentThreadEntityTransfer`
              `SpyCommentToCommentTagEntityTransfer`classcreated`src/Generated/Shared/Transfer/SpyCommentToCommentTagEntityTransfer`
              `Comment`classcreated`src/Generated/Shared/Transfer/Comment`
              `CommentThread`classcreated`src/Generated/Shared/Transfer/CommentThread`
              `CommentTag`classcreated`src/Generated/Shared/Transfer/CommentTag`
              `CommentFilter`classcreated`src/Generated/Shared/Transfer/CommentFilter`
              `CommentRequest`classcreated`src/Generated/Shared/Transfer/CommentRequest`
              `CommentTagRequest`classcreated`src/Generated/Shared/Transfer/CommentTagRequest`
              `CommentThreadResponse`classcreated`src/Generated/Shared/Transfer/CommentThreadResponse`
              -{% endinfo_block %} - -### 4) Add Translations -Append glossary according to your configuration: - -**src/data/import/glossary.csv** - -```yaml -comment.validation.error.comment_not_found,Comment not found.,en_US -comment.validation.error.comment_not_found,Kommentar nicht gefunden.,de_DE -comment.validation.error.comment_thread_not_found,Comment Thread not found.,en_US -comment.validation.error.comment_thread_not_found,Kommentar Thread nicht gefunden.,de_DE -comment.validation.error.access_denied,Access denied.,en_US -comment.validation.error.access_denied,Zugriff verweigert.,en_US -comment.validation.error.comment_thread_already_exists,Comment Thread already exists.,de_DE -comment.validation.error.comment_thread_already_exists,Kommentar Thread existiert bereits.,de_DE -comment.validation.error.invalid_message_length,Invalid message length.,en_US -comment.validation.error.invalid_message_length,Ungültige Nachrichtenlänge.,de_DE -comment.validation.error.comment_tag_not_available,Comment tag not available.,en_US -comment.validation.error.comment_tag_not_available,Kommentar-Tag nicht verfügbar.,de_DE -``` - -Run the following console command to import data: - -```bash -console data:import glossary -``` - -{% info_block warningBox "Verification" %} -Make sure that in the database the configured data are added to the `spy_glossary` table. -{% endinfo_block %} - -### 5) Set up Behavior - -#### Set up Comment Workflow -Enable the following behaviors by registering the plugins: - -| Plugin | Specification | Prerequisites | Namespace | -| --- | --- | --- | --- | -| `CommentDataImportPlugin` | Imports Comments data. | None | `Spryker\Zed\CommentDataImport\Communication\Plugin` | - -**src/Pyz/Zed/DataImport/DataImportDependencyProvider.php** - -```php -ModuleExpected Directory`CommentWidget``vendor/spryker-shop/comment-widget``CommentWidgetExtension``vendor/spryker-shop/comment-widget-extension` -{% endinfo_block %} - -### 2) Add Translations -Append glossary according to your configuration: - -**src/data/import/glossary.csv** - -```yaml -comment_widget.comments_to_cart,Comments to Cart,en_US -comment_widget.comments_to_cart,Kommentare zum Warenkorb,de_DE -comment_widget.form.add_comment,Add,en_US -comment_widget.form.add_comment,Hinzufügen,de_DE -comment_widget.form.update_comment,Update,en_US -comment_widget.form.update_comment,Aktualisieren,de_DE -comment_widget.form.remove_comment,Remove,en_US -comment_widget.form.remove_comment,Entfernen,de_DE -comment_widget.form.you,You,en_US -comment_widget.form.you,Sie,de_DE -comment_widget.form.attach,Attach,en_US -comment_widget.form.attach,Anhängen,de_DE -comment_widget.form.unattach,Unattach,en_US -comment_widget.form.unattach, Anhang entfernen,de_DE -comment_widget.form.all,All,en_US -comment_widget.form.all,Alles,de_DE -comment_widget.form.attached,Attached,en_US -comment_widget.form.attached,Angehängt,de_DE -comment_widget.form.button_default,Button,en_US -comment_widget.form.button_default,Schaltfläche,de_DE -comment_widget.form.edited,edited,en_US -comment_widget.form.edited,bearbeitet,de_DE -comment_widget.form.tags,Tags,en_US -comment_widget.form.tags,Tags,de_DE -comment_widget.form.placeholder.add_comment,Add a comment,en_US -comment_widget.form.placeholder.add_comment,Kommentar hinzufügen,de_DE -comment_widget.tags.all,All,en_US -comment_widget.tags.all,Alles,de_DE -comment_widget.tags.delivery,Delivery,en_US -comment_widget.tags.delivery,Lieferung,de_DE -comment_widget.tags.important,Important,en_US -comment_widget.tags.important,Wichtig,de_DE -``` - -Run the following console command to import data: - -```bash -console data:import glossary -``` - -{% info_block warningBox "Verification" %} -Make sure that in the database the configured data are added to the `spy_glossary` table. -{% endinfo_block %} - -### 3) Enable Controllers -#### Route List - -Register the following route provider plugins: - -| Provider | Namespace | -| --- | --- | -| `CommentWidgetRouteProviderPlugin` | `SprykerShop\Yves\CommentWidget\Plugin\Router` | - -**src/Pyz/Yves/Router/RouterDependencyProvider.php** - -```php -Make sure that the error flash message was shown. -{% endinfo_block %} - -### 4) Set up Widgets -Register the following plugins to enable widgets: - -| Plugin | Description | Prerequisites | Namespace | -| --- | --- | --- | --- | -| `CommentThreadWidget` | Displays comments. | None | `SprykerShop\Yves\CommentWidget\Widget` | - -**src/Pyz/Yves/ShopApplication/ShopApplicationDependencyProvider.php** - -```php -ModuleTest`CommentThreadWidget`You can check availability in twig `{% raw %}{%{% endraw %} widget 'CommentThreadWidget' args [...] only {% raw %}%}{% endraw %}{% raw %}{%{% endraw %} endwidget {% raw %}%}{% endraw %}` -{% endinfo_block %} diff --git a/docs/scos/dev/feature-integration-guides/202005.0/comments-order-management-feature-integration.md b/docs/scos/dev/feature-integration-guides/202005.0/comments-order-management-feature-integration.md deleted file mode 100644 index 5c08733e061..00000000000 --- a/docs/scos/dev/feature-integration-guides/202005.0/comments-order-management-feature-integration.md +++ /dev/null @@ -1,140 +0,0 @@ ---- -title: Comments + Order Management feature integration -description: The guide walks you through the process of installing the Comments + Order Management feature into the project. -last_updated: Apr 24, 2020 -template: feature-integration-guide-template -originalLink: https://documentation.spryker.com/v5/docs/comments-order-management-feature-integration -originalArticleId: 0957a2c1-1b41-4dba-b6a4-16290b5c3208 -redirect_from: - - /v5/docs/comments-order-management-feature-integration - - /v5/docs/en/comments-order-management-feature-integration ---- - -## Install Feature Core -### Prerequisites -Install the required features: - -| Name | Version | -| --- | --- | -| Comment | master | -| Order Management | master | - -### 1) Install the required modules using Composer -Run the following command(s) to install the required modules: - -```bash -composer require spryker/comment-sales-connector:"^1.0.0" --update-with-dependencies -``` -{% info_block warningBox "Verification" %} -Make sure that the following modules were installed:
              ModuleExpected Directory
              `CommentSalesConnector``vendor/spryker/comment-sales-connector`
              -{% endinfo_block %} - -### 2) Set up Configuration -Add the following configuration to your project: - -| Configuration | Specification | Namespace | -| --- | --- | --- | -| `SalesConfig::getSalesDetailExternalBlocksUrls()` | Used to display a block with comments related to the order. | `Pyz\Zed\Sales` | - -**Pyz\Zed\Sales\SalesConfig.php** - -```php - '/comment-sales-connector/sales/list', - ]; - - $externalBlocks = parent::getSalesDetailExternalBlocksUrls(); - - return array_merge($externalBlocks, $projectExternalBlocks); - } -} -``` - -{% info_block warningBox "Verification" %} -Make sure that the Order detail page in Zed contains a block with comments. -{% endinfo_block %} - -### 3) Set up Transfer Objects -Run the following commands to generate transfer changes: - -```bash -console transfer:generate -``` - -{% info_block warningBox "Verification" %} -Make sure that the following changes have been applied in transfer objects:
              TransferTypeEventPath
              `Comment`classcreated`src/Generated/Shared/Transfer/Comment`
              `CommentThread`classcreated`src/Generated/Shared/Transfer/CommentThread`
              `CommentFilter`classcreated`src/Generated/Shared/Transfer/CommentFilter`
              `CommentRequest`classcreated`src/Generated/Shared/Transfer/CommentRequest`
              -{% endinfo_block %} - -### 4) Set up Behavior -Register the following plugins: - -| Plugin | Specification | Prerequisites | Namespace | -| --- | --- | --- | --- | -| `CommentThreadOrderExpanderPlugin` | Expands `OrderTransfer` with `CommentThread`. | None | `Spryker\Zed\CommentSalesConnector\Communication\Plugin\Sales` | -| `CommentThreadAttachedCommentOrderPostSavePlugin` | Duplicates `commentThread` from Quote to a new order. | None | `Spryker\Zed\CommentSalesConnector\Communication\Plugin\Sales` | - -**Pyz\Zed\Sales\SalesDependencyProvider.php** - -```php -`Entity.spy_company.delete` | -| `spy_company_user` | `Entity.spy_company_user.`
              `Entity.spy_company_user.update`
              `Entity.spy_company_user.delete` | - -**src/Pyz/Zed/CompanyUser/Persistence/Propel/Schema/spy_company_user.schema.xml** - -```xml - - - - - - - -
              - -
              -``` - -**src/Pyz/Zed/Company/Persistence/Propel/Schema/spy_company.schema.xml** - -```xml - - - - - - - - -
              - -
              -``` - -Run the following commands to apply database changes and generate entity and transfer changes: - -```bash -console transfer:generate -console propel:install -console transfer:generate -``` - -{% info_block warningBox "Verification" %} - -Make sure that the following changes have been applied by checking your database: - -|Database Entity|Type|Event| -|--- |--- |--- | -|`spy_company_user.is_default`|column|created| - -{% endinfo_block %} - -{% info_block warningBox "Verification" %} - -Make sure that the following changes in transfer objects: - -|Transfer|Type|Event|Path| -|--- |--- |--- |--- | -|`CompanyUser.isDefault`|property|created|`src/Generated/Shared/Transfer/CompanyUserTransfer`| -|`Customer.isOnBehalf`|property|created|`src/Generated/Shared/Transfer/CustomerTransfer`| -|`CompanyUserAccessTokenRequestclass`|class|created|`src/Generated/Shared/Transfer/CompanyUserAccessTokenRequestTransfer`| -|`CompanyUserStorage`|class|created|`src/Generated/Shared/Transfer/CompanyUserStorageTransfer`| - -{% endinfo_block %} - -{% info_block warningBox "Verification" %} - -Make sure that propel entities have been generated successfully by checking their existence. Also, change the generated entity classes to extend from Spryker core classes. - -|Class Path|Extends| -|--- |--- | -|`src/Orm/Zed/CompanyUserStorage/Persistence/SpyCompanyUserStorage.php`|`Spryker\Zed\CompanyUserStorage\Persistence\Propel\AbstractSpyCompanyUserStorage`| -|`src/Orm/Zed/CompanyUserStorage/Persistence/SpyCompanyUserStorageQuery.php`|`Spryker\Zed\CompanyUserStorage\Persistence\Propel\AbstractSpyCompanyUserStorageQuery`| - -{% endinfo_block %} - -{% info_block warningBox "Verification" %} - -Make sure that the changes have been implemented successfully. For this purpose, trigger the following methods and make sure that the above events have been triggered: - -|Path|Method Name| -|--- |--- | -|`src/Orm/Zed/CompanyUser/Persistence/Base/SpyCompanyUser.php`|`prepareSaveEventName()``addSaveEventToMemory()``addDeleteEventToMemory()`| -|`src/Orm/Zed/Company/Persistence/Base/SpyCompany.php`|`prepareSaveEventName()``addSaveEventToMemory()``addDeleteEventToMemory()`| -|`src/Orm/Zed/CompanyUserStorage/Persistence/Base/SpyCompanyUserStorage.php`|`sendToQueue()`| - -{% endinfo_block %} - -### 3) Configure Export to Redis - -#### Set up Event Listeners - -With this step, you will be able to publish tables on change (create, edit, delete) to the `spy_company`, `spy_company_user` and synchronize the data to Storage. - -| Plugin | Specification | Prerequisites | Namespace | -| --- | --- | --- | --- | -| `CompanyUserStorageEventSubscriber` | Registers listeners that are responsible for publishing company user storage entity changes when a related entity change event occurs. | None | `NoneSpryker\Zed\CompanyUserStorage\Communication\Plugin\Event\Subscriber` | - -**src/Pyz/Zed/Event/EventDependencyProvider.php** - -```php -add(new CompanyUserStorageEventSubscriber()); - - return $eventSubscriberCollection; - } -} -``` - -Set up synchronization queue pools so that non-multi-store entities (not store-specific entities) are synchronized among stores: - -**src/Pyz/Zed/CompanyUserStorage/CompanyUserStorageConfig.php** - -```php -
            • Assumes that the Customer keys exist in the database.
            • Assumes that the Company keys exist in the database
            • Assumes that the Company Business Unit keys exist in the database.
            | `Spryker\Zed\BusinessOnBehalfDataImport\Communication\Plugin\DataImport` | - -**src/Pyz/Zed/DataImport/DataImportDependencyProvider.php** - -```php -|`vendor/spryker-shop/business-on-behalf-widget`| - -{% endinfo_block %} - -### 2) Add Translations - -Append glossary according to your configuration: - -**src/data/import/glossary.csv** - -```yaml -business_on_behalf_widget.no_selected_company,No selected company,en_US -business_on_behalf_widget.no_selected_company,Kein Unternehmen ausgewählt,de_DE -business_on_behalf_widget.change_company_user,Change Company User,en_US -business_on_behalf_widget.change_company_user,Firmenbenutzer Profil ändern,de_DE -company_user.business_on_behalf.error.company_not_active,"You can not select this company user, company is not active.",en_US -company_user.business_on_behalf.error.company_not_active,"Sie können diesen Firmennutzer nicht auswählen da die Firma inaktiv ist",de_DE -company_user.business_on_behalf.error.company_user_invalid,"You can not select this company user, it is invalid.",en_US -company_user.business_on_behalf.error.company_user_invalid,"Sie können diesen Firmennutzer nicht auswählen da er ungültig ist",de_DE -customer_page.error.customer_already_logged_in,Customer already logged in.,en_US -customer_page.error.customer_already_logged_in,Der Kunde ist bereits eingeloggt.,de_DE -customer_page.error.invalid_access_token,Invalid access token.,en_US -customer_page.error.invalid_access_token,Ungültiges Zugriffstoken.,de_DE -``` - -Run the following console command to import data: - -```bash -console data:import glossary -``` - -{% info_block warningBox "Verification" %} - -Make sure that in the database the configured data is added to the `spy_glossary` table. - -{% endinfo_block %} - -### 3) Set up Widgets - -Register the following plugins to enable widgets: - -| Plugin | Description | Prerequisites | Namespace | -| --- | --- | --- | --- | -| `BusinessOnBehalfStatusWidget` | Displays the selected Company Users and allows for Business on Behalf customers to change it through a link. | None | `SprykerShop\Yves\BusinessOnBehalfWidget\Widget` | - -**src/Pyz/Yves/ShopApplication/ShopApplicationDependencyProvider.php** - -```php - - - - - - - -
            - - - - - -
            - -
            -``` - -**src/Pyz/Zed/ConfigurableBundleStorage/Persistence/Propel/Schema/spy_configurable_bundle_storage.schema.xml** - -```xml - - - - - - - -
            - -
            -``` - -**src/Pyz/Zed/ConfigurableBundlePageSearch/Persistence/Propel/Schema/spy_configurable_bundle_template_page_search.schema.xml** - -```xml - - - - - - - -
            - -
            -``` - -Run the following commands to apply database changes and generate entity and transfer changes: - -```bash -console transfer:generate -console propel:install -console transfer:generate -``` - -{% info_block warningBox "Verification" %} - -Make sure that the following changes have been applied by checking your database: - -| Database Entity | Type | Event | -| --- | --- | --- | -| `spy_configurable_bundle_template` | table | created | -| `spy_configurable_bundle_template_slot` | table | created | -| `spy_sales_order_configured_bundle` | table | created | -| `spy_sales_order_configured_bundle_item` | table | created | -| `spy_configurable_bundle_template_storage` | table | created | -| `spy_configurable_bundle_template_page_search` | table | created | - -{% endinfo_block %} - -{% info_block warningBox "Verification" %} - -Make sure that the following changes have been applied in transfer objects: - -| Transfer | Type | Event | Path | -| --- | --- | --- | --- | -| `SpyConfigurableBundleTemplateEntity` | class | created | `src/Generated/Shared/Transfer/SpyConfigurableBundleTemplateEntityTransfer` | -| `SpyConfigurableBundleTemplateSlotEntity` | class | created | `src/Generated/Shared/Transfer/SpyConfigurableBundleTemplateSlotEntityTransfer` | -| `SpySalesOrderConfiguredBundleEntity` | class | created | `src/Generated/Shared/Transfer/SpySalesOrderConfiguredBundleEntityTransfer` | -| `SpySalesOrderConfiguredBundleItemEntity` | class | created | `src/Generated/Shared/Transfer/SpySalesOrderConfiguredBundleItemEntityTransfer` | -| `SpyConfigurableBundleTemplateStorageEntity` | class | created | `src/Generated/Shared/Transfer/SpyConfigurableBundleTemplateStorageEntityTransfer` | -| `UpdateConfiguredBundleRequest` | class | created | `src/Generated/Shared/Transfer/UpdateConfiguredBundleRequestTransfer` | -| `SalesOrderConfiguredBundleTranslation` | class | created | `src/Generated/Shared/Transfer/SalesOrderConfiguredBundleTranslationTransfer` | -| `ConfiguredBundle` | class | created | `src/Generated/Shared/Transfer/ConfiguredBundleTransfer` | -| `ConfiguredBundleItem` | class | created | `src/Generated/Shared/Transfer/ConfiguredBundleItemTransfer` | -| `ConfigurableBundleTemplate` | class | created |`src/Generated/Shared/Transfer/ConfigurableBundleTemplateTransfer` | -| `ConfigurableBundleTemplateSlot` | class | created | `src/Generated/Shared/Transfer/ConfigurableBundleTemplateSlotTransfer` | -| `ConfigurableBundleTemplateTranslation` | class | created | `src/Generated/Shared/Transfer/ConfigurableBundleTemplateTranslationTransfer` | -| `ConfigurableBundleTemplateSlotTranslation` | class | created | `src/Generated/Shared/Transfer/ConfigurableBundleTemplateSlotTranslationTransfer` | -| `ConfigurableBundleTemplateFilter` | class | created | `src/Generated/Shared/Transfer/ConfigurableBundleTemplateFilterTransfer` | -| `ConfigurableBundleTemplateSlotFilter` | class | created | `src/Generated/Shared/Transfer/ConfigurableBundleTemplateSlotFilterTransfer` | -| `ConfigurableBundleTemplateCollection` | class | created | `src/Generated/Shared/Transfer/ConfigurableBundleTemplateCollectionTransfer` | -| `ConfigurableBundleTemplateSlotCollection` | class | created | `src/Generated/Shared/Transfer/ConfigurableBundleTemplateSlotCollectionTransfer` | -| `ConfigurableBundleTemplateResponse` | class | created | `src/Generated/Shared/Transfer/ConfigurableBundleTemplateResponseTransfer` | -| `ConfigurableBundleTemplateSlotResponse` | class | created | `src/Generated/Shared/Transfer/ConfigurableBundleTemplateSlotResponseTransfer` | -| `ConfigurableBundleTemplateSlotEditForm` | class | created | `src/Generated/Shared/Transfer/ConfigurableBundleTemplateSlotEditFormTransfer` | -| `ConfigurableBundleTemplateStorage` | class | created | `src/Generated/Shared/Transfer/ConfigurableBundleTemplateStorageTransfer` | -| `ConfigurableBundleTemplateSlotStorage` | class | created | `src/Generated/Shared/Transfer/ConfigurableBundleTemplateSlotStorageTransfer` | -| `ConfigurableBundleTemplatePageSearch` | class | created | `src/Generated/Shared/Transfer/ConfigurableBundleTemplatePageSearchTransfer` | -| `ConfigurableBundleTemplatePageSearchCollection` | class | created | `src/Generated/Shared/Transfer/ConfigurableBundleTemplatePageSearchCollectionTransfer` | -| `ConfigurableBundleTemplatePageSearchFilter` | class | created | `src/Generated/Shared/Transfer/ConfigurableBundleTemplatePageSearchFilterTransfer` | -| `ConfigurableBundleTemplatePageSearchRequest` | class | created | `src/Generated/Shared/Transfer/ConfigurableBundleTemplatePageSearchRequestTransfer` | -| `ProductListUsedByTable` | class | created | `src/Generated/Shared/Transfer/ProductListUsedByTableTransfer` | -| `ProductListUsedByTableRow` | class | created | `src/Generated/Shared/Transfer/ProductListUsedByTableRowTransfer` | -| `ButtonCollection` | class | created | `src/Generated/Shared/Transfer/ButtonCollectionTransfer` | -| `SalesOrderConfiguredBundleFilter` | class | created | `src/Generated/Shared/Transfer/SalesOrderConfiguredBundleFilterTransfer` | -| `SalesOrderConfiguredBundleCollection` | class | created | `src/Generated/Shared/Transfer/SalesOrderConfiguredBundleCollectionTransfer` | -| `SalesOrderConfiguredBundle` | class | created | `src/Generated/Shared/Transfer/SalesOrderConfiguredBundleTransfer` | -| `SalesOrderConfiguredBundleItem`|class|created| `src/Generated/Shared/Transfer/SalesOrderConfiguredBundleItemTransfer` | - -{% endinfo_block %} - -### 3) Add Translations - -#### Yves Translations - -{% info_block infoBox %} - -Each configurable bundle template name needs to have Yves translations. Names are translated directly from `spy_configurable_bundle_template.name` field, e.g.: `configurable_bundle.templates.my-bundle.name`. - -Same rule is applied for configurable bundle template slots: `spy_configurable_bundle_template_slot.name` → `spy_configurable_bundle.template_slots.my-slot.name` - -Name is represented by a slugified version of a name for default locale, e.g.: Configurable Bundle "All In" → `configurable-bundle-all-in`. - -{% endinfo_block %} -Append glossary according to your configuration: - -
            -src/data/import/glossary.csv - -```yaml -configured_bundle.quantity,Quantity:,en_US -configured_bundle.quantity,Anzahl:,de_DE -configured_bundle.price,Item price:,en_US -configured_bundle.price,Stückpreis:,de_DE -configured_bundle.bundle_total,Bundle total:,en_US -configured_bundle.bundle_total,Bündel Gesamt:,de_DE -configured_bundle.total,Item total:,en_US -configured_bundle.total,Artikel Gesamt:,de_DE -configured_bundle.remove,"× remove",en_US -configured_bundle.remove,"× entfernen",de_DE -configured_bundle.order.items,Items in the bundle:,en_US -configured_bundle.order.items,Produkte in diesem Bündel:,de_DE -configured_bundle.item_sku,SKU:,en_US -configured_bundle.item_sku,SKU:,de_DE -configurable_bundle.template.validation.error.not_exists,Configurable bundle template does not exist.,en_US -configurable_bundle.template.validation.error.not_exists,Vorlage des konfigurierbaren Bündels existiert nicht.,de_DE -configurable_bundle.slot.validation.error.not_exists,Configurable bundle template slot does not exist.,en_US -configurable_bundle.slot.validation.error.not_exists,Vorlagenslot des konfigurierbaren Bündels existiert nicht.,de_DE -configurable_bundle.template.validation.error.already_activated,Configurable bundle template is already activated.,en_US -configurable_bundle.template.validation.error.already_activated,Vorlage des konfigurierbaren Bündels wurde schon aktiviert.,de_DE -configurable_bundle.template.validation.error.already_deactivated,Configurable bundle template is already deactivated.,en_US -configurable_bundle.template.validation.error.already_deactivated,Vorlage des konfigurierbaren Bündels wurde schon deaktiviert.,de_DE -configured_bundle_cart.error.configured_bundle_cannot_be_added,Configured bundle cannot be added to cart.,en_US -configured_bundle_cart.error.configured_bundle_cannot_be_added,Configured bundle cannot be added to cart.,de_DE -configured_bundle_cart.error.configured_bundle_not_found,Configured bundle with provided sku not found in cart.,en_US -configured_bundle_cart.error.configured_bundle_not_found,Konfiguriertes Bundle mit mitgelieferter SKU nicht im Warenkorb gefunden.,de_DE -configured_bundle_cart.error.configured_bundle_cannot_be_removed,Configured bundle cannot be removed from cart.,en_US -configured_bundle_cart.error.configured_bundle_cannot_be_removed,Das konfigurierte Bundle kann nicht aus dem Warenkorb entfernt werden.,de_DE -configured_bundle_cart.error.configured_bundle_cannot_be_updated,Configured bundle cannot be updated.,en_US -configured_bundle_cart.error.configured_bundle_cannot_be_updated,Konfiguriertes Bundle kann nicht aktualisiert werden.,de_DE -configured_bundle_widget.configured_bundle.removed,Configured bundle removed successfully.,en_US -configured_bundle_widget.configured_bundle.removed,Konfiguriertes Bundle erfolgreich entfernt.,de_DE -configured_bundle_widget.configured_bundle.updated,Configured bundle updated successfully.,en_US -configured_bundle_widget.configured_bundle.updated,Konfiguriertes Bundle wurde erfolgreich aktualisiert.,de_DE -configurable_bundle_page.select,Select,en_US -configurable_bundle_page.select,Auswählen,de_DE -configurable_bundle_page.unselect,Unselect,en_US -configurable_bundle_page.unselect,Unselect,de_DE -configurable_bundle_page.edit,Edit,en_US -configurable_bundle_page.edit,Edit,de_DE -configurable_bundle_page.configurator,Configurator,en_US -configurable_bundle_page.configurator,Konfigurator,de_DE -configurable_bundle_page.configurable_bundle_list,Configurable Bundle List,en_US -configurable_bundle_page.configurable_bundle_list,Configurable Bundle List,de_DE -configurable_bundle_page.choose_bundle_to_configure,Choose Bundle to configure,en_US -configurable_bundle_page.choose_bundle_to_configure,Choose Bundle to configure,de_DE -configurable_bundle_page.configurator.templates_not_found,There are no templates available.,en_US -configurable_bundle_page.configurator.templates_not_found,There are no templates available.,de_DE -configurable_bundle_page.template_not_found,Configurable bundle template not found.,en_US -configurable_bundle_page.template_not_found,Configurable bundle template not found.,de_DE -configurable_bundle_page.invalid_template_slot_combination,Invalid template/slot combination.,en_US -configurable_bundle_page.invalid_template_slot_combination,Invalid template/slot combination.,de_DE -configurable_bundle_page.configurator.tip.header,Create your own bundle.,en_US -configurable_bundle_page.configurator.tip.header,Create your own bundle.,de_DE -configurable_bundle_page.configurator.tip.text,"To create the bundle, please select the slot from the left side, and choose the product from the list.",en_US -configurable_bundle_page.configurator.tip.text,"To create the bundle, please select the slot from the left side, and choose the product from the list.",de_DE -configurable_bundle_page.configurator.selected_product,Selected product,en_US -configurable_bundle_page.configurator.selected_product,Selected product,de_DE -configurable_bundle_page.configurator.summary,Summary,en_US -configurable_bundle_page.configurator.summary,Summary,de_DE -configurable_bundle_page.configurator.add_to_cart,Add to Cart,en_US -configurable_bundle_page.configurator.add_to_cart,Add to Cart,de_DE -configurable_bundle_page.configurator.summary_page_locked,Product for at least one slot should be configured to visit Summary page.,en_US -configurable_bundle_page.configurator.summary_page_locked,Product for at least one slot should be configured to visit Summary page.,de_DE -configurable_bundle_page.configurator.summary_page_total,Total,en_US -configurable_bundle_page.configurator.summary_page_total,Gesamt,de_DE -configurable_bundle_page.configurator.added_to_cart,Configured bundle successfully added to cart.,en_US -configurable_bundle_page.configurator.added_to_cart,Configured bundle successfully added to cart.,de_DE -configurable_bundle_page.configurator.slot_became_unavailable,Configured slot with ID '%id%' became unavailable.,en_US -configurable_bundle_page.configurator.slot_became_unavailable,Configured slot with ID '%id%' became unavailable.,de_DE -configurable_bundle_page.configurator.product_became_unavailable,Product with SKU '%sku%' configured for slot with ID '%id%' became unavailable.,en_US -configurable_bundle_page.configurator.product_became_unavailable,Product with SKU '%sku%' configured for slot with ID '%id%' became unavailable.,de_DE -``` -
            -
            - -Please note, that if you have any configurable bundle entities already present or coming from data import, then you'll also need to provide translations for templates and slots as given in example below. - -**src/data/import/glossary.csv** - -```yaml -configurable_bundle.templates.configurable-bundle-all-in.name,"Configurable Bundle ""All in""",en_US -configurable_bundle.templates.configurable-bundle-all-in.name,"Konfigurierbares Bündel ""All in""",de_DE -configurable_bundle.templates.smartstation.name,Smartstation Kit,en_US -configurable_bundle.templates.smartstation.name,Smartstation-Kit,de_DE -configurable_bundle.template_slots.slot-1.name,Slot 1,en_US -configurable_bundle.template_slots.slot-1.name,Slot 1,de_DE -configurable_bundle.template_slots.slot-2.name,Slot 2,en_US -configurable_bundle.template_slots.slot-2.name,Slot 2,de_DE -configurable_bundle.template_slots.slot-3.name,Slot 3,en_US -configurable_bundle.template_slots.slot-3.name,Slot 3,de_DE -configurable_bundle.template_slots.slot-4.name,Slot 4,en_US -configurable_bundle.template_slots.slot-4.name,Slot 4,de_DE -configurable_bundle.template_slots.slot-5.name,Slot 5,en_US -configurable_bundle.template_slots.slot-5.name,Slot 5,de_DE -configurable_bundle.template_slots.slot-6.name,Slot 6,en_US -configurable_bundle.template_slots.slot-6.name,Slot 6,de_DE -``` - -Run the following console command to import data: - -```bash -console data:import glossary -``` - -{% info_block warningBox "Verification" %} - -Make sure that in the database, the configured data are added to the `spy_glossary` table. - -{% endinfo_block %} - -#### Zed Translations -Run the following command to generate a new translation cache for Zed: - -```bash -console translator:generate-cache -``` - -{% info_block warningBox "Verification" %} - -Make sure that when you make an order from a cart with a configured bundles, bundle name is translated on the order page in Zed. - -{% endinfo_block %} - -### 4) Set up Search -Add the page map plugin for the *configurable bundle template* entity. - -| Plugin | Specification | Prerequisites | Namespace | -| --- | --- | --- | --- | -| `ConfigurableBundleTemplatePageMapPlugin` | Builds page map for configurable bundle template entity | None | `Spryker\Zed\ConfigurableBundlePageSearch\Communication\Plugin\Search` | - -**src/Pyz/Zed/Search/SearchDependencyProvider.php** - -```php - - -Your text -
            - - -class EventDependencyProvider extends SprykerEventDependencyProvider -{ - public function getEventSubscriberCollection() - { - $eventSubscriberCollection = parent::getEventSubscriberCollection(); - $eventSubscriberCollection->add(new ConfigurableBundleStorageEventSubscriber()); - $eventSubscriberCollection->add(new ConfigurableBundleTemplatePageSearchEventSubscriber()); - - return $eventSubscriberCollection; - } -} -``` - -#### Register the Synchronization Queue and Synchronization Error Queue -**src/Pyz/Client/RabbitMq/RabbitMqConfig.php** - -```php -append($this->createQueueOption(ConfigurableBundleStorageConfig::CONFIGURABLE_BUNDLE_SYNC_STORAGE_QUEUE, ConfigurableBundleStorageConfig::CONFIGURABLE_BUNDLE_SYNC_STORAGE_ERROR_QUEUE)); - $queueOptionCollection->append($this->createQueueOption(ConfigurableBundlePageSearchConfig::CONFIGURABLE_BUNDLE_SEARCH_QUEUE, ConfigurableBundlePageSearchConfig::CONFIGURABLE_BUNDLE_SEARCH_ERROR_QUEUE)); - - return $queueOptionCollection; - } -} -``` - -#### Configure Message Processors - -**src/Pyz/Zed/Queue/QueueDependencyProvider.php** - -```php - new SynchronizationStorageQueueMessageProcessorPlugin(), - ConfigurableBundlePageSearchConfig::CONFIGURABLE_BUNDLE_SEARCH_QUEUE => new SynchronizationSearchQueueMessageProcessorPlugin(), - ]; - } -} -``` - -#### Set up Re-Generate and Re-Sync Features - -| Plugin | Specification | Prerequisites | Namespace | -| --- | --- | --- | --- | -| `ConfigurableBundleTemplateEventResourceBulkRepositoryPlugin` | Allows populating empty storage table with data. | None | `Spryker\Zed\ConfigurableBundleStorage\Communication\Plugin\Event` | -| `ConfigurableBundleTemplatePageSearchEventResourceBulkRepositoryPlugin` | Allows populating empty search table with data. | None | `Spryker\Zed\ConfigurableBundleStorage\Communication\Plugin\Event` | -| `ConfigurableBundleTemplateSynchronizationDataBulkPlugin` | Allows synchronizing the entire storage table content into Storage. | None | `Spryker\Zed\ConfigurableBundleStorage\Communication\Plugin\Synchronization` | -| `ConfigurableBundleTemplatePageSynchronizationDataBulkPlugin` | Allows synchronizing all of the content into Search. | None | `Spryker\Zed\ConfigurableBundlePageSearch\Communication\Plugin\Synchronization` | - -**src/Pyz/Zed/EventBehavior/EventBehaviorDependencyProvider.php** - -```php -getConfiguredBundleItem()->setQuantityPerSlot(null)`; -* Reload cart page; -* Make sure that `ConfiguredBundleItem::quantityPerSlot` is not null. - -{% endinfo_block %} - -{% info_block warningBox "Verification" %} - -* Set the wrong quantity to `ConfiguredBundle::quantity` for the configured bundle item. -* Make sure that after updating the configured bundle quantity on cart page error flash message shown. - -{% endinfo_block %} - -#### Register Delete Pre-Check Plugins for the ProductList Module - -| Plugin | Specification | Prerequisites | Namespace | -| --- | --- | --- | --- | -| `ConfigurableBundleTemplateSlotProductListDeletePreCheckPlugin` | Finds configurable bundle template slots that use a given Product List. Disallows Product List deleting if any usage cases found. | None | `Spryker\Zed\ConfigurableBundle\Communication\Plugin\ProductList` | - -**src/Pyz/Zed/ProductList/ProductListDependencyProvider.php** - -```php - -src/Pyz/Zed/ConfigurableBundleGui/ConfigurableBundleGuiDependencyProvider.php - -```php - - - -{% info_block warningBox "Verification" %} - -Make sure that on configurable bundle template slot edit page (`http://zed.mysprykershop.com/configurable-bundle-gui/slot/edit?id-configurable-bundle-template-slot=1`): - -* **Assign Categories** tab exists. -* **Assign Products** tab exists. - -{% endinfo_block %} - -#### Register Plugins for the ProductListGui Module - -| Plugin | Specification | Prerequisites | Namespace | -| --- | --- | --- | --- | -| `ConfigurableBundleTemplateListProductListTopButtonsExpanderPlugin` | Expands buttons list with button leads to a Configurable Bundle Template list page. | None | `Spryker\Zed\ConfigurableBundleGui\Communication\Plugin\ProductListGui` | -| `ConfigurableBundleTemplateProductListUsedByTableExpanderPlugin` | Expands table data with Configurable Bundle Templates and Slots which use Product List. | None | `Spryker\Zed\ConfigurableBundleGui\Communication\Plugin\ProductListGui` | - -**src/Pyz/Zed/ProductListGui/ProductListGuiDependencyProvider.php** - -```php -ModuleExpected Directory`Content``vendor/spryker/content``ContentStorage``vendor/spryker/content-storage``ContentGui``vendor/spryker/content-gui``ContentGuiExtension``vendor/spryker/content-gui-extension``ContentBanner``vendor/spryker/content-banner``ContentBannerGui``vendor/spryker/content-banner-gui``ContentProduct``vendor/spryker/content-product``ContentProductDataImport``vendor/spryker/content-product-data-import``ContentProductGui``vendor/spryker/content-product-gui``ContentProductSet``vendor/spryker/content-product-set``ContentProductSetDataImport``vendor/spryker/content-product-set-data-import``ContentProductSetGui``vendor/spryker/content-product-set-gui``ContentFile``vendor/spryker/content-file``ContentFileGui``vendor/spryker/content-file-gui` -{% endinfo_block %} - -### 2) Set up Database Schema and Transfer Objects -Adjust the schema definition so entity changes will trigger events: - -| Affected entity | Triggered Events | -| --- | --- | -| `spy_content` | `Entity.spy_content.create`
            `Entity.spy_content.update`
            `Entity.spy_content.delete` | - -**src/Pyz/Zed/Content/Persistence/Propel/Schema/spy_content.schema.xml** - -```html - - - - - - - -
            -
            -``` - -**src/Pyz/Zed/ContentStorage/Persistence/Propel/Schema/spy_content_storage.schema.xml** - -```html - - - - - - - -
            -
            -``` - -Run the following commands to apply database changes and generate changes for entities and transfers: - -```bash -console transfer:generate -console propel:install -console transfer:generate -``` - -{% info_block warningBox "Verification" %} -Ensure the following changes were applied to the database:
            Database entityTypeEvent
            `spy_content`tablecreated
            `spy_content_localized`tablecreated
            `spy_content_storage`tablecreated
            -{% endinfo_block %} - -{% info_block warningBox "Verification" %} -Make sure that the following changes have been applied in transfer objects, see the `src/Generated/Shared/Transfer/` folder:
            TransferTypeEvent
            `ContentTransfer`classcreated
            `ContentStorageTransfer`classcreated
            `ContentTypeContextTransfer`classcreated
            `ContentValidationResponseTransfer`classcreated
            `ContentWidgetTemplateTransfer`classcreated
            `ContentParameterMessageTransfer`classcreated
            `ContentBannerTypeTransfer`classcreated
            `ContentBannerTermTransfer`classcreated
            `ContentProductAbstractListTermTransfer`classcreated
            `ContentProductAbstractListTypeTransfer`classcreated
            `ContentProductSetTermTransfer`classcreated
            `ContentProductSetTypeTransfer` classcreated
            `ContentFileListTermTransfer`classcreated
            `ContentFileListTypeTransfer`classcreated
            -{% endinfo_block %} - -### 3) Configure Export to Redis -Publish Content Items on Create, Edit or Delete to storage. - -#### Set up Event Listeners - -| Plugin | Specification | Prerequisites | Namespace | -| --- | --- | --- | --- | -| `ContentStorageEventSubscriber` | Registers listeners that are responsible to publish content items to storage when a related entity changes. | None | `Spryker\Zed\ContentStorage\Communication\Plugin\Event\Subscriber` | - -**src/Pyz/Zed/Event/EventDependencyProvider.php** - -```php -add(new ContentStorageEventSubscriber()); - - return $eventSubscriberCollection; - } -} -``` - -**src/Pyz/Client/RabbitMq/RabbitMqConfig.php** - -```php -append($this->createQueueOption(ContentStorageConfig::CONTENT_SYNC_STORAGE_QUEUE, ContentStorageConfig::CONTENT_SYNC_STORAGE_ERROR_QUEUE)); - - return $queueOptionCollection; - } -} -``` - -#### Configure Message Processors - -| Plugin | Specification | Prerequisites | Namespace | -| --- | --- | --- | --- | -| `SynchronizationStorageQueueMessageProcessorPlugin` | Configures all Content messages to sync to storage, and mark messages as failed in the event of an error. | None | `Spryker\Zed\Synchronization\Communication\Plugin\Queue` | - -**src/Pyz/Zed/Queue/QueueDependencyProvider.php** - -```php - new SynchronizationStorageQueueMessageProcessorPlugin(), - ]; - } -} -``` - -#### Add Event Plugins - -| Plugin | Specification | Prerequisites | Namespace | -| --- | --- | --- | --- | -| `ContentStorageEventResourceRepositoryPlugin` | Can be executed to trigger events for all content entries from the database to publish them to the `spy_content_storage` table. | None | `Spryker\Zed\ContentStorage\Communication\Plugin\Event` | - -**src/Pyz/Zed/EventBehavior/EventBehaviorDependencyProvider.php** - -```php -Storage TypeTarget EntityExample Expected Data IdentifierRedisContent Bannercontent:en_us:br1RedisContent Abstract Product Listcontent:en_us:apl2RedisContent Product Setcontent:en_us:ps-1RedisContent File Listcontent:en_us:0d9f4722-d076-5acc-9d8e-e9daff7cd61) - -**Content Banner: Example Expected Data Fragment** - -```json -{ - "term": "Banner", - "parameters": { - "title": "banner title 1", - "subtitle": "banner sub-title 1", - "image_url": "http:\/\/example.com\/b2c\/24699831-1991.jpg", - "click_url": "http:\/\/www.demo-spryker.local\/en\/asus-transformer-book-t200ta-139", - "alt_text": "banner image 1" - } -} -``` - -**Content Abstract Product List: Example Expected Data Fragment** - -```json -{ - "term": "Abstract Product List", - "parameters": { - "id_product_abstracts": [ - 204, - 205 - ] - } -} -``` - -**Content Product Set: Example Expected Data Fragment** - -```json -{ - "term": "Product Set", - "parameters": { - "id_product_set": 1 - } -} -``` - -**Content File List: Example Expected Data Fragment** - -```json -{ - "term": "File List", - "parameters": { - "file_ids": [ - 1, - 2 - ] - } -} -``` - -### 4) Import Data -#### Import Content Items into Zed -Prepare your data according to your requirements using our demo data: - -**vendor/spryker/content-banner-data-import/data/import/content_banner.csv** - -```yaml -key,name,description,title.default,title.en_US,title.de_DE,subtitle.default,subtitle.en_US,subtitle.de_DE,image_url.default,image_url.en_US,image_url.de_DE,click_url.default,click_url.en_US,click_url.de_DE,alt_text.default,alt_text.en_US,alt_text.de_DE -br1,Test Banner 1,Lorem Ipsum,banner title 1,,,banner sub-title 1,,,http://example.com/b2c/24699831-1991.jpg,,,http://www.demo-spryker.local/en/asus-transformer-book-t200ta-139,,,banner image 1,, -br2,Test Banner 2,Ipsum Ipsum,banner title 2,us banner title 2,,banner sub-title 2,us banner sub-title 2,,http://example.com/en/asus-zenpad-z170c-157,http://www.demo-spryker.local/en/asus-zenpad-z170c-157,,banner image 2,banner image 2, -br3,Test Banner 3,Lorem Lorem,banner title 3,,de banner title 3,banner sub-title 3,,banner sub-title 3de,http://example.com/en/canon-powershot-n-035,,http://www.demo-spryker.local/en/canon-powershot-n-035,banner image 3,,banner image 3 -``` - -| Column | REQUIRED | Data Type | Data Explanation | -| --- | --- | --- | --- | -| key | mandatory | string (unique) | Reference used for banner updates. | -| name | mandatory | string | Content Item name. | -| description | mandatory | string | Content Item description. | -| title.default, title.en_US, title.de_DE | mandatory (at least one locale) | string | Localized banner title. | -| subtitle.default, subtitle.en_US, subtitle.de_DE | mandatory (at least one locale) | string | Localized banner subtitle. | -| image_url.default, image_url.en_US, image_url.de_DE | mandatory (at least one locale) | string | Localized banner image URL. | -| click_url.default, click_url.en_US, click_url.de_DE | mandatory (at least one locale) | string | Localized banner click URL. | -| alt_text.default, alt_text.en_US, alt_text.de_DE | mandatory (at least one locale) | string | Localized banner alternative text for an image. | - -**vendor/spryker/content-product-data-import/data/import/content_product_abstract_list.csv** - -```yaml -key,name,description,skus.default,skus.en_US,skus.de_DE -apl1,APL Name 1,APL Description 1,"204,205","","" -apl2,APL Name 2,APL Description 2,"191,190","","156,154" -apl3,APL Name 3,APL Description 3,"180,171","152,151","" -``` - -| Column | REQUIRED | Data Type | Data Explanation | -| --- | --- | --- | --- | -| key | mandatory | string (unique) | Reference used for banner updates. | -| name | mandatory | string | Content Item name. | -| description | mandatory | string | Content Item description. | -| skus.default, skus.en_US, skus.de_DE | mandatory (at least one locale) | string | Localized abstract product list, one or more comma separated product SKUs. | - -**vendor/spryker/content-product-set-data-import/data/import/content_product_set.csv** - -```yaml -key,name,description,product_set_key.default,product_set_key.en_US,product_set_key.de_DE -PS-1,PS Name 1,PS Description 1,1_hp_set,, -PS-2,PS Name 2,PS Description 2,2_sony_set,,1_hp_set -PS-3,PS Name 3,PS Description 3,3_tomtom_runner_set,2_sony_set, -``` - -| Column | REQUIRED | Data Type | Data Explanation | -| --- | --- | --- | --- | -| key | mandatory | string (unique) | Reference used for banner updates. | -| name | mandatory | string | Content Item name. | -| description | mandatory | string | Content Item description. | -| product_set_key.default,
            product_set_key.en_US,
            product_set_key.de_DE | mandatory (at least one locale) | string | Localized product set key. | - -Register the following plugin to enable Content Items data import: - -| Plugin | Specification | Prerequisites | Namespace | -| --- | --- | --- | --- | -| `ContentBannerDataImportPlugin` | Imports content banners data into the database. | None | `Spryker\Zed\ContentBannerDataImport\Communication\Plugin` | -| `ContentProductAbstractListDataImportPlugin` | Imports content abstract product lists data into the database. | None | `Spryker\Zed\ContentProductDataImport\Communication\Plugin` | -| `ContentProductSetDataImportPlugin` | Imports content product sets data into the database. | None | `Spryker\Zed\ContentProductSetDataImport\Communication\Plugin` | - -**src/Pyz/Zed/DataImport/DataImportDependencyProvider.php** - -```php -ModuleExpected Directory`ContentBannerWidget``vendor/spryker-shop/content-banner-widget``ContentProductWidget``vendor/spryker-shop/content-product-widget``ContentProductSetWidget``vendor/spryker-shop/content-product-set-widget``ContentFileWidget``vendor/spryker-shop/content-file-widget` -{% endinfo_block %} - -### 2) Set up Behavior -#### Set up Additional Functionality -Enable the following behaviors by registering the plugins: - -| Plugin | Specification | Prerequisites | Namespace | -| --- | --- | --- | --- | -| `ContentBannerTwigPlugin` | Adds the `content_banner(id, template)` function to Yves and CMS blocks/page. | None | `SprykerShop\Yves\ContentBannerWidget\Plugin\Twig` | -| `ContentProductAbstractListTwigPlugin` | Adds the `content_product_abstract_list(id, template)` function to Yves and CMS blocks/page. | None | `SprykerShop\Yves\ContentProductWidget\Plugin\Twig` | -| `ContentProductSetTwigPlugin` | Adds the `content_product_set(id, template)` function to Yves and CMS blocks/page. | None | `SprykerShop\Yves\ContentProductSetWidget\Plugin\Twig` | -| `ContentFileListTwigPlugin` | Adds the `content_file_list(id, template)` function to Yves and CMS blocks/page. | None | `SprykerShop\Yves\ContentFileWidget\Plugin\Twig` | - -**src/Pyz/Yves/Twig/TwigDependencyProvider.php** - -```php -
          • Gets executed after the order is saved to Persistence.
          • Persists `orderCustomReference` in the `spy_sales_order` schema.
          | None | `Spryker\Zed\OrderCustomReference\Communication\Plugin\Sales\` | - -**src/Pyz/Zed/Sales/SalesDependencyProvider.php** - -```php -ModuleExpected Directory`CustomerAccess``vendor/spryker/customer-access``CustomerAccessPermission``vendor/spryker/customer-access-permission``CustomerAccessStorage``vendor/spryker/customer-access-storage``CustomerAccessGui``vendor/spryker/customer-access-gui` -{% endinfo_block %} - -### 2) Set up Configuration - -Add your custom project configuration to adjust the module behavior. - -{% info_block infoBox "Info" %} -These are going to be the setup content types in your system, so make sure that you cover all types of content you would like hidden from unauthenticated users. -{% endinfo_block %} - -**src/Pyz/Zed/CustomerAccess/CustomerAccessConfig.php** - - ```php - - - - - - -
          -
          - ``` - -Run the following commands to apply database changes and generate entity and transfer changes: -```bash -console transfer:generate -console propel:install -console transfer:generate -``` - -{% info_block warningBox "Verification" %} -Make sure that the following changes by checking your database:
          Database EntityTypeEvent
          `spy_unauthenticated_customer_access`tablecreated
          `spy_unauthenticated_customer_access_storage`tablecreated
          -{% endinfo_block %} - -{% info_block warningBox "Verification" %} -Make sure that the following changes in transfer objects:
          TransferTypeEventPath
          `CustomerAccess`classcreated`src/Generated/Shared/Transfer/CustomerAccessTransfer`
          `ContentTypeAccess`classcreated`src/Generated/Shared/Transfer/ContentTypeAccessTransfer`
          `SpyUnauthenticatedCustomerAccessEntity`classcreated`src/Generated/Shared/SpyUnauthenticatedCustomerAccessEntity`
          `SpyUnauthenticatedCustomerAccessStorageEntityTransfer`classcreated`src/Generated/Shared/SpyUnauthenticatedCustomerAccessStorageEntity`
          -{% endinfo_block %} - -{% info_block warningBox "Verification" %} -Make sure that the changes were implemented successfully. For this purpose, trigger the following methods and make sure that the above events have been triggered:
          PathMethod Name
          `src/Orm/Zed/CustomerAccess/Persistence/SpyUnauthenticatedCustomerAccess.php``prepareSaveEventName( -{% endinfo_block %}`
          `addSaveEventToMemory()`
          `addDeleteEventToMemory()`
          ) - -### 3) Configure Export to Redis - -This step will publish tables on change (create, edit, delete) to the `spy_unauthenticated_customer_access_storage` and synchronize the data to Storage. - -#### Set up Event Listeners - -| Plugin | Specification | Prerequisites | Namespace | -|---|---|---|---| -| `CustomerAccessStorageEventSubscriber` | Registers listeners that are responsible for publishing customer access data based on changes to customer access entities | None | `Spryker\Zed\CustomerAccessStorage\Communication\Plugin\Event\Subscriber` | - -**src/Pyz/Zed/Event/EventDependencyProvider.php** - - ```php - add(new CustomerAccessStorageEventSubscriber()); - - return $eventSubscriberCollection; - } -} -``` - -{% info_block warningBox "Verification" %} -Make sure that when a product list is created, updated or deleted, they are exported (or removed -{% endinfo_block %} to Redis and Elasticsearch accordingly.) - -| Target Entity | Example Expected Data Identifier | -|---|---| -| `spy_unauthenticated_customer_access` | `kv:unauthenticated_customer_access` | - -**Example Expected Data Fragment** - -```xml -{ - "content_type_access": [ - { - "id_unauthenticated_customer_access": 1, - "content_type": "price", - "is_restricted": true - }, - { - "id_unauthenticated_customer_access": 2, - "content_type": "order-place-submit", - "is_restricted": true - }, - { - "id_unauthenticated_customer_access": 3, - "content_type": "add-to-cart", - "is_restricted": true - }, - { - "id_unauthenticated_customer_access": 4, - "content_type": "wishlist", - "is_restricted": true - }, - { - "id_unauthenticated_customer_access": 5, - "content_type": "shopping-list", - "is_restricted": true - } - ], - "_timestamp": 1553177014.3275149 - } -``` - -#### Set up Re-Sync Features - -| Plugin | Specification | Prerequisites | Namespace | -|---|---|---|---| -| `CustomerAccessSynchronizationDataPlugin` | Allows populating empty storage table with data. | None | `Spryker\Zed\CustomerAccessStorage\Communication\Plugin\Synchronization` | - -**src/Pyz/Zed/Synchronization/SynchronizationDependencyProvider.php** - - ```php -
        • `SeePricePermissionPlugin` will show or hide prices at all pages depending on configuration value
        • `SeeOrderPlaceSubmitPermissionPlugin` will allow or disallow order submitting after going through the checkout process depending on configuration value
        • `SeeAddToCartPermissionPlugin` is responsible for "Add to Cart" button on PDP. It will be available or not depending on configuration value
        • `SeeWishlistPermissionPlugin` takes care about "Add to Wishlist" button on PDP. It will be shown or not depending on configuration value
        • `SeeShoppingListPermissionPlugin` will allow or disallow adding product to shopping list from PDP depending on configuration value
        • `CustomerAccessPermissionStoragePlugin` is responsible for customer permissions retrieving
        ) - -## Install feature frontend - -### Prerequisites - -Overview and install the necessary features before beginning the integration step. - -| Name | Version | -|---|---| -| Spryker Core | {{page.version}} | - -### 1) Add Translations -Append glossary according to your configuration: - -**src/data/import/glossary.csv** - -```html -customer.access.cannot_see_price,Please login to see the price,en_US -customer.access.cannot_see_price,Bitte melden Sie sich an um den Preis zu sehen,de_DE -``` - -Run the following console command to import data: - -```bash -console data:import glossary -``` - -{% info_block warningBox "Verification" %} -Make sure that in the database the configured data has been added to the `spy_glossary` table. -{% endinfo_block %} diff --git a/docs/scos/dev/feature-integration-guides/202005.0/customer-account-management-feature-integration.md b/docs/scos/dev/feature-integration-guides/202005.0/customer-account-management-feature-integration.md deleted file mode 100644 index a276230c831..00000000000 --- a/docs/scos/dev/feature-integration-guides/202005.0/customer-account-management-feature-integration.md +++ /dev/null @@ -1,210 +0,0 @@ ---- -title: Customer Account Management feature integration -description: The guide walks you through the process of adding Redirect support for Customer login functionality to your project. -last_updated: Aug 7, 2020 -template: feature-integration-guide-template -originalLink: https://documentation.spryker.com/v5/docs/customer-account-management-feature-integration -originalArticleId: 99b4a077-2df8-4313-b666-748af042776c -redirect_from: - - /v5/docs/customer-account-management-feature-integration - - /v5/docs/en/customer-account-management-feature-integration -related: - - title: Customer Account Management + Order Management feature integration - link: docs/scos/dev/feature-integration-guides/page.version/customer-account-management-order-management-feature-integration.html - - title: Glue API - Customer Account Management feature integration - link: docs/scos/dev/feature-integration-guides/page.version/glue-api/glue-api-customer-account-management-feature-integration.html ---- - -{% info_block errorBox "Included features" %} - -The following feature integration guide expects the basic feature to be in place. The current feature integration guide only adds: -* Redirect support for Customer login functionality. -* Password set and reset console commands for customers. -* Double opt-in for customer registration. - -{% endinfo_block %} - -## Install Feature Core - -Follow the steps below to install the feature core. - -### Prerequisites - -Overview and install the necessary features before beginning the integration step. - - -| Name | Version | -| --- | --- | -| Spryker Core | dev-master | - -### 1) Install the required modules using Composer - -Run the following command(s) to install the required modules: - -```bash -composer require spryker-feature/customer-account-management: "^dev-master" --update-with-dependencies -``` - -{% info_block warningBox "Verification" %} - -Ensure that the following modules have been installed: - - -| Module | Expected Directory | -| --- | --- | -| Customer | vendor/spryker/customer | - -{% endinfo_block %} - -### 2) Set up Transfer Objects - -Run the following command to generate transfer changes: - -```bash -console transfer:generate -``` - -{% info_block warningBox "Verification" %} - -Ensure that you have triggered the following changes in transfer objects: - - -| Transfer | Type | Event | Path | -| --- | --- | --- | --- | -| CustomerCriteriaFilterTransfer | class | created | src/Generated/Shared/Transfer/CustomerCriteriaFilterTransfer | - -{% endinfo_block %} - - - - - - -### 3) Set up Behavior - -Enable the following behaviors by registering the plugins: - - -| Plugin | Specification | Prerequisites | Namespace | -| --- | --- | --- | --- | -| CustomerPasswordResetConsole | Generates password restoration keys and sends a password reset email to the customers without a password. Sends a password reset email to all the customers if the corresponding command option is provided. | None | SprykerShop\Zed\Customer\Communication\Console | -| CustomerPasswordSetConsole | Sends the password reset email to all the customers with the empty password value in the database. | None | SprykerShop\Zed\Customer\Communication\Console | - -**src/Pyz/Zed/Console/ConsoleDependencyProvider.php** - -```php -setIsPromotion((bool)$this->request->request->get('isPromo'));` -3. Inject `ProductPromotionMapperPlugin` to Cart Module: - -```php -getProvidedDependency(CartDependencyProvider::PLUGIN_PROMOTION_PRODUCT_MAPPER); - } -} -``` - -5. Add call to plugin in `CartController`. - -```php -getFactory() - ->getProductPromotionMapperPlugin() - ->mapPromotionItemsFromProductStorage( - $quoteTransfer, - $this->getRequest() - ); - - $this->viewResponse([ - //other data - 'promotionStorageProducts' => $promotionStorageProducts, - ]); - -} -``` - -Change twig templates to render promotion products. Since we've changed how quantity is rendered for promotion products, some cart templates in our demoshop were reorganized. - -Firstly, make sure a promotion item twig template is called in `Pyz/Yves/Cart/Theme/default/cart/index.twig`. This usually should be placed after cart items as in the example below: - -```php -{% raw %}{%{% endraw %} for cartItem in cartItems {% raw %}%}{% endraw %} - {% raw %}{%{% endraw %} if cartItem.bundleProduct is defined {% raw %}%}{% endraw %} - {% raw %}{%{% endraw %} include '@cart/cart/parts/cart-item.twig' with { - cartItem: cartItem.bundleProduct, - bundleItems: cartItem.bundleItems - } {% raw %}%}{% endraw %} - {% raw %}{%{% endraw %} else {% raw %}%}{% endraw %} - {% raw %}{%{% endraw %} include '@cart/cart/parts/cart-item.twig' {% raw %}%}{% endraw %} - {% raw %}{%{% endraw %} endif {% raw %}%}{% endraw %} - {% raw %}{%{% endraw %} endfor {% raw %}%}{% endraw %} //existing code - -{% raw %}{%{% endraw %} include '@DiscountPromotion/discount-promotion/item-list.twig' {% raw %}%}{% endraw %} //new include -``` - -`Pyz/Yves/Cart/Theme/default/cart/parts/cart-item.twig` was also heavily modified to work with promotion products (please check our demoshop version), as the cart page can be different per project. - -The key points that were changed: the "Add to cart" button extracted to `Pyz/Yves/Cart/Theme/default/cart/parts/cart-add-to-cart.twig`, item price information extracted to `Pyz/Yves/Cart/Theme/default/cart/parts/cart-item-prices.twig`, cart product variants extracted to `Pyz/Yves/Cart/Theme/default/cart/parts/cart-product-variants.twig`. - -Below there is the demoshop `Pyz/Yves/Cart/Theme/default/cart/parts/cart-item.twig` file for reference. - -```php -
        - - {% raw %}{%{% endraw %} include '@Cart/cart/parts/cart-images.twig' {% raw %}%}{% endraw %} - -
          - {# General data #} -
        • {% raw %}{{{% endraw %} cartItem.name {% raw %}}}{% endraw %}
        • {% raw %}{{{% endraw %} 'cart.item.sku' | trans {% raw %}}}{% endraw %} {% raw %}{{{% endraw %} cartItem.sku {% raw %}}}{% endraw %}
        • - - {% raw %}{%{% endraw %} if bundleItems is defined {% raw %}%}{% endraw %} - {# Product Bundles #} -
        • {% raw %}{{{% endraw %} 'cart.item.bundle.description' | trans {% raw %}}}{% endraw %}
            - {% raw %}{%{% endraw %} for bundleItem in bundleItems {% raw %}%}{% endraw %} -
          • {% raw %}{{{% endraw %} bundleItem.quantity {% raw %}}}{% endraw %} x {% raw %}{{{% endraw %} bundleItem.name {% raw %}}}{% endraw %}
          • - {% raw %}{%{% endraw %} endfor {% raw %}%}{% endraw %} -
        • - {% raw %}{%{% endraw %} else {% raw %}%}{% endraw %} - {% raw %}{%{% endraw %} include '@Cart/cart/parts/cart-product-variants.twig' {% raw %}%}{% endraw %} - {% raw %}{%{% endraw %} endif {% raw %}%}{% endraw %} -
        - - {% raw %}{%{% endraw %} include '@Cart/cart/parts/cart-item-prices.twig' {% raw %}%}{% endraw %} - - {% raw %}{%{% endraw %} include '@Cart/cart/parts/cart-add-to-cart.twig' {% raw %}%}{% endraw %} -
        -``` - -Make sure `CartOperationHandler` sets ID of `idDiscountPromotion`. - -```php -public function add($sku, $quantity, $optionValueUsageIds = []) - { - $itemTransfer = new ItemTransfer(); - $itemTransfer->setSku($sku); - $itemTransfer->setQuantity($quantity); - $itemTransfer->setIdDiscountPromotion($this->getIdDiscountPromotion()); //new setter - - $this->addProductOptions($optionValueUsageIds, $itemTransfer); - - $quoteTransfer = $this->cartClient->addItem($itemTransfer); - $this->cartClient->storeQuote($quoteTransfer); - } - -protected function getIdDiscountPromotion() -{ - return (int)$this->request->request->get('idDiscountPromotion'); -} -``` -When using promotion discount with voucher code, you will get the error message that voucher is not correct. It’s because voucher code is a product offered as promotion and not yet added to cart. - -You have to modify `\Pyz\Yves\Discount\Handler\VoucherHandler::addFlashMessages` to handle discounts with promotions. - -Add the following condition: - -```php -namespace Pyz\Yves\Discount\Handler; - -class VoucherHandler extends BaseHandler implements VoucherHandlerInterface -{ - /** - * @param \Generated\Shared\Transfer\QuoteTransfer $quoteTransfer - * @param string $voucherCode - * - * @return void - */ - protected function addFlashMessages($quoteTransfer, $voucherCode) - { - - //---new code - if ($this->isVoucherFromPromotionDiscount($quoteTransfer, $voucherCode)) { - return; - } - //----- - - if ($this->isVoucherCodeApplied($quoteTransfer, $voucherCode)) { - $this->setFlashMessagesFromLastZedRequest($this->calculationClient); - return; - } - - $this->flashMessenger->addErrorMessage('cart.voucher.apply.failed'); - } - - /** - * @param \Generated\Shared\Transfer\QuoteTransfer $quoteTransfer - * @param string $voucherCode - * - * @return bool - */ - protected function isVoucherFromPromotionDiscount(QuoteTransfer $quoteTransfer, $voucherCode) - { - foreach ($quoteTransfer->getUsedNotAppliedVoucherCodes() as $voucherCodeUsed) { - if ($voucherCodeUsed === $voucherCode) { - return true; - } - } - - return false; - } -} -``` - -After this you should be able to use the new discounts with promotion. diff --git a/docs/scos/dev/feature-integration-guides/202005.0/enabling-gift-cards.md b/docs/scos/dev/feature-integration-guides/202005.0/enabling-gift-cards.md deleted file mode 100644 index 553e2b3730a..00000000000 --- a/docs/scos/dev/feature-integration-guides/202005.0/enabling-gift-cards.md +++ /dev/null @@ -1,64 +0,0 @@ ---- -title: Enabling Gift Cards -description: The guide walks you through the process of installing the Gift Cards feature in the project. -last_updated: Apr 3, 2020 -template: feature-integration-guide-template -originalLink: https://documentation.spryker.com/v5/docs/enabling-gift-cards -originalArticleId: 0ead54d0-613a-4f16-9d33-19e47c6210a7 -redirect_from: - - /v5/docs/enabling-gift-cards - - /v5/docs/en/enabling-gift-cards ---- - -The Gift Cards feature is shipped with the following modules: - -* **GiftCard**: implements the basic functionality of the Gift Cards feature as well as the Replacement value-checking strategy. - -* **GiftCardBalance**: implements gift card Balance value-checking strategy<. - -* **GiftCardMailConnector**: responsible for sending e-mails on gift cards usage (balance change) as well as gift cards codes delivery. - -* **Nopayment**: implements payment methods if the price to pay is fully covered by a gift card. - -To enable the gift cards in your project, do the following: - -1. Make sure you have the correct versions of the required modules. To automatically update to the latest non-BC breaking versions, run `composer update "spryker/*"` -2. Require the modules in your `composer.json` by running: - -```bash -composer require spryker/gift-card:"^1.0.0" spryker/gift-card-balance:"^1.0.0" -spryker/gift-card-mail-connector:"^1.0.0" spryker/nopayment:"^4.0.0" -spryker/product-management:"^0.12.0" -``` - -3. Enable necessary plugins. See the table below for information on available plugins, where to install them and value checking strategies they are used for. - - -| Plugin | Description | Where to Install | Strategy | -| --- | --- | --- | --- | -| `GiftCardCalculatorPlugin` | Splits applicable and non-applicable Gift Cards. Creates payment methods for applicable Gift Cards. |`CalculationDependencyProvider::getQuoteCalculatorPluginStack` | - | -| `GiftCardCurrencyMatchDecisionRulePlugin` |Doesn’t allow using a Gift Card with a different currency rather than the one the customer has used while performing the payment. | `GiftCardDependencyProvider::getDecisionRulePlugins` | - | -| `GiftCardIsActiveDecisionRulePlugin` | Doesn’t allow using inactive Gift Cards. |`GiftCardDependencyProvider::getDecisionRulePlugins` | - | -| `GiftCardDiscountableItemFilterPlugin` |Restricts using a Gift Card for another Gift Cards in a cart. The plugin filters out Gift Cards from discountable items. |`DiscountDependencyProvider::getDiscountableItemFilterPlugins` | - | -| `GiftCardIsUsedDecisionRulePlugin` | As a part of the replacement strategy, this plugin does not allow using a Gift Card twice. |`GiftCardDependencyProvider::getDecisionRulePlugins` | Replacement | -| `GiftCardMetadataExpanderPlugin` | Populates Gift Card information when it is in the cart. | `CartDependencyProvider::getExpanderPlugins` | - | -| `GiftCardOrderItemSaverPlugin` | Saves a Gift Card with populated data when an order is placed. | `CheckoutDependencyProvider::getCheckoutOrderSavers` | - | -| `GiftCardOrderSaverPlugin` | Keeps Gift Card as an order payment method. | `PaymentDependencyProvider::extendPaymentPlugin` with a key `PaymentDependencyProvider::CHECKOUT_ORDER_SAVER_PLUGINS`| - | -| `GiftCardPaymentMethodFilterPlugin` | Now, every payment method is compatible with a Gift Card in the cart. The plugin filters out all incompatible payment methods from available ones during checkout payment methods step. | `PaymentDependencyProvider::getPaymentMethodFilterPlugins` | - | -| `GiftCardPreCheckPlugin` | Confirms that a Gift Card is not used at the moment and that payment method amount assigned to the Gift Card is no more than the Gift Card amount itself. | `PaymentDependencyProvider::extendPaymentPlugin` with a key `PaymentDependencyProvider::CHECKOUT_PRE_CHECK_PLUGINS` | - | -| `GiftCardRecreateValueProviderPlugin` |For replacement: defines a Gift Card leftover. It’s simply a Gift Card amount for this strategy. | `GiftCardDependencyProvider::getValueProviderPlugin` | Replacement | -| `CreateGiftCardCommandPlugin` | It is an order management system command to create a Gift Card based on a paid order item (a Gift Card item). | `OmsDependencyProvider::extendCommandPlugins` | - | -| `ReplaceGiftCardsCommandPlugin` | For placement strategy: creates a new Gift Card based on leftover from the previous one. | `OmsDependencyProvider::extendCommandPlugins` | Replacement | -| `IsGiftCardConditionPlugin` | This plugin is used to define an order management system state machine process routing. | `OmsDependencyProvider::extendConditionPlugins` | - | -| `OnlyGiftCardShipmentMethodFilterPlugin` | Filters out shipment methods that are incompatible with Gift Cards. | `ShipmentDependencyProvider::getMethodFilterPlugins` | - | -| `BalanceCheckerApplicabilityPlugin` | For balance strategy: checks positive balance on a Gift Card. | `GiftCardDependencyProvider::getDecisionRulePlugins` | Balance | -| `BalanceTransactionLogPaymentSaverPlugin` | For balance strategy: persists a Gift Card during a payment processing. | `GiftCardDependencyProvider::getPaymentSaverPlugins` | Balance | -| `GiftCardBalanceValueProviderPlugin` | For balance strategy: provides available Gift Card amount. Gift Card amount equals to logged transactions. | `GiftCardDependencyProvider::getValueProviderPlugin` | Balance | -| `GiftCardDeliveryMailTypePlugin` | Sends an e-mail about a successfully issued Gift Card to a buyer. | `MailDependencyProvider::MAIL_TYPE_COLLECTION` | - | -| `GiftCardUsageMailTypePlugin` | Sends an e-mail on Gift Card usage to its user. | `MailDependencyProvider::MAIL_TYPE_COLLECTION` | - | -| `ShipGiftCardByEmailCommandPlugin` | An order management system command which triggers Gift Card electronic shipment. |`OmsDependencyProvider::extendCommandPlugins` | - | -| `NopaymentHandlerPlugin` | A payment method placeholder that is used when an order is paid by only a Gift Card without a real payment method. | `CheckoutDependencyProvider::extendPaymentMethodHandler` | - | -| `NopaymentPreCheckPlugin` | Doesn’t allow placing an order with a price to pay more than 0 with a NoPayment payment method. | `PaymentDependencyProvider::extendPaymentPlugins` with a key `PaymentDependencyProvider::CHECKOUT_ORDER_SAVER_PLUGINS` | - | -| `PriceToPayPaymentMethodFilterPlugin` | Filters payment methods based on cart totals. | `PaymentDependencyProvider::getPaymentMethodFilterPlugins` | - | -| `PaymentFormFilterPlugin` | Each payment method provides its subforms. The plugin filters them out based on an available payment method list. | `CheckoutDependencyProvider::getPaymentFormFilterPlugins` | - | -| `PaymentCalculatorPlugin` | Distributes total prices to payment methods. Calculates price to pay to quote totals. | `CalculationDependencyProvider::getQuoteCalculatorPluginStack` | - | diff --git a/docs/scos/dev/feature-integration-guides/202005.0/enabling-the-content-widget.md b/docs/scos/dev/feature-integration-guides/202005.0/enabling-the-content-widget.md deleted file mode 100644 index dab0402bf20..00000000000 --- a/docs/scos/dev/feature-integration-guides/202005.0/enabling-the-content-widget.md +++ /dev/null @@ -1,253 +0,0 @@ ---- -title: Enabling the Content Widget -description: The guide walks you through the process of installing the Content Widget feature in the project. -last_updated: Apr 3, 2020 -template: feature-integration-guide-template -originalLink: https://documentation.spryker.com/v5/docs/enabling-cms-widget -originalArticleId: e238d585-bfc1-48e6-a132-eb4404d901ac -redirect_from: - - /v5/docs/enabling-cms-widget - - /v5/docs/en/enabling-cms-widget ---- - -CMS content widgets is a CMS feature for adding dynamic content to CMS pages/blocks. - -For example, you can list a single product, product lists, product groups or product sets. - -## Integration -First of all you need to install the `cms-content-widget` module with Composer (update composer.json with `"cms-content-widget": "^1.0.0"` or use Composer require). - -To enable the feature, configure it in your project. - -Integration of CMS widget consists of three main parts: - -1. Registering twig function in Yves. -2. Providing configuration in module shared directory so that Yves and Zed can read it. -3. (Optionally) Providing CMS content function parameter mapper plugins. - -### Step 1: Registering twig function in Yves. -The CMS content widget is a twig function. Therefore, twig syntax rules apply and must be followed when including the inside content. -For example, `{% raw %}{{{% endraw %} product(['012', '013', '321']) {% raw %}}}{% endraw %}` will include carousel component with three products. - -To register a new function, you need to create a plugin which implements the `\Spryker\Yves\CmsContentWidget\Dependency\CmsContentWidgetPluginInterface` interface and place it in Yves application. Plugins are registered in `\Pyz\Yves\CmsContentWidget\CmsContentWidgetependencyProvider::getCmsContentWidgetPlugins` which is an array stored as key => value pairs, -where **key** is the function name you want to use in a template and **value** is a specific plugin instance. This plugin needs configuration which is explained in the next paragraph. - -To enable the feature for CMS blocks, you have to configure twig rendering plugin `\Spryker\Yves\CmsContentWidget\Plugin\CmsTwigContentRendererPlugin` and add it to `\Pyz\Yves\CmsBlock\CmsBlockDependencyProvider::getCmsBlockTwigContentRendererPlugin`. This will enable twig function rendering in CMS blocks. - -### Step 2: Providing CMS content widget configuration. - -Some information needs to be shared between Yves and Zed. Therefore, the configuration plugin must be placed in a shared namespace. - -**The new plugin must implement:** `\Spryker\Shared\CmsContentWidget\Depedency\CmsContentWidgetConfigurationProviderInterface` which is used by Yves and Zed. - -When used in Yves, inject this plugin directly to your plugin and use configuration when building twig callable. When used in Zed, it should be added to the `\Pyz\Zed\CmsContentWidget\CmsContentWidgetConfig::getCmsContentWidgetConfigurationProviders` plugin array where key is the function name and value is the plugin instance. Providing it to Zed allows rendering usage information below the content editor. - -The configuration provider requires implementation of the following methods: - -* `getFunctionName` is the name of function when used in CMS content. -* `getAvailableTemplates` is the list of supported templates, it's a key value pair where key is the template identifier which is passed to function and value is a path to twig template. -* `getUsageInformation` is a plain text usage information, displayed when rendering help pane below the content editor. - -### Step 3: Function mapping plugins - optional. - -When defining functions, you may want to accept "natural identifiers", such as "sku" for products or "set_key" for product sets. It is preferable that the content manager provides the identifiers instead of relying on surrogate keys. The problem arises when you need to read data from the Yves data store as the Yves data store uses "surrogate key/primary keys". Therefore, to read data, convert/map those natural identifiers to surrogate keys. - -We provide mappers to help map the identifiers. Each mapper must implement: `\Spryker\Zed\CmsContentWidget\Dependency\Plugin\CmsContentWidgetParameterMapperPluginInterface` and be added to `\Pyz\Zed\Cms\CmsDependencyProvider::getCmsContentWidgetParameterMapperPlugins` where **key** is the function name and **value** is a specific mapper. - -The mapper receives unmapped values where your plugin is responsible for mapping and returning it as an array. Mapper plugins are invoked by CMS and block collectors. To export this data, you must register two plugins one for CMS pages and one for CMS blocks. - -For `CmsBlockCollector`, add plugin `\Spryker\Zed\CmsContentWidget\Communication\Plugin\CmsBlockCollector\CmsBlockCollectorParameterMapExpanderPlugin` to `\Pyz\Zed\CmsBlockCollector\CmsBlockCollectorDependencyProvider::getCollectorDataExpanderPlugins`. - -For `CmsCollector`, add plugin `\Spryker\Zed\CmsContentWidget\Communication\Plugin\CmsPageCollector\CmsPageCollectorParameterMapExpanderPlugin` to `\Pyz\Zed\CmsCollector\CmsCollectorDependencyProvider::getCollectorDataExpanderPlugins`. - -Make sure to update the `CmsBlockCollector` and `CmsCollector` modules as expander plugins were added during this feature release. It's exported to `\Spryker\Shared\CmsContentWidget\CmsContentWidgetConstants::CMS_CONTENT_WIDGET_PARAMETER_MAP`. You can access parameter mapping inside the ` $contex` variable when implementing the CMS content function plugin in Yves. - -The `$context` is a special twig function variable that uses twig to pass the data you normally send to the template. This variable has a `cmsContent` key. This key has data from the Yves store. This can be either a CMS page or block data. - -The parameter mapping can be read from: - -```bash -$context['cmsContent'][CmsContentWidgetConstants::CMS_CONTENT_WIDGET_PARAMETER_MAP][$this->widgetConfiguration->getFunctionName()]; -``` - -For example, you can use this method as a basis when implementing `\Spryker\Yves\CmsContentWidget\Dependency\CmsContentWidgetPluginInterface`. - -```php -namespace Spryker\Yves\Module\Plugin; - -class CmsWidgetPlugin extends AbstractPlugin implements CmsContentWidgetPluginInterface -{ - /** - * @return \Callable - */ - public function getContentWidgetFunction() - { - return function (Twig_Environment $twig, array $context, $parameters, $templateIdentifier = null) { - return $twig->render( - $this->resolveTemplatePath($templateIdentifier), - $this->getContent($context, $parameters) - ); - }; - } - - /** - * @param null|string $templateIdentifier - * - * @return string - */ - protected function resolveTemplatePath($templateIdentifier = null) - { - return '@Module/partials/function_template.twig' - } - - /** - * @param array $context - * @param array|string $parameters - * - * @return array - */ - protected function getContent(array $context, $parameters) - { - return []; //return data to be inserted into template - } - - } -``` - -## Provided Plugins -We provide three CMS content widget plugins . All are currently implemented in the demoshop so you can take them from our repository and integrate in your project. - -Plugin configuration is described below. - -### Zed Plugins: - -```php -namespace Pyz\Zed\CmsContentWidget; -class CmsContentWidgetConfig extends SprykerCmsContentConfig -{ - /** - * {@inheritdoc} - * - * @return array|\Spryker\Shared\CmsContentWidget\CmsContentWidget\CmsContentWidgetConfigurationProviderInterface[] - */ - public function getCmsContentWidgetConfigurationProviders() - { - return [ - \Spryker\Shared\CmsContentWidgetProductConnector\ContentWidgetConfigurationProvider\CmsProductContentWidgetConfigurationProvider::FUNCTION_NAME => new \Spryker\Shared\CmsProductConnector\ContentWidgetConfigurationProvider\CmsProductContentWidgetConfigurationProvider(), - \Spryker\Shared\CmsContentWidgetProductSetConnector\ContentWidgetConfigurationProvider\CmsProductSetContentWidgetConfigurationProvider::FUNCTION_NAME => new \Spryker\Shared\CmsProductSetConnector\ContentWidgetConfigurationProvider\CmsProductSetContentWidgetConfigurationProvider(), - \Spryker\Shared\CmsContentWidgetProductGroupConnector\ContentWidgetConfigurationProvider\CmsProductGroupContentWidgetConfigurationProvider::FUNCTION_NAME => new \Spryker\Shared\CmsProductGroupConnector\ContentWidgetConfigurationProvider\CmsProductGroupContentWidgetConfigurationProvider(), - ]; - } -} -``` - -### Zed CMS Configuration Providers: - -```php -namespace Pyz\Zed\CmsContentWidget; -class CmsContentWidgetConfig extends SprykerCmsContentConfig -{ - /** - * {@inheritdoc} - * - * @return array|\Spryker\Shared\CmsContentWidget\CmsContentWidget\CmsContentWidgetConfigurationProviderInterface[] - */ - public function getCmsContentWidgetConfigurationProviders() - { - return [ - \Spryker\Shared\CmsContentWidgetProductConnector\ContentWidgetConfigurationProvider\CmsProductContentWidgetConfigurationProvider::FUNCTION_NAME => new \Spryker\Shared\CmsProductConnector\ContentWidgetConfigurationProvider\CmsProductContentWidgetConfigurationProvider(), - \Spryker\Shared\CmsContentWidgetProductSetConnector\ContentWidgetConfigurationProvider\CmsProductSetContentWidgetConfigurationProvider::FUNCTION_NAME => new \Spryker\Shared\CmsProductSetConnector\ContentWidgetConfigurationProvider\CmsProductSetContentWidgetConfigurationProvider(), - \Spryker\Shared\CmsContentWidgetProductGroupConnector\ContentWidgetConfigurationProvider\CmsProductGroupContentWidgetConfigurationProvider::FUNCTION_NAME => new \Spryker\Shared\CmsProductGroupConnector\ContentWidgetConfigurationProvider\CmsProductGroupContentWidgetConfigurationProvider(), - ]; - } -} -``` - -### Zed CMS Collector Parameter Mapper Plugins: - -```php -namespace Pyz\Zed\CmsContentWidget; - -class CmsContentWidgetDependencyProvider extends SprykerCmsContentWidgetDependencyProvider -{ - - /** - * {@inheritdoc} - * - * @param \Spryker\Zed\Kernel\Container $container - * - * @return array|\Spryker\Zed\CmsContentWidget\Dependency\Plugin\CmsContentWidgetParameterMapperPluginInterface[] - */ - protected function getCmsContentWidgetParameterMapperPlugins(Container $container) - { - return [ - \Spryker\Shared\CmsProductConnector\ContentWidgetConfigurationProvider\CmsProductContentWidgetConfigurationProvider::FUNCTION_NAME => new \Spryker\Zed\CmsProductConnector\Communication\Plugin\Cms\CmsProductSkuMapperPlugin(), - \Spryker\Shared\CmsProductSetConnector\ContentWidgetConfigurationProvider\CmsProductSetContentWidgetConfigurationProvider::FUNCTION_NAME => new \Spryker\Zed\CmsProductSetConnector\Communication\Plugin\Cms\CmsProductSetKeyMapperPlugin(), - \Spryker\Shared\CmsProductGroupConnector\ContentWidgetConfigurationProvider\CmsProductGroupContentWidgetConfigurationProvider::FUNCTION_NAME => new \Spryker\Zed\CmsProductConnector\Communication\Plugin\Cms\CmsProductSkuMapperPlugin(), - ]; - } - -} -``` - -### Yves Plugin Dependencies - -```php -namespace Pyz\Zed\CmsContentWidget; - -use Spryker\Shared\CmsContentWidgetProductConnector\ContentWidgetConfigurationProvider\CmsProductContentWidgetConfigurationProvider; -use Spryker\Shared\CmsContentWidgetProductGroupConnector\ContentWidgetConfigurationProvider\CmsProductGroupContentWidgetConfigurationProvider; -use Spryker\Shared\CmsContentWidgetProductSetConnector\ContentWidgetConfigurationProvider\CmsProductSetContentWidgetConfigurationProvider; -use Spryker\Zed\CmsContentWidget\CmsContentWidgetConfig as SprykerCmsContentConfig; - -class CmsContentWidgetConfig extends SprykerCmsContentConfig -{ - /** - * {@inheritdoc} - * - * @return array|\Spryker\Shared\CmsContentWidget\Dependency\CmsContentWidgetConfigurationProviderInterface[] - */ - public function getCmsContentWidgetConfigurationProviders() - { - return [ - CmsProductContentWidgetConfigurationProvider::FUNCTION_NAME => new CmsProductContentWidgetConfigurationProvider(), - CmsProductSetContentWidgetConfigurationProvider::FUNCTION_NAME => new CmsProductSetContentWidgetConfigurationProvider(), - CmsProductGroupContentWidgetConfigurationProvider::FUNCTION_NAME => new CmsProductGroupContentWidgetConfigurationProvider(), - ]; - } -} -``` - - - -### Version Check When Using the Widget for CMS Blocks -If you use this widget for CMS Blocks, then check that you have proper versions of your modules as follows: `cms-block >= 1.2.0, cms-block-collector >= 1.1.0, cms-block-gui >= 1.1.0`. - - - -[//]: # (by Denis Turkov) diff --git a/docs/scos/dev/feature-integration-guides/202005.0/feature-integration-guides.md b/docs/scos/dev/feature-integration-guides/202005.0/feature-integration-guides.md deleted file mode 100644 index b449bfe3e7e..00000000000 --- a/docs/scos/dev/feature-integration-guides/202005.0/feature-integration-guides.md +++ /dev/null @@ -1,18 +0,0 @@ ---- -title: About Integration Guides -last_updated: Apr 3, 2020 -template: feature-integration-guide-template -originalLink: https://documentation.spryker.com/v5/docs/about-integration -originalArticleId: 7a93fc10-9b8f-4b08-b604-ff356184ce56 -redirect_from: - - /v5/docs/about-integration - - /v5/docs/en/about-integration ---- - -The integration guides provide step-by-step instructions on how to enable individual Spryker features for your project. - -Please keep in mind, that since Spryker Commerce OS is a highly modular system, you have total freedom in choosing what features to add to your project. When making a decision to install new features, we recommend not to bloat your project by installing everything, but opt for the features that are really justified in terms of your business needs. - -If you have spotted an issue with either of the guides, please feel free to [create an issue](https://github.com/spryker/spryker-docs/issues) or pull request by using the Edit on GitHub option. - -Not found an integration guide you are looking for? Let us know about it by [creating an issue on Github](https://github.com/spryker/spryker-docs/issues) or dropping an email to [academy@spryker.com](mailto:academy@spryker.com). diff --git a/docs/scos/dev/feature-integration-guides/202005.0/gift-cards-feature-integration.md b/docs/scos/dev/feature-integration-guides/202005.0/gift-cards-feature-integration.md deleted file mode 100644 index ba42d1c44d8..00000000000 --- a/docs/scos/dev/feature-integration-guides/202005.0/gift-cards-feature-integration.md +++ /dev/null @@ -1,1225 +0,0 @@ ---- -title: Gift Cards feature integration -description: The guide walks you through the process of installing the Gift Cards feature in the project. -last_updated: Aug 12, 2020 -template: feature-integration-guide-template -originalLink: https://documentation.spryker.com/v5/docs/gift-cards-feature-integration -originalArticleId: 30103fa9-5e8f-4ad7-b044-1b2c42ec983b -redirect_from: - - /v5/docs/gift-cards-feature-integration - - /v5/docs/en/gift-cards-feature-integration ---- - -## Install Feature Core -### Prerequisites -Install the required features: - -| Name | Version | -| --- | --- | -| Spryker Core | {{page.version}} | -| Cart | {{page.version}} | -|Product | {{page.version}} | -|Payments | {{page.version}} | -| Shipment | {{page.version}} | -| Order Management | {{page.version}} | -| Mailing & Notifications | {{page.version}} | -| Promotions & Discounts | {{page.version}} | - -### 1) Install the required modules using Composer -Run the following command(s) to install the required modules: - -```bash -composer require spryker-feature/gift-cards:"^{{page.version}}" --update-with-dependencies -``` - -{% info_block warningBox "Verification" %} -Make sure that the following modules have been installed:
        ModuleExpected Directory
        `CartCode``vendor/spryker/cart-code`
        `CartCodeExtension``vendor/spryker/cart-code-extension`
        `GiftCard``vendor/spryker/gift-card`
        `GiftCardBalance``vendor/spryker/gift-card-balance`
        `Nopayment``vendor/spryker/nopayment`
        -{% endinfo_block %} - -### 2) Set up Configuration -#### Gift Card Purchase Process -Extend your project with the following configuration. - -**src/Pyz/Zed/GiftCard/GiftCardConfig.php** - -```php - [ - GiftCardConfig::PROVIDER_NAME, - NopaymentConfig::PAYMENT_PROVIDER_NAME, - ], - 'Oms' => [ - GiftCardConfig::PROVIDER_NAME, - ], -]; - -$config[NopaymentConstants::NO_PAYMENT_METHODS] = [ - NopaymentConfig::PAYMENT_PROVIDER_NAME, -]; -$config[NopaymentConstants::WHITELIST_PAYMENT_METHODS] = [ - GiftCardConfig::PROVIDER_NAME, -]; - -// ---------- State machine (OMS) -$config[OmsConstants::ACTIVE_PROCESSES] = [ - 'Nopayment01', -]; -$config[SalesConstants::PAYMENT_METHOD_STATEMACHINE_MAPPING] = [ - GiftCardConfig::PROVIDER_NAME => 'DummyPayment01', // Order State Machine name of your choice - NopaymentConfig::PAYMENT_PROVIDER_NAME => 'Nopayment01', -]; -``` - -**src/Pyz/Zed/GiftCard/GiftCardConfig.php** - -```php - '/gift-card/sales/list', // lists used gift cards for the order - ]; - - $externalBlocks = parent::getSalesDetailExternalBlocksUrls(); - - return array_merge($externalBlocks, $projectExternalBlocks); - } -} -``` - -{% info_block warningBox "Verification" %} -Once you've finished Setup Behaviour step, make sure that:
        • NoPayment01 statemachine is activated successfully.
        • When using a gift card to cover an entire order, the configured order state machine (e.g. "Nopayment01" -{% endinfo_block %} is used.
        • You can't use blacklisted payment methods when using a gift card.
        • In the order detail page in Back office, you see the gift cards used in the order.
        ) - -### 3) Set up Database Schema -Run the following commands to 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 the following changes have been applied by checking your database:
        Database EntityTypeEvent
        `spy_gift_card`tablecreated
        `spy_gift_card_product_abstract_configuration`tablecreated
        `spy_gift_card_product_abstract_configuration_link`tablecreated
        `spy_gift_card_product_configuration`tablecreated
        `spy_gift_card_product_configuration_link`tablecreated
        `spy_payment_gift_card`tablecreated
        `spy_gift_card_balance_log`tablecreated
        `spy_sales_order_item_gift_card`tablecreated
        -{% endinfo_block %} - -{% info_block warningBox "Verification" %} -Make sure that propel entities have been generated successfully by checking their existence. Also, change the generated entity classes to extend from Spryker core classes.
        Class PathExtends
        `src/Orm/Zed/GiftCard/Persistence/SpyGiftCard.php``Spryker\Zed\GiftCard\Persistence\Propel\AbstractSpyGiftCard`
        `src/Orm/Zed/GiftCard/Persistence/SpyGiftCardQuery.php``Spryker\Zed\GiftCard\Persistence\Propel\AbstractSpyGiftCardQuery`
        `src/Orm/Zed/GiftCard/Persistence/SpyGiftCardProductAbstractConfiguration.php``Spryker\Zed\GiftCard\Persistence\Propel\AbstractSpyGiftCardProductAbstractConfiguration`
        `src/Orm/Zed/GiftCard/Persistence/SpyGiftCardProductAbstractConfigurationQuery.php``Spryker\Zed\GiftCard\Persistence\Propel\AbstractSpyGiftCardProductAbstractConfigurationQuery`
        `src/Orm/Zed/GiftCard/Persistence/SpyGiftCardProductAbstractConfigurationLink.php``Spryker\Zed\GiftCard\Persistence\Propel\AbstractSpyGiftCardProductAbstractConfigurationLink`
        `src/Orm/Zed/GiftCard/Persistence/SpyGiftCardProductAbstractConfigurationLinkQuery.php``Spryker\Zed\GiftCard\Persistence\Propel\AbstractSpyGiftCardProductAbstractConfigurationLink`
        `src/Orm/Zed/GiftCard/Persistence/SpyGiftCardProductConfiguration.php``Spryker\Zed\GiftCard\Persistence\Propel\AbstractSpyGiftCardProductConfiguration`
        `src/Orm/Zed/GiftCard/Persistence/SpyGiftCardProductConfigurationQuery.php``Spryker\Zed\GiftCard\Persistence\Propel\AbstractSpyGiftCardProductConfigurationQuery`
        `src/Orm/Zed/GiftCard/Persistence/SpyGiftCardProductConfigurationLink.php``Spryker\Zed\GiftCard\Persistence\Propel\AbstractSpyGiftCardProductConfigurationLink`
        `src/Orm/Zed/GiftCard/Persistence/SpyGiftCardProductConfigurationLinkQuery.php``Spryker\Zed\GiftCard\Persistence\Propel\AbstractSpyGiftCardProductConfigurationLinkQuery`
        `src/Orm/Zed/GiftCard/Persistence/SpyPaymentGiftCard.php``Spryker\Zed\GiftCard\Persistence\Propel\AbstractSpyPaymentGiftCard`
        `src/Orm/Zed/GiftCard/Persistence/SpyPaymentGiftCardQuery.php``Spryker\Zed\GiftCard\Persistence\Propel\AbstractSpyPaymentGiftCardQuery`
        `src/Orm/Zed/GiftCardBalance/Persistence/SpyGiftCardBalanceLog.php``Orm\Zed\GiftCardBalance\Persistence\Base\SpyGiftCardBalanceLog`
        `src/Orm/Zed/GiftCardBalance/Persistence/SpyGiftCardBalanceLogQuery.php``Orm\Zed\GiftCardBalance\Persistence\Base\SpyGiftCardBalanceLogQuery`
        `src/Orm/Zed/Sales/Persistence/SpySalesOrderItemGiftCard.php``Spryker\Zed\Sales\Persistence\Propel\AbstractSpySalesOrderItemGiftCard`
        `src/Orm/Zed/Sales/Persistence/SpySalesOrderItemGiftCardQuery.php``Spryker\Zed\Sales\Persistence\Propel\AbstractSpySalesOrderItemGiftCardQuery`
        -{% endinfo_block %} - -### 4) Import Data -#### Gift Card Configuration Data -{% info_block infoBox "Info" %} -The following step imports abstract and concrete gift card configurations. Implementation for the data importer is not provided by Spryker Core, so you need to implement it on project level.

        You can find an exemplary implementation [here](https://github.com/spryker-shop/suite/commit/f38bc5264e9964d2d2da5a045c0305973b3cb556#diff-e854f9b396bdaa07ca6276f168aaa76a -{% endinfo_block %} (only Console and DataImport module changes are relevant). The following data import examples are based on this implementation.) - -**data/import/gift_card_abstract_configuration.csv** - -```yaml -abstract_sku,pattern -1234,{prefix}-{randomPart}-{suffix} -``` - -| Column | Is obligatory? | Data type | Data example | Data explanation | -| --- | --- | --- | --- | --- | -| `abstract_sku ` |mandatory | string | 1234 | SKU reference of an abstract gift card product.| -| `pattern` |mandatory | string | {prefix}-{randomPart}-{suffix} | A pattern that is used to generate codes for purchased gift card codes. | - -data/import/gift_card_concrete_configuration.csv - -```yaml -sku,value -1234_1,1000 -1234_2,2000 -1234_3,5000 -``` - -| Column | Is obligatory? | Data type | Data example | Data explanation | -| --- | --- | --- | --- | --- | -| `sku` | mandatory | string| 1234 | SKU reference of an abstract gift card product. | -| `value` | mandatory | string | {prefix}-{randomPart}-{suffix} | A pattern that is used to generate codes for purchased gift card codes. | - -```bash -console data:import:gift-card-abstract-configuration -console data:import:gift-card-concrete-configuration -``` - -{% info_block warningBox "Verification" %} -Make sure to have imported abstract and concrete gift card configuration into your `spy_gift_card_product_abstract_configuration` and `spy_gift_card_product_configuration` database tables. -{% endinfo_block %} - -#### Shipment Method Data -{% info_block infoBox "Info" %} -In this step, you will create a shipment method called "NoShipment". The name of the shipment method has to match the value of `\Spryker\Shared\Shipment\ShipmentConfig::SHIPMENT_METHOD_NAME_NO_SHIPMENT` constant. -{% endinfo_block %} - -Taking into account project customizations, extend shipment method data importer as shown below: - -**data/import/shipment.csv** - -```yaml -shipment_method_key,name,carrier,taxSetName -spryker_no_shipment,NoShipment,NoShipment,Tax Exempt -``` - -Taking into account project customizations, extend your shipment price data importer as shown below: - -**data/import/shipment_price.csv** - -```yaml -shipment_method_key,store,currency,value_net,value_gross -spryker_no_shipment,DE,EUR,0,0 -``` - -Run the following command(s) to apply changes: - -```bash -console data:import:shipment -console data:import:shipment-price -``` - -{% info_block warningBox "Verification" %} -Make sure that a shipment method with "NoShipment" name exists in your `spy_shipment_method` and `spy_shipment_method_price` database tables. -{% endinfo_block %} - -#### Additional, Optional Data Imports -{% info_block infoBox "Info" %} -To be able to represent and display gift cards as products in your shop, you need to import some data into your database depending on your project configuration and needs. The following list contains the points which can be used to get the idea of what gift card related data you might want to use:
        • **Product Attribute Key** to create a gift card "value" super attribute that defines gift card variants.
        • **Abstract Product** that represents gift cards in your catalog.
        • **Abstract Product Store Relation** to manage store-specific gift cards.
        • **Concrete Product** that represents gift cards with a specific price value.
        • **Product Image** for abstract and concrete product to display gift cards.
        • **Product Price** for concrete gift card products where the price value matches the "value" super attribute.
        • **Product Stock** data for concrete gift card products.
        • **Product Management Attribute** to define the previously created "value" product attribute for the PIM.
        • **Category** that represents all gift cards.
        • **Navigation item** to display gift card category or gift card product detail page directly.
        • -{% endinfo_block %} - -### 5) Set up Behaviour -#### Prepare Order State Machines - Gift Card Purchase Process - -{% info_block infoBox "Info" %} -In this step, you will customize your Order State Machine to purchase gift cards. The process should distinguish gift card order items and ship them by sending an email to the customer. Below, you can see an example of how DummyPayment state machine is defined. -{% endinfo_block %} -DummyPayment Order State Machine Example: - -**config/Zed/oms/DummyPayment01.xml** - -```html - - - - - - DummyRefund - CreateGiftCard - - - - - - - exclude from customer - - - exclude from customer - - - - - - - - - - - - new - payment pending - authorize - - - - new - invalid - authorize - - - - payment pending - paid - pay - - - - payment pending - cancelled - pay - - - - paid - confirmed - confirm - - - - confirmed - exported - check giftcard purchase - - - - confirmed - gift card purchased - check giftcard purchase - - - - gift card shipped - delivered - complete gift card creation - - - - exported - shipped - ship - - - - shipped - delivered - stock-update - - - - delivered - ready for return - return - - - - delivered - closed - close - - - - - - - - - - - - - - - - - - - - -``` - -![Dummy payment](https://spryker.s3.eu-central-1.amazonaws.com/docs/Migration+and+Integration/Feature+Integration+Guides/Gift+Cards+Feature+Integration/dummy-payment.svg) - -**config/Zed/oms/GiftCardSubprocess/CreateGiftCard01.xml** - -```html - - - - - - - - - - - - - gift card purchased - gift card created - create giftcard - - - - gift card created - gift card shipped - ship giftcard - - - - - - - - - - - - -``` - -**config/Zed/oms/DummySubprocess/DummyRefund01.xml** - -```html - - - - - - - - - - - - - - ready for return - returned - execute-return - - - - returned - refunded - refund - - - - - - - - - - -``` - -![Nopayment ](https://spryker.s3.eu-central-1.amazonaws.com/docs/Migration+and+Integration/Feature+Integration+Guides/Gift+Cards+Feature+Integration/nopayment.svg) - -#### Prepare Order State Machines - Gift Card Usage Process - -{% info_block infoBox "Info" %} -In this step, you should customize your Order State Machine to place orders with 0 price to pay (by using gift cards). The process should skip payment-related steps as there is nothing for the customer to pay any more. Below you can see the example of how NoPayment state machine is defined.) -NoPayment Order State Machine Example: - -**config/Zed/oms/Nopayment01.xml** - -```html - - - - - - DummyRefund - - - - - - - - - - - - - - new - paid - authorize - - - - paid - exported - export - - - - exported - shipped - ship - - - - shipped - delivered - stock-update - - - - delivered - ready for return - return - - - - delivered - closed - close - - - - - - - - - - - - - - - - - -``` - -{% endinfo_block %} - -![Nopayment](https://spryker.s3.eu-central-1.amazonaws.com/docs/Migration+and+Integration/Feature+Integration+Guides/Gift+Cards+Feature+Integration/nopayment.svg) - -#### Gift Card Purchase Process -{% info_block infoBox "Info" %} -In this step, you'll enable gift card purchasing in your project. -{% endinfo_block %} - -Add the following plugins to your project: - -| Plugin | Specification | Prerequisites | Namespace | -| --- | --- | --- | --- | -|`GiftCardCalculatorPlugin` | During quote recalculation, distinguishes applicable and non-applicable gift cards and creates payment methods for applicable gift cards. | - | `Spryker\Zed\GiftCard\Communication\Plugin` | -| `GiftCardMetadataExpanderPlugin` | Extends gift card items with gift card configuration metadata to change cart items. | - | `Spryker\Zed\GiftCard\Communication\Plugin` | -| `GiftCardOrderItemSaverPlugin` | Saves gift card order data to the database. |- | `Spryker\Zed\GiftCard\Communication\Plugin` | -| `GiftCardDiscountableItemFilterPlugin` | Filters gift card items from discountable items.|- | `Spryker\Zed\GiftCard\Communication\Plugin` | -| `GiftCardDeliveryMailTypePlugin` | Provides a mail type for sending e-mails about successful gift card orders. |- | `Spryker\Zed\GiftCardMailConnector\Communication\Plugin\Mail` | -| `Command\ShipGiftCardByEmailCommandPlugin` | Registers `GiftCardMailConnector/ShipGiftCard` OMS command that is used to deliver a gift card by e-mail. | Use `GiftCardDeliveryMailTypePlugin` above to register the necessary mail type. | `Spryker\Zed\GiftCardMailConnector\Communication\Plugin\Oms` | -|`CreateGiftCardCommandPlugin` | Registers `GiftCard/CreateGiftCard` OMS command that is used to generate a new gift card based on a gift card order item configuration. |- | `Spryker\Zed\GiftCard\Communication\Plugin\Oms\Command` | -| `IsGiftCardConditionPlugin` | Registers `GiftCard/IsGiftCard` OMS command that is used to check whether an order item is a gift card.| - | `Spryker\Zed\GiftCard\Communication\Plugin\Oms\Condition`| -|`OnlyGiftCardShipmentMethodFilterPlugin` | Filters non-available shipment methods for gift card items to be purchased. | - | `Spryker\Zed\GiftCard\Communication\Plugin` | - -**src/Pyz/Zed/Calculation/CalculationDependencyProvider.php** - -```php -extend(static::MAIL_TYPE_COLLECTION, function (MailTypeCollectionAddInterface $mailCollection) { - $mailCollection->add(new GiftCardDeliveryMailTypePlugin()); - - return $mailCollection; - }); - - return $container; - } -} -``` - -**src/Pyz/Zed/Oms/OmsDependencyProvider.php** - -```php -extendCommandPlugins($container); - $container = $this->extendConditionPlugins($container); - - return $container; - } - - /** - * @param \Spryker\Zed\Kernel\Container $container - * - * @return \Spryker\Zed\Kernel\Container - */ - protected function extendCommandPlugins(Container $container): Container - { - $container->extend(self::COMMAND_PLUGINS, function (CommandCollectionInterface $commandCollection) { - $commandCollection->add(new ShipGiftCardByEmailCommandPlugin(), 'GiftCardMailConnector/ShipGiftCard'); - $commandCollection->add(new CreateGiftCardCommandPlugin(), 'GiftCard/CreateGiftCard'); - - return $commandCollection; - }); - - return $container; - } - - /** - * @param \Spryker\Zed\Kernel\Container $container - * - * @return \Spryker\Zed\Kernel\Container - */ - protected function extendConditionPlugins(Container $container): Container - { - $container->extend(OmsDependencyProvider::CONDITION_PLUGINS, function (ConditionCollectionInterface $conditionCollection) { - $conditionCollection - ->add(new IsGiftCardConditionPlugin(), 'GiftCard/IsGiftCard'); - - return $conditionCollection; - }); - - return $container; - } -} -``` - -**src/Pyz/Zed/Shipment/ShipmentDependencyProvider.php** - -```php -
        • You can put a configured gift card product to cart and purchase it.
        • The gift card item shouldn't have any discounts applied.
        • During the checkout process, shipment method selection should be optional if there is only a gift card in cart.
        • The GiftCart/ShipGiftCard OMS command was invoked and customer received an email with the generated gift card code once the order is placed.
        Note: You need to complete Feature Frontend integration before you can verify these points. -{% endinfo_block %} - -#### Gift Card Code Usage Process - -{% info_block infoBox "Info" %} -In this step, you'll enable purchasing with existing gift cards in your project. -{% endinfo_block %} - -Add the following plugins to your project: - -| Plugin | Specification |Prerequisites |Namespace | -| --- | --- | --- | --- | -|`GiftCardCartCodePlugin` | Manages adding and removing gift card code from a quote. | - | `Spryker\Client\GiftCard\Plugin\CartCode` | -| `GiftCardBalanceValueProviderPlugin` | Calculates the remaining balance of a gift card based on its usage history and returns its value. | - |`Spryker\Zed\GiftCardBalance\Communication\Plugin` | -| `BalanceTransactionLogPaymentSaverPlugin` |Logs a gift card payment transaction. | - | `Spryker\Zed\GiftCardBalance\Communication\Plugin` | -| `BalanceCheckerApplicabilityPlugin` | Calculates the remaining balance of a gift card based on its usage history and checks if the balance is positive.|- | `Spryker\Zed\GiftCardBalance\Communication\Plugin` | -| `SendEmailToGiftCardUser` | Sends usage email notification to the user of the gift card. | - |`Spryker\Zed\GiftCardMailConnector\Communication\Plugin\Checkout` | -|`GiftCardUsageMailTypePlugin` | Provides a mail type for sending gift card usage information emails. | - | `Spryker\Zed\GiftCardMailConnector\Communication\Plugin\Mail`| -|`PriceToPayPaymentMethodFilterPlugin` | Filters available payment methods based on the price-to-pay value of the quote. | - |`Spryker\Zed\Nopayment\Communication\Plugin\Payment` | -| `GiftCardPaymentMethodFilterPlugin` | Filters blacklisted payment methods in case the quote contains a gift card to be purchased. |- | `Spryker\Zed\GiftCard\Communication\Plugin` | -| `GiftCardPreCheckPlugin` | Checks if a gift card payment method value is not bigger than the rest of the gift card value to be used to pay. | - | `Spryker\Zed\GiftCard\Communication\Plugin`| -| `GiftCardOrderSaverPlugin`| Saves a gift card payment to the database when an order is placed. | - | `Spryker\Zed\GiftCard\Communication\Plugin`| -|`NopaymentPreCheckPlugin`| Checks if a "Nopayment" payment method is allowed to be used. | - | `Spryker\Zed\Nopayment\Communication\Plugin\Checkout`| - -**src/Pyz/Client/CartCode/CartCodeDependencyProvider.php** - -```php -extend(static::MAIL_TYPE_COLLECTION, function (MailTypeCollectionAddInterface $mailCollection) { - $mailCollection->add(new GiftCardUsageMailTypePlugin()); - - return $mailCollection; - }); - - return $container; - } -} -``` - -**src/Pyz/Zed/Payment/PaymentDependencyProvider.php** - -```php -extendPaymentPlugins($container); - - return $container; - } - - /** - * @return \Spryker\Zed\Payment\Dependency\Plugin\Payment\PaymentMethodFilterPluginInterface[] - */ - protected function getPaymentMethodFilterPlugins() - { - return [ - new PriceToPayPaymentMethodFilterPlugin(), - new GiftCardPaymentMethodFilterPlugin(), - ]; - } - - /** - * @param \Spryker\Zed\Kernel\Container $container - * - * @return \Spryker\Zed\Kernel\Container - */ - protected function extendPaymentPlugins(Container $container): Container - { - $container->extend( - PaymentDependencyProvider::CHECKOUT_PLUGINS, - function (CheckoutPluginCollectionInterface $pluginCollection) { - $pluginCollection->add( - new GiftCardPreCheckPlugin(), - SprykerGiftCardConfig::PROVIDER_NAME, - PaymentDependencyProvider::CHECKOUT_PRE_CHECK_PLUGINS - ); - - $pluginCollection->add( - new GiftCardOrderSaverPlugin(), - SprykerGiftCardConfig::PROVIDER_NAME, - PaymentDependencyProvider::CHECKOUT_ORDER_SAVER_PLUGINS - ); - - $pluginCollection->add( - new NopaymentPreCheckPlugin(), - SprykerNopaymentConfig::PAYMENT_PROVIDER_NAME, - PaymentDependencyProvider::CHECKOUT_ORDER_SAVER_PLUGINS - ); - - return $pluginCollection; - } - ); - - return $container; - } -} -``` - -{% info_block warningBox "Verification" %} -Make sure that:
        • You can activate a gift card using its generated code.
        • You can't activate a gift card the balance of which has been depleted.
        • During the checkout process, payment method selection is skipped in case the gift card covers the grand total.
        • Having made a successful purchase with the help of a gift card, you receive a gift card balance notification e-mail.
        Note: You need to complete Feature Frontend integration before you can verify these points. -{% endinfo_block %} - -## Install feature frontend - -### Prerequisites -Install the required features: - -| Name | Version | -| --- | --- | -| Spryker Core | {{page.version}} | -| Cart | {{page.version}} | -| Checkout | {{page.version}} | - -### 1) Install the required modules using Composer -Run the following command(s) to install the required modules: - -```bash -composer require spryker-feature/gift-cards:"^{{page.version}}" --update-with-dependencies -``` - -{% info_block warningBox "Verification" %} -Make sure that the following modules have been installed:
        ModuleExpected Directory
        `CartCodeWidget``vendor/spryker-shop/cart-code-widget`
        `GiftCardWidget``vendor/spryker-shop/gift-card-widget`
        -{% endinfo_block %} - -### 2) Set up Configuration -Extend your project with the following configuration. - -**config/Shared/config_default.php** - -```php - [ - NopaymentConfig::PAYMENT_PROVIDER_NAME, - ], -]; -``` - -{% info_block warningBox "Verification" %} -Make sure to have "nopayment" payment method successfully selected when you cover an entire order with a gift card. -{% endinfo_block %} - -### 2) Add Translations -Append glossary according to your configuration: - -**src/data/import/glossary.csv** - -```yaml -cart.total.price_to_pay,Zu bezahlender Betrag,de_DE -cart.total.price_to_pay,Price to pay,en_US -cart.giftcard.label,Gift card,en_US -cart.giftcard.label,Geschenkgutschein,de_DE -cart.giftcard.apply.failed,The gift card is not applicable,en_US -cart.giftcard.apply.failed,Geschenkgutschein konnte nicht angewendet werden,de_DE -cart.giftcard.apply.successful,Your gift card code has been applied,en_US -cart.giftcard.apply.successful,Ihr Geschenkgutschein wurde angewendet,de_DE -cart.voucher.apply.successful,Your voucher code has been applied,en_US -cart.voucher.apply.successful,Ihr Gutscheincode wurde angewendet,de_DE -cart.code.apply.failed,Code could not be applied,en_US -cart.code.apply.failed,Gutscheincode konnte nicht angewendet werden,de_DE -general.next.button,Next,en_US -general.next.button,Weiter,de_DE -checkout.giftcard.label,Gift card,en_US -checkout.giftcard.label,Geschenkgutschein,de_DE -roduct.attribute.value,Value,en_US -product.attribute.value,Der Wert,de_DE -mail.giftCard.delivery.subject,Your Gift card!,en_US -mail.giftCard.delivery.subject,Deine Geschenkkarte!,de_DE -mail.giftCard.delivery.text,"Sehr geehrter Kunde, vielen Dank für den Kauf einer Geschenkgutschein in unserem Shop. Ihr Gutscheincode lautet: ",de_DE -mail.giftCard.delivery.text,"Dear customer, thank you for buying a gift card at our shop. Your gift card code is: ",en_US -mail.giftCard.usage.subject,Thank you for using a Gift Card!,en_US -mail.giftCard.usage.subject,Vielen Dank dass Sie ein Geschenkgutschein benutzt haben.,de_DE -cart.code.enter-code,Gutscheincode/Geschenkgutscheincode eingeben,de_DE -cart.code.enter-code,Enter voucher/gift card code,en_US -``` - -Run the following command(s) to apply glossary keys: - -```bash -console data:import:glossary -``` - -{% info_block warningBox "Verification" %} -Make sure that, in the database, the configured data has been added to the `spy_glossary` table. -{% endinfo_block %} - -### 3) Set up Widgets -Register the following global widget(s): - -| Widget | Specification | Namespace | -| --- | --- | --- | -| `CartCodeFormWidget` |Provides a cart code activation form. | `SprykerShop\Yves\CartCodeWidget\Widget` | - -**src/Pyz/Yves/ShopApplication/ShopApplicationDependencyProvider.php** - -```php -ModuleExpected Directory `CartsRestApi``vendor/spryker/carts-rest-api``CartsRestApiExtension``vendor/spryker/carts-rest-api-extension` -{% endinfo_block %} - -## 2) Set up Database Schema and Transfer Objects -Run the following commands to apply database changes and generate entity and transfer changes: - -```bash -console transfer:generate -console propel:install -console transfer:generate -``` - -{% info_block warningBox "Verification" %} -Make sure that the following changes have occurred by checking your database:
        Database entityTypeEvent
        `spy_quote.uuid`column added
        -{% endinfo_block %} - -{% info_block warningBox "Verification" %} -Make sure that the following changes have occurred in transfer objects:
        TransferTypeEventPath
        `RestCartsAttributesTransfer`classcreated`src/Generated/Shared/Transfer/RestCartsAttributesTransfer`
        `RestCartItemsAttributesTransfer`classcreated`src/Generated/Shared/Transfer/RestCartItemsAttributesTransfer`
        `RestItemsAttributesTransfer`classcreated`src/Generated/Shared/Transfer/RestItemsAttributesTransfer`
        `RestCartVouchersAttributesTransfer`classcreated`src/Generated/Shared/Transfer/RestCartVouchersAttributesTransfer`
        `RestCartsDiscountsTransfer`classcreated`src/Generated/Shared/Transfer/RestCartsDiscountsTransfer`
        `RestCartsTotalsTransfer`classcreated`src/Generated/Shared/Transfer/RestCartsTotalsTransfer`
        `RestCartItemCalculationsTransfer`classcreated`src/Generated/Shared/Transfer/RestCartItemCalculationsTransfer`
        `CartItemRequestTransfer`classcreated`src/Generated/Shared/Transfer/CartItemRequestTransfer`
        `AssignGuestQuoteRequestTransfer`classcreated`src/Generated/Shared/Transfer/AssignGuestQuoteRequestTransfer`
        `CustomerTransfer.companyUserTransfer`propertyadded`src/Generated/Shared/Transfer/CustomerTransfer`
        `CustomerTransfer.customerReference`propertyadded`src/Generated/Shared/Transfer/CustomerTransfer`
        `QuoteTransfer.uuid`propertyadded`src/Generated/Shared/Transfer/QuoteTransfer`
        `QuoteTransfer.companyUserId`propertyadded`src/Generated/Shared/Transfer/QuoteTransfer`
        `QuoteTransfer.uuid`propertyadded`src/Generated/Shared/Transfer/QuoteTransfer`
        `QuoteUpdateRequestAttributesTransfer.customerReference`propertyadded`src/Generated/Shared/Transfer/QuoteUpdateRequestAttributesTransfer`
        `RestUserTransfer.idCompanyUser`propertyadded`src/Generated/Shared/Transfer/RestUserTransfer`
        `RestUserTransfer.surrogateIdentifier`propertyadded`src/Generated/Shared/Transfer/RestUserTransfer`
        `QuoteCriteriaFilterTransfer.idCompanyUser`propertyadded`src/Generated/Shared/Transfer/QuoteCriteriaFilterTransfer`
        `QuoteErrorTransfer`classcreated`src/Generated/Shared/Transfer/QuoteErrorTransfer`
        `QuoteResponseTransfer.errors`propertyadded`src/Generated/Shared/Transfer/QuoteResponseTransfer`
        `OauthResponse`classadded`src/Generated/Shared/Transfer/OauthResponseTransfer`
        -{% endinfo_block %} - -### 3) Set up Behavior - -Enable the following behaviors. - -#### Generate UUIDs for the Existing Quote Records Without UUID - -Generate UUIDs for the Existing Quote Records Without UUID: - - -```bash -console uuid:generate Quote spy_quote -``` -Run the following command: - -{% info_block warningBox "Verification" %} - -Make sure that the `uuid` field is populated for all records in the `spy_quote` table: - -1. Run the following SQL query: - -```sql -SELECT COUNT(*) FROM spy_quote WHERE uuid IS NULL; -``` - -2. Make sure that the result is *0 records*. - -{% endinfo_block %} - - - - - -#### Enable Validation -Activate the following plugin: - -| Plugin | Specification | Prerequisites | Namespace | -| --- | --- | --- | --- | -| `AnonymousCustomerUniqueIdValidatorPlugin` | Validates a Rest resource request before further processing. Executed after formatting an HTTP request to the resource. | None | `Spryker\Glue\CartsRestApi\Plugin\Validator` | - -**src/Pyz/Glue/GlueApplication/GlueApplicationDependencyProvider.php** - -```php -There are two strategies for the behavior of carts: single cart behavior and multiple cart behavior. The difference is that in multiple cart behavior it is allowed to create more than one cart for a customer, unlike the single cart behavior.
        To apply one of those strategies, wire one of the `QuoteCreatorPlugin` plugins in `CartsRestApiDependencyProvider` (Zed).
        There are two `QuoteCreatorPlugins` placed in different modules:
        • `Spryker\Zed\CartsRestApi\Communication\Plugin\CartsRestApi\QuoteCreatorPlugin` that doesn't allow creating more than one cart.
        • `Spryker\Zed\PersistentCart\Communication\Plugin\CartsRestApi\QuoteCreatorPlugin` that allows creating more than one cart.
        In case when a **single cart** strategy is applied, the `AddGuestQuoteItemsToCustomerQuotePostAuthPlugin` plugin should be wired in `AuthRestApiDependencyProvider`.
        In case when a **multiple cart** strategy is applied, the `UpdateGuestQuoteToCustomerQuotePostAuthPlugin` plugin should be wired in `AuthRestApiDependencyProvider`.
        Wiring plugins is illustrated in the code blocks below. -{% endinfo_block %} - -src/Pyz/Glue/GlueApplication/GlueApplicationDependencyProvider.php - -```php -addRelationship( - CartsRestApiConfig::RESOURCE_CART_ITEMS, - new ConcreteProductBySkuResourceRelationshipPlugin() - ); - $resourceRelationshipCollection->addRelationship( - CartsRestApiConfig::RESOURCE_GUEST_CARTS_ITEMS, - new ConcreteProductBySkuResourceRelationshipPlugin() - ); - - return $resourceRelationshipCollection; - } -} -``` - -{% info_block warningBox "Verification" %} -Make sure that the following endpoints are available:
        • https://glue.mysprykershop.comm/carts
        Send a request tohttps://glue.mysprykershop.comcom/carts/{% raw %}{{{% endraw %}cart_uuid{% raw %}}}{% endraw %}/?include=items". The cart with the given id should have at least one added item. Make sure that the response includes relationships to the items resources.
        Send a request thttps://glue.mysprykershop.com.com/guest-carts/{% raw %}{{{% endraw %}guest_cart_uuid{% raw %}}}{% endraw %}/?include=items". The guest cart with the given id should have at least one added item. Make sure that the response includes relationships to the items resources. -{% endinfo_block %} - -**src/Pyz/Glue/CustomersRestApi/CustomersRestApiDependencyProvider.php** - -```php -addRelationship( - CatalogSearchRestApiConfig::RESOURCE_CATALOG_SEARCH, - new CatalogSearchAbstractProductsResourceRelationshipPlugin() - ); - $resourceRelationshipCollection->addRelationship( - CatalogSearchRestApiConfig::RESOURCE_CATALOG_SEARCH_SUGGESTIONS, - new CatalogSearchSuggestionsAbstractProductsResourceRelationshipPlugin() - ); - - return $resourceRelationshipCollection; - } -} -``` - -{% info_block warningBox “Verification” %} - -If `CatalogSearchResourceRoutePlugin` and `CatalogSearchSuggestionsResourceRoutePlugin` are installed correctly, the following endpoints should now be available:
        • https://glue.mysprykershop.com/catalog-search?q={% raw %}{{{% endraw %}q_term{% raw %}}}{% endraw %}
        • https://glue.mysprykershop.com/catalog-search-suggestions?q={% raw %}{{{% endraw %}q_term{% raw %}}}{% endraw %}
        -{% endinfo_block %} - -{% info_block warningBox “Verification” %} - -To make sure that `CatalogSearchAbstractProductsResourceRelationshipPlugin` and `CatalogSearchSuggestionsAbstractProductsResourceRelationshipPlugin` are functioning correctly, do the following:
        • Send a request to `https://glue.mysprykershop.com/catalog-search?q={% raw %}{{{% endraw %}q_term{% raw %}}}{% endraw %}&include=abstract-products` and verify that the response includes relationships to `abstract-products` resources.
        • Send a request to `https://glue.mysprykershop.com/catalog-search-suggestions?q={% raw %}{{{% endraw %}q_term{% raw %}}}{% endraw %}&include=abstract-products` and verify that the response includes relationships to `abstract-products` resources.
        -{% endinfo_block %} - - diff --git a/docs/scos/dev/feature-integration-guides/202005.0/glue-api/glue-api-category-management-feature-integration.md b/docs/scos/dev/feature-integration-guides/202005.0/glue-api/glue-api-category-management-feature-integration.md deleted file mode 100644 index 55f02d721d5..00000000000 --- a/docs/scos/dev/feature-integration-guides/202005.0/glue-api/glue-api-category-management-feature-integration.md +++ /dev/null @@ -1,99 +0,0 @@ ---- -title: Glue API - Category Management feature integration -description: This guide will navigate you through the process of installing and configuring the Category API feature in Spryker OS. -last_updated: Sep 14, 2020 -template: feature-integration-guide-template -originalLink: https://documentation.spryker.com/v5/docs/glue-api-category-management-feature-integration -originalArticleId: d068451f-5a2a-4dbd-8625-fd38c807f308 -redirect_from: - - /v5/docs/glue-api-category-management-feature-integration - - /v5/docs/en/glue-api-category-management-feature-integration -related: - - title: Browsing a Category Tree - link: docs/scos/dev/glue-api-guides/page.version/retrieving-categories/retrieving-category-trees.html ---- - -## Install feature API -### Prerequisites -Install the required features: - -| Name | Version | Integration guide | -| --- | --- | --- | -| Spryker Core | 201907.0 | [Glue Application feature integration](/docs/scos/dev/feature-integration-guides/{{page.version}}/glue-api/glue-api-glue-application-feature-integration.html) | -| Category Management | 201907.0 | | - -### 1) Install the required modules using Composer -Run the following command to install the required modules: - -```bash -composer require spryker/categories-rest-api:"^1.1.3" --update-with-dependencies -``` - -{% info_block warningBox “Verification” %} - -Make sure that the following module is installed: -{% endinfo_block %} - -| Module | Expected directory | -| --- | --- | -| `CategoriesRestApi` | `vendor/spryker/categories-rest-api` | - -### 2) Set Up Transfer Objects -Run the following command to generate transfer changes: - -```bash -console transfer:generate -``` - -{% info_block warningBox “Verification” %} - -Make sure that the following changes have occurred: -{% endinfo_block %} - -| Transfer | Type | Event | Path | -| --- | --- | --- | --- | -| `RestCategoryTreesTransfer` | class | created | `src/Generated/Shared/Transfer/RestCategoryTreesTransfer` | -| `RestCategoryTreesAttributesTransfer` | class | created | `src/Generated/Shared/Transfer/RestCategoryTreesAttributesTransfer` | -| `RestCategoryNodesAttributesTransfer` | class | created | `src/Generated/Shared/Transfer/RestCategoryNodesAttributesTransfer` | - -### 3) Set Up Behavior -#### Enable resources and relationships: -Activate the following plugins: - -| Plugin | Specification | Prerequisites | Namespace | -| --- | --- | --- | --- | -| `CategoriesResourceRoutePlugin` | Registers the `category-tree` resource. | None | `Spryker\Glue\CategoriesRestApi\Plugin` | -| `CategoryResourceRoutePlugin` | Registers the `category-nodes` resource. | None | `Spryker\Glue\CategoriesRestApi\Plugin` | - -src/Pyz/Glue/GlueApplication/GlueApplicationDependencyProvider.php - -```php -
      • https://glue.mysprykershop.com/category-trees
      • https://glue.mysprykershop.com/category-nodes/{% raw %}{{{% endraw %}category_node_id{% raw %}}}{% endraw %}
      -{% endinfo_block %} - - diff --git a/docs/scos/dev/feature-integration-guides/202005.0/glue-api/glue-api-checkout-feature-integration.md b/docs/scos/dev/feature-integration-guides/202005.0/glue-api/glue-api-checkout-feature-integration.md deleted file mode 100644 index ce3e8d733e2..00000000000 --- a/docs/scos/dev/feature-integration-guides/202005.0/glue-api/glue-api-checkout-feature-integration.md +++ /dev/null @@ -1,515 +0,0 @@ ---- -title: Glue API - Checkout feature integration -last_updated: Sep 15, 2020 -template: feature-integration-guide-template -originalLink: https://documentation.spryker.com/v5/docs/checkout-feature-integration-201907 -originalArticleId: 73c7eb5e-bd4b-4f44-9785-644aaaa2ec53 -redirect_from: - - /v5/docs/checkout-feature-integration-201907 - - /v5/docs/en/checkout-feature-integration-201907 ---- - -{% info_block errorBox %} - -The following feature integration Guide expects the basic feature to be in place.
      The current guide only adds the **Checkout API** functionality. - -{% endinfo_block %} - -Follow the steps below to install Checkout feature API. - -## Prerequisites - -Install the required features: - -| Name | Version | Integration guide | -| --- | --- | --- | -| Spryker Core | master | [Glue Application](/docs/scos/dev/feature-integration-guides/{{page.version}}/glue-api/glue-api-glue-application-feature-integration.html) | -| Cart | master | [Cart API](/docs/scos/dev/feature-integration-guides/{{page.version}}/cart-feature-integration.html) | -| Customer Account Management | master | | -| Payments | master | [Payments API](/docs/scos/dev/feature-integration-guides/{{page.version}}/glue-api/glue-api-payments-feature-integration.html) | -|Shipments| master | [Shipments API](/docs/scos/dev/feature-integration-guides/{{page.version}}/glue-api/glue-api-shipment-feature-integration.html) | - -## 1) Install the required modules using Composer - -Run the following command(s) to install the required modules: - -```bash -composer require spryker/checkout-rest-api:"3.2.0" spryker/order-payments-rest-api:"^1.0.0" --update-with-dependencies -``` - -{% info_block warningBox "Verification" %} - -Make sure that the following modules have been installed: - -| Module | Expected Directory | -| --- | --- | -| `CheckoutRestApi` | `vendor/spryker/checkout-rest-api` | -| `OrderPaymentsRestApi` | `vendor/spryker/order-payments-rest-api` | - -{% endinfo_block %} - -## 2) Set up Configuration -Put all the payment methods available in the shop to CheckoutRestApiConfig. For example: - -
      -src/Pyz/Glue/CheckoutRestApi/CheckoutRestApiConfig.php - -```php - ['dummyPaymentInvoice.dateOfBirth'], - 'dummyPaymentCreditCard' => [ - 'dummyPaymentCreditCard.cardType', - 'dummyPaymentCreditCard.cardNumber', - 'dummyPaymentCreditCard.nameOnCard', - 'dummyPaymentCreditCard.cardExpiresMonth', - 'dummyPaymentCreditCard.cardExpiresYear', - 'dummyPaymentCreditCard.cardSecurityCode', - ], - ]; - - /** - * @uses \Spryker\Shared\DummyPayment\DummyPaymentConfig::PROVIDER_NAME - */ - protected const DUMMY_PAYMENT_PROVIDER_NAME = 'DummyPayment'; - - /** - * @uses \Spryker\Shared\DummyPayment\DummyPaymentConfig::PAYMENT_METHOD_NAME_INVOICE - */ - protected const DUMMY_PAYMENT_PAYMENT_METHOD_NAME_INVOICE = 'Invoice'; - - /** - * @uses \Spryker\Shared\DummyPayment\DummyPaymentConfig::PAYMENT_METHOD_NAME_CREDIT_CARD - */ - protected const DUMMY_PAYMENT_PAYMENT_METHOD_NAME_CREDIT_CARD = 'Credit Card'; - - /** - * @uses \Spryker\Shared\DummyPayment\DummyPaymentConfig::PAYMENT_METHOD_INVOICE - */ - protected const PAYMENT_METHOD_INVOICE = 'dummyPaymentInvoice'; - - /** - * @uses \Spryker\Shared\DummyPayment\DummyPaymentConfig::PAYMENT_METHOD_CREDIT_CARD - */ - protected const PAYMENT_METHOD_CREDIT_CARD = 'dummyPaymentCreditCard'; - - protected const IS_PAYMENT_PROVIDER_METHOD_TO_STATE_MACHINE_MAPPING_ENABLED = false; - - /** - * @return array - */ - public function getPaymentProviderMethodToStateMachineMapping(): array - { - return [ - static::DUMMY_PAYMENT_PROVIDER_NAME => [ - static::DUMMY_PAYMENT_PAYMENT_METHOD_NAME_CREDIT_CARD => static::PAYMENT_METHOD_CREDIT_CARD, - static::DUMMY_PAYMENT_PAYMENT_METHOD_NAME_INVOICE => static::PAYMENT_METHOD_INVOICE, - ], - ]; - } - - /** - * @return bool - */ - public function isShipmentMethodsMappedToAttributes(): bool - { - return false; - } - - /** - * @return bool - */ - public function isPaymentProvidersMappedToAttributes(): bool - { - return false; - } -} -``` -
      - -{% info_block infoBox "Note" %} - -In case the `CheckoutRestApiConfig::IS_PAYMENT_PROVIDER_METHOD_TO_STATE_MACHINE_MAPPING_ENABLED` is *true*, make sure that payment methods and payment providers configured for your shop are also configured in `CheckoutRestApiConfig::getPaymentProviderMethodToStateMachineMapping()`. -Setting `CheckoutRestApiConfig::IS_PAYMENT_PROVIDER_METHOD_TO_STATE_MACHINE_MAPPING_ENABLED` to *false* will ignore the GLUE level configuration and all payment methods will be returned in the checkout-data response. - -{% endinfo_block %} - -{% info_block infoBox "Note" %} - -`CheckoutRestApiConfig::isShipmentMethodsMappedToAttributes()` must be set to *true* if you want to continue receiving shipment methods in the checkout-data attributes. This configuration defaults to true for backward compatibility. -In case the `Pyz\Glue\CheckoutRestApi\CheckoutRestApiConfig::isShipmentMethodsMappedToAttributes(`) is *true*, make sure the shipping methods attributes are returned. To verify that, send a POST request to the `https://glue.mysprykershop.com/checkout-data` endpoint and make sure that you get not empty `shipmentMethods` attribute in response: -
      -Response example - -```json -{ - "data": { - "type": "checkout-data", - "id": null, - "attributes": { - "addresses": [], - "shipmentMethods": [ - { - "id": 4, - "name": "Air Sonic", - "carrierName": "Spryker Drone Shipment", - "price": 1000, - "taxRate": null, - "deliveryTime": null, - "currencyIsoCode": "EUR" - }, - { - "id": 5, - "name": "Air Light", - "carrierName": "Spryker Drone Shipment", - "price": 1500, - "taxRate": null, - "deliveryTime": null, - "currencyIsoCode": "EUR" - }, - { - "id": 2, - "name": "Express", - "carrierName": "Spryker Dummy Shipment", - "price": 590, - "taxRate": null, - "deliveryTime": null, - "currencyIsoCode": "EUR" - }, - { - "id": 3, - "name": "Air Standard", - "carrierName": "Spryker Drone Shipment", - "price": 500, - "taxRate": null, - "deliveryTime": null, - "currencyIsoCode": "EUR" - }, - { - "id": 1, - "name": "Standard", - "carrierName": "Spryker Dummy Shipment", - "price": 490, - "taxRate": null, - "deliveryTime": null, - "currencyIsoCode": "EUR" - } - ], - ... -} -``` -
      - - -{% endinfo_block %} - -{% info_block infoBox "Note" %} - -`CheckoutRestApiConfig::isPaymentProvidersMappedToAttributes()` must be set to *true* if you want to continue receiving payment methods in the checkout-data attributes. This configuration defaults to true for backward compatibility. -In case the `Pyz\Glue\CheckoutRestApi\CheckoutRestApiConfig::isPaymentProvidersMappedToAttributes()` is *true*, make sure the payment methods attributes are returned. To verify that, send a POST request to the `https://glue.mysprykershop.com/checkout-data` endpoint and make sure that you get not empty `paymentProviders` attribute in response: -
      -Response example - -```json -{ - "data": { - "type": "checkout-data", - "id": null, - "attributes": { - "addresses": [], - "paymentProviders": [ - { - "paymentProviderName": "DummyPayment", - "paymentMethods": [ - { - "paymentMethodName": "Invoice", - "paymentProviderName": null, - "requiredRequestData": [ - "paymentMethod", - "paymentProvider", - "dummyPaymentInvoice.dateOfBirth" - ] - }, - { - "paymentMethodName": "Credit Card", - "paymentProviderName": null, - "requiredRequestData": [ - "paymentMethod", - "paymentProvider", - "dummyPaymentCreditCard.cardType", - "dummyPaymentCreditCard.cardNumber", - "dummyPaymentCreditCard.nameOnCard", - "dummyPaymentCreditCard.cardExpiresMonth", - "dummyPaymentCreditCard.cardExpiresYear", - "dummyPaymentCreditCard.cardSecurityCode" - ] - } - ] - } - ], - ... -} -``` -
      - -{% endinfo_block %} - -## 3) Set up Transfer Objects - -Run the following command to generate transfer changes: - -```bash -console transfer:generate -``` - -{% info_block warningBox “Verification” %} - -Make sure that the following changes have been applied in transfer objects: - -| Transfer | Type | Event | Path | -| --- | --- | --- | --- | -| `RestCheckoutDataTransfer` | class | created | `src/Generated/Shared/Transfer/RestCheckoutDataTransfer.php` | -| `RestCheckoutErrorTransfer` | class | created | `src/Generated/Shared/Transfer/RestCheckoutErrorTransfer.php` | -| `RestCheckoutDataResponseTransfer` | class | created | `src/Generated/Shared/Transfer/RestCheckoutDataResponseTransfer.php` | -| `RestCheckoutRequestAttributesTransfer`|class | created | `src/Generated/Shared/Transfer/RestCheckoutRequestAttributesTransfer.php`| -|`RestCustomerTransfer` | class |created |`src/Generated/Shared/Transfer/RestCustomerTransfer.php`| -|`RestAddressTransfer` | class |created | `src/Generated/Shared/Transfer/RestAddressTransfer.php`| -| `RestShipmentTransfer`| class | created| `src/Generated/Shared/Transfer/RestShipmentTransfer.php` | -| `RestPaymentTransfer`| class| created | `src/Generated/Shared/Transfer/RestPaymentTransfer.php`| -| `RestCheckoutDataResponseAttributesTransfer`| class | created |`src/Generated/Shared/Transfer/RestCheckoutDataResponseAttributesTransfer.php`| -|`RestPaymentProviderTransfer` |class | created | `src/Generated/Shared/Transfer/RestPaymentProviderTransfer.php`| -|`RestPaymentMethodTransfer` | class |created |`src/Generated/Shared/Transfer/RestPaymentMethodTransfer.php`| -|`RestShipmentMethodTransfer` | class | created | `src/Generated/Shared/Transfer/RestShipmentMethodTransfer.php`| -| `RestCheckoutResponseAttributesTransfer`| class | created |`src/Generated/Shared/Transfer/RestCheckoutResponseAttributesTransfer.php`| -|`CheckoutResponseTransfer` | class | created |`src/Generated/Shared/Transfer/CheckoutResponseTransfer.php`| -|`SaveOrderTransfer` |class | created | `src/Generated/Shared/Transfer/SaveOrderTransfer.php`| -| `CheckoutErrorTransfer`|class | created |`src/Generated/Shared/Transfer/CheckoutErrorTransfer.php` | -|`AddressesTransfer` |class | created |`src/Generated/Shared/Transfer/AddressesTransfer.php` | -| `AddressTransfer`|class | created |`src/Generated/Shared/Transfer/AddressTransfer.php` | -| `ShipmentMethodTransfer`|class | created |`src/Generated/Shared/Transfer/ShipmentMethodTransfer.php` | -| `ShipmentMethodsCollectionTransfer`|class | created |`src/Generated/Shared/Transfer/ShipmentMethodsCollectionTransfer.php` | -| `PaymentProviderCollectionTransfer`|class | created |`src/Generated/Shared/Transfer/PaymentProviderCollectionTransfer.php` | -| `PaymentProviderTransfer`|class | created |`src/Generated/Shared/Transfer/PaymentProviderTransfer.php` | -| `PaymentMethodsTransfer`|class | created |`src/Generated/Shared/Transfer/PaymentMethodsTransfer.php` | -| `PaymentMethodTransfer`|class | created |`src/Generated/Shared/Transfer/PaymentMethodTransfer.php` | -| `QuoteTransfer`|class | created |`src/Generated/Shared/Transfer/QuoteTransfer.php` | -| `StoreTransfer`|class | created |`src/Generated/Shared/Transfer/StoreTransfer.php` | -| `MoneyValueTransfer`|class | created |`src/Generated/Shared/Transfer/MoneyValueTransfer.php` | -| `CurrencyTransfer`|class | created |`src/Generated/Shared/Transfer/CurrencyTransfer.php` | -| `QuoteResponseTransfer`|class | created |`src/Generated/Shared/Transfer/QuoteResponseTransfer.php` | -| `QuoteErrorTransfer`|class | created |`src/Generated/Shared/Transfer/QuoteErrorTransfer.php` | -| `ShipmentTransfer`|class | created |`src/Generated/Shared/Transfer/ShipmentTransfer.php` | -| `RestErrorCollectionTransfer`|class | created |`src/Generated/Shared/Transfer/RestErrorCollectionTransfer.php` | -| `CheckoutDataTransfer`|class | created |`src/Generated/Shared/Transfer/CheckoutDataTransfer.php` | -| `ItemTransfer`|class | created |`src/Generated/Shared/Transfer/ItemTransfer.php` | -| `RestCheckoutResponseTransfer`|class | created |`src/Generated/Shared/Transfer/RestCheckoutResponseTransfer.php` | -| `RestErrorMessageTransfer`|class | created |`src/Generated/Shared/Transfer/RestErrorMessageTransfer.php` | - -{% endinfo_block %} - -## 4) Set up Behavior - -### Enable resources and relationships - -Activate the following plugins: - -| Plugin | Specification | Prerequisites | Namespace | -| --- | --- | --- | --- | -| `CheckoutDataResourcePlugin` | Registers the `checkout-data` resource. | None | `Spryker\Glue\CheckoutRestApi\Plugin\GlueApplication` | -| `CheckoutResourcePlugin` | Registers the `checkout` resource. | None | `Spryker\Glue\CheckoutRestApi\Plugin\GlueApplication` | -| `OrderRelationshipByOrderReferencePlugin` | Adds a relationship to the order entity by order reference. | None | `Spryker\Glue\OrdersRestApi\Plugin` | -| `OrderPaymentsResourceRoutePlugin` | Registers the `order-payments` resource. | None | `Spryker\Glue\OrderPaymentsRestApi\Plugin` | - -**src/Pyz/Glue/GlueApplication/GlueApplicationDependencyProvider.php** - -```php -addRelationship( - CheckoutRestApiConfig::RESOURCE_CHECKOUT, - new OrderRelationshipByOrderReferencePlugin() - ); - - return $resourceRelationshipCollection; - } -} -``` - -{% info_block warningBox "Verification" %} - -To verify that `CheckoutDataResourcePlugin` is activated, send a *POST* request to `https://glue.mysprykershop.com/checkout-data` and make sure that you get a response different from **404 Not Found**. - -{% endinfo_block %} - -{% info_block warningBox "Verification" %} - -To verify that `CheckoutResourcePlugin` is activated, send a *POST* request to `https://glue.mysprykershop.com/checkout` and make sure that you get a response different from **404 Not Found**. - -{% endinfo_block %} - -{% info_block warningBox "Verification" %} - -To verify that `OrderRelationshipByOrderReferencePlugin` is activated, send a *POST* request to `https://glue.mysprykershop.com/checkout?include=orders` and make sure that you get a response that includes a section with the corresponding order resource. - -{% endinfo_block %} - -{% info_block warningBox "Verification" %} - -To verify that `OrderPaymentsResourceRoutePlugin` is activated, make sure that the following endpoint is available: `https://glue.mysprykershop.com/order-payments`. To do so, send a *POST* request with the following body: - - -```json -{ - "data": { - "type": "order-payments", - "attributes": { - "paymentIdentifier": {% raw %}{{{% endraw %}paymentIdentifier{% raw %}}}{% endraw %}, - "dataPayload": {% raw %}{{{% endraw %}dataPayload{% raw %}}}{% endraw %} - } - } -} -``` - -For more details, see [Updating Payment Data](/docs/scos/dev/glue-api-guides/{{page.version}}/checking-out-purchases-and-getting-checkout-data.html#updating-payment-data). - -{% endinfo_block %} - -### Configure mapping -Mappers should be configured on the project level to map the data from the request to `QuoteTransfer`: - -| Plugin | Specification | Prerequisites | Namespace | -| --- | --- | --- | --- | -| `CustomerQuoteMapperPlugin` | Adds a mapper that maps Customer information to `QuoteTransfer`. | None | `Spryker\Zed\CustomersRestApi\Communication\Plugin\CheckoutRestApi` | -| `AddressQuoteMapperPlugin` | Adds a mapper that maps billing and shipping address information to `QuoteTransfer`. | None | `Spryker\Zed\CustomersRestApi\Communication\Plugin\CheckoutRestApi` | - -**src/Pyz/Zed/CheckoutRestApi/CheckoutRestApiDependencyProvider.php** - -```json -The plugin ensures that a request contains one payment method only. | None | `Spryker\Glue\CheckoutRestApi\Plugin` | - - -**src/Pyz/Glue/CheckoutRestApi/CheckoutRestApiDependencyProvider.php** - -```php -The current feature integration Guide only adds the Company Account REST API functionality. -{% endinfo_block %} - -Follow the steps below to install Company Account feature API. - -## Prerequisites -To start the feature integration, overview and install the necessary features: - -| Name | Version | Integration guide | -| --- | --- | --- | -| Spryker Core | master | [Glue Application feature integration](/docs/scos/dev/feature-integration-guides/{{page.version}}/glue-api/glue-api-glue-application-feature-integration.html) | -| Company account | master | [Company Account](/docs/scos/dev/feature-integration-guides/{{page.version}}/company-account-feature-integration.html) | -| Customer Account Management | muster | [Customer API](/docs/scos/dev/feature-integration-guides/{{page.version}}/glue-api/glue-api-customer-account-management-feature-integration.html) | -| Uuid generation console | master| UUID Generation Console | - -## 1) Install the required modules using Composer -Run the following command to install the required modules: - -```bash -composer require spryker/company-user-auth-rest-api:"^2.0.0" spryker/oauth-company-user:"^2.0.0" spryker/oauth-permission:"^1.2.0" spryker/companies-rest-api:"^1.1.0" spryker/company-business-units-rest-api:"^1.2.0" spryker/company-business-unit-addresses-rest-api:"^1.0.0" spryker/company-roles-rest-api:"^1.1.0" spryker/company-users-rest-api:"^2.1.0" --update-with-dependencies -``` - -{% info_block warningBox “Verification” %} - - -Make sure that the following modules are installed: -| Module | Expected Directory | -| --- | --- | -| `CompanyUserAuthRestApi` | `vendor/spryker/company-user-auth-rest-api` | -| `OauthCompanyUser` | `vendor/spryker/oauth-company-user` | -| `OauthPermission` | `vendor/spryker/oauth-permission` | -| `CompaniesRestApi` | `vendor/spryker/companies-rest-api` | -| `CompanyBusinessUnitsRestApi` | `vendor/spryker/company-business-units-rest-api` | -| `CompanyBusinessUnitAddressesRestApi` | `vendor/spryker/company-business-unit-addresses-rest-api` | -| `CompanyRolesRestApi` | `vendor/spryker/company-roles-rest-api` | -| `CompanyUsersRestApi` | `vendor/spryker/company-users-rest-api` | - -{% endinfo_block %} - -## 2) Set Up Configuration -Configure resources available only for company users -Add the following resource to the list of resources which are accessible only for company users: -
      -src/Pyz/Glue/CompanyUsersRestApi/CompanyUsersRestApiConfig.php - -``` - -
      - - -### 3) Set Up Database Schema and Transfer Objects -Run the following commands to generate transfer changes: - -```bash -console transfer:generate -console propel:install -console transfer:generate -``` - -{% info_block warningBox “Verification” %} - - -Make sure that the following changes have occurred: - -| Transfer | Type | Event | Path | -| --- | --- | --- | --- | -| `RestCompanyAttributesTransfer` | class | created | `src/Generated/Shared/Transfer/RestCompanyAttributesTransfer.php` | -| `RestCompanyBusinessUnitAttributesTransfer` | class | created | `src/Generated/Shared/Transfer/RestCompanyBusinessUnitAttributesTransfer.php` | -| `RestCompanyBusinessUnitAddressesAttributesTransfer` | class | created | `src/Generated/Shared/Transfer/RestCompanyBusinessUnitAddressesAttributesTransfer.php` | -| `RestCompanyRoleAttributesTransfer` | class | created | `src/Generated/Shared/Transfer/RestCompanyRoleAttributesTransfer.php` | -| `RestCompanyUserAttributesTransfer` | class | created | `src/Generated/Shared/Transfer/RestCompanyUserAttributesTransfer.php` | -| `CompanyUserAccessTokenRequestTransfer` | class | created | `src/Generated/Shared/Transfer/CompanyUserAccessTokenRequestTransfer.php` | -| `CompanyUserIdentifierTransfer` | class | created | `src/Generated/Shared/Transfer/CompanyUserIdentifierTransfer.php` | -| `RestCompanyUserAccessTokensAttributesTransfer` | class | created | `src/Generated/Shared/Transfer/RestCompanyUserAccessTokensAttributesTransfer.php` | -| `RestCompanyUserAccessTokenResponseAttributesTransfer` | class | created | `src/Generated/Shared/Transfer/RestCompanyUserAccessTokenResponseAttributesTransfer.php` | -| `CustomerIdentifierTransfer.idCompanyUser` | property | added | `src/Generated/Shared/Transfer/CustomerIdentifierTransfer.php` | -| `CustomerIdentifierTransfer.permissions` | property | added | `src/Generated/Shared/Transfer/CustomerIdentifierTransfer.php` | -| `OauthUserTransfer.customerReference` | property | added | `src/Generated/Shared/Transfer/OauthUserTransfer.php` | -| `OauthUserTransfer.idCompanyUser` | property | added | `src/Generated/Shared/Transfer/OauthUserTransfer.php` | -| `OauthRequestTransfer.customerReference` | property | added | `src/Generated/Shared/Transfer/OauthRequestTransfer.php` | -| `OauthRequestTransfer.idCompanyUser` | property | added | `src/Generated/Shared/Transfer/OauthRequestTransfer.php` | -| `RestUserTransfer.idCompany` | property | added | `src/Generated/Shared/Transfer/RestUserTransfer.php` | -| `RestUserTransfer.idCompanyUser` | property | added | `src/Generated/Shared/Transfer/RestUserTransfer.php` | -| `RestUserTransfer.uuidCompanyUser` | property | added | `src/Generated/Shared/Transfer/RestUserTransfer.php` | -| `OauthResponseTransfer.idCompanyUser` | property | added | `src/Generated/Shared/Transfer/OauthResponseTransfer.php` | -| `RestTokenResponseAttributesTransfer.idCompanyUser` | property | added | `src/Generated/Shared/Transfer/RestTokenResponseAttributesTransfer.php` | -| `CompanyUserCriteriaFilterTransfer.companyBusinessUnitUuids` | property | added | `src/Generated/Shared/Transfer/CompanyUserCriteriaFilterTransfer.php` | -| `CompanyUserCriteriaFilterTransfer.companyRolesUuids` | property | added | `src/Generated/Shared/Transfer/CompanyUserCriteriaFilterTransfer.php` | -| `CompanyUserCollectionTransfer.filter` | property | added | `src/Generated/Shared/Transfer/CompanyUserCollectionTransfer.php` | -| `CompanyUserCollectionTransfer.total` | property | added | `src/Generated/Shared/Transfer/CompanyUserCollectionTransfer.php` | -| `CustomerCollectionTransfer.customer` | property | added | `src/Generated/Shared/Transfer/CustomerCollectionTransfer.php` | -| `CompanyTransfer.uuid` | property | added | `src/Generated/Shared/Transfer/CompanyTransfer.php` | -| `CompanyBusinessUnitTransfer.uuid` | property | added | `src/Generated/Shared/Transfer/CompanyBusinessUnitTransfer.php` | -| `CompanyUnitAddressTransfer.uuid` | property | added | `src/Generated/Shared/Transfer/CompanyUnitAddressTransfer.php` | -| `CompanyRoleTransfer.uuid` | property | added | `src/Generated/Shared/Transfer/CompanyRoleTransfer.php` | -| `CompanyUserTransfer.uuid` | property | added | `src/Generated/Shared/Transfer/CompanyUserTransfer.php` | - -{% endinfo_block %} - -{% info_block warningBox “Verification” %} - - -Verify that the following changes have occurred in the database: - -| Database entity | Type | Event | -| --- | --- | --- | -| `spy_company_unit_address.uuid` | column | added | -| `spy_company.uuid` | column | added | -| `spy_company_business_unit.uuid` | column | added | -| `spy_company_role.uuid` | column | added | -| `spy_company_user.uuid` | column | added | - -{% endinfo_block %} - -## 4) Set Up Behavior -### Generate UUIDs for the existing Company records without UUIDs - -Run the following command: - -```bash -console uuid:generate Company spy_company -``` -{% info_block warningBox “Verification” %} - - -Make sure that the UUID field is populated for all records in the `spy_company table`. To do so, run the following SQL query and make sure that the result contains **0** records: -```sql -select count(*) from spy_company where uuid is NULL; -``` - -{% endinfo_block %} - -### Generate UUIDs for the existing Company Business Unit records without UUIDs - -Run the following command: - -```bash -console uuid:generate CompanyBusinessUnit spy_company_business_unit -``` -{% info_block warningBox “Verification” %} - - -Make sure that the UUID field is populated for all records in the `spy_company_business_unit` table. To do so, run the following SQL query and make sure that the result contains **0** records: - -```sql -select count(*) from spy_company_business_unit where uuid is NULL; -``` - -{% endinfo_block %} - -### Generate UUIDs for the existing Company Role records without UUIDs - -Run the following command: - -```bash -console uuid:generate CompanyRole spy_company_role -``` -{% info_block warningBox “Verification” %} - - -Make sure that the UUID field is populated for all records in the `spy_company_role` table. To do so, run the following SQL query and make sure that the result contains **0** records: - -```sql -select count(*) from spy_company_role where uuid is NULL; -``` - -{% endinfo_block %} - -### Generate UUIDs for the existing Company Business Unit Address records without UUIDs - -Run the following command: - -```bash -console uuid:generate CompanyUnitAddress spy_company_unit_address -``` -{% info_block warningBox “Verification” %} - - -Make sure that the UUID field is populated for all records in the `spy_company_unit_address` table. To do so, run the following SQL query and make sure that the result contains **0** records: - -```sql -select count(*) from spy_company_unit_address where uuid is NULL; -``` - -{% endinfo_block %} - -### Generate UUIDs for the existing Company User records that do not have UUIDs - -Run the following command: - -```bash -console uuid:generate CompanyUser spy_company_user -``` -{% info_block warningBox “Verification” %} - - -Make sure that the UUID field is populated for all records in the `spy_company_user` table. To do so, run the following SQL query and make sure that the result contains **0** records: -```sql -select count(*) from spy_company_user where uuid is NULL; -``` - -{% endinfo_block %} - -### Enable resources and relationships - -{% info_block infoBox %} - -`CompaniesResourcePlugin` GET, `CompanyBusinessUnitsResourcePlugin` GET, `CompanyBusinessUnitAddressesResourcePlugin` GET, `CompanyRolesResourcePlugin` GET, `CompanyUsersResourceRoutePlugin` GET verbs are protected resources. For details, refer to the Configure section of [Configure documentation](/docs/scos/dev/concepts/glue-api/glue-infrastructure.html#resource-routing). - -{% endinfo_block %} - -Activate the following plugins: - -| Plugin | Specification | Prerequisites | Namespace | -| --- | --- | --- | --- | -| `CompaniesResourcePlugin` | Registers the `companies` resource. | None | `Spryker\Glue\CompaniesRestApi\Plugin\GlueApplication\CompaniesResourcePlugin` | -| `CompanyBusinessUnitsResourcePlugin` | Registers the `company-business-units` resource. | None | `Spryker\Glue\CompanyBusinessUnitsRestApi\Plugin\GlueApplication\CompanyBusinessUnitsResourcePlugin` | -| `CompanyBusinessUnitAddressesResourcePlugin` | Registers the `company-business-unit-address` resource. | None | `Spryker\Glue\CompanyBusinessUnitAddressesRestApi\Plugin\GlueApplication\CompanyBusinessUnitAddressesResourcePlugin` | -| `CompanyBusinessUnitCustomerExpanderPlugin` | Expands the customer session transfer with the company business unit transfer. | None | `Spryker\Glue\CompanyBusinessUnitsRestApi\Plugin\CustomersRestApi` | -| `CompanyRolesResourcePlugin` | Registers the `company-roles` resource. | None | `Spryker\Glue\CompanyRolesRestApi\Plugin\GlueApplication\CompanyRolesResourcePlugin` | -| `CompanyUserCustomerExpanderPlugin` | Expands customer transfer with company user transfer. | None | `Spryker\Glue\CompanyUsersRestApi\Plugin\CustomersRestApi` | -| `CompanyUsersResourceRoutePlugin` | Registers the `company-users` resource. | None | `Spryker\Glue\CompanyUsersRestApi\Plugin\GlueApplication\CompanyUsersResourceRoutePlugin` | -| `CompanyUserRestUserValidatorPlugin` | Checks that the Rest user is a company user. | None | `Spryker\Glue\CompanyUsersRestApi\Plugin\GlueApplication` | -| `CompanyByCompanyRoleResourceRelationshipPlugin` | Adds the `companies` resource as a relationship to the resource that will provide `CompanyRoleTransfer` as a payload. | None | `Spryker\Glue\CompaniesRestApi\Plugin\GlueApplication\CompanyByCompanyRoleResourceRelationshipPlugin` | -| `CompanyByCompanyBusinessUnitResourceRelationshipPlugin` | Adds the `companies` resource as a relationship to the resource that will provide `CompanyBusinessUnitTransfer` as a payload. | None | `Spryker\Glue\CompaniesRestApi\Plugin\GlueApplication\CompanyByCompanyBusinessUnitResourceRelationshipPlugin` | -| `CompanyByCompanyUserResourceRelationshipPlugin` | Adds the `companies` resource as a relationship to the resource that will provide `CompanyUserTransfer` as a payload. | None | `Spryker\Glue\CompaniesRestApi\Plugin\GlueApplication\CompanyByCompanyUserResourceRelationshipPlugin` | -| `CompanyBusinessUnitAddressesByCompanyBusinessUnitResourceRelationshipPlugin` | Adds the `company-business-unit-addresses` resource as a relationship to the `company-business-units` resource. | None | `Spryker\Glue\CompanyBusinessUnitAddressesRestApi\Plugin\GlueApplication\CompanyBusinessUnitAddressesByCompanyBusinessUnitResourceRelationshipPlugin` | -| `CompanyBusinessUnitByCompanyUserResourceRelationshipPlugin` | Adds the `company-business-units` resource as a relationship. Requires `CompanyUserTransfer` to be provided in the resource payload. | None | `Spryker\Glue\CompanyBusinessUnitsRestApi\Plugin\GlueApplication` | -| `CompanyRoleByCompanyUserResourceRelationshipPlugin` | Adds the `companies` resource as a relationship. Requires the `CompanyUserTransfer` to be provided in the resource payload. | None | `Spryker\Glue\CompaniesRestApi\Plugin\GlueApplication` | -| `CustomerByCompanyUserResourceRelationshipPlugin` | Adds the `customers` resource as a relationship when the `CompnayUserTransfer` is provided as a payload. | None | `Spryker\Glue\CustomersRestApi\Plugin\GlueApplication` | -| `CompanyUserOauthCustomerIdentifierExpanderPlugin` | Expands `CustomerIdentifierTransfer` with Company User UUID, if it is set up in `CustomerTransfer`. | None | `Spryker\Zed\CompanyUsersRestApi\Communication\Plugin\OauthCustomerConnector` | -| `CompanyUserRestUserMapperPlugin` | Maps the Company User data to the REST user identifier. | None | `Spryker\Glue\CompanyUserAuthRestApi\Plugin\AuthRestApi` | -| `OauthUserIdentifierFilterPermissionPlugin` | Filters the user identifier array to remove configured keys before persisting. | None | `Spryker\Zed\OauthPermission\Communication\Plugin\Filter` | -| `RefreshTokenPermissionOauthUserIdentifierFilterPlugin` | Filters the user identifier array to remove configured keys before persisting.. | None | `Spryker\Zed\OauthPermission\Communication\Plugin\OauthRevoke` | -| `PermissionOauthCompanyUserIdentifierExpanderPlugin` | If `idCompanyUser` is set in `CompanyUserTransfer`, expands `CompanyUserIdentifierTransfer` with a collection of permissions. | None | `Spryker\Zed\OauthPermission\Communication\Plugin\OauthCompanyUser` | -| `PermissionOauthCustomerIdentifierExpanderPlugin` | If `idCompanyUser` is set in `CustomerIdentifierTransfer`, expands `CustomerIdentifierTransfer` with a collection of permissions. | None | `Spryker\Zed\OauthPermission\Communication\Plugin\OauthCustomerConnector` | -| `CompanyUserAccessTokensResourceRoutePlugin` | Registers the `company-user-access-tokens` resource | None | `Spryker\Glue\CompanyUserAuthRestApi\Plugin\GlueApplication` | - -src/Pyz/Zed/OauthCustomerConnector/OauthCustomerConnectorDependencyProvider.php - -```php - -src/Pyz/Glue/CustomersRestApi/CustomersRestApiDependencyProvider.php - -```php - - - -
      -src/Pyz/Glue/GlueApplication/GlueApplicationDependencyProvider.php - -```php -addRelationship( - CompanyUsersRestApiConfig::RESOURCE_COMPANY_USERS, - new CompanyByCompanyUserResourceRelationshipPlugin() - ); - $resourceRelationshipCollection->addRelationship( - CompanyUsersRestApiConfig::RESOURCE_COMPANY_USERS, - new CompanyBusinessUnitByCompanyUserResourceRelationshipPlugin() - ); - $resourceRelationshipCollection->addRelationship( - CompanyUsersRestApiConfig::RESOURCE_COMPANY_USERS, - new CompanyRoleByCompanyUserResourceRelationshipPlugin() - ); - $resourceRelationshipCollection->addRelationship( - CompanyRolesRestApiConfig::RESOURCE_COMPANY_ROLES, - new CompanyByCompanyRoleResourceRelationshipPlugin() - ); - $resourceRelationshipCollection->addRelationship( - CompanyBusinessUnitsRestApiConfig::RESOURCE_COMPANY_BUSINESS_UNITS, - new CompanyByCompanyBusinessUnitResourceRelationshipPlugin() - ); - $resourceRelationshipCollection->addRelationship( - CompanyBusinessUnitsRestApiConfig::RESOURCE_COMPANY_BUSINESS_UNITS, - new CompanyBusinessUnitAddressesByCompanyBusinessUnitResourceRelationshipPlugin() - ); - $resourceRelationshipCollection->addRelationship( - CompanyUsersRestApiConfig::RESOURCE_COMPANY_USERS, - new CustomerByCompanyUserResourceRelationshipPlugin() - ); - - return $resourceRelationshipCollection; - } -} -``` -
      -
      - - -{% info_block warningBox “Verification” %} - - -To verify that everything is set up correctly, first, you need to authenticate as a regular customer. Then, to get the ID of the Company Users you can impersonate as, send a `GET` request to `https://glue.mysprykershop.com/company-users/mine`. - -http://mysprykershop.com/company-users/mine response - -```json -{ - "data": [{ - "type": "company-users", - "id": "8da78283-e629-5667-9f84-e13207a7aef9", - "attributes": { - "isActive": true, - "isDefault": false - }, - "links": { - "self": "http://mysprykershop.com/company-users/8da78283-e629-5667-9f84-e13207a7aef9" - } - }] -} -``` - -To log in as a Company User, send a `POST` request to `https://glue.mysprykershop.com/company-user-access-tokens` passing the ID of the necessary Company User in the request. Make sure that the response contains all the necessary data. - -http://mysprykershop.com/company-user-access-tokens request - -```json -{ - "data": { - "type": "company-user-access-tokens", - "attributes": { - "idCompanyUser": "8da78283-e629-5667-9f84-e13207a7aef9" - } - } -} -``` - -http://mysprykershop.com/company-user-access-tokens response - -```json -{ - "data": { - "type": "company-user-access-tokens", - "id": null, - "attributes": { - "tokenType": "Bearer", - "expiresIn": 28800, - "accessToken": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6IjYxNDdjO", - "refreshToken": "def5020063fc3a3eaed61198b1fd77231cf620dcf9b0de9697cc" - }, - "links": { - "self": " http://mysprykershop.com/company-user-access-tokens" - } - } -} -``` - -To verify that all the required data is provided in the access token, go to [jwt.io](https://jwt.io/) to decode the token and check that the required `customer_reference`, `id_customer`, `id_company_user` and permissions are present in the `sub` property of the payload data. - -{% endinfo_block %} - -{% info_block warningBox “Verification” %} - - -Make sure that the permission data is filtered out based on the record in the `spy_oauth_access_token` table. For this purpose, you can run the following SQL query and make sure that the result doesn't have any permissions-related data from the `user_identifier` column. - -```sql -SELECT * FROM spy_oauth_access_token WHERE user_identifier LIKE '%{"id_company_user":"8da78283-e629-5667-9f84-e13207a7aef9"%'; -``` - -{% endinfo_block %} - -{% info_block warningBox “Verification” %} - - -Make sure that the permission data is filtered out based on the record in the `spy_oauth_refresh_token` table. For this purpose, you can run the following SQL query and make sure that the result doesn't have any permissions-related data from the `user_identifier` column. - -```sql -SELECT * FROM spy_oauth_refresh_token WHERE user_identifier LIKE '%{"id_company_user":"8da78283-e629-5667-9f84-e13207a7aef9"%'; -``` - -{% endinfo_block %} - -{% info_block warningBox “Verification” %} - - -To make sure the `CompanyUserRestUserValidatorPlugin` is setup correctly, make sure that the user who is not a company user can't access resources listed in `CompanyUsersRestApiConfig::COMPANY_USER_RESOURCES` and the following error appears: - -```json - -{ - "errors": [ - { - "detail": "Rest user is not a company user.", - "code": "1401", - "status": 400 - } - ] -} -``` - -{% endinfo_block %} - - - -{% info_block warningBox “Verification” %} - - -Send a `GET` request to `https://glue.mysprykershop.com/companies/mine`. Make sure that the response contains a collection of resources with the companies that your current Company User belongs to. - -Send a `GET` request to `https://glue.mysprykershop.com/companies/{% raw %}{{{% endraw %}company_uuid{% raw %}}}{% endraw %}`. Make sure that the response contains a single company resource that your current Company User belongs to. - -{% endinfo_block %} - -{% info_block warningBox “Verification” %} - - -Send a `GET` request to `https://glue.mysprykershop.com/company-business-units/mine?include=companies,company-business-unit-addresses`. Make sure that the response contains a collection of resources with the company business units that your current Company User belongs to. Make sure that the `companies` and `addresses` relationships are present. - -Send a `GET` request to `https://glue.mysprykershop.com/company-business-units/{% raw %}{{{% endraw %}company_business_unit_uuid{% raw %}}}{% endraw %}?include=companies,company-business-unit-addresses`. Make sure that the response contains a single company business unit resource that your current Company User belongs to. Make sure that the `companies` and `addresses` relationships are present. - -{% endinfo_block %} - -{% info_block warningBox “Verification” %} - - -Send a `GET` request to `https://glue.mysprykershop.com/company-business-unit-addresses/{% raw %}{{{% endraw %}company_business_unit_address_uuid{% raw %}}}{% endraw %}`. Make sure that response contains a single company business unit address resource that your current company has. - -{% endinfo_block %} - -{% info_block warningBox “Verification” %} - - -Send a `GET` request to `https://glue.mysprykershop.com/company-roles/mine?include=companies`. Make sure that the response contains the collection of resources with all company roles that your current Company User has. Make sure that the `companies` relationship is present. - -Send a `GET` request to `https://glue.mysprykershop.com/company-roles/{% raw %}{{{% endraw %}company_role_uuid{% raw %}}}{% endraw %}?include=companies`. Make sure that the response contains a single company role resource that your current Company User has. Make sure that the `companies` relationship is present. - -{% endinfo_block %} - -{% info_block warningBox “Verification” %} - - -Send a `GET` request to `https://glue.mysprykershop.com/company-users?include=company-roles,companies,company-business-units,customers`. Make sure that the response contains a collection of resources with all the Company Users in your current company. Make sure that the `company-roles`, `companies`, `company-business-units` and `customers` relationships are present. - -Send a `GET` request to `https://glue.mysprykershop.com/company-roles/mine?include=company-roles,companies,company-business-units,customers`. Make sure that the response contains a collection of resources with all the Company Users that the current user can impersonate as. Make sure that the `company-roles`, `companies`, `company-business-units` and `customers` relationships are present. - -Send a `GET` request to `https://glue.mysprykershop.com/company-users/{% raw %}{{{% endraw %}company_user_uuid{% raw %}}}{% endraw %}?include=company-roles,companies,company-business-units,customers`. Make sure that the response contains a single Company User. Make sure that the `company-roles`, `companies`, `company-business-units` and `customers` relationships are present. - -{% endinfo_block %} diff --git a/docs/scos/dev/feature-integration-guides/202005.0/glue-api/glue-api-content-items-feature-integration.md b/docs/scos/dev/feature-integration-guides/202005.0/glue-api/glue-api-content-items-feature-integration.md deleted file mode 100644 index b1ae4ac91d0..00000000000 --- a/docs/scos/dev/feature-integration-guides/202005.0/glue-api/glue-api-content-items-feature-integration.md +++ /dev/null @@ -1,106 +0,0 @@ ---- -title: Glue API - Content Items feature integration -description: The guide walks you through the process of installing and configuring the Content Items feature in the project. -last_updated: Apr 3, 2020 -template: feature-integration-guide-template -originalLink: https://documentation.spryker.com/v5/docs/glue-api-content-items-api-feature-integration -originalArticleId: e81550ce-cc54-4d5e-8cc9-b2292edb72ee -redirect_from: - - /v5/docs/glue-api-content-items-api-feature-integration - - /v5/docs/en/glue-api-content-items-api-feature-integration - - /docs/scos/dev/feature-integration-guides/{{page.version}}/glue-api/glue-api-content-items-feature-integration.html ---- - -## Install feature API -### Prerequisites -Install the required features: - -| Name | Version | Integration guide | -| --- | --- | --- | -| Spryker Core | 201907.0 | Glue Application feature integration | -| Product | 201907.0 | Products API feature integration | -| Content Item | 201907.0 | | - -### 1) Install the required modules using Composer -Run the following command(s) to install the required modules: - -```bash -composer require spryker/content-banners-rest-api:"^2.1.0" spryker/content-product-abstract-lists-rest-api:"^1.0.0" --update-with-dependencies -``` - -{% info_block warningBox “Verification” %} - -Ensure that the following modules have been installed in `vendor/spryker`: -{% endinfo_block %} - -| Module | Expected Directory | -| --- | --- | -| `ContentBannersRestApi` | `vendor/spryker/content-banners-rest-api` | -| `ContentProductAbstractListsRestApi` | `vendor/spryker/content-product-abstract-lists-rest-api` | - -### 2) Set up Transfer Objects -Run the following command to generate transfer changes: - -```bash -console transfer:generate -``` - -{% info_block warningBox “Verification” %} - -Make sure that the following changes have been applied in transfer objects, see `src/Generated/Shared/Transfer/` folder: -{% endinfo_block %} - -| Transfer | Type | Event | -| --- | --- | --- | -| `RestErrorMessage` | class | created | -| `RestContentBannerAttributes` | class | created | -| `ContentProductAbstractListType` | class | created | -| `ContentBannerType` | class | created | -| `AbstractProductsRestAttributes` | class | created | - -### 3) Set up Behavior -#### Enable resources and relationships - -{% info_block infoBox %} -`ContentBannerResourceRoutePlugin` GET, `ContentProductAbstractListRoutePlugin` GET verbs are protected resources. Please refer to the Configure section of the *Configure documentation*. -{% endinfo_block %} - -Activate the following plugins: - -| Plugin | Specification | Prerequisites | Namespace | -| --- | --- | --- | --- | -| `ContentBannerResourceRoutePlugin` | Registers a `/content-banners/{CONTENT-KEY}` resource route. | None | `Spryker\Glue\ContentBannersRestApi\Plugin` | -| `ContentProductAbstractListRoutePlugin` | Registers a `/content-product-abstract-lists/{CONTENT-KEY}/content-product-abstract` resource route. | None | `Spryker\Glue\ContentProductAbstractListsRestApi\Plugin` | - -src/Pyz/Glue/GlueApplication/GlueApplicationDependencyProvider.php - -```php -
    • https://glue.mysprykershop.com/content-banners/{content_key}
    • https://glue.mysprykershop.com/content-product-abstract-lists/{content_key}/content-product-abstract
    ) diff --git a/docs/scos/dev/feature-integration-guides/202005.0/glue-api/glue-api-customer-access-feature-integration.md b/docs/scos/dev/feature-integration-guides/202005.0/glue-api/glue-api-customer-access-feature-integration.md deleted file mode 100644 index 077e519f0a2..00000000000 --- a/docs/scos/dev/feature-integration-guides/202005.0/glue-api/glue-api-customer-access-feature-integration.md +++ /dev/null @@ -1,212 +0,0 @@ ---- -title: Glue API - Customer Access feature integration -description: Use the guide to install the Customer Access API feature in your project. -last_updated: Sep 14, 2020 -template: feature-integration-guide-template -originalLink: https://documentation.spryker.com/v5/docs/glue-api-customer-access-feature-integration -originalArticleId: 0b19c34a-b115-4ccb-90c6-bc27bb9a0c16 -redirect_from: - - /v5/docs/glue-api-customer-access-feature-integration - - /v5/docs/en/glue-api-customer-access-feature-integration -related: - - title: Getting the List of Protected Resources - link: docs/scos/dev/glue-api-guides/page.version/getting-the-list-of-protected-resources.html ---- - -{% info_block errorBox %} - -The following feature integration guide expects the basic feature to be in place. -The current feature integration Guide only adds the Company Account REST API functionality. - -{% endinfo_block %} - -## Install feature API -### Prerequisites -To start the feature integration, overview and install the necessary features: - -| Name | Version | Integration guide | -| --- | --- | --- | -| Spryker Core | {{page.version}} | [Feature API](/docs/scos/dev/feature-integration-guides/{{page.version}}/glue-api/glue-api-installation-and-configuration.html) | -| Customer Access | {{page.version}} | [Feature](/docs/scos/dev/feature-integration-guides/{{page.version}}/customer-access-feature-integration.html) | - -### 1) Install the required modules using Composer -Run the following command to install the required modules: - -```bash -composer require spryker/customer-access-rest-api:"^1.1.0" --update-with-dependencies -``` - -{% info_block warningBox "Verification" %} - -Make sure that the following module has been installed: - -| Module | Expected Directory | -| --- | --- | -| `CustomerAccessRestApi` | `vendor/spryker/customer-access-rest-api` | - -{% endinfo_block %} - -### 2) Set up configuration -Add the following configuration: - -| Configuration | Specification | Prerequisites | Namespace | -| --- | --- | --- | --- | -| `CustomerAccessRestApiConfig::CUSTOMER_ACCESS_CONTENT_TYPE_TO_RESOURCE_TYPE_MAPPING` | Array that provides a mapping between customer access content types and the corresponding REST resource names. | None |`\Spryker\Glue\CustomerAccessRestApi` | - -src/Pyz/Glue/CustomerAccessRestApi/CustomerAccessRestApiConfig.php - -```php - [ - ProductPricesRestApiConfig::RESOURCE_ABSTRACT_PRODUCT_PRICES, - ProductPricesRestApiConfig::RESOURCE_CONCRETE_PRODUCT_PRICES, - ], - CustomerAccessConfig::CONTENT_TYPE_ORDER_PLACE_SUBMIT => [ - CheckoutRestApiConfig::RESOURCE_CHECKOUT, - CheckoutRestApiConfig::RESOURCE_CHECKOUT_DATA, - ], - CustomerAccessConfig::CONTENT_TYPE_ADD_TO_CART => [ - CartsRestApiConfig::RESOURCE_GUEST_CARTS_ITEMS, - ], - CustomerAccessConfig::CONTENT_TYPE_WISHLIST => [ - WishlistsRestApiConfig::RESOURCE_WISHLISTS, - WishlistsRestApiConfig::RESOURCE_WISHLIST_ITEMS, - ], - ]; -} -``` - -### 3) Set up Transfer Objects -Run the following command to generate transfer changes: - -```bash -console transfer:generate -``` - -{% info_block warningBox "Verification" %} - -Make sure that the following changes have occurred: - -| Transfer | Type | Event | Path | -| --- | --- | --- | --- | -| `RestCustomerAccessAttributesTransfer` | class | created | `src/Generated/Shared/Transfer/RestCustomerAccessAttributesTransfer` | - -{% endinfo_block %} - -### 4) Set up Behavior -#### Enable resources - -Activate the following plugins: - -| Plugin | Specification | Prerequisites | Namespace | -| --- | --- | --- | --- | -| `CustomerAccessResourceRoutePlugin` | Registers the `customer-access` resource. | None | `Spryker\Glue\CustomerAccessRestApi\Plugin\GlueApplication` | -| `CustomerAccessFormatRequestPlugin` | Checks whether the current resource is restricted by the `spryker/customer-access` module. | None | `Spryker\Glue\CustomerAccessRestApi\Plugin\GlueApplication` | - -src/Pyz/Glue/GlueApplication/GlueApplicationDependencyProvider.php - -```php -The current feature integration guide only adds the Oauth, Auth Rest API and Customers Rest API functionality. -{% endinfo_block %} - -Follow the steps below to install Customer Account Management feature API. - -## Prerequisites -Install the required features: - -| Name | Version | Integration guide | -| --- | --- | --- | -| Spryker Core | master | [Glue Application feature integration](/docs/scos/dev/feature-integration-guides/{{page.version}}/glue-api/glue-api-glue-application-feature-integration.html) | -| Customer Account Management |master | | - -## 1)Install the required modules using Composer -Run the following command to install the required modules: - -```bash -composer require "spryker/customers-rest-api":"^1.12.3" "spryker/auth-rest-api":"^2.9.0" "spryker/oauth":"^1.6.0" "spryker/oauth-revoke":"^1.0.0" "spryker/oauth-customer-connector:"^1.4.0" --update-with-dependencies -``` - -{% info_block warningBox “Verification” %} - -Make sure that the following modules are installed: -{% endinfo_block %} - -| Module | Expected Directory | -| --- | --- | -| `Oauth` | `vendor/spryker/oauth` | -| `OauthRevoke` | `vendor/spryker/oauth-revoke` | -|`OauthCustomerConnector` | `vendor/spryker/oauth-customer-connector` | -| `AuthRestApi` | `vendor/spryker/auth-rest-api` | -| `CustomersRestApi ` | `vendor/spryker/customers-rest-api` | - - -## 2) Set up Configuration -Set the required OAuth config (see the [Installation documentation](https://oauth2.thephpleague.com/installation/) for more information about keys generation): - -
    -config/Shared/config_default.php - -```php -$config[OauthConstants::PRIVATE_KEY_PATH] = 'file://path/to/private.key'; -$config[OauthConstants::PUBLIC_KEY_PATH] = 'file://path/to/public.key'; -$config[OauthConstants::ENCRYPTION_KEY] = 'generated-encryption-key'; -$config[OauthConstants::OAUTH_CLIENT_IDENTIFIER] = 'some-client-identifier'; -$config[OauthConstants::OAUTH_CLIENT_SECRET] = 'some-client-secret'; -``` - -
    -
    - -### Configure expired refresh oauth tokens cleanup -To override the default interval which defines for how long the refresh tokens will be stored in the system after they expire, extend the `Spryker\Shared\Oauth\OauthConfig` on the project level. The value has to be provided in the format acceptable by `DateInterval` object. - -
    -src/Pyz/Zed/Shared/OauthConfig.php - -```php - -
    - -## 3) Set Up Database Schema and Transfer Objects -Run the following commands to apply database changes, and also generate entity and transfer changes: - -```bash -console transfer:generate -console propel:install -console transfer:generate -``` - -{% info_block warningBox "Verification" %} - -Make sure that the following changes have occurred in the database: - -| Transfer | Type | Event | -| --- | --- | --- | -| `spy_customer_address.uuid` | column | created | -| `spy_customer_address.spy_customer_address-unique-uuid` | index | created | -| `spy_oauth_access_token` | table | created | -| `spy_oauth_client` | table | created | -| `spy_oauth_scope` | table | created | -| `spy_oauth_refresh_token` | table | created | - -{% endinfo_block %} - -{% info_block warningBox "Verification" %} - -Make sure that the following changes have occurred in transfer objects: - -| Transfer | Type | Event | Path | -| --- | --- | --- | --- | -| `AddressTransfer.uuid` | column | created | `src/Generated/Shared/Transfer/AddressTransfer.php` | -| `RestCustomersAttributesTransfer` | class | created | `src/Generated/Shared/Transfer/RestCustomersAttributesTransfer.php` | -| `RestCustomersResponseAttributesTransfer` | class | created | `src/Generated/Shared/Transfer/RestCustomersResponseAttributesTransfer.php` | -| `RestCustomersRegisterAttributesTransfer` | class | created | `src/Generated/Shared/Transfer/RestCustomersRegisterAttributesTransfer.php` | -| `RestAddressAttributesTransfer` | class | created | `src/Generated/Shared/Transfer/RestAddressAttributesTransfer.php` | -| `RestCustomerPasswordAttributesTransfer` | class | created | `src/Generated/Shared/Transfer/RestCustomerPasswordAttributesTransfer.php` | -| `RestCustomerForgottenPasswordAttributesTransfer` | class | created | `src/Generated/Shared/Transfer/RestCustomerForgottenPasswordAttributesTransfer.php` | -| `RestCustomerRestorePasswordAttributesTransfer` | class | created | `src/Generated/Shared/Transfer/RestCustomerRestorePasswordAttributesTransfer.php` | -| `RestAccessTokensAttributesTransfer` | class | created | `src/Generated/Shared/Transfer/RestAccessTokensAttributesTransfer.php` | -| `RestRefreshTokensAttributesTransfer` | class | created | `src/Generated/Shared/Transfer/RestRefreshTokensAttributesTransfer.php` | -| `RestTokenResponseAttributesTransfer` | class | created | `src/Generated/Shared/Transfer/RestTokenResponseAttributesTransfer.php` | -| `CustomerIdentifierTransfer` | class | created | `src/Generated/Shared/Transfer/CustomerIdentifierTransfer.php` | -| `OauthRequestTransfer` | class | created | `src/Generated/Shared/Transfer/OauthRequestTransfer.php` | -| `OauthResponseTransfer` | class | created | `src/Generated/Shared/Transfer/OauthResponseTransfer.php` | -| `OauthAccessTokenValidationResponseTransfer` | class | created | `src/Generated/Shared/Transfer/OauthAccessTokenValidationResponseTransfer.php` | -| `OauthErrorTransfer` | class | created | `src/Generated/Shared/Transfer/OauthErrorTransfer.php` | -| `OauthAccessTokenValidationRequestTransfer` | class | created | `src/Generated/Shared/Transfer/OauthAccessTokenValidationRequestTransfer.php` | -| `OauthUserTransfer` | class | created | `src/Generated/Shared/Transfer/OauthUserTransfer.php` | -| `OauthScopeRequestTransfer` | class | created | `src/Generated/Shared/Transfer/OauthScopeRequestTransfer.php` | -| `OauthScopeTransfer` | cell | created | `src/Generated/Shared/Transfer/OauthScopeTransfer.php` | -| `OauthClientTransfer` | cell | created | `src/Generated/Shared/Transfer/OauthClientTransfer.php` | -| `OauthGrantTypeConfigurationTransfer` | class | created | `src/Generated/Shared/Transfer/OauthGrantTypeConfigurationTransfer.php` | -| `OauthAccessTokenDataTransfer` | class | created | `src/Generated/Shared/Transfer/OauthAccessTokenDataTransfer.php` | -| `JwtTokenTransfer` | class | created | `src/Generated/Shared/Transfer/JwtTokenTransfer.php` | -| `OauthRefreshTokenTransfer` | class | created | `src/Generated/Shared/Transfer/OauthRefreshTokenTransfer.php` | -| `OauthRefreshTokenCollectionTransfer` | class | created | `src/Generated/Shared/Transfer/OauthRefreshTokenCollectionTransfer.php` | -| `RevokeRefreshTokenRequestTransfer` | class | created | `src/Generated/Shared/Transfer/RevokeRefreshTokenRequestTransfer.php` | -| `RevokeRefreshTokenResponseTransfer` | class | created | ` src/Generated/Shared/Transfer/RevokeRefreshTokenResponseTransfer.php -` | -| `OauthTokenCriteriaFilterTransfer` | class | created | `src/Generated/Shared/Transfer/OauthTokenCriteriaFilterTransfer.php` | - -{% endinfo_block %} - -## 4) Set Up Behavior -### Migrate data in the database - -{% info_block infoBox "Info" %} - -The following steps generate UUIDs for existing entities in the `spy_customer_address` table. - -{% endinfo_block %} - -Run the following command: - -```bash -console uuid:generate Customer spy_customer_address -``` - -{% info_block warningBox "Verification" %} - -Make sure that the `UUID` field is populated for all records in the `spy_customer_address` table. For this purpose, run the following SQL query and make sure that the result is **0** records: - -```sql -SELECT COUNT(*) FROM spy_customer_address WHERE uuid IS NULL; -``` - -{% endinfo_block %} - -### Enable Jenkins check for finding and deleting the expired refresh token - -
    -src/Pyz/Glue/GlueApplication/GlueApplicationDependencyProvider.php - -```php - 'remove-expired-refresh-tokens', - 'command' => '$PHP_BIN vendor/bin/console oauth:refresh-token:remove-expired', - 'schedule' => '*/5 * * * *', - 'enable' => true, - 'stores' => $allStores, -]; - - -``` -
    -
    - - -### Enable resources and relationships - -{% info_block infoBox "Note" %} - -For information on how to protect resources, refer to [Security and Authentication](/docs/scos/dev/system-requirements/{{page.version}}/system-requirements.html). - -{% endinfo_block %} - -Activate the following plugins: - -| Plugin | Specification | Prerequisites | Namespace | -| --- | --- | --- | --- | -| `SetCustomerBeforeActionPlugin.uuid` | Sets customer data to the session. | It is expected that the `user` field will be set in the REST requests. | `Spryker\Glue\CustomersRestApi\Plugin` | -| `CustomersResourceRoutePlugin` | Registers the `customers` resource. | None | `Spryker\Glue\CustomersRestApi\Plugin` | -| `AddressesResourceRoutePlugin` | Registers the `addresses` resource. | None | `Spryker\Glue\CustomersRestApi\Plugin` | -| `CustomerForgottenPasswordResourceRoutePlugin` | Registers the `customer-forgotten-password` resource. | None | `Spryker\Glue\CustomersRestApi\Plugin` | -| `CustomerRestorePasswordResourceRoutePlugin` | Registers the `customer-restore-password` resource. | None | `Spryker\Glue\CustomersRestApi\Plugin` | -| `CustomerPasswordResourceRoutePlugin` | Registers the `customer-password` resource. | None | `Spryker\Glue\CustomersRestApi\Plugin` | -| `CustomersToAddressesRelationshipPlugin` | Adds the `addresses` resource as a relationship to the `customers` resource. | None | `Spryker\Glue\CustomersRestApi\Plugin`| -| `AccessTokensResourceRoutePlugin` | Registers the `access token` resource. | None | `Spryker\Glue\AuthRestApi\Plugin` | -| `RefreshTokensResourceRoutePlugin`| Registers the `refresh access token` resource.| None | `Spryker\Glue\AuthRestApi\Plugin` | -| `AccessTokenRestRequestValidatorPlugin` | Validates an authentication token in every request to the protected resource. | None | `Spryker\Glue\AuthRestApi\Plugin` | -| `FormatAuthenticationErrorResponseHeadersPlugin` | Adds an authentication error to the header in case when the invalid token is passed.| None | `Spryker\Glue\AuthRestApi\Plugin` | -| `RestUserFinderByAccessTokenPlugin`| Finds the rest user based on rest request data. | None | `Spryker\Glue\AuthRestApi\Plugin` | -| `OauthClientInstallerPlugin` | Populates database with OAuth client data. | None | `Spryker\Zed\Oauth\Communication\Plugin\Installer` | -| `OauthCustomerScopeInstallerPlugin` | Installs OAuth customer scope data. | None | `Spryker\Zed\OauthCustomerConnector\Communication\Plugin\Installer` | -|`CustomerOauthUserProviderPlugin`| Provides a customer OAuth user. | None | `Spryker\Zed\OauthCustomerConnector\Communication\Plugin` | -| `CustomerOauthScopeProviderPlugin` | Provides a list of customer scopes. | None | `Spryker\Zed\OauthCustomerConnector\Communication\Plugin` | -| `OauthExpiredRefreshTokenRemoverPlugin` | Removes expired refresh tokens by the provided criteria transfer. | None | `Spryker\Zed\OauthRevoke\Communication\Plugin\Oauth` | -| `OauthRefreshTokenCheckerPlugin` | Checks if the refresh token has been revoked. | None | `Spryker\Zed\OauthRevoke\Communication\Plugin\Oauth` | -| `OauthRefreshTokenReaderPlugin` |Finds the refresh token by the provided criteria transfer. | None | `Spryker\Zed\OauthRevoke\Communication\Plugin\Oauth` | -| `OauthRefreshTokenRevokerPlugin` | Revokes the refresh token. | None | `Spryker\Zed\OauthRevoke\Communication\Plugin\Oauth` | -| `OauthRefreshTokenSaverPlugin` | Saves the refresh token. | None | `Spryker\Zed\OauthRevoke\Communication\Plugin\Oauth` | -| `OauthRefreshTokensReaderPlugin` | Gets the refresh tokens by the provided criteria. | None | `Spryker\Zed\OauthRevoke\Communication\Plugin\Oauth` | -| `OauthRefreshTokensRevokerPlugin` | Revokes all the refresh tokens. | None | `Spryker\Zed\OauthRevoke\Communication\Plugin\Oauth` | - -
    -src/Pyz/Glue/GlueApplication/GlueApplicationDependencyProvider.php - -```php -addRelationship( - CustomersRestApiConfig::RESOURCE_CUSTOMERS, - new CustomersToAddressesRelationshipPlugin() - ); - - return $resourceRelationshipCollection; - } - - /** - * @return \Spryker\Glue\GlueApplicationExtension\Dependency\Plugin\RestUserFinderPluginInterface[] - */ - protected function getRestUserFinderPlugins(): array - { - return [ - new RestUserFinderByAccessTokenPlugin(), - ]; - } -} -``` - -
    -
    - -
    -src/Pyz/Zed/Oauth/OauthDependencyProvider.php - -```php - -
    - -
    -src/Pyz/Zed/Installer/InstallerDependencyProvider.php - -```php - -
    - -Run the following command to set up OAuth client: - -```bash -console setup:init-db -``` - -{% info_block warningBox "Verification" %} - -Make sure that the OAuth client is added to the `spy_oauth_client` table. You can run the following SQL-query for it and make sure that the result is 1 record. - -```sql -SELECT * FROM spy_oauth_client WHERE identifier = 'some-client-identifier'; -``` - -{% endinfo_block %} - -{% info_block warningBox "Verificaiton" %} - -Make sure that the following endpoints are available: - -* https://glue.mysprykershop.com/customers -* https://glue.mysprykershop.com/addresses -* https://glue.mysprykershop.com/customer-password -* https://glue.mysprykershop.com/customer-forgotten-password -* https://glue.mysprykershop.com/customer-restore-password -* https://glue.mysprykershop.com/access-tokens -* https://glue.mysprykershop.com/refresh-tokens - - -{% endinfo_block %} - -{% info_block warningBox "Verificaiton" %} - -Send a request to `http://mysprykershop.com/customers/{% raw %}{{{% endraw %}customer_id{% raw %}}}{% endraw %}?include=addresses`. Make sure that the response includes relationships to the addresses resources.
    *The Customer with the given ID should have at least one address*. - -{% endinfo_block %} - -{% info_block warningBox "Verificaiton" %} - -To verify `AccessTokenRestRequestValidatorPlugin` is set up correctly, send a request to `/refresh-tokens` *without Authorization: Bearer {token}* (or with the outdated or wrong token). If you get one of the following errors, the plugin is installed: - -
    -Auth error - -```json -{ - "errors": [ - { - "detail": "Invalid access token.", - "status": 401, - "code": "001" - } - ] -} -``` - -
    -
    - -
    -Auth error - -```json -{ - "errors": [ - { - "detail": "Missing access token.", - "status": 403, - "code": "002" - } - ] -} -``` - -
    -
    - - -{% endinfo_block %} - - -{% info_block warningBox "Verification" %} - -To make sure that `FormatAuthenticationErrorResponseHeadersPlugin` has been set up correctly, get an access token for any user, and then check that the endpoints that require validation are accessible when accessed with this token. - -{% endinfo_block %} - -{% info_block warningBox "Verification" %} - -To make sure that `RestUserFinderByAccessTokenPlugin` has been set up correctly, get an access token for any user, and then check that the endpoints that require data of the current customer (e.g. `/carts`, `/customer/:customerReference`) are accessible and make sure that the system detects the current customer correctly (data endpoints return is the same the customer can see in Yves). - -{% endinfo_block %} - -{% info_block warningBox "Verification" %} - -To verify that `OauthRefreshTokenSaverPlugin` is set up correctly, send a *POST* request to `https://glue.mysprykershop.com/access-tokens` and make sure that you get the response that includes a section with `access-token` and `refresh-token` and a new record in the `spy_oauth_refresh_token` table. You can run the following SQL-query for this purpose: - -```sql -SELECT * FROM spy_oauth_refresh_token WHERE customer_reference = 'authenticated-customer-reference'; -``` - -{% endinfo_block %} - -{% info_block warningBox "Verification" %} - -To verify that `OauthRefreshTokenReaderPlugin` and `OauthRefreshTokenRevokerPlugin` are set up correctly, send a *DELETE* request to `https://glue.mysprykershop.com/refresh-tokens/{% raw %}{{{% endraw %}refresh_token{% raw %}}}{% endraw %}` and  make sure that the record has not empty `spy_oauth_refresh_token::revoked_at` value. You can run the following SQL-query for this purpose: - -```sql -SELECT * FROM spy_oauth_refresh_token WHERE customer_reference = 'authenticated-customer-reference'; -``` - -{% endinfo_block %} - -{% info_block warningBox "Verification" %} - -To verify that `OauthRefreshTokensReaderPlugin` and `OauthRefreshTokensRevokerPlugin` are set up correctly, prepare several refresh tokens and send a *DELETE* request to `https://glue.mysprykershop.com/refresh-tokens/mine` and make sure that all records related to the authenticated customer have not empty `spy_oauth_refresh_token::revoked_at` value. You can run the following SQL-query for this purpose: - -```sql -SELECT * FROM spy_oauth_refresh_token WHERE customer_reference = 'authenticated-customer-reference'; -``` - -{% endinfo_block %} - -{% info_block warningBox "Verification" %} - -To verify that `OauthRefreshTokenCheckerPlugin` is set up correctly, send a *POST* request to `https://glue.mysprykershop.com/refresh-tokens` and specify the revoked refresh token. If you get the following errors, the plugin is installed: - -
    -POST request example - -```json -{ - "data": { - "type": "refresh-tokens", - "attributes": { - "refreshToken": "{% raw %}{{{% endraw %}revoked_refresh_token{% raw %}}}{% endraw %}" - } - } -} -``` -
    -
    - -
    -Response example - -```json -{ - "errors": [ - { - "code": "004", - "status": 401, - "detail": "Failed to refresh token." - } - ] -} -``` -
    -
    - - -{% endinfo_block %} - -{% info_block warningBox "Verification" %} - -To verify that `OauthRefreshTokenRemoverPlugin` is set up correctly, run the following console command and make sure that all expired refresh tokens older than defined by the removal interval you configured (`Spryker\Shared\Oauth\OauthConfig::getRefreshTokenRetentionInterval()`) were deleted: - -```bash -console oauth:refresh-token:remove-expired -``` - -{% endinfo_block %} diff --git a/docs/scos/dev/feature-integration-guides/202005.0/glue-api/glue-api-glue-application-feature-integration.md b/docs/scos/dev/feature-integration-guides/202005.0/glue-api/glue-api-glue-application-feature-integration.md deleted file mode 100644 index ef9f5bd6a0e..00000000000 --- a/docs/scos/dev/feature-integration-guides/202005.0/glue-api/glue-api-glue-application-feature-integration.md +++ /dev/null @@ -1,414 +0,0 @@ ---- -title: Glue API - Glue application feature integration -description: This guide will navigate you through the process of installing and configuring the Glue Application feature in Spryker OS. -last_updated: May 14, 2020 -template: feature-integration-guide-template -originalLink: https://documentation.spryker.com/v5/docs/glue-api-glue-application-feature-integration -originalArticleId: c4c62d97-f36a-45c2-94a6-a07274d71766 -redirect_from: - - /v5/docs/glue-api-glue-application-feature-integration - - /v5/docs/en/glue-api-glue-application-feature-integration ---- - -Follow the steps below to install Glue application feature API. - - -### Prerequisites -Install the required features: - -| Name | Type | Version | -| --- | --- | --- | -| Spryker Core | Feature | master | - -### 1) Install the required modules using Composer -Run the following command(s) to install the required modules: - -```bash -composer require spryker/glue-application:"^1.0.0" spryker/entity-tags-rest-api:"^1.0.0" spryker/stores-rest-api:"^1.0.0" --update-with-dependencies -``` - -{% info_block warningBox “Verification” %} - -Make sure that the following modules are installed: - -| Module | Expected Directory | -| --- | --- | -| `GlueApplication` | `vendor/spryker/glue-application` | -| `EntityTagsRestApi` | `vendor/spryker/entity-tag-rest-api` | -| `StoresRestApi` | `vendor/spryker/stores-rest-api` | - -{% endinfo_block %} - -### 2) Set Up Configuration -Add the necessary parameters to `config/Shared/config_default.php`: - -
    -config/Shared/config_default.php - -```bash -$config[GlueApplicationConstants::GLUE_APPLICATION_DOMAIN] = 'https://glue.mysprykershop.com'; -$config[GlueApplicationConstants::GLUE_APPLICATION_CORS_ALLOW_ORIGIN] = 'https://glue.mysprykershop.com'; -$config[GlueApplicationConstants::GLUE_APPLICATION_REST_DEBUG] = false; -``` - -
    -
    - -#### Add Global CORS policy - -{% info_block infoBox "Info" %} -`GLUE_APPLICATION_CORS_ALLOW_ORIGIN` should be configured for every domain used in the project. -{% endinfo_block %} - -Adjust `config/Shared/config_default.php`: - -
    -config/Shared/config_default.ph - -```bash -$config[GlueApplicationConstants::GLUE_APPLICATION_CORS_ALLOW_ORIGIN] = 'https://glue.mysprykershop.com'; -``` - -
    -
    - -#### Allow CORS requests to any domain -Adjust `config/Shared/config_default.php`: - -
    -config/Shared/config_default.php - -```bash -$config[GlueApplicationConstants::GLUE_APPLICATION_CORS_ALLOW_ORIGIN] = '*'; -``` - -
    -
    - -{% info_block warningBox “Verification” %} - -To make sure the CORS headers are set up correctly, send an `OPTIONS` request to any valid GLUE resource with Origin header `https://glue.mysprykershop.com/` and see the correct JSON response:
    • Verify that the access-control-allow-origin header exists and is the same as set in config
    • Verify that the access-control-allow-methods header exists and contains all available methods
    • Make POST, PATCH or DELETE request (can choose any of available one -{% endinfo_block %} and verify that response headers are the same
    ) - -{% info_block infoBox %} -
    • When the `GlueApplicationConfig::isEagerRelationshipsLoadingEnabled( -{% endinfo_block %}` option is set to "false", no relationship will be loaded, unless they are explicitly specified in the "included" query parameter (e.g. `/abstract-products?include=abstract-product-prices`).
    • When the `GlueApplicationConfig::isEagerRelationshipsLoadingEnabled()` option is set to "true", all resource relationships will be loaded by default unless you pass empty "include" query parameter (e.g. `/abstract-products?include=`). If you specify needed relationships in the "included" query parameter, only required relationships will be added to response data.
    ) - -### 3) Set Up Transfer Objects -Run the following command to generate transfer objects: - -```bash -console transfer:generate -``` - -{% info_block warningBox “Verification” %} - -Make sure that the following changes have occurred: -{% endinfo_block %} - -| Transfer | Type | Event | Path | -| --- | --- | --- | --- | -| `RestPageOffsetsTransfer` | class | created | `src/Generated/Shared/Transfer/RestPageOffsetsTransfer.php` | -| `RestErrorMessageTransfer` | class | created | `src/Generated/Shared/Transfer/RestErrorMessageTransfer.php` | -| `RestErrorCollectionTransfer` | class | created | `src/Generated/Shared/Transfer/RestErrorCollectionTransfer.php` | -| `RestVersionTransfer` | class | created | `src/Generated/Shared/Transfer/RestVersionTransfer.php` | -| `RestUserTransfer` | class | created | `src/Generated/Shared/Transfer/RestUserTransfer.php` | -| `StoresRestAttributesTransfer` | class | created | `src/Generated/Shared/Transfer/StoresRestAttributesTransfer.php` | -| `StoreCountryRestAttributesTransfer` | class | created | `src/Generated/Shared/Transfer/StoreCountryRestAttributesTransfer.php` | -| `StoreRegionRestAttributesTransfer` | class | created | `src/Generated/Shared/Transfer/StoreRegionRestAttributesTransfer.php` | -| `StoreLocaleRestAttributesTransfer` | class | created | `src/Generated/Shared/Transfer/StoreLocaleRestAttributesTransfer.php` | -| `StoreCurrencyRestAttributesTransfer` | class | created | `src/Generated/Shared/Transfer/StoreCurrencyRestAttributesTransfer.php` | - -### 4) Set Up Behavior -Activate the following plugins: - -| Plugin | Specification | Prerequisites | Namespace | -| --- | --- | --- | --- | -| `GlueResourceBuilderService` | Registers the resource builder service in Glue Application. | None | `Spryker\Glue\GlueApplication\Plugin\Rest\ServiceProvider` | -| `GlueApplicationServiceProvider` | Registers the pimple plugin, the controller resolver and configures the debug mode in Glue Application. | None | `Spryker\Glue\GlueApplication\Plugin\Rest\ServiceProvider` | -| `SessionServiceProvider` | Registers session services in Glue Application. | None | `Silex\Provider` | -| `ServiceControllerServiceProvider` | Registers the controller resolver service in Glue Application. | None | `Silex\Provider` | -| `GlueServiceProviderPlugin` | Registers the `onKernelController` event listeners in Glue Application. | None | `Spryker\Glue\GlueApplication\Plugin\Rest` | -| `GlueRoutingServiceProvider` | Registers the URL matcher and router services in Glue Application. | None | `Spryker\Glue\GlueApplication\Plugin\Rest\ServiceProvider` | -| `SetStoreCurrentLocaleBeforeActionPlugin` | Sets a locale for the whole current store. | None | `Spryker\Glue\GlueApplication\Plugin\Rest\SetStoreCurrentLocaleBeforeActionPlugin` | -| `EntityTagFormatResponseHeadersPlugin` | Adds the ETag header to response if applicable. | None | `Spryker\Glue\EntityTagsRestApi\Plugin\GlueApplication\EntityTagFormatResponseHeadersPlugin` | -| `EntityTagRestRequestValidatorPlugin` | Verifies that the `If-Match` header is equal to entity tag. | None | `Spryker\Glue\EntityTagsRestApi\Plugin\GlueApplication\EntityTagRestRequestValidatorPlugin` | -| `StoresResourceRoutePlugin` | Registers the `stores` resource. | None | `Spryker\Glue\StoresRestApi\Plugin` | - -
    -src/Pyz/Glue/GlueApplication/Bootstrap/GlueBootstrap.php - -```php -application - ->register(new GlueResourceBuilderService()) - ->register(new GlueApplicationServiceProvider()) - ->register(new SessionServiceProvider()) - ->register(new ServiceControllerServiceProvider()) - ->register(new GlueServiceProviderPlugin()) - ->register(new GlueRoutingServiceProvider()); - } -} -``` - -
    -
    - -Create a new entry point for Glue Application: - -
    -public/Glue/index.php - -```php -initialize(); - -$bootstrap = new GlueBootstrap(); -$bootstrap - ->boot() - ->run(); -``` - -
    -
    - -#### Configure web server -Create Nginx VHOST configuration: - -
    -/etc/nginx/sites-enabled/DE_development_glue - -```php -server { - # Listener for production/staging - requires external LoadBalancer directing traffic to this port - listen 10001; - - # Listener for testing/development - one host only, doesn't require external LoadBalancer - listen 80; - - server_name ~^glue\\..+\\.com$; - - keepalive_timeout 0; - access_log /data/logs/development/glue-access.log extended; - - # entry point for Glue Application - root /data/shop/development/current/public/Glue; - - set $application_env development; - # Binding store - set $application_store DE; - include "spryker/zed.conf"; -} -``` - -
    -
    - -Update hosts configuration by adding the following line (replace IP with your server's IP address): - -
    -/etc/hosts - -``` -ip glue.mysprykershop.com -``` - -
    -
    - -{% info_block warningBox “Verification” %} - -If everything is set up correctly, you should be able to access https://glue.mysprykershop.com and get a correct JSON response as follows: -{% endinfo_block %} - -
    -Default JSON Response - -```json -{ - "errors": [ - { - "status": 404, - "detail": "Not Found" - } - ] -} -``` - -
    -
    - -
    -\Pyz\Glue\GlueApplication\GlueApplicationDependencyProvider.php - -```php - -
    - -{% info_block infoBox "Hint" %} -Use constant of resource name instead of plain string. -{% endinfo_block %} - -
    -src/Pyz/Glue/EntityTagsRestApi/EntityTagsRestApiConfig.php - -```php - -
    - -{% info_block warningBox “Verification” %} - -If everything is set up correctly, a request to https://glue.mysprykershop.com with the header `[{"key":"Accept-Language","value":"de_DE, de;q=0.9"}]` should result in a response that contains the content-language header set to de_DE. -{% endinfo_block %} - -{% info_block warningBox “Verification” %} - -Send a GET request to `https://glue.mysprykershop.com/{% raw %}{{{% endraw %}RESOURCE_NAME{% raw %}}}{% endraw %}/{% raw %}{{{% endraw %}identifier{% raw %}}}{% endraw %}`. Make sure that the response contains the 'ETag' header.
    Prepare a PATCH request to `https://glue.mysprykershop.com/{% raw %}{{{% endraw %}RESOURCE_NAME{% raw %}}}{% endraw %}/{% raw %}{{{% endraw %}identitifer{% raw %}}}{% endraw %}`.
    Add the 'If-Match' header with the value of ETag from the GET response header.
    Add the request body. -{% endinfo_block %} - -```json -{ - "data": { - "type": "RESOURCE_NAME", - "attributes": { - "name": "{% raw %}{{{% endraw %}new_name{% raw %}}}{% endraw %}" - } - } -} -``` - -{% info_block warningBox “Verification” %} - -Send a request with the specified header and body.
    Make sure that the returned resource contains updated 'ETag'. -{% endinfo_block %} - -{% info_block warningBox “Verification” %} - -Send a GET request to `https://glue.mysprykershop.com/{% raw %}{{{% endraw %}RESOURCE_NAME{% raw %}}}{% endraw %}/{% raw %}{{{% endraw %}identifier{% raw %}}}{% endraw %}`.
    Make sure that the response contains the 'ETag' header.
    Prepare a PATCH request to `https://glue.mysprykershop.com/{% raw %}{{{% endraw %}RESOURCE_NAME{% raw %}}}{% endraw %}/{% raw %}{{{% endraw %}identifier{% raw %}}}{% endraw %}`.
    Add the 'If-Match' header with some random value.
    Add a request body. -{% endinfo_block %} - -```json -{ - "data": { - "type": "RESOURCE_NAME", - "attributes": { - "name": "{% raw %}{{{% endraw %}new_name{% raw %}}}{% endraw %}" - } - } -} -``` - -Send a request with the specified header and body. - -Make sure that the response contains the ETag validation error. - -{% info_block warningBox “Verification” %} - -Make sure that the following endpoint is available:
    http://mysprykershop.com/stores -{% endinfo_block %} - diff --git a/docs/scos/dev/feature-integration-guides/202005.0/glue-api/glue-api-installation-and-configuration.md b/docs/scos/dev/feature-integration-guides/202005.0/glue-api/glue-api-installation-and-configuration.md deleted file mode 100644 index 60af74eb598..00000000000 --- a/docs/scos/dev/feature-integration-guides/202005.0/glue-api/glue-api-installation-and-configuration.md +++ /dev/null @@ -1,722 +0,0 @@ ---- -title: Glue API Installation and Configuration -description: This article describes the process of installing and enabling the GLUE API infrastructure and explains the details of integrating the REST API resources. -last_updated: Jul 9, 2020 -template: feature-integration-guide-template -originalLink: https://documentation.spryker.com/v5/docs/glue-api-installation-and-configuration -originalArticleId: 2ffc5982-2e8f-40ab-b3f9-fff60fb655a0 -redirect_from: - - /v5/docs/glue-api-installation-and-configuration - - /v5/docs/en/glue-api-installation-and-configuration ---- - -Functionally, Spryker API can be split into 2 parts: API infrastructure (GLUE) and feature modules. The infrastructure provides the general functionality of the API layer, while each feature module implements a specific resource or resource relation. - -To integrate GLUE API in your project, you need to: -* Install GLUE -* Enable GLUE - - -## 1. Installing GLUE - -GLUE infrastructure is shipped with the following modules: - -| Module |Description | -| --- | --- | -| [GlueApplication](https://github.com/spryker/glue-application) | Provides API infrastructure for Spryker features.| -| [GlueApplicationExtension](https://github.com/spryker/glue-application-extension) |Provides extension point/plugin interfaces for the Glue Application module. | -| [AuthRestApi](https://github.com/spryker/auth-rest-api) (optional)| Provides API endpoints to obtain an authentication token to use for subsequent requests. | - -To install it, you need to do the following: -{% info_block warningBox "Note" %} -Spryker Shop Suite contains GLUE out of the box. If your project has the latest Shop Suite master merged, you can proceed directly to step 2. Enable GLUE. -{% endinfo_block %} - -1. Install the necessary modules using composer: - - ```yaml - composer update "spryker/*" "spryker-shop/*" --update-with-dependencies - composer require spryker/glue-application --update-with-dependencies - ``` - - 2. Add a Front Controller for GLUE: - * In the directory where your code is installed, locate directory public and create subdirectory Glue in it. - * Create file index.php in the Glue directory with the following content: - -```php -initialize(); - -$bootstrap = new GlueBootstrap(); -$bootstrap - ->boot() - ->run(); -``` - -3. Create GLUE application bootstrap: - * In the `src/Pyz` directory of your Spryker code installation, create folder Glue, then create subfolder `GlueApplication/Bootstrap` in it. - * In the GlueApplication/Bootstrap folder, create file GlueBootstrap.php with the following content: - -```php -'; -$config[GlueApplicationConstants::GLUE_APPLICATION_REST_DEBUG] = false; -``` -where **** is the URL domain you want to use for GLUE. If you want to use the default domain of the Spryker shop, you can leave it empty. -{% info_block infoBox "Tip" %} -If you want to enable GLUE application debugging, set the `GLUE_APPLICATION_REST_DEBUG` variable to true. -{% endinfo_block %} -6. Enable customer authentication via OAuth tokens (optional) - -GLUE provides the possibility to authenticate customer users with the help of OAuth tokens. If you are going to use customer authentication, you will also need to perform the following additional steps: - -* Install the `AuthRestApi` and `OauthCustomerConnector` modules: -```yaml -composer require spryker/auth-rest-api spryker/oauth-customer-connector --update-with-dependencies -``` - -* Add OAuth plugins to the GLUE dependency provider. To do this, open file `src/Pyz/GlueApplication/GlueApplicationDependencyProvider.php` and make the following changes: -Add use closes for the required OAuth plugins: -```php -... -namespace Pyz\Glue\GlueApplication; - -use Spryker\Glue\AuthRestApi\Plugin\AccessTokensResourceRoutePlugin; -use Spryker\Glue\AuthRestApi\Plugin\AccessTokenValidatorPlugin; -use Spryker\Glue\AuthRestApi\Plugin\FormatAuthenticationErrorResponseHeadersPlugin; -use Spryker\Glue\AuthRestApi\Plugin\RefreshTokensResourceRoutePlugin;... -``` -Add OAuth resource plugins: -```php -protected function getResourceRoutePlugins(): array -{ - return [ - new AccessTokensResourceRoutePlugin(), - new RefreshTokensResourceRoutePlugin(), - ]; -} -``` -Add token validation plugin: -```php -protected function getValidateRestRequestPlugins(): array -{ - return [ - new AccessTokenValidatorPlugin(), - ]; -} -``` -Add error response plugin: -```php -protected function getFormatResponseHeadersPlugins(): array -{ - return [ - new FormatAuthenticationErrorResponseHeadersPlugin(), - ]; -} -``` - -* Add OAuth dependency provider. To do this, create file `Pyz/Zed/Oauth/OauthDependencyProvider.php` as follows: -```php - 2. Enabling GLUE -To be able to use GLUE in your project, you need to configure a Nginx host to serve REST API requests: - -**1. Create Nginx VHOST configuration** - -```yaml -sudo nano /etc/nginx/sites-enabled/DE_development_glue -``` -In the _nano_ console that opens, paste the following: -```php -server { - # Listener for production/staging - requires external LoadBalancer directing traffic to this port - listen 10001; - - # Listener for testing/development - one host only, doesn't require external LoadBalancer - listen 80; - - server_name ~^glue\\.de\\..+\\.local$; - - keepalive_timeout 0; - access_log /data/logs/development/glue-access.log extended; - - root /data/shop/development/current/public/Glue; - - set $application_env development; - set $application_store DE; - include "spryker/zed.conf"; -} -``` -Restart nginx -```yaml -sudo /etc/init.d/nginx restart -``` -**2. Change the machine hosts configuration** -```yaml -sudo nano /etc/hosts -``` -add the following line to the end of the file: -``` -ip glue.de.project-name.local -``` -After performing this change, you should be able to access `https://glue.mysprykershop.com` with a 404 error and JSON response indicating that resource is not found. - -If you are running your project in the Spryker VM, you also need to make changes to the Vagrant file of the virtual machine. To do so: - -1. Open file `~/.vagrant.d/boxes/devvm[version]/0/virtualbox/include/_Vagrantfile`, where _[version]_ is the VM version. On Windows, you can find the `.vagrant.d` folder in your user profile folder. -2. Find the following line: -```yaml -HOSTS.push [ "www#{host_suffix}.#{store}.#{domain}", "zed#{host_suffix}.#{store}.#{domain}",] -``` -3. Change it as follows: -```bash -HOSTS.push [ "www#{host_suffix}.#{store}.#{domain}", "glue#{host_suffix}.#{store}.#{domain}", "zed#{host_suffix}.#{store}.#{domain}",] -``` -**3. Set correct OAuth key permissions** - -If you are using the OAuth module for user authentication, change permissions for the OAuth keys: -```yaml -chmod 660 config/Zed/dev_only_public.key -chmod 660 config/Zed/dev_only_private.key -``` -## Integrate REST API resources - -After installing and enabling GLUE, you can integrate various REST API resources with it. It is not required to integrate all modules for REST API to work. You can integrate only the modules you need. - -### Login API -Provides the possibility to authenticate customer users. -The API is provided by the following module: -|Module|Description| -|---|---| -|[AuthRestApi](https://github.com/spryker/auth-rest-api)|Provides API endpoints to obtain an authentication token to use for subsequent requests.| -Installation steps: see **1.6. Enable customer authentication via OAuth tokens**. - -### Registration API -Provides the possibility to register new customers. -The API is provided by the following module: -|Module|Description| -|---|---| -|[CustomersRestApi](https://github.com/spryker/customers-rest-api)|Provides API endpoints to manage customers.| - -Installation steps: -1. Install the module using Composer: -```yaml -composer require spryker/customers-rest-api --update-with-dependencies -``` -2. Add a resource route plugin to `/Pyz/Glue/GlueApplication/GlueApplicationDependencyProvider.php::getResourceRoutePlugins()`: -```php -protected function getResourceRoutePlugins(): array - { - return [ - ... - new CustomersResourceRoutePlugin(), - ]; - } -``` -3. Run the following command: -```yaml -console transfer:generate -``` - -### Products API -Provides endpoints to retrieve information about products. -The API is provided by the following modules: - - |Module |DescriptionEndpoints Provided| - |---|---|---| -|[ProductsRestApi](https://github.com/spryker/products-rest-api)|Provides REST access to products.|/`abstract-products`
    /`concrete-products`| -|[ProductAvailabilitiesRestApi](https://github.com/spryker/product-availabilities-rest-api)|Provides API endpoints to get abstract and concrete product availability.|`/abstract-products/{% raw %}{{{% endraw %}sku{% raw %}}}{% endraw %}/abstract-product-availabilities`
    /`concrete-products/{% raw %}{{{% endraw %}sku{% raw %}}}{% endraw %}/concrete-product-availabilities`| -|[ProductsProductAvailabilitiesResourceRelationship](https://github.com/spryker/products-product-availabilities-resource-relationship)|Provides relationship between products (abstract and concrete) and product availabilities resources.|-| -|[ProductPricesRestApi](https://github.com/spryker/product-prices-rest-api)|Provides API endpoints to retrieve abstract and concrete product prices.|`/abstract-products/{% raw %}{{{% endraw %}sku{% raw %}}}{% endraw %}/abstract-product-prices`
    /`concrete-products/{% raw %}{{{% endraw %}sku{% raw %}}}{% endraw %}/concrete-product-prices`| -|[ProductsProductPricesResourceRelationship](https://github.com/spryker/products-product-prices-resource-relationship)|Provides relationship between products (abstract and concrete) and product prices resources.|-| -|[ProductTaxSetsRestApi](https://github.com/spryker/product-tax-sets-rest-api)|Provides API endpoints to retrieve product tax sets.|`/abstract-products/{% raw %}{{{% endraw %}SKU{% raw %}}}{% endraw %}/product-tax-sets`| -|[ProductsProductTaxSetsResourceRelationship](https://github.com/spryker/products-product-tax-sets-resource-relationship)|Provides relationship between abstract products and tax sets resources.|-| -|[ProductImageSetsRestApi](https://github.com/spryker/product-prices-rest-api)|Provides API endpoints to retrieve product image sets.|`/abstract-products/{% raw %}{{{% endraw %}sku{% raw %}}}{% endraw %}/abstract-product-image-sets`
    `/concrete-products/{% raw %}{{{% endraw %}sku{% raw %}}}{% endraw %}/concrete-product-image-sets`| - -You can chose whether to install all modules of the API to retrieve full Products API functionality, or install any of the modules individually to get only the endpoints you need. -{% info_block infoBox "Relationship Modules" %} -Relationship modules provide relationship between products and related entities (e.g. between products and the tax sets available for them). This means that, when a module is installed, a request for information on a certain product will also return information on the related resource by default. If the module is not installed, you need to query the related resource explicitly. In other words, if the `ProductsProductTaxSetsResourceRelationship` module is installed, a query for an abstract product will also return full data of the tax sets related to them. If it is not installed, you will need to query the `/abstract-products/{% raw %}{{{% endraw %}SKU{% raw %}}}{% endraw %}/product-tax-sets` explicitly. -{% endinfo_block %} - -Installation steps: -**`ProductsRestApi`**: -1. Install the module using Composer: -```yaml -composer require spryker/products-rest-api --update-with-dependencies -``` - -2. Add resource route plugins to `/Pyz/Glue/GlueApplication/GlueApplicationDependencyProvider.php::getResourceRoutePlugins()`: -```php -protected function getResourceRoutePlugins(): array - { - return [ - ... - new AbstractProductsResourceRoutePlugin(), - new ConcreteProductsResourceRoutePlugin(), - ]; - } - ``` -3. Run the following command: - ```bash -console transfer:generate - ``` -**`ProductAvailabilitiesRestApi`**: -1. Install the module using Composer: - ```bash -composer require spryker/product-availabilities-rest-api --update-with-dependencies - ``` -2. Add resource route plugins to `/Pyz/Glue/GlueApplication/GlueApplicationDependencyProvider.php::getResourceRoutePlugins()`: -```php -protected function getResourceRoutePlugins(): array - { - return [ - ... - new AbstractProductAvailabilitiesRoutePlugin(), // Abstract product avaialbilities - new ConcreteProductAvailabilitiesRoutePlugin(), // Concrete product avaialbilities - ]; - } - ``` -3. Run the following command: -```bash -console transfer:generate -``` -**`ProductsProductAvailabilitiesResourceRelationship`**: -1. Install the module using Composer: -```bash -composer require spryker/products-product-availabilities-resource-relationship --update-with-dependencies -``` -2. Add resource route plugins to `/Pyz/Glue/GlueApplication/GlueApplicationDependencyProvider.php::getResourceRelationshipPlugins()`: -```php -protected function getResourceRelationshipPlugins( - ResourceRelationshipCollectionInterface $resourceRelationshipCollection - ): ResourceRelationshipCollectionInterface - { - ... - $resourceRelationshipCollection->addRelationship( - ProductsRestApiConfig::RESOURCE_ABSTRACT_PRODUCTS, - new ProductsProductAvailabilitiesResourceRelationshipPlugin() - ); - - return $resourceRelationshipCollection; - } - ``` - -### Stores API -Provides API endpoints to retrieve current store configuration. -The API is provided by the following module: -|Modules|Description| -|---|---| -|[StoresRestApi](https://github.com/spryker/stores-rest-api)|Provides REST API endpoints to stores.| -Installation steps: -1. Install the module using Composer: -```bash -composer require spryker/stores-rest-api --update-with-dependencies -``` -2. Add resource route plugin to `/Pyz/Glue/GlueApplication/GlueApplicationDependencyProvider.php::getResourceRoutePlugins()`: -```php -protected function getResourceRoutePlugins(): array - { - return [ - ... - new StoresResourceRoutePlugin(), - ]; - } -``` -3. Run the following command: -```bash -console transfer:generate -``` - -### Search API -Provides the possibility to perform searches and retrieve search suggestions via the REST API. -The API is provided by the following module: -|Modules|Description| -|---|---| -|[CatalogSearchRestApi](https://github.com/spryker/catalog-search-rest-api)|Provides REST API endpoints to search products and search suggestions.| - -Installation steps: -1. Install the module using Composer: -```yaml -composer require spryker/catalog-search-rest-api --update-with-dependencies -``` -2. Add plugins for catalog search and search suggestions to `/Pyz/Glue/GlueApplication/GlueApplicationDependencyProvider.php::getResourceRoutePlugins()`: -```php -protected function getResourceRoutePlugins(): array - { - return [ - ... - new SearchResourceRoutePlugin(), - new SuggestionsResourceRoutePlugin(), - ]; - } -``` -3. Run the following command: -```yaml -console transfer:generate -``` -4. If your store also provides the Products API, you need to add relationship between the Search and Products APIs: -```yaml -composer require spryker/catalog-search-products-resource-relationship --update-with-dependencies -``` -After this, add the products resource relation plugins to `/Pyz/Glue/GlueApplication/GlueApplicationDependencyProvider.php::getResourceRelationshipPlugins()`: -```php -protected function getResourceRelationshipPlugins( - ResourceRelationshipCollectionInterface $resourceRelationshipCollection - ): ResourceRelationshipCollectionInterface { - $resourceRelationshipCollection->addRelationship( - CatalogSearchRestApiConfig::RESOURCE_CATALOG_SEARCH, - new CatalogSearchAbstractProductsResourceRelationshipPlugin() - ); - $resourceRelationshipCollection->addRelationship( - CatalogSearchRestApiConfig::RESOURCE_CATALOG_SEARCH_SUGGESTIONS, - new CatalogSearchSuggestionsAbstractProductsResourceRelationshipPlugin() - ); - - return $resourceRelationshipCollection; - } -``` - -### Category API -Provides the possibility to retrieve the category tree and category nodes. -The API is provided by the following module: -|Modules|Description| -|---|---| -|[CategoriesRestApi](https://github.com/spryker/categories-rest-api)|Provides REST API endpoints to fetch category tree and category nodes by node ID.| -Installation steps: -1. Install the module using Composer: -```yaml -composer require spryker/categories-rest-api --update-with-dependencies -``` -2. Add plugins for category-trees and category-nodes resources to `/Pyz/Glue/GlueApplication/GlueApplicationDependencyProvider.php::getResourceRoutePlugins()`: -```php -protected function getResourceRoutePlugins(): array - { - return [ - ... - new CategoriesResourceRoutePlugin(), - new CategoryResourceRoutePlugin(), - ]; - } - ``` -3. Run the following command: -```yaml -console transfer:generate -``` - -### Carts API -Provides the possibility to manage customer carts and cart items. -The API is provided by the following module: -|Modules|Description| -|---|---| -|[CartsRestApi](https://github.com/spryker/carts-rest-api)|Provides REST API endpoints to create, get, delete carts for registered customers (using persistent storage), as well as manage cart items.| -Installation steps: -1. Install the module using Composer: -```yaml -composer require spryker/cart-items-products-relationship:"^1.0.0" spryker/carts-rest-api:"^1.0.0" --update-with-dependencies -``` -2. Add carts and cart items resource route plugin to `/Pyz/Glue/GlueApplication/GlueApplicationDependencyProvider.php::getResourceRoutePlugins()`: -```php -protected function getResourceRoutePlugins(): array - { - return [ - ... - new CartsResourceRoutePlugin(), - new CartItemsResourceRoutePlugin(), - ]; - } - ``` -3. Run Propel install to add the UUID functionality: -```yaml -console propel:install -``` -4. Generate Propel transfer objects: -```yaml -console transfer:generate -``` -5. Run the following command to update all existing customers carts with a UUID value. -```yaml -console quote:uuid:generate -``` - -### Product Labels API -Provides the possibility to retrieve product labels. -The API is provided by the following module: -|Modules|Description|Endpoints Provided| -|---|---|---| -|[ProductLabelsRestApi](https://github.com/spryker/product-labels-rest-api)|Provides REST API endpoints for product labels.|`/product-labels/{% raw %}{{{% endraw %}label-id{% raw %}}}{% endraw %}`| - -Installation steps: -1. Install the module using Composer: -```yaml -composer require spryker/product-labels-rest-api --update-with-dependencies -``` -2. Add plugin declaration to `/Pyz/Glue/GlueApplication/GlueApplicationDependencyProvider.php:getResourceRoutePlugins()`: -```php -protected function getResourceRoutePlugins(): array - { - return [ - ..., - new ProductLabelsResourceRoutePlugin(), - ..., - ``` -3. Run the following command: -```yaml -console transfer:generate -``` - -**Retrieving Labels for Products** -Out of the box, the API provides the possibility to access labels by their ID. If you also want to retrieve labels assigned to a product together with product information, you need to install an additional relationship module: -1. Install the module using Composer: -```yaml -composer require spryker/product-labels-rest-api --update-with-dependencies -``` -2. Add the products resource relation plugin to `/Pyz/Glue/GlueApplication/GlueApplicationDependencyProvider.php::getResourceRelationshipPlugins()`: -```php -protected function getResourceRelationshipPlugins( - ResourceRelationshipCollectionInterface $resourceRelationshipCollection - ): ResourceRelationshipCollectionInterface { - $resourceRelationshipCollection->addRelationship( - ProductsRestApiConfig::RESOURCE_ABSTRACT_PRODUCTS, - new ProductLabelsRelationshipByResourceIdPlugin() - ); - - return $resourceRelationshipCollection; - } -``` -3. Run the following command: -```yaml -console transfer:generate -``` - -### Checkout API -Provides the possibility to place orders and retrieve checkout information. -The API is provided by the following module: -|Modules|Description|Endpoints Provided| -|---|---|---| -|CheckoutRestApi|||  -Installation steps: -**Placing an Order** -1. Install the module using Composer: -```php -composer require spryker/product-labels-rest-api --update-with-dependencies -``` -2. Add plugin declaration to `src/Pyz/Glue/GlueApplication/GlueApplicationDependencyProvider.php:getResourceRoutePlugins()`: -```php -protected function getResourceRoutePlugins(): array - { - return [ - ..., - new CheckoutResourcePlugin(), - ..., -``` -3. Add relationship to the order to `src/Pyz/Glue/GlueApplication/GlueApplicationDependencyProvider.php:getResourceRelationshipPlugins()`: -```php -protected function getResourceRelationshipPlugins( - ResourceRelationshipCollectionInterface $resourceRelationshipCollection - ): ResourceRelationshipCollectionInterface { - ... - $resourceRelationshipCollection->addRelationship( - CheckoutRestApiConfig::RESOURCE_CHECKOUT, - new OrderRelationshipByOrderReferencePlugin() - ); - ... -``` -**Retrieving Checkout Data** -1. Install the module using Composer: -```yaml -composer require spryker/product-labels-rest-api --update-with-dependencies -``` -2. Add plugin declaration to `src/Pyz/Glue/GlueApplication/GlueApplicationDependencyProvider.php:getResourceRoutePlugins()`: -```php -protected function getResourceRoutePlugins(): array - { - return [ - ..., - new CheckoutDataResourcePlugin(), - ..., -``` - -### Customers API -Provides the possibility to retrieve product labels. -The API is provided by the following module: -|Modules|Description|Endpoints Provided| -|---|---|---| -|CustomersRestApi|Provides endpoints that allow you to manage customers.|/customers
    /customers/{% raw %}{{{% endraw %}customer_id{% raw %}}}{% endraw %}
    /customers/{% raw %}{{{% endraw %}customer_id{% raw %}}}{% endraw %}/addresses
    /customers/{% raw %}{{{% endraw %}customer_id{% raw %}}}{% endraw %}/addresses/{% raw %}{{{% endraw %}address_id{% raw %}}}{% endraw %}| -Installation steps: -1. Install the module using Composer: -```yaml -composer require spryker/customers-rest-api --update-with-dependencies -composer require spryker/wishlists-rest-api --update-with-dependencies -``` -2. Add plugin declaration to `/Pyz/Glue/GlueApplication/GlueApplicationDependencyProvider.php::getResourceRoutePlugins()`: -```php -protected function getResourceRoutePlugins(): array -{ - return [ - ... - new CustomersResourceRoutePlugin(), - new AddressesResourceRoutePlugin(), - ]; -} -``` -3. Add `CustomersToAddressesRelationshipPlugin` and `WishlistRelationshipByResourceIdPlugin` to `/Pyz/Glue/GlueApplication/GlueApplicationDependencyProvider.php::getResourceRelationshipPlugins()`: -```php -protected function getResourceRelationshipPlugins( - ResourceRelationshipCollectionInterface $resourceRelationshipCollection -): ResourceRelationshipCollectionInterface { - $resourceRelationshipCollection->addRelationship( - CustomersRestApiConfig::RESOURCE_CUSTOMERS, - new CustomersToAddressesRelationshipPlugin() - ); - $resourceRelationshipCollection->addRelationship( - CustomersRestApiConfig::RESOURCE_CUSTOMERS, - new WishlistRelationshipByResourceIdPlugin() - ); - return $resourceRelationshipCollection; -} -``` -4. Run the following command: -```yaml -console transfer:generate -console propel:install -console customer-addresses:uuid:generate -``` - diff --git a/docs/scos/dev/feature-integration-guides/202005.0/glue-api/glue-api-measurement-units-feature-integration.md b/docs/scos/dev/feature-integration-guides/202005.0/glue-api/glue-api-measurement-units-feature-integration.md deleted file mode 100644 index 37e3996aa58..00000000000 --- a/docs/scos/dev/feature-integration-guides/202005.0/glue-api/glue-api-measurement-units-feature-integration.md +++ /dev/null @@ -1,702 +0,0 @@ ---- -title: Glue API - Measurement Units feature integration -description: The procedure of integrating Measurement Units Feature API into a Spryker project. -last_updated: Sep 14, 2020 -template: feature-integration-guide-template -originalLink: https://documentation.spryker.com/v5/docs/glue-api-measurement-units-feature-integration -originalArticleId: f20197d8-afcf-499d-8831-819f0688cc0c -redirect_from: - - /v5/docs/glue-api-measurement-units-feature-integration - - /v5/docs/en/glue-api-measurement-units-feature-integration ---- - -Follow the steps below to install Measurement units feature API. - -## Prerequisites -To start the feature integration, overview and install the necessary features: - -| Name | Version |Link | -| --- | --- | --- | -| Spryker Core | master | [Glue API: Spryker Core feature integration](/docs/scos/dev/feature-integration-guides/{{page.version}}/glue-api/glue-api-spryker-core-feature-integration.html) | -| Product Measurement Units | master | [Product Measurement Units feature integration](/docs/scos/dev/feature-integration-guides/{{page.version}}/product-measurement-unit-feature-integration.html) | - -## 1) Install the required modules using Composer -Run the following command to install the required modules: - -```bash -composer require spryker/product-measurement-units-rest-api:"^1.0.0" --update-with-dependencies -``` - -{% info_block warningBox "Verification" %} - -Make sure that the following modules have been installed: - -| Module | Expected Directory | -| --- | --- | -| `ProductMeasurementUnitsRestApi` | `vendor/spryker/product-measurement-units-rest-api` | - -{% endinfo_block %} - - - - - -## 2) Set up Database Schema and Transfer Objects - -Run the following command to generate the transfer changes: - -```bash -console transfer:generate -console propel:install -console transfer:generate -``` - -{% info_block warningBox "Verification" %} - -Make sure that `SpyProductMeasurementUnitStorage` and `SpyProductConcreteStorage` have been extended with synchronization behavior, namely with the methods: - - -| Entity | Type | Event | Path | Methods | -| --- | --- | --- | --- | --- | -| SpyProductMeasurementUnitStorage | class | extended | src/Orm/Zed/ProductMeasurementUnitStorage/Persistence/Base/SpyProductMeasurementUnitStorage | syncPublishedMessageForMappings(), syncUnpublishedMessageForMappings() | -| SpyProductConcreteStorage | class | extended | src/Orm/Zed/ProductStorage/Persistence/Base/SpyProductConcreteStorage | syncPublishedMessageForMappings(), syncUnpublishedMessageForMappings() | - - - -{% endinfo_block %} - -{% info_block warningBox "Verification" %} - -Make sure that the following changes have occurred: - - -| Transfer | Type | Event | Path | -| --- | --- | --- | --- | -| RestProductMeasurementUnitsAttributesTransfer | class | created | src/Generated/Shared/Transfer/RestProductMeasurementUnitsAttributesTransfer | -| RestSalesUnitsAttributesTransfer | class | created | src/Generated/Shared/Transfer/RestSalesUnitsAttributesTransfer | -| RestCartItemsSalesUnitAttributesTransfer | class | created | src/Generated/Shared/Transfer/RestCartItemsSalesUnitAttributesTransfer | -| RestOrdersProductMeasurementUnitsAttributesTransfer | class | created | src/Generated/Shared/Transfer/RestOrdersProductMeasurementUnitsAttributesTransfer | -| RestOrdersSalesUnitAttributesTransfer | class | created | src/Generated/Shared/Transfer/RestOrdersSalesUnitAttributesTransfer | -| RestCartItemsAttributesTransfer.salesUnit | property | added | src/Generated/Shared/Transfer/RestCartItemsAttributesTransfer | -| RestItemsAttributesTransfer.salesUnit | property | added | src/Generated/Shared/Transfer/RestItemsAttributesTransfer | -| RestItemsAttributesTransfer.sku | property | added | src/Generated/Shared/Transfer/RestItemsAttributesTransfer | -| RestOrderItemsAttributesTransfer.salesUnit | property | added | src/Generated/Shared/Transfer/RestOrderItemsAttributesTransfer | - - - -{% endinfo_block %} - - - - - - -## 3) Set Up Behavior -Set up the following behaviors. - -### Re-export Data to Storage -Run the following commands to reload abstract and concrete product data to the Storage: - -```bash -console event:trigger -r product_measurement_unit -console event:trigger -r product_concrete -``` - -{% info_block warningBox "Verification" %} - -Make sure that the following Redis keys exist and there is data in them: - -* `kv:product_measurement_unit:code:{% raw %}{{{% endraw %}product_measurement_unit_code{% raw %}}}{% endraw %}` - -* `kv:product_concrete:{% raw %}{{{% endraw %}locale_name{% raw %}}}{% endraw %}:sku:{% raw %}{{{% endraw %}sku_product_concrete{% raw %}}}{% endraw %}` - -{% endinfo_block %} - -### Enable Resources and Relationships -Activate the following plugins: - - -| Plugin | Specification | Prerequisites | Namespace | -| --- | --- | --- | --- | -| ProductMeasurementUnitsResourceRoutePlugin | Registers the `product-measurement-units` resource. | None | Spryker\Glue\ProductMeasurementUnitsApi\Plugin | -| SalesUnitsResourceRoutePlugin | Registers the `sales-units` resource. | None | Spryker\Glue\ProductMeasurementUnitsApi\Plugin | -| ProductMeasurementUnitsByProductConcreteResourceRelationshipPlugin | Adds the `product-measurement-units` resource as a relationship of the `product-concrete` resource. | None | Spryker\Glue\ProductMeasurementUnitsApi\Plugin\GlueApplication | -| SalesUnitsByProductConcreteResourceRelationshipPlugin | Adds the `sales-units` resource as a relationship of the `product-concrete` resource. | None | Spryker\Glue\ProductMeasurementUnitsApi\Plugin\GlueApplication | -| ProductMeasurementUnitsBySalesUnitResourceRelationshipPlugin | Adds the `product-measurement-units` resource as a relationship of the `sales-units` resource. | None | Spryker\Glue\ProductMeasurementUnitsApi\Plugin\GlueApplication | -| SalesUnitsByCartItemResourceRelationshipPlugin | Adds the `sales-units` resource as relationship of the `item` resource. | None | Spryker\Glue\ProductMeasurementUnitsApi\Plugin\GlueApplication | - - - - - -
    -src/Pyz/Glue/GlueApplication/GlueApplicationDependencyProvider.php - -```php -addRelationship( - ProductsRestApiConfig::RESOURCE_CONCRETE_PRODUCTS, - new ProductMeasurementUnitsByProductConcreteResourceRelationshipPlugin() - ); - $resourceRelationshipCollection->addRelationship( - ProductsRestApiConfig::RESOURCE_CONCRETE_PRODUCTS, - new SalesUnitsByProductConcreteResourceRelationshipPlugin() - ); - $resourceRelationshipCollection->addRelationship( - ProductMeasurementUnitsRestApiConfig::RESOURCE_SALES_UNITS, - new ProductMeasurementUnitsBySalesUnitResourceRelationshipPlugin() - ); - $resourceRelationshipCollection->addRelationship( - CartsRestApiConfig::RESOURCE_CART_ITEMS, - new SalesUnitsByCartItemResourceRelationshipPlugin() - ); - $resourceRelationshipCollection->addRelationship( - CartsRestApiConfig::RESOURCE_GUEST_CARTS_ITEMS, - new SalesUnitsByCartItemResourceRelationshipPlugin() - ); - - return $resourceRelationshipCollection; - } -} -``` - -
    - - -{% info_block warningBox "Verification" %} - -Make sure that the `ProductMeasurementUnitsResourceRoutePlugin` plugin is set up: -1. Send the request `GET https://glue.mysprykershop.com/product-measurement-units/{% raw %}{{{% endraw %}product_measurement_unit_code{% raw %}}}{% endraw %}`. - -2. You should get a valid response, similar to the following: - -```json -{ - "data": { - "type": "product-measurement-units", - "id": "METR", - "attributes": { - "name": "Meter", - "defaultPrecision": 100 - }, - "links": { - "self": "https://glue.mysprykershop.com/product-measurement-units/METR" - } - } -} -``` - - - -{% endinfo_block %} - - - - - - -{% info_block warningBox "Verification" %} - -Make sure that the `SalesUnitsResourceRoutePlugin` and `ProductMeasurementUnitsBySalesUnitResourceRelationshipPlugin` plugins are set up: -1. Send the request `GET https://glue.mysprykershop.com/concrete-products/{% raw %}{{{% endraw %}concrete_product_sku{% raw %}}}{% endraw %}/sales-units?include=product-measurement-units`. - -2. You should get a valid response, similar to the following: - -
    -Response sample - -```json -{ - "data": [ - { - "type": "sales-units", - "id": "5", - "attributes": { - "conversion": 0.30480000000000002, - "precision": 100, - "isDisplayed": true, - "isDefault": true, - "productMeasurementUnitCode": "FOOT" - }, - "links": { - "self": "http://glue.de.suite-nonsplit.local/concrete-products/215_124/sales-units/5" - }, - "relationships": { - "product-measurement-units": { - "data": [ - { - "type": "product-measurement-units", - "id": "FOOT" - } - ] - } - } - } - ], - "links": { - "self": "http://glue.de.suite-nonsplit.local/concrete-products/215_124/sales-units?include=product-measurement-units&XDEBUG_SESSION_START=PHPHSTORM" - }, - "included": [ - { - "type": "product-measurement-units", - "id": "FOOT", - "attributes": { - "name": "Foot", - "defaultPrecision": 100 - }, - "links": { - "self": "http://glue.de.suite-nonsplit.local/product-measurement-units/FOOT" - } - } - ] -} -``` - -
    - - -{% endinfo_block %} - - -{% info_block warningBox "Verification" %} - -Make sure that the `ProductMeasurementUnitsByProductConcreteResourceRelationshipPlugin` and `SalesUnitsByProductConcreteResourceRelationshipPlugin` relationship plugins are set up: -1. Send the request `GET https://glue.mysprykershop.com/concrete-products/{% raw %}{{{% endraw %}concrete_product_sku{% raw %}}}{% endraw %}?include=product-measurement-units,sales-units`. - -2. You should get a valid response, similar to the following: - -
    -Response sample - -```json -{ - "data": { - "type": "concrete-products", - "id": "215_123", - "attributes": { - "sku": "215_123", - "isDiscontinued": false, - "discontinuedNote": null, - "averageRating": null, - "reviewCount": 0, - "name": "ASUS HDMI-HDMI Black", - "description": "HDMI to HDMI High Speed Cable", - "attributes": { - "brand": "ASUS", - "color": "Black", - "packaging_unit": "Item" - }, - "superAttributesDefinition": [ - "color", - "packaging_unit" - ], - "metaTitle": "Asus HDMI - HDMI", - "metaKeywords": "Asus, Cable, HDMI", - "metaDescription": "The perfect cable for your home", - "attributeNames": { - "brand": "Brand", - "color": "Color", - "packaging_unit": "Packaging unit" - } - }, - "links": { - "self": "https://glue.mysprykershop.com/concrete-products/215_123?include=product-measurement-units,sales-units" - }, - "relationships": { - "product-measurement-units": { - "data": [ - { - "type": "product-measurement-units", - "id": "METR" - } - ] - }, - "sales-units": { - "data": [ - { - "type": "sales-units", - "id": "1" - }, - { - "type": "sales-units", - "id": "2" - } - ] - } - } - }, - "included": [ - { - "type": "product-measurement-units", - "id": "METR", - "attributes": { - "name": "Meter", - "defaultPrecision": 100 - }, - "links": { - "self": "https://glue.mysprykershop.com/product-measurement-units/METR" - } - }, - { - "type": "sales-units", - "id": "1", - "attributes": { - "conversion": 1, - "precision": 100, - "isDisplayed": true, - "isDefault": true, - "productMeasurementUnitCode": "METR" - }, - "links": { - "self": "https://glue.mysprykershop.com/concrete-products/215_123/sales-units/1" - }, - "relationships": { - "product-measurement-units": { - "data": [ - { - "type": "product-measurement-units", - "id": "METR" - } - ] - } - } - }, - { - "type": "product-measurement-units", - "id": "CMET", - "attributes": { - "name": "Centimeter", - "defaultPrecision": 10 - }, - "links": { - "self": "https://glue.mysprykershop.com/product-measurement-units/CMET" - } - }, - { - "type": "sales-units", - "id": "2", - "attributes": { - "conversion": 0.01, - "precision": 10, - "isDisplayed": true, - "isDefault": false, - "productMeasurementUnitCode": "CMET" - }, - "links": { - "self": "https://glue.mysprykershop.com/concrete-products/215_123/sales-units/2" - }, - "relationships": { - "product-measurement-units": { - "data": [ - { - "type": "product-measurement-units", - "id": "CMET" - } - ] - } - } - } - ] -} -``` - -
    - - -{% endinfo_block %} - - -{% info_block warningBox "Verification" %} - -Make sure that the `SalesUnitsByCartItemResourceRelationshipPlugin` relationship plugin is set up: -1. Send the request `GET https://glue.mysprykershop.com/carts/{% raw %}{{{% endraw %}cart_uuid{% raw %}}}{% endraw %}?include=items,sales-units`. - -2. You should get a valid response, similar to the following: - -
    -Response sample - -```json -{ - "data": { - "type": "carts", - "id": "1ce91011-8d60-59ef-9fe0-4493ef3628b2", - "attributes": { - "priceMode": "GROSS_MODE", - "currency": "EUR", - "store": "DE", - "name": "My Cart", - "isDefault": true, - "totals": { - "expenseTotal": 0, - "discountTotal": 0, - "taxTotal": 798, - "subtotal": 5000, - "grandTotal": 5000 - }, - "discounts": [] - }, - "links": { - "self": "https://glue.mysprykershop.com/carts/1ce91011-8d60-59ef-9fe0-4493ef3628b2?include=items,sales-units" - }, - "relationships": { - "items": { - "data": [ - { - "type": "items", - "id": "215_124_quantity_sales_unit_id_4_amount_5_sales_unit_id_4" - } - ] - } - } - }, - "included": [ - { - "type": "sales-units", - "id": "4", - "attributes": { - "conversion": 0.01, - "precision": 1, - "isDisplayed": true, - "isDefault": false, - "productMeasurementUnitCode": "CMET" - }, - "links": { - "self": "https://glue.mysprykershop.com/concrete-products/215_124/sales-units/4" - } - }, - { - "type": "items", - "id": "215_124_quantity_sales_unit_id_4_amount_5_sales_unit_id_4", - "attributes": { - "sku": "215_124", - "quantity": 4, - "groupKey": "215_124_quantity_sales_unit_id_4_amount_5_sales_unit_id_4", - "abstractSku": "215", - "amount": "20", - "calculations": { - "unitPrice": 1250, - "sumPrice": 5000, - "taxRate": 19, - "unitNetPrice": 0, - "sumNetPrice": 0, - "unitGrossPrice": 1250, - "sumGrossPrice": 5000, - "unitTaxAmountFullAggregation": 200, - "sumTaxAmountFullAggregation": 798, - "sumSubtotalAggregation": 5000, - "unitSubtotalAggregation": 1250, - "unitProductOptionPriceAggregation": 0, - "sumProductOptionPriceAggregation": 0, - "unitDiscountAmountAggregation": 0, - "sumDiscountAmountAggregation": 0, - "unitDiscountAmountFullAggregation": 0, - "sumDiscountAmountFullAggregation": 0, - "unitPriceToPayAggregation": 1250, - "sumPriceToPayAggregation": 5000 - }, - "salesUnit": { - "id": 4, - "amount": "20" - }, - "selectedProductOptions": [] - }, - "links": { - "self": "https://glue.mysprykershop.com/carts/1ce91011-8d60-59ef-9fe0-4493ef3628b2/items/215_124_quantity_sales_unit_id_4_amount_5_sales_unit_id_4" - }, - "relationships": { - "sales-units": { - "data": [ - { - "type": "sales-units", - "id": "4" - } - ] - } - } - } - ] -} -``` - -
    - - -{% endinfo_block %} - -### Provide Dependencies for the CartsRestApi Module - -Activate the following plugins: - - -| Plugin | Specification | Prerequisites | Namespace | -| --- | --- | --- | --- | -| SalesUnitsRestCartItemsAttributesMapperPlugin | Maps `ItemTransfer::$amountSalesUnit` to `RestItemsAttributesTransfer::$salesUnit`. | None | Spryker\Glue\ProductMeasurementUnitsApi\Plugin\CartsRestApi | -| SalesUnitCartItemExpanderPlugin | Expands `CartItemRequestTransfer` with `amount` and `idProductMeasurementSalesUnit`. | None | Spryker\Glue\ProductMeasurementUnitsApi\Plugin\CartsRestApi | -| SalesUnitCartItemMapperPlugin | Maps `CartItemRequestTransfer::$idProductMeasurementSalesUnit`, `CartItemRequestTransfer::$amount` to `PersistentCartChangeTransfer::$items`. | None | Spryker\Zed\ProductMeasurementUnitsRestApi\Communication\Plugin\CartsRestApi | - - -**src/Pyz/Glue/CartsRestApi/CartsRestApiDependencyProvider.php** - -```php - -src/Pyz/Glue/NavigationsRestApi/NavigationsRestApiConfig.php - -```php - 'fkResourceCategorynode', - 'cms_page' => 'fkResourcePage', - ]; - } -} -``` - -
    - - -{% info_block warningBox “Verification” %} - -The verification for this step can be provided once the resource is provided in the *Set up Behavior* section below. -{% endinfo_block %} - -### 4) Set up Behavior -#### Enable resources and relationships -Activate the following plugin: - -| Plugin | Specification | Prerequisites | Namespace | -| --- | --- | --- | --- | -| `NavigationsResourceRoutePlugin` | Registers the `navigations` resource. | None | `Spryker\Glue\NavigationsRestApi\Plugin\ResourceRoute` | -| `CategoryNodeByResourceIdResourceRelationshipPlugin` | Adds the `category node` resource as a relationship. | None | `\Spryker\Glue\NavigationsCategoryNodesResourceRelationship\Plugin\GlueApplication` | - -
    -src/Pyz/Glue/GlueApplication/GlueApplicationDependencyProvider.php - -```php -addRelationship( - NavigationsRestApiConfig::RESOURCE_NAVIGATIONS, - new CategoryNodeByResourceIdResourceRelationshipPlugin() - ); - - return $resourceRelationshipCollection; - } -} -``` - -
    -
    - -{% info_block warningBox “Verification” %} - -`NavigationsResourceRoutePlugin` is set up correctly if the following endpoint is available: *https://glue.mysprykershop.com/navigations/{navigationId}* -{% endinfo_block %} - -{% info_block warningBox “Verification” %} - -Now, it is possible to verify that the configuration of NavigationsRestApiConfig is done correctly. Perform the "https://glue.mysprykershop.com/navigations/{navigationId}" request and check that each node of the type you set up in the configuration (category and CMS pages in the example -{% endinfo_block %} "resourceId" is filled with the valid foreign key.) - -{% info_block warningBox "your title goes here" %} -Send a request to *https://glue.mysprykershop.com/navigations/MAIN_NAVIGATION?include=category-nodes*.
    Make sure that the response contains `category-nodes` as a relationship and `category-nodes` data included. -{% endinfo_block %} - -
    -https://glue.mysprykershop.com/navigations/MAIN_NAVIGATION?include=category-nodes - -```json -{ - "data": { - "type": "navigations", - "id": "MAIN_NAVIGATION", - "attributes": { - "nodes": [ - { - "resourceId": null, - "nodeType": "label", - "children": [ - { - "resourceId": 6, - "nodeType": "category", - "children": [], - "isActive": true, - "title": "Notebooks", - "url": "/de/computer/notebooks", - "cssClass": null, - "validFrom": null, - "validTo": null - }, - { - "resourceId": 8, - "nodeType": "category", - "children": [], - "isActive": true, - "title": "Tablets", - "url": "/de/computer/tablets", - "cssClass": null, - "validFrom": null, - "validTo": null - }, - { - "resourceId": 12, - "nodeType": "category", - "children": [], - "isActive": true, - "title": "Smartphones", - "url": "/de/telekommunikation-&-navigation/smartphones", - "cssClass": null, - "validFrom": null, - "validTo": null - }, - { - "resourceId": 10, - "nodeType": "category", - "children": [], - "isActive": true, - "title": "Smartwatches", - "url": "/de/intelligente-tragbare-geräte/smartwatches", - "cssClass": null, - "validFrom": null, - "validTo": null - } - ], - "isActive": true, - "title": "Top Kategorien", - "url": null, - "cssClass": null, - "validFrom": null, - "validTo": null - } - ], - "name": "Top Navigation", - "isActive": true - }, - "links": { - "self": "https://glue.mysprykershop.com/navigations/MAIN_NAVIGATION?include=category-nodes" - }, - "relationships": { - "category-nodes": { - "data": [ - { - "type": "category-nodes", - "id": "10" - }, - { - "type": "category-nodes", - "id": "12" - }, - { - "type": "category-nodes", - "id": "6" - }, - { - "type": "category-nodes", - "id": "8" - } - ] - } - } - }, - "included": [ - { - "type": "category-nodes", - "id": "10", - "attributes": { - "nodeId": 10, - "name": "Smartwatches", - "metaTitle": "Smartwatches", - "metaKeywords": "Smartwatches", - "metaDescription": "Smartwatches", - "isActive": true, - "url": "/de/intelligente-tragbare-geräte/smartwatches", - "children": [], - "parents": [ - { - "nodeId": 9, - "name": "Intelligente tragbare Geräte", - "metaTitle": "Intelligente tragbare Geräte", - "metaKeywords": "Intelligente tragbare Geräte", - "metaDescription": "Intelligente tragbare Geräte", - "isActive": true, - "url": "/de/intelligente-tragbare-geräte", - "children": [], - "parents": [ - { - "nodeId": 1, - "name": "Demoshop", - "metaTitle": "Demoshop", - "metaKeywords": "Deutsche Version des Demoshop", - "metaDescription": "Deutsche Version des Demoshop", - "isActive": true, - "url": "/de", - "children": [], - "parents": [], - "order": null - } - ], - "order": 70 - } - ], - "order": 70 - }, - "links": { - "self": "https://glue.mysprykershop.com/category-nodes/10" - } - }, - { - "type": "category-nodes", - "id": "12", - "attributes": { - "nodeId": 12, - "name": "Smartphones", - "metaTitle": "Smartphones", - "metaKeywords": "Smartphones", - "metaDescription": "Smartphones", - "isActive": true, - "url": "/de/telekommunikation-&-navigation/smartphones", - "children": [], - "parents": [ - { - "nodeId": 11, - "name": "Telekommunikation & Navigation", - "metaTitle": "Telekommunikation & Navigation", - "metaKeywords": "Telekommunikation & Navigation", - "metaDescription": "Telekommunikation & Navigation", - "isActive": true, - "url": "/de/telekommunikation-&-navigation", - "children": [], - "parents": [ - { - "nodeId": 1, - "name": "Demoshop", - "metaTitle": "Demoshop", - "metaKeywords": "Deutsche Version des Demoshop", - "metaDescription": "Deutsche Version des Demoshop", - "isActive": true, - "url": "/de", - "children": [], - "parents": [], - "order": null - } - ], - "order": 80 - } - ], - "order": 80 - }, - "links": { - "self": "https://glue.mysprykershop.com/category-nodes/12" - } - }, - { - "type": "category-nodes", - "id": "6", - "attributes": { - "nodeId": 6, - "name": "Notebooks", - "metaTitle": "Notebooks", - "metaKeywords": "Notebooks", - "metaDescription": "Notebooks", - "isActive": true, - "url": "/de/computer/notebooks", - "children": [], - "parents": [ - { - "nodeId": 5, - "name": "Computer", - "metaTitle": "Computer", - "metaKeywords": "Computer", - "metaDescription": "Computer", - "isActive": true, - "url": "/de/computer", - "children": [], - "parents": [ - { - "nodeId": 1, - "name": "Demoshop", - "metaTitle": "Demoshop", - "metaKeywords": "Deutsche Version des Demoshop", - "metaDescription": "Deutsche Version des Demoshop", - "isActive": true, - "url": "/de", - "children": [], - "parents": [], - "order": null - } - ], - "order": 100 - } - ], - "order": 100 - }, - "links": { - "self": "https://glue.mysprykershop.com/category-nodes/6" - } - }, - { - "type": "category-nodes", - "id": "8", - "attributes": { - "nodeId": 8, - "name": "Tablets", - "metaTitle": "Tablets", - "metaKeywords": "Tablets", - "metaDescription": "Tablets", - "isActive": true, - "url": "/de/computer/tablets", - "children": [], - "parents": [ - { - "nodeId": 5, - "name": "Computer", - "metaTitle": "Computer", - "metaKeywords": "Computer", - "metaDescription": "Computer", - "isActive": true, - "url": "/de/computer", - "children": [], - "parents": [ - { - "nodeId": 1, - "name": "Demoshop", - "metaTitle": "Demoshop", - "metaKeywords": "Deutsche Version des Demoshop", - "metaDescription": "Deutsche Version des Demoshop", - "isActive": true, - "url": "/de", - "children": [], - "parents": [], - "order": null - } - ], - "order": 100 - } - ], - "order": 80 - }, - "links": { - "self": "https://glue.mysprykershop.com/category-nodes/8" - } - } - ] -} -``` - -
    -
    - diff --git a/docs/scos/dev/feature-integration-guides/202005.0/glue-api/glue-api-order-management-feature-integration.md b/docs/scos/dev/feature-integration-guides/202005.0/glue-api/glue-api-order-management-feature-integration.md deleted file mode 100644 index 506b5be79a2..00000000000 --- a/docs/scos/dev/feature-integration-guides/202005.0/glue-api/glue-api-order-management-feature-integration.md +++ /dev/null @@ -1,322 +0,0 @@ ---- -title: Glue API - Order Management feature integration -last_updated: Sep 14, 2020 -template: feature-integration-guide-template -originalLink: https://documentation.spryker.com/v5/docs/glue-api-order-management-feature-integration -originalArticleId: 73691bbd-3fd7-4726-903f-231d2595c5c7 -redirect_from: - - /v5/docs/glue-api-order-management-feature-integration - - /v5/docs/en/glue-api-order-management-feature-integration -related: - - title: Retrieving Customer's Order History - link: docs/scos/dev/glue-api-guides/page.version/managing-customers/retrieving-customer-orders.html - - title: Checking Out Purchases and Getting Checkout Data - link: docs/scos/dev/glue-api-guides/page.version/checking-out/checking-out-purchases.html ---- - -Follow the steps below to install Order Management feature API. - -## Prerequisites -To start feature integration, overview and install all these necessary features: - -| Name | Version | Integration guide | -| --- | --- | --- | -| Spryker Core | 201907.0 | [Glue Application feature integration](/docs/scos/dev/feature-integration-guides/{{page.version}}/glue-api/glue-api-glue-application-feature-integration.html) | - - -## 1) Install the required modules using Composer -Run the following command to install the required modules: - -```bash -composer require spryker/orders-rest-api:"^4.3.0" --update-with-dependencies -``` - -{% info_block warningBox "Verification" %} - - Make sure that the following module is installed: - -| Module | Expected Directory | -| --- | --- | -| `OrdersRestApi` | `vendor/spryker/orders-rest-api` | - -{% endinfo_block %} - - -## 2) Set Up Transfer Objects -Run the following command to generate the transfer changes: - -```bash -composer transfer:generate -``` - -{% info_block warningBox "Verification" %} - - Make sure that the following changes have occurred: - -| Transfer | Type | Event | Path | -| --- | --- | --- | --- | -| `RestOrdersAttributesTransfer` | class | created | `src/Generated/Shared/Transfer/RestOrdersAttributesTransfer` | -| `RestOrderDetailsAttributesTransfer` | class | created | `src/Generated/Shared/Transfer/RestOrderDetailsAttributesTransfer` | -| `RestOrderItemsAttributesTransfer` | class | created | `src/Generated/Shared/Transfer/RestOrderItemsAttributesTransfer` | -| `RestOrderTotalsAttributesTransfer` | class | created | `src/Generated/Shared/Transfer/RestOrderTotalsAttributesTransfer` | -| `RestOrderExpensesAttributesTransfer` | class | created | `src/Generated/Shared/Transfer/RestOrderExpensesAttributesTransfer` | -| `RestOrderAddressTransfer` | class | created | `src/Generated/Shared/Transfer/RestOrderAddressTransfer` | -| `RestOrderPaymentTransfer` | class | created | `src/Generated/Shared/Transfer/RestOrderPaymentTransfer` | -| `RestOrderItemMetadataTransfer` | class | created | `src/Generated/Shared/Transfer/RestOrderItemMetadataTransfer` | -| `RestCalculatedDiscountTransfer` | class | created | `src/Generated/Shared/Transfer/RestCalculatedDiscountTransfer` | -| `RestOrderShipmentTransfer` | class | created | `` | -| `` | class | created | `src/Generated/Shared/Transfer/RestOrderShipmentTransfer` | -| `ShipmentMethodTransfer` | class | created | `src/Generated/Shared/Transfer/ShipmentMethodTransfer` | -| `ExpenseTransfer` | class | created | `src/Generated/Shared/Transfer/ExpenseTransfer` | -| `RestUserTransfer` | class | created | `src/Generated/Shared/Transfer/RestUserTransfer` | - -{% endinfo_block %} - -### 3) Set Up Behavior -#### Enable resource -Activate the following plugins: - -| Plugin | Specification | Prerequisites | Namespace | -| --- | --- | --- | --- | -| `OrdersResourceRoutePlugin` | Registers the `orders` resource. | None | `Spryker\Glue\OrdersRestApi\Plugin` | -| `OrderRelationshipByOrderReferencePlugin` | Adds the `orders` resource as a relationship by order reference. | None | `Spryker\Glue\OrdersRestApi\Plugin` | - -{% info_block infoBox "Info" %} - -`OrdersResourceRoutePlugin` *GET* verb is a protected resource, please reference the configure section of [Resource routing](/docs/scos/dev/glue-api-guides/{{page.version}}/glue-infrastructure.html#resource-routing). - -{% endinfo_block %} - -
    -src/Pyz/Glue/GlueApplication/GlueApplicationDependencyProvider.php - -```php -addRelationship( - CheckoutRestApiConfig::RESOURCE_CHECKOUT, - new OrderRelationshipByOrderReferencePlugin() - ); - - return $resourceRelationshipCollection; - } -} - -``` - -
    -
    - -{% info_block warningBox "Verification" %} - -To verify that `OrdersResourceRoutePlugin` is set up correctly, make sure that the following endpoints are available: - -* https://glue.mysprykershop.com/orders -* https://glue.mysprykershop.com/orders/{% raw %}{{{% endraw %}order_reference{% raw %}}}{% endraw %} - -{% endinfo_block %} - -{% info_block warningBox "Verification" %} - -To verify that `OrderRelationshipByOrderReferencePlugin` is set up correctly, make sure that the `orders relationship is included when you request it with the `/checkout` request: - -
    -POST https://glue.mysprykershop.com/checkout?include=orders - -```json -{ - "data": { - "type": "checkout", - "id": null, - "attributes": { - "orderReference": "DE--2", - "redirectUrl": null, - "isExternalRedirect": null - }, - "links": { - "self": "https://glue.mysprykershop.com/checkout?include=orders" - }, - "relationships": { - "orders": { - "data": [ - { - "type": "orders", - "id": "DE--2" - } - ] - } - } - }, - "included": [ - { - "type": "orders", - "id": "DE--2", - "attributes": { - "createdAt": "2020-03-30 05:07:22.442535", - "currencyIsoCode": "EUR", - "priceMode": "GROSS_MODE", - "totals": { - "expenseTotal": 490, - "discountTotal": 0, - "taxTotal": 1675, - "subtotal": 9999, - "grandTotal": 10489, - "canceledTotal": 0 - }, - "billingAddress": { - "salutation": "Mr", - "firstName": "spencor", - "middleName": null, - "lastName": "hopkin", - "address1": "West road", - "address2": "212", - "address3": "", - "company": "Spryker", - "city": "Berlin", - "zipCode": "61000", - "poBox": null, - "phone": "+380669455897", - "cellPhone": null, - "description": null, - "comment": null, - "email": null, - "country": "Germany", - "iso2Code": "DE" - }, - "shippingAddress": { - "salutation": "Mr", - "firstName": "spencor", - "middleName": null, - "lastName": "hopkin", - "address1": "West road", - "address2": "212", - "address3": "", - "company": "Spryker", - "city": "Berlin", - "zipCode": "61000", - "poBox": null, - "phone": "+380669455897", - "cellPhone": null, - "description": null, - "comment": null, - "email": null, - "country": "Germany", - "iso2Code": "DE" - }, - "items": [ - { - "name": "Canon IXUS 285", - "sku": "009_30692991", - "sumPrice": 9999, - "quantity": 1, - "unitGrossPrice": 9999, - "sumGrossPrice": 9999, - "taxRate": "19.00", - "unitNetPrice": 0, - "sumNetPrice": 0, - "unitPrice": 9999, - "unitTaxAmountFullAggregation": 1596, - "sumTaxAmountFullAggregation": 1596, - "refundableAmount": 9999, - "canceledAmount": 0, - "sumSubtotalAggregation": 9999, - "unitSubtotalAggregation": 9999, - "unitProductOptionPriceAggregation": 0, - "sumProductOptionPriceAggregation": 0, - "unitExpensePriceAggregation": 0, - "sumExpensePriceAggregation": null, - "unitDiscountAmountAggregation": 0, - "sumDiscountAmountAggregation": 0, - "unitDiscountAmountFullAggregation": 0, - "sumDiscountAmountFullAggregation": 0, - "unitPriceToPayAggregation": 9999, - "sumPriceToPayAggregation": 9999, - "taxRateAverageAggregation": "19.00", - "taxAmountAfterCancellation": null, - "metadata": { - "superAttributes": [], - "image": "https://images.icecat.biz/img/gallery_lows/30692991_6058401644.jpg" - }, - "calculatedDiscounts": [], - "productOptions": [] - } - ], - "expenses": [ - { - "type": "SHIPMENT_EXPENSE_TYPE", - "name": "Standard", - "sumPrice": 490, - "unitGrossPrice": 490, - "sumGrossPrice": 490, - "taxRate": "19.00", - "unitNetPrice": 0, - "sumNetPrice": 0, - "canceledAmount": null, - "unitDiscountAmountAggregation": null, - "sumDiscountAmountAggregation": null, - "unitTaxAmount": 79, - "sumTaxAmount": 79, - "unitPriceToPayAggregation": 490, - "sumPriceToPayAggregation": 490, - "taxAmountAfterCancellation": null - } - ], - "payments": [ - { - "amount": 10489, - "paymentProvider": "DummyPayment", - "paymentMethod": "Credit Card" - } - ], - "shipments": [ - { - "shipmentMethodName": "Standard", - "carrierName": "Spryker Dummy Shipment", - "deliveryTime": null, - "defaultGrossPrice": 490, - "defaultNetPrice": 0, - "currencyIsoCode": "EUR" - } - ], - "calculatedDiscounts": [] - }, - "links": { - "self": "https://glue.mysprykershop.com/orders/DE--2" - } - } - ] -} -``` - -
    -
    - -{% endinfo_block %} diff --git a/docs/scos/dev/feature-integration-guides/202005.0/glue-api/glue-api-payments-feature-integration.md b/docs/scos/dev/feature-integration-guides/202005.0/glue-api/glue-api-payments-feature-integration.md deleted file mode 100644 index bc517d5225f..00000000000 --- a/docs/scos/dev/feature-integration-guides/202005.0/glue-api/glue-api-payments-feature-integration.md +++ /dev/null @@ -1,285 +0,0 @@ ---- -title: Glue API - Payments feature integration -last_updated: Sep 14, 2020 -template: feature-integration-guide-template -originalLink: https://documentation.spryker.com/v5/docs/glue-api-payments-feature-integration -originalArticleId: 36efbeb7-64cf-4fa7-b3b7-a6674ca92564 -redirect_from: - - /v5/docs/glue-api-payments-feature-integration - - /v5/docs/en/glue-api-payments-feature-integration -related: - - title: Checking Out Purchases and Getting Checkout Data - link: docs/scos/dev/glue-api-guides/page.version/checking-out/checking-out-purchases.html ---- - -
    - -**The following feature integration Guide expects the basic feature to be in place.** -The current guide only adds the Payment Management API functionality. -
    - -Follow the steps below to install Payments feature API. - -## Prerequisites -To start the feature integration, overview and install the necessary features: - -| Name | Version | Integration guide | -| --- | --- | --- | -| Spryker Core | master | [Glue Application feature integration](/docs/scos/dev/feature-integration-guides/{{page.version}}/glue-api/glue-api-glue-application-feature-integration.html) | -| Payments | master | | - -## 1) Install the required modules using Composer -Run the following command to install the required modules: - -```bash -composer require spryker/payments-rest-api:"1.1.0" --update-with-dependencies -``` - -
    - -**Verification** - -Make sure that the following modules are installed: - -| Module | Expected Directory | -| --- | --- | -| `PaymentsRestApi` | `vendor/spryker/payments-rest-api` | -
    - -## 2) Set Up Configuration -Put all the payment methods available in the shop to `CheckoutRestApiConfig`, for example: - -
    -src/Pyz/Glue/CheckoutRestApi/CheckoutRestApiConfig.php - -```php - 1, - DummyPaymentConfig::PAYMENT_METHOD_CREDIT_CARD => 2, - ]; - - protected const PAYMENT_METHOD_REQUIRED_FIELDS = [ - DummyPaymentConfig::PROVIDER_NAME => [ - DummyPaymentConfig::PAYMENT_METHOD_INVOICE => [ - 'dummyPaymentInvoice.dateOfBirth', - ], - DummyPaymentConfig::PAYMENT_METHOD_CREDIT_CARD => [ - 'dummyPaymentCreditCard.cardType', - 'dummyPaymentCreditCard.cardNumber', - 'dummyPaymentCreditCard.nameOnCard', - 'dummyPaymentCreditCard.cardExpiresMonth', - 'dummyPaymentCreditCard.cardExpiresYear', - 'dummyPaymentCreditCard.cardSecurityCode', - ], - ], - ]; -} -``` - -
    -
    - - -## 3) Set Up Transfer Objects -### Install payment methods -To have payment methods available for the checkout, extend `RestPaymentTransfer` with project-specific payment method transfers: - -
    -src/Pyz/Shared/CheckoutRestApi/Transfer/checkout_rest_api.transfer.xml - -```xml - - - - - - - - - - -``` - -
    -
    - -

    Run the following command to generate transfer changes: - -```bash -console transfer:generate -``` -

    - -{% info_block warningBox "Verification" %} - -Make sure that the following changes have occurred: - -| Transfer | Type | Event | Path | -| --- | --- | --- | --- | -| `RestCheckoutRequestAttributesTransfer` | class | created | `src/Generated/Shared/Transfer/RestCheckoutRequestAttributesTransfer.php` | -| `QuoteTransfer` | class | created | `src/Generated/Shared/Transfer/QuoteTransfer.php` | -| `PaymentTransfer` | class | created | `src/Generated/Shared/Transfer/PaymentTransfer.php` | -| `RestPaymentTransfer` | class | created | `src/Generated/Shared/Transfer/RestPaymentTransfer.php` | -| `RestPaymentMethodsAttributesTransfer` | class | created | `src/Generated/Shared/Transfer/RestPaymentMethodsAttributesTransfer.php` | -| `RestCheckoutTransfer` | class | created | `src/Generated/Shared/Transfer/RestCheckoutTransfer.php` | -| `PaymentMethodTransfer` | class | created | `src/Generated/Shared/Transfer/PaymentMethodTransfer.php` | -| `PaymentProviderTransfer` | class | created | `src/Generated/Shared/Transfer/PaymentProviderTransfer.php` | -| `PaymentMethodsTransfer` | class | created | `src/Generated/Shared/Transfer/PaymentMethodsTransfer.php` | -| `RestCheckoutDataTransfer` | class | created | `src/Generated/Shared/Transfer/RestCheckoutDataTransfer.php` | -| `PaymentProviderCollectionTransfer` | class | created | `src/Generated/Shared/Transfer/PaymentProviderCollectionTransfer.php` | -| `RestCheckoutDataResponseAttributesTransfer` | class | created | `src/Generated/Shared/Transfer/RestCheckoutDataResponseAttributesTransfer.php` | -| `RestPaymentMethodTransfer` | class | created | `src/Generated/Shared/Transfer/RestPaymentMethodTransfer.php` | -| `RestPaymentTransfer.DummyPayment` | property | created | `src/Generated/Shared/Transfer/RestPaymentTransfer.php` | -| `RestPaymentTransfer.DummyPaymentInvoicet` | property | created | `src/Generated/Shared/Transfer/RestPaymentTransfer.php` | -| `RestPaymentTransfer.DummyPaymentCreditCard` | property | created | `src/Generated/Shared/Transfer/RestPaymentTransfer.php` | - -{% endinfo_block %} - - -## 4) Set Up Behavior -### Enable resources and relationships -Activate the following plugin: - -| Plugin | Specification | Prerequisites | Namespace | -| --- | --- | --- | --- | -| `PaymentMethodsByCheckoutDataResourceRelationshipPlugin` | Adds payment-methods resource as relationship in case `RestCheckoutDataTransfer` is provided as payload. | None | `Spryker\Glue\PaymentsRestApi\Plugin\GlueApplication` | - -
    -src/Pyz/Glue/GlueApplication/GlueApplicationDependencyProvider.php - -```php -addRelationship( - CheckoutRestApiConfig::RESOURCE_CHECKOUT_DATA, - new PaymentMethodsByCheckoutDataResourceRelationshipPlugin() - ); - - return $resourceRelationshipCollection; - } -} -``` - -
    -
    - -{% info_block warningBox "Verification" %} - -To verify `PaymentMethodsByCheckoutDataResourceRelationshipPlugin` is activated, send a POST request to `https://glue.mysprykershop.com/checkout-data?include=payment-methods` and make sure that `checkout-data` resource has a relationship to the `payment-methods` resources. - -{% endinfo_block %} - -### Configure mapping -Mappers should be configured on a project level to map the data from the request into `QuoteTransfer`: - -| Plugin | Specification | Prerequisites | Namespace | -| --- | --- | --- |--- | -| PaymentsQuoteMapperPlugin | Adds a mapper that maps Payments information to `QuoteTransfer`. | None | `Spryker\Zed\PaymentsRestApi\Communication\Plugin\CheckoutRestApi` | - -
    -src/Pyz/Zed/CheckoutRestApi/CheckoutRestApiDependencyProvider.php - -```php - -
    - -{% info_block warningBox "Verification" %} - -To verify that `PaymentsQuoteMapperPlugin` is activated, send a POST request to `https://glue.mysprykershop.com/checkout` and make sure the order contains the payment method you provided in the request. - -{% endinfo_block %} - - -| Plugin | Specification | Prerequisites | Namespace | -| --- | --- | --- | --- | -| SelectedPaymentMethodCheckoutDataResponseMapperPlugin | Maps the selected payment method data to the checkout-data resource attributes. | None | `Spryker\Glue\PaymentsRestApi\Plugin\CheckoutRestApi` | - -
    -src/Pyz/Glue/CheckoutRestApi/CheckoutRestApiDependencyProvider.php - -```php - -
    - -{% info_block warningBox "Verification" %} - -To verify that SelectedPaymentMethodCheckoutDataResponseMapperPlugin is activated, send a POST request to the `https://glue.mysprykershop.com/checkout-data` endpoint with payment method name and payment provider name, and make sure that you get not empty "selectedPaymentMethods" attribute in the response: - -{% endinfo_block %} - -## Related Features - -| Feature | Link | -| --- | --- | -| Checkout API | [Glue API: Checkout feature integration](/docs/scos/dev/feature-integration-guides/{{page.version}}/glue-api/glue-api-checkout-feature-integration.html) | diff --git a/docs/scos/dev/feature-integration-guides/202005.0/glue-api/glue-api-product-availability-feature-integration.md b/docs/scos/dev/feature-integration-guides/202005.0/glue-api/glue-api-product-availability-feature-integration.md deleted file mode 100644 index 8424a724d6e..00000000000 --- a/docs/scos/dev/feature-integration-guides/202005.0/glue-api/glue-api-product-availability-feature-integration.md +++ /dev/null @@ -1,136 +0,0 @@ ---- -title: Glue API - Product Availability feature integration -description: This guide will navigate you through the process of installing and configuring the Product Availability feature in Spryker OS. -last_updated: Apr 3, 2020 -template: feature-integration-guide-template -originalLink: https://documentation.spryker.com/v5/docs/glue-api-product-availability-feature-integration -originalArticleId: b4f0fbe8-b647-4b76-b0ec-9d7637a68b25 -redirect_from: - - /v5/docs/glue-api-product-availability-feature-integration - - /v5/docs/en/glue-api-product-availability-feature-integration ---- - -## Install feature API -### Prerequisites -Install the required features: - -| Name | Version | -| --- | --- | -| Spryker Core | 2018.12.0 | -| Product Management| 2018.12.0 | -| Availability | 2018.12.0 | -| ProductsRestApi | 2.2.3 | -### 1) Install the required modules using Composer - -Run the following commands to install the required modules: - -```bash -composer require spryker/product-availabilities-rest-api:"^1.0.3" --update-with-dependencies -composer require spryker/products-product-availabilities-resource-relationship:"^1.0.0" --update-with-dependencies -``` - -{% info_block warningBox "Verification" %} - -Make sure that the following modules are installed:) - -| Module | Expected directory | -| --- | --- | -| `ProductAvailabilitiesRestApi` | `vendor/spryker/product-availabilities-rest-api` | -| `ProductsProductAvailabilitiesResourceRelationship` | `vendor/spryker/products-product-availabilities-resource-relationship` | - -{% endinfo_block %} - -### 2) Set up Transfer Objects -Run the following commands to generate transfer changes: - -```bash -console transfer:generate -``` - -{% info_block warningBox "Verification" %} - -Make sure that the following changes in transfer objects are present: - -|Transfer | Type | Event | Path | -| --- | --- | --- | --- | -| `RestAbstractProductAvailabilityAttributesTransfer` | class | created | `src/Generated/Shared/Transfer/RestAbstractProductAvailabilityAttributesTransfer` | -| `RestConcreteProductAvailabilityAttributesTransfer` | class | created | `src/Generated/Shared/Transfer/RestConcreteProductAvailabilityAttributesTransfer` | - -{% endinfo_block %} - -### 3) Set up Behavior -#### Enable resources and relationships -Activate the following plugin: - -| Plugin | Specification | Prerequisites | Namespace | -| --- | --- | --- | --- | -| `AbstractProductAvailabilitiesRoutePlugin` | Registers the abstract product availabilities resource. | None | `Spryker\Glue\ProductAvailabilitiesRestApi\Plugin` | -| `ConcreteProductAvailabilitiesRoutePlugin` | Registers the concrete product availabilities resource. | None | `Spryker\Glue\ProductAvailabilitiesRestApi\Plugin` | -| `AbstractProductAvailabilitiesResourceRelationshipPlugin` | Adds the abstract product availability resource as a relationship to the abstract product resource. | None | `Spryker\Glue\ProductsProductAvailabilitiesResourceRelationship\Plugin` | -| `ConcreteProductAvailabilitiesResourceRelationshipPlugin` | Adds the concrete product availability resource as a relationship to the concrete product resource. | None | `Spryker\Glue\ProductsProductAvailabilitiesResourceRelationship\Plugin` | - -**`src/Pyz/Glue/GlueApplication/GlueApplicationDependencyProvider.php`** -```php -addRelationship( - ProductsRestApiConfig::RESOURCE_ABSTRACT_PRODUCTS, - new AbstractProductAvailabilitiesResourceRelationshipPlugin() - ); - $resourceRelationshipCollection->addRelationship( - ProductsRestApiConfig::RESOURCE_CONCRETE_PRODUCTS, - new ConcreteProductAvailabilitiesResourceRelationshipPlugin() - ); - - return $resourceRelationshipCollection; - } -} -``` - -{% info_block warningBox "Verification" %} - -Make sure that the following endpoints are available: - -* `http://mysprykershop.com/abstract-products/{% raw %}{{{% endraw %}abstract_sku{% raw %}}}{% endraw %}/abstract-product-availabilities` -* `http://mysprykershop.com/concrete-products/{% raw %}{{{% endraw %}concrete_sku{% raw %}}}{% endraw %}/concrete-product-availabilities` - -{% endinfo_block %} - -{% info_block warningBox "Verification" %} -Make a request to `http://mysprykershop.com/abstract-products/{% raw %}{{{% endraw %}abstract_sku{% raw %}}}{% endraw %}?include=abstract-product-availabilities`. Make sure that the response includes relationships to the `abstract-product-availabilities` resource. -{% endinfo_block %} - -{% info_block warningBox "Verification" %} -Make a request to `http://mysprykershop.com/concrete-products/{% raw %}{{{% endraw %}concrete_sku{% raw %}}}{% endraw %}?include=concrete-product-availabilities`. Make sure that the response includes relationships to the `concrete-product-availabilities` resource. -{% endinfo_block %} - diff --git a/docs/scos/dev/feature-integration-guides/202005.0/glue-api/glue-api-product-feature-integration.md b/docs/scos/dev/feature-integration-guides/202005.0/glue-api/glue-api-product-feature-integration.md deleted file mode 100644 index 78951e92524..00000000000 --- a/docs/scos/dev/feature-integration-guides/202005.0/glue-api/glue-api-product-feature-integration.md +++ /dev/null @@ -1,413 +0,0 @@ ---- -title: Glue API - Product feature integration -description: This guide will navigate you through the process of installing and configuring the Product API feature in Spryker OS. -last_updated: Sep 14, 2020 -template: feature-integration-guide-template -originalLink: https://documentation.spryker.com/v5/docs/glue-api-products-feature-integration -originalArticleId: 94de7fb5-4a7e-4a9e-9692-f5f1afc65e48 -redirect_from: - - /v5/docs/glue-api-products-feature-integration - - /v5/docs/en/glue-api-products-feature-integration - - /docs/scos/dev/feature-integration-guides/202005.0/glue-api/products-api-feature-integration.html ---- - -Follow the steps below to install Products feature API. - -## Prerequisites -Install the required features: - -| Name | Version | Integration guide | -| --- | --- | --- | -| Spryker Core | Master | [Feature API](/docs/scos/dev/feature-integration-guides/{{page.version}}/glue-api/glue-api-spryker-core-feature-integration.html) | -| Product |master | | -| Price | master | | - -###1) Install the required modules using Composer -Run the following command to install the required modules: - -```bash -composer require spryker/products-rest-api:"^2.9.0" spryker/product-image-sets-rest-api:"^1.0.3" spryker/product-prices-rest-api:"^1.1.0" spryker/products-categories-resource-relationship:"^1.0.0" --update-with-dependencies -``` - -{% info_block warningBox “Verification” %} - -Make sure that the following modules were installed: -{% endinfo_block %} - -| Module | Expected Directory | -| --- | --- | -| `ProductsRestApi` | `vendor/spryker/products-rest-api` | -| `ProductsRestApiExtension` | `vendor/spryker/products-rest-api-extension` | -| `ProductImageSetsRestApi` | `vendor/spryker/product-image-sets-rest-api` | -| `ProductPricesRestApi` | `vendor/spryker/product-prices-rest-api` | -| `ProductsCategoriesResourceRelationship` | `vendor/spryker/products-categories-resource-relationship` | - -## 2) Set up Database Schema and Transfer Objects -Run the following commands to apply the database changes and generate entity and transfer changes: - -```bash -console transfer:generate -console propel:install -console transfer:generate -``` - -{% info_block warningBox "Verification" %} - -Make sure that the following changes haveoccurred in transfer objects: - -| Transfer | Type | Event | Path | -| --- | --- | --- | --- | -| `AbstractProductsRestAttributesTransfer` | class | created | `src/Generated/Shared/Transfer/AbstractProductsRestAttributesTransfer` | -| `ConcreteProductsRestAttributesTransfer` | class | created | `src/Generated/Shared/Transfer/ConcreteProductsRestAttributesTransfer` | -| `RestProductImageSetsAttributesTransfer` | class | created | `src/Generated/Shared/Transfer/RestProductImageSetsAttributesTransfer` | -| `RestProductImageSetTransfer` | class | created | `src/Generated/Shared/Transfer/RestProductImageSetTransfer` | -| `RestImagesAttributesTransfer` | class | created | `src/Generated/Shared/Transfer/RestImagesAttributesTransfer` | -| `RestProductPriceAttributesTransfer` | class | created | `src/Generated/Shared/Transfer/RestProductPriceAttributesTransfer` | -| `RestProductPricesAttributesTransfer` | class | created | `src/Generated/Shared/Transfer/RestProductPricesAttributesTransfer` | -| `RestCurrencyTransfer` | class | created | `src/Generated/Shared/Transfer/RestCurrencyTransfer` | - - -{% endinfo_block %} - -{% info_block warningBox "Verification" %} - -Make sure that `SpyProductAbstractStorage` and `SpyProductConcreteStorage` are extended with synchronization behavior with these methods: - - -| Entity | Type | Event | Path | Methods | -| --- | --- | --- | --- | --- | -| `SpyProductAbstractStorage` | class | extended | `src/Orm/Zed/ProductStorage/Persistence/Base/SpyProductAbstractStorage` | `syncPublishedMessageForMappings()`,
    `syncUnpublishedMessageForMappings()` | -| `SpyProductConcreteStorage` | class | extended | `src/Orm/Zed/ProductStorage/Persistence/Base/SpyProductConcreteStorage` | `syncPublishedMessageForMappings()`,
    `syncUnpublishedMessageForMappings()` | - - -{% endinfo_block %} - -## 3) Set up Behavior -### Re-export data to storage -Run the following commands to reload abstract and concrete product data to storage. - -```bash -console event:trigger -r product_abstract -console event:trigger -r product_concrete -``` - -{% info_block warningBox "Verification" %} - -Make sure that the following Redis keys exist and there is data in them: -`kv:product_abstract:{% raw %}{{{% endraw %}store_name{% raw %}}}{% endraw %}:{% raw %}{{{% endraw %}locale_name{% raw %}}}{% endraw %}:sku:{% raw %}{{{% endraw %}sku_product_abstract{% raw %}}}{% endraw %}` -`kv:product_concrete:{% raw %}{{{% endraw %}locale_name{% raw %}}}{% endraw %}:sku:{% raw %}{{{% endraw %}sku_product_concrete{% raw %}}}{% endraw %}` - -{% endinfo_block %} - - -### Enable resources -Activate the following plugins: - -| Plugin | Specification | Prerequisites | Namespace | -| --- | --- | --- | --- | -| `AbstractProductsResourceRoutePlugin` | Registers the `abstract-product` resource. | None | `Spryker\Glue\ProductsRestApi\Plugin` | -| `ConcreteProductsResourceRoutePlugin` | Registers the `concrete-product` resource. | None | `Spryker\Glue\ProductsRestApi\Plugin` | - -
    -src/Pyz/Glue/GlueApplication/GlueApplicationDependencyProvider.php - -```php - -
    - -{% info_block warningBox "Verification" %} - -Make sure that the following endpoints are available: - -* `https://glue.mysprykershop.com/abstract-products/{% raw %}{{{% endraw %}abstract_sku{% raw %}}}{% endraw %}` -* `https://glue.mysprykershop.com/concrete-products/{% raw %}{{{% endraw %}concrete_sku{% raw %}}}{% endraw %}` - - -{% endinfo_block %} - - -#### Enable resources and relationships -Activate the following plugins: - -| Plugin | Specification | Prerequisites | Namespace | -| --- | --- | --- | --- | -| `AbstractProductImageSetsRoutePlugin` | Registers the `abstract-product-image-sets` resource. | None | `Spryker\Glue\ProductImageSetsRestApi\Plugin` | -| `ConcreteProductImageSetsRoutePlugin` | Registers the `concrete-product-image-sets` resource. | None | `Spryker\Glue\ProductImageSetsRestApi\Plugin` | -| `AbstractProductsProductImageSetsResourceRelationshipPlugin` | Adds the `abstract-product-image-sets` resource as a relationship to the abstract product resource. | None | `Spryker\Glue\ProductImageSetsRestApi\Plugin\Relationship` | -| `ConcreteProductsProductImageSetsResourceRelationshipPlugin` | Adds the `concrete-product-image-sets` resource as a relationship to the concrete product resource. | None | `Spryker\Glue\ProductImageSetsRestApi\Plugin\Relationship` | - -
    -src/Pyz/Glue/GlueApplication/GlueApplicationDependencyProvider.php - -```php -addRelationship( - ProductsRestApiConfig::RESOURCE_ABSTRACT_PRODUCTS, - new AbstractProductsProductImageSetsResourceRelationshipPlugin() - ); - $resourceRelationshipCollection->addRelationship( - ProductsRestApiConfig::RESOURCE_CONCRETE_PRODUCTS, - new ConcreteProductsProductImageSetsResourceRelationshipPlugin() - ); - - return $resourceRelationshipCollection; - } -} -``` - -
    -
    - -{% info_block warningBox "Verification" %} - -Make sure that the following endpoints are available: - -* `https://glue.mysprykershop.com/abstract-products/{% raw %}{{{% endraw %}abstract_sku{% raw %}}}{% endraw %}/abstract-product-image-sets` -* `https://glue.mysprykershop.com/concrete-products/{% raw %}{{{% endraw %}concrete_sku{% raw %}}}{% endraw %}/concrete-product-image-sets` - -Make a request to `https://glue.mysprykershop.com/abstract-products/{% raw %}{{{% endraw %}abstract_sku{% raw %}}}{% endraw %}?include=abstract-product-image-sets`. The abstract product with the given SKU should have at least one image set. Make sure that the response includes relationships to the `abstract-product-image-sets` resource(s). - -Make a request to `https://glue.mysprykershop.com/concrete-products/{% raw %}{{{% endraw %}concrete_sku{% raw %}}}{% endraw %}?include=concrete-product-image-sets`. The concrete product with a given SKU should have at least one image set. Make sure that the response includes relationships to the `concrete-product-image-sets` resources. - -{% endinfo_block %} - -#### Enable resources and relationships -Activate the following plugins: - -| Plugin | Specification | Prerequisites | Namespace | -| --- | --- | --- | --- | -| `AbstractProductPricesRoutePlugin` | Registers the `abstract-product-prices` resource. | None | `Spryker\Glue\ProductPricesRestApi\Plugin` | -| `ConcreteProductPricesRoutePlugin` | Registers the `concrete-product-prices` resource. | None | `Spryker\Glue\ProductPricesRestApi\Plugin` | -| `AbstractProductPricesByResourceIdResourceRelationshipPlugin` | Adds the `abstract-product-prices`resource as a relationship to the `abstract-product` resource. | None | `Spryker\Glue\ProductPricesRestApi\Plugin\GlueApplication` | -| `ConcreteProductPricesByResourceIdResourceRelationshipPlugin` | `Adds the `concrete-product-prices` resource as a relationship to the `concrete-product` resource.` | None | `Spryker\Glue\ProductPricesRestApi\Plugin\GlueApplication` | - -
    -src/Pyz/Glue/GlueApplication/GlueApplicationDependencyProvider.php - -```php -addRelationship( - ProductsRestApiConfig::RESOURCE_ABSTRACT_PRODUCTS, - new AbstractProductPricesByResourceIdResourceRelationshipPlugin() - ); - $resourceRelationshipCollection->addRelationship( - ProductsRestApiConfig::RESOURCE_CONCRETE_PRODUCTS, - new ConcreteProductPricesByResourceIdResourceRelationshipPlugin() - ); - - return $resourceRelationshipCollection; - } -} -``` - -
    -
    - -{% info_block warningBox "Verification" %} - -Make sure that the following endpoints are available: - -* `https://glue.mysprykershop.com/abstract-products/{% raw %}{{{% endraw %}abstract_sku{% raw %}}}{% endraw %}/abstract-product-prices` -* `https://glue.mysprykershop.com/concrete-products/{% raw %}{{{% endraw %}concrete_sku{% raw %}}}{% endraw %}/concrete-product-prices` - -Make a request to `https://glue.mysprykershop.com/abstract-products/{% raw %}{{{% endraw %}abstract_sku{% raw %}}}{% endraw %}?include=abstract-product-prices`. Make sure that the response includes relationships to the `abstract-product-prices` resource(s). - -Make a request to `https://glue.mysprykershop.com/concrete-products/{% raw %}{{{% endraw %}concrete_sku{% raw %}}}{% endraw %}?include=concrete-product-prices`. Make sure that the response includes relationships to the `concrete-product-prices` resources. - -{% endinfo_block %} - -#### Enable resources and relationships -Activate the following plugin: - -| Plugin | Specification | Prerequisites | Namespace | -| --- | --- | --- | --- | -| `AbstractProductsCategoriesResourceRelationshipPlugin` | Adds the `categories` resource as a relationship to the `abstract-products`resource. | None | `Spryker\Glue\ProductsCategoriesResourceRelationship\Plugin` | - -
    -src/Pyz/Glue/GlueApplication/GlueApplicationDependencyProvider.php - -```php -addRelationship( - ProductsRestApiConfig::RESOURCE_ABSTRACT_PRODUCTS, - new AbstractProductsCategoriesResourceRelationshipPlugin() - ); - - return $resourceRelationshipCollection; - } -} -``` - -
    -
    - -{% info_block warningBox "Verification" %} - -Make a request to `https://glue.mysprykershop.com/abstract-products/{% raw %}{{{% endraw %}abstract_sku{% raw %}}}{% endraw %}?include=category-nodes`. - -Make sure that the response contains `category-nodes` as a relationship, and that the* category-nodes* data is included. - -
    -Sample response - -```json -{ - "data":{ - "type":"abstract-products", - "id":"001", - "attributes":{ - ... - }, - "links":{ - "self":"https://glue.mysprykershop.com/abstract-products/001" - }, - "relationships":{ - "category-nodes":{ - "data":[ - { - "type":"category-nodes", - "id":"4" - }, - { - "type":"category-nodes", - "id":"2" - } - ] - } - } - }, - "included":[ - { - "type":"category-nodes", - "id":"4", - "attributes":{ - ... - }, - "links":{ - "self":"https://glue.mysprykershop.com/category-nodes/4" - } - }, - { - "type":"category-nodes", - "id":"2", - "attributes":{ - ... - }, - "links":{ - "self":"https://glue.mysprykershop.com/category-nodes/2" - } - } - ] -} -``` - -
    -
    - - -{% endinfo_block %} diff --git a/docs/scos/dev/feature-integration-guides/202005.0/glue-api/glue-api-product-image-sets-feature-integration.md b/docs/scos/dev/feature-integration-guides/202005.0/glue-api/glue-api-product-image-sets-feature-integration.md deleted file mode 100644 index ea59bad0f10..00000000000 --- a/docs/scos/dev/feature-integration-guides/202005.0/glue-api/glue-api-product-image-sets-feature-integration.md +++ /dev/null @@ -1,129 +0,0 @@ ---- -title: Glue API - Product Image Sets feature integration -description: This guide will navigate you through the process of installing and configuring the Product Image Sets API feature in Spryker OS. -last_updated: Apr 3, 2020 -template: feature-integration-guide-template -originalLink: https://documentation.spryker.com/v5/docs/glue-api-product-image-sets-api-feature-integration -originalArticleId: 8bce0422-ab04-418b-8409-96a36cf7ecbb -redirect_from: - - /v5/docs/glue-api-product-image-sets-api-feature-integration - - /v5/docs/en/glue-api-product-image-sets-api-feature-integration ---- - -## Install feature API -### Prerequisites -Install the required features: - -| Name | Version | -| --- | --- | -| Spryker Core | 2018.12.0 | -| Customer Account Management | 2018.12.0 | -| ProductImage | 2018.12.0 | -| ProductsRestApi | 2.2.3 | - -## 1) Install the required modules - -Run the following command to install the required modules: -`composer require spryker/product-image-sets-rest-api:"^1.0.3" --update-with-dependencies` - -{% info_block warningBox "Verification" %} - -Make sure that the following module is installed:) - -| Module | Expected Directory | -| --- | --- | -| `ProductImageSetsRestApi` | ` vendor/spryker/product-image-sets-rest-api` | - -{% endinfo_block %} - -## 2) Set up Transfer Objects - -Run the following command to generate transfer changes: -`console transfer:generat` - -{% info_block warningBox "Verification" %} - -Make sure that the following changes are present in the transfer objects: - -| Transfer | Type | Event | Path | -| --- | --- | --- | --- | -| `RestProductImageSetsAttributesTransfer` | column | created | `src/Generated/Shared/Transfer/RestProductImageSetsAttributesTransfers` | -| `RestProductImageSetTransfer` | class | created | `src/Generated/Shared/Transfer/RestProductImageSetTransfer` | -| `RestImagesAttributesTransfer` | class | created | `src/Generated/Shared/Transfer/RestImagesAttributesTransfer` | - -{% endinfo_block %} - -## 3) Set up Behavior -Activate the following plugins: - -| Plugin | Specification | Prerequisites | Namespace | -| --- | --- | --- | --- | -| `AbstractProductImageSetsRoutePlugin` | Registers an abstract product image sets resource. | None | `Spryker\Glue\ProductImageSetsRestApi\Plugin` | -| `ConcreteProductImageSetsRoutePlugin` | Registers a concrete product image sets resource. | None | `Spryker\Glue\ProductImageSetsRestApi\Plugin` | -| `AbstractProductsProductImageSetsResourceRelationshipPlugin` | Adds an abstract product image sets resource as a relationship to an abstract product resource. | None | `Spryker\Glue\ProductImageSetsRestApi\Plugin` | -| `ConcreteProductsProductImageSetsResourceRelationshipPlugin` | Adds a concrete product image sets resource as a relationship to a concrete product resource. | None | `Spryker\Glue\ProductImageSetsRestApi\Plugin` | - -**`src/Pyz/Glue/GlueApplication/GlueApplicationDependencyProvider.php`** -```php -addRelationship( - ProductsRestApiConfig::RESOURCE_ABSTRACT_PRODUCTS, - new AbstractProductsProductImageSetsResourceRelationshipPlugin() - ); - $resourceRelationshipCollection->addRelationship( - ProductsRestApiConfig::RESOURCE_CONCRETE_PRODUCTS, - new ConcreteProductsProductImageSetsResourceRelationshipPlugin() - ); - - return $resourceRelationshipCollection; - } -} -``` - -{% info_block warningBox "Verification" %} - -Make sure that the following endpoints are available: - -* `http://mysprykershop.comop.com//abstract-products/{% raw %}{{{% endraw %}abstract_sku{% raw %}}}{% endraw %}/abstract-product-image-sets` -* `http://mysprykershop.comop.com/concrete-products/{% raw %}{{{% endraw %}concrete_sku{% raw %}}}{% endraw %}/concrete-product-image-sets` - -{% endinfo_block %} - -{% info_block warningBox "Verification" %} -Make the request to `http://mysprykershop.comop.com/abstract-products/{% raw %}{{{% endraw %}abstract_sku{% raw %}}}{% endraw %}?include=abstract-product-image-sets`. The abstract product with the given SKU should have at least one image set. Make sure that the response includes relationships to the `abstract-product-image-sets` resources. -{% endinfo_block %} - -{% info_block warningBox "Verification" %} -Make the request to `http://mysprykershop.comop.com/concrete-products/{% raw %}{{{% endraw %}concrete_sku{% raw %}}}{% endraw %}?include=abstract-product-image-sets`. The concrete product with the given SKU should have at least one image set. Make sure that the response includes relationships to the `concrete-product-image-sets` resources. -{% endinfo_block %} diff --git a/docs/scos/dev/feature-integration-guides/202005.0/glue-api/glue-api-product-labels-feature-integration.md b/docs/scos/dev/feature-integration-guides/202005.0/glue-api/glue-api-product-labels-feature-integration.md deleted file mode 100644 index 8a42bafbcd7..00000000000 --- a/docs/scos/dev/feature-integration-guides/202005.0/glue-api/glue-api-product-labels-feature-integration.md +++ /dev/null @@ -1,127 +0,0 @@ ---- -title: Glue API - Product Labels feature integration -description: This guide will navigate you through the process of installing and configuring the Product Labels API feature in Spryker OS. -last_updated: Sep 14, 2020 -template: feature-integration-guide-template -originalLink: https://documentation.spryker.com/v5/docs/glue-api-product-labels-feature-integration -originalArticleId: e5f5a129-dcdd-410d-8556-2374da1d8176 -redirect_from: - - /v5/docs/glue-api-product-labels-feature-integration - - /v5/docs/en/glue-api-product-labels-feature-integration -related: - - title: Accessing Product Labels - link: docs/scos/dev/glue-api-guides/page.version/managing-products/retrieving-product-labels.html ---- - -Follow the steps below to install Product Labels Feature API. - -### Prerequisites -Install the required features: - -| Name | Version | Required Sub-Feature | -| --- | --- | --- | -| Spryker Core | master | [Glue Application feature integration](/docs/scos/dev/feature-integration-guides/{{page.version}}/glue-api/glue-api-glue-application-feature-integration.html) | -| Product Management | master | [Products API feature integration](/docs/scos/dev/feature-integration-guides/{{page.version}}/glue-api/glue-api-product-feature-integration.html) | -| Product Label | master | | - - -## 1) Install the required modules using Composer - -Run the following command to install the required modules: - -```bash -composer require spryker/product-labels-rest-api:"^1.0.1" --update-with-dependencies -``` - -{% info_block warningBox “Verification” %} - -Make sure that the following module is installed: - -| Module | Expected Directory | -| --- | --- | -| `ProductLabelsRestApi` | `vendor/spryker/product-labels-rest-api` | - -{% endinfo_block %} - -## 2) Set up Transfer Objects - -Run the following commands to generate transfer changes: - -```bash -console transfer:generate -``` - -{% info_block warningBox “Verification” %} - -Make sure that the following changes are present in transfer objects: - -| Transfer | Type | Event | Path | -| --- | --- | --- | --- | -| `RestProductLabelsAttributesTransfer` | class | created | ` src/Generated/Shared/Transfer/RestProductLabelsAttributesTransfer` | - -{% endinfo_block %} - -## 3) Set up Behavior -Set up the following behaviors. - -### Enable resources and relationships - -Activate the following plugin: - -| Plugin | Specification |Prerequisites |Namespace | -| --- | --- | --- | --- | -| `ProductLabelsRelationshipByResourceIdPlugin` | Adds the product labels resource as a relationship to the abstract product resource. | None | `Spryker\Glue\ProductLabelsRestApi\Plugin\GlueApplication\ProductLabelsRelationshipByResourceIdPlugin` | -| `ProductLabelsResourceRoutePlugin` |Registers the product labels resource. | None | `Spryker\Glue\ProductLabelsRestApi\Plugin\GlueApplication\ProductLabelsResourceRoutePlugin` | - -
    -src/Pyz/Glue/GlueApplication/GlueApplicationDependencyProvider.php - -```php -addRelationship( - ProductsRestApiConfig::RESOURCE_ABSTRACT_PRODUCTS, - new ProductLabelsRelationshipByResourceIdPlugin() - ); - - return $resourceRelationshipCollection; - } -} -``` -
    - -{% info_block warningBox "Verification" %} - -Make sure the following endpoint is available: `https://glue.mysprykershop.com/product-labels/{% raw %}{{{% endraw %}abstract_sku{% raw %}}}{% endraw %}` - - -Send a request to `http://mysprykershop.com/abstract-products/{% raw %}{{{% endraw %}sku{% raw %}}}{% endraw %}?include=product-labels `and verify if the abstract product with the given SKU has at least one assigned product label and the response includes relationships to the product-labels resources. - -{% endinfo_block %} diff --git a/docs/scos/dev/feature-integration-guides/202005.0/glue-api/glue-api-product-options-feature-integration.md b/docs/scos/dev/feature-integration-guides/202005.0/glue-api/glue-api-product-options-feature-integration.md deleted file mode 100644 index ab090104e10..00000000000 --- a/docs/scos/dev/feature-integration-guides/202005.0/glue-api/glue-api-product-options-feature-integration.md +++ /dev/null @@ -1,244 +0,0 @@ ---- -title: Glue API - Product Options feature integration -description: This guide provides step-by-step instruction on integrating Product Options API Feature into the Spryker based project. -last_updated: Sep 15, 2020 -template: feature-integration-guide-template -originalLink: https://documentation.spryker.com/v5/docs/glue-api-product-options-feature-integration -originalArticleId: be53f842-61cf-41d3-ba79-a2ca6e3f1618 -redirect_from: - - /v5/docs/glue-api-product-options-feature-integration - - /v5/docs/en/glue-api-product-options-feature-integration ---- - -## Install feature API - -### Prerequisites -To start feature integration, overview, and install the necessary features: - -| Name | Version | Integration guide | -| --- | --- | --- | -| Product Options | {{page.version}} | Feature | -| Spryker Core | {{page.version}} | [Feature API](/docs/scos/dev/feature-integration-guides/{{page.version}}/glue-api/glue-api-spryker-core-feature-integration.html) | - -### 1) Install the required modules using Composer -Run the following command(s) to install the required modules: -```bash -composer require spryker/product-options-rest-api"^1.0.0" --update-with-dependencies -``` -{% info_block warningBox "Verification" %} - -Make sure that the following modules were installed: - -| Module | Expected Directory | -| --- | --- | -| `ProductOptionsRestApi` | `vendor/spryker/product-options-rest-api` | - -{% endinfo_block %} - -### 2) Set up Transfer Objects -Run the following command(s) to apply transfer changes -```bash -console transfer:generate -``` -{% info_block warningBox "Verification" %} - -Make sure that the following changes have been applied in transfer objects: - -| Transfer | Type | Event | Path | -| --- | --- | --- | --- | -| `CartItemRequest.productOptions` | property | created |`src/Generated/Shared/Transfer/CartItemRequestTransfer` | -| `RestCartItemsAttributes.productOptions` | property | created |`src/Generated/Shared/Transfer/RestCartItemsAttributesTransfer` | -| `RestCartItemsProductOption` | class | created |`src/Generated/Shared/Transfer/RestCartItemsProductOptionTransfer` | -| `RestItemsAttributes.selectedOptions` | property | created |`src/Generated/Shared/Transfer/RestItemsAttributesTransfer` | -| `RestItemProductOptions` | class | created |`src/Generated/Shared/Transfer/RestItemProductOptionsTransfer` | -| `RestOrderItemProductOptions` | class | created |`src/Generated/Shared/Transfer/RestOrderItemProductOptionsTransfer` | -| `RestOrderItemsAttributes.productOptions` | property | created |`src/Generated/Shared/Transfer/RestOrderItemsAttributesTransfer` | -| `RestProductOptionsAttributes` | class | created | `src/Generated/Shared/Transfer/RestProductOptionsAttributesTransfer` | - -{% endinfo_block %} -### 3) Set up Behavior -#### Enable Relationships -Activate the following plugins: - -| Plugin | Specification | Prerequisites | Namespace | -| --- | --- | --- | --- | -| `ProductOptionsByProductAbstractSkuResourceRelationshipPlugin` | Adds product-options resource as relationship by product abstract sku. | None | `Spryker\Glue\ProductOptionsRestApi\Plugin\GlueApplication` | -| `ProductOptionsByProductConcreteSkuResourceRelationshipPlugin` | Adds product-options resource as relationship by product concrete sku. | None | `Spryker\Glue\ProductOptionsRestApi\Plugin\GlueApplication` | - -src/Pyz/Glue/GlueApplication/GlueApplicationDependencyProvider.php - -```php -addRelationship( - ProductsRestApiConfig::RESOURCE_ABSTRACT_PRODUCTS, - new ProductOptionsByProductAbstractSkuResourceRelationshipPlugin() - ); - $resourceRelationshipCollection->addRelationship( - ProductsRestApiConfig::RESOURCE_CONCRETE_PRODUCTS, - new ProductOptionsByProductConcreteSkuResourceRelationshipPlugin() - ); - - return $resourceRelationshipCollection; - } -} -``` - -{% info_block warningBox "Verification" %} - -Make a GET request to `https://glue.mysprykershop.com/abstract-products/{% raw %}{{{% endraw %}product_abstract_sku{% raw %}}}{% endraw %}/?include=product-options`. Abstract product with a given SKU should have at least one related product option. Make sure that the response includes relationships to product options resources. - -Make a GET request to `https://glue.mysprykershop.com/concrete-products/{% raw %}{{{% endraw %}product_concrete_sku{% raw %}}}{% endraw %}/?include=product-options`. Abstract product to which concrete product with a given SKU belongs should have at least one related product option. Make sure that the response includes relationships to product options resources. - -{% endinfo_block %} - -#### Provide Dependencies for the CartsRestApi Module - -Activate the following plugins: - -| Plugin | Specification | Prerequisites | Namespace | -| --- | --- | --- | --- | -| `ProductOptionRestCartItemsAttributesMapperPlugin` | Maps selected product options to the cart item response. | None | `Spryker\Glue\ProductOptionsRestApi\Plugin\CartsRestApi` | -| `ProductOptionCartItemMapperPlugin` | Maps specified selected product options to the cart change transfer object. | None | `Spryker\Zed\ProductOptionsRestApi\Communication\Plugin\CartsRestApi` | -| `ProductOptionCartItemExpanderPlugin` | Looks up the product option by SKU and expands the request for adding an item with it. | None | `Spryker\Glue\ProductOptionsRestApi\Plugin\CartsRestApi` | - -src/Pyz/Glue/CartsRestApi/CartsRestApiDependencyProvider.php - -```php -addRelationship( - ProductsRestApiConfig::RESOURCE_ABSTRACT_PRODUCTS, - new AbstractProductsProductPricesResourceRelationshipPlugin() - ); - $resourceRelationshipCollection->addRelationship( - ProductsRestApiConfig::RESOURCE_CONCRETE_PRODUCTS, - new ConcreteProductsProductPricesResourceRelationshipPlugin() - ); - - return $resourceRelationshipCollection; - } -} -``` - -{% info_block warningBox "Verification" %} - -Make sure that the following endpoints are available: - -* `http://mysprykershop.com/abstract-products/{% raw %}{{{% endraw %}abstract_sku{% raw %}}}{% endraw %}/abstract-product-prices` -* `http://mysprykershop.com/concrete-products/{% raw %}{{{% endraw %}concrete_sku{% raw %}}}{% endraw %}/concrete-product-prices` - -{% endinfo_block %} - -{% info_block warningBox "Verification" %} -Make the request to `http://mysprykershop.com/abstract-products/{% raw %}{{{% endraw %}abstract_sku{% raw %}}}{% endraw %}?include=abstract-product-prices`. Make sure that the response includes relationships to the `abstract-product-prices` resources. -{% endinfo_block %} -{% info_block warningBox "Verification" %} -Make the request to `http://mysprykershop.com/concrete-products/{% raw %}{{{% endraw %}concrete_sku{% raw %}}}{% endraw %}?include=concrete-product-prices`. Make sure that the response includes relationships to the `concrete-product-prices` resources. -{% endinfo_block %} diff --git a/docs/scos/dev/feature-integration-guides/202005.0/glue-api/glue-api-product-rating-and-reviews-feature-integration.md b/docs/scos/dev/feature-integration-guides/202005.0/glue-api/glue-api-product-rating-and-reviews-feature-integration.md deleted file mode 100644 index b6a0b15562e..00000000000 --- a/docs/scos/dev/feature-integration-guides/202005.0/glue-api/glue-api-product-rating-and-reviews-feature-integration.md +++ /dev/null @@ -1,592 +0,0 @@ ---- -title: Glue API - Product Rating and Reviews feature integration -description: This guide contains step-by-step instructions on integrating Product Rating & Reviews API feature into a Spryker-based project. -last_updated: Sep 14, 2020 -template: feature-integration-guide-template -originalLink: https://documentation.spryker.com/v5/docs/glue-api-product-rating-reviews-feature-integration -originalArticleId: f0e0f602-f125-46cc-a59b-ac23381d0e1d -redirect_from: - - /v5/docs/glue-api-product-rating-reviews-feature-integration - - /v5/docs/en/glue-api-product-rating-reviews-feature-integration ---- - -## Install feature API -### Prerequisites -Install the required features: - -| Name | Version | Integration guide | -| --- | --- | --- | -| Spryker Core | {{page.version}} | [Feature API](/docs/scos/dev/feature-integration-guides/{{page.version}}/glue-api/glue-api-spryker-core-feature-integration.html) | -| Product Rating & Reviews | {{page.version}} | | - -### 1) Install the required modules using Composer -Run the following command to install the required modules: -```bash -composer require spryker/product-reviews-rest-api:"^1.0.0" --update-with-dependencies -``` -{% info_block warningBox "Verification" %} - -Make sure that the following module was installed: - -| Module | Expected Directory | -| --- | --- | -| `ProductReviewsRestApi` | `vendor/spryker/product-reviews-rest-api` | - -{% endinfo_block %} -### 2) Set up Database Schema and Transfer Objects -Run the following command to generate transfer changes: -```bash -console transfer:generate -console propel:install -console transfer:generate -``` -{% info_block warningBox "Verification" %} - -Make sure that the following changes have been applied in the transfer objects: - -| Transfer | Type | Event | Path | -| --- | --- | --- | --- | -| `RestProductReviewsAttributesTransfer` | class | created |`src/Generated/Shared/Transfer/RestProductReviewsAttributesTransfer` | -| `BulkProductReviewSearchRequestTransfer` | class | created |`src/Generated/Shared/Transfer/BulkProductReviewSearchRequestTransfer`| - -{% endinfo_block %} -{% info_block warningBox "Verification" %} - -Make sure that SpyProductAbstractStorage and SpyProductConcreteStorage are extended by synchronization behavior with these methods: - -| Entity | Type | Event | Path | Methods | -| --- | --- | --- | --- | --- | -| `SpyProductAbstractStorage` | class | extended |`src/Orm/Zed/ProductStorage/Persistence/Base/SpyProductAbstractStorage` | `syncPublishedMessageForMappings()`, `syncUnpublishedMessageForMappings()` | -| `SpyProductConcreteStorage` | class | extended | `src/Orm/Zed/ProductStorage/Persistence/Base/SpyProductConcreteStorage` | `syncPublishedMessageForMappings()`, `yncUnpublishedMessageForMappings()` | - -{% endinfo_block %} -### 3) Set up Behavior -#### Reload Data to Storage -Run the following commands to reload abstract and product data to storage. -```bash -console event:trigger -r product_abstract -console event:trigger -r product_concrete -``` -{% info_block warningBox "Verification" %} - -Make sure that there is data in Redis with keys: - -`kv:product_abstract:{% raw %}{{{% endraw %}store_name{% raw %}}}{% endraw %}:{% raw %}{{{% endraw %}locale_name{% raw %}}}{% endraw %}:sku:{% raw %}{{{% endraw %}sku_product_abstract{% raw %}}}{% endraw %}` -`kv:product_concrete:{% raw %}{{{% endraw %}locale_name{% raw %}}}{% endraw %}:sku:{% raw %}{{{% endraw %}sku_product_concrete{% raw %}}}{% endraw %}` - -{% endinfo_block %} -#### Enable Resources -Activate the following plugins: - -| Plugin | Specification | Prerequisites | Namespace | -| --- | --- | --- | --- | -| `AbstractProductsProductReviewsResourceRoutePlugin` | Registers the product-reviews resource. | None | `Spryker\Glue\ProductReviewsRestApi\Plugin\GlueApplication` | - -src/Pyz/Glue/GlueApplication/GlueApplicationDependencyProvider.php - -```php - -Example - -```yaml -{ - "data": [ - { - "type": "product-reviews", - "id": "21", - "attributes": { - "rating": 4, - "nickname": "Spencor", - "summary": "Donec vestibulum lectus ligula", - "description": "Donec vestibulum lectus ligula, non aliquet neque vulputate vel. Integer neque massa, ornare sit amet felis vitae, pretium feugiat magna. Suspendisse mollis rutrum ante, vitae gravida ipsum commodo quis. Donec eleifend orci sit amet nisi suscipit pulvinar. Nullam ullamcorper dui lorem, nec vehicula justo accumsan id. Sed venenatis magna at posuere maximus. Sed in mauris mauris. Curabitur quam ex, vulputate ac dignissim ac, auctor eget lorem. Cras vestibulum ex quis interdum tristique." - }, - "links": { - "self": "http://glue.de.suite-nonsplit.local/product-reviews/21" - } - }, - { - "type": "product-reviews", - "id": "22", - "attributes": { - "rating": 4, - "nickname": "Maria", - "summary": "Curabitur varius, dui ac vulputate ullamcorper", - "description": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc vel mauris consequat, dictum metus id, facilisis quam. Vestibulum imperdiet aliquam interdum. Pellentesque tempus at neque sed laoreet. Nam elementum vitae nunc fermentum suscipit. Suspendisse finibus risus at sem pretium ullamcorper. Donec rutrum nulla nec massa tristique, porttitor gravida risus feugiat. Ut aliquam turpis nisi." - }, - "links": { - "self": "http://glue.de.suite-nonsplit.local/product-reviews/22" - } - }, - { - "type": "product-reviews", - "id": "23", - "attributes": { - "rating": 4, - "nickname": "Maggie", - "summary": "Aliquam erat volutpat", - "description": "Morbi vitae ultricies libero. Aenean id lectus a elit sollicitudin commodo. Donec mattis libero sem, eu convallis nulla rhoncus ac. Nam tincidunt volutpat sem, eu congue augue cursus at. Mauris augue lorem, lobortis eget varius at, iaculis ac velit. Sed vulputate rutrum lorem, ut rhoncus dolor commodo ac. Aenean sed varius massa. Quisque tristique orci nec blandit fermentum. Sed non vestibulum ante, vitae tincidunt odio. Integer quis elit eros. Phasellus tempor dolor lectus, et egestas magna convallis quis. Ut sed odio nulla. Suspendisse quis laoreet nulla. Integer quis justo at velit euismod imperdiet. Ut orci dui, placerat ut ex ac, lobortis ullamcorper dui. Etiam euismod risus hendrerit laoreet auctor." - }, - "links": { - "self": "http://glue.de.suite-nonsplit.local/product-reviews/23" - } - }, - { - "type": "product-reviews", - "id": "25", - "attributes": { - "rating": 3, - "nickname": "Spencor", - "summary": "Curabitur ultricies, sapien quis placerat lacinia", - "description": "Etiam venenatis sit amet lorem eget tristique. Donec rutrum massa nec commodo cursus. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Suspendisse scelerisque scelerisque augue eget condimentum. Quisque quis arcu consequat, lacinia nulla tempor, venenatis ante. In ullamcorper, orci sit amet tempus tincidunt, massa augue molestie enim, in finibus metus odio at purus. Mauris ut semper sem, a ornare sapien. Fusce eget facilisis felis. Integer imperdiet massa a tortor varius, tincidunt laoreet ipsum viverra." - }, - "links": { - "self": "http://glue.de.suite-nonsplit.local/product-reviews/25" - } - }, - { - "type": "product-reviews", - "id": "26", - "attributes": { - "rating": 5, - "nickname": "Spencor", - "summary": "Cras porttitor", - "description": "Cras porttitor, odio vel ultricies commodo, erat turpis pulvinar turpis, id faucibus dolor odio a tellus. Mauris et nibh tempus, convallis ipsum luctus, mollis risus. Donec molestie orci ante, id tristique diam interdum eget. Praesent erat neque, sollicitudin sit amet pellentesque eget, gravida in lectus. Donec ultrices, nisl in laoreet ultrices, nunc enim lacinia felis, ac convallis tortor ligula non eros. Morbi semper ipsum non elit mollis, non commodo arcu porta. Mauris tincidunt purus rutrum erat ornare, varius egestas eros eleifend." - }, - "links": { - "self": "http://glue.de.suite-nonsplit.local/product-reviews/26" - } - } - ], - "links": { - "self": "http://glue.de.suite-nonsplit.local/abstract-products/139/product-reviews?page[offset]=0&page[limit]=5", - "last": "http://glue.de.suite-nonsplit.local/abstract-products/139/product-reviews?page[offset]=0&page[limit]=5", - "first": "http://glue.de.suite-nonsplit.local/abstract-products/139/product-reviews?page[offset]=0&page[limit]=5" - } -} -``` -
    - - -{% endinfo_block %} - -#### Enable Relationships -Activate the following plugins: - -| Plugin | Specification | Prerequisites | Namespace | -| --- | --- | --- | --- | -| `ProductReviewsRelationshipByProductAbstractSkuPlugin` | Adds product-reviews relationship by abstract product sku. | None |`\Spryker\Glue\ProductReviewsRestApi\Plugin\GlueApplication` | -| `ProductReviewsRelationshipByProductConcreteSkuPlugin` | Adds product-reviews relationship by concrete product sku. | None | `\Spryker\Glue\ProductReviewsRestApi\Plugin\GlueApplication` | -| `ProductReviewsAbstractProductsResourceExpanderPlugin` | Expands abstract-products resource with reviews data. | None | `Spryker\Glue\ProductReviewsRestApi\Plugin\ProductsRestApi` | -| `ProductReviewsConcreteProductsResourceExpanderPlugin` | Expands concrete-products resource with reviews data. | None | `Spryker\Glue\ProductReviewsRestApi\Plugin\ProductsRestApi` | - -src/Pyz/Glue/GlueApplication/GlueApplicationDependencyProvider.php - -```php -addRelationship( - ProductsRestApiConfig::RESOURCE_ABSTRACT_PRODUCTS, - new ProductReviewsRelationshipByProductAbstractSkuPlugin() - ); - $resourceRelationshipCollection->addRelationship( - ProductsRestApiConfig::RESOURCE_CONCRETE_PRODUCTS, - new ProductReviewsRelationshipByProductConcreteSkuPlugin() - ); - - return $resourceRelationshipCollection; - } -} -``` - -src/Pyz/Glue/ProductsRestApi/ProductsRestApiDependencyProvider.php - -```php - -Example - -```yaml -{ - "data": { - "type": "abstract-products", - "id": "139", - "attributes": { - "sku": "139", - "averageRating": 4, - "reviewCount": 5, - "name": "Asus Transformer Book T200TA", - "description": "As light as you like Transformer Book T200 is sleek, slim and oh so light—just 26mm tall and 1.5kg docked. And when need to travel even lighter, detach the 11.6-inch tablet for 11.95mm slenderness and a mere 750g weight! With up to 10.4 hours of battery life that lasts all day long, you’re free to work or play from dawn to dusk. And ASUS Instant On technology ensures that Transformer Book T200 is always responsive and ready for action! Experience outstanding performance from the latest Intel® quad-core processor. You’ll multitask seamlessly and get more done in less time. Transformer Book T200 also delivers exceptional graphics performance—with Intel HD graphics that are up to 30% faster than ever before! Transformer Book T200 is equipped with USB 3.0 connectivity for data transfers that never leave you waiting. Just attach your USB 3.0 devices to enjoy speeds that are up to 10X faster than USB 2.0!", - "attributes": { - "product_type": "Hybrid (2-in-1)", - "form_factor": "clamshell", - "processor_cache_type": "2", - "processor_frequency": "1.59 GHz", - "brand": "Asus", - "color": "Black" - }, - "superAttributesDefinition": [ - "form_factor", - "processor_frequency", - "color" - ], - "superAttributes": [], - "attributeMap": { - "product_concrete_ids": [ - "139_24699831" - ], - "super_attributes": [], - "attribute_variants": [] - }, - "metaTitle": "Asus Transformer Book T200TA", - "metaKeywords": "Asus,Entertainment Electronics", - "metaDescription": "As light as you like Transformer Book T200 is sleek, slim and oh so light—just 26mm tall and 1.5kg docked. And when need to travel even lighter, detach t", - "attributeNames": { - "product_type": "Product type", - "form_factor": "Form factor", - "processor_cache_type": "Processor cache", - "processor_frequency": "Processor frequency", - "brand": "Brand", - "color": "Color" - }, - "url": "/en/asus-transformer-book-t200ta-139" - }, - "links": { - "self": "http://glue.de.suite-nonsplit.local/abstract-products/139?include=product-reviews" - }, - "relationships": { - "product-reviews": { - "data": [ - { - "type": "product-reviews", - "id": "21" - }, - { - "type": "product-reviews", - "id": "22" - }, - { - "type": "product-reviews", - "id": "23" - }, - { - "type": "product-reviews", - "id": "25" - }, - { - "type": "product-reviews", - "id": "26" - } - ] - } - } - }, - "included": [ - { - "type": "product-reviews", - "id": "21", - "attributes": { - "rating": 4, - "nickname": "Spencor", - "summary": "Donec vestibulum lectus ligula", - "description": "Donec vestibulum lectus ligula, non aliquet neque vulputate vel. Integer neque massa, ornare sit amet felis vitae, pretium feugiat magna. Suspendisse mollis rutrum ante, vitae gravida ipsum commodo quis. Donec eleifend orci sit amet nisi suscipit pulvinar. Nullam ullamcorper dui lorem, nec vehicula justo accumsan id. Sed venenatis magna at posuere maximus. Sed in mauris mauris. Curabitur quam ex, vulputate ac dignissim ac, auctor eget lorem. Cras vestibulum ex quis interdum tristique." - }, - "links": { - "self": "http://glue.de.suite-nonsplit.local/product-reviews/21" - } - }, - { - "type": "product-reviews", - "id": "22", - "attributes": { - "rating": 4, - "nickname": "Maria", - "summary": "Curabitur varius, dui ac vulputate ullamcorper", - "description": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc vel mauris consequat, dictum metus id, facilisis quam. Vestibulum imperdiet aliquam interdum. Pellentesque tempus at neque sed laoreet. Nam elementum vitae nunc fermentum suscipit. Suspendisse finibus risus at sem pretium ullamcorper. Donec rutrum nulla nec massa tristique, porttitor gravida risus feugiat. Ut aliquam turpis nisi." - }, - "links": { - "self": "http://glue.de.suite-nonsplit.local/product-reviews/22" - } - }, - { - "type": "product-reviews", - "id": "23", - "attributes": { - "rating": 4, - "nickname": "Maggie", - "summary": "Aliquam erat volutpat", - "description": "Morbi vitae ultricies libero. Aenean id lectus a elit sollicitudin commodo. Donec mattis libero sem, eu convallis nulla rhoncus ac. Nam tincidunt volutpat sem, eu congue augue cursus at. Mauris augue lorem, lobortis eget varius at, iaculis ac velit. Sed vulputate rutrum lorem, ut rhoncus dolor commodo ac. Aenean sed varius massa. Quisque tristique orci nec blandit fermentum. Sed non vestibulum ante, vitae tincidunt odio. Integer quis elit eros. Phasellus tempor dolor lectus, et egestas magna convallis quis. Ut sed odio nulla. Suspendisse quis laoreet nulla. Integer quis justo at velit euismod imperdiet. Ut orci dui, placerat ut ex ac, lobortis ullamcorper dui. Etiam euismod risus hendrerit laoreet auctor." - }, - "links": { - "self": "http://glue.de.suite-nonsplit.local/product-reviews/23" - } - }, - { - "type": "product-reviews", - "id": "25", - "attributes": { - "rating": 3, - "nickname": "Spencor", - "summary": "Curabitur ultricies, sapien quis placerat lacinia", - "description": "Etiam venenatis sit amet lorem eget tristique. Donec rutrum massa nec commodo cursus. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Suspendisse scelerisque scelerisque augue eget condimentum. Quisque quis arcu consequat, lacinia nulla tempor, venenatis ante. In ullamcorper, orci sit amet tempus tincidunt, massa augue molestie enim, in finibus metus odio at purus. Mauris ut semper sem, a ornare sapien. Fusce eget facilisis felis. Integer imperdiet massa a tortor varius, tincidunt laoreet ipsum viverra." - }, - "links": { - "self": "http://glue.de.suite-nonsplit.local/product-reviews/25" - } - }, - { - "type": "product-reviews", - "id": "26", - "attributes": { - "rating": 5, - "nickname": "Spencor", - "summary": "Cras porttitor", - "description": "Cras porttitor, odio vel ultricies commodo, erat turpis pulvinar turpis, id faucibus dolor odio a tellus. Mauris et nibh tempus, convallis ipsum luctus, mollis risus. Donec molestie orci ante, id tristique diam interdum eget. Praesent erat neque, sollicitudin sit amet pellentesque eget, gravida in lectus. Donec ultrices, nisl in laoreet ultrices, nunc enim lacinia felis, ac convallis tortor ligula non eros. Morbi semper ipsum non elit mollis, non commodo arcu porta. Mauris tincidunt purus rutrum erat ornare, varius egestas eros eleifend." - }, - "links": { - "self": "http://glue.de.suite-nonsplit.local/product-reviews/26" - } - } - ] -} -``` -
    - - -{% endinfo_block %} - -{% info_block warningBox "Verification" %} - -Make a request to `https://glue.mysprykershop.com/concrete-products/{% raw %}{{{% endraw %}concrete_sku{% raw %}}}{% endraw %}?include=product-reviews`. - -Make sure that the response contains product-reviews as a relationship and product-reviews data included. - -
    -Example - -```yaml -{ - "data": { - "type": "concrete-products", - "id": "139_24699831", - "attributes": { - "sku": "139_24699831", - "isDiscontinued": false, - "discontinuedNote": null, - "averageRating": 4, - "reviewCount": 5, - "name": "Asus Transformer Book T200TA", - "description": "As light as you like Transformer Book T200 is sleek, slim and oh so light—just 26mm tall and 1.5kg docked. And when need to travel even lighter, detach the 11.6-inch tablet for 11.95mm slenderness and a mere 750g weight! With up to 10.4 hours of battery life that lasts all day long, you’re free to work or play from dawn to dusk. And ASUS Instant On technology ensures that Transformer Book T200 is always responsive and ready for action! Experience outstanding performance from the latest Intel® quad-core processor. You’ll multitask seamlessly and get more done in less time. Transformer Book T200 also delivers exceptional graphics performance—with Intel HD graphics that are up to 30% faster than ever before! Transformer Book T200 is equipped with USB 3.0 connectivity for data transfers that never leave you waiting. Just attach your USB 3.0 devices to enjoy speeds that are up to 10X faster than USB 2.0!", - "attributes": { - "product_type": "Hybrid (2-in-1)", - "form_factor": "clamshell", - "processor_cache_type": "2", - "processor_frequency": "1.59 GHz", - "brand": "Asus", - "color": "Black" - }, - "superAttributesDefinition": [ - "form_factor", - "processor_frequency", - "color" - ], - "metaTitle": "Asus Transformer Book T200TA", - "metaKeywords": "Asus,Entertainment Electronics", - "metaDescription": "As light as you like Transformer Book T200 is sleek, slim and oh so light—just 26mm tall and 1.5kg docked. And when need to travel even lighter, detach t", - "attributeNames": { - "product_type": "Product type", - "form_factor": "Form factor", - "processor_cache_type": "Processor cache", - "processor_frequency": "Processor frequency", - "brand": "Brand", - "color": "Color" - } - }, - "links": { - "self": "http://glue.de.suite-nonsplit.local/concrete-products/139_24699831?include=product-reviews" - }, - "relationships": { - "product-reviews": { - "data": [ - { - "type": "product-reviews", - "id": "21" - }, - { - "type": "product-reviews", - "id": "22" - }, - { - "type": "product-reviews", - "id": "23" - }, - { - "type": "product-reviews", - "id": "25" - }, - { - "type": "product-reviews", - "id": "26" - } - ] - } - } - }, - "included": [ - { - "type": "product-reviews", - "id": "21", - "attributes": { - "rating": 4, - "nickname": "Spencor", - "summary": "Donec vestibulum lectus ligula", - "description": "Donec vestibulum lectus ligula, non aliquet neque vulputate vel. Integer neque massa, ornare sit amet felis vitae, pretium feugiat magna. Suspendisse mollis rutrum ante, vitae gravida ipsum commodo quis. Donec eleifend orci sit amet nisi suscipit pulvinar. Nullam ullamcorper dui lorem, nec vehicula justo accumsan id. Sed venenatis magna at posuere maximus. Sed in mauris mauris. Curabitur quam ex, vulputate ac dignissim ac, auctor eget lorem. Cras vestibulum ex quis interdum tristique." - }, - "links": { - "self": "http://glue.de.suite-nonsplit.local/product-reviews/21" - } - }, - { - "type": "product-reviews", - "id": "22", - "attributes": { - "rating": 4, - "nickname": "Maria", - "summary": "Curabitur varius, dui ac vulputate ullamcorper", - "description": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc vel mauris consequat, dictum metus id, facilisis quam. Vestibulum imperdiet aliquam interdum. Pellentesque tempus at neque sed laoreet. Nam elementum vitae nunc fermentum suscipit. Suspendisse finibus risus at sem pretium ullamcorper. Donec rutrum nulla nec massa tristique, porttitor gravida risus feugiat. Ut aliquam turpis nisi." - }, - "links": { - "self": "http://glue.de.suite-nonsplit.local/product-reviews/22" - } - }, - { - "type": "product-reviews", - "id": "23", - "attributes": { - "rating": 4, - "nickname": "Maggie", - "summary": "Aliquam erat volutpat", - "description": "Morbi vitae ultricies libero. Aenean id lectus a elit sollicitudin commodo. Donec mattis libero sem, eu convallis nulla rhoncus ac. Nam tincidunt volutpat sem, eu congue augue cursus at. Mauris augue lorem, lobortis eget varius at, iaculis ac velit. Sed vulputate rutrum lorem, ut rhoncus dolor commodo ac. Aenean sed varius massa. Quisque tristique orci nec blandit fermentum. Sed non vestibulum ante, vitae tincidunt odio. Integer quis elit eros. Phasellus tempor dolor lectus, et egestas magna convallis quis. Ut sed odio nulla. Suspendisse quis laoreet nulla. Integer quis justo at velit euismod imperdiet. Ut orci dui, placerat ut ex ac, lobortis ullamcorper dui. Etiam euismod risus hendrerit laoreet auctor." - }, - "links": { - "self": "http://glue.de.suite-nonsplit.local/product-reviews/23" - } - }, - { - "type": "product-reviews", - "id": "25", - "attributes": { - "rating": 3, - "nickname": "Spencor", - "summary": "Curabitur ultricies, sapien quis placerat lacinia", - "description": "Etiam venenatis sit amet lorem eget tristique. Donec rutrum massa nec commodo cursus. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Suspendisse scelerisque scelerisque augue eget condimentum. Quisque quis arcu consequat, lacinia nulla tempor, venenatis ante. In ullamcorper, orci sit amet tempus tincidunt, massa augue molestie enim, in finibus metus odio at purus. Mauris ut semper sem, a ornare sapien. Fusce eget facilisis felis. Integer imperdiet massa a tortor varius, tincidunt laoreet ipsum viverra." - }, - "links": { - "self": "http://glue.de.suite-nonsplit.local/product-reviews/25" - } - }, - { - "type": "product-reviews", - "id": "26", - "attributes": { - "rating": 5, - "nickname": "Spencor", - "summary": "Cras porttitor", - "description": "Cras porttitor, odio vel ultricies commodo, erat turpis pulvinar turpis, id faucibus dolor odio a tellus. Mauris et nibh tempus, convallis ipsum luctus, mollis risus. Donec molestie orci ante, id tristique diam interdum eget. Praesent erat neque, sollicitudin sit amet pellentesque eget, gravida in lectus. Donec ultrices, nisl in laoreet ultrices, nunc enim lacinia felis, ac convallis tortor ligula non eros. Morbi semper ipsum non elit mollis, non commodo arcu porta. Mauris tincidunt purus rutrum erat ornare, varius egestas eros eleifend." - }, - "links": { - "self": "http://glue.de.suite-nonsplit.local/product-reviews/26" - } - } - ] -} -``` -
    -
    - -{% endinfo_block %} - - - diff --git a/docs/scos/dev/feature-integration-guides/202005.0/glue-api/glue-api-product-relations-feature-integration.md b/docs/scos/dev/feature-integration-guides/202005.0/glue-api/glue-api-product-relations-feature-integration.md deleted file mode 100644 index d4b5f5324de..00000000000 --- a/docs/scos/dev/feature-integration-guides/202005.0/glue-api/glue-api-product-relations-feature-integration.md +++ /dev/null @@ -1,96 +0,0 @@ ---- -title: Glue API - Product Relations feature integration -description: This guide will navigate you through the process of installing and configuring the Product Relations feature in Spryker OS. -last_updated: Sep 14, 2020 -template: feature-integration-guide-template -originalLink: https://documentation.spryker.com/v5/docs/glue-api-product-relations-feature-integration -originalArticleId: 77795e8f-9fe5-476e-bbb3-50524d50e8a8 -redirect_from: - - /v5/docs/glue-api-product-relations-feature-integration - - /v5/docs/en/glue-api-product-relations-feature-integration ---- - -## Install feature API - -Follow the steps to install the Product Relations feature API. - -### Prerequisites - -Install the required features: - -|Name|Version|Required Sub-Feature| -|---|---|---| -|Spryker Core| master |[Glue Application](/docs/scos/dev/feature-integration-guides/{{page.version}}/glue-api/glue-api-glue-application-feature-integration.html)| -|Product Relation|master|| -|Glue API: Cart |master| [Glue API: Cart feature integration](/docs/scos/dev/feature-integration-guides/{{page.version}}/glue-api/glue-api-cart-feature-integration.html) | -| Glue API: Products |master|[Glue API: Products feature integration](/docs/scos/dev/feature-integration-guides/{{page.version}}/glue-api/glue-api-product-feature-integration.html)| - -### 1) Install the required modules using Composer - -Run the following command to install the required modules: - -```bash -composer require spryker/related-products-rest-api:"^1.0.0" spryker/up-selling-products-rest-api:"^1.0.0" --update-with-dependencies -``` - -{% info_block warningBox “Verification” %} - -Make sure that the following modules have been installed: - -|Module|Expected Directory| -|---|---| -|`RelatedProductsRestApi`|`vendor/spryker/related-products-rest-api`| -|`UpSellingProductsRestApi`|`vendor/spryker/up-selling-products-rest-api`| - -{% endinfo_block %} - -### 2) Set up Behavior - -Set up the following behavior. - -#### Enable Resources and Relationships -Activate the following plugins: - -|Plugin|Specification|Prerequisites|Namespace| -|---|---|---|---| -|`RelatedProductsResourceRoutePlugin`|Retrieves the related products collection.|None|`Spryker\Glue\RelatedProductsRestApi\Plugin\GlueApplication`| -|`CartUpSellingProductsResourceRoutePlugin`|Retrieves the up-selling products collection for the cart.|None|`Spryker\Glue\UpSellingProductsRestApi\Plugin\GlueApplication`| -|`GuestCartUpSellingProductsResourceRoutePlugin`|Retrieves the up-selling products collection for the guest cart.|None|`Spryker\Glue\UpSellingProductsRestApi\Plugin\GlueApplication`| - - -**src/Pyz/Glue/GlueApplication/GlueApplicationDependencyProvider.php** - -```php - -src/Pyz/Zed/Quote/QuoteConfig.php - -```php - - - - -### Enable resources and relationships -Activate the following plugin: - -| Plugin | Specification | Prerequisites | Namespace | -| --- | --- | --- | --- | -| `ProductLabelsResourceRoutePlugin` | Registers the **product labels** resource. | None | `Spryker\Glue\ProductLabelsRestApi\Plugin\GlueApplication` | -| `ProductLabelsRelationshipByResourceIdPlugin` | Adds the **product labels** resource as a relationship to the **abstract product** resource. | None | `Spryker\Glue\ProductLabelsRestApi\Plugin\GlueApplication` | -| `ProductLabelByProductConcreteSkuResourceRelationshipPlugin` | Adds the **product labels** resource as a relationship to the **concrete product** resource. | None | `Spryker\Glue\ProductLabelsRestApi\Plugin\GlueApplication` | -| `CartVouchersResourceRoutePlugin` | Registers the **vouchers** resource. | None | `Spryker\Glue\CartCodesRestApi\Plugin\GlueApplication` | -| `GuestCartVouchersResourceRoutePlugin` | Registers the **guest vouchers** resource. | None | `Spryker\Glue\CartCodesRestApi\Plugin\GlueApplication` | -| `CartRuleByQuoteResourceRelationshipPlugin` | Adds the **cart-rules** resource as a relationship by quote. | None | `Spryker\Glue\CartCodesRestApi\Plugin\GlueApplication` | -| `VoucherByQuoteResourceRelationshipPlugin` | Adds the **vouchers** resource as a relationship by quote. | None | `Spryker\Glue\CartCodesRestApi\Plugin\GlueApplication` | -| `DiscountPromotionCartItemExpanderPlugin` | Expands the Add to Cart request data with discount promotion information. | None | `Spryker\Glue\DiscountPromotionsRestApi\Plugin\CartsRestApi` | -| `DiscountPromotionCartItemMapperPlugin` | Maps a discount to the *Add to Cart* request data. | None | `Spryker\Zed\DiscountPromotionsRestApi\Communication\Plugin\CartsRestApi` | -| `PromotionItemByQuoteTransferResourceRelationshipPlugin` | Adds the `promotional-items` resource as a relationship to the carts and `guest-carts` resources. | None | `Spryker\Glue\DiscountPromotionsRestApi\Plugin\GlueApplication` | -| `ProductAbstractBySkuResourceRelationshipPlugin` | Adds the `abstract-products` resource as a relationship to the `promotional-items` resource. | None | `Spryker\Glue\ProductsRestApi\Plugin\GlueApplication` | - -
    - src/Pyz/Glue/GlueApplication/GlueApplicationDependencyProvider.php - -```php - - addRelationship( - ProductsRestApiConfig::RESOURCE_ABSTRACT_PRODUCTS, - new ProductLabelsRelationshipByResourceIdPlugin() - ); - $resourceRelationshipCollection->addRelationship( - ProductsRestApiConfig::RESOURCE_CONCRETE_PRODUCTS, - new ProductLabelByProductConcreteSkuResourceRelationshipPlugin() - ); - $resourceRelationshipCollection->addRelationship( - CartsRestApiConfig::RESOURCE_CARTS, - new VoucherByQuoteResourceRelationshipPlugin() - ); - $resourceRelationshipCollection->addRelationship( - CartsRestApiConfig::RESOURCE_GUEST_CARTS, - new VoucherByQuoteResourceRelationshipPlugin() - ); - $resourceRelationshipCollection->addRelationship( - CartsRestApiConfig::RESOURCE_CARTS, - new CartRuleByQuoteResourceRelationshipPlugin() - ); - $resourceRelationshipCollection->addRelationship( - CartsRestApiConfig::RESOURCE_GUEST_CARTS, - new CartRuleByQuoteResourceRelationshipPlugin() - ); - $resourceRelationshipCollection->addRelationship( - CartsRestApiConfig::RESOURCE_CARTS, - new PromotionItemByQuoteTransferResourceRelationshipPlugin() - ); - $resourceRelationshipCollection->addRelationship( - CartsRestApiConfig::RESOURCE_GUEST_CARTS, - new PromotionItemByQuoteTransferResourceRelationshipPlugin() - ); - $resourceRelationshipCollection->addRelationship( - DiscountPromotionsRestApiConfig::RESOURCE_PROMOTIONAL_ITEMS, - new ProductAbstractBySkuResourceRelationshipPlugin() - ); - - return $resourceRelationshipCollection; - } -} -``` - -
    -
    - -
    -src/Pyz/Glue/CartsRestApi/CartsRestApiDependencyProvider.php - -```php - - -
    - -
    -src/Pyz/Zed/CartsRestApi/CartsRestApiDependencyProvider.php - -```php - - -
    - - -{% info_block warningBox "Verification" %} -Make sure that the following endpoint is available:
    • `https://glue.mysprykershop.com/product-labels/{% raw %}{{{% endraw %}idProductLabel{% raw %}}}{% endraw %}`
    -{% endinfo_block %} - -**Example response:** - -```json -{ - "data": { - "type": "product-labels", - "id": "5", - "attributes": { - "name": "SALE %", - "isExclusive": false, - "position": 5, - "frontEndReference": "highlight" - }, - "links": { - "self": "https://glue.mysprykershop.com/product-labels/5" - } - } -} -``` - -{% info_block warningBox "Verification" %} - -To verify that ProductLabelsResourceRoutePlugin is set up correctly, make sure that the following endpoint is available: - -* `https://glue.mysprykershop.com/product-labels/{% raw %}{{{% endraw %}idProductLabel{% raw %}}}{% endraw %}` - -
    -Example response - -```json -{ - "data": { - "type": "product-labels", - "id": "5", - "attributes": { - "name": "SALE %", - "isExclusive": false, - "position": 5, - "frontEndReference": "highlight" - }, - "links": { - "self": "https://glue.mysprykershop.com/product-labels/5" - } - } -} -``` -
    -
    - - -{% endinfo_block %} - -{% info_block warningBox "Verification" %} - -To check `ProductLabelsRelationshipByResourceIdPlugin` plugin installation, send a request to `https://glue.mysprykershop.com/abstract-products/{% raw %}{{{% endraw %}sku{% raw %}}}{% endraw %}?include=product-labels` with an SKU of a product with at least one product label assigned to it. Make sure that the response includes relationships to the product-labels resource(s). - -
    -Example response - -```json -{ - "data": { - "type": "abstract-products", - "id": "sku", - "attributes": { - ... - }, - "links": { - ... - }, - "relationships": { - "product-labels": { - "data": [ - { - "type": "product-labels", - "id": "5" - } - ] - } - } - }, - "included": [ - { - "type": "product-labels", - "id": "5", - "attributes": { - "name": "SALE %", - "isExclusive": false, - "position": 5, - "frontEndReference": "highlight" - }, - "links": { - "self": "https://glue.mysprykershop.com/product-labels/5" - } - } - ] -} -``` -
    -
    - - -{% endinfo_block %} - -{% info_block warningBox "Verification" %} - -To check `ProductLabelByProductConcreteSkuResourceRelationshipPlugin` plugin installation, send a request to `https://glue.mysprykershop.com/concrete-products/{% raw %}{{{% endraw %}sku{% raw %}}}{% endraw %}?include=product-labels` with an SKU of a product with at least one product label assigned to it. Make sure that the response includes relationships to the product-labels resource(s). - -
    -Example response - -```json -{ - "data": { - "type": "concrete-products", - "id": "sku", - "attributes": { - ... - }, - "links": { - ... - }, - "relationships": { - "product-labels": { - "data": [ - { - "type": "product-labels", - "id": "5" - } - ] - } - } - }, - "included": [ - { - "type": "product-labels", - "id": "5", - "attributes": { - "name": "SALE %", - "isExclusive": false, - "position": 5, - "frontEndReference": "highlight" - }, - "links": { - "self": "https://glue.mysprykershop.com/product-labels/5" - } - } - ] -} -``` -
    -
    - - -{% endinfo_block %} - -{% info_block warningBox "Verification" %} - -To verify the CartVouchersResourceRoutePlugin and GuestCartVouchersResourceRoutePlugin plugin integration, make sure that the following endpoints are available: - -* `https://glue.mysprykershop.com/carts/{% raw %}{{{% endraw %}cart_uuid{% raw %}}}{% endraw %}/vouchers` -* `https://glue.mysprykershop.com/guest-carts/{% raw %}{{{% endraw %}guest_cart_uuid{% raw %}}}{% endraw %}/vouchers` - - -{% endinfo_block %} - -{% info_block warningBox "Verification" %} - -To verify installation of CartRuleByQuoteResourceRelationshipPlugin and VoucherByQuoteResourceRelationshipPlugin make sure that the vouchers and cart-rules relationships are available when requesting a cart: - -* `https://glue.mysprykershop.com/carts/{% raw %}{{{% endraw %}cart_uuid{% raw %}}}{% endraw %}?include=vouchers,cart-rules` - -
    -Example response - -```json -{ - "data": { - "type": "carts", - "id": "1ce91011-8d60-59ef-9fe0-4493ef3628b2", - "attributes": { - "priceMode": "GROSS_MODE", - "currency": "CHF", - "store": "DE", - "name": "My Cart", - "isDefault": true, - "totals": { - "expenseTotal": 0, - "discountTotal": 95307, - "taxTotal": 75262, - "subtotal": 635381, - "grandTotal": 540074 - }, - "discounts": [ - { - "displayName": "5% discount on all white products", - "amount": 31769, - "code": null - }, - { - "displayName": "10% Discount for all orders above", - "amount": 63538, - "code": null - } - ] - }, - "links": { - "self": "https://glue.mysprykershop.com/carts/1ce91011-8d60-59ef-9fe0-4493ef3628b2?include=cart-rules,vouchers" - }, - "relationships": { - "vouchers": { - "data": [ - { - "type": "vouchers", - "id": "sprykerwu3d" - } - ] - }, - "cart-rules": { - "data": [ - { - "type": "cart-rules", - "id": "1" - } - ] - } - } - }, - "included": [ - { - "type": "vouchers", - "id": "sprykerwu3d", - "attributes": { - "amount": 31769, - "code": "sprykerwu3d", - "discountType": "voucher", - "displayName": "5% discount on all white products", - "isExclusive": false, - "expirationDateTime": "2020-12-31 00:00:00.000000", - "discountPromotionAbstractSku": null, - "discountPromotionQuantity": null - }, - "links": { - "self": "https://glue.mysprykershop.com/vouchers/sprykerwu3d" - } - }, - { - "type": "cart-rules", - "id": "1", - "attributes": { - "amount": 63538, - "code": null, - "discountType": "cart_rule", - "displayName": "10% Discount for all orders above", - "isExclusive": false, - "expirationDateTime": "2020-12-31 00:00:00.000000", - "discountPromotionAbstractSku": null, - "discountPromotionQuantity": null - }, - "links": { - "self": "https://glue.mysprykershop.com/cart-rules/1" - } - } - ] -} -``` -
    -
    - - -{% endinfo_block %} - -{% info_block warningBox "Verification" %} - -Make sure that the cart-rules and vouchers relationships are also available for guest carts. The relationships are provided by `CartRuleByQuoteResourceRelationshipPlugin` and `VoucherByQuoteResourceRelationshipPlugin` plugins. To do so, send a request to the following endpoint: - -* `https://glue.mysprykershop.com/guest-carts/{% raw %}{{{% endraw %}guest-cart_uuid{% raw %}}}{% endraw %}?include=vouchers,cart-rules` - -
    -Example response - -```json -{ - "data": { - "type": "guest-carts", - "id": "9b07888e-623b-5ab1-83dd-c7af5e1d81ad", - "attributes": { - "priceMode": "GROSS_MODE", - "currency": "EUR", - "store": "DE", - "name": "Shopping cart", - "isDefault": true, - "totals": { - "expenseTotal": 0, - "discountTotal": 1853, - "taxTotal": 1676, - "subtotal": 12350, - "grandTotal": 10497 - }, - "discounts": [ - { - "displayName": "5% discount on all white products", - "amount": 618, - "code": null - }, - { - "displayName": "10% Discount for all orders above", - "amount": 1235, - "code": null - } - ] - }, - "links": { - "self": "https://glue.mysprykershop.com/guest-carts/9b07888e-623b-5ab1-83dd-c7af5e1d81ad?include=vouchers,cart-rules" - }, - "relationships": { - "vouchers": { - "data": [ - { - "type": "vouchers", - "id": "sprykerpa8n" - } - ] - }, - "cart-rules": { - "data": [ - { - "type": "cart-rules", - "id": "1" - } - ] - } - } - }, - "included": [ - { - "type": "vouchers", - "id": "sprykerpa8n", - "attributes": { - "amount": 618, - "code": "sprykerpa8n", - "discountType": "voucher", - "displayName": "5% discount on all white products", - "isExclusive": false, - "expirationDateTime": "2020-12-31 00:00:00.000000", - "discountPromotionAbstractSku": null, - "discountPromotionQuantity": null - }, - "links": { - "self": "https://glue.mysprykershop.com/vouchers/sprykerpa8n" - } - }, - { - "type": "cart-rules", - "id": "1", - "attributes": { - "amount": 1235, - "code": null, - "discountType": "cart_rule", - "displayName": "10% Discount for all orders above", - "isExclusive": false, - "expirationDateTime": "2020-12-31 00:00:00.000000", - "discountPromotionAbstractSku": null, - "discountPromotionQuantity": null - }, - "links": { - "self": "https://glue.mysprykershop.com/cart-rules/1" - } - } - ] -} -``` -
    -
    - - -{% endinfo_block %} - -{% info_block warningBox "Verification" %} - -Verify that the `PromotionItemByQuoteTransferResourceRelationshipPlugin` and `ProductAbstractBySkuResourceRelationshipPlugin` plugins add the `promotional-items` and `abstract-products` relations. - -Prerequisites: - -* Have a discount rule for a product. Discount application type should be chosen Promotional Product (see [Creating a Cart Rule Discount](/docs/scos/dev/glue-api-guides/{{page.version}}/discounts-and-promotions/retrieving-discounts.html)). -* Create a cart. - -Add items to the cart to satisfy the conditions of the discount rule: - -* `POST https://glue.mysprykershop.com/carts/{% raw %}{{{% endraw %}cart_uuid{% raw %}}}{% endraw %}/items?include=promotional-items,abstract-product` - -
    -Example of Request - -```json -{ - "data": { - "type": "items", - "attributes": { - "sku": "173_26973306", - "quantity": 4 - } - } -} -``` -
    -
    - -Make sure that the following relations are available: - -* `promotional-items with abstract-products` - -
    -Example of Response - -```json -{ - "data": { - "type": "carts", - "id": "1ce91011-8d60-59ef-9fe0-4493ef3628b2", - ... - "links": { - "self": "https://glue.mysprykershop.com/carts/1ce91011-8d60-59ef-9fe0-4493ef3628b2?include=promotional-items,abstract-products" - }, - "relationships": { - "promotional-items": { - "data": [ - { - "type": "promotional-items", - "id": "bfc600e1-5bf1-50eb-a9f5-a37deb796f8a" - } - ] - } - } - }, - "included": [ - { - "type": "abstract-products", - "id": "112", - "attributes": { - "sku": "112", - ... - "attributeMap": { - "product_concrete_ids": [ - "112_312526171", - "112_306918001", - "112_312526191", - "112_312526172", - "112_306918002", - "112_312526192", - "112_306918003", - "112_312526193" - ], - ... - "attribute_variants": { - "processor_frequency:3.3 GHz": { - "processor_cache:3 MB": { - "id_product_concrete": "112_312526193" - }, - "processor_cache:12 MB": { - "id_product_concrete": "112_312526191" - } - }, - "processor_cache:3 MB": { - "processor_frequency:3.3 GHz": { - "id_product_concrete": "112_312526193" - }, - "processor_frequency:3.2 GHz": { - "id_product_concrete": "112_306918002" - }, - "processor_frequency:3.7 GHz": { - "id_product_concrete": "112_312526171" - } - }, - "processor_frequency:3.2 GHz": { - "processor_cache:12 MB": { - "id_product_concrete": "112_306918003" - }, - "processor_cache:3 MB": { - "id_product_concrete": "112_306918002" - }, - "processor_cache:6 MB": { - "id_product_concrete": "112_306918001" - } - }, - "processor_cache:12 MB": { - "processor_frequency:3.2 GHz": { - "id_product_concrete": "112_306918003" - }, - "processor_frequency:3.7 GHz": { - "id_product_concrete": "112_312526192" - }, - "processor_frequency:3.3 GHz": { - "id_product_concrete": "112_312526191" - } - }, - "processor_frequency:3.7 GHz": { - "processor_cache:12 MB": { - "id_product_concrete": "112_312526192" - }, - "processor_cache:6 MB": { - "id_product_concrete": "112_312526172" - }, - "processor_cache:3 MB": { - "id_product_concrete": "112_312526171" - } - }, - "processor_cache:6 MB": { - "processor_frequency:3.7 GHz": { - "id_product_concrete": "112_312526172" - }, - "processor_frequency:3.2 GHz": { - "id_product_concrete": "112_306918001" - } - } - } - }, - ... - }, - "links": { - "self": "https://glue.mysprykershop.com/abstract-products/112" - } - }, - { - "type": "promotional-items", - "id": "bfc600e1-5bf1-50eb-a9f5-a37deb796f8a", - "attributes": { - "sku": "112", - "quantity": 2 - }, - "links": { - "self": "https://glue.mysprykershop.com/promotional-items/bfc600e1-5bf1-50eb-a9f5-a37deb796f8a" - }, - "relationships": { - "abstract-products": { - "data": [ - { - "type": "abstract-products", - "id": "112" - } - ] - } - } - } - ] -} -``` -
    -
    - - -{% endinfo_block %} - -{% info_block warningBox "Verification" %} - -Verify the `DiscountPromotionCartItemExpanderPlugin` and `DiscountPromotionCartItemMapperPlugin` plugin installation. - -Prerequisites: - -* Have a discount rule for a product. Discount application type should be Promotional product (see [Creating a Cart Rule Discount](/docs/scos/dev/glue-api-guides/{{page.version}}/discounts-and-promotions/retrieving-discounts.html)). -* Create a cart with items that satisfy the conditions of the discount rule. -* Get a concrete promotional product SKU. - -Add the selected promotional product to the cart and check the cart in the response has the cart rule applied to match the promotional product price: - -* `POST https://glue.mysprykershop.com/carts/{% raw %}{{{% endraw %}cart-uuid{% raw %}}}{% endraw %}/items?include=items,cart-rules` - -
    -Example of Request to Add Selected Promotional Product Into The Cart - -```json -{ - "data": { - "type": "items", - "attributes": { - "sku": "112_312526171", - "quantity": 2, - "idPromotionalItem": "bfc600e1-5bf1-50eb-a9f5-a37deb796f8a" - } - } -} -``` -
    -
    - -
    -Example of Response - -```json -{ - "data": { - "type": "carts", - "id": "1ce91011-8d60-59ef-9fe0-4493ef3628b2", - "attributes": { - "priceMode": "GROSS_MODE", - "currency": "EUR", - "store": "DE", - "totals": { - "expenseTotal": 0, - "discountTotal": 32544, - "taxTotal": 19868, - "subtotal": 170808, - "grandTotal": 118396 - }, - "discounts": [ - { - "displayName": "For every purchase above certain value depending on the currency and net/gross price. you get this promotional product for free", - "amount": 32544, - "code": null - } - ] - }, - "links": { - "self": "https://glue.mysprykershop.com/carts/1ce91011-8d60-59ef-9fe0-4493ef3628b2?include=promotional-items,abstract-products,cart-rules" - }, - "relationships": { - "items": { - "data": [ - { - "type": "items", - "id": "112_312526171-promotion-1" - } - ] - } - "cart-rules": { - "data": [ - { - "type": "cart-rules", - "id": "6" - } - ] - } - } - }, - "included": [ - { - "type": "items", - "id": "112_312526171-promotion-1", - "attributes": { - "sku": "112_312526171", - "quantity": "1", - "groupKey": "112_312526171-promotion-1", - "abstractSku": "112", - "amount": null, - "calculations": { - "unitPrice": 43723, - "sumPrice": 43723, - "taxRate": 0, - "unitNetPrice": 0, - "sumNetPrice": 0, - "unitGrossPrice": 43723, - "sumGrossPrice": 43723, - "unitTaxAmountFullAggregation": 0, - "sumTaxAmountFullAggregation": 0, - "sumSubtotalAggregation": 43723, - "unitSubtotalAggregation": 43723, - "unitProductOptionPriceAggregation": 0, - "sumProductOptionPriceAggregation": 0, - "unitDiscountAmountAggregation": 43723, - "sumDiscountAmountAggregation": 43723, - "unitDiscountAmountFullAggregation": 43723, - "sumDiscountAmountFullAggregation": 43723, - "unitPriceToPayAggregation": 0, - "sumPriceToPayAggregation": 0 - }, - "selectedProductOptions": [] - }, - "links": { - "self": "https://glue.mysprykershop.com/carts/1ce91011-8d60-59ef-9fe0-4493ef3628b2/items/112_312526171-promotion-1" - } - }, - { - "type": "cart-rules", - "id": "6", - "attributes": { - "amount": 32544, - "code": null, - "discountType": "cart_rule", - "displayName": "For every purchase above certain value depending on the currency and net/gross price. you get this promotional product for free", - "isExclusive": false, - "expirationDateTime": "2020-12-31 00:00:00.000000", - "discountPromotionAbstractSku": 112, - "discountPromotionQuantity": 2 - }, - "links": { - "self": "https://glue.mysprykershop.com/cart-rules/6" - } - } - ] -} -``` -
    -
    - -{% endinfo_block %} diff --git a/docs/scos/dev/feature-integration-guides/202005.0/glue-api/glue-api-rest-schema-validation-feature-integration.md b/docs/scos/dev/feature-integration-guides/202005.0/glue-api/glue-api-rest-schema-validation-feature-integration.md deleted file mode 100644 index 69494c7abd5..00000000000 --- a/docs/scos/dev/feature-integration-guides/202005.0/glue-api/glue-api-rest-schema-validation-feature-integration.md +++ /dev/null @@ -1,213 +0,0 @@ ---- -title: Glue API - REST Schema Validation feature integration -description: This guide will navigate you through the process of installing and configuring the REST Schema Validation feature in Spryker OS. -template: feature-integration-guide-template ---- - -Follow the steps below to install Rest schema validation feature API. - -## Prerequisites - -Install the required features: - - - -| Name | Version | Integration guide | -| --- | --- | --- | -| Spryker Core | {{page.version}} | [Glue Application feature integration](/docs/scos/dev/feature-integration-guides/{{page.version}}/glue-api/glue-api-glue-application-feature-integration.html) | - - -## 1) Install the required modules using Composer - -Run the following command(s) to install the required modules: - -```bash -composer require spryker/rest-request-validator:"^1.0.0" --update-with-dependencies -``` - -{% info_block warningBox "Verification" %} - -Make sure that the following modules have been installed: - -| Module | Expected Directory | -| --- | --- | -| RestRequestValidator | vendor/spryker/rest-request-validator | - - -{% endinfo_block %} - - -## 2) Set up Behavior - -Set up the following behaviors. - -### Enable Console Command - -Activate the console command provided by the module: - - -| Class | Specification | Prerequisites | Namespace | -| --- | --- | --- | --- | -| BuildValidationCacheConsole | Generates a validation cache that is required for request validation | None | Spryker\Zed\RestRequestValidator\Communication\Console | - - -**src/Pyz/Zed/Console/ConsoleDependencyProvider.php** - -```php - This value is not a valid email address." - }, - { - "code": "901", - "status": 422, - "detail": "password => This value should not be blank." - } - ] -} - - -{% endinfo_block %} diff --git a/docs/scos/dev/feature-integration-guides/202005.0/glue-api/glue-api-shipment-feature-integration.md b/docs/scos/dev/feature-integration-guides/202005.0/glue-api/glue-api-shipment-feature-integration.md deleted file mode 100644 index 85e3eed8123..00000000000 --- a/docs/scos/dev/feature-integration-guides/202005.0/glue-api/glue-api-shipment-feature-integration.md +++ /dev/null @@ -1,273 +0,0 @@ ---- -title: Glue API - Shipment feature integration -last_updated: Sep 14, 2020 -template: feature-integration-guide-template -originalLink: https://documentation.spryker.com/v5/docs/glue-api-shipment-feature-integration -originalArticleId: 78d2624a-3d89-4177-a7ff-0ca29fc5b1e7 -redirect_from: - - /v5/docs/glue-api-shipment-feature-integration - - /v5/docs/en/glue-api-shipment-feature-integration -related: - - title: Checking Out Purchases and Getting Checkout Data - link: docs/scos/dev/glue-api-guides/page.version/checking-out/checking-out-purchases.html ---- - -Follow the steps below to install Shipment feature API. - -## Prerequisites -Install the required features: - -| Name | Version | Integration guide| -| --- | --- |--- | -| Spryker Core | master |[Spryker Core API](/docs/scos/dev/feature-integration-guides/{{page.version}}/glue-api/glue-api-spryker-core-feature-integration.html) | -| Shipments | master | | - -## 1) Install the required modules using Composer -Run the following command(s) to install the required modules: -```bash -composer require spryker/shipments-rest-api:"1.3.0" --update-with-dependencies -``` -{% info_block warningBox "Verification" %} - -Make sure that the following modules were installed: - -| Module | Expected Directory | -| --- | --- | -| ShipmentsRestApi | vendor/spryker/shipments-rest-api | - -{% endinfo_block %} - -## 2) Set up Transfer Objects -Run the following commands to generate transfer changes: - -```bash -console transfer:generate -``` - -| Transfer | Type | Event | Path | -| --- | --- | --- | --- | -| RestCheckoutDataTransfer | class | created | src/Generated/Shared/Transfer/RestCheckoutDataTransfer.php | -| RestCheckoutRequestAttributesTransfer | class | created | src/Generated/Shared/Transfer/RestCheckoutRequestAttributesTransfer.php | -| RestShipmentTransfer | class | created | src/Generated/Shared/Transfer/RestShipmentTransfer.php | -| RestCheckoutDataResponseAttributesTransfer | class | created | src/Generated/Shared/Transfer/RestCheckoutDataResponseAttributesTransfer.php | -| RestShipmentMethodTransfer | class | created | src/Generated/Shared/Transfer/RestShipmentMethodTransfer.php | -| CheckoutResponseTransfer | class | created | src/Generated/Shared/Transfer/CheckoutResponseTransfer.php | -| CheckoutErrorTransfer | class | created | src/Generated/Shared/Transfer/CheckoutErrorTransfer.php | -| AddressTransfer | class | created | src/Generated/Shared/Transfer/AddressTransfer.php | -| ShipmentMethodTransfer | class | created | src/Generated/Shared/Transfer/ShipmentMethodTransfer.php | -| ShipmentMethodsTransfer | class | created | src/Generated/Shared/Transfer/ShipmentMethodsTransfer.php | -| QuoteTransfer | class | created | src/Generated/Shared/Transfer/QuoteTransfer.php | -| StoreTransfer | class | created | src/Generated/Shared/Transfer/StoreTransfer.php | -| MoneyValueTransfer | class | created | src/Generated/Shared/Transfer/MoneyValueTransfer.php | -| CurrencyTransfer | class | created | src/Generated/Shared/Transfer/CurrencyTransfer.php | -| ShipmentTransfer | class | created | src/Generated/Shared/Transfer/ShipmentTransfer.php | -| CheckoutDataTransfer | class | created | src/Generated/Shared/Transfer/CheckoutDataTransfer.php | -| ExpenseTransfer | class | created | src/Generated/Shared/Transfer/ExpenseTransfer.php | -| ItemTransfer | class | created | src/Generated/Shared/Transfer/ItemTransfer.php | -| RestShipmentMethodsAttributesTransfer | class | created | src/Generated/Shared/Transfer/RestShipmentMethodsAttributesTransfer.php | - - -## 3) Set up Behavior -### Enable resources and relationships - -| Plugin | Specification | Prerequisites | Namespace | -| --- | --- | --- | --- | -| ShipmentMethodsByCheckoutDataResourceRelationshipPlugin | Adds `shipment-methods` resource as relationship in case `RestCheckoutDataTransfer` is provided as payload. | None | Spryker\Glue\ShipmentsRestApi\Plugin\GlueApplication | - -
    -src/Pyz/Glue/GlueApplication/GlueApplicationDependencyProvider.php - -```php -addRelationship( - CheckoutRestApiConfig::RESOURCE_CHECKOUT_DATA, - new ShipmentMethodsByCheckoutDataResourceRelationshipPlugin() - ); - - return $resourceRelationshipCollection; - } -} -``` -
    -
    - -{% info_block warningBox "Verification" %} - -To verify that `ShipmentMethodsByCheckoutDataResourceRelationshipPlugin` is activated, send a *POST* request to `https://glue.mysprykershop.com/checkout-data?include=shipment-methods` and make sure that you get a response that includes a section with the `shipment-methods` resource. - -{% endinfo_block %} - -### Configure mapping -Mappers should be configured on a project level in order to map the data from the request into `QuoteTransfer`: - -| Plugin | Specification | Prerequisites | Namespace | -| --- | --- | --- | --- | -| ShipmentQuoteMapperPlugin | Adds a mapper that maps Shipment information to `QuoteTransfer`. | None | Spryker\Zed\ShipmentsRestApi\Communication\Plugin\CheckoutRestApi | - -
    -src/Pyz/Zed/CheckoutRestApi/CheckoutRestApiDependencyProvider.php - -```php - -
    - -{% info_block warningBox "Verification" %} - -To verify that `ShipmentQuoteMapperPlugin` is activated, send a *POST* request to `https://glue.mysprykershop.com/checkout` and make sure that the order contains the shipment method you provided in the request. - -{% endinfo_block %} - - -### Configure the shipment method validator plugin and selected shipment method mapper plugin - -Activate the following plugins: - -| Plugin | Specification | Prerequisites | Namespace | -| --- | --- | --- | --- | -| SelectedShipmentMethodCheckoutDataResponseMapperPlugin | Maps the selected shipment method data to the `checkout-data` resource attributes. | None | Spryker\Glue\ShipmentsRestApi\Plugin\CheckoutRestApi | -| ShipmentMethodCheckoutDataValidatorPlugin | Verifies if a shipment method is valid. | None | Spryker\Zed\ShipmentsRestApi\Communication\Plugin\CheckoutRestApi | - -
    -src/Pyz/Glue/CheckoutRestApi/CheckoutRestApiDependencyProvider.php - -```php - -
    - -
    -src/Pyz/Zed/CheckoutRestApi/CheckoutRestApiDependencyProvider.php - -```php - -
    - -{% info_block warningBox "Verification" %} - -To verify that `SelectedShipmentMethodCheckoutDataResponseMapperPlugin` is activated, send a *POST* request to the `https://glue.mysprykershop.com/checkout-data` endpoint with shipment method id and make sure that you get not empty `selectedShipmentMethods` attribute in response: -
    -Response example - -```json -{ - "data": - { - "type": "checkout-data", - "id": null, - "attributes": { - "addresses": [], - "paymentProviders": [], - "shipmentMethods": [], - "selectedShipmentMethods": [ - { - "id": 1, - "name": "Standard", - "carrierName": "Spryker Dummy Shipment", - "price": 490, - "taxRate": null, - "deliveryTime": null, - "currencyIsoCode": "EUR" - } - ], - ... - } - } -} -``` -
    -
    - - -{% endinfo_block %} - -{% info_block warningBox "Verification" %} - -To verify that `ShipmentMethodCheckoutDataValidatorPlugin` is activated, send a *POST* request to the `https://glue.mysprykershop.com/checkout` endpoint with an invalid shipping method ID and make sure that you get the error saying that a shipment method is not found. - -{% endinfo_block %} - -## Related Features - -| Feature | Link | -| --- | --- | -| Checkout API | [Glue API: Checkout feature integration](/docs/scos/dev/feature-integration-guides/{{page.version}}/glue-api/glue-api-checkout-feature-integration.html) | - - - diff --git a/docs/scos/dev/feature-integration-guides/202005.0/glue-api/glue-api-shopping-lists-feature-integration.md b/docs/scos/dev/feature-integration-guides/202005.0/glue-api/glue-api-shopping-lists-feature-integration.md deleted file mode 100644 index a036e2b7b27..00000000000 --- a/docs/scos/dev/feature-integration-guides/202005.0/glue-api/glue-api-shopping-lists-feature-integration.md +++ /dev/null @@ -1,342 +0,0 @@ ---- -title: Glue API - Shopping Lists feature integration -last_updated: Sep 14, 2020 -template: feature-integration-guide-template -originalLink: https://documentation.spryker.com/v5/docs/glue-api-shopping-lists-feature-integration -originalArticleId: b9a2fd6a-31a7-40f1-9ab3-6495b2650a6b -redirect_from: - - /v5/docs/glue-api-shopping-lists-feature-integration - - /v5/docs/en/glue-api-shopping-lists-feature-integration -related: - - title: Managing Shopping Lists - link: docs/scos/dev/glue-api-guides/page.version/managing-shopping-lists/managing-shopping-lists.html ---- - -{% info_block infoBox "Included features" %} - -The following feature integration guide expects the basic feature to be in place. -The current feature integration guide only adds the Shopping List Rest API functionality. - - -{% endinfo_block %} - -Follow the steps below to install Shopping List feature API. - -## Prerequisites -Install the required features: - -| Name | Version | Integration guide| -| --- | --- |--- | -| Spryker Core | master |[Glue API: Spryker Core feature integration](/docs/scos/dev/feature-integration-guides/{{page.version}}/glue-api/glue-api-spryker-core-feature-integration.html) | -| Shopping Lists | master |[Shopping Lists feature integration](/docs/scos/dev/feature-integration-guides/{{page.version}}/shopping-lists-feature-integration.html) | - -## 1) Install the required modules using Composer -Run the following command to install the required modules: - -```bash -omposer require spryker/shopping-lists-rest-api:"^1.0.0" --update-with-dependencies -``` - -{% info_block warningBox "Verification" %} - -Make sure that the following module is installed: -| Module | Expected Directory | -| --- | --- | -| `ShoppingListsRestApi` | `vendor/spryker/shopping-lists-rest-api` | - - -{% endinfo_block %} - -## 2) Set up Transfer Objects -Run the following commands to generate the transfer changes: - -```bash -console transfer:generate -console propel:install -console transfer:generate -``` - -{% info_block warningBox "Verification" %} - -Make sure that the following changes have been applied by checking your database: - -| Database Entity | Type | Event | -| --- | --- | --- | -| `spy_shopping_list.uuid` | column | added | -| `spy_shopping_list_item.uuid` | column | added | - -{% endinfo_block %} - - -{% info_block warningBox "Verification" %} - -Make sure that the following changes have been applied in transfer objects: -| Transfer | Type | Event | Path | -| --- | --- | --- | --- | -| `RestShoppingListsAttributesTransfer` | class | created | `src/Generated/Shared/Transfer/RestShoppingListsAttributesTransfer` | -| `RestShoppingListRequestAttributesTransfer` | class | created | `src/Generated/Shared/Transfer/RestShoppingListRequestAttributesTransfer` | -| `ShoppingListItemRequestTransfer` | class | created | `src/Generated/Shared/Transfer/ShoppingListItemRequestTransfer` | -| `RestShoppingListItemsAttributesTransfer` | class | created | `src/Generated/Shared/Transfer/RestShoppingListItemsAttributesTransfer` | -| `ShoppingListTransfer.uuid` | property | added | `src/Generated/Shared/Transfer/ShoppingListTransfer` | -| `ShoppingListItemTransfer.uuid` | property | added | `src/Generated/Shared/Transfer/ShoppingListItemTransfer` | - - -{% endinfo_block %} - - - - -## 3) Set up Behavior - -Set up the following behavior. - - -### Generate UUIDs for existing records that do not have IDs: - -Run the following commands: - -```bash -console uuid:generate ShoppingList spy_shopping_list -console uuid:generate ShoppingList spy_shopping_list_item -``` - -{% info_block warningBox "Verification" %} - -Make sure that the uuid field is populated for all records in the spy_shopping_list table. To do so, run the following SQL query and make sure that the result is **0 records**. : -```php -SELECT COUNT(*) FROM spy_shopping_list WHERE uuid IS NULL; -``` -Make sure that the uuid field is populated for all records in the spy_shopping_list_item table. To do so, run the following SQL query and make sure that the result is **0 records**. -```php -SELECT COUNT(*) FROM spy_shopping_list_item WHERE uuid IS NULL; -``` - -{% endinfo_block %} - -### Enable resources -{% info_block infoBox %} - -ShoppingListsResourcePlugin GET, POST, PATCH and DELETE, ShoppingListItemsResourcePlugin POST, PATCH and DELETE verbs are protected resources. For details, refer to the Configure section of [Glue Infrastructure documentation](/docs/scos/dev/glue-api-guides/{{page.version}}/glue-infrastructure.html#resource-routing). - -{% endinfo_block %} - - -| Plugin | Specification | Prerequisites | Namespace | -| --- | --- | --- | --- | -| ShoppingListsResourcePlugin | Registers the shopping-lists resource. | None | Spryker\Glue\ShoppingListsRestApi\Plugin | -| ShoppingListItemsResourcePlugin | Registers the shopping-list-items resource. | None | Spryker\Glue\ShoppingListsRestApi\Plugin | -| ShoppingListItemByShoppingListResourceRelationshipPlugin | Adds the shopping-list-items resource as a relationship to shopping-lists. | None | Spryker\Glue\ShoppingListsRestApi\Plugin\GlueApplication | -| ConcreteProductBySkuResourceRelationshipPlugin | Adds the `concrete-products` resource as a relationship to the `shopping-list-items` resource. | None | Spryker\Glue\ProductsRestApi\Plugin\GlueApplication | - -
    - -src/Pyz/Glue/GlueApplication/GlueApplicationDependencyProvider.php - -``` -addRelationship( - ShoppingListsRestApiConfig::RESOURCE_SHOPPING_LIST_ITEMS, - new ConcreteProductBySkuResourceRelationshipPlugin() - ); - $resourceRelationshipCollection->addRelationship( - ShoppingListsRestApiConfig::RESOURCE_SHOPPING_LISTS, - new ShoppingListItemByShoppingListResourceRelationshipPlugin() - ); - - return $resourceRelationshipCollection; - } -} - -``` -
    -
    - -{% info_block warningBox "Verification" %} - -To verify that the `ShoppingListsResourcePlugin` resource route plugin and the `ShoppingListItemByShoppingListResourceRelationshipPlugin`, `ConcreteProductBySkuResourceRelationshipPlugin` relationship plugins are set up correctly, make sure that following endpoint and relationships are available: - -* https://glue.mysprykershop.com/shopping-lists/{% raw %}{{{% endraw %}shopping_list_uuid{% raw %}}}{% endraw %}?include=shopping-list-items,concrete-products - -Check the response: -
    -GET https://glue.mysprykershop.com/shopping-lists/{% raw %}{{{% endraw %}shopping_list_uuid{% raw %}}}{% endraw %}?include=shopping-list-items,concrete-products - -``` -{ - "data": [ - { - "type": "shopping-lists", - "id": "adb17f85-953f-565a-a4ce-e5cb02405f83", - "attributes": { - "owner": "Sonia Wagner", - "name": "Workstations", - "numberOfItems": 1, - "updatedAt": "2020-03-16 13:07:38.286054", - "createdAt": "2020-03-16 13:07:38.286054" - }, - "links": { - "self": "https://glue.mysprykershop.com/shopping-lists/adb17f85-953f-565a-a4ce-e5cb02405f83?include=shopping-list-items,concrete-products" - }, - "relationships": { - "shopping-list-items": { - "data": [ - { - "type": "shopping-list-items", - "id": "0615fe0d-fdbe-576b-a220-3398b9965d73" - } - ] - } - } - } - ], - "links": { - "self": "https://glue.mysprykershop.com/shopping-lists?include=shopping-list-items,concrete-products" - }, - "included": [ - { - "type": "concrete-products", - "id": "115_27295368", - "attributes": { - "sku": "115_27295368", - "isDiscontinued": false, - "discontinuedNote": null, - "averageRating": null, - "reviewCount": 0, - "name": "DELL OptiPlex 3020", - "description": "Great performance. Outstanding value Get the job done with business-ready desktops offering superb value with strong performance, exceptional security and easy serviceability. Stop advanced threats and zero-day attacks with Dell Data Protection | Protected Workspace—a proactive, real-time solution for malware protection. Ensure authorized access through multifactor, single sign-on (SSO) and preboot authentication with Dell Data Protection | Security Tools. Streamline administration with integration into Dell KACE appliances, Microsoft System Center and industry-standard tools. Deploy with flexibility through multiple chassis options. Select the small form factor chassis, optimized for constrained workspaces, or the expandable mini tower with support for up to four PCIe cards.", - "attributes": { - "processor_cache": "3 MB", - "bus_type": "DMI", - "processor_threads": "2", - "tcase": "72 °", - "brand": "DELL", - "processor_frequency": "3.2 GHz" - }, - "superAttributesDefinition": [ - "processor_cache", - "processor_frequency" - ], - "metaTitle": "DELL OptiPlex 3020", - "metaKeywords": "DELL,Tax Exempt", - "metaDescription": "Great performance. Outstanding value Get the job done with business-ready desktops offering superb value with strong performance, exceptional security and ", - "attributeNames": { - "processor_cache": "Processor cache type", - "bus_type": "Bus type", - "processor_threads": "Processor Threads", - "tcase": "Tcase", - "brand": "Brand", - "processor_frequency": "Processor frequency" - } - }, - "links": { - "self": "https://glue.mysprykershop.com/concrete-products/115_27295368" - } - }, - { - "type": "shopping-list-items", - "id": "0615fe0d-fdbe-576b-a220-3398b9965d73", - "attributes": { - "quantity": 1, - "sku": "115_27295368" - }, - "links": { - "self": "https://glue.mysprykershop.com/shopping-lists/adb17f85-953f-565a-a4ce-e5cb02405f83/shopping-list-items/0615fe0d-fdbe-576b-a220-3398b9965d73" - }, - "relationships": { - "concrete-products": { - "data": [ - { - "type": "concrete-products", - "id": "115_27295368" - } - ] - } - } - } - ] -} -``` -
    -
    - - -{% endinfo_block %} - -{% info_block warningBox "Verification" %} -To verify that the `ShoppingListItemsResourcePlugin` is set up correctly, make sure that the following endpoint is available: - -* https://glue.mysprykershop.com/shopping-lists/{% raw %}{{{% endraw %}shopping_list_uuid{% raw %}}}{% endraw %}/shopping-list-items - -Post a request with the following body: -
    -Body request - -``` -{ - "data": { - "type": "shopping-list-items", - "attributes": { - "sku": "218_1234", - "quantity": 1 - } - } -} -``` -
    -
    - -Check the response: -
    -POST https://glue.mysprykershop.com/shopping-lists/{% raw %}{{{% endraw %}shopping_list_uuid{% raw %}}}{% endraw %}/shopping-list-items - -``` -{ - "data": { - "type": "shopping-list-items", - "id": "c3e12dfb-05e5-51c3-ae8f-ba2f07b6bd17", - "attributes": { - "quantity": 1, - "sku": "218_1234" - }, - "links": { - "self": "https://glue.mysprykershop.com/shopping-lists/d8c5539b-774e-509b-87a9-58cead6a1486/shopping-list-items/c3e12dfb-05e5-51c3-ae8f-ba2f07b6bd17" - } - } -} -``` -
    -
    - -{% endinfo_block %} \ No newline at end of file diff --git a/docs/scos/dev/feature-integration-guides/202005.0/glue-api/glue-api-spryker-core-feature-integration.md b/docs/scos/dev/feature-integration-guides/202005.0/glue-api/glue-api-spryker-core-feature-integration.md deleted file mode 100644 index a7d2b748d36..00000000000 --- a/docs/scos/dev/feature-integration-guides/202005.0/glue-api/glue-api-spryker-core-feature-integration.md +++ /dev/null @@ -1,478 +0,0 @@ ---- -title: Glue API - Spryker Core feature integration -description: Use the guide to install the Spryker Core feature in your project. -last_updated: Jul 22, 2020 -template: feature-integration-guide-template -originalLink: https://documentation.spryker.com/v5/docs/glue-api-spryker-core-feature-integration -originalArticleId: 7be3be98-e86b-44ef-b872-0c497e64086c -redirect_from: - - /v5/docs/glue-api-spryker-core-feature-integration - - /v5/docs/en/glue-api-spryker-core-feature-integration -related: - - title: Resolving Search Engine Friendly URLs - link: docs/scos/dev/glue-api-guides/page.version/resolving-search-engine-friendly-urls.html ---- - -## Install feature API - -### Prerequisites - -Install the required features: - -| Name | Type | Version | -| --- | --- | --- | -| Spryker Core | Feature | {{page.version}} | - -### 1) Install the required modules using Composer - -Run the following command(s) to install the required modules: - -```bash -composer require spryker/glue-application:"^1.0.0" spryker/entity-tags-rest-api:"^1.0.0" spryker/stores-rest-api:"^1.0.0" spryker/urls-rest-api:"^1.0.0" --update-with-dependencies -``` - -{% info_block warningBox "Verification" %} - -Make sure that the following modules have been installed: - -|Module|Expected Directory| -|--- |--- | -|`GlueApplication`|`vendor/spryker/glue-application`| -|`EntityTagsRestApi`|`vendor/spryker/entity-tag-rest-api`| -|`StoresRestApi`|`vendor/spryker/stores-rest-api`| -|`UrlsRestApi`|`vendor/spryker/urls-rest-api`| - -{% endinfo_block %} - -### 2) Set Up Configuration - -Add the necessary parameters to `config/Shared/config_default.php`: - -```php -$config[GlueApplicationConstants::GLUE_APPLICATION_DOMAIN] = 'https://glue.mysprykershop.com'; -$config[GlueApplicationConstants::GLUE_APPLICATION_CORS_ALLOW_ORIGIN] = 'https://glue.mysprykershop.com'; -$config[GlueApplicationConstants::GLUE_APPLICATION_REST_DEBUG] = false; -``` - -#### Add Global CORS policy - -{% info_block infoBox "Info" %} - -`GLUE_APPLICATION_CORS_ALLOW_ORIGIN` should be configured for every domain used in the project. - -{% endinfo_block %} - -Adjust `config/Shared/config_default.php`: - -```php -$config[GlueApplicationConstants::GLUE_APPLICATION_CORS_ALLOW_ORIGIN] = 'https://glue.mysprykershop.com'; -``` - -#### Allow CORS requests to any domain - -Adjust `config/Shared/config_default.php`: - -```php -$config[GlueApplicationConstants::GLUE_APPLICATION_CORS_ALLOW_ORIGIN] = '*'; -``` - -{% info_block warningBox "Verification" %} - -To make sure that the CORS headers are set up correctly, send the OPTIONS request to any valid GLUE resource with the **Origin** header `https://glue.mysprykershop.com/` and see the correct JSON response -- Verify that the **access-control-allow-origin** header is present and is the same to the one set in `config` -- Verify that the **access-control-allow-methods** header is present and contains all available methods -- Send POST, PATCH or DELETE requests (can choose any of available ones and verify that the response headers are the same. - -{% endinfo_block %} - -#### Configure included section - -{% info_block infoBox "Info" %} - -- When the `GlueApplicationConfig::isEagerRelationshipsLoadingEnabled(` option is set to "false", no relationship will be loaded unless they are explicitly specified in the "included" query parameter (for example, `/abstract-products?include=abstract-product-prices`). -- When the `GlueApplicationConfig::isEagerRelationshipsLoadingEnabled()` option is set to "true", all resource relationships will be loaded by default unless you pass an empty "include" query parameter (for example, `/abstract-products?include=`). If you specify needed relationships in the "included" query parameter, only required relationships will be added to response data. - -{% endinfo_block %} - -### 3) Set Up Transfer Objects - -Run the following command to generate transfer objects: - -```bash -console transfer:generate -``` - -{% info_block warningBox "Verification" %} - -Make sure that the following changes have occurred: - -|Transfer|Type|Event|Path| -|--- |--- |--- |--- | -|`RestPageOffsetsTransfer`|class|created|`src/Generated/Shared/Transfer/RestPageOffsetsTransfer.php`| -|`RestErrorMessageTransfer`|class|created|`src/Generated/Shared/Transfer/RestErrorMessageTransfer.php`| -|`RestErrorCollectionTransfer`|class|created|`src/Generated/Shared/Transfer/RestErrorCollectionTransfer.php`| -|`RestVersionTransfer`|class|created|`src/Generated/Shared/Transfer/RestVersionTransfer.php`| -|`RestUserTransfer`|class|created|`src/Generated/Shared/Transfer/RestUserTransfer.php`| -|`StoresRestAttributesTransfer`|class|created|`src/Generated/Shared/Transfer/StoresRestAttributesTransfer.php`| -|`StoreCountryRestAttributesTransfer`|class|created|`src/Generated/Shared/Transfer/StoreCountryRestAttributesTransfer.php`| -|`StoreRegionRestAttributesTransfer`|class|created|`src/Generated/Shared/Transfer/StoreRegionRestAttributesTransfer.php`| -|`StoreLocaleRestAttributesTransfer`|class|created|`src/Generated/Shared/Transfer/StoreLocaleRestAttributesTransfer.php`| -|`StoreCurrencyRestAttributesTransfer`|class|created|`src/Generated/Shared/Transfer/StoreCurrencyRestAttributesTransfer.php`| -|`RestUrlResolverAttributesTransfer`|class|created|`src/Generated/Shared/Transfer/RestUrlResolverAttributesTransfer.php`| - -{% endinfo_block %} - -### 4) Set Up Behavior - -Activate the following plugins: - -| Plugin | Specification | Prerequisites | Namespace | -| --- | --- | --- | --- | -| `GlueResourceBuilderService` | Registers the resource builder service in Glue Application. | None | `Spryker\Glue\GlueApplication\Plugin\Rest\ServiceProvider` | -| `GlueApplicationServiceProvider` | Registers the pimple plugin, the controller resolver and configures the debug mode in Glue Application. | None | `Spryker\Glue\GlueApplication\Plugin\Rest\ServiceProvider` | -| `SessionApplicationPlugin` | Registers the session services in Glue Application. | None | `Spryker\Glue\Session\Plugin\Application` | -| `GlueServiceProviderPlugin` | Registers the `onKernelController` event listeners in Glue Application. | None | `Spryker\Glue\GlueApplication\Plugin\Rest` | -| `GlueRoutingServiceProvider` | Registers the URL matcher and router services in Glue Application. | None | `Spryker\Glue\GlueApplication\Plugin\Rest\ServiceProvider` | -| `SetStoreCurrentLocaleBeforeActionPlugin` | Sets a locale for the whole current store. | None | `Spryker\Glue\GlueApplication\Plugin\Rest\SetStoreCurrentLocaleBeforeActionPlugin` | -| `EntityTagFormatResponseHeadersPlugin` | Adds the ETag header to the response if applicable. | None | `Spryker\Glue\EntityTagsRestApi\Plugin\GlueApplication\EntityTagFormatResponseHeadersPlugin` | -| `EntityTagRestRequestValidatorPlugin` | Verifies that the `If-Match` header is equal to the entity tag. | None | `Spryker\Glue\EntityTagsRestApi\Plugin\GlueApplication\EntityTagRestRequestValidatorPlugin` | -| `StoresResourceRoutePlugin` | Registers the stores resource. | None | `Spryker\Glue\StoresRestApi\Plugin` | -| `UrlResolverResourceRoutePlugin` | Registers the url-resolver resource. | None | `Spryker\Glue\UrlsRestApi\Plugin\GlueApplication\UrlResolverResourceRoutePlugin` | -| `ProductAbstractRestUrlResolverAttributesTransferProviderPlugin` | Provides the abstract-products resource from the `UrlStorageTransfer` object. | None | `Spryker\Glue\ProductsRestApi\Plugin\UrlsRestApi\ProductAbstractRestUrlResolverAttributesTransferProviderPlugin` | -| `CategoryNodeRestUrlResolverAttributesTransferProviderPlugin`| Provides the category-nodes resource from the `UrlStorageTransfer` object. | None | `Spryker\Glue\CategoriesRestApi\Plugin\UrlsRestApi\CategoryNodeRestUrlResolverAttributesTransferProviderPlugin`| - -Create a new entry point for Glue Application: - -**public/Glue/index.php** - -```php -initialize(); - -$bootstrap = new GlueBootstrap(); -$bootstrap - ->boot() - ->run(); -``` - -#### Configure web server - -Create Nginx VHOST configuration: - -**/etc/nginx/sites-enabled/DE_development_glue** - -``` -server { - # Listener for production/staging - requires external LoadBalancer directing traffic to this port - listen 10001; - - # Listener for testing/development - one host only, doesn't require external LoadBalancer - listen 80; - - server_name ~^glue\\..+\\.com$; - - keepalive_timeout 0; - access_log /data/logs/development/glue-access.log extended; - - # entry point for Glue Application - root /data/shop/development/current/public/Glue; - - set $application_env development; - # Binding store - set $application_store DE; - include "spryker/zed.conf"; -} -``` - -Update hosts configuration by adding the following line (replace **ip** with your server's IP address): - -**/etc/hosts** - -``` -ip glue.mysprykershop.com -``` - -{% info_block warningBox "Verification" %} - -If everything is set up correctly, you should be able to access `https://glue.mysprykershop.com` and get a correct JSON response as follows: - -**Default JSON Response** - -```json -{ - "errors": [ - { - "status": 404, - "detail": "Not Found" - } - ] -} -``` -{% endinfo_block %} - -**\Pyz\Glue\GlueApplication\GlueApplicationDependencyProvider.php** - -```php -addRelationship( - CustomersRestApiConfig::RESOURCE_CUSTOMERS, - new WishlistRelationshipByResourceIdPlugin() - ); - - return $resourceRelationshipCollection; - } -} -``` - -{% info_block warningBox “Verification” %} - -Make sure that the following endpoints are available: -- `http:///glue.mysprykershop.com/wishlists` -- `http:///glue.mysprykershop.com/wishlists/{% raw %}{{{% endraw %}wishlist_id{% raw %}}}{% endraw %}/wishlists-items` - -Send a request to `https://glue.mysprykershop.commm/customers/{% raw %}{{{% endraw %}customer_id{% raw %}}}{% endraw %}?include=wishlists` and make sure that the given customer has at least one wishlist. Make sure that the response includes relationships to the `wishlists` resources. - -{% endinfo_block %} \ No newline at end of file diff --git a/docs/scos/dev/feature-integration-guides/202005.0/installing-the-category-cms-blocks.md b/docs/scos/dev/feature-integration-guides/202005.0/installing-the-category-cms-blocks.md deleted file mode 100644 index 98ac90ade94..00000000000 --- a/docs/scos/dev/feature-integration-guides/202005.0/installing-the-category-cms-blocks.md +++ /dev/null @@ -1,353 +0,0 @@ ---- -title: Installing the Category CMS Blocks -description: The guide describes the process of installing the Category CMS Block in your project. -last_updated: Apr 3, 2020 -template: feature-integration-guide-template -originalLink: https://documentation.spryker.com/v5/docs/enabling-category-cms-block -originalArticleId: 600babac-9a1c-4471-bd07-9dd220d6f0ce -redirect_from: - - /v5/docs/enabling-category-cms-block - - /v5/docs/en/enabling-category-cms-block -related: - - title: CMS Block - link: docs/scos/user/back-office-user-guides/page.version/content/blocks/cms-block.html - - title: Migration Guide - CMS Block - link: docs/pbc/all/content-management-system/page.version/base-shop/install-and-upgrade/upgrade-modules/upgrade-the-cmsblock-module.html ---- - -Category blocks are blocks that can be embedded into the category template. -To enable the Category CMS Block in your project, do the following: -1. Install CMS Block Category Connector module by composer. - -```bash -"spryker/cms-block-category-connector": "^2.0.0" -``` - -2. Register the CMS block form plugin. -3. Add `CmsBlockCategoryFormPlugin` to the CMS Block GUI dependency provider (`\Pyz\Zed\CmsBlockGui\CmsBlockGuiDependencyProvider`). - -```php - new CmsBlockCategoryConnectorCollectorPlugin(), - ]; - }; - } -} -``` - -7. Register Category form and form handler plugins. - -```php - new CmsBlockCategoryConnectorCollectorPlugin(), - ]; - }; - } -} -``` - -12. Register Category form and form handler plugins. - -```php - - - -**To configure the block:** -1. In the Zed UI, go to the CMS section and navigate to the blocks section. -2. Click Create CMS Block to create a new block. -3. From the template drop-down, select the new template and name the new block. -4. Set the "Category" and enter the category URL in the Category field. While typing, the product search will offer suggestions from the product list. -5. View on a CMS Block edit page. - -6. View on a Category edit page. - - -7. Set the block to active to use it straight away. -8. After clicking **Save**, you will be prompted to provide glossary keys for the placeholders included in the Twig template. -9. Embed the block into the category page by adding the following code in the `catalog.twig` template: - -```php -{% raw %}{%{% endraw %} if category is defined {% raw %}%}{% endraw %} - {% raw %}{{{% endraw %} spyCmsBlock({category: category.id}) {% raw %}}}{% endraw %} -{% raw %}{%{% endraw %} endif {% raw %}%}{% endraw %} -``` -10. To see the page in Yves, the client data storage (Redis) must be up-to-date. This is handled through `cronjobs`. -11. To manually execute this step, run the collectors to update the frontend data storage: - -```bash -vendor/bin/console collector:storage:export -``` - -**To configure block positions** -Usually you don't want to change Twig templates for each block assignment, but still be able to manage CMS Blocks from Zed GUI. In this case we recommend to use positioning. - -CMS Block positioning means that you can predefine some of the useful places in your Twig templates once and then manage your CMS Blocks based on relations to categories and position. For example, you could define "header", "body", "footer" positions to manage your CMS Blocks in those places independently. - - By default we provide the following positions: "Top", "Middle", "Bottom", but you can easily change them in the module configuration on a project level (put your extension of `CmsBlockCategoryConnectorConfig` with the replaced method `getCmsBlockCategoryPositionList` to `Pyz\Zed\CmsBlockCategoryConnector\CmsBlockCategoryConnectorConfig` as in the example below). - -```php - new CmsBlockProductConnectorCollectorPlugin(), - ]; - }; - } -} -``` - -5. Register the product list plugin (optional). -To show which product abstracts are assigned to a block on a block view page, add `CmsBlockProductAbstractListViewPlugin` to the CMS Block GUI dependency provider. - -```php - - - diff --git a/docs/scos/dev/feature-integration-guides/202005.0/inventory-management-feature-integration.md b/docs/scos/dev/feature-integration-guides/202005.0/inventory-management-feature-integration.md deleted file mode 100644 index 2e83e903541..00000000000 --- a/docs/scos/dev/feature-integration-guides/202005.0/inventory-management-feature-integration.md +++ /dev/null @@ -1,246 +0,0 @@ ---- -title: Inventory Management feature integration -description: The guide guides you through the process of installing the Warehouse Management functionality into your project. -last_updated: Apr 30, 2020 -template: feature-integration-guide-template -originalLink: https://documentation.spryker.com/v5/docs/inventory-management-feature-integration -originalArticleId: 955e0eed-f3c3-4510-a5ae-d7ba5d14166a -redirect_from: - - /v5/docs/inventory-management-feature-integration - - /v5/docs/en/inventory-management-feature-integration -related: - - title: Inventory Management feature overview - link: docs/scos/user/features/page.version/base-shop/inventory-management-feature-overview.html ---- - -{% info_block errorBox %} -The following feature integration guide expects the basic feature to be in place.
    The current feature integration guide only adds the **Warehouse Management** functionality. -{% endinfo_block %} - -## Install Feature Core -### Prerequisites -Install the required features: - -| Name | Version | -| --- | --- | -| Inventory Management | {{page.version}} | - -### 1) Install the required modules using Composer -Run the following command to install the required module: - -```bash -composer require spryker-feature/inventory-management: "^{{page.version}}" --update-with-dependencies -``` - -{% info_block warningBox "Verification" %} -Make sure that the following modules have been installed:
    ModuleExpected Directory
    `Stock``vendor/spryker/stock`
    `StockDataImport``vendor/spryker/stock-data-import`
    `StockGui``vendor/spryker/stock-gui`
    -{% endinfo_block %} - -### 2) Set up Database Schema and Transfer Objects -Run the following commands to generate transfer changes: - -```bash -console transfer:generate -console propel:install -``` - -{% info_block warningBox "Verification" %} -Make sure that the following changes have been applied in transfer objects:
    TransferTypeEventPath
    `StockTransfer`classadded`src/Generated/Shared/Transfer/StockTransfer.php`
    `StockCriteriaFilterTransfer`classadded`src/Generated/Shared/Transfer/StockCriteriaFilterTransfer.php`
    `StockResponseTransfer`classadded`src/Generated/Shared/Transfer/StockResponseTransfer.php`
    -{% endinfo_block %} - -{% info_block warningBox "Verification" %} -Make sure that the following changes have been applied by checking your database:
    Database entityTypeEvent
    `spy_stock_store`tableadded
    `spy_stock.is_active`columnadded
    -{% endinfo_block %} - -### 3) Import Data -#### Import Warehouses -Prepare your data according to your requirements using our demo data: - -**vendor/spryker/spryker/Bundles/StockDataImport/data/import/warehouse.csv** - -```yaml -name,is_active -Warehouse1,1 -Warehouse2,1 -Warehouse3,0 -``` - -| Column | REQUIRED | Data Type | Data Example | Data Explanation | -| --- | --- | --- | --- | --- | -| `name` | mandatory | string | Warehouse1 | Name of the warehouse. | -| `is_active` | mandatory | bool | 1 | Is the warehouse activated? | - -**vendor/spryker/spryker/Bundles/StockDataImport/data/import/warehouse_store.csv** - -```yaml -warehouse_name,store_name -Warehouse1,DE -Warehouse2,DE -Warehouse2,AT -Warehouse2,US -``` - -| Column | REQUIRED | Data Type | Data Example | Data Explanation | -| --- | --- | --- | --- | --- | -| `warehouse_name` | mandatory | string | Warehouse1 | Name of the warehouse. | -| `store_name` | mandatory | string | DE | Name of the store where the warehouse is available. | - -Register the following plugins to enable data import: - -| Plugin | Specification | Prerequisites | Namespace | -| --- | --- | --- | --- | -| `StockDataImportPlugin` | Imports warehouses data into the database. | None | `\Spryker\Zed\StockDataImport\Communication\Plugin` | -| `StockStoreDataImportPlugin` | Imports data about the relationship between warehouses and stores into the database. | None | `\Spryker\Zed\StockDataImport\Communication\Plugin` | - -{% info_block warningBox "Note" %} -Add these plugins to the end of the plugins list but before the `ProductOfferStockDataImportPlugin`. -{% endinfo_block %} - -**src/Pyz/Zed/DataImport/DataImportDependencyProvider.php** - -```php -createDataImporterCollection(); - -... - - $dataImporterCollection->addDataImporterPlugins($this->getDataImporterPlugins()); - - $dataImporterCollection - ->addDataImporter($this->createProductStockImporter()); - - return $dataImporterCollection; - } - -... - -} -``` - -Enable the behaviors by registering the console commands: - -**src/Pyz/Zed/Console/ConsoleDependencyProvider.php** - -```php -ModuleExpected Directory`ProductMeasurementUnit``vendor/spryker/product-measurement-unit``ProductMeasurementUnitDataImport``vendor/spryker/product-measurement-unit-data-import``ProductMeasurementUnitStorage``vendor/spryker/product-measurement-unit-storage` -{% endinfo_block %} - - -### 2) Set up Database Schema and Transfer Objects -Adjust the schema definition so entity changes will trigger events. - -|Module |Triggered events | -| --- | --- | -| `spy_product_measurement_unit` |
    • `Entity.spy_product_measurement_unit.create`
    • `Entity.spy_product_measurement_unit.update`
    • `Entity.spy_product_measurement_unit.delete`
    | -| `spy_product_measurement_base_unit` |
    • `Entity.spy_product_measurement_base_unit.create`
    • `Entity.spy_product_measurement_base_unit.update`
    • `Entity.spy_product_measurement_base_unit.delete`
    | -| `spy_product_measurement_sales_unit` |
    • `Entity.spy_product_measurement_sales_unit.create`
    • `Entity.spy_product_measurement_sales_unit.update`
    • `Entity.spy_product_measurement_sales_unit.delete`
    | -| `spy_product_measurement_sales_unit_store` |
    • `Entity.spy_product_measurement_sales_unit_store.create`
    • `Entity.spy_product_measurement_sales_unit_store.update`
    • `Entity.spy_product_measurement_sales_unit_store.delete`
    | - -**src/Pyz/Zed/ProductMeasurementUnit/Persistence/Propel/Schema/spy_product_measurement_unit.schema.xml** - -```html - - - - - - - -
    - - - - - -
    - - - - - -
    - - - - - -
    -
    -``` - -Run the following commands to apply database changes and generate entity and transfer changes: - -```bash -console transfer:generate -console propel:install -console transfer:generate -``` -{% info_block warningBox "Verification" %} -Make sure that the following changes by checking your database:
    Database EntityTypeEvent
    `spy_product_measurement_unit`tablecreated
    `spy_product_measurement_base_unit`tablecreated
    `spy_product_measurement_sales_unit`tablecreated
    `spy_product_measurement_sales_unit_store`tablecreated
    `spy_product_measurement_unit_storage`tablecreated
    `spy_product_concrete_measurement_unit_storage`tablecreated
    `spy_sales_order_item.quantity_base_measurement_unit_name`columncreated
    `spy_sales_order_item.quantity_measurement_unit_name`columncreated
    `spy_sales_order_item.quantity_measurement_unit_precision`columncreated
    `spy_sales_order_item.quantity_measurement_unit_conversion`columncreated
    -{% endinfo_block %} - -{% info_block warningBox "Verification" %} -Make sure that the following changes in transfer objects:
    TransferTypeEventPath
    `ProductMeasurementUnit`classcreated`src/Generated/Shared/Transfer/ProductMeasurementUnitTransfer`
    `ProductMeasurementBaseUnit`classcreated`src/Generated/Shared/Transfer/ProductMeasurementBaseUnitTransfer`
    `ProductMeasurementSalesUnit`classcreated`src/Generated/Shared/Transfer/ProductMeasurementSalesUnitTransfer`
    `SpyProductMeasurementUnitEntityTransfer`classcreated`src/Generated/Shared/Transfer/SpyProductMeasurementUnitEntityTransfer`
    `SpyProductMeasurementBaseUnitEntityTransfer`classcreated`src/Generated/Shared/Transfer/SpyProductMeasurementBaseUnitEntityTransfer`
    `SpyProductMeasurementSalesUnitEntityTransfer`classcreated`src/Generated/Shared/Transfer/SpyProductMeasurementSalesUnitEntityTransfer`
    `SpyProductMeasurementSalesUnitStoreEntityTransfer`classcreated`src/Generated/Shared/Transfer/SpyProductMeasurementSalesUnitStoreEntityTransfer`
    `ProductMeasurementUnitStorage`classcreated`src/Generated/Shared/Transfer/ProductMeasurementUnitStorageTransfer`
    `ProductConcreteMeasurementBaseUnit`classcreated`src/Generated/Shared/Transfer/ProductConcreteMeasurementBaseUnitTransfer`
    `ProductConcreteMeasurementSalesUnit`classcreated`src/Generated/Shared/Transfer/ProductConcreteMeasurementSalesUnitTransfer`
    `ProductConcreteMeasurementUnitStorage`classcreated`src/Generated/Shared/Transfer/ProductConcreteMeasurementUnitStorageTransfer`
    `SpyProductMeasurementUnitStorageEntity`classcreated`src/Generated/Shared/Transfer/SpyProductMeasurementUnitStorageEntityTransfer`
    `SpyProductConcreteMeasurementUnitStorageEntity`classcreated`src/Generated/Shared/Transfer/SpyProductConcreteMeasurementUnitStorageEntityTransfer`
    -{% endinfo_block %} - -{% info_block warningBox "Verification" %} -Make sure that the changes were implemented successfully. For this purpose, trigger the following methods and make sure that the above events have been triggered:
    PathMethod Name
    `src/Orm/Zed/ProductMeasurementUnit/Persistence/Base/SpyProductMeasurementUnit.php`
    • `prepareSaveEventName( -{% endinfo_block %}`
    • `addSaveEventToMemory()`
    • `addDeleteEventToMemory()`
    `src/Orm/Zed/ProductMeasurementUnit/Persistence/Base/SpyProductMeasurementBaseUnit.php`
    • `prepareSaveEventName()`
    • `addSaveEventToMemory()`
    • `addDeleteEventToMemory()`
    `src/Orm/Zed/ProductMeasurementUnit/Persistence/Base/SpyProductMeasurementSalesUnit.php`
    • `prepareSaveEventName()`
    • `addSaveEventToMemory()`
    • `addDeleteEventToMemory()`
    `src/Orm/Zed/ProductMeasurementUnit/Persistence/Base/SpyProductMeasurementSalesUnitStore.php`
    • `prepareSaveEventName()`
    • `addSaveEventToMemory()`
    • `addDeleteEventToMemory()`
    ) - -### 3) Add Translations - -{% info_block infoBox "Info" %} -All measurement units need to have glossary entities for the configured locales. -{% endinfo_block %} -Infrastructural record's glossary keys: - -**src/data/import/glossary.csv** - -```yaml -measurement_units.item.name,Item,en_US -measurement_units.item.name,Stück,de_DE -``` - -Demo data glossary keys: - -**src/data/import/glossary.csv** - -```yaml -measurement_units.standard.weight.kilo.name,Kilo,en_US -measurement_units.standard.weight.gram.name,Gram,en_US -measurement_units.standard.length.metre.name,Meter,en_US -measurement_units.standard.length.centimetre.name,Centimeter,en_US -measurement_units.standard.length.feet.name,Feet,en_US -measurement_units.standard.weight.kilo.name,Kilo,de_DE -measurement_units.standard.weight.gram.name,Gramm,de_DE -measurement_units.standard.length.metre.name,Meter,de_DE -measurement_units.standard.length.centimetre.name,Centimeter,de_DE -measurement_units.standard.length.feet.name,Fuß,de_DE -``` - -Run the following console command to import data: -```bash -console data:import glossary -``` - {% info_block warningBox "Verification" %} -Make sure that in the database the configured data are added to the `spy_glossary` table. -{% endinfo_block %} - - -### 4) Configure Export to Redis -This step will publish tables on change (create, edit, delete) to the `spy_product_measurement_unit_storage` and `spy_product_concrete_measurement_unit_storage` and synchronise the data to Storage. - -#### Set up Event Listeners - -| Plugin | Specification | Prerequisites | Namespace | -| --- | --- | --- | --- | -| `ProductMeasurementUnitStorageEventSubscriber` | Registers listeners that are responsible to publish product measurement unit storage entity changes when a related entity change event occurs. | None | `Spryker\Zed\ProductMeasurementUnitStorage\Communication\Plugin\Event\Subscriber` | - -**src/Pyz/Zed/Event/EventDependencyProvider.php** - -```php - add(new ProductMeasurementUnitStorageEventSubscriber()); - - return $eventSubscriberCollection; - } -} -``` - -#### Setup Re-Generate and Re-Sync Features - -| Plugin | Specification | Prerequisites | Namespace | -| --- | --- | --- | --- | -| `ProductConcreteMeasurementUnitEventResourceRepositoryPlugin` | Allows populating empty storage table with data. | None | `Spryker\Zed\ProductMeasurementUnitStorage\Communication\Plugin\Event` | -| `ProductMeasurementUnitEventResourceRepositoryPlugin` | Allows populating empty storage table with data. | None | `Spryker\Zed\ProductMeasurementUnitStorage\Communication\Plugin\Event` | -| `ProductConcreteMeasurementUnitSynchronizationDataPlugin` | Allows synchronizing the whole storage table content into Storage. | None | `Spryker\Zed\ProductMeasurementUnitStorage\Communication\Plugin\Synchronization` | -| `ProductMeasurementUnitSynchronizationDataPlugin` | Allows synchronizing the whole storage table content into Storage. | None | `Spryker\Zed\ProductMeasurementUnitStorage\Communication\Plugin\Synchronization` | - -**src/Pyz/Zed/EventBehavior/EventBehaviorDependencyProvider.php** - -```php -
  • Referred product abstracts to be imported
  • Referred measurement units to be imported
|`Spryker\Zed\ProductMeasurementUnitDataImport\Communication\Plugin` | - -**src/Pyz/Zed/DataImport/DataImportDependencyProvider.php** - -```php -A custom multiplier that is used to calculate base unit. This field can be empty if both base and sales unit code is defined in the general [conversion ratios](https://github.com/spryker/util-measurement-unit-conversion/blob/1ae26cf8e629d25157e273097941bde438a24ddc/src/Spryker/Service/UtilMeasurementUnitConversion/UtilMeasurementUnitConversionConfig.php).

Example: 5 means that 1 quantity of this sales unit represents 5 of the base unit.

| -|precision|mandatory|integer, power of ten, empty|100|A property that affects how detailed to render a float measurement unit. Affects visual only, not used in calculations.
When left empty, the precision of the measurement unit is used.| -|is_displayed|mandatory|integer|0|Controls if the sales unit can be displayed for customers.| -|is_default|mandatory|integer|1|Controls if this sales unit is preferred as the default sales unit when offered for customers.
Takes no effect if is_displayed set as 0.
1 product concrete can have up to 1 default sales unit.| - -Register the following plugin: - -| Plugin | Specification |Prerequisites |Namespace | -| --- | --- | --- | --- | -| `ProductMeasurementSalesUnitDataImportPlugin` | Imports sales measurement unit definitions into the database. |
  • Referred product concretes to be imported
  • Related product abstracts to be imported
  • Related product abstracts' base units to be imported
  • Referred measurement units to be imported
| `Spryker\Zed\ProductMeasurementUnitDataImport\Communication\Plugin` | - -**src/Pyz/Zed/DataImport/DataImportDependencyProvider.php** - -```php -Proceed with this step even if you have only 1 Store. -{% endinfo_block %} - -Prepare your data according to your requirements using our demo data: - -**vendor/spryker/product-measurement-unit-data-import/data/import/product_measurement_sales_unit_store.csv** - -```yaml -sales_unit_key,store_name -sales_unit_1,DE -sales_unit_1,US -sales_unit_1,AT -sales_unit_2,DE -sales_unit_2,US -sales_unit_2,AT -sales_unit_3,DE -sales_unit_3,US -sales_unit_3,AT -sales_unit_4,DE -sales_unit_4,AT -sales_unit_5,US -sales_unit_6,DE -sales_unit_6,US -sales_unit_6,AT -sales_unit_7,DE -sales_unit_7,US -sales_unit_7,AT -sales_unit_8,DE -sales_unit_8,US -sales_unit_8,AT -sales_unit_9,DE -sales_unit_9,US -sales_unit_9,AT -sales_unit_10,DE -sales_unit_10,US -sales_unit_10,AT -sales_unit_11,DE -sales_unit_11,US -sales_unit_11,AT -sales_unit_12,DE -sales_unit_12,AT -sales_unit_12,US -sales_unit_13,DE -sales_unit_13,US -sales_unit_13,AT -sales_unit_14,DE -sales_unit_14,US -sales_unit_14,AT -sales_unit_15,DE -sales_unit_15,US -sales_unit_15,AT -sales_unit_16,DE -sales_unit_16,US -sales_unit_16,AT -sales_unit_17,DE -sales_unit_17,US -sales_unit_17,AT -sales_unit_18,DE -sales_unit_18,US -sales_unit_18,AT -sales_unit_19,DE -sales_unit_19,US -sales_unit_19,AT -``` - -| Column |Is obligatory? |Data type | Data example |Data explanation | -| --- | --- | --- | --- | --- | -| `sales_unit_key` |mandatory | string | sales_unit_1 |A reference used for the product measurement sales unit data import. | -|`store_name`|mandatory|string|DE|Contains the store name where the sales unit is available.| -Register the following plugin: - -|Plugin | Specification | Prerequisites|Namespace | -| --- | --- | --- | --- | -|`ProductMeasurementSalesUnitStoreDataImportPlugin` |Imports sales measurement units' Store configuration into the database. |
  • Referred sales units to be imported.
  • Referred Stores to be imported.
| `Spryker\Zed\ProductMeasurementUnitDataImport\Communication\Plugin` | - -**src/Pyz/Zed/DataImport/DataImportDependencyProvider.php** - -```php -` action works with measurement units by adding an item to cart with sales unit and checking if `QuoteTransfer.items[].quantitySalesUnit` record gets populated. -{% endinfo_block %} -{% info_block warningBox "Verification" %} -Make sure that checkout workflow works with measurement unit by ordering item with sales unit and checking the `spy_sales_order_item` contains `quantity_base_measurement_unit_name`, `quantity_measurement_unit_name`, `quantity_measurement_unit_code`, `quantity_measurement_unit_precision` and `quantity_measurement_unit_conversion` fields populated -{% endinfo_block %} - -## Install feature frontend -### Prerequisites -Please overview and install the necessary features before beginning the integration step. - -|Name | Version | -| --- | --- | -| Spryker Core E-commerce |master | -|Checkout|master| -### 1) Install the required modules using Composer - -Run the following command(s) to install the required modules: -```bash -composer require spryker-feature/measurement-units: "^master" --update-with-dependencies -``` - -{% info_block warningBox "Verification" %} -Make sure that the following modules are installed:
ModuleExpected Directory
`ProductMeasurementUnitWidget``vendor/spryker-shop/product-measurement-unit-widget`
-{% endinfo_block %} - - -### 2) Add Translations - -Append glossary according to your configuration: - -**src/data/import/glossary.csv** - -```yaml -cart.item_quantity,Quantity,en_US -product.measurement.sales_unit,Sales Unit,en_US -page.detail.add-to-cart,Add to Cart,en_US -measurement_units.recommendation.between-units-info,The quantity you have chosen is in between 2 base units,en_US -measurement_units.recommendation.min-violation,Minimum quantity requirements for product are not fulfilled,en_US -measurement_units.recommendation.max-violation,Maximum quantity requirements for product are not fulfilled,en_US -measurement_units.recommendation.suggestion,Would you like to add,en_US -cart.pre.check.quantity.min.failed,Minimum quantity requirements for product SKU '%sku%' are not fulfilled.,en_US -cart.pre.check.quantity.max.failed,Maximum quantity for product SKU '%sku%' is exceeded.,en_US -cart.pre.check.quantity.interval.failed,Quantity interval requirements for product SKU '%sku%' are not fulfilled.,en_US -cart.item_quantity,Anzahl,de_DE -product.measurement.sales_unit,Maßeinheit,de_DE -page.detail.add-to-cart,In den Warenkorb,de_DE -measurement_units.recommendation.between-units-info,Ihre gewählte Anzahl liegt zwischen 2 basis Einheiten,de_DE -measurement_units.recommendation.min-violation,Minimale Mengenanforderungen für das Produkt sind nicht erfüllt,de_DE -measurement_units.recommendation.max-violation,Maximale Mengenanforderungen für das Produkt sind nicht erfüllt,de_DE -measurement_units.recommendation.suggestion,Was würden Sie gerne hinzufügen? ,de_DE -cart.pre.check.quantity.min.failed,Die Mindestanzahl für Produkt SKU '%sku%' ist nicht erreicht.,de_DE -cart.pre.check.quantity.max.failed,Die Maximalanzahl für Produkt SKU '%sku%' ist überschritten.,de_DE -cart.pre.check.quantity.interval.failed,Die Anzahl für Produkt SKU '%sku%' liegt nicht innerhalb des vorgegebenen Intervals.,de_DE -``` - -Run the following console command to import data: -```bash -console data:import glossary -``` - -{% info_block warningBox "Verification" %} -Make sure that in the database the configured data are added to the `spy_glossary` table. -{% endinfo_block %} - -### 3) Set up Widgets - -Register the following plugins to enable widgets: - -| Plugin | Description | Prerequisites | Namespace | -| --- | --- | --- | --- | -| `ProductMeasurementUnitWidgetPlugin` | Allows customers to select sales units for the product when adding to cart. |None | `SprykerShop\Yves\ProductMeasurementUnitWidget\Plugin\ProductDetailPage` | -|`QuantitySalesUnitWidgetPlugin`|Displays selected sales unit information for products on the cart overview page.|None|`SprykerShop\Yves\ProductMeasurementUnitWidget\Plugin\CartPage`| - -**src/Pyz/Yves/ProductDetailPage/ProductDetailPageDependencyProvider.php** - -```php - sales unit calculations. Applies product quantity restrictions on sales unit level. Offers recommendation when invalid quantity is selected. Maintains stock-based quantity and sales unit information for posting |`vendor/spryker-shop/product-measurement-unit-widget/src/SprykerShop/Yves/ProductMeasurementUnitWidget/Theme/default/components/molecules/measurement-quantity-selector/measurement-quantity-selector.ts` | - -Run the following command to enable Javascript and CSS changes: -```bash -console frontend:yves:build -``` - -{% info_block warningBox "Verification" %} -Make sure that the following widgets were registered:
ModuleTest
`ProductMeasurementUnitWidgetPlugin`Go to the product detail page where the product has sales units and add a product to the cart with a sales unit.
`QuantitySalesUnitWidgetPlugin`Go to the cart overview page and see if the sales unit information appears for a product.
-{% endinfo_block %} diff --git a/docs/scos/dev/feature-integration-guides/202005.0/merchant-b2b-contracts-feature-integration.md b/docs/scos/dev/feature-integration-guides/202005.0/merchant-b2b-contracts-feature-integration.md deleted file mode 100644 index 859508dfe91..00000000000 --- a/docs/scos/dev/feature-integration-guides/202005.0/merchant-b2b-contracts-feature-integration.md +++ /dev/null @@ -1,168 +0,0 @@ ---- -title: Merchant B2B Contracts feature integration -description: The guide walks you through the process of installing the Merchant Contracts feature into the project. -last_updated: Apr 30, 2020 -template: feature-integration-guide-template -originalLink: https://documentation.spryker.com/v5/docs/merchant-contracts-feature-integration -originalArticleId: 43271ecc-dba4-4780-addb-2551fcace447 -redirect_from: - - /v5/docs/merchant-contracts-feature-integration - - /v5/docs/en/merchant-contracts-feature-integration ---- - -## Install Feature Core - -### Prerequisites - -Install the required features: - -| Name | Version | -|---|---| -| Merchant | {{page.version}} | -| Spryker Core | {{page.version}} | - -### 1) Install the required modules using Composer - -Run the following command(s) to install the required modules: -```bash -composer require spryker-feature/merchant-contracts: "^{{page.version}}" --update-with-dependencies -``` - -{% info_block warningBox "Verification" %} -Make sure that the following modules were installed:
ModuleExpected Directory
`MerchantRelationship``vendor/spryker/merchant-relationship`
`MerchantRelationshipExtension``vendor/spryker/merchant-relationship-extension`
`MerchantRelationshipDataImport``vendor/spryker/merchant-relationship-data-import`
`MerchantRelationshipGui``vendor/spryker/merchant-relationship-gui`
-{% endinfo_block %} - -### 2) Set up Database Schema and Transfer Objects - -Run the following commands to apply database changes and generate entity and transfer changes: -```bash -console transfer:generate -console propel:install -console transfer:generate -``` - -{% info_block warningBox "Verification" %} -Make sure that the following changes by checking your database:
Database EntityType
`spy_merchant_relationship`table
`spy_merchant_relationship_to_company_business_unit`table
-{% endinfo_block %} - -{% info_block warningBox "Verification" %} -Make sure that the following changes have been applied in transfer objects:
TransferTypeEventPath
`MerchantRelationship`classcreated`src/Generated/Shared/Transfer/MerchantRelationshipTransfer`
`SpyMerchantRelationshipEntity`classcreated`src/Generated/Shared/Transfer/SpyMerchantRelationshipEntityTransfer`
`CompanyBusinessUnit.merchantRelationships`columnadded`src/Generated/Shared/Transfer/CompanyBusinessUnitTransfer`
-{% endinfo_block %} - -### 3) Import Data - -#### Import Merchant Relationships - -The following imported entities will be used as merchant relationships in Spryker OS. - -Prepare your data according to your requirements using our demo data: - -**vendor/spryker/merchant-relationship-data-import/data/import/merchant_relationship.csv** - - ```yaml -merchant_relation_key,merchant_key,company_business_unit_owner_key,company_business_unit_assignee_keys -mr-001,kudu-merchant-1,test-business-unit-1,"test-business-unit-2" -mr-002,oryx-merchant-1,test-business-unit-1,"test-business-unit-1;test-business-unit-2" -mr-003,oryx-merchant-1,test-business-unit-2,"test-business-unit-1" -mr-004,oryx-merchant-1,trial-bus-unit-1, -mr-005,oryx-merchant-1,trial-bus-unit-2,"trial-bus-unit-3;trial-bus-unit-1" -mr-006,oryx-merchant-1,proof-bus-unit-2,"proof-bus-unit-2" -mr-007,kudu-merchant-1,proof-bus-unit-1,"proof-bus-unit-1;proof-bus-unit-2;proof-bus-unit-3" -sugar-monster-spryker-hq-1,sugar-monster,spryker_systems_HQ,spryker_systems_HQ -sugar-monster-spryker-hq-2,sugar-monster,spryker_systems_HQ,spryker_systems_Barcelona -sugar-monster-spryker-hq-3,sugar-monster,spryker_systems_HQ,spryker_systems_Zurich -sugar-monster-spryker-hq-4,sugar-monster,spryker_systems_HQ,spryker_systems_Zurich_Sales -sugar-monster-spryker-hq-5,sugar-monster,spryker_systems_HQ,spryker_systems_Zurich_Support -sugar-monster-spryker-hq-6,sugar-monster,spryker_systems_HQ,spryker_systems_Berlin -sugar-monster-spryker-hq-7,sugar-monster,spryker_systems_HQ,spryker_systems_HR -sugar-monster-ottom-supplier-1,sugar-monster,Supplier_Department,Supplier_Department -sugar-monster-ottom-supplier-2,sugar-monster,Supplier_Department,Ottom_store_Berlin -sugar-monster-ottom-supplier-3,sugar-monster,Supplier_Department,Ottom_store_Oslo -sugar-monster-ottom-supplier-4,sugar-monster,Supplier_Department,Ottom_store_London -mr-008,restrictions-merchant,BU-IT-no-ASUS,BU-IT-no-tablets;BU-IT-no-ASUS -mr-009,restrictions-merchant,BU-IT-only-wearables,"BU-IT-only-wearables" -mr-010,restrictions-merchant,Sales-under-400,"Sales-under-400" -mr-011,restrictions-merchant,Sales,Sales;Sales-under-400 -``` - -| Column | REQUIREData Type | Data Example | Data Explanation | -|---|---|---|---|---| -| `merchant_relation_key` | optional | string | mr-002 | A reference used for the merchant relationship data import. | -| `merchant_key` | mandatory | string | kudu-merchant-1 | A reference used to define a Merchant of the contract (relationship) between him and the company business unit. | -| `company_business_unit_owner_key` | mandatory | string | test-business-unit-1 | A reference used to define a Company Business Unit of the contract (relationship) between it and a Merchant. | -| `company_business_unit_assignee_keys` | optional | string | "test-business-unit-1;test-business-unit-2" | A reference to the assigned business units, on which this contract is applied. | - -Register the following plugin to enable data import: - -| Plugin | Specification | Prerequisites | Namespace | -|---|---|---|---| -| `MerchantRelationshipDataImportPlugin` | Imports merchant relationship data into the database. | None | `Spryker\Zed\MerchantRelationshipDataImport\Communication\Plugin` | - -**src/Pyz/Zed/DataImport/DataImportDependencyProvider.php** - -```php -ModuleExpected Directory`PriceProductMerchantRelationship``vendor/spryker/price-product-merchant-relationship``PriceProductMerchantRelationshipDataImport``vendor/spryker/price-product-merchant-relationship-data-import``PriceProductMerchantRelationshipGui``vendor/spryker/price-product-merchant-relationship-gui``PriceProductMerchantRelationshipStorage``vendor/spryker/price-product-merchant-relationship-storage` -{% endinfo_block %} - -### 2) Set up Database Schema -Adjust the schema definition so that entity changes can trigger events: - -| Affected Entity | Triggered Events | -| --- | --- | -| `spy_price_product_merchant_relationship` | `Entity.spy_price_product_merchant_relationship.create`
`Entity.spy_price_product_merchant_relationship.update`
`Entity.spy_price_product_merchant_relationship.delete` | - -**src/Pyz/Zed/PriceProductMerchantRelationship/Persistence/Propel/Schema/spy_price_product_merchant_relationship.schema.xml** - -```html - - - - - - - -
- -
-``` - -Run the following commands: - -```bash -console transfer:generate -console propel:install -console transfer:generate -``` - -{% info_block warningBox "Verification" %} -Make sure that the following changes in transfer objects have been applied:
TransferTypeEventPath
`PriceProductMerchantRelationshipStorageTransfer`classcreated`src/Generated/Shared/Transfer/PriceProductMerchantRelationshipStorageTransfer.php`
`PriceProductDimensionTransfer.idMerchantRelationship`propertyadded`src/Generated/Shared/Transfer/PriceProductDimensionTransfer.php`
-{% endinfo_block %} - -{% info_block warningBox "Verification" %} -Make sure that the following changes have been applied by checking your database.
TransferTypeEvent
`spy_price_product_merchant_relationship`tablecreated
`spy_price_product_concrete_merchant_relationship_storage`tablecreated
`spy_price_product_abstract_merchant_relationship_storage`tablecreated
-{% endinfo_block %} - -{% info_block warningBox "Verification" %} -Make sure that the changes were implemented successfully. For this purpose, trigger the following methods and check that the above events have been triggered as well:
Class PathMethod Name
`src/Orm/Zed/PriceProductMerchantRelationship/Persistence/Base/SpyPriceProductMerchantRelationship.php``prepareSaveEventName( -{% endinfo_block %}`
`addSaveEventToMemory()`
`addDeleteEventToMemory()`
) - -### 3) Configure Export to Redis -{% info_block infoBox %} -With this step, you will be able to publish prices on change (create, edit, delete -{% endinfo_block %} to `spy_price_product_abstract_merchant_relationship_storage`, `spy_price_product_concrete_merchant_relationship_storage` and synchronize the data to Storage.) - -#### Set up Event Listeners - -| Plugin | Specification | Prerequisites | Namespace | -| --- | --- | --- | --- | -| `PriceProductMerchantRelationshipStorageEventSubscriber` | Registers listeners that are responsible for publishing merchant prices to storage when a related entity changes. | None | `Spryker\Zed\ProductListStorage\Communication\Plugin\Event\Subscriber` | - -**src/Pyz/Zed/Event/EventDependencyProvider.php** - -```php -add(new PriceProductMerchantRelationshipStorageEventSubscriber()); - - return $eventSubscriberCollection; - } -} -``` - -{% info_block warningBox "Verification" %} -Make sure when prices are exported, created, updated, or deleted manually in Zed UI, they are exported (or removed -{% endinfo_block %} to Redis accordingly.
Storage TypeTarget EntityExample Expected Data Identifier
RedisProduct Abstract Price`kv:price_product_abstract_merchant_relationship:de:1:1`
RedisProduct Concrete Price`kv:price_product_concrete_merchant_relationship:de:1:1`
) - -**Example Expected Data Fragment: Product Abstract Price** - -```yaml -{ - "prices": { - "2": { - "EUR": { - "priceData": null, - "GROSS_MODE": { - "DEFAULT": 9922 - }, - "NET_MODE": { - "DEFAULT": 8922 - } - }, - "CHF": { - "priceData": null, - "GROSS_MODE": { - "DEFAULT": 11422 - }, - "NET_MODE": { - "DEFAULT": 10322 - } - } - } - } -} -``` - -**Example Expected Data Fragment: Product Concrete Price** - -```yaml -{ -"prices": { - "2": { - "EUR": { - "priceData": null, - "GROSS_MODE": { - "DEFAULT": 12322 - }, - "NET_MODE": { - "DEFAULT": 11222 - } - }, - "CHF": { - "priceData": null, - "GROSS_MODE": { - "DEFAULT": 10122 - }, - "NET_MODE": { - "DEFAULT": 12522 - } - } - } - } -} -``` - -#### Add Synchronization Plugins - -| Plugin | Specification | Prerequisites | Namespace | -| --- | --- | --- | --- | -| `PriceProductAbstractMerchantRelationSynchronizationDataPlugin` | Can be executed to synchronize all `price_product_abstract_merchant_relationship` entries from the database to Redis. | None | `Spryker\Zed\PriceProductMerchantRelationshipStorage\Communication\Plugin\Synchronization` | -| `PriceProductConcreteMerchantRelationSynchronizationDataPlugin` | Can be executed to synchronize all `price_product_concrete_merchant_relationship` entries from the database to Redis. | None | `Spryker\Zed\PriceProductMerchantRelationshipStorage\Communication\Plugin\Synchronization` | - -**src/Pyz/Zed/Synchronization/SynchronizationDependencyProvider.php** - -```php -Make sure that this user sees MIN price if their business unit is assigned to multiple Merchant Relationships with different prices for the same product. -{% endinfo_block %} - -### Ensure Compatibility -Check the following compatibility issues: - -| Plugin | Specification | Namespace | -| --- | --- | --- | -| `PriceFacetConfigTransferBuilderPlugin` | This plugin displays price-range filter on the catalog page. It should be removed from plugin stack to avoid wrong displaying product with merchant prices. | `Spryker\Client\CatalogPriceProductConnector\Plugin\ConfigTransferBuilder` | - -{% info_block warningBox "Verification" %} -Make sure that the price range filter is not displayed on the catalog page. -{% endinfo_block %} diff --git a/docs/scos/dev/feature-integration-guides/202005.0/merchant-product-restrictions-feature-integration.md b/docs/scos/dev/feature-integration-guides/202005.0/merchant-product-restrictions-feature-integration.md deleted file mode 100644 index 500ee833c15..00000000000 --- a/docs/scos/dev/feature-integration-guides/202005.0/merchant-product-restrictions-feature-integration.md +++ /dev/null @@ -1,336 +0,0 @@ ---- -title: Merchant Product Restrictions feature integration -description: Merchant Product Restrictions allows setting access to particular products. This guide describes the process of integrating the feature into a project. -last_updated: Apr 30, 2020 -template: feature-integration-guide-template -originalLink: https://documentation.spryker.com/v5/docs/merchant-product-restrictions-feature-integration -originalArticleId: b70db8f8-6ea4-4b0a-8de1-916ec005e804 -redirect_from: - - /v5/docs/merchant-product-restrictions-feature-integration - - /v5/docs/en/merchant-product-restrictions-feature-integration -related: - - title: Configurable Bundle feature integration - link: docs/scos/dev/feature-integration-guides/page.version/configurable-bundle-feature-integration.html - - title: Product feature integration - link: docs/scos/dev/feature-integration-guides/page.version/product-feature-integration.html - - title: Product Lists feature integration - link: docs/scos/dev/feature-integration-guides/page.version/product-lists-feature-integration.html - - title: Prices feature integration - link: docs/scos/dev/feature-integration-guides/page.version/prices-feature-integration.html - - title: Product Images + Configurable Bundle feature integration - link: docs/scos/dev/feature-integration-guides/page.version/product-images-configurable-bundle-feature-integration.html ---- - -## Install Feature Core -### Prerequisites -Install the required features: - -| Name | Version | -| --- | --- | -| Spryker Core |{{page.version}} | -| Product Lists | {{page.version}} | -| Merchant | {{page.version}} | - -### 1) Install the required modules using Composer -Run the following command(s) to install the required modules: - -```bash -composer require spryker-feature/merchant-product-restrictions:"^{{page.version}}" --update-with-dependencies -``` - -{% info_block warningBox "Verification" %} - -Make sure that the following modules were installed: - -| Module | Expected Directory | -| --- | --- | -| `MerchantRelationshipProductList` | `vendor/spryker/merchant-relationship-product-list` | -| `MerchantRelationshipProductListDataImport` | `vendor/spryker/merchant-relationship-product-list-data-import` | -| `MerchantRelationshipProductListGui` | `vendor/spryker/merchant-relationship-product-list-gui` | - -{% endinfo_block %} - -### 2) Set up Database Schema -Run the following commands to apply database changes, as well as generate entity and transfer changes: - -```bash -console transfer:generate -console propel:install -console transfer:generate -``` -{% info_block warningBox "Verification" %} - -Make sure that the following changes by checking your database: - -| Database Entity | Type | Event | -| --- | --- | --- | -| `spy_product_list.fk_merchant_relationship` | column | created | - -{% endinfo_block %} - -{% info_block warningBox "Verification" %} - -Make sure that the following changes have been applied in transfer objects: - -| Transfer | Type | Event | Type | -| --- | --- | --- | --- | -| `MerchantRelationshipFilter` | class | created | `src/Generated/Shared/Transfer/MerchantRelationshipFilterTransfer` | - -{% endinfo_block %} - - -### 3) Import Data -#### Import Merchant Relationship to Product Lists -Prepare your data according to your requirements using our demo data: - -```yaml -merchant_relation_key,product_list_key -mr-008,pl-001 -mr-008,pl-002 -mr-008,pl-003 -mr-009,pl-004 -mr-010,pl-005 -mr-011,pl-006 -mr-011,pl-007 -mr-011,pl-008 -``` - -| Column | REQUIRED | Data Type | Data Example | Data Explanation | -| --- | --- | --- | --- | --- | -|`merchant_relation_key` | mandatory | string | mr-008 | Identifier of merchant relations. The merchant relations must exist already. | -| `product_list_key` |mandatory | string | pl-001 | Identifier of product lists. The product lists must exist already. | - -Register the following plugin to enable data import: - -| Plugin | Specification | Prerequisites | Namespace | -| --- | --- | --- | --- | -| `MerchantRelationshipProductListDataImportPlugin` | Imports basic product list data into the database. |
  • Merchant relations must be imported first.
  • Product lists must be imported first.
| `Spryker\Zed\MerchantRelationshipProductListDataImport\Communication\Plugin` | - -**src/Pyz/Zed/DataImport/DataImportDependencyProvider.php** - -```php -
  • Expands the customer transfer object with their assigned product lists.
  • The product list information is based on the customer's merchant relationship.
  • | None | `Spryker\Zed\MerchantRelationshipProductList\Communication\Plugin\Customer` | - -**src/Pyz/Zed/Customer/CustomerDependencyProvider.php** - -```php -ModuleExpected Directory`MultiCart``vendor/spryker/multi-cart``MultiCartDataImport``vendor/spryker/multi-cart-data-import` -{% endinfo_block %} - -### 2) Set up Database Schema and Transfer Objects - -Run the following commands to apply database changes and generate entity and transfer changes: - -```bash -console transfer:generate -console propel:install -console transfer:generate -``` - -{% info_block warningBox "Verification" %} -Make sure that the following changes have been applied by checking your database:
    Database EntityTypeEvent
    `spy_quote.name`columncreated
    `spy_quote.is_default`columncreated
    `spy_quote.key`columncreated
    `spy_quote-unique-name-customer_reference`indexcreated
    -{% endinfo_block %} - -| Database Entity | Type | Event | -| --- | --- | --- | -| `spy_quote.name` | column | created | -| `spy_quote.is_default` | column | created | -| `spy_quote.key` | column | created | -| `spy_quote-unique-name-customer_reference` | index | created | - -{% info_block warningBox "Verification" %} -Make sure that the following changes in transfer objects have been applied:
    TransferTypeEventPath
    `QuoteTransfer.name`columncreated`src/Generated/Shared/Transfer/QuoteTransfer`
    `QuoteTransfer.isDefault`columncreated`src/Generated/Shared/Transfer/QuoteTransfer`
    `QuoteTransfer.key`columncreated`src/Generated/Shared/Transfer/QuoteTransfer`
    `QuoteResponseTransfer.customQuotes`columncreated`src/Generated/Shared/Transfer/QuoteResponseTransfer`
    `QuoteUpdateRequestAttributesTransfer.name`.columncreated`src/Generated/Shared/Transfer/QuoteUpdateRequestAttributesTransfer`
    `QuoteUpdateRequestAttributesTransfer.totals`columncreated`src/Generated/Shared/Transfer/QuoteUpdateRequestAttributesTransfer`
    `QuoteActivationRequestTransfer`classcreated`src/Generated/Shared/Transfer/QuoteActivationRequestTransfer`
    -{% endinfo_block %} - -### 3) Add Translations - -Append glossary for the feature: - -**src/data/import/glossary.csv** - -```yaml -multi_cart.cart.set_default.success,"Cart '%quote%' was successfully set as active.",en_US -multi_cart.cart.set_default.success,"Warenkorb '%quote%' wurde erfolgreich auf aktiv gesetzt.",de_DE -``` - -Run the following console command to import data: -```bash -console data:import glossary -``` - -{% info_block warningBox "Verification" %} -Make sure that the configured data has been added to the `spy_glossary` table in the database. -{% endinfo_block %} - -### 4) Import Data -#### Import Multicarts - -{% info_block infoBox "Info" %} -The following imported entities will be used as carts in Spryker OS. -{% endinfo_block %} -Prepare your data according to your requirements using our demo data: - -**vendor/spryker/spryker/multi-cart-data-import/data/import/multi_cart.csv** - -```yaml - key,name,customer_reference,store,is_default,quote_data -quote-1,My Cart,DE--1,DE,1,"{""currency"":{""code"":""EUR"",""name"":""Euro"",""symbol"":""\u20ac"",""isDefault"":true,""fractionDigits"":2},""priceMode"":""GROSS_MODE""}" -quote-2,My Cart,DE--2,DE,1,"{""currency"":{""code"":""EUR"",""name"":""Euro"",""symbol"":""\u20ac"",""isDefault"":true,""fractionDigits"":2},""priceMode"":""GROSS_MODE""}" -quote-3,My Cart,DE--3,DE,1,"{""currency"":{""code"":""EUR"",""name"":""Euro"",""symbol"":""\u20ac"",""isDefault"":true,""fractionDigits"":2},""priceMode"":""GROSS_MODE""}" -quote-4,My Cart,DE--4,DE,1,"{""currency"":{""code"":""EUR"",""name"":""Euro"",""symbol"":""\u20ac"",""isDefault"":true,""fractionDigits"":2},""priceMode"":""GROSS_MODE""}" -quote-5,My Cart,DE--5,DE,1,"{""currency"":{""code"":""EUR"",""name"":""Euro"",""symbol"":""\u20ac"",""isDefault"":true,""fractionDigits"":2},""priceMode"":""GROSS_MODE""}" -quote-6,My Cart,DE--6,DE,1,"{""currency"":{""code"":""EUR"",""name"":""Euro"",""symbol"":""\u20ac"",""isDefault"":true,""fractionDigits"":2},""priceMode"":""GROSS_MODE""}" -quote-7,My Cart,DE--7,DE,1,"{""currency"":{""code"":""EUR"",""name"":""Euro"",""symbol"":""\u20ac"",""isDefault"":true,""fractionDigits"":2},""priceMode"":""GROSS_MODE""}" -quote-8,My Cart,DE--8,DE,1,"{""currency"":{""code"":""EUR"",""name"":""Euro"",""symbol"":""\u20ac"",""isDefault"":true,""fractionDigits"":2},""priceMode"":""GROSS_MODE""}" -quote-9,My Cart,DE--9,DE,1,"{""currency"":{""code"":""EUR"",""name"":""Euro"",""symbol"":""\u20ac"",""isDefault"":true,""fractionDigits"":2},""priceMode"":""GROSS_MODE""}" -quote-10,My Cart,DE--10,DE,1,"{""currency"":{""code"":""EUR"",""name"":""Euro"",""symbol"":""\u20ac"",""isDefault"":true,""fractionDigits"":2},""priceMode"":""GROSS_MODE""}" -quote-11,My Cart,DE--11,DE,1,"{""currency"":{""code"":""EUR"",""name"":""Euro"",""symbol"":""\u20ac"",""isDefault"":true,""fractionDigits"":2},""priceMode"":""GROSS_MODE""}" -quote-12,My Cart,DE--12,DE,1,"{""currency"":{""code"":""EUR"",""name"":""Euro"",""symbol"":""\u20ac"",""isDefault"":true,""fractionDigits"":2},""priceMode"":""GROSS_MODE""}" -quote-13,My Cart,DE--13,DE,1,"{""currency"":{""code"":""EUR"",""name"":""Euro"",""symbol"":""\u20ac"",""isDefault"":true,""fractionDigits"":2},""priceMode"":""GROSS_MODE""}" -quote-14,My Cart,DE--14,DE,1,"{""currency"":{""code"":""EUR"",""name"":""Euro"",""symbol"":""\u20ac"",""isDefault"":true,""fractionDigits"":2},""priceMode"":""GROSS_MODE""}" -quote-15,My Cart,DE--15,DE,1,"{""currency"":{""code"":""EUR"",""name"":""Euro"",""symbol"":""\u20ac"",""isDefault"":true,""fractionDigits"":2},""priceMode"":""GROSS_MODE""}" -quote-16,My Cart,DE--16,DE,1,"{""currency"":{""code"":""EUR"",""name"":""Euro"",""symbol"":""\u20ac"",""isDefault"":true,""fractionDigits"":2},""priceMode"":""GROSS_MODE""}" -quote-17,My Cart,DE--17,DE,1,"{""currency"":{""code"":""EUR"",""name"":""Euro"",""symbol"":""\u20ac"",""isDefault"":true,""fractionDigits"":2},""priceMode"":""GROSS_MODE""}" -quote-18,My Cart,DE--18,DE,1,"{""currency"":{""code"":""EUR"",""name"":""Euro"",""symbol"":""\u20ac"",""isDefault"":true,""fractionDigits"":2},""priceMode"":""GROSS_MODE""}" -quote-19,My Cart,DE--19,DE,1,"{""currency"":{""code"":""EUR"",""name"":""Euro"",""symbol"":""\u20ac"",""isDefault"":true,""fractionDigits"":2},""priceMode"":""GROSS_MODE""}" -quote-20,My Cart,DE--20,DE,1,"{""currency"":{""code"":""EUR"",""name"":""Euro"",""symbol"":""\u20ac"",""isDefault"":true,""fractionDigits"":2},""priceMode"":""GROSS_MODE""}" -quote-21,My Cart,DE--21,DE,1,"{""currency"":{""code"":""EUR"",""name"":""Euro"",""symbol"":""\u20ac"",""isDefault"":true,""fractionDigits"":2},""priceMode"":""GROSS_MODE""}" -``` - -|Column|Is Obligatory|Data Type|Data Example|Data Explanation| -|---|---|---|---|---| -`key`|mandatory|string|quote-19|Key that will identify the quote to be referred in future imports.| -|`name`|mandatory|string|>My Cart|Name of the quote.| -|`customer_reference`|mandatory|string|DE--21|Customer reference of the quote owner.| -|`store`|mandatory|string|DE|Store name that the quote relates to.| -|`is_default`|mandatory|int|1|Flag to show that the quote is default for the customer.| -|`quote_data`|mandatory|string|{""currency"":{""code"":""EUR"",""name"":""Euro"",""symbol"":""\u20ac"",""isDefault"":true,""fractionDigits"":2},""priceMode"":""GROSS_MODE""}|Quote data params serialized as json.| - -Register the following plugin to enable data import: -| Plugin | Specification | Prerequisites | Namespace | -| --- | --- | --- | --- | -| `MultiCartDataImportPlugin` | Imports customer's quotes to database. | Make sure that customers have been imported. | `Spryker\Zed\MultiCartDataImport\Communication\Plugin` | - -**src/Pyz/Zed/DataImport/DataImportDependencyProvider.php** - -```php -If the name 'Shopping cart' already exists, it will be changed to the following:
    Shopping cart → Shopping cart 1
    Shopping cart → Shopping cart 2 -{% endinfo_block %} -{% info_block warningBox "Verification" %} -Make sure that the customer has only one active cart at once. If the customer updates an inactive cart it becomes active, while the previous active cart becomes inactive. -{% endinfo_block %} - -#### Set up Persistent Cart Integration - -Register the following plugins: -| Plugin | Specification | Prerequisites | Namespace | -| --- | --- | --- | --- | -| `CustomerCartQuoteResponseExpanderPlugin` | Adds customer quote collection to quote response transfer after cart operation handling. Replaces quote with active quote if it exist. | |`Spryker\Zed\Spryker\Zed\MultiCart\Communication\Plugin` | -| `SaveCustomerQuotesQuoteUpdatePlugin` | Extracts Customer Quote Collection from quote response object and saves it to customer session. | | `Spryker\Client\MultiCart\Plugin` | -| `DefaultQuoteUpdatePlugin` | Finds Customer Default Quote in customer quote collection and saves it to customer session. | | `Spryker\Client\MultiCart\Plugin` | -| `QuoteSelectorPersistentCartChangeExpanderPlugin` | Takes quote ID form parameters and replaces it in quote change request. | | `Spryker\Client\MultiCart\Plugin` | - -**src/Pyz/Client/PersistentCart/PersistentCartDependencyProvider.php** - -```php -ModuleExpected directory`MultiCartPage``vendor/spryker-shop/multi-cart-page``MultiCartWidget``vendor/spryker-shop/multi-cart-widget` -{% endinfo_block %} - -### 2) Add Translations -Append glossary according to your configuration: -
    -src/data/import/glossary.csv - -```yaml -page.multi_cart.shopping_cart.list.title,Shopping cart,en_US -page.multi_cart.shopping_cart.list.title,Einkaufswagen,de_DE -page.multi_cart.shopping_cart.list.create_link,Create,en_US -page.multi_cart.shopping_cart.list.create_link,Erstellen,de_DE -page.multi_cart.shopping_cart.list.label.name,Name,en_US -page.multi_cart.shopping_cart.list.label.name,Name,de_DE -page.multi_cart.shopping_cart.list.label.num_of_products,Number of products,en_US -page.multi_cart.shopping_cart.list.label.num_of_products,Anzahl der Produkte,de_DE -page.multi_cart.shopping_cart.list.label.prices,Prices,en_US -page.multi_cart.shopping_cart.list.label.prices,Preise,de_DE -page.multi_cart.shopping_cart.list.label.total,Total,en_US -page.multi_cart.shopping_cart.list.label.total,Gesamt,de_DE -page.multi_cart.shopping_cart.list.label.actions,Actions,en_US -page.multi_cart.shopping_cart.list.label.actions,Aktionen,de_DE -page.multi_cart.shopping_cart.list.link.edit_name,Edit name,en_US -page.multi_cart.shopping_cart.list.link.edit_name,Namen bearbeiten,de_DE -page.multi_cart.shopping_cart.list.link.duplicate,Duplicate,en_US -page.multi_cart.shopping_cart.list.link.duplicate,Duplikat,de_DE -page.multi_cart.shopping_cart.list.link.delete,Delete,en_US -page.multi_cart.shopping_cart.list.link.delete,Löschen,de_DE -page.multi_cart.shopping_cart.list.label.item,"Item",en_US -page.multi_cart.shopping_cart.list.label.item,"Artikel",de_DE -page.multi_cart.shopping_cart.list.label.items,"Items",en_US -page.multi_cart.shopping_cart.list.label.items,"Artikel",de_DE -customer.account.shopping_cart.list.title,Manage Shopping carts,en_US -customer.account.shopping_cart.list.title,Verwalten Sie Einkaufswagen,de_DE -page.multi_cart.shopping_cart.list.label.access,Access,en_US -page.multi_cart.shopping_cart.list.label.access,Zugriff,de_DE -page.multi_cart.shopping_cart.update.title,Edit,en_US -page.multi_cart.shopping_cart.update.title,Bearbeiten,de_DE -page.multi_cart.shopping_cart.create.title,Create,en_US -page.multi_cart.shopping_cart.create.title,Erstellen,de_DE -multi_cart.form.create_cart,"Add new cart",en_US -multi_cart.form.create_cart,"Füge einen neuen Warenkorb hinzu",de_DE -multi_cart.form.quote.name,"Cart Name",en_US -multi_cart.form.quote.name,"Name des Einkaufswagens",de_DE -multi_cart.form.edit_cart,"Change Name",en_US -multi_cart.form.edit_cart,"Namen ändern",de_DE -multi_cart.form.edit_cart_information,"Edit Cart information",en_US -multi_cart.form.edit_cart_information,"Einkaufswageninformationen bearbeiten",de_DE -multi_cart.cart.set_default.success,"Cart '%quote%' was successfully set as active.",en_US -multi_cart.cart.set_default.success,"Warenkorb '%quote%' wurde erfolgreich auf aktiv gesetzt.",de_DE -multi_cart_page.cart_clear.success,"Cart was successfully cleared",en_US -multi_cart_page.cart_clear.success,"Einkaufswagen wurde erfolgreich gelöscht",de_DE -multi_cart_page.cart_delete_confirmation.warning,Warning,en_US -multi_cart_page.cart_delete_confirmation.warning,Warnung,de_DE -multi_cart_page.cart_delete_confirmation.trying_to_delete,You are trying to delete Cart,en_US -multi_cart_page.cart_delete_confirmation.trying_to_delete,Sie versuchen den Warenkorb zu löschen,de_DE -multi_cart_page.cart_delete_confirmation.shared_with,It is shared with the following users,en_US -multi_cart_page.cart_delete_confirmation.shared_with,Der Warenkorb ist mit den folgenden Personen geteilt,de_DE -multi_cart_page.cart_delete_confirmation.from_all_of_them,It will be deleted from all of them,en_US -multi_cart_page.cart_delete_confirmation.from_all_of_them,Der Warenkorb wird für alle Nutzer gelöscht,de_DE -multi_cart_page.cart_delete_confirmation.cancel,Cancel,en_US -multi_cart_page.cart_delete_confirmation.cancel,Abbrechen,de_DE -multi_cart_page.cart_delete_confirmation.delete,Delete,en_US -multi_cart_page.cart_delete_confirmation.delete,Löschen,de_DE -multi_cart_page.cart_delete_confirmation.breadcrumbs.shopping_carts,Shopping carts,en_US -multi_cart_page.cart_delete_confirmation.breadcrumbs.shopping_carts,Warenkörbe,de_DE -multi_cart_widget.cart.cart_name,"Cart Name",en_US -multi_cart_widget.cart.cart_name,"Name des Einkaufswagens",de_DE -multi_cart_widget.cart.add,"Create New Cart",en_US -multi_cart_widget.cart.add,"Neuen Warenkorb erstellen",de_DE -multi_cart_widget.cart.action.change_name,"Change Name",en_US -multi_cart_widget.cart.action.change_name,"Namen ändern",de_DE -multi_cart_widget.cart.action.duplicate,"Duplicate",en_US -multi_cart_widget.cart.action.duplicate,"Duplikat",de_DE -multi_cart_widget.cart.action.clear,"Clear cart",en_US -multi_cart_widget.cart.action.clear,"Leerer Warenkorb",de_DE -multi_cart_widget.cart.action.delete,"Delete cart",en_US -multi_cart_widget.cart.action.delete,"Warenkorb löschen",de_DE -multi_cart_widget.cart.action.view,"View details",en_US -multi_cart_widget.cart.action.view,"Warenkorb ansehen",de_DE -multi_cart_widget.cart.action.set_default,"Set active",en_US -multi_cart_widget.cart.action.set_default,"Aktiv setzen",de_DE -multi_cart_widget.cart.default,"Active",en_US -multi_cart_widget.cart.default,"Aktiv",de_DE -multi_cart_widget.cart.item,"Item",en_US -multi_cart_widget.cart.item,"Artikel",de_DE -multi_cart_widget.cart.items,"Items",en_US -multi_cart_widget.cart.items,"Artikel",de_DE -multi_cart_widget.cart.view_all,"View all carts",en_US -multi_cart_widget.cart.view_all,"Alle Warenkörbe anzeigen",de_DE -multi_cart_widget.cart.cart,"Cart",en_US -multi_cart_widget.cart.cart,"Warenkorb",de_DE -multi_cart_widget.cart.carts,"Carts",en_US -multi_cart_widget.cart.carts,"Warenkorb",de_DE -multi_cart_widget.cart.list,"Cart List",en_US -multi_cart_widget.cart.list,"Warenkorb-Liste",de_DE -multi_cart_widget.cart.status,"Status",en_US -multi_cart_widget.cart.status,"Status",de_DE -multi_cart_widget.cart.sub_total,"Sub Total",en_US -multi_cart_widget.cart.sub_total,"Zwischensumme",de_DE -multi_cart_widget.cart.actions,"Actions",en_US -multi_cart_widget.cart.actions,"Aktionen",de_DE -multi_cart_widget.cart.created.success,"Cart '%quoteName%' was created successfully",en_US -multi_cart_widget.cart.created.success,"Warenkorb '%quoteName%' wurde erfolgreich erstellt",de_DE -multi_cart_widget.cart.updated.success,"Cart updated successfully",en_US -multi_cart_widget.cart.updated.success,"Einkaufswagen wurde erfolgreich aktualisiert",de_DE -multi_cart_widget.cart.was-deleted-before,Dieser Warenkorb wurde bereits gelöscht,de_DE -multi_cart_widget.cart.was-deleted-before,This cart was already deleted,en_US -``` -
    -
    - -Run the following console command to import data: -```bash -console data:import glossary -``` - -{% info_block warningBox "Verification" %} -Make sure that in the database the configured data are added to the `spy_glossary` table. -{% endinfo_block %} - -### 3) Enable Controllers - -#### Router List - -Register the following route provider plugins: - -| Provider | Namespace | -| --- | --- | -| `MultiCartPageRouteProviderPlugin` | `SprykerShop\Yves\MultiCartPage\Plugin\Router` | - -**src/Pyz/Yves/Router/RouterDependencyProvider.php** - -```php -ModuleTest`AddToMultiCartWidget`Go to the product detail page. A shopping cart list should be added to the cart form.`CartOperationsWidget`Go to the cart overview page and see a title with the cart name and the Clear all button.`MiniCartWidget`Mini-cart with all customer's carts should be in the header.`MultiCartMenuItemWidget`Go to the customer account overview page. A shopping cart link should be in the customer navigation links. -{% endinfo_block %} - diff --git a/docs/scos/dev/feature-integration-guides/202005.0/multiple-carts-quick-order-feature-integration.md b/docs/scos/dev/feature-integration-guides/202005.0/multiple-carts-quick-order-feature-integration.md deleted file mode 100644 index 5082c339f96..00000000000 --- a/docs/scos/dev/feature-integration-guides/202005.0/multiple-carts-quick-order-feature-integration.md +++ /dev/null @@ -1,113 +0,0 @@ ---- -title: Multiple Carts + Quick Order feature integration -description: The Quick Order Feature allows ordering products by entering SKU and quantity on one page. The guide describes how to integrate the feature into your project. -last_updated: May 12, 2020 -template: feature-integration-guide-template -originalLink: https://documentation.spryker.com/v5/docs/multiple-carts-quick-order-integration-201903 -originalArticleId: 9d40f675-20ac-43d1-aa32-735800a9ae0c -redirect_from: - - /v5/docs/multiple-carts-quick-order-integration-201903 - - /v5/docs/en/multiple-carts-quick-order-integration-201903 ---- - -## Install Feature Core - -### Prerequisites - -Install the required features: - -| Name | Version | -| --- | --- | -| Multiple Carts | {{page.version}} | -| Quick Add To Cart | {{page.version}} | -| Spryker Core |{{page.version}} | - -### 1) Set up Behavior - -Register the following plugin: - -| Plugin | Specification | Prerequisites | Namespace | -| --- | --- | --- | --- | -| `QuickOrderQuoteNameExpanderPlugin` | Adds a default quick order name and adds it to add item request. | | `Spryker\Client\MultiCart\Plugin` | - -**src/Pyz/Client/PersistentCart/PersistentCartDependencyProvider.php** - -```php -ModuleTest`QuickOrderPageWidget`Go to the **Quick Order** page. A shopping cart list should be added to the **Add to cart** form. -{% endinfo_block %} diff --git a/docs/scos/dev/feature-integration-guides/202005.0/multiple-carts-reorder-feature-integration.md b/docs/scos/dev/feature-integration-guides/202005.0/multiple-carts-reorder-feature-integration.md deleted file mode 100644 index 910f7e605a2..00000000000 --- a/docs/scos/dev/feature-integration-guides/202005.0/multiple-carts-reorder-feature-integration.md +++ /dev/null @@ -1,57 +0,0 @@ ---- -title: Multiple Carts + Reorder feature integration -description: The Reorder Feature allows reordering previous orders. This guide will walk you through the process of integrating the feature into your project. -last_updated: Apr 30, 2020 -template: feature-integration-guide-template -originalLink: https://documentation.spryker.com/v5/docs/multiple-carts-reorder-feature-integration -originalArticleId: 2954b8f8-b1bd-410a-bb61-5f28585ef2c6 -redirect_from: - - /v5/docs/multiple-carts-reorder-feature-integration - - /v5/docs/en/multiple-carts-reorder-feature-integration ---- - -## Install Feature Core - -### Prerequisites - -Install the required features: - -| Name | Version | -| --- | --- | -| Multiple Carts | {{page.version}} | -| Reorder | {{page.version}} | -| Spryker Core | {{page.version}} | - -### 1) Set up Behavior -Register the following plugins: -| Plugin | Specification | Prerequisites | Namespace | -| --- | --- | --- | --- | -| `ReorderPersistentCartChangeExpanderPlugin` | Adds a default reorder name and adds it to add item request. | 1 | `Spryker\Client\MultiCart\Plugin` | - -**src/Pyz/Client/PersistentCart/PersistentCartDependencyProvider.php** - -```php - new NavigationMenuCollectorStoragePlugin(), - ]; - }; - - // ... - } -} -``` -### Data Setup -You should now be able to manage navigation menus from Zed UI, and the collectors should also be able to export the navigation menus to the KV storage. This is a good time to implement an installer in your project to install a selection of frequently used navigation menus. - -### Usage in Yves -The KV storage should by now have some navigation menus we can display in our frontend. - -The `Navigation` module ships with a twig extension that provides the `spyNavigation()` twig function which renders a navigation menu. - -`spyNavigation()` accepts two parameters: - -* `$navigationKey`: Reference of a navigation menu by its key field (for example, "MAIN_NAVIGATION"). -* `$template`: Template path used to render the navigation menu (for example, `"@application/layout/navigation/main.twig"`). - -To enable the navigation twig function, register `\Spryker\Yves\Navigation\Plugin\Provider\NavigationTwigServiceProvider` in your application’s bootstrap. - -```php -application->register(new NavigationTwigServiceProvider()); - } -} -``` - -Example of rendering navigation in an Yves twig template: - -``` -{% raw %}{{{% endraw %} spyNavigation('MAIN_NAVIGATION', '@application/layout/navigation/main.twig') {% raw %}}}{% endraw %} -``` - -### Rendering Navigation Templates -The templates used to render a navigation menu use the `navigationTree` template variable to traverse the navigation tree. The variable contains an instance of `\Generated\Shared\Transfer\NavigationTreeTransfer` with only one localized attribute per node for the current locale. - -The following code examples show the Demoshop implementation of how to render `MAIN_NAVIGATION` which is a multi-level navigation menu. For styling we used the [Menu](https://foundation.zurb.com/sites/docs/menu.html) and [Dropdown](https://foundation.zurb.com/sites/docs/dropdown.html) components from Foundation framework. - -In `Pyz/Yves/Application/Theme/default/layout/navigation/main.twig` we traverse the root navigation nodes of the navigation tree and for each root node we render their children nodes as well. - -**Code sample:** - -```html -
    -
    -
    - - - {% raw %}{%{% endraw %} for node in navigationTree.nodes {% raw %}%}{% endraw %} - {% raw %}{%{% endraw %} if node.navigationNode.isActive {% raw %}%}{% endraw %} - {% raw %}{%{% endraw %} if node.children|length {% raw %}%}{% endraw %} - - {% raw %}{%{% endraw %} endif {% raw %}%}{% endraw %} - {% raw %}{%{% endraw %} endif {% raw %}%}{% endraw %} - {% raw %}{%{% endraw %} endfor {% raw %}%}{% endraw %} -
    -
    -
    -``` - -The children nodes are rendered recursively by `Pyz/Yves/Application/Theme/default/layout/navigation/_partials/nodes.twig`. - -**Code sample:** - -```html - -``` - -To prevent code duplication we implemented the `Pyz/Yves/Application/Theme/default/layout/navigation/_partials/base-node.twig` template which we use to render a node by embedding it in the templates above. - -This is also the place where we take the visibility controller parameters into account : `valid_from`, `valid_to`, and `is_active`. - -**Code sample:** - -```php -{% raw %}{%{% endraw %} set class = node.navigationNode.navigationNodeLocalizedAttributes[0].cssClass {% raw %}%}{% endraw %} -{% raw %}{%{% endraw %} set url = node.navigationNode.navigationNodeLocalizedAttributes[0].url {% raw %}%}{% endraw %} -{% raw %}{%{% endraw %} set externalUrl = node.navigationNode.navigationNodeLocalizedAttributes[0].externalUrl {% raw %}%}{% endraw %} -{% raw %}{%{% endraw %} set link = node.navigationNode.navigationNodeLocalizedAttributes[0].link {% raw %}%}{% endraw %} -{% raw %}{%{% endraw %} set title = node.navigationNode.navigationNodeLocalizedAttributes[0].title {% raw %}%}{% endraw %} -{% raw %}{%{% endraw %} set today = "now"|date("Ymd") {% raw %}%}{% endraw %} - -{% raw %}{%{% endraw %} if node.navigationNode.isActive and - (node.navigationNode.validFrom is empty or node.navigationNode.validFrom|date("Ymd") ‹= today) and - (node.navigationNode.validTo is empty or node.navigationNode.validTo|date("Ymd") >= today) -{% raw %}%}{% endraw %} - {% raw %}{%{% endraw %} block nodeContainer {% raw %}%}{% endraw %} - {% raw %}{%{% endraw %} if url {% raw %}%}{% endraw %} - {% raw %}{%{% endraw %} block url {% raw %}%}{% endraw %}{% raw %}{%{% endraw %} endblock {% raw %}%}{% endraw %} - {% raw %}{%{% endraw %} elseif link {% raw %}%}{% endraw %} - {% raw %}{%{% endraw %} block link {% raw %}%}{% endraw %}{% raw %}{%{% endraw %} endblock {% raw %}%}{% endraw %} - {% raw %}{%{% endraw %} elseif externalUrl {% raw %}%}{% endraw %} - {% raw %}{%{% endraw %} block externalUrl {% raw %}%}{% endraw %}{% raw %}{%{% endraw %} endblock {% raw %}%}{% endraw %} - {% raw %}{%{% endraw %} else {% raw %}%}{% endraw %} - {% raw %}{%{% endraw %} block other {% raw %}%}{% endraw %}{% raw %}{%{% endraw %} endblock {% raw %}%}{% endraw %} - {% raw %}{%{% endraw %} endif {% raw %}%}{% endraw %} - {% raw %}{%{% endraw %} endblock {% raw %}%}{% endraw %} -{% raw %}{%{% endraw %} endif {% raw %}%}{% endraw %} -``` diff --git a/docs/scos/dev/feature-integration-guides/202005.0/order-management-feature-integration.md b/docs/scos/dev/feature-integration-guides/202005.0/order-management-feature-integration.md deleted file mode 100644 index 204649167b0..00000000000 --- a/docs/scos/dev/feature-integration-guides/202005.0/order-management-feature-integration.md +++ /dev/null @@ -1,1092 +0,0 @@ ---- -title: Order Management feature integration -last_updated: Aug 7, 2020 -template: feature-integration-guide-template -originalLink: https://documentation.spryker.com/v5/docs/order-management-feature-integration -originalArticleId: 8a0c6b6c-ced3-4974-bc79-c258f936a655 -redirect_from: - - /v5/docs/order-management-feature-integration - - /v5/docs/en/order-management-feature-integration -related: - - title: Comments + Order Management feature integration - link: docs/scos/dev/feature-integration-guides/page.version/comments-order-management-feature-integration.html - - title: Glue API - Order Management feature integration - link: docs/scos/dev/feature-integration-guides/page.version/glue-api/glue-api-order-management-feature-integration.html - - title: Company Account + Order Management feature integration - link: docs/scos/dev/feature-integration-guides/page.version/company-account-order-management-feature-integration.html - - title: Product + Order Management feature integration - link: docs/scos/dev/feature-integration-guides/page.version/product-order-management-feature-integration.html - - title: Customer Account Management + Order Management feature integration - link: docs/scos/dev/feature-integration-guides/page.version/customer-account-management-order-management-feature-integration.html ---- - -{% info_block warningBox "Included features" %} - -The following feature integration guide expects the basic feature to be in place. - -The current feature integration guide only adds the following functionalities: - -* Order cancellation behavior -* Show `display names` for order item states -* Invoice generation - - -{% endinfo_block %} - -## Install Feature Core - -Follow the steps below to install the Order Management feature core. - -### Prerequisites - -Install the required features: - - -| Name | Version | -| --- | --- | -| Spryker Core | {{page.version}} | -| Mailing & Notifications | {{page.version}} | - -### 1) Install the required modules using Composer - -Run the following command(s) to install the required modules: - -```bash -composer require spryker-feature/order-management: "{{page.version}}" --update-with-dependencies -``` - -### Set up Database Schema and Transfer Objects -Run the following commands to apply database changes and generate transfer changes: - -```bash -console transfer:generate -console propel:install -console transfer:entity:generate -``` -{% info_block warningBox "Verification" %} - -Make sure that the following changes have been applied in database: - -| Datatabase Entity | Type | Event | -| --- | --- | --- | -| `spy_sales_order_invoice` | table | created | - -{% endinfo_block %} -{% info_block warningBox "Verification" %} - -Make sure that the following changes have been applied in transfer objects: - -| Transfer | Type | Event | Path | -| --- | --- | --- | --- | -| `OrderInvoice` | class | created | `src/Generated/Shared/Transfer/OrderInvoiceTransfer` | -| `OrderInvoiceSendRequest` | class | created | `src/Generated/Shared/Transfer/OrderInvoiceSendRequestTransfer` | -| `OrderInvoiceSendResponse` | class | created |`src/Generated/Shared/Transfer/OrderInvoiceSendResponseTransfer` | -| `OrderInvoiceCriteria` | class | created | `src/Generated/Shared/Transfer/OrderInvoiceCriteriaTransfer` | -| `OrderInvoiceCollection` | class | created | `src/Generated/Shared/Transfer/OrderInvoiceCollectionTransfer` | -| `OrderInvoiceResponse` | class | created | `src/Generated/Shared/Transfer/OrderInvoiceResponseTransfer` | -| `Mail.recipientBccs` | property | created | `src/Generated/Shared/Transfer/MailTransfer` | - -{% endinfo_block %} - -### 3) Set up Configuration - -Set up the following configuration. - -#### 2.1) Configure OMS -{% info_block infoBox "Info" %} - -The `cancellable` flag allows to proceed to the `order cancel` process. - -The `display` attribute allows to attach the `display name` attribute to specific order item states. - -The` DummyInvoice` sub-process allows triggering `invoice-generate` events. - -{% endinfo_block %} -Create the OMS sub-process file. -**config/Zed/oms/DummySubprocess/DummyInvoice01.xml** -```xml - - - - - - - - - - - confirmed - invoice generated - invoice-generate - - - - invoice generated - waiting - invoice-generated - - - - - - - - - - -``` -{% info_block warningBox "Verification" %} - -The verification of the invoice state machine configuration will be checked in a later step. - -{% endinfo_block %} - -Using the `DummyPayment01.xml` process as an example, adjust your OMS state-machine configuration according to your project’s requirements. - -
    - config/Zed/oms/DummyPayment01.xml - -```xml - - - - - - - DummyInvoice - - - - - cancellable - - - cancellable - - - exclude from customer - - - exclude from customer - - - cancellable - - - cancellable - - - - - - - - - - - new - payment pending - authorize - - - - new - invalid - authorize - - - - new - cancelled - cancel - - - - payment pending - paid - pay - - - - payment pending - cancelled - pay - - - - payment pending - cancelled - cancel - - - - paid - confirmed - confirm - - - - confirmed - waiting - skip timeout - - - - confirmed - cancelled - cancel - - - - waiting - exported - check giftcard purchase - - - - waiting - gift card purchased - check giftcard purchase - - - - gift card shipped - delivered - complete gift card creation - - - - exported - shipped - ship - - - - shipped - delivered - stock-update - - - - delivered - closed - close - - - - - - - - - - - - - - - - - - - - -``` -
    - -{% info_block warningBox "Verification" %} - -Ensure that you’ve configured the OMS: - -1. Go to the Back Office > **Administration** > **OMS**. - -2. Select *DummyPayment01 [preview-version]*. - -2. Ensure that the `new`, `payment pending`, `paid`, and `confirmed` states keep the `cancellable` tag inside. - -4. Ensure that `invoice generated` state was added. - -{% endinfo_block %} - -### 2.2) Configure Fallback Display Name Prefix - -Adjust configuration according to your project’s needs: - - -**src/Pyz/Zed/Oms/OmsConfig.php** -```php - - src/Pyz/Zed/SalesInvoice/Presentation/Invoice/Invoice.twig - -```html -{# @var order \Generated\Shared\Transfer\OrderTransfer #} -{# @var invoice \Generated\Shared\Transfer\OrderInvoiceTransfer #} - - - - - - - - - - - - - - - - - - - - - -
    - Logo - - {% raw %}{{{% endraw %} 'order_invoice.invoice_template.company.name' | trans {% raw %}}}{% endraw %} -
    {% raw %}{{{% endraw %} 'order_invoice.invoice_template.company.group' | trans {% raw %}}}{% endraw %}
    -
    {% raw %}{{{% endraw %} 'order_invoice.invoice_template.company.address' | trans | raw {% raw %}}}{% endraw %}
    -
    -
    - {% raw %}{{{% endraw %} 'order_invoice.invoice_template.merchant.name' | trans {% raw %}}}{% endraw %} -
    {% raw %}{{{% endraw %} 'order_invoice.invoice_template.merchant.address' | trans {% raw %}}}{% endraw %}
    -
    -
    - {% raw %}{{{% endraw %} order.billingAddress.firstName {% raw %}}}{% endraw %} {% raw %}{{{% endraw %} order.billingAddress.lastName {% raw %}}}{% endraw %}
    - {% raw %}{{{% endraw %} order.billingAddress.address1 {% raw %}}}{% endraw %} {% raw %}{{{% endraw %} order.billingAddress.address2 {% raw %}}}{% endraw %} {% raw %}{{{% endraw %} order.billingAddress.address3 {% raw %}}}{% endraw %}
    - {% raw %}{{{% endraw %} order.billingAddress.zipcode {% raw %}}}{% endraw %} {% raw %}{{{% endraw %} order.billingAddress.city {% raw %}}}{% endraw %}
    - {% raw %}{{{% endraw %} order.billingAddress.region {% raw %}}}{% endraw %} -
    -
    -
    {% raw %}{{{% endraw %} invoice.issueDate | date('d. M Y') {% raw %}}}{% endraw %}
    -
    - - - - - - - - -
    -
    - {% raw %}{{{% endraw %} 'order_invoice.invoice_template.reference' | trans {% raw %}}}{% endraw %} {% raw %}{{{% endraw %} invoice.reference {% raw %}}}{% endraw %} -
    -
    -
    {% raw %}{{{% endraw %} 'order_invoice.invoice_template.introduction' | trans {% raw %}}}{% endraw %}
    -
    - - - - - - - - - - - - - {% raw %}{%{% endraw %} set linenumber = 0 {% raw %}%}{% endraw %} - {% raw %}{%{% endraw %} set renderedBundles = [] {% raw %}%}{% endraw %} - {% raw %}{%{% endraw %} set taxes = {} {% raw %}%}{% endraw %} - {% raw %}{%{% endraw %} set itemSumByTaxes = {} {% raw %}%}{% endraw %} - - {% raw %}{%{% endraw %} for item in order.items {% raw %}%}{% endraw %} - {# @var item \Generated\Shared\Transfer\ItemTransfer #} - - {% raw %}{%{% endraw %} set taxRate = item.taxRate {% raw %}%}{% endraw %} - {% raw %}{%{% endraw %} set rateSum = taxes[item.taxRate] | default(0) + item.sumTaxAmountFullAggregation {% raw %}%}{% endraw %} - {% raw %}{%{% endraw %} set taxes = taxes | merge({ (taxRate): rateSum }) {% raw %}%}{% endraw %} - {% raw %}{%{% endraw %} set rateItemSum = itemSumByTaxes[taxRate] | default(0) + item.sumPriceToPayAggregation {% raw %}%}{% endraw %} - {% raw %}{%{% endraw %} set itemSumByTaxes = itemSumByTaxes | merge({ (taxRate): rateItemSum }) {% raw %}%}{% endraw %} - - {% raw %}{%{% endraw %} if item.productBundle is not defined or item.productBundle is null {% raw %}%}{% endraw %} - {% raw %}{%{% endraw %} set linenumber = linenumber + 1 {% raw %}%}{% endraw %} - - - - - - - - - {% raw %}{%{% endraw %} endif {% raw %}%}{% endraw %} - - {% raw %}{%{% endraw %} if item.productBundle is defined and item.productBundle is not null {% raw %}%}{% endraw %} - {% raw %}{%{% endraw %} if item.relatedBundleItemIdentifier not in renderedBundles {% raw %}%}{% endraw %} - {# @var productBundle \Generated\Shared\Transfer\ItemTransfer #} - - {% raw %}{%{% endraw %} set linenumber = linenumber + 1 {% raw %}%}{% endraw %} - {% raw %}{%{% endraw %} set productBundle = item.productBundle {% raw %}%}{% endraw %} - - - - - - - - - - {% raw %}{%{% endraw %} for bundleditem in order.items {% raw %}%}{% endraw %} - {% raw %}{%{% endraw %} if item.relatedBundleItemIdentifier == bundleditem.relatedBundleItemIdentifier {% raw %}%}{% endraw %} - - - - - - - - {% raw %}{%{% endraw %} endif {% raw %}%}{% endraw %} - {% raw %}{%{% endraw %} endfor {% raw %}%}{% endraw %} - - {% raw %}{%{% endraw %} set renderedBundles = renderedBundles | merge([item.relatedBundleItemIdentifier]) {% raw %}%}{% endraw %} - {% raw %}{%{% endraw %} endif {% raw %}%}{% endraw %} - {% raw %}{%{% endraw %} endif {% raw %}%}{% endraw %} - {% raw %}{%{% endraw %} endfor {% raw %}%}{% endraw %} - - {% raw %}{%{% endraw %} for expense in order.expenses {% raw %}%}{% endraw %} - {% raw %}{%{% endraw %} set linenumber = linenumber + 1 {% raw %}%}{% endraw %} - {% raw %}{%{% endraw %} set taxRate = expense.taxRate {% raw %}%}{% endraw %} - {% raw %}{%{% endraw %} set rateSum = taxes[expense.taxRate] | default(0) + expense.sumTaxAmount {% raw %}%}{% endraw %} - {% raw %}{%{% endraw %} set taxes = taxes | merge({ (taxRate): rateSum }) {% raw %}%}{% endraw %} - {% raw %}{%{% endraw %} set rateItemSum = itemSumByTaxes[taxRate] | default(0) + expense.sumPriceToPayAggregation {% raw %}%}{% endraw %} - {% raw %}{%{% endraw %} set itemSumByTaxes = itemSumByTaxes | merge({ (taxRate): rateItemSum }) {% raw %}%}{% endraw %} - - - - - - - - - {% raw %}{%{% endraw %} endfor {% raw %}%}{% endraw %} - - - - - - - - - - - - - {% raw %}{%{% endraw %} for rate, tax in taxes {% raw %}%}{% endraw %} - - - - - - - {% raw %}{%{% endraw %} endfor {% raw %}%}{% endraw %} - - - - - - - - - - - - -
    {% raw %}{{{% endraw %} 'order_invoice.invoice_template.table.number' | trans {% raw %}}}{% endraw %}{% raw %}{{{% endraw %} 'order_invoice.invoice_template.table.quantity' | trans {% raw %}}}{% endraw %}{% raw %}{{{% endraw %} 'order_invoice.invoice_template.table.name' | trans {% raw %}}}{% endraw %}{% raw %}{{{% endraw %} 'order_invoice.invoice_template.table.tax' | trans {% raw %}}}{% endraw %}{% raw %}{{{% endraw %} 'order_invoice.invoice_template.table.price' | trans | raw {% raw %}}}{% endraw %}
    {% raw %}{{{% endraw %} linenumber {% raw %}}}{% endraw %}{% raw %}{{{% endraw %} item.quantity {% raw %}}}{% endraw %}{% raw %}{{{% endraw %} item.name {% raw %}}}{% endraw %}{% raw %}{{{% endraw %} item.taxRate | number_format {% raw %}}}{% endraw %}%{% raw %}{{{% endraw %} item.sumPriceToPayAggregation | money(true, order.currencyIsoCode) {% raw %}}}{% endraw %}
    {% raw %}{{{% endraw %} linenumber {% raw %}}}{% endraw %}{% raw %}{{{% endraw %} productBundle.quantity {% raw %}}}{% endraw %}{% raw %}{{{% endraw %} productBundle.name {% raw %}}}{% endraw %}{% raw %}{{{% endraw %} productBundle.taxRate | number_format {% raw %}}}{% endraw %}%{% raw %}{{{% endraw %} productBundle.sumPriceToPayAggregation | money(true, order.currencyIsoCode) {% raw %}}}{% endraw %}
    {% raw %}{{{% endraw %} bundleditem.quantity {% raw %}}}{% endraw %}{% raw %}{{{% endraw %} bundleditem.name {% raw %}}}{% endraw %}{% raw %}{{{% endraw %} bundleditem.taxRate | number_format {% raw %}}}{% endraw %}%{% raw %}{{{% endraw %} bundleditem.sumPriceToPayAggregation | money(true, order.currencyIsoCode) {% raw %}}}{% endraw %}
    {% raw %}{{{% endraw %} linenumber {% raw %}}}{% endraw %}{% raw %}{{{% endraw %} expense.name {% raw %}}}{% endraw %}{% raw %}{{{% endraw %} expense.taxRate | number_format {% raw %}}}{% endraw %}%{% raw %}{{{% endraw %} expense.sumPrice | money(true, order.currencyIsoCode) {% raw %}}}{% endraw %}
    {% raw %}{{{% endraw %} 'order_invoice.invoice_template.table.subtotal' | trans {% raw %}}}{% endraw %}{% raw %}{{{% endraw %} order.totals.subtotal | money(true, order.currencyIsoCode) {% raw %}}}{% endraw %}
    {% raw %}{{{% endraw %} 'order_invoice.invoice_template.table.discount' | trans {% raw %}}}{% endraw %}{% raw %}{{{% endraw %} order.totals.discountTotal | money(true, order.currencyIsoCode) {% raw %}}}{% endraw %}
    {% raw %}{{{% endraw %} 'order_invoice.invoice_template.table.tax.included' | trans({ '%tax_rate%': rate | number_format }) {% raw %}}}{% endraw %}{% raw %}{{{% endraw %} (itemSumByTaxes[rate] - tax) | money(true, order.currencyIsoCode) {% raw %}}}{% endraw %}{% raw %}{{{% endraw %} 'order_invoice.invoice_template.table.tax.name' | trans {% raw %}}}{% endraw %}{% raw %}{{{% endraw %} tax | money(true, order.currencyIsoCode) {% raw %}}}{% endraw %}
    {% raw %}{{{% endraw %} 'order_invoice.invoice_template.table.total.net' | trans {% raw %}}}{% endraw %}{% raw %}{{{% endraw %} (order.totals.grandTotal - order.totals.taxTotal.amount) | money(true, order.currencyIsoCode) {% raw %}}}{% endraw %}
    {% raw %}{{{% endraw %} 'order_invoice.invoice_template.table.grandtotal' | trans {% raw %}}}{% endraw %}{% raw %}{{{% endraw %} order.totals.grandTotal | money(true, order.currencyIsoCode) {% raw %}}}{% endraw %}
    - - -``` - - -{% info_block warningBox "Verification" %} - -The verification of the invoice template configuration will be checked in a later step. - -{% endinfo_block %} - - - - ### 4) Add Translations -{% info_block errorBox %} - -An `oms.state.` prefixed translation key is a combination of the `OmsConfig::getFallbackDisplayNamePrefix()` and a normalized state machine name. If you have different OMS state-machine states or a fallback display name prefix, adjust the corresponding translations. - -{% endinfo_block %} - -{% info_block infoBox "Normalized state machine names" %} - -By default, in state machine names: - -* Spaces are replaced with dashes. -* All the words are decapitalized. - - -{% endinfo_block %} - - - -Add translations as follows: - -1. Append glossary according to your configuration: - -```yaml -sales.error.customer_order_not_found,Customer Order not found.,en_US -sales.error.customer_order_not_found,Die Bestellung wurde nicht gefunden.,de_DE -sales.error.order_cannot_be_canceled_due_to_wrong_item_state,Order cannot be canceled due to wrong item state.,en_US -sales.error.order_cannot_be_canceled_due_to_wrong_item_state,Die Bestellung kann wegen dem falschen Artikelstatus nicht storniert werden.,de_DE -oms.state.new,New,en_US -oms.state.new,Neu,de_DE -oms.state.payment-pending,Payment pending,en_US -oms.state.payment-pending,Ausstehende Zahlung,de_DE -oms.state.invalid,Ivalid,en_US -oms.state.invalid,Ungültig,de_DE -oms.state.canceled,Canceled,en_US -oms.state.canceled,Abgebrochen,de_DE -oms.state.paid,Paid,en_US -oms.state.paid,Bezahlt,de_DE -oms.state.confirmed,Confirmed,en_US -oms.state.confirmed,Bestätigt,de_DE -oms.state.waiting,Waiting,en_US -oms.state.waiting,Warten,de_DE -oms.state.exported,Exported,en_US -oms.state.exported,Exportiert,de_DE -oms.state.shipped,Shipped,en_US -oms.state.shipped,Versandt,de_DE -oms.state.delivered,Delivered,en_US -oms.state.delivered,Geliefert,de_DE -quote_request.status.closed,Closed,en_US -quote_request.status.closed,Geschlossen,de_DE -mail.order_invoice.subject,"Invoice: %invoiceReference%",en_US -mail.order_invoice.subject,"Rechnung: %invoiceReference%",de_DE -``` - -2. Import data: - -```bash -console data:import:glossary -``` - -{% info_block warningBox "Verification" %} - -Ensure that, in the database, the configured data has been added to the `spy_glossary` table. - -{% endinfo_block %} - -### 5) Set up Behavior - -Set up the following behaviors. - -#### 5.1) Set up Order Item Display Name - - -| Plugin | Specification | Prerequisites | Namespace | -| --- | --- | --- | --- | -| `CurrencyIsoCodeOrderItemExpanderPlugin` | Expands order items with currency codes (ISO). | None | `Spryker\Zed\Sales\Communication\Plugin\Sales` | -| `StateHistoryOrderItemExpanderPlugin` | Expands order items with history states. | None | `Spryker\Zed\Oms\Communication\Plugin\Sales` | -| `ItemStateOrderItemExpanderPlugin` | Expands order items with its item states. | None | `Spryker\Zed\Oms\Communication\Plugin\Sales` | -| `OrderAggregatedItemStateSearchOrderExpanderPlugin` | Expands orders with aggregated item states. | None | `Spryker\Zed\Oms\Communication\Plugin\Sales` | - -**src/Pyz/Zed/Sales/SalesDependencyProvider.php** - -```php -extend(static::MAIL_TYPE_COLLECTION, function (MailTypeCollectionAddInterface $mailCollection) { - $mailCollection - ->add(new OrderInvoiceMailTypePlugin()); - - return $mailCollection; - }); - - return $container; - } -} -``` -##### 5.3.2) Set up Order Invoice OMS Command - -| Plugin | Specification | Prerequisites | Namespace | -| --- | --- | --- | --- | -| `GenerateOrderInvoiceCommandPlugin` | A command in OMS state machine, that generates invoice for order. | None | `Spryker\Zed\SalesInvoice\Communication\Plugin\Oms` | - -**src/Pyz/Zed/Oms/OmsDependencyProvider.php** - -```php -extend(static::COMMAND_PLUGINS, function (CommandCollectionInterface $commandCollection) { - $commandCollection->add(new GenerateOrderInvoiceCommandPlugin(), 'Invoice/Generate'); - return $commandCollection; - }); - - return $container; - } -} -``` - -#### 5.3.3) Set up Order Invoice OMS Command - -| Plugin | Specification | Prerequisites | Namespace | -| --- | --- | --- | --- | -| `OrderInvoiceSendConsole` | A console command that sends not-yet-sent order invoices via email. | None | `Spryker\Zed\SalesInvoice\Communication\Console` | - -**src/Pyz/Zed/Oms/OmsDependencyProvider.php** - -```php - 'order-invoice-send', - 'command' => '$PHP_BIN vendor/bin/console order:invoice:send', - 'schedule' => '*/5 * * * *', - 'enable' => true, - 'stores' => $allStores, -]; -``` -To apply scheduler configuration update, run next commands: -```bash -vendor/bin/console scheduler:suspend -vendor/bin/console scheduler:setup -vendor/bin/console scheduler:resume -``` -{% info_block warningBox "Verification" %} - -Once all invoice related configuration was set up, ensure that the right order invoice template was assigned to the order (`spy_sales_order_invoice`) after moving at least 1 item in the order to `invoice generated` state based on your `DummyInvoice01.xml` and `SalesInvoiceConfig::getOrderInvoiceTemplatePath()` configuration. - -{% endinfo_block %} -{% info_block warningBox "Verification" %} - -The email with the invoice based on the configured invoice template should be sent to the email address of the order’s customer within the scheduled (5 mins) time. - -{% endinfo_block %} - -## Install Feature Front End - -Follow the steps below to install the feature front end. - -### Prerequisites - -Overview and install the necessary features before beginning the integration step. - -| Name | Version | -| --- | --- | -| Spryker Core | {{page.version}} | - - - -### 1) Install the required modules using Composer - -Run the following command(s) to install the required modules: - -```bash -composer require spryker-feature/order-management: "{{page.version}}" --update-with-dependencies -``` - - -### 2) Add Translations - -Add translations as follows: - -1. Append glossary according to your configuration: - -```yaml -order_cancel_widget.cancel_order,Cancel Order,en_US -order_cancel_widget.cancel_order,Bestellung stornieren,de_DE -order_cancel_widget.order.cancelled,Order was canceled successfully.,en_US -order_cancel_widget.order.cancelled,Die Bestellung wurde erfolgreich storniert.,de_DE -``` - -2. Import data: - -```bash -console data:import:glossary -``` - -{% info_block warningBox "Verification" %} - -Ensure that, in the database, the configured data has been added to the `spy_glossary` table. - -{% endinfo_block %} - - -### 3) Enable Controllers - -Register the following route provider(s) on the Storefront: - - - -| Provider | Namespace | -| --- | --- | -| `OrderCancelWidgetRouteProviderPlugin` | `SprykerShop\Yves\OrderCancelWidget\Plugin\Router`| - - -**src/Pyz/Yves/Router/RouterDependencyProvider.php** - -```php - -| Affected entity| Triggered events | -| --- | --- | -| spy_product_packaging_unit |
    • Entity.spy_product_packaging_unit.create
    • Entity.spy_product_packaging_unit.update
    • Entity.spy_product_packaging_unit.delete
    | -| spy_product_packaging_unit_type |
    • Entity.spy_product_packaging_unit_type.create
    • Entity.spy_product_packaging_unit_type.update
    • Entity.spy_product_packaging_unit_type.delete
    | - - -**src/Pyz/Zed/ProductPackagingUnit/Persistence/Propel/Schema/spy_product_packaging_unit.schema.xml** - -```xml - - - - - - - -
    - - - - - -
    -
    -``` - -Set up synchronization queue pools, so non-multi-store entities (not store-specific entities) can be synchronized among stores: - -**src/Pyz/Zed/ProductPackagingUnitStorage/Persistence/Propel/Schema/spy_product_packaging_unit_storage.schema.xml** - -```xml - - - - - - - -
    - -
    -``` - -Run the following commands to apply the database changes and generate entity and transfer changes: - -```bash -console transfer:generate -console propel:install -console transfer:generate -``` - -{% info_block warningBox "Verification" %} -Make sure that the following changes have been applied by checking your database: - -|Database Entity|Type|Event| -|--- |--- |--- | -|`spy_product_packaging_unit`|table|created| -|`spy_product_packaging_unit_type`|table|created| -|`spy_product_abstract_packaging_storage`|table|created| -|`spy_sales_order_item.amount`|column|created| -|`spy_sales_order_item.amount_sku`|column|created| - -{% endinfo_block %} - -{% info_block warningBox "Verification" %} -Make sure that the following changes in transfer objects have been applied: - -|Transfer|Type|Event|Path| -|--- |--- |--- |--- | -|`ProductPackagingUnitTypeTransfer`|class|created|`src/Generated/Shared/Transfer/ProductPackagingUnitTypeTransfer`| -|`ProductPackagingUnitTypeTranslationTransfer`|class|created|`src/Generated/Shared/Transfer/ProductPackagingUnitTypeTranslationTransfer`| -|`ProductPackagingUnitTransfer`|class|created|`src/Generated/Shared/Transfer/ProductPackagingUnitTransfer`| -|`ProductPackagingUnitAmountTransfer`|class|created|`src/Generated/Shared/Transfer/ProductPackagingUnitAmountTransfer`| -|`ProductPackagingUnitStorageTransfer`|class|created|`src/Generated/Shared/Transfer/ProductPackagingUnitStorageTransfer`| -|`SpyProductPackagingUnitEntityTransfer`|class|created|`src/Generated/Shared/Transfer/SpyProductPackagingUnitEntityTransfer`| -|`ProductConcretePackagingStorage`|class|created|`src/Generated/Shared/Transfer/ProductConcretePackagingStorageTransfer`| -|`SpyProductPackagingUnitTypeEntityTransfer`|class|created|`src/Generated/Shared/Transfer/SpyProductPackagingUnitTypeEntityTransfer`| -|`SpyProductPackagingUnitStorageEntityTransfer`|class|created|`src/Generated/Shared/Transfer/SpyProductPackagingUnitStorageEntityTransfer`| -|`SpySalesOrderItemEntityTransfer.amount`|property|created|`src/Generated/Shared/Transfer/SpySalesOrderItemEntityTransfer`| -|`SpySalesOrderItemEntityTransfer.amountSku`|property|created|`src/Generated/Shared/Transfer/SpySalesOrderItemEntityTransfer`| -|`ItemTransfer.amount`|property|created|`src/Generated/Shared/Transfer/ItemTransfer`| -|`ItemTransfer.amountLeadProduct`|property|created|`src/Generated/Shared/Transfer/ItemTransfer`| - -{% endinfo_block %} - -{% info_block warningBox "Verification" %} -Make sure that the changes have been implemented successfully. To do it, trigger the following methods and make sure that the above events have been triggered: - -|Path|Method name| -|--- |--- | -|`src/Orm/Zed/ProductPackagingUnit/Persistence/Base/SpyProductPackagingUnit.php`|`prepareSaveEventName()`
    `addSaveEventToMemory()
    `addDeleteEventToMemory()`| -|`src/Orm/Zed/ProductPackagingUnit/Persistence/Base/SpyProductPackagingUnitType.php`|`prepareSaveEventName()`
    `addSaveEventToMemory()`
    `addDeleteEventToMemory()`| -|`src/Orm/Zed/ProductPackagingUnitStorage/Persistence/Base/SpyProductPackagingUnitStorage.php`|`prepareSaveEventName()`
    `addSaveEventToMemory()`
    `addDeleteEventToMemory()`| -|`src/Orm/Zed/ProductPackagingUnit/Persistence/Base/SpyProductPackagingUnitType.php`|`sendToQueue()`| -{% endinfo_block %} - - - -### 4) Add Translations - -Append glossary according to your language configuration: - -**src/data/import/glossary.csv** -```yaml -cart.pre.check.availability.failed.lead.product,Products inside the item 'sku' are not available at the moment.,en_US -cart.pre.check.availability.failed.lead.product,Produkte im Artikel 'sku' sind momentan nicht verfügbar.,de_DE -product.unavailable,Product '%sku%' is not available at the moment,en_US -product.unavailable,Das Produkt '%sku%' ist momentan nicht verfügbar,de_DE -cart.pre.check.amount.min.failed,Die minimale Mengenanforderung für Produkt SKU '%sku%' ist nicht erreicht.,de_DE -cart.pre.check.amount.min.failed,Minimum amount requirements for product SKU '%sku%' are not fulfilled.,en_US -cart.pre.check.amount.max.failed,Die maximale Mengenanforderung für Produkt SKU '%sku%' ist überschritten.,de_DE -cart.pre.check.amount.max.failed,Maximum amount for product SKU '%sku%' is exceeded.,en_US -cart.pre.check.amount.interval.failed,Die Anzahl für Produkt SKU '%sku%' liegt nicht innerhalb des vorgegebenen Intervals.,de_DE -cart.pre.check.amount.interval.failed,Amount interval requirements for product SKU '%sku%' are not fulfilled.,en_US -cart.pre.check.amount.is_not_variable.failed,Standardbetrag für Produkt SKU '%sku%' ist überschritten.,de_DE -cart.pre.check.amount.is_not_variable.failed,Default amount requirements for product SKU '%sku%' are not fulfilled.,en_US -cart.item.packaging_unit.not_found,Packaging unit not found for product with SKU '%sku%'.,en_US -cart.item.packaging_unit.not_found,Verpackungseinheit für Produkt mit SKU '% sku%' nicht gefunden.,de_DE -``` - -{% info_block infoBox "Info" %} -All packaging unit types need to have glossary entities for the configured locales -{% endinfo_block %} - -Infrastructural record's glossary keys: - -**src/data/import/glossary.csv** - -```yaml -packaging_unit_type.item.name,Item,en_US -packaging_unit_type.item.name,Stück,de_DE -``` - -Demo data glossary keys: - -**src/data/import/glossary.csv** - -```yaml -packaging_unit_type.ring_500.name,"Ring (500m)",en_US -packaging_unit_type.ring_500.name,"Ring (500m)",de_DE -packaging_unit_type.box.name,Box,en_US -packaging_unit_type.box.name,Box,de_DE -packaging_unit_type.palette.name,Palette,en_US -packaging_unit_type.palette.name,Palette,de_DE -packaging_unit_type.giftbox.name,Giftbox,en_US -packaging_unit_type.giftbox.name,Geschenkbox,de_DE -packaging_unit_type.valentines_special.name,"Valentine's special",en_US -packaging_unit_type.valentines_special.name,Valentinstag Geschenkbox,de_DE -packaging_unit_type.pack_20.name,Pack 20,en_US -packaging_unit_type.pack_20.name,Pack 20,de_DE -packaging_unit_type.pack_500.name,Pack 500,en_US -packaging_unit_type.pack_500.name,Pack 500,de_DE -packaging_unit_type.pack_100.name,Pack 100,en_US -packaging_unit_type.pack_100.name,Pack 100,de_DE -packaging_unit_type.pack_mixed.name,Mixed Screws boxes,en_US -packaging_unit_type.pack_mixed.name,Gemischte Schraubenkästen,de_DE -``` - -Run the following console command to import data: - -```bash -console data:import glossary -``` - -{% info_block warningBox "Verification" %} -Make sure that the configured data in the database has been added to the `spy_glossary` table. -{% endinfo_block %} - - -### 5) Configure Export to Redis -This step publishes tables on change (create, edit, delete) to the `spy_product_packaging_unit_storage` and synchronizes the data to Storage. - -#### Set up Event Listeners - -| Plugin| Specification | Prerequisites |Namespace | -| --- | --- | --- | --- | -| `ProductPackagingUnitStorageEventSubscriber`| Registers listeners that are responsible for publishing product abstract packaging unit storage entity changes when a related entity change event occurs. | None | `Spryker\Zed\ProductPackagingUnitStorage\Communication\Plugin\Event\Subscriber`| - -**src/Pyz/Zed/Event/EventDependencyProvider.php** - -```php -add(new ProductPackagingUnitStorageEventSubscriber()); - - return $eventSubscriberCollection; - } -} -``` - -#### Set up Publish Feature - -| Plugin | Specification | Prerequisites | Namespace | -| --- | --- | --- | --- | -| `ProductPackagingUnitSynchronizationDataPlugin` | Registers a publisher for manually triggering the publish command. | None | `Spryker\Zed\ProductPackagingUnitStorage\Communication\Plugin\Event` | - -**src/Pyz/Zed/Event/EventBehaviorDependencyProvider.php** - -```php - -| Column | REQUIRED | Data Type | Data Example | Data Explanation | -| --- | --- | --- | --- | --- | -| `concrete_sku` | mandatory | string | 218_123 |Concrete product SKU of packaging unit. | -| `lead_product_sku ` | mandatory | string | 1 | Lead product concrete SKU. | -| `packaging_unit_type_name` | mandatory | string | packaging_unit_type.ring_500.name | Type a name of the current concrete product. | -| `default_amount` | optional | positive integer | 5 |
    • Defines how many lead products should be sold together with each quantity of the current product concrete.
    • Effective only if the current concrete product `has_lead_product = 1`.
    | -| `is_amount_variable` | mandatory | bool integer | 1 |
    • Allows customers to override the `default_amount` and decide how many lead products will be ordered for each quantity of this product concrete.
    | -| `amount_min` | optional | positive integer | 3 |
    • Restricts a customer to buy at least this amount of lead products.
    • Effective only if `is_amount_variable = 1`.
    • Default value is 1 when not provided.
    | -| `amount_max` | optional | positive integer | 5 |
    • Restricts a customer not to buy more than this value.
    • Effective only if `is_amount_variable = 1`.
    • Default value remains empty (unlimited) when not provided.
    | -| `amount_interval` | optional | positive integer | 2 |
    • Restricts customers to buy the amount that fits into the interval beginning with `amount_min`.
    • Effective only if `is_amount_variable = 1`.
    • Default value is `amount_min` when not provided.
    Min = 3; Max = 10; Interval = 2
    Choosable: 3, 5, 7, 9| - - -Register the following plugin to enable data import: - -|Plugin | Specification |Prerequisites | Namespace| -| --- | --- | --- | --- | -| `ProductPackagingUnitDataImportPlugin` | Imports packaging unit type data into the database. |
    • Requires related product concretes and product abstract to be present in the database already.
    • Requires related packaging unit types to be present in the database already.
    | `Spryker\Zed\ProductPackagingUnitDataImport\Communication\Plugin\DataImport` | - -**src/Pyz/Zed/DataImport/DataImportDependencyProvider.php** - -```php - sales unit calculationsApplies product quantity and amount restrictions on sales unit levelOffers recommendation when invalid quantity or amount is selectedMaintains stock-based quantity, amount and sales unit information for posting|`vendor/spryker-shop/product-packaging-unit-widget/src/SprykerShop/Yves/ProductPackagingUnitWidget/Theme/default/components/molecules/packaging-unit-quantity-selector/packaging-unit-quantity-selector.ts`| - -{% endinfo_block %} - -Run the following command to enable Javascript and CSS changes: -```bash -console frontend:yves:build -``` -{% info_block warningBox "Verification" %} -- Check if the `amount` field appears on the Product Detail page for items with packaging units. -- Check if the `amount` field appears correctly with measurement unit information on the Cart page. -- Check if the `amount` field appears correctly with measurement unit information on the Checkout Summary page. -- Check if the `amount` field appears correctly with measurement unit information on the previous Orders page. -{% endinfo_block %} diff --git a/docs/scos/dev/feature-integration-guides/202005.0/payment-provider-integration.md b/docs/scos/dev/feature-integration-guides/202005.0/payment-provider-integration.md deleted file mode 100644 index 1f7dbada04b..00000000000 --- a/docs/scos/dev/feature-integration-guides/202005.0/payment-provider-integration.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -title: Payment Provider Integration -last_updated: Apr 3, 2020 -template: feature-integration-guide-template -originalLink: https://documentation.spryker.com/v5/docs/payment-provider-integration-guide -originalArticleId: a20d1ebe-d77c-4bb6-aa99-be0a1329ba33 -redirect_from: - - /v5/docs/payment-provider-integration-guide - - /v5/docs/en/payment-provider-integration-guide ---- - -The Spryker Commerce OS offers integrations with several payment providers that can be used in the checkout and order management. Easily define the availability of a provider based on customer preferences and local regulations and specify the order the providers are displayed in during checkout. - diff --git a/docs/scos/dev/feature-integration-guides/202005.0/payments-feature-integration.md b/docs/scos/dev/feature-integration-guides/202005.0/payments-feature-integration.md deleted file mode 100644 index 2d41284b948..00000000000 --- a/docs/scos/dev/feature-integration-guides/202005.0/payments-feature-integration.md +++ /dev/null @@ -1,245 +0,0 @@ ---- -title: Payments feature integration -description: Use the guide to install the Payment per store feature in your project. -last_updated: May 12, 2020 -template: feature-integration-guide-template -originalLink: https://documentation.spryker.com/v5/docs/payments-feature-integration -originalArticleId: 81929db2-42f8-4f8c-9589-b799f8b92983 -redirect_from: - - /v5/docs/payments-feature-integration - - /v5/docs/en/payments-feature-integration -related: - - title: Payments feature overview - link: docs/scos/user/features/page.version/payments-feature-overview.html ---- - -{% info_block errorBox %} -The following feature integration guide expects the basic feature to be in place.
    The current feature integration guide only adds the following functionalities:
    • Payment Back Office UI;
    • Payment method per store;
    • Payment data import.
    -{% endinfo_block %} - -## Install Feature Core -### Prerequisites -To start the feature integration, overview and install the necessary features: - -| Name | Version | -| --- | --- | -| Spryker Core | master | - -### 1) Install the required modules using Composer -Run the following command(s) to install the required modules: - -```bash -composer require "spryker-feature/payments:^master" "spryker/checkout-rest-api:^3.0.0" --update-with-dependencies -``` - -{% info_block warningBox "Verification" %} -Make sure that the following modules have been installed:
    ModuleExpected Directory
    `PaymentDataImport``vendor/spryker/payment-data-import`
    `PaymentGui``vendor/spryker/payment-gui`
    -{% endinfo_block %} - -### 2) Set up Database Schema and Transfer Objects -Run the following commands to apply database changes and generate entity and transfer changes: - -```bash -console transfer:generate -console propel:install -console transfer:generate -``` - -{% info_block warningBox "Verification" %} -Make sure that the following changes have been applied by checking your database:
    Database EntityTypeEvent
    `spy_payment_method`tablecreated
    `spy_payment_provider`tablecreated
    `spy_payment_method_store`tablecreated
    -{% endinfo_block %} - -{% info_block warningBox "Verification" %} -Make sure that the following changes have been applied in transfer objects:
    TransferTypeEventPath
    `PaymentMethodTransfer`classcreated`src/Generated/Shared/Transfer/PaymentMethodTransfer`
    `PaymentProviderTransfer`classcreated`src/Generated/Shared/Transfer/PaymentProviderTransfer`
    `PaymentMethodResponseTransfer`classcreated`src/Generated/Shared/Transfer/PaymentMethodResponseTransfer`
    `StoreTransfer`classcreated`src/Generated/Shared/Transfer/StoreTransfer`
    `DataImporterConfigurationTransfer`classcreated`src/Generated/Shared/Transfer/DataImporterConfigurationTransfer`
    `DataImporterReaderConfigurationTransfer`classcreated`src/Generated/Shared/Transfer/DataImporterReaderConfigurationTransfer`
    `DataImporterReportTransfer`classcreated`src/Generated/Shared/Transfer/DataImporterReportTransfer`
    `DataImporterReportMessageTransfer`classcreated`src/Generated/Shared/Transfer/DataImporterReportMessageTransfer`
    -{% endinfo_block %} - -### 3) Import Data -Import Payment Methods - -{% info_block infoBox "Info" %} -The following imported entities will be used as payment methods in Spryker OS. -{% endinfo_block %} - -Prepare your data according to your requirements using our demo data: - -**data/import/payment_method.csv** - -```yaml -payment_method_key,payment_method_name,payment_provider_key,payment_provider_name,is_active -dummyPaymentInvoice,Invoice,dummyPayment,Dummy Payment,1 -dummyPaymentCreditCard,Credit Card,dummyPayment,Dummy Payment,1 -``` - -| Column | REQUIRED | Data Type | Data Example | Data Explanation | -| --- | --- | --- | --- | --- | -| `payment_method_key` | mandatory | string | dummyPaymentInvoice | Key of a payment method. | -| `payment_method_name` | mandatory | string | Invoice | Name of a payment method. | -| `payment_provider_key` | mandatory | string | dummyPayment | Key of a payment provider. | -| `payment_provider_name` | mandatory | string | Dummy Payment | Name of a payment provider. | -| `is_active` | optional | boolean | 1 | Indicates if this payment method is available. | - -**data/import/payment_method_store.csv** - -```yaml -payment_method_key,store -dummyPaymentInvoice,DE -dummyPaymentInvoice,AT -dummyPaymentInvoice,US -dummyPaymentCreditCard,DE -dummyPaymentCreditCard,AT -dummyPaymentCreditCard,US -``` - -| Column | REQUIRED | Data Type | Data Example | Data Explanation | -| --- | --- | --- | --- | --- | -| `payment_method_key` | mandatory | string | dummyPaymentInvoice | Key of the existing payment method. | -| `store` | mandatory | string | DE |Name of the existing store. | - -Register the following plugin data import plugins: - -| Plugin | Specification | Prerequisites | Namespace | -| --- | --- | --- | --- | -| `PaymentMethodDataImportPlugin` | Imports payment method data into the database. | None | `\Spryker\Zed\PaymentDataImport\Communication\Plugin` | -| `PaymentMethodStoreDataImportPlugin` | Imports payment method store data into the database. | None | `\Spryker\Zed\PaymentDataImport\Communication\Plugin` | - -**src/Pyz/Zed/DataImport/DataImportDependencyProvider.php** - -```php -buildImporterConfiguration('payment_method.csv', static::IMPORT_TYPE_PAYMENT_METHOD); - } - - /** - * @return \Generated\Shared\Transfer\DataImporterConfigurationTransfer - */ - public function getPaymentMethodAtoreDataImporterConfiguration(): DataImporterConfigurationTransfer - { - return $this->buildImporterConfiguration('payment_method_store.csv', static::IMPORT_TYPE_PAYMENT_METHOD_STORE); - } -} -``` - -Configure the Payment GUI module with money and store plugins. - -| Plugin | Specification | Prerequisites | Namespace | -| --- | --- | --- | --- | -| `StoreRelationToggleFormTypePlugin` | Represents a store relation toggle form based on stores registered in the system. | None | `Spryker\Zed\Store\Communication\Plugin\Form` | - -**src/Pyz/Zed/PaymentGui/PaymentGuiDependencyProvider.php** - -```php -
  • You can see the list of payment methods in the **Back Office > Administration > Payment Management > Payment Methods** section.
  • You can see information about the payment method in the **Back Office > Administration > Payment Management > Payment Methods > View** section.
  • You can edit the payment method in the **Back Office > Administration > Payment Management > Payment Methods > Edit** section.
  • -{% endinfo_block %} - -### 5) Additional Cleanups: - -The `SalesPaymentMethodTypeInstallerPlugin` plugin was removed, please use the `PaymentDataImport module` instead. -The `PaymentConfig::getSalesPaymentMethodTypes()` config method was removed, please use the `PaymentDataImport` module instead. diff --git a/docs/scos/dev/feature-integration-guides/202005.0/permissions-feature-integration.md b/docs/scos/dev/feature-integration-guides/202005.0/permissions-feature-integration.md deleted file mode 100644 index c7d786951bf..00000000000 --- a/docs/scos/dev/feature-integration-guides/202005.0/permissions-feature-integration.md +++ /dev/null @@ -1,66 +0,0 @@ ---- -title: Permissions feature integration -description: The guide provides a step-by-step procedure to install the Permissions feature into your project. -last_updated: Apr 3, 2020 -template: feature-integration-guide-template -originalLink: https://documentation.spryker.com/v5/docs/permissions-feature-integration -originalArticleId: 6a940285-646b-412f-b42e-c32420ae0ac8 -redirect_from: - - /v5/docs/permissions-feature-integration - - /v5/docs/en/permissions-feature-integration ---- - -The Permissions feature is shipped with following modules: - -| Module | Description | -| --- | --- | -| [Permission](https://github.com/spryker/spryker/tree/master/Bundles/Permission) | Provides permissions support that can be used as a part of ACL / RBAC. | -| [PermissionExtension](https://github.com/spryker/spryker/tree/master/Bundles/PermissionExtension) | Holds a set of plugin interfaces that can be used as extension points of the Permission module. | - -To install the feature, follow the steps below: -1. Install necessary modules using composer: - -```bash -composer update "spryker/*" "spryker-shop/*" -composer require spryker/permission-extension:"^1.0.0" spryker/permission:"^1.0.0" -``` - -2. Add plugins to Zed `CustomerDependencyProvider`: - - -| Module | Plugin | Description | Method in Dependency Provider | -| --- | --- | --- | --- | -| `CompanyRole` | `PermissionCustomerExpanderPlugin` | Adds permissions to the company user. | `getCustomerTransferExpanderPlugins` | -| `CompanyUser` | `CustomerTransferCompanyUserExpanderPlugin` | Adds company user information to customer transfer. | `getCustomerTransferExpanderPlugins` | - -**src/Pyz/Zed/Customer/CustomerDependencyProvider.php** - -```php -namespace Pyz\Zed\Customer; - -use Spryker\Zed\CompanyUser\Communication\Plugin\Customer\CustomerTransferCompanyUserExpanderPlugin; -use Spryker\Zed\CompanyRole\Communication\Plugin\PermissionCustomerExpanderPlugin; -use Spryker\Zed\Customer\CustomerDependencyProvider as SprykerCustomerDependencyProvider; - -class CustomerDependencyProvider extends SprykerCustomerDependencyProvider -{ - - /** - * @return \Spryker\Zed\Customer\Dependency\Plugin\CustomerTransferExpanderPluginInterface[] - */ - protected function getCustomerTransferExpanderPlugins() - { - return [ - new PermissionCustomerExpanderPlugin(), - new CustomerTransferCompanyUserExpanderPlugin() - ]; - } -} -``` - -3. Synchronize permission plugins with storage: - -Go to the Administration interface, **Maintenance** menu and click **Sync permissions**. -  - - diff --git a/docs/scos/dev/feature-integration-guides/202005.0/persistent-cart-sharing-feature-integration.md b/docs/scos/dev/feature-integration-guides/202005.0/persistent-cart-sharing-feature-integration.md deleted file mode 100644 index 5eaee41c789..00000000000 --- a/docs/scos/dev/feature-integration-guides/202005.0/persistent-cart-sharing-feature-integration.md +++ /dev/null @@ -1,242 +0,0 @@ ---- -title: Persistent Cart Sharing feature integration -description: The guide describes the process of installing the Persistent Cart feature into your project. -last_updated: Aug 12, 2020 -template: feature-integration-guide-template -originalLink: https://documentation.spryker.com/v5/docs/persistent-cart-sharing-feature-integration -originalArticleId: f7a5d53d-6bc1-4f47-bdc4-1a8b76be84c5 -redirect_from: - - /v5/docs/persistent-cart-sharing-feature-integration - - /v5/docs/en/persistent-cart-sharing-feature-integration ---- - -## Install Feature Core -### Prerequisites -Install the required features: - -| Name | Version | -| --- | --- | -| Spryker Core | 201907.0 | -| Resource Sharing | 201907.0 | -### 1) Install the required modules using Composer -Run the following command(s) to install the required modules: -```bash -composer require spryker-feature/persistent-cart-sharing: "^201907.0" --update-with-dependencies -``` -{% info_block warningBox "Verification" %} -Make sure that the following modules were installed:
    ModuleExpected Directory
    `PersistentCartShare``vendor/spryker/persistent-cart-share`
    `PersistentCartShareExtension``vendor/spryker/persistent-cart-share-extension`
    -{% endinfo_block %} -### 2) Set up Transfer Objects -Run the following commands to generate transfer changes: -```bash -transfer:generate -``` -{% info_block warningBox "Verification" %} -Make sure that the following changes in transfer objects:
    TransferTypeEventPath
    `ResourceShareData.idQuote`propertyadded`src/Generated/Shared/Transfer/ResourceShareDataTransfer`
    `ResourceShareData.ownerCompanyUserId`propertyadded`src/Generated/Shared/Transfer/ResourceShareDataTransfer`
    `ResourceShareData.ownerCompanyBusinessUnitId`propertyadded`src/Generated/Shared/Transfer/ResourceShareDataTransfer`
    -{% endinfo_block %} -## Install feature frontend -### Prerequisites -Please overview and install the necessary features before beginning the integration step. - -|Name | Version | -| --- | --- | -| Spryker Core | 201907.0 | -| Resource Sharing | 201907.0 | -| Customer Account Management | 201907.0 | -### 1) Install the required modules using Composer -Run the following command(s) to install the required modules: -```bash -composer require spryker-feature/persistent-cart-sharing: "^201907.0" --update-with-dependencies -``` -{% info_block warningBox "Verification" %} -Make sure that the following modules were installed:
    ModuleExpected Directory
    `PersistentCartSharePage``vendor/spryker-shop/persistent-cart-share-page`
    `PersistentCartShareWidget``vendor/spryker-shop/persistent-cart-share-widget`
    -{% endinfo_block %} -### 2) Add Translations -Append glossary according to your configuration: - -src/data/import/glossary.csv - -```yaml -persistent_cart_share.error.resource_is_not_available,The cart you are trying to access is not available.,en_US -persistent_cart_share.error.resource_is_not_available,"Der Warenkorb, auf den Sie zugreifen möchten, ist nicht verfügbar.",de_DE -persistent_cart_share.error.quote_is_not_available,The cart you are trying to access is not available.,en_US -persistent_cart_share.error.quote_is_not_available,"Der Warenkorb, auf den Sie zugreifen möchten, ist nicht verfügbar.",de_DE -persistent_cart_share.share_options.external.PREVIEW,,en_US -persistent_cart_share.share_options.external.PREVIEW,,de_DE -persistent_cart_share.share_options.internal.READ_ONLY,Read Only,en_US -persistent_cart_share.share_options.internal.READ_ONLY,Schreibgeschützt,de_DE -persistent_cart_share.share_options.internal.FULL_ACCESS,Full Access,en_US -persistent_cart_share.share_options.internal.FULL_ACCESS,Ohne Einschränkung,de_DE -persistent_cart_share.copy,Copy,en_US -persistent_cart_share.copy,Kopieren,de_DE -persistent_cart_share.external_users,External Users,en_US -persistent_cart_share.external_users,Externe Benutzer,de_DE -persistent_cart_share.internal_users,Internal Users,en_US -persistent_cart_share.internal_users,Interne Benutzer,de_DE -persistent_cart_share.title,Share Cart via link,en_US -persistent_cart_share.title,Einkaufswagen per Link teilen,de_DE -clipboard.copy.success,Successfully copied to clipboard!,en_US -clipboard.copy.success,Erfolgreich in die Zwischenablage kopiert!,de_DE -clipboard.copy.error,Copying to clipboard is not supported by your browser. Try to copy the text manually.,en_US -clipboard.copy.error,Das Kopieren in die Zwischenablage wird von Ihrem Browser nicht unterstützt. Versuchen Sie den Text manuell zu kopieren.,de_DE -persistent_cart_share_page.preview,Preview: %title%,en_US -persistent_cart_share_page.preview,Vorschau: %title%,de_DE -``` - -Run the following console command to import data: -```bash -console data:import glossary -``` -{% info_block warningBox "Verification" %} -Make sure that in the database the configured data are added to the `spy_glossary` table. -{% endinfo_block %} - -### 3) Set up Behavior -Enable the following behaviors by registering the plugins: - -| Plugin | Specification | Prerequisites | Namespace | -| --- | --- | --- | --- | -| CartPreviewRouterStrategyPlugin | Redirects company user to the Cart Preview page if a cart was shared with Preview access. | None | SprykerShop\Yves\PersistentCartSharePage\Plugin | -| PreviewCartShareOptionPlugin | Provides an external (preview) share option for the Share Cart via link widget. | None | Spryker\Client\PersistentCartShare\Plugin | - -src/Pyz/Yves/ResourceSharePage/ResourceSharePageDependencyProvider.php - -```php -Make sure, that you can see the "Share Cart via Link" widget on a cart page.
    Make sure you can see an "External Users" radio button. Click on it.
    Make sure, that you can see the generated link for Preview access.
    Make sure, that you can see a "Copy" button near the link. Click on it.
    Make sure, that the link was copied to the clipboard (or a message that it's impossible due to some browser limitations).
    Copy the Cart Preview link and proceed with it. Make sure, that you are redirected to the Cart Preview page. -{% endinfo_block %} diff --git a/docs/scos/dev/feature-integration-guides/202005.0/persistent-cart-sharing-shared-carts-feature-integration.md b/docs/scos/dev/feature-integration-guides/202005.0/persistent-cart-sharing-shared-carts-feature-integration.md deleted file mode 100644 index 21b51142c7f..00000000000 --- a/docs/scos/dev/feature-integration-guides/202005.0/persistent-cart-sharing-shared-carts-feature-integration.md +++ /dev/null @@ -1,219 +0,0 @@ ---- -title: Persistent Cart Sharing + Shared Carts feature integration -description: The guide walks you through the process of installing the Shared Carts and Persistent Cart Sharing features in the project. -last_updated: Apr 3, 2020 -template: feature-integration-guide-template -originalLink: https://documentation.spryker.com/v5/docs/persisitent-cart-sharing-shared-carts-integration -originalArticleId: 34f40603-33be-4386-bd9d-493649025341 -redirect_from: - - /v5/docs/persisitent-cart-sharing-shared-carts-integration - - /v5/docs/en/persisitent-cart-sharing-shared-carts-integration ---- - -## Install Feature Core -### Prerequisites -Install the required features: - -| Name | Version | -| --- | --- | -| Shared Carts | 201907.0 | -| Persistent Cart Sharing | 201907.0 | - -### 1) Set up Behavior -Enable the following behaviors by registering the plugins: - -| Plugin | Specification | Prerequisites| Namespace | -| --- | --- | --- | --- | -| `ShareCartByResourceShareZedActivatorStrategyPlugin` | Responsible for sharing a cart to company users within the same business unit. Updates company user access level if he proceeded the cart share link with higher permission. | Expects the Company User to be logged in. | `Spryker\Zed\SharedCart\Communication\Plugin\ResourceShare` | -| `CartShareLoginRequiredResourceShareClientActivatorStrategyPlugin` | Provides a redirect route for resource share link when share option requires Customer to be logged in. | None | `Spryker\Client\SharedCart\Plugin\ResourceShare` | -| `SwitchDefaultCartResourceShareClientActivatorStrategyPlugin` | Switches default cart for company user after he proceeded cart share link with Read-only or Full Access access. | None | `Spryker\Client\SharedCart\Plugin\ResourceShare` | - -src/Pyz/Zed/ResourceShare/ResourceShareDependencyProvider.php - -```php -Make sure, that after you shared a cart with Read-only access to another company user and he followed a "Full Access" link - his cart access was updated to "Full Access".) - -{% info_block warningBox "Verification" %} -Make sure, that when you have a cart share link with Read-only or Full Access and you're not logged in - you can see the "Please login to access requested shared resource." error message. -{% endinfo_block %} - -{% info_block warningBox "Verification" %} -Make sure, that when you have a cart share link with Read-only or Full Access, you are logged in and you follow the link - your default cart will be changed to shared one before you get redirected to the cart page. -{% endinfo_block %} - -## Install feature frontend -### Prerequisites -Install the required features: - -| Name | Version| -| --- | --- | -| Shared Carts | 201907.0 | -| Persistent Cart Sharing | 201907.0 | - -## 1) Add Translations -Append glossary according to your configuration: - -src/data/import/glossary.csv - -```html -shared_cart.resource_share.strategy.error.cart_access_denied,The cart URL is wrong or try to login with another company user account.,en_US -shared_cart.resource_share.strategy.error.cart_access_denied,"Die URL des Einkaufswagens ist falsch, oder versuchen Sie sich mit einem anderen Konto anzumelden.",de_DE -shared_cart.resource_share.strategy.error.unable_to_share_cart,Unable to share a cart with provided customer.,en_US -shared_cart.resource_share.strategy.error.unable_to_share_cart,Der Einkaufswagen kann nicht mit dem angegebenen Kunden geteilt werden.,de_DE -shared_cart.resource_share.strategy.success.cart_share_access_updated,Access level was updated.,en_US -shared_cart.resource_share.strategy.success.cart_share_access_updated,Zugriffsebene wurde aktualisiert.,de_DE -``` - -Run the following console command to import data: - -```bash -console data:import glossary -``` - -{% info_block warningBox "Verification" %} -Make sure that in the database the configured data are added to the `spy_glossary` table. -{% endinfo_block %} - -## 2) Set up Behavior -Enable the following behaviors by registering the plugins: - -| Plugin | Specification | Prerequisites | Namespace | -| --- | --- | --- | --- | -| `FullAccessCartShareOptionPlugin` | Provides an internal (Full Access) share option for the Share Cart via link widget. | None | `Spryker\Client\SharedCart\Plugin`| -| `ReadOnlyCartShareOptionPlugin` | Provides an internal (Read-Only) share option for the Share Cart via link widget. | None | `Spryker\Client\SharedCart\Plugin` | -| `SharedCartRouterStrategyPlugin` | Provides a route to the page, where the customer will be redirected to, after successful cart share with Read-only or Full Access access. | None | `SprykerShop\Yves\SharedCartPage\Plugin\ResourceShare` | - -src/Pyz/Client/PersistentCartShare/PersistentCartShareDependencyProvider.php - -```php -Make sure, that you can see the "Share Cart via Link" widget on a cart page.
    Make sure you can see an "Internal Users" radio button. Click on it.
    Make sure, that you can see two generated links - one for Read-only access and another - for Full Access access.
    Login as another Company User from the same business unit.
    Proceed with the link for Read-only access. Make sure, that the cart was shared to you with Read-only access.
    Proceed with the link for Full Access access. Make sure, that the "Access level was updated." message appeared, and now a cart is shared with you with the Full Access access. -{% endinfo_block %} - diff --git a/docs/scos/dev/feature-integration-guides/202005.0/prices-feature-integration.md b/docs/scos/dev/feature-integration-guides/202005.0/prices-feature-integration.md deleted file mode 100644 index 4559cc9e9de..00000000000 --- a/docs/scos/dev/feature-integration-guides/202005.0/prices-feature-integration.md +++ /dev/null @@ -1,329 +0,0 @@ ---- -title: Prices feature integration -description: The guide walks you through the process of installing the Volume Prices feature in your project. -last_updated: Sep 15, 2020 -template: feature-integration-guide-template -originalLink: https://documentation.spryker.com/v5/docs/prices-feature-integration -originalArticleId: 709f91a9-6b6e-48b5-aba9-10b4adcbe8b1 -redirect_from: - - /v5/docs/prices-feature-integration - - /v5/docs/en/prices-feature-integration -related: - - title: Glue API - Product Price API feature integration - link: docs/scos/dev/feature-integration-guides/page.version/glue-api/glue-api-product-price-api-feature-integration.html - - title: Configurable Bundle feature integration - link: docs/scos/dev/feature-integration-guides/page.version/configurable-bundle-feature-integration.html - - title: Product Images + Configurable Bundle feature integration - link: docs/scos/dev/feature-integration-guides/page.version/product-images-configurable-bundle-feature-integration.html - - title: Product feature integration - link: docs/scos/dev/feature-integration-guides/page.version/product-feature-integration.html - - title: Product Lists feature integration - link: docs/scos/dev/feature-integration-guides/page.version/product-lists-feature-integration.html - - title: Merchant Product Restrictions feature integration - link: docs/scos/dev/feature-integration-guides/page.version/merchant-product-restrictions-feature-integration.html ---- - -{% info_block errorBox "Attention!" %} -The following feature integration Guide expects the basic feature to be in place. The current feature integration Guide only adds the **Volume Prices** functionality and `PriceProductWidget`. -{% endinfo_block %} - -## Install Feature Core - -### Prerequisites - -Install the required features: - -| Name | Version | -|---|---| -| Spryker Core | {{page.version}} | -| Prices | {{page.version}} | - -### 1) Install the required modules using Composer - -Run the following command(s) to install the required modules: - -```bash -composer require spryker-feature/prices: "^{{page.version}}" --update-with-dependencies -``` -{% info_block warningBox "Verification" %} - -Make sure that the following modules were installed: - - | Module | Expected Directory | -| --- | --- | -| `PriceProductVolume` | `vendor/spryker/price-product-volume` | -| `PriceProductDataImport` | `vendor/spryker/price-product-data-import` | - -{% endinfo_block %} - -### 2) Set up Transfer Objects - -Run the following commands to generate transfer changes: - -```bash -console transfer:generate -``` -{% info_block warningBox "Verification" %} - -Make sure that the following changes in transfer objects: - -| Transfer | Type | Event | Path | -| --- | --- | --- | --- | -| `PriceProductVolume` | class | created | `src/Generated/Shared/Transfer/PriceProductVolumeTransfer` | -| `PriceProductVolumeCollection` | class | created | `src/Generated/Shared/Transfer/PriceProductVolumeCollectionTransfer` | -| `PriceProduct.volumeQuantity` | column | added | `src/Generated/Shared/Transfer/PriceProductTransfer` | -| `ProductViewTransfer.currentPriceProduct` | column | added | `src/Generated/Shared/Transfer/CurrentProductPriceTransfer` | - -{% endinfo_block %} - -### 3) Import Data - -#### Import Volume Prices - -{% info_block infoBox "Note" %} -The following imported entities will be used as product volumes in Spryker OS. -{% endinfo_block %} - -Prepare your data according to your requirements using our demo data: - -src/data/import/product_price.csv - -```yaml -abstract_sku,concrete_sku,price_type,store,currency,value_net,value_gross,price_data.volume_prices -193,,DEFAULT,DE,EUR,16195,17994,"[{""quantity"":5,""net_price"":150,""gross_price"":165}, {""quantity"":10,""net_price"":145,""gross_price"":158}, {""quantity"":20,""net_price"":140,""gross_price"":152}]" -195,,DEFAULT,DE,CHF,40848,45387,"[{""quantity"":3,""net_price"":350,""gross_price"":385}, {""quantity"":8,""net_price"":340,""gross_price"":375}]" -194,,DEFAULT,AT,EUR,20780,23089,"[{""quantity"":5,""net_price"":265,""gross_price"":295}, {""quantity"":10,""net_price"":275,""gross_price"":310}, {""quantity"":20,""net_price"":285,""gross_price"":320}]" -``` - -| Column | REQUIRED | Data Type | Data Example | Data Explanation | -|---|---|---|---|---| -| `abstract_sku` | optional | string | 193 | Either `abstract_sku` or `concrete_sku` should be present to attach the given prices to the correct product | -| `concrete_sku` | optional | string | 117_29890338 | Either `abstract_sku` or `concrete_sku` should be present to attach the given prices to the correct product | -| `price_type` | mandatory | string | DEFAULT | | -| `store` | mandatory | string | DE | Store in which the specific product has that specific price | -| `currency` | mandatory | string | EUR | The currency in which the specific product has that specific price | -| `value_net` | mandatory | integer | 10200 | The net (after tax) price in cents | -| `value_gross` | mandatory | integer | 12000 | The gross (before tax) price in cents | -| `price_data.volume_prices` | optional | json string | `"[{""quantity"":5,""net_price"":150,""gross_price"":165}]"` | A json description of the prices when the quantity changes (volume based pricing). In the example given, the product bought, when it has a quantity of less than 5, it uses the normal price, but uses this Volume Price when the quantity is greater than 5 | - -Register the following plugin to enable data import: - -| Plugin | Specification | Prerequisites | Namespace | -|---|---|---|---| -| `PriceProductDataImportPlugin` | Imports demo product price data into the database. | None | `Spryker\Zed\PriceProductDataImport\Communication\Plugin` | - -src/Pyz/Zed/DataImport/DataImportDependencyProvider.php - -```php -, add them here as well. See _Merchant and Merchant Relations feature integration guide_ for more details. - -{% endinfo_block %} - -**src/Pyz/Zed/DataImport/DataImportDependencyProvider.php** - -```php -namespace Pyz\Zed\DataImport; -... -use Spryker\Zed\MerchantDataImport\Communication\Plugin\MerchantDataImportPlugin; -use Spryker\Zed\MerchantRelationshipDataImport\Communication\Plugin\MerchantRelationshipDataImportPlugin; -use Spryker\Zed\PriceProductDataImport\Communication\Plugin\PriceProductDataImportPlugin; -use Spryker\Zed\PriceProductMerchantRelationshipDataImport\Communication\Plugin\PriceProductMerchantRelationshipDataImportPlugin; -... - - protected function getDataImporterPlugins(): array - { - return [ - [new CategoryDataImportPlugin(), DataImportConfig::IMPORT_TYPE_CATEGORY_TEMPLATE], - new CompanyDataImportPlugin(), - new CompanyBusinessUnitDataImportPlugin(), - new CompanyUnitAddressDataImportPlugin(), - new CompanyUnitAddressLabelDataImportPlugin(), - new CompanyUnitAddressLabelRelationDataImportPlugin(), - new ProductMeasurementUnitDataImportPlugin(), - new ProductMeasurementBaseUnitDataImportPlugin(), - new ProductMeasurementSalesUnitDataImportPlugin(), - new ProductMeasurementSalesUnitStoreDataImportPlugin(), - new ProductQuantityDataImportPlugin(), - new ProductPackagingUnitTypeDataImportPlugin(), - new ProductPackagingUnitDataImportPlugin(), - new BusinessOnBehalfCompanyUserDataImportPlugin(), - new PriceProductDataImportPlugin(), - new MerchantDataImportPlugin(), - new MerchantRelationshipDataImportPlugin(), - new PriceProductMerchantRelationshipDataImportPlugin(), - ]; - } -``` - -7. Add a plugin to Zed `ConsoleDependencyProvider`: - - -| Module | Plugin | Description | Method in Dependency Provider | -| --- | --- | --- | --- | -| `Console` | `PriceProductMerchantRelationshipDeleteConsole` | Deletes imported prices. | `getConsoleCommands` | - -**src/Pyz/Zed/Console/ConsoleDependencyProvider.php** - -```php - - - - - - - -
    - -
    -``` - -9. Add the event subscriber to Zed `EventDependencyProvider`: - - -| Module | Event Subscriber Name | Method in EventDependencyProvider | -| --- | --- | --- | -| `Event` | `PriceProductMerchantRelationshipStorageEventSubscriber` | `getEventSubscriberCollection` | - -**src/Pyz/Zed/Event/EventDependencyProvider.php** - -```php -add(new ProductLabelStorageEventSubscriber()); - $eventSubscriberCollection->add(new ProductSetStorageEventSubscriber()); - $eventSubscriberCollection->add(new ProductSearchConfigStorageEventSubscriber()); - $eventSubscriberCollection->add(new PriceProductMerchantRelationshipStorageEventSubscriber()); -... -``` - -10. `Change/create` class in Zed `PriceProduct` module: `PriceProductDependencyProvider` - -**src/Pyz/Zed/PriceProduct/PriceProductDependencyProvider.php** - -```php -add(new ProductConcretePageSearchProductImageEventSubscriber()); - - return $eventSubscriberCollection; - } -} -``` - -{% info_block warningBox "Verification" %} - -1. Make sure that after `console sync:data product_concrete` command execution product data including images is synced to Elasticsearch product concrete documents. -2. Also check that when product or its images updated via Zed UI, product data including images is synced at respective Elasticsearch product concrete documents. - -| Storage Type | Target Entity | Example Expected Data Identifier | -| --- | --- | --- | -| Elasticsearch | `ProductConcrete` | `product_concrete:de:de_de:1` | - -**Example expected data fragment for Elasticsearch** - -```yaml -{ - "store":"DE", - "locale":"de_DE", - "type":"product_concrete", - "is-active":true, - "search-result-data":{ - "id_product":1, - "fkProductAbstract":2, - "abstractSku":"222", - "sku":"222_111", - "type":"product_concrete", - "name":"HP 200 280 G1", - "images":[ - { - "idProductImage":1, - "idProductImageSetToProductImage":1, - "sortOrder":0, - "externalUrlSmall":"//images.icecat.biz/img/gallery_mediums/img_29406823_medium_1480596185_822_26035.jpg", - "externalUrlLarge":"//images.icecat.biz/img/gallery_raw/29406823_8847.png" - } - ] - }, - "full-text-boosted":[ - "HP 200 280 G1", - "222_111" - ], - "suggestion-terms":[ - "HP 200 280 G1", - "222_111" - ], - "completion-terms":[ - "HP 200 280 G1", - "222_111" - ], - "string-sort":{ - "name":"HP 200 280 G1" - } -} -``` - - -{% endinfo_block %} - -## Install feature frontend -### Prerequisites -Overview and install the necessary features before beginning the integration step. - -| Name | Version | -| --- | --- | -| Spryker Core | master | - -### 1) Install the required modules using Composer -Run the following command to install the required modules: -```bash -composer require spryker-feature/product: "^master" --update-with-dependencies -``` -{% info_block warningBox "Verification" %} - -Make sure that the following modules are installed: - -| Module | Expected Directory | -| --- | --- | -| `ProductSearchWidget` | `spryker-shop/product-search-widget` | - -{% endinfo_block %} -### 2) Set up Widgets -Register the following plugins to enable widgets: - -| Plugin | Description | Prerequisites | Namespace | -| --- | --- | --- | --- | -| `ProductConcreteSearchWidget` | Allows customers to search for concrete products on the Cart page. | None | `SprykerShop\Yves\ProductSearchWidget\Widget` | -| `ProductConcreteSearchWidget` | Incorporates `ProductConcreteSearchWidget` and allows customers to search for concrete products and quickly add them to the Cart with the desired quantity. | None | `SprykerShop\Yves\ProductSearchWidget\Widget` | -| `ProductConcreteSearchGridWidget` | Allows to output list of concrete products from search filtered by criteira. | None | `SprykerShop\Yves\ProductSearchWidget\Widget` | - -**src/Pyz/Yves/ShopApplication/ShopApplicationDependencyProvider.php** - -```php - Entity.spy_product_abstract_group.update
    Entity.spy_product_abstract_group.delete | - - - -**src/Pyz/Zed/ProductGroup/Persistence/Propel/Schema/spy_product_group.schema.xml** - -```xml - - - - - - - -
    - -
    -``` - -2. Set up synchronization queue pools so non-multi-store entities (not store specific entities) will be synchronized among stores: - -**src/Pyz/Zed/ProductGroupStorage/Persistence/Propel/Schema/spy_product_group_storage.schema.xml** - -```xml - - - - - - - -
    - -
    -``` - - -3. Run the following commands to apply database changes and generate entity and transfer changes: - -```bash -console transfer:generate -console propel:install -console transfer:generate -``` - -{% info_block warningBox "Verification" %} - -Make sure that the following changes have been applied by checking your database: - - -| Database entity | Type | Event | -| --- | --- | --- | -| spy_product_group | table | created | -| spy_product_abstract_group | table | created | -| spy_product_abstract_group_storage | table | created | - -{% endinfo_block %} - -{% info_block warningBox "Verification" %} - -Make sure that the following changes took place in transfer objects: - - - -| Transfer | Type | Event | Path | -| --- | --- | --- | --- | -| ProductGroup | class | created | src/Generated/Shared/Transfer/ProductGroupTransfer | -| ProductAbstractGroups | class | created | src/Generated/Shared/Transfer/ProductAbstractGroupsTransfer | -| ProductAbstractGroupStorage | class | created | src/Generated/Shared/Transfer/ProductAbstractGroupStorageTransfer | - -{% endinfo_block %} - -{% info_block warningBox "Verification" %} - -Make sure that the changes have been implemented successfully. To do it, trigger the following methods and make sure that the above events have been triggered: - - -| Path | Method Name | -| --- | --- | -| src/Orm/Zed/ProductGroup/Persistence/Base/SpyProductAbstractGroup.php | prepareSaveEventName()
    addSaveEventToMemory()
    addDeleteEventToMemory() | - - - -{% endinfo_block %} - - - -### 3) Configure Export to Redis - -This step will publish tables on change (create, edit, delete) to the `spy_product_abstract_group_storage` table and synchronize the data to Storage. - -#### Set up Event Listeners - -Set up the following plugin(s): - - -| Plugin | Specification | Prerequisites | Namespace | -| --- | --- | --- | --- | -| ProductGroupStorageEventSubscriber | Registers listeners that are responsible to publish product abstract group storage entity changes when a related entity change event occurs. | None | Spryker\Zed\ProductGroupStorage\Communication\Plugin\Event\Subscriber | - -```php - -add(new ProductGroupStorageEventSubscriber()); - - return $eventSubscriberCollection; - } -} -``` - - -#### Setup Re-Generate and Re-Sync Features - -Set up the following plugin(s): - -| Plugin | Specification | Prerequisites | Namespace | -| --- | --- | --- | --- | -| ProductGroupSynchronizationDataPlugin | Allows synchronizing the whole storage table content into Storage. | None | Spryker\Zed\ProductGroupStorage\Communication\Plugin\Synchronization | - -```php - - - - - - - -
    - -
    -``` - -Run the following commands to apply database changes and generate entity and transfer changes: - -```bash -console transfer:generate -console propel:install -console transfer:generate -``` - -{% info_block warningBox "Verification" %} - -Make sure that the following changes have been applied by checking your database: - -| Database Entity | Type | Event | -| --- | --- | --- | -| `spy_configurable_bundle_template_image_storage` | table | created | - -{% endinfo_block %} - -{% info_block warningBox "Verification" %} - -Make sure that the following changes have been applied in transfer objects: - -| Transfer | Type | Event | Path | -| --- | --- | --- | --- | -| `SpyConfigurableBundleTemplateImageStorageEntity` | class | created | `src/Generated/Shared/Transfer/SpyConfigurableBundleTemplateImageStorageEntityTransfer` | - -{% endinfo_block %} - -### 2) Configure Export to Redis and Elasticsearch -This step will publish tables on change (create, edit) to the `spy_configurable_bundle_template_image_storage` and synchronize the data to Storage. - -| Plugin | Specification | Prerequisites | Namespace | -| --- | --- | --- | --- | -| `ConfigurableBundleTemplateImagePageSearchEventSubscriber` | Registers listeners that are responsible for publishing configurable bundle template image entity changes to search when a related entity change event occurs. | None | `Spryker\Zed\ConfigurableBundlePageSearch\Communication\Plugin\Event\Subscriber` | -| `ConfigurableBundleTemplateImagePageSearchEventSubscriber` | Registers listeners that are responsible for publishing configurable bundle template image entity changes to search when a related entity change event occurs. | None | `Spryker\Zed\ConfigurableBundlePageSearch\Communication\Plugin\Event\Subscriber` | - -**src/Pyz/Zed/Event/EventDependencyProvider.php** - -```php -add(new ConfigurableBundleTemplateImageStorageEventSubscriber()); - $eventSubscriberCollection->add(new ConfigurableBundleTemplateImagePageSearchEventSubscriber()); - - return $eventSubscriberCollection; - } -} -``` - -#### Set up Re-Generate and Re-Sync Features - -| Plugin | Specification | header | header | -| --- | --- | --- | --- | -| `ConfigurableBundleTemplateImageEventResourceBulkRepositoryPlugin` | Allows populating empty storage table with data. | None | `Spryker\Zed\ConfigurableBundleStorage\Communication\Plugin\Event` | -| `ConfigurableBundleTemplateImageSynchronizationDataBulkPlugin` | Allows synchronizing the entire storage table content into Storage. | None | `Spryker\Zed\ConfigurableBundlePageSearch\Communication\Plugin\Event\Subscriber` | - -**src/Pyz/Zed/EventBehavior/EventBehaviorDependencyProvider.php** - -```php - - - - - - - - - -
    - -
    -``` - -Expand ProductImageSetTransfer transfer: - -**src/Pyz/Shared/ProductImage/Transfer/product_image.transfer.xml** - -```xml - - - - - - - - -``` - -Run the following commands to apply database changes and generate entity and transfer -changes: - -```bash -console transfer:generate -console propel:install -console transfer:generate -``` - -Prepare your data according to your requirements using our demo data: - -**data/import/configurable_bundle_template_image.csv** - -```yaml -configurable_bundle_template_key,product_image_set_key -t000001,product_image_set_1 -t000001,product_image_set_2 -t000002,product_image_set_3 -t000002,product_image_set_4 -``` - -| Column | REQUIRED | Data Type | Data Example | Data Explanation | -| --- | --- | --- | --- | --- | -| `configurable_bundle_template_key` | mandatory | string | `t000001` | Internal data import identifier for the configurable bundle template. | -| `product_image_set_key` | mandatory | string | `product_image_set_1` | Internal data import identifier for the product image set. | - -{% info_block warningBox "Verification" %} - -Make sure that the `product_image_set_key` column is added to the `spy_product_image_set` table in the database. - -{% endinfo_block %} - -Expand your data import steps for product image sets: - -**data/import/icecat_biz_data/product_image.csv** - -```yaml -...,product_image_set_key -...,product_image_set_1 -...,product_image_set_2 -...,product_image_set_3 -...,product_image_set_4 -``` - -Register the following plugins to enable data import: - -| Plugin | Specification | Prerequisites | Namespace | -| --- | --- | --- | --- | -| `ConfigurableBundleTemplateImageDataImportPlugin` | Links configurable bundle templates with product image sets. | None | `Spryker\Zed\ConfigurableBundleDataImport\Communication\Plugin` | - -**src/Pyz/Zed/DataImport/DataImportDependencyProvider.php** - -```php - new ProductLabelDictionaryCollectorStoragePlugin(), - ProductLabelConstants::RESOURCE_TYPE_PRODUCT_ABSTRACT_PRODUCT_LABEL_RELATIONS => new ProductLabelProductAbstractRelationCollectorStoragePlugin(), - ]; - }; - - // ... - } -} -``` - -### Data Setup - -The Zed user interface can be used to manage product labels. The collectors that were enabled before will take care of exporting active labels to the key-value storage. Product labels can also be imported using the - -### Usage in Yves - -The Product Label module ships with a Twig extension to easily access and render product labels in templates. The extension registers a new Twig function called `spyProductLabels` that excepts two parameters: - -1. **$idProductAbstract**: ID of the abstract product to render labels for -2. **$templateName**: The name of a template to use for rendering the labels - -To enable the Twig extension it is necessary to register it as a new service provider in `\Pyz\Yves\Application\YvesBootstrap` - -```php -application->register(new ProductLabelTwigExtension()); - } -} -``` - -An example implementation of template rendering labels for an abstract product looks like this (e.g. on a product detail page): - -```php -
    - {% raw %}{{{% endraw %} spyProductLabels(product.getIdProductAbstract(), '@ProductLabel/partials/group.twig') {% raw %}}}{% endraw %} -
    -``` - -### Creating a Custom Template for Rendering Product Labels - -The template specified in the second parameter in the `spyProductLabels` Twig function receives a collection of transfer objects, each representing a product label containing data from the key-value storage. This collection will be empty for abstract products that are not assigned any product labels. All locale-specific label fields will be returned for the currently active store locale. - -Here's a simple example of a possible template: - -```php -
    - {% raw %}{%{% endraw %} for productLabelTransfer in productLabelTransferCollection {% raw %}%}{% endraw %} - - - {% raw %}{{{% endraw %} productLabelTransfer.getName() {% raw %}}}{% endraw %} - - - {% raw %}{%{% endraw %} endfor {% raw %}%}{% endraw %} -
    -``` - -A more detailed example implementation is available in the [demo-shop](https://github.com/spryker/demoshop). - -### Checking Validity - -Product labels can be configured to have a validity date range. They will only be represented in the key-value storage if they fall between the `valid_from` and `valid_to` dates. - -{% info_block warningBox "Verification" %} -To make sure that invalid product labels become valid when the specified validity date range is entered, run the console command `console product-label:validity`. It will also handle labels that are currently valid but become invalid due to exceeding the `valid_to` date. The command checks validity date ranges for all active labels and "touch" the ones for which the validity state changes. -{% endinfo_block %} - -The [demo-shop](https://github.com/spryker/demoshop) ships with a Cronjob triggers this command once a day. - -## Under the hood - -### Database schema -![product_label_db.png](https://cdn.document360.io/9fafa0d5-d76f-40c5-8b02-ab9515d3e879/Images/Documentation/product_label_db%281%29.png) - -The `Product Label` module adds three new tables: - -1. **spy_product_label** -This table stores the main product label information such as its name, validity dates, flags, etc. -2. **spy_product_label_localized_attributes** -This tables stores all localized information. Currently it only stores the translated product label names. -3. **spy_product_label_product_abstract** -This table stores the relations between product labels and abstract products. - -### Representation In The Key-Value Storage - -Product labels are exported in two parts, a dictionary that contains all active and valid product-labels and a list of product label IDs for each abstract product. - -#### Product Label Dictionary - -The dictionary contains only active and valid product labels. The active state is derived from the `is_active` flag and validity is checked against the `valid_from` and `valid_to` fields. There is a dedicated transfer object that represents the structure of each product label in the dictionary, called `ProductLabelStorageTransfer`. - -#### Abstract Product to Product Label Relations - -All relations between an abstract product and a product label will be exported not taking into account active state and validity. - -When using `\Spryker\Client\ProductLabel\ProductLabelClient::findLabelsByIdProductAbstract()` (or the Twig function `spyProductLabels`) each relation is checked against the dictionary and only a collection of active and valid product labels will be returned for a single abstract product. This prevents having to update each product relation in the key-value storage whenever a product label changes thus reducing the number of required "touches". - -## Feature Extensions - -### Discounts Based on Product Labels - -It's possible to create discount rules based on products that have specific label(s). On the discount UI select the `product-label` rule for **Discount calculation** to define that the discount will be apply to the selected predefined labels. You can also select the `product-label` rule for **Conditions** to define that your discount is applied when the selected labels are present. - -Follow the steps below to activate this feature: - -1. Install `ProductLabelDiscountConnector` module in your project. -2. Activate the Decision rule and Collector plugins in `\Pyz\Zed\Discount\DiscountDependencyProvider`: - -```php - new ProductLabelDictionaryCollectorStoragePlugin(), - ProductLabelConstants::RESOURCE_TYPE_PRODUCT_ABSTRACT_PRODUCT_LABEL_RELATIONS => new ProductLabelProductAbstractRelationCollectorStoragePlugin(), - ]; - }; - - // ... - } -} -``` - -To provide product label information for Search documents, you need to extend your product search collector by adding a new `search-result-data` entry (for example, `id_product_labels`) for products. The data of this field can be easily read with the `ProductLabelFacade::findLabelIdsByIdProductAbstract()` method. - -### Data Setup - -The Zed user interface can be used to manage product labels. The collectors that were enabled before will take care of exporting active labels to the key-value storage. Product labels can also be imported using the demo-shop's importer infrastructure. Spryker provides a couple of example installer implementations in the [demo-shop](https://github.com/spryker/demoshop) that can be used for ideas. - -### Usage in Yves - -The Product Label module ships with a Twig extension to easily access and render product labels in templates. The extension provides the `spyProductLabels` twig function that renders labels based on the label dictionary. The function excepts the following parameters: - -1. **$idProductLabels**: an array of product label IDs to render labels -2. **$templateName**: The name of a template to use for rendering the labels - -It also provides the `spyProductAbstractLabels` Twig function. This function is **deprecated** - to use due to performance reasons. It first needs to read product label relation information from Storage and only then renders product labels based on the label dictionary. Use this only when it's not possible to have the list of product label IDs for the rendered product. The function excepts the following parameters: - -1. **$idProductAbstract**: ID of the abstract product to render labels for -2. **$templateName**: The name of a template to use for rendering the labels - -To enable the Twig extension it is necessary to register it as a new service provider in `\Pyz\Yves\Application\YvesBootstrap` -```php - -application->register(new ProductLabelTwigServiceProvider()); - } -} - -``` - -An example implementation of template rendering labels for an abstract product looks like this (e.g. on a product details page): - -```php -
    - {% raw %}{{{% endraw %} spyProductLabels(product.getIdProductLabels(), '@ProductLabel/partials/group.twig') {% raw %}}}{% endraw %} -
    -``` - -### Creating a Custom Template for Rendering Product Labels - -The template specified in the second parameter in the `spyProductLabels` Twig function receives a collection of transfer objects, each representing a product label containing data from the key-value storage. This collection will be empty for abstract products that are not assigned any product labels. All locale-specific label fields will be returned for the currently active store locale. - -Here's a simple example of a possible template: - -```php -
    - {% raw %}{%{% endraw %} for productLabelTransfer in productLabelTransferCollection {% raw %}%}{% endraw %} - - - {% raw %}{{{% endraw %} productLabelTransfer.getName() {% raw %}}}{% endraw %} - - - {% raw %}{%{% endraw %} endfor {% raw %}%}{% endraw %} -
    -``` - -A more detailed example implementation is available in the [demo-shop](https://github.com/spryker/demoshop). - -### Checking Validity - -Product labels can be configured to have a validity date range. They will only be represented in the key-value storage if they fall between the `valid_from` and `valid_to` dates. - -To make sure that invalid product labels become valid when the specified validity date range is entered, run the console command `console product-label:validity`. It will also handle labels that are currently valid but become invalid due to exceeding the `valid_to` date. The command checks validity date ranges for all active labels and "touch" the ones for which the validity state changes. - -The [demo-shop](https://github.com/spryker/demoshop) ships with a Cronjob triggers this command once a day. - -### Dynamic Labels -It's possible to manage product label relations dynamically based on some custom business logic. The custom logic can be implemented with a set of `\Spryker\Zed\ProductLabel\Dependency\Plugin\ProductLabelRelationUpdaterPluginInterface` plugins. - -By registering the necessary plugins in `\Pyz\Zed\ProductLabel\ProductLabelDependencyProvider::getProductLabelRelationUpdaterPlugins()`you will be able to run the `vendor/bin/console product-label:relations:update` command from your project to update the dynamic labels of the products. - -To enable this console command add `\Spryker\Zed\ProductLabel\Communication\Console\ProductLabelRelationUpdaterConsole`to `\Pyz\Zed\Console\ConsoleDependencyProvider::getConsoleCommands()`. It's also suggested to set a cron job -to run this command periodically. In demoshop we've set this to run every minute so it's aligned with collectors and less likely to experience inconsistency with product data and its labels. - -## Under the Hood - -### Database Schema -![product_label_db](https://cdn.document360.io/9fafa0d5-d76f-40c5-8b02-ab9515d3e879/Images/Documentation/product_label_db.png) - -The `Product Label` module adds three new tables: - -1. **spy_product_label** -This table stores the main product label information such as its name, validity dates, flags, etc. -2. **spy_product_label_localized_attributes** -This tables stores all localized information. Currently it only stores the translated product label names. -3. **spy_product_label_product_abstract** -This table stores the relations between product labels and abstract products. - -### Representation in the Key-Value Storage - -Product labels are exported in two parts, a dictionary that contains all active and valid product-labels and a list of product label IDs for each abstract product. - -#### Product Label Dictionary - -The dictionary contains only active and valid product labels. The active state is derived from the `is_active` flag and validity is checked against the `valid_from` and `valid_to` fields. There is a dedicated transfer object that represents the structure of each product label in the dictionary, called `ProductLabelStorageTransfer`. - -#### Abstract Product to Product Label Relations - -All relations between an abstract product and a product label will be exported not taking into account active state and validity. - -When using `\Spryker\Client\ProductLabel\ProductLabelClient::findLabelsByIdProductAbstract()` (or the `spyProductLabels` and `spyProductAbstractLabels` Twig functions) each relation is checked against the dictionary and only a collection of active and valid product labels will be returned for a single abstract product. This prevents having to update each product relation in the key-value storage whenever a product label changes thus reducing the number of required "touches". - -## Feature Extensions - -### Discounts Based on Product Labels - -It's possible to create discount rules based on products that have specific label(s). On the discount UI -select the `product-label` rule for **Discount calculation** to define that the discount will be apply to the selected predefined labels. You can also select the `product-label` rule for **Conditions** to define that your discount is applied when the selected labels are present. - -Follow the steps below to activate this feature: - -1. Install `ProductLabelDiscountConnector` module in your project. -2. Active the Decision rule and Collector plugins in `\Pyz\Zed\Discount\DiscountDependencyProvider`: - -```php -The result of the query will contain only Products that were on the given Whitelists, but not on the given Blacklists.| The Customer session must contain Product List information. See [Merchant Product Restrictions feature integration](/docs/scos/dev/feature-integration-guides/{{page.version}}/merchant-product-restrictions-feature-integration.html) for an example implementation. | `Spryker\Client\CustomerCatalog\Plugin\Search` | -| `ProductListQueryExpanderPlugin` | Expands search query with filtering by product list ID. | None | `Spryker\Client\ProductListSearch\Plugin\Search` | - -{% info_block infoBox "Info" %} - -The order of the query expander plugins matters for the search result. Make sure that your query expanders are in the appropriate order. I.e., the `FacetQueryExpanderPlugin` needs to be placed after all the other plugins that filter down the result; otherwise, it can't generate the proper query fragment for itself. - -{% endinfo_block %} - -**src/Pyz/Client/Catalog/CatalogDependencyProvider.php** - -```php -You should also be able to filter product concrete search results by product list ID. -{% endinfo_block %} diff --git a/docs/scos/dev/feature-integration-guides/202005.0/product-lists-feature-integration.md b/docs/scos/dev/feature-integration-guides/202005.0/product-lists-feature-integration.md deleted file mode 100644 index 1547fb3010e..00000000000 --- a/docs/scos/dev/feature-integration-guides/202005.0/product-lists-feature-integration.md +++ /dev/null @@ -1,802 +0,0 @@ ---- -title: Product Lists feature integration -description: The Product Lists Feature allows defining access to particular items. The guide walks you through the process of integrating this feature into your project. -last_updated: Sep 15, 2020 -template: feature-integration-guide-template -originalLink: https://documentation.spryker.com/v5/docs/product-lists-feature-integration -originalArticleId: b3bcf56f-363f-4fd5-ab5b-3a7023552a90 -redirect_from: - - /v5/docs/product-lists-feature-integration - - /v5/docs/en/product-lists-feature-integration -related: - - title: Product Lists + Catalog feature integration - link: docs/scos/dev/feature-integration-guides/page.version/product-lists-catalog-feature-integration.html - - title: CMS + Product Lists + Catalog feature integration - link: docs/scos/dev/feature-integration-guides/page.version/cms-product-lists-catalog-feature-integration.html - - title: Configurable Bundle feature integration - link: docs/scos/dev/feature-integration-guides/page.version/configurable-bundle-feature-integration.html - - title: Product feature integration - link: docs/scos/dev/feature-integration-guides/page.version/product-feature-integration.html - - title: Prices feature integration - link: docs/scos/dev/feature-integration-guides/page.version/prices-feature-integration.html - - title: Merchant Product Restrictions feature integration - link: docs/scos/dev/feature-integration-guides/page.version/merchant-product-restrictions-feature-integration.html - - title: Product Images + Configurable Bundle feature integration - link: docs/scos/dev/feature-integration-guides/page.version/product-images-configurable-bundle-feature-integration.html ---- - -## Install Feature Core -### Prerequisites -Install the required features: - -| Name | Version | -| --- | --- | -|Spryker Core|master| -| Product |master | -| Category Management |master | - -### 1) Install the required modules using Composer -Run the following command(s) to install the required modules: - -```bash -composer require spryker-feature/product-lists:"^master" --update-with-dependencies -``` -{% info_block warningBox "Verification" %} - -Make sure that the following modules have been installed: - -| Module | Expected Directory | -| --- | --- | -| `ProductList` | `vendor/spryker/product-list` | -| `ProductListDataImport` | `vendor/spryker/product-list-data-import` | -| `ProductListGui` | `vendor/spryker/product-list-gui` | -| `ProductListGuiExtension` | `vendor/spryker/product-list-gui-extension` | -| `ProductListSearch` | `vendor/spryker/product-list-search` | -| `ProductListStorage` | `vendor/spryker/product-list-storage` | -| `ProductStorageExtension` | `vendor/spryker/product-storage-extension` | - -{% endinfo_block %} - -### 2) Set up Database Schema and Transfer Objects - -Define the following transfer objects: - -**src/Pyz/Shared/ProductList/Transfer/product_list.transfer.xml** - -```xml - - - - - - - - - - - - - - - - - - - ``` - -Adjust the schema definition so that entity changes trigger events. - -| Affected entity | Triggered events | -| --- | --- | -| `spy_product_list` | `Entity.spy_product_list.create`
    `Entity.spy_product_list.update`
    `Entity.spy_product_list.delete` | -| `spy_product_list_product_concrete` | `Entity.spy_product_list_product_concrete.create`
    `Entity.spy_product_list_product_concrete.update`
    `Entity.spy_product_list_product_concrete.delete` | -| `spy_product_list_category` | `Entity.spy_product_list_category.create`
    `Entity.spy_product_list_category.update`
    `Entity.spy_product_list_category.delete` | - -**src/Pyz/Zed/ProductList/Persistence/Propel/Schema/spy_product_list.schema.xml** - -``` xml - - - - - - -
    - - - - -
    - - - - -
    -
    -``` - -Set up synchronization queue pools so that non-multi-store entities (not store-specific entities) are synchronized among stores: - -**src/Pyz/Zed/ProductListStorage/Persistence/Propel/Schema/spy_product_list_storage.schema.xml** - -```xml - - - - - - -
    - - - - -
    -
    -``` - -Run the following commands to apply database changes and generate entity and transfer changes: - -```bash -console transfer:generate -console propel:install -console transfer:generate -``` -{% info_block warningBox "Verification" %} - -Make sure that the following changes have been applied in the transfer objects: - -| Transfer | Type | Event | Path | -| --- | --- | --- | --- | -| `ProductList` | class | created | `src/Generated/Shared/Transfer/ProductListTransfer` | -| `ProductListCollection` | class | created | `src/Generated/Shared/Transfer/ProductListCollectionTransfer` | -| `ProductListCategoryRelation` | class | created | `src/Generated/Shared/Transfer/ProductListCategoryRelationTransfer` | -| `ProductListProductConcreteRelation` | class | created | `src/Generated/Shared/Transfer/ProductListProductConcreteRelationTransfer` | -| `CartChange` | class | created | `src/Generated/Shared/Transfer/CartChangeTransfer` | -| `ProductListAggregateForm` | class | created | `src/Generated/Shared/Transfer/ProductListAggregateFormTransfer` | -| `QueryCriteria` | class | created | `src/Generated/Shared/Transfer/QueryCriteriaTransfer` | -| `QueryJoin` | class | created | `src/Generated/Shared/Transfer/QueryJoinTransfer` | -| `PageMap` | class | created | `src/Generated/Shared/Transfer/PageMapTransfer` | -| `ProductListMap` | class | created | `src/Generated/Shared/Transfer/ProductListMapTransfer` | -| `ProductPageSearch` | class | created | `src/Generated/Shared/Transfer/ProductPageSearchTransfer` | -| `ProductConcretePageSearch` | class | created | `src/Generated/Shared/Transfer/ProductConcretePageSearchTransfer` | -| `ProductPayload` | class | created | `src/Generated/Shared/Transfer/ProductPayloadTransfer` | -| `ProductAbstractProductListStorage` | class | created | `src/Generated/Shared/Transfer/ProductAbstractProductListStorageTransfer` | -| `ProductConcreteProductListStorage` | class | created | `src/Generated/Shared/Transfer/ProductConcreteProductListStorageTransfer` | -| `CustomerProductListCollection` | class | created | `src/Generated/Shared/Transfer/CustomerProductListCollectionTransfer` | -| `Customer.companyUserTransfer` | property | created | `src/Generated/Shared/Transfer/CustomerTransfer` | -| `Customer.customerProductListCollection` | property | created | `src/Generated/Shared/Transfer/CustomerTransfer` | - -{% endinfo_block %} - -{% info_block warningBox "Verification" %} - -Make sure that the following changes have been applied by checking your database: - -| Database Entity | Type | Event | -| --- | --- | --- | -| `spy_product_list` | table | created | -| `spy_product_list_product_concrete` | table | created | -| `spy_product_list_category` | table | created | -| `spy_product_abstract_product_list_storage` | table | created | -| `spy_product_concrete_product_list_storage` | table | created | - -{% endinfo_block %} - -{% info_block warningBox "Verification" %} - -Make sure that propel entities have been generated successfully by checking their existence. Also, change the generated entity classes to extend from Spryker core classes. - -| Class Path | Extends | -| --- | --- | -| `src/Orm/Zed/ProductList/Persistence/Base/SpyProductList.php` | `Spryker\Zed\ProductList\Persistence\Propel\AbstractSpyProductList` | -| `src/Orm/Zed/ProductList/Persistence/Base/SpyProductListQuery.php` | `Spryker\Zed\ProductList\Persistence\Propel\AbstractSpyProductListQuery` | -| `src/Orm/Zed/ProductList/Persistence/Base/SpyProductListProductConcrete.php` | `Spryker\Zed\ProductList\Persistence\Propel\AbstractSpyProductListProductConcrete` | -| `src/Orm/Zed/ProductList/Persistence/Base/SpyProductListProductConcreteQuery.php` | `Spryker\Zed\ProductList\Persistence\Propel\AbstractSpyProductListProductConcreteQuery` | -| `src/Orm/Zed/ProductList/Persistence/Base/SpyProductListCategory.php` | `Spryker\Zed\ProductList\Persistence\Propel\AbstractSpyProductListCategory` | -| `src/Orm/Zed/ProductList/Persistence/Base/SpyProductListCategoryQuery.php` | `Spryker\Zed\ProductList\Persistence\Propel\AbstractSpyProductListCategoryQuery` | -| `src/Orm/Zed/ProductListStorage/Persistence/Base/SpyProductAbstractProductListStorage` | `Spryker\Zed\ProductListStorage\Persistence\Propel\AbstractSpyProductAbstractProductListStorage` | -| `src/Orm/Zed/ProductListStorage/Persistence/Base/SpyProductAbstractProductListStorageQuery` | `Spryker\Zed\ProductListStorage\Persistence\Propel\AbstractSpyProductAbstractProductListStorageQuery` | -| `src/Orm/Zed/ProductListStorage/Persistence/Base/SpyProductConcreteProductListStorage` | `Spryker\Zed\ProductListStorage\Persistence\Propel\AbstractSpyProductConcreteProductListStorage` | -| `src/Orm/Zed/ProductListStorage/Persistence/Base/SpyProductConcreteProductListStorageQuery` | `Spryker\Zed\ProductListStorage\Persistence\Propel\AbstractSpyProductConcreteProductListStorageQuery` | - -{% endinfo_block %} - -{% info_block warningBox "Verification" %} - -Make sure that the changes have been implemented successfully. For this purpose, trigger the following methods and make sure that the above events have been triggered: - -| Path | Method Name | -| --- | --- | -| `src/Orm/Zed/ProductList/Persistence/Base/SpyProductList.php` | `prepareSaveEventName()`
    `addSaveEventToMemory()`
    `addDeleteEventToMemory()` | -| `src/Orm/Zed/ProductList/Persistence/Base/SpyProductListProductConcrete.php` | `prepareSaveEventName()`
    `addSaveEventToMemory()`
    `addDeleteEventToMemory()` | -| `src/Orm/Zed/ProductList/Persistence/Base/SpyProductListCategory.php` | `prepareSaveEventName()`
    `addSaveEventToMemory()`
    `addDeleteEventToMemory()` | -| `src/Orm/Zed/ProductListStorage/Persistence/Base/SpyProductAbstractProductListStorage.php` | `sendToQueue()` | -| `src/Orm/Zed/ProductListStorage/Persistence/Base/SpyProductConcreteProductListStorage.php` | `sendToQueue()` | - -{% endinfo_block %} - -### 3) Add Translations - -Append glossary according to your language configuration: - -**src/data/import/glossary.csv** - -```yaml -product-cart.info.restricted-product.removed,"Unavailable item %sku% was removed from your shopping cart.",en_US -product-cart.info.restricted-product.removed,"Der nicht verfügbare Artikel% sku% wurde aus Ihrem Einkaufswagen entfernt.",de_DE -``` - -Run the following console command to import data: - -```bash -console data:import glossary -``` - -{% info_block warningBox "Verification" %} -Make sure that the configured data has been added to the `spy_glossary` table in the database. -{% endinfo_block %} - - -### 4) Configure Export to Redis and Elasticsearch -#### Set up Event Listeners -With this step, you will be able to publish tables on change (create, edit, delete) to the `spy_product_abstract_product_list_storage`, `spy_product_concrete_product_list_storage` and synchronize the data to Storage and Search. - -| Plugin | Specification |Prerequisites | Namespace | -| --- | --- | --- | --- | -| `ProductListStorageEventSubscriber` | Registers listeners that are responsible for publishing product list information to storage when a related entity changes. | None | `Spryker\Zed\ProductListStorage\Communication\Plugin\Event\Subscriber` | -|`ProductListSearchEventSubscriber`|Registers listeners that are responsible for publishing product list information to search when a related entity changes.|None|`Spryker\Zed\ProductListSearch\Communication\Plugin\Event\Subscriber`| - -**src/Pyz/Zed/Event/EventDependencyProvider.php** - -```php -add(new ProductListStorageEventSubscriber()); - $eventSubscriberCollection->add(new ProductListSearchEventSubscriber()); - - return $eventSubscriberCollection; - } -} -``` - -{% info_block warningBox "Verification" %} - -Make sure that when a product list is created, updated or deleted, they are exported (or removed) to Redis and Elasticsearch accordingly. - -| Storage type | Target Entity | Example Expected Data Identifier | -| --- | --- | --- | -| Redis | Product Abstract Product List | `kv:product_abstract_product_lists:1` | -| Redis | Product Concrete Product List | `kv:product_concrete_product_list:1` | -| Elasticsearch | Product Abstract | `product_abstract:de:en_us:1` | -| Elasticsearch | Product Concrete | `product_concrete:de:en_us:1` | - -{% endinfo_block %} - -**Example expected data fragment for Product Abstract Product List** - -```json -{ - "id_product_abstract": 1, - "id_whitelists": [1,2], - "id_blacklists": [3] -} -``` - -**Example expected data fragment for Product Concrete Product List** - -```json -{ - "id_product_concrete": 1, - "id_whitelists": [1,2], - "id_blacklists": [3] -} -``` - -**Example expected data fragment for Product Abstract** - -```json -{ - "product-lists": { - "whitelists": [1,2], - "blacklists": [3] - } -} -``` - -**Example expected data fragment for Product Concrete** - -```json -{ - "product-lists": { - "whitelists": [1,2], - "blacklists": [3] - } -} -``` - -### Prepare Search Data for Export -With this step, we are extending Elasticsearch documents with product list data. Add the following plugins in your project: - -| Plugin | Specification |Prerequisites |Namespace | -| --- | --- | --- | --- | -| `ProductListDataLoaderPlugin` |Loads product list data as payload for the publishing process. | None|`Spryker\Zed\ProductListSearch\Communication\Plugin\ProductPageSearch\DataLoader` | -|`ProductListDataLoadExpanderPlugin`|Expands product page data with all its product lists for publishing based on the previously collected product information.|Product list data should be available in the product payload. Suggestion: use `ProductListDataLoaderPlugin` (see above).|`Spryker\Zed\ProductListSearch\Communication\Plugin\ProductPageSearch\DataExpander`| -|`ProductListMapExpanderPlugin`|Maps product list data to Elasticsearch document structure.|Product list data should be available. Suggestion: use `ProductListDataLoadExpanderPlugin` (see above).|`Spryker\Zed\ProductListSearch\Communication\Plugin\ProductPageSearch`| -|`ProductAbstractProductListSynchronizationDataPlugin`|Can be executed to synchronize all product_abstract_product_list entries from database to Redis.|None|`Spryker\Zed\ProductListStorage\Communication\Plugin\Synchronization`| -|`ProductConcreteProductListSynchronizationDataPlugin`|Can be executed to synchronize all product_concrete_product_list entries from database to Redis.|None|`Spryker\Zed\ProductListStorage\Communication\Plugin\Synchronization`| -|`ProductConcreteProductListPageDataExpanderPlugin`|Expands `ProductConcretePageSearchTransfer` with product lists data and returns the modified object.|None|`Spryker\Zed\ProductListSearch\Communication\Plugin\ProductPageSearch`| -|`ProductConcreteProductListPageMapExpanderPlugin`|Maps product list data related to concrete products to Elasticsearch document structure.|Product list data should be available. Suggestion: use `ProductConcreteProductListPageDataExpanderPlugin` (see above).|`Spryker\Zed\ProductListSearch\Communication\Plugin\ProductPageSearch`| - -**src/Pyz/Zed/ProductPageSearch/ProductPageSearchDependencyProvider.php** - -```php - new ProductListDataLoadExpanderPlugin(), - ]; - } - - /** - * @return \Spryker\Zed\ProductPageSearch\Dependency\Plugin\ProductPageMapExpanderInterface[] - */ - protected function getMapExpanderPlugins() - { - return [ - new ProductListMapExpanderPlugin(), - ]; - } - - /** - * @return \Spryker\Zed\ProductPageSearchExtension\Dependency\Plugin\ProductPageDataLoaderPluginInterface[] - */ - protected function getDataLoaderPlugins() - { - return [ - new ProductListDataLoaderPlugin(), - ]; - } - - /** - * @return \Spryker\Zed\ProductPageSearchExtension\Dependency\Plugin\ProductConcretePageMapExpanderPluginInterface[] - */ - protected function getConcreteProductPageMapExpanderPlugins(): array - { - return [ - new ProductConcreteProductListPageMapExpanderPlugin(), - ]; - } - - /** - * @return \Spryker\Zed\ProductPageSearchExtension\Dependency\Plugin\ProductConcretePageDataExpanderPluginInterface[] - */ - protected function getProductConcretePageDataExpanderPlugins(): array - { - return [ - new ProductConcreteProductListPageDataExpanderPlugin(), - ]; - } -} -``` - -**src/Pyz/Zed/Synchronization/SynchronizationDependencyProvider.php** - -```php -Suggestion: use `ProductViewVariantExpanderPlugin`before, to collect variant data.|`Spryker\Client\ProductListStorage\Plugin\ProductStorageExtension`| -| `ProductAbstractListStorageRestrictionFilterPlugin` | The plugin is responsible for filtering abstract product ids based on white and blacklists. | None | `Spryker\Client\ProductListStorage\Plugin\ProductStorageExtension` | -| `ProductConcreteListStorageRestrictionFilterPlugin`| The plugin is responsible for filtering concrete product ids based on white and blacklists. | None | `Spryker\Client\ProductListStorage\Plugin\ProductStorageExtension`| - -**src/Pyz/Client/ProductStorage/ProductStorageDependencyProvider.php** - -```php -Check out our [Merchant Relationship Product Restrictions integration guide](/docs/scos/dev/feature-integration-guides/{{page.version}}/merchant-product-restrictions-feature-integration.html -{% endinfo_block %} that adds this functionality for merchant relationships.) diff --git a/docs/scos/dev/feature-integration-guides/202005.0/product-order-management-feature-integration.md b/docs/scos/dev/feature-integration-guides/202005.0/product-order-management-feature-integration.md deleted file mode 100644 index 4d909b06684..00000000000 --- a/docs/scos/dev/feature-integration-guides/202005.0/product-order-management-feature-integration.md +++ /dev/null @@ -1,86 +0,0 @@ ---- -title: Product + Order Management feature integration -last_updated: May 4, 2020 -template: feature-integration-guide-template -originalLink: https://documentation.spryker.com/v5/docs/product-order-management-feature-integration -originalArticleId: e7b6ddbc-5937-49c6-91b4-044294314ab5 -redirect_from: - - /v5/docs/product-order-management-feature-integration - - /v5/docs/en/product-order-management-feature-integration ---- - -## Install Feature Core - -### Prerequisites -Install the required features: - -| Feature | Version | -| --- | --- | -| Product | master | -| Order Management | master | -| Spryker Core | master | - -### 1) Install the required modules using Composer -Run the following command(s) to install the required modules: -```bash -composer require spryker/sales-product-connector:"^1.3.0" --update-with-dependencies -``` -{% info_block warningBox "Verification" %} - -Make sure that the following modules have been installed: - -| Module | Expected Directory | -| --- | --- | -| `SalesProductConnector` | `vendor/spryker/sales-product-connector` | - -{% endinfo_block %} -### 2) Set up Transfer Objects -Run the following command to generate transfer changes: -```bash -console transfer:generate -``` -{% info_block warningBox "Verification" %} - -Make sure that the following changes have been applied in transfer objects: - -| Transfer| Type| Event| Path| -| --- | --- | --- | --- | -| `Order.idSalesOrder` | property | Created |`src/Generated/Shared/Transfer/OrderTransfer` | -| `Item.fkSalesOrder` | property | Created | `src/Generated/Shared/Transfer/ItemTransfer` | - -{% endinfo_block %} - -### 3) Set up Behavior -Register the following plugins: -| Plugin | Specification | Prerequisites | Namespace | -| --- | --- | --- | --- | -| `ItemMetadataSearchOrderExpanderPlugin` | Expands order items with metadata information. | None | `Spryker\Zed\SalesProductConnector\Communication\Plugin\Sales` | - -**\Pyz\Zed\Sales\SalesDependencyProvider** -```php - -Example: collector plugin list extension - -```php - new ProductReviewCollectorSearchPlugin(), - ]; - }; - - $container[static::STORAGE_PLUGINS] = function (Container $container) { - return [ - // ... - ProductReviewConfig::RESOURCE_TYPE_PRODUCT_ABSTRACT_REVIEW => new ProductAbstractReviewCollectorStoragePlugin(), - ]; - }; - - - // ... - } - } -``` -
    - - - -7. Run `vendor/bin/console setup:search` to set up Search before you run Search collectors. -8. Make sure the new Zed user interface assets are built by running `npm run zed` (or antelope build zed for older versions). -9. Update Zed’s navigation cache to show the new items for the Product Review management user interface by running `vendor/bin/console application:build-navigation-cache`. - -You should now be able to use the Zed API of Product Reviews to approve, reject and delete reviews, and the collectors should also be able to push approved reviews and ratings into Storage and Search. Check out our [Demoshop implementation](https://github.com/spryker/demoshop) for frontend implementation example and idea. - -## Usage in Yves -### Submitting a Product Review -To store an already validated product review, populate a `\Generated\Shared\Transfer\ProductReviewTransfer` transfer object and send it to Zed by calling the `\Spryker\Client\ProductReview\ProductReviewClientInterface::submitCustomerReview` method. -This action will create a new pending product review in your persistent storage. The saved product review will be exported to Search and Storage after it was approved on Zed UI. -Make sure that the provided rating value does not exceed [the configured maximum rating](/docs/pbc/all/ratings-reviews/{{site.version}}/tutorials-and-howtos/howto-configure-product-reviews.html#configuring-the-maximum-rating) limit. -Example of how to store a validated customer review: -```php -getFactory()->getCustomerClient()->getCustomer()->getCustomerReference(); - - $this->getFactory()->getProductReviewClient()->submitCustomerReview( - (new ProductReviewRequestTransfer()) - ->setCustomerReference($customerReference) - ->setLocaleName($this->getLocale()) - ->setIdProductAbstract($request->attributes->get('idProductAbstract')) - ->setSummary($request->attributes->get('summary')) - ->setDescription($request->attributes->get('description')) - ->setRating($request->attributes->get('rating')) - ->setNickname($request->attributes->get('nickname')) - ); - } - } -``` - -### Displaying an Average Rating -To display the average rating stored in Storage, you will need to use `spyProductAbstractReview` and `spyProductAbstractReviewMaximumRating` twig extensions shipped by `ProductReview` module. - -* `spyProductAbstractReview` twig extension takes product abstract ID as first argument and injects the corresponding `ProductAbstractReviewTransfer` transfer object into the twig template provided as the second argument. - -* `spyProductAbstractReviewMaximumRating` twig extension allows you to retrieve the configured maximum rating on demand. - -To register these plugins, you need to add `ProductAbstractReviewTwigServiceProvider` service provider to your` \Pyz\Yves\Application\YvesBootstrap.php`. - -Example of how to register twig extensions: -```php -application->register(new ProductAbstractReviewTwigServiceProvider()); - } - - } -``` -Now you will be able to call the registered `spyProductAbstractReview` and `spyProductAbstractReviewMaximumRating` twig extensions in your twig templates. - -Below is the example `spyProductAbstractReview` call. -`@ProductReview/index/index.twig`: -```yaml -
    Product name: {% raw %}{{{% endraw %}product.name{% raw %}}}{% endraw %}
    -{% raw %}{{{% endraw %} spyProductAbstractReview(product.idProductAbstract, '@ProductReview/partials/average-rating.twig') {% raw %}}}{% endraw %} -``` -The `spyProductAbstractReview` twig extension will render the template provided as a second argument and inject the productAbstractReviewTransfer variable. - -Below is the example average-rating.twig implementation. -`@ProductReview/partials/average-rating.twig:` - -```yaml -{% raw %}{%{% endraw %} block content {% raw %}%}{% endraw %} - {% raw %}{%{% endraw %} if productAbstractReviewTransfer {% raw %}%}{% endraw %} - Average product rating is {% raw %}{{{% endraw %} productAbstractReviewTransfer.averageRating {% raw %}}}{% endraw %} out of {% raw %}{{{% endraw %} spyProductAbstractReviewMaximumRating() {% raw %}}}{% endraw %} - {% raw %}{%{% endraw %} endif {% raw %}%}{% endraw %} -{% raw %}{%{% endraw %} endblock {% raw %}%}{% endraw %} -``` -### Displaying Reviews and Rating Summary -To display previously posted and already approved reviews from Search, you will need to call `\Spryker\Client\ProductReview\ProductReviewClientInterface::findProductReviewsInSearch` method. - -To alter the retrieved number of product reviews per page, change the Client configuration. - -Example of product review retrieval: -```php -namespace Pyz\Yves\ProductReview\Controller; - -use Generated\Shared\Transfer\ProductReviewSearchRequestTransfer; -use Pyz\Yves\Application\Controller\AbstractController; -use Symfony\Component\HttpFoundation\Request; - -/** - * @method \Spryker\Client\ProductReview\ProductReviewClientInterface getClient() - */ -class IndexController extends AbstractController -{ - - /** - * @param \Symfony\Component\HttpFoundation\Request $request - * - * @return array - */ - public function indexAction(Request $request) - { - $productReviews = $this->getClient()->findProductReviewsInSearch( - (new ProductReviewSearchRequestTransfer()) - ->setIdProductAbstract($request->attributes->get('idProductAbstract')); - ->setRequestParams($request->query->all()) - ); - - return [ - 'productReviews' => $productReviews['productReviews'], - 'pagination' => $productReviews['pagination'], - 'ratingAggregation' => $productReviews['ratingAggregation'], - ]; - } - -} -``` - - - diff --git a/docs/scos/dev/feature-integration-guides/202005.0/product-relations-feature-integration.md b/docs/scos/dev/feature-integration-guides/202005.0/product-relations-feature-integration.md deleted file mode 100644 index 39936da4434..00000000000 --- a/docs/scos/dev/feature-integration-guides/202005.0/product-relations-feature-integration.md +++ /dev/null @@ -1,472 +0,0 @@ ---- -title: Product Relations feature integration -description: Integrate the Product Relations feature into your project. -last_updated: May 19, 2020 -template: feature-integration-guide-template -originalLink: https://documentation.spryker.com/v5/docs/product-relations-feature-integration -originalArticleId: e2840881-3dde-45ae-afe3-d5e920f39de8 -redirect_from: - - /v5/docs/product-relations-feature-integration - - /v5/docs/en/product-relations-feature-integration -related: - - title: Glue API - Product Relations feature integration - link: docs/scos/dev/feature-integration-guides/page.version/glue-api/glue-api-product-relations-feature-integration.html - - title: Spryker Core feature integration - link: docs/scos/dev/feature-integration-guides/page.version/spryker-core-feature-integration.html - - title: Glue API - Spryker Core feature integration - link: docs/scos/dev/feature-integration-guides/page.version/glue-api/glue-api-spryker-core-feature-integration.html ---- - -## Install Feature Core -Follow the steps below to install feature core. - -### Prerequisites - -To start feature integration, overview, and install the necessary features: - -| Name | Version | -| --- | --- | -| Spryker Core | master | -| ProductRelations | master | - -### 1) Install Required Modules Using Composer - -Run the following command(s) to install the required modules: -```bash -composer require "spryker-feature/product-relations:^master" --update-with-dependencies -``` - -{% info_block warningBox "Verification" %} - -Make sure that the following modules have been installed: - -| Module | Expected directory | -| --- | --- | -| `ProductRelation` | `vendor/spryker/product-relation` | -| `ProductRelationGui` | `vendor/spryker/product-relation-gui` | -| `ProductRelationDataImport` | `vendor/spryker/product-relation-data-import` | -| `ProductRelationStorage` | `vendor/spryker/product-relation-storage` | -| `ProductRelationWidget` | `vendor/spryker-shop/product-relation-widget` | - -{% endinfo_block %} - -### 2) Set up Database Schema and Transfer Objects - -1. Run the following commands to apply database changes and generate entity and transfer changes: - -```bash -console transfer:generate -console propel:install -console transfer:generate -``` - -{% info_block warningBox "Verification" %} - -Make sure that the following changes have been applied by checking your database: - -| Database Entity | Type | Event | - | --- | --- | --- | -|`spy_product_relation`| table| created| -|`spy_product_relation_product_abstract` |table| created| -|`spy_product_relation_store` |table| created| -|`spy_product_abstract_relation_storage`| table| created| - - -{% endinfo_block %} - -2. Adjust the schema definition so entity changes trigger events. - -**src/Pyz/Zed/ProductRelation/Persistence/Propel/Schema/spy_product_relation.schema.xml** - -```xml - - - - - - - -
    - - - - - -
    - - - - - -
    - -
    -``` - - -| Affected Entity | Triggered events | -| --- | --- | -| `spy_product_relation` | `Entity.spy_product_relation.create`
    `Entity.spy_product_relation.update`
    `Entity.spy_product_relation.delete` | -| `spy_product_relation_store` | `Entity.spy_product_relation_store.create`
    `Entity.spy_product_relation_store.delete` | -| `spy_product_relation_product_abstract` | `Entity.spy_product_relation_product_abstract.create`
    `Entity.spy_product_relation_product_abstract.delete` | - -{% info_block warningBox "Verification" %} - -Make sure that the following changes have been applied in transfer objects: - -| Transfer | Type | Event| Path| -| ---| ---| ---| ---| -| `ProductRelation`| class| created | `src/Generated/Shared/Transfer/ProductRelationTransfer`| -`ProductRelationCriteria` | class| created| `src/Generated/Shared/Transfer/ProductRelationCriteriaTransfer`| -| `StoreRelation`| class| created| `src/Generated/Shared/Transfer/StoreRelationTransfer`| -| Store| class| created| `src/Generated/Shared/Transfer/StoreTransfer`| -| ProductRelationType | class| created| `src/Generated/Shared/Transfer/ProductRelationTypeTransfer`| -| `ProductRelationRelatedProduct` | class | created| `src/Generated/Shared/Transfer/ProductRelationRelatedProductTransfer`| -| `RuleQueryDataProvider` | class | created | `src/Generated/Shared/Transfer/RuleQueryDataProviderTransfer`| -| `PropelQueryBuilderRuleSet`| class | created| `src/Generated/Shared/Transfer/PropelQueryBuilderRuleSetTransfer`| -| `PropelQueryBuilderCriteria` | class | created | `src/Generated/Shared/Transfer/PropelQueryBuilderCriteriaTransfer`| -| `PropelQueryBuilderCriteriaMapping`| class| created| `src/Generated/Shared/Transfer/PropelQueryBuilderCriteriaMappingTransfer`| -| `StorageProductRelations` | class | created | `src/Generated/Shared/Transfer/StorageProductRelationsTransfer`| -| `StorageProductAbstractRelation` | class| created| `src/Generated/Shared/Transfer/StorageProductAbstractRelationTransfer`| -| `Quote` | class | created | `src/Generated/Shared/Transfer/QuoteTransfer`| -| `Item` | class| created | `src/Generated/Shared/Transfer/ItemTransfer`| -| `CurrentProductPrice` | class| created| `src/Generated/Shared/Transfer/CurrentProductPriceTransfer`| -| `Locale` | class| created | `src/Generated/Shared/Transfer/LocaleTransfer`| -| `ProductUrl`| class| created| `src/Generated/Shared/Transfer/ProductUrlTransfer`| -| `TabItem` | class | created | `src/Generated/Shared/Transfer/TabItemTransfer`| -| `TabsView` | class| created| `src/Generated/Shared/Transfer/TabsViewTransfer`| -| `LocalizedUrl` | class | created| `src/Generated/Shared/Transfer/LocalizedUrlTransfer`| -| `ProductAbstract`| class | created| `src/Generated/Shared/Transfer/ProductAbstractTransfer`| -| `ProductRelationCriteriaFilter` | class| created| `src/Generated/Shared/Transfer/ProductRelationCriteriaFilterTransfer`| -| `ProductRelationResponse` | class | created | `src/Generated/Shared/Transfer/ProductRelationResponseTransfer`| -| `Filter` | class | created| `src/Generated/Shared/Transfer/FilterTransfer`| - -{% endinfo_block %} - -### 3) Configure Export to Redis - -Follow the procedure below to to publish tables on change (create, edit, delete) to the `spy_product_abstract_group_storage` table and synchronize the data to Storage. - -#### Set up Publishers -| Plugin | Specification | Prerequisites | Namespace | -|--- |--- |--- |--- | -|`ProductRelationWritePublisherPlugin` | Publishes product relation data by create, update and delete events from the `spy_product_relation` table. | none | `Spryker\Zed\ProductRelationStorage\Communication\Plugin\Publisher\ProductRelation\ProductRelationWritePublisherPlugin` | -|`ProductRelationWriteForPublishingPublisherPlugin` | Publishes product relation data by publish and unpublish events from the `spy_product_relation` table. | none | `Spryker\Zed\ProductRelationStorage\Communication\Plugin\Publisher\ProductRelation\ProductRelationWriteForPublishingPublisherPlugin` | -|`ProductRelationProductAbstractWritePublisherPlugin` | Publishes product relation data by create and delete events from the `spy_product_relation_product_abstract` table. | none | `Spryker\Zed\ProductRelationStorage\Communication\Plugin\Publisher\ProductRelationProductAbstract\ProductRelationProductAbstractWritePublisherPlugin` | -|`ProductRelationStoreWritePublisherPlugin` | Publishes product relation data by create and delete events from the `spy_product_relation_store` table. | none | `Spryker\Zed\ProductRelationStorage\Communication\Plugin\Publisher\ProductRelationStore\ProductRelationStoreWritePublisherPlugin` | - -**src/Pyz/Zed/Publisher/PublisherDependencyProvider.php** - -```php -getProductRelationStoragePlugins() - ); - } - - /** - * @return \Spryker\Zed\PublisherExtension\Dependency\Plugin\PublisherTriggerPluginInterface[] - */ - protected function getPublisherTriggerPlugins(): array - { - return [ - ... - new ProductRelationPublisherTriggerPlugin(), - ]; - } - - /** - * @return \Spryker\Zed\PublisherExtension\Dependency\Plugin\PublisherPluginInterface[] - */ - protected function getProductRelationStoragePlugins(): array - { - return [ - new ProductRelationWritePublisherPlugin(), - new ProductRelationWriteForPublishingPublisherPlugin(), - new ProductRelationProductAbstractWritePublisherPlugin(), - new ProductRelationStoreWritePublisherPlugin(), - ]; - } -} - -``` - - -#### Set up Re-generate and Re-sync Features -Set up Re-generate and Re-sync features as follows: - -| Plugin | Specification | Prerequisites | Namespace | -| --- | --- | --- | --- | -| `ProductRelationSynchronizationDataRepositoryPlugin` | Allows the whole storage table content to be synchronizedinto Storage. | none | `Spryker\Zed\ProductRelationStorage\Communication\Plugin\Synchronization\ProductRelationSynchronizationDataRepositoryPlugin` | - -**src/Pyz/Zed/ProductRelationStorage/ProductRelationStorageConfig.php** - -```php -buildImporterConfiguration('product_relation.csv', static::IMPORT_TYPE_PRODUCT_RELATION); - } - - /** - * @return \Generated\Shared\Transfer\DataImporterConfigurationTransfer - */ - public function getProductRelationStoreDataImporterConfiguration(): DataImporterConfigurationTransfer - { - $moduleDataImportDirectory = $this->getModuleDataImportDirectoryPath(); - - return $this->buildImporterConfiguration($moduleDataImportDirectory . 'product_relation_store.csv', static::IMPORT_TYPE_PRODUCT_RELATION_STORE); - } -} -``` - -2. Configure the Product relation GUI module with a store plugin. - -|Plugin | Specificaation | Prerequisites | Namespaace | -|---|---|---|---| -|`StoreRelationToggleFormTypePlugin` | Represents a store relation toggle form based on the stores registered in the system. | None | `Spryker\Zed\Store\Communication\Plugin\Form` | - -**src/Pyz/Zed/ProductRelationGui/ProductRelationGuiDependencyProvider.php** - -```php - **Product** > **Product Relations**. -* You can see the product relation information in the Back Office > **Product** > **Product Relations** > **View Product Relation**. -* You can edit the product relation in the Back Office > **Product** > **Product Relations** > **Edit Product Relation**. -* You can create a product relation in the Back Office > **Product** > **Product Relations** > **Create Product Relation**. -* You can delete the product relation in the Back Office > **Product** > **Product Relations** > **Delete Product Relation**. - -{% endinfo_block %} - -3. Enable Widgets: - -|Plugin | Specification | Prerequisites | Namespace | -|--- |--- |--- |--- | -|`SimilarProductsWidget` | Widget for relations with the cross-selling relation type. | None | `SprykerShop\Yves\ProductRelationWidget\Widget` | -|`UpSellingProductsWidget` | Widget for relations with the up-selling relation type. | None | `SprykerShop\Yves\ProductRelationWidget\Widget;` | diff --git a/docs/scos/dev/feature-integration-guides/202005.0/product-set-feature-integration.md b/docs/scos/dev/feature-integration-guides/202005.0/product-set-feature-integration.md deleted file mode 100644 index e6145405895..00000000000 --- a/docs/scos/dev/feature-integration-guides/202005.0/product-set-feature-integration.md +++ /dev/null @@ -1,176 +0,0 @@ ---- -title: Product Set feature integration -description: The Product Sets feature allows you to put together multiple products for the purpose of emphasizing that the set of products can be bought together. -last_updated: Apr 3, 2020 -template: feature-integration-guide-template -originalLink: https://documentation.spryker.com/v5/docs/product-set-feature-integration -originalArticleId: 34b1f58d-9237-4a3e-a4dc-c222654302e4 -redirect_from: - - /v5/docs/product-set-feature-integration - - /v5/docs/en/product-set-feature-integration ---- - -The Product Sets feature allows you to put together multiple products for the purpose to emphasize that the set of products can be bought together. Product Sets usually have their separate list and detail pages in the shop frontend where customers can add containing products to the cart. - -## Prerequisites -To prepare your project to work with Product Sets: -1. Require the Product Set modules in your `composer.json` by running: - -```bash -composer require spryker/product-set spryker/product-set-collector spryker/product-set-gui -``` -2. Install the new database tables by running: - -```bash -vendor/bin/console propel:diff -``` -Propel should generate a migration file with the changes. - -3. Apply the database changes. For this, run: - -```bash -vendor/bin/console propel:migrate -``` -4. To generate ORM models, run: - -```bash -vendor/bin/console propel:model:build -``` - -5. After running this command, new classes are added. - -The classes are located in your project under the `\Orm\Zed\ProductSet\Persistence` namespace. - -{% info_block warningBox “Verification” %} - -Make sure that they extend the base classes from the Spryker core, for example: - -* `\Orm\Zed\ProductSet\Persistence\SpyProductSet` extends `\Spryker\Zed\ProductSet\Persistence\Propel\AbstractSpyProductSet` - -* `\Orm\Zed\ProductSet\Persistence\SpyProductSetData` extends `\Spryker\Zed\ProductSet\Persistence\Propel\AbstractSpyProductSetData` - -* `\Orm\Zed\ProductSet\Persistence\SpyProductAbstractSet` extends `\Spryker\Zed\ProductSet\Persistence\Propel\AbstractSpyProductAbstractSet` - -* `\Orm\Zed\ProductSet\Persistence\SpyProductSetQuery` extends `\Spryker\Zed\ProductSet\Persistence\Propel\AbstractSpyProductSetQuery` - -* `\Orm\Zed\ProductSet\Persistence\SpyProductSetDataQuery` extends `\Spryker\Zed\ProductSet\Persistence\Propel\AbstractSpyProductSetDataQuery` - -* `\Orm\Zed\ProductSet\Persistence\SpyProductAbstractSetQuery` extends `\Spryker\Zed\ProductSet\Persistence\Propel\AbstractSpyProductAbstractSetQuery` - -{% endinfo_block %} - -1. To get the new transfer objects, run the following command: - -```bash -vendor/bin/console transfer:generat -``` - -7. To rebuild Zed navigation, run the following command: - -```bash -vendor/bin/console navigation:build-cache -``` - -8. Activate the Product Set collectors: - -Adding `ProductSetCollectorStoragePlugin` to the storage collector plugin stack and `ProductSetCollectorSearchPlugin` to the search collector plugin stack, see the example below. - -```php - new ProductSetCollectorSearchPlugin(), - ]; - }; - - $container[self::STORAGE_PLUGINS] = function (Container $container) { - return [ - // ... - ProductSetConfig::RESOURCE_TYPE_PRODUCT_SET => new ProductSetCollectorStoragePlugin(), - ]; - }; - - // ... - } -} -``` - -## Data Setup - -You should now be able to use the `ProductSet` module Zed API to manage Product Sets, and the collectors should also be able to export them to the KV storage and Elasticsearch. In Zed you can also manage Product Sets under Products > Product Sets menu point. - -This is a good time to implement an installer in your project to put products together in sets representing how you want them to be displayed in your shop frontend. Check out our [Demoshop](https://github.com/spryker/demoshop) implementation for examples and ideas. - -### Listing Products Sets in Yves -The KV storage and Elasticsearch should by now have some Product Sets you can list and display in your shop. The exported documents in Search by default do not support the configurable search features as products (full-text search, faceted navigation, sorting, and pagination). However, since their data structure is the same it is possible to implement the same features with a custom implementation. - -For simple listing the `ProductSet` module provides a Client API to list Product Sets from Elasticsearch. By calling the `ProductSetClient::getProductSetList()` method, a limited set of documents can be listed in Yves. The results are sorted in descending order by the Product Set’s weight attribute. - -The executed search query works the same way as described in Search Query. -If you need to extend the query, for example, by filtering current store and locale, you will need to add the necessary query expander plugins, like in the example below. Also, to format the raw response from Elasticsearch we also need to provide a result formatter plugin that is also provided by the `ProductSet` module. - -Take a look at the following example to see how to activate the plugins: - -```php -
  • `ProductDiscontinuedItemValidatorPlugin`validates discontinued products. Provide the SKU of a discontinued product on the **Quick Add To Cart** page and verify that the error message is displayed and you are not allowed to work with this product.
  • -{% endinfo_block %} diff --git a/docs/scos/dev/feature-integration-guides/202005.0/quick-add-to-cart-feature-integration.md b/docs/scos/dev/feature-integration-guides/202005.0/quick-add-to-cart-feature-integration.md deleted file mode 100644 index 38ec8ce6c5b..00000000000 --- a/docs/scos/dev/feature-integration-guides/202005.0/quick-add-to-cart-feature-integration.md +++ /dev/null @@ -1,362 +0,0 @@ ---- -title: Quick Add to Cart feature integration -description: This guide walks you through the process of integrating the Quick Order feature into your project. -last_updated: Aug 12, 2020 -template: feature-integration-guide-template -originalLink: https://documentation.spryker.com/v5/docs/quick-order-feature-integration -originalArticleId: a9c8e8d2-2e5a-4a04-a755-c16430a4d160 -redirect_from: - - /v5/docs/quick-order-feature-integration - - /v5/docs/en/quick-order-feature-integration ---- -## Install Feature Core - -### Prerequisites -To start the feature integration, overview and install the necessary features: - -| Name | Version | -| --- | --- | -| Spryker Core E-commerce | 202005.0 | -| Cart| 202005.0 | -| Product | 202005.0 | -| Checkout | 202005.0 | - -### 1) Install the required modules using Composer - -Run the following command(s) to install the required modules: - -```bash -composer require spryker-feature/quick-add-to-cart:"^202005.0" --update-with-dependencies -``` - -{% info_block warningBox “Verification” %} - -Make sure that the following modules were installed: - -|Module|Expected Directory| -|---|---| -|`QuickOrder`|`vendor/spryker/quick-order`| - -{% endinfo_block %} - -### 2) Set up Transfer Objects - -Run the following commands to generate transfer changes: - -```bash -console transfer:generate -``` - -{% info_block warningBox “Verification” %} - -Make sure that the following changes have been applied in transfer objects: - -|Transfer|Type|Event|Path| -|---|---|---|---| -|`QuickOrderTransfer`|class|created|`src/Generated/Shared/Transfer/QuickOrderTransfer`| -|`QuickOrderItemTransfer`|class|created|`src/Generated/Shared/Transfer/QuickOrderItemTransfer`| - -{% endinfo_block %} - -### 3) Add Translations - -Feature-specific glossary keys: - -**src/data/import/glossary.csv** - -```yaml -quick-order.upload-order.errors.upload-order-invalid-sku-item,Product with this SKU is not found.,en_US -quick-order.upload-order.errors.upload-order-invalid-sku-item,Produkt mit dieser SKU wurde nicht gefunden.,de_DE -price_product.error.price_not_found,Product price not found.,en_US -price_product.error.price_not_found,Produktpreis nicht gefunden.,de_DE -product_discontinued.message.product_discontinued,"Product is discontinued, please choose an alternative one.",en_US -product_discontinued.message.product_discontinued,"Produkt ist nicht mehr verfügbar, bitte wählen Sie eine Alternative.",de_DE -product-quantity.warning.quantity.min.failed,The ordered quantity was adjusted to the next possible quantity for the article because minimum quantity is %min%.,en_US -product-quantity.warning.quantity.min.failed,Die bestellte Anzahl erfüllt nicht die Anforderungen für dieses Produkt. Mindestanzahl ist %min%.,de_DE -product-quantity.warning.quantity.max.failed,The ordered quantity was adjusted to the next possible quantity for the article because maximum quantity is %max%.,en_US -product-quantity.warning.quantity.max.failed,Die bestellte Anzahl erfüllt nicht die Anforderungen für dieses Produkt. Maximalanzahl ist %max%.,de_DE -product-quantity.warning.quantity.interval.failed,The ordered quantity was adjusted to the next possible quantity for the article because quantity step is %step%.,en_US -product-quantity.warning.quantity.interval.failed,Die bestellte Anzahl erfüllt nicht die Anforderungen für dieses Produkt. Intervallgröße ist %step%.,de_DE -``` - -Run the following command to import glossary changes: - -```bash -console data:import:glossary -``` - -{% info_block warningBox "Verification" %} - -Make sure that in the database the configured data is added to the `spy_glossary` table. - -{% endinfo_block %} - -### 4) Set up Behavior - -#### Set up additional functionality - -Enable the following behaviors by registering the plugins: - -|Plugin|Specification|Prerequisites|Namespace| -|---|---|---|---| -|`ProductPriceItemValidatorPlugin`|Checks if the provided product SKU has the price, if no - adds the error message.|None|`Spryker\Client\PriceProductStorage\Plugin\QuickOrder`| - -**src/Pyz/Client/QuickOrder/QuickOrderDependencyProvider.php** - -```php - `QuickOrderFormMeasurementUnitColumnPlugin` adds the *Measuring Unit* column to the **Quick Add To Cart** page. Check if the column is displayed on the page. -{% endinfo_block %} - -|Plugin|Specification|Prerequisites|Namespace| -|---|---|---|---| -|`ProductConcreteTransferBaseMeasurementUnitExpanderPlugin`|Expands the provided array of `ProductConcreteTransfers` with the base measurement unit information (if available) for the product.|None|`Spryker\Client\ProductMeasurementUnitStorage\Plugin\QuickOrder`| - -**src/Pyz/Client/QuickOrder/QuickOrderDependencyProvider.php** - -```php -`ProductQuantityItemValidatorPlugin`takes care about quantities restrictions. Provide an SKU with quantity restrictions on the **Quick Add To Cart** page and verify if quantity gets automatically adjusted according to the quantity restrictions. -{% endinfo_block %} diff --git a/docs/scos/dev/feature-integration-guides/202005.0/quick-add-to-cart-packaging-units-feature-integration.md b/docs/scos/dev/feature-integration-guides/202005.0/quick-add-to-cart-packaging-units-feature-integration.md deleted file mode 100644 index 1c4b7f53cbc..00000000000 --- a/docs/scos/dev/feature-integration-guides/202005.0/quick-add-to-cart-packaging-units-feature-integration.md +++ /dev/null @@ -1,56 +0,0 @@ ---- -title: Quick Add to Cart + Packaging Units feature integration -description: Quick Add to Cart + Packaging Units allow buying products in different packaging units. This guide describes how to integrate this feature into your project. -last_updated: May 12, 2020 -template: feature-integration-guide-template -originalLink: https://documentation.spryker.com/v5/docs/quick-order-packaging-units-feature-integration -originalArticleId: 7dbd4eb8-4722-416c-92f2-10de759fcf8a -redirect_from: - - /v5/docs/quick-order-packaging-units-feature-integration - - /v5/docs/en/quick-order-packaging-units-feature-integration ---- - -## Install feature frontend -### Prerequisites -Install the required features: -|Name|Version| -|---|---| -|Quick Order|master| -|Packaging Units|master| - -### 1) Set up Behavior -#### Set up the Additional Functionality - -Enable the following behaviors by registering the plugins: - -|Plugin|Specification|Prerequisites|Namespace| -|---|---|---|---| -|`QuickOrderItemDefaultPackagingUnitExpanderPlugin`|Expands `ItemTransfer` with packaging unit data if available.|None|`SprykerShop\Yves\ProductPackagingUnitWidget\Plugin\QuickOrder`| - -**src/Pyz/Yves/QuickOrderPage/QuickOrderPageDependencyProvider.php** - -```php -
  • Select a product with packaging units on the **Quick Add To Cart** page and add it to the cart.
  • Check `ItemTransfer` in Cart if it has `amount`, `amountSalesUnit`, `amountLeadProduct`, and `productPackagingUnit` properties set.
  • -{% endinfo_block %} diff --git a/docs/scos/dev/feature-integration-guides/202005.0/quick-add-to-cart-shopping-lists-feature-integration.md b/docs/scos/dev/feature-integration-guides/202005.0/quick-add-to-cart-shopping-lists-feature-integration.md deleted file mode 100644 index 3b774f694c5..00000000000 --- a/docs/scos/dev/feature-integration-guides/202005.0/quick-add-to-cart-shopping-lists-feature-integration.md +++ /dev/null @@ -1,95 +0,0 @@ ---- -title: Quick Add to Cart + Shopping Lists feature integration -description: Quick Add to Cart + Shopping Lists allow creating a shopping list to buy products. This guide describes how to integrate this feature into your project. -last_updated: May 12, 2020 -template: feature-integration-guide-template -originalLink: https://documentation.spryker.com/v5/docs/quick-order-shopping-lists-feature-integration -originalArticleId: f7049250-e07b-486b-95ce-76ff246d0ff4 -redirect_from: - - /v5/docs/quick-order-shopping-lists-feature-integration - - /v5/docs/en/quick-order-shopping-lists-feature-integration - - /docs/scos/dev/feature-integration-guides/202005.0/quick-order-shopping-lists-feature-integration.html ---- - -## Install feature frontend -### Prerequisites - -Install the required features: -|Name | Version| -|---|---| -|Quick Order|master| -|Shopping Lists|master| - -### 1) Set up Widgets - -Register the following global widget: - -|Widget|Description|Namespace| -|---|---|---| -|`AddItemsToShoppingListWidget`|Adds another submit button and a drop-down list with the shopping lists available for the logged-in customer. Note: You don't need it if you don't use Shopping List functionality or just don't want it to be displayed on the Quick Order page.|`SprykerShop\Yves\ShoppingListWidget\Widget`| - -**src\Pyz\Yves\ShopApplication\ShopApplicationDependencyProvider.php** - -```php -
  • **Submit** button under the form called *Add to shopping list*
  • **Drop-down box** containing shopping list names.
  • ) - -### 2) Set up Behavior - -#### Set up the Additional Functionality - -Enable the following behaviors by registering the plugins: - -|Plugin|Specification|Prerequisites|Namespace| -|---|---|---|---| -|`ShoppingListQuickOrderFormHandlerStrategyPlugin`|Send items to Shopping list instead of Cart if **Add to shopping list** has been selected.|None|`SprykerShop\Yves\ShoppingListWidget\Plugin\QuickOrderPage`| - -**src/Pyz/Yves/QuickOrderPage/QuickOrderPageDependencyProvider.php** - -```php -ModuleExpected Directory`QuoteRequest``vendor/spryker/quote-request``QuoteRequestExtension``vendor/spryker/quote-request-extension``QuoteRequestAgent``vendor/spryker/quote-request-agent``QuoteRequestDataImport``vendor/spryker/quote-request-data-import` -{% endinfo_block %} - -### 2) Set up Configuration - -Add the following configuration to your project: - -|Configuration | Specification |Namespace | -| --- | --- | --- | -|`QuoteConfig::getQuoteFieldsAllowedForSaving` | Used to allow saving quote request related fields of the quote to the database. |`Pyz\Zed\Quote` | -|`QuoteRequestConfig::getQuoteFieldsAllowedForSaving ` |Used to define which quota data should be saved in the database during the request for quote process. |`Pyz\Zed\QuoteRequest` | -|Outdated quote request closing cronjob (See below in `config/Zed/cronjobs/jobs.php`) | Add cronjob that closes outdated quote requests. | - | -|Customer login access control regular expression (See below in `config/Shared/config_default.php`) | Used to close access for not logged in customers. | - | - -**src/Pyz/Zed/Quote/QuoteConfig.php** - -```php - 'close-outdated-quote-requests', - 'command' => '$PHP_BIN vendor/bin/console quote-request:close-outdated', - 'schedule' => '0 * * * *', - 'enable' => true, - 'run_on_non_production' => true, - 'stores' => $allStores, -]; -``` - -{% info_block warningBox "Verification" %} -Make sure that quote request with outdated **Valid Until** changes its status to closed within one hour. -{% endinfo_block %} - -**config/Shared/config_default.php** - -```php -Database Entity TypeEvent`spy_quote_request`tablecreated`spy_quote_request_version`tablecreated -{% endinfo_block %} - -{% info_block warningBox "Verification" %} -Make sure that the following changes in transfer objects:
    TransferTypeEventPath
    `SpyQuoteRequestEntity`classcreated`src/Generated/Shared/Transfer/SpyQuoteRequestEntityTransfer`
    `SpyQuoteRequestVersionEntity`classcreated`src/Generated/Shared/Transfer/SpyQuoteRequestVersionEntityTransfer`
    `CompanyUserCriteria`classcreated`src/Generated/Shared/Transfer/CompanyUserCriteria`
    `QuoteRequestFilter`classcreated`src/Generated/Shared/Transfer/QuoteRequestFilter`
    `QuoteRequestResponse`classcreated`src/Generated/Shared/Transfer/QuoteRequestResponse`
    `QuoteRequestCollection`classcreated`src/Generated/Shared/Transfer/QuoteRequestCollection`
    `QuoteRequestVersionCollection`classcreated`src/Generated/Shared/Transfer/QuoteRequestVersionCollection`
    `QuoteRequest`classcreated`src/Generated/Shared/Transfer/QuoteRequest`
    `QuoteRequestVersion`classcreated`src/Generated/Shared/Transfer/QuoteRequestVersion`
    `QuoteRequestVersionFilter`classcreated`src/Generated/Shared/Transfer/QuoteRequestVersionFilter`
    -{% endinfo_block %} - -### 4) Add Translations - -Append glossary according to your configuration: - -**src/data/import/glossary.csv** - -```yaml -quote_request.status.waiting,Waiting,en_US -quote_request.status.waiting,Warten,de_DE -quote_request.status.in-progress,In Progress,en_US -quote_request.status.in-progress,Bearbeitung,de_DE -quote_request.status.ready,Ready,en_US -quote_request.status.ready,Bereit,de_DE -quote_request.status.canceled,Canceled,en_US -quote_request.status.canceled,Abgebrochen,de_DE -quote_request.status.closed,Closed,en_US -quote_request.status.closed,Geschlossen,de_DE -quote_request.status.draft,Draft,en_US -quote_request.status.draft,Entwurf,de_DE -quote_request.validation.success.canceled,Quote request canceled successfully.,en_US -quote_request.validation.success.canceled,Angebotsanfrage erfolgreich abgebrochen.,de_DE -quote_request.validation.converted_to_cart.success,Quote request converted to cart successfully.,en_US -quote_request.validation.converted_to_cart.success,Die Angebotsanfrage wurde erfolgreich in den Warenkorb konvertiert.,de_DE -quote_request.validation.error.not_exists,Quote Request not exists.,en_US -quote_request.validation.error.not_exists,Angebotsanfrage existiert nicht.,de_DE -quote_request.validation.error.wrong_status,Wrong Quote Request status for this operation.,en_US -quote_request.validation.error.wrong_status,Falscher Angebotsanforderungsstatus für diesen Vorgang.,de_DE -quote_request.validation.error.company_user_not_found,Company User not found.,en_US -quote_request.validation.error.company_user_not_found,Firmenbenutzer nicht gefunden.,de_DE -quote_request.validation.error.empty_cart,Quote request can't be created from empty cart.,en_US -quote_request.validation.error.empty_cart,Angebotsanfrage kann nicht aus leerem Einkaufswagen erstellt werden.,de_DE -quote_request.checkout.validation.error.version_not_found,Quote Request Version not found.,en_US -quote_request.checkout.validation.error.version_not_found,Angebotsanforderung Version nicht gefunden.,de_DE -quote_request.checkout.validation.error.not_found,Quote Request not found.,en_US -quote_request.checkout.validation.error.not_found,Angebotsanfrage nicht gefunden.,de_DE -quote_request.checkout.validation.error.wrong_status,The Request for Quote is in a wrong status at the moment.,en_US -quote_request.checkout.validation.error.wrong_status,Die Angebotsanfrage befindet sich zurzeit in einem falschen Status.,de_DE -quote_request.checkout.validation.error.wrong_version,The version of Request for Quote for this cart is outdated.,en_US -quote_request.checkout.validation.error.wrong_version,Die Version der Angebotsanfrage für diesen Warenkorb ist veraltet.,de_DE -quote_request.checkout.validation.error.wrong_valid_until,Request for Quote from which this cart was created is not valid anymore.,en_US -quote_request.checkout.validation.error.wrong_valid_until,"Angebotsanfrage, aus der dieser Warenkorb erstellt wurde, ist nicht mehr gültig.",de_DE -quote_request.checkout.convert.error.wrong_valid_until,Request for Quote is not valid anymore.,en_US -quote_request.checkout.convert.error.wrong_valid_until,Die Angebotsanfrage ist nicht mehr gültig.,de_DE -quote_request.update.validation.error.wrong_valid_until,The validity date of this request for quote is already passed. Please change the date to send to the customer.,en_US -quote_request.update.validation.error.wrong_valid_until,"Das Gültigkeitsdatum dieser Angebotsanfrage ist bereits abgelaufen. Bitte ändern Sie das Datum, um es an den Kunden zu senden.",de_DE -``` - -Run the following console command to import data: - -```bash -console data:import glossary -``` - -{% info_block warningBox "Verification" %} -Make sure that in the database the configured data are added to the `spy_glossary` table. -{% endinfo_block %} - -### 5) Set up Behavior -#### Set up Quote Request Workflow - -Enable the following behaviors by registering the plugins: - -| Plugin | Specification | Prerequisites| Namespace | -| --- | --- | --- | --- | -| `QuoteRequestDatabaseStrategyPreCheckPlugin` | Disallows database strategy when editing quote items. | None | `Spryker\Client\QuoteRequest\Plugin\Quote` | -| `PersistentCartQuotePersistPlugin` | Makes full replacement of the customer quote. | None | `Spryker\Client\PersistentCart\Plugin` | -| `CloseOutdatedQuoteRequestConsole` | Registers console command for closing outdated quote requests. | None | `Spryker\Zed\QuoteRequest\Communication\Console` | -| `SanitizeQuoteRequestQuoteLockPreResetPlugin` | Sanitizes data related to the request for a quote in the quote. | None | `Spryker\Zed\QuoteRequest\Communication\Plugin\Cart` | -| `SanitizeSourcePricesQuoteLockPreResetPlugin` | Sanitizes source prices in quote items. | None | `Spryker\Zed\PriceCartConnector\Communication\Plugin\Cart` | - -**Pyz\Client\Quote\QuoteDependencyProvider.php** - -```php - -src/data/import/glossary.csv - -```yaml -quote_request_widget.request_for_quote,Request for Quote,en_US -quote_request_widget.request_for_quote,Angebotsanfrage,de_DE -quote_request_widget.request_for_quote.list.title,Requests for Quote,en_US -quote_request_widget.request_for_quote.list.title,Angebotsanfragen,de_DE -quote_request_page.quote_request,Request for Quote,en_US -quote_request_page.quote_request,Angebotsanfrage,de_DE -quote_request_page.quote_request.create,Create,en_US -quote_request_page.quote_request.create,Erstellen,de_DE -quote_request_page.quote_request_version.created,RfQ have got new version,en_US -quote_request_page.quote_request_version.created,Angebotsanfrage hat neue Version bekommen,de_DE -quote_request_page.quote_request.submit,Submit Request,en_US -quote_request_page.quote_request.submit,Anfrage Einreichen,de_DE -quote_request_page.quote_request.metadata.label.note,Notes,en_US -quote_request_page.quote_request.metadata.label.note,Anmerkungen,de_DE -quote_request_page.quote_request.metadata.label.delivery_date,Do not ship later than,en_US -quote_request_page.quote_request.metadata.label.delivery_date,Versenden Sie nicht später als,de_DE -quote_request_page.quote_request.metadata.label.purchase_order_number,Purchase order number,en_US -quote_request_page.quote_request.metadata.label.purchase_order_number,Bestellnummer,de_DE -quote_request_page.quote_request.violations.invalid_date,Date should be greater than current date.,en_US -quote_request_page.quote_request.violations.invalid_date,Date should be greater than current date.,de_DE -quote_request_page.quote_request.created,Quote request created successfully.,en_US -quote_request_page.quote_request.created,Angebotsanfrage erfolgreich erstellt.,de_DE -quote_request_page.quote_request.list.reference,RfQ,en_US -quote_request_page.quote_request.list.reference,AfA,de_DE -quote_request_page.quote_request.list.company,Company,en_US -quote_request_page.quote_request.list.company,Firma,de_DE -quote_request_page.quote_request.list.business_unit,Business unit,en_US -quote_request_page.quote_request.list.business_unit,Geschäftseinheit,de_DE -quote_request_page.quote_request.list.owner,Owner,en_US -quote_request_page.quote_request.list.owner,Inhaber,de_DE -quote_request_page.quote_request.list.total,Total,en_US -quote_request_page.quote_request.list.total,Gesamt,de_DE -quote_request_page.quote_request.list.date,Date,en_US -quote_request_page.quote_request.list.date,Datum,de_DE -quote_request_page.quote_request.list.status,Status,en_US -quote_request_page.quote_request.list.status,Status,de_DE -quote_request_page.quote_request.list.actions,Actions,en_US -quote_request_page.quote_request.list.actions,Aktionen,de_DE -quote_request_page.quote_request.labels.date,Date,en_US -quote_request_page.quote_request.labels.date,Datum,de_DE -quote_request_page.quote_request.labels.status,Status,en_US -quote_request_page.quote_request.labels.status,Status,de_DE -quote_request_page.quote_request.labels.valid_till,Valid Till (UTC),en_US -quote_request_page.quote_request.labels.valid_till,Gültig bis (UTC),de_DE -quote_request_page.quote_request.labels.hide_latest_version,Hide latest version from customer,en_US -quote_request_page.quote_request.labels.hide_latest_version,Die letzte Version vom Kunden verstecken,de_DE -quote_request_page.quote_request.labels.latest_version_is_hidden,The latest version is hidden from the customer,en_US -quote_request_page.quote_request.labels.latest_version_is_hidden,Die letzte Version ist dem Kunden verborgen,de_DE -quote_request_page.quote_request.labels.latest_version_is_visible,The latest version is visible to the customer,en_US -quote_request_page.quote_request.labels.latest_version_is_visible,Die letzte Version ist für den Kunden sichtbar,de_DE -quote_request_page.quote_request.labels.history,History,en_US -quote_request_page.quote_request.labels.history,Geschichte,de_DE -quote_request_page.quote_request.labels.customer,Customer,en_US -quote_request_page.quote_request.labels.customer,Kunde,de_DE -quote_request_page.quote_request.labels.company,Company,en_US -quote_request_page.quote_request.labels.company,Unternehmen,de_DE -quote_request_page.quote_request.labels.business_unit,Business unit,en_US -quote_request_page.quote_request.labels.business_unit,Geschäftseinheit,de_DE -quote_request_page.quote_request.labels.information,RfQ Information,en_US -quote_request_page.quote_request.labels.information,Informationen zur Angebotsanfrage,de_DE -quote_request_page.quote_request.labels.version_information,Version Information,en_US -quote_request_page.quote_request.labels.version_information,Versionsinformation,de_DE -quote_request_page.quote_request.actions.view,View,en_US -quote_request_page.quote_request.actions.view,Ansehen,de_DE -quote_request_page.quote_request.actions.cancel,Cancel,en_US -quote_request_page.quote_request.actions.cancel,Stornieren,de_DE -quote_request_page.quote_request.actions.save,Save,en_US -quote_request_page.quote_request.actions.save,Sparen,de_DE -quote_request_page.quote_request.actions.back_to_list,Back to List,en_US -quote_request_page.quote_request.actions.back_to_list,Zurück zur Liste,de_DE -quote_request_page.quote_request.actions.back_to_view,Back to View,en_US -quote_request_page.quote_request.actions.back_to_view,Zurück zur Ansicht,de_DE -quote_request_page.quote_request.actions.send_to_customer,Send to Customer,en_US -quote_request_page.quote_request.actions.send_to_customer,Senden Sie an den Kunden,de_DE -quote_request_page.quote_request.actions.send_to_agent,Send to Agent,en_US -quote_request_page.quote_request.actions.send_to_agent,An Agent senden,de_DE -quote_request_page.quote_request.actions.save_and_back_to_edit,Save and Back to Edit,en_US -quote_request_page.quote_request.actions.save_and_back_to_edit,Speichern und zurück zum Bearbeiten,de_DE -quote_request_page.quote_request.actions.convert_to_cart,Convert to Cart,en_US -quote_request_page.quote_request.actions.convert_to_cart,In den Warenkorb konvertieren,de_DE -quote_request_page.quote_request.actions.revise,Revise,en_US -quote_request_page.quote_request.actions.revise,Überarbeiten,de_DE -quote_request_page.quote_request.actions.edit,Edit,en_US -quote_request_page.quote_request.actions.edit,Ändern,de_DE -quote_request_page.quote_request.actions.edit_items,Edit Items,en_US -quote_request_page.quote_request.actions.edit_items,Elemente bearbeiten,de_DE -quote_request_page.quote_request.view.empty,You do not have any quote requests yet.,en_US -quote_request_page.quote_request.view.empty,Sie haben noch keine Angebotsanfragen.,de_DE -quote_request_page.quote_request.updated,Quote request updated successfully.,en_US -quote_request_page.quote_request.updated,Angebotsanfrage erfolgreich aktualisiert.,de_DE -quote_request_page.quote_request.sent_to_customer,Quote request sent to customer successfully.,en_US -quote_request_page.quote_request.sent_to_customer,Angebotsanfrage erfolgreich an den Kunden gesendet.,de_DE -quote_request_page.quote_request.sent_to_user,Request for quote was successfully sent to the agent for processing.,en_US -quote_request_page.quote_request.sent_to_user,Die Angebotsanfrage wurde erfolgreich zur Bearbeitung an den Agenten gesendet.,de_DE -quote_request_page.quote_request.use_default_price,Use default price,en_US -quote_request_page.quote_request.use_default_price,Standardpreis verwenden,de_DE -quote_request_page.quote_request.converted_to_cart,Quote request converted to cart successfully.,en_US -quote_request_page.quote_request.converted_to_cart,Die Angebotsanfrage wurde erfolgreich in den Warenkorb konvertiert.,de_DE -quote_request_page.quote_request.edit_items_confirm,"You are editing RfQ %reference% if you will leave it, all changes will be dropped.",en_US -quote_request_page.quote_request.edit_items_confirm,"Sie bearbeiten RfQ %reference% wenn Sie es verlassen, werden alle Änderungen verworfen.",de_DE -agent.account.quote_request,Requests for Quote,en_US -agent.account.quote_request,Angebotsanfragen,de_DE -quote_request_agent_widget.quote_request,Request for Quote,en_US -quote_request_agent_widget.quote_request,Angebotsanfrage,de_DE -quote_request_agent_widget.items,Items,en_US -quote_request_agent_widget.items,Artikel,de_DE -quote_request_agent_widget.no_request_created,You do not have any quote requests yet.,en_US -quote_request_agent_widget.no_request_created,Sie haben noch keine Angebotsanfragen.,de_DE -quote_request_agent_widget.create_new_request,Create new RfQ,en_US -quote_request_agent_widget.create_new_request,Neue Angebotsanfrage,de_DE -quote_request_agent_widget.view_all_requests,View all requests,en_US -quote_request_agent_widget.view_all_requests,Alle Anfragen anzeigen,de_DE -quote_request_agent_widget.form.select_customer,Select customer,en_US -quote_request_agent_widget.form.select_customer,"Wählen Sie den Kunden aus",de_DE -quote_request_agent_page.checkout.step.save_rfq.title,Save Request For Quote,en_US -quote_request_agent_page.checkout.step.save_rfq.title,Angebotsanfrage speichern,de_DE -quote_request_page.quote_request.saved,Quote request saved successfully.,en_US -quote_request_page.quote_request.saved,Angebotsanfrage wurde erfolgreich gespeichert.,de_DE -quote_request_page.quote_request.actions.edit_address,Edit Address,en_US -quote_request_page.quote_request.actions.edit_address,Adresse bearbeiten,de_DE -quote_request_page.quote_request.actions.edit_shipment,Edit Shipment,en_US -quote_request_page.quote_request.actions.edit_shipment,Versandart bearbeiten,de_DE -quote_request_page.quote_request.edit_address_confirm,"You are editing Quote Request %reference% if you will leave it, all changes will be dropped.",en_US -quote_request_page.quote_request.edit_address_confirm,"Sie bearbeiten Angebotsanfrage %reference% wenn Sie es verlassen, werden alle Änderungen verworfen.",de_DE -quote_request_page.quote_request.edit_shipment_confirm,"You are editing Quote Request %reference% if you will leave it, all changes will be dropped.",en_US -quote_request_page.quote_request.edit_shipment_confirm,"Sie bearbeiten Angebotsanfrage %reference% wenn Sie es verlassen, werden alle Änderungen verworfen.",de_DE -quote_request_page.quote_request.shipment_counter,"Shipment %index% of %length%",en_US -quote_request_page.quote_request.shipment_counter,"Lieferung %index% von %length%",de_DE -quote_request_page.quote_request.empty_shipment_data,No shipment address / shipment method provided.,en_US -quote_request_page.quote_request.empty_shipment_data,Es wurde keine Lieferadresse / Lieferart angegeben.,de_DE -quote_request_page.quote_request.title_create,Create Quote Request,en_US -quote_request_page.quote_request.title_create,Angebotsanfrage erstellen,de_DE -quote_request_page.quote_request.title_edit,Edit #%id%,en_US -quote_request_page.quote_request.title_edit,Ändern #%id%,de_DE -quote_request_page.quote_request.title_attention,Attention,en_US -quote_request_page.quote_request.title_attention,Achtung,de_DE -quote_request_page.quote_request.title_addresses,Addresses,en_US -quote_request_page.quote_request.title_addresses,Adressen,de_DE -quote_request_page.quote_request.title_billing_address,Billing Address,en_US -quote_request_page.quote_request.title_billing_address,Rechnungsadresse,de_DE -quote_request_page.quote_request.title_delivery_address,Delivery address,en_US -quote_request_page.quote_request.title_delivery_address,Lieferadresse,de_DE -quote_request_page.quote_request.title_shipment_method,Shipment method,en_US -quote_request_page.quote_request.title_shipment_method,Versandmethode,de_DE -quote_request_page.quote_request.breadcrumb.create,Create,en_US -quote_request_page.quote_request.breadcrumb.create,Erstellen,de_DE -quote_request_page.quote_request.breadcrumb.edit,Edit,en_US -quote_request_page.quote_request.breadcrumb.edit,Ändern,de_DE -quote_request_page.quote_request.breadcrumb.attention,Attention,en_US -quote_request_page.quote_request.breadcrumb.attention,Achtung,de_DE -quote_request_page.quote_request.multiple_delivery_address,Multiple delivery addresses.,en_US -quote_request_page.quote_request.multiple_delivery_address,Mehrere Lieferadressen.,de_DE -quote_request_page.quote_request.multiple_shipment_method,Multiple shipment methods.,en_US -quote_request_page.quote_request.multiple_shipment_method,Mehrere Versandarten.,de_DE -quote_request_page.quote_request.empty_page,Your Quote is empty!,en_US -quote_request_page.quote_request.empty_page,Ihre Angebotsanfrage ist unvollständig!,de_DE -quote_request_page.quote_request.empty_delivery_address,No delivery address added.,en_US -quote_request_page.quote_request.empty_delivery_address,Keine Lieferadresse hinzugefügt.,de_DE -quote_request_page.quote_request.empty_address,No address added.,en_US -quote_request_page.quote_request.empty_address,Keine Adresse hinzugefügt.,de_DE -quote_request_page.quote_request.empty_shipment_method,No shipment method added.,en_US -quote_request_page.quote_request.empty_shipment_method,Keine Versandart hinzugefügt.,de_DE -quote_request_page.quote_request.cta_add_address,Add address,en_US -quote_request_page.quote_request.cta_add_address,Adresse hinzufügen,de_DE -quote_request_page.quote_request.cta_edit_address,Edit address,en_US -quote_request_page.quote_request.cta_edit_address,Adresse bearbeiten,de_DE -quote_request_page.quote_request.cta_add_shipment_method,Add shipment method,en_US -quote_request_page.quote_request.cta_add_shipment_method,Versandart hinzufügen,de_DE -quote_request_page.quote_request.cta_edit_shipment_method,Edit shipment method,en_US -quote_request_page.quote_request.cta_edit_shipment_method,Versandart bearbeiten,de_DE -quote_request_page.quote_request.item,%count% item(s),en_US -quote_request_page.quote_request.item,%count% artikel,de_DE -``` -
    - - -Run the following console command to import data: - -```bash -console data:import glossary -``` - -{% info_block warningBox "Verification" %} -Make sure that in the database the configured data are added to the `spy_glossary` table. -{% endinfo_block %} - -### 3) Set up Behavior -#### Set up Quote Request Workflow - -Enable the following behaviors by registering the plugins: - -| Plugin | Specification | Prerequisites| Namespace | -| --- | --- | --- | --- | -|`PurchaseOrderNumberMetadataFieldPlugin`|Adds purchase order number to metadata for `QuoteRequest` form.|None|`SprykerShop\Yves\QuoteRequestPage\Plugin\QuoteRequestPage`| -|`DeliveryDateMetadataFieldPlugin`|Adds delivery date to metadata for `QuoteRequest` form.|None|`SprykerShop\Yves\QuoteRequestPage\Plugin\QuoteRequestPage`| -|`NoteMetadataFieldPlugin`|Adds note to metadata for `QuoteRequestAgent` form.|None|`SprykerShop\Yves\QuoteRequestPage\Plugin\QuoteRequestPage`| -|`PurchaseOrderNumberMetadataFieldPlugin`|Adds purchase order number to metadata for `QuoteRequestAgent` form.|None|`SprykerShop\Yves\QuoteRequestAgentPage\Plugin\QuoteRequestAgentPage`| -|`DeliveryDateMetadataFieldPlugin`|Adds delivery date to metadata for `QuoteRequestAgent` form.|None|`SprykerShop\Yves\QuoteRequestAgentPage\Plugin\QuoteRequestAgentPage`| -|`NoteMetadataFieldPlugin`|Adds note to metadata for `QuoteRequestAgent` form.|None|`SprykerShop\Yves\QuoteRequestAgentPage\Plugin\QuoteRequestAgentPage`| - -**Pyz\Yves\QuoteRequestPage\QuoteRequestPageDependencyProvider.php** - -```php -ModuleTest`QuoteRequestMenuItemWidget`Log in as a company user, go to **My Account** page, make sure that you see "Requests for Quote" link.`QuoteRequestCreateWidget`Log in as a company user, go to **Quote** page, make sure that you have some products in the cart. Make sure that you see **Request For Quote** button.`QuoteRequestCartWidget`After you've pressed the **Edit Items** button on request for a quote, make sure that you see "Save" and **Send To Agent** buttons on a cart page.`QuoteRequestCancelWidget`Make sure that you see the **Cancel** button on the quote request page.`QuoteRequestAgentOverviewWidget`When you logged in as an agent make sure that you see a list of quote requests.`QuoteRequestAgentCancelWidget`Make sure that when you logged in as an agent you can see the **Cancel** button for each quote request.`QuoteRequestActionsWidget`Make sure that when you edit RFQ shipping data as a buyer, you can see **Cancel**, **Save**, and **Back** buttons on the shipment method page and **Back** button on the shipping address page. -{% endinfo_block %} diff --git a/docs/scos/dev/feature-integration-guides/202005.0/quotation-process-multiple-carts-feature-integration.md b/docs/scos/dev/feature-integration-guides/202005.0/quotation-process-multiple-carts-feature-integration.md deleted file mode 100644 index 14b6a71b086..00000000000 --- a/docs/scos/dev/feature-integration-guides/202005.0/quotation-process-multiple-carts-feature-integration.md +++ /dev/null @@ -1,54 +0,0 @@ ---- -title: Quotation Process + Multiple Carts feature integration -last_updated: May 12, 2020 -template: feature-integration-guide-template -originalLink: https://documentation.spryker.com/v5/docs/quotation-process-multiple-carts-feature-integration -originalArticleId: 968034d5-40af-4cac-925e-6a7372eadf73 -redirect_from: - - /v5/docs/quotation-process-multiple-carts-feature-integration - - /v5/docs/en/quotation-process-multiple-carts-feature-integration ---- - -## Install Feature Core -### Prerequisites -Install the required features: - -| Name | Version | -| --- | --- | -| Quotation Process | master | -| Multiple Carts | master | - -### 1) Set up Behavior -Register the following plugins: - -| Plugin | Specification | Prerequisites | Namespace | -| --- | --- | --- | --- | -| `MultiCartQuotePersistPlugin` | Creates a new active customer cart. | None | `Spryker\Client\MultiCart\Plugin\PersistentCart` | - -**src/Pyz/Client/PersistentCart/PersistentCartDependencyProvider.php** - -```php -ModuleExpected Directory`PriceProductSchedule``vendor/spryker/price-product-schedule``PriceProductScheduleDataImport``vendor/spryker/price-product-schedule-data-import``PriceProductScheduleGui``vendor/spryker/price-product-schedule-gui` -{% endinfo_block %} - -### 2) Set up Database Schema and Transfer Objects - -Run the following commands to: - -* apply database changes -* generate entity and transfer changes - -```bash -console transfer:generate -console propel:install -console transfer:generate -``` - - {% info_block warningBox "Verification" %} -Make sure that the following changes have been applied by checking your database:
    Database EntityTypeEvent
    `spy_price_product_schedule`tablecreated
    `spy_price_product_schedule_list`tablecreated
    -{% endinfo_block %} - -{% info_block warningBox "Verification" %} -Make sure that the following changes in transfer objects have been applied:
    TransferTypeEventPath
    `PriceProductScheduleTransfer`classcreated`src/Generated/Shared/Transfer/PriceProductScheduleTransfer`
    `PriceProductScheduleCsvValidationResultTransfer`classcreated`src/Generated/Shared/Transfer/PriceProductScheduleCsvValidationResultTransfer`
    `PriceProductScheduleImportTransfer`classcreated`src/Generated/Shared/Transfer/PriceProductScheduleImportTransfer`
    `PriceProductScheduleImportMetaDataTransfer`
    `PriceProductScheduleImportTransfer`classcreated`src/Generated/Shared/Transfer/PriceProductScheduleImportMetaDataTransfer`
    `PriceProductScheduleListTransfer`classcreated`src/Generated/Shared/Transfer/PriceProductScheduleListTransfer`
    `PriceProductScheduleListResponseTransfer`classcreated`src/Generated/Shared/Transfer/PriceProductScheduleListResponseTransfer`
    `PriceProductScheduleListImportRequestTransfer`classcreated`src/Generated/Shared/Transfer/PriceProductScheduleListImportRequestTransfer`
    `PriceProductScheduleListImportErrorTransfer`
    `PriceProductScheduleImportTransfer`classcreated`src/Generated/Shared/Transfer/PriceProductScheduleListImportErrorTransfer`
    `PriceProductScheduleListImportResponseTransfer`
    `PriceProductScheduleImportTransfer`classcreated`src/Generated/Shared/Transfer/PriceProductScheduleListImportResponseTransfer`
    `PriceProductScheduleListMetaDataTransfer`classcreated`src/Generated/Shared/Transfer/PriceProductScheduleListMetaDataTransfer`
    `PriceProductScheduleCriteriaFilterTransfer`classcreated`src/Generated/Shared/Transfer/PriceProductScheduleCriteriaFilterTransfer`
    `PriceProductScheduleResponseTransfer`classcreated`src/Generated/Shared/Transfer/PriceProductScheduleResponseTransfer`
    `PriceProductScheduleErrorTransfer`classcreated`src/Generated/Shared/Transfer/PriceProductScheduleErrorTransfer`
    `PriceProductScheduleRedirectTransfer`classcreated`src/Generated/Shared/Transfer/PriceProductScheduleRedirectTransfer`
    `SpyPriceProductScheduleEntityTransfer`classcreated`src/Generated/Shared/Transfer/SpyPriceProductScheduleEntityTransfer`
    `SpyPriceProductScheduleListEntityTransfer`classcreated`src/Generated/Shared/Transfer/SpyPriceProductScheduleListEntityTransfer`
    -{% endinfo_block %} - -### 3) Import Data - -#### Import Price Product Schedules - -{% info_block infoBox "Info" %} -The following imported entities will be used as product price schedules in Spryker OS. -{% endinfo_block %} - -Prepare your data according to your requirements using our demo data: - -**vendor/spryker/spryker/Bundles/PriceProductScheduleDataImport/data/import** - -```yaml -abstract_sku,concrete_sku,price_type,store,currency,value_net,value_gross,from_included,to_included -001,,DEFAULT,DE,CHF,9832,10924,2019-01-01T00:00:00-00:00,2019-12-31T23:59:59-00:00 -001,,DEFAULT,DE,CHF,7762,8624,2019-05-01T00:00:00-00:00,2019-06-30T23:59:59-00:00 -001,,DEFAULT,DE,CHF,3881,4312,2019-06-23T00:00:00-00:00,2019-07-19T23:59:59-00:00 -001,,DEFAULT,DE,EUR,8549,9499,2019-01-01T00:00:00-00:00,2019-12-31T23:59:59-00:00 -001,,DEFAULT,DE,EUR,6749,7499,2019-05-01T00:00:00-00:00,2019-06-30T23:59:59-00:00 -001,,DEFAULT,DE,EUR,3375,3750,2019-06-23T00:00:00-00:00,2019-07-19T23:59:59-00:00 -,060_26027598,DEFAULT,DE,CHF,30902,34337,2019-05-01T00:00:00-00:00,2019-06-30T23:59:59-00:00 -,060_26027598,DEFAULT,DE,CHF,15451,17169,2019-06-23T00:00:00-00:00,2019-07-19T23:59:59-00:00 -,060_26175504,DEFAULT,AT,CHF,32909,36566,2019-01-01T00:00:00-00:00,2019-12-31T23:59:59-00:00 -,060_26175504,DEFAULT,AT,CHF,25981,28868,2019-05-01T00:00:00-00:00,2019-06-30T23:59:59-00:00 -,060_26175504,DEFAULT,AT,CHF,12991,14434,2019-06-23T00:00:00-00:00,2019-07-19T23:59:59-00:00 -,060_26175504,DEFAULT,AT,EUR,28616,31797,2019-01-01T00:00:00-00:00,2019-12-31T23:59:59-00:00 -,060_26175504,DEFAULT,AT,EUR,22592,25103,2019-05-01T00:00:00-00:00,2019-06-30T23:59:59-00:00 -,060_26175504,DEFAULT,AT,EUR,11296,12552,2019-06-23T00:00:00-00:00,2019-07-19T23:59:59-00:00 -``` - -| Column | REQUIRED | Data Type | Data Example | Data Explanation | -| --- | --- | --- | --- | --- | -| `abstract_sku` | optional | string | 001 | Existing abstract product SKU of the scheduled price. | -| `concrete_sku` | optional | string | 060_26027598 | Existing concrete product SKU of the scheduled price. | -| `price_type` | mandatory | string | DEFAULT | Name of a price type. By default, it's "DEFAULT", but can be project specific (strike, sale, ...). | -| `store` | mandatory | string | DE | Store name of the scheduled price. | -| `currency` | mandatory | string | CHF | Currency ISO code. | -| `value_net` | optional | integer | 9832 | Net price in cents. | -| `value_gross` | optional | integer | 10924 | Gross price in cents. | -| `from_included` | mandatory | datetime | 2019-01-01T00:00:00-00:00 | Start date of the scheduled price (should be less than `to_included`). | -| `to_included` | mandatory | datetime | 2019-12-31T23:59:59-00:00 | End date of the scheduled price. | - -Register the following plugin to enable data import: - -| Plugin | Specification | Prerequisites | Namespace | -| --- | --- | --- | --- | -| `PriceProductScheduleDataImportPlugin` | Imports scheduled prices data into database. | None | `\Spryker\Zed\PriceProductScheduleDataImport\Communication\Plugin` | - -**src/Pyz/Zed/DataImport/DataImportDependencyProvider.php** - -```php -
  • Applies scheduled prices for the current store.
  • Persists a price product store for the applied scheduled product price.
  • Disables irrelevant product price schedules for the applied scheduled products price.
  • Reverts product prices from the fallback price type for scheduled product prices that are finished.
  • | None | `Spryker\Zed\PriceProductSchedule\Communication\Console` | -| `PriceProductScheduleCleanupConsole` | Deletes scheduled prices that have ended for the number of days provided as a parameter starting from the current date. | None | `Spryker\Zed\PriceProductSchedule\Communication\Console` | -| `ScheduledPriceProductConcreteFormEditTabsExpanderPlugin` | Expands product concrete *Edit Product* page with the **Scheduled Prices** tab. | None | `Spryker\Zed\PriceProductScheduleGui\Communication\Plugin\ProductManagement` | -| `ScheduledPriceProductAbstractFormEditTabsExpanderPlugin` | Expands product abstract *Edit Product* page with the **Scheduled Prices** tab. | None | `Spryker\Zed\PriceProductScheduleGui\Communication\Plugin\ProductManagement` | -| `ScheduledPriceProductAbstractEditViewExpanderPlugin` | Expands the **Scheduled Prices** tab of the *Edit Product abstract* page with scheduled prices data. | None | `Spryker\Zed\PriceProductScheduleGui\Communication\Plugin\ProductManagement` | -| `ScheduledPriceProductConcreteEditViewExpanderPlugin` | Expands the **Scheduled Prices** tab of the *Edit Product concrete* page with the scheduled prices data. | None | `Spryker\Zed\PriceProductScheduleGui\Communication\Plugin\ProductManagement` | - -**src/Pyz/Zed/Console/ConsoleDependencyProvider.php** - -```php -
  • Scheduled prices have been correctly applied in the **Back Office > Products > Products** section.
  • You can edit any abstract or concrete product.
  • On the **Edit Product** page, you can find the *Scheduled prices* tab with your scheduled prices which you can create, update and delete.
  • You can import scheduled prices in the **Back Office > Prices > Scheduled Prices** section.
  • You can see the list of previous imports in the **Back Office > Prices > Scheduled Prices** section.
  • You can see information about the import in the **Back Office > Prices > Scheduled Prices page > View** section.
  • You can edit the name of the import and edit and delete scheduled prices inside this import in the **Back Office > Prices > Scheduled Prices page > Edit** section.
  • You can download all the prices inside the import in the **Back Office > Prices > Scheduled Prices page > Download** section.
  • You can delete the import in the **Back Office > Prices > Scheduled Prices page > Delete** section.
  • -{% endinfo_block %} - -Run the following console command to clear applied scheduled prices: - -```bash -console price-product-schedule:clean-up 1 -``` - -{% info_block warningBox "Vreification" %} -Make sure that applied scheduled prices have been correctly removed from the database by checking the `spy_price_product_schedule` table. -{% endinfo_block %} - -### 5) Set up Cron Job - -Enable the `apply-price-product-schedule` console command in the cron-job list: - -config/Zed/cronjobs/jobs.php - -```php - 'apply-price-product-schedule', - 'command' => '$PHP_BIN vendor/bin/console price-product-schedule:apply', - 'schedule' => '0 6 * * *', - 'enable' => true, - 'run_on_non_production' => true, - 'stores' => $allStores, -]; -``` - -{% info_block warningBox "Verification" %} -Make sure that scheduled prices have been correctly applied in the **Back Office > Products > Products** section. -{% endinfo_block %} diff --git a/docs/scos/dev/feature-integration-guides/202005.0/search-widget-for-concrete-products-feature-integration.md b/docs/scos/dev/feature-integration-guides/202005.0/search-widget-for-concrete-products-feature-integration.md deleted file mode 100644 index 055a1afec7c..00000000000 --- a/docs/scos/dev/feature-integration-guides/202005.0/search-widget-for-concrete-products-feature-integration.md +++ /dev/null @@ -1,175 +0,0 @@ ---- -title: Search Widget for Concrete Products feature integration -last_updated: May 12, 2020 -template: feature-integration-guide-template -originalLink: https://documentation.spryker.com/v5/docs/search-widget-for-concrete-products-integration -originalArticleId: a8692767-5312-4eaf-8e55-b152c333e2df -redirect_from: - - /v5/docs/search-widget-for-concrete-products-integration - - /v5/docs/en/search-widget-for-concrete-products-integration ---- - -## Install Feature Core - -### Prerequisites - -To start the feature integration, overview and install the necessary features: - -| Name | Version | -| --- | --- | -| Cart | 202005.0 | -| Product | 202005.0 | -| Non-splittable Products (optional) | 202005.0 | - -### 1) Check the Installed Modules - -{% info_block warningBox “Verification” %} - -Make sure that the following modules were installed: - -| Module | Expected Directory | -| --- | --- | -| `Cart` | `vendor/spryker/cart` | -| `Product` | `vendor/spryker/product` | -| `ProductQuantity` (optional) | `vendor/spryker/product-quantity` | -| `ProductSearchWidget` | `vendor/spryker-shop/product-search-widget` | - -{% endinfo_block %} - -### 2) Set up Transfer Objects - -Run the following commands to apply database changes and generate entity and transfer changes: - -```bash -console transfer:generate -``` - -{% info_block warningBox “Verification” %} - -Make sure that the following changes are present in the transfer objects: - -| Transfer | Type | Event | Path | -| --- | --- | --- | --- | -| `CartChangeTransfer` | class | created | `src/Generated/Shared/Transfer/CartChangeTransfer` | -| `ItemTransfer` | class | created |`src/Generated/Shared/Transfer/ItemTransfer` | -| `MessageTransfer` | class | created | `src/Generated/Shared/Transfer/MessageTransfer` | - -{% endinfo_block %} - -### 3) Add Translations - -Append glossary according to your language configuration: - -**src/data/import/glossary.csv** - -```yaml -cart.quick_add_to_cart,Schnell zum Warenkorb hinzufügen,de_DE -cart.quick_add_to_cart,Quick add to Cart,en_US -cart.quick_add_to_cart.submit,In den Warenkorb,de_DE -cart.quick_add_to_cart.submit,Add to Cart,en_US -product_quick_add_widget.form.quantity,"# Qty",en_US -product_quick_add_widget.form.quantity,"# Anzahl",de_DE -product_quick_add_widget.form.error.quantity.required,"Quantity must be at least 1",en_US -product_quick_add_widget.form.error.quantity.required,"Die Anzahl muss mindestens 1 sein",de_DE -product_quick_add_widget.form.error.quantity.max_value_constraint,"Provided quantity is too high",en_US -product_quick_add_widget.form.error.quantity.max_value_constraint,"Die Menge ist leider zu groß",de_DE -product_quick_add_widget.form.error.redirect_route_empty,"Redirect router should not be empty",en_US -product_quick_add_widget.form.error.redirect_route_empty,"Redirect Router kann nicht leer sein",de_DE -product_quick_add_widget.form.error.sku.empty,"SKU should not be empty",en_US -product_quick_add_widget.form.error.sku.empty,"SKU kann nicht leer sein",de_DE -product-quantity.notification.quantity.min.failed,The ordered quantity was adjusted to the next possible quantity for the article because minimum quantity is %min%.,en_US -product-quantity.notification.quantity.min.failed,Die bestellte Anzahl erfüllt nicht die Anforderungen für dieses Produkt. Mindestanzahl ist %min%.,de_DE -product-quantity.notification.quantity.max.failed,The ordered quantity was adjusted to the next possible quantity for the article because maximum quantity is %max%.,en_US -product-quantity.notification.quantity.max.failed,Die bestellte Anzahl erfüllt nicht die Anforderungen für dieses Produkt. Maximalanzahl ist %max%.,de_DE -product-quantity.notification.quantity.interval.failed,The ordered quantity was adjusted to the next possible quantity for the article because quantity step is %step%.,en_US -product-quantity.notification.quantity.interval.failed,Die bestellte Anzahl erfüllt nicht die Anforderungen für dieses Produkt. Intervallgröße ist %step%.,de_DE -``` - -Run the following console command to import data: - -```bash -console data:import glossary -``` - -{% info_block warningBox "Verification" %} - -Make sure that in the database the configured data are added to the `spy_glossary` table. - -{% endinfo_block %} - -### 4) Set up Widgets - -Enable global widgets: - -| Widget | Description | Namespace | -| --- | --- | --- | -| `ProductConcreteAddWidget` | Provides a form with the product concrete search and quantity inputs to add the concrete products to cart. | `SprykerShop\Yves\ProductSearchWidget\Widget` | - -**src/Pyz/Yves/ShopApplication/ShopApplicationDependencyProvider.php** - -```php -ModuleExpected Directory`SharedCart``vendor/spryker/shared-cart``SharedCartDataImport``vendor/spryker/shared-cart-data-import` -{% endinfo_block %} - -### 2) Set up the Database Schema -Run the following commands to apply the database changes and generate entity and transfer changes: - -```bash -console transfer:generate -console propel:install -console transfer:generate -``` - -{% info_block warningBox "Verification" %} -Make sure that the following changes have been applied by checking your database:
    Database EntityTypeEvent
    `spy_quote_company_user`tablecreated
    `spy_quote_permission_group`tablecreated
    `spy_quote_permission_group_to_permission`tablecreated
    -{% endinfo_block %} - -{% info_block warningBox "Verification" %} -Make sure that the following changes have been applied in transfer objects:
    TransferTypeEventPath
    `QuoteResponseTransfer.sharedCustomerQuotes`columnadded`src/Generated/Shared/Transfer/QuoteResponseTransfer`
    `QuoteTransfer.shareDetails`columnadded`src/Generated/Shared/Transfer/QuoteTransfer`
    `QuoteUpdateRequestAttributesTransfer.shareDetails`columnadded`src/Generated/Shared/Transfer/QuoteUpdateRequestAttributesTransfer`
    `ShareDetailTransfer`ClassCreated`src/Generated/Shared/Transfer/ShareDetailTransfer`
    `ShareDetailCollectionTransfer`ClassCreated`src/Generated/Shared/Transfer/ShareDetailCollectionTransfer`
    `QuotePermissionGroupTransfer`ClassCreated`src/Generated/Shared/Transfer/QuotePermissionGroupTransfer`
    `QuotePermissionGroupCriteriaFilterTransfer`ClassCreated`src/Generated/Shared/Transfer/QuotePermissionGroupCriteriaFilterTransfer`
    `QuotePermissionGroupResponseTransfer`ClassCreated`src/Generated/Shared/Transfer/QuotePermissionGroupResponseTransfer`
    `ShareCartRequestTransfer`ClassCreated`src/Generated/Shared/Transfer/ShareCartRequestTransfer`
    -{% endinfo_block %} - -### 3) Add Translations -Glossary keys for flash messages: - -**src/data/import/glossary.csv** - -```yaml -shared_cart.share.error.already_exist,Cart was already shared with this customer,en_US -shared_cart.share.error.already_exist,Der Warenkorb wurde bereits mit diesem Kunden geteilt,de_DE -``` - -Run the following console command to import data: - -```bash -console data:import glossary -``` - -{% info_block warningBox "Verification" %} -Make sure that the configured data has been added to the `spy_glossary` table in the database. -{% endinfo_block %} - -### 4) Import Data - -#### Add Infrastructural Data -Register the following plugins: - -|Plugin|Specification|Prerequisites|Namespace| -|---|---|---|---| -|`SharedCartPermissionInstallerPlugin`|Installs the registered infrastructural quote permissions.|None|`Spryker\Zed\SharedCart\Communication\Plugin`| -|`ReadSharedCartPermissionPlugin`|Quote permission to check read shared cart permissions in the client layer.|None|`Spryker\Client\SharedCart\Plugin`| -|`WriteSharedCartPermissionPlugin`|Quote permission to check writing shared cart permissions in the client layer.|None|`Spryker\Client\SharedCart\Plugin`| -|`ReadSharedCartPermissionPlugin`|Quote permission to check read shared cart permissions in the zed layer. |None|`Spryker\Zed\SharedCart\Communication\Plugin`| -|`WriteSharedCartPermissionPlugin`|Quote permission to check writing shared cart permissions in the zed layer. |None|`Spryker\Zed\SharedCart\Communication\Plugin`| - -**src/Pyz/Zed/Installer/InstallerDependencyProvider.php** - -```php -1. Records with the keys `ReadSharedCartPermissionPlugin` and `WriteSharedCartPermissionPlugin` have been added to the `spy_permission` table.
    2. In the database the configured infrastructural quote permission groups have been added to the `spy_quote_permission_group` and `spy_quote_permission_group_to_permission` tables. -{% endinfo_block %} - -#### Import Carts Sharing - -{% info_block infoBox "Info" %} -The following imported entities will be used as carts to the company user relations in the Spryker OS. -{% endinfo_block %} - -Prepare your data according to your requirements using our demo data: - -**vendor/spryker/chared-cart-data-import/data/import/shared_cart.csv** - -```yaml -quote_key,company_user_key,permission_group_name -quote-22,Spryker--1,FULL_ACCESS -quote-23,Spryker--1,FULL_ACCESS -quote-23,Spryker--2,FULL_ACCESS -quote-23,Spryker--3,FULL_ACCESS -quote-23,Spryker--6,FULL_ACCESS -quote-23,Spryker--4,READ_ONLY -quote-23,Spryker--5,READ_ONLY -``` - -|Column|REQUIRED|Data Type|Data Example|Data Explanation| -|---|---|---|---|---| -|`quote_key`|mandatory|string |quote-22|Key that will identify the quote to add data to.| -|`company_user_key`|mandatory|string|Spryker--1|Key that will identify the company user that the quote is shared with.| -|`permission_group_name`|mandatory|string|FULL_ACCESS|Permission group that will be assigned to the shared company user.| - -Register the following plugin to enable data import: - -|Plugin|Specification|Prerequisites |Namespace| -|---|---|---|---| -|SharedCartDataImportPlugin|Imports customer's quotes sharing to database.| Make sure that customers have been already imported.
    Make sure that company users have been already imported.
    Make sure that a cart has been already imported.|Spryker\Zed\SharedCartDataImport\Communication\Plugin| - -**src/Pyz/Zed/DataImport/DataImportDependencyProvider.php** - -```php -It is executed after the cart has been created or updated.|None|`Spryker\Zed\SharedCart\Communication\Plugin`| -|`RemoveSharedQuoteBeforeQuoteDeletePlugin`|Removes the sharing relation for the current cart before the cart has been removed.|None|`Spryker\Zed\SharedCart\Communication\Plugin`| -|`UpdateShareDetailsQuoteAfterSavePlugin`|Updates the cart sharing relations after the cart has been created or updated.|None|`Spryker\Zed\SharedCart\Communication\Plugin`| -|`SharedQuoteSetDefaultBeforeQuoteSavePlugin`|Marks the cart sharing relation for the current customer as active if the quote has been marked as active.|None|`Spryker\Zed\SharedCart\Communication\Plugin`| - -{% info_block infoBox "Information" %} -All shared cart plugins must be added after the multi-cart plugins have been registered. -{% endinfo_block %} - -**src/Pyz/Zed/Quote/QuoteDependencyProvider.php** - -```php - A new record will be added to `spy_quote_company_user` if sharing quote functionality used. -{% endinfo_block %} - -#### Persistent Cart Integration - -Register the following plugins: - -|Plugin|Specification|Prerequisites|Namespace| -|---|---|---|---| -|`SharedCartsUpdateQuoteUpdatePlugin`|Adds shared cart list to multi-cart collection.
    Sorts the collection by name.
    Saves the multi-cart collection in the session. |`SharedCartQuoteResponseExpanderPlugin` should be included. It should be executed after `\Spryker\Client\MultiCart\Plugin\SaveCustomerQuotesQuoteUpdatePlugin` has been registered and before `\Spryker\Client\MultiCart\Plugin\DefaultQuoteUpdatePlugin` has been registered.|`Spryker\Client\SharedCart\Plugin`| -|`ProductSeparatePersistentCartChangeExpanderPlugin`|Allows adding a product as a separate item if the product with the same SKU already exists in the cart.|1|`Spryker\Client\SharedCart\Plugin`| -|`PermissionUpdateQuoteUpdatePlugin`|Takes a permission list from `QuoteResponseTransfer` and updates a customer from the session.|`SharedCartQuoteResponseExpanderPlugin` should be included.|`Spryker\Client\SharedCart\Plugin`| -|`SharedCartQuoteResponseExpanderPlugin`|Expands `QuoteResponseTransfer` with the following shared cart related data:
    1) Carts shared with the customer.
    2) Customer permission list.
    3) Expands a customer cart with the sharing data.|1|`Spryker\Zed\SharedCart\Communication\Plugin`| - -**src/Pyz/Client/PersistentCart/PersistentCartDependencyProvider.php** - -```php -Quotes shared with the current customer must be added to the multi-cart session ;
    `CustomerTransfer::$permissions` must contain permissions must be updated in customer session; -{% endinfo_block %} - -#### Set up Permission Integration - -Register the following plugin: - -|Plugin|Specification|Prerequisites|Namespace| -|---|---|---|---| -|`QuotePermissionStoragePlugin` |Shared cart permission provider. |None|`Spryker\Zed\SharedCart\Communication\Plugin`| - -**src/Pyz/Zed/Permission/PermissionDependencyProvider.php** - -```php -ModuleExpected Directory`SharedCartPage``vendor/spryker-shop/shared-cart-page``SharedCartWidget``vendor/spryker-shop/shared-cart-widget``` -{% endinfo_block %} - -### 2) Add Translations - -Append glossary according to your configuration: - -**src/data/import/glossary.csv** - -```yaml -shared_cart_widget.add_product.separate,"Add as separate item",en_US -shared_cart_widget.add_product.separate,"Als separaten Artikel hinzufügen",de_DE -shared_cart_widget.cart.share,"Share cart",en_US -shared_cart_widget.cart.share,"Warenkorb teilen",de_DE -shared_cart_widget.cart.unshare,"Unshare cart",en_US -shared_cart_widget.cart.unshare,"Freigabewagen wird aufgehoben",de_DE -shared_cart_widget.cart.dismiss,Dismiss,en_US -shared_cart_widget.cart.dismiss,Ablehnen,de_DE -shared_cart_widget.share_list.shared_with,Cart shared with,en_US -shared_cart_widget.share_list.shared_with,Warenkorb geteilt mit,de_DE -shared_cart_widget.share_list.customer_name,Customer name,en_US -shared_cart_widget.share_list.customer_name,Kundenname,de_DE -shared_cart_widget.share_list.permission,Access level,en_US -shared_cart_widget.share_list.permission,Zugriffsebene,de_DE -shared_cart_widget.share_list.actions,Actions,en_US -shared_cart_widget.share_list.actions,Aktionen,de_DE -shared_cart_widget.share_list.action.unshare,Unshare cart,en_US -shared_cart_widget.share_list.action.unshare,Freigabe des Einkaufswagens,de_DE -shared_cart.share_list.permissions.NO_ACCESS,No access,en_US -shared_cart.share_list.permissions.NO_ACCESS,Kein Zugang,de_DE -shared_cart.share_list.permissions.READ_ONLY,Read-only,en_US -shared_cart.share_list.permissions.READ_ONLY,Schreibgeschützt,de_DE -shared_cart.share_list.permissions.FULL_ACCESS,Full access,en_US -shared_cart.share_list.permissions.FULL_ACCESS,Ohne Einschränkung,de_DE -shared_cart.share_list.permissions.OWNER_ACCESS,Owner access,en_US -shared_cart.share_list.permissions.OWNER_ACCESS,Eigentümer Zugriff,de_DE -shared_cart.form.share_cart,"Share cart",en_US -shared_cart.form.share_cart,"Warenkorb teilen",de_DE -shared_cart.form.share_cart.title,"Share cart ""cart_name""",en_US -shared_cart.form.share_cart.title,"Warenkorb teilen ""cart_name""",de_DE -shared_cart.form.customer,"Customer name",en_US -shared_cart.form.customer,Kundenname,de_DE -shared_cart.form.select_customer,Select customer,en_US -shared_cart.form.select_customer,"Wählen Sie den Kunden aus",de_DE -shared_cart.form.select_permissions,Select access level,en_US -shared_cart.form.select_permissions,"Wählen Sie Zugriffsebene",de_DE -shared_cart.form.share_button,Share,en_US -shared_cart.form.share_button,Aktie,de_DE -shared_cart.form.save_button,Save,en_US -shared_cart.form.save_button,Sparen,de_DE -shared_cart.form.data_empty,"There are no Users with whom you can share shopping cart.",en_US -shared_cart.form.data_empty,"Es gibt keine Benutzer, mit denen Sie den Einkaufswagen teilen können.",de_DE -shared_cart.share.breadcrumbs.share,Share,en_US -shared_cart.share.breadcrumbs.share,Teilen,de_DE -shared_cart.share.breadcrumbs.shopping_carts,Shopping carts,en_US -shared_cart.share.breadcrumbs.shopping_carts,Warenkörbe,de_DE -shared_cart.share.form.users,Users,en_US -shared_cart.share.form.users,Benutzer,de_DE -shared_cart_page.share.success,Cart was successfully shared,en_US -shared_cart_page.share.success,Warenkorb wurde erfolgreich geteilt,de_DE -shared_cart_page.unshare.success,Cart was successfully unshared,en_US -shared_cart_page.unshare.success,Teilen des Warenkorbs wurde erfolgreich aufgehoben ,de_DE -shared_cart_page.dismiss_confirmation.warning,Warning,en_US -shared_cart_page.dismiss_confirmation.warning,Warnung,de_DE -shared_cart.dismiss.title,Dismiss shared cart ‘quote_name’,en_US -shared_cart.dismiss.title,Warenkorb ‘quote_name’ ablehnen,de_DE -shared_cart_page.share.breadcrumbs.dismiss,Dismiss,en_US -shared_cart_page.share.breadcrumbs.dismiss,Ablehnen,de_DE -shared_cart_page.cart.dismiss,Dismiss,en_US -shared_cart_page.cart.dismiss,Ablehnen,de_DE -shared_cart_page.dismiss_confirmation.trying_to_dismiss,Are you sure that you what to dismiss shopping cart?,en_US -shared_cart_page.dismiss_confirmation.trying_to_dismiss,"Sind Sie sicher, dass Sie den Warenkorb ablehnen wollen?",de_DE -shared_cart_page.dismiss.success,Shopping cart was dismissed successfully.,en_US -shared_cart_page.dismiss.success,Warenkorb wurde erfolgreich abgelehnt.,de_DE -``` - -Run the following console command to import data: - -```bash -console data:import glossary -``` - -{% info_block warningBox "Verification" %} -Make sure that in the database the configured data has been added to the `spy_glossary` table. -{% endinfo_block %} - -### 3) Set up Widgets - -Register the following global widgets: - -|Plugin|Description|Prerequisites|Namespace| -|---|---|---|---| -|`SharedCartPermissionGroupWidget`|Adds a cart access level for the multicart list to the header. |None|`SprykerShop\Yves\SharedCartWidget\Widget`| -|`CartListPermissionGroupWidget`|Adds the cart access level column and share/dismiss links to the action column for the multicart list page.|None|`SprykerShop\Yves\SharedCartWidget\Widget`| -|`CartDeleteCompanyUsersListWidget`|Renders a list, shared with the customer, for the cart confirm delete page.|None|`SprykerShop\Yves\SharedCartWidget\Widget`| - -**src/Pyz/Yves/ShopApplication/ShopApplicationDependencyProvider.php** - -```php -Open Yves and log in with customer.
    ModuleTest
    `SharedCartPermissionGroupWidget`Hover over the multicart list in the header: it should contain the access column.
    `CartListPermissionGroupWidget`Open `https://mysprykershop.com/multi-cart/` - the page should contain the access column and share cart link
    `CartDeleteCompanyUsersListWidget`Open `https://mysprykershop.com/multi-cart/`. Click on the share cart link.
    Share the cart and click on the delete link.
    The list of customers whom this cart is shared with should appear on the delete confirmation page.
    -{% endinfo_block %} - -### 4) Enable Controllers - -Register the following plugin: - -|Plugin|Description|Prerequisites|Namespace| -|---|---|---|---| -|`SharedCartPageControllerProvider`|Provides routes used in `SharedCartPage.` |None|`SprykerShop\Yves\SharedCartPage\Plugin\Provider`| - -**src/Pyz/Yves/ShopApplication/YvesBootstrap.php** - -```php -
  • Open Yves and log in with customer.
  • Open `https://mysprykershop.com/multi-cart/` - the page should contain all customer's quotes.
  • Click on the share link. The share cart page should open.
  • -{% endinfo_block %} diff --git a/docs/scos/dev/feature-integration-guides/202005.0/shipment-approval-process-feature-integration.md b/docs/scos/dev/feature-integration-guides/202005.0/shipment-approval-process-feature-integration.md deleted file mode 100644 index cc978a62762..00000000000 --- a/docs/scos/dev/feature-integration-guides/202005.0/shipment-approval-process-feature-integration.md +++ /dev/null @@ -1,195 +0,0 @@ ---- -title: Shipment + Approval Process feature integration -description: This integration guide provides step-by-step instructions on integrating Shipment and Approval Process connector in Spryker Commerce OS. -last_updated: May 12, 2020 -template: feature-integration-guide-template -originalLink: https://documentation.spryker.com/v5/docs/shipment-approval-process-feature-integration -originalArticleId: ebf2ebe0-8c3d-41d0-9546-c093cb97b0d8 -redirect_from: - - /v5/docs/shipment-approval-process-feature-integration - - /v5/docs/en/shipment-approval-process-feature-integration -related: - - title: Approval Process feature integration - link: docs/scos/dev/feature-integration-guides/page.version/approval-process-feature-integration.html - - title: Shipment feature integration - link: docs/scos/dev/feature-integration-guides/page.version/shipment-feature-integration.html ---- - -## Install Feature Core - -### Prerequisites - -Install the required features: - -| Name | Version | -| --- | --- | -| Shipment | master | -| Approval Process | master | - -### 1) Install the required modules using Composer -Run the following command(s) to install the required modules: - -```bash -composer require spryker/quote-approval-shipment-connector:"^1.0.0" --update-with-dependencies -``` -{% info_block warningBox "Verification" %} - -Make sure that the following modules were installed: - -|Module|Expected Directory| -| --- | --- | -| `QuoteApprovalShipmentConnector` | `vendor/spryker/quote-approval-shipment-connector` | - -{% endinfo_block %} - -### 2) Set up Configuration - -Add the following configuration to your project: - -**src/Pyz/Shared/QuoteApproval/QuoteApprovalConfig.php** - -```php -The current feature integration guide only adds the following functionalities:
    • Shipment Back Office UI;
    • Delivery method per store;
    • Shipment data import.
    -{% endinfo_block %} - -## Install Feature Core -### Prerequisites -To start the feature integration, overview and install the necessary features: - -| Name | Version | -| --- | --- | -| Spryker Core | master | - -### 1) Install the required modules using Composer -Run the following command(s) to install the required modules: - -```bash -composer require spryker-feature/shipment:"^master" --update-with-dependencies -``` - -{% info_block warningBox "Verification" %} -Make sure that the following modules have been installed:
    ModuleExpected Directory
    `ShipmentDataImport``vendor/spryker/shipment-data-import`
    `ShipmentGui``vendor/spryker/ShipmentGui`
    -{% endinfo_block %} - -### 2) Set up Database Schema and Transfer Objects -Run the following commands to apply database changes and generate entity and transfer changes: - -```bash -console transfer:generate -console propel:install -console transfer:generate -``` - -{% info_block warningBox "Verification" %} -Make sure that the following changes have been applied by checking your database:
    Database EntityTypeEvent
    `spy_shipment_method_store`tablecreated
    -{% endinfo_block %} - -{% info_block warningBox "Verification" %} -Make sure that the following changes have been applied in transfer objects:
    TransferTypeEventPath
    `ShipmentTransfer`classcreated`src/Generated/Shared/Transfer/ShipmentTransfer`
    `StoreTransfer`classcreated`src/Generated/Shared/Transfer/StoreTransfer`
    `DataImporterConfigurationTransfer`classcreated`src/Generated/Shared/Transfer/DataImporterConfigurationTransfer`
    `DataImporterReaderConfigurationTransfer`classcreated`src/Generated/Shared/Transfer/DataImporterReaderConfigurationTransfer`
    `DataImporterReportTransfer`classcreated`src/Generated/Shared/Transfer/DataImporterReportTransfer`
    `DataImporterReportMessageTransfer`classcreated`src/Generated/Shared/Transfer/DataImporterReportMessageTransfer`
    `TotalsTransfer`classcreated`src/Generated/Shared/Transfer/TotalsTransfer`
    -{% endinfo_block %} - -### 3) Import Data -#### Import Shipment Methods - -{% info_block infoBox "Info" %} -The following imported entities will be used as shipment methods in Spryker OS. -{% endinfo_block %} - -Prepare your data according to your requirements using our demo data: - -**vendor/spryker/spryker/Bundles/ShipmentDataImport/data/import** - -```yaml -shipment_method_key,store -spryker_dummy_shipment-standard,AT -spryker_dummy_shipment-standard,DE -spryker_dummy_shipment-standard,US -spryker_dummy_shipment-express,AT -spryker_dummy_shipment-express,DE -spryker_dummy_shipment-express,US -spryker_drone_shipment-air_standard,AT -spryker_drone_shipment-air_standard,DE -spryker_drone_shipment-air_standard,US -spryker_drone_shipment-air_sonic,AT -spryker_drone_shipment-air_sonic,DE -spryker_drone_shipment-air_sonic,US -spryker_drone_shipment-air_light,AT -spryker_drone_shipment-air_light,DE -spryker_drone_shipment-air_light,US -spryker_no_shipment,AT -spryker_no_shipment,DE -spryker_no_shipment,US -``` - -| Column | REQUIRED | Data Type | Data Example | Data Explanation | -| --- | --- | --- | --- | --- | -| `shipment_method_key` | mandatory | string | spryker_dummy_shipment-standard | Key of an existing shipping method. | -| `store` | mandatory | string | DE | Name of an existing store. | - -Register the following data import plugins: - -| Plugin | Specification | Prerequisites | Namespace | -| --- | --- | --- | --- | -| `ShipmentDataImportPlugin` | Imports shipment method data into the database. | None | `\Spryker\Zed\ShipmentDataImport\Communication\Plugin` | -| `ShipmentMethodPriceDataImportPlugin` | Imports shipment method price data into the database. | None | `\Spryker\Zed\ShipmentDataImport\Communication\Plugin` | -| `ShipmentMethodStoreDataImportPlugin` | Imports shipment method store data into the database. | None | `\Spryker\Zed\ShipmentDataImport\Communication\Plugin` | - -**src/Pyz/Zed/DataImport/DataImportDependencyProvider.php** -```php -buildImporterConfiguration('shipment.csv', static::IMPORT_TYPE_SHIPMENT); - } - - /** - * @return \Generated\Shared\Transfer\DataImporterConfigurationTransfer - */ - public function getShipmentMethodPriceDataImporterConfiguration(): DataImporterConfigurationTransfer - { - return $this->buildImporterConfiguration('shipment_price.csv', static::IMPORT_TYPE_SHIPMENT_PRICE); - } -} -``` - -Configure shipment GUI module with money and store plugins. - -| Plugin | Specification | Prerequisites | Namespace | -| --- | --- | --- | --- | -| `MoneyCollectionFormTypePlugin` | Represents the money collection fields based on stores, currencies, and price types defined in the system. | None | `Spryker\Zed\Money\Communication\Plugin\Form` | -| `StoreRelationToggleFormTypePlugin` | Represents a store relation toggle form based on stores registered in the system. | None | `Spryker\Zed\Store\Communication\Plugin\Form` | -|`ShipmentTotalCalculatorPlugin`|Calculates shipment total using expenses.|None|`Spryker\Zed\Shipment\Communication\Plugin\Calculation`| - -**src/Pyz/Zed/ShipmentGui/ShipmentGuiDependencyProvider.php** - -```php -
  • You can see the list of shipment methods in the **Back Office > Administration > Shipments > Delivery Methods** section.
  • You can see information about the shipment method in the **Back Office > Administration > Shipments > Delivery Methods > View** section.
  • You can create the shipment method in the **Back Office > Administration > Shipments > Delivery Methods > Create** section.
  • You can edit the shipment method in the **Back Office > Administration > Shipments > Delivery Methods > Edit** section.
  • You can delete the shipment method in the **Back Office > Administration > Shipments > Delivery Methods > Delete** section.
  • -{% endinfo_block %} - -**src/Pyz/Zed/Calculation/CalculationDependencyProvider.php** -```php -`Entity.spy_shopping_list.update`
    `Entity.spy_shopping_list.delete` | -| `spy_shopping_list_item` | `Entity.spy_shopping_list_item.create`
    `Entity.spy_shopping_list_item.update`
    `Entity.spy_shopping_list_item.delete` | -| `spy_shopping_list_company_user` | `Entity.spy_shopping_list_company_user.create`
    `Entity.spy_shopping_list_company_user.update`
    `Entity.spy_shopping_list_company_user.delete` | -| `spy_shopping_list_company_business_unit` | `Entity.spy_shopping_list_company_business_unit.create`
    `Entity.spy_shopping_list_company_business_unit.update`
    `Entity.spy_shopping_list_company_business_unit.delete` | - -**src/Pyz/Zed/ShoppingList/Persistence/Propel/Schema/spy_shopping_list.schema.xml** - -```xml - - - - - - - -
    - - - - - -
    - - - - - -
    - - - - - -
    -
    -``` - -**src/Pyz/Zed/ShoppingListStorage/Persistence/Propel/Schema/spy_shopping_list_customer_storage.schema.xml** - -```xml - - - - - - - -
    -
    -``` - -Run the following commands to apply database changes and generate entity and transfer changes: - -```bash -console transfer:generate -console propel:install -console transfer:generate -``` - -{% info_block warningBox "Verification" %} - -Make sure that the following changes have been applied when checking your database: - -| Database Entity | Type | Event | -| --- | --- | --- | -| `spy_shopping_list` | table | created | -| `spy_shopping_list_item` | table | created | -| `spy_shopping_list_company_user` | table | created | -| `spy_shopping_list_company_business_unit` | table | created| -| `spy_shopping_list_company_business_unit_blacklist` | table | created| -| `spy_shopping_list_customer_storage` | table | created | -| `spy_shopping_list_permission_group` | table | created | -| `spy_shopping_list_permission_group_to_permission` | table | created | -| `spy_shopping_list_item_note` | table | created | - -{% endinfo_block %} - -{% info_block warningBox "Verification" %} - - Make sure that the following changes have been applied in transfer objects: - -| Transfer | Type | Event | Path | -| --- | --- | --- | ---| -| `ShoppingList` | class | created | `src/Generated/Shared/Transfer/ShoppingListTransfer` | -| `ShoppingListCollection` | class | created | `src/Generated/Shared/Transfer/ShoppingListCollectionTransfer` | -| `ShoppingListOverviewRequest` | class | created | `src/Generated/Shared/Transfer/ShoppingListOverviewRequestTransfer` | -| `ShoppingListOverviewResponse` | class | created | `src/Generated/Shared/Transfer/ShoppingListOverviewResponseTransfer` | -| `ShoppingListResponse` | class | created | `src/Generated/Shared/Transfer/ShoppingListResponseTransfer` | -| `ShoppingListCompanyUser` | class | created | `src/Generated/Shared/Transfer/ShoppingListCompanyUserTransfer` | -| `ShoppingListCompanyUserCollection` | class | created | `src/Generated/Shared/Transfer/ShoppingListCompanyUserCollectionTransfer` | -| `ShoppingListCompanyBusinessUnit` | class | created | `src/Generated/Shared/Transfer/ShoppingListCompanyBusinessUnitTransfer` | -| `ShoppingListCompanyBusinessUnitCollection` | class | created | `src/Generated/Shared/Transfer/ShoppingListCompanyBusinessUnitCollectionTransfer` | -| `ShoppingListCustomerStorage` | class | created | `src/Generated/Shared/Transfer/ShoppingListCustomerStorageTransfer` | -| `ShoppingListPermissionGroup` | class | created | `src/Generated/Shared/Transfer/ShoppingListPermissionGroupTransfer` | -| `ShoppingListPermissionGroupCollection` | class | created | `src/Generated/Shared/Transfer/ShoppingListPermissionGroupCollectionTransfer` | -| `ShoppingListAddToCartRequest` | class | created | `src/Generated/Shared/Transfer/ShoppingListAddToCartRequestTransfer` | -| `ShoppingListAddToCartRequestCollection` | class | created | `src/Generated/Shared/Transfer/ShoppingListAddToCartRequestCollectionTransfer` | -| `ShoppingListSession` | class | created | `src/Generated/Shared/Transfer/ShoppingListSessionTransfer` | -| `ShoppingListShareRequest` | class | created | `src/Generated/Shared/Transfer/ShoppingListShareRequestTransfer` | -| `ShoppingListShareResponse` | class | created | `src/Generated/Shared/Transfer/ShoppingListShareResponseTransfer` | -| `ShoppingListDismissRequest` | class | created | `src/Generated/Shared/Transfer/ShoppingListDismissRequestTransfer` | -| `ShoppingListCompanyBusinessUnitBlacklist` | class | created | `src/Generated/Shared/Transfer/ShoppingListCompanyBusinessUnitBlacklistTransfer` | -| `ShoppingListFromCartRequest` | class | created | `src/Generated/Shared/Transfer/ShoppingListFromCartRequestTransfer` | -| `ShoppingListItem` | class | created | `src/Generated/Shared/Transfer/ShoppingListItemTransfer` | -| `ShoppingListItemCollection` | class | created | `src/Generated/Shared/Transfer/ShoppingListItemCollectionTransfer` | -| `ShoppingListItemResponse` | class | created | `src/Generated/Shared/Transfer/ShoppingListItemResponseTransfer` | -| `ShoppingListPreAddItemCheckResponse` | class | created | `src/Generated/Shared/Transfer/ShoppingListPreAddItemCheckResponseTransfer` | -| `ItemCollection` | class | created | `src/Generated/Shared/Transfer/ItemCollectionTransfer` | -| `SpyShoppingListEntity` | class | created | `src/Generated/Shared/Transfer/SpyShoppingListEntityTransfer` | -| `SpyShoppingListCompanyUserEntity` | class | created | `src/Generated/Shared/Transfer/SpyShoppingListCompanyUserEntityTransfer` | -| `SpyShoppingListCompanyBusinessUnit` | class | created | `src/Generated/Shared/Transfer/SpyShoppingListCompanyBusinessUnitTransfer` | -| `SpyShoppingListCompanyBusinessUnitBlacklist` | class | created | `src/Generated/Shared/Transfer/SpyShoppingListItemEntityTransfer` | -| `SpyShoppingListCustomerStorageEntity` | class | created | `src/Generated/Shared/Transfer/SpyShoppingListCustomerStorageEntityTransfer` | -| `SpyShoppingListPermissionGroupEntity` | class | created | `src/Generated/Shared/Transfer/SpyShoppingListPermissionGroupEntityTransfer` | -| `SpyShoppingListPermissionGroupToPermissionEntity` | class | created | `src/Generated/Shared/Transfer/SpyShoppingListPermissionGroupToPermissionEntityTransfer` | -| `SpyShoppingListItemEntity` | class | created | `src/Generated/Shared/Transfer/SpyShoppingListItemEntityTransfer` | -| `SpyShoppingListItemNoteEntity` | class | created | `src/Generated/Shared/Transfer/SpyShoppingListItemEntityTransfer` | - - -{% endinfo_block %} - -{% info_block warningBox "Verification" %} - -Make sure that the changes were implemented successfully. For this purpose, trigger the following methods and make sure that the above events have been triggered: - -| Path | Method name | -| --- | --- | -| `src/Orm/Zed/ShoppingList/Persistence/Base/SpyShoppingList.php` | `prepareSaveEventName()`
    `addSaveEventToMemory()`
    `addDeleteEventToMemory()` | -| `src/Orm/Zed/ShoppingList/Persistence/Base/SpyShoppingListItem.php` | `prepareSaveEventName()`
    `addSaveEventToMemory()`
    `addDeleteEventToMemory()` | -| `src/Orm/Zed/ShoppingList/Persistence/Base/SpyShoppingListCompanyUser.php` | `prepareSaveEventName()`
    `addSaveEventToMemory()`
    `addDeleteEventToMemory()` | -| `src/Orm/Zed/ShoppingList/Persistence/Base/SpyShoppingList.php` | `prepareSaveEventName()`
    `addSaveEventToMemory()`
    `addDeleteEventToMemory()` | - - -{% endinfo_block %} - -### 3) Add Translations -Append a glossary for the feature: - -**src/data/import/glossary.csv** - -```yaml -customer.account.shopping_list.item.add.success,Item %sku% was added to the List.,en_US -customer.account.shopping_list.item.add.success,Artikel %sku% wurde zu der Liste hinzugefügt.,de_DE -customer.account.shopping_list.item.add.failed,Item %sku% could not be added to the List.,en_US -customer.account.shopping_list.item.add.failed,Artikel %sku% konnte der Liste nicht hinzugefügt werden.,de_DE -customer.account.shopping_list.create.success,"List '%name%' was created successfully.",en_US -customer.account.shopping_list.create.success,"Einkaufsliste '%name%' wurde erfolgreich erstellt.",de_DE -customer.account.shopping_list.error.cannot_update,Cannot update shopping list.,en_US -customer.account.shopping_list.error.cannot_update,Die Liste konnte nicht aktualisiert werden.,de_DE -customer.account.shopping_list.share.share_shopping_list_fail,This shopping list has been shared before with this entity,en_US -customer.account.shopping_list.share.share_shopping_list_fail,Diese Einkaufsliste wurde bereits mit dieser Entität geteilt,de_DE -customer.account.shopping_list.quick_add,"Quick add",en_US -customer.account.shopping_list.quick_add,"Schnell hinzufügen",de_DE -customer.account.shopping_list.quick_add.submit,Add,en_US -customer.account.shopping_list.quick_add.submit,Hinzufügen,de_DE -customer.account.shopping_list_item.error.product_not_active,Product is not active.,en_US -customer.account.shopping_list_item.error.product_not_active,Produkt ist nicht aktiv,de_DE -``` - -Run the following console command to import data: - -```bash -console data:import glossary -``` - -{% info_block warningBox "Verification" %} -Make sure that in the database the configured data is added to the `spy_glossary` table. -{% endinfo_block %} - -### 4) Configure Export to Redis -This step will publish tables on change (create, edit, delete) to the `spy_shopping_list_storage` and synchronize the data to Storage. - -#### Set up Event Listeners - -| Plugin | Specification | Prerequisites | Namespace | -| --- | --- | --- | --- | -| `ShoppingListStorageEventSubscriber` | Registers listeners that are responsible for publishing shopping list data based on changes to shopping lists or related entities. | None | `Spryker\Zed\ShoppingListStorage\Communication\Plugin\Event\Subscriber` | - -**src/Pyz/Zed/Event/EventDependencyProvider.php** - -```php -add(new ShoppingListStorageEventSubscriber()); - - return $eventSubscriberCollection; - } -} -``` - -Register synchronization queue and synchronization error queue: - -**src/Pyz/Client/RabbitMq/RabbitMqConfig.php** - -```php -append($this->createQueueOption(ShoppingListStorageConfig::SHOPPING_LIST_SYNC_STORAGE_QUEUE, ShoppingListStorageConfig::SHOPPING_LIST_SYNC_STORAGE_ERROR_QUEUE)); - - return $queueOptionCollection; - } - - /** - * @param string $queueName - * @param string $errorQueueName - * @param string $routingKey - * - * @return \Generated\Shared\Transfer\RabbitMqOptionTransfer - */ - protected function createQueueOption($queueName, $errorQueueName, $routingKey = 'error') - { - $queueOptionTransfer = new RabbitMqOptionTransfer(); - $queueOptionTransfer - ->setQueueName($queueName) - ->setDurable(true) - ->setType('direct') - ->setDeclarationType(Connection::RABBIT_MQ_EXCHANGE) - ->addBindingQueueItem($this->createQueueBinding($queueName)) - ->addBindingQueueItem($this->createErrorQueueBinding($errorQueueName, $routingKey)); - - return $queueOptionTransfer; - } - - /** - * @param string $queueName - * - * @return \Generated\Shared\Transfer\RabbitMqOptionTransfer - */ - protected function createQueueBinding($queueName) - { - $queueOptionTransfer = new RabbitMqOptionTransfer(); - $queueOptionTransfer - ->setQueueName($queueName) - ->setDurable(true) - ->setNoWait(false) - ->addRoutingKey(''); - - return $queueOptionTransfer; - } - - /** - * @param string $errorQueueName - * @param string $routingKey - * - * @return \Generated\Shared\Transfer\RabbitMqOptionTransfer - */ - protected function createErrorQueueBinding($errorQueueName, $routingKey) - { - $queueOptionTransfer = new RabbitMqOptionTransfer(); - $queueOptionTransfer - ->setQueueName($errorQueueName) - ->setDurable(true) - ->setNoWait(false) - ->addRoutingKey($routingKey); - - return $queueOptionTransfer; - } -} -``` - -#### Configure Message Processors - -| Plugin | Specification | Prerequisites | Namespace | -| --- | --- | --- | --- | -| `SynchronizationStorageQueueMessageProcessorPlugin` | Configures all Shopping List messages to sync with Redis storage, and marks messages as failed in case of error. | None | `Spryker\Zed\Synchronization\Communication\Plugin\Queue` | - -**src/Pyz/Zed/Queue/QueueDependencyProvider.php** - -```php - new SynchronizationStorageQueueMessageProcessorPlugin(), - ]; - } -} -``` - -#### Add Synchronization Plugins - -| Plugin | Specification | Prerequisites | Namespace | -| --- | --- | --- | --- | -| `ShoppingListSynchronizationDataPlugin` | Allows populating empty storage table with data. | None | `Spryker\Zed\ShoppingListStorage\Communication\Plugin\Synchronization` | - -**src/Pyz/Zed/Synchronization/SynchronizationDependencyProvider.php** - -```php -(hint: `CompanyUser.CustomerTransferCompanyUserExpanderPlugin`) | `Spryker\Zed\ShoppingList\Communication\Plugin` | -| `ShoppingListItemProductConcreteActiveAddItemPreCheckPlugin` | Checks if the product concrete within the shopping list item is active. | None) | `Spryker\Zed\ShoppingList\Communication\Plugin` | -| `ShoppingListItemNoteToItemCartNoteMapperPlugin` | Maps shopping list item notes to cart item notes when creating a cart out of a shopping list. | None | `Spryker\Client\ShoppingListNote\Plugin` | -| `ItemCartNoteToShoppingListItemNoteMapperPlugin` | Maps cart item notes to shopping list notes when creating shopping list out of a cart. | None | `Spryker\Zed\ShoppingListNote\Communication\Plugin` | -| `ShoppingListItemNoteBeforeDeletePlugin` | Deletes a shopping list item note before deleting a shopping list item. | None | `Spryker\Zed\ShoppingListNote\Communication\Plugin` | -| `ShoppingListItemNoteExpanderPlugin` |Expands `ShoppingListItemTransfer` with `ShoppingListItemNoteTransfer`. | None | `Spryker\Zed\ShoppingListNote\Communication\Plugin` | -| `ShoppingListItemNotePostSavePlugin` |Saves a shopping list item note when saving a shopping list item. | None | `Spryker\Zed\ShoppingListNote\Communication\Plugin` | -| `ShoppingListCollectionOutdatedPlugin` |Used to determine if the shopping list collection needs to be updated, according to the last update date. | None | `Spryker\Zed\ShoppingListNote\Communication\Plugin` | - -**src/Pyz/Client/Permission/PermissionDependencyProvider.php** - -```php - -src/data/import/glossary.csv - -```yaml -customer.account.shopping_list.overview.edit,Edit,en_US -customer.account.shopping_list.overview.edit,Bearbeiten,de_DE -shopping_list.item_note,Note:,en_US -shopping_list.item_note,Hinweis:,de_DE -shopping_list.item_note.add,"Add a note +",en_US -shopping_list.item_note.add,"Füg ein Notiz hinzu +",de_DE -customer.account.shopping_list.overview.share,Share,en_US -customer.account.shopping_list.overview.share,Teilen,de_DE -customer.account.shopping_list.overview.print,Print,en_US -customer.account.shopping_list.overview.print,Drucken,de_DE -customer.account.shopping_list.overview.delete,Delete,en_US -customer.account.shopping_list.overview.delete,Löschen,de_DE -customer.account.shopping_list.overview.owner,Owner,en_US -customer.account.shopping_list.overview.owner,Inhaber,de_DE -customer.account.shopping_list.access,Access,en_US -customer.account.shopping_list.access,Zugriff,de_DE -company.account.company_user,Users,en_US -company.account.company_user,Benutzer,de_DE -customer.account.shopping_list.delete.warning,Warning,en_US -customer.account.shopping_list.delete.warning,Warnung,de_DE -customer.account.shopping_list.delete.you_are_trying_to_delete_shopping_list,"You are trying to delete shopping list %name%",en_US -customer.account.shopping_list.delete.you_are_trying_to_delete_shopping_list,"Sie versuchen die Einkaufsliste%name% zu löschen",de_DE -customer.account.shopping_list.delete.it_belongs_to_follow,It belongs to following,en_US -customer.account.shopping_list.delete.it_belongs_to_follow,Es gehört zu folgenden,de_DE -company.account.business_unit,Business Units,en_US -company.account.business_unit,Geschäftseinheiten,de_DE -customer.account.shopping_list.delete.it_wll_be_deleted_from_all_of_them,It will be deleted from all of them,en_US -customer.account.shopping_list.delete.it_wll_be_deleted_from_all_of_them,Es wird von allen gelöscht,de_DE -customer.account.shopping_list.overview.name,Name,en_US -customer.account.shopping_list.overview.name,Name,de_DE -customer.account.shopping_list.overview.created_date,Date of creation,en_US -customer.account.shopping_list.overview.created_date,Erstelldatum,de_DE -customer.account.shopping_list.overview.item_count,Number of Items,en_US -customer.account.shopping_list.overview.item_count,Anzahl der Teile,de_DE -customer.account.shopping_list.overview.actions,Actions,en_US -customer.account.shopping_list.overview.actions,Aktion,de_DE -customer.account.shopping_list.overview.add_shopping_list_to_cart,Add selected to,en_US -customer.account.shopping_list.overview.add_shopping_list_to_cart,Hinzufügen zu,de_DE -customer.account.shopping_list.product,Product,en_US -customer.account.shopping_list.product,Produkt,de_DE -customer.account.shopping_list.price,Price,en_US -customer.account.shopping_list.price,Preis,de_DE -customer.account.shopping_list.quantity,Quantity,en_US -customer.account.shopping_list.quantity,Anzahl,de_DE -customer.account.shopping_list.availability,Availability,en_US -customer.account.shopping_list.availability,Verfügbarkeit,de_DE -product_alternative_widget.not_applicable,N/A,en_US -product_alternative_widget.not_applicable,N/A,de_DE -customer.account.shopping_list.available,Available,en_US -customer.account.shopping_list.available,Verfügbar,de_DE -customer.account.shopping_list.not_available,Currently not available,en_US -customer.account.shopping_list.not_available,Nicht verfügbar,de_DE -customer.account.shopping_list.remove,Remove,en_US -customer.account.shopping_list.remove,Löschen,de_DE -customer.account.shopping_list.permissions.FULL_ACCESS,Full access,en_US -customer.account.shopping_list.permissions.FULL_ACCESS,Voller Zugriff,de_DE -customer.account.shopping_list.permissions.READ_ONLY,Read only,en_US -customer.account.shopping_list.permissions.READ_ONLY,Schreibgeschützt,de_DE -customer.account.shopping_list.permissions.NO_ACCESS,No access,en_US -customer.account.shopping_list.permissions.NO_ACCESS,Kein Zugriff,de_DE -customer.account.shopping_list,Shopping lists,en_US -customer.account.shopping_list,Einkaufslisten,de_DE -customer.account,Customer Account,en_US -customer.account,Mein Konto,de_DE -customer.account.shopping_list.create_from_cart.title,Add to shopping list,en_US -customer.account.shopping_list.create_from_cart.title,Auf die Merkliste,de_DE -customer.account.shopping_list.shopping_cart,Shopping cart,en_US -customer.account.shopping_list.shopping_cart,Einkaufswagen,de_DE -customer.account.shopping_list.create_from_cart.form_title,'%cart_name%' add to shopping list,en_US -customer.account.shopping_list.create_from_cart.form_title,'%cart_name%' auf die Merkliste,de_DE -customer.account.shopping_list.share.from.share,Share,en_US -customer.account.shopping_list.share.from.share,Teilen,de_DE -customer.account.shopping_list.share.from.share_with,Share Shopping List with:,en_US -customer.account.shopping_list.share.from.share_with,Einkaufsliste teilen mit:,de_DE -customer.account.shopping_list.share.select_company_business_unit,Select business unit,en_US -customer.account.shopping_list.share.select_company_business_unit,Wählen Sie die Geschäftseinheit aus,de_DE -customer.account.shopping_list.share.select_company_user,Select user,en_US -customer.account.shopping_list.share.select_company_user,Benutzer wählen,de_DE -customer.account.print_shopping_list.title.shopping_list_id,Shopping List ID,en_US -customer.account.print_shopping_list.title.shopping_list_id,Einkaufslisten-ID,de_DE -customer.account.print_shopping_list.title.shopping_list_name,Shopping List Name,en_US -customer.account.print_shopping_list.title.shopping_list_name,Name der Einkaufsliste,de_DE -customer.account.print_shopping_list.table.barcode,Barcode,en_US -customer.account.print_shopping_list.table.barcode,Barcode,de_DE -customer.account.print_shopping_list.table.product_sku,Product SKU,en_US -customer.account.print_shopping_list.table.product_sku,Produkt Artikelnummer,de_DE -customer.account.print_shopping_list.table.product_name,Product name,en_US -customer.account.print_shopping_list.table.product_name,Produktname,de_DE -customer.account.print_shopping_list.table.default_price,Default price,en_US -customer.account.print_shopping_list.table.default_price,Standardpreis,de_DE -customer.account.print_shopping_list.table.note,Note,en_US -customer.account.print_shopping_list.table.note,Notiz,de_DE -customer.account.shopping_list.print_shopping_list,Print,en_US -customer.account.shopping_list.print_shopping_list,Drucken,de_DE -customer.account.shopping_list.add_selected_items_to_cart,Add selected items to cart,en_US -customer.account.shopping_list.add_selected_items_to_cart,Ausgewählte Artikel in den Warenkorb legen,de_DE -customer.account.shopping_list.add_all_available_to_cart,Add all available products to cart,en_US -customer.account.shopping_list.add_all_available_to_cart,Alle Produkte zum Warenkorb hinzufügen,de_DE -customer.account.shopping_list.empty,Currently there are no items in your shopping list.,en_US -customer.account.shopping_list.empty,Zurzeit ist kein Produkt auf deiner Einkaufsliste.,de_DE -customer.account.shopping_list.overview.dismiss,Dismiss,en_US -customer.account.shopping_list.overview.dismiss,Ablehnen,de_DE -customer.account.shopping_list.overview.warning,Warning,en_US -customer.account.shopping_list.overview.warning,Warnung,de_DE -shopping_list_page.dismiss_confirmation.trying_to_dismiss,"Are you sure that you what to dismiss shopping list?",en_US -shopping_list_page.dismiss_confirmation.trying_to_dismiss,"Sind Sie sicher, dass Sie den Einkaufsliste ablehnen wollen?",de_DE -shopping_list_page.dismiss.failed,Shopping list was not dismissed.,en_US -shopping_list_page.dismiss.failed,Einkaufsliste wurde nicht abgelehnt,de_DE -shopping_list_page.dismiss.success,Shopping list was dismissed successfully.,en_US -shopping_list_page.dismiss.success,"Einkaufsliste wurde erfolgreich abgelehnt.",de_DE -general.cancel.button,Cancel,en_US -general.cancel.button,Abbrechen,de_DE -customer.account.shopping_list.overview.add_new,Add new shopping list,en_US -customer.account.shopping_list.overview.add_new,Neue Einkaufsliste hinzufügen,de_DE -forms.submit-btn,Submit,en_US -forms.submit-btn,Speichern,de_DE -general.back.button,Back,en_US -general.back.button,Zurück,de_DE -shopping_list.cart.items_add.success,Items were added to the List,en_US -shopping_list.cart.items_add.success,Artikel wurden zu der Liste hinzugefügt,de_DE -shopping_list.cart.items_add.failed,Items could not be added to the List,en_US -shopping_list.cart.items_add.failed,Artikel konnten der Liste nicht hinzugefügt werden,de_DE -customer.account.shopping_list.item.remove.success,Product removed successfully.,en_US -customer.account.shopping_list.item.remove.success,Produkt erfolgreich entfernt.,de_DE -customer.account.shopping_list.item.remove.failed,Product was not removed from shopping list.,en_US -customer.account.shopping_list.item.remove.failed,Artikel wurde nicht von der Einkaufsliste entfernt,de_DE -customer.account.shopping_list.item.added_to_cart.failed,Item was not added to cart.,en_US -customer.account.shopping_list.item.added_to_cart.failed,Produkt konnte nicht in den Warenkorb gelegt werden.,de_DE -customer.account.shopping_list.item.added_to_cart,Item added to cart successfully.,en_US -customer.account.shopping_list.item.added_to_cart,Produkt erfolgreich in den Warenkorb gelegt.,de_DE -customer.account.shopping_list.item.added_all_available_to_cart.failed,Not all items are added to cart successfully,en_US -customer.account.shopping_list.item.added_all_available_to_cart.failed,Nicht alle Artikel konnten erfolgreich in den Warenkorb gelegt werden.,de_DE -customer.account.shopping_list.item.added_all_available_to_cart,Available items added to cart successfully.,en_US -customer.account.shopping_list.item.added_all_available_to_cart,Verfügbare Produkte wurden erfolgreich in den Warenkorb gelegt.,de_DE -customer.account.shopping_list.item.select_item,At least one product should be selected.,en_US -customer.account.shopping_list.item.select_item,Mindestens ein Produkt sollte ausgewählt werden.,de_DE -customer.account.shopping_list.delete.success,Shopping list deleted successfully.,en_US -customer.account.shopping_list.delete.success,Einkaufsliste erfolgreich gelöscht.,de_DE -customer.account.shopping_list.delete.failed,Shopping list was not deleted.,en_US -customer.account.shopping_list.delete.failed,Einkaufsliste konnte nicht gelöscht.,de_DE -shopping_list_page.dismiss.failed,Shopping list was not dismissed.,en_US -shopping_list_page.dismiss.failed,Einkaufsliste wurde nicht abgelehnt,de_DE -shopping_list_page.dismiss.success,Shopping list was dismissed successfully.,en_US -shopping_list_page.dismiss.success,"Einkaufsliste wurde erfolgreich abgelehnt.",de_DE -customer.account.shopping_list.updated,Shopping list updated successfully,en_US -customer.account.shopping_list.updated,Einkaufsliste erfolgreich aktualisiert.,de_DE -customer.account.shopping_list.items.added_to_cart.not_found,There are no products available for adding to cart.,en_US -customer.account.shopping_list.items.added_to_cart.not_found,Es sind keine Produkte zum Hinzufügen in den Warenkorb verfügbar.,de_DE -customer.account.shopping_list.items.added_to_cart.failed,Items were not added to cart.,en_US -customer.account.shopping_list.items.added_to_cart.failed,Produkte konnten nicht in den Warenkorb gelegt werden.,de_DE -customer.account.shopping_list.items.added_to_cart,Items added to cart successfully.,en_US -customer.account.shopping_list.items.added_to_cart,Produkte erfolgreich in den Warenkorb gelegen.,de_DE -customer.account.shopping_list.share.share_shopping_list_successful,Sharing shopping list was successful,en_US -customer.account.shopping_list.share.share_shopping_list_successful,Einkaufsliste wurde erfolgreich geteilt,de_DE -customer.account.shopping_list.clear.success,Shopping list was successfully cleared.,en_US -customer.account.shopping_list.clear.success,Einkaufsliste wurde erfolgreich gelöscht.,de_DE -customer.account.shopping_list.share.error.one_id_required,Please choose either customer or business unit to share the shopping list with,en_US -customer.account.shopping_list.share.error.one_id_required,"Bitte wählen Sie entweder einen Kunden oder eine Geschäftseinheit aus, mit welchem Sie die Einkaufsliste teilen möchten.",de_DE -cart.add-to-shopping-list.form.add_new,Add new shopping list,en_US -cart.add-to-shopping-list.form.add_new,Einkaufsliste erstellen,de_DE -cart.add-to-shopping-list.form.placeholder,Enter name of a new shopping list,en_US -cart.add-to-shopping-list.form.placeholder,Geben Sie den Namen einer neuen Einkaufsliste ein,de_DE -cart.add-to-shopping-list.form.error.empty_name,"Please, enter shopping list name",en_US -cart.add-to-shopping-list.form.error.empty_name,Bitte geben Sie den Namen der Einkaufsliste ein,de_DE -customer.account.shopping_list.create_from_cart.choose_shopping_list,Choose shopping list,en_US -customer.account.shopping_list.create_from_cart.choose_shopping_list,Wählen Sie die Einkaufsliste,de_DE -customer.account.shopping_list.create_from_cart.name,Name,en_US -customer.account.shopping_list.create_from_cart.name,Name,de_DE -customer.account.shopping_list.item.not_added,Failed to add product to shopping list.,en_US -customer.account.shopping_list.item.not_added,Hinzufügen zur Einkaufsliste fehlgeschlagen.,de_DE -widget.shopping_list.multi_cart.to_shopping_list,To shopping list,en_US -widget.shopping_list.multi_cart.to_shopping_list,Zur Einkaufsliste,de_DE -shopping_list_widget.items,Items,en_US -shopping_list_widget.items,Artikel,de_DE -shopping_list_widget.full_access,Full access,en_US -shopping_list_widget.full_access,Ohne Einschränkung,de_DE -shopping_list_widget.read_only,Read only,en_US -shopping_list_widget.read_only,Schreibgeschützt,de_DE -widget.shopping_list.multi_cart.to_shopping_list,To shopping list,en_US -widget.shopping_list.multi_cart.to_shopping_list,Zur Einkaufsliste,de_DE -shopping_list.item_quantity,Anzahl,de_DE -shopping_list.item_quantity,Quantity,en_US -page.detail.add-to-shopping-list,Add to Shopping list,en_US -page.detail.add-to-shopping-list,In die Einkaufsliste,de_DE -shopping_list.shopping_list,Shopping list,en_US -shopping_list.shopping_list,Einkaufsliste,de_DE -shopping_list.no_lists_created,You do not have any shopping lists yet.,en_US -shopping_list.no_lists_created,Du hast noch keine Einkaufslisten.,de_DE -shopping_list.create_new_list,Create new list,en_US -shopping_list.create_new_list,Erstelle eine neue Liste,de_DE -product_quick_add_widget.form.quantity,"# Qty",en_US -product_quick_add_widget.form.quantity,"# Anzahl",de_DE -product_quick_add_widget.form.error.quantity.required,"Quantity must be at least 1",en_US -product_quick_add_widget.form.error.quantity.required,"Die Anzahl muss mindestens 1 sein",de_DE -product_quick_add_widget.form.error.quantity.max_value_constraint,"Provided quantity is too high",en_US -product_quick_add_widget.form.error.quantity.max_value_constraint,"Die Menge ist leider zu groß",de_DE -product_quick_add_widget.form.error.redirect_route_empty,"Redirect router should not be empty",en_US -product_quick_add_widget.form.error.redirect_route_empty,"Redirect Router kann nicht leer sein",de_DE -product_quick_add_widget.form.error.sku.empty,"SKU should not be empty",en_US -product_quick_add_widget.form.error.sku.empty,"SKU kann nicht leer sein",de_DE -``` - - -Run the following console command to import data: - -```bash -console data:import glossary -``` - -{% info_block warningBox "Verification" %} -Make sure that in the database the configured data is added to the `spy_glossary` table. -{% endinfo_block %} - -### 3) Set up Widgets -Enable global widgets: - -| Widget | Description | Namespace | -| --- | --- | --- | -| `ShoppingListNavigationMenuWidget` | Shows a top-navigation sub-menu containing all of the current logged-in customer Shopping Lists. | `SprykerShop\Yves\ShoppingListWidget\Widget` | -| `ShoppingListMenuItemWidget` | Shows customer Shopping Lists in the customer account navigation side menu. | `SprykerShop\Yves\ShoppingListWidget\Widget` | -| `AddToShoppingListWidget` | Allows a customer to be able to add a product with an SKU to one of the Shopping Lists they have write access to. | `SprykerShop\Yves\ShoppingListWidget\Widget` | -| `ShoppingListItemNoteWidget` | Allows a customer to create/save/remove notes from the Shopping List items. | `SprykerShop\Yves\ShoppingListNoteWidget\Widget` | -| `ShoppingListDismissWidget` | Allows a customer to dismiss the Shopping List that was shared. | `SprykerShop\Yves\ShoppingListPage\Widget` | -| `ShoppingListSubtotalWidget` | Allows a customer to see the Shopping List subtotal price. | `SprykerShop\Yves\ShoppingListWidget\Widget` | - -**src/Pyz/Yves/ShopApplication/ShopApplicationDependencyProvider.php** - -```php - -src/Pyz/Client/ShoppingList/ShoppingListDependencyProvider.php - -```php - - - -{% info_block warningBox "Verification" %} -Add an item with a product option to a shopping list, make sure that the corresponding table row has been created in `spy_shopping_list_product_option`. -{% endinfo_block %} -{% info_block warningBox "Verification" %} -Make sure that when creating a cart from a shopping list, the product options are transferred to cart. The other way around should also work, having a cart with an item with product options in it, when creating a shopping list out of should contain the selected product options. -{% endinfo_block %} - -## Install feature frontend -### Prerequisites -Please review and install the necessary features before beginning the integration step. -|Name|Version| -|---|---| -|Spryker Core |master| -|Product Options|master| - -### 1) Add Translations -Append glossary according to your configuration: - -**src/data/import/glossary.csv** - -```yaml -customer.account.shopping_list.remove_all,Remove all,en_US -customer.account.shopping_list.remove_all,Alles entfernen,de_DE -``` - -Run the following console command to import data: - -```yaml -console data:import glossary -``` -{% info_block warningBox "Verification" %} -Make sure that in the database the configured data are added to the `spy_glossary` table. -{% endinfo_block %} - -### 2) Set up Behavior - -Enable the following behaviors by registering the plugins: -|Plugin|Specification|Prerequisites|Namespace| -|---|---|---|---| -|`ShoppingListItemProductOptionFormExpanderPlugin`|Provides the ability to expand the Shopping List Item Form with a Product Option form elements.|None|`SprykerShop\Yves\ProductOptionWidget\Plugin\ShoppingListPage`| -|`ShoppingListItemProductOptionFormDataProviderMapperPlugin`|Provides the ability to populate the Shopping List Form Item with product option data.|None|`SprykerShop\Yves\ProductOptionWidget\Plugin\ShoppingListPage`| - -
    -src/Pyz/Yves/ShoppingListPage/ShoppingListPageDependencyProvider.php - -```php - - -{% info_block warningBox "Verification" %} -Make sure that items with product options attached to them have the drop-down menu of product options next to them in shopping list. Also, make sure that the saved product option is the one that is saved on page reload. -{% endinfo_block %} - -### 3) Set up Widgets -Run the following command to enable Javascript and CSS changes: - -```yaml -console frontend:yves:build -``` -{% info_block warningBox "Verification" %} -Make sure that the following UI components were correctly integrated: -{% endinfo_block %} -|Module|Test| -|---|---| -|`ShoppingLisPage`|Add a product with product options to a shopping list, then verify if on shopping list page the product option appears.| diff --git a/docs/scos/dev/feature-integration-guides/202005.0/spryker-core-back-office-feature-integration.md b/docs/scos/dev/feature-integration-guides/202005.0/spryker-core-back-office-feature-integration.md deleted file mode 100644 index 0e00a03c916..00000000000 --- a/docs/scos/dev/feature-integration-guides/202005.0/spryker-core-back-office-feature-integration.md +++ /dev/null @@ -1,309 +0,0 @@ ---- -title: Spyker Core Back Office feature integration -description: Learn how to add the Translation functionality to the basic Back Office feature. This guide provides step-by-step instructions for the integration process. -last_updated: Apr 24, 2020 -template: feature-integration-guide-template -originalLink: https://documentation.spryker.com/v5/docs/back-office-feature-integration -originalArticleId: 9f4f772d-5c79-47dc-9e31-84158660ed58 -redirect_from: - - /v5/docs/back-office-feature-integration - - /v5/docs/en/back-office-feature-integration ---- - -## Install feature API -### Prerequisites -Ensure that the related features have been installed: - -| Name | Version | -| --- | --- | -| Spryker Core | master | - -### 1) Install the required modules using Composer -Run the following command(s) to install the required modules: - -```bash -composer require spryker-feature/spryker-core: "^master" --update-with-dependencies -``` - -{% info_block warningBox "Verification" %} -Make sure that the following modules were installed:
    ModuleExpected Directory
    `Translator``vendor/spryker/translator`
    `UserLocale``vendor/spryker/user-locale`
    `UserLocaleGui``vendor/spryker/user-locale-gui`
    `MessengerExtension``vendor/spryker/messenger-extension`
    -{% endinfo_block %} - - -### 2) Set up Transfer Objects - -Run the following command to generate transfers: - -```bash -console transfer:generate -``` - -{% info_block warningBox "Verification" %} -Make sure that the following transfers have been created:
    Transfer TypeEventPath
    `UserTransfer.fkLocale`attributecreated`src/Generated/Shared/Transfer/UserTransfer`
    `UserTransfer.localName`attributecreated`src/Generated/Shared/Transfer/UserTransfer`
    `TranslationTransfer`classcreated`src/Generated/Shared/Transfer/TranslationTransfer`
    `KeyTranslationTransfer`classcreated`src/Generated/Shared/Transfer/KeyTranslationTransfer`
    -{% endinfo_block %} - -### 3) Set up Configuration -Add the following configuration to your project: - -| Configuration | Specification | Namespace | -| --- | --- | --- | -| `TranslatorConstants::TRANSLATION_ZED_FALLBACK_LOCALES` | Fallback locales that are used if there is no translation for a selected locale. | `Spryker\Shared\Translator` | -| `TranslatorConstants::TRANSLATION_ZED_CACHE_DIRECTORY` | Absolute path to a translation cache directory. E.g. `var/www/data/DE/cache/Zed/translation`. | `Spryker\Shared\Translator` | -| `TranslatorConstants::TRANSLATION_ZED_FILE_PATH_PATTERNS` | Paths to project level translations. A glob pattern can be used. | `Spryker\Shared\Translator` | - -**config/Shared/config_default.php** - -```php - ['en_US'], -]; -$config[TranslatorConstants::TRANSLATION_ZED_CACHE_DIRECTORY] = sprintf( - '%s/data/%s/cache/Zed/translation', - APPLICATION_ROOT_DIR, - $CURRENT_STORE -); -$config[TranslatorConstants::TRANSLATION_ZED_FILE_PATH_PATTERNS] = [ - APPLICATION_ROOT_DIR . '/data/translation/Zed/*/[a-z][a-z]_[A-Z][A-Z].csv', -]; -``` - -{% info_block warningBox "Verification" %} -Having finished the feature integration, make sure that:
    • The missing translations of the language which has a configured fallback are translated accordingly.
    • Translation cache is stored in the configured directory.
    • Translations are located according to the configured file path pattern.
    -{% endinfo_block %} - -### 3) Set up Behavior - -#### Set up Translation Across Spryker - -Activate the following plugins: - -| Plugin |Specification |Prerequisites | Namespace | -| --- | --- | --- | --- | -| `TranslatorInstallerPlugin` | Cleans and generates new translation cache. | None | `Spryker\Zed\Translator\Communication\Plugin\TranslatorInstallerPlugin` | -| `TranslationPlugin` | Translates messages. | None | `Spryker\Zed\Translator\Communication\Plugin\Messenger\TranslationPlugin` | -| `ZedTranslatorPlugin` | Extends Application with Translator instance. | None | `Spryker\Zed\Translator\Communication\Plugin\Application\ZedTranslatorPlugin` | -| `UserLocalePlugin` | Replaces default Application locale with User Locale. | None | `Spryker\Zed\UserLocale\Communication\Plugin\Application\UserLocalePlugin` | -| `AssignUserLocalePreSavePlugin` | Expands `UserTransfer` with `Locale Id` and `Locale Name`. | None | `Spryker\Zed\UserLocale\Communication\Plugin\User\AssignUserLocalePreSavePlugin` | -| `UserLocaleTransferExpanderPlugin` | Expands `UserTransfer` with `Locale Id` and `Locale Name`. | None | `Spryker\Zed\UserLocale\Communication\Plugin\User\UserLocaleTransferExpanderPlugin` | -| `UserLocaleFormExpanderPlugin` | Anonymizes customer data during customer anonymization. | None | `Spryker\Zed\UserLocaleGui\Communication\Plugin\UserLocaleFormExpanderPlugin` | - -**src/Pyz/Zed/Installer/InstallerDependencyProvider.php** - -```php -
  • the command has cleaned previous translation cache information in the translation folder that is `data/{YourStore}/cache/Zed/translation`, by default.
  • the command has generated translator cache files like `catalogue.{your_locale}.{randomString}.php` and `catalogue.{your_locale}.{randomString}.php.meta` in `data/{YourStore}/cache/Zed/translation` which is the default folder.
  • -{% endinfo_block %} - -**src/Pyz/Zed/Messenger/MessengerDependencyProvider.php** - -```php -1. Log into back office.
    2. Go to the *User Control>User* section.
    3. Click **Add New User**.
    4. Check that the **Interface language*** field is available on the *Create new User* page. -{% endinfo_block %} - -#### Set Up Console Commands - -| Command | Specification | Prerequisites | Namespace | -| --- | --- | --- | --- | -| `CleanTranslationCacheConsole` | Cleans translation cache for Zed. | None | `Spryker\Zed\Translator\Communication\Console\CleanTranslationCacheConsole` | -| `GenerateTranslationCacheConsole` | Generates new translation cache for Zed. | None | `Spryker\Zed\Translator\Communication\Console\GenerateTranslationCacheConsole` | - -**src\Pyz\Zed\Console\ConsoleDependencyProvider** - -```php -store("secret_category", "secret_id", $secret); - -assertSame($secret, $vaultFacade->retrieve("secret_category", "secret_id")); -``` - -{% endinfo_block %} - - - -#### Redis -Add the configuration to your project: - -| Deprecated | Specification | Replaced by | -| --- | --- | --- | -| `SessionRedisConstants::LOCKING_TIMEOUT_MILLISECONDS` | Defines Redis lock timeout in milliseconds. | `Spryker\Shared\SessionRedis` | -| `SessionRedisConstants::LOCKING_RETRY_DELAY_MICROSECONDS` | Defines the retry delay between the attempts to acquire Redis lock in microseconds. | `Spryker\Shared\SessionRedis` | -| `SessionRedisConstants::LOCKING_LOCK_TTL_MILLISECONDS` | Defines the time to live for Redis lock in milliseconds. | `Spryker\Shared\SessionRedis` | -| `SessionFileConstants::ZED_SESSION_FILE_PATH` | Defines the filesystem path for storing Zed sessions. | `Spryker\Shared\SessionFile` | -| `SessionRedisConstants::ZED_SESSION_REDIS_PROTOCOL` | Defines the protocol used while connecting to Redis as Zed session storage. | `Spryker\Shared\SessionRedis` | -| `SessionRedisConstants::ZED_SESSION_REDIS_PASSWORD` | Defines the password used while connecting to Redis as Zed session storage. | `Spryker\Shared\SessionRedis` | -| `SessionRedisConstants::ZED_SESSION_REDIS_HOST` | Defines the host used while connecting to Redis as Zed session storage. | `Spryker\Shared\SessionRedis` | -| `SessionRedisConstants::ZED_SESSION_REDIS_PORT` | Defines the protocol used while connecting to Redis as Zed session storage. | `Spryker\Shared\SessionRedis` | -| `SessionRedisConstants::ZED_SESSION_REDIS_DATABASE` | Defines the database used while connecting to Redis as Zed session storage. | `Spryker\Shared\SessionRedis` | -| `SessionRedisConstants::ZED_SESSION_REDIS_DATA_SOURCE_NAMES` | Defines the list of DSNs used while connecting to Redis as Zed session storage in replication mode. | `Spryker\Shared\SessionRedis` | -| `SessionRedisConstants::ZED_SESSION_REDIS_CLIENT_OPTIONS` | Defines the list of client options used while connecting to Redis as Zed session storage in replication mode. | `Spryker\Shared\SessionRedis` | -| `StorageRedisConstants::STORAGE_REDIS_PROTOCOL` | Defines the protocol used while connecting to Redis as key-value storage. | `Spryker\Shared\StorageRedis` | -| `StorageRedisConstants::STORAGE_REDIS_PASSWORD` | Defines the password used while connecting to Redis as key-value storage. | `Spryker\Shared\StorageRedis` | -| `StorageRedisConstants::STORAGE_REDIS_HOST` | Defines the host used while connecting to Redis as key-value storage. | `Spryker\Shared\StorageRedis` | -| `StorageRedisConstants::STORAGE_REDIS_PORT` | Defines the port used while connecting to Redis as key-value storage. | `Spryker\Shared\StorageRedis` | -| `StorageRedisConstants::STORAGE_REDIS_DATABASE` | Defines the database used while connecting to Redis as key-value storage. | `Spryker\Shared\StorageRedis` | -| `StorageRedisConstants::STORAGE_REDIS_PERSISTENT_CONNECTION` | Enables/disables data persistence for a Redis connection. | `Spryker\Shared\StorageRedis` | -| `StorageRedisConstants::STORAGE_REDIS_DATA_SOURCE_NAMES` | Specifies an array of DSN strings for a multi-instance cluster/replication Redis setup. | `Spryker\Shared\StorageRedis` | -| `StorageRedisConstants::STORAGE_REDIS_CONNECTION_OPTIONS` | Specifies an array of client options for connecting to Redis as key-value storage. | `Spryker\Shared\StorageRedis` | - -#### General Storage -* In case of multi-instance Redis setup, extend your project with the following configuration: - -**config/Shared/config_default.php** - -```php - 'sentinel', - 'service' => 'mymaster', - 'parameters' => [ - 'password' => 'secret', - 'database' => 0, - ], -]; -``` - -{% info_block warningBox "Note" %} -This configuration is used exclusively. In other words, you can't use any other Redis configuration. -{% endinfo_block %} - -* In case of single-instance Redis setup, extend your project with the following configuration: - -**config/Shared/config_default.php** - -```php - 'sentinel', - 'service' => 'mymaster', - 'parameters' => [ - 'password' => 'secret', - 'database' => 2, - ], -]; -``` - -{% info_block warningBox "Note" %} -This configuration is used exclusively. In other words, you can't use any other Redis configuration. -{% endinfo_block %} - -* In case of a single-instance Redis setup, extend your project with the following configuration: - -**config/Share/config_default.php** -```php - QueueNameFoo, (Queue and error queue will be created: QueueNameFoo and QueueNameFoo.error) - * QueueNameBar => [ - * RoutingKeyFoo => QueueNameBaz, // (Additional queues can be defined by several routing keys) - * ], - * - * @see https://www.rabbitmq.com/tutorials/amqp-concepts.html - * - * @return array - */ - protected function getQueueConfiguration(): array - { - return [ - EventConstants::EVENT_QUEUE => [ - EventConfig::EVENT_ROUTING_KEY_RETRY => EventConstants::EVENT_QUEUE_RETRY, - EventConfig::EVENT_ROUTING_KEY_ERROR => EventConstants::EVENT_QUEUE_ERROR, - ], - GlossaryStorageConfig::SYNC_STORAGE_TRANSLATION, - UrlStorageConstants::URL_SYNC_STORAGE_QUEUE, - $this->get(LogConstants::LOG_QUEUE_NAME), - // ... - ]; - } - - /** - * @return string - */ - protected function getDefaultBoundQueueNamePrefix(): string - { - return 'error'; - } -} -``` - -2. Add `PublisherTriggerEventsConsole` to `ConsoleDependencyProvider`: -**Pyz/Zed/Console/ConsoleDependencyProvider.php** - -```php -add(new GlossaryStorageEventSubscriber()); - $eventSubscriberCollection->add(new UrlStorageEventSubscriber()); - // ... - $eventSubscriberCollection->add(new PublisherSubscriber()); - - return $eventSubscriberCollection; - } -} -``` - - -## Install feature frontend - -Follow the steps below to install the front end of Spryker Core feature. - - -### 1) Install the required modules using Composer -Run the following command to install the required modules: - -```bash -composer require "spryker-feature/spryker-core": "dev-master" -``` - - - - -### 2) Set up Configuration -Add the following configuration to your project: - -| Configuration | Specification | Namespace | -| --- | --- | --- | -| `SessionFileConstants::YVES_SESSION_FILE_PATH` | Defines the filesystem path for storing Yves sessions. | `Spryker\Shared\SessionFile` | -| `SessionRedisConstants::YVES_SESSION_REDIS_PROTOCOL` | Defines the protocol used while connecting to Redis as Yves session storage. | `Spryker\Shared\SessionRedis` | -| `SessionRedisConstants::YVES_SESSION_REDIS_PASSWORD` | Defines the password used while connecting to Redis as Yves session storage. | `Spryker\Shared\SessionRedis` | -| `SessionRedisConstants::YVES_SESSION_REDIS_HOST` | Defines the host used while connecting to Redis as Yves session storage. | `Spryker\Shared\SessionRedis` | -| `SessionRedisConstants::YVES_SESSION_REDIS_PORT` | Defines the port used while connecting to Redis as Yves session storage. | `Spryker\Shared\SessionRedis` | -| `SessionRedisConstants::YVES_SESSION_REDIS_DATABASE` | Defines the database used while connecting to Redis as Yves session storage. | `Spryker\Shared\SessionRedis` | -| `SessionRedisConstants::YVES_SESSION_REDIS_DATA_SOURCE_NAMES` | Defines the list of DSNs used while connecting to Redis as Yves session storage in replication mode. | `Spryker\Shared\SessionRedis` | -| `SessionRedisConstants::YVES_SESSION_REDIS_CLIENT_OPTIONS` |Defines the list of client options used while connection to Redis as Yves session storage in replication mode. | `Spryker\Shared\SessionRedis` | - -**config/Shared/config_default.php** - -```php - 'sentinel', - 'service' => 'mymaster', - 'parameters' => [ - 'password' => 'secret', - 'database' => 1, - ], -]; -``` - -{% info_block warningBox "Note" %} -This configuration is used exclusively. In other words, you can't use any other Redis configuration. -{% endinfo_block %} - -* In case of a single-instance Redis setup, extend your project with the following configuration: - -**config/Share/config_default.php** - -```php - - -![approval-process-entity-diagram](https://spryker.s3.eu-central-1.amazonaws.com/docs/Features/Workflow+%26+Process+Management/Approval+Process/Approval+Process+Feature+Overview/approval-process-schema.png) - - - - -## Related Developer documents - -|INSTALLATION GUIDES | TUTORIALS AND HOWTOS | -|---------|---------| -| [Approval Process feature integration](/docs/scos/dev/feature-integration-guides/{{page.version}}/glue-api/glue-api-alternative-products-feature-integration.html) | [HowTo: Implement customer approval process based on a generic state machine](/docs/scos/dev/tutorials-and-howtos/howtos/feature-howtos/howto-implement-customer-approval-process-based-on-a-generic-state-machine.html) | -| [Shipment + Approval Process feature integration](/docs/scos/dev/feature-integration-guides/{{page.version}}/shipment-approval-process-feature-integration.html) | | \ No newline at end of file diff --git a/docs/scos/dev/feature-walkthroughs/202005.0/availability-notification-feature-walkthrough.md b/docs/scos/dev/feature-walkthroughs/202005.0/availability-notification-feature-walkthrough.md deleted file mode 100644 index 0ebbe45e52b..00000000000 --- a/docs/scos/dev/feature-walkthroughs/202005.0/availability-notification-feature-walkthrough.md +++ /dev/null @@ -1,35 +0,0 @@ ---- -title: Availability Notification feature walkthrough -last_updated: Aug 12, 2021 -description: The Availability Notification feature allows customers to subscribe to product availability notifications of out-of-stock products. -template: concept-topic-template -originalLink: https://documentation.spryker.com/v6/docs/availability-notification-module-relations -originalArticleId: 49ca5b76-1442-4397-8111-5cbc3ef4a4ab -redirect_from: - - /v6/docs/availability-notification-module-relations - - /v6/docs/en/availability-notification-module-relations ---- - -The _Availability Notification_ feature allows customers to subscribe to product availability notifications to receive emails when an out-of-stock product is back in stock. - - -To learn more about the feature and to find out how end users use it, see [Availability Notification feature overview](/docs/scos/user/features/{{page.version}}/availability-notification-feature-overview.html) for business users. - - -## Entity diagram - -The following scheme illustrates relations between Availability, `AvailabilityNotification`, `AvailabilityNotificationWidget`, and `ProductDetailPage` modules: - -
    - -![availability-notification-entity-diagram](https://spryker.s3.eu-central-1.amazonaws.com/docs/Features/Mailing+&+Communication/Product+is+Available+Again/module-diagram.png) - -
    - - -## Related Developer documents - -|INSTALLATION GUIDES | GLUE API GUIDES | -|---------|---------| -| [Availability Notification feature integration](/docs/scos/dev/feature-integration-guides/{{page.version}}/availability-notification-feature-integration.html) | [Managing availability notifications](/docs/scos/dev/glue-api-guides/{{page.version}}/managing-products/managing-availability-notifications/managing-availability-notifications.html) | -| [Glue API: Availability Notification feature integration](/docs/scos/dev/feature-integration-guides/{{page.version}}/glue-api/glue-api-availability-notification-feature-integration.html) | [Retrieving subscriptions to availability notifications](/docs/scos/dev/glue-api-guides/{{page.version}}/managing-products/managing-availability-notifications/retrieving-subscriptions-to-availability-notifications.html) | diff --git a/docs/scos/dev/feature-walkthroughs/202005.0/cart-feature-walkthrough/calculation-3-0.md b/docs/scos/dev/feature-walkthroughs/202005.0/cart-feature-walkthrough/calculation-3-0.md deleted file mode 100644 index c8047a1f32a..00000000000 --- a/docs/scos/dev/feature-walkthroughs/202005.0/cart-feature-walkthrough/calculation-3-0.md +++ /dev/null @@ -1,279 +0,0 @@ ---- -title: Calculation 3.0 -last_updated: Aug 12, 2021 -description: The Calculation module is used to calculate the cart totals displayed in the cart/checkout or when the order is placed. The article describes its workflow. -template: concept-topic-template -originalLink: https://documentation.spryker.com/v5/docs/calculation-3-0 -originalArticleId: 03efb98e-e7ee-4bd6-a832-915307e39582 -redirect_from: - - /v5/docs/calculation-3-0 - - /v5/docs/en/calculation-3-0 - - /docs/scos/user/features/202005.0/cart-feature-overview/calculation/calculation-3.0.html - - /docs/scos/dev/feature-walkthroughs/202005.0/cart-feature-walkthrough/calculation-3.0.html -related: - - title: Cart Functionality - link: docs/scos/dev/feature-walkthroughs/page.version/cart-feature-walkthrough/cart-functionality.html - - title: Calculation Data Structure - link: docs/scos/dev/feature-walkthroughs/page.version/cart-feature-walkthrough/calculation-data-structure.html ---- - -Spryker uses the Calculation module to calculate the cart totals that are displayed in the cart/checkout or when the order is placed. - -The Сalculation module extensively uses plugins to inject calculation algorithms. - -## How calculation works - -{% info_block infoBox "Quote Transfer" %} - -The quote transfer object is used to store data and plugins that calculate the amounts. - -{% endinfo_block %} - -There is already a list of plugins which populate quote transfer with corresponding data. Calculations are executed every time the content of the cart is updated. - -{% info_block infoBox "" %} - -For more details, check [Cart Data Flow](/docs/scos/dev/feature-walkthroughs/{{page.version}}/cart-feature-walkthrough/cart-module-reference-information.html#cart-operations#cart-data-flow) in the *Cart Functionality* section. - -{% endinfo_block %} - -If manual recalculation of cart is required, then `CalculationFacade::recalculate` can be called from Zed or `CalculationClient::recalculate` from Yves with prepared [Calculation Data Structure](/docs/scos/dev/feature-walkthroughs/{{page.version}}/cart-feature-walkthrough/calculation-data-structure.html). When the recalculation operation is called, the calculator runs the calculator plugin stack and each plugin modifies the `QuoteTransfer` (calculates discounts, adds sum gross prices, calculates taxes). Most plugins require the `unitGrossPrice` and the `quantity` to be provided. - -{% info_block infoBox "Calculated amounts" %} - -Each amount is being calculated and stored in cents. - -{% endinfo_block %} - -## Calculator plugins - -Calculator plugins are registered in the `CalculationDependencyProvider::getCalculatorStack()` method. This method can be extended on the project level and the plugin stack can be updated with your own plugins. Each calculator must implement `CalculatorPluginInterface`. - -For more information see: - -```php - - -![comments-entity-diagram](https://spryker.s3.eu-central-1.amazonaws.com/docs/Features/Mailing+&+Communication/Comments/techspec-comments-module-diagram.png) - - - - -## Related Developer documents - -|INSTALLATION GUIDES | DATA IMPORT | -|---------|---------| -| [Comments feature integration](/docs/scos/dev/feature-integration-guides/{{page.version}}/comments-feature-integration.html) | [File details: comment.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/miscellaneous/file-details-comment.csv.html) | -| [Comments + persistent cart feature integration](/docs/scos/dev/feature-integration-guides/{{page.version}}/comments-persistent-cart-feature-integration.html) | -| [Comments + order management feature integration](/docs/scos/dev/feature-integration-guides/{{page.version}}/comments-order-management-feature-integration.html) | diff --git a/docs/scos/dev/feature-walkthroughs/202005.0/company-account-feature-walkthrough/company-account-feature-walkthrough.md b/docs/scos/dev/feature-walkthroughs/202005.0/company-account-feature-walkthrough/company-account-feature-walkthrough.md deleted file mode 100644 index aa57fd1229a..00000000000 --- a/docs/scos/dev/feature-walkthroughs/202005.0/company-account-feature-walkthrough/company-account-feature-walkthrough.md +++ /dev/null @@ -1,52 +0,0 @@ ---- -title: Company Account feature walkthrough -last_updated: Sep 2, 2021 -description: The Company Account feature allows controlling user access to the system within an organization by configuring different permissions and roles for the company's entities (units) and users. -template: concept-topic-template ---- - -The _Company Account_ feature allows controlling user access to the system within an organization by configuring different permissions and roles for the company's entities (units) and users. - - -To learn more about the feature and to find out how end users use it, see [Company Account](/docs/scos/user/features/{{page.version}}/company-account-feature-overview/company-account-feature-overview.html) for business users. - - -## Entity diagram - -The following schema illustrates relations between a company, business unit, company unit address and customer. - -
    - -![schema_1.png](https://spryker.s3.eu-central-1.amazonaws.com/docs/Features/Company+Account+Management/Company+Account/Company+Account:+Module+Relations/schema_1.png) - -
    - -The following schema illustrates relations between modules in of the business on behalf functionality: - -
    - -![business-on-behalf-module-relations.png](https://spryker.s3.eu-central-1.amazonaws.com/docs/Features/Company+Account+Management/Business+on+Behalf/Business+on+Behalf+Feature+Overview/business-on-behalf-module-relations.png) - -
    - -The `BusinessOnBehalfGui` module provides the `BusinessOnBehalfGuiAttachToCompanyButtonCustomerTableActionExpanderPlugin` plugin for the `Customer` module, and `CompanyUserTableAttachToBusinessUnitActionLinksExpanderPlugin` as well as `ReplaceDeleteButtonCompanyUserTableActionLinksExpanderPlugin` plugins for the `CompanyUserG` module. Also, `BusinessOnBehalfGui` takes user information from the `CompanyUser` module. - -The following schema represents module relations of the Customer Login by Token feature: - -
    - -![Module relations](https://spryker.s3.eu-central-1.amazonaws.com/docs/Features/Workflow+&+Process+Management/Customer+Login+by+Token/Customer+Login+by+Token+Feature+Overview/customer-login-by-token-module-relations.png) - -
    - -## Related Developer documents - -| INSTALLATION GUIDES | UPGRADE GUIDES| GLUE API GUIDES | TUTORIALS AND HOWTOS | REFERENCES | -|---------|---------|---------|---------|---------| -| [Company Account feature integration](/docs/scos/dev/feature-integration-guides/{{page.version}}/company-account-feature-integration.html)| CompanyUser migration guide | [Retrieving companies](/docs/scos/dev/glue-api-guides/{{page.version}}/managing-b2b-account/retrieving-companies.html) |[ HowTo - Generate a token for login](/docs/scos/dev/tutorials-and-howtos/howtos/feature-howtos/howto-generate-a-token-for-login.html) | [Customer Login by Token reference information](/docs/scos/dev/feature-walkthroughs/{{page.version}}/company-account-feature-walkthrough/customer-login-by-token-reference-information.html) | -| [Glue API: Company Account feature integration](/docs/scos/dev/feature-integration-guides/{{page.version}}/glue-api/glue-api-company-account-feature-integration.html) | BusinessOnBehalfDataImport migration guide | [Retrieving business units](/docs/scos/dev/glue-api-guides/{{page.version}}/managing-b2b-account/retrieving-business-units.html) | | | -| | | [Retrieving business unit addresses](/docs/scos/dev/glue-api-guides/{{page.version}}/managing-b2b-account/retrieving-business-unit-addresses.html) | | | -| | | [Retrieving company users](/docs/scos/dev/glue-api-guides/{{page.version}}/managing-b2b-account/retrieving-company-users.html) | | | -| | | [Retrieving company roles](/docs/scos/dev/glue-api-guides/{{page.version}}/managing-b2b-account/retrieving-company-roles.html) | | | -| | | [Authenticating as a company user](/docs/scos/dev/glue-api-guides/{{page.version}}/managing-b2b-account/authenticating-as-a-company-user.html) | | | -| | | [Managing company user authentication tokens](/docs/scos/dev/glue-api-guides/{{page.version}}/managing-b2b-account/managing-company-user-authentication-tokens.html) | | | diff --git a/docs/scos/dev/feature-walkthroughs/202005.0/company-account-feature-walkthrough/company-account-module-relations.md b/docs/scos/dev/feature-walkthroughs/202005.0/company-account-feature-walkthrough/company-account-module-relations.md deleted file mode 100644 index 5d18eba0613..00000000000 --- a/docs/scos/dev/feature-walkthroughs/202005.0/company-account-feature-walkthrough/company-account-module-relations.md +++ /dev/null @@ -1,22 +0,0 @@ ---- -title: Company account- module relations -description: Explore the module relations of the Company Account features -last_updated: May 28, 2021 -template: feature-walkthrough-template -originalLink: https://documentation.spryker.com/v6/docs/company-account-module-relations -originalArticleId: 215d5a46-f558-40cf-90b6-7820804cac85 -redirect_from: - - /v6/docs/company-account-module-relations - - /v6/docs/en/company-account-module-relations ---- - -The schema below illustrates relations between company, business unit, company unit address and company user (customer). - -![schema_1.png](https://spryker.s3.eu-central-1.amazonaws.com/docs/Features/Company+Account+Management/Company+Account/Company+Account:+Module+Relations/schema_1.png) - - -The schema below illustrates relations between modules in of the business on behalf functionality: - -![business-on-behalf-module-relations.png](https://spryker.s3.eu-central-1.amazonaws.com/docs/Features/Company+Account+Management/Business+on+Behalf/Business+on+Behalf+Feature+Overview/business-on-behalf-module-relations.png) - -`BusinessOnBehalfGui` module provides plugin `BusinessOnBehalfGuiAttachToCompanyButtonCustomerTableActionExpanderPlugin` for Customer module, and `CompanyUserTableAttachToBusinessUnitActionLinksExpanderPlugin` as well as `ReplaceDeleteButtonCompanyUserTableActionLinksExpanderPlugin` plugins for `CompanyUserG` module. Also, `BusinessOnBehalfGui` takes user information from `CompanyUser` module. diff --git a/docs/scos/dev/feature-walkthroughs/202005.0/company-account-feature-walkthrough/customer-login-by-token-reference-information.md b/docs/scos/dev/feature-walkthroughs/202005.0/company-account-feature-walkthrough/customer-login-by-token-reference-information.md deleted file mode 100644 index e3dd62131d4..00000000000 --- a/docs/scos/dev/feature-walkthroughs/202005.0/company-account-feature-walkthrough/customer-login-by-token-reference-information.md +++ /dev/null @@ -1,80 +0,0 @@ ---- -title: Customer Login by Token reference information -description: This document describes the token structure. -template: feature-walkthrough-template -originalLink: https://documentation.spryker.com/2021080/docs/customer-login-by-token-overview ---- - -A *token* is a unique identifier that contains all the information needed for authentication to fetch a specific resource without using a username and password. The tokens are JSON strings that are encoded in base64url format. - -The lifetime of the token is 8 hours by default, but this value can be changed on the project level. - -## Token structure -Every token consists of the three sections separated by periods. - -![Token struc](https://spryker.s3.eu-central-1.amazonaws.com/docs/Features/Workflow+&+Process+Management/Customer+Login+by+Token/Customer+Login+by+Token+Feature+Overview/token-structure.png) - -* **Header** contains the information about the token type (JWT) and the encryption algorithm (RS256). For example: - -```json -{ - "typ": "JWT", - "alg": "RS256", - "jti": "9ced66ac5cefe17681576bf95b800078e3020142faaa524da871ffb2a63508952045e10453136bde" -} -``` -Once the header is encoded, we get the part of the token: - -``` -eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6IjljZWQ2NmFjNWNlZmUxNzY4MTU3NmJmOTViODAwMDc4ZTMwMjAxNDJmYWFhNTI0ZGE4NzFmZmIyYTYzNTA4OTUyMDQ1ZTEwNDUzMTM2YmRlIn0 -``` - -* **Payload** is the part where multiple claims (statements) about the user identity and additional data, for example, permissions are stored. Here we put the information that we need to transmit. _id_customer_ and _idcompanyuser_ are included by default, however, you can extend the payload with any data according to your project requirements. - -Example payload: - -```json -{ - "aud": "frontend", - "jti": "9ced66ac5cefe17681576bf95b800078e3020142faaa524da871ffb2a63508952045e10453136bde", - "iat": 1557926620, - "nbf": 1557926620, - "exp": 1557955420, - "sub": " {/"customer_reference/":null,/"id_customer/":6,/"id_company_user/":/"1/",/"permissions/":null}", - "scopes": [] -} -``` -The example above contains six [registered claims](https://www.iana.org/assignments/jwt/jwt.xhtml) that, when encoded, correspond to: - -``` -eyJhdWQiOiJmcm9udGVuZCIsImp0aSI6IjljZWQ2NmFjNWNlZmUxNzY4MTU3NmJmOTViODAwMDc4ZTMwMjAxNDJmYWFhNTI0ZGE4NzFmZmIyYTYzNTA4OTUyMDQ1ZTEwNDUzMTM2YmRlIiwiaWF0IjoxNTU3OTI2NjIwLCJuYmYiOjE1NTc5MjY2MjAsImV4cCI6MTU1Nzk1NTQyMCwic3ViIjoie1wiY3VzdG9tZXJfcmVmZXJlbmNlXCI6bnVsbCxcImlkX2N1c3RvbWVyXCI6NixcImlkX2NvbXBhbnlfdXNlclwiOlwiMVwiLFwicGVybWlzc2lvbnNcIjpudWxsfSIsInNjb3BlcyI6W119 -``` - -* **Signature** contains the hash of the header, the payload and the secret needed - -The example signature is the following: - -```json -RSASHA256( - base64UrlEncode(header) + "." + - base64UrlEncode(payload), - secret -) -``` - -The final part of the encoded token will look like this: -``` -v6kvCtNMM-_x-sRWugigT2j7qXVXQ9Ds5a-65sD_d4Oaun0toGnM_A-458mCyV1FCdyOHU572hdz7w3SFcIHzFw4zGGr_cqMdBmCF6VJS21lcOK401j2Li4NJB-8TmOHMk1XmjrJ92EyBScvycTg8TCkY3w4jcIGN7TPGAwzvEWaJhIwqYGjEUcTWtsiIemeWijTWVYd4qE6gnXdzMeyekFLon9syLnXdxeAQ8qNM7BML5QfvazvuMBvFQWfatDcRd2SFfIkNmMrxEQ6daEaPEfyqpdXpHfhpzvuQpA0hQQ9BfYBrwvTskpH_CWTht7IsOqlY4KYRNIg-t3tcZYt6Q -``` -Combining the three parts, an exemplary URL with the full token will look like: - -``` -http://mysprykershop.com/access-token/eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6IjljZWQ2NmFjNWNlZmUxNzY4MTU3NmJmOTViODAwMDc4ZTMwMjAxNDJmYWFhNTI0ZGE4NzFmZmIyYTYzNTA4OTUyMDQ1ZTEwNDUzMTM2YmRlIn0.eyJhdWQiOiJmcm9udGVuZCIsImp0aSI6IjljZWQ2NmFjNWNlZmUxNzY4MTU3NmJmOTViODAwMDc4ZTMwMjAxNDJmYWFhNTI0ZGE4NzFmZmIyYTYzNTA4OTUyMDQ1ZTEwNDUzMTM2YmRlIiwiaWF0IjoxNTU3OTI2NjIwLCJuYmYiOjE1NTc5MjY2MjAsImV4cCI6MTU1Nzk1NTQyMCwic3ViIjoie1wiY3VzdG9tZXJfcmVmZXJlbmNlXCI6bnVsbCxcImlkX2N1c3RvbWVyXCI6NixcImlkX2NvbXBhbnlfdXNlclwiOlwiMVwiLFwicGVybWlzc2lvbnNcIjpudWxsfSIsInNjb3BlcyI6W119.v6kvCtNMM-_x-sRWugigT2j7qXVXQ9Ds5a-65sD_d4Oaun0toGnM_A-458mCyV1FCdyOHU572hdz7w3SFcIHzFw4zGGr_cqMdBmCF6VJS21lcOK401j2Li4NJB-8TmOHMk1XmjrJ92EyBScvycTg8TCkY3w4jcIGN7TPGAwzvEWaJhIwqYGjEUcTWtsiIemeWijTWVYd4qE6gnXdzMeyekFLon9syLnXdxeAQ8qNM7BML5QfvazvuMBvFQWfatDcRd2SFfIkNmMrxEQ6daEaPEfyqpdXpHfhpzvuQpA0hQQ9BfYBrwvTskpH_CWTht7IsOqlY4KYRNIg-t3tcZYt6Q - -``` - -In Spryker Commerce OS, token generation is performed using a facade method, that is why no GUI is present. To generate a token, see [HowTo: Generate a token for login](/docs/scos/dev/tutorials-and-howtos/howtos/feature-howtos/howto-generate-a-token-for-login.html). - -Token-based authentication works closely with the [Punch Out](/docs/scos/user/technology-partners/{{page.version}}/order-management-erpoms/punchout-catalogs/punchout-catalogs.html) feature. It allows B2B buyers to log in from their ERP system to a Spryker company user account using a token without entering the username and password and buy the products from Spryker e-commerce shop. - -To make the feature more flexible, we have implemented the functionality that allows you to disable switching between the Business-on Behalf accounts. E.g., if the user logs in to the pre-defined company account that has Business-on-Behalf feature integrated, the shop owner can disable the ability to switch between the accounts. In case the Business-on-Behalf is disabled, the company user will log in to the default account and will not be able to switch between the company users within their company account. diff --git a/docs/scos/dev/feature-walkthroughs/202005.0/content-items-feature-walkthrough/content-item-types-module-relations.md b/docs/scos/dev/feature-walkthroughs/202005.0/content-items-feature-walkthrough/content-item-types-module-relations.md deleted file mode 100644 index e880b3905db..00000000000 --- a/docs/scos/dev/feature-walkthroughs/202005.0/content-items-feature-walkthrough/content-item-types-module-relations.md +++ /dev/null @@ -1,86 +0,0 @@ ---- -title: Content Item Types- Module Relations -description: Learn about all the content item types and module relations used for them. -last_updated: Sep 14, 2020 -template: feature-walkthrough-template -originalLink: https://documentation.spryker.com/v5/docs/content-item-types-module-relations -originalArticleId: 5798f27e-2d26-48d3-af19-04465e75eb8e -redirect_from: - - /v5/docs/content-item-types-module-relations - - /v5/docs/en/content-item-types-module-relations - - /docs/scos/user/features/202005.0/content-item-types-module-relations.html -related: - - title: Creating Content Items - link: docs/scos/user/back-office-user-guides/page.version/content/content-items/creating-content-items.html ---- - -This document describes each content item type and the modules relations used for them. - -## Banner -Banner content item is a content piece that consists of text, a background image and a link. A content manager specifies the values when [creating the content item](/docs/scos/user/back-office-user-guides/{{page.version}}/content/content-items/creating-content-items.html#create-a-banner-content-item) in the Back Office > **Content Management** > **Content Items**. -The scheme shows the module relations of the Banner content item: -![Banner CI module relations](https://spryker.s3.eu-central-1.amazonaws.com/docs/Features/CMS/Content+Items/Content+Items+Types%3A+Module+Relations/banner-module-relations.png) - -### Banner API -A developer can fetch the content item data via API. Also, they can view the content item details for a specific locale. - -The scheme below shows the Banner API module relations: -![Banner API module relations](https://spryker.s3.eu-central-1.amazonaws.com/docs/Features/CMS/Content+Items/Content+Items+Types%3A+Module+Relations/banner-api-module-relations.png) - -### Banner Data Importer -A developer can create and edit the content items by importing them. - -The scheme below shows the module relations of the content item data importers: -![Banner Content Item Data Importers module relations](https://spryker.s3.eu-central-1.amazonaws.com/docs/Features/CMS/Content+Items/Content+Items+Types%3A+Module+Relations/banner-data-importers-module-relations.png) - - -See [Data Importers Overview and Implementation](/docs/scos/dev/data-import/{{page.version}}/data-importers-overview-and-implementation.html) for more details. -*** -## Abstract Product List -Abstract product list content item is a content piece that consists of text and [abstract products](/docs/scos/user/features/{{page.version}}/product-feature-overview/product-feature-overview.html). A content manager selects existing abstract products when [creating the content item](/docs/scos/user/back-office-user-guides/{{page.version}}/content/content-items/creating-content-items.html#create-an-abstract-product-list-content-item) in the Back Office > **Content Management** > **Content Items**. -The scheme below shows the module relations of the Abstract product list content item and its components: -* data importer -* API - -![Abstract Product List module relations](https://spryker.s3.eu-central-1.amazonaws.com/docs/Features/CMS/Content+Items/Content+Items+Types%3A+Module+Relations/abstract-product-list-module-relations.png) - -### Abstract Product List Data Importer -A developer can create and update the content items by importing them. - -See [Data Importers Overview and Implementation](/docs/scos/dev/data-import/{{page.version}}/data-importers-overview-and-implementation.html) for more details. - -### Abstract Product List API -A developer can fetch the information on each abstract product included into a contnet item via API based on the content item key. Also, they can view details of content items for all or a specific locale. - -*** -## Product Set -Product set content item is a content piece that consists of text and a [product set](/docs/scos/user/features/{{page.version}}/product-sets-feature-overview.html). A content manager selects an existing product set when [creating the content item](/docs/scos/user/back-office-user-guides/{{page.version}}/content/content-items/creating-content-items.html#create-a-product-set-content-item) in the Back Office > **Content Management** > **Content Items**. -The scheme below shows the module relations of the Product set content item and its importer: -![Product Set content item module relations](https://spryker.s3.eu-central-1.amazonaws.com/docs/Features/CMS/Content+Items/Content+Items+Types%3A+Module+Relations/product-set-module-relations.png) - -### Product Set Data Importer -Developers can create and update the content items by importing them. - -See [Data Importers Overview and Implementation](/docs/scos/dev/data-import/{{page.version}}/data-importers-overview-and-implementation.html) for more details. - -*** -## File List -File list content item is a content piece that consists of text and a clickable link or icon to download a file. A content manager selects existing files when [creating the content item](/docs/scos/user/back-office-user-guides/{{page.version}}/content/content-items/creating-content-items.html#create-a-file-list-content-item) in the Back Office > **Content Management** > **Content Items**. - -The scheme below shows the module relations of the File list content item: -![File List module relations](https://spryker.s3.eu-central-1.amazonaws.com/docs/Features/CMS/Content+Items/Content+Items+Types%3A+Module+Relations/file-list-module-relations.png) - -## Navigation - -Navigation content item is a content piece that consists of a [navigation element](/docs/scos/user/features/{{page.version}}/content-item-types-module-relations.html). A content manager selects a navigation element when [creating the Navigation content item](/docs/scos/user/back-office-user-guides/{{page.version}}/content/content-items/creating-content-items.html#create-a-navigation-content-item) in the Back Office. - - -The scheme shows the module relations of the Navigation content item: - -![navigation-content-item-module-relations](https://confluence-connect.gliffy.net/embed/image/73472dc0-68f4-4bcd-a3ef-79c5ea1dcdbe.png?utm_medium=live&utm_source=custom) - -### Navigation Data Importer - -A developer can create and edit navigation content items by [importing](/docs/scos/dev/data-import/{{page.version}}/importing-data-with-a-configuration-file.html#console-commands-to-run-import) them. - -See [File details: content_navigation.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/content-management/file-details-content-navigation.csv.html) for more details. diff --git a/docs/scos/dev/feature-walkthroughs/202005.0/content-items-feature-walkthrough/content-items-feature-walkthrough.md b/docs/scos/dev/feature-walkthroughs/202005.0/content-items-feature-walkthrough/content-items-feature-walkthrough.md deleted file mode 100644 index 64b21aa9ced..00000000000 --- a/docs/scos/dev/feature-walkthroughs/202005.0/content-items-feature-walkthrough/content-items-feature-walkthrough.md +++ /dev/null @@ -1,19 +0,0 @@ ---- -title: Content Items feature walkthrough -last_updated: Aug 25, 2021 -description: The Content Items feature creates an abstraction layer for content management in the Back Office. -template: concept-topic-template ---- - -The _Content Items_ feature creates an abstraction layer for content management in the Back Office. It allows content managers to create and preserve small content pieces, which can be inserted into CMS blocks and then into Storefront pages. - -To learn more about the feature and to find out how end users use it, see [Content Items feature overview](/docs/scos/user/features/{{page.version}}/content-items-feature-overview.html) for business users. - -## Related Developer documents - -| INSTALLATION GUIDES | UPGRADE GUIDES | GLUE API GUIDES | DATA IMPORT | TUTORIALS AND HOWTOS | REFERENCES | -|---|---|---|---|---|---| -| [Content Items feature integration](/docs/scos/dev/feature-integration-guides/{{page.version}}/content-items-feature-integration.html) | ContentBanner migration guide | [Retrieving abstract product list content items](/docs/scos/dev/glue-api-guides/{{page.version}}/retrieving-content-items/retrieving-abstract-product-list-content-items.html) | [File details: content_banner.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/content-management/file-details-content-banner.csv.html) | [HowTo: Create a custom content item](/docs/scos/dev/tutorials-and-howtos/howtos/feature-howtos/cms/howto-create-a-custom-content-item.html) | [Content item types: module relations](/docs/scos/dev/feature-walkthroughs/{{page.version}}/content-items-feature-walkthrough/content-item-types-module-relations.html) | | -| [Glue API: Content items API feature integration](/docs/scos/dev/feature-integration-guides/{{page.version}}/glue-api/glue-api-content-items-feature-integration.html) | Content migration guide | [Retrieving banner content items](/docs/scos/dev/glue-api-guides/{{page.version}}/retrieving-content-items/retrieving-banner-content-items.html) | [File details: content_navigation.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/content-management/file-details-content-navigation.csv.html) | | | -| | ContentBannerGui migration guide | | [File details: content_product_abstract_list.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/content-management/file-details-content-product-abstract-list.csv.html) | | | -| | ContentStorage migration guide | | [File details: content_product_set.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/content-management/file-details-content-product-set.csv.html) | | | diff --git a/docs/scos/dev/feature-walkthroughs/202005.0/customer-account-management-feature-walkthrough/customer-account-management-feature-walkthrough.md b/docs/scos/dev/feature-walkthroughs/202005.0/customer-account-management-feature-walkthrough/customer-account-management-feature-walkthrough.md deleted file mode 100644 index ee9829fd950..00000000000 --- a/docs/scos/dev/feature-walkthroughs/202005.0/customer-account-management-feature-walkthrough/customer-account-management-feature-walkthrough.md +++ /dev/null @@ -1,24 +0,0 @@ ---- -title: Customer Account Management feature walkthrough -last_updated: Aug 13, 2021 -description: The Customer Account Management feature enables a wide range of management options for customer accounts and additional functionalities -template: concept-topic-template ---- - -The _Customer Account Management_ feature enables a wide range of management options for customer accounts and additional functionalities. - - -To learn more about the feature and to find out how end users use it, see [Customer Account Management](/docs/scos/user/features/{{page.version}}/customer-account-management-feature-overview/customer-account-management-feature-overview.html) for business users. - - -## Related Developer documents - -| INSTALLATION GUIDES | UPGRADE GUIDES | GLUE API GUIDES | DATA IMPORT | REFERENCES | -|---|---|---|---|---| -| [Agent Assist feature integration](/docs/scos/dev/feature-integration-guides/{{page.version}}/agent-assist-feature-integration.html) | CompanyUser migration guide | [Authenticating as a customer](/docs/scos/dev/glue-api-guides/{{page.version}}/managing-customers/authenticating-as-a-customer.html) | [File details: customer.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/commerce-setup/file-details-customer.csv.html) | [Reference information: Customer module overview](/docs/scos/dev/feature-walkthroughs/{{page.version}}/customer-account-management-feature-walkthrough/reference-information-customer-module-overview.html)| -| [Company Account feature integration](/docs/scos/dev/feature-integration-guides/{{page.version}}/company-account-feature-integration.html) | | [Confirming customer registration](/docs/scos/dev/glue-api-guides/{{page.version}}/managing-customers/confirming-customer-registration.html) | | | -| [Customer Account Management feature integration](/docs/scos/dev/feature-integration-guides/{{page.version}}/customer-account-management-feature-integration.html) | | [Managing customer addresses](/docs/scos/dev/glue-api-guides/{{page.version}}/managing-customers/managing-customer-addresses.html) | | | -| [Glue API: Customer Account Management feature integration](/docs/scos/dev/feature-integration-guides/{{page.version}}/glue-api/glue-api-customer-account-management-feature-integration.html) | | [Managing customer authentication tokens](/docs/scos/dev/glue-api-guides/{{page.version}}/managing-customers/managing-customer-authentication-tokens.html) | | | -| [Spryker Сore feature integration](/docs/scos/dev/feature-integration-guides/{{page.version}}/spryker-core-feature-integration.html) | | [Managing customer authentication tokens via OAuth 2.0](/docs/scos/dev/glue-api-guides/{{page.version}}/managing-customers/managing-customer-authentication-tokens-via-oauth-2.0.html) | | | -| [Glue API: Spryker Сore feature integration](/docs/scos/dev/feature-integration-guides/{{page.version}}/glue-api/glue-api-spryker-core-feature-integration.html) | | [Managing customer passwords](/docs/scos/dev/glue-api-guides/{{page.version}}/managing-customers/managing-customer-passwords.html) | | | -| | | [Managing customers](/docs/scos/dev/glue-api-guides/{{page.version}}/managing-customers/managing-customers.html) | | | diff --git a/docs/scos/dev/feature-walkthroughs/202005.0/customer-account-management-feature-walkthrough/reference-information-customer-module-overview.md b/docs/scos/dev/feature-walkthroughs/202005.0/customer-account-management-feature-walkthrough/reference-information-customer-module-overview.md deleted file mode 100644 index b7bcd7bfba9..00000000000 --- a/docs/scos/dev/feature-walkthroughs/202005.0/customer-account-management-feature-walkthrough/reference-information-customer-module-overview.md +++ /dev/null @@ -1,89 +0,0 @@ ---- -title: Customer Module Overview -description: This article describes how new customers can be created and managed and how to enable specific features related to customers. -last_updated: Sep 14, 2020 -template: feature-walkthrough-template -originalLink: https://documentation.spryker.com/v5/docs/customer-module-overview -originalArticleId: 119fad7b-c05f-4797-965c-75d3fea94e71 -redirect_from: - - /v5/docs/customer-module-overview - - /v5/docs/en/customer-module-overview - - /docs/scos/dev/feature-walkthroughs/202005.0/customer-account-management-feature-walkthrough/customer-module-overview-reference-information.html -related: - - title: Customer Groups - link: docs/scos/user/features/page.version/customer-account-management-feature-overview/customer-groups-overview.html ---- - -The Customer entity wraps data around registered customers. Customer data is managed from the Back Office by the shop administrator and from the shop website itself by customers. This article describes how new customers can be created and managed and how to enable specific features related to customers. - -## Customer Registration -Customer registration requires two steps: - -1. Creating a new customer: This step can be done from both the back-end and front-end applications. Customers are created in the database if the entered details are valid. A registration key is generated for each customer and used as a token for customer registration confirmation. The key is embedded in the confirmation link sent by email. -2. Confirming customer registration: Only customer can confirm registration through the front-end application. The customer accesses the link received in the email sent after the customer creation. When opening the link, an update is triggered that sets the customer as registered. - -After these two steps are performed, the customer can use the account. - -![customer.png](https://spryker.s3.eu-central-1.amazonaws.com/docs/Features/Customer+Relationship+Management/Customer+Groups/Customer+Module+Overview/customer.png) - -## Customer Address - -One customer can have many customer addresses stored in the database. - -There are two types of customer addresses: - -* Billing Address: the address to which the invoice or bill is registered -* Shipping Address: the address to where the order is shipped - -Customers are assigned a default billing and a default shipping address. Customers can update their addresses through their account (from Yves) or have them updated by the Back Office user (from the Back Office). - -## Password Restore - -Similar to the customer registration flow, password restore makes use of a token that acts as a temporary password for the customer. An email is sent to the user to reset the password. The mail contains a link where password restore token is embedded. This token is generated specifically for this request. After the customer accesses the URL and enters necessary confirmation data, the customer password is updated. - -Out of the box Spryker provides the plugin `CustomerRestorePasswordMailTypePlugin` (Customer module) to handle a restore password email template. To enable it, register this plugin in your `MailDependencyProvider` (eg. `Pyz\Zed\Mail\MailDependencyProvider`). - -{% info_block infoBox "Token link generation" %} -By default, the **Customer** module will lead to `'‹YVES HOST›/password/restore?token='`. If it's different in your project, you should configure generation of restore links in `Spryker\Zed\Customer\CustomerConfig::getCustomerPasswordRestoreTokenUrl( -{% endinfo_block %}`) - -## Delete Customer -Customers can remove themselves by clicking **Delete Account** on the Yves Profile page. In addition, this functionality is also available in the Back Office (**Customer > View > Delete**). - -Complete removal from the customer table is strictly prohibited as it could affect the database consistency of e-commerce projects or even be illegal in terms of tax reporting and auditing. In Spryker we don't remove identifiers from a customer table, but anonymize private information. Information related to orders and bills will stay untouched. - -{% info_block errorBox %} -We use irreversible algorithms to make it impossible to repair deleted data. -{% endinfo_block %} - -After the deletion, customers can use an old email for registration, as the new registration does not have any connections to an old one (anonymized). - -To prevent missing any customer related information, do the following: - -1. Process removal for related customer objects. Here you could take care of information stored in dependent bundles or custom relations. To do so, implement the `CustomerAnonymizerPluginInterface`. As an example, take a look at the Newsletter module plugin for unsubscribing a customer from newsletters before removal `Spryker\Zed\Newsletter\Business\Anonymizer\SubscriptionAnonymizer`. -2. Anonymize customer address information. -3. Anonymize customer private information. Information directly related to customer fields (first name, last name, date of birth etc.). - -{% info_block errorBox "Information privacy law " %} -When creating a custom implementation, check and follow the applicable legislation in your country. -{% endinfo_block %} - -## Customer Experience - -Spryker consistently delivers the scalable operating system without coupling it to a project infrastructure. As a consequence, the project should take care of impact of the **Customer Delete** functionality on customer experience. Read more about session sensitive actions in [Migration Guide - Customer](/docs/scos/dev/module-migration-guides/migration-guide-customer.html). - -### Case insensitive queries for email - -From version 7.0.0 on case insensitive queries using the `filterByEmail` conditions are enabled by default. If your version of the **Customer** module is lower you are still able to use this feature. - -To enable case insensitive fields in Propel for filtering queries update PropelOrm module to 1.5.0 version. - -When feature is enabled, add an attribute `caseInsensitive="true"` into customer schema file on project level (usually `src/Pyz/Zed/Customer/Persistence/Propel/Schema/spy_customer.schema.xml`). - -Finally run `vendor/bin/console propel:diff` and `vendor/bin/console propel:model:build` to update Propel models. - -### Orders Display on Customer View Page - -From Customer module 7.6.0 (along with Sales module version 8.7.0) we support display of customer orders in the Customers section of the Back Office. The **Customers View** page now has Orders table listing all the orders of a respective customer. - -To enable the feature to see extra blocks on the Customer View page in the Back Office, go to the `CustomerConfig` class in the `Customer` module and add `getCustomerDetailExternalBlocksUrls` function . This function should return an array where the key is the block name and the value is the URL where this block exists. As for the orders, they are in `/sales/customer/customer-orders` which in our routing architecture points to Sales `module` -> `CustomerController` -> `CustomerOrdersAction`. If this behavior needs to be extended further, all that’s needed is more key-value pairs for more controller actions that provide the data. diff --git a/docs/scos/dev/feature-walkthroughs/202005.0/gift-cards-feature-walkthrough.md b/docs/scos/dev/feature-walkthroughs/202005.0/gift-cards-feature-walkthrough.md deleted file mode 100644 index 2a595fe1915..00000000000 --- a/docs/scos/dev/feature-walkthroughs/202005.0/gift-cards-feature-walkthrough.md +++ /dev/null @@ -1,19 +0,0 @@ ---- -title: Gift Cards feature walkthrough -last_updated: Sep 28, 2021 -description: The Gift Cards feature enables you to create a virtual product (a gift card) with a chosen value amount -template: concept-topic-template ---- - -The _Gift Cards_ feature enables you to create a virtual product (a gift card) with a chosen value amount. The purchase of a gift card generates an individual code that is used as a payment method during checkout. - - -To learn more about the feature and to find out how end users use it, see [Gift Cards feature overview](/docs/scos/user/features/{{page.version}}/gift-cards-feature-overview.html) for business users. - - -## Related Developer documents - -| INSTALLATION GUIDES | UPGRADE GUIDES | GLUE API GUIDES | DATA IMPORT | -|---|---|---|---| -| [Gift Cards feature integration](/docs/scos/dev/feature-integration-guides/{{page.version}}/gift-cards-feature-integration.html) | Upgrade the CheckoutPage module | [Managing gift cards of guest users](/docs/scos/dev/glue-api-guides/{{page.version}}/managing-carts/guest-carts/managing-gift-cards-of-guest-users.html) | [File details: gift_card_abstract_configuration.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/special-product-types/gift-cards/file-details-gift-card-abstract-configuration.csv.html) | -| | | [Managing gift cards of registered users](/docs/scos/dev/glue-api-guides/{{page.version}}/managing-carts/carts-of-registered-users/managing-gift-cards-of-registered-users.html) | [File details: gift_card_concrete_configuration.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/special-product-types/gift-cards/file-details-gift-card-concrete-configuration.csv.html) | \ No newline at end of file diff --git a/docs/scos/dev/feature-walkthroughs/202005.0/inventory-management-feature-walkthrough/inventory-management-feature-walkthrough.md b/docs/scos/dev/feature-walkthroughs/202005.0/inventory-management-feature-walkthrough/inventory-management-feature-walkthrough.md deleted file mode 100644 index fd97d9cf127..00000000000 --- a/docs/scos/dev/feature-walkthroughs/202005.0/inventory-management-feature-walkthrough/inventory-management-feature-walkthrough.md +++ /dev/null @@ -1,153 +0,0 @@ ---- -title: Inventory Management feature walkthrough -last_updated: Aug 13, 2021 -description: The Inventory Management feature adds stock and availability management as well as multiple warehouse stock management for products -template: concept-topic-template -redirect_from: - - /docs/scos/dev/feature-walkthroughs/202005.0/nventory-management-feature-walkthrough/inventory-management-feature-walkthrough.html ---- - -The _Inventory Management_ feature adds stock and availability management as well as multiple warehouse stock management for products. - -## Availability - -From this section, you will get to know how product availability is checked and calculated, how products are reserved, how availability can be imported to the database as well as how availability per store works. - -### Availability Check -The process of checking product's availability implies several operations described in the list below. - -* Product details page won’t show the **Add to cart** button when a concrete product is out of stock. Instead, informational message is displayed. -* Pre-check plugin in cart. `\Spryker\Zed\AvailabilityCartConnector\Communication\Plugin\CheckAvailabilityPlugin`checks if all items in cart are available. It’s executed after the "Add to cart" operation. If an item is not available, an error message is sent to Yves. -* Checkout pre-condition when an order is placed in the last step. `Spryker\Zed\Availability\Communication\Plugin\ProductsAvailableCheckoutPreConditionPlugin` checks all items in cart. If any of them is not available anymore, order placing is aborted and error message is displayed. - -### "Reserved" Flag -When an order is placed, payment state machine is executed and an item is moved through states. Some states have a “reserved” flag which means that the state influences the item availability. - -When items are moved to state with the "reserved" flag, `ReservationHandlerPluginInterface::handle()` is triggered. This call means that the product availability has to be updated. State machine is also tracking products in the "reserved" state, and the database table `spy_oms_product_reservation` is used for this. - -Below you can see dummy payment state machine, which is a sample implementation with the "reserved" flags: -![Reserved flags](https://spryker.s3.eu-central-1.amazonaws.com/docs/Features/Inventory+Management/Stock+and+Availability+Management/dummy_payment.jpg) - -### Availability Storage - -AvailabilityStorage publishes all availability information for abstract and concrete products. Items are grouped by abstract product. This process is handled by [Publish and Synchronize](/docs/scos/dev/back-end-development/data-manipulation/data-publishing/publish-and-synchronization.html). - -Events are generated in these two cases: - -| Case | Details | -| --- | --- | -| Case 1 | If availability amount was equal to 0 and now it’s more than 0, the event is triggered. | -| Case 2 | If availability amount was more than 0 and now it’s equal to 0, the event is triggered. | - -The default behavior is having **available** or not available **status** set for product while the amount of product does not matter. Even though events are triggered when amount is changed from 0 to N or from N to 0, it's not the amount change that triggers events, but the change of product status. You can change the default behavior for the events to be triggered whenever the amount is changed. For more information, see [HowTo: Change the Default Behavior of Event Triggering in the AvailabilityStorage Module](/docs/pbc/all/warehouse-management-system/{{page.version}}/base-shop/extend-and-customize/configure-product-availability-to-be-published-on-product-amount-changes.html). - -Published data example in JSON. - -```json -{ - "id_availability_abstract": 1, - "fk_store": 1, - "abstract_sku": "001", - "quantity": 10, - "SpyAvailabilities": [ - { - "id_availability": 1, - "fk_availability_abstract": 1, - "fk_store": 1, - "is_never_out_of_stock": false, - "quantity": 10, - "sku": "001_25904006" - } - ], - "Store": { - "id_store": 1, - "name": "DE" - }, - "id_product_abstract": 1, - "_timestamp": 1554886713.989162 -} -``` - -This information is used on product details page when **Add to cart** is rendered. - -### Availability Calculation - -Product availability can have flag `is_never_out_of_stock`. This indicates that the product is always available for sale and does not have a finite stock. In this situation the availability calculation is not needed anymore. - -`Availability = max(0, sum of all stock types(Stock) - Reserved Items)` -In state machine items get reserved for an open order. There are certain states that release item, for example when payment fails and order is canceled. But if order is successfully fulfilled and item is delivered, item stays reserved till the next stock update. - -Stock update triggers the event `stock update`. For example, in our dummy payment’s implementation this will move the items from “Shipped” state to next state. As the consecutive state is not reserved, the items that have already been shipped, will not be reserved any more. - -### Import / Change Stock - -It’s possible to use `vendor/bin/console data:import:product-stock` command to import stocks into database. The default stock importer uses `csv` file from `src/Pyz/Zed/Updater/Business/Internal/data/import/product_stock.csv` which imports stocks. - -The Back Office is provided to allow assigning stocks to products. See [Availability](/docs/scos/user/back-office-user-guides/{{page.version}}/catalog/availability/managing-products-availability.html) for details on how to manage product stocks in the Back Office. - -Stock update considers the stock from the stock file to be the absolute value. On stock update, the stock is overwritten with the values from the file. If a certain product does not have a record in the stock file, then it is considered that the stock of this product does not have to be updated. - -### Availability Per Store - -Since Availability module version 6.* we have added support for multi-store availability. That means that you can now have availability calculated per store basis. In the Administration Interface you can change from which store you want to see availability. - -The main change in Availability in that `spy_availability` and `spy_availability_abstract` now have foreign key to store table which indicates to which store it is applicable. Reservations in OMS have also undergone a few changes to support multiple multi-store scenarios. - -With Spryker shop, you can actually have several scenarios pertain to product warehouses in a multi-store environment. Each scenario is configured and enabled manually. The possible scenarios are listed below. - -1. Each store has own database and own warehouse. This means that stores have separate independent stocks and therefore separated product reservations and availability. -![Scenario 1](https://spryker.s3.eu-central-1.amazonaws.com/docs/Features/Inventory+Management/Stock+and+Availability+Management/Scenario_1.png) - -2. Each store has own database, but warehouse is shared between the stores. This means that reservation and availabilities are synced.For the case when stores do not share database, but reservations must be shared, three new database tables have been created. -![Scenario 2](https://spryker.s3.eu-central-1.amazonaws.com/docs/Features/Inventory+Management/Stock+and+Availability+Management/Scenario_2.png) - -* spy_oms_product_reservation_store - this table will store reservation request from other stores. -* spy_oms_reservation_change_version - this table will store information about when last reservation occurred. -* spy_oms_reservation_last_exported_version - this table will store information about when reservations were exported to other stores last time. - -Also, we provide a few plugins to help implement synchronization: - -* `\Spryker\Zed\Oms\Communication\Plugin\Oms\ReservationHandler\ReservationVersionHandlerPlugin` - this plugin will be called when customer makes an order and reservation is made. It will store reservation to spy_oms_reservation_change_version database table. This plugin should be registered in `\Pyz\Zed\Oms\OmsDependencyProvider::getReservationHandlerPlugins` plugin stack. -* `\Spryker\Zed\Oms\Communication\Plugin\Oms\ReservationImport\ReservationExportPlugin` - is the plugin which will be called when reservation export to other store is called. This plugin should decide if the export should be accepted. The delivery mechanism is not provided, it could be done with files or queue. For example, when ReservationExportPlugin is called, you could write a file copy to other server and then read it there. Similar would be with queue "publish", then "consume" on other end. -* When reading export data on other store, you can then use `\Spryker\Zed\Oms\Business\OmsFacadeInterface::importReservation` which will store reservation information to `spy_oms_product_reservation_store` table and update all timestamps accordingly. - -There is a console command to export all reservations: `\Spryker\Zed\Oms\Communication\Console\ExportReservationConsole`. It will trigger `ReservationExportPlugin` with reservations amounts to export. This command can be added to cronjob and run periodically. - -3. Database is shared between stores, but warehouses are separated by store. This means, that reservations and availability are separated per store and the warehouses (and their stocks) belong to specific stores. Assume there are DE and AT stores. DE store has Warehouse 1 and Warehouse 2, and AT has Warehouse 2. If user wants to buy some product from Warehouse 2 which is not available for AT store, but available in DE store, he/she would not be able to buy it in AT store (since the warehouses are separated), but could buy it in DE store (since the database is shared and it’s possible to switch between stores). When orders are placed, each reservation in -![Scenario 3](https://spryker.s3.eu-central-1.amazonaws.com/docs/Features/Inventory+Management/Stock+and+Availability+Management/Scenario_3.png) - -`spy_oms_product_reservation` table will also store information about store, the relation `fk_store`, to `spy_store` table. When adding a product to cart and displaying it there, the store identifier `fk_store` is used to define the correct availability value for the specific store. -From Availability module version 6.0 we have added a new configuration option to store.php file to have information about store with shared persistence. Add `'sharedPersistenceWithStores' => []` to `stores.php`, where array is store names. - -For example: - -```json - 'storesWithSharedPersistence' => ['DE', 'AT'] - $stores['DE'] = [ - ... //other options - 'storesWithSharedPersistence' => ['AT'] - ] - $stores['AT'] = [ - ... //other options - 'storesWithSharedPersistence' => ['DE'] - ] -``` - -That means that DE and AT both share database. This information will be used when updating OMS reservations. - -4. Database is shared between stores, warehouses are shared by the stores. In this case the reservation must be synchronized. -![Scenario 4](https://spryker.s3.eu-central-1.amazonaws.com/docs/Features/Inventory+Management/Stock+and+Availability+Management/Scenario_4.png) - -When placing an order in Store A, the reservation is stored with the store identifier `fk_store`. An event is created and published in the queue, and synchronization with Store B happens. See scenario 3 above for information about how reservations are handled as well learn about the new configuration option for shared database in the `store.php` file. - -To learn more about the feature and to find out how end users use it, see [Inventory Management feature overview](/docs/scos/user/features/{{page.version}}/inventory-management-feature-overview.html) for business users. - - - -## Related Developer documents - -| INSTALLATION GUIDES | GLUE API GUIDES | DATA IMPORT | -|---|---|---| -| [Inventory Management feature integration](/docs/scos/dev/feature-integration-guides/{{page.version}}/inventory-management-feature-integration.html) | [Retrieving abstract product availability](/docs/scos/dev/glue-api-guides/{{page.version}}/managing-products/abstract-products/retrieving-abstract-product-availability.html) | [File details: product_stock.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/catalog-setup/stocks/file-details-product-stock.csv.html) | -| [Glue API: Inventory Management feature integration](/docs/scos/dev/feature-integration-guides/{{page.version}}/glue-api/glue-api-inventory-management-feature-integration.html) | [Retrieving concrete product availability](/docs/scos/dev/glue-api-guides/{{page.version}}/managing-products/concrete-products/retrieving-concrete-product-availability.html) | [File details: warehouse_address.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/commerce-setup/file-details-warehouse-address.csv.html) | -| | | [File details: warehouse_store.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/commerce-setup/file-details-warehouse-store.csv.html) | diff --git a/docs/scos/dev/feature-walkthroughs/202005.0/mailing-and-notifications-feature-walkthrough.md b/docs/scos/dev/feature-walkthroughs/202005.0/mailing-and-notifications-feature-walkthrough.md deleted file mode 100644 index 466112ec897..00000000000 --- a/docs/scos/dev/feature-walkthroughs/202005.0/mailing-and-notifications-feature-walkthrough.md +++ /dev/null @@ -1,20 +0,0 @@ ---- -title: Mailing & Notifications feature walkthrough -last_updated: Aug 13, 2021 -description: The Mailing & Notifications feature allows you to manage newsletters and notifications -template: concept-topic-template ---- - -The _Mailing & Notifications_ feature allows you to manage newsletters and notifications. - - -To learn more about the feature and to find out how end users use it, see [Mailing & Notifications feature overview](/docs/scos/user/features/{{page.version}}/mailing-and-notifications-feature-overview.html) for business users. - - -## Related Developer documents - - | TUTORIALS AND TUTORIALS AND HOWTOS | -|---------| -| [HowTo: Create and Register a MailTypePlugin](/docs/scos/dev/tutorials-and-howtos/howtos/howto-create-and-register-a-mailtypeplugin.html) | -| [HowTo: Create and Register a Mail Provider](/docs/scos/dev/tutorials-and-howtos/howtos/howto-create-and-register-a-mail-provider.html) | -| [Tutorial: Sending an email](/docs/scos/dev/tutorials-and-howtos/introduction-tutorials/tutorial-sending-an-email.html) | diff --git a/docs/scos/dev/feature-walkthroughs/202005.0/merchant-feature-walkthrough.md b/docs/scos/dev/feature-walkthroughs/202005.0/merchant-feature-walkthrough.md deleted file mode 100644 index 1d53903d729..00000000000 --- a/docs/scos/dev/feature-walkthroughs/202005.0/merchant-feature-walkthrough.md +++ /dev/null @@ -1,20 +0,0 @@ ---- -title: Merchant feature walkthrough -description: In the context of SCOS B2B and Marketplaces, merchant is the selling company. -template: concept-topic-template ---- - -The *Merchant* feature provides the core functionality for the SCOS B2B and Marketplace with the basic create-read-update operations over the Merchant entity. -You cannot delete a merchant, but only deactivate. - -## Main Merchant feature modules - -| NAME | Description | -| -------------------- | ---------- | -| [Merchant](https://github.com/spryker/merchant) | Keeps the core create-read-update functionality of a merchant. | - -## Entity diagram - -The following schema illustrates relations in the Merchant entity: - -![Entity diagram](https://confluence-connect.gliffy.net/embed/image/47ca3486-ab11-49f5-801e-6043b7a7767a.png?utm_medium=live&utm_source=custom) diff --git a/docs/scos/dev/feature-walkthroughs/202005.0/merchant-product-restrictions-feature-walkthrough/merchant-product-restrictions-feature-walkthrough.md b/docs/scos/dev/feature-walkthroughs/202005.0/merchant-product-restrictions-feature-walkthrough/merchant-product-restrictions-feature-walkthrough.md deleted file mode 100644 index a5c79a29165..00000000000 --- a/docs/scos/dev/feature-walkthroughs/202005.0/merchant-product-restrictions-feature-walkthrough/merchant-product-restrictions-feature-walkthrough.md +++ /dev/null @@ -1,30 +0,0 @@ ---- -title: Merchant Product Restrictions feature walkthrough -last_updated: Aug 13, 2021 -description: The Merchant Product Restrictions feature allows merchants to define what products are available to each of their B2B customers -template: concept-topic-template ---- - -The _Merchant Product Restrictions_ feature allows merchants to define what products are available to each of their B2B customers. - - -To learn more about the feature and to find out how end users use it, see [Merchant Product Restrictions feature overview](/docs/scos/user/features/{{page.version}}/merchant-product-restrictions-feature-overview.html) for business users. - - -## Entity diagram - -The following schema illustrates product restrictions relations within the Merchant concept: - -
    - -![-entity-diagram](https://spryker.s3.eu-central-1.amazonaws.com/docs/Features/Company+Account+Management/Product+Restrictions+from+Merchant+to+Buyer/Product+Restrictions+from+Merchant+to+Buyer+Overview/product-restrictions-model.png) - -
    - - -## Related Developer documents - -| INSTALLATION GUIDES | -|---------| -| [Merchant B2B Contracts feature integration](/docs/scos/dev/feature-integration-guides/{{page.version}}/merchant-b2b-contracts-feature-integration.html) | -| [Merchant feature integration](/docs/scos/dev/feature-integration-guides/{{page.version}}/merchant-feature-integration.html) | diff --git a/docs/scos/dev/feature-walkthroughs/202005.0/merchant-product-restrictions-feature-walkthrough/restricted-products-behavior.md b/docs/scos/dev/feature-walkthroughs/202005.0/merchant-product-restrictions-feature-walkthrough/restricted-products-behavior.md deleted file mode 100644 index 3e2a449e720..00000000000 --- a/docs/scos/dev/feature-walkthroughs/202005.0/merchant-product-restrictions-feature-walkthrough/restricted-products-behavior.md +++ /dev/null @@ -1,241 +0,0 @@ ---- -title: Restricted Products Behavior -description: In this article, you can find commonly encountered cases of product restrictions behavior. -last_updated: Apr 3, 2020 -template: feature-walkthrough-template -originalLink: https://documentation.spryker.com/v5/docs/restricted-products-behavior -originalArticleId: 8653892d-550f-4087-af84-c2594a0c6ba3 -redirect_from: - - /v5/docs/restricted-products-behavior - - /v5/docs/en/restricted-products-behavior -related: - - title: Creating Product Lists - link: docs/scos/user/back-office-user-guides/page.version/catalog/product-lists/creating-product-lists.html - - title: Managing Product Lists - link: docs/scos/user/back-office-user-guides/page.version/catalog/product-lists/managing-product-lists.html ---- - -On this page, you can find commonly encountered cases of product restrictions behavior. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameBlacklist/WhitelistDescriptionExample
    Product CatalogBlacklist -

    If the merchant relation has a blacklist, all buyers in the associated business units can not interact with any products from the blacklist. The blacklisted products are excluded from view, search, existing lists and carts. If the category is a part of a blacklist, it is greyed out in the shop navigation, however, you can change this setting on the project level so, for example, that the category is not greyed out.

    -

    All products assigned to a category are also included in the black/white list.

    -
    - -

    In case the products are added to the category after it was included in a list, it is reflected after some time with the help of publish & sync process.

    -
    Upon entering the direct link for the blacklisted product, the shop visitor will see 404 Not found page.
    WhitelistIf the merchant relation has a whitelist, all buyers in the associated business units can interact only with the whitelisted products, except if they are also blacklisted. If a category is not part of any whitelist (if a whitelist exists), they are greyed out in navigation (you can also change this setting on the project level so, for example, that category is not greyed out).
    Blacklist and WhitelistIf a product is in a whitelist as well as in a blacklist, Blacklist wins.N/A
    Neither blacklist nor whitelistIf a merchant relation has neither black nor whitelist, all associated business units will not have any product restrictions.N/A
    Multiple categoriesIn case a product is a part of multiple categories and one category is a part of a list, the product is also a part of that list.N/A
    Shopping cartBlacklistIn case the products that already exist in carts get blacklisted, they are automatically removed from the cart.
    -

    Reorder

    -
    -

    Blacklist

    -
    -

    During the reorder process, products that are restricted but exist in a previous order are automatically removed from the cart.

    -
    -

    -

    In the Order History, the customer is still able to see the order details even if the previously ordered items are currently blacklisted.

    -
    -

    Shopping List

    -
    -

    Blacklist

    -
    -

    If the product, that is added to the shopping list, has been blacklisted, it is displayed as if it is unavailable.

    -
    -

    -
    -

    Alternative products

    -
    -

    Blacklist

    -
    -

    If a product that has been added to a list of the alternative products, is restricted, it is not suggested on product pages.

    -
    -

    -
    -

    Product Groups

    -
    -

    Blacklist

    -
    -

    If any of the products that are added to a product group, is restricted, it is not displayed in the Shop Application.

    -
    -

    -
    -

    Related Products

    -
    -

    Blacklist

    -
    -

    If any of the related products is added to a blacklist - it is not displayed in the Shop Application.

    -
    -

    -
    -

    Product Sets

    -
    -

    Whitelist

    -
    -

    In case any of the products in the product set are added to a whitelist - the other products are not displayed in the shop application.

    -
    -

    -
    -

    Blacklist

    -
    -

    In the case with the blacklist, when the whole product set is blacklisted - This product is not available message is shown on the product detail page, though the product set is still displayed on the Product Sets page.

    -
    -

    -
    -

    CMS

    -
    -

    Blacklist

    -
    -

    If the products from CMS block have been added to a blacklist - they are not displayed on the website.

    -
    -

    -
    -

    Promotional Products

    -
    -

    Blacklist

    -
    -

    If any of the promotional products are restricted, they are not available for purchase.

    -

    If all the variants for a promotional product are restricted - the restricted product is not shown at all.

    -
    -

    -
    -

    Product Bundles

    -
    -

    Blacklist

    -
    -

    If you want to restrict the whole product bundle, a bundle SKU needs to be entered in the blacklist rule. If any of the products contained in a product bundle are restricted, the whole bundle is still available for purchase.

    -
    -

    Business on Behalf

    -
    -

    Blacklist/Whitelist

    -
    -

    When switching Company User accounts by using the Business on Behalf feature a company user has the product restrictions lists that are assigned to the new company user they are logged in into.

    -
    -

    N/A

    -
    -

    Product search widget

    -
    -

    Blacklist

    -
    -

    If there are products that are blacklisted, they do not appear in search results in the search widget.

    -
    -

    [An image showing a restricted product in the Admin Interface and searching for this product in Yves]

    -
    - -{% info_block infoBox %} -If there are cases you would like to get overview of within Product Restrictions feature, email us. -{% endinfo_block %} diff --git a/docs/scos/dev/feature-walkthroughs/202005.0/multiple-carts-feature-walkthrough.md b/docs/scos/dev/feature-walkthroughs/202005.0/multiple-carts-feature-walkthrough.md deleted file mode 100644 index 081c247ebe1..00000000000 --- a/docs/scos/dev/feature-walkthroughs/202005.0/multiple-carts-feature-walkthrough.md +++ /dev/null @@ -1,20 +0,0 @@ ---- -title: Multiple Carts feature walkthrough -last_updated: Aug 18, 2021 -description: The Multiple Carts feature allows creating and managing one or multiple shopping carts in one customer account. -template: concept-topic-template ---- - -The _Multiple Carts_ feature allows you to create and manage one or multiple shopping carts in one customer account. - - -To learn more about the feature and to find out how end users use it, see [Multiple Carts feature overview](/docs/scos/user/features/{{page.version}}/multiple-carts-feature-overview.html) for business users. - - -## Related Developer documents - -|INSTALLATION GUIDES | -|---------| -| [Multiple Carts feature integration](/docs/scos/dev/feature-integration-guides/{{page.version}}/multiple-carts-feature-integration.html) | -| [Multiple carts + Quick Order feature integration](/docs/scos/dev/feature-integration-guides/{{page.version}}/multiple-carts-quick-order-feature-integration.html) | -| [Multiple carts + Reorder feature integration](/docs/scos/dev/feature-integration-guides/{{page.version}}/multiple-carts-reorder-feature-integration.html) | diff --git a/docs/scos/dev/feature-walkthroughs/202005.0/navigation-feature-walkthrough/navigation-feature-walkthrough.md b/docs/scos/dev/feature-walkthroughs/202005.0/navigation-feature-walkthrough/navigation-feature-walkthrough.md deleted file mode 100644 index dac1bbfffc6..00000000000 --- a/docs/scos/dev/feature-walkthroughs/202005.0/navigation-feature-walkthrough/navigation-feature-walkthrough.md +++ /dev/null @@ -1,20 +0,0 @@ ---- -title: Navigation feature walkthrough -last_updated: Aug 13, 2021 -description: The Navigation feature enables product catalog managers to create intuitive navigation elements and display them on the Storefront -template: concept-topic-template ---- - -The _Navigation_ feature enables product catalog managers to create intuitive navigation elements and display them on the Storefront. - - -To learn more about the feature and to find out how end users use it, see [Navigation feature overview](/docs/scos/user/features/{{page.version}}/navigation-feature-overview.html) for business users. - - -## Related Developer documents - -| INSTALLATION GUIDES | GLUE API GUIDES | DATA IMPORT | REFERENCES | -|---|---|---|---| -| [Navigation feature integration](/docs/scos/dev/feature-integration-guides/{{page.version}}/navigation-feature-integration.html) | [Retrieving navigation trees](/docs/scos/dev/glue-api-guides/{{page.version}}/retrieving-navigation-trees.html) | [File details: navigation.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/navigation-setup/file-details-navigation.csv.html) | [Navigation module: Reference information](/docs/scos/dev/feature-walkthroughs/{{page.version}}/navigation-feature-walkthrough/navigation-module-reference-information.html) | -| [Glue API: Navigation feature integration](/docs/scos/dev/feature-integration-guides/{{page.version}}/glue-api/glue-api-navigation-feature-integration.html) | | [File details: navigation_node.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/navigation-setup/file-details-navigation-node.csv.html) | | -| [CMS feature integration](/docs/scos/dev/feature-integration-guides/{{page.version}}/cms-feature-integration.html) | | | | diff --git a/docs/scos/dev/feature-walkthroughs/202005.0/navigation-feature-walkthrough/navigation-module-reference-information.md b/docs/scos/dev/feature-walkthroughs/202005.0/navigation-feature-walkthrough/navigation-module-reference-information.md deleted file mode 100644 index c4f0e9a53d5..00000000000 --- a/docs/scos/dev/feature-walkthroughs/202005.0/navigation-feature-walkthrough/navigation-module-reference-information.md +++ /dev/null @@ -1,51 +0,0 @@ ---- -title: Navigation module - reference information -description: The module provides database structure and a public API to manage what’s in the database, and a small toolkit for rendering navigation menus in the frontend -last_updated: Aug 27, 2020 -template: feature-walkthrough-template -originalLink: https://documentation.spryker.com/v6/docs/navigation-module-reference-information -originalArticleId: 61208702-976f-4037-a551-093ee0162ac6 -redirect_from: - - /v5/docs/navigation-module-reference-information - - /v5/docs/en/navigation-module-reference-information - - /docs/scos/dev/feature-walkthroughs/201907.0/navigation-feature-walkthrough/navigation-module-reference-information.html -related: - - title: Managing Navigation Elements - link: docs/scos/user/back-office-user-guides/page.version/content/navigation/managing-navigation-elements.html - - title: Migration Guide - Navigation - link: docs/pbc/all/content-management-system/{{page.version}}/base-shop/install-and-upgrade/upgrade-modules/upgrade-the-navigation-module.html - - title: Migration Guide - NavigationGui - link: docs/pbc/all/content-management-system/page.version/base-shop/install-and-upgrade/upgrade-modules/upgrade-the-navigationgui-module.html - - title: Navigation Module Integration - link: docs/scos/dev/feature-integration-guides/page.version/navigation-module-integration.html ---- - -## Overview -The `Navigation` module manages multiple navigation menus that can be displayed on the frontend (Yves). Every navigation section can contain its own nested structure of navigation nodes. Navigation nodes have types that help define what kind of link they represent. - -The following node types are available: - -* **Label**: These nodes do not link to any specific URL, they are used for grouping other nodes. -* **Category**: Nodes can be assigned to category node URLs. -* **CMS Page**: Nodes can be assigned to CMS page URLs. -* **Link**: These nodes link to internal pages in Yves, for example, login, registration, etc. -* **External URL**: These nodes link to external URLs (typically tabs opened in a new browser). -You can control and adjust Navigation node appearance and add icons by assigning custom CSS classes to them. - -This feature is shipped with three modules: - -* **Navigation module** provides database structure and a public API to manage what’s in the database. It also provides a small toolkit for rendering navigation menus in the frontend. -* **NavigationGui** module provides a Zed UI to manage navigation menus. -* **NavigationCollector** module provides full collector logic for exporting navigation menus to the KV storage (Redis). - -## Under the Hood -### Database Schema -The Navigation module provides the `spy_navigation` table that stores navigation menus. They have a `name` field which is only used for backend display and they also have a `key` field used to reference the navigation menus from Yves. - -Every navigation entity contains some nodes stored in the `spy_navigation_node` table. The structure of the navigation tree depends on the `fk_parent_navigation_node` and the position fields which define if a node has a parent on its level, in what `position` they are ordered. Each navigation node has attributes that can be different per displayed locale. This information is stored in the `spy_navigation_node_localized_attributes` table. - -The `valid_from`, `valid_to`, and `is_active` fields allow to toggle the node's and its descendants visibility. - -![Navigation database schema](https://spryker.s3.eu-central-1.amazonaws.com/docs/Features/Navigation/Navigation+Module/navigation_db_schema_2_0.png) - - diff --git a/docs/scos/dev/feature-walkthroughs/202005.0/order-management-feature-walkthrough/custom-order-reference-module-relations.md b/docs/scos/dev/feature-walkthroughs/202005.0/order-management-feature-walkthrough/custom-order-reference-module-relations.md deleted file mode 100644 index 95cf9777b04..00000000000 --- a/docs/scos/dev/feature-walkthroughs/202005.0/order-management-feature-walkthrough/custom-order-reference-module-relations.md +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: Custom Order Reference- Module Relations -last_updated: Sep 14, 2020 -template: feature-walkthrough-template -originalLink: https://documentation.spryker.com/v5/docs/custom-order-reference-module-relations -originalArticleId: 6621794b-7422-4037-a545-e9efcf9e55a5 -redirect_from: - - /v5/docs/custom-order-reference-module-relations - - /v5/docs/en/custom-order-reference-module-relations ---- - -The module relations for the [Custom Order Reference](/docs/scos/user/features/{{page.version}}/order-management-feature-overview/custom-order-reference-overview.html) feature can be represented like this: - -![Custom order Reference Module Relations](https://confluence-connect.gliffy.net/embed/image/48319fea-1661-457f-9b4f-b8029dea8e70.png?utm_medium=live&utm_source=custom) diff --git a/docs/scos/dev/feature-walkthroughs/202005.0/order-management-feature-walkthrough/order-management-feature-wakthrough.md b/docs/scos/dev/feature-walkthroughs/202005.0/order-management-feature-walkthrough/order-management-feature-wakthrough.md deleted file mode 100644 index be67a99c918..00000000000 --- a/docs/scos/dev/feature-walkthroughs/202005.0/order-management-feature-walkthrough/order-management-feature-wakthrough.md +++ /dev/null @@ -1,43 +0,0 @@ ---- -title: Order Management feature walkthrough -last_updated: Aug 18, 2021 -description: The Order Management feature adds a collection of functionalities that allow you to see the quantity of the order items, their status, and how long they exist. -template: concept-topic-template ---- - -The _Order Management_ feature adds a collection of functionalities that allow you to see the quantity of the order items, their status, and how long they exist. Also, you can view details per status and order page. - - -To learn more about the feature and to find out how end users use it, see [Order Management](/docs/scos/user/features/{{page.version}}/order-management-feature-overview/order-management-feature-overview.html) for business users. - - -## Entity diagram - -The following schema illustrates the module relations of the Custom Order Reference feature: - -
    - -![custom-order-reference-module-relations](https://confluence-connect.gliffy.net/embed/image/48319fea-1661-457f-9b4f-b8029dea8e70.png?utm_medium=live&utm_source=custom) - -
    - -The following scheme illustrates relations between **Shipment**, **ShipmentGui**, and **Sales** modules: - -
    - -![Module relations](https://spryker.s3.eu-central-1.amazonaws.com/docs/Features/Order+Management/Split+Delivery/split-delivery-module-relations.png) - -
    - -## Related Developer documents - -| INSTALLATION GUIDES | UPGRADE GUIDES| GLUE API GUIDES | TUTORIALS AND HOWTOS | REFERENCES | -|---|---|---|---|---| -| [Custom Order Reference feature integration](/docs/scos/dev/feature-integration-guides/{{page.version}}/custom-order-reference-feature-integration.html) | [Split delivery migration concept](/docs/scos/dev/migration-concepts/split-delivery-migration-concept.html) | [Retrieving orders](/docs/scos/dev/glue-api-guides/{{page.version}}/retrieving-orders.html) | [HowTo: Disable split delivery in Yves interface](/docs/scos/dev/tutorials-and-howtos/howtos/feature-howtos/howto-disable-split-delivery-in-yves-interface.html) | [Sales module: reference information](/docs/scos/dev/feature-walkthroughs/{{page.version}}/order-management-feature-walkthrough/sales-module-reference-information.html) | -| [Order Management feature integration](/docs/scos/dev/feature-integration-guides/{{page.version}}/order-management-feature-integration.html) | | | [HowTo: Emailing invoices using BCC](/docs/scos/dev/tutorials-and-howtos/howtos/feature-howtos/howto-emailing-invoices-using-bcc.html) | [Custom order reference- module relations](/docs/scos/dev/feature-walkthroughs/{{page.version}}/order-management-feature-walkthrough/custom-order-reference-module-relations.html) | -| [Quick Order + Non-splittable Products feature integration](/docs/scos/dev/feature-integration-guides/{{page.version}}/quick-add-to-cart-non-splittable-products-feature-integration.html) | | | | | -| [Glue API: Checkout feature integration](/docs/scos/dev/feature-integration-guides/{{page.version}}/glue-api/glue-api-checkout-feature-integration.html) | | | | | -|[ Glue API: Company Account feature integration](/docs/scos/dev/feature-integration-guides/{{page.version}}/glue-api/glue-api-company-account-feature-integration.html) | | | | | -| [Glue API: Customer Account Management feature integration](/docs/scos/dev/feature-integration-guides/{{page.version}}/glue-api/glue-api-customer-account-management-feature-integration.html) | | | | | -| [Glue API: Order Management feature integration](/docs/scos/dev/feature-integration-guides/{{page.version}}/glue-api/glue-api-order-management-feature-integration.html) | | | | | -| [Glue API: Shipment feature integration](/docs/scos/dev/feature-integration-guides/{{page.version}}/glue-api/glue-api-shipment-feature-integration.html) | | | | | diff --git a/docs/scos/dev/feature-walkthroughs/202005.0/order-management-feature-walkthrough/sales-module-reference-information.md b/docs/scos/dev/feature-walkthroughs/202005.0/order-management-feature-walkthrough/sales-module-reference-information.md deleted file mode 100644 index b14af9ce4b8..00000000000 --- a/docs/scos/dev/feature-walkthroughs/202005.0/order-management-feature-walkthrough/sales-module-reference-information.md +++ /dev/null @@ -1,42 +0,0 @@ ---- -title: Sales module- reference information -description: The module provides order management functionality obtained through the ZED UI that renders orders with details and the Client API to get customer orders -last_updated: Apr 3, 2020 -template: feature-walkthrough-template -originalLink: https://documentation.spryker.com/v5/docs/sales -originalArticleId: 7985e95a-f58b-4c1a-af9b-86cfaee4617d -redirect_from: - - /v5/docs/sales - - /v5/docs/en/sales - - /v5/docs/sales-5-0 - - /v5/docs/en/sales-5-0 ---- - -The Sales module provides the order management functionality. The functionality is obtained through the ZED UI that renders orders with orders details and the Client API to get customer orders. - -## Getting Totals for Order -To get the Order with totals, the facade method SalesFacade::getOrderByIdSalesOrder() creates an order level which returns the OrderTransfer with a hydrated grandTotal, subtotal, expense, discounts and more - -{% info_block warningBox %} -This is an improvement from the Sales 5.0 version where you had to use `SalesAggregatorFacade` to get totalks. This version has been deprecated. -{% endinfo_block %} - -## Persisting Order Calculated Values -All calculated values are persisted now, when order are first placed. The values are stored by orderSaver plugins from checkout bundle. Check `\Pyz\Zed\Checkout\CheckoutDependencyProvider::getCheckoutOrderSavers` for currently available plugins. - -Some values can change during time when order refunded or partially refunded. Then `canceled_amount` and `refundable_amount` are recalculated and new values is persisted. At the same moment totals also change, but it does not overwrite old entry, but creates new row in `spy_sales_order_total` with this you have a history of order totals from the time order was placed. - -The following ER diagram shows persisted calculated values: -![ER diagram](https://spryker.s3.eu-central-1.amazonaws.com/docs/Features/Order+Management/Sales/sales_persisting_order_values.png) - -## Extension Points -HydrateOrderPluginInterface - its an action which happens when `SalesFacade::getOrderByIdSalesOrder()` method is called. This means that you may want to enrich you `OrderTransfer` with additional data. This plugins accepts passes `OrderTransfer` for additional population. - -There are already few plugins provided: - -* `DiscountOrderHydratePlugin` - hydrates `OrderTransfer` with discount related data as it was stored when order is placed. -* `ProductOptionOrderHydratePlugin` - hydrates `OrderTransfer` with product option related data. -* `ProductBundleOrderHydratePlugin` - hydrates `OrderTransfer` with product bundle related data. -* `ShipmentOrderHydratePlugin` - hydrates `OrderTransfer` with shipment related data. - - diff --git a/docs/scos/dev/feature-walkthroughs/202005.0/packaging-units-feature-walkthrough.md b/docs/scos/dev/feature-walkthroughs/202005.0/packaging-units-feature-walkthrough.md deleted file mode 100644 index deb5a461d2b..00000000000 --- a/docs/scos/dev/feature-walkthroughs/202005.0/packaging-units-feature-walkthrough.md +++ /dev/null @@ -1,19 +0,0 @@ ---- -title: Packaging Unit feature walkthrough -last_updated: Aug 18, 2021 -description: The Packaging Unit feature defines if a packaging unit holds a fixed amount of products or if customers can buy any amount of products in this packaging unit. Also, it allows applying amount restrictions to products -template: concept-topic-template ---- - -The _Packaging Units_ feature defines if a packaging unit holds a fixed amount of products or if customers can buy any amount of products in this packaging unit. Also, it allows applying amount restrictions to products. - - -To learn more about the feature and to find out how end users use it, see [Packaging Units feature overview](/docs/scos/user/features/{{page.version}}/packaging-units-feature-overview.html) for business users. - - -## Related Developer documents - -| INSTALLATION GUIDES | UPGRADE GUIDES| TUTORIALS AND HOWTOS | -|---------|---------|---------| -| [Product Packaging Unit feature integration](/docs/scos/dev/feature-integration-guides/{{page.version}}/packaging-units-feature-integration.html) | [Decimal Stock migration concept](/docs/scos/dev/migration-concepts/decimal-stock-migration-concept.html) | [HowTo: Import packaging units](/docs/scos/dev/tutorials-and-howtos/howtos/feature-howtos/data-imports/howto-import-packaging-units.html) | -| | | [HowTo: Integrate and use precise decimal numbers](/docs/scos/dev/tutorials-and-howtos/howtos/howto-integrate-and-use-precise-decimal-numbers.html) | diff --git a/docs/scos/dev/feature-walkthroughs/202005.0/payments-feature-walkthrough.md b/docs/scos/dev/feature-walkthroughs/202005.0/payments-feature-walkthrough.md deleted file mode 100644 index c91016823bd..00000000000 --- a/docs/scos/dev/feature-walkthroughs/202005.0/payments-feature-walkthrough.md +++ /dev/null @@ -1,31 +0,0 @@ ---- -title: Payments feature walkthrough -last_updated: Aug 18, 2021 -description: The Payments feature allows customers to pay for orders with none, one, or multiple payment methods during the checkout process. -template: concept-topic-template ---- - -The _Payments_ feature allows customers to pay for orders with none, one, or multiple payment methods during the checkout process. - - -To learn more about the feature and to find out how end users use it, see [Payments feature overview](/docs/scos/user/features/{{page.version}}/payments-feature-overview.html) for business users. - - -## Entity diagram - -The following schema illustrates relations between the _Payment_, _PaymentGui_, and _PaymentDataImport_ modules: - -
    - -![payment-methods-modules-scheme.png](https://spryker.s3.eu-central-1.amazonaws.com/docs/Features/Payment/Payment+Methods+Overview/payment-methods-modules-scheme.png) - -
    - - -## Related Developer documents - -| INSTALLATION GUIDES | UPGRADE GUIDES | GLUE API GUIDES | DATA IMPORT | TUTORIALS AND HOWTOS | REFERENCES | -|---|---|---|---|---|---| -| [Payments feature integration](/docs/scos/dev/feature-integration-guides/{{page.version}}/payments-feature-integration.html) | Payment migration guide | [Updating payment data](/docs/scos/dev/glue-api-guides/{{page.version}}/checking-out/updating-payment-data.html) | [File details: payment_method.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/commerce-setup/file-details-payment-method-store.csv.html) | [HowTo: Hydrate payment methods for an order](/docs/scos/dev/tutorials-and-howtos/howtos/howto-hydrate-payment-methods-for-an-order.html) | [Payment partners](/docs/scos/user/technology-partners/{{page.version}}/payment-partners/adyen.html) | -| | | | [File details: payment_method_store.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/commerce-setup/file-details-payment-method-store.csv.html) | [Implementing Direct Debit Payment](/docs/scos/dev/back-end-development/data-manipulation/payment-methods/direct-debit-example-implementation/implementing-direct-debit-payment.html) | | -| | | | | [Interact with third party payment providers using Glue API](/docs/scos/dev/tutorials-and-howtos/advanced-tutorials/glue-api/tutorial-interacting-with-third-party-payment-providers-via-glue-api.html) | | diff --git a/docs/scos/dev/feature-walkthroughs/202005.0/persistent-cart-sharing-feature-walkthrough/persistent-cart-sharing-feature-module-relations.md b/docs/scos/dev/feature-walkthroughs/202005.0/persistent-cart-sharing-feature-walkthrough/persistent-cart-sharing-feature-module-relations.md deleted file mode 100644 index e61a83b982e..00000000000 --- a/docs/scos/dev/feature-walkthroughs/202005.0/persistent-cart-sharing-feature-walkthrough/persistent-cart-sharing-feature-module-relations.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -title: Persistent Cart Sharing feature module relations -template: feature-walkthrough-template ---- - -The following schema illustrates module relations in the Unique URL per Cart for Easy Sharing feature: -![image](https://spryker.s3.eu-central-1.amazonaws.com/docs/Features/Shopping+Cart/Unique+URL+per+Cart+for+Easy+Sharing/unique-url-module-diagram.png) diff --git a/docs/scos/dev/feature-walkthroughs/202005.0/persistent-cart-sharing-feature-walkthrough/persistent-cart-sharing-feature-walkthrough.md b/docs/scos/dev/feature-walkthroughs/202005.0/persistent-cart-sharing-feature-walkthrough/persistent-cart-sharing-feature-walkthrough.md deleted file mode 100644 index c4b9c8f7f4b..00000000000 --- a/docs/scos/dev/feature-walkthroughs/202005.0/persistent-cart-sharing-feature-walkthrough/persistent-cart-sharing-feature-walkthrough.md +++ /dev/null @@ -1,33 +0,0 @@ ---- -title: Persistent Cart Sharing feature walkthrough -last_updated: Aug 18, 2021 -description: The Persistent Cart Sharing feature allows company users to generate the URL to share the cart with different levels of access. -template: concept-topic-template ---- - -The _Persistent Cart Sharing_ feature allows company users to generate the URL to share the cart with different levels of access. - - -To learn more about the feature and to find out how end users use it, see [Persistent Cart Sharing feature overview](/docs/scos/user/features/{{page.version}}/persistent-cart-sharing-feature-overview.html) for business users. - - -## Entity diagram - -The following schema illustrates relations module relations in the Persistent Cart Sharing feature: - -
    - -![unique-url-module-diagram.png](https://spryker.s3.eu-central-1.amazonaws.com/docs/Features/Shopping+Cart/Unique+URL+per+Cart+for+Easy+Sharing/unique-url-module-diagram.png) - -
    - - -## Related Developer documents - -| INTEGRATION GUIDES | -|---| -| [Customer Account Management feature integration](/docs/scos/dev/feature-integration-guides/{{page.version}}/glue-api/glue-api-customer-account-management-feature-integration.html) | -| [Persistent Cart Sharing + Shared Carts feature integration](/docs/scos/dev/feature-integration-guides/{{page.version}}/persistent-cart-sharing-shared-carts-feature-integration.html) | -| [Persistent Cart Sharing feature integration](/docs/scos/dev/feature-integration-guides/{{page.version}}/persistent-cart-sharing-feature-integration.html) | -| [Resource Sharing feature integration](/docs/scos/dev/feature-integration-guides/{{page.version}}/resource-sharing-feature-integration.html) | -| [Shared Carts feature integration](/docs/scos/dev/feature-integration-guides/{{page.version}}/shared-carts-feature-integration.html) | diff --git a/docs/scos/dev/feature-walkthroughs/202005.0/prices-feature-walkthrough/money-module-reference-information.md b/docs/scos/dev/feature-walkthroughs/202005.0/prices-feature-walkthrough/money-module-reference-information.md deleted file mode 100644 index 27827e8c6eb..00000000000 --- a/docs/scos/dev/feature-walkthroughs/202005.0/prices-feature-walkthrough/money-module-reference-information.md +++ /dev/null @@ -1,116 +0,0 @@ ---- -title: Money -description: Spryker Commerce OS handles all monetary values as integer and provides conversions from decimal values to cent values and vice versa. -last_updated: Sep 15, 2020 -template: feature-walkthrough-template -originalLink: https://documentation.spryker.com/v5/docs/money -originalArticleId: bdcd8e22-2fee-4615-9dee-e8704ccb2028 -redirect_from: - - /v5/docs/money - - /v5/docs/en/money ---- - -{% info_block infoBox "Money" %} -Handling monetary values can be a problem and is often quite hard. The Money bundle makes it easier to work with monetary values. -{% endinfo_block %} - - -Spryker handles all monetary values as integer and provides conversions from decimal values to cent values and vice versa. - -The key feature of this module is to convert a `MoneyTransfer` into the proper string version of it, given the current locale and currency. - - -## Usage -The Money module is very straight forward and easy to use. The MoneyFacade exposes the following methods: - -- `MoneyFacade::fromInteger()` -- `MoneyFacade::fromFloat()` -- `MoneyFacade::fromString()` -- `MoneyFacade::formatWithCurrency()` -- `MoneyFacade::formatWithoutCurrency()` -- `MoneyFacade::convertIntegerToDecimal()` -- `MoneyFacade::convertDecimalToInteger()` - -### MoneyFacade::from*() methods - -Internally we use a powerful implementation of the Money Pattern. Outside the Money module you will only see the MoneyTransfer which encapsulates our internals. - -To get a money object you can call the `MoneyFacade::from*()` methods: - -| Module | Called with | -| --- | --- | -| MoneyFacade::fromInteger(1000) | integer | -| MoneyFacade::fromInteger(1000, 'EUR') | integer and currency | -| MoneyFacade::fromFloat(10.00) | float | -| MoneyFacade::fromFloat(10.00, 'EUR') | float and currency | -| MoneyFacade::fromString('1000') | string | -| MoneyFacade::fromString('1000', 'EUR') | string and currency | - -All of them will return a `MoneyTransfer` with a `MoneyTransfer::$amount` of `‘1000’`. - -{% info_block infoBox %} -The only difference between them is the `MoneyTransfer::$currency`. This value differs if you pass a currency to the `MoneyFacade::from*( -{% endinfo_block %}` methods or not.) - -* In case you don’t pass a currency, the currency configured as default one will be used. -* If you pass a specific currency, it will be used instead of the one that’s configured as default one. - -**`MoneyFacade::formatWithSymbol()`** -`MoneyFacade::formatWithSymbol()` method accepts only one argument - a MoneyTransfer. It will return a string representation of the given object, considering the current locale. - -{% info_block infoBox "Example:" %} -MoneyTransfer::$amount = 1000
    MoneyTransfer::$currency = ‘EUR’
    Current locale is de_DE
    The output would be 10,00 €
    If the current locale would be en_US, the output would be: €10.00 when passing the same object. -{% endinfo_block %} - -**`MoneyFacade::formatWithoutSymbol()`** -`MoneyFacade::formatWithoutSymbol()` method has the same behavior as the `MoneyFacade::formatWithSymbol()`, except of the fact that the currency symbol is not included. - -{% info_block infoBox %} -The output would then be `10,00` or `10.00` for the above example. -{% endinfo_block %} - -**`MoneyFacade::convertIntegerToDecimal()`** -In some cases you will need a plain decimal representation of the value in integer (e.g. cents). This can be useful e.g. for API calls. - -**`MoneyFacade::convertDecimalToInteger()`** -In some cases you will need an integer (e.g. cents) representation for a decimal value. This can be useful when you want to store monetary values in the database. - -## Money Collection Form Type -From Money version 2.2.*, you can have money collection form type inside your forms which will allow to include complex form collection that will render table with currency per store and gross/net price. - -For example, add FormBuilder in your form Type: - -```php -/** - * @param \Symfony\Component\Form\FormBuilderInterface $builder - * - * @return $this - */ -protected function addMoneyValueCollectionType(FormBuilderInterface $builder) - { - $builder->add( - DiscountCalculatorTransfer::MONEY_VALUE_COLLECTION, //is the property in the main form you want to map. It should be transferred as in example - MoneyCollectionType::class, - [ - MoneyCollectionType::OPTION_AMOUNT_PER_STORE => false, //If you want to render per store, set it to true - ] - ); - - return $this; - } -``` - -Also, you need to modify twig template to include form money value collection table. - -```php -{% raw %}{{{% endraw %} form_money_collection(mainForm.moneyValueCollection) {% raw %}}}{% endraw %} -``` - -This will render table with all currencies enabled in store. You have to handle persistence yourself, which means that you have to save and read data to `MoneyValueTransfer` collection. - -{% info_block infoBox %} -Component provides only initial data. -{% endinfo_block %} - - - diff --git a/docs/scos/dev/feature-walkthroughs/202005.0/prices-feature-walkthrough/prices-feature-walkthrough.md b/docs/scos/dev/feature-walkthroughs/202005.0/prices-feature-walkthrough/prices-feature-walkthrough.md deleted file mode 100644 index d86147c7b2f..00000000000 --- a/docs/scos/dev/feature-walkthroughs/202005.0/prices-feature-walkthrough/prices-feature-walkthrough.md +++ /dev/null @@ -1,19 +0,0 @@ ---- -title: Prices feature walkthrough -last_updated: Aug 18, 2021 -description: The Prices feature enables Back Office users to effectively manage the prices of all types of products -template: concept-topic-template ---- - -The _Prices_ feature enables Back Office users to effectively manage the prices of all types of products. They can set different types of prices, like default, original, and volume prices. - - -To learn more about the feature and to find out how end users use it, see [Prices overview](/docs/scos/user/features/{{page.version}}/prices-feature-overview/prices-feature-overview.html) for business users. - - -## Related Developer documents - -| INTEGRATION GUIDES | GLUE API GUIDES | DATA IMPORT | TUTORIALS AND HOWTOS | REFERENCES | -|---|---|---|---|---| -| [Prices feature integration](/docs/scos/dev/feature-integration-guides/{{page.version}}/prices-feature-integration.html) | [Retrieving abstract product prices](/docs/scos/dev/glue-api-guides/{{page.version}}/managing-products/abstract-products/retrieving-abstract-product-prices.html) | [File details: product_price.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/catalog-setup/pricing/file-details-product-price.csv.html) | [HowTo: Handle twenty five million prices in Spryker Commerce OS](/docs/scos/dev/tutorials-and-howtos/howtos/howto-handle-twenty-five-million-prices-in-spryker-commerce-os.html) | [Money module: reference information](/docs/scos/dev/feature-walkthroughs/{{page.version}}/prices-feature-walkthrough/money-module-reference-information.html) | -| [Glue API: Product Price feature integration](/docs/scos/dev/feature-integration-guides/{{page.version}}/glue-api/glue-api-product-price-feature-integration.html) | [Retrieving concrete product prices](/docs/scos/dev/glue-api-guides/{{page.version}}/managing-products/concrete-products/retrieving-concrete-product-prices.html) | | | | diff --git a/docs/scos/dev/feature-walkthroughs/202005.0/product-barcode-feature-walkthrough.md b/docs/scos/dev/feature-walkthroughs/202005.0/product-barcode-feature-walkthrough.md deleted file mode 100644 index f4a8dbcd917..00000000000 --- a/docs/scos/dev/feature-walkthroughs/202005.0/product-barcode-feature-walkthrough.md +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: Product Barcode feature walkthrough -last_updated: Aug 18, 2021 -description: The Product Barcode feature allows creating barcodes for any kind of entity. -template: concept-topic-template ---- - -The _Product Barcode_ feature allows creating barcodes for any kind of entity. - - -To learn more about the feature and to find out how end users use it, see [Product Barcode feature overview](/docs/scos/user/features/{{page.version}}/product-barcode-feature-overview.html) for business users. - - - diff --git a/docs/scos/dev/feature-walkthroughs/202005.0/product-bundles-feature-walkthrough.md b/docs/scos/dev/feature-walkthroughs/202005.0/product-bundles-feature-walkthrough.md deleted file mode 100644 index 490f97a205c..00000000000 --- a/docs/scos/dev/feature-walkthroughs/202005.0/product-bundles-feature-walkthrough.md +++ /dev/null @@ -1,12 +0,0 @@ ---- -title: Product Bundles feature walkthrough -last_updated: Aug 19, 2021 -description: The Product Bundles feature allows you to tie individual items together and sell them as a package. - -template: concept-topic-template ---- - -The _Product Bundles_ feature allows you to tie individual items together and sell them as a package. - - -To learn more about the feature and to find out how end users use it, see [Product Bundles feature overview](/docs/scos/user/features/{{page.version}}/product-bundles-feature-overview.html) for business users. diff --git a/docs/scos/dev/feature-walkthroughs/202005.0/product-groups-feature-walkthrough.md b/docs/scos/dev/feature-walkthroughs/202005.0/product-groups-feature-walkthrough.md deleted file mode 100644 index 9153323389a..00000000000 --- a/docs/scos/dev/feature-walkthroughs/202005.0/product-groups-feature-walkthrough.md +++ /dev/null @@ -1,18 +0,0 @@ ---- -title: Product Groups feature walkthrough -last_updated: Aug 19, 2021 -description: The Product Groups feature allows product catalog managers to group products by attributes, like color or size. -template: concept-topic-template ---- - -The _Product Groups_ feature allows product catalog managers to group products by attributes, like color or size. - - -To learn more about the feature and to find out how end users use it, see [Product Groups feature overview](/docs/scos/user/features/{{page.version}}/product-groups-feature-overview.html) for business users. - - -## Related Developer documents - -|INSTALLATION GUIDES | DATA IMPORT | TUTORIALS AND HOWTOS | -|---------|---------|---------| -| [Product Groups feature integration](/docs/scos/dev/feature-integration-guides/{{page.version}}/product-groups-feature-integration.html) | [File details: product_group.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/merchandising-setup/product-merchandising/file-details-product-group.csv.html) | [HowTo: Display product groups by color on the Storefront](/docs/scos/dev/tutorials-and-howtos/howtos/feature-howtos/howto-display-product-groups-by-color-on-the-storefront.html) | diff --git a/docs/scos/dev/feature-walkthroughs/202005.0/product-labels-feature-walkthrough.md b/docs/scos/dev/feature-walkthroughs/202005.0/product-labels-feature-walkthrough.md deleted file mode 100644 index 7b82d2b6dc2..00000000000 --- a/docs/scos/dev/feature-walkthroughs/202005.0/product-labels-feature-walkthrough.md +++ /dev/null @@ -1,22 +0,0 @@ ---- -title: Product Labels feature walkthrough -last_updated: Aug 19, 2021 -description: The Product Labels feature enables product catalog managers to highlight the desired products by adding a special type of information - product labels. -template: concept-topic-template ---- - -The _Product Labels_ feature enables product catalog managers to highlight the desired products by adding a special type of information—product labels. - - -To learn more about the feature and to find out how end users use it, see [Product Labels feature overview](/docs/scos/user/features/{{page.version}}/product-labels-feature-overview.html) for business users. - - - -## Related Developer documents - -| INSTALLATION GUIDES | UPGRADE GUIDES | GLUE API GUIDES | -|---|---|---| -| [Product Labels feature integration](/docs/scos/dev/feature-integration-guides/{{page.version}}/product-labels-feature-integration.html) | ProductLabel migration guide | [Retrieving product labels](/docs/scos/dev/glue-api-guides/{{page.version}}/managing-products/retrieving-product-labels.html) | -| [Glue API: Product Labels feature integration](/docs/scos/dev/feature-integration-guides/{{page.version}}/glue-api/glue-api-product-labels-feature-integration.html) | ProductLabelGUI migration guide | | -| | ProductLabelSearch migration guide | | -| | ProductLabelStorage migration guide | | diff --git a/docs/scos/dev/feature-walkthroughs/202005.0/product-lists-feature-walkthrough.md b/docs/scos/dev/feature-walkthroughs/202005.0/product-lists-feature-walkthrough.md deleted file mode 100644 index cecea87e695..00000000000 --- a/docs/scos/dev/feature-walkthroughs/202005.0/product-lists-feature-walkthrough.md +++ /dev/null @@ -1,19 +0,0 @@ ---- -title: Product Lists feature walkthrough -last_updated: Aug 19, 2021 -description: The Product Lists feature allows configuring product availability for specific companies by blacklisting or whitelisting products for them. -template: concept-topic-template ---- - -The _Product Lists_ feature allows configuring product availability for specific companies by blacklisting or whitelisting products for them. - - -To learn more about the feature and to find out how end users use it, see [Product Lists feature overview](/docs/scos/user/features/{{page.version}}/product-lists-feature-overview.html) for business users. - - - -## Related Developer documents - -|INSTALLATION GUIDES | -|---------| -| [Product Lists feature integration](/docs/scos/dev/feature-integration-guides/{{page.version}}/product-lists-feature-integration.html) | diff --git a/docs/scos/dev/feature-walkthroughs/202005.0/product-options-feature-walkthrough.md b/docs/scos/dev/feature-walkthroughs/202005.0/product-options-feature-walkthrough.md deleted file mode 100644 index e4f00438927..00000000000 --- a/docs/scos/dev/feature-walkthroughs/202005.0/product-options-feature-walkthrough.md +++ /dev/null @@ -1,22 +0,0 @@ ---- -title: Product Options feature walkthrough -last_updated: Aug 19, 2021 -description: The Product Options feature allows a Back Office user to create and assign product options to abstract products. -template: concept-topic-template ---- - -The _Product Options_ feature allows a Back Office user to create and assign product options to abstract products. - - -To learn more about the feature and to find out how end users use it, see [Product Options feature overview](/docs/scos/user/features/{{page.version}}/product-options-feature-overview.html) for business users. - - - - -## Related Developer documents - -| INSTALLATION GUIDES | UPGRADE GUIDES | DATA IMPORT | -|---------|---------|---------| -| [Shopping Lists + Product Options feature integration](/docs/scos/dev/feature-integration-guides/{{page.version}}/shopping-lists-product-options-feature-integration.html) | ProductOption migration guide |[File details: product_option.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/special-product-types/product-options/file-details-product-option.csv.html) | -| [Product options + Order Management feature integration](/docs/scos/dev/feature-integration-guides/{{page.version}}/product-options-order-management-feature-integration.html) | | [File details: product_option_price.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/special-product-types/product-options/file-details-product-option-price.csv.html) | -| [Glue API: Product Options feature integration](/docs/scos/dev/feature-integration-guides/{{page.version}}/glue-api/glue-api-product-options-feature-integration.html) | | | diff --git a/docs/scos/dev/feature-walkthroughs/202005.0/product-rating-reviews-feature-walkthrough.md b/docs/scos/dev/feature-walkthroughs/202005.0/product-rating-reviews-feature-walkthrough.md deleted file mode 100644 index 0b3ff6781ee..00000000000 --- a/docs/scos/dev/feature-walkthroughs/202005.0/product-rating-reviews-feature-walkthrough.md +++ /dev/null @@ -1,19 +0,0 @@ ---- -title: Product Rating & Reviews feature walkthrough -last_updated: Aug 19, 2021 -description: The Product Rating & Reviews feature allows customers to add reviews and ratings to abstract products. -template: concept-topic-template ---- - -The _Product Rating & Reviews_ feature allows customers to add reviews and ratings to abstract products. - - -To learn more about the feature and to find out how end users use it, see [Product Rating & Reviews feature overview](/docs/scos/user/features/{{page.version}}/product-rating-and-reviews-feature-overview.html) for business users. - - -## Related Developer documents - -|INSTALLATION GUIDES | GLUE API GUIDES | DATA IMPORT | -|---------|---------|---------| -| [Product Rating & Reviews feature integration](/docs/scos/dev/feature-integration-guides/{{page.version}}/product-rating-and-reviews-feature-integration.html) | [Managing product ratings and reviews](/docs/scos/dev/glue-api-guides/{{page.version}}/managing-products/managing-product-ratings-and-reviews.html) | [File details: product_review.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/merchandising-setup/product-merchandising/file-details-product-review.csv.html) | -|[Glue API: Product rating & reviews feature integration](/docs/scos/dev/feature-integration-guides/{{page.version}}/glue-api/glue-api-product-rating-and-reviews-feature-integration.html) | | | diff --git a/docs/scos/dev/feature-walkthroughs/202005.0/product-relations-feature-walkthrough/product-relations-feature-walkthrough.md b/docs/scos/dev/feature-walkthroughs/202005.0/product-relations-feature-walkthrough/product-relations-feature-walkthrough.md deleted file mode 100644 index 3745efc1d97..00000000000 --- a/docs/scos/dev/feature-walkthroughs/202005.0/product-relations-feature-walkthrough/product-relations-feature-walkthrough.md +++ /dev/null @@ -1,29 +0,0 @@ ---- -title: Product Relations feature walkthrough -last_updated: Aug 19, 2021 -description: The Product Relations feature enables product catalog managers to create logical relations between products based on their actual properties -template: concept-topic-template ---- - -The _Product Relations_ feature enables product catalog managers to create logical relations between products based on their actual properties. Product relations are displayed on the Storefront to achieve multiple purposes. - - -To learn more about the feature and to find out how end users use it, see [Product Relations feature overview](/docs/scos/user/features/{{page.version}}/product-relations-feature-overview.html) for business users. - - -## Entity diagram - -The following schema illustrates relations within the Product Relations feature: - -
    - -![product-relations-module-relations.png](https://spryker.s3.eu-central-1.amazonaws.com/docs/Features/Product+Management/Product+Relations/Product+Relations+Feature+Overview/202006.0/product-relations-module-relations.png) - -
    - -## Related Developer documents - -| INSTALLATION GUIDES | UPGRADE GUIDES| -|---------|---------| -|[Product relations feature integration](/docs/scos/dev/feature-integration-guides/{{page.version}}/glue-api/glue-api-product-relations-feature-integration.html) | ProductRelation migration guide | -| [Glue API: Product relations feature integration](/docs/scos/dev/feature-integration-guides/{{page.version}}/glue-api/glue-api-product-relations-feature-integration.html) | ProductRelationStorage migration guide | diff --git a/docs/scos/dev/feature-walkthroughs/202005.0/product-relations-feature-walkthrough/product-relations-module-relations.md b/docs/scos/dev/feature-walkthroughs/202005.0/product-relations-feature-walkthrough/product-relations-module-relations.md deleted file mode 100644 index ceca8545ef9..00000000000 --- a/docs/scos/dev/feature-walkthroughs/202005.0/product-relations-feature-walkthrough/product-relations-module-relations.md +++ /dev/null @@ -1,18 +0,0 @@ ---- -title: "Product Relations: module relations" -description: Module relations of the product relations. -last_updated: Sep 14, 2020 -template: feature-walkthrough-template -originalLink: https://documentation.spryker.com/v5/docs/product-relations-module-relations -originalArticleId: 9904a8a8-7ccf-4ea6-895a-199363bce02f -redirect_from: - - /v5/docs/product-relations-module-relations - - /v5/docs/en/product-relations-module-relations -related: - - title: Product Relations Feature Overview - link: docs/scos/user/features/page.version/product-relations-feature-overview.html ---- - -The schema below illustrates the module relations within the [Product Relations](/docs/scos/user/features/{{page.version}}/product-relations-feature-overview.html) feature: - -![Product relations - module relations](https://spryker.s3.eu-central-1.amazonaws.com/docs/Features/Product+Management/Product+Relations/Product+Relations+Feature+Overview/202006.0/product-relations-module-relations.png) diff --git a/docs/scos/dev/feature-walkthroughs/202005.0/product-sets-feature-walkthrough/product-sets-feature-walkthrough.md b/docs/scos/dev/feature-walkthroughs/202005.0/product-sets-feature-walkthrough/product-sets-feature-walkthrough.md deleted file mode 100644 index c31bad9cf22..00000000000 --- a/docs/scos/dev/feature-walkthroughs/202005.0/product-sets-feature-walkthrough/product-sets-feature-walkthrough.md +++ /dev/null @@ -1,39 +0,0 @@ ---- -title: Product Sets feature walkthrough -last_updated: Aug 19, 2021 -description: The Product Sets feature allows creating and selling collections of products -template: concept-topic-template ---- - -The _Product Sets_ feature allows creating and selling collections of products. - - -To learn more about the feature and to find out how end users use it, see [Product Sets feature overview](/docs/scos/user/features/{{page.version}}/product-sets-feature-overview.html) for business users. - - -## Entity diagram - -The Product Sets feature consists of the following modules: - -| MODULE | DESCRIPTION | -| --- | --- | -| ProductSet | Manages the Product Sets feature's core functionalities, such as persisting all related data to database and reading from it. It also provides the Client functionality to list Product Sets from Search. | -| ProductSetCollector | Provides full Collector logic to export product sets to Search and Storage. | -| ProductSetGui | Provides a Back Office UI to create, list, update, delete, and reorder product sets. | - -The `ProductSet` module provides a `spy_product_set` table that stores some non-localized data about Product Sets entities. Localized data is stored in the `spy_product_set_data` table. These tables, along with their related URLs and product image sets, contain all the necessary data about Product Sets entities that you can list on the Storefront or show their representing *Product details* pages. - -The products in product sets and their sorting positions are stored in the `spy_product_abstract_set` table. - -
    - -![Product Set Database schema](https://spryker.s3.eu-central-1.amazonaws.com/docs/Features/Product+Management/Product+Sets/product_set_db_schema.png) - -
    - - -## Related Developer documents - -|INSTALLATION GUIDES | DATA IMPORT | -|---------|---------| -| [Product Sets feature integration](/docs/scos/dev/feature-integration-guides/{{page.version}}/product-sets-feature-integration.html) | [File details: product_set.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/merchandising-setup/product-merchandising/file-details-product-set.csv.html) | diff --git a/docs/scos/dev/feature-walkthroughs/202005.0/product-sets-feature-walkthrough/product-sets-module-relations.md b/docs/scos/dev/feature-walkthroughs/202005.0/product-sets-feature-walkthrough/product-sets-module-relations.md deleted file mode 100644 index ba28088a1a7..00000000000 --- a/docs/scos/dev/feature-walkthroughs/202005.0/product-sets-feature-walkthrough/product-sets-module-relations.md +++ /dev/null @@ -1,19 +0,0 @@ ---- -title: "Product Sets: module relations" -description: Module relations and database schema of the Product Sets feature. -template: feature-walkthrough-template ---- - -The Product Set feature consists of the following modules: - -| Module | Description | -| --- | --- | -| ProductSet | Manages the Product Sets feature's core functionalities, such as persisting all related data to database and reading from it. It also provides the Client functionality to list Product Sets from Search. | -| ProductSetCollector|Provides full Collector logic to export product sets to Search and Storage. | -| ProductSetGui | Provides a Back Office UI to create, list, update, delete, and reorder product sets. | - -The `ProductSet` module provides a `spy_product_set` table that stores some non-localized data about Product Sets entities. Localized data is stored in the `spy_product_set_data` table. These tables, along with their related URLs and product image sets, contain all the necessary data about Product Sets entities that you can list on the Storefront or show their representing *Product details* pages. - -The products in product sets and their sorting positions are stored in the `spy_product_abstract_set` table. - -![Product Set Database schema](https://spryker.s3.eu-central-1.amazonaws.com/docs/Features/Product+Management/Product+Sets/product_set_db_schema.png) diff --git a/docs/scos/dev/feature-walkthroughs/202005.0/promotions-discounts-feature-walkthrough.md b/docs/scos/dev/feature-walkthroughs/202005.0/promotions-discounts-feature-walkthrough.md deleted file mode 100644 index 33ac8f2af2b..00000000000 --- a/docs/scos/dev/feature-walkthroughs/202005.0/promotions-discounts-feature-walkthrough.md +++ /dev/null @@ -1,21 +0,0 @@ ---- -title: Promotions & Discounts feature walkthrough -last_updated: Aug 19, 2021 -description: The Promotions & Discounts feature allows defining several types of discounts based on a brand, overall cart value, certain product ranges, or special customer groups -template: concept-topic-template ---- - -The _Promotions & Discounts_ feature allows defining several types of discounts based on a brand, overall cart value, certain product ranges, or special customer groups. You can also offer discount vouchers or incentivize certain products through coupon codes. - - -To learn more about the feature and to find out how end users use it, see [Promotions & Discounts feature overview](/docs/scos/user/features/{{page.version}}/promotions-discounts-feature-overview.html) for business users. - - -## Related Developer documents - -| INSTALLATION GUIDES | UPGRADE GUIDES | GLUE API GUIDES | DATA IMPORT | TUTORIALS AND HOWTOS | -|---|---|---|---|---| -| [Glue API: Promotions & Discounts feature integration](/docs/scos/dev/feature-integration-guides/{{page.version}}/glue-api/glue-api-promotions-and-discounts-feature-integration.html) | Discount migration guide | [Retrieving promotional items](/docs/scos/dev/glue-api-guides/{{page.version}}/retrieving-promotional-items.html) | [File details: discount.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/merchandising-setup/discounts/file-details-discount.csv.html) | [HowTo: Create discounts based on shipment](/docs/pbc/all/discount-management/{{site.version}}/base-shop/create-discounts-based-on-shipment.html) | -| | | [Managing discount vouchers in guest carts](/docs/scos/dev/glue-api-guides/{{page.version}}/managing-carts/guest-carts/managing-discount-vouchers-in-guest-carts.html) | [File details: discount_amount.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/merchandising-setup/discounts/file-details-discount-amount.csv.html) | | -| | | [Managing discount vouchers in guest carts](/docs/scos/dev/glue-api-guides/{{page.version}}/managing-carts/guest-carts/managing-discount-vouchers-in-guest-carts.html) | [File details: discount_store.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/merchandising-setup/discounts/file-details-discount-store.csv.html) | | -| | | | [File details: discount_voucher.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/merchandising-setup/discounts/file-details-discount-voucher.csv.html) | | diff --git a/docs/scos/dev/feature-walkthroughs/202005.0/quick-add-to-cart-feature-walkthrough/quick-add-to-cart-feature-walkthrough.md b/docs/scos/dev/feature-walkthroughs/202005.0/quick-add-to-cart-feature-walkthrough/quick-add-to-cart-feature-walkthrough.md deleted file mode 100644 index 204316153e5..00000000000 --- a/docs/scos/dev/feature-walkthroughs/202005.0/quick-add-to-cart-feature-walkthrough/quick-add-to-cart-feature-walkthrough.md +++ /dev/null @@ -1,40 +0,0 @@ ---- -title: Quick Add to Cart feature walkthrough -last_updated: Aug 19, 2021 -description: The Quick Add to Cart feature allows adding multiple products to cart at once -template: concept-topic-template ---- - -The _Quick Add to Cart_ feature allows adding multiple products to cart at once. - - -To learn more about the feature and to find out how end users use it, see [Quick Add to Cart feature overview](/docs/scos/user/features/{{page.version}}/quick-add-to-cart-feature-overview.html) for business users. - - -## Entity diagram - -The following schema illustrates relations in the Quick Order feature: - -
    - -![quick-add-to-cart-2-modules.png](https://spryker.s3.eu-central-1.amazonaws.com/docs/Features/Shopping+Cart/Cart/Quick+Order/Quick+Order+Feature+Overview/quick-add-to-cart-2-modules.png) - -
    - -
    - -![file-upload-form-module-schema.png](https://spryker.s3.eu-central-1.amazonaws.com/docs/Features/Shopping+Cart/Cart/Quick+Order/Quick+Order+Feature+Overview/file-upload-form-module-schema.png) - -
    - - -## Related Developer documents - -| INSTALLATION GUIDES | UPGRADE GUIDES | -|---|---| -| [Quick Add to Cart feature integration](/docs/scos/dev/feature-integration-guides/{{page.version}}/quick-add-to-cart-feature-integration.html) | ProductPackagingUnitStorage migration guide | -| [Quick Add to Cart + Shopping Lists feature integration](/docs/scos/dev/feature-integration-guides/{{page.version}}/quick-add-to-cart-shopping-lists-feature-integration.html) | ProductPageSearch migration guide | -| [Quick Add to Cart + Discontinued Products feature integration](/docs/scos/dev/feature-integration-guides/{{page.version}}/quick-add-to-cart-discontinued-products-feature-integration.html) | QuickOrderPage migration guide | -| [Quick Add to Cart + Measurement Units feature integration](/docs/scos/dev/feature-integration-guides/{{page.version}}/quick-add-to-cart-measurement-units-feature-integration.html) | | -| [Quick Add to Cart + Non-splittable Products feature integration](/docs/scos/dev/feature-integration-guides/{{page.version}}/quick-add-to-cart-non-splittable-products-feature-integration.html) | | -| [Quick Add to Cart + Packaging Units feature integration](/docs/scos/dev/feature-integration-guides/{{page.version}}/quick-add-to-cart-packaging-units-feature-integration.html) | | diff --git a/docs/scos/dev/feature-walkthroughs/202005.0/quotation-process-feature-walkthrough/quotation-process-feature-walkthrough.md b/docs/scos/dev/feature-walkthroughs/202005.0/quotation-process-feature-walkthrough/quotation-process-feature-walkthrough.md deleted file mode 100644 index 44bd44a9abe..00000000000 --- a/docs/scos/dev/feature-walkthroughs/202005.0/quotation-process-feature-walkthrough/quotation-process-feature-walkthrough.md +++ /dev/null @@ -1,35 +0,0 @@ ---- -title: Quotation Process feature walkthrough -last_updated: Aug 19, 2021 -description: The Quotation Process feature adds functionality that allows customers to request special product prices and lets agents manage those quote requests. -template: concept-topic-template ---- - -The _Quotation Process_ feature adds functionality that allows customers to request special product prices and lets agents manage those quote requests. - - -To learn more about the feature and to find out how end users use it, see [Quotation Process feature overview](/docs/scos/user/features/{{page.version}}/quotation-process-feature-overview.html) for business users. - - -## Entity diagram - -The following schema illustrates the module relations of the Quotation Process feature: - -
    - -![request-for-quote-module-diagram.png](https://spryker.s3.eu-central-1.amazonaws.com/docs/Features/Workflow+%26+Process+Management/Quotation+process+and+RFQ/Quotation+Process+%26+RFQ+Feature+Overview/request-for-quote-module-diagram.png) - -
    - - -## Related Developer documents - -| INSTALLATION GUIDES | UPGRADE GUIDES| -|---|---| -| [Quotation Process feature integration](/docs/scos/dev/feature-integration-guides/{{page.version}}/checkout-quotation-process-feature-integration.html) | QuoteRequestAgent migration guide | -| [Approval Process feature integration](/docs/scos/dev/feature-integration-guides/{{page.version}}/approval-process-feature-integration.html) | QuoteRequestPage migration guide | -| [Checkout + Quotation process feature integration](/docs/scos/dev/feature-integration-guides/{{page.version}}/checkout-quotation-process-feature-integration.html) | | -| [Quotation Process + Approval Process feature integration](/docs/scos/dev/feature-integration-guides/{{page.version}}/quotation-process-approval-process-feature-integration.html) | | -| [Quotation Process + Multiple Carts feature integration](/docs/scos/dev/feature-integration-guides/{{page.version}}/quotation-process-multiple-carts-feature-integration.html) | | -| [Shipment + Cart feature integration](/docs/marketplace/dev/feature-integration-guides/{{page.version}}/marketplace-shipment-cart-feature-integration.html) | | -| [Shipment feature integration](/docs/scos/dev/feature-integration-guides/{{page.version}}/shipment-feature-integration.html) | | diff --git a/docs/scos/dev/feature-walkthroughs/202005.0/quotation-process-feature-walkthrough/quotation-process-module-relations.md b/docs/scos/dev/feature-walkthroughs/202005.0/quotation-process-feature-walkthrough/quotation-process-module-relations.md deleted file mode 100644 index daddedf0e1b..00000000000 --- a/docs/scos/dev/feature-walkthroughs/202005.0/quotation-process-feature-walkthrough/quotation-process-module-relations.md +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: "Quotation Process: module relations" -description: The article describes the Quotation Process feature, its statuses, and workflow (by a customer, sales representative, agent account and interaction with approval process. -last_updated: Sep 14, 2020 -template: feature-walkthrough-template -originalLink: https://documentation.spryker.com/v5/docs/quotation-process-rfq-module-relations -originalArticleId: 9fc2a532-83e7-4266-8814-74b861ab716e -redirect_from: - - /v5/docs/quotation-process-rfq-module-relations - - /v5/docs/en/quotation-process-rfq-module-relations ---- - -On this page, you can find the module relations for the [Quotation Process](/docs/scos/user/features/{{page.version}}/quotation-process-feature-overview.html) feature. -![RFQ modules diagram](https://spryker.s3.eu-central-1.amazonaws.com/docs/Features/Workflow+%26+Process+Management/Quotation+process+and+RFQ/Quotation+Process+%26+RFQ+Feature+Overview/request-for-quote-module-diagram.png) diff --git a/docs/scos/dev/feature-walkthroughs/202005.0/reclamations-feature-walkthrough.md b/docs/scos/dev/feature-walkthroughs/202005.0/reclamations-feature-walkthrough.md deleted file mode 100644 index 93fff7a7a8f..00000000000 --- a/docs/scos/dev/feature-walkthroughs/202005.0/reclamations-feature-walkthrough.md +++ /dev/null @@ -1,18 +0,0 @@ ---- -title: Reclamations feature walkthrough -last_updated: Aug 19, 2021 -description: The Reclamations feature allows Back Office users to handle order claims issued by customers -template: concept-topic-template ---- - -The _Reclamations_ feature allows Back Office users to handle order claims issued by customers. - - -To learn more about the feature and to find out how end users use it, see [Reclamations feature overview](/docs/scos/user/features/{{page.version}}/reclamations-feature-overview.html) for business users. - - -## Related Developer documents - -|INSTALLATION GUIDES | -|---------| -|[Reclamations feature integration](/docs/scos/dev/feature-integration-guides/{{page.version}}/reclamations-feature-integration.html)| diff --git a/docs/scos/dev/feature-walkthroughs/202005.0/refunds-feature-walkthrough.md b/docs/scos/dev/feature-walkthroughs/202005.0/refunds-feature-walkthrough.md deleted file mode 100644 index cc438d78b52..00000000000 --- a/docs/scos/dev/feature-walkthroughs/202005.0/refunds-feature-walkthrough.md +++ /dev/null @@ -1,18 +0,0 @@ ---- -title: Refunds feature walkthrough -last_updated: Aug 19, 2021 -description: The Refunds feature allows issuing refunds on orders -template: concept-topic-template ---- - -The _Refunds_ feature allows issuing refunds on orders. - - -To learn more about the feature and to find out how end users use it, see [Refunds feature overview](/docs/scos/user/features/{{page.version}}/refunds-feature-overview.html) for business users. - - -## Related Developer documents - -| MIGRATION GUIDES | TUTORIALS AND HOWTOS | -|---------|---------| -| Refund migration guide | [Refund process management](/docs/scos/dev/back-end-development/data-manipulation/datapayload-conversion/refund-process-management.html) | diff --git a/docs/scos/dev/feature-walkthroughs/202005.0/reorder-feature-walkthrough.md b/docs/scos/dev/feature-walkthroughs/202005.0/reorder-feature-walkthrough.md deleted file mode 100644 index 70f58ec84aa..00000000000 --- a/docs/scos/dev/feature-walkthroughs/202005.0/reorder-feature-walkthrough.md +++ /dev/null @@ -1,18 +0,0 @@ ---- -title: Reorder feature walkthrough -last_updated: Aug 19, 2021 -description: The Reorder feature allows customers to repeat their previous orders in one click -template: concept-topic-template ---- - -The _Reorder_ feature allows customers to repeat their previous orders in one click. - - -To learn more about the feature and to find out how end users use it, see [Reorder feature overview](/docs/scos/user/features/{{page.version}}/reorder-feature-overview.html) for business users. - - -## Related Developer documents - -| INSTALLATION GUIDES | UPGRADE GUIDES| -|---------|---------| -| [Multiple Carts + Reorder feature integration](/docs/scos/dev/feature-integration-guides/{{page.version}}/multiple-carts-reorder-feature-integration.html) | CustomerReorderWidget migration guide | diff --git a/docs/scos/dev/feature-walkthroughs/202005.0/resource-sharing-feature-walkthrough.md b/docs/scos/dev/feature-walkthroughs/202005.0/resource-sharing-feature-walkthrough.md deleted file mode 100644 index ca015458570..00000000000 --- a/docs/scos/dev/feature-walkthroughs/202005.0/resource-sharing-feature-walkthrough.md +++ /dev/null @@ -1,18 +0,0 @@ ---- -title: Resource Sharing feature walkthrough -last_updated: Aug 19, 2021 -description: Resource Sharing is a generic feature that allows creating a unique URL for any entity in the Spyker Commerce OS. -template: concept-topic-template ---- - -The _Resource Sharing_ allows creating a unique URL for any entity in the Spyker Commerce OS. For each entity, you should use additional connector-module. For example, to share a cart through a URL, Resource Sharing should be combined with Persistent Cart Sharing. - - -To learn more about the feature and to find out how end users use it, see [Resource Sharing feature overview](/docs/scos/user/features/{{page.version}}/resource-sharing-feature-overview.html) for business users. - - -## Related Developer documents - -|INSTALLATION GUIDES | -|---------| -| [Resource Sharing feature integration](/docs/scos/dev/feature-integration-guides/{{page.version}}/resource-sharing-feature-integration.html) | diff --git a/docs/scos/dev/feature-walkthroughs/202005.0/scheduled-prices-feature-walkthrough.md b/docs/scos/dev/feature-walkthroughs/202005.0/scheduled-prices-feature-walkthrough.md deleted file mode 100644 index 957c0ff066a..00000000000 --- a/docs/scos/dev/feature-walkthroughs/202005.0/scheduled-prices-feature-walkthrough.md +++ /dev/null @@ -1,19 +0,0 @@ ---- -title: Scheduled Prices feature walkthrough -last_updated: Aug 19, 2021 -description: The Scheduled Prices feature enables Back Office users to schedule price changes, which are to happen in the future for multiple products simultaneously -template: concept-topic-template ---- - -The _Scheduled Prices_ feature enables Back Office users to schedule price changes, which are to happen in the future for multiple products simultaneously. - - -To learn more about the feature and to find out how end users use it, see [Scheduled Prices feature overview](/docs/scos/user/features/{{page.version}}/scheduled-prices-feature-overview.html) for business users. - - -## Related Developer documents - -| INSTALLATION GUIDES | UPGRADE GUIDES| DATA IMPORT | TUTORIALS AND HOWTOS | -|---------|---------|---------|---------| -| [Integrate the Scheduled prices feature](/docs/scos/dev/feature-integration-guides/{{page.version}}/scheduled-prices-feature-integration.html) | PriceProductSchedule migration guide | [File details: product_price_schedule.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/catalog-setup/pricing/file-details-product-price-schedule.csv.html) | [HowTo: Schedule cron job for Scheduled Prices](/docs/pbc/all/price-management/{{site.version}}/base-shop/tutorials-and-howtos/howto-schedule-cron-job-for-scheduled-prices.html) | -| | PriceProductScheduleGui migration guide | | | diff --git a/docs/scos/dev/feature-walkthroughs/202005.0/shared-carts-feature-walkthrough.md b/docs/scos/dev/feature-walkthroughs/202005.0/shared-carts-feature-walkthrough.md deleted file mode 100644 index 472662b19b0..00000000000 --- a/docs/scos/dev/feature-walkthroughs/202005.0/shared-carts-feature-walkthrough.md +++ /dev/null @@ -1,18 +0,0 @@ ---- -title: Shared Carts feature walkthrough -last_updated: Aug 20, 2021 -description: The Shared Carts features allows sharing carts between company users. -template: concept-topic-template ---- - -The _Shared Carts_ feature allows sharing carts between company users. - - -To learn more about the feature and to find out how end users use it, see [Shared Carts feature overview](/docs/scos/user/features/{{page.version}}/shared-carts-feature-overview.html) for business users. - - -## Related Developer documents - -|INSTALLATION GUIDES | GLUE API GUIDES | -|---------|---------| -|[Shared Carts feature integration](/docs/scos/dev/feature-integration-guides/{{page.version}}/shared-carts-feature-integration.html) | [Sharing company user carts](/docs/scos/dev/glue-api-guides/{{page.version}}/managing-carts/sharing-company-user-carts/sharing-company-user-carts.html) | diff --git a/docs/scos/dev/feature-walkthroughs/202005.0/shipment-feature-walkthrough/shipment-feature-walkthrough.md b/docs/scos/dev/feature-walkthroughs/202005.0/shipment-feature-walkthrough/shipment-feature-walkthrough.md deleted file mode 100644 index 036fa830377..00000000000 --- a/docs/scos/dev/feature-walkthroughs/202005.0/shipment-feature-walkthrough/shipment-feature-walkthrough.md +++ /dev/null @@ -1,31 +0,0 @@ ---- -title: Shipment feature walkthrough -last_updated: Aug 20, 2021 -description: The Shipment feature allows you to create and manage carrier companies and assign multiple delivery methods associated with specific stores, which your customers can select during the checkout -template: concept-topic-template ---- - -The _Shipment_ feature allows you to create and manage carrier companies and assign multiple delivery methods associated with specific stores, which your customers can select during the checkout. With the feature in place, you can define delivery price and expected delivery time, tax sets, and availability of the delivery method per store. - - -To learn more about the feature and to find out how end users use it, see [Shipment feature overview](/docs/scos/user/features/{{page.version}}/shipment/shipment-feature-overview.html) for business users. - - -## Entity diagram - -The following schema shows how the sales order and shipment method entities are modelled in the database: - -
    - -![shipment-database-schema.png)](https://spryker.s3.eu-central-1.amazonaws.com/docs/Features/Shipment/Shipment+Overview/shipment-database-schema.png) - -
    - - -## Related Developer documents - -| INSTALLATION GUIDES | UPGRADE GUIDES | TUTORIALS AND HOWTOS | REFERENCES | -|---|---|---|---| -| [Shipment feature integration](/docs/scos/dev/feature-integration-guides/{{page.version}}/shipment-feature-integration.html) | Shipment migration guide | [HowTo: Create discounts based on shipment](/docs/pbc/all/discount-management/{{site.version}}/base-shop/create-discounts-based-on-shipment.html#activate-a-discount-rule-based-on-a-shipment-carrier) | [Reference information: Shipment method plugins](/docs/scos/dev/feature-walkthroughs/{{page.version}}/shipment-feature-walkthrough/shipment-method-plugins-reference-information.html) | -| [Glue API: Shipment feature integration](/docs/scos/dev/feature-integration-guides/{{page.version}}/glue-api/glue-api-shipment-feature-integration.html) | ShipmentGui migration guide | [HowTo: Add a new shipment method 2.0](/docs/scos/dev/tutorials-and-howtos/howtos/howto-add-a-new-shipment-method-2.0.html) | | -| | ManualOrderEntryGui migration guide | [HowTo: Import delivery methods linked to store](/docs/scos/dev/tutorials-and-howtos/howtos/feature-howtos/data-imports/howto-import-delivery-methods-linked-to-store.html) | | diff --git a/docs/scos/dev/feature-walkthroughs/202005.0/shipment-feature-walkthrough/shipment-method-entities-in-the-database-reference-information.md b/docs/scos/dev/feature-walkthroughs/202005.0/shipment-feature-walkthrough/shipment-method-entities-in-the-database-reference-information.md deleted file mode 100644 index 69e0031fe56..00000000000 --- a/docs/scos/dev/feature-walkthroughs/202005.0/shipment-feature-walkthrough/shipment-method-entities-in-the-database-reference-information.md +++ /dev/null @@ -1,15 +0,0 @@ ---- -title: "Shipment method entities in the database: reference information" -last_updated: Feb 8, 2021 -template: feature-walkthrough-template -originalLink: https://documentation.spryker.com/v5/docs/reference-information-shipment-method-entities-in-the-database -originalArticleId: f2cec2a4-52ef-4cfa-a9fe-8acc0f22543b -redirect_from: - - /v5/docs/reference-information-shipment-method-entities-in-the-database - - /v5/docs/en/reference-information-shipment-method-entities-in-the-database - - /docs/scos/dev/feature-walkthroughs/202005.0/shipment-feature-walkthrough/reference-information-shipment-method-entities-in-the-database.html ---- - -The following schema shows how the sales order and shipment method entities are modeled in the database: - -![Database schema](https://spryker.s3.eu-central-1.amazonaws.com/docs/Features/Shipment/Shipment+Overview/shipment-database-schema.png) diff --git a/docs/scos/dev/feature-walkthroughs/202005.0/shipment-feature-walkthrough/shipment-method-plugins-reference-information.md b/docs/scos/dev/feature-walkthroughs/202005.0/shipment-feature-walkthrough/shipment-method-plugins-reference-information.md deleted file mode 100644 index 137b65cdae5..00000000000 --- a/docs/scos/dev/feature-walkthroughs/202005.0/shipment-feature-walkthrough/shipment-method-plugins-reference-information.md +++ /dev/null @@ -1,173 +0,0 @@ ---- -title: "Shipment method plugins: reference information" -description: An optional plugin is linked to each shipping method. This topic provides an overview of the Availability, Price Calculation, and Delivery Time plugins. -last_updated: Apr 3, 2020 -template: feature-walkthrough-template -originalLink: https://documentation.spryker.com/v5/docs/reference-information-shipment-method-plugins -originalArticleId: 9a475580-f380-49fb-bb97-f13e9b107922 -redirect_from: - - /v5/docs/reference-information-shipment-method-plugins - - /v5/docs/en/reference-information-shipment-method-plugins - - /docs/scos/dev/feature-walkthroughs/202005.0/shipment-feature-walkthrough/reference-information-shipment-method-plugins.html -related: - - title: Migration Guide - Shipment - link: docs/scos/dev/module-migration-guides/migration-guide-shipment.html ---- - -The main concerns regarding shipping services are : - -* **Availability**: Is the shipping method available to deliver the order? -* **Price**: How is the delivery price calculated ? -* **Delivery time**: When will the order be delivered ? - -For each of these concerns, an optional plugin is linked to each shipping method : - -* **Availability Plugin**: Returns a boolean value which implies if the active shipping method is available and should be visible to the customers in the list of available shipping services. -* **Price Calculation Plugin**: Shipping services can consider different criteria in calculating the price for delivery (such as size of the package, weight, etc.). When a price plugin is paired to a shipping method, the related Zed Admin UI preconfigured prices are omitted. -* **Delivery Time Plugin**: The estimated delivery time information of the purchased items is important for the customers. The delivery time can vary depending on region, shipping service type, or day of week. Delivery time is measured in seconds as integer (for example,1 day = 86400; 5 days = 5 * 86400). - -## Availability Plugin - -For each availability plugin linked to a shipment method, a class with the same name must exist on the project side in the Shipment module (`Pyz/Zed/Shipment/Communication/Plugin/Availability`). - -The class must implement `ShipmentMethodAvailabilityPluginInterface` and must extend the `AbstractPlugin` class, as in the example below : - -```php - new YourAvailabilityPlugin(), - ]; -} - -/** - * @param Container $container - * - * @return array - */ -protected function getPricePlugins(Container $container) -{ - return [ - 'Plugin name visible in form' => new YourPricePlugin(), - ]; -} - -/** - * @param Container $container - * - * @return array - */ -protected function getDeliveryTimePlugins(Container $container) -{ - return [ - 'Plugin name visible in form' => new YourDeliveryTimePlugin(), - ]; -} -``` - -We value people who contribute to improvement of our documentation: - -* Thank you to: [Eugen Mielke](https://github.com/eug3n) for taking the time to provide us with your feedback (August 2018). - -{% info_block warningBox %} -You too can be credited in our documentation by stating that you wish to be mentioned when you send us feedback. Click "Edit on Github" (top right -{% endinfo_block %} to send feedback for this page.) diff --git a/docs/scos/dev/feature-walkthroughs/202005.0/shopping-lists-feature-walkthrough.md b/docs/scos/dev/feature-walkthroughs/202005.0/shopping-lists-feature-walkthrough.md deleted file mode 100644 index a180cbf9654..00000000000 --- a/docs/scos/dev/feature-walkthroughs/202005.0/shopping-lists-feature-walkthrough.md +++ /dev/null @@ -1,20 +0,0 @@ ---- -title: Shopping Lists feature walkthrough -last_updated: Aug 20, 2021 -description: The Shopping Lists feature allows customers to create and share multiple lists of products between company business units or single users. Shopping lists can be shared between users with different sets of permissions. -template: concept-topic-template ---- - -The _Shopping Lists_ feature allows customers to create and share multiple lists of products between company business units or single users. Shopping lists can be shared between users with different sets of permissions. - - -To learn more about the feature and to find out how end users use it, see [Shopping Lists](/docs/scos/user/features/{{page.version}}/shopping-lists-feature-overview/shopping-lists-feature-overview.html) for business users. - - -## Related Developer documents - -|INSTALLATION GUIDES | GLUE API GUIDES | -|---------|---------| -| [Shopping Lists feature integration](/docs/scos/dev/feature-integration-guides/{{page.version}}/shopping-lists-feature-integration.html) | [Managing shopping lists](/docs/scos/dev/feature-walkthroughs/{{page.version}}/shopping-lists-feature-walkthrough.html) | -| [Glue API: Shopping Lists feature integration](/docs/scos/dev/feature-integration-guides/{{page.version}}/glue-api/glue-api-shopping-lists-feature-integration.html) | [Managing shopping list items](/docs/scos/dev/glue-api-guides/{{page.version}}/managing-shopping-lists/managing-shopping-list-items.html) | -| [Prices feature integration](/docs/scos/dev/feature-integration-guides/{{page.version}}/prices-feature-integration.html) | | diff --git a/docs/scos/dev/feature-walkthroughs/202005.0/spryker-core-back-office-feature-walkthrough/spryker-core-back-office-feature-walkthrough.md b/docs/scos/dev/feature-walkthroughs/202005.0/spryker-core-back-office-feature-walkthrough/spryker-core-back-office-feature-walkthrough.md deleted file mode 100644 index 18c64635eba..00000000000 --- a/docs/scos/dev/feature-walkthroughs/202005.0/spryker-core-back-office-feature-walkthrough/spryker-core-back-office-feature-walkthrough.md +++ /dev/null @@ -1,20 +0,0 @@ ---- -title: Spryker Core Back Office feature walkthrough -last_updated: The Spryker Core Back Office feature adds a comprehensive, intuitive administration area -description: -template: concept-topic-template ---- - -The _Spryker Core Back Office_ feature adds a comprehensive, intuitive administration area that provides the product and content management capabilities, categories and navigation building blocks, search and filter customizations, barcode generator, order handling, company structure creation (for B2B users), merchant-buyer contracts' setup. - - - - -## Related Developer documents - -|INSTALLATION GUIDES | REFERENCES| -|---------|---------| -| [Spryker Core Back Office feature integration](/docs/scos/dev/feature-integration-guides/{{page.version}}/spryker-core-back-office-feature-integration.html) | [Back Office Translations overview](/docs/scos/user/features/{{page.version}}/spryker-core-back-office-feature-overview/back-office-translations-overview.html) | -| [Microsoft Azure Active Directory](/docs/scos/dev/feature-integration-guides/{{page.version}}/microsoft-azure-active-directory.html) | [Users and rights overview](/docs/scos/dev/feature-walkthroughs/{{page.version}}/spryker-core-back-office-feature-walkthrough/user-and-rights-overview.html) | diff --git a/docs/scos/dev/feature-walkthroughs/202005.0/spryker-core-back-office-feature-walkthrough/user-and-rights-overview.md b/docs/scos/dev/feature-walkthroughs/202005.0/spryker-core-back-office-feature-walkthrough/user-and-rights-overview.md deleted file mode 100644 index ee31c41d62c..00000000000 --- a/docs/scos/dev/feature-walkthroughs/202005.0/spryker-core-back-office-feature-walkthrough/user-and-rights-overview.md +++ /dev/null @@ -1,116 +0,0 @@ ---- -title: Users and rights overview -last_updated: Aug 20, 2021 -description: User and rights management is a general term that describes the security functionality for controlling user access to perform various roles throughout the system -template: concept-topic-template -originalLink: https://documentation.spryker.com/docs/user-and-rights-overview -originalArticleId: 4006b24f-fd0a-480a-9589-d2b822fdbde3 -redirect_from: -- /v5/docs/user-and-rights-management -- /v5/docs/en/user-and-rights-management -- /docs/scos/dev/feature-walkthroughs/202005.0/customer-account-management-feature-walkthrough/user-and-rights-overview.html ---- - -User and rights management is a general term that describes the security functionality for controlling user access to perform various roles throughout the system. - -In the Spryker Commerce OS user and rights management is implemented in the following three bundles: - -* ACL—ACL stands for Access Control List. This is where you can manage your roles, groups, privileges and resources. -* Auth—manages the authorization of a specific user by returning true or false if the credentials are allowed to access the system or not. It is used for login, logout, and used by the login controller to verify if a given user token is authenticated. Login is authenticated with a form or a header (via token). Auth is also used to validate that Zed has authorization to process incoming requests from Yves or 3rd parties such as payment providers. -* User—allows to create users and assign them to groups. Each group contains a set of roles. - -## Users and customers - -It is important to distinguish between users and customers. A user works with the back-end side of the store and handles the store maintenance such as creating users and assigning them to roles that will allow them to perform actions such as editing the CMS, activating and deactivating products and managing discounts. A customer on the other hand is the final consumer of the online store for example, the person who places orders. Customers are also managed in Zed but in a different section. - -Users are assigned to groups. Groups are a collection of Roles e.g. customer-care, root, 3rd party etc. Roles have Resources (rules) assigned to them. Resources (rules) are used to assign specific privileges to a Role for example, a Sales Representative Role or a System Administrator Role. Resources are always /module/controller/action and you can use * as placeholder. - -* `/customer/*/*` would mean everything in /customer. -* `/customer/view/*` would mean a user can only see customers but can’t edit them. - -## Managing users - -The Auth, ACL and User bundles are configured and managed through the Zed user interface. Bundles correspond with the tabs in Zed. You can find which name you should place here from the file `/project/config/Zed/navigation.xml` - -Also, you can find bundle names as well as controllers and actions in the file `communication/navigation.xml`. For example: - -![bundles_navigation.png](https://spryker.s3.eu-central-1.amazonaws.com/docs/scos/dev/feature-walkthroughs/spryker-core-back-office-feature-walkthrough/user-and-rights-overview.md/bundles_navigation.png) - -See [Managing users](/docs/scos/user/back-office-user-guides/{{page.version}}/users/managing-users/creating-users.html) to learn how to create and manage users, groups, and roles . - - - -{% info_block infoBox "Adding users in the ACL module" %} - -You can add Zed users not only via the Back Office, but also in the ACL module. To do so, add the user in `/Spryker/Zed/Acl/AclConfig::getInstallerUsers()`(see [AclConfig.php](https://github.com/spryker/acl/blob/d3193c9259ed2f2b6815f3b2c9f52f4e4e250bbe/src/Spryker/Zed/Acl/AclConfig.php) for example) and run `console setup:init-db`. - -{% endinfo_block %} - -## ACL configuration - -Apart from being able to configure user access to Zed resources via Zed UI, you can grant access to additional resources by specifying them in `config_*.php`. The following options are used to do that: - -* `AclConstants::ACL_DEFAULT_RULES`—is used to provide/restrict access to Zed resources, defined in the `Spryker/Zed/Auth/AuthConfig::$ingorable` property. For example: - -```php -$config[AclConstants::ACL_DEFAULT_RULES] = [ - // .... - [ - 'bundle' => 'auth', - 'controller' => 'login', - 'action' => 'index', - 'type' => 'deny', - ], - // .... -]; -``` - -In the example, we restrict access for everyone to Zed login page. This option affects both logged-in and anonymous users. The key feature is the ability to restrict/provide access for anonymous users. - -* `AclConstants::ACL_USER_RULE_WHITELIST`—is used to provide additional access to Zed resources for all logged-in users. For example: - -```php -$config[AclConstants::ACL_USER_RULE_WHITELIST] = [ - // .... - [ - 'bundle' => 'application', - 'controller' => '*', - 'action' => '*', - 'type' => 'allow', - ], - // .... -]; -``` -In the example, we grant access to the Application module resources for all users. - -{% info_block warningBox "" %} - -With the configuration provided in the example, users are granted access to these resources regardless of ACL configuration in ZED UI. - -{% endinfo_block %} - - - -* `AclConstants::ACL_DEFAULT_CREDENTIALS`—is used to provide additional access to Zed resources for a specific user. For example: - -```php -$config[AclConstants::ACL_DEFAULT_CREDENTIALS] = [ - 'winner@spryker.com' => [ - 'rules' => [ - [ - 'bundle' => '*', - 'controller' => '*', - 'action' => '*', - 'type' => 'allow', - ], - ], - ], -] -``` - -In the example, we grant the user **winner@spryker.com** access to all Zed resources. To make it work, we should also add **winner@spryker.com** to this option: `UserConstants::USER_SYSTEM_USERS`. Here, a system user is any user who has additional ACL rules defined for them in `config_*.php` file. - -* Note that if there is at least one `allow` type for a resource, the user will have access to it in spite of having a `deny` type for the same resource. It works for `AclConstants::ACL_USER_RULE_WHITELIST`, `AclConstants::ACL_DEFAULT_CREDENTIALS` and rules configured via Zed UI, except for `AclConstants::ACL_DEFAULT_RULES` as it is handled before checking if user logged in or not. - - - diff --git a/docs/scos/dev/feature-walkthroughs/202005.0/spryker-core-feature-walkthrough/how-translations-are-managed.md b/docs/scos/dev/feature-walkthroughs/202005.0/spryker-core-feature-walkthrough/how-translations-are-managed.md deleted file mode 100644 index 1d5ef202a0b..00000000000 --- a/docs/scos/dev/feature-walkthroughs/202005.0/spryker-core-feature-walkthrough/how-translations-are-managed.md +++ /dev/null @@ -1,35 +0,0 @@ ---- -title: How translations are managed -last_updated: Aug 20, 2021 -description: The key concept for rendering web pages with translated content very fast and with limited resource usage is using a key-value storage -template: concept-topic-template ---- - -The key concept for rendering web pages with translated content very fast and with limited resource usage is using a key-value storage. - -Yves has no connection to Zed’s SQL database and it fetches all dynamic data from a key-value storage(Redis) and a search engine(Elasticsearch). This data contains translations but also product information, product categories, URL mappings, stock information, image paths. - -Accessing the key-value storage (Redis) is faster than making a request to Zed’s SQL database. Also, by limiting the connections to the SQL database, the performance of the entire application is optimized. - -The localized content is added by using Zed’s Back Office user interface. For every configured locale, the Back Office user can add the corresponding resource such as translations or path to images. The changes are updated in the Zed’s SQL database. - -The diagram bellow pictures the DB schema for the tables in which the translations are being stored. -![Database schema with translations stored](https://spryker.s3.eu-central-1.amazonaws.com/docs/Features/Internationalization/Glossary/How+Translations+are+Managed/glossary_kv_and_db.png) - -When the web application is first installed, the data stored in the Zed’s database is exported in the key-value storage (Redis) used by Yves. To assure that the key-value storage is in sync with the data stored in the SQL database, Queue processes will consume translation events and publish the data to key -value storage (Redis). These events will be triggered when a translation is created, updated or deleted. There is also a command that can be used for triggering the events manually in case of data refreshment: - -`console event:trigger -r translation` -If you lost your storage data, you can sync the published data to storage by calling this command: - -`console sync:data translation` - -The schema bellow summarizes the levels of persistence used in order to offer localized content into the front office interface (Yves). -![Levels of persistence](https://spryker.s3.eu-central-1.amazonaws.com/docs/Features/Internationalization/Glossary/How+Translations+are+Managed/glossarykeyspersistence.png) - -## Command query separation - -We can consider the key-value storage as a denormalized model of the relational model stored in the Sql database and the request of rendering a page as a query that the user makes. Statistically, query requests are happening a lot more often than command requests ( such as checkout or submitting a payment) and using a dedicated storage for them brings a lot of speed in the application. - -Another advantage of using a denormalized model for displaying localized content is that we don’t have to do the transformations of the objects stored in the relational database when using them on the client side logic. - - diff --git a/docs/scos/dev/feature-walkthroughs/202005.0/spryker-core-feature-walkthrough/spryker-core-feature-walkthrough.md b/docs/scos/dev/feature-walkthroughs/202005.0/spryker-core-feature-walkthrough/spryker-core-feature-walkthrough.md deleted file mode 100644 index b2e22fc4107..00000000000 --- a/docs/scos/dev/feature-walkthroughs/202005.0/spryker-core-feature-walkthrough/spryker-core-feature-walkthrough.md +++ /dev/null @@ -1,20 +0,0 @@ ---- -title: Spryker Core feature walkthrough -last_updated: Aug 20, 2021 -description: The Spryker Core feature represents a set of basic modules representing the Spryker Commerce OS. -template: concept-topic-template ---- - -The _Spryker Core_ feature is a set of basic modules representing the Spryker Commerce OS. - - -To learn more about the feature and to find out how end users use it, see [Spryker Core](/docs/scos/user/features/{{page.version}}//spryker-core-feature-overview/spryker-core-feature-overview.html) for business users. - - -## Related Developer documents - -|INSTALLATION GUIDES | TUTORIALS AND HOWTOS | REFERENCES| -|---------|---------|---------| -| [Spryker Сore feature integration](/docs/scos/dev/feature-integration-guides/{{page.version}}/spryker-core-feature-integration.html) | [Tutorial: Managing glossary key](/docs/scos/dev/tutorials-and-howtos/advanced-tutorials/tutorial-managing-glossary-keys.html) | [How translations are managed](/docs/scos/dev/feature-walkthroughs/{{page.version}}/spryker-core-feature-walkthrough/how-translations-are-managed.html) | -| | | [URL redirects overview](/docs/scos/dev/feature-walkthroughs/{{page.version}}/spryker-core-feature-walkthrough/url-redirects-overview.html) | -| | | [Vault for Tokens overview](/docs/scos/user/features/{{page.version}}/spryker-core-feature-overview/vault-for-tokens-overview.html) | diff --git a/docs/scos/dev/feature-walkthroughs/202005.0/spryker-core-feature-walkthrough/url-redirects-overview.md b/docs/scos/dev/feature-walkthroughs/202005.0/spryker-core-feature-walkthrough/url-redirects-overview.md deleted file mode 100644 index a4c93d4aa08..00000000000 --- a/docs/scos/dev/feature-walkthroughs/202005.0/spryker-core-feature-walkthrough/url-redirects-overview.md +++ /dev/null @@ -1,23 +0,0 @@ ---- -title: URL redirects overview -last_updated: Aug 20, 2021 -description: With URL redirects, you can create content redirects and increase your store's search engine visibility -template: concept-topic-template -originalLink: https://documentation.spryker.com/v5/docs/url-redirects -originalArticleId: c074b3e7-e016-4894-8c33-745957ca7139 -redirect_from: - - /v5/docs/url-redirects - - /v5/docs/en/url-redirects ---- - -With the URL redirects, you can create content redirects and increase your store's search engine visibility. Redirects can be store-internal or external and can reflect various HTTP status codes that play a major role in search engine ranking. Besides, redirects for the changed product, CMS pages, categories URLs are auto-generated. -A URL redirect is a special entity that consists of a source URL (which is provided by the `spy_url database` table), a target URL, and an HTTP status code stored in the `spy_url_redirect` database table. Redirects are exported to the key-value storage with collectors and are matched with StorageRouter the same way as described in the [URL](/docs/scos/dev/back-end-development/yves/url.html) article. `\Pyz\Yves\Redirect\Controller\RedirectController` in the Demo Shop, sends a redirect response to the target URL with the given status code. - -## Manual redirects -In the Back Office, you can create custom URL redirects from not yet existing URLs to other internal or external URLs with different status codes. See [Creating CMS redirects](/docs/scos/user/back-office-user-guides/{{page.version}}/content/redirects/creating-cms-redirects.html) for details. - -## Automatic redirects - -When using URL module's public API (`UrlFacade`) to manage URLs, whenever a URL is modified, a new URL redirect is automatically created in the background from the old URL. This helps search engines and other external URLs pointing to the old URL find the content that was displayed there before. Thus, when URLs of products, CMS pages, categories, and even URL redirects change, their old URL will still live and point to a valid page they used to display. - -Since URL redirects are special URLs, whenever a non-redirect entity wants to take control over a URL that was redirected, it will be possible, so redirected URLs can be overtaken by other entities that need those URLs. diff --git a/docs/scos/dev/feature-walkthroughs/202005.0/tax-feature-walkthrough/tax-feature-walkthrough.md b/docs/scos/dev/feature-walkthroughs/202005.0/tax-feature-walkthrough/tax-feature-walkthrough.md deleted file mode 100644 index bf31f6fe3c0..00000000000 --- a/docs/scos/dev/feature-walkthroughs/202005.0/tax-feature-walkthrough/tax-feature-walkthrough.md +++ /dev/null @@ -1,20 +0,0 @@ ---- -title: Tax feature walkthrough -last_updated: Aug 20, 2021 -description: "The Tax feature allows you to define taxes for the items you sell. The feature is represented by two entities: tax rates and tax sets" -template: concept-topic-template ---- - -The _Tax_ feature allows you to define taxes for the items you sell. The feature is represented by two entities: tax rates and tax sets. - - -To learn more about the feature and to find out how end users use it, see [Tax feature overview](/docs/scos/user/features/{{page.version}}/tax-feature-overview.html) for business users. - -## Related Developer documents - -| MIGRATION GUIDES | GLUE API GUIDES | DATA IMPORT | -|---|---|---| -|Tax migration guide | [Retrieving tax sets](/docs/scos/dev/glue-api-guides/{{page.version}}/managing-products/abstract-products/retrieving-tax-sets.html) | [File details: tax.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/commerce-setup/file-details-tax.csv.html) | | -| | | [File details: product_abstract.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/catalog-setup/products/file-details-product-abstract.csv.html) | | -| | | [File details: product_option.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/special-product-types/product-options/file-details-product-option.csv.html) | | -| | | [File details: shipment.csv](/docs/scos/dev/data-import/{{page.version}}/data-import-categories/commerce-setup/file-details-shipment.csv.html) | diff --git a/docs/scos/dev/feature-walkthroughs/202005.0/tax-feature-walkthrough/tax-module-reference-information.md b/docs/scos/dev/feature-walkthroughs/202005.0/tax-feature-walkthrough/tax-module-reference-information.md deleted file mode 100644 index ba595ca3172..00000000000 --- a/docs/scos/dev/feature-walkthroughs/202005.0/tax-feature-walkthrough/tax-module-reference-information.md +++ /dev/null @@ -1,152 +0,0 @@ ---- -title: "Tax module: reference information" -last_updated: Aug 20, 2021 -description: The Tax module is responsible for handling tax rates that can apply for products, product options or shipment. -template: feature-walkthrough-template -originalLink: https://documentation.spryker.com/v5/docs/tax-module -originalArticleId: 05ff146a-39a6-4900-8474-f9cd0319457e -redirect_from: - - /v5/docs/tax-module - - /v5/docs/en/tax-module - - /docs/scos/dev/feature-walkthroughs/202005.0/tax-feature-walkthrough/reference-information-tax-module.html ---- - - -The Tax module is responsible for handling tax rates that can apply for products, product options, or shipment. - -## Overview - -The tax sets can have different tax rates for each country defined in your shop. You can see in the diagram below how these entities are modeled in the database. -![Database for tax sets](https://spryker.s3.eu-central-1.amazonaws.com/docs/Features/Tax/Tax+Version+1.0/tax.png) - -A tax set is defined by a name and is uniquely identified by an `id`. As its name says, it’s associated to a set of rates. A tax rate is defined by a name, a numeric rate value and it’s linked to a country. - -All in one, a tax set contains of collection of tax rates that apply by country. - -The `SpyTaxSetTax` table is used to model the many-to-many relation between tax set and tax rate tables. - -{% info_block infoBox "Tax Related Entities" %} - -There are a couple of entities that have a tax set associated as a foreign key, such as abstract products, product options and shipment methods. - -{% endinfo_block %} - - -## TaxDefault class - -TaxDefault class contains two important operations: - -* `getDefaultTaxCountry()`—retrieves the default tax country from the configuration file (e.g.: Germany). -* `getDefaultTaxRate()`—retrieved the default tax rate from the configuration file (e.g.: 19%). - -These methods are called if the tax calculator cannot find the corresponding tax rate for one of the related entities. - -These methods can be extended on the project side, depending on your needs. - -## Calculator plugins - -Tax module ships with a set of calculator plugins, dedicated for calculating the taxes for each of the corresponding items in the QuoteTransfer. - -The calculators are called to recalculate the taxes every time the `addToCart()` method is called or the payment step is entered. If the customer has changed the country during the address step, this is not an issue because the tax rates are recalculated. - -### Calculator plugins for tax rates - -* `ProductItemTaxCalculatorsPlugin`—calculates tax rates based on `IdAbstractProduct` in the items contained in the QuoteTransfer (Tax module) -* `ProductIOptionTaxCalculatorsPlugin`—calculated tax rates based on `IdOptionValueUsage` for every product option of the items contained in the QuoteTransfer (ProductOption module) -* `ShipmentTaxCalculatorsPlugin`—calculates tax rates based on the shipment method set in the `QuoteTransfer` (Shipment module) - -The calculator plugins are registered in the `CalculationDependencyProvider:getCalculatorStack()` method. - -## Extending Tax module - -One of the most common use cases of extending the Tax module is to provide a custom calculator. - -In the coding example below, we’ll implement a calculator that uses a flat tax rate for all the products. - -The new calculator plugin must extend the `AbstractPlugin` class and implement the `CalculatorPluginInterface`. - -In Zed, inside the `Tax/Communication/Plugin/` folder, create the `FlatTaxRateCalculatorPlugin` class. - -```php -getFacade()->calculateProductItemTaxRate($quoteTransfer); - } -} -``` - -Next, implement the business logic; create `FlatTaxRateCalculator` inside the `Model` folder. - -```php -getFactory()->createFlatTaxRateCalculator()->recalculate($quoteTransfer); - } -} -``` - -Register the new plugin in the `CalculationDependencyProvide:getCalculatorStack()` method: - -```php -For details, see [Managing Customers](/docs/scos/dev/glue-api-guides/{{page.version}}/manging-customers/managing-customers.html). | -| idCart | RestAddressTransfer | v | ID of the customer's cart.
    For details, see [Managing Carts of Registered Users](/docs/scos/dev/glue-api-guides/{{page.version}}/managing-carts/carts-of-registered-users/managing-carts-of-registered-users.html). | -| billingAddress | RestAddressTransfer | x | Customer's billing address.
    For details, see [Managing Customers](/docs/scos/dev/glue-api-guides/{{page.version}}/manging-customers/managing-customers.html). | -| shippingAddress | RestAddressesRequestData | x | Customer's shipping address.
    For details, see [Managing Customers.](/docs/scos/dev/glue-api-guides/{{page.version}}/manging-customers/managing-customers.html) | -| payments | RestPayment | x | Payment options, such as the payment system, method of payment, etc.
    For details, see [Payment Step](/docs/scos/user/shop-user-guides/{{page.version}}/shop-guide-checkout/shop-guide-payment-step.html). | -| shipment | RestShipmentTransfer | x | Shipment details.
    For details, see [Shipment Step](/docs/scos/dev/back-end-development/data-manipulation/datapayload-conversion/checkout/checkout-steps.html#shipment-step). | - -**Body Sample** - -```json -{ - "data": { - "type": "checkout-data", - "attributes": { - "customer": { - "salutation": "Mr", - "email": "spencor.hopkin.new.address@spryker.com", - "firstName": "spencor", - "lastName": "hopkin" - }, - "idCart": "d69fc8d2-acc9-5b32-81b6-103618e94fc9", - "billingAddress": { - "salutation": "Mr", - "email": "spencor.hopkin@spryker.com", - "firstName": "spencor", - "lastName": "hopkin", - "address1": "West road", - "address2": "212", - "address3": "", - "zipCode": "61000", - "city": "Berlin", - "iso2Code": "DE", - "company": "Spryker", - "phone": "+380669455897", - "isDefaultShipping": true, - "isDefaultBilling": true - }, - "shippingAddress": { - "salutation": "Mr", - "email": "spencor.hopkin@spryker.com", - "firstName": "spencor", - "lastName": "hopkin", - "address1": "West road", - "address2": "212", - "address3": "", - "zipCode": "61000", - "city": "Berlin", - "iso2Code": "DE", - "company": "Spryker", - "phone": "+380669455897", - "isDefaultShipping": false, - "isDefaultBilling": false - }, - "payments": [ - { - "paymentMethodName": "invoice", - "paymentProviderName": "DummyPayment" - } - ], - "shipment": { - "idShipmentMethod": 1 - } - } - } -} -``` - -In your request, you can use the addresses stored in a customer's account rather than specify them explicitly. To do so, pass the address identifier as a part of the **billingAddress** or the **shippingAddress** fields. - -{% info_block infoBox "Info" %} -The address identifiers will be available in the **addresses** field of the endpoint response. For details, see subsection *Response*.
    You can also retrieve the IDs by querying the `/customers/{% raw %}{{{% endraw %}customer_reference{% raw %}}}{% endraw %}/addresses` endpoint. For details, see [Managing Customers](/docs/scos/dev/glue-api-guides/{{page.version}}/manging-customers/managing-customers.html). -{% endinfo_block %} - -{% info_block warningBox "Note" %} -The following address parts are compulsory: **salutation**, **firstName**, **lastName**, **address1**, **address2**, **zipCode**, **city**, **iso2Code**. If you are using an address ID, you can pass dummy values for the address parts. When resolving the ID, they will be replaced with the actual values of the customer account. -{% endinfo_block %} - -**Body Sample** - -```json -{ - "data": { - "type": "checkout-data", - "attributes": { - "idCart": "d69fc8d2-acc9-5b32-81b6-103618e94fc9", - "billingAddress": { - "id": "22d78681-9885-5b47-8916-42f9e72b29ff", - "salutation": "dummyValue", - "firstName": "dummyValue", - "lastName": "dummyValue", - "address1": "dummyValue", - "address2": "dummyValue", - "zipCode": "dummyValue", - "city": "dummyValue", - "iso2Code": "dummyValue" - } - } - } -} -``` - -**User Identification** -In order to access the endpoint, you need to identify the user whose cart you are checking out: -* If you are checking out a cart of a registered user, you need to include the user's authorization token in the request. For details, see [Authentication and Authorization](/docs/scos/dev/glue-api-guides/{{page.version}}/authentication-and-authorization.html). -* If you are checking out a guest cart, you need to include the guest user identifier in the **X-Anonymous-Customer-Unique-Id** header. For details, see [Managing Guest Carts](/docs/scos/dev/glue-api-guides/{{page.version}}/managing-carts/guest-carts/managing-guest-carts.html). - -{% info_block warningBox "Note" %} -You can also use the **Accept-Language** header to specify the locale.
    Sample header: `[{"key":"Accept-Language","value":"de, en;q=0.9"}]` where **de** and **en** are the locales; **q=0.9** is the user's preference for a specific locale. For details, see [14.4 Accept-Language](https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.4). -{% endinfo_block %} - -### Response -In case of a successful update, the endpoint responds with information that can help you fill in the missing checkout data, such as the customer's addresses, available payment and shipment methods, etc. - -
    -Response sample - -```json -{ - "data": { - "type": "checkout-data", - "id": null, - "attributes": { - "addresses": [ - { - "id": "22d78681-9885-5b47-8916-42f9e72b29ff", - "salutation": "Mr", - "firstName": "spencor", - "lastName": "hopkin", - "address1": "West road", - "address2": "212", - "address3": "", - "zipCode": "61000", - "city": "Berlin", - "country": { - "id_country": 60, - "iso2_code": "DE", - "iso3_code": "DEU", - "name": "Germany", - "postal_code_mandatory": true, - "postal_code_regex": "\\d{5}", - "regions": [] - }, - "iso2Code": "DE", - "company": "Spryker", - "phone": "+380669455897", - "isDefaultBilling": false, - "isDefaultShipping": false - } - ], - "paymentProviders": [], - "shipmentMethods": [], - "selectedShipmentMethods": [ - { - "id": 1, - "name": "Standard", - "carrierName": "Spryker Dummy Shipment", - "price": 490, - "taxRate": null, - "deliveryTime": null, - "defaultGrossPrice": 490, - "defaultNetPrice": 390, - "currencyIsoCode": "EUR" - } - ], - "selectedPaymentMethods": [ - { - "name": "credit card", - "paymentMethodName": "credit card", - "paymentProviderName": "DummyPayment", - "requiredRequestData": [ - "paymentMethod", - "paymentProvider", - "dummyPaymentCreditCard.cardType", - "dummyPaymentCreditCard.cardNumber", - "dummyPaymentCreditCard.nameOnCard", - "dummyPaymentCreditCard.cardExpiresMonth", - "dummyPaymentCreditCard.cardExpiresYear", - "dummyPaymentCreditCard.cardSecurityCode" - ] - } - ] - }, - "links": { - "self": "http://glue.mysprykershop.com/checkout-data" - } - } -} -``` - -
    -
    - -| Attribute* | Description | -| --- | --- | -| addresses | An array of customer addresses that can be used for billing and shipping.
    For details, see [Managing Customers](/docs/scos/dev/glue-api-guides/{{page.version}}/manging-customers/managing-customers.html). | -| paymentProviders | An array of payment providers that can be used for the checkout

    **Deprecated. For details on how to get information on payment providers, see section Selecting Payment and Shipment Methods.** LINK

    The following information is available for each payment provider:
    • paymentProviderName - specifies the provider name;
    • paymentMethods - specifies an array of payment methods. Each method exposes the following fields:
      • paymentMethodName - specifies the method name;
      • requiredRequestData - specifies an array of fields required to complete the payment. The actual field list depends on a specific payment provider.
    For details, see [Payment Step](/docs/scos/user/shop-user-guides/{{page.version}}/shop-guide-checkout/shop-guide-payment-step.html).| -| shipmentMethods | Provides information on the available Shipment Methods.

    **Deprecated. For details on how to get information on payment providers, see section Selecting Payment and Shipment Methods.** LINK

    Each method exposes the following details:
    • carrierName - specifies the carrier name;
    • id - specifies the method ID;
    • name - specifies the method name;
    • price - specifies the price for this method of shipment;
    • taxRate - specifies the tax rate;
    • deliveryTime - specifies the delivery time.
    For details, see [Shipment Step](/docs/scos/user/shop-user-guides/{{page.version}}/shop-guide-checkout/shop-guide-shipment-step.html).
    You can use the ID provided to use a certain method of payment. | -| selectedShipmentMethods | Specifies the selected shipment methods.
    The following attributes are available for each method:
    • id - ID of the method.
    • name - method name.
    • price - price of delivery, in cents.
    • taxRate - tax rate, in cents. **Deprecated**.
    • deliveryTime - desired delivery time, if available.
    • defaultGrossPrice - default gross price, in cents.
    • defaultNetPrice - default net price, in cents.
    • currencyIsoCode - specifies the ISO 4217 code of the currency in which the prices are specified.
    | -| selectedPaymentMethods | Specifies the selected payment methods.
    The following attributes are available for each method:
    • id - ID of the method.
    • name and paymentMethodName - method name.
    • paymentProviderName - provider name.
    • priority - specifies the priority.
    • requiredRequestData -array of attributes required by the given method to effectuate a purchase. The exact attribute list depends on the specific provider.
    | - -*The attributes mentioned are all attributes in the response. Type and ID are not mentioned. - -### Possible Errors - -| Status | Reason | -| --- | --- | -| 400 | Bad request. This error can occur due to the following reasons:
    • The POST data is incorrect;
    • Neither **Authorization** nor **X-Anonymous-Customer-Unique-Id** headers were provided in the request.
    | -| 422 | The checkout data is incorrect. | - -## Selecting Payment and Shipment Methods -During checkout, customers need to specify the payment and shipment details for their purchases. For this purpose, they need to specify, for each purchase, the payment provider and the payment method, as well as the shipment method. To facilitate their choice, the endpoints allow you to retrieve the lists of the providers available in the system so that you can display them to the customer. - -If you opt to fetch such information, the details include not only the provider names but also such details as the availability, cost, duration of shipment and other important pieces of information that can help customers in making their choice. - -To fetch the available payment methods, include the **payment-methods** resource relationship in the response of the *checkout-data* endpoint: -**POST http://glue.mysprykershop.com/checkout-data?include=payment-methods** - -
    -Response sample - -``` -{ - "data": { - "type": "checkout-data", - "id": null, - "attributes": {...}, - "links": {...}, - "relationships": { - "payment-methods": { - "data": [ - { - "type": "payment-methods", - "id": "1" - }, - { - "type": "payment-methods", - "id": "2" - } - ] - } - } - }, - "included": [ - { - "type": "payment-methods", - "id": "1", - "attributes": { - "paymentMethodName": "Invoice", - "paymentProviderName": "DummyPayment", - "priority": 1, - "requiredRequestData": [ - "paymentMethod", - "paymentProvider", - "dummyPaymentInvoice.dateOfBirth" - ] - }, - "links": { - "self": "http://glue.mysprykershop.com/payment-methods/1" - } - }, - { - "type": "payment-methods", - "id": "2", - "attributes": { - "paymentMethodName": "Credit Card", - "paymentProviderName": "DummyPayment", - "priority": 2, - "requiredRequestData": [ - "paymentMethod", - "paymentProvider", - "dummyPaymentCreditCard.cardType", - "dummyPaymentCreditCard.cardNumber", - "dummyPaymentCreditCard.nameOnCard", - "dummyPaymentCreditCard.cardExpiresMonth", - "dummyPaymentCreditCard.cardExpiresYear", - "dummyPaymentCreditCard.cardSecurityCode" - ] - }, - "links": { - "self": "http://glue.mysprykershop.com/payment-methods/2" - } - } - ] -} -``` -
    -
    - -| Attribute* | Type | Description | -| --- | --- | --- | -| paymentMethodName | String | Payment method name. | -| paymentProviderName | String | Payment provider name. | -| priority | String | Priority of the payment method. | -| requiredRequestData | Object | Array of attributes required by the given method to effectuate a purchase. The exact attribute list depends on the specific provider. | - -To retrieve shipment methods, include the **shipment-methods** resource relationship: -**POST http://glue.mysprykershop.com/checkout-data?include=shipment-methods** - -
    -Response sample - -``` -{ - "data": { - "type": "checkout-data", - "id": null, - "attributes": {...}, - "links": {...}, - "relationships": { - "shipment-methods": { - "data": [ - { - "type": "shipment-methods", - "id": "1" - }, - { - "type": "shipment-methods", - "id": "2" - }, - { - "type": "shipment-methods", - "id": "3" - }, - { - "type": "shipment-methods", - "id": "4" - }, - { - "type": "shipment-methods", - "id": "5" - } - ] - } - } - }, - "included": [ - { - "type": "shipment-methods", - "id": "1", - "attributes": { - "name": "Standard", - "carrierName": "Spryker Dummy Shipment", - "deliveryTime": null, - "defaultGrossPrice": 490, - "defaultNetPrice": 390, - "currencyIsoCode": "EUR" - }, - "links": { - "self": "http://glue.mysprykershop.com/shipment-methods/1" - } - }, - { - "type": "shipment-methods", - "id": "2", - "attributes": { - "name": "Express", - "carrierName": "Spryker Dummy Shipment", - "deliveryTime": null, - "defaultGrossPrice": 590, - "defaultNetPrice": 490, - "currencyIsoCode": "EUR" - }, - "links": { - "self": "http://glue.mysprykershop.com/shipment-methods/2" - } - }, - { - "type": "shipment-methods", - "id": "3", - "attributes": { - "name": "Air Standard", - "carrierName": "Spryker Drone Shipment", - "deliveryTime": null, - "defaultGrossPrice": 500, - "defaultNetPrice": 450, - "currencyIsoCode": "EUR" - }, - "links": { - "self": "http://glue.mysprykershop.com/shipment-methods/3" - } - }, - { - "type": "shipment-methods", - "id": "4", - "attributes": { - "name": "Air Sonic", - "carrierName": "Spryker Drone Shipment", - "deliveryTime": null, - "defaultGrossPrice": 1000, - "defaultNetPrice": 800, - "currencyIsoCode": "EUR" - }, - "links": { - "self": "http://glue.mysprykershop.com/shipment-methods/4" - } - }, - { - "type": "shipment-methods", - "id": "5", - "attributes": { - "name": "Air Light", - "carrierName": "Spryker Drone Shipment", - "deliveryTime": null, - "defaultGrossPrice": 1500, - "defaultNetPrice": 1200, - "currencyIsoCode": "EUR" - }, - "links": { - "self": "http://glue.mysprykershop.com/shipment-methods/5" - } - } - ] -} -``` -
    -
    - - -| Attribute* | Type | Description | -| --- | --- | --- | -| name | String | Shipment method name. | -| carrierName | String | Carrier name. | -| deliveryTime | Integer | Estimated delivery time. | -| defaultGrossPrice | Integer | Default gross price, in cents. | -| defaultNetPrice | Integer | Default net price, in cents. | -| currencyIsoCode | String | ISO 4217 code of the currency in which the prices are specified. | - -To further assist users with selecting the payment and shipment methods they want to use, you can sort them by any attribute. For this purpose, use the **sort** URL parameter in your requests. For example, you can request sorting of shipment methods by price to help users select the cheapest one. - -| Sort Parameter | Meaning | -| --- | --- | -| sort=attribute | Sort by attribute, **ascending**. | -| sort=-attribute | Sort by attribute, **descending**. | -| sort=attribute1,-attribute2 | Sort by 2 parameters:
    • attribute1, **ascending**.
    • attribute2, **descending**.
    | - -In the following example request, shipment methods are sorted by attributes carrierName (**ascending**) and defaultNetPrice (**descending**): - -**POST http://glue.mysprykershop.com/checkout-data?include=shipment-methods&sort=shipment-methods.carrierName,-shipment-methods.defaultNetPrice** - -If the payment and/or shipment methods have been specified in the request to the /checkout-data endpoint, they are returned in the `selectedPaymentMethods` and the `selectedShipmentMethods` attribute, respectively: - -
    -Response sample with shipment and payment methods selected - -``` -{ - "data": { - "type": "checkout-data", - "id": null, - "attributes": { - "addresses": [...], - "paymentProviders": [...], - "shipmentMethods": [...], - "selectedShipmentMethods": [ - { - "id": 1, - "name": "Standard", - "carrierName": "Spryker Dummy Shipment", - "price": 490, - "taxRate": null, - "deliveryTime": null, - "defaultGrossPrice": 490, - "defaultNetPrice": 390, - "currencyIsoCode": "EUR" - } - ], - "selectedPaymentMethods": [ - { - "name": "credit card", - "paymentMethodName": "credit card", - "paymentProviderName": "DummyPayment", - "requiredRequestData": [ - "paymentMethod", - "paymentProvider", - "dummyPaymentCreditCard.cardType", - "dummyPaymentCreditCard.cardNumber", - "dummyPaymentCreditCard.nameOnCard", - "dummyPaymentCreditCard.cardExpiresMonth", - "dummyPaymentCreditCard.cardExpiresYear", - "dummyPaymentCreditCard.cardSecurityCode" - ] - } - ] - }, - "links": {...} - } -} -``` -
    -
    - - -## Placing Orders -To finalize checkout and place an order, send a POST request to the following endpoint: - -[/checkout](/docs/scos/dev/glue-api-guides/{{page.version}}/rest-api-reference.html#/checkout) - -Request sample: *POST http://glue.mysprykershop.com/checkout* - -### Request -A request should contain: -* valid customer information (e.g. first name, last name, salutation etc); -* payment and shipment methods (they should exist in the system); -* valid shipping and billing addresses; -* ID of the customer's cart that is being checked out. - -{% info_block infoBox "Info" %} -To submit a request, the customer needs to have at least one cart with products in it. -{% endinfo_block %} - -{% info_block warningBox "Note" %} -By default, if the checkout is successful, the order is placed and the shopping cart is deleted automatically. -{% endinfo_block %} - -**Request Attributes** - -| Attribute | Type | Required | Description | -| --- | --- | --- | --- | -| customer | RestCustomerTransfer | v | Information about the customer.
    For details, see [Managing Customers](/docs/scos/dev/glue-api-guides/{{page.version}}/manging-customers/managing-customers.html). | -| idCart | string | v | ID of the customer's cart.
    For details, see [Managing Carts of Registered Users](/docs/scos/dev/glue-api-guides/{{page.version}}/managing-carts/carts-of-registered-users/managing-carts-of-registered-users.html). | -| billingAddress | RestAddressTransfer | v | Customer's billing address.
    For details, see [Managing Customers](/docs/scos/dev/glue-api-guides/{{page.version}}/manging-customers/managing-customers.html). | -| shippingAddress | RestAddressesRequestData | v | Customer's shipping address.
    For details, see [Managing Customers](/docs/scos/dev/glue-api-guides/{{page.version}}/manging-customers/managing-customers.html). | -| payments | RestPayment | v | Payment options, such as the payment system, method of payment, etc.
    For details, see [Payment Step](/docs/scos/user/shop-user-guides/{{page.version}}/shop-guide-checkout/shop-guide-payment-step.html). | -| shipment | RestShipmentTransfer | v | Shipment details.
    For details, see [Shipment Step](/docs/scos/user/shop-user-guides/{{page.version}}/shop-guide-checkout/shop-guide-shipment-step.html). | - -**Body Sample** - -```json -{ - "data": { - "type": "checkout", - "attributes": { - "customer": { - "salutation": "Mr", - "email": "spencor.hopkin@spryker.com", - "firstName": "spencor", - "lastName": "hopkin" - }, - "idCart": "fe6969e9-09aa-5183-b911-0a9218ed21bb", - "billingAddress": { - "salutation": "Mr", - "email": "spencor.hopkin@spryker.com", - "firstName": "spencor", - "lastName": "hopkin", - "address1": "West road", - "address2": "212", - "address3": "", - "zipCode": "61000", - "city": "Berlin", - "iso2Code": "DE", - "company": "Spryker", - "phone": "+380669455897", - "isDefaultShipping": true, - "isDefaultBilling": true - }, - "shippingAddress": { - "salutation": "Mr", - "email": "spencor.hopkin@spryker.com", - "firstName": "spencor", - "lastName": "hopkin", - "address1": "West road", - "address2": "212", - "address3": "", - "zipCode": "61000", - "city": "Berlin", - "iso2Code": "DE", - "company": "Spryker", - "phone": "+380669455897", - "isDefaultShipping": false, - "isDefaultBilling": false - }, - "payments": [ - { - "paymentMethodName": "invoice", - "paymentProviderName": "DummyPayment" - } - ], - "shipment": { - "idShipmentMethod": 1 - } - } - } -} -``` - -In your request, you can use the addresses stored in a customer's account rather than specify them explicitly. To do so, pass the address identifier as a part of the **billingAddress** or the **shippingAddress** fields. - -{% info_block infoBox "Info" %} -The address identifiers will be available in the **addresses** field of the `/checkout-data` endpoint response. For details, see subsection *Response*.
    You can also retrieve the IDs by querying the `/customers/{% raw %}{{{% endraw %}customer_reference{% raw %}}}{% endraw %}/addresses` endpoint. For details, see [Managing Customers](/docs/scos/dev/glue-api-guides/{{page.version}}/manging-customers/managing-customers.html). -{% endinfo_block %} - -{% info_block warningBox "Note" %} -The following address parts are compulsory: **salutation**, **firstName**, **lastName**, **address1**, **address2**, **zipCode**, **city**, **iso2Code**. If you are using an address ID, you can pass dummy values for the address parts. The **iso2Code** must be a valid code, for example, DE. When resolving the ID, they will be replaced with the actual values of the customer account. -{% endinfo_block %} - -**Body Sample** - -```json -{ - "data": { - "type": "checkout", - "attributes": { - "customer": { - "salutation": "Mr", - "email": "spencor.hopkin.new.address@spryker.com", - "firstName": "spencor", - "lastName": "hopkin" - }, - "idCart": "d69fc8d2-acc9-5b32-81b6-103618e94fc9", - "billingAddress": { - "id": "22d78681-9885-5b47-8916-42f9e72b29ff", - "salutation": "dummyValue", - "firstName": "dummyValue", - "lastName": "dummyValue", - "address1": "dummyValue", - "address2": "dummyValue", - "zipCode": "dummyValue", - "city": "dummyValue", - "iso2Code": "DE" - }, - "shippingAddress": { - "id": "22d78681-9885-5b47-8916-42f9e72b29ff", - "salutation": "dummyValue", - "firstName": "dummyValue", - "lastName": "dummyValue", - "address1": "dummyValue", - "address2": "dummyValue", - "zipCode": "dummyValue", - "city": "dummyValue", - "iso2Code": "DE" - }, - "payments": [ - { - "paymentMethodName": "invoice", - "paymentProviderName": "DummyPayment" - } - ], - "shipment": { - "idShipmentMethod": 1 - } - } - } -} -``` - -**User Identification** -In order to access the endpoint, you need to identify the user whose cart you are checking out: -* If you are checking out a cart of a registered user, you need to include the user's authorization token in the request.
    For details, see [Authentication and Authorization](/docs/scos/dev/glue-api-guides/{{page.version}}/authentication-and-authorization.html). -* If you are checking out a guest cart, you need to include the guest user identifier in the **X-Anonymous-Customer-Unique-Id** header.
    For details, see [Managing Guest Carts](/docs/scos/dev/glue-api-guides/{{page.version}}/managing-carts/guest-carts/managing-guest-carts.html). - -{% info_block warningBox "Note" %} -You can also use the **Accept-Language** header to specify the locale.
    Sample header: `[{"key":"Accept-Language","value":"de, en;q=0.9"}]` where **de** and **en** are the locales; **q=0.9** is the user's preference for a specific locale. For details, see [14.4 Accept-Language](https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.4). -{% endinfo_block %} - -### Response -The endpoint responds with the checkout information. - -{% info_block infoBox "Info" %} -Among the attributes returned, there is **orderReference** that can be used to reference the associated order in the future. -{% endinfo_block %} - -**Response Attributes:** - -| Attribute* | Type | Description | -| --- | --- | --- | -| orderReference | String | Specifies a reference that can be used to access the order in the future. | -| redirectUrl | String | Specifies a URL where the customer needs to be redirected to perform additional verification, if necessary. | -| isExternalRedirect | Boolean | Indicates whether the customer is redirected to an external URL. | - -*The attributes mentioned are all attributes in the response. Type and ID are not mentioned. - -**Response Sample** - -```json -{ - "data": { - "type": "checkout", - "id": null, - "attributes": { - "orderReference": "DE--3", - "redirectUrl": null, - "isExternalRedirect": null - }, - "links": { - "self": "http://glue.mysprykershop.com/checkout" - }, - }, -} -``` - -You can extend the response with the **orders** resource relationship in order to obtain detailed order information. - -{% info_block infoBox "Info" %} - -For detailed information and a list of attributes, see section [Retrieving Specific Order](/docs/scos/dev/glue-api-guides/{{page.version}}/managing-customers/retrieving-customer-orders.html). - -{% endinfo_block %} - -Request sample: *POST http://glue.mysprykershop.com/checkout?include=orders* - -**Response Sample** - -```json -{ - "data": { - "type": "checkout", - "id": null, - "attributes": {...}, - "links": {...}, - "relationships": { - "orders": { - "data": [ - { - "type": "orders", - "id": "DE--3" - } - ] - } - } - }, - "included": [ - { - "type": "orders", - "id": "DE--3", - "attributes": { - "createdAt": "2019-07-25 09:14:16.274617", - "totals": { - "expenseTotal": 490, - "discountTotal": 7143, - "taxTotal": 9880, - "subtotal": 68530, - "grandTotal": 61877, - "canceledTotal": 0 - }, - "currencyIsoCode": "EUR", - "items": [ - { - "name": "Acer Chromebook C730-C8T7", - "sku": "136_24425591", - "sumPrice": 33265, - "sumPriceToPayAggregation": 30938, - "quantity": 1, - "metadata": { - "superAttributes": [], - "image": "//images.icecat.biz/img/gallery_mediums/img_24425591_medium_1483525296_3275_9985.jpg" - }, - "calculatedDiscounts": [ - { - "unitAmount": 3327, - "sumAmount": 3327, - "displayName": "10% Discount for all orders above", - "description": "Get a 10% discount on all orders above certain value depending on the currency and net/gross price. This discount is not exclusive and can be combined with other discounts.", - "voucherCode": null, - "quantity": 1 - } - ], - "unitGrossPrice": 33265, - "sumGrossPrice": 33265, - "taxRate": "19.00", - "unitNetPrice": 0, - "sumNetPrice": 0, - "unitPrice": 33265, - "unitTaxAmountFullAggregation": 4940, - "sumTaxAmountFullAggregation": 4940, - "refundableAmount": 30938, - "canceledAmount": 0, - "sumSubtotalAggregation": 34265, - "unitSubtotalAggregation": 34265, - "unitProductOptionPriceAggregation": 1000, - "sumProductOptionPriceAggregation": 1000, - "unitExpensePriceAggregation": 0, - "sumExpensePriceAggregation": null, - "unitDiscountAmountAggregation": 3327, - "sumDiscountAmountAggregation": 3327, - "unitDiscountAmountFullAggregation": 3327, - "sumDiscountAmountFullAggregation": 3327, - "unitPriceToPayAggregation": 30938, - "taxRateAverageAggregation": "19.00", - "taxAmountAfterCancellation": null - }, - { - "name": "Acer Chromebook C730-C8T7", - "sku": "136_24425591", - "sumPrice": 33265, - "sumPriceToPayAggregation": 30939, - "quantity": 1, - "metadata": { - "superAttributes": [], - "image": "//images.icecat.biz/img/gallery_mediums/img_24425591_medium_1483525296_3275_9985.jpg" - }, - "calculatedDiscounts": [ - { - "unitAmount": 3326, - "sumAmount": 3326, - "displayName": "10% Discount for all orders above", - "description": "Get a 10% discount on all orders above certain value depending on the currency and net/gross price. This discount is not exclusive and can be combined with other discounts.", - "voucherCode": null, - "quantity": 1 - } - ], - "unitGrossPrice": 33265, - "sumGrossPrice": 33265, - "taxRate": "19.00", - "unitNetPrice": 0, - "sumNetPrice": 0, - "unitPrice": 33265, - "unitTaxAmountFullAggregation": 4940, - "sumTaxAmountFullAggregation": 4940, - "refundableAmount": 30939, - "canceledAmount": 0, - "sumSubtotalAggregation": 34265, - "unitSubtotalAggregation": 34265, - "unitProductOptionPriceAggregation": 1000, - "sumProductOptionPriceAggregation": 1000, - "unitExpensePriceAggregation": 0, - "sumExpensePriceAggregation": null, - "unitDiscountAmountAggregation": 3326, - "sumDiscountAmountAggregation": 3326, - "unitDiscountAmountFullAggregation": 3326, - "sumDiscountAmountFullAggregation": 3326, - "unitPriceToPayAggregation": 30939, - "taxRateAverageAggregation": "19.00", - "taxAmountAfterCancellation": null - } - ], - "expenses": [ - { - "type": "SHIPMENT_EXPENSE_TYPE", - "name": "Standard", - "sumPrice": 490, - "unitGrossPrice": 490, - "sumGrossPrice": 490, - "taxRate": "19.00", - "unitNetPrice": 0, - "sumNetPrice": 0, - "canceledAmount": null, - "unitDiscountAmountAggregation": null, - "sumDiscountAmountAggregation": null, - "unitTaxAmount": 0, - "sumTaxAmount": 0, - "unitPriceToPayAggregation": 0, - "sumPriceToPayAggregation": 0, - "taxAmountAfterCancellation": null - } - ], - "billingAddress": { - "salutation": "Mr", - "firstName": "spencor", - "middleName": null, - "lastName": "hopkin", - "address1": "West road", - "address2": "212", - "address3": "", - "company": "Spryker", - "city": "Berlin", - "zipCode": "61000", - "poBox": null, - "phone": "+380669455897", - "cellPhone": null, - "description": null, - "comment": null, - "email": null, - "country": "Germany", - "iso2Code": "DE" - }, - "shippingAddress": { - "salutation": "Mr", - "firstName": "spencor", - "middleName": null, - "lastName": "hopkin", - "address1": "West road", - "address2": "212", - "address3": "", - "company": "Spryker", - "city": "Berlin", - "zipCode": "61000", - "poBox": null, - "phone": "+380669455897", - "cellPhone": null, - "description": null, - "comment": null, - "email": null, - "country": "Germany", - "iso2Code": "DE" - }, - "priceMode": "GROSS_MODE", - "payments": [ - { - "amount": 61877, - "paymentProvider": "DummyPayment", - "paymentMethod": "invoice" - } - ], - "calculatedDiscounts": [ - { - "unitAmount": null, - "sumAmount": 490, - "displayName": "Free standard delivery", - "description": "Free standard delivery for all orders above certain value depending on the currency and net/gross price. This discount is not exclusive and can be combined with other discounts.", - "voucherCode": null, - "quantity": 1 - }, - { - "unitAmount": null, - "sumAmount": 6653, - "displayName": "10% Discount for all orders above", - "description": "Get a 10% discount on all orders above certain value depending on the currency and net/gross price. This discount is not exclusive and can be combined with other discounts.", - "voucherCode": null, - "quantity": 2 - } - ] - }, - "links": { - "self": "http://glue.mysprykershop.com/orders/DE--3" - } - } - ] -} -``` - -### Possible Errors - -| Status | Reason | -| --- | --- | -| 400 | Bad request. This error can occur due to the following reasons:
    • The POST data is incorrect;
    • Neither **Authorization** nor **X-Anonymous-Customer-Unique-Id** headers were provided in the request.
    | -| 422 | The checkout data is incorrect. | - -## Redirecting the User for Payment Confirmation -When placing an order, you need to check the value of the **redirectURL** attribute. If the value is null or empty, this means that the payment method selected by the customer does not require additional verification. If verification is necessary, the attribute will contain a URL to redirect the customer to. - -{% info_block warningBox "Note" %} -It is the responsibility of the API Client to redirect the customer to the page and capture the response. For information on how to process it, see information on the payment service provider's API. -{% endinfo_block %} - -The formats of the payloads used in the request and response to the third party page are defined by the respective **Eco** layer module that implements the interaction with the payment provider. For details, see section **3. Implement Payload Processor Plugin** in [Interacting with Third Parties via Glue API](docs/scos/dev/tutorials-and-howtos/advanced-tutorials/glue-api/tutorial-interacting-with-third-party-payment-providers-via-glue-api.html#implement-payload-processor-plugin). - -**Interaction Diagram** - -![Interaction diagram](https://spryker.s3.eu-central-1.amazonaws.com/docs/Glue+API/Glue+API+Storefront+Guides/Checking+Out+Purchases+and+Getting+Checkout+Data/multi-step-checkout-glue-storefront.png) - -## Updating Payment Data -If the user is redirected to a third-party page for payment verification, you need to update the payment with the payload received from the payment provider. To do so, post the payload to the following endpoint: - -[/order-payments](/docs/scos/dev/glue-api-guides/{{page.version}}/rest-api-reference.html#/order-payments) - -Request sample: *POST http://glue.mysprykershop.com/order-payments* - -### Request -Your request should contain the payload related to the order. The request can include an optional payment identifier, if necessary. - -{% info_block infoBox "Info" %} -The identifier is specified in the **orderReference** attribute of the `/checkout` endpoint response. -{% endinfo_block %} - -**Attributes** - -| Attribute | Type | Required | Description | -| --- | --- | --- | --- | -| paymentIdentifier | String | x | Payment ID.
    The value of the payment identifier depends on the payment services provider plugin used to process the payment. For details, see section **3. Implement Payload Processor Plugin** in [Interacting with Third Parties via Glue API](docs/scos/dev/tutorials-and-howtos/advanced-tutorials/glue-api/tutorial-interacting-with-third-party-payment-providers-via-glue-api.html#implement-payload-processor-plugin). | -| dataPayload | Array | v | Payload received from the payment service provider. | - -{% info_block warningBox "Note" %} -You can also use the **Accept-Language** header to specify the locale.
    Sample header: `[{"key":"Accept-Language","value":"de, en;q=0.9"}]` where **de** and **en** are the locales; **q=0.9** is the user's preference for a specific locale. For details, see [14.4 Accept-Language](https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.4). -{% endinfo_block %} - -**Sample Request Body** - -```json -{ - "data": { - "type": "order-payments", - "attributes": { - "paymentIdentifier": "1ce91011-8d60-59ef-9fe0-4493ef36bbfe", - "dataPayload": [ - { - "type": "payment-confirmation", - "hash": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1Ni" - } - ] - } - } -} -``` - -### Response -If the request was successful, the endpoint will respond with a 201 Created status code and a new payload, if it is necessary to pass it to a third party provider. If there is no new payload, the **dataPayload** is null. - -**Response Attributes:** - -| Attribute* | Type | Description | -| --- | --- | --- | -| paymentIdentifier | String | Payment ID | -| dataPayload | Array | Payload | - -*The attributes mentioned are all attributes in the response. Type and ID are not mentioned. - -**Response Sample** - -```json -{ - "data": { - "type": "order-payments", - "id": "86791011-8d60-59ef-9fe0-4493ef36bbfe", - "attributes": { - "paymentIdentifier": "1ce91011-8d60-59ef-9fe0-4493ef36bbfe", - "dataPayload": [ - { - "type": "payment-confirmation", - "hash": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1Ni" - } - ] - }, - "links": { - "self": "http://glue.mysprykershop.com/order-payments/1ce91011-8d60-59ef-9fe0-4493ef36bbfe" - } - }, - "links": { - "self": "http://glue.mysprykershop.com/order-payments/86791011-8d60-59ef-9fe0-4493ef36bbfe" - } -} -``` - -### Possible Errors - -| Status | Reason | -| --- | --- | -| 404 | Order not found. | -| 422 | Order payment is not updated. | diff --git a/docs/scos/dev/glue-api-guides/202005.0/configuring-outdated-refresh-token-life-time.md b/docs/scos/dev/glue-api-guides/202005.0/configuring-outdated-refresh-token-life-time.md deleted file mode 100644 index a517e5d1c2b..00000000000 --- a/docs/scos/dev/glue-api-guides/202005.0/configuring-outdated-refresh-token-life-time.md +++ /dev/null @@ -1,40 +0,0 @@ ---- -title: Configuring Outdated Refresh Token Life Time -last_updated: Sep 14, 2020 -template: glue-api-storefront-guide-template -originalLink: https://documentation.spryker.com/v5/docs/configuring-outdated-refresh-token-life-time -originalArticleId: b695d109-b38a-430f-b0c4-b9fc86284bf8 -redirect_from: - - /v5/docs/configuring-outdated-refresh-token-life-time - - /v5/docs/en/configuring-outdated-refresh-token-life-time -related: - - title: Authentication and Authorization - link: docs/scos/dev/glue-api-guides/page.version/managing-customers/authenticating-as-a-customer.html - - title: Glue API - Customer Account Management feature integration - link: docs/scos/dev/feature-integration-guides/page.version/glue-api/glue-api-customer-account-management-feature-integration.html ---- - -Refresh tokens generated when accessing Glue REST API expire after a certain period of time. In addition to that, they can be [forcibly revoked](/docs/scos/dev/glue-api-guides/{{page.version}}/authentication-and-authorization.html#token-revocation) at any time. No matter how a token becomes invalidated, it is set to expire but remains in the Storage. - -For security reasons and to reduce the database storage space, it is recommended to delete outdated refresh tokens once they are expired. There are **two** ways how tokens can be removed from the Storage: - -* automatically on a schedule, -* manually. - -To configure the time during which an outdated refresh token is stored: - -1. [Extend](/docs/scos/dev/back-end-development/extend-spryker/spryker-os-module-customisation/extend-the-spryker-core-functionality.html) the `Spryker\Shared\Oauth\OauthConfig` class on your project level. -2. Configure the time interval for the job via the `Spryker\Shared\Oauth\OauthConfig::getRefreshTokenRetentionInterval()` method. - -After configuring the token lifetime, invalidated tokens will be deleted automatically by a [Cron job](/docs/scos/user/features/{{page.version}}/sdk/cronjob-scheduling.html) once their storage time expires. - -{% info_block infoBox "Note" %} - -If necessary, you can delete invalidated refresh tokens with expired storage time manually at any time. To do so, run the following console command: -```bash -vendor/bin/console oauth:refresh-token:remove-expired -``` - -{% endinfo_block %} - - diff --git a/docs/scos/dev/glue-api-guides/202005.0/glue-infrastructure.md b/docs/scos/dev/glue-api-guides/202005.0/glue-infrastructure.md deleted file mode 100644 index b439e9ee13a..00000000000 --- a/docs/scos/dev/glue-api-guides/202005.0/glue-infrastructure.md +++ /dev/null @@ -1,439 +0,0 @@ ---- -title: Glue Infrastructure -description: The guide will walk you through the process of handling API requests at the Glue layer, including GlueApplication, Resource, and Relationship Modules. -last_updated: Jun 16, 2021 -template: glue-api-storefront-guide-template -originalLink: https://documentation.spryker.com/2021080/docs/glue-infrastructure -originalArticleId: dd27e960-56f8-4be6-bc6b-b479c71c5e02 -redirect_from: - - /2021080/docs/glue-infrastructure - - /2021080/docs/en/glue-infrastructure - - /docs/glue-infrastructure - - /docs/en/glue-infrastructure - - /v6/docs/glue-infrastructure - - /v6/docs/en/glue-infrastructure - - /v5/docs/glue-infrastructure - - /v5/docs/en/glue-infrastructure ---- - -Spryker API infrastructure is implemented as a separate layer of Spryker Commerce OS, called Glue. It is responsible for providing API endpoints, processing requests, as well as for communication with other layers of the OS in order to retrieve the necessary information. The layer is implemented as a separate Spryker application, the same as Yves or Zed. It has its own bootstrapping and a separate virtual host on the Spryker web server (Nginx by default). In addition to that, Glue has a separate programming namespace within Spryker Commerce OS, also called Glue. - -{% info_block infoBox %} -**Before You Begin**
    Consider studying the following documents before you begin:
    • [JSON API Specification](https://jsonapi.org/format/ -{% endinfo_block %} implemented in Spryker
    • [Swagger Tools Reference](https://swagger.io/) to know how to document your API
    • [REST API Modelling Reference](https://www.thoughtworks.com/insights/blog/rest-api-design-resource-modeling)
    ) - -Logically, the Glue layer can be divided into 3 parts: - -* **GlueApplication Module** - The `GlueApplication` module provides a framework for constructing API resources. It intercepts all HTTP requests at resource URLs (e.g. `http://mysprykershop.com/resource/1`), handles call semantics, verifies requests, and also provides several utility interfaces that can be used to construct API responses. - -* **Resource Modules** - Each `Resource` module implements a separate resource or a set of resources. Such a module handles requests to a particular resource and provides them with responses. In the process of doing so, the module can communicate with the Storage, Search or Spryker Commerce OS (Zed). The modules do not handle request semantics or rules. Their only task is to provide the necessary data in a format that can be converted by the `GlueApplication` module into an API response. - -* **Relationship Modules** - Such modules represent relationships between two different resources. Their task is to extend the response of one of the resources with data of related resources. - -To be able to process API requests correctly, Resource Modules need to implement resource route plugins that facilitate routing of requests to the module. Such plugins need to be registered in the `GlueApplication` module. - -## Request Handling -Upon receiving an API request, the `GlueApplication` Module verifies whether the request is correct, checks whether all required parameters are present, and also identifies the HTTP verb and additional filters, if any. Then, deserializes request data and builds an **API Request Object** which is passed to the corresponding `Resource` Module. The object supports `Spryker\Glue\GlueApplication\Rest\Request\Data\RestRequestInterface`. -![Glue Application Module](https://spryker.s3.eu-central-1.amazonaws.com/docs/Glue+API/Glue+API+Developer+Guides/Glue+Infrastructure/glue-application-module.png) - -Upon receiving a request object, the `Resource` module needs to provide it with a valid response. Responses are provided as **API Response Objects**. To build them, `Resource` modules use the `RestApi\Spryker\Glue\Kernel\AbstractFactory::getResourceBuilder()` method which returns the `RestResourceBuilderInterface` objects. The `GlueApplication` Module serializes such objects into the response format and then passes them to the requestor. - -![Glue Application Module](https://spryker.s3.eu-central-1.amazonaws.com/docs/Glue+API/Glue+API+Developer+Guides/Glue+Infrastructure/communication.png) - -A `Resource` Module can communicate with the Storage, Search and Spryker Commerce OS (Zed) using a Client only. - -### Resource Routing -Every request needs to be routed to the corresponding `Resource` module responsible for handling it. For this purpose, each module implements a `Route` plugin. Such a plugin matches every supported HTTP verb to a respective action in a controller of the `Resource` module. This should be done for each endpoint. When routing a request, Glue will call the necessary action based on the endpoint and verb used. - -{% info_block infoBox %} -The plugin should not map the _OPTIONS_ verb which is mapped automatically. -{% endinfo_block %} - -The plugin must provide routing information for the following: - - -| header | header | -| --- | --- | -| Resource Type | Type of the resource implemented by the current `Resource` module. Resource types are extracted by Glue from the request URL. For example, if the URL is `/carts/1`, the resource type is `carts`. To be able to process calls to this URL, Glue will need a route plugin for the resource type _carts_. | -| Controller Name | Name of the controller that handles a specific resource type. | -| Mapping of Verbs to Actions | List of REST verbs that the resource supports and the respective controller actions used to handle them. Allowed verbs are GET, POST, PATCH, and DELETE. The OPTIONS verb is supported by all resources and should not be mapped. | -| Resource Attributes
    Transfer Class Name | FQCN of the Resource Attributes Transfer that is used to handle request attributes for the given resource type. | -| Parent Resource Type | In parent-nested resource relationships, the plugin of the child resource must specify the type of the parent resource. This information is optional and should be provided only by a resource that is nested within another resource. | - -Each route plugin implements `ResourceRoutePluginInterface`, which provides a set of utility functions that can be used to configure resource routing: - -|Function | Description| Return type| Example| -| --- | --- | --- | --- | -| `getResourceType` | Gets the resource type. | string | _carts_ | -| `configure` | Configures a mapping of the HTTP verbs supported by the resource to the corresponding controller methods responsible for handling them. Also, it defines which of the verbs require authentication to use. | `ResourceRouteCollectionInterface` | | -| `getController` | Gets the name of the resource controller responsible for handling requests to the resource. The name must be provided in _kebab-case_, hyphen-separated | string | If the controller name is _CartsResourceController.php_, this function should return _carts-resource_. | -| `getResourceAttributesClassName` | Gets the FQCN of the Resource Attributes Transfer that is used to handle request attributes for the given resource type. | string | See details in [5. Describe Fields for Post and Patch Calls](/docs/scos/dev/tutorials-and-howtos/introduction-tutorials/glue-api/implementing-a-rest-api-resource.html#describe-fields-for-post-and-patch-calls). | - -For more details on how to implement a route plugin, see [6. Route Requests to Your Controller](/docs/scos/dev/tutorials-and-howtos/introduction-tutorials/glue-api/implementing-a-rest-api-resource.html#route-requests-to-your-controller). - -All route plugins need to be added to `GlueApplicationDependencyProvider` implemented in the `GlueApplication` Module on the Project Level: - -`GlueApplicationDependencyProvider.php` -```php -class GlueApplicationDependencyProvider extends SprykerGlueApplicationDependencyProvider - { - /** - * @return \Spryker\Glue\GlueApplication\Dependency\Plugin\ResourceRoutePluginInterface[] - */ - protected function getResourceRoutePlugins(): array - { - return [ - new CartsResourceRoutePlugin(), - new CartItemsResourceRoutePlugin(), - new WishlistsResourceRoutePlugin(), - ... - ]; - } -``` - -### Resource Modules -A _Resource Module_ is a module that implements a single resource or a set of resources. It is responsible for accepting a request in the form of _Request Objects_ and providing responses in the form of _Response Objects_. For this purpose, the module can communicate with the Storage or Search, for which purpose it implements a [Client](/docs/scos/dev/back-end-development/client/client.html). It can also communicate with the Spryker Commerce OS (Zed), however, it is recommended to avoid round trips to the database as much as possible as that can reduce API performance considerably. - -Resource Modules must implement all logic related to processing a request. It is not recommended having any of the Business Logic, or a part of it, in the _GlueApplication Module_. In case you need to extend any of the built-in Glue functionality, it is always safer to extend the relevant _Resource Module_ than infrastructure. - -#### Module Structure -By default, all Resource Modules are located in `vendor/spryker/resources-rest-api` at the core level. At the project level, you can place your Resource Module implementations in `src/Pyz/Glue/ResourcesRestApi`. The naming convention for such modules is _**Resources**RestApi_, where **Resources** is a name of the feature that the module implements. - -Recommended module structure: - -| ResourcesRestApi | | -| --- | --- | -| `Glue/ResourcesRestApi/Controller` |

    Folder for resource controllers. Controllers are used to handle API requests and responses. Typically, includes the following:


    -
    • `FeatureResourcesController.php` - contains methods for handling HTTP verbs.
    | -| `Glue/ResourcesRestApi/Dependency` | Bridges to clients from other modules. | -| `Glue/ResourcesRestApi/Plugin` |

    Resource plugins. Typically, includes the following:


    • `FeatureResourceRelationshipPlugin.php` - provides relationships to other modules;
    • `FeatureResourceRouterPlugin.php` - contains resource routing configuration.
    | -| `Glue/ResourcesRestApi/Processor` |

    Folder where all resource processing logic, data mapping code and calls to other clients are located. Typically, it includes the following:


    • `FeatureReader.php` - fetches data and combines from other facades to create an API response;
    • `FeatureWriter.php` - creates, updates and deletes resource functionality;
    • FeatureMapper.php - maps internal transfer objects to API transfers.
    | -| `Glue/ResourcesRestApi/ResourcesRestApiConfig.php` | Contains resource-related configuration, such as a resource type, error code constants etc. | -| `Glue/ResourcesRestApi/ResourcesRestApiDependencyProvider.php` | Provides external dependencies. | -| `Glue/ResourcesRestApi/ResourcesRestApiFactory.php` | Factory that creates business models. | -| `Glue/ResourcesRestApi/ResourcesRestApiResource.php` | Locatable class that provides resource objects to other modules. | - -Also, a module should contain the transfer definition in `src/Pyz/Shared/ResourcesRestApi/Transfer`: - -| ResourcesRestApi | | -| --- | --- | -| `resources_rest_api.transfer.xml` | Contains API transfer definintions. | - -The resulting folder structure on the example of the WishlistsRestApi Module looks as follows: - -![Wishlists REST API](https://spryker.s3.eu-central-1.amazonaws.com/docs/Glue+API/Glue+API+Developer+Guides/Glue+Infrastructure/wishlists-rest-api.png) - -#### Resource Controller -This controller provides actions for all HTTP verbs that a resource implements. It is responsible for: - -* handling requests for a specific resource; -* validating data; -* executing business flow logic; -* returning responses or error messages. - -All operations must be delegated to the corresponding layers, the controller is responsible only for controlling the workflow. - -#### Abstract API Controller -Each resource controller must extend `\Spryker\Glue\Kernel\Controller\AbstractController`. This controller class resolves the module factory. - -#### Generic Rest Request -After deserializing a request, Glue passes it to _Resource Modules_ as an internal API request representation object. It stores all information that relates to the request. The object is passed directly to the resource controller class and supports `Spryker\Glue\GlueApplication\Rest\Request\Data\RestRequestInterface`. - -The interface provides the following helper methods: - -| Method | Signature | Description | Notes | -| --- | --- | --- | --- | -| `getResource` | `getResource(): RestResourceInterface` | Returns resource objects that represent resources for the current request. | | -| `getParentResources` | `getParentResources(): array` | Returns an array of parent resources of the current resource. Each parent resource is represented by `\Spryker\Glue\GlueApplication\Rest\JsonApi\RestResourceInterface`. | | -| `findParentResourceByType` | `findParentResourceByType(string $type): ?RestResourceInterface` | Finds a parent resource by the specified resource type. | The `$type` parameter specifies the type of the parent resource to return. If there are no parents of the given type, the method returns `null`. | -| `getFilters` | `getFilters(): array` | Returns filters for data filtering. Each filter is represented by `\Spryker\Glue\GlueApplication\Rest\Request\Data\FilterInterface`. | If a request was passed with filter parameters, they are passed as filters. Resource Modules need to handle filters correctly to return only the information that is requested. | -| `getSort` | `getSort(): array` | Returns sorting options. Each option is represented by `\Spryker\Glue\GlueApplication\Rest\Request\Data\SortInterface`. | | -| `getPage` | `getPage(): ?PageInterface` | Returns pagination options. | If there were no pagination options specified at the time of the query, the method returns `null`. | -| `getFields` | `getFields(): array` | Returns sparse fields that can be used to filter out certain parts of the relationships tree from a response. Each field is represented by `\Spryker\Glue\GlueApplication\Rest\Request\Data\SparseFieldInterface`. | | -| `getMetadata` | `getMetadata(): MetadataInterface` | Gets additional metadata about the request such as resource version, method, locale etc. | | -| `getInclude` | `getInclude(): array` | Gets an array of `include` options for the request. | | -| `getUser` | `getUser(): ?UserInterface` | Get the user associated with the request. | - -#### Generic Rest Response - -Controllers of each module must return their responses to Glue as instances of the `\Spryker\Glue\GlueApplication\Rest\JsonApi\RestResponseInterface` objects with all data set. - -The interface provides the following helper methods: - -| Method | Signature | Description | Notes | -| --- | --- | --- | --- | -| `addResource` | `addResource(RestResourceInterface $restResource): self` | Adds a resource to the response object. | The `$restResource` parameter specifies an instance of the `RestResourceInterface` interface that represents the resource to add. | -| `addError` | `addError(RestErrorMessageTransfer $error): self` | Adds a business logic error to the response. | A business logic error is any error that occurred during request procession but does not relate to the REST request format. For example, such an error can occur when a resource with the specified ID is not found or when an attempt is made to assign a value that is not allowed by database or other restrictions. The `$error` parameter specifies an instance of the `RestErrorMessageTransfer` interface that contains information about the error (HTTP status, error code and error message). | -| `addLink` | `addLink(string $name, string $uri): self` | Adds a link to the response. | The parameters are as follows:
    • `$name` - specifies a link name. Possible values: _first, last, next, prev, related, self, href, meta_.
    • `$uri` - specifies a link URL without the domain part.
    For example, if you specify first for `$name` and `/catalog-search?q=canon&include=&page[offset]=0&page[limit]=12` for URL, the link will look as follows in the response:
    {
    "data": {...},
    "links": {
    ...
    "first": "http://mysprykershop.com/catalog-search?q=canon&include=&page[offset]=0&page[limit]=12",
    ...
    }
    }
    | -| `setStatus` | `setStatus(int $status): self` | Sets the HTTP status of the response (for example, **200 OK**).| The `status`parameter specifies the HTTP status code. | -| `addHeader` | `addHeader(string $key, string $value): self` | Adds an HTTP header to the response. | The `$key` parameter specifies the header type, and the $value parameter specifies the header value. | - -#### RestResourceInterface -`Spryker\Glue\GlueApplication\Rest\JsonApi\RestResource` is a class that represents REST resources. It implements `Spryker\Glue\GlueApplication\Rest\JsonApi\RestResourceInterface` that provides the following methods: - -| Method | Signature | Description | Notes | -| --- | --- | --- | --- | -| `addRelationship` | `addRelationship(RestResourceInterface $restResource): self` | Adds another resource related to the given resource. | The `$restResource` parameter specifies an instance of the `RestResourceInterface interface that represents the related resource to add. | -| `addLink` | `addLink(string $name, string $resourceUri, array $meta = []): self` | Adds a link to the resource. | The parameters are as follows:
    • `$name` - specifies a link name. Possible values: first, last, next, prev, related, self, href, meta.
    • `$uri` - specifies a link URL without the domain part.
    • `$meta` - an array of meta information to add to the resource. Each object in the array must be represented by MetadataInterface.
    | - -#### RestErrorMessageTransfer - -Business errors are returned as the `RestErrorMessageTransfer` objects with the following structure: - -| Field |Used for | -| --- | --- | -| code |High-level business error code, for example, business rule validation error. | -|detail | Human-readable error message. | -| status| HTTP response status code. | - -### Nested Resources - -Glue API allows creating resources with parent-child relationships or, in other words, nested resources. For example, a request to `/customers/1/addresses` returns addresses for a customer with ID 1. To enable such behavior, it is necessary to define how resources depend on each other. This is done by configuring resource route plugins. When processing an URL, the _GlueApplication Module_ tries to find a correct route to a child resource. For this reason, all modules in the nesting chain should be arranged in a sequence using **ResourceWithParentPluginInterface**. Then, while handling a request to a child resource, business logic can access the parent resource identifier and process the request in the correct context. - -#### ResourceWithParentPluginInterface -If you are implementing a resource that has a parent, you need to create a plugin that implements `Spryker\Glue\GlueApplicationExtension\Dependency\Plugin\ResourceWithParentPluginInterface`. Such a plugin will route requests from the parent resources to the correct child resource. This interface must be implemented together with **ResourceRoutePluginInterface**. - -The interface provides only 1 method: `getParentResourceType`. The method must return the type of the immediate parent resource within the context of which the child resource is implemented. - -### Resource Relationships -Often, to query certain data, one needs to use endpoints from different APIs to get the necessary information. For example, to present products in a customer's wishlist, one would need to use endpoints of the [Wishlists API](/docs/scos/dev/glue-api-guides/{{page.version}}/managing-wishlists/managing-wishlists.html) to get a list of items in the wishlist, and then query endpoints of the [Products API](/docs/scos/dev/glue-api-guides/{{page.version}}/managing-products/retrieving-product-information.html) in order to get descriptions, images and other information on each product. This can result in a big number of requests until the necessary data is fetched. To reduce the number of calls and provide all the necessary information in one pass, you can use resource relationships. - -Let us consider the following REST Response example. It contains information on a wishlist item without any resource relationships. - -**Request:** - -*GET https://glue.mysprykershop.comm/wishlists/cbf84323-e54d-5774-8c02-4c90e107afe6* - -```js - { - "data": { - "type": "wishlists", - "id": "cbf84323-e54d-5774-8c02-4c90e107afe6", - "attributes": { - "name": "My wishlist", - "numberOfItems": 1, - "createdAt": "2019-06-25 11:42:51.813126", - "updatedAt": "2019-07-05 13:13:52.811524" - }, - "links": { - "self": "https://glue.mysprykershop.comm/wishlists/cbf84323-e54d-5774-8c02-4c90e107afe6" - } - } -} -``` - -As you can see, it contains only the ID of the wishlist item resource which represents the SKU of the product added. It is impossible to indicate the product name, description etc. -If we add relationships to the `wishlist-items` and `concrete-products` resources, the same request will return more information. In fact, now, a single request is sufficient to get information on products in a wishlist: - -**Request:** - -*GET https://glue.mysprykershop.comm/wishlists/cbf84323-e54d-5774-8c02-4c90e107afe6?include=wishlist-items,concrete-products* - -
    -Code sample: - -```js -{ - "data": { - "type": "wishlists", - "id": "cbf84323-e54d-5774-8c02-4c90e107afe6", - "attributes": {...}, - "links": {...}, - "relationships": { - "wishlist-items": { - "data": [ - { - "type": "wishlist-items", - "id": "021_21081475" - } - ] - } - } - }, - "included": [ - { - "type": "concrete-products", - "id": "021_21081475", - "attributes": { - "sku": "021_21081475", - "isDiscontinued": false, - "discontinuedNote": null, - "name": "Sony Cyber-shot DSC-W830", - "description": "Styled for your pocket Precision photography meets the portability of a smartphone. The W800 is small enough to take great photos, look good while doing it, and slip in your pocket. Shooting great photos and videos is easy with the W800. Buttons are positioned for ease of use, while a dedicated movie button makes shooting movies simple. The vivid 2.7-type Clear Photo LCD display screen lets you view your stills and play back movies with minimal effort. Whip out the W800 to capture crisp, smooth footage in an instant. At the press of a button, you can record blur-free 720 HD images with digital sound. Breathe new life into a picture by using built-in Picture Effect technology. There’s a range of modes to choose from – you don’t even have to download image-editing software.", - "attributes": { - "hdmi": "no", - "sensor_type": "CCD", - "display": "TFT", - "usb_version": "2", - "brand": "Sony", - "color": "Purple" - }, - "superAttributesDefinition": [ - "color" - ], - "metaTitle": "Sony Cyber-shot DSC-W830", - "metaKeywords": "Sony,Entertainment Electronics", - "metaDescription": "Styled for your pocket Precision photography meets the portability of a smartphone. The W800 is small enough to take great photos, look good while doing i", - "attributeNames": { - "hdmi": "HDMI", - "sensor_type": "Sensor type", - "display": "Display", - "usb_version": "USB version", - "brand": "Brand", - "color": "Color" - } - }, - "links": { - "self": "https://glue.mysprykershop.comm/concrete-products/021_21081475" - } - }, - { - "type": "wishlist-items", - "id": "021_21081475", - "attributes": { - "sku": "021_21081475" - }, - "links": { - "self": "https://glue.mysprykershop.comm/concrete-products/wishlist-items/021_21081475" - }, - "relationships": { - "concrete-products": { - "data": [ - { - "type": "concrete-products", - "id": "021_21081475" - } - ] - } - } - } - ] -} -``` - -
    -
    - -#### Possible Implementations -To add relationships between two resources, you can either implement the Resource Relationship Module that implements a resource relationship plugin, or just the plugin within the related resource. The plugin will add the related resource as a relationship to the resource being queried. - -*Option 1: With a separate module* - -![implementation-wiht-separate-module.png](https://spryker.s3.eu-central-1.amazonaws.com/docs/Glue+API/Glue+API+Developer+Guides/Glue+Infrastructure/implementation-wiht-separate-module.png) - -_Option 2: Without module_ - -![implementation-without-module.png](https://spryker.s3.eu-central-1.amazonaws.com/docs/Glue+API/Glue+API+Developer+Guides/Glue+Infrastructure/implementation-without-module.png) - -Implementation without a separate module can be used when the resource being queried contains a unique identifier to directly map the related resource. In the example of wishlist items and products, each item contains the SKU of the product it relates to. Thus, relationships between these resources can be implemented without a relationship module, using product SKU as a unique identifier. - -In cases when certain business logic is required to determine relationships between two resources, implementation of a relationship module is recommended. For example, if you need to apply some business logic to select products related to a wishlist item, such logic should be implemented within a separate relationship module. - -#### Relationship Plugin -The plugin must implement the following interface: `\Spryker\Glue\GlueApplication\Dependency\Plugin\ResourceRelationshipPluginInterface`. The interface exposes the `addResourceRelationships` method that allows you to implement relationships between modules. The first parameter passed to the method contains an array of resources to which resources must be added, and the second parameter contains the current REST request as **RestRequestInterface**. The interface also provides the `getRelationshipResourceType` method that allows you to set a relationship name. This name will be used when including related resource data in responses. - -### Resource Versioning -As your product grows, you may feel the necessity to change your API. Sometimes, BC breaking changes might be needed to incorporate the required modifications. However, older API clients may rely on old data contracts. If you want to provide backward compatibility, you may want to introduce a versioning system in your API. When versioning is implemented, clients can request the exact resource version they were designed for. Thus, every resource version represents a data contract for a resource at a given point of time. - -As REST does not implement a strict versioning concept, by default, all Spryker resources are unversioned. Also, all resources and endpoints shipped with Spryker by default will remain unversioned in the future regardless of the version of the module that provides them. This is done so that Resource modules can be merged with any existing projects without breaking the functionality of resources built on top of default Spryker resources. - -If you want to introduce versioning in your project, in the route plugin of your module, you need to implement `\Spryker\Glue\GlueApplicationExtension\Dependency\Plugin\ResourceVersionableInterface`. This interface exposes the `getVersion()` method, using which you can specify which version of the resource is supported by the current route plugin. In other words, you need to implement a plugin for each resource version. - -When versioning is in place, clients can pass the version they require in the request header: `application/vnd.api+json; version=2.1`. The Glue will respond to clients as follows: - -* If no version is specified in the header, the newest version is returned. -* If a version is specified and it exists on the server, that specific version is returned. -* If a version is specified, but it does not exist, the **404 Not Found** error is returned. - -### Response Codes -#### HTTP Status Codes -Below is a list of common HTTP statuses returned by Glue endpoints. - -#### GET - -| Code | Condition | -| --- | --- | -| 200 | An entity or entities corresponding to the requested resource is/are sent in the response | -| 400| Bad request | -| 401| Unauthenticated | -| 403 | Unauthorized| -|404 | Resource not found | - -#### POST -| Code | Condition | -| --- | --- | -| 201 | Resource created successfully | -| 400| Bad request | -| 401| Unauthenticated | -| 403 | Unauthorized| -|404 | Resource not found | - -#### PATCH -| Code | Condition | -| --- | --- | -| 200 | Resource updated successfully | -| 400| Bad request | -| 401| Unauthenticated | -| 403 | Unauthorized| -|404 | Resource not found | - -#### DELETE -| Code | Condition | -| --- | --- | -| 204 | No content (deleted successfully) | -| 400| Bad request | -| 401| Unauthenticated | -| 403 | Unauthorized| -|404 | Resource not found | - -#### Error Codes -In addition to HTTP Status codes, Glue can return additional error codes to distinguish business constraint violations. Each API is assigned a specific error code range. Listed below are code ranges for APIs shipped by Spryker. For specific error codes, see API user documentation for the specific APIs. - - -| Range | API | -| --- | --- | -| 001-099 | General error codes | -| 101-199 |Carts API | -| 201-299 | Wishlists API | -| 301-399 | Products API | -| 401-499 | Customers API | -| 501-599 | Catalog Search API | -| 601-699 | Stores API | -| 701-799 |Categories API | -| 1001-1099 | Guest Cart API | -| 1101-1199 | Checkout API| -| 1201-1299| Product Labels API | - -### Data Formatting -The current version uses JSON for responses. The request header from the client indicates the desired response format. - -#### Dates -For date formatting, [ISO-8601](https://www.iso.org/iso-8601-date-and-time-format.html) date/time format is used. For requests, any time zone is accepted, however, dates are stored and returned in UTC. - -Example: - -* request: 1985-07-01T01:22:11+02:00 -* in storage and responses: 1985-06-31T11:22:11+00:00 - -#### Prices -Prices are always returned both in cents and as an integer. - -### Request Header - -| Header | Sample value | Used for | When not present| -| --- | --- | --- | --- | -| Accept | application/vnd.api+json |Indicates the data format of the expected API response. | 406 Not acceptable | -| Content-Type | application/vnd.api+json; version=1.1 | Indicates the request content-type and resource version. | 415 Unsupported | -| Accept-Language | de;, en;q=0.5 | Indicates the desired language in which the content should be returned. | | - -### Response Header - | Header | Sample value | Used for | -| --- | --- | --- | -| Content-Type |application/vnd.api+json; version=1.1 |Response format and resource version. | -|Content-Language|de_DE|Indicates the language in which the content is returned.| - -### Response Structure -The response structure follows the [JSON API](https://jsonapi.org/format/#document-structure) specification. For examples of responses of each endpoint provided by Spryker, see the API user guides for the respective APIs. diff --git a/docs/scos/dev/glue-api-guides/202005.0/glue-rest-api.md b/docs/scos/dev/glue-api-guides/202005.0/glue-rest-api.md deleted file mode 100644 index 3b184078c6c..00000000000 --- a/docs/scos/dev/glue-api-guides/202005.0/glue-rest-api.md +++ /dev/null @@ -1,61 +0,0 @@ ---- -title: Glue REST API -last_updated: Sep 14, 2020 -template: glue-api-storefront-guide-template -originalLink: https://documentation.spryker.com/v5/docs/glue-rest-api -originalArticleId: 99a9f086-004b-4881-af70-e00f008363df -redirect_from: - - /v5/docs/glue-rest-api - - /v5/docs/en/glue-rest-api ---- - -## Overview -The Spryker Glue REST API is a fully functional JSON REST API that comes in the form of a new application available in the Spryker Commerce OS. It is build to be used as a contract between the Commerce OS Backend and any possible touchpoint or integration with a third party system. As an application, Glue knows how to read and interpret API resources as well as leverage feature modules that expose existing Spryker functionality. -![Glue REST API](https://spryker.s3.eu-central-1.amazonaws.com/docs/Glue+API/Glue+REST+API/glue-rest-api.jpg) - -## Glue -The Spryker API infrastructure, which is implemented as a separate layer of the Spryker Commerce OS, is called Glue. Glue is responsible for providing API endpoints, processing requests, as well as for communication with other layers of the OS in order to retrieve the necessary information. As a result, the Glue is responsible for communicating with any clients on the touchpoint side. - -{% info_block infoBox %} -For more details, see [Glue Infrastructure](/docs/scos/dev/glue-api-guides/{{page.version}}/glue-infrastructure.html). -{% endinfo_block %} - -## REST API -The Glue REST API comes with a set of predefined APIs, and the possibility for you to extend and add APIs in your project. There is no restriction when it comes to customization. The predefined APIs support Storefront functionality and may as well be used for integrations with 3rd party systems. Storefront functionality specifically enables you to build a custom experience for your customers in any touchpoint you want and thereby leveraging data and functionality at the core of your Commerce OS. For instance, it allows you to fetch product data to be displayed on a custom product detail page in your mobile app. - -{% info_block infoBox %} -For more details, see [REST API Reference](/docs/scos/dev/glue-api-guides/{{page.version}}/rest-api-reference.html). -{% endinfo_block %} - -## B2C API React Example -In order to help you understand possible use cases, we offer you a sample app available as an example implementation (which is not a starting point for customer projects, though). It can coexist with an existing demo shop as a second touchpoint in the project. From a technology perspective, it is based on our customers' interests. The example app is implemented in the form of a single-page application based on a React JS library. - -What is more, it delivers a full customer experience from browsing the catalog to placing an order. The application allows you to understand, how the existing APIs can be leveraged to create a B2C user experience. As an example, the full power of Elasticsearch, which is already present in our other demo shops (B2C and B2B), is leveraged via dedicated endpoints to deliver catalog search functionality with auto-completion, auto-suggestion, facets, sorting, and pagination. - -{% info_block infoBox %} -[Install and run!](/docs/scos/dev/tutorials/{{page.version}}/advanced/glue-api/b2c-api-react-example/b2c-api-react-example.html -{% endinfo_block %}) - -### What can I use the REST API for? -The Glue functionality serves as a starting point to connect your Commerce OS with new or existing touch points. These touchpoints can be headless like voice commerce devices and chat bots, or they may come with a user interface like a mobile app. Alternative front-ends also benefit from the APIs. Here are some examples: - -* **New front-end**: Build a new front-end or use front-end frameworks such as Progressive Web Apps and power them by the REST APIs. -* **Mobile App**: Your new mobile app, no matter if it is native, hybrid or just a web-view, can support the same functionality as the existing demo shops do. -* **Voice Commerce**: Leverage the APIs for order history to inform your customers about the status of their delivery. -* **Chatbot**: Use chatbots to identify the customer that is trying to reach out to you and help him answer basic questions about your products. - -## What are the business advantages of using the API? -You can benefit from the APIs in these aspects: - -* **Reach more customers**: APIs empower you to create any number of touchpoints to get in contact with your customers, whichever the device. -* **Customization**: You may reach out to different customer segments on different touchpoints. APIs enable you to offer a tailored customer experience for your audience, wherever it may be. -* **Integrations**: APIs are not only used to deliver custom experiences, but you can also leverage APIs to integrate to different platforms; from offering your products on Amazon to leveraging mapping services for customers to find your offline store. -* **Testing ideas**: APIs are the quickest way to test your ideas and get a head start before the competition does. Consider them as building blocks for your developers to assemble your new ideas. New applications only need to follow the API contracts set, but even those can be extended for your purposes. - -### Why did we introduce it? -The REST API represents a contract that developers can stick to when they are extending the Commerce OS with new touchpoints or build integrations. The already existing APIs inside the Commerce OS are not meant to be used in the same way. Furthermore, all REST API requests are handled according to the [JSON REST API specification](https://jsonapi.org/). These specifications define how clients should request data, fetch it, modify it, and how the server should respond to it. Hence, the expected behavior stays the same across all endpoints. - -Check our introductory video on Glue API: - -{% wistia adls2vfqjm 960 720 %} - diff --git a/docs/scos/dev/glue-api-guides/202005.0/glue-spryks.md b/docs/scos/dev/glue-api-guides/202005.0/glue-spryks.md deleted file mode 100644 index 8ef96ca1bfb..00000000000 --- a/docs/scos/dev/glue-api-guides/202005.0/glue-spryks.md +++ /dev/null @@ -1,182 +0,0 @@ ---- -title: Glue Spryks -description: This article demonstrates how to manage the Glue REST API layer of Spryker with the help of code automation tools (Spryks). -last_updated: Jun 16, 2021 -template: glue-api-storefront-guide-template -originalLink: https://documentation.spryker.com/2021080/docs/glue-spryks -originalArticleId: 7cc8495c-c842-412c-8878-7448157ddac4 -redirect_from: - - /2021080/docs/glue-spryks - - /2021080/docs/en/glue-spryks - - /docs/glue-spryks - - /docs/en/glue-spryks - - /v6/docs/glue-spryks - - /v6/docs/en/glue-spryks - - /v5/docs/glue-spryks - - /v5/docs/en/glue-spryks - - /v4/docs/glue-spryks - - /v4/docs/en/glue-spryks ---- - -Spryker SDK facilitates Glue API Resource development by providing a set of code generation tools, called **Spryks**. Usage of _Spryks_ not only provides an easy and fast way of performing various tasks, but also ensures that the generated code is fully compatible with Spryker and that all coding, naming and other conventions are observed. - -{% info_block infoBox %} - -For more information on _Spryks_, see [Spryk](/docs/sdk/dev/spryks/spryks.html). - -{% endinfo_block %} - -The following article describes the Spryks available for Glue API development and their arguments. - -{% info_block warningBox %} - -To perform the requested operations, besides the _Spryks_ called by the user, other _Spryks_ can be called automatically. The reference includes, for each _Spryk_, only its own arguments. - -{% endinfo_block %} - -To call a Spryk, you can use the following console commands: - -* `vendor/bin/console spryk:run {SPRYK NAME}` - to call a _Spryk_ and input the arguments interactively, one-by-one; - -* `vendor/bin/console spryk:run {SPRYK NAME} --{argument name}={argument value}` - to call a _Spryk_ and pass the named arguments in one pass. - -## Glue Module Management - -| Spryk | Description | -| --- | --- | -| `AddGlueBasicStructure` | Adds a new Glue layer with basic structure to the given module with the minimum required folders and files.
    **Arguments**

    **General Arguments:**

    • **mode** - *project* or *core*.
      The default is **project**. For details, see [Difference between Core and Project modes](/docs/sdk/dev/spryks/spryks.html#core-and-project-modes).
    • **organization** - specifies the name of the organization for which to perform the operation.
      The default is **Pyz**.
    • **module** - specifies the module name.

    **Spryk-Specific Arguments:**

    • **resourceType** - specifies the resource type.
      By default, the resource type is the same as the module name without the `RestApi` suffix (if present), lower case. For example, if the module name is *MyResource**RestApi***, the default resource type is *myresource*.
      For more details, see section **Resource Routing** in [Glue Infrastructure](#routing-management).
    | -| `AddGlueConfig` | Adds a Glue configuration file for the given module.
    The file will be created as `src/Pyz/Glue/[ModuleName]/[ModuleName]Config.php`.
    **Arguments**

    **General Arguments:**

    • **mode** - *project* or *core*.
      The default is **project**. For details, see [Difference between Core and Project modes](/docs/sdk/dev/spryks/spryks.html#core-and-project-modes).
    • **organization** - specifies the name of the organization for which to perform the operation.
      The default is **Pyz**.
    • **module** - specifies the module name.
    | -| `AddGlueConfigConstant` | Adds a new constant to the Glue configuration file of the given module.
    **Arguments**

    **General Arguments:**

    • **mode** - *project* or *core*.
      The default is **project**. For details, see [Difference between Core and Project modes](/docs/sdk/dev/spryks/spryks.html#core-and-project-modes).
    • **organization** - specifies the name of the organization for which to perform the operation.
      The default is **Pyz**.
    • **module** - specifies the module name.

    **Spryk-Specific Arguments:**

    • **name** - name of the constant;
    • **value** - value of the constant.
    | - -## Adding Resources - -| Spryk | Description | -| --- | --- | -| `AddGlueGetResource` | Adds a new `GET` Resource to the given resources of the given module.
    **Arguments**

    **General Arguments:**

    • **mode** - *project* or *core*.
      The default is **project**. For details, see [Difference between Core and Project modes](/docs/sdk/dev/spryks/spryks.html#core-and-project-modes).
    • **organization** - specifies the name of the organization for which to perform the operation.
      The default is **Pyz**.
    • **module** - specifies the module name.

    **Spryk-Specific Arguments:**

    • **resourceType** - specifies the type of API resources that will be retrieved.
    • **clientModule** - specifies the module that provides the functionality to retrieve the items represented by the given API resources. The module must have the *Client* layer.
    • **clientMethod** - specifies the method in the *clientModule* that will be used to retrieve the items represented by the given API resources.
    | -| `AddGlueDeleteResource` | Adds a new `DELETE` Resource to the given resource of the given module.
    **Arguments**

    **General Arguments:**

    • **mode** - *project* or *core*.
      The default is **project**. For details, see [Difference between Core and Project modes](/docs/sdk/dev/spryks/spryks.html#core-and-project-modes).
    • **organization** - specifies the name of the organization for which to perform the operation.
      The default is **Pyz**.
    • **module** - specifies the module name.

    **Spryk-Specific Arguments:**

    • **resourceType** - specifies the type of API resources that will be deleted.
    • **clientModule** - specifies the module that provides the functionality to delete the items represented by the given API resources. The module must have the *Client* layer.
    • **clientMethod** - specifies the method in the *clientModule* that will be used to delete the items represented by the given API resources.
    | -| `AddGluePatchResource` | Adds a new `PATCH` Resource to the given resource of the given module.
    **Arguments**

    **General Arguments:**

    • **mode** - *project* or *core*.
      The default is **project**. For details, see [Difference between Core and Project modes](/docs/sdk/dev/spryks/spryks.html#core-and-project-modes).
    • **organization** - specifies the name of the organization for which to perform the operation.
      The default is **Pyz**.
    • **module** - specifies the module name.

    **Spryk-Specific Arguments:**

    • **resourceType** - specifies the type of API resources that will be modified.
    • **clientModule** - specifies the module that provides the functionality to modify the items represented by the given API resources. The module must have the *Client* layer.
    • **clientMethod** - specifies the method in the *clientModule* that will be used to modify the items represented by the given API resources.
    | -| `AddGluePostResource` | Adds a new `POST` Resource to the given resource of the given module.
    **Arguments**

    **General Arguments:**

    • **mode** - *project* or *core*.
      The default is **project**. For details, see [Difference between Core and Project modes](/docs/sdk/dev/spryks/spryks.html#core-and-project-modes).
    • **organization** - specifies the name of the organization for which to perform the operation.
      The default is **Pyz**.
    • **module** - specifies the module name.

    **Spryk-Specific Arguments:**

    • **resourceType** - specifies the type of API resources that will be created.
    • **clientModule** - specifies the module that provides the functionality to create the items represented by the given API resources. The module must have the *Client* layer.
    • **clientMethod** - specifies the method in the *clientModule* that will be used to create the items represented by the given API resources.
    | -| `AddGlueResource` | Adds a new resource to the given module.
    **Arguments**

    **General Arguments:**

    • **mode** - *project* or *core*.
      The default is **project**. For details, see [Difference between Core and Project modes](/docs/sdk/dev/spryks/spryks.html#core-and-project-modes).
    • **organization** - specifies the name of the organization for which to perform the operation.
      The default is **Pyz**.
    • **module** - specifies the module name.

    **Spryk-Specific Arguments:**

    • **className** - specifies the PHP class name for the resource.
    • **interfaceName** - specifies the PHP interface name for the resource. By default, it is the same as the class name plus the Interface suffix.
    | -| `AddGlueResourceInterface` | Adds a new resource interface to the given module. The resource must have a resource class associated with it.
    **Arguments**

    **General Arguments:**

    • **mode** - *project* or *core*.
      The default is **project**. For details, see [Difference between Core and Project modes](/docs/sdk/dev/spryks/spryks.html#core-and-project-modes).
    • **organization** - specifies the name of the organization for which to perform the operation.
      The default is **Pyz**.
    • **module** - specifies the module name.

    **Spryk-Specific Arguments:**

    • **className** - specifies the PHP class name for the resource.
    • **interfaceName** - specifies the PHP interface name for the resource. By default, it is the same as the class name plus the `Interface` suffix.
    | - -## Routing Management - -| Spryk | Description | -| --- | --- | -| `AddGlueResourceRoute` | Adds a routing for the given resource type of the given module.
    **Arguments**

    **General Arguments:**

    • **mode** - *project* or *core*.
      The default is **project**. For details, see [Difference between Core and Project modes](/docs/sdk/dev/spryks/spryks.html#core-and-project-modes).
    • **organization** - specifies the name of the organization for which to perform the operation.
      The default is **Pyz**.
    • **module** - specifies the module name.

    **Spryk-Specific Arguments:**

    • **resourceType** - specifies the resource type.
    • **resourceRouteMethod** - specifies the resource method that needs to be routed.
    | -| `AddGlueResourceRoutePlugin` | Adds a new resource route plugin for the given resource type of the given module.
    **Arguments**

    **General Arguments:**

    • **mode** - *project* or *core*.
      The default is **project**. For details, see [Difference between Core and Project modes](/docs/sdk/dev/spryks/spryks.html#core-and-project-modes).
    • **organization** - specifies the name of the organization for which to perform the operation.
      The default is **Pyz**.
    • **module** - specifies the module name.

    **Spryk-Specific Arguments:**

    • **resourceType** - specifies the resource type.
    | -{% info_block infoBox %} - -For more details, see section **Resource Routing** in [Glue Infrastructure](#routing-management). - -{% endinfo_block %} - -## Managing Resource Relationships - -| Spryk | Description | -| --- | --- | -| `AddGlueResourceRelationshipPlugin` | Adds a **resource-type-by-relationship-parameter** relationship between 2 resources. Adds the corresponding relationship plugin to the given module.
    **Arguments**

    **General Arguments:**

    • **mode** - *project* or *core*.
      The default is **project**. For details, see [Difference between Core and Project modes](/docs/sdk/dev/spryks/spryks.html#core-and-project-modes).
    • **organization** - specifies the name of the organization for which to perform the operation.
      The default is **Pyz**.
    • **module** - specifies the module name.

    **Spryk-Specific Arguments:**

    • **resourceType** - specifies the resource type to add the relationship for.
    • **relationshipParameter** - specifies the parameter through which the two resources are related to each other
    | -{% info_block infoBox %} - -For more details, see section **Resource Relationships** in [Glue Infrastructure](#managing-resource-relationships). - -{% endinfo_block %} - -## Controller Management - -| Spryk | Description | -| --- | --- | -| `AddGlueController` | Adds a new Glue controller to the given module.
    **Arguments**

    **General Arguments:**

    • **mode** - *project* or *core*.
      The default is **project**. For details, see [Difference between Core and Project modes](/docs/sdk/dev/spryks/spryks.html#core-and-project-modes).
    • **organization** - specifies the name of the organization for which to perform the operation.
      The default is **Pyz**.
    • **module** - specifies the module name.

    **Spryk-Specific Arguments:**

    • **controller** - specifies the controller name.
    | -| `AddGlueControllerDeleteAction` | Adds a new `delete` action to the controller of the given module.
    **Arguments**

    **General Arguments:**

    • **mode** - *project* or *core*.
      The default is **project**. For details, see [Difference between Core and Project modes](/docs/sdk/dev/spryks/spryks.html#core-and-project-modes).
    • **organization** - specifies the name of the organization for which to perform the operation.
      The default is **Pyz**.
    • **module** - specifies the module name.

    **Spryk-Specific Arguments:**

    • **controller** - specifies the name of the controller class to which the action will be added.
    • **controllerMethod** - specifies the name of the controller method to add. By default, **deleteAction**.
    • **resourceType** - specifies the type of API resources that will be deleted.
    • **modelSuffix** - specifies the suffix to be used in the name of the model that will be invoked by the method. The default suffix is `Deleter`.
    | -| `AddGlueControllerGetAction` | Adds a new `get` action to the controller of the given module.
    **Arguments**

    **General Arguments:**

    • **mode** - *project* or *core*.
      The default is **project**. For details, see [Difference between Core and Project modes](/docs/sdk/dev/spryks/spryks.html#core-and-project-modes).
    • **organization** - specifies the name of the organization for which to perform the operation.
      The default is **Pyz**.
    • **module** - specifies the module name.

    **Spryk-Specific Arguments:**

    • **controller** - specifies the name of the controller class to which the action will be added.
    • **controllerMethod** - specifies the name of the controller method to add. By default, **getAction**.
    • **resourceType** - specifies the type of API resources that will be retrieved.
    • **modelSuffix** - specifies the suffix to be used in the name of the model that will be invoked by the method. The default suffix is `Getter`.
    | -| `AddGlueControllerPatchAction` | Adds a new `patch` action to the controller of the given module.
    **Arguments**

    **General Arguments:**

    • **mode** - *project* or *core*.
      The default is **project**. For details, see [Difference between Core and Project modes](/docs/sdk/dev/spryks/spryks.html#core-and-project-modes).
    • **organization** - specifies the name of the organization for which to perform the operation.
      The default is **Pyz**.
    • **module** - specifies the module name.

    **Spryk-Specific Arguments:**

    • **controller** - specifies the name of the controller class to which the action will be added.
    • **controllerMethod** - specifies the name of the controller method to add. By default, **patchAction**.
    • **resourceType** - specifies the type of API resources that will be modified.
    • **modelSuffix** - specifies the suffix to be used in the name of the model that will be invoked by the method. The default suffix is `Updater`.
    | -| `AddGlueControllerPostAction` | Adds a new `post` action to the controller of the given module.
    **Arguments**

    **General Arguments:**

    • **mode** - *project* or *core*.
      The default is **project**. For details, see [Difference between Core and Project modes](/docs/sdk/dev/spryks/spryks.html#core-and-project-modes).
    • **organization** - specifies the name of the organization for which to perform the operation.
      The default is **Pyz**.
    • **module** - specifies the module name.

    **Spryk-Specific Arguments:**

    • **controller** - specifies the name of the controller class to which the action will be added.
    • **controllerMethod** - specifies the name of the controller method to add. By default, **postAction**.
    • **resourceType** - specifies the type of API resources that will be created.
    • **modelSuffix** - specifies the suffix to be used in the name of the model that will be invoked by the method. The default suffix is `Creator`.
    | - -{% info_block infoBox %} - -For more details, see section **Controller management** in [Glue Infrastructure](#controller-management). - -{% endinfo_block %} - -## Action Plugin Management - -| Spryk | Description | -| --- | --- | -| `AddGlueControllerBeforeActionPlugin` | Adds a new **before action** plugin to the given business model of the given module.
    **Arguments**

    **General Arguments:**

    • **mode** - *project* or *core*.
      The default is **project**. For details, see [Difference between Core and Project modes](/docs/sdk/dev/spryks/spryks.html#core-and-project-modes).
    • **organization** - specifies the name of the organization for which to perform the operation.
      The default is **Pyz**.
    • **module** - specifies the module name.

    **Spryk-Specific Arguments:**

    • **modelName** - specifies the model name.
      It will be used as a prefix for the plugin name. For example, if you specify `My` for *modelName*, the resulting plugin name will be `SetMyControllerBeforeActionPlugin`.
    | -| `AddGlueControllerAfterActionPlugin` | Adds a new **after action** plugin to the given business model of the given module.
    **Arguments**

    **General Arguments:**

    • **mode** - *project* or *core*.
      The default is **project**. For details, see [Difference between Core and Project modes](/docs/sdk/dev/spryks/spryks.html#core-and-project-modes).
    • **organization** - specifies the name of the organization for which to perform the operation.
      The default is **Pyz**.
    • **module** - specifies the module name.

    **Spryk-Specific Arguments:**

    • **modelName** - specifies the model name.
      It will be used as a prefix for the plugin name. For example, if you specify `My` for *modelName*, the resulting plugin name will be `SetMyControllerAfterActionPlugin`.
    | - -## Dependency Management - -| Spryk | Description | -| --- | --- | -| `AddGlueDependencyProvider` | Adds a new dependency provider class to the given module.
    **Arguments**
    • **mode** - *project* or *core*.
      The default is **project**. For details, see [Difference between Core and Project modes](/docs/sdk/dev/spryks/spryks.html#core-and-project-modes).
    • **organization** - specifies the name of the organization for which to perform the operation.
      The default is **Pyz**.
    • **module** - specifies the module name.
    | -| `AddGlueDependencyClientBridge` | Adds a new **module-to-dependent-module** _Client_ bridge.
    **Arguments**
    • **organization** - specifies the name of the organization in which to create the bridge.
      The default is **Spryker**.
    • **module** - specifies the name of the module, where to create the bridge.
    • **dependentModuleOrganization** - specifies the name of the organization where the dependent module is located.
      The default is **Spryker**.
    • **dependentModule** - specifies the name of the dependent module.
    | -| `AddGlueDependencyClientInterface` | Adds a new **module-to-dependent-module** _Client_ bridge interface.
    **Arguments**
    • **mode** - *project* or *core*.
      The default is **project**. For details, see [Difference between Core and Project modes](/docs/sdk/dev/spryks/spryks.html#core-and-project-modes).
    • **organization** - specifies the name of the organization in which to create the bridge interface.
      The default is **Pyz**.
    • **module** - specifies the name of the module, where to create the bridge interface.
    • **dependentModuleOrganization** - specifies the name of the organization where the dependent module is located.
      The default is **Spryker**.
    • **dependentModule** - specifies the name of the dependent module.
    | -| `AddGlueDependencyClientBridgeInterfaceMethod` | Adds a new method to the interface of a **module-to-dependent-module** Client bridge.
    **Arguments**
    • **organization** - specifies the name of the organization in which to create the interface.
      The default is **Spryker**.
    • **module** - specifies the name of the module, where to create the bridge.
    • **dependentModuleOrganization** - specifies the name of the organization where the dependent module is located.
      The default is **Spryker**.
    • **dependentModule** - specifies the name of the dependent module.
    • **methods** - specifies the method of the source module to create an interface for.
    | -| `AddGlueDependencyClientBridgeMethod` | Adds a new method to a **module-to-dependent-module** Client bridge.
    **Arguments**
    • **organization** - specifies the name of the organization in which to create the method.
      The default is **Spryker**.
    • **module** - specifies the name of the module, where to create the method.
    • **dependentModuleOrganization** - specifies the name of the organization where the dependent module is located.
      The default is **Spryker**.
    • **dependentModule** - specifies the name of the dependent module.
    • **methods** - specifies the method of the source module to create the bridge for.
    | -| `AddGlueDependencyClientDependencyProviderConstant` | Adds a _Client_ dependency constant to the dependency provider of the given module.
    **Arguments**

    **General Arguments:**

    • **mode** - *project* or *core*.
      The default is **project**. For details, see [Difference between Core and Project modes](/docs/sdk/dev/spryks/spryks.html#core-and-project-modes).
    • **organization** - specifies the name of the organization in which to create the constant.
      The default is **Pyz**.
    • **module** - specifies the name of the module, where to add the constant.
    • **dependentModule** - specifies the name of the dependent module.

    **Spryk-Specific Arguments:**

    • **name** - specifies the name of the constant.
    • **value** - specifies the value of the constant.
    | -| `AddGlueDependencyClientDependencyProviderMethod` | Adds a _Client_ dependency method to the dependency provider of the given module.
    **Arguments**

    **General Arguments:**

    • **mode** - *project* or *core*.
      The default is **project**. For details, see [Difference between Core and Project modes](/docs/sdk/dev/spryks/spryks.html#core-and-project-modes).
    • **organization** - specifies the name of the organization in which to create the method.
      The default is **Pyz**.
    • **module** - specifies the name of the module, where to add the method.
    • **dependentModule** - specifies the name of the dependent module.

    **Spryk-Specific Arguments:**

    • **providerMethod** - specifies the method name.
    | -| `AddGlueDependencyClientFactoryMethod` | Adds a _Client_ dependency method to the factory of the given module.
    **Arguments**

    **General Arguments:**

    • **mode** - *project* or *core*.
      The default is **project**. For details, see [Difference between Core and Project modes](/docs/sdk/dev/spryks/spryks.html#core-and-project-modes).
    • **organization** - specifies the name of the organization in which to create the method.
      The default is **Pyz**.
    • **module** - specifies the name of the module, where to add the constant.
    • **dependentModule** - specifies the name of the dependent module.

    **Spryk-Specific Arguments:**

    • **factoryMethod** - specifies the method name.
    | -| `AddGlueDependencyClientToDependencyProvider` | Adds a Client dependency method to the Container of the dependency provider of the given module.
    **Arguments**

    **General Arguments:**

    • **mode** - *project* or *core*.
      The default is **project**. For details, see [Difference between Core and Project modes](/docs/sdk/dev/spryks/spryks.html#core-and-project-modes).
    • **organization** - specifies the name of the organization in which to create the method.
      The default is **Pyz**.
    • **module** - specifies the name of the module, where to add the provider.
    • **dependentModule** - specifies the name of the dependent module.

    **Spryk-Specific Arguments:**

    • **providerMethod** - specifies the method name.
      By default, it consists of the dependant module name plus the **Client** prefix.
    | - -## Factory Management - -| Spryk | Description | -| --- | --- | -| `AddGlueFactory` | Adds a new factory to the given module.
    **Arguments**
    • **mode** - *project* or *core*.
      The default is **project**. For details, see [Difference between Core and Project modes](/docs/sdk/dev/spryks/spryks.html#core-and-project-modes).
    • **organization** - specifies the name of the organization for which to perform the operation.
      The default is **Pyz**.
    • **module** - specifies the module name.
    | -| `AddGlueFactoryMethod` | Adds a _create class_ method to the factory of the given module.
    **Arguments**

    **General Arguments:**

    • **mode** - *project* or *core*.
      The default is **project**. For details, see [Difference between Core and Project modes](/docs/sdk/dev/spryks/spryks.html#core-and-project-modes).
    • **organization:** name of the organization for which to perform the operation.
      The default is **Pyz**.
    • **module** - specifies the module name.

    **Spryk-Specific Arguments:**

    • **subDirectory** - specifies the subdirectory of the class for which the method is created.
    • **className** - specifies the name of the class for which the method is created.
    | -| `AddGlueMapperFactoryMethod` | Adds a _create mapper_ method to the factory of the given module.
    **Arguments**

    **General Arguments:**

    • **mode** - *project* or *core*.
      The default is **project**. For details, see [Difference between Core and Project modes](/docs/sdk/dev/spryks/spryks.html#core-and-project-modes).
    • **organization:** name of the organization for which to perform the operation.
      The default is **Pyz**.
    • **module** - specifies the module name.

    **Spryk-Specific Arguments:**

    • **subDirectory** - specifies the subdirectory of the mapper for which the method is created.
    • **className** - specifies the name of the mapper for which the method is created.
    | -| `AddGlueResourceRestResponseBuilderFactoryMethod` | Adds a method of the response builder to the factory of the given module.
    **Arguments**

    **General Arguments:**

    • **mode** - *project* or *core*.
      The default is **project**. For details, see [Difference between Core and Project modes](/docs/sdk/dev/spryks/spryks.html#core-and-project-modes).
    • **organization** - specifies the name of the organization for which to perform the operation.
      The default is **Pyz**.
    • **module** - specifies the module name.

    **Spryk-Specific Arguments:**

    • **subDirectory** - specifies the name of the subdirectory where the method is located.
      _The subdirectory must be located in the Processor directory of the module root folder._
    • **className** - specifies the method class name.
    | - -## Request and Response Format - -| Spryk | Description | -| --- | --- | -| `AddGlueFormatRequestPlugin` | Adds a new request format plugin to the given module.
    **Arguments**

    **General Arguments:**

    • **mode** - *project* or *core*.
      The default is **project**. For details, see [Difference between Core and Project modes](/docs/sdk/dev/spryks/spryks.html#core-and-project-modes).
    • **organization** - specifies the name of the organization for which to perform the operation.
      The default is **Pyz**.
    • **module** - specifies the module name.

    **Spryk-Specific Arguments:**

    • **modelName** - specifies the name of the request format model that will be implemented by the plugin.
    | -| `AddGlueFormatResponseDataPlugin` | Adds a new response data format plugin to the given module.
    **Arguments**

    **General Arguments:**

    • **mode** - *project* or *core*.
      The default is **project**. For details, see [Difference between Core and Project modes](/docs/sdk/dev/spryks/spryks.html#core-and-project-modes).
    • **organization** - specifies the name of the organization for which to perform the operation.
      The default is **Pyz**.
    • **module** - specifies the module name.

    **Spryk-Specific Arguments:**

    • **modelName** - specifies the name of the response data format model that will be implemented by the plugin.
    | -| `AddGlueFormatResponseHeadersPlugin` | Adds a new response header format plugin to the given module.
    **Arguments**

    **General Arguments:**

    • **mode** - *project* or *core*.
      The default is **project**. For details, see [Difference between Core and Project modes](/docs/sdk/dev/spryks/spryks.html#core-and-project-modes).
    • **organization** - specifies the name of the organization for which to perform the operation.
      The default is **Pyz**.
    • **module** - specifies the module name.

    **Spryk-Specific Arguments:**

    • **modelName** - specifies the name of the response headers format model that will be implemented by the plugin.
    | - -## Processor Management - -| Spryk | Description | -| --- | --- | -| `AddGlueProcessorModel` | Adds a new processor model to the given module.
    **Arguments**

    **General Arguments:**

    • **mode** - *project* or *core*.
      The default is **project**. For details, see [Difference between Core and Project modes](/docs/sdk/dev/spryks/spryks.html#core-and-project-modes).
    • **organization:** name of the organization for which to perform the operation.
      The default is **Pyz**.
    • **module** - specifies the module name.

    **Spryk-Specific Arguments:**

    • **subDirectory** - specifies the subdirectory under the Processor directory where the model will be created.
    • **className** - specifies the class name for the model.
    • **interfaceName** - specifies the interface name for the model.
      By default, it is the same as the class name plus the `Interface` suffix.
    | -| `AddGlueProcessorModelInterface` | Adds a new processor model interface to the given module.
    **Arguments**

    **General Arguments:**

    • **mode** - *project* or *core*.
      The default is **project**. For details, see [Difference between Core and Project modes](/docs/sdk/dev/spryks/spryks.html#core-and-project-modes).
    • **organization:** name of the organization for which to perform the operation.
      The default is **Pyz**.
    • **module** - specifies the module name.

    **Spryk-Specific Arguments:**

    • **subDirectory** - specifies the subdirectory under the Processor directory where the model interface will be created.
    • **className** - specifies the class name for the model.
    • **interfaceName** - specifies the interface name for the model.
      By default, it is the same as the class name plus the `Interface` suffix.
    | -| `AddGlueProcessorModelMethod` | Adds a new method to the given processor model.
    **Arguments**

    **General Arguments:**

    • **mode** - *project* or *core*.
      The default is **project**. For details, see [Difference between Core and Project modes](/docs/sdk/dev/spryks/spryks.html#core-and-project-modes).
    • **organization:** name of the organization for which to perform the operation.
      The default is **Pyz**.
    • **module** - specifies the module name.

    **Spryk-Specific Arguments:**

    • **subDirectory** - specifies the subdirectory under the Processor directory where the model class is located.
    • **className** - specifies the class name of the model.
    • **input** - specifies the name of the *input* (`@param`) value of the method.
    • **output** - specifies the name of the *output* (`@return`) value of the method.
    | -| `AddGlueProcessorModelInterfaceMethod` | Adds a new method to the given processor model interface.
    **Arguments**

    **General Arguments:**

    • **mode** - *project* or *core*.
      The default is **project**. For details, see [Difference between Core and Project modes](/docs/sdk/dev/spryks/spryks.html#core-and-project-modes).
    • **organization:** name of the organization for which to perform the operation.
      The default is **Pyz**.
    • **module** - specifies the module name.

    **Spryk-Specific Arguments:**

    • **subDirectory** - specifies the subdirectory under the `Processor` directory where the interface class is located.
    • **className** - specifies the class name of the model.
    • **input** - specifies the name of the *input* (`@param`) value of the method.
    • **output** - specifies the name of the *output* (`@return`) value of the method.
    | - -## Resource Mapper Management - -| Spryk | Description | -| --- | --- | -| `AddGlueResourceMapper` | Adds a new resource mapper model to the given module.
    **Arguments**

    **General Arguments:**

    • **mode** - *project* or *core*.
      The default is **project**. For details, see [Difference between Core and Project modes](/docs/sdk/dev/spryks/spryks.html#core-and-project-modes).
    • **organization:** name of the organization for which to perform the operation.
      The default is **Pyz**.
    • **module** - specifies the module name.

    **Spryk-Specific Arguments:**

    • **subDirectory** - specifies the subdirectory under the Processor directory where the model will be created.
      The default subdirectory is `Mapper`.
    • **className** - specifies the class name for the model.
    • **interfaceName** - specifies the interface name for the model.
      By default, it is the same as the class name plus the `Interface` suffix.
    | -| `AddGlueResourceMapperInterface` | Adds a new resource mapper model Interface.
    **Arguments**

    **General Arguments:**

    • **mode** - *project* or *core*.
      The default is **project**. For details, see [Difference between Core and Project modes](/docs/sdk/dev/spryks/spryks.html#core-and-project-modes).
    • **organization:** name of the organization for which to perform the operation.
      The default is **Pyz**.
    • **module** - specifies the module name.

    **Spryk-Specific Arguments:**

    • **subDirectory** - specifies the subdirectory under the Processor directory where the interface will be created.
      The default subdirectory is **Mapper**.
    • **className** - specifies the class name for the model.
    • **interfaceName** - specifies the interface name for the model.
      By default, it is the same as the class name plus the **Interface** suffix.
    | -| `AddGlueResourceMapperMethod` | Adds a new method to the given resource mapper model.
    **Arguments**

    **General Arguments:**

    • **mode** - *project* or *core*.
      The default is **project**. For details, see [Difference between Core and Project modes](/docs/sdk/dev/spryks/spryks.html#core-and-project-modes).
    • **organization:** name of the organization for which to perform the operation.
      The default is **Pyz**.
    • **module** - specifies the module name.

    **Spryk-Specific Arguments:**

    • **resourceType** - specifies the resource type that will be mapped with this method.
    • **fromTransfer** - specifies the name of the transfer class that will be used to map the properties of rest **requests** to the resource properties.
    • **toTransfer** - specifies the name of the transfer class that will be used to map the properties of rest **responses** to the resource properties.
      The default name for both the transfers consists of the resource type, camel-cased, with the `Rest` prefix and the`AttributesTransfer` suffix.
    | -| `AddGlueResourceMapperInterfaceMethod` | Adds a new method to the resource mapper model interface.
    **Arguments**

    **General Arguments:**

    • **mode** - *project* or *core*.
      The default is **project**. For details, see [Difference between Core and Project modes](/docs/sdk/dev/spryks/spryks.html#core-and-project-modes).
    • **organization:** name of the organization for which to perform the operation.
      The default is **Pyz**.
    • **module** - specifies the module name.

    **Spryk-Specific Arguments:**

    • **resourceType** - specifies the resource type that will be mapped with this method.
    • **fromTransfer** - specifies the name of the transfer class that will be used to map the properties of rest **requests** to the resource properties.
    • **toTransfer** - specifies the name of the transfer class that will be used to map the properties of rest **responses** to the resource properties.
      The default name for both the transfers consists of the resource type, camel-cased, with the `Rest` prefix and the`AttributesTransfer` suffix.
    | - -{% info_block infoBox %} - -For more details, see section **Generic Rest Response** in [Glue Infrastructure](#routing-management). - -{% endinfo_block %} - -## Response Model Management - -| Spryk | Description | -| --- | --- | -| `AddGlueResourceRestResponseBuilderModel` | Adds a new response builder model to the given resource of the given module.
    **Arguments**

    **General Arguments:**

    • **mode** - *project* or *core*.
      The default is **project**. For details, see [Difference between Core and Project modes](/docs/sdk/dev/spryks/spryks.html#core-and-project-modes).
    • **organization** - specifies the name of the organization for which to perform the operation.
      The default is **Pyz**.
    • **module** - specifies the module name.

    **Spryk-Specific Arguments:**

    • **subDirectory** - specifies the name of the subdirectory where to create the model.
      By default, the Spryk uses the RestResponseBuilder subdirectory in the Processor directory of the module root folder.
    • **resourceType** - specifies the resource type.
    • **className** - specifies the class name for the model.
      By default, it is the same as the resource name in singular and capitalized plus the **RestResponseBuilder** suffix. For example, if the resource name is `myresources`, the class name is `MyresourceRestResponseBuilder`.
    • **interfaceName** - specifies the interface name for the model.
      By default, it is the same as the class name plus the `Interface` suffix.
    | -| `AddGlueResourceRestResponseBuilderModelInterface` | Adds an interface for a response builder model class of the given module.
    **Arguments**

    **General Arguments:**

    • **mode** - *project* or *core*.
      The default is **project**. For details, see [Difference between Core and Project modes](/docs/sdk/dev/spryks/spryks.html#core-and-project-modes).
    • **organization** - specifies the name of the organization for which to perform the operation.
      The default is **Pyz**.
    • **module** - specifies the module name.

    **Spryk-Specific Arguments:**

    • **subDirectory** - specifies the name of the subdirectory where to create the interface.
      By default, the Spryk uses the `RestResponseBuilder` subdirectory in the `Processor` directory of the module root folder.
    • **resourceType** - specifies the resource type.
    • **className** - specifies the class name for the model.
      By default, it is the same as the resource name in singular and capitalized plus the `RestResponseBuilder` suffix. For example, if the resource name is `myresources`, the class name is `MyresourceRestResponseBuilder`.
    • **interfaceName** - specifies the interface name for the model.
      By default, it is the same as the class name plus the `Interface` suffix.
    | - -## Adding Validation - -| Spryk | Description | -| --- | --- | -| `AddGlueRestRequestValidatorPlugin` | Adds a new plugin that validates REST requests.
    **Arguments**

    **General Arguments:**

    • **mode** - *project* or *core*.
      The default is **project**. For details, see [Difference between Core and Project modes](/docs/sdk/dev/spryks/spryks.html#core-and-project-modes).
    • **organization:** name of the organization for which to perform the operation.
      The default is **Pyz**.
    • **module** - specifies the module name.

    **Spryk-Specific Arguments:**

    • **modelName** - specifies the model name for the plugin.
    | -| `AddGlueValidateHttpRequestPlugin` | Adds a new plugin that validates HTTP requests.
    **Arguments**

    **General Arguments:**

    • **mode** - *project* or *core*.
      The default is **project**. For details, see [Difference between Core and Project modes](/docs/sdk/dev/spryks/spryks.html#core-and-project-modes).
    • **organization:** name of the organization for which to perform the operation.
      The default is **Pyz**.
    • **module** - specifies the module name.

    **Spryk-Specific Arguments:**

    • **modelName** - specifies the model name for the plugin.
    | -| `AddGlueValidation` | Adds a _YAML_ file for validating requests to the given resource type.
    **Arguments**

    **General Arguments:**

    • **mode** - *project* or *core*.
      The default is **project**. For details, see [Difference between Core and Project modes](/docs/sdk/dev/spryks/spryks.html#core-and-project-modes).
    • **organization** - specifies the name of the organization for which to perform the operation.
      The default is **Pyz**.
    • **module** - specifies the module name.

    **Spryk-Specific Arguments:**

    • **resourceType** - specifies the resource type.
    | - -{% info_block infoBox %} - -For more details, see [Validate REST request format](/docs/scos/dev/tutorials-and-howtos/introduction-tutorials/glue-api/validating-rest-request-format.html). - -{% endinfo_block %} diff --git a/docs/scos/dev/glue-api-guides/202005.0/handling-concurrent-rest-requests-and-caching-with-entity-tags.md b/docs/scos/dev/glue-api-guides/202005.0/handling-concurrent-rest-requests-and-caching-with-entity-tags.md deleted file mode 100644 index 7e12cdfae0a..00000000000 --- a/docs/scos/dev/glue-api-guides/202005.0/handling-concurrent-rest-requests-and-caching-with-entity-tags.md +++ /dev/null @@ -1,89 +0,0 @@ ---- -title: Handling Concurrent REST Requests and Caching with Etags -description: This article will provide you with information on how to handle concurrent requests and implement client-side caching with the help of entity tags. -last_updated: Sep 15, 2020 -template: glue-api-storefront-guide-template -originalLink: https://documentation.spryker.com/v5/docs/handling-concurrent-rest-requests-and-caching-with-etags-201907 -originalArticleId: 337cc5c9-d4db-44e5-8cf8-ffcba6803bec -redirect_from: - - /v5/docs/handling-concurrent-rest-requests-and-caching-with-etags-201907 - - /v5/docs/en/handling-concurrent-rest-requests-and-caching-with-etags-201907 -related: - - title: Glue Infrastructure - link: docs/scos/dev/glue-api-guides/page.version/glue-infrastructure.html - - title: Shared Cart Feature Overview - link: docs/scos/user/features/page.version/shared-carts-feature-overview.html ---- - -Certain resources of Spryker Glue API allow concurrent changes from multiple sources. For example, a shared cart can be changed by multiple users who may not know about each other's actions and act independently. To ensure resource integrity and consistency, such resources implement **Entity Tags** (also called ETags). An ETag is a unique identifier of the state of a specific resource at a certain point in time. It allows the server to identify whether the client initiating a change has received the last state of the resource known to the server prior to sending the change request. -Apart from that, ETags can also boost the API performance via caching. They can be used by the client to identify when a new version of a resource needs to be requested. For example, the client can cache the state of a user's cart and request an updated version only when the associated ETag changes. Since Etags are stored in Spryker's KV Storage (Redis by default), tag matching can be performed much faster than fetching cart data. - -## Request Flow -Once a client requests a resource that supports optimization via ETags, and provided that it is authorized to do so, the Glue API server responds with a REST response. It contains an identifier of the current state of the resource in the ETag header. - -**Sample Request** - -``` -GET https://glue.mysprykershop.com/carts/f23f5cfa-7fde-5706-aefb-ac6c6bbadeab - -Content-Type: application/json -Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImNhO... -... -``` - -**Sample Response** - -``` -HTTP/1.1 200 OK -Content-Type: application/json -Date: Thu, 18 Jun 2019 12:55:31 GMT -ETag: "cc89022a51522f705c44fcfced188cc8" -... -``` - -When updating the resource, the client must pass the Etag in the If-Match header, for example: - -``` -PATCH https://glue.mysprykershop.com/carts/f23f5cfa-7fde-5706-aefb-ac6c6bbadeab - -Content-Type: application/json -Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImNhO... -If-Match: "cc89022a51522f705c44fcfced188cc8" -... -``` - -If the resource is updated successfully, the server response contains a new ETag: - -``` -HTTP/1.1 200 OK -Content-Type: application/json -Date: Thu, 18 Jun 2019 12:55:31 GMT -ETag: "ccc86e1a41d1f4e0ea52419a0bcd9761" -... -``` - -If the client makes a new attempt to update the resource, it needs to supply the new ETag value in the If-Match header. Any requests from other clients with the old ETag value will be denied as well. - -## Error Responses -The following error responses can be returned by the server when a resource supporting ETags is updated: - -| Status | Reason | -| --- | --- | -| 412 | Pre-condition failed.
    The If-Match header value is invalid or outdated.
    Request the current state of the resource using a GET request to obtain a valid tag value. | -| 428 | Pre-condition required.
    The If-Match header is missing. | - -## Workflow Diagram -The workflow of resources that support concurrent requests is presented in the diagram below: - -![Workflow diagram](https://spryker.s3.eu-central-1.amazonaws.com/docs/Glue+API/Glue+API+Storefront+Guides/Handling+Concurrent+REST+Requests+and+Caching+with+Etags/entity-tag-process-flow.png) - -## Supported Resources -Currently, only a single resource supports concurrent requests with ETag headers out of the box: - -| Endpoint | Methods | Resource | -| --- | --- | --- | -| /carts | PATCH, DELETE | Registered user's cart. | - -{% info_block infoBox "Info" %} -The list of resources supporting concurrent requests can vary depending on your project implementation. -{% endinfo_block %} diff --git a/docs/scos/dev/glue-api-guides/202005.0/managing-b2b-account/authenticating-as-a-company-user.md b/docs/scos/dev/glue-api-guides/202005.0/managing-b2b-account/authenticating-as-a-company-user.md deleted file mode 100644 index 5853255ebae..00000000000 --- a/docs/scos/dev/glue-api-guides/202005.0/managing-b2b-account/authenticating-as-a-company-user.md +++ /dev/null @@ -1,410 +0,0 @@ ---- -title: Logging In as Company User -description: The article provides information on how to access private B2B resources using Spryker Glue API. -last_updated: Sep 15, 2020 -template: glue-api-storefront-guide-template -originalLink: https://documentation.spryker.com/v5/docs/authenticating-as-a-company-user-201907 -originalArticleId: 6b2183ab-7d17-45cf-9a53-e2f3bb48e579 -redirect_from: - - /v5/docs/authenticating-as-a-company-user-201907 - - /v5/docs/en/authenticating-as-a-company-user-201907 -related: - - title: Authentication and Authorization - link: docs/scos/dev/glue-api-guides/page.version/managing-customers/authenticating-as-a-customer.html - - title: Retrieving Business Unit Information - link: docs/scos/dev/glue-api-guides/page.version/managing-b2b-account/retrieving-business-units.html - - title: Retrieving Company Role Information - link: docs/scos/dev/glue-api-guides/page.version/managing-b2b-account/retrieving-company-roles.html - - title: Retrieving Company User Information - link: docs/scos/dev/glue-api-guides/page.version/managing-b2b-account/retrieving-company-users.html - - title: Company Account and General Organizational Structure - link: docs/scos/user/features/page.version/company-account-feature-overview/company-accounts-overview.html - - title: Prices per Merchant Relation Feature Overview - link: docs/scos/user/features/page.version/merchant-custom-prices-feature-overview.html - - title: Password Management - link: docs/scos/user/features/page.version/customer-account-management-feature-overview/password-management-overview.html ---- - -In the B2B context, buyers typically represent a company and act on its behalf. For this reason, Spryker Commerce OS provides the [Company Account](/docs/scos/user/features/{{page.version}}/company-account-feature-overview/company-accounts-overview.html) capability which allows companies to create multiple [Company Users](/docs/scos/user/features/{{page.version}}/company-account-feature-overview/company-accounts-overview.html), as well as organize them in Business Units depending on the user role and scope. Customers can impersonate as various *Company Accounts* depending on the task they need to perform. - -To impersonate a customer as a Company User, API clients can use the **Business on Behalf API**. It provides REST access to retrieve a list of the Company Users available to the currently logged in user and impersonate as any user available to them. - -{% info_block warningBox "Authentication" %} -Before impersonating as Company Users, customers need to authenticate first. For details on how to do so, see [Authentication and Authorization](/docs/scos/dev/glue-api-guides/{{page.version}}/authentication-and-authorization.html). -{% endinfo_block %} - -During the impersonation process, customers receive an Access Token. The token can be used to access any B2B REST API resources, such as Companies, Business Units, Carts etc. Also, authenticated company users will benefit from the [merchant-specific prices](/docs/scos/user/features/{{page.version}}/merchant-custom-prices-feature-overview.html) available to them (applied to certain business units as a rule) instead of the default ones. Also, you can customize the behavior of your API client to match the user's company, job role, business unit, and scope. - -{% info_block infoBox "Info" %} -If the [Prices per Merchant Relation \(Customer specific prices\ -{% endinfo_block %}](/docs/scos/user/features/{{page.version}}/merchant-custom-prices-feature-overview.html) feature is enabled in your project, all prices returned by Spryker REST API are the prices specific to the Company of the current Company User (if any).) - -The same as with B2C resource access tokens, the tokens provided by the API have limited timeframe. When receiving an access token, the response body contains not only the access token itself, but also its lifetime, in seconds, and a **Refresh Token**. When the lifetime expires, the Refresh Token can be exchanged for a new Access Token. The new token will also have a limited lifetime and have a corresponding Refresh Token for future authentication. The default lifetime of the tokens is 8 hours (28800 seconds) for an access token and 1 month (2628000 seconds) for a refresh token. The settings can be changed in the module configuration. - -{% info_block infoBox "Info" %} -For details, see [Authentication and Authorization](/docs/scos/dev/glue-api-guides/{{page.version}}/authentication-and-authorization.html). -{% endinfo_block %} - -In your development, the endpoint can help you to: - -* Authenticate users as B2B Company Users; -* Obtain a token that can be used when accessing protected B2B resources; -* Provide customized user experience based on the user's Company, Business Unit, Role etc; -* Allow users to benefit from prices specific to their company. - -## Installation -For detailed information on the modules that provide the API functionality and related installation instructions, see [Glue API: Company Account Feature Integration](/docs/scos/dev/feature-integration-guides/{{page.version}}/company-account-feature-integration.html). - -## Retrieving Available Company Users -To retrieve a list of all the Company Users available to the currently logged in user, send a GET request to the following endpoint: - -[/company-users/mine](/docs/scos/dev/glue-api-guides/{{page.version}}/rest-api-reference.html#/company-users) - -Request sample: *GET http://glue.mysprykershop.com/company-users/mine* - -{% info_block infoBox "Authentication Required" %} -To get a list of Company Users, you need to authenticate first and pass an access token as a part of your request. For details, see [Authentication and Authorization](/docs/scos/dev/glue-api-guides/{{page.version}}/authentication-and-authorization.html). -{% endinfo_block %} - -### Response -The endpoint responds with a `RestCompanyUserCollectionResponse` that contains the Company Users available to the currently logged in user. - -**Response Attributes:** - -| Attribute* | Type | Description | -| --- | --- | --- | -| id | String | Specifies the Company User ID.
    You can use the ID to impersonate as the Company User via the `/company-user-access-tokens` endpoint. | -| isActive | Boolean | Indicates whether the Company User is active. | -| isDefault | Boolean | Indicates whether the Company User is the default one for the logged in customer. | - -*The attributes mentioned are all attributes in the response. Type is not mentioned. - -**Sample Response** - -```json -{ - "data": [ - { - "type": "company-users", - "id": "4c677a6b-2f65-5645-9bf8-0ef3532bead1", - "attributes": { - "isActive": true, - "isDefault": false - }, - "links": { - "self": "http://glue.mysprykershop.com/company-users/4c677a6b-2f65-5645-9bf8-0ef3532bead1" - } - }, - { - "type": "company-users", - "id": "cfbe2644-a9bd-581b-977b-e72d1c9a9c54", - "attributes": { - "isActive": true, - "isDefault": false - }, - "links": { - "self": "http://glue.mysprykershop.com/company-users/cfbe2644-a9bd-581b-977b-e72d1c9a9c54" - } - }, - { - "type": "company-users", - "id": "e1019900-88c4-5582-af83-2c1ea8775ac5", - "attributes": { - "isActive": true, - "isDefault": false - }, - "links": { - "self": "http://glue.mysprykershop.com/company-users/e1019900-88c4-5582-af83-2c1ea8775ac5" - } - } - ], - "links": { - "self": "http://glue.mysprykershop.com/company-users/mine" - } -} -``` - -{% info_block infoBox "Info" %} -If the currently logged in user does not have access to any Company User accounts, the endpoint returns an empty **RestCompanyUserCollectionResponse** response. -{% endinfo_block %} - -To help customers with selecting the necessary Company User, you can provide additional information, such as the company and business unit that each account belongs to. Also, you can identify which roles the corporate accounts can perform within the company. To fetch such information, extend the response of the endpoint with the **companies** and **company-business-units**, and **company-roles** resource relationships. - -Request sample: *GET http://glue.mysprykershop.com/company-users/min?**include=companies,company-business-units,company-roles*** - -In this case, the following additional attributes will be added to the response: - -| Resource | Attribute* | Type | Description | -| --- | --- | --- | --- | -| companies | name | String | Specifies the name of the Company. | -| companies | isActive | Boolean | Indicates whether the Company is active. | -| companies | status | String | Specifies the status of the Company. Possible values: *Pending*, *Approved* or *Denied*. | -| company-roles | name | String | Specifies the name of the Company Role. | -| company-roles | isDefault | Boolean | Indicates whether the Company Role is the default role for the company. | -| company-business-units | name | String | Specifies the name of the Business Unit. | -| company-business-units | email | String | Specifies the email address of the Business Unit. | -| company-business-units | phone | String | Specifies the telephone number of the Business Unit. | -| company-business-units | externalUrl | String | Specifies the url of the website of the Business Unit. | -| company-business-units | bic | String | Specifies the Bank Identifier Code of the Business Unit. | -| company-business-units | iban | String | Specifies the International Bank Account Number of the Business Unit. | -| company-business-units | defaultBillingAddress | String | Specifies the default billing address of the Business Unit. | - -*The attributes mentioned are all attributes in the response. Type and ID are not mentioned. - -
    -Sample Response - -```json -{ - "data": [ - { - "type": "company-users", - "id": "4c677a6b-2f65-5645-9bf8-0ef3532bead1", - "attributes": {...}, - "links": {...}, - "relationships": { - "companies": { - "data": [ - { - "type": "companies", - "id": "88efe8fb-98bd-5423-a041-a8f866c0f913" - } - ] - }, - "company-business-units": { - "data": [ - { - "type": "company-business-units", - "id": "b2ea10b2-263a-5cd9-88dc-747309f0534a" - } - ] - }, - "company-roles": { - "data": [ - { - "type": "company-roles", - "id": "50c647a4-d27f-5d82-a587-1d0b7cc6b58d" - } - ] - } - } - }, - { - "type": "company-users", - "id": "cfbe2644-a9bd-581b-977b-e72d1c9a9c54", - "attributes": { - "isActive": true, - "isDefault": false - }, - "links": { - "self": "http://glue.mysprykershop.com/company-users/cfbe2644-a9bd-581b-977b-e72d1c9a9c54?include=companies,company-business-units" - }, - "relationships": { - "companies": { - "data": [ - { - "type": "companies", - "id": "88efe8fb-98bd-5423-a041-a8f866c0f913" - } - ] - }, - "company-business-units": { - "data": [ - { - "type": "company-business-units", - "id": "35752ce6-e25f-5d04-8bef-d46b2c359695" - } - ] - } - } - }, - { - "type": "company-users", - "id": "e1019900-88c4-5582-af83-2c1ea8775ac5", - "attributes": {...}, - "links": {...}, - "relationships": { - "companies": { - "data": [ - { - "type": "companies", - "id": "88efe8fb-98bd-5423-a041-a8f866c0f913" - } - ] - }, - "company-business-units": { - "data": [ - { - "type": "company-business-units", - "id": "5a6032dc-fbce-5d0d-9d57-11ade1947bac" - } - ] - } - } - } - ], - "links": {...}, - "included": [ - { - "type": "companies", - "id": "88efe8fb-98bd-5423-a041-a8f866c0f913", - "attributes": { - "isActive": true, - "name": "BoB-Hotel Mitte", - "status": "approved" - }, - "links": { - "self": "http://glue.mysprykershop.com/companies/88efe8fb-98bd-5423-a041-a8f866c0f913" - } - }, - { - "type": "company-business-units", - "id": "b2ea10b2-263a-5cd9-88dc-747309f0534a", - "attributes": { - "name": "Hotel Mitte", - "email": "Hotel.Mitte@spryker.com", - "phone": "12345617", - "externalUrl": "", - "bic": "", - "iban": "", - "defaultBillingAddress": null - }, - "links": { - "self": "http://glue.mysprykershop.com/b2ea10b2-263a-5cd9-88dc-747309f0534a" - } - }, - { - "type": "company-business-units", - "id": "35752ce6-e25f-5d04-8bef-d46b2c359695", - "attributes": { - "name": "Service Mitte", - "email": "Service.Mitte@spryker.com", - "phone": "12345617", - "externalUrl": "", - "bic": "", - "iban": "", - "defaultBillingAddress": null - }, - "links": { - "self": "http://glue.mysprykershop.com/company-business-units/35752ce6-e25f-5d04-8bef-d46b2c359695" - } - }, - { - "type": "company-business-units", - "id": "5a6032dc-fbce-5d0d-9d57-11ade1947bac", - "attributes": { - "name": "Cleaning Mitte", - "email": "Cleaning.Mitte@spryker.com", - "phone": "12345617", - "externalUrl": "", - "bic": "", - "iban": "", - "defaultBillingAddress": null - }, - "links": { - "self": "http://glue.mysprykershop.com/company-business-units/5a6032dc-fbce-5d0d-9d57-11ade1947bac" - } - }, - { - "type": "company-roles", - "id": "50c647a4-d27f-5d82-a587-1d0b7cc6b58d", - "attributes": { - "name": "Buyer", - "isDefault": true - }, - "links": { - "self": "http://glue.mysprykershop.com/company-roles/50c647a4-d27f-5d82-a587-1d0b7cc6b58d" - } - } - ] -} -``` - -
    -
    - -### Possible Errors - -| Code | Reason | -| --- | --- | -| 401 | The access token is invalid. | -| 403 | The access token is missing. | - -## Impersonating as a Company User -To impersonate a user as a Company Account and receive a B2B access token, send a POST request to the following endpoint: - -[/company-user-access-tokens](/docs/scos/dev/glue-api-guides/{{page.version}}/rest-api-reference.html#/company-user-access-tokens) - -Request sample: *POST http://glue.mysprykershop.com/company-user-access-tokens* - -{% info_block warningBox "Authentication Required" %} -To access the endpoint, you need to authenticate customers as regular users first and pass an access token as a part of your request. For details, see [Authentication and Authorization](/docs/scos/dev/glue-api-guides/{{page.version}}/authentication-and-authorization.html). -{% endinfo_block %} - -**Attributes** - -| Attribute | Type | Description | -| --- | --- | --- | -| idCompanyUser | String | Specifies the ID of the Company User to impersonate.
    Company User IDs can be retrieved using the **/company-users/mine** endpoint. | - -**Sample Request:** - -```json -{ - "data": { - "type": "company-user-access-tokens", - "attributes": { - "idCompanyUser": "5daf27b3-eddf-5b81-98cb-899f140f97e5" - } - } -} -``` - -### Response -If the request was successful, the endpoint responds with a **RestCompanyUserAccessTokensRequest** containing the access and refresh tokens. - -**Response Attributes:** - -| Attribute* | Type | Description | -| --- | --- | --- | -| tokenType | String | Specifies the token type. By default, the type is always Bearer. | -| accessToken | String | Specifies the access token that can be used to impersonate as the Company User. | -| expiresIn | Integer | Specifies the time period after which the access token expires (in seconds). By default, 28800. | -| refreshToken | String | Specifies the refresh token that can be exchanged for a new access token after the current one expires. | - -*The attributes mentioned are all attributes in the response. Type and ID are not mentioned. - -**Sample Response** - -```json -{ - "data": { - "type": "company-user-access-tokens", - "id": null, - "attributes": { - "tokenType": "Bearer", - "expiresIn": 28800, - "accessToken": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUz", - "refreshToken": "def50200d7338763c798a0600f18e" - }, - "links": { - "self": "http://glue.mysprykershop.com/company-user-access-tokens" - } - } -} -``` - -### Possible Errors - -| Code | Reason | -| --- | --- | -| 401 | Failed to authenticate a user. This can happen due to the following reasons:
    • the currently logged on user cannot authenticate as the specified Company User;
    • the specified Company User does not exist;
    • the access token provided in the request is incorrect.
    | -| 403 | The access token is missing in the request. | -| 422 | The Company User Id format is incorrect. | - -## Accessing B2B Resources -After impersonating as a Company User, you can access the resources provided to B2B customers using the access token received via the **/company-user-access-tokens** endpoint. When accessing the resources, you need to pass the token in the Authorization header. For details, see [Accessing Resources](/docs/scos/dev/glue-api-guides/{{page.version}}/authentication-and-authorization.html#accessing-resources). - -## Refreshing the Access Token -You can refresh an access token issued for a Company User the same as any other access token issued by Glue API. For details, see [Refreshing Tokens](/docs/scos/dev/glue-api-guides/{{page.version}}/authentication-and-authorization.html#refreshing-tokens). - diff --git a/docs/scos/dev/glue-api-guides/202005.0/managing-b2b-account/b2b-account-management.md b/docs/scos/dev/glue-api-guides/202005.0/managing-b2b-account/b2b-account-management.md deleted file mode 100644 index 9541c448562..00000000000 --- a/docs/scos/dev/glue-api-guides/202005.0/managing-b2b-account/b2b-account-management.md +++ /dev/null @@ -1,18 +0,0 @@ ---- -title: B2B Account Management -description: This section contains information on managing B2B accounts with the help of Spryker REST APIs. -last_updated: Sep 14, 2020 -template: glue-api-storefront-guide-template -originalLink: https://documentation.spryker.com/v5/docs/b2b-account-management-201907 -originalArticleId: d0f3ad8d-d91e-401b-b0c6-e48cb13df5e8 -redirect_from: - - /v5/docs/b2b-account-management-201907 - - /v5/docs/en/b2b-account-management-201907 ---- - -The Business on Behalf and Company Account APIs provide REST access to Company Account management. In your development, the resources provided by the API can help you performing the following tasks: -* [Logging In as Company User](/docs/scos/dev/glue-api-guides/{{page.version}}/managing-b2b-account/authenticating-as-a-company-user.html) -* [Retrieving Company User Information](/docs/scos/dev/glue-api-guides/{{page.version}}/managing-b2b-account/retrieving-company-users.html) -* [Retrieving Company Information](/docs/scos/dev/glue-api-guides/{{page.version}}/managing-b2b-account/retrieving-companies.html) -* [Retrieving Business Unit Information](/docs/scos/dev/glue-api-guides/{{page.version}}/managing-b2b-account/retrieving-business-unit-information.html) -* [Retrieving Company Role Information](/docs/scos/dev/glue-api-guides/{{page.version}}/managing-b2b-account/retrieving-company-roles.html) diff --git a/docs/scos/dev/glue-api-guides/202005.0/managing-b2b-account/retrieving-business-units.md b/docs/scos/dev/glue-api-guides/202005.0/managing-b2b-account/retrieving-business-units.md deleted file mode 100644 index e24ced8a95f..00000000000 --- a/docs/scos/dev/glue-api-guides/202005.0/managing-b2b-account/retrieving-business-units.md +++ /dev/null @@ -1,331 +0,0 @@ ---- -title: Retrieving Business Units -description: The article describes how to use Spryker Glue API to retrieve business unit information. -last_updated: Sep 15, 2020 -template: glue-api-storefront-guide-template -originalLink: https://documentation.spryker.com/v5/docs/retrieving-business-unit-information-201907 -originalArticleId: 1325e7e7-044d-4272-9587-fafc8a9cb928 -redirect_from: - - /v5/docs/retrieving-business-unit-information-201907 - - /v5/docs/en/retrieving-business-unit-information-201907 - - /docs/scos/dev/glue-api-guides/202005.0/managing-b2b-account/retrieving-business-unit-information.html -related: - - title: Logging In as Company User - link: docs/scos/dev/glue-api-guides/page.version/managing-b2b-account/authenticating-as-a-company-user.html - - title: Retrieving Company User Information - link: docs/scos/dev/glue-api-guides/page.version/managing-b2b-account/retrieving-company-users.html - - title: Retrieving Company Information - link: docs/scos/dev/glue-api-guides/page.version/managing-b2b-account/retrieving-companies.html - - title: Authentication and Authorization - link: docs/scos/dev/glue-api-guides/page.version/managing-customers/authenticating-as-a-customer.html - - title: Business Units Management Feature Overview - link: docs/scos/user/features/page.version/company-account-feature-overview/business-units-overview.html - - title: Company Account and General Organizational Structure - link: docs/scos/user/features/page.version/company-account-feature-overview/company-accounts-overview.html ---- - -In the B2B world, users represent their companies rather than act on their own behalf. Such users, called [Company Accounts](/docs/scos/user/features/{{page.version}}/company-account-feature-overview/company-accounts-overview.html), are organized in Business Units depending on their job role and the scope of their activity. The endpoints provided by the **Business Unit** and **Business Unit Address** APIs allow retrieving Business Unit information. - -{% info_block warningBox "Authentication" %} -The endpoints provided by this API cannot be accessed anonymously. To access them, you need to impersonate users as Company Accounts and pass the authentication tokens received. For details on how to authenticate and retrieve such a token, see [Logging In as Company User](/docs/scos/dev/glue-api-guides/{{page.version}}/managing-b2b-account/authenticating-as-a-company-user.html). -{% endinfo_block %} - -In your development, the endpoint can help you to provide information on the Business Units available in the company of the currently logged in user. - -## Installation -For detailed information on the modules that provide the API functionality and related installation instructions, see [Glue API: Company Account Feature Integration](/docs/scos/dev/feature-integration-guides/{{page.version}}/company-account-feature-integration.html). - -## Retrieving General Business Unit Information -### Information on the Business Unit of the User -To retrieve information on the business unit a user belongs to, send a GET request to the following endpoint: - -[/company-business-units/mine](/docs/scos/dev/glue-api-guides/{{page.version}}/rest-api-reference.html#/company-business-units) - -Request sample: *GET http://glue.mysprykershop.com/company-business-units/mine* - -{% info_block warningBox "Note" %} -You can use the Accept-Language header to specify the locale.Sample header: `[{"key":"Accept-Language","value":"de, en;q=0.9"}]` where **de**, **en** are the locales; **q=0.9** is the user's preference for a specific locale. For details, see [14.4 Accept-Language](https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.4). -{% endinfo_block %} - -#### Response -The endpoint responds with a collection of **RestCompanyBusinessUnitResponse**, each containing information on a specific Business Unit. - -**Response Attributes (for each unit):** - -| Attribute* | Type | Description | -| --- | --- | --- | -| id | String | Specifies a unique identifier of the Business Unit. You can use the identifier to access the unit in the future. | -| name | String | Specifies the name of the Business Unit. | -| email | String | Specifies the email address of the Business Unit. | -| phone | String | Specifies the telephone number of the Business Unit. | -| externalUrl | String | Specifies the URL of the Business Unit's website. | -| bic | String | Specifies the Bank Identifier Code of the Business Unit. | -| iban | String | Specifies the International Bank Account Number of the Business Unit. | -| defaultBillingAddress | String | Specifies the ID of the Business Unit default billing address.For details on how to retrieve the actual address, see section *Retrieving Business Unit Addresses*. | - -*The attributes mentioned are all attributes in the response. Type is not mentioned. - -**Sample Response** - -```json -{ - "data": [ - { - "type": "company-business-units", - "id": "5a6032dc-fbce-5d0d-9d57-11ade1947bac", - "attributes": { - "name": "Cleaning Mitte", - "email": "Cleaning.Mitte@spryker.com", - "phone": "12345617", - "externalUrl": "", - "bic": "", - "iban": "", - "defaultBillingAddress": null - }, - "links": { - "self": "http://glue.mysprykershop.com/company-business-units/5a6032dc-fbce-5d0d-9d57-11ade1947bac" - } - } - ], - "links": { - "self": "http://glue.mysprykershop.com/company-business-units/mine" - } -} -``` - -### Information on Specific Business Unit -To retrieve information on a specific Business Unit, send a GET request to the following endpoint: - -[/company-business-units/{% raw %}{{{% endraw %}business_unit_id{% raw %}}}{% endraw %}](/docs/scos/dev/glue-api-guides/{{page.version}}/rest-api-reference.html#/company-business-units) - -Request sample: *GET http://glue.mysprykershop.com/company-business-units/**b8a06475-73f5-575a-b1e9-1954de7a49ef*** -where **b8a06475-73f5-575a-b1e9-1954de7a49ef** is the ID of the Business Unit you need. - -{% info_block infoBox "Info" %} -The endpoint provides information only on the business units a user has access to. If a request is made against a unit a user is not allowed to view, the endpoint responds with a **404 Not Found** error code. -{% endinfo_block %} - -{% info_block warningBox "Note" %} -You can use the Accept-Language header to specify the locale.Sample header: `[{"key":"Accept-Language","value":"de, en;q=0.9"}]` where **de**, **en** are the locales; **q=0.9** is the user's preference for a specific locale. For details, see [14.4 Accept-Language](https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.4). -{% endinfo_block %} - -#### Response -The endpoint returns a **RestCompanyBusinessUnitResponse** containing information on the requested unit. - -**Response Attributes:** - -| Attribute* | Type | Description | -| --- | --- | --- | -| name | String | Specifies the name of the Business Unit. | -| email | String | Specifies the email address of the Business Unit. | -| phone | String | Specifies the telephone number of the Business Unit. | -| externalUrl | String | Specifies the URL of the Business Unit's website. | -| bic | String | Specifies the Bank Identifier Code of the Business Unit. | -| iban | String | Specifies the International Bank Account Number of the Business Unit. | -| defaultBillingAddress | String | Specifies the ID of the Business Unit default billing address. For details on how to retrieve the actual address, see section *Retrieving Business Unit Addresses*. | - -*The attributes mentioned are all attributes in the response. Type and ID are not mentioned. - -**Sample Response** - -```json -{ - "data": { - "type": "company-business-units", - "id": "b8a06475-73f5-575a-b1e9-1954de7a49ef", - "attributes": { - "name": "Hotel Tommy Berlin", - "email": "hotel.tommy@spryker.com", - "phone": "+49 (30) 1234 56789", - "externalUrl": "", - "bic": "OSDD DE 81 005", - "iban": "DE 91 10000000 0123456789", - "defaultBillingAddress": null - }, - "links": { - "self": "http://glue.mysprykershop.com/company-business-units/b8a06475-73f5-575a-b1e9-1954de7a49ef" - } - } -} -``` - -### Fetching Additional Information -This endpoint allows you not only to retrieve the Business Unit information, but also the addresses registered for it, as well as the company where the unit is located. To do so, you need to include the companies and company-business-unit-addresses resource relationships in the response of the endpoint. - -Request sample to include companies: *GET http://glue.mysprykershop.com/company-business-units/32b44d30-3c2d-5f0a-91d3-e66adad10dc1?include=companies* - -The response will include the following additional attributes: - -| Resource | Attribute* | Type | Description | -| --- | --- | --- | --- | -| companies | name | String | Specifies the Company name. | -| companies | isActive | Boolean | Indicates whether the Company is active. | -| companies | status | String | Specifies the status of the Company. Possible values: *Pending*, *Approved* or *Denied*. | - -*The attributes mentioned are all attributes in the response. Type and ID are not mentioned. - -**Sample Response** - -```json -{ - "data": { - "type": "company-business-units", - "id": "32b44d30-3c2d-5f0a-91d3-e66adad10dc1", - "attributes": {...}, - "links": {...}, - "relationships": { - "companies": { - "data": [ - { - "type": "companies", - "id": "0818f408-cc84-575d-ad54-92118a0e4273" - } - ] - } - } - }, - "included": [ - { - "type": "companies", - "id": "0818f408-cc84-575d-ad54-92118a0e4273", - "attributes": { - "isActive": true, - "name": "Test Company", - "status": "approved" - }, - "links": { - "self": "http://glue.mysprykershop.com/companies/0818f408-cc84-575d-ad54-92118a0e4273" - } - } - ] -} -``` - -Request sample to include Business Unit addresses: *GET http://glue.mysprykershop.com/company-business-units/32b44d30-3c2d-5f0a-91d3-e66adad10dc1?include=company-business-unit-addresses* - -The response will include the following additional attributes: - -| Resource | Attribute* | Type | Description | -| --- | --- | --- | --- | -| company-business-unit-addresses | address1 | String | Specifies the 1st line of the Business Unit address. | -| company-business-unit-addresses | address2 | String | Specifies the 2nd line of the Business Unit address. | -| company-business-unit-addresses | address3 | String | Specifies the 3rd line of the Business Unit address. | -| company-business-unit-addresses | zipCode | String | Specifies the ZIP code. | -| company-business-unit-addresses | city | String | Specifies the city. | -| company-business-unit-addresses | phone | String | Specifies the phone number of the Business Unit. | -| company-business-unit-addresses | iso2Code | String | Specifies an ISO 2 Country Code to use. | -| company-business-unit-addresses | comment | String | Specifies an optional comment to the Business Unit. | - -*The attributes mentioned are all attributes in the response. Type and ID are not mentioned. - -**Sample Response** - -```json -{ - "data": { - "type": "company-business-units", - "id": "32b44d30-3c2d-5f0a-91d3-e66adad10dc1", - "attributes": {...}, - "links": {...}, - "relationships": { - "company-business-unit-addresses": { - "data": [ - { - "type": "company-business-unit-addresses", - "id": "19a55c0d-7bf0-580c-a9e8-6edacdc1ecde" - } - ] - } - } - }, - "included": [ - { - "type": "company-business-unit-addresses", - "id": "19a55c0d-7bf0-580c-a9e8-6edacdc1ecde", - "attributes": { - "address1": "Kirncher Str.", - "address2": "7", - "address3": "", - "zipCode": "10247", - "city": "Berlin", - "phone": "4902890031", - "iso2Code": "DE", - "comment": "" - }, - "links": { - "self": "http://glue.mysprykershop.com/company-business-unit-addresses/19a55c0d-7bf0-580c-a9e8-6edacdc1ecde" - } - } - ] -} -``` - -### Possible Errors - -| Status | Reason | -| --- | --- | -| 401 | The access token is invalid. | -| 403 | The access token is missing.
    - OR -
    The current Company Account is not set.
    This can occur if you didn't properly impersonate the user as a Company User Account. For details on how to do so, see [Logging In as Company User](/docs/scos/dev/glue-api-guides/{{page.version}}/managing-b2b-account/authenticating-as-a-company-user.html).| -| 404 | The specified Business Unit was not found or the user does not have access to it. | - -## Retrieving Business Unit Addresses -To retrieve a Business Unit address, send a GET request to the following endpoint: - -[/company-business-unit-addresses/{% raw %}{{{% endraw %}address_id{% raw %}}}{% endraw %}](/docs/scos/dev/glue-api-guides/{{page.version}}/rest-api-reference.html#/company-business-unit-addresses) - -Request sample: *GET http://glue.mysprykershop.com/company-business-unit-addresses/**eec036ee-b999-5753-a7dd-8d0710a2312f*** -where **eec036ee-b999-5753-a7dd-8d0710a2312f** is the ID of the Business Unit Address you need. - -{% info_block warningBox "Note" %} -You can use the Accept-Language header to specify the locale.Sample header: `[{"key":"Accept-Language","value":"de, en;q=0.9"}]` where **de**, **en** are the locales; **q=0.9** is the user's preference for a specific locale. For details, see [14.4 Accept-Language](https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.4). -{% endinfo_block %} - -### Response -The endpoint responds with a **RestCompanyBusinessUnitAddressResponse** that contains the requested address. - -**Response Attributes:** - -| Attribute* | Type | Description | -| --- | --- | --- | -| address1 | String | Specifies the 1st line of the Business Unit address. | -| address2 | String | Specifies the 2nd line of the Business Unit address. | -| address3 | String | Specifies the 3rd line of the Business Unit address. | -| zipCode | String | Specifies the ZIP code. | -| city | String | Specifies the city. | -| phone | String | Specifies the phone number of the Business Unit. | -| iso2Code | String | Specifies an ISO 2 Country Code to use. | -| comment | String | Specifies an optional comment to the Business Unit. | - -*The attributes mentioned are all attributes in the response. Type and ID are not mentioned. - -**Sample Response** - -```json -{ - "data": { - "type": "company-business-unit-addresses", - "id": "eec036ee-b999-5753-a7dd-8d0710a2312f", - "attributes": { - "address1": "Seeburger Str.", - "address2": "270", - "address3": "Block A 3 floor", - "zipCode": "10115", - "city": "Berlin", - "phone": "4908892455", - "iso2Code": null, - "comment": "" - }, - "links": { - "self": "http://glue.mysprykershop.com/company-business-unit-addresses/eec036ee-b999-5753-a7dd-8d0710a2312f" - } - } -} -``` - -### Possible Errors - -| Status | Reason | -| --- | --- | -| 401 | The access token is invalid. | -| 403 | The access token is missing.
    - OR -
    The current Company Account is not set.
    This can occur if you didn't properly impersonate the user as a Company User Account. For details on how to do so, see [Logging In as Company User](/docs/scos/dev/glue-api-guides/{{page.version}}/managing-b2b-account/authenticating-as-a-company-user.html).| -| 404 | The specified Business Unit was not found or the user does not have access to it. | diff --git a/docs/scos/dev/glue-api-guides/202005.0/managing-b2b-account/retrieving-companies.md b/docs/scos/dev/glue-api-guides/202005.0/managing-b2b-account/retrieving-companies.md deleted file mode 100644 index 9ce6c9560d8..00000000000 --- a/docs/scos/dev/glue-api-guides/202005.0/managing-b2b-account/retrieving-companies.md +++ /dev/null @@ -1,151 +0,0 @@ ---- -title: Retrieving Company Information -description: The article describes how to leverage endpoints provided by Spryker Glue API to retrieve company information. -last_updated: Sep 14, 2020 -template: glue-api-storefront-guide-template -originalLink: https://documentation.spryker.com/v5/docs/retrieving-company-information-201907 -originalArticleId: c919a004-8d7f-4573-9014-73949cf1eb8f -related: - - title: Logging In as Company User - link: docs/scos/dev/glue-api-guides/page.version/managing-b2b-account/authenticating-as-a-company-user.html - - title: Retrieving Company User Information - link: docs/scos/dev/glue-api-guides/page.version/managing-b2b-account/retrieving-company-users.html - - title: Retrieving Business Unit Information - link: docs/scos/dev/glue-api-guides/page.version/managing-b2b-account/retrieving-business-units.html - - title: Retrieving Company Role Information - link: docs/scos/dev/glue-api-guides/page.version/managing-b2b-account/retrieving-company-roles.html - - title: Authentication and Authorization - link: docs/scos/dev/glue-api-guides/page.version/managing-customers/authenticating-as-a-customer.html - - title: Company Account and General Organizational Structure - link: docs/scos/user/features/page.version/company-account-feature-overview/company-accounts-overview.html -redirect_from: - - /v5/docs/retrieving-company-information-201907 - - /v5/docs/en/retrieving-company-information-201907 - - /docs/scos/dev/glue-api-guides/202005.0/managing-b2b-account/retrieving-companies.html ---- - -Spryker provides the [Company Account](/docs/scos/user/features/{{page.version}}/company-account-feature-overview/company-accounts-overview.html) feature that allows purchasing goods and performing other actions on behalf of a user's company. The endpoints provided by the Company API allow retrieving information on companies. - -{% info_block warningBox "Authentication" %} - -The endpoints provided by this API cannot be accessed anonymously. To access them, you need to impersonate users as Company Accounts and pass the authentication tokens received. For details on how to authenticate and retrieve such a token, see [Logging In as Company User](/docs/scos/dev/glue-api-guides/{{page.version}}/managing-b2b-account/authenticating-as-a-company-user.html). - -{% endinfo_block %} - -In your development, the API can help you to provide information on the company that the authenticated user belongs to. - -## Installation -For detailed information on the modules that provide the API functionality and related installation instructions, see [Glue API: Company Account Feature Integration](/docs/scos/dev/feature-integration-guides/{{page.version}}/glue-api/glue-api-company-account-feature-integration.html). - -## Retrieving Company Information -### Information on the User's Company -To retrieve information on the company a user belongs to, send a GET request to the following endpoint: - -/companies/mine - -Request sample: *GET http://glue.mysprykershop.com/companies/mine* - -{% info_block warningBox "Note" %} - -You can use the Accept-Language header to specify the locale.Sample header: [{"key":"Accept-Language","value":"de, en;q=0.9"}]where de, en are the locales; q=0.9 is the user's preference for a specific locale. For details, see [14.4 Accept-Language](https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.4). - -{% endinfo_block %} - -#### Response - -The endpoint responds with a collection of **RestCompanyResponse** consisting of a single item that represents the user's company. - -**Response Attributes:** - -| Attribute* | Type | Description | -| --- | --- | --- | -| name | String | Specifies the name of the Company. | -| isActive | Boolean | Indicates whether the Company is active. | -| status | String | Specifies the status of the Company. Possible values: *Pending*, *Approved*, or *Denied*. | - -*The attributes mentioned are all attributes in the response. Type and ID are not mentioned. - -**Sample Response** - -```json -{ - "data": [ - { - "type": "companies", - "id": "88efe8fb-98bd-5423-a041-a8f866c0f913", - "attributes": { - "isActive": true, - "name": "BoB-Hotel Mitte", - "status": "approved" - }, - "links": { - "self": "http://glue.mysprykershop.com/companies/88efe8fb-98bd-5423-a041-a8f866c0f913" - } - } - ], - "links": { - "self": "http://glue.mysprykershop.com/companies/mine" - } -} -``` - -### Information on a Specific Company - -To retrieve information on a specific company, send a GET request to the following endpoint: - -/companies/{% raw %}{{{% endraw %}company_id{% raw %}}}{% endraw %} - -Request sample: *GET http://glue.mysprykershop.com/companies/**59b6c025-cc00-54ca-b101-191391adf2af*** -where **59b6c025-cc00-54ca-b101-191391adf2af** is the ID of the company you need. - -{% info_block infoBox "Info" %} - -The endpoint provides information only on the companies a user has access to. If an attempt is made to access a company that a user doesn't have access to, the endpoint will respond with a **404 Not Found** error code. - -{% endinfo_block %} - -{% info_block warningBox "Note" %} - -You can use the Accept-Language header to specify the locale.Sample header: [{"key":"Accept-Language","value":"de, en;q=0.9"}]where de, en are the locales; q=0.9 is the user's preference for a specific locale. For details, see [14.4 Accept-Language](https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.4). - -{% endinfo_block %} - -#### Response -The endpoint responds with a **RestCompanyResponse** containing information on the requested company. - -**Response Attributes:** - -| Attribute* | Type | Description | -| --- | --- | --- | -| name | String | Specifies the name of the Company. | -| isActive | Boolean | Indicates whether the Company is active. | -| status | String | Specifies the status of the Company. Possible values: *Pending*, *Approved*, or *Denied*. | - -*The attributes mentioned are all attributes in the response. Type and ID are not mentioned. - -**Sample Response** - -```json -{ - "data": { - "type": "companies", - "id": "59b6c025-cc00-54ca-b101-191391adf2af", - "attributes": { - "isActive": true, - "name": "BoB-Hotel Jim", - "status": "approved" - }, - "links": { - "self": "http://glue.mysprykershop.com/companies/59b6c025-cc00-54ca-b101-191391adf2af" - } - } -} -``` - -### Possible Errors - -| Code | Reason | -| --- | --- | -| 401 | The access token is invalid. | -| 403 | The access token is missing.
    - OR -
    The current Company Account is not set.
    This can occur if you didn't properly impersonate the user as a Company User Account. For details on how to do so, see [Logging In as Company User](/docs/scos/dev/glue-api-guides/{{page.version}}/managing-b2b-account/authenticating-as-a-company-user.html). | -| 404 | The specified company was not found, or the user does not have access to it. | diff --git a/docs/scos/dev/glue-api-guides/202005.0/managing-b2b-account/retrieving-company-roles.md b/docs/scos/dev/glue-api-guides/202005.0/managing-b2b-account/retrieving-company-roles.md deleted file mode 100644 index 66f46cd054f..00000000000 --- a/docs/scos/dev/glue-api-guides/202005.0/managing-b2b-account/retrieving-company-roles.md +++ /dev/null @@ -1,187 +0,0 @@ ---- -title: Retrieving Company Role Information -description: The article describes how to use Spryker Glue API to retrieve company roles. -last_updated: Sep 15, 2020 -template: glue-api-storefront-guide-template -originalLink: https://documentation.spryker.com/v5/docs/retrieving-company-role-information-201907 -originalArticleId: 722b3bc5-1ec4-4b5a-aa11-9b26373bdfa0 -redirect_from: - - /v5/docs/retrieving-company-role-information-201907 - - /v5/docs/en/retrieving-company-role-information-201907 -related: - - title: Logging In as Company User - link: docs/scos/dev/glue-api-guides/page.version/managing-b2b-account/authenticating-as-a-company-user.html - - title: Retrieving Company Information - link: docs/scos/dev/glue-api-guides/page.version/managing-b2b-account/retrieving-companies.html - - title: Retrieving Company User Information - link: docs/scos/dev/glue-api-guides/page.version/managing-b2b-account/retrieving-company-users.html - - title: Company User Roles and Permissions Feature Overview - link: docs/scos/user/features/page.version/company-account-feature-overview/company-user-roles-and-permissions-overview.html - - title: Authentication and Authorization - link: docs/scos/dev/glue-api-guides/page.version/managing-customers/authenticating-as-a-customer.html ---- - -In corporate environments, where users act as company representatives rather than private buyers, companies can leverage [Company Roles](/docs/scos/user/features/{{page.version}}/company-account-feature-overview/company-user-roles-and-permissions-overview.html) in order to distribute scopes and permissions among [Company Users](/docs/scos/user/features/{{page.version}}/company-account-feature-overview/company-accounts-overview.html). To identify which roles company users are assigned to, you can use the endpoints provided by the **Company Role API**. - -{% info_block warningBox "Authentication" %} -The endpoints provided by this API cannot be accessed anonymously. To access them, you need to impersonate users as **Company Accounts** and pass the authentication tokens received. For details on how to authenticate and retrieve such a token, see [Logging In as Company User](/docs/scos/dev/glue-api-guides/{{page.version}}/managing-b2b-account/authenticating-as-a-company-user.html). -{% endinfo_block %} - -In your development, the endpoint can help you to identify the roles existing in the company of the currently logged in user. - -## Installation -For detailed information on the modules that provide the API functionality and related installation instructions, see [Glue API: Company Account Feature Integration](/docs/scos/dev/feature-integration-guides/{{page.version}}/company-account-feature-integration.html). - -## Retrieving Company Role Information -### Roles Performed by the Current User -To retrieve information on the Company Roles assigned to the currently logged in Company User, send a GET request to the following endpoint: - -/company-roles/mine - -Request sample: *GET http://glue.mysprykershop.com/company-roles/mine* - -{% info_block warningBox "Note" %} -You can use the **Accept-Language** header to specify the locale.Sample header: `[{"key":"Accept-Language","value":"de, en;q=0.9"}]` where **de**, **en** are the locales; **q=0.9** is the user's preference for a specific locale. For details, see [14.4 Accept-Language](https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.4). -{% endinfo_block %} - -#### Response -The endpoint responds with a collection of **RestCompanyRoleResponse**, each containing information on a specific role. - -**Response Attributes:** - -| Attribute* | Type | Specifies the name of the Company Role. | -| --- | --- | --- | -| name | String | cell | -| isDefault | Boolean | Indicates whether the Company Role is the default role for the company. | - -*The attributes mentioned are all attributes in the response. Type and ID are not mentioned. - -**Sample Response** - -```json -{ - "data": [ - { - "type": "company-roles", - "id": "2f0a9d3e-9e69-53eb-8518-284a0db04376", - "attributes": { - "name": "Admin", - "isDefault": true - }, - "links": { - "self": "http://glue.mysprykershop.com/company-roles/2f0a9d3e-9e69-53eb-8518-284a0db04376" - } - } - ], - "links": { - "self": "http://glue.mysprykershop.com/company-roles/mine" - } -} -``` - -### Specific Role -To retrieve information on a specific Company Role, send a GET request to the following endpoint: - -/company-roles/{% raw %}{{{% endraw %}role_id{% raw %}}}{% endraw %} - -Request sample: *GET http://glue.mysprykershop.com/company-roles/**2f0a9d3e-9e69-53eb-8518-284a0db04376*** - -where **2f0a9d3e-9e69-53eb-8518-284a0db04376** is the ID of the Company Role you need. - -{% info_block infoBox "Info" %} -The endpoint provides information only on the roles a user has access to. If a request is made against a role a user is not allowed to view, the endpoint responds with a **404 Not Found** error code. -{% endinfo_block %} - -{% info_block warningBox "Note" %} -You can use the **Accept-Language** header to specify the locale.Sample header: `[{"key":"Accept-Language","value":"de, en;q=0.9"}]` where **de**, **en** are the locales; **q=0.9** is the user's preference for a specific locale. For details, see [14.4 Accept-Language](https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.4). -{% endinfo_block %} - -#### Response -The endpoint responds with a **RestCompanyRoleResponse** that contains information on the requested role. - -**Response Attributes:** - -| Attribute* | Type | Description | -| --- | --- | --- | -| name | String | Specifies the name of the Company Role. | -| isDefault | Boolean | Indicates whether the Company Role is the default role for the company. | - -*The attributes mentioned are all attributes in the response. Type and ID are not mentioned. - -**Sample Response** - -```json -{ - "data": { - "type": "company-roles", - "id": "2f0a9d3e-9e69-53eb-8518-284a0db04376", - "attributes": { - "name": "Admin", - "isDefault": true - }, - "links": { - "self": "http://glue.mysprykershop.com/company-roles/2f0a9d3e-9e69-53eb-8518-284a0db04376" - } - } -} -``` - -### Fetching Additional Information -You can extend the response with the companies resource relationship in order to obtain information on the company where the role was created. - -Request sample: *GET http://glue.mysprykershop.com/company-roles/2f0a9d3e-9e69-53eb-8518-284a0db04376?include=companies* - -The response will include the following additional attributes: - -| Resource | Attribute* | Type | Description | -| --- | --- | --- | --- | -| companies | name | String | Specifies the Company name. | -| companies | isActive | Boolean | Indicates whether the Company is active. | -| companies | status | String | Specifies the status of the Company. Possible values: *Pending*, *Approved* or *Denied*. | - -*The attributes mentioned are all attributes in the response. Type and ID are not mentioned. - -**Sample Response** - -```json -{ - "data": { - "type": "company-roles", - "id": "2f0a9d3e-9e69-53eb-8518-284a0db04376", - "attributes": {...}, - "links": {...}, - "relationships": { - "companies": { - "data": [ - { - "type": "companies", - "id": "0818f408-cc84-575d-ad54-92118a0e4273" - } - ] - } - } - }, - "included": [ - { - "type": "companies", - "id": "0818f408-cc84-575d-ad54-92118a0e4273", - "attributes": { - "isActive": true, - "name": "Test Company", - "status": "approved" - }, - "links": { - "self": "http://glue.mysprykershop.com/companies/0818f408-cc84-575d-ad54-92118a0e4273" - } - } - ] -} -``` - -### Possible Errors - -| Code | Reason | -| --- | --- | -| 401 | The access token is invalid. | -| 403 | The access token is missing.
    - OR -
    The current Company Account is not set.
    This can occur if you didn't properly impersonate the user as a Company User Account. For details on how to do so, see [Logging In as Company User](/docs/scos/dev/glue-api-guides/{{page.version}}/managing-b2b-account/authenticating-as-a-company-user.html). | -| 404 | The specified role was not found or the user does not have access to it. | diff --git a/docs/scos/dev/glue-api-guides/202005.0/managing-b2b-account/retrieving-company-users.md b/docs/scos/dev/glue-api-guides/202005.0/managing-b2b-account/retrieving-company-users.md deleted file mode 100644 index 0e0daed484f..00000000000 --- a/docs/scos/dev/glue-api-guides/202005.0/managing-b2b-account/retrieving-company-users.md +++ /dev/null @@ -1,452 +0,0 @@ ---- -title: Retrieving Company User Information -description: The article provides information on how to retrieve information on company user accounts via endpoints provided by Spryker Glue API. -last_updated: Sep 14, 2020 -template: glue-api-storefront-guide-template -originalLink: https://documentation.spryker.com/v5/docs/retrieving-company-user-information-201907 -originalArticleId: f84a4096-0877-4370-8df2-52ba5b6c4b93 -redirect_from: - - /v5/docs/retrieving-company-user-information-201907 - - /v5/docs/en/retrieving-company-user-information-201907 -related: - - title: Logging In as Company User - link: docs/scos/dev/glue-api-guides/page.version/managing-b2b-account/authenticating-as-a-company-user.html - - title: Retrieving Company Information - link: docs/scos/dev/glue-api-guides/page.version/managing-b2b-account/retrieving-companies.html - - title: Retrieving Company Role Information - link: docs/scos/dev/glue-api-guides/page.version/managing-b2b-account/retrieving-company-roles.html - - title: Retrieving Business Unit Information - link: docs/scos/dev/glue-api-guides/page.version/managing-b2b-account/retrieving-business-units.html - - title: Company Account and General Organizational Structure - link: docs/scos/user/features/page.version/company-account-feature-overview/company-accounts-overview.html ---- - -The [Company Account](/docs/scos/user/features/{{page.version}}/company-account-feature-overview/company-accounts-overview.html) feature provided by Spryker Commerce OS allows corporate customers to create [Company User Accounts](/docs/scos/user/features/{{page.version}}/company-account-feature-overview/company-accounts-overview.html) for their employees. This capability enables customers to organize purchasing activities in their companies. Company Accounts are typically organized in Business Units depending on the job roles they perform. Any user can impersonate as multiple Company Accounts they have access to, which provides them the freedom to organize their work when performing different roles in a company. - -The **Company Accounts API** provides REST access to retrieving Company User information. - -{% info_block warningBox "Authentication" %} -The endpoints provided by this API cannot be accessed anonymously. To access them, you need to impersonate users as Company Accounts and pass the authentication tokens received. For details on how to authenticate and retrieve such a token, see [Logging In as Company User](/docs/scos/dev/glue-api-guides/{{page.version}}/managing-b2b-account/authenticating-as-a-company-user.html). -{% endinfo_block %} - -In your development, the API can help you to provide information on *Company User Accounts* within the company that the authenticated user belongs to. - -## Installation -For detailed information on the modules that provide the API functionality and related installation instructions, see [Glue API: Company Account Feature Integration](/docs/scos/dev/feature-integration-guides/{{page.version}}/glue-api/glue-api-company-account-feature-integration.html). - -## Retrieving All Company Users -To retrieve a list of all the Company Users that belong to the company of the logged in user, send a GET request to the following endpoint: - -/company-users - -Request sample: *GET http://glue.mysprykershop.com/company-users* - -{% info_block warningBox "Authentication Required" %} -To get a list of Company Users, you need to authenticate first and pass an access token as a part of your request. For details, see [Authentication and Authorization](/docs/scos/dev/glue-api-guides/{{page.version}}/authentication-and-authorization.html). -{% endinfo_block %} - -### Response -The endpoint responds with a **RestCompanyUserCollectionResponse** that contains the Company Users in the company of the logged in user. - -**Response Attributes:** - -| Attribute* | Type | Description | -| --- | --- | --- | -| isActive | Boolean | Indicates whether the Company User is active. | -| isDefault | Boolean | Indicates whether the Company User is the default one for the logged in customer. | - -*The attributes mentioned are all attributes in the response. Type and ID are not mentioned. - -
    -Sample Response - -```json -{ - "data": [ - { - "type": "company-users", - "id": "3692d238-acb3-5b7e-8d24-8dab9c1f4505", - "attributes": { - "isActive": true, - "isDefault": false - }, - "links": { - "self": "http://glue.mysprykershop.com/company-users/3692d238-acb3-5b7e-8d24-8dab9c1f4505" - } - }, - { - "type": "company-users", - "id": "4c677a6b-2f65-5645-9bf8-0ef3532bead1", - "attributes": { - "isActive": true, - "isDefault": false - }, - "links": { - "self": "http://glue.mysprykershop.com/company-users/4c677a6b-2f65-5645-9bf8-0ef3532bead1" - } - }, - { - "type": "company-users", - "id": "cfbe2644-a9bd-581b-977b-e72d1c9a9c54", - "attributes": { - "isActive": true, - "isDefault": false - }, - "links": { - "self": "http://glue.mysprykershop.com/company-users/cfbe2644-a9bd-581b-977b-e72d1c9a9c54" - } - }, - { - "type": "company-users", - "id": "e1019900-88c4-5582-af83-2c1ea8775ac5", - "attributes": { - "isActive": true, - "isDefault": false - }, - "links": { - "self": "http://glue.mysprykershop.com/company-users/e1019900-88c4-5582-af83-2c1ea8775ac5" - } - } - ], - "links": { - "self": "http://glue.mysprykershop.com/company-users" - } -} -``` - -
    -
    - -## Retrieving Available Company Users -To retrieve a list of the Company Users that the currently logged in user can impersonate as, send a GET request to the following endpoint: - -/company-users/mine - -Request sample: *GET http://glue.mysprykershop.com/company-users/mine* - -{% info_block warningBox "Authentication Required" %} -To get a list of Company Users, you need to authenticate first and pass an access token as a part of your request. For details, see [Authentication and Authorization](/docs/scos/dev/glue-api-guides/{{page.version}}/authentication-and-authorization.html). -{% endinfo_block %} - -### Response -The endpoint responds with a **RestCompanyUserCollectionResponse** that contains the Company Users available to the currently logged in user. - -{% info_block infoBox "Info" %} -If the currently logged in user does not have access to any Company User accounts, the endpoint returns an empty **RestCompanyUserCollectionResponse** response. -{% endinfo_block %} - -**Response Attributes:** - -| Attribute* | Type | Description | -| --- | --- | --- | -| id | String | Specifies the Company User ID. | -| isActive | Boolean | Indicates whether the Company User is active. | -| isDefault | Boolean | Indicates whether the Company User is the default one for the logged in customer. | - -*The attributes mentioned are all attributes in the response. Type is not mentioned. - -{% info_block warningBox "Note" %} -The company user identifier contained in the id member can be used to access the Company User in the future as well as impersonate as that account. For details, see [Logging In as Company User](/docs/scos/dev/glue-api-guides/{{page.version}}/managing-b2b-account/authenticating-as-a-company-user.html). -{% endinfo_block %} - -
    -Sample Response - -```json -{ - "data": [ - { - "type": "company-users", - "id": "4c677a6b-2f65-5645-9bf8-0ef3532bead1", - "attributes": { - "isActive": true, - "isDefault": false - }, - "links": { - "self": "http://glue.mysprykershop.com/company-users/4c677a6b-2f65-5645-9bf8-0ef3532bead1" - } - }, - { - "type": "company-users", - "id": "cfbe2644-a9bd-581b-977b-e72d1c9a9c54", - "attributes": { - "isActive": true, - "isDefault": false - }, - "links": { - "self": "http://glue.mysprykershop.com/company-users/cfbe2644-a9bd-581b-977b-e72d1c9a9c54" - } - }, - { - "type": "company-users", - "id": "e1019900-88c4-5582-af83-2c1ea8775ac5", - "attributes": { - "isActive": true, - "isDefault": false - }, - "links": { - "self": "http://glue.mysprykershop.com/company-users/e1019900-88c4-5582-af83-2c1ea8775ac5" - } - } - ], - "links": { - "self": "http://glue.mysprykershop.com/company-users/mine" - } -} -``` - -
    -
    - -## Retrieving Specific Company Users -To retrieve information on a specific Company User, send a GET request to the following endpoint: - -/company-users/{% raw %}{{{% endraw %}company_user_id{% raw %}}}{% endraw %} - -Request sample: *GET http://glue.mysprykershop.com/company-users/e1019900-88c4-5582-af83-2c1ea8775ac5* - -{% info_block warningBox "Authentication Required" %} -To get information on a Company User, you need to authenticate first and pass an access token as a part of your request. For details, see [Authentication and Authorization](/docs/scos/dev/glue-api-guides/{{page.version}}/authentication-and-authorization.html). -{% endinfo_block %} - -### Response -The endpoint responds with a **RestCompanyUserResponse** that contains information on the requested Company User. - -{% info_block infoBox "Info" %} -If the currently logged in user does not have access to the specified Company User account, the endpoint responds with the **404 Not Found** status code. -{% endinfo_block %} - -**Response Attributes:** - -| Attribute* | Type | Description | -| --- | --- | --- | -| isActive | Boolean | Indicates whether the Company User is active. | -| isDefault | Boolean | Indicates whether the Company User is the default one for the logged in customer. | - -*The attributes mentioned are all attributes in the response. Type is not mentioned. - -
    -Sample Response - -```json -{ - "data": { - "type": "company-users", - "id": "e1019900-88c4-5582-af83-2c1ea8775ac5", - "attributes": { - "isActive": true, - "isDefault": false - }, - "links": { - "self": "http://glue.mysprykershop.com/company-users/e1019900-88c4-5582-af83-2c1ea8775ac5" - } - } -} -``` - -
    -
    - -## Fetching Additional Information -To help customers understand which of the Company User Accounts they need, you can provide additional information, such as the company and business unit that each account belongs to. Also, you can identify which roles the corporate accounts can perform within the company. To fetch such information, extend the response of the endpoint with the companies and company-business-units, and company-roles resource relationships. - -Request sample: *GET http://glue.mysprykershop.com/company-users/mine?**include=companies,company-business-units,company-roles*** - -In this case, the following additional attributes will be added to the response: - -| Resource | Attribute* | Type | Description | -| --- | --- | --- | --- | -| companies | name | String | Specifies the name of the Company. | -| companies | isActive | Boolean | Indicates whether the Company is active. | -| companies | status | String | Specifies the status of the Company. Possible values: *Pending*, *Approved* or *Denied*. | -| company-roles | name | String | Specifies the name of the Company Role. | -| company-roles | isDefault | Boolean | Indicates whether the Company Role is the default role for the company. | -| company-business-units | name | String | Specifies the name of the Business Unit. | -| company-business-units | email | String | Specifies the email address of the Business Unit. | -| company-business-units | phone | String | Specifies the telephone number of the Business Unit. | -| company-business-units | externalUrl | String | Specifies the url of the website of the Business Unit. | -| company-business-units | bic | String | Specifies the Bank Identifier Code of the Business Unit. | -| company-business-units | iban | String | Specifies the International Bank Account Number of the Business Unit. | -| company-business-units | defaultBillingAddress | String | Specifies the default billing address of the Business Unit. | - -*The attributes mentioned are all attributes in the response. Type and ID are not mentioned. - -
    -Sample Response - -```json -{ - "data": [ - { - "type": "company-users", - "id": "4c677a6b-2f65-5645-9bf8-0ef3532bead1", - "attributes": {...}, - "links": {...}, - "relationships": { - "companies": { - "data": [ - { - "type": "companies", - "id": "88efe8fb-98bd-5423-a041-a8f866c0f913" - } - ] - }, - "company-business-units": { - "data": [ - { - "type": "company-business-units", - "id": "b2ea10b2-263a-5cd9-88dc-747309f0534a" - } - ] - }, - "company-roles": { - "data": [ - { - "type": "company-roles", - "id": "50c647a4-d27f-5d82-a587-1d0b7cc6b58d" - } - ] - } - } - }, - { - "type": "company-users", - "id": "cfbe2644-a9bd-581b-977b-e72d1c9a9c54", - "attributes": { - "isActive": true, - "isDefault": false - }, - "links": { - "self": "http://glue.mysprykershop.com/company-users/cfbe2644-a9bd-581b-977b-e72d1c9a9c54?include=companies,company-business-units" - }, - "relationships": { - "companies": { - "data": [ - { - "type": "companies", - "id": "88efe8fb-98bd-5423-a041-a8f866c0f913" - } - ] - }, - "company-business-units": { - "data": [ - { - "type": "company-business-units", - "id": "35752ce6-e25f-5d04-8bef-d46b2c359695" - } - ] - } - } - }, - { - "type": "company-users", - "id": "e1019900-88c4-5582-af83-2c1ea8775ac5", - "attributes": {...}, - "links": {...}, - "relationships": { - "companies": { - "data": [ - { - "type": "companies", - "id": "88efe8fb-98bd-5423-a041-a8f866c0f913" - } - ] - }, - "company-business-units": { - "data": [ - { - "type": "company-business-units", - "id": "5a6032dc-fbce-5d0d-9d57-11ade1947bac" - } - ] - } - } - } - ], - "links": {...}, - "included": [ - { - "type": "companies", - "id": "88efe8fb-98bd-5423-a041-a8f866c0f913", - "attributes": { - "isActive": true, - "name": "BoB-Hotel Mitte", - "status": "approved" - }, - "links": { - "self": "http://glue.mysprykershop.com/companies/88efe8fb-98bd-5423-a041-a8f866c0f913" - } - }, - { - "type": "company-business-units", - "id": "b2ea10b2-263a-5cd9-88dc-747309f0534a", - "attributes": { - "name": "Hotel Mitte", - "email": "Hotel.Mitte@spryker.com", - "phone": "12345617", - "externalUrl": "", - "bic": "", - "iban": "", - "defaultBillingAddress": null - }, - "links": { - "self": "http://glue.mysprykershop.com/b2ea10b2-263a-5cd9-88dc-747309f0534a" - } - }, - { - "type": "company-business-units", - "id": "35752ce6-e25f-5d04-8bef-d46b2c359695", - "attributes": { - "name": "Service Mitte", - "email": "Service.Mitte@spryker.com", - "phone": "12345617", - "externalUrl": "", - "bic": "", - "iban": "", - "defaultBillingAddress": null - }, - "links": { - "self": "http://glue.mysprykershop.com/company-business-units/35752ce6-e25f-5d04-8bef-d46b2c359695" - } - }, - { - "type": "company-business-units", - "id": "5a6032dc-fbce-5d0d-9d57-11ade1947bac", - "attributes": { - "name": "Cleaning Mitte", - "email": "Cleaning.Mitte@spryker.com", - "phone": "12345617", - "externalUrl": "", - "bic": "", - "iban": "", - "defaultBillingAddress": null - }, - "links": { - "self": "http://glue.mysprykershop.com/company-business-units/5a6032dc-fbce-5d0d-9d57-11ade1947bac" - } - }, - { - "type": "company-roles", - "id": "50c647a4-d27f-5d82-a587-1d0b7cc6b58d", - "attributes": { - "name": "Buyer", - "isDefault": true - }, - "links": { - "self": "http://glue.mysprykershop.com/company-roles/50c647a4-d27f-5d82-a587-1d0b7cc6b58d" - } - } - ] -} -``` - -
    -
    - -### Possible Errors - -| Status | Reason | -| --- | --- | -| 401 | The access token is invalid. | -| 403 | The access token is missing.
    - OR -
    The current Company Account is not set.
    This can occur if you didn't properly impersonate the user as a Company User Account. For details on how to do so, see [Logging In as Company User](/docs/scos/dev/glue-api-guides/{{page.version}}/managing-b2b-account/authenticating-as-a-company-user.html). | -| 404 | The specified Company User was not found or the user does not have permissions to view the account. | diff --git a/docs/scos/dev/glue-api-guides/202005.0/managing-carts/carts-of-registered-users/managing-carts-of-registered-users.md b/docs/scos/dev/glue-api-guides/202005.0/managing-carts/carts-of-registered-users/managing-carts-of-registered-users.md deleted file mode 100644 index 6435ca6b8c5..00000000000 --- a/docs/scos/dev/glue-api-guides/202005.0/managing-carts/carts-of-registered-users/managing-carts-of-registered-users.md +++ /dev/null @@ -1,2111 +0,0 @@ ---- -title: Managing Carts of Registered Users -description: This article describes the endpoints that provide access to shopping carts management functionality for the carts of the registered users. -last_updated: Sep 15, 2020 -template: glue-api-storefront-guide-template -originalLink: https://documentation.spryker.com/v5/docs/managing-carts-of-registered-users -originalArticleId: 9f6b9b11-3875-4241-85fa-ac02fbe45ca5 -redirect_from: - - /v5/docs/managing-carts-of-registered-users - - /v5/docs/en/managing-carts-of-registered-users - - /docs/marketplace/dev/glue-api-guides/202005.0/carts-of-registered-users/managing-carts-of-registered-users.html -related: - - title: Managing Guest Carts - link: docs/scos/dev/glue-api-guides/page.version/managing-carts/guest-carts/managing-guest-carts.html - - title: Sharing Company User Carts - link: docs/scos/dev/glue-api-guides/page.version/managing-carts/sharing-company-user-carts/sharing-company-user-carts.html - - title: Logging In as Company User - link: docs/scos/dev/glue-api-guides/page.version/managing-b2b-account/authenticating-as-a-company-user.html - - title: Multiple Carts feature integration - link: docs/scos/dev/feature-integration-guides/page.version/multiple-carts-feature-integration.html - - title: Shared Cart Feature Overview - link: docs/scos/user/features/page.version/shared-carts-feature-overview.html - - title: Shopping Cart Widget Feature Overview - link: docs/scos/user/features/page.version/cart-feature-overview/cart-widget-overview.html ---- - -The **Carts API** provides access to management of customers' shopping carts. Carts come in two different forms: carts for registered customers and carts for guests. In your development, the resources provided by the API can support you in the development of shopping cart functionality. - -{% info_block infoBox "Cart types" %} - -The following document covers the APIs for carts for **registered customers** only. If you want to know how to access carts of unregistered users, see [Managing Guest Carts](/docs/scos/dev/glue-api-guides/{{page.version}}/managing-carts/guest-carts/managing-guest-carts.html). - -{% endinfo_block %} - -## Multiple Carts - -Unlike guest carts, carts of registered users have unlimited lifetime. Also, if the Multiple Carts feature is [integrated into your project](/docs/scos/dev/feature-integration-guides/{{page.version}}/multiple-carts-feature-integration.html) and Glue is [enabled for multi-cart operations](/docs/scos/dev/feature-integration-guides/{{page.version}}/multiple-carts-feature-integration.html), registered users can have unlimited number of carts. - -## Owned and Shared Carts -Registered users can [share carts](/docs/scos/user/features/{{page.version}}/shared-carts-feature-overview.html) they own. Thus, a registered user can access both their personal carts and carts shared with them by other users. This feature allows company users to collaborate on company purchases as a team. -To be able to share carts, as well as access carts shared with them, customers need to authenticate as **Company User Accounts**. Each such account is a member of a certain Business Unit, and carts can be shared only among members of the same Unit. On the other hand, customers have the ability to impersonate as different Company Accounts depending on the job tasks they want to perform. Such accounts can belong to different Business Units, which means that any specific customer can have access to a different set of shared carts depending on the Company Account they impersonate as. - -To use a Company Account, a customer needs to retrieve a bearer token for the account. The token is valid for a specific combination of an authenticated user and Company Account. It provides access to: -* carts owned by the user -* carts shared with the Company Account. - -{% info_block infoBox "Authentication" %} - -For details on how to receive the token, see [Logging In as Company User](/docs/scos/dev/glue-api-guides/{{page.version}}/managing-b2b-account/authenticating-as-a-company-user.html). - -{% endinfo_block %} - -To be able to access shared carts, the API client needs to access the endpoints provided by the Carts API using the token received when impersonating as the Company Account. Doing so provides access to management of both the user's own carts and the carts shared with the current Company Account based on the bearer token presented. - -Shared carts can be accessed and manipulated the same as regular carts. The only difference is that the list of actions that a user can perform on a shared cart depends on the permissions granted to them. - -By default, there are 2 levels of permissions for shared carts: **read-only** and **full access**. If a user attempts to perform an unauthorized action on a shared cart, the API will respond with the **403 Forbidden** status code. - -{% info_block infoBox "Info" %} - -For more details, see [Retrieving Cart Permission Groups](/docs/scos/dev/glue-api-guides/{{page.version}}/managing-carts/sharing-company-user-carts/retrieving-cart-permission-groups.html) - -{% endinfo_block %} - -To distinguish whether a specific cart is owned by a user directly or shared with them, you need to extend the responses of the endpoints with the **cart-permission-groups** resource relationship.. If a cart is shared with the user, it will contain the relationship, while if a cart is owned by the user directly, the relationship will not be present. - - -{% info_block infoBox "Info" %} - -For more details, see section *Retrieving Cart Permission Groups* in [Sharing Company User Carts](/docs/scos/dev/glue-api-guides/{{page.version}}/managing-carts/sharing-company-user-carts/retrieving-cart-permission-groups.html). - -{% endinfo_block %} - - -## Installation -For detailed information on the modules that provide the API functionality and related installation instructions, see: -* [Carts API](/docs/scos/dev/feature-integration-guides/{{page.version}}/glue-api/glue-api-cart-feature-integration.html) -* [Glue API: Measurement Units Feature Integration](/docs/scos/dev/feature-integration-guides/{{page.version}}/glue-api/glue-api-measurement-units-feature-integration.html) -* [Promotions & Discounts API](/docs/scos/dev/feature-integration-guides/{{page.version}}/glue-api/glue-api-promotions-and-discounts-feature-integration.html) - - -## Creating Carts -To create a cart, send the request: - ---- -`POST` **/carts** - ---- - - -{% info_block infoBox %} - - -* To use this endpoint, customers need to authenticate. For details, see [Authentication and Authorization](/docs/scos/dev/glue-api-guides/{{page.version}}/authentication-and-authorization.html). -* Carts created via Glue API are always set as the default carts for the user. - - -{% endinfo_block %} - -### Request -Request sample: `POST http://glue.mysprykershop.com/carts` -```json -{ - "data":{ - "type":"carts", - "attributes":{ - "name":"My Cart", - "priceMode":"GROSS_MODE", - "currency":"EUR", - "store":"DE" - } - } -} -``` - -| Attribute | Type | Required | Description | -| --- | --- | --- | --- | -| name | String | v | Sets the cart name.
    This field can be set only if you are using the multiple carts feature. If you are operating in a single-cart environment, an attempt to set the value will result in an error with the **422 Unprocessable Entry** status code. | -| priceMode | Enum | v | Sets the price mode to be used for the cart. Possible values:
    • GROSS_MODE - prices after tax;
    • NET_MODE - prices before tax.
    For details, see [Net & Gross Prices](/docs/scos/user/features/{{page.version}}/prices-feature-overview/prices-feature-overview.html). | -| currency | String | v | Sets the cart currency. | -| store | String | v | Sets the name of the store where to create the cart. | - - - -### Response -Response sample: -```json -{ - "data": [ - { - "type": "carts", - "id": "f23f5cfa-7fde-5706-aefb-ac6c6bbadeab", - "attributes": { - "priceMode": "GROSS_MODE", - "currency": "EUR", - "store": "DE", - "discounts": [], - "totals": { - "expenseTotal": null, - "discountTotal": null, - "taxTotal": null, - "subtotal": null, - "grandTotal": null - }, - "name": "My Cart", - "isDefault": true - }, - "links": { - "self": "http://glue.mysprykershop.com/carts/f23f5cfa-7fde-5706-aefb-ac6c6bbadeab" - } - } - ] -} -``` - -**General Cart Information** -| Attribute* | Type | Description | -| --- | --- | --- | -| name | String | Specifies a cart name.
    The field is available in multi-cart environments only. | -| isDefault | Boolean | Specifies whether the cart is the default one for the customer.
    The field is available in multi-cart environments only. | -| priceMode | String | Price mode that was active when the cart was created. | -| currency | String | Currency that was selected whenthe cart was created. | -| store | String | Store for which the cart was created. | - -**Discount Information** -| Attribute* | Type | Description | -| --- | --- | --- | -| displayName | String | Discount name. | -| amount | Integer | Discount amount applied to the cart. | -| code | String | Discount code applied to the cart. | - -**Totals** -| Attribute* | Type | Description | -| --- | --- | --- | -| expenseTotal | Integer | Total amount of expenses (including e.g. shipping costs). | -| discountTotal | Integer | Total amount of discounts applied to the cart. | -| taxTotal | Integer | Total amount of taxes to be paid. | -| subTotal | Integer | Subtotal of the cart. | -| grandTotal | Integer | Grand total of the cart. | - -/* Type and ID attributes are not mentioned. - - -## Retrieving Carts -You can retrieve all available carts or a single cart with a cart ID. - -### Retrieve All Carts - -To retrieve all available carts, send the request: - - ---- -`GET` **/carts** - ---- - -{% info_block infoBox "Authentication" %} - -To use this endpoint, customers need to authenticate. For details, see [Authentication and Authorization](/docs/scos/dev/glue-api-guides/{{page.version}}/authentication-and-authorization.html). - -{% endinfo_block %} - -#### Request - - -| Request | Usage | -| --- | --- | -| `GET http://glue.mysprykershop.com/carts` | Retrieve all carts of a user. | -| `GET http://glue.mysprykershop.com/carts?include=items,concrete-products,cart-permission-groups` | Retrieve all carts of a user with concrete products and cart pemission groups included. | -| `GET http://glue.mysprykershop.com/carts?include=items, sales-units,product-measurement-units` | Retrieve all carts of a user with product measurement units and sales units included. | -| `GET http://glue.mysprykershop.com/carts?include=promotional-items`| Retrieve informaton about promotional items for the cart.| -| `GET http://glue.mysprykershop.com/carts?include=promotional-items,abstract-products,concrete-product`| Retrieve detailed information on the promotional items for the cart.| - - -| String parameter | Description | Exemplary values | -| --- | --- | --- | -| include | Adds resource relationships to the request. | items, concrete-products, cart-permission-groups, product-measurement-units, sales-units, promotional-items | - -{% info_block infoBox "Included resources" %} - -The `product-measurement-units` and `sales-units` resources can be included only together with the `items` resource. - -{% endinfo_block %} - -{% info_block infoBox "Included resources" %} - -To retrieve detailed information on promotional products in the cart, use `promotional-items` with `abstract-products` and `concrete-products`. - -{% endinfo_block %} - -#### Response - -
    - Response sample - -```json -{ - "data": [], - "links": { - "self": "http://glue.mysprykershop.com/carts" - } -} -``` - -
    - -
    - Response sample - multiple carts - -```json -{ - "data": [ - { - "type": "carts", - "id": "61ab15e9-e24a-5dec-a1ef-fc333bd88b0a", - "attributes": { - "priceMode": "GROSS_MODE", - "currency": "EUR", - "store": "DE", - "name": "My Cart", - "isDefault": true, - "totals": { - "expenseTotal": 0, - "discountTotal": 3744, - "taxTotal": 5380, - "subtotal": 37440, - "grandTotal": 33696 - }, - "discounts": [ - { - "displayName": "10% Discount for all orders above", - "amount": 3744, - "code": null - } - ] - }, - "links": { - "self": "http://glue.mysprykershop.com/carts/61ab15e9-e24a-5dec-a1ef-fc333bd88b0a" - } - }, - { - "type": "carts", - "id": "482bdbd6-137f-5b58-bd1c-37f3fa735a16", - "attributes": { - "priceMode": "GROSS_MODE", - "currency": "EUR", - "store": "DE", - "name": "Black Friday Conf Bundle", - "isDefault": false, - "totals": { - "expenseTotal": 0, - "discountTotal": 8324, - "taxTotal": 1469, - "subtotal": 83236, - "grandTotal": 74912 - }, - "discounts": [] - }, - "links": { - "self": "http://glue.mysprykershop.com/carts/482bdbd6-137f-5b58-bd1c-37f3fa735a16" - } - } - ], - "links": { - "self": "http://glue.mysprykershop.com/carts" - } -} -``` - -
    - - -
    - Response sample with items, concrete products and cart permission groups - -```json -{ - "data": [ - { - "type": "carts", - "id": "52493031-cccf-5ad2-9cc7-93d0f738303d", - "attributes": { - "priceMode": "GROSS_MODE", - "currency": "EUR", - "store": "DE", - "name": "\"All in\" Conf Bundle", - "isDefault": true, - "totals": { - "expenseTotal": 0, - "discountTotal": 0, - "taxTotal": 718, - "subtotal": 4500, - "grandTotal": 4500 - }, - "discounts": [] - }, - "links": { - "self": "http://glue.mysprykershop.com/carts/52493031-cccf-5ad2-9cc7-93d0f738303d" - }, - "relationships": { - "items": { - "data": [ - { - "type": "items", - "id": "cable-vga-1-2_quantity_sales_unit_id_33_amount_1.5_sales_unit_id_33" - } - ] - } - } - } - ], - "links": { - "self": "http://glue.mysprykershop.com/items?include=items,concrete-products,cart-permission-groups" - }, - "included": [ - { - "type": "concrete-products", - "id": "cable-vga-1-2", - "attributes": { - "sku": "cable-vga-1-2", - "isDiscontinued": false, - "discontinuedNote": null, - "averageRating": null, - "reviewCount": 0, - "name": "VGA cable as long as you want", - "description": "Screw-in VGA cable with 15-pin male input and output.

    Supports resolutions at 800x600 (SVGA), 1024x768 (XGA), 1600x1200 (UXGA), 1080p (Full HD), 1920x1200 (WUXGA), and up for high resolution LCD and LED monitors.

    The VGA cord engineered with molded strain relief connectors for durability, grip treads for easy plugging and unplugging, and finger-tightened screws for a secure connection.

    Gold-plated connectors; 100% bare copper conductors.

    Links VGA-equipped computer to any display with 15-pin VGA port.", - "attributes": { - "packaging_unit": "As long as you want" - }, - "superAttributesDefinition": [ - "packaging_unit" - ], - "metaTitle": "", - "metaKeywords": "", - "metaDescription": "", - "attributeNames": { - "packaging_unit": "Packaging unit" - } - }, - "links": { - "self": "http://glue.mysprykershop.com/concrete-products/cable-vga-1-2" - } - }, - { - "type": "items", - "id": "cable-vga-1-2_quantity_sales_unit_id_33_amount_1.5_sales_unit_id_33", - "attributes": { - "sku": "cable-vga-1-2", - "quantity": 3, - "groupKey": "cable-vga-1-2_quantity_sales_unit_id_33_amount_1.5_sales_unit_id_33", - "abstractSku": "cable-vga-1", - "amount": "4.5", - "calculations": { - "unitPrice": 1500, - "sumPrice": 4500, - "taxRate": 19, - "unitNetPrice": 0, - "sumNetPrice": 0, - "unitGrossPrice": 1500, - "sumGrossPrice": 4500, - "unitTaxAmountFullAggregation": 239, - "sumTaxAmountFullAggregation": 718, - "sumSubtotalAggregation": 4500, - "unitSubtotalAggregation": 1500, - "unitProductOptionPriceAggregation": 0, - "sumProductOptionPriceAggregation": 0, - "unitDiscountAmountAggregation": 0, - "sumDiscountAmountAggregation": 0, - "unitDiscountAmountFullAggregation": 0, - "sumDiscountAmountFullAggregation": 0, - "unitPriceToPayAggregation": 1500, - "sumPriceToPayAggregation": 4500 - }, - "salesUnit": { - "id": 33, - "amount": "4.5" - }, - "selectedProductOptions": [] - }, - "links": { - "self": "http://glue.mysprykershop.com/carts/52493031-cccf-5ad2-9cc7-93d0f738303d/items/cable-vga-1-2_quantity_sales_unit_id_33_amount_1.5_sales_unit_id_33" - }, - "relationships": { - "concrete-products": { - "data": [ - { - "type": "concrete-products", - "id": "cable-vga-1-2" - } - ] - } - } - } - ] -} -``` - -

    - - -
    - Response sample with items, product measurement units and sales units - -```json -{ - "data": [ - { - "type": "carts", - "id": "52493031-cccf-5ad2-9cc7-93d0f738303d", - "attributes": { - "priceMode": "GROSS_MODE", - "currency": "EUR", - "store": "DE", - "name": "\"All in\" Conf Bundle", - "isDefault": true, - "totals": { - "expenseTotal": 0, - "discountTotal": 0, - "taxTotal": 718, - "subtotal": 4500, - "grandTotal": 4500 - }, - "discounts": [] - }, - "links": { - "self": "http://glue.mysprykershop.com/carts/52493031-cccf-5ad2-9cc7-93d0f738303d" - } - } - ], - "links": { - "self": "http://glue.mysprykershop.com/items?include=sales-units,product-measurement-units" - }, - "included": [ - { - "type": "product-measurement-units", - "id": "METR", - "attributes": { - "name": "Meter", - "defaultPrecision": 100 - }, - "links": { - "self": "http://glue.mysprykershop.com/product-measurement-units/METR" - } - }, - { - "type": "sales-units", - "id": "33", - "attributes": { - "conversion": 1, - "precision": 100, - "isDisplayed": true, - "isDefault": true, - "productMeasurementUnitCode": "METR" - }, - "links": { - "self": "http://glue.mysprykershop.com/concrete-products/cable-vga-1-2/sales-units/33" - }, - "relationships": { - "product-measurement-units": { - "data": [ - { - "type": "product-measurement-units", - "id": "METR" - } - ] - } - } - }, - { - "type": "items", - "id": "cable-vga-1-2_quantity_sales_unit_id_33_amount_1.5_sales_unit_id_33", - "attributes": { - "sku": "cable-vga-1-2", - "quantity": 3, - "groupKey": "cable-vga-1-2_quantity_sales_unit_id_33_amount_1.5_sales_unit_id_33", - "abstractSku": "cable-vga-1", - "amount": "4.5", - "calculations": { - "unitPrice": 1500, - "sumPrice": 4500, - "taxRate": 19, - "unitNetPrice": 0, - "sumNetPrice": 0, - "unitGrossPrice": 1500, - "sumGrossPrice": 4500, - "unitTaxAmountFullAggregation": 239, - "sumTaxAmountFullAggregation": 718, - "sumSubtotalAggregation": 4500, - "unitSubtotalAggregation": 1500, - "unitProductOptionPriceAggregation": 0, - "sumProductOptionPriceAggregation": 0, - "unitDiscountAmountAggregation": 0, - "sumDiscountAmountAggregation": 0, - "unitDiscountAmountFullAggregation": 0, - "sumDiscountAmountFullAggregation": 0, - "unitPriceToPayAggregation": 1500, - "sumPriceToPayAggregation": 4500 - }, - "salesUnit": { - "id": 33, - "amount": "4.5" - }, - "selectedProductOptions": [] - }, - "links": { - "self": "http://glue.mysprykershop.com/carts/52493031-cccf-5ad2-9cc7-93d0f738303d/items/cable-vga-1-2_quantity_sales_unit_id_33_amount_1.5_sales_unit_id_33" - }, - "relationships": { - "sales-units": { - "data": [ - { - "type": "sales-units", - "id": "33" - } - ] - } - } - } - ] -} -``` - -
    - -
    - Response sample with a promotional item - -```json - "data": [ - { - "type": "carts", - "id": "1ce91011-8d60-59ef-9fe0-4493ef3628b2", - "attributes": { - "priceMode": "GROSS_MODE", - "currency": "EUR", - "store": "DE", - "name": "My Cart", - "isDefault": true, - "totals": { - "expenseTotal": 0, - "discountTotal": 11113, - "taxTotal": 15107, - "subtotal": 111128, - "grandTotal": 100015 - }, - "discounts": [ - { - "displayName": "10% Discount for all orders above", - "amount": 11113, - "code": null - } - ] - }, - "links": { - "self": "http://glue.de.suite.local/carts/1ce91011-8d60-59ef-9fe0-4493ef3628b2" - }, - "relationships": { - "promotional-items": { - "data": [ - { - "type": "promotional-items", - "id": "bfc600e1-5bf1-50eb-a9f5-a37deb796f8a" - } - ] - } - } - }, - { - "type": "carts", - "id": "1f1662c4-01e1-50d1-877d-95534d1b1833", - "attributes": { - "priceMode": "GROSS_MODE", - "currency": "EUR", - "store": "DE", - "name": "another cart", - "isDefault": false, - "totals": { - "expenseTotal": 0, - "discountTotal": 3291, - "taxTotal": 1938, - "subtotal": 32909, - "grandTotal": 29618 - }, - "discounts": [ - { - "displayName": "10% Discount for all orders above", - "amount": 3291, - "code": null - } - ] - }, - "links": { - "self": "http://glue.mysprykershop.com/carts/1f1662c4-01e1-50d1-877d-95534d1b1833" - } - } - ], - "links": { - "self": "http://glue.mysprykershop.com/access-tokens?include=promotional-items" - }, - "included": [ - { - "type": "promotional-items", - "id": "bfc600e1-5bf1-50eb-a9f5-a37deb796f8a", - "attributes": { - "sku": "112", - "quantity": 2 - }, - "links": { - "self": "glue.mysprykershop.com/promotional-items/bfc600e1-5bf1-50eb-a9f5-a37deb796f8a" - } - } - ] -} -``` - -
    - -
    - Response sample with details on a promtotional item - -```json -{ - "data": [ - { - "type": "carts", - "id": "1ce91011-8d60-59ef-9fe0-4493ef3628b2", - "attributes": {...}, - "links": {...}, - "relationships": { - "promotional-items": { - "data": [ - { - "type": "promotional-items", - "id": "bfc600e1-5bf1-50eb-a9f5-a37deb796f8a" - } - ] - } - } - }, - { - "type": "carts", - "id": "1f1662c4-01e1-50d1-877d-95534d1b1833", - "attributes": {...}, - "links": {...} - } - ], - "links": {...}, - "included": [ - { - "type": "concrete-products", - "id": "112_312526171", - "attributes": {...} - }, - "links": {...} - }, - { - "type": "concrete-products", - "id": "112_306918001", - "attributes": {...}, - "links": {...}, - { - "type": "concrete-products", - "id": "112_312526191", - "attributes": {...}, - "links": {...}, - { - "type": "concrete-products", - "id": "112_312526172", - "attributes": {....}, - "links": {...}, - { - "type": "concrete-products", - "id": "112_306918002", - "attributes": {...}, - "links": {...}, - { - "type": "concrete-products", - "id": "112_312526192", - "attributes": {...}, - "links": {...}, - { - "type": "concrete-products", - "id": "112_306918003", - "attributes": {...}, - "links": {...}, - { - "type": "concrete-products", - "id": "112_312526193", - "attributes": {...}, - "links": {...}, - { - "type": "abstract-products", - "id": "112", - "attributes": {...}, - "links": {...}, - "relationships": { - "concrete-products": { - "data": [ - { - "type": "concrete-products", - "id": "112_312526171" - }, - { - "type": "concrete-products", - "id": "112_306918001" - }, - { - "type": "concrete-products", - "id": "112_312526191" - }, - { - "type": "concrete-products", - "id": "112_312526172" - }, - { - "type": "concrete-products", - "id": "112_306918002" - }, - { - "type": "concrete-products", - "id": "112_312526192" - }, - { - "type": "concrete-products", - "id": "112_306918003" - }, - { - "type": "concrete-products", - "id": "112_312526193" - } - ] - } - } - }, - { - "type": "promotional-items", - "id": "bfc600e1-5bf1-50eb-a9f5-a37deb796f8a", - "attributes": { - "sku": "112", - "quantity": 2 - }, - "links": { - "self": "http://glue.de.suite.local/promotional-items/bfc600e1-5bf1-50eb-a9f5-a37deb796f8a" - }, - "relationships": { - "abstract-products": { - "data": [ - { - "type": "abstract-products", - "id": "112" - } - ] - } - } - } - ] -} -``` - -
    - - -**General Cart Information** -| Attribute* | Type | Description | -| --- | --- | --- | -| name | String | Specifies a cart name.
    The field is available in multi-cart environments only. | -| isDefault | Boolean | Specifies whether the cart is the default one for the customer.
    The field is available in multi-cart environments only. | -| priceMode | String | Price mode that was active when the cart was created. | -| currency | String | Currency that was selected whenthe cart was created. | -| store | String | Store for which the cart was created. | -/* Type and ID attributes are not mentioned. - -**Discount Information** -| Attribute* | Type | Description | -| --- | --- | --- | -| displayName | String | Discount name. | -| amount | Integer | Discount amount applied to the cart. | -| code | String | Discount code applied to the cart. | -/* Type and ID attributes are not mentioned. - -**Totals** -| Attribute* | Type | Description | -| --- | --- | --- | -| expenseTotal | Integer | Total amount of expenses (including e.g. shipping costs). | -| discountTotal | Integer | Total amount of discounts applied to the cart. | -| taxTotal | Integer | Total amount of taxes to be paid. | -| subTotal | Integer | Subtotal of the cart. | -| grandTotal | Integer | Grand total of the cart. | - -/* Type and ID attributes are not mentioned. - - -| Included resource | Attribute* | Type | Description | -| --- | --- | --- | --- | -| items | sku | String | Product SKU. | -| items | quantity | Integer | Quantity of the given product in the cart. | -| items | groupKey | String | Unique item identifier. The value is generated based on product properties. | -| items | amount | Integer | Amount to be paid for all items of the product in the cart. | -| items | unitPrice | Integer | Single item price without assuming if it is net or gross. This value should be used everywhere the price is displayed. It allows switching tax mode without side effects. | -| items | sumPrice | Integer | Sum of all items prices calculated. | -| items | taxRate | Integer | Current tax rate in per cent. | -| items | unitNetPrice | Integer | Single item net price. | -| items | sumNetPrice | Integer | Sum of prices of all items. | -| items | unitGrossPrice | Integer | Single item gross price. | -| items | sumGrossPrice | Integer | Sum of items gross price. | -| items | unitTaxAmountFullAggregation | Integer | Total tax amount for a given item with additions. | -| items | sumTaxAmountFullAggregation | Integer | Total tax amount for a given sum of items with additions. | -| items | sumSubtotalAggregation | Integer | Sum of subtotals of the items. | -| items | unitSubtotalAggregation | Integer | Subtotal for the given item. | -| items | unitProductOptionPriceAggregation | Integer | Item total product option price. | -| items | sumProductOptionPriceAggregation | Integer | Item total of product options for the given sum of items. | -| items | unitDiscountAmountAggregation | Integer | Item total discount amount. | -| items | sumDiscountAmountAggregation | Integer | Sum of Item total discount amount. | -| items | unitDiscountAmountFullAggregation | Integer | Sum total discount amount with additions. | -| items | sumDiscountAmountFullAggregation | Integer | Item total discount amount with additions. | -| items | unitPriceToPayAggregation | Integer | Item total price to pay after discounts with additions. | -| concrete-products | sku | String | SKU of the concrete product. | -| concrete-products | name | String | Name of the concrete product. | -| concrete-products | description | String | Description of the concrete product. | -| concrete-products | superAttributeDefinition | String[] | Attributes flagged as super attributes, that are however not relevant to distinguish between the product variants. | -| concrete-products | attributeMap | Object | Each super attribute / value combination and the corresponding concrete product IDs are listed here. | -| concrete-products | attributeMap.super_attributes | Object | Applicable super attribute and its values for the product variants. | -| concrete-products | attributeMap.attribute_variants | Object | List of super attributes with the list of values. | -| concrete-products | attributeMap.product_concrete_ids | String[] |Product IDs of the product variants.| -| concrete-products | metaTitle | String | Meta title of the product. | -| concrete-products | metaKeywords | String | Meta keywords of the product. | -| concrete-products | metaDescription | String | Meta description of the product. | -| concrete-products | attributeNames | Object | All non-super attribute / value combinations for the concrete product. | -| cart-permission-groups | Permissions granted to the user for shared carts. | name | String | Specifies the Permission Group name, for example, READ_ONLY or FULL_ACCESS. | -| cart-permission-groups | Permissions granted to the user for shared carts | isDefault | Boolean | Indicates whether the Permission Group is applied to shared carts by default. | -| sales-units|conversion|Integer| Factor to convert a value from sales to base unit. If it is "null", the information is taken from the global conversions.| -|sales-units|precision|Integer|Ratio between a sales unit and a base unit.| -|sales-units|is displayed|Boolean|Defines if the sales unit is displayed on the product details page.| -|sales-units|is default|Boolean|Defines if the sales unit is selected by default on the product details page.| -|sales-units|measurementUnitCode|String|Code of the measurement unit. | -|product-measurement-units|name|String|Measurement unit name.| -|product-measurement-units|defaultPrecision|Integer|The default ratio between a sales unit and a base unit. It is used when precision for a related sales unit is not specified.| -|promotional-items| id | String | Unique identifier of the promotional item. The ID can be used to apply the promotion to the given purchase.| -|promotional-items| sku | String | SKU of the promoted abstract product.| -|promotional-items| quantity | Integer | Specifies how many promotions can be applied to the given purchase.| - -/* Type and ID attributes are not mentioned. - - - - -### Retrieve a Cart - -To retrieve a particular cart, send the request: - ---- -`GET` **/carts/*{% raw %}{{{% endraw %}cart_uuid{% raw %}}}{% endraw %}*** - ---- - - -| Path parameter | Description | -| --- | --- | -| cart_uuid | A unique identifier of a cart. You can get this in the response when [creating carts](#creating-carts) or [retrieving all carts](#retrieve-all-carts). | - - -{% info_block infoBox "Authentication" %} - -To use this endpoint, customers need to authenticate. For details, see [Authentication and Authorization](/docs/scos/dev/glue-api-guides/{{page.version}}/authentication-and-authorization.html). - -{% endinfo_block %} - -#### Request - -| Request | Usage | -| --- | --- | -| `GET http://glue.mysprykershop.com/carts/52493031-cccf-5ad2-9cc7-93d0f738303d?include=items,concrete-products,cart-permission-groups` | Retrieve the `52493031-cccf-5ad2-9cc7-93d0f738303d` cart with its items, related concrete products and cart permission groups included. | -| `GET http://glue.mysprykershop.com/carts/52493031-cccf-5ad2-9cc7-93d0f738303d?include=items,sales-units,product-measurement-units` | Retrieve the `52493031-cccf-5ad2-9cc7-93d0f738303d` cart with its item. The information about item amount is defined in sales units and the related product measurement units are included. | -| `GET http://glue.mysprykershop.com/carts/1ce91011-8d60-59ef-9fe0-4493ef3628b2?include=promotional-items ` | Retrieve the `1ce91011-8d60-59ef-9fe0-4493ef3628b2` cart with its promotional items. | -| `GET http://glue.mysprykershop.com/carts/1ce91011-8d60-59ef-9fe0-4493ef3628b2?include=promotional-items ` | Retrieve the `1ce91011-8d60-59ef-9fe0-4493ef3628b2` cart with details information on its promotional items. | - - - -| String parameter | Description | Exemplary values | -| --- | --- | --- | -| include | Adds resource relationships to the request. | items, concrete-products, cart-permission-groups, product-measurement-units, sales-units, promotional-items | - -{% info_block infoBox "Included resources" %} - -The `product-measurement-units` and `sales-units` resources can be included only together with the `items` resource. - -{% endinfo_block %} -{% info_block infoBox "Included resources" %} - -To retrieve detailed information on promotional products in the cart, use `promotional-items` with `abstract-products` and `concrete-products`. - -{% endinfo_block %} -#### Response - -
    - Response sample with items, concrete products and cart permission groups - -```json -{ - "data": { - "type": "carts", - "id": "52493031-cccf-5ad2-9cc7-93d0f738303d", - "attributes": { - "priceMode": "GROSS_MODE", - "currency": "EUR", - "store": "DE", - "name": "\"All in\" Conf Bundle", - "isDefault": true, - "totals": { - "expenseTotal": 0, - "discountTotal": 0, - "taxTotal": 718, - "subtotal": 4500, - "grandTotal": 4500 - }, - "discounts": [] - }, - "links": { - "self": "http://glue.mysprykershop.com/carts/52493031-cccf-5ad2-9cc7-93d0f738303d" - }, - "relationships": { - "items": { - "data": [ - { - "type": "items", - "id": "cable-vga-1-2_quantity_sales_unit_id_33_amount_1.5_sales_unit_id_33" - } - ] - } - } - }, - "included": [ - { - "type": "concrete-products", - "id": "cable-vga-1-2", - "attributes": { - "sku": "cable-vga-1-2", - "isDiscontinued": false, - "discontinuedNote": null, - "averageRating": null, - "reviewCount": 0, - "name": "VGA cable as long as you want", - "description": "Screw-in VGA cable with 15-pin male input and output.

    Supports resolutions at 800x600 (SVGA), 1024x768 (XGA), 1600x1200 (UXGA), 1080p (Full HD), 1920x1200 (WUXGA), and up for high resolution LCD and LED monitors.

    The VGA cord engineered with molded strain relief connectors for durability, grip treads for easy plugging and unplugging, and finger-tightened screws for a secure connection.

    Gold-plated connectors; 100% bare copper conductors.

    Links VGA-equipped computer to any display with 15-pin VGA port.", - "attributes": { - "packaging_unit": "As long as you want" - }, - "superAttributesDefinition": [ - "packaging_unit" - ], - "metaTitle": "", - "metaKeywords": "", - "metaDescription": "", - "attributeNames": { - "packaging_unit": "Packaging unit" - } - }, - "links": { - "self": "http://glue.mysprykershop.com/concrete-products/cable-vga-1-2" - } - }, - { - "type": "items", - "id": "cable-vga-1-2_quantity_sales_unit_id_33_amount_1.5_sales_unit_id_33", - "attributes": { - "sku": "cable-vga-1-2", - "quantity": 3, - "groupKey": "cable-vga-1-2_quantity_sales_unit_id_33_amount_1.5_sales_unit_id_33", - "abstractSku": "cable-vga-1", - "amount": "4.5", - "calculations": { - "unitPrice": 1500, - "sumPrice": 4500, - "taxRate": 19, - "unitNetPrice": 0, - "sumNetPrice": 0, - "unitGrossPrice": 1500, - "sumGrossPrice": 4500, - "unitTaxAmountFullAggregation": 239, - "sumTaxAmountFullAggregation": 718, - "sumSubtotalAggregation": 4500, - "unitSubtotalAggregation": 1500, - "unitProductOptionPriceAggregation": 0, - "sumProductOptionPriceAggregation": 0, - "unitDiscountAmountAggregation": 0, - "sumDiscountAmountAggregation": 0, - "unitDiscountAmountFullAggregation": 0, - "sumDiscountAmountFullAggregation": 0, - "unitPriceToPayAggregation": 1500, - "sumPriceToPayAggregation": 4500 - }, - "salesUnit": { - "id": 33, - "amount": "4.5" - }, - "selectedProductOptions": [] - }, - "links": { - "self": "http://glue.mysprykershop.com/carts/52493031-cccf-5ad2-9cc7-93d0f738303d/items/cable-vga-1-2_quantity_sales_unit_id_33_amount_1.5_sales_unit_id_33" - }, - "relationships": { - "concrete-products": { - "data": [ - { - "type": "concrete-products", - "id": "cable-vga-1-2" - } - ] - } - } - } - ] -} -``` - -

    - -
    - Response sample with items, sales units and product measurement units - -```json -{ - "data": { - "type": "carts", - "id": "52493031-cccf-5ad2-9cc7-93d0f738303d", - "attributes": { - "priceMode": "GROSS_MODE", - "currency": "EUR", - "store": "DE", - "name": "\"All in\" Conf Bundle", - "isDefault": true, - "totals": { - "expenseTotal": 0, - "discountTotal": 0, - "taxTotal": 718, - "subtotal": 4500, - "grandTotal": 4500 - }, - "discounts": [] - }, - "links": { - "self": "http://glue.mysprykershop.com/carts/52493031-cccf-5ad2-9cc7-93d0f738303d" - } - }, - "included": [ - { - "type": "product-measurement-units", - "id": "METR", - "attributes": { - "name": "Meter", - "defaultPrecision": 100 - }, - "links": { - "self": "http://glue.mysprykershop.com/product-measurement-units/METR" - } - }, - { - "type": "sales-units", - "id": "33", - "attributes": { - "conversion": 1, - "precision": 100, - "isDisplayed": true, - "isDefault": true, - "productMeasurementUnitCode": "METR" - }, - "links": { - "self": "http://glue.mysprykershop.com/concrete-products/cable-vga-1-2/sales-units/33" - }, - "relationships": { - "product-measurement-units": { - "data": [ - { - "type": "product-measurement-units", - "id": "METR" - } - ] - } - } - }, - { - "type": "items", - "id": "cable-vga-1-2_quantity_sales_unit_id_33_amount_1.5_sales_unit_id_33", - "attributes": { - "sku": "cable-vga-1-2", - "quantity": 3, - "groupKey": "cable-vga-1-2_quantity_sales_unit_id_33_amount_1.5_sales_unit_id_33", - "abstractSku": "cable-vga-1", - "amount": "4.5", - "calculations": { - "unitPrice": 1500, - "sumPrice": 4500, - "taxRate": 19, - "unitNetPrice": 0, - "sumNetPrice": 0, - "unitGrossPrice": 1500, - "sumGrossPrice": 4500, - "unitTaxAmountFullAggregation": 239, - "sumTaxAmountFullAggregation": 718, - "sumSubtotalAggregation": 4500, - "unitSubtotalAggregation": 1500, - "unitProductOptionPriceAggregation": 0, - "sumProductOptionPriceAggregation": 0, - "unitDiscountAmountAggregation": 0, - "sumDiscountAmountAggregation": 0, - "unitDiscountAmountFullAggregation": 0, - "sumDiscountAmountFullAggregation": 0, - "unitPriceToPayAggregation": 1500, - "sumPriceToPayAggregation": 4500 - }, - "salesUnit": { - "id": 33, - "amount": "4.5" - }, - "selectedProductOptions": [] - }, - "links": { - "self": "http://glue.mysprykershop.com/carts/52493031-cccf-5ad2-9cc7-93d0f738303d/items/cable-vga-1-2_quantity_sales_unit_id_33_amount_1.5_sales_unit_id_33" - }, - "relationships": { - "sales-units": { - "data": [ - { - "type": "sales-units", - "id": "33" - } - ] - } - } - } - ] -} -``` - -
    - -
    - Response sample with a promotional item - -```json -{ - "data": { - "type": "carts", - "id": "1ce91011-8d60-59ef-9fe0-4493ef3628b2", - "attributes": { - "priceMode": "GROSS_MODE", - "currency": "EUR", - "store": "DE", - "name": "My Cart", - "isDefault": true, - "totals": { - "expenseTotal": 0, - "discountTotal": 11113, - "taxTotal": 15107, - "subtotal": 111128, - "grandTotal": 100015 - }, - "discounts": [ - { - "displayName": "10% Discount for all orders above", - "amount": 11113, - "code": null - } - ] - }, - "links": { - "self": "http://glue.mysprykershop.com/carts/1ce91011-8d60-59ef-9fe0-4493ef3628b2" - }, - "relationships": { - "promotional-items": { - "data": [ - { - "type": "promotional-items", - "id": "bfc600e1-5bf1-50eb-a9f5-a37deb796f8a" - } - ] - } - } - }, - "included": [ - { - "type": "promotional-items", - "id": "bfc600e1-5bf1-50eb-a9f5-a37deb796f8a", - "attributes": { - "sku": "112", - "quantity": 2 - }, - "links": { - "self": "http://glue.mysprykershop.com/promotional-items/bfc600e1-5bf1-50eb-a9f5-a37deb796f8a" - } - } - ] -} -``` - -
    - -
    - Response sample with details on a promotional item - -```json -{ - "data": { - "type": "carts", - "id": "1ce91011-8d60-59ef-9fe0-4493ef3628b2", - "attributes": {...}, - "links": {...}, - "relationships": { - "promotional-items": { - "data": [ - { - "type": "promotional-items", - "id": "bfc600e1-5bf1-50eb-a9f5-a37deb796f8a" - } - ] - } - } - }, - "included": [ - { - "type": "concrete-products", - "id": "111_12295890", - "attributes": {...}, - "links": {...} - }, - { - "type": "abstract-products", - "id": "111", - "attributes": {...}, - "links": {...}, - "relationships": { - "concrete-products": { - "data": [ - { - "type": "concrete-products", - "id": "111_12295890" - } - ] - } - } - }, - { - "type": "promotional-items", - "id": "bfc600e1-5bf1-50eb-a9f5-a37deb796f8a", - "attributes": { - "sku": "111", - "quantity": 2 - }, - "links": {...}, - "relationships": { - "abstract-products": { - "data": [ - { - "type": "abstract-products", - "id": "111" - } - ] - } - } - } - ] -} -``` - -
    - -Find all the related attribute descriptions in [Retrieve All Carts](#all-carts-response-attributes). - - - -## Adding Items -To add items to a cart, send the request: - ---- -`POST` **carts/*{% raw %}{{{% endraw %}cart_uuid{% raw %}}}{% endraw %}*/items** - ---- - -| Path parameter | Description | -| --- | --- | -| cart_uuid | A unique identifier of a cart. You can get this in the response when [creating carts](#creating-carts) or [retrieving all carts](#retrieve-all-carts). | - - -{% info_block infoBox "Authentication" %} - -To use this endpoint, customers need to authenticate. For details, see [Authentication and Authorization](/docs/scos/dev/glue-api-guides/{{page.version}}/authentication-and-authorization.html). - -{% endinfo_block %} - - - -### Request - -`POST http://glue.mysprykershop.com/carts/61ab15e9-e24a-5dec-a1ef-fc333bd88b0a/items?include=sales-units,product-measurement-units` - -```json -{ - "data": { - "type": "items", - "attributes": { - "sku": "cable-vga-1-2", - "quantity": 3, - "salesUnit": { - "id": 33, - "amount": 4.5 - } - } - } -} -``` -{% info_block infoBox "Cart rules" %} - -To add the promotional product to cart, make sure that the cart fulfills the cart rules for the promotional item. - -{% endinfo_block %} - -`POST http://glue.myspsrykershop.com/carts/1ce91011-8d60-59ef-9fe0-4493ef3628b2/items?include=cart-rules` - -```json -{ - "data": { - "type": "items", - "attributes": { - "sku": "112_306918001", - "quantity": "1", - "idPromotionalItem": "bfc600e1-5bf1-50eb-a9f5-a37deb796f8a" - } - } -} -``` - -| String parameter | Description | Exemplary values | -| --- | --- | --- | -| include | Adds resource relationships to the request. | product-measurement-units, sales-units | - -| Attribute| Type | Required | Description | -| --- | --- | --- | --- | -| sku | String | ✓ | Specifies the SKU of the concrete product to add to the cart. | -| quantity | String | ✓ | Specifies the number of items to place on the guest cart. If you add a promotional item and the number of products exceeds the number of promotions, the exceeding items will be added without promotional benefits. | -| salesUnit | Object | | List of attributes defining the sales unit to be used for item amount calculation. | -| id | Integer | | A unique identifier of the sales units to calculate the item amount in. | -| amount | Integer | | Amount of the product in the defined sales units. | -| sku | String | ✓ | SKU of the product to add. To use promotions, specify the SKU of a promoted concrete product. | -| quantity | Integer | ✓ | Number of products to add. If the number of products exceeds the number of promotions, the exceeding items are added without promotional benefits. | -| idPromotionalItem | String | | Promotional item ID. Specify the ID to apply the promotion benefits. | -| productOptions | Object | | roduct options to apply. For details, see [Retrieving and Applying Product Options](/docs/scos/dev/glue-api-guides/{{page.version}}/managing-products/retrieving-and-applying-product-options.html). | - - - -### Response -
    - Response sample - -```json - { - "data": { - "type": "carts", - "id": "482bdbd6-137f-5b58-bd1c-37f3fa735a16", - "attributes": { - "priceMode": "GROSS_MODE", - "currency": "EUR", - "store": "DE", - "name": "Black Friday Conf Bundle", - "isDefault": true, - "totals": { - "expenseTotal": 0, - "discountTotal": 3425, - "taxTotal": 4921, - "subtotal": 34247, - "grandTotal": 30822 - }, - "discounts": [ - { - "displayName": "10% Discount for all orders above", - "amount": 3425, - "code": null - } - ] - }, - "links": { - "self": "http://glue.mysprykershop.com/carts/482bdbd6-137f-5b58-bd1c-37f3fa735a16" - } - }, - "included": [ - { - "type": "items", - "id": "035_17360369", - "attributes": { - "sku": "035_17360369", - "quantity": "1", - "groupKey": "035_17360369", - "abstractSku": "035", - "amount": null, - "calculations": { - "unitPrice": 29747, - "sumPrice": 29747, - "taxRate": 19, - "unitNetPrice": 0, - "sumNetPrice": 0, - "unitGrossPrice": 29747, - "sumGrossPrice": 29747, - "unitTaxAmountFullAggregation": 4275, - "sumTaxAmountFullAggregation": 4275, - "sumSubtotalAggregation": 29747, - "unitSubtotalAggregation": 29747, - "unitProductOptionPriceAggregation": 0, - "sumProductOptionPriceAggregation": 0, - "unitDiscountAmountAggregation": 2975, - "sumDiscountAmountAggregation": 2975, - "unitDiscountAmountFullAggregation": 2975, - "sumDiscountAmountFullAggregation": 2975, - "unitPriceToPayAggregation": 26772, - "sumPriceToPayAggregation": 26772 - }, - "salesUnit": null, - "selectedProductOptions": [] - }, - "links": { - "self": "http://glue.mysprykershop.com/carts/482bdbd6-137f-5b58-bd1c-37f3fa735a16/items/035_17360369" - } - }, - { - "type": "sales-units", - "id": "33", - "attributes": { - "conversion": 1, - "precision": 100, - "isDisplayed": true, - "isDefault": true, - "productMeasurementUnitCode": "METR" - }, - "links": { - "self": "http://glue.mysprykershop.com/concrete-products/cable-vga-1-2/sales-units/33" - } - }, - { - "type": "items", - "id": "cable-vga-1-2_quantity_sales_unit_id_33_amount_1.5_sales_unit_id_33", - "attributes": { - "sku": "cable-vga-1-2", - "quantity": 3, - "groupKey": "cable-vga-1-2_quantity_sales_unit_id_33_amount_1.5_sales_unit_id_33", - "abstractSku": "cable-vga-1", - "amount": "4.5", - "calculations": { - "unitPrice": 1500, - "sumPrice": 4500, - "taxRate": 19, - "unitNetPrice": 0, - "sumNetPrice": 0, - "unitGrossPrice": 1500, - "sumGrossPrice": 4500, - "unitTaxAmountFullAggregation": 215, - "sumTaxAmountFullAggregation": 646, - "sumSubtotalAggregation": 4500, - "unitSubtotalAggregation": 1500, - "unitProductOptionPriceAggregation": 0, - "sumProductOptionPriceAggregation": 0, - "unitDiscountAmountAggregation": 150, - "sumDiscountAmountAggregation": 450, - "unitDiscountAmountFullAggregation": 150, - "sumDiscountAmountFullAggregation": 450, - "unitPriceToPayAggregation": 1350, - "sumPriceToPayAggregation": 4050 - }, - "salesUnit": { - "id": 33, - "amount": "4.5" - }, - "selectedProductOptions": [] - }, - "links": { - "self": "http://glue.mysprykershop.com/carts/482bdbd6-137f-5b58-bd1c-37f3fa735a16/items/cable-vga-1-2_quantity_sales_unit_id_33_amount_1.5_sales_unit_id_33" - }, - "relationships": { - "sales-units": { - "data": [ - { - "type": "sales-units", - "id": "33" - } - ] - } - } - } - ] -} -``` - -
    - -
    - Response sample: adding a promotional item without cart-rules relationship - -```json -{ - "data": { - "type": "carts", - "id": "1ce91011-8d60-59ef-9fe0-4493ef3628b2", - "attributes": { - "priceMode": "GROSS_MODE", - "currency": "EUR", - "store": "DE", - "name": "My Cart", - "isDefault": true, - "totals": { - "expenseTotal": 0, - "discountTotal": 13192, - "taxTotal": 15107, - "subtotal": 113207, - "grandTotal": 100015 - }, - "discounts": [ - { - "displayName": "For every purchase above certain value depending on the currency and net/gross price. you get this promotional product for free", - "amount": 2079, - "code": null - }, - { - "displayName": "10% Discount for all orders above", - "amount": 11113, - "code": null - } - ] - }, - "links": { - "self": "http://glue.mysprykershop.com/carts/1ce91011-8d60-59ef-9fe0-4493ef3628b2" - } - } -} -``` - -
    - -
    - Response sample: adding a promotional item with cart-rules relationshop - -```json -{ - "data": { - "type": "carts", - "id": "1ce91011-8d60-59ef-9fe0-4493ef3628b2", - "attributes": { - "priceMode": "GROSS_MODE", - "currency": "EUR", - "store": "DE", - "name": "My Cart", - "isDefault": true, - "totals": { - "expenseTotal": 0, - "discountTotal": 13192, - "taxTotal": 15107, - "subtotal": 113207, - "grandTotal": 100015 - }, - "discounts": [ - { - "displayName": "For every purchase above certain value depending on the currency and net/gross price. you get this promotional product for free", - "amount": 2079, - "code": null - }, - { - "displayName": "10% Discount for all orders above", - "amount": 11113, - "code": null - } - ] - }, - "links": { - "self": "http://glue.mysprykershop.com/carts/1ce91011-8d60-59ef-9fe0-4493ef3628b2" - }, - "relationships": { - "cart-rules": { - "data": [ - { - "type": "cart-rules", - "id": "6" - }, - { - "type": "cart-rules", - "id": "1" - } - ] - } - } - }, - "included": [ - { - "type": "items", - "id": "134_29759322", - "attributes": { - "sku": "134_29759322", - "quantity": "1", - "groupKey": "134_29759322", - "abstractSku": "134", - "amount": null, - "calculations": { - "unitPrice": 1879, - "sumPrice": 1879, - "taxRate": 19, - "unitNetPrice": 0, - "sumNetPrice": 0, - "unitGrossPrice": 1879, - "sumGrossPrice": 1879, - "unitTaxAmountFullAggregation": 270, - "sumTaxAmountFullAggregation": 270, - "sumSubtotalAggregation": 1879, - "unitSubtotalAggregation": 1879, - "unitProductOptionPriceAggregation": 0, - "sumProductOptionPriceAggregation": 0, - "unitDiscountAmountAggregation": 188, - "sumDiscountAmountAggregation": 188, - "unitDiscountAmountFullAggregation": 188, - "sumDiscountAmountFullAggregation": 188, - "unitPriceToPayAggregation": 1691, - "sumPriceToPayAggregation": 1691 - }, - "salesUnit": null, - "selectedProductOptions": [] - }, - "links": { - "self": "http://glue.mysprykershop.com/carts/1ce91011-8d60-59ef-9fe0-4493ef3628b2/items/134_29759322" - } - }, - { - "type": "items", - "id": "118_29804739", - "attributes": { - "sku": "118_29804739", - "quantity": "1", - "groupKey": "118_29804739", - "abstractSku": "118", - "amount": null, - "calculations": { - "unitPrice": 6000, - "sumPrice": 6000, - "taxRate": 0, - "unitNetPrice": 0, - "sumNetPrice": 0, - "unitGrossPrice": 6000, - "sumGrossPrice": 6000, - "unitTaxAmountFullAggregation": 0, - "sumTaxAmountFullAggregation": 0, - "sumSubtotalAggregation": 6000, - "unitSubtotalAggregation": 6000, - "unitProductOptionPriceAggregation": 0, - "sumProductOptionPriceAggregation": 0, - "unitDiscountAmountAggregation": 600, - "sumDiscountAmountAggregation": 600, - "unitDiscountAmountFullAggregation": 600, - "sumDiscountAmountFullAggregation": 600, - "unitPriceToPayAggregation": 5400, - "sumPriceToPayAggregation": 5400 - }, - "salesUnit": null, - "selectedProductOptions": [] - }, - "links": { - "self": "http://glue.mysprykershop.com/carts/1ce91011-8d60-59ef-9fe0-4493ef3628b2/items/118_29804739" - } - }, - { - "type": "items", - "id": "139_24699831", - "attributes": { - "sku": "139_24699831", - "quantity": "1", - "groupKey": "139_24699831", - "abstractSku": "139", - "amount": null, - "calculations": { - "unitPrice": 3454, - "sumPrice": 3454, - "taxRate": 19, - "unitNetPrice": 0, - "sumNetPrice": 0, - "unitGrossPrice": 3454, - "sumGrossPrice": 3454, - "unitTaxAmountFullAggregation": 496, - "sumTaxAmountFullAggregation": 496, - "sumSubtotalAggregation": 3454, - "unitSubtotalAggregation": 3454, - "unitProductOptionPriceAggregation": 0, - "sumProductOptionPriceAggregation": 0, - "unitDiscountAmountAggregation": 345, - "sumDiscountAmountAggregation": 345, - "unitDiscountAmountFullAggregation": 345, - "sumDiscountAmountFullAggregation": 345, - "unitPriceToPayAggregation": 3109, - "sumPriceToPayAggregation": 3109 - }, - "salesUnit": null, - "selectedProductOptions": [] - }, - "links": { - "self": "http://glue.mysprykershop.com/carts/1ce91011-8d60-59ef-9fe0-4493ef3628b2/items/139_24699831" - } - }, - { - "type": "items", - "id": "136_24425591", - "attributes": { - "sku": "136_24425591", - "quantity": 3, - "groupKey": "136_24425591", - "abstractSku": "136", - "amount": null, - "calculations": { - "unitPrice": 33265, - "sumPrice": 99795, - "taxRate": 19, - "unitNetPrice": 0, - "sumNetPrice": 0, - "unitGrossPrice": 33265, - "sumGrossPrice": 99795, - "unitTaxAmountFullAggregation": 4780, - "sumTaxAmountFullAggregation": 14341, - "sumSubtotalAggregation": 99795, - "unitSubtotalAggregation": 33265, - "unitProductOptionPriceAggregation": 0, - "sumProductOptionPriceAggregation": 0, - "unitDiscountAmountAggregation": 3327, - "sumDiscountAmountAggregation": 9980, - "unitDiscountAmountFullAggregation": 3327, - "sumDiscountAmountFullAggregation": 9980, - "unitPriceToPayAggregation": 29938, - "sumPriceToPayAggregation": 89815 - }, - "salesUnit": null, - "selectedProductOptions": [] - }, - "links": { - "self": "http://glue.mysprykershop.com/carts/1ce91011-8d60-59ef-9fe0-4493ef3628b2/items/136_24425591" - } - }, - { - "type": "items", - "id": "112_306918001-promotion-1", - "attributes": { - "sku": "112_306918001", - "quantity": "1", - "groupKey": "112_306918001-promotion-1", - "abstractSku": "112", - "amount": null, - "calculations": { - "unitPrice": 2079, - "sumPrice": 2079, - "taxRate": 0, - "unitNetPrice": 0, - "sumNetPrice": 0, - "unitGrossPrice": 2079, - "sumGrossPrice": 2079, - "unitTaxAmountFullAggregation": 0, - "sumTaxAmountFullAggregation": 0, - "sumSubtotalAggregation": 2079, - "unitSubtotalAggregation": 2079, - "unitProductOptionPriceAggregation": 0, - "sumProductOptionPriceAggregation": 0, - "unitDiscountAmountAggregation": 2079, - "sumDiscountAmountAggregation": 2079, - "unitDiscountAmountFullAggregation": 2079, - "sumDiscountAmountFullAggregation": 2079, - "unitPriceToPayAggregation": 0, - "sumPriceToPayAggregation": 0 - }, - "salesUnit": null, - "selectedProductOptions": [] - }, - "links": { - "self": "http://glue.mysprykershop.com/carts/1ce91011-8d60-59ef-9fe0-4493ef3628b2/items/112_306918001-promotion-1" - } - }, - { - "type": "cart-rules", - "id": "6", - "attributes": { - "amount": 2079, - "code": null, - "discountType": "cart_rule", - "displayName": "For every purchase above certain value depending on the currency and net/gross price. you get this promotional product for free", - "isExclusive": false, - "expirationDateTime": "2020-12-31 00:00:00.000000", - "discountPromotionAbstractSku": "112", - "discountPromotionQuantity": 2 - }, - "links": { - "self": "http://glue.mysprykershop.com/cart-rules/6" - } - }, - { - "type": "cart-rules", - "id": "1", - "attributes": { - "amount": 11113, - "code": null, - "discountType": "cart_rule", - "displayName": "10% Discount for all orders above", - "isExclusive": false, - "expirationDateTime": "2020-12-31 00:00:00.000000", - "discountPromotionAbstractSku": null, - "discountPromotionQuantity": null - }, - "links": { - "self": "http://glue.mysprykershop.com/cart-rules/1" - } - } - ] -} -``` - -
    - -Cart Rules Information -| Attribute* | Type | Description | -| --- | --- | --- | -| amount | Integer | Amount of the discount in cents. | -| code | String | Discount code. | -| discountType | String | Discount type. | -| displayName | String | Discount name. | -| isExclusive | Boolean | Indicates whether the discount is exclusive. | -| expirationDateTime | DateTimeUtc | Discount expiration time in UTC time format. | -| discountPromotionAbstractSku | String | SKU of the product to which the discount applies. If the discount can be applied to o all the products to add, the value of the attribute is **null**. | -| discountPromotionQuantity | String | Quantity of the product required to be able to apply the discount. If the discount can be applied to any number of products, the value of the attribute is **null**. | - -Find other related attribute descriptions in [Retrieve All Carts](#all-carts-response-attributes). - - -## Removing Items -To remove an item from a cart, send a DELETE request to the following endpoint: - ---- -`DELETE` **/carts/*{% raw %}{{{% endraw %}cart_uuid{% raw %}}}{% endraw %}*/items/*{% raw %}{{{% endraw %}concreteproductsku{% raw %}}}{% endraw %}*** - ---- - - -| Path parameter | Description | -| --- | --- | -| cart_uuid | A unique identifier of a cart to remove products from. You can get this in the response when [creating carts](#creating-carts) or [retrieving all carts](#retrieve-all-carts). | -| concreteproductsku | SKU of a concrete product to remove from cart. | - -{% info_block infoBox "Authentication" %} - -To use this endpoint, customers need to authenticate. For details, see [Authentication and Authorization](/docs/scos/dev/glue-api-guides/{{page.version}}/authentication-and-authorization.html). - -{% endinfo_block %} - -### Request - -Request sample: `DELETE http://mysprykershop.com/carts/4741fc84-2b9b-59da-bb8d-f4afab5be054/items/177_25913296` - - - -### Response -If the item is deleted successfully, the endpoint responds with a `204 No Content` status code. - - - -## Changing Item Quantity -To change the quantity of items in a cart, send the request: - ---- -`PATCH` **/carts/*{% raw %}{{{% endraw %}cart_uuid{% raw %}}}{% endraw %}*/items/*{% raw %}{{{% endraw %}concreteproductsku{% raw %}}}{% endraw %}*** - ---- - -| Path parameter | Description | -| --- | --- | -| cart_uuid | A unique identifier of a cart to remove products from. You can get this in the response when [creating carts](#creating-carts) or [retrieving all carts](#retrieve-all-carts). | -| concreteproductsku | SKU of a concrete product to remove from cart. | - -{% info_block infoBox "Authentication" %} - -To use this endpoint, customers need to authenticate. For details, see [Authentication and Authorization](/docs/scos/dev/glue-api-guides/{{page.version}}/authentication-and-authorization.html). - -{% endinfo_block %} - - -### Request - -Request sample: `PATCH http://mysprykershop.com/carts/4741fc84-2b9b-59da-bb8d-f4afab5be054/items/177_25913296` - -```json -{ - "data": { - "type": "items", - "attributes": { - "quantity": 10 - } - } -} -``` - -**Attributes:** - -| Attribute | Type | Required | Description | -| --- | --- | --- | --- | -| quantity | String | v | Specifies the new quantity of the items. | - - -### Response - -
    - Response sample - -```json -{ - "data": [ - { - "type": "carts", - "id": "52493031-cccf-5ad2-9cc7-93d0f738303d", - "attributes": { - "priceMode": "GROSS_MODE", - "currency": "EUR", - "store": "DE", - "name": "\"All in\" Conf Bundle", - "isDefault": true, - "totals": { - "expenseTotal": 0, - "discountTotal": 0, - "taxTotal": 718, - "subtotal": 4500, - "grandTotal": 4500 - }, - "discounts": [] - }, - "links": { - "self": "http://glue.mysprykershop.com/carts/52493031-cccf-5ad2-9cc7-93d0f738303d" - }, - "relationships": { - "items": { - "data": [ - { - "type": "items", - "id": "cable-vga-1-2_quantity_sales_unit_id_33_amount_1.5_sales_unit_id_33" - } - ] - } - } - } - ], - "links": { - "self": "http://glue.mysprykershop.com/items?include=items,concrete-products,cart-permission-groups" - }, - "included": [ - { - "type": "concrete-products", - "id": "cable-vga-1-2", - "attributes": { - "sku": "cable-vga-1-2", - "isDiscontinued": false, - "discontinuedNote": null, - "averageRating": null, - "reviewCount": 0, - "name": "VGA cable as long as you want", - "description": "Screw-in VGA cable with 15-pin male input and output.

    Supports resolutions at 800x600 (SVGA), 1024x768 (XGA), 1600x1200 (UXGA), 1080p (Full HD), 1920x1200 (WUXGA), and up for high resolution LCD and LED monitors.

    The VGA cord engineered with molded strain relief connectors for durability, grip treads for easy plugging and unplugging, and finger-tightened screws for a secure connection.

    Gold-plated connectors; 100% bare copper conductors.

    Links VGA-equipped computer to any display with 15-pin VGA port.", - "attributes": { - "packaging_unit": "As long as you want" - }, - "superAttributesDefinition": [ - "packaging_unit" - ], - "metaTitle": "", - "metaKeywords": "", - "metaDescription": "", - "attributeNames": { - "packaging_unit": "Packaging unit" - } - }, - "links": { - "self": "http://glue.mysprykershop.com/concrete-products/cable-vga-1-2" - } - }, - { - "type": "items", - "id": "cable-vga-1-2_quantity_sales_unit_id_33_amount_1.5_sales_unit_id_33", - "attributes": { - "sku": "cable-vga-1-2", - "quantity": 3, - "groupKey": "cable-vga-1-2_quantity_sales_unit_id_33_amount_1.5_sales_unit_id_33", - "abstractSku": "cable-vga-1", - "amount": "4.5", - "calculations": { - "unitPrice": 1500, - "sumPrice": 4500, - "taxRate": 19, - "unitNetPrice": 0, - "sumNetPrice": 0, - "unitGrossPrice": 1500, - "sumGrossPrice": 4500, - "unitTaxAmountFullAggregation": 239, - "sumTaxAmountFullAggregation": 718, - "sumSubtotalAggregation": 4500, - "unitSubtotalAggregation": 1500, - "unitProductOptionPriceAggregation": 0, - "sumProductOptionPriceAggregation": 0, - "unitDiscountAmountAggregation": 0, - "sumDiscountAmountAggregation": 0, - "unitDiscountAmountFullAggregation": 0, - "sumDiscountAmountFullAggregation": 0, - "unitPriceToPayAggregation": 1500, - "sumPriceToPayAggregation": 4500 - }, - "salesUnit": { - "id": 33, - "amount": "4.5" - }, - "selectedProductOptions": [] - }, - "links": { - "self": "http://glue.mysprykershop.com/carts/52493031-cccf-5ad2-9cc7-93d0f738303d/items/cable-vga-1-2_quantity_sales_unit_id_33_amount_1.5_sales_unit_id_33" - }, - "relationships": { - "concrete-products": { - "data": [ - { - "type": "concrete-products", - "id": "cable-vga-1-2" - } - ] - } - } - } - ] -} -``` - -

    - -See [Retrieve All Carts](#all-carts-response-attributes) for response attribute descriptions. - -## Deleting Carts -To delete a cart, send the request: - ---- -`DELETE` **/carts/*{% raw %}{{{% endraw %}cart_uuid{% raw %}}}{% endraw %}*** - ---- - -| Path parameter | Description | -| --- | --- | -| cart_uuid | A unique identifier of a cart to remove products from. You can get this in the response when [creating carts](#creating-carts) or [retrieving all carts](#retrieve-all-carts). | - - -{% info_block infoBox "Deleting carts" %} - -You cannot delete a cart if it is the customer's only cart. If you attempt to delete a customer's last cart, the endpoint responds with the **422 Unprocessable Entry** status code.If you delete the default cart of a customer, another cart will be assigned as default automatically. - -{% endinfo_block %} - -### Request -Request sample: `DELETE http://glue.mysprykershop.com/carts/4741fc84-2b9b-59da-bb8d-f4afab5be054` - -where **4741fc84-2b9b-59da-bb8d-f4afab5be054** is the ID of the cart you want to delete. - -{% info_block infoBox "Authentication" %} - -To use this endpoint, customers need to authenticate. For details, see [Authentication and Authorization](/docs/scos/dev/glue-api-guides/{{page.version}}/authentication-and-authorization.html). - -{% endinfo_block %} - -### Response -If the cart is deleted successfully, the endpoint responds with the **204 No Content** status code. - -## Possible Errors -| Status | Reason | -| --- | --- | -| 400 | Cart ID is missing. | -| 401 | The access token is invalid. | -| 403 | The access token is missing or the user is not allowed to perform the operation. | -| 404 | A cart with the specified ID was not found. | -| 422 |Failed to add an item. | diff --git a/docs/scos/dev/glue-api-guides/202005.0/managing-carts/guest-carts/managing-guest-carts.md b/docs/scos/dev/glue-api-guides/202005.0/managing-carts/guest-carts/managing-guest-carts.md deleted file mode 100644 index 04a0b2b4933..00000000000 --- a/docs/scos/dev/glue-api-guides/202005.0/managing-carts/guest-carts/managing-guest-carts.md +++ /dev/null @@ -1,1947 +0,0 @@ ---- -title: Managing Guest Carts -description: This article describes the endpoints that provide access to shopping carts management functionality for the guest carts. -last_updated: Sep 14, 2020 -template: glue-api-storefront-guide-template -originalLink: https://documentation.spryker.com/v5/docs/managing-guest-carts -originalArticleId: 794ed6c0-fdea-48d5-bb63-5909ee093a2f -redirect_from: - - /v5/docs/managing-guest-carts - - /v5/docs/en/managing-guest-carts - - /docs/marketplace/dev/glue-api-guides/202005.0/guest-carts/managing-guest-carts.html -related: - - title: Managing Carts of Registered Users - link: docs/scos/dev/glue-api-guides/page.version/managing-carts/carts-of-registered-users/managing-carts-of-registered-users.html - - title: Multiple Carts feature integration - link: docs/scos/dev/feature-integration-guides/page.version/multiple-carts-feature-integration.html - - title: Glue API - Cart feature integration - link: docs/scos/dev/feature-integration-guides/page.version/glue-api/glue-api-cart-feature-integration.html - - title: Shopping Cart Widget Feature Overview - link: docs/scos/user/features/page.version/cart-feature-overview/cart-widget-overview.html ---- - -The Carts API provides access to management of customers' shopping carts. The following document covers working with guest carts. - -Guest carts come with an expiration date, which means that unregistered users can use their carts only for a limited time frame. After the lifetime of a guest cart expires, it is deleted by the system automatically.It is up to you to decide, how long you want them to be saved. Also, with the introduction of the Carts API, comes the possibility to persist guest carts. While carts for registered customers have always been persisted, the introduction of the API brings possibility to persist carts of guest customers. - -Only one cart can be created for each guest customer. - -{% info_block infoBox %} -See [Managing Carts of Registered Users](/docs/scos/dev/glue-api-guides/{{page.version}}/managing-carts/carts-of-registered-users/managing-carts-of-registered-users.html -{% endinfo_block %} to learn how you can manage carts of registered users via Glue API.) - - -## Installation -For detailed information on the modules that provide the API functionality and related installation instructions, see: -* [Carts API](/docs/scos/dev/feature-integration-guides/{{page.version}}/glue-api/glue-api-cart-feature-integration.html) -* [Glue API: Measurement Units Feature Integration](/docs/scos/dev/feature-integration-guides/{{page.version}}/glue-api/glue-api-measurement-units-feature-integration.html) -* [Promotions & Discounts API](/docs/scos/dev/feature-integration-guides/{{page.version}}/glue-api/glue-api-promotions-and-discounts-feature-integration.html) - - - -## Resources for Accessing Guest Carts -The `/guest-carts` and `/guest-cart-items` resources provide endpoints to manage carts of users who haven't yet registered in the system or authenticated with the Glue REST API. Such carts provide the possibility for users to place items on a cart without the necessity to provide any registration information. - -Each guest customer is identified by the value of the **X-Anonymous-Customer-Unique-Id** header. The header needs to be passed with each request related to a guest user. Glue REST API does not assign unique IDs to guest customer users. It is the responsibility of the API client to generate and manage unique IDs for all guest user sessions. - -## Creating a Guest Cart -To create a guest cart for an unauthenticated user, place one or more items on a new guest cart. To do this, send the request: - ---- -`POST`**/guest-cart-items** - ---- - - - -### Request -`POST https://glue.mysprykershop.com/guest-cart-items` - -```json -{ - "data": { - "type": "guest-cart-items", - "attributes": { - "sku": "022_21994751", - "quantity": 1 - } - } -} -``` -`POST https://glue.mysprykershop.com/guest-cart-items?include=sales-units,product-measurement-units` - -```json -{ - "data": { - "type": "guest-cart-items", - "attributes": { - "sku": "cable-vga-1-2", - "quantity": 3, - "salesUnit": { - "id": 33, - "amount": 4.5 - } - } - } -} -``` -{% info_block infoBox "Cart rules" %} - -To add the promotional product to cart, make sure that the cart fulfills the cart rules for the promotional item. - -{% endinfo_block %} -`POST https://glue.mysprykershop.com/guest-carts/1ce91011-8d60-59ef-9fe0-4493ef3628b2/items?include=cart-rules` - -```json -{ - "data": { - "type": "guest-cart-items", - "attributes": { - "sku": "112_306918001", - "quantity": "1", - "idPromotionalItem": "bfc600e1-5bf1-50eb-a9f5-a37deb796f8a" - } - } -} -``` - -| Header key | Header value example | Required | Description | -|---|---|---|---| -| X-Anonymous-Customer-Unique-Id | 164b-5708-8530 | v | A hyphenated alphanumeric value that is the user's unique identifier. | - - - -| String parameter | Description | Exemplary values | -| --- | --- | --- | -| include | Adds resource relationships to the request. | sales-units, product-measurement-units | - - -| Attribute| Type | Required | Description | -| --- | --- | --- | --- | -| sku | String | v | Specifies the SKU part number of the item to place on the new guest cart. To use promotions, specify the SKU of one of a product being promoted. **Concrete** product SKU required.| -| quantity | String | v | Specifies the number of items to place on the guest cart. If you add a promotional item and the number of products exceeds the number of promotions, the exceeding items will be added without promotional benefits. | -| salesUnit | Object | | List of attributes defining the sales unit to be used for item amount calculation. | -| id | Integer | | A unique identifier of the sales units to calculate the item amount in. | -| amount | Integer | | Amount of the product in the defined sales units. | -| idPromotionalItem | String | |Promotional item ID. You need to specify the ID to apply the promotion benefits. | - -{% info_block infoBox "Conversion" %} - -When defining product amount in sales units, make sure that the correlation between `amount` and `quantity` corresponds to the conversion of the defined sales unit. See [Measurement Units Feature Overview](/docs/scos/user/features/{{page.version}}/measurement-units-feature-overview.html) to learn more. - -{% endinfo_block %} - - -### Response - -
    - Response sample - -```json -{ - "data": { - "type": "guest-carts", - "id": "380e4a19-6faa-5053-89ff-81a1b5a3dd8a", - "attributes": { - "priceMode": "GROSS_MODE", - "currency": "EUR", - "store": "DE", - "name": "Shopping cart", - "isDefault": true, - "totals": { - "expenseTotal": 0, - "discountTotal": 2600, - "taxTotal": 3736, - "subtotal": 26000, - "grandTotal": 23400 - }, - "discounts": [ - { - "displayName": "10% Discount for all orders above", - "amount": 2600, - "code": null - } - ] - }, - "links": { - "self": "https://glue.mysprykershop.com/guest-carts/380e4a19-6faa-5053-89ff-81a1b5a3dd8a" - } - }, - "included": [ - { - "type": "guest-cart-items", - "id": "022_21994751", - "attributes": { - "sku": "022_21994751", - "quantity": 1, - "groupKey": "022_21994751", - "abstractSku": "022", - "amount": null, - "calculations": { - "unitPrice": 26000, - "sumPrice": 26000, - "taxRate": 19, - "unitNetPrice": 0, - "sumNetPrice": 0, - "unitGrossPrice": 26000, - "sumGrossPrice": 26000, - "unitTaxAmountFullAggregation": 3736, - "sumTaxAmountFullAggregation": 3736, - "sumSubtotalAggregation": 26000, - "unitSubtotalAggregation": 26000, - "unitProductOptionPriceAggregation": 0, - "sumProductOptionPriceAggregation": 0, - "unitDiscountAmountAggregation": 2600, - "sumDiscountAmountAggregation": 2600, - "unitDiscountAmountFullAggregation": 2600, - "sumDiscountAmountFullAggregation": 2600, - "unitPriceToPayAggregation": 23400, - "sumPriceToPayAggregation": 23400 - }, - "salesUnit": null, - "selectedProductOptions": [] - }, - "links": { - "self": "https://glue.mysprykershop.com/guest-carts/380e4a19-6faa-5053-89ff-81a1b5a3dd8a/guest-cart-items/022_21994751" - } - } - ] -} -``` - -
    - - -
    - Response sample with product measurement units and sales units - -```json -{ - "data": { - "type": "guest-carts", - "id": "5b598c79-8024-50ec-b682-c0b219387294", - "attributes": { - "priceMode": "GROSS_MODE", - "currency": "EUR", - "store": "DE", - "name": "Shopping cart", - "isDefault": true, - "totals": { - "expenseTotal": 0, - "discountTotal": 0, - "taxTotal": 1437, - "subtotal": 9000, - "grandTotal": 9000 - }, - "discounts": [] - }, - "links": { - "self": "https://glue.mysprykershop.com/guest-carts/5b598c79-8024-50ec-b682-c0b219387294" - } - }, - "included": [ - { - "type": "product-measurement-units", - "id": "METR", - "attributes": { - "name": "Meter", - "defaultPrecision": 100 - }, - "links": { - "self": "https://glue.mysprykershop.com/product-measurement-units/METR" - } - }, - { - "type": "sales-units", - "id": "33", - "attributes": { - "conversion": 1, - "precision": 100, - "isDisplayed": true, - "isDefault": true, - "productMeasurementUnitCode": "METR" - }, - "links": { - "self": "https://glue.mysprykershop.com/concrete-products/cable-vga-1-2/sales-units/33" - }, - "relationships": { - "product-measurement-units": { - "data": [ - { - "type": "product-measurement-units", - "id": "METR" - } - ] - } - } - }, - { - "type": "guest-cart-items", - "id": "cable-vga-1-2_quantity_sales_unit_id_33_amount_1.5_sales_unit_id_33", - "attributes": { - "sku": "cable-vga-1-2", - "quantity": 6, - "groupKey": "cable-vga-1-2_quantity_sales_unit_id_33_amount_1.5_sales_unit_id_33", - "abstractSku": "cable-vga-1", - "amount": "9.0", - "calculations": { - "unitPrice": 1500, - "sumPrice": 9000, - "taxRate": 19, - "unitNetPrice": 0, - "sumNetPrice": 0, - "unitGrossPrice": 1500, - "sumGrossPrice": 9000, - "unitTaxAmountFullAggregation": 239, - "sumTaxAmountFullAggregation": 1437, - "sumSubtotalAggregation": 9000, - "unitSubtotalAggregation": 1500, - "unitProductOptionPriceAggregation": 0, - "sumProductOptionPriceAggregation": 0, - "unitDiscountAmountAggregation": 0, - "sumDiscountAmountAggregation": 0, - "unitDiscountAmountFullAggregation": 0, - "sumDiscountAmountFullAggregation": 0, - "unitPriceToPayAggregation": 1500, - "sumPriceToPayAggregation": 9000 - }, - "salesUnit": { - "id": 33, - "amount": "9.0" - }, - "selectedProductOptions": [] - }, - "links": { - "self": "https://glue.mysprykershop.com/guest-carts/5b598c79-8024-50ec-b682-c0b219387294/guest-cart-items/cable-vga-1-2_quantity_sales_unit_id_33_amount_1.5_sales_unit_id_33" - }, - "relationships": { - "sales-units": { - "data": [ - { - "type": "sales-units", - "id": "33" - } - ] - } - } - } - ] -} -``` - -
    - - - - - - -**General Cart Information** - -| Attribute* | Type | Description | -| --- | --- | --- | -| priceMode | String | Price mode that was active when the cart was created. | -| currency | String | Currency that was selected when the cart was created. | -| store | String | Store for which the cart was created. | -\*Type and ID attributes are not mentioned. - -**Discount information** - -| Attribute* | Type | Description | -| --- | --- | --- | -|displayName |String |Discount name. | -| code | String| Discount code applied to the cart. | -| amount | Integer | Discount amount applied to the cart. | -\*Type and ID attributes are not mentioned. - -**Totals Information** - -| Attribute* | Type | Description | -| --- | --- | --- | -|expenseTotal | String |Total amount of expenses (including e.g. shipping costs). | -| discountTotal | Integer | Total amount of discounts applied to the cart. | -| taxTotal| String | Total amount of taxes to be paid. | -|subTotal | Integer | Subtotal of the cart. | -| grandTotal | Integer | Grand total of the cart. | -\*Type and ID attributes are not mentioned. - -**Cart Item Information** - -| Included resource | Attribute* | Type | Description | -| --- | --- | --- | --- | -| guest-cart-items| sku |String | SKU of the product. | -| guest-cart-items| quantity |Integer |Quantity of the given product in the cart. | -| guest-cart-items| groupKey |String | Unique item identifier. The value is generated based on product parameters. | -| guest-cart-items| amount | Integer | Amount of the products in the cart.| -| guest-cart-items| unitPrice | Integer | Single item price without assuming is it net or gross. This value should be used everywhere a price is disabled. It allows switching the tax mode without side effects. | -| guest-cart-items|sumPrice | Integer |Sum of all items prices calculated. | -| guest-cart-items| taxRate| Integer |Current tax rate in per cent. | -| guest-cart-items| unitNetPrice | Integer | Single item net price. | -| guest-cart-items|sumNetPrice | Integer |Sum of all items' net price. | -| guest-cart-items| unitGrossPrice | Integer |Single item gross price. | -| guest-cart-items| sumGrossPrice | Integer | Sum of items gross price. | -| guest-cart-items| unitTaxAmountFullAggregation | Integer | Total tax amount for a given item with additions. | -| guest-cart-items| sumTaxAmountFullAggregation | Integer | Total tax amount for a given amount of items with additions. | -| guest-cart-items| sumSubtotalAggregation | Integer | Sum of subtotals of the items. | -| guest-cart-items| unitSubtotalAggregation | Integer | Subtotal for the given item. | -| guest-cart-items| unitProductOptionPriceAggregation | Integer |Item total product option price. | -| guest-cart-items| sumProductOptionPriceAggregation | Integer |Item total of product options for the given sum of items. | -| guest-cart-items| unitDiscountAmountAggregation| Integer |Item total discount amount. | -| guest-cart-items|sumDiscountAmountAggregation | Integer | Sum Item total discount amount. | -| guest-cart-items| unitDiscountAmountFullAggregation | Integer | Sum total discount amount with additions.| -| guest-cart-items| sumDiscountAmountFullAggregation| Integer | Item total discount amount with additions. | -| guest-cart-items| unitPriceToPayAggregation | Integer | Item total price to pay after discounts with additions. | -| guest-cart-items|sumPriceToPayAggregation | Integer |Sum of the prices to pay (after discounts). | -| guest-cart-items| salesUnit| Object|List of attributes defining the sales unit to be used for item amount calculation.| -|guest-cart-items|salesUnit.id|Integer|Numeric value the defines the sales units to calculate the item amount in.| -|guest-cart-items|salesUnit.amount| Integer|Amount of product in the defined sales units. | -| sales-units|conversion|Integer| Factor to convert a value from sales to base unit. If it is "null", the information is taken from the global conversions.| -|sales-units|precision|Integer|Ratio between a sales unit and a base unit.| -|sales-units|is displayed|Boolean|Defines if the sales unit is displayed on the product details page.| -|sales-units|is default|Boolean|Defines if the sales unit is selected by default on the product details page.| -|sales-units|measurementUnitCode|String|Code of the measurement unit. | -|product-measurement-units|name|String|Measurement unit name.| -|product-measurement-units|defaultPrecision|Integer|The default ratio between a sales unit and a base unit. It is used when precision for a related sales unit is not specified.| -\*Type and ID attributes are not mentioned. - - - - - - -## Retrieving a Guest Cart - -To retrieve a guest cart with a guest user ID, send the request: - ---- -`GET` **/guest-carts** - ---- - -{% info_block infoBox "Guest cart ID" %} - - - -Even though guest users have one cart by default, you can optionally specify its ID when retrieving it. To do that, use the following endpoint. The information in this section is valid for both of the endpoints. - -`GET` **/guest-carts/*{% raw %}{{{% endraw %}guestcartuuid{% raw %}}}{% endraw %}*** - -{% endinfo_block %} - - - -#### Request - - -| Request | Usage | -| --- | --- | -| `GET https://glue.mysprykershop.com/guest-carts?include=concrete-products` | Retrieve information about a guest cart with the concrete products included. | -| `GET https://glue.mysprykershop.com/guest-carts?include=sales-units,product-measurement-units` | Retrieve information about a guest cart with the amount of items defined in sales units and related product measurement units included. | -| `GET https://glue.mysprykershop.com/guest-carts?include=promotional-items` | Retrieve information about promotional items for the guest cart. | -| `GET https://glue.mysprykershop.com/guest-carts?include=promotional-items,abstract-products,concrete-product` | Retrieve detailed information on the promotional items for the guest cart. | -| `GET https://glue.mysprykershop.com/guest-carts?include=concrete-products,product-labels` | Retrieve information about a guest cart with concrete products and product labels. | - - -| Header key | Header value example | Required | Description | -|---|---|---|---| -| X-Anonymous-Customer-Unique-Id | 164b-5708-8530 | v | A hyphenated alphanumeric value that is the user's unique identifier. It is passed in the X-Anonymous-Customer-Unique-Id header when [creating a guest cart](#creating-a-guest-cart). | - -| String parameter | Description | Exemplary values | -| --- | --- | --- | -| include | Adds resource relationships to the request. | concrete-products, product-measurement-units, sales-units, promotional-items, product labels | - -{% info_block infoBox "Included resources" %} - -* To retrieve information on promotional products in the cart, include `promotional-items` with `abstract-products` and `concrete-products`. -* To retrieve information on product labels in the cart, include `concrete-products` with `product-labels` and `concrete-products`. - -{% endinfo_block %} - - - - -#### Response - -
    - Response sample with concrete products - -```json -{ - "data": [ - { - "type": "guest-carts", - "id": "5b598c79-8024-50ec-b682-c0b219387294", - "attributes": { - "priceMode": "GROSS_MODE", - "currency": "EUR", - "store": "DE", - "name": "Shopping cart", - "isDefault": true, - "totals": { - "expenseTotal": 0, - "discountTotal": 0, - "taxTotal": 1437, - "subtotal": 9000, - "grandTotal": 9000 - }, - "discounts": [] - }, - "links": { - "self": "https://glue.mysprykershop.com/guest-carts/5b598c79-8024-50ec-b682-c0b219387294" - } - } - ], - "links": { - "self": "https://glue.mysprykershop.com/guest-cart-items?include=concrete-products" - }, - "included": [ - { - "type": "concrete-products", - "id": "cable-vga-1-2", - "attributes": { - "sku": "cable-vga-1-2", - "isDiscontinued": false, - "discontinuedNote": null, - "averageRating": null, - "reviewCount": 0, - "name": "VGA cable as long as you want", - "description": "Screw-in VGA cable with 15-pin male input and output.

    Supports resolutions at 800x600 (SVGA), 1024x768 (XGA), 1600x1200 (UXGA), 1080p (Full HD), 1920x1200 (WUXGA), and up for high resolution LCD and LED monitors.

    The VGA cord engineered with molded strain relief connectors for durability, grip treads for easy plugging and unplugging, and finger-tightened screws for a secure connection.

    Gold-plated connectors; 100% bare copper conductors.

    Links VGA-equipped computer to any display with 15-pin VGA port.", - "attributes": { - "packaging_unit": "As long as you want" - }, - "superAttributesDefinition": [ - "packaging_unit" - ], - "metaTitle": "", - "metaKeywords": "", - "metaDescription": "", - "attributeNames": { - "packaging_unit": "Packaging unit" - } - }, - "links": { - "self": "https://glue.mysprykershop.com/concrete-products/cable-vga-1-2" - } - }, - { - "type": "guest-cart-items", - "id": "cable-vga-1-2_quantity_sales_unit_id_33_amount_1.5_sales_unit_id_33", - "attributes": { - "sku": "cable-vga-1-2", - "quantity": 6, - "groupKey": "cable-vga-1-2_quantity_sales_unit_id_33_amount_1.5_sales_unit_id_33", - "abstractSku": "cable-vga-1", - "amount": "9.0", - "calculations": { - "unitPrice": 1500, - "sumPrice": 9000, - "taxRate": 19, - "unitNetPrice": 0, - "sumNetPrice": 0, - "unitGrossPrice": 1500, - "sumGrossPrice": 9000, - "unitTaxAmountFullAggregation": 239, - "sumTaxAmountFullAggregation": 1437, - "sumSubtotalAggregation": 9000, - "unitSubtotalAggregation": 1500, - "unitProductOptionPriceAggregation": 0, - "sumProductOptionPriceAggregation": 0, - "unitDiscountAmountAggregation": 0, - "sumDiscountAmountAggregation": 0, - "unitDiscountAmountFullAggregation": 0, - "sumDiscountAmountFullAggregation": 0, - "unitPriceToPayAggregation": 1500, - "sumPriceToPayAggregation": 9000 - }, - "salesUnit": { - "id": 33, - "amount": "9.0" - }, - "selectedProductOptions": [] - }, - "links": { - "self": "https://glue.mysprykershop.com/guest-carts/5b598c79-8024-50ec-b682-c0b219387294/guest-cart-items/cable-vga-1-2_quantity_sales_unit_id_33_amount_1.5_sales_unit_id_33" - }, - "relationships": { - "concrete-products": { - "data": [ - { - "type": "concrete-products", - "id": "cable-vga-1-2" - } - ] - } - } - } - ] -} -``` - -

    - -
    - Response sample with product measurement units and sales units - -```json -{ - "data": [ - { - "type": "guest-carts", - "id": "5b598c79-8024-50ec-b682-c0b219387294", - "attributes": { - "priceMode": "GROSS_MODE", - "currency": "EUR", - "store": "DE", - "name": "Shopping cart", - "isDefault": true, - "totals": { - "expenseTotal": 0, - "discountTotal": 0, - "taxTotal": 1437, - "subtotal": 9000, - "grandTotal": 9000 - }, - "discounts": [] - }, - "links": { - "self": "https://glue.mysprykershop.com/guest-carts/5b598c79-8024-50ec-b682-c0b219387294" - }, - "relationships": { - "guest-cart-items": { - "data": [ - { - "type": "guest-cart-items", - "id": "cable-vga-1-2_quantity_sales_unit_id_33_amount_1.5_sales_unit_id_33" - } - ] - } - } - } - ], - "links": { - "self": "https://glue.mysprykershop.com/guest-cart-items?include=guest-cart-items,sales-units,product-measurement-units" - }, - "included": [ - { - "type": "product-measurement-units", - "id": "METR", - "attributes": { - "name": "Meter", - "defaultPrecision": 100 - }, - "links": { - "self": "https://glue.mysprykershop.com/product-measurement-units/METR" - } - }, - { - "type": "sales-units", - "id": "33", - "attributes": { - "conversion": 1, - "precision": 100, - "isDisplayed": true, - "isDefault": true, - "productMeasurementUnitCode": "METR" - }, - "links": { - "self": "https://glue.mysprykershop.com/concrete-products/cable-vga-1-2/sales-units/33" - }, - "relationships": { - "product-measurement-units": { - "data": [ - { - "type": "product-measurement-units", - "id": "METR" - } - ] - } - } - }, - { - "type": "guest-cart-items", - "id": "cable-vga-1-2_quantity_sales_unit_id_33_amount_1.5_sales_unit_id_33", - "attributes": { - "sku": "cable-vga-1-2", - "quantity": 6, - "groupKey": "cable-vga-1-2_quantity_sales_unit_id_33_amount_1.5_sales_unit_id_33", - "abstractSku": "cable-vga-1", - "amount": "9.0", - "calculations": { - "unitPrice": 1500, - "sumPrice": 9000, - "taxRate": 19, - "unitNetPrice": 0, - "sumNetPrice": 0, - "unitGrossPrice": 1500, - "sumGrossPrice": 9000, - "unitTaxAmountFullAggregation": 239, - "sumTaxAmountFullAggregation": 1437, - "sumSubtotalAggregation": 9000, - "unitSubtotalAggregation": 1500, - "unitProductOptionPriceAggregation": 0, - "sumProductOptionPriceAggregation": 0, - "unitDiscountAmountAggregation": 0, - "sumDiscountAmountAggregation": 0, - "unitDiscountAmountFullAggregation": 0, - "sumDiscountAmountFullAggregation": 0, - "unitPriceToPayAggregation": 1500, - "sumPriceToPayAggregation": 9000 - }, - "salesUnit": { - "id": 33, - "amount": "9.0" - }, - "selectedProductOptions": [] - }, - "links": { - "self": "https://glue.mysprykershop.com/guest-carts/5b598c79-8024-50ec-b682-c0b219387294/guest-cart-items/cable-vga-1-2_quantity_sales_unit_id_33_amount_1.5_sales_unit_id_33" - }, - "relationships": { - "sales-units": { - "data": [ - { - "type": "sales-units", - "id": "33" - } - ] - } - } - } - ] -} -``` - -
    - -
    -Response sample with a promotional item - -```json -{ - "data": { - "type": "guest-carts", - "id": "1ce91011-8d60-59ef-9fe0-4493ef3628b2", - "attributes": {...}, - "links": {...}, - "relationships": { - "promotional-items": { - "data": [ - { - "type": "promotional-items", - "id": "bfc600e1-5bf1-50eb-a9f5-a37deb796f8a" - } - ] - } - } - }, - "included": [ - { - "type": "promotional-items", - "id": "bfc600e1-5bf1-50eb-a9f5-a37deb796f8a", - "attributes": { - "sku": "112", - "quantity": 2 - }, - "links": { - "self": "https://glue.myspsrykershop.com/promotional-items/bfc600e1-5bf1-50eb-a9f5-a37deb796f8a" - } - } - ] -} -``` -
    -
    - -
    -Response sample with details on a promotional item - -```json -{ - "data": [ - { - "type": "guest-carts", - "id": "1ce91011-8d60-59ef-9fe0-4493ef3628b2", - "attributes": {...}, - "links": {...}, - "relationships": { - "promotional-items": { - "data": [ - { - "type": "promotional-items", - "id": "bfc600e1-5bf1-50eb-a9f5-a37deb796f8a" - } - ] - } - } - }, - { - "type": "carts", - "id": "1f1662c4-01e1-50d1-877d-95534d1b1833", - "attributes": {...}, - "links": {...} - } - ], - "links": {...}, - "included": [ - { - "type": "concrete-products", - "id": "112_312526171", - "attributes": {...} - }, - "links": {...} - }, - { - "type": "concrete-products", - "id": "112_306918001", - "attributes": {...}, - "links": {...}, - { - "type": "concrete-products", - "id": "112_312526191", - "attributes": {...}, - "links": {...}, - { - "type": "concrete-products", - "id": "112_312526172", - "attributes": {....}, - "links": {...}, - { - "type": "concrete-products", - "id": "112_306918002", - "attributes": {...}, - "links": {...}, - { - "type": "concrete-products", - "id": "112_312526192", - "attributes": {...}, - "links": {...}, - { - "type": "concrete-products", - "id": "112_306918003", - "attributes": {...}, - "links": {...}, - { - "type": "concrete-products", - "id": "112_312526193", - "attributes": {...}, - "links": {...}, - { - "type": "abstract-products", - "id": "112", - "attributes": {...}, - "links": {...}, - "relationships": { - "concrete-products": { - "data": [ - { - "type": "concrete-products", - "id": "112_312526171" - }, - { - "type": "concrete-products", - "id": "112_306918001" - }, - { - "type": "concrete-products", - "id": "112_312526191" - }, - { - "type": "concrete-products", - "id": "112_312526172" - }, - { - "type": "concrete-products", - "id": "112_306918002" - }, - { - "type": "concrete-products", - "id": "112_312526192" - }, - { - "type": "concrete-products", - "id": "112_306918003" - }, - { - "type": "concrete-products", - "id": "112_312526193" - } - ] - } - } - }, - { - "type": "promotional-items", - "id": "bfc600e1-5bf1-50eb-a9f5-a37deb796f8a", - "attributes": { - "sku": "112", - "quantity": 2 - }, - "links": { - "self": "https://glue.mysprykershop.com/promotional-items/bfc600e1-5bf1-50eb-a9f5-a37deb796f8a" - }, - "relationships": { - "abstract-products": { - "data": [ - { - "type": "abstract-products", - "id": "112" - } - ] - } - } - } - ] -} -``` -
    -
    - -
    - Response sample with concrete products and product labels - -```json -{ - "data": [ - { - "type": "guest-carts", - "id": "c52f815e-ac61-5fc6-8cb7-0e5de5a077e5", - "attributes": { - "priceMode": "GROSS_MODE", - "currency": "EUR", - "store": "DE", - "name": "Shopping cart", - "isDefault": true, - "totals": { - "expenseTotal": 0, - "discountTotal": 2975, - "taxTotal": 4275, - "subtotal": 29747, - "grandTotal": 26772, - "priceToPay": 26772 - }, - "discounts": [ - { - "displayName": "10% Discount for all orders above", - "amount": 2975, - "code": null - } - ] - }, - "links": { - "self": "https://glue.mysprykershop.com/guest-carts/c52f815e-ac61-5fc6-8cb7-0e5de5a077e5" - } - } - ], - "links": { - "self": "https://glue.mysprykershop.com/guest-cart-items?include=concrete-products,product-labels" - }, - "included": [ - { - "type": "product-labels", - "id": "3", - "attributes": { - "name": "New product", - "isExclusive": false, - "position": 1, - "frontEndReference": null - }, - "links": { - "self": "https://glue.mysprykershop.com/product-labels/3" - } - }, - { - "type": "concrete-products", - "id": "035_17360369", - "attributes": { - "sku": "035_17360369", - "isDiscontinued": false, - "discontinuedNote": null, - "averageRating": 4.7, - "reviewCount": 3, - "name": "Canon PowerShot N", - "description": "Creative Shot Originality is effortless with Creative Shot. Simply take a shot and the camera will analyse the scene then automatically generate five creative images plus the original unaltered photo - capturing the same subject in a variety of artistic and surprising ways. The unique symmetrical, metal-bodied design is strikingly different with an ultra-modern minimalist style - small enough to keep in your pocket and stylish enough to take anywhere. HS System excels in low light allowing you to capture the real atmosphere of the moment without flash or a tripod. Advanced DIGIC 5 processing and a high-sensitivity 12.1 Megapixel CMOS sensor give excellent image quality in all situations.", - "attributes": { - "focus": "TTL", - "field_of_view": "100%", - "display": "LCD", - "sensor_type": "CMOS", - "brand": "Canon", - "color": "Silver" - }, - "superAttributesDefinition": [ - "color" - ], - "metaTitle": "Canon PowerShot N", - "metaKeywords": "Canon,Entertainment Electronics", - "metaDescription": "Creative Shot Originality is effortless with Creative Shot. Simply take a shot and the camera will analyse the scene then automatically generate five creat", - "attributeNames": { - "focus": "Focus", - "field_of_view": "Field of view", - "display": "Display", - "sensor_type": "Sensor type", - "brand": "Brand", - "color": "Color" - } - }, - "links": { - "self": "https://glue.mysprykershop.com/concrete-products/035_17360369" - }, - "relationships": { - "product-labels": { - "data": [ - { - "type": "product-labels", - "id": "3" - } - ] - } - } - }, - { - "type": "guest-cart-items", - "id": "035_17360369", - "attributes": { - "sku": "035_17360369", - "quantity": 1, - "groupKey": "035_17360369", - "abstractSku": "035", - "amount": null, - "productOfferReference": null, - "merchantReference": null, - "calculations": { - "unitPrice": 29747, - "sumPrice": 29747, - "taxRate": 19, - "unitNetPrice": 0, - "sumNetPrice": 0, - "unitGrossPrice": 29747, - "sumGrossPrice": 29747, - "unitTaxAmountFullAggregation": 4275, - "sumTaxAmountFullAggregation": 4275, - "sumSubtotalAggregation": 29747, - "unitSubtotalAggregation": 29747, - "unitProductOptionPriceAggregation": 0, - "sumProductOptionPriceAggregation": 0, - "unitDiscountAmountAggregation": 2975, - "sumDiscountAmountAggregation": 2975, - "unitDiscountAmountFullAggregation": 2975, - "sumDiscountAmountFullAggregation": 2975, - "unitPriceToPayAggregation": 26772, - "sumPriceToPayAggregation": 26772 - }, - "salesUnit": null, - "selectedProductOptions": [] - }, - "links": { - "self": "https://glue.mysprykershop.com/guest-carts/c52f815e-ac61-5fc6-8cb7-0e5de5a077e5/guest-cart-items/035_17360369" - }, - "relationships": { - "concrete-products": { - "data": [ - { - "type": "concrete-products", - "id": "035_17360369" - } - ] - } - } - } - ] -} -``` - -
    - - -| Included resource | Attribute | Type | Description | -| --- | --- | --- | --- | -| promotional-items | id | String | Unique identifier of the promotional item. The ID can be used to apply the promotion to the given purchase. | -| promotional-items | quantity | Integer | Specifies how many promotions can be applied to the given purchase. | -| promotional-items | sku | String | SKU of the promoted **abstract** product. | -| product-labels | name | String | Specifies the label name. | -| product-labels | isExclusive | Boolean | Indicates whether the label is `exclusive`.
    If the attribute is set to true, the current label takes precedence over other labels the product might have. This means that only the current label should be displayed for the product, and all other possible labels should be hidden. | -| product-labels | position | Integer | Indicates the label priority.
    Labels should be indicated on the frontend according to their priority, from the highest (**1**) to the lowest, unless a product has a label with the `isExclusive` attribute set.| -| product-labels | frontEndReference | String |Specifies the label custom label type (CSS class).
    If the attribute is an empty string, the label should be displayed using the default CSS style. | - -Find all other related attribute descriptions in [Creating a Guest Cart](#creating-guest-carts-response-attributes). - - -## Adding Items to Guest Carts -To add items to a guest cart, send the request: - ---- -`POST` **/guest-cart-items** - ---- - -{% info_block infoBox "Guest cart ID" %} - - - -Even though guest users have one cart by default, you can optionally specify its ID when adding items. To do that, use the following endpoint. The information in this section is valid for both of the endpoints. - -`POST` **/guest-carts/*{% raw %}{{{% endraw %}guestcartuuid{% raw %}}}{% endraw %}*/guest-cart-items** - -{% endinfo_block %} - - -### Request - - -`POST https://glue.mysprykershop.com/guest-cart-items` - -```json -{ - "data": { - "type": "guest-cart-items", - "attributes": { - "sku": "022_21994751", - "quantity": 1 - } - } -} -``` - -`POST https://glue.mysprykershop.com/guest-cart-items?include=sales-units,product-measurement-units` - -```json -{ - "data": { - "type": "guest-cart-items", - "attributes": { - "sku": "cable-vga-1-2", - "quantity": 3, - "salesUnit": { - "id": 33, - "amount": 4.5 - } - } - } -} -``` - -{% info_block infoBox "Cart rules" %} - -To add the promotional product to cart, make sure that the cart fulfills the cart rules for the promotional item. - -{% endinfo_block %} - -`POST https://glue.mysprykershop.com/guest-carts/1ce91011-8d60-59ef-9fe0-4493ef3628b2/items?include=cart-rules` - -```json -{ - "data": { - "type": "guest-cart-items", - "attributes": { - "sku": "112_306918001", - "quantity": "1", - "idPromotionalItem": "bfc600e1-5bf1-50eb-a9f5-a37deb796f8a" - } - } -} -``` -Find all the related request attribute descriptions in [Creating a Guest Cart](#creating-guest-carts-request-attributes). - -| Header key | Header value example | Required | Description | -|---|---|---|---| -| X-Anonymous-Customer-Unique-Id | 164b-5708-8530 | v | A hyphenated alphanumeric value that is the user's unique identifier. It is passed in the X-Anonymous-Customer-Unique-Id header when [creating a guest cart](#creating-a-guest-cart). | - -| String parameter | Description | Exemplary values | -| --- | --- | --- | -| include | Adds resource relationships to the request. | guest-cart-items, concrete-products, sales-units, cart-rules | -{% info_block infoBox "Included resources" %} - -The `cart-rules` parameter allows you to retrieve detailed information on promotional items in the cart. - -{% endinfo_block %} - -### Response - -
    - Response sample - -```json -{ - "data": { - "type": "guest-carts", - "id": "380e4a19-6faa-5053-89ff-81a1b5a3dd8a", - "attributes": { - "priceMode": "GROSS_MODE", - "currency": "EUR", - "store": "DE", - "name": "Shopping cart", - "isDefault": true, - "totals": { - "expenseTotal": 0, - "discountTotal": 2600, - "taxTotal": 3736, - "subtotal": 26000, - "grandTotal": 23400 - }, - "discounts": [ - { - "displayName": "10% Discount for all orders above", - "amount": 2600, - "code": null - } - ] - }, - "links": { - "self": "https://glue.mysprykershop.com/guest-carts/380e4a19-6faa-5053-89ff-81a1b5a3dd8a" - } - }, - "included": [ - { - "type": "guest-cart-items", - "id": "022_21994751", - "attributes": { - "sku": "022_21994751", - "quantity": 1, - "groupKey": "022_21994751", - "abstractSku": "022", - "amount": null, - "calculations": { - "unitPrice": 26000, - "sumPrice": 26000, - "taxRate": 19, - "unitNetPrice": 0, - "sumNetPrice": 0, - "unitGrossPrice": 26000, - "sumGrossPrice": 26000, - "unitTaxAmountFullAggregation": 3736, - "sumTaxAmountFullAggregation": 3736, - "sumSubtotalAggregation": 26000, - "unitSubtotalAggregation": 26000, - "unitProductOptionPriceAggregation": 0, - "sumProductOptionPriceAggregation": 0, - "unitDiscountAmountAggregation": 2600, - "sumDiscountAmountAggregation": 2600, - "unitDiscountAmountFullAggregation": 2600, - "sumDiscountAmountFullAggregation": 2600, - "unitPriceToPayAggregation": 23400, - "sumPriceToPayAggregation": 23400 - }, - "salesUnit": null, - "selectedProductOptions": [] - }, - "links": { - "self": "https://glue.mysprykershop.com/guest-carts/380e4a19-6faa-5053-89ff-81a1b5a3dd8a/guest-cart-items/022_21994751" - } - } - ] -} -``` - -
    - -
    - Response sample with product measurment units and sales units - -```json -{ - "data": { - "type": "guest-carts", - "id": "5b598c79-8024-50ec-b682-c0b219387294", - "attributes": { - "priceMode": "GROSS_MODE", - "currency": "EUR", - "store": "DE", - "name": "Shopping cart", - "isDefault": true, - "totals": { - "expenseTotal": 0, - "discountTotal": 0, - "taxTotal": 1437, - "subtotal": 9000, - "grandTotal": 9000 - }, - "discounts": [] - }, - "links": { - "self": "https://glue.mysprykershop.com/guest-carts/5b598c79-8024-50ec-b682-c0b219387294" - } - }, - "included": [ - { - "type": "product-measurement-units", - "id": "METR", - "attributes": { - "name": "Meter", - "defaultPrecision": 100 - }, - "links": { - "self": "https://glue.mysprykershop.com/product-measurement-units/METR" - } - }, - { - "type": "sales-units", - "id": "33", - "attributes": { - "conversion": 1, - "precision": 100, - "isDisplayed": true, - "isDefault": true, - "productMeasurementUnitCode": "METR" - }, - "links": { - "self": "https://glue.mysprykershop.com/concrete-products/cable-vga-1-2/sales-units/33" - }, - "relationships": { - "product-measurement-units": { - "data": [ - { - "type": "product-measurement-units", - "id": "METR" - } - ] - } - } - }, - { - "type": "guest-cart-items", - "id": "cable-vga-1-2_quantity_sales_unit_id_33_amount_1.5_sales_unit_id_33", - "attributes": { - "sku": "cable-vga-1-2", - "quantity": 6, - "groupKey": "cable-vga-1-2_quantity_sales_unit_id_33_amount_1.5_sales_unit_id_33", - "abstractSku": "cable-vga-1", - "amount": "9.0", - "calculations": { - "unitPrice": 1500, - "sumPrice": 9000, - "taxRate": 19, - "unitNetPrice": 0, - "sumNetPrice": 0, - "unitGrossPrice": 1500, - "sumGrossPrice": 9000, - "unitTaxAmountFullAggregation": 239, - "sumTaxAmountFullAggregation": 1437, - "sumSubtotalAggregation": 9000, - "unitSubtotalAggregation": 1500, - "unitProductOptionPriceAggregation": 0, - "sumProductOptionPriceAggregation": 0, - "unitDiscountAmountAggregation": 0, - "sumDiscountAmountAggregation": 0, - "unitDiscountAmountFullAggregation": 0, - "sumDiscountAmountFullAggregation": 0, - "unitPriceToPayAggregation": 1500, - "sumPriceToPayAggregation": 9000 - }, - "salesUnit": { - "id": 33, - "amount": "9.0" - }, - "selectedProductOptions": [] - }, - "links": { - "self": "https://glue.mysprykershop.com/guest-carts/5b598c79-8024-50ec-b682-c0b219387294/guest-cart-items/cable-vga-1-2_quantity_sales_unit_id_33_amount_1.5_sales_unit_id_33" - }, - "relationships": { - "sales-units": { - "data": [ - { - "type": "sales-units", - "id": "33" - } - ] - } - } - } - ] -} -``` - -
    - -
    -Response sample: adding a promotional item without the cart-rules relationship - -```json -{ - "data": { - "type": "guest-carts", - "id": "1ce91011-8d60-59ef-9fe0-4493ef3628b2", - "attributes": { - "priceMode": "GROSS_MODE", - "currency": "EUR", - "store": "DE", - "name": "My Cart", - "isDefault": true, - "totals": { - "expenseTotal": 0, - "discountTotal": 13192, - "taxTotal": 15107, - "subtotal": 113207, - "grandTotal": 100015 - }, - "discounts": [ - { - "displayName": "For every purchase above certain value depending on the currency and net/gross price. you get this promotional product for free", - "amount": 2079, - "code": null - }, - { - "displayName": "10% Discount for all orders above", - "amount": 11113, - "code": null - } - ] - }, - "links": { - "self": "https://glue.mysprykershop.com/carts/1ce91011-8d60-59ef-9fe0-4493ef3628b2" - } - } -} -``` -
    -
    - -
    -Response sample: adding a promotional item with the cart-rules relationship - -```json -{ - "data": { - "type": "guest-carts", - "id": "1ce91011-8d60-59ef-9fe0-4493ef3628b2", - "attributes": { - "priceMode": "GROSS_MODE", - "currency": "EUR", - "store": "DE", - "name": "My Cart", - "isDefault": true, - "totals": { - "expenseTotal": 0, - "discountTotal": 13192, - "taxTotal": 15107, - "subtotal": 113207, - "grandTotal": 100015 - }, - "discounts": [ - { - "displayName": "For every purchase above certain value depending on the currency and net/gross price. you get this promotional product for free", - "amount": 2079, - "code": null - }, - { - "displayName": "10% Discount for all orders above", - "amount": 11113, - "code": null - } - ] - }, - "links": { - "self": "https://glue.mysprykershop.com/carts/1ce91011-8d60-59ef-9fe0-4493ef3628b2" - }, - "relationships": { - "cart-rules": { - "data": [ - { - "type": "cart-rules", - "id": "6" - }, - { - "type": "cart-rules", - "id": "1" - } - ] - } - } - }, - "included": [ - { - "type": "items", - "id": "134_29759322", - "attributes": { - "sku": "134_29759322", - "quantity": "1", - "groupKey": "134_29759322", - "abstractSku": "134", - "amount": null, - "calculations": { - "unitPrice": 1879, - "sumPrice": 1879, - "taxRate": 19, - "unitNetPrice": 0, - "sumNetPrice": 0, - "unitGrossPrice": 1879, - "sumGrossPrice": 1879, - "unitTaxAmountFullAggregation": 270, - "sumTaxAmountFullAggregation": 270, - "sumSubtotalAggregation": 1879, - "unitSubtotalAggregation": 1879, - "unitProductOptionPriceAggregation": 0, - "sumProductOptionPriceAggregation": 0, - "unitDiscountAmountAggregation": 188, - "sumDiscountAmountAggregation": 188, - "unitDiscountAmountFullAggregation": 188, - "sumDiscountAmountFullAggregation": 188, - "unitPriceToPayAggregation": 1691, - "sumPriceToPayAggregation": 1691 - }, - "salesUnit": null, - "selectedProductOptions": [] - }, - "links": { - "self": "https://glue.mysprykershop.com/carts/1ce91011-8d60-59ef-9fe0-4493ef3628b2/items/134_29759322" - } - }, - { - "type": "items", - "id": "118_29804739", - "attributes": { - "sku": "118_29804739", - "quantity": "1", - "groupKey": "118_29804739", - "abstractSku": "118", - "amount": null, - "calculations": { - "unitPrice": 6000, - "sumPrice": 6000, - "taxRate": 0, - "unitNetPrice": 0, - "sumNetPrice": 0, - "unitGrossPrice": 6000, - "sumGrossPrice": 6000, - "unitTaxAmountFullAggregation": 0, - "sumTaxAmountFullAggregation": 0, - "sumSubtotalAggregation": 6000, - "unitSubtotalAggregation": 6000, - "unitProductOptionPriceAggregation": 0, - "sumProductOptionPriceAggregation": 0, - "unitDiscountAmountAggregation": 600, - "sumDiscountAmountAggregation": 600, - "unitDiscountAmountFullAggregation": 600, - "sumDiscountAmountFullAggregation": 600, - "unitPriceToPayAggregation": 5400, - "sumPriceToPayAggregation": 5400 - }, - "salesUnit": null, - "selectedProductOptions": [] - }, - "links": { - "self": "https://glue.mysprykershop.com/carts/1ce91011-8d60-59ef-9fe0-4493ef3628b2/items/118_29804739" - } - }, - { - "type": "items", - "id": "139_24699831", - "attributes": { - "sku": "139_24699831", - "quantity": "1", - "groupKey": "139_24699831", - "abstractSku": "139", - "amount": null, - "calculations": { - "unitPrice": 3454, - "sumPrice": 3454, - "taxRate": 19, - "unitNetPrice": 0, - "sumNetPrice": 0, - "unitGrossPrice": 3454, - "sumGrossPrice": 3454, - "unitTaxAmountFullAggregation": 496, - "sumTaxAmountFullAggregation": 496, - "sumSubtotalAggregation": 3454, - "unitSubtotalAggregation": 3454, - "unitProductOptionPriceAggregation": 0, - "sumProductOptionPriceAggregation": 0, - "unitDiscountAmountAggregation": 345, - "sumDiscountAmountAggregation": 345, - "unitDiscountAmountFullAggregation": 345, - "sumDiscountAmountFullAggregation": 345, - "unitPriceToPayAggregation": 3109, - "sumPriceToPayAggregation": 3109 - }, - "salesUnit": null, - "selectedProductOptions": [] - }, - "links": { - "self": "https://glue.mysprykershop.com/carts/1ce91011-8d60-59ef-9fe0-4493ef3628b2/items/139_24699831" - } - }, - { - "type": "items", - "id": "136_24425591", - "attributes": { - "sku": "136_24425591", - "quantity": 3, - "groupKey": "136_24425591", - "abstractSku": "136", - "amount": null, - "calculations": { - "unitPrice": 33265, - "sumPrice": 99795, - "taxRate": 19, - "unitNetPrice": 0, - "sumNetPrice": 0, - "unitGrossPrice": 33265, - "sumGrossPrice": 99795, - "unitTaxAmountFullAggregation": 4780, - "sumTaxAmountFullAggregation": 14341, - "sumSubtotalAggregation": 99795, - "unitSubtotalAggregation": 33265, - "unitProductOptionPriceAggregation": 0, - "sumProductOptionPriceAggregation": 0, - "unitDiscountAmountAggregation": 3327, - "sumDiscountAmountAggregation": 9980, - "unitDiscountAmountFullAggregation": 3327, - "sumDiscountAmountFullAggregation": 9980, - "unitPriceToPayAggregation": 29938, - "sumPriceToPayAggregation": 89815 - }, - "salesUnit": null, - "selectedProductOptions": [] - }, - "links": { - "self": "https://glue.mysprykershop.com/carts/1ce91011-8d60-59ef-9fe0-4493ef3628b2/items/136_24425591" - } - }, - { - "type": "items", - "id": "112_306918001-promotion-1", - "attributes": { - "sku": "112_306918001", - "quantity": "1", - "groupKey": "112_306918001-promotion-1", - "abstractSku": "112", - "amount": null, - "calculations": { - "unitPrice": 2079, - "sumPrice": 2079, - "taxRate": 0, - "unitNetPrice": 0, - "sumNetPrice": 0, - "unitGrossPrice": 2079, - "sumGrossPrice": 2079, - "unitTaxAmountFullAggregation": 0, - "sumTaxAmountFullAggregation": 0, - "sumSubtotalAggregation": 2079, - "unitSubtotalAggregation": 2079, - "unitProductOptionPriceAggregation": 0, - "sumProductOptionPriceAggregation": 0, - "unitDiscountAmountAggregation": 2079, - "sumDiscountAmountAggregation": 2079, - "unitDiscountAmountFullAggregation": 2079, - "sumDiscountAmountFullAggregation": 2079, - "unitPriceToPayAggregation": 0, - "sumPriceToPayAggregation": 0 - }, - "salesUnit": null, - "selectedProductOptions": [] - }, - "links": { - "self": "https://glue.mysprykershop.com/carts/1ce91011-8d60-59ef-9fe0-4493ef3628b2/items/112_306918001-promotion-1" - } - }, - { - "type": "cart-rules", - "id": "6", - "attributes": { - "amount": 2079, - "code": null, - "discountType": "cart_rule", - "displayName": "For every purchase above certain value depending on the currency and net/gross price. you get this promotional product for free", - "isExclusive": false, - "expirationDateTime": "2020-12-31 00:00:00.000000", - "discountPromotionAbstractSku": "112", - "discountPromotionQuantity": 2 - }, - "links": { - "self": "https://glue.mysprykershop.com/cart-rules/6" - } - }, - { - "type": "cart-rules", - "id": "1", - "attributes": { - "amount": 11113, - "code": null, - "discountType": "cart_rule", - "displayName": "10% Discount for all orders above", - "isExclusive": false, - "expirationDateTime": "2020-12-31 00:00:00.000000", - "discountPromotionAbstractSku": null, - "discountPromotionQuantity": null - }, - "links": { - "self": "https://glue.mysprykershop.com/cart-rules/1" - } - } - ] -} -``` -
    -
    - - -**Cart Rules Information** - -| Attribute* | Type | Description | -| --- | --- | --- | -| amount | Integer | Amount of the discount in cents. | -| code | String | Discount code. | -| discountType | String | Discount type. | -| displayName | String | Discount name. | -| isExclusive | Boolean | Indicates whether the discount is exclusive. | -| expirationDateTime | DateTimeUtc | Discount expiration time in UTC time format. | -| discountPromotionAbstractSku | String | SKU of the product to which the discount applies. If the discount can be applied to any product, the value of the attribute is **null**. | -| discountPromotionQuantity | String | Quantity of the product required to be able to apply the discount. If the discount can be applied to any number of products, the value of the attribute is **null**. | -\*Type and ID attributes are not mentioned. -Find all other related attribute descriptions in [Creating a Guest Cart](#creating-guest-carts-response-attributes) - - - -## Removing Items from Guest Carts -To remove an item send the request - ---- -`DELETE` **/guest-carts/guest-cart-items/*{% raw %}{{{% endraw %}concrete_product_sku{% raw %}}}{% endraw %}*** - ---- - - -| Path parameter | Description | -| --- | --- | -| {% raw %}{{{% endraw %}concrete_product_sku{% raw %}}}{% endraw %} | SKU of a concrete product to add. | - -{% info_block infoBox "Guest cart ID" %} - - -Even though guest users have one cart by default, you can optionally specify its ID when removing items. To do that, use the following endpoint. The information in this section is valid for both of the endpoints. - -`DELETE` **/guest-carts/*{% raw %}{{{% endraw %}guestCartId{% raw %}}}{% endraw %}*/guest-cart-items/*{% raw %}{{{% endraw %}concrete_product_sku{% raw %}}}{% endraw %}*** - -{% endinfo_block %} - - -### Request - -Request sample: `DELETE https://glue.mysprykershop.com/guest-carts/2506b65c-164b-5708-8530-94ed7082e802/guest-cart-items/177_25913296` - - - -| Header key | Header value example | Required | Description | -|---|---|---|---| -| X-Anonymous-Customer-Unique-Id | 164b-5708-8530 | v | A hyphenated alphanumeric value that is the user's unique identifier. It is passed in the X-Anonymous-Customer-Unique-Id header when [creating a guest cart](#creating-a-guest-cart). | - - -### Response -If the item is deleted successfully, the endpoint responds with the **204 No Content** status code. - - - -## Changing Item Quantity in a Guest Cart -To change item quantity, send the request: - ---- -`PATCH` **/guest-carts/guest-cart-items/*{% raw %}{{{% endraw %}concrete_product_sku{% raw %}}}{% endraw %}*** - ---- - -{% info_block infoBox "Guest cart ID" %} - - -Even though guest users have one cart by default, you can optionally specify its ID when chaging item quantity. To do that, use the following endpoint. The information in this section is valid for both of the endpoints. - -`PATCH` **/guest-carts/*{% raw %}{{{% endraw %}guestCartId{% raw %}}}{% endraw %}*/guest-cart-items/*{% raw %}{{{% endraw %}concrete_product_sku{% raw %}}}{% endraw %}*** - -{% endinfo_block %} - - -### Request - -Request sample: `PATCH https://glue.mysprykershop.com/guest-carts/2506b65c-164b-5708-8530-94ed7082e802/guest-cart-items/177_25913296` -```js -{ - "data": { - "type": "guest-cart-items", - "attributes": { - "sku": "209_12554247", - "quantity": 10 - } - } -} -``` - -| Header key | Header value example | Required | Description | -|---|---|---|---| -| X-Anonymous-Customer-Unique-Id | 164b-5708-8530 | v | A hyphenated alphanumeric value that is the user's unique identifier. It is passed in the X-Anonymous-Customer-Unique-Id header when [creating a guest cart](#creating-a-guest-cart). | - - - -|Attribute |Type | Required | Description | -| --- | --- | --- | --- | -| sku | String | v | SKU of the item to be updated. | -| quantity | String | v | Quantity of the item to be set. | - - - - -### Response -In case of a successful update, the endpoint responds with a **RestCartsResponse** withthe updated quantity. - - -## Assigning a Guest Cart to a Registered Customer - -Guest carts are anonymous as they are not related to any user. If a user registers or logs in, the guest cart is automatically assigned to their account. - -To assign a guest cart to a customer, for example, merge the carts, include the unique identifier associated with the customer in the *X-Anonymous-Customer-Unique-Id* header of the authentication request if it is an existing customer, or request to create a customer account if it is a new one. - -Upon login, the behavior depends on whether your project is a single cart or [multiple cart](/docs/scos/user/features/{{page.version}}/multiple-carts-feature-overview.html) environment: - -* In a **single cart** environment, the products in the guest cart are added to the customers' own cart; -* In a **multiple cart** environment, the guest cart is converted to a regular user cart and added to the list of the customers' own carts. - -The workflow is displayed in the diagram below: - -![image](https://spryker.s3.eu-central-1.amazonaws.com/docs/Glue+API/Glue+API+Storefront+Guides/Managing+Carts/Managing+Guest+Carts/assigning-guest-cart-to-registered-user.png) - -Below, you can see an examplary workflow for converting a guest cart into a regular cart: - -1. The customer adds items to a guest cart. - -Request sample: `POST https://glue.myspsrykershop.com/guest-cart-items` -```json -{ - "data": { - "type": "guest-cart-items", - "attributes": { - "sku": "022_21994751", - "quantity": 5 - } - } -} -``` - -| Header key | Header value | Description | -|---|---|---|---| -| X-Anonymous-Customer-Unique-Id | guest-user-001 | A hyphenated alphanumeric value that is the user's unique identifier. | - - - -**Response sample** -```json -{ - "data": { - "type": "guest-carts", - "id": "9183f604-9b2c-53d9-acbf-cf59b9b2ff9f", - "attributes": {...}, - "links": {...} - }, - "included": [...] -} -``` - - - - -2. The customer logs in. - -Request sample: `POST https://glue.myspsrykershop.com/access-tokens` -```json -{ - "data": { - "type": "access-tokens", - "attributes": { - "username": "john.doe@example.com", - "password": "qwerty" - } - } -} -``` - -| Header key | Header value | Description | -|---|---|---|---| -| X-Anonymous-Customer-Unique-Id | guest-user-001 | A hyphenated alphanumeric value that is the user's unique identifier. | - -**Response sample** -```json -{ - "data": { - "type": "access-tokens", - "id": null, - "attributes": { - "tokenType": "Bearer", - "expiresIn": 28800, - "accessToken": "eyJ0eXAiOiJKV1QiLC...", - "refreshToken": "def50200ae2d0...", - "idCompanyUser": "94d58692-c117-5466-8b9f-2ba32dd87c43" - }, - "links": {...} - } -} -``` - -3. The customer requests a list of his own carts. - -Request sample: `GET https://glue.myspsrykershop.com/carts` - - -| Header key | Header value | Description | -|---|---|---|---| -| Authorization | Bearer eyJ0eXAiOiJKV1QiLC... | Authorization token. See [Authentication and Authorization](/docs/scos/dev/glue-api-guides/{{page.version}}/authentication-and-authorization.html) for more details about authorization. | - - -In the **multi-cart** environment, the guest cart has been converted to a regular cart. You can see it in the list of carts with the id `9183f604-9b2c-53d9-acbf-cf59b9b2ff9f`. - -**Response sample** -```json -{ - "data": [ - { - "type": "carts", - "id": "1ce91011-8d60-59ef-9fe0-4493ef3628b2", - "attributes": {...}, - "links": {...} - }, - { - "type": "carts", - "id": "9183f604-9b2c-53d9-acbf-cf59b9b2ff9f", - "attributes": {...}, - "links": {...} - } - ], - "links": {...} -} -``` - -In a **single cart** environment, items from the guest cart have been added to the user's own cart. - -**Response Body** -```json -{ - "data": [ - { - "type": "carts", - "id": "1ce91011-8d60-59ef-9fe0-4493ef3628b2", - "attributes": { - "priceMode": "GROSS_MODE", - "currency": "EUR", - "store": "DE", - "isDefault": true, - "totals": { - "expenseTotal": 0, - "discountTotal": 13000, - "taxTotal": 18681, - "subtotal": 130000, - "grandTotal": 117000 - }, - "discounts": [...] - }, - "links": {...} - }, -``` - - -## Possible Errors - -| Code | Reason | -| --- | --- | -| 101 |A cart with the specified ID was not found. | -| 102 | Failed to add an item to cart. | -| 103| Item could not be found in the cart. | -| 104 | Cart ID is missing. | -|106 |Failed to delete an item. | -| 107 | Failed to create a cart. | -| 109 | Anonymous customer ID is missing. | diff --git a/docs/scos/dev/glue-api-guides/202005.0/managing-carts/managing-carts.md b/docs/scos/dev/glue-api-guides/202005.0/managing-carts/managing-carts.md deleted file mode 100644 index 9760e9041ce..00000000000 --- a/docs/scos/dev/glue-api-guides/202005.0/managing-carts/managing-carts.md +++ /dev/null @@ -1,20 +0,0 @@ ---- -title: Managing Carts -description: This section contains information on managing Spryker's shopping cart functionality for both registered and guest customers. -last_updated: Sep 15, 2020 -template: glue-api-storefront-guide-template -originalLink: https://documentation.spryker.com/v5/docs/managing-carts -originalArticleId: c915be34-8ca5-4d7e-8900-226e7a286011 -redirect_from: - - /v5/docs/managing-carts - - /v5/docs/en/managing-carts ---- - -The **Carts API** provides access to management of customers' shopping carts. The carts come in two different forms: **carts for registered customers** and **carts for guests**. - -In your development, the resources provided by the API can support you in the development of shopping cart functionality for registered and guest customers. -For your convenience, we have created two separate guides based on cart type: - -* [Managing Guest Carts](/docs/scos/dev/glue-api-guides/{{page.version}}/managing-carts/guest-carts/managing-guest-carts.html) -* [Managing Carts of Registered Users](/docs/scos/dev/glue-api-guides/{{page.version}}/managing-carts/carts-of-registered-users/managing-carts-of-registered-users.html) -* [Sharing Company User Carts](/docs/scos/dev/glue-api-guides/{{page.version}}/managing-carts/sharing-company-user-carts/sharing-company-user-carts.html) diff --git a/docs/scos/dev/glue-api-guides/202005.0/managing-carts/sharing-company-user-carts/sharing-company-user-carts.md b/docs/scos/dev/glue-api-guides/202005.0/managing-carts/sharing-company-user-carts/sharing-company-user-carts.md deleted file mode 100644 index 79e00dfd71a..00000000000 --- a/docs/scos/dev/glue-api-guides/202005.0/managing-carts/sharing-company-user-carts/sharing-company-user-carts.md +++ /dev/null @@ -1,562 +0,0 @@ ---- -title: Sharing Company User Carts -description: This article describes the endpoints that provide the possibility to share and unshare carts of registered users. -last_updated: Sep 14, 2020 -template: glue-api-storefront-guide-template -originalLink: https://documentation.spryker.com/v5/docs/sharing-company-user-carts-201907 -originalArticleId: a3b21add-72fb-42a5-ab1e-3b57f53d195b -redirect_from: - - /v5/docs/sharing-company-user-carts-201907 - - /v5/docs/en/sharing-company-user-carts-201907 -related: - - title: Logging In as Company User - link: docs/scos/dev/glue-api-guides/page.version/managing-b2b-account/authenticating-as-a-company-user.html - - title: Managing Carts of Registered Users - link: docs/scos/dev/glue-api-guides/page.version/managing-carts/carts-of-registered-users/managing-carts-of-registered-users.html - - title: Shared Cart Feature Overview - link: docs/scos/user/features/page.version/shared-carts-feature-overview.html - - title: Shared Carts feature integration - link: docs/scos/dev/feature-integration-guides/page.version/shared-carts-feature-integration.html ---- - -Company users can share their carts with others so that multiple representatives of the same company can work together on the same order. In addition to that, users can choose what type of access they want to grant to different users. -To share and unshare user carts, you can send REST requests against the endpoints provided by the **Cart Permission Groups API** and the **Shared Carts API**. - -In your development, the endpoints will help you to: -* Identify what levels of access are available in the system and display them to users; -* Identify whether a certain cart is shared; -* Identify with whom a cart is shared, and what are the levels of access granted to those users; -* Allow users to share their carts to other users; -* Allow users to stop sharing their carts when no longer needed. - -{% info_block warningBox "Authentication" %} -The endpoints provided by the API cannot be accessed anonymously. For this reason, you need to pass a user's authentication token in your REST requests. For details, see [Authentication and Authorization](/docs/scos/dev/glue-api-guides/{{page.version}}/authentication-and-authorization.html). -{% endinfo_block %} - -## Installation -For detailed information on the modules that provide the API functionality and related installation instructions, see [Shared Carts Feature Integration](/docs/scos/dev/feature-integration-guides/{{page.version}}/shared-carts-feature-integration.html). - -## Shared Carts in Spryker -Registered users can [share](/docs/scos/user/features/{{page.version}}/shared-carts-feature-overview.html) the carts owned by them with other users in their company. The feature can help them distribute the workload among their team members. - -To be able to manage shared carts, you need to impersonate customers as their respective **Company User Accounts**. Upon impersonation, you will receive a bearer token that can be used to access the endpoints provided by the API. - -Carts can be shared only with users that belong to the same company. As customers can impersonate themselves as multiple Company Users belonging to different companies, the available carts, as well as cart access permissions, depend on the company that a Company User Account belongs to. The active Company User can be selected when impersonating a customer as a Company User. A bearer token provided during Company User impersonation will include, among other information, the company that the user belongs to. - -{% info_block infoBox "Info" %} -For details on how to receive the token, see [Logging In as Company User](/docs/scos/dev/glue-api-guides/{{page.version}}/managing-b2b-account/authenticating-as-a-company-user.html). -{% endinfo_block %} - -Each access type is represented by a **Permission Group**. There are 2 Permission Groups available out of the box: **Read-only**, and **Full access**. - -## Retrieving Cart Permission Groups -To retrieve all available Permission Groups, send a GET request to the following endpoint: - -[/cart-permission-groups](/docs/scos/dev/glue-api-guides/{{page.version}}/rest-api-reference.html#/cart-permission-groups) - -Request sample: *GET http://glue.mysprykershop.com/cart-permission-groups* - -To retrieve a specific Permission Group, query the following endpoint: - -[/cart-permission-groups/{% raw %}{{{% endraw %}permission_group_id{% raw %}}}{% endraw %}](/docs/scos/dev/glue-api-guides/{{page.version}}/rest-api-reference.html#/cart-permission-groups) - -Request sample: *GET http://glue.mysprykershop.com/cart-permission-groups/1* - -where **1** is the ID of the Permission Group you need. - -{% info_block warningBox "Authentication Required" %} -To get Cart Permission Groups, you need to authenticate first and pass an access token as a part of your request. For details, see [Authentication and Authorization](/docs/scos/dev/glue-api-guides/{{page.version}}/authentication-and-authorization.html). -{% endinfo_block %} - -### Response -If all Permission Groups are requested, the resource responds with a **RestCartPermissionGroupsCollectionResponse**. If a single group is queried, the response is a **RestCartPermissionGroupsResponse**. - -**Response Attributes:** - -| Attribute* | Type | Description | -| --- | --- | --- | -| id | String | Specifies a unique identifier that can be used to assign the permissions with this Permission Group. | -| name | String | Specifies the Permission Group name, for example, READ_ONLY or FULL_ACCESS. | -| isDefault | Boolean | Indicates whether the Permission Group is applied to shared carts by default. | - -*The attributes mentioned are all attributes in the response. Type is not mentioned. - -**Sample Response Containing All Groups** - -```json -{ - "data": [ - { - "type": "cart-permission-groups", - "id": "1", - "attributes": { - "name": "READ_ONLY", - "isDefault": true - }, - "links": { - "self": "http://glue.mysprykershop.com/cart-permission-groups/1" - } - }, - { - "type": "cart-permission-groups", - "id": "2", - "attributes": { - "name": "FULL_ACCESS", - "isDefault": false - }, - "links": { - "self": "http://glue.mysprykershop.com/cart-permission-groups/2" - } - } - ], - "links": { - "self": "http://glue.mysprykershop.com/cart-permission-groups" - } -} -``` - -**Sample Response Containing Specific Group** - -```json -{ - "data": { - "type": "cart-permission-groups", - "id": "1", - "attributes": { - "name": "READ_ONLY", - "isDefault": true - }, - "links": { - "self": "http://glue.mysprykershop.com/cart-permission-groups/1" - } - } -} -``` - -### Possible Errors - -| Status | Reason | -| --- | --- | -| 401 | The access token is invalid. | -| 403 | The access token is missing. | -| 404 | The specified Permission Group was not found or the user does not have access to it. | - -## Viewing Permissions for Carts -To identify whether a cart is shared, send a request to the **/carts** or the **/carts/{% raw %}{{{% endraw %}cartId{% raw %}}}{% endraw %}** endpoint with the **shared-carts** resource relationship included. Additionally, to find out with whom carts are shared and what are the access levels, you can include the **company-users** and **cart-permission-groups** relationships. - -[/carts](/docs/scos/dev/glue-api-guides/{{page.version}}/rest-api-reference.html#/carts) - provides information on all carts of a user; - -[/carts/{% raw %}{{{% endraw %}cartId{% raw %}}}{% endraw %}](/docs/scos/dev/glue-api-guides/{{page.version}}/rest-api-reference.html#/carts) - provides information on a specific cart. - -### Request -Request samples: -* *GET http://glue.mysprykershop.com/carts?include=shared-carts,company-users,cart-permission-groups* -* *GET http://glue.mysprykershop.com/carts/4741fc84-2b9b-59da-bb8d-f4afab5be054?include=shared-carts,company-users,cart-permission-groups* - -where **4741fc84-2b9b-59da-bb8d-f4afab5be054** is the ID of the specific cart you need. - -{% info_block warningBox "Authentication" %} - -To use this endpoint, customers need to authenticate first. For details, see [Authentication and Authorization](/docs/scos/dev/glue-api-guides/{{page.version}}/authentication-and-authorization.html). - -{% endinfo_block %} - -{% info_block warningBox "Note" %} - -You can also use the Accept-Language header to specify the locale.Sample header: `[{"key":"Accept-Language","value":"de, en;q=0.9"}]` where **de** and **en** are the locales; **q=0.9** is the user's preference for a specific locale. For details, see [14.4 Accept-Language](https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.4). - -{% endinfo_block %} - -### Response -No matter which of the 2 endpoints you use, the response will consist of a single or multiple **RestCartsResponse** objects containing the requested cart(s). - -{% info_block infoBox "Info" %} - -For a detailed list of **RestCartsResponse** attributes, see section *Retrieving Carts* in [Managing Carts of Registered Users](/docs/scos/dev/glue-api-guides/{{page.version}}/managing-carts/carts-of-registered-users/managing-carts-of-registered-users.html). - -{% endinfo_block %} - -**Attributes Added by the Resource Relationships** - -| Resource | Type of Information | Attribute* | Type | Description | -| --- | --- | --- | --- | --- | -| shared-carts | Shared cart properties | idCompanyUser | String | Unique identifier of the user with whom the cart is shared. | -| shared-carts | Shared cart properties | idCartPermissionGroup | Integer | Specifies the ID of the **Cart Permission Group** that describes the permissions granted. | -| cart-permission-groups | Permissions granted to the user for shared carts | name | String | Specifies the Permission Group name, for example, READ_ONLY or FULL_ACCESS. | -| cart-permission-groups | Permissions granted to the user for shared carts | isDefault | Boolean | Indicates whether the Permission Group is applied to shared carts by default. | -| company-users | Information on users with whom the cart(s) is shared | cell | cell | cell | -| company-users | Information on users with whom the cart(s) is shared | id | String | Specifies the ID of the Company User with whom the cart is shared. | -| company-users | Information on users with whom the cart(s) is shared | isActive | Boolean | Indicates whether the Company User is active. | -| company-users | Information on users with whom the cart(s) is shared | isDefault | Boolean | Indicates whether the Company User is the default one for the customer. | - -**Sample Response - All Carts** - -```json -{ - "data": [ - { - "type": "carts", - "id": "f23f5cfa-7fde-5706-aefb-ac6c6bbadeab", - "attributes": { - "name": "Shared Cart", - "priceMode": "GROSS_MODE", - "currency": "EUR", - "store": "DE", - "discounts": [], - "totals": {...}, - "isDefault": false - }, - "links": {...}, - "relationships": { - "shared-carts": { - "data": [ - { - "type": "shared-carts", - "id": "6f7bc709-08c0-5bdb-a3c4-d28f62b3906d" - } - ] - } - } - }, - { - "type": "carts", - "id": "d186c09a-2ed8-50e9-ae18-03251185850d", - "attributes": { - "name": "Not Shared Cart", - "priceMode": "GROSS_MODE", - "currency": "EUR", - "store": "DE", - "discounts": [], - "totals": {...}, - "isDefault": true - }, - "links": {...} - } - ], - "links": { - "self": "http://glue.mysprykershop.com/carts?include=shared-carts,company-users,cart-permission-groups" - }, - "included": [ - { - "type": "cart-permission-groups", - "id": "1", - "attributes": { - "name": "READ_ONLY", - "isDefault": true - }, - "links": { - "self": "http://glue.mysprykershop.com/cart-permission-groups/1" - } - }, - { - "type": "company-users", - "id": "3692d238-acb3-5b7e-8d24-8dab9c1f4505", - "attributes": { - "isActive": true, - "isDefault": false - }, - "links": { - "self": "http://glue.mysprykershop.com/company-users/3692d238-acb3-5b7e-8d24-8dab9c1f4505" - } - }, - { - "type": "shared-carts", - "id": "6f7bc709-08c0-5bdb-a3c4-d28f62b3906d", - "attributes": { - "idCompanyUser": "3692d238-acb3-5b7e-8d24-8dab9c1f4505", - "idCartPermissionGroup": 1 - }, - "links": { - "self": "http://glue.mysprykershop.com/shared-carts/6f7bc709-08c0-5bdb-a3c4-d28f62b3906d" - }, - "relationships": { - "cart-permission-groups": { - "data": [ - { - "type": "cart-permission-groups", - "id": "1" - } - ] - }, - "company-users": { - "data": [ - { - "type": "company-users", - "id": "3692d238-acb3-5b7e-8d24-8dab9c1f4505" - } - ] - } - } - } - ] -} -``` - -**Sample Response - Single Cart** - -```json -{ - "data": { - "type": "carts", - "id": "f23f5cfa-7fde-5706-aefb-ac6c6bbadeab", - "attributes": {...}, - "links": {...}, - "relationships": { - "shared-carts": { - "data": [ - { - "type": "shared-carts", - "id": "6f7bc709-08c0-5bdb-a3c4-d28f62b3906d" - } - ] - } - } - }, - "included": [ - { - "type": "cart-permission-groups", - "id": "1", - "attributes": { - "name": "READ_ONLY", - "isDefault": true - }, - "links": { - "self": "http://glue.mysprykershop.com/cart-permission-groups/1" - } - }, - { - "type": "company-users", - "id": "3692d238-acb3-5b7e-8d24-8dab9c1f4505", - "attributes": { - "isActive": true, - "isDefault": false - }, - "links": { - "self": "http://glue.mysprykershop.com/company-users/3692d238-acb3-5b7e-8d24-8dab9c1f4505" - } - }, - { - "type": "shared-carts", - "id": "6f7bc709-08c0-5bdb-a3c4-d28f62b3906d", - "attributes": { - "idCompanyUser": "3692d238-acb3-5b7e-8d24-8dab9c1f4505", - "idCartPermissionGroup": 1 - }, - "links": { - "self": "http://glue.mysprykershop.com/shared-carts/6f7bc709-08c0-5bdb-a3c4-d28f62b3906d" - }, - "relationships": { - "cart-permission-groups": { - "data": [ - { - "type": "cart-permission-groups", - "id": "1" - } - ] - }, - "company-users": { - "data": [ - { - "type": "company-users", - "id": "3692d238-acb3-5b7e-8d24-8dab9c1f4505" - } - ] - } - } - } - ] -} -``` - -### Possible Errors - -| Status | Reason | -| --- | --- | -| 401 | The access token is invalid. | -| 403 | The access token is missing. | -| 404 | A cart with the specified ID was not found. | - -## Sharing Carts -To share a user's cart, send a POST request to the following endpoint: - -[/carts/{% raw %}{{{% endraw %}cart-uuid{% raw %}}}{% endraw %}/shared-carts](/docs/scos/dev/glue-api-guides/{{page.version}}/rest-api-reference.html#/carts) - -### Request - -Request sample: *POST http://glue.mysprykershop.com/carts/f23f5cfa-7fde-5706-aefb-ac6c6bbadeab/shared-carts* - -where **f23f5cfa-7fde-5706-aefb-ac6c6bbadeab** is the ID of the cart you want to share. - -{% info_block warningBox "Authentication" %} - -To use this endpoint, customers need to authenticate first. For details, see [Authentication and Authorization](/docs/scos/dev/glue-api-guides/{{page.version}}/authentication-and-authorization.html). - -{% endinfo_block %} - -**Attributes:** - -| Attribute | Type | Required | Description | -| --- | --- | --- | --- | -| idCompanyUser | String | v | Specifies the name of the company user you want to share the cart with.
    The user must belong to the same company as the cart owner. | -| idCartPermissionGroup | Integer | v | Specifies the ID of the **Cart Permission Group** that provides the desired permissions. | - -{% info_block warningBox "Note" %} -You can also use the **Accept-Language** header to specify the locale.
    Sample header: `[{"key":"Accept-Language","value":"de, en;q=0.9"}]` where **de** and **en** are the locales; **q=0.9** is the user's preference for a specific locale. For details, see [14.4 Accept-Language](https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.4). -{% endinfo_block %} - -**Sample Request Body:** - -```json -{ - "data": { - "type": "shared-carts", - "attributes": { - "idCompanyUser": "4c677a6b-2f65-5645-9bf8-0ef3532bead1", - "idCartPermissionGroup": 1 - } - } -} -``` - -### Response -If a request was successful and a cart was shared, the endpoint responds with a **RestSharedCartsResponse** containing information on the shared cart. - -**Response Attributes:** - -| Attribute* | Type | Description | -| --- | --- | --- | -| id | String | Specifies a unique identifier that can be used to manage the sharing of the cart in the future. | -| idCompanyUser | String | Specifies the name of the company user the cart is shared with. | -| idCartPermissionGroup | Integer | Specifies the ID of the Cart Permission Group that describes the permissions granted to the user. | - -*The attributes mentioned are all attributes in the response. Type is not mentioned. - -**Sample Response** - -```json -{ - "data": { - "type": "shared-carts", - "id": "4c677a6b-2f65-5645-9bf8-0ef3532bbbccaa", - "attributes": { - "idCompanyUser": "4c677a6b-2f65-5645-9bf8-0ef3532bead1", - "idCartPermissionGroup": 1 - }, - "links": { - "self": "http://glue.mysprykershop.com/shared-carts/4c677a6b-2f65-5645-9bf8-0ef3532bbbccaa" - } - } -} -``` - -### Possible Errors - -| Status | Reason | -| --- | --- | -| 401 | The access token is invalid. | -| 403 | The access token is missing. | -| 404 | Cart not found. | -| 422 | Failed to share a cart. | - -## Changing Permissions -To change permissions for a shared cart, send a PATCH request to the following endpoint: - -[/shared-carts/{% raw %}{{{% endraw %}shared-cart-uuid{% raw %}}}{% endraw %}](/docs/scos/dev/glue-api-guides/{{page.version}}/rest-api-reference.html#/shared-carts) - -### Request - -Request sample: *PATCH http://glue.mysprykershop.com/shared-carts/4c677a6b-2f65-5645-9bf8-0ef3532bbbccaa* - -where **4c677a6b-2f65-5645-9bf8-0ef3532bbbccaa** is the ID of the shared cart object. - -{% info_block warningBox "Authentication" %} - -To use this endpoint, customers need to authenticate first. For details, see [Authentication and Authorization](/docs/scos/dev/glue-api-guides/{{page.version}}/authentication-and-authorization.html). - -{% endinfo_block %} - -**Attributes:** - -| Attribute | Type | Required | Description | -| --- | --- | --- | --- | -| idCartPermissionGroup | Integer | v | Specifies the ID of the Cart Permission Group that provides the desired permissions. | - -{% info_block warningBox "Note" %} -You can also use the **Accept-Language** header to specify the locale.
    Sample header: `[{"key":"Accept-Language","value":"de, en;q=0.9"}]` where **de** and **en** are the locales; **q=0.9** is the user's preference for a specific locale. For details, see [14.4 Accept-Language](https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.4). -{% endinfo_block %} - -**Sample Request Body:** - -```json -{ - "data": { - "type": "shared-carts", - "attributes": { - "idCartPermissionGroup": 2 - } - } -} -``` - -### Response -If a request was successful and permissions for the shared cart were changed, the endpoint responds with a **RestSharedCartsResponse** containing updated information on the shared cart. - -**Response Attributes:** - -| Attribute* | Type | Description | -| --- | --- | --- | -| idCompanyUser | String | Specifies the name of the company user the cart is shared with. | -| idCartPermissionGroup | Integer | Specifies the ID of the Cart Permission Group that describes the permissions granted to the user. | - -**Sample Response** - -```json -{ - "data": { - "type": "shared-carts", - "id": "4c677a6b-2f65-5645-9bf8-0ef3532bbbccaa", - "attributes": { - "idCompanyUser": "4c677a6b-2f65-5645-9bf8-0ef3532bead1", - "idCartPermissionGroup": 2 - }, - "links": { - "self": "http://glue.mysprykershop.com/shared-carts/4c677a6b-2f65-5645-9bf8-0ef3532bbbccaa" - } - } -} -``` - -### Possible Errors - -| Status | Reason | -| --- | --- | -| 401 | The access token is invalid. | -| 403 | The access token is missing. | -| 404 | Cart not found. | - -## Unsharing Carts -To stop sharing a cart, send a DELETE request to the following endpoint: - -[/shared-carts/{% raw %}{{{% endraw %}shared-cart-uuid{% raw %}}}{% endraw %}](/docs/scos/dev/glue-api-guides/{{page.version}}/rest-api-reference.html#/shared-carts) - -### Request -Request sample: *DELETE http://glue.mysprykershop.com/shared-carts/4c677a6b-2f65-5645-9bf8-0ef3532bbbccaa* - -where **4c677a6b-2f65-5645-9bf8-0ef3532bbbccaa** is the ID of the shared cart object. - -{% info_block warningBox "Authentication" %} - -To use this endpoint, customers need to authenticate first. For details, see [Authentication and Authorization](/docs/scos/dev/glue-api-guides/{{page.version}}/authentication-and-authorization.html). - -{% endinfo_block %} - -### Response -If a request was successful and a cart was shared, the endpoint responds with a **204 No Content** status code. - -### Possible Errors - -| Status | Reason | -| --- | --- | -| 401 | The access token is invalid. | -| 403 | The access token is missing. | -| 404 | Cart not found. | diff --git a/docs/scos/dev/glue-api-guides/202005.0/managing-customers/authenticating-as-a-customer.md b/docs/scos/dev/glue-api-guides/202005.0/managing-customers/authenticating-as-a-customer.md deleted file mode 100644 index 6d8967bf65c..00000000000 --- a/docs/scos/dev/glue-api-guides/202005.0/managing-customers/authenticating-as-a-customer.md +++ /dev/null @@ -1,218 +0,0 @@ ---- -title: Authentication and Authorization -description: This article provides the list of private resources and describes how to install and use the means needed to work with the sensitive data. -last_updated: Sep 15, 2020 -template: glue-api-storefront-guide-template -originalLink: https://documentation.spryker.com/v5/docs/authentication-and-authorization -originalArticleId: a855d9d5-872a-4602-ac3b-4cb0c5ffd8fc -redirect_from: - - /v5/docs/authentication-and-authorization - - /v5/docs/en/authentication-and-authorization -related: - - title: Logging In as Company User - link: docs/scos/dev/glue-api-guides/page.version/managing-b2b-account/authenticating-as-a-company-user.html - - title: Company Account and General Organizational Structure - link: docs/scos/user/features/page.version/company-account-feature-overview/company-accounts-overview.html - - title: Login & Registration Forms - link: docs/scos/user/features/page.version/customer-account-management-feature-overview/customer-login-overview.html - - title: Configuring Outdated Refresh Token Life Time - link: docs/scos/dev/glue-api-guides/page.version/configuring-outdated-refresh-token-life-time.html - - title: Glue API - Customer Account Management feature integration - link: docs/scos/dev/feature-integration-guides/page.version/glue-api/glue-api-customer-account-management-feature-integration.html ---- - -Some resources (see the List of the private resources below) in Spryker REST API require user authentication. This process is essential to protect sensitive data and resources from unauthorized access. For this purpose, Spryker implements the OAuth 2.0 mechanism for user authentication. On the REST API level, it is represented by the **Login API**. - -To get access to a protected resource, first, you need to obtain an **Access Token**. We use JWT tokens required for Spryker Glue to identify a user during API calls. Then you need to pass the token in the request header to get access to the resources that require authentication. - -![auth-scheme.png](https://spryker.s3.eu-central-1.amazonaws.com/docs/Glue+API/Glue+API+Storefront+Guides/Authentication+and+Authorization/auth-scheme+%281%29.png) - -For increased security, access tokens have a limited lifetime. When receiving an access token, the response body contains not only the access token itself, but also its lifetime, in seconds, and a **Refresh Token**. When the lifetime expires, the Refresh Token can be exchanged for a new Access Token. The new token will also have a limited lifetime and have a corresponding Refresh Token for future authentication. The default lifetime of the tokens is 8 hours (28800 seconds) for an access token and 1 month (2628000 seconds) for a refresh token, although the settings can be changed in the module configuration. - -## List of private resources - -| Action | Method | Endpoints | -| --- | --- | --- | -| Customer - Get a Customer | GET | http://mysprykershop.com/customers/{% raw %}{{{% endraw %}customer_reference{% raw %}}}{% endraw %} | -| Customer - Update info | PATCH | http://mysprykershop.com/customers/{% raw %}{{{% endraw %}customer_reference{% raw %}}}{% endraw %} | -| Customer - Change password | PATCH | http://mysprykershop.com/{% raw %}{{{% endraw %}customer_reference{% raw %}}}{% endraw %} | -| Customer - Delete | DELETE | http://mysprykershop.com/customers/{% raw %}{{{% endraw %}customer_reference{% raw %}}}{% endraw %} | -| Customer - Create a new address | POST | http://mysprykershop.com/customers/{% raw %}{{{% endraw %}customer_reference{% raw %}}}{% endraw %}/addresses | -| Customer - Update existing address | PATCH | http://mysprykershop.com/customers/{% raw %}{{{% endraw %}customer_reference{% raw %}}}{% endraw %}/addresses/{% raw %}{{{% endraw %}customer_address_uuid{% raw %}}}{% endraw %} | -| Customer - Delete the address | DELETE | http://mysprykershop.com/customers/{% raw %}{{{% endraw %}customer_reference{% raw %}}}{% endraw %}/addresses/{% raw %}{{{% endraw %}customer_address_uuid{% raw %}}}{% endraw %} | -| Customer - Get List of Order | GET | http://mysprykershop.com/orders | -| Customer - Ger Order details | GET | http://mysprykershop.com/orders/{% raw %}{{{% endraw %}order_id{% raw %}}}{% endraw %} | -| Cart - Create the new cart | POST | http://mysprykershop.com/carts | -| Cart - Retrieve the cart | GET | http://mysprykershop.com/carts
    http://mysprykershop.com/carts/{% raw %}{{{% endraw %}cart_uuid{% raw %}}}{% endraw %}
    Cart - Add an item to the cart | POST | http://mysprykershop.com/carts/{% raw %}{{{% endraw %}cart_uuid{% raw %}}}{% endraw %}/items | -| Cart - Update item quantity | PATCH | http://mysprykershop.com/carts/{% raw %}{{{% endraw %}cart_uuid{% raw %}}}{% endraw %}/items/{% raw %}{{{% endraw %}concrete_sku{% raw %}}}{% endraw %} | -| Cart - Remove the cart | DELETE | http://mysprykershop.com/carts/{% raw %}{{{% endraw %}url{% raw %}}}{% endraw %}/carts/{% raw %}{{{% endraw %}cart_uuid{% raw %}}}{% endraw %} | -| Cart - Remove items from a cart | DELETE | http://mysprykershop.com/carts/{% raw %}{{{% endraw %}cart_uuid{% raw %}}}{% endraw %}/items/{% raw %}{{{% endraw %}concrete_id{% raw %}}}{% endraw %} | -| Wishlist - Add an item to wishlist | POST | http://mysprykershop.com/wishlists/{% raw %}{{{% endraw %}wishlist_uuid{% raw %}}}{% endraw %}/wishlist-items | -| Wishlist - Create the wishlist | POST | http://mysprykershop.com/wishlists | -| Wishlist - Delete a wishlist | DELETE | http://mysprykershop.com/wishlists/{% raw %}{{{% endraw %}wishlist_uuid{% raw %}}}{% endraw %} | -| Wishlist - Delete an item into a wishlist | DELETE | http://mysprykershop.com/wishlists/{% raw %}{{{% endraw %}wishlist_id{% raw %}}}{% endraw %}/wishlist-items/{% raw %}{{{% endraw %}concrete_sku{% raw %}}}{% endraw %} | -| Wishlist - Get list of wishlist | GET | http://mysprykershop.com/wishlists | -| Wishlist - Get wishlist by ID | GET | http://mysprykershop.com/wishlists/{% raw %}{{{% endraw %}wishlist_uuid{% raw %}}}{% endraw %} | -| Wishlist - Rename a wishlist | PATCH | http://mysprykershop.com/wishlists/{% raw %}{{{% endraw %}wishlist_uuid{% raw %}}}{% endraw %} | - -## Installation -For instructions on how to install the necessary modules and enable OAuth authentication, see [Customer Account Management Feature Integration](/docs/scos/dev/feature-integration-guides/{{page.version}}/customer-account-management-feature-integration.html) - -## User Authentication -To authenticate a user and receive an access token, send a POST request to the following endpoint: -`/access-tokens` -Request sample: `POST http://mysprykershop.com/access-tokens` - -**Attributes:** - -* username - specifies the username of the user to authenticate; -* password - specifies the user's password. - -{% info_block errorBox "Security Considerations " %} -As passwords are sent to this endpoint unencrypted, it is strongly recommended to provide access to it only via the HTTPS protocol. -{% endinfo_block %} - -**Sample Request:** -```js -{ - "data": { - "type": "access-tokens", - "attributes": { - "username": "john.doe@example.com", - "password": "qwerty" - } - } -} -``` - -**Sample Response:** -```js -{ - "data": { - "type": "access-tokens", - "id": null, - "attributes": { - "tokenType": "Bearer", - "expiresIn": 3600, - "accessToken": "eyJ0...", - "refreshToken": "def5..." - "idCompanyUser": null - }, - "links": { - "self": "http://mysprykershop.com/access-tokens" - } - } -} -``` - -In the above example, the _access_ token contained in the **accessToken** attribute will expire in **3600** seconds. After it expires, a new access token can be received using the data contained in the **refreshToken** attribute. - -## Accessing Resources -To access protected resources, you need to pass the access token in the **Authorization** header of your request. Example: - -``` -GET /carts HTTP/1.1 -Host: mysprykershop.com:10001 -Content-Type: application/json -Authorization: Bearer eyJ0... -Cache-Control: no-cache -``` - -If authorization is successful, the API will perform the requested operation. If authorization fails, a **401 Unathorized** error will be returned. The response will contain an error code explaining the cause of the error. It is, therefore, your responsibility to handle 401 errors when accessing protected resources. Sample error response: - -```js -{ - "errors": [ - { - "detail": "Invalid access token.", - "status": 401, - "code": "001" - } - ] -} -``` - -All protected resources can return the following generic errors: -| Code | Reason | -| --- | --- | -| 001 | Invalid access token | -| 002 | Access token missing or forbidden resource for the given user scope | -| 003 | Failed to log in the user | -| 004 | Failed to refresh a token | - -Also, some resources can be protected by shop owners from unauthorized access explicitly. If a resource is protected, any unauthorized attempt to access it will result in a **403 Forbidden error**. To facilitate the development of custom storefronts with such resources and avoid extra calls to them, Glue REST API provides the possibility to retrieve a list of such resources. It is, therefore, the responsibility of the API client to retrieve the list as a pre-flight check. For more details, see [Getting the List of Protected Resources](/docs/scos/dev/glue-api-guides/{{page.version}}/retrieving-protected-resources.html). - -## Refreshing Tokens -To refresh an access token, send a request to the following endpoint and pass the corresponding refresh token: -`/refresh-tokens` -Request sample: `POST http://mysprykershop.com/refresh-tokens` - -Attributes: - -* refreshToken - specifies the Refresh Token received during initial authentication. - -Sample Request: -```js -{ - "data": { - "type": "refresh-tokens", - "attributes": { - "refreshToken": "def5..." - } - } -} -``` - -**Sample Response:** -```js -{ - "data": { - "type": "refresh-tokens", - "id": null, - "attributes": { - "tokenType": "Bearer", - "expiresIn": 28800, - "accessToken": "eyJ0...", - "refreshToken": "def5..." - }, - "links": { - "self": "http://mysprykershop.com/refresh-tokens" - } - } -} -``` -## Token Revocation - -In certain cases, applications are required to revoke tokens explicitly, for example, when a user logs out of an app or when a token is compromised. Spryker Glue REST API provides a revocation endpoint to invalidate refresh tokens: - -* To invalidate all refresh tokens of a user, send a *DELETE* request to `/refresh-tokens/mine`. -* To invalidate a specific token, send a *DELETE* request to `/refresh-tokens/{% raw %}{{{% endraw %}refresh_token{% raw %}}}{% endraw %}`. - -Request samples: - -* `DELETE https://glue.mysprykershop.com/refresh-tokens/mine` -* `DELETE https://glue.mysprykershop.com/refresh-tokens/def50200e880ff70949d88a7ab15169c082970c450ce42b77` - -where `def50200e880ff70949d88a7ab15169c082970c450ce42b77` is the refresh token you want to invalidate. The token should be the same as specified in the `refresh-token` attribute of the authentication response. - -{% info_block infoBox "Info" %} - -Users can invalidate their own refresh tokens only. To do so, they need to access the endpoints with a valid access token. For information on how to do so, see [Accessing Resources](/docs/scos/dev/glue-api-guides/{{page.version}}/authentication-and-authorization.html#accessing-resources). - -{% endinfo_block %} -Upon completion of a request, the endpoint responds with the **204 No Content** status code. - -{% info_block warningBox "Note" %} - -For security considerations, the endpoint returns the **204** status code no matter whether any refresh tokens are actually revoked. - -{% endinfo_block %} - -The token(s) are marked as expired on the date and time of the request. After expiration, tokens can be deleted from the database. For this purpose, you need to set the lifetime for **expired** tokens. For details, see [Configuring Outdated Refresh Token Life Time](/docs/scos/dev/glue-api-guides/{{page.version}}/configuring-outdated-refresh-token-life-time.html). - -## Possible Errors - -| Status | Reason | -| --- | --- | -| 401 | The access token is invalid. | -| 403 | The access token is missing. | diff --git a/docs/scos/dev/glue-api-guides/202005.0/managing-customers/managing-customers.md b/docs/scos/dev/glue-api-guides/202005.0/managing-customers/managing-customers.md deleted file mode 100644 index da011536ef1..00000000000 --- a/docs/scos/dev/glue-api-guides/202005.0/managing-customers/managing-customers.md +++ /dev/null @@ -1,618 +0,0 @@ ---- -title: Managing Customers -description: This article explains how to manage customer accounts and provides detailed information on which endpoints to use to create, anonymize, etc. a customer. -last_updated: Apr 3, 2020 -template: glue-api-storefront-guide-template -originalLink: https://documentation.spryker.com/v5/docs/managing-customers-api -originalArticleId: be5d5720-c020-4b64-a184-7d86673a6deb -redirect_from: - - /v5/docs/managing-customers-api - - /v5/docs/en/managing-customers-api - - /docs/scos/dev/glue-api-guides/202005.0/manging-customers/managing-customers.html - - /docs/scos/dev/glue-api-guides/202005.0/managing-customers.html -related: - - title: Managing Wishlists - link: docs/scos/dev/glue-api-guides/page.version/managing-wishlists/managing-wishlists.html - - title: Login & Registration Forms - link: docs/scos/user/features/page.version/customer-account-management-feature-overview/customer-login-overview.html - - title: Password Management - link: docs/scos/user/features/page.version/customer-account-management-feature-overview/password-management-overview.html - - title: Customer Accounts - link: docs/scos/user/features/page.version/customer-account-management-feature-overview/customer-account-management-feature-overview.html - - title: Retrieving Customer's Order History - link: docs/scos/dev/glue-api-guides/page.version/managing-customers/retrieving-customer-orders.html ---- - -The Customer API provides functionality for the creation of customers and administration of their account data. This administration includes the possibility to maintain a set of customer addresses as separate resources. In checkout process, these address resources can be retrieved and used to speed up the buying process. On the authentication side, the API supports authentication via OAuth 2.0 protocol and password restoring functionality. - -In your development, these resources can help you to: - -* Retrieve relevant customer information for any page where customer information is needed -* Enable customer registration -* Allow customer login/authentication -* Enrich customer profiles with additional data such as addresses - -## Installation -For details on the modules that provide the API functionality and how to install them, see [Customer API Feature Integration](). - -## Creating a Customer -To create a new customer user, send a POST request to the following endpoint: -`/customers` -Request sample: `POST http://mysprykershop.com/customers` -Attributes: -| Attribute | Type | Required | Description | -| --- | --- | --- | --- | -| acceptedTerms | Boolean | ✓ | Specifies whether the customer has accepted the terms of service. For a new customer to be created, this parameter needs to be set to true. | -| confirmPassword | String | ✓ | Specifies a password confirmation for the account of the new customer. | -| email | String | ✓ | Specifies customer's last email address. The address must be unique in the system. | -| firstName | String | ✓ | Specifies customer's first name. | -| lastName | String | ✓ | Specifies customer's last name. | -| password | String | ✓ | Specifies a password (7 characters or more) for the account of the new customer. This password will be used by the customer to access their account. | -| salutation | String | ✓ | Specifies a salutation for a new customer. | - -**Request sample body** -```js -{ - "data": { - "type": "customers", - "attributes": { - "salutation": "Mr", - "firstName":"John", - "lastName":"Doe", - "email":"jdoe@example.com", - "password":"change123", - "confirmPassword":"change123", - "acceptedTerms":true - } - } -} -``` - -If a customer was created successfully, the endpoint will respond with a **RestCustomersResponse**. - -**Sample response** -```js -{ - "data": { - "type": "customers", - "id": "DE--25", - "attributes": { - "firstName": "John", - "lastName": "Doe", - "gender": null, - "dateOfBirth": null, - "salutation": "Mr", - "createdAt": "2018-11-06 08:15:02.694668", - "updatedAt": "2018-11-06 08:15:02.694668" - }, - "links": { - "self": "http://mysprykershop.com/customers/DE--25" - } - } -} -``` - -After a customer has been created, you can authenticate them in the REST API and perform actions on their behalf. For details, see Authentication and Authorization. The **id** attribute of the **RestCustomersResponse** specifies a unique customer identifier that can later be used to access the new customer via REST API requests. - -| Field* | Type | Description | -| --- | --- | --- | -| firstName | String | Customer's first name | -| lastName | String | Customer's last name | -| gender | String | Gender of the customer | -| dateOfBirth | String | Customer's date of birth | -| salutation | String | Salutation to use when addressing the customer | -| createdAt | String | Account creation date | -| updatedAt | String | Date of the last update | - -\*The fields mentioned are all attributes in the response. Type and ID are not mentioned. - -### Possible Errors -| Code | Reason | -| --- | --- | -| 422 | Terms of service were not accepted | -| 400 | A customer with the same email address already exists | -| 414 | The provided gender is invalid | - -## Retrieving Customer Information -To retrieve information about a customer, use the following endpoint: -`/customers/{% raw %}{{{% endraw %}customerReference{% raw %}}}{% endraw %}` -Request sample: `GET http://mysprykershop.com/customers/DE-25` -where `DE-25` is the unique identifier of the customer you want to retrieve. - -{% info_block warningBox "Authentication" %} -To use this endpoint, customers need to authenticate first. For details, see [Authentication and Authorization](). -{% endinfo_block %} - -If a customer with the specified ID was found, the endpoint will respond with a **RestCustomersRequest**. - -**Sample response** -```js -{ - "data": { - "type": "customers", - "id": "DE--25", - "attributes": { - "firstName": "John", - "lastName": "Doe", - "gender": null, - "dateOfBirth": null, - "salutation": "Mr", - "createdAt": "2018-11-06 08:15:02.694668", - "updatedAt": "2018-11-06 08:15:02.694668" - }, - "links": { - "self": "http://mysprykershop.com/customers/DE--25" - } - } - } -``` - -| Field* | Type | Description | -| --- | --- | --- | -| firstName | String | Customer's first name | -| lastName | String | Customer's last name | -| email | String | Customer's email address | -| gender | String | Customer's gender | -| dateOfBirth | String | Customer's date of birth | -| salutation | String | Salutation to use when addressing the customer | -| createdAt | String | Account creation date | -| updatedAt | String | Date of the last update | - -\*The fields mentioned are all attributes in the response. Type and ID are not mentioned. - -### Possible Errors: - -| Code | Reason | -| --- | --- | -| 402 | A customer with the specified ID was not found | -| 405 | Customer reference is missing | - -## Editing a Customer -To modify an existing customer account, send a _PATCH_ request to the following endpoint: -`/customers/{% raw %}{{{% endraw %}customerReference{% raw %}}}{% endraw %}` - -{% info_block infoBox "Modifying Customer Addresses " %} -You need to use specialized endpoints to retrieve and manage addresses registered for a customer. For details, see [Managing the List of Customer Addresses](). -{% endinfo_block %} - -Request sample: `PATCH http://mysprykershop.com/customers/DE-25` -where `DE-25` is the unique identifier of the customer you want to modify. - -{% info_block warningBox "Authentication " %} -To use this endpoint, customers need to authenticate first. For details, see [Authentication and Authorization](). -{% endinfo_block %} - -To modify a customer, the client must send a **RestCustomersRequest**. - -**Request sample** -```js -{ - "data" : { - "type": "customers" - "attributes": { - "lastName": "Johnson", - "email": "example@mail.com", - } - } - } - -``` - -If a customer is modified successfully, the endpoint will respond with a **RestCustomersResponse**. - -**Sample response** -```js -{ - "data": { - "type": "customers", - "id": "DE--25", - "attributes": { - "firstName": null, - "lastName": "Johnson", - "salutation": null, - "email": "example@mail.com" - }, - "links": { - "self": "http://mysprykershop.com/customers/DE--25" - } - } - } -``` - -| Field* | Type | Description | -| --- | --- | --- | -| firstName | String | Customer's first name | -| lastName | String | Customer's last name | -| email | String | Customer's email address | -| gender | String | Customer's gender | -| dateOfBirth | String | Customer's date of birth | -| salutation | String | Salutation to use when addressing the customer | -| createdAt | String | Account creation date | -| updatedAt | String | Date of the last update | - -\*The fields mentioned are all attributes in the response. Type and ID are not mentioned. - -### Possible Errors -| Code | Reason | -| --- | --- | -| 402 | A customer with the specified ID was not found | -| 405 | Customer reference is missing | -| 410 | Failed to save changes | -| 414 | The provided gender is invalid | - -## Managing the List of Customer Addresses -Customers can provide a set of addresses used for billing, goods delivery, and other purposes. The **Customer API** provides a set of endpoints to manage addresses of a registered customer. - -{% info_block warningBox "Authentication " %} -Only authenticated users can manage customer addresses. For details on how to authenticate a customer, see [Authentication and Authorization](). -{% endinfo_block %} - -## Adding an Address -To add an address to a customer, send a _POST_ request to the following endpoint: -`/customers/{% raw %}{{{% endraw %}customer_id{% raw %}}}{% endraw %}/addresses` -Request sample: `POST http://mysprykershop.com/customers/DE-25/addresses` -where `DE-25` is the unique identifier of the customer you want to add an address to. - -The POST data must contain a **RestAddressesRequest**. - -| Attribute | Type | Required | Description | -| --- | --- | --- | --- | -| salutation | String | ✓ | Salutation to use when addressing the customer | -| firstName | String | ✓ | Customer's first name | -| lastName | String | ✓ | Customer's last name | -| address1 | String | ✓ | The 1st line of the customer's address | -| address2 | String | ✓ | The 2nd line of the customer's address | -| address3 | String | ✓ | The 3rd line of the customer's address | -| zipCode | String | ✓ | ZIP code | -| city | String | ✓ | Specifies the city | -| country | String | ✓ | Specifies the country | -| company | String | ✓ | Customer's company | -| phone | String | ✓ | Customer's phone number | -| isDefaultShipping | Boolean | ✓ | Specifies whether the address should be used as the default shipping address of the customer. If the parameter is not set, the default value is true. | -| isDefaultBilling | Boolean | ✓ | Specifies whether the address should be used as the default billing address of the customer. If the parameter is not set, the default value is true. | -| iso2Code | String | ✓ | Specifies an ISO 2 Country Code to use | - -**Request sample body** -```js -{ - "data" : { - "type": "addresses", - "attributes": { - "salutation": "Mr", - "firstName": "John", - "lastName": "Doe", - "address1": "11 Second Street", - "address2": "4th Floor", - "address3": "Suite 555", - "zipCode": "12312", - "city": "Berlin", - "country": "Germany", - "iso2Code": "DE" - "phone": "22111-3-4-5", - "isDefaultShipping": false, - "isDefaultBilling": false - } - -``` - -If the address was created successfully, the endpoint will respond with a **RestAddressesResponse**. - -**Sample response** -```js -{ - "data": { - "type": "addresses", - "id": 3a6ee102-007f-5245-aaec-af5b6e05685b, - "attributes": { - "salutation": "Mr", - "firstName": "John", - "lastName": "Doe", - "address1": "11 Second Street", - "address2": "4th Floor", - "address3": "Suite 555", - "zipCode": "12312", - "city": "Berlin", - "country": "United States", - "iso2Code": "US", - "company": null, - "phone": "22111-3-4-5", - "isDefaultShipping": false, - "isDefaultBilling": false - }, - "links": { - "self": "http://mysprykershop.com.com/customers/DE--25/addresses/" - } - } - } -``` - -The **id** attribute of the response will contain a unique identifier of the address that was created. You can use the ID to view and edit the address in the future. - -**Sample response** - -| Field* | Type | Description | -| --- | --- | --- | -| salutation | String | Salutation to use when addressing to the customer. | -| firstName | String | Customer's first name. | -| lastName | String | Customer's last name. | -| address1 | String | The 1st line of the customer's address. | -| address2 | String | The 2nd line of the customer's address. | -| address3 | String | The 3rd line of the customer's address. | -| zipCode | String | ZIP code. | -| city | String | Specifies the city. | -| country | String | Specifies the country. | -| iso2Code | | Specifies an ISO 2 Country Code to use. | -| company | String | Specifies the customer's company. | -| phone | String | Specifies the customer's phone number. | -| isDefaultShipping | String | Specifies whether the address should be used as the default shipping address of the customer. If the parameter is not set, the default value is **true**. This is also the case for the first address to be saved. | -| isDefaultBilling | String | Specifies whether the address should be used as the default billing address of the customer. If the parameter is not set, the default value is **true**. This is also the case for the first address to be saved. | - -\*The fields mentioned are all attributes in the response. Type and ID are not mentioned. - -## Modifying an Address - -To modify an address, send a PATCH request to the following endpoint: -`/customers/{% raw %}{{{% endraw %}customer_id{% raw %}}}{% endraw %}/addresses/{% raw %}{{{% endraw %}address_id{% raw %}}}{% endraw %}` -Request sample: `PATCH http://mysprykershop.com/customers/DE-25/addresses/3a6ee102-007f-5245-aaec-af5b6e05685b` -where `DE-25` is the unique identifier of the customer you want to modify an address for, and `3a6ee102-007f-5245-aaec-af5b6e05685b` is the ID of the address you want to change. -The POST data must contain a **RestAddressesRequest**. The attributes and format of the request are the same as when creating an address. - -| Field* | Type | Description | -| --- | --- | --- | -| salutation | String | Salutation to use when addressing the customer | -| firstName | String | Customer's first name | -| lastName | String | Customer's last name | -| address1 | String | The 1st line of the customer's address | -| address2 | String | The 2nd line of the customer's address | -| address3 | String | The 3rd line of the customer's address | -| zipCode | String | ZIP code | -| city | String | Specifies the city | -| country | String | Specifies the country | -| iso2Code | String | Specifies an ISO 2 Country Code to use | -| company | String | Specifies the customer's company | -| phone | String | Specifies the customer's phone number | -| isDefaultShipping | String | Specifies whether the address should be used as the default shipping address of the customer. If the parameter is not set, the default value is **true**. This is also the case for the first address to be saved. | -| isDefaultBilling | String | Specifies whether the address should be used as the default billing address of the customer. If the parameter is not set, the default value is **true**. This is also the case for the first address to be saved. | - -\*The fields mentioned are all attributes in the response. Type and ID are not mentioned. - -**Sample response** - -The same as when creating an address, in case, if the request is successful, the endpoint returns a **RestAddressesResponse** with updated data. - -## Getting all Addresses of a Customer -To get all the addresses of a user, use the following endpoint: -`/customers/{% raw %}{{{% endraw %}customer_id{% raw %}}}{% endraw %}/addresses` -Request sample: `GET http://mysprykershop.com/customers/DE-25/addresses` -where `DE-25` is the unique identifier of the customer whose address you want to get. - -| Field* | Type | Description | -| --- | --- | --- | -| salutation | String | Salutation to use when addressing the customer | -| firstName | String | Customer's first name | -| lastName | String | Customer's last name | -| address1 | String | The 1st line of the customer's address | -| address2 | String | The 2nd line of the customer's address | -| address3 | String | The 3rd line of the customer's address | -| zipCode | String | ZIP code | -| city | String | Specifies the city | -| country | String | Specifies the country | -| iso2Code | String | Specifies an ISO 2 Country Code to use. | -| company | String | Specifies customer's company | -| phone | String | Specifies customer's phone number | -| isDefaultShipping | String | Specifies whether the address should be used as the default shipping address of the customer. If the parameter is not set, the default value is **true**. This is also the case for the first address to be saved. | -| isDefaultBilling | String | Specifies whether the address should be used as the default billing address of the customer. If the parameter is not set, the default value is **true**. This is also the case for the first address to be saved. | - -\*The fields mentioned are all attributes in the response. Type and ID are not mentioned. - -**Sample response** - -If the request was successful, the endpoint would return **RestAddressesResponse** with all the customer's addresses. - -**Example** -```js -{ - "data": [ - { - "type": "addresses", - "id": "3a6ee102-007f-5245-aaec-af5b6e05685b", - "attributes": { - "salutation": "Mr", - "firstName": "Jason", - "lastName": "Voorhees", - "address1": "123 Sleep Street", - "address2": "123", - "address3": null, - "zipCode": "12345", - "city": "Dresden", - "country": "Germany", - "iso2Code": "DE", - "company": null, - "phone": null, - "isDefaultShipping": true, - "isDefaultBilling": true - }, - "links": { - "self": "http://mysprykershop.com/customers/DE--25/addresses/3a6ee102-007f-5245-aaec-af5b6e05685b" - } - }, - { - "type": "addresses", - "id": "5f00ce65-dd64-5b49-ad3c-f5fae475e7e6", - "attributes": { - "salutation": "Mr", - "firstName": "John", - "lastName": "Doe", - "address1": "11 Second Street", - "address2": "4th Floor", - "address3": "Suite 555", - "zipCode": "12312", - "city": "Berlin", - "country": "United States", - "iso2Code": "US", - "company": null, - "phone": "22111-3-4-5", - "isDefaultShipping": false, - "isDefaultBilling": false - }, - "links": { - "self": "http://mysprykershop.com/customers/DE--25/addresses/5f00ce65-dd64-5b49-ad3c-f5fae475e7e6" - } - } - ], - "links": { - "self": "http://mysprykershop.com/customers/DE--25/addresses" - } - } -``` - -## Getting a Specific Address -To get a specific address by ID, use the following endpoint: -`/customers/{% raw %}{{{% endraw %}customer_id{% raw %}}}{% endraw %}/addresses/{% raw %}{{{% endraw %}address_id{% raw %}}}{% endraw %}` -Request sample: `GET http://mysprykershop.com/customers/DE-25/addresses/3a6ee102-007f-5245-aaec-af5b6e05685b` -where `DE-25` is the unique identifier of the customer whose address you want to get, and `3a6ee102-007f-5245-aaec-af5b6e05685b` is the ID of the address you need. - -**Sample response** - -| Field* | Type | Description | -| --- | --- | --- | -| salutation | String | Salutation to use when addressing the customer | -| firstName | String | Customer's first name | -| lastName | String | Customer's last name | -| address1 | String | The 1st line of the customer's address | -| address2 | String | The 2nd line of the customer's address | -| address3 | String | The 3rd line of the customer's address | -| zipCode | String | ZIP code | -| city | String | Specifies the city | -| country | String | Specifies the country | -| iso2Code | String | Specifies an ISO 2 Country Code to use | -| company | String | Specifies the customer's company | -| phone | String | Specifies the customer's phone number | -| isDefaultShipping | String | Specifies whether the address should be used as the default shipping address of the customer. If the parameter is not set, the default value is **true**. This is also the case for the first address to be saved. | -| isDefaultBilling | String | Specifies whether the address should be used as the default billing address of the customer. If the parameter is not set, the default value is **true**. This is also the case for the first address to be saved. | - -\*The fields mentioned are all attributes in the response. Type and ID are not mentioned. - -If the request is successful, the endpoint returns **RestAddressesResponse** with the requested address. - -## Deleting an Address -To delete an address, use the following endpoint: -`/customers/{% raw %}{{{% endraw %}customer_id{% raw %}}}{% endraw %}/addresses/{% raw %}{{{% endraw %}address_id{% raw %}}}{% endraw %}` -Request sample: `DELETE http://mysprykershop.com/customers/DE-25/addresses/3a6ee102-007f-5245-aaec-af5b6e05685b` -where `DE-25` is the unique identifier of the customer whose address you want to delete, and `3a6ee102-007f-5245-aaec-af5b6e05685b` is the ID of the necessary address. - -**Sample response** - -If the address is deleted successfully, the endpoint will respond with the **204 No Content** status code. - -### Possible Errors -| Code | Reason | -| --- | --- | -| 402 | A customer with the specified ID was not found | -| 404 | The specified address could not be found | -| 405 | Customer reference is missing | -| 409 | Failed to update an address | -| 411 | Unauthorized request | -| 412 | No address ID provided | - -## Changing Customer's Password -To change a password for a customer, use PATCH method and the following endpoint: -`/customer-password` -Request sample: `PATCH http://mysprykershop.com/customer-password` - -{% info_block warningBox "Authentication" %} -To use this endpoint, customers need to authenticate first. For details, see [Authentication and Authorization](). -{% endinfo_block %} - -**Attributes:** -| Attribute | Type | Required | Description | -| --- | --- | --- | --- | -| password | String | ✓ | Specifies old password of a customer | -| newPassword | String | ✓ | Specifies the new password | -| confirmPassword | String | ✓ | Specifies password confirmation for password change. | - -**Request sample body** -```js -{ - "data": { - "type": "customer-password", - "attributes": { - "password": "change123", - "newPassword": "321egnahc", - "confirmPassword": "321egnahc" - } - } -} -``` - -**Sample Response** - -If password is changed successfully, the endpoint will respond with the **204 No Content** status code. - -### Possible Errors: -| Code | Reason | -| --- | --- | -| 406 | The new password and password confirmation do not match | -| 407 | Password change failed | -| 408 | Invalid password | - -## Resetting Customer's Password -In case customer forgets their password, Glue API also provides the possibility to reset it. For this purpose, you need to use the following procedure: - -1. Send a POST request to the following endpoint: -`/customer-forgotten-password` -Request sample: `POST http://mysprykershop.com/customer-forgotten-password` -**Sample Request Body** - ```js - { - "data": { - "type": "customer-forgotten-password", - "attributes": { - "email":"jdo@example.com" - } - } - ``` - If the request was successful, the endpoint will respond with the 204 No Content status point, an email with a password reset link will be sent to the customer. The email will contain a **Password Reset Key**. - -2. Send a PATCH request to the following endpoint: -`/customer-restore-password` -Request sample: `PATCH http://mysprykershop.com/customer-restore-password` -**Attributes:** - -| Attribute | Type | Required | Description | -| --- | --- | --- | --- | -| restorePasswordKey | String | ✓ | Specifies the Password Reset Key provided in the email sent to the customer. | -| password | String | ✓ | Specifies the password. | -| passwordConfirmation | String | ✓ | Specifies a password confirmation for password change. | - -**Request sample body** -```js -{ - "data": { - "type": "customer-restore-password", - "attributes": { - "restorePasswordKey":"9de02f7a4e08dcdf06e6b24add1e01da", - "password":"new_pssword", - "confirmPassword":"new_pssword" - } - } -} -``` -If the password reset was successful, the endpoint will respond with the **204 No Content** status code. - -### Possible Errors -| Code | Reason | -| --- | --- | -| 406 | The new password and password confirmation do not match | -| 408 | Invalid password | -| 411 | Unauthorized request | -| 415 | The Password Reset Key is invalid | - -## Anonymizing a Customer -To anonymize a customer account, send a DELETE request to the following endpoint: -`/customers/{% raw %}{{{% endraw %}customerReference{% raw %}}}{% endraw %}` -Request sample: `DELETE http://mysprykershop.com/customers/DE-25` -where `DE-25` is the unique identifier of the customer you want to anonymize. -**Sample response** - -If the customer is anonymized successfully, the endpoint will respond with the 204 No Content status code. diff --git a/docs/scos/dev/glue-api-guides/202005.0/managing-customers/retrieving-customer-orders.md b/docs/scos/dev/glue-api-guides/202005.0/managing-customers/retrieving-customer-orders.md deleted file mode 100644 index 4a203cfa78c..00000000000 --- a/docs/scos/dev/glue-api-guides/202005.0/managing-customers/retrieving-customer-orders.md +++ /dev/null @@ -1,560 +0,0 @@ ---- -title: Retrieving Customer's Order History -description: The guide instantiates a step-by-step procedure on how to retrieve a list of orders or a specific order for the customer. -last_updated: Oct 21, 2020 -template: glue-api-storefront-guide-template -originalLink: https://documentation.spryker.com/v5/docs/retrieving-customers-order-history -originalArticleId: 3989ca5d-b1c1-4929-bfff-cf7a3540b1dc -redirect_from: - - /v5/docs/retrieving-customers-order-history - - /v5/docs/en/retrieving-customers-order-history - - /docs/scos/dev/glue-api-guides/202005.0/retrieving-orders.html -related: - - title: Order Management - link: docs/scos/user/features/page.version/order-management-feature-overview/order-management-feature-overview.html - - title: Calculation 3.0 - link: docs/scos/dev/feature-walkthroughs/page.version/cart-feature-walkthrough/calculation-3-0.html ---- - -For every registered customer, there is an order history retrievable. The list of orders, as well as detailed order information including every step of the calculation and addresses used in the orders, is available for retrieval. - -In your development, this resource can help you to: - -* Make the order history available to customers -* Make order details available to enable reordering functionality - -The **Order History API** allows you to retrieve all orders made by a registered customer. - -{% info_block warningBox "Authentication" %} -Since order history is available for registered users only, the endpoints provided by the API cannot be accessed anonymously. For this reason, you always need to pass a user's authentication token in your REST requests. For details on how to authenticate a user and retrieve the token, see [Authentication and Authorization](/docs/scos/dev/glue-api-guides/{{page.version}}/authentication-and-authorization.html). -{% endinfo_block %} - -## Installation -For detailed information on the modules that provide the API functionality and related installation instructions, see: -* [Glue API: Order Management Feature Integration](/docs/scos/dev/feature-integration-guides/{{page.version}}/glue-api/glue-api-order-management-feature-integration.html) -* [Glue API: Measurement Units Feature Integration](/docs/scos/dev/feature-integration-guides/{{page.version}}/glue-api/glue-api-measurement-units-feature-integration.html) - -## Retrieving all Orders -To retrieve a list of all orders made by a registered customer, send the request: - ---- -`GET` **/orders** - ---- - -### Request -Request sample: -`GET https://glue.mysprykershop.com/orders` - -### Response -The endpoint responds with an array of orders placed by the authenticated customer. In the response, each order will have a unique identifier. It is specified in the **id** attribute. You can use the ID to retrieve detailed order information. Also, **self** links will be provided to access an order. individually using the REST API. - -
    -Response sample with one order - -``` -{ - "data": [ - { - "type": "orders", - "id": "DE--1", - "attributes": { - "createdAt": "2019-11-01 09:21:14.307061", - "totals": { - "expenseTotal": 1000, - "discountTotal": 23286, - "taxTotal": 34179, - "subtotal": 236355, - "grandTotal": 214069, - "canceledTotal": 0 - }, - "currencyIsoCode": "EUR", - "priceMode": "GROSS_MODE" - }, - "links": { - "self": "https://glue.mysprykershop.com/orders/DE--1" - } - } - ], - "links": { - "self": "https://glue.mysprykershop.com/orders" - } -} -``` -
    -
    - -| Attribute* | Type | Description | -| --- | --- | --- | -| createdAt | String | Date and time when the order was created. | -| expenseTotal | Integer | Total amount of expenses (e.g. shipping costs). | -| discountTotal | Integer | Total amount of discounts applied. | -| taxTotal | Integer | Total amount of taxes paid. | -| subtotal | Integer | Subtotal of the order. | -| grandTotal | Integer | Grand total of the order. | -| canceledTotal | Integer | Total canceled amount. | -| currencyIsoCode | String | ISO 4217 code of the currency that was selected when placing the order.| -| priceMode | String | Price mode that was active when placing the order. Possible values:
    • **NET_MODE** - prices before tax;
    • **GROSS_MODE** - prices after tax.
    | - -*Type and ID attributes are not mentioned. - - -## Paging Through Orders -By default, the above request will return all orders placed by a customer. However, you can also enable paging and receive results in pages of a limited size. For this purpose, use the **limit** and **offset** parameters in your request: -| URL | Description | -| --- | --- | -| /orders | Returns all orders made by a customer. | -| /orders?limit=10 | Returns maximum **10** orders. | -| /orders?offset=10&limit=10 | Returns orders **11** through **20**. | -| /orders?offset=20 | Returns all orders starting from the **21st** to the end. | - -When paging is enabled, the **links** section of the JSON response will contain links for the first, previous, next and last pages. - -
    -View example - -``` -{ - "data": [ - { - "type": "orders", - "id": "DE--1", - "attributes": { - "createdAt": "2018-11-01 17:57:14.354849", - "totals": { - "expenseTotal": 490, - "discountTotal": 30237, - "taxTotal": 42746, - "subtotal": 297470, - "grandTotal": 267723, - "canceledTotal": 0 - }, - "currencyIsoCode": "EUR", - "priceMode": "GROSS_MODE" - }, - "links": { - "self": "https://glue.mysprykershop.com/orders/DE--1" - } - } - ], - "links": { - "self": "https://glue.mysprykershop.com/orders?page[offset]=2&page[limit]=2", - "last": "https://glue.mysprykershop.com/orders?page[offset]=2&page[limit]=2", - "first": "https://glue.mysprykershop.com/orders?page[offset]=0&page[limit]=2", - "prev": "https://glue.mysprykershop.com/orders?page[offset]=0&page[limit]=2" - } -} -``` -
    -
    - - -## Retrieving an Order -To retrieve detailed information on an order, send the request: - ---- -`GET` **/orders/*{% raw %}{{{% endraw %}order_id{% raw %}}}{% endraw %}*** - ---- - -| Path parameter | Description | -| --- | --- | -| order_id | A unique identifier of an order. [Retrieve all orders](#retrieving-all-orders) to get it. | - -### Request -Request sample: `GET https://glue.mysprykershop.com/orders/DE--1` - -### Response - -
    -Response sample - -```json -{ - "data": { - "type": "orders", - "id": "DE--4", - "attributes": { - "createdAt": "2020-03-24 16:38:24.237860", - "currencyIsoCode": "EUR", - "priceMode": "GROSS_MODE", - "totals": { - "expenseTotal": 490, - "discountTotal": 2490, - "taxTotal": 6067, - "subtotal": 39998, - "grandTotal": 37998, - "canceledTotal": 0, - "remunerationTotal": 0 - }, - "billingAddress": { - "salutation": "Mr", - "firstName": "Test", - "middleName": null, - "lastName": "User", - "address1": "Julie-Wolfthorn-Straße", - "address2": "1", - "address3": "new address", - "company": "spryker", - "city": "Berlin", - "zipCode": "10115", - "poBox": null, - "phone": "+49 (30) 2084 98350", - "cellPhone": null, - "description": null, - "comment": null, - "email": null, - "country": "Germany", - "iso2Code": "DE" - }, - "shippingAddress": { - "salutation": "Ms", - "firstName": "Test", - "middleName": null, - "lastName": "User", - "address1": "Julie-Wolfthorn-Straße", - "address2": "1", - "address3": "new one", - "company": "spryker", - "city": "Berlin", - "zipCode": "10115", - "poBox": null, - "phone": "+49 (30) 2084 98350", - "cellPhone": null, - "description": null, - "comment": null, - "email": null, - "country": "Germany", - "iso2Code": "DE" - }, - "items": [ - { - "name": "Canon IXUS 160", - "sku": "002_25904004", - "sumPrice": 9999, - "quantity": 1, - "unitGrossPrice": 9999, - "sumGrossPrice": 9999, - "taxRate": "19.00", - "unitNetPrice": 0, - "sumNetPrice": 0, - "unitPrice": 9999, - "unitTaxAmountFullAggregation": 3033, - "sumTaxAmountFullAggregation": 3033, - "refundableAmount": 18999, - "canceledAmount": 0, - "sumSubtotalAggregation": 19999, - "unitSubtotalAggregation": 19999, - "unitProductOptionPriceAggregation": 10000, - "sumProductOptionPriceAggregation": 10000, - "unitExpensePriceAggregation": 0, - "sumExpensePriceAggregation": null, - "unitDiscountAmountAggregation": 1000, - "sumDiscountAmountAggregation": 1000, - "unitDiscountAmountFullAggregation": 1000, - "sumDiscountAmountFullAggregation": 1000, - "unitPriceToPayAggregation": 18999, - "sumPriceToPayAggregation": 18999, - "taxRateAverageAggregation": "19.00", - "taxAmountAfterCancellation": null, - "orderReference": null, - "uuid": "d5e948d9-f470-5b9a-b1c7-c1321761312a", - "isReturnable": true, - "metadata": { - "superAttributes": [], - "image": "https://images.icecat.biz/img/norm/medium/25904004-9055.jpg" - }, - "calculatedDiscounts": [ - { - "unitAmount": 1000, - "sumAmount": 1000, - "displayName": "10% Discount for all orders above", - "description": "Get a 10% discount on all orders above certain value depending on the currency and net/gross price. This discount is not exclusive and can be combined with other discounts.", - "voucherCode": null, - "quantity": 1 - } - ], - "productOptions": [ - { - "optionGroupName": "Insurance", - "sku": "OP_insurance", - "optionName": "Two (2) year insurance coverage", - "price": 10000 - } - ] - }, - { - "name": "Canon IXUS 160", - "sku": "002_25904004", - "sumPrice": 9999, - "quantity": 1, - "unitGrossPrice": 9999, - "sumGrossPrice": 9999, - "taxRate": "19.00", - "unitNetPrice": 0, - "sumNetPrice": 0, - "unitPrice": 9999, - "unitTaxAmountFullAggregation": 3034, - "sumTaxAmountFullAggregation": 3034, - "refundableAmount": 18999, - "canceledAmount": 0, - "sumSubtotalAggregation": 19999, - "unitSubtotalAggregation": 19999, - "unitProductOptionPriceAggregation": 10000, - "sumProductOptionPriceAggregation": 10000, - "unitExpensePriceAggregation": 0, - "sumExpensePriceAggregation": null, - "unitDiscountAmountAggregation": 1000, - "sumDiscountAmountAggregation": 1000, - "unitDiscountAmountFullAggregation": 1000, - "sumDiscountAmountFullAggregation": 1000, - "unitPriceToPayAggregation": 18999, - "sumPriceToPayAggregation": 18999, - "taxRateAverageAggregation": "19.00", - "taxAmountAfterCancellation": null, - "orderReference": null, - "uuid": "dedc66da-9af9-504f-bdfc-e45b23118786", - "isReturnable": true, - "metadata": { - "superAttributes": [], - "image": "https://images.icecat.biz/img/norm/medium/25904004-9055.jpg" - }, - "calculatedDiscounts": [ - { - "unitAmount": 1000, - "sumAmount": 1000, - "displayName": "10% Discount for all orders above", - "description": "Get a 10% discount on all orders above certain value depending on the currency and net/gross price. This discount is not exclusive and can be combined with other discounts.", - "voucherCode": null, - "quantity": 1 - } - ], - "productOptions": [ - { - "optionGroupName": "Insurance", - "sku": "OP_insurance", - "optionName": "Two (2) year insurance coverage", - "price": 10000 - } - ] - } - ], - "expenses": [ - { - "type": "SHIPMENT_EXPENSE_TYPE", - "name": "Standard", - "sumPrice": 490, - "unitGrossPrice": 490, - "sumGrossPrice": 490, - "taxRate": "19.00", - "unitNetPrice": 0, - "sumNetPrice": 0, - "canceledAmount": null, - "unitDiscountAmountAggregation": null, - "sumDiscountAmountAggregation": null, - "unitTaxAmount": 0, - "sumTaxAmount": 0, - "unitPriceToPayAggregation": 0, - "sumPriceToPayAggregation": 0, - "taxAmountAfterCancellation": null - } - ], - "payments": [ - { - "amount": 37998, - "paymentProvider": "DummyPayment", - "paymentMethod": "invoice" - } - ], - "calculatedDiscounts": [ - { - "unitAmount": null, - "sumAmount": 490, - "displayName": "Free standard delivery", - "description": "Free standard delivery for all orders above certain value depending on the currency and net/gross price. This discount is not exclusive and can be combined with other discounts.", - "voucherCode": null, - "quantity": 1 - }, - { - "unitAmount": null, - "sumAmount": 2000, - "displayName": "10% Discount for all orders above", - "description": "Get a 10% discount on all orders above certain value depending on the currency and net/gross price. This discount is not exclusive and can be combined with other discounts.", - "voucherCode": null, - "quantity": 2 - } - ] - }, - "links": { - "self": "http://glue.de.suite.local/orders/DE--4" - } - } -} -``` -
    - -**General Order Information** -| Attribute* | Type | Description | -| --- | --- | --- | -| createdAt | String | Date and time when the order was created. | -| currencyIsoCode | String | ISO 4217 code of the currency that was selected when placing the order. | -| priceMode | String | Price mode that was active when placing the order. Possible values:
    • **NET_MODE** - prices before tax;
    • **GROSS_MODE** - prices after tax.
    | - -**Totals Calculations** -| Attribute | Type | Description | -| --- | --- | --- | -| expenseTotal | Integer | Total amount of expenses (e.g. shipping costs). | -| discountTotal | Integer | Total amount of discounts applied. | -| taxTotal | Integer | Total amount of taxes paid. | -| subtotal | Integer | Subtotal of the order. | -| grandTotal | Integer | Grand total of the order | -| canceledTotal | Integer | Total canceled amount. | -| remunerationTotal | Integer || - -**Billing and Shipping Addresses** -| Attribute* | Type | Description | -| --- | --- | --- | -| salutation | String | Salutation to use when addressing the customer. | -| firstName | String | Customer's first name. | -| lastName | String | Customer's last name. | -| address1 | String | The 1st line of the customer's address. | -| address2 | String | The 2nd line of the customer's address. | -| address3 | String | The 3rd line of the customer's address. | -| zipCode | String | ZIP code. | -| city | String | Specifies the city. | -| country | String | Specifies the country. | -| poBox | String | PO Box to use for communication. | -| company | String | Specifies the customer's company. | -| phone | String | Specifies the customer's phone number. | -| cellPhone | String | Mobile phone number. | -| email | String | Email address to use for communication. | -| isDefaultShipping | String | Specifies whether the address should be used as the default shipping address of the customer:
    • If the parameter is not set, the default value is **true**.
    • If the customer does not have a default shipping address, the value is **true**.
    | -| isDefaultBilling | String | Specifies whether the address should be used as the default billing address of the customer
    • If the parameter is not set, the default value is **true**.
    • If the customer does not have a default billing address, the value is **true**.
    . | -| iso2Code | String | ISO 2-Letter Country Code to use. | -| description | String | Address description. | -| comment | String | Address comment. | - -**Order Item Information** -| Attribute* | Type | Description | -| --- | --- | --- | -| name | String | Name of the product. | -| sku | String | SKU of the product. | -| sumPrice | Integer | Sum of the prices. | -| sumPriceToPayAggregation | Integer | Sum of the prices to pay (after discounts). | -| quantity | Integer | Quantity of the product ordered. | -| superAttributes | String | Since the bought product is a concrete product, and super attributes are saved with the abstract product, this field is expected to stay empty. | -| image | String | URL to an image of the product. | - -**Order Item Information** (for each item) - -| Attribute* | Type | Description | -| --- | --- | --- | -| name | String | Product name. | -| SKU | String | Product SKU. | -| sumPrice | Integer | Sum of all product prices. | -| quantity | Integer | Product quantity ordered. | -| unitGrossPrice | Integer | Single item gross price. | -| sumGrossPrice | Integer | Sum of items gross price. | -| taxRate | Integer | Current tax rate, in percent. | -| unitNetPrice | Integer | Single item net price. | -| sumNetPrice | Integer | Sum total of net prices for all items. | -| unitPrice | Integer | Single item price without assuming if it is new or gross. *This price should be displayed everywhere when a product price is displayed. It allows switching tax mode without side effects*. | -| unitTaxAmountFullAggregation | Integer | Total tax amount for a given item, with additions. | -| sumTaxAmountFullAggregation | Integer | Total tax amount for a given sum of items, with additions. | -| refundableAmount | Integer | Available refundable amount for an item (order only). | -| canceledAmount | Integer | Total canceled amount for this item (order only). | -| sumSubtotalAggregation | Integer | Sum of subtotals of the items. | -| unitSubtotalAggregation | Integer | Subtotal for the given item. | -| unitProductOptionPriceAggregation | Integer | Item total product option price. | -| sumProductOptionPriceAggregation | Integer | Item total of product options for the given sum of items. | -| unitExpensePriceAggregation | Integer | Item expense total for a given item. | -| sumExpensePriceAggregation | Integer | Total amount of expenses for the given items. | -| unitDiscountAmountAggregation | Integer | Item total discount amount. | -| sumDiscountAmountAggregation | Integer | Sum of Item total discount amounts. | -| unitDiscountAmountFullAggregation | Integer | Sum of Item total discount amount. | -| sumDiscountAmountFullAggregation | Integer | Item total discount amount, with additions. | -| unitPriceToPayAggregation | Integer | Item total price to pay after discounts, with additions. | -| sumPriceToPayAggregation |Integer | Sum of all prices to pay (after discounts were applied). | -| taxRateAverageAggregation | Integer | Item tax rate average, with additions. This value is used when recalculating the tax amount after cancellation. | -| taxAmountAfterCancellation | Integer | Tax amount after cancellation, recalculated using tax average. | -| uuid | String | Unique identifier of the order. | -| isReturnable | Boolean | Specifies whether the sales order item is returnable or not. | -| superAttributes | String | *Always empty. Since products purchased are concrete products, and super attributes are available for abstract products, this field is expected to be empty at all times.* | -| image | String | Product image URL. | - -**Calculated Discounts for Items** -| Attribute* | Type | Description | -| --- | --- | --- | -| unitAmount | Integer | Discount value applied to each order item of the corresponding product. | -| sumAmount | Integer | Sum of the discount values applied to the order items of the corresponding product. | -| displayName | String | Name of the discount applied. | -| description | String | Description of the discount. | -| voucherCode | String | Voucher code redeemed. | -| quantity | String | Number of discounts applied to the corresponding product. | - -**Product Options** -| Attribute* | Type | Description | -| --- | --- | --- | -| sku | String | SKU of the product option. | -| optionName | String | Name of the product option. | -| price | Integer | Price for the product option. | - -**Calculated Discounts** -| Attribute* | Type | Description | -| --- | --- | --- | -| unitAmount | Integer | Amount of the discount provided by the given item for each unit of the product, in cents. | -| sumAmount | Integer | Total amount of the discount provided by the given item, in cents. | -| displayName | String | Display name of the given discount. | -| description | String | Description of the given discount. | -| voucherCode | String | Voucher code applied, if any. | -| quantity | String | Number of times the discount was applied. | - -**Expenses** -| Attribute* | Type | Description | -| --- | --- | --- | -| type | String | Expense type. | -| name | String | Expense name. | -| sumPrice | Integer | Sum of expenses calculated. | -| unitGrossPrice | Integer | Single item's gross price. | -| sumGrossPrice | Integer | Sum of items' gross price. | -| taxRate | Integer | Current tax rate in percent. | -| unitNetPrice | Integer | Single item net price. | -| sumNetPrice | Integer | Sum of items' net price. | -| canceledAmount | Integer | Total canceled amount for this item (order only). | -| unitDiscountAmountAggregation | Integer | Item total discount amount. | -| sumDiscountAmountAggregation | Integer | Sum of items' total discount amount. | -| unitTaxAmount | Integer | Tax amount for a single item, after discounts. | -| sumTaxAmount | Integer | Tax amount for a sum of items (order only). | -| unitPriceToPayAggregation | Integer | Item total price to pay after discounts with additions. | -| sumPriceToPayAggregation | Integer | Sum of items' total price to pay after discounts with additions. | -| taxAmountAfterCancellation | Integer | Tax amount after cancellation, recalculated using tax average. | - -**Measurement unit calculations** -| Attribute* | Type | Description | -| --- | --- | --- | -| salesUnit | Object | List of attributes defining the sales unit to be used for item amount calculation. | -| conversion | integer | Factor to convert a value from sales to base unit. If it is "null", the information is taken from the global conversions. | -| precision | integer | Ratio between a sales unit and a base unit. | -| measurementUnit | string | Code of the measurement unit. | -| name | String | Name of the measurement unit. | -| code | String | Code of the measurement unit. | - - -**Payments** -| Attribute* | Type | Description | -| --- | --- | --- | -| amount | Integer | Amount paid via the corresponding payment provider in cents. | -| paymentProvider | String | Name of the payment provider. | -| paymentMethod | String | Name of the payment method. | - -**Shipments** -| Attribute* | Type | Description | -| --- | --- | --- | -| shipmentMethodName | String | Shipment method name. | -| carrierName | String | Shipment method name. | -| deliveryTime | DateTimeUtc | Desired delivery time, if available. | -| defaultGrossPrice | Integer | Default gross price of delivery, in cents. | -| defaultNetPrice | Integer | Default net price of delivery, in cents. | -| currencyIsoCode | String | ISO 4217 code of the currency in which the prices are specified. | - -*Type and ID attributes are not mentioned. diff --git a/docs/scos/dev/glue-api-guides/202005.0/managing-products/managing-product-ratings-and-reviews.md b/docs/scos/dev/glue-api-guides/202005.0/managing-products/managing-product-ratings-and-reviews.md deleted file mode 100644 index 112d97ab928..00000000000 --- a/docs/scos/dev/glue-api-guides/202005.0/managing-products/managing-product-ratings-and-reviews.md +++ /dev/null @@ -1,407 +0,0 @@ ---- -title: Managing Product Ratings and Reviews -last_updated: Sep 15, 2020 -template: glue-api-storefront-guide-template -originalLink: https://documentation.spryker.com/v5/docs/retrieving-ratings-and-reviews -originalArticleId: 3c078943-f7b0-4db0-8dcf-5d015d04e739 -redirect_from: - - /v5/docs/retrieving-ratings-and-reviews - - /v5/docs/en/retrieving-ratings-and-reviews -related: - - title: Rating and Reviews feature overview - link: docs/scos/user/features/{{page.version}}/product-rating-and-reviews-feature-overview.html ---- - -[Ratings and reviews](/docs/scos/user/features/{{page.version}}/product-rating-and-reviews-feature-overview.html) allow customers to share their opinions and experiences about purchases. This enables customers to take meaningful decisions about purchases and increases their trust with the shop. - -Glue REST API allows retrieving a list of ratings and reviews for each product, as well as its average rating. This can help frontend developers in building the product page, extending it with the ratings and reviews relevant to each product. Also, the average rating of each product, as well as the number of times it has been reviewed, will be available in all endpoints where abstract and concrete products can be included as a relationship, such as, for example, [/catalog-search](/docs/scos/dev/glue-api-guides/{{page.version}}/searching-the-product-catalog.html), [/related-products](/docs/scos/dev/glue-api-guides/{{page.version}}/managing-products/retrieving-related-products.html#retrieve-related-items-of-an-abstract-product), [/up-selling-products](/docs/scos/dev/glue-api-guides/{{page.version}}/managing-products/retrieving-related-products.html#getting-up-selling-products-for-a-registered-users-cart), [/abstract-alternative-products](/docs/scos/dev/glue-api-guides/{{page.version}}/managing-products/retrieving-alternative-products.html), etc. - -Apart from that, the API allows developers to add the possibility for customers to post ratings and reviews. - -In this article, you will learn how to perform the following tasks using REST APIs: - -* retrieve the average rating of any product; -* retrieve a list of ratings and reviews for a product; -* allow customers to review and rate products. - -## Installation -For detailed information on the modules that provide the API functionality and related installation instructions, see GLUE: Ratings and Reviews Feature Integration. - -## Retrieving Ratings and Reviews -Using the REST API, developers can retrieve ratings and reviews related to specific abstract or concrete products. - -{% info_block infoBox "Info" %} - -In case of a concrete product, the ratings and reviews are for the parent abstract product. - -{% endinfo_block %} - -### Request -**Abstract Products** - -To retrieve all ratings and reviews for a specific abstract product, send a *GET* request to the following endpoint: - -*/abstract-products/{% raw %}{{{% endraw %}product_sku{% raw %}}}{% endraw %}/product-reviews* - -Request sample: `GET http://glue.mysprykershop.com/abstract-products/035/product-reviews` - -where **035** is the SKU of the product you want to retrieve ratings and reviews for. - -Alternatively, you can retrieve them as a relationship to the abstract product when requesting general product information. This option can be particularly useful to reduce the number of calls and save network traffic when displaying ratings and reviews alongside other product information, for example, on the product page. - -To do so, send a request as follows: - -*/abstract-products/{% raw %}{{{% endraw %}product_sku{% raw %}}}{% endraw %}?**include=product-reviews*** - -Request sample: `GET http://glue.mysprykershop.com/abstract-products/035?include=product-reviews` - -**Concrete products** -To fetch a list of ratings and reviews for a concrete product (for example, its parent abstract product), send a request for the concrete product information and include the ratings and reviews as a relationship: - -*/concrete-products/{% raw %}{{{% endraw %}product_sku{% raw %}}}{% endraw %}?**include=product-reviews*** - -Request sample: `GET http://glue.mysprykershop.com/concrete-products/035_17360369?include=product-reviews` - -where **035_17360369** is the SKU of the product you want to retrieve ratings and reviews for. - -### Response -The API responds with an array of items, each representing a single rating and review object. - -**Response Attributes** -Each item in the array exposes the following attributes: - -| Attribute* | Type | Description | -| --- | --- | --- | -| **nickname** | String | Specifies the customer’s nickname. | -| **rating** | Integer | Indicates the rating given to the product by a specific customer. | -| **summary** | String | Specifies the review summary. | -| **description** | String | -Specifies the full text of a review. | - -* The attributes mentioned are all attributes in the response. Type and ID are not mentioned. - -**Sample Response - Abstract Product Reviews** - -```json -{ - "data": [ - { - "type": "product-reviews", - "id": "40", - "attributes": { - "rating": 3, - "nickname": "Stephen Grumpy", - "summary": "Not that awesome", - "description": "The specs are good, but the build quality desires to be better." - }, - "links": { - "self": "http://glue.mysprykershop.com/product-reviews/40" - } - }, - { - "type": "product-reviews", - "id": "42", - "attributes": { - "rating": 5, - "nickname": "John Doe", - "summary": "Excellent product", - "description": "Powerful processor, bright screen and beatiful design - what else do you need?" - }, - "links": { - "self": "http://glue.mysprykershop.com/product-reviews/42" - } - } - ], - "links": { - "self": "http://glue.mysprykershop.com/abstract-products/139/product-reviews", - "last": "http://glue.mysprykershop.com/abstract-products/139/product-reviews?page[offset]=10&page[limit]=10", - "first": "http://glue.mysprykershop.com/abstract-products/139/product-reviews?page[offset]=0&page[limit]=10", - "next": "http://glue.mysprykershop.com/abstract-products/139/product-reviews?page[offset]=10&page[limit]=10" - } -} -``` - -**Sample Response - Abstract Product Reviews as Relationship** - -```json -{ - "data": { - "type": "abstract-products", - "id": "035", - "attributes": {...}, - "links": {...}, - "relationships": { - "product-reviews": { - "data": [ - { - "type": "product-reviews", - "id": "40" - }, - { - "type": "product-reviews", - "id": "42" - } - ] - } - } - }, - "included": [ - { - "type": "product-reviews", - "id": "40", - "attributes": { - "rating": 3, - "nickname": "Stephen Grumpy", - "summary": "Not that awesome", - "description": "The specs are good, but the build quality desires to be better." - }, - "links": { - "self": "http://glue.mysprykershop.com/product-reviews/40" - } - }, - { - "type": "product-reviews", - "id": "42", - "attributes": { - "rating": 5, - "nickname": "John Doe", - "summary": "Excellent product", - "description": "Powerful processor, bright screen and beatiful design - what else do you need?" - }, - "links": { - "self": "http://glue.mysprykershop.com/product-reviews/42" - } - } - ] -} -``` - -**Sample Response - Concrete Product Reviews** - -```json -{ - "data": { - "type": "concrete-products", - "id": "035_17360369", - "attributes": {...}, - "links": {...}, - "relationships": { - "product-reviews": { - "data": [ - { - "type": "product-reviews", - "id": "40" - }, - { - "type": "product-reviews", - "id": "42" - } - ] - } - } - }, - "included": [ - { - "type": "product-reviews", - "id": "40", - "attributes": { - "rating": 3, - "nickname": "Stephen Grumpy", - "summary": "Not that awesome", - "description": "The specs are good, but the build quality desires to be better." - }, - "links": { - "self": "http://glue.mysprykershop.com/product-reviews/40" - } - }, - { - "type": "product-reviews", - "id": "42", - "attributes": { - "rating": 5, - "nickname": "John Doe", - "summary": "Excellent product", - "description": "Powerful processor, bright screen and beatiful design - what else do you need?" - }, - "links": { - "self": "http://glue.mysprykershop.com/product-reviews/42" - } - } - ] -} -``` - -**Pagination** -You can improve the performance and reduce the amount of network traffic via pagination. Page links can be found in the **links** section of the response. The default option is to retrieve **10** results per page. - -{% info_block infoBox "Info" %} -Pagination is available only if ratings and reviews are requested using the `/abstract-products/{% raw %}{{{% endraw %}product_sku{% raw %}}}{% endraw %}/product-reviews endpoint`. -{% endinfo_block %} - -**Pagination Parameters** -The following page path parameters are used for pagination: - -| Parameter | Description | Example | Explanation | -| --- | --- | --- | --- | -| **offset** | Specifies the number of results to skip. | `?page[offset]=10` | Skip **10** results and display starting from the 11th one. | -| **limit** | Specifies the number of results per single request (page). | `?page[limit]=10` | Return **10** results per page. | -| | Combining paging parameters | `?page[limit]=10&page[offset]=20` | Display **10** results per page and show the **3rd** page. | - -### Possible Errors - -| Status | Reason | -| --- | --- | -| 400 | The abstract product ID is not specified. | -| 404 | An abstract product with the specified ID was not found. | - -## Getting Average Product Rating -The average rating for any product, abstract or concrete, is returned as a part of the request for product information: - -* **abstract** products -Endpoint - */abstract-products/{% raw %}{{{% endraw %}product_sku{% raw %}}}{% endraw %}* -Request sample - `GET http://glue.mysprykershop.com/abstract-products/035` - -* **concrete** products -Endpoint - */concrete-products/{% raw %}{{{% endraw %}product_sku{% raw %}}}{% endraw %}* - -Request sample - `GET http://glue.mysprykershop.com/concrete-products/035_17360369` - -where **035** and **035_17360369** are the SKUs of the products you want to retrieve average ratings for. - -### Response -The endpoints return information on the requested products. The average rating is exposed in the `averageRating` attribute, and the number of times a product was reviewed is returned in the `reviewCount` attribute. - -{% info_block warningBox "Note" %} - -If the product hasn’t been reviewed yet, the `reviewCount` attribute is **null**. - -{% endinfo_block %} - -**Sample Response** - -```json -{ - "data": { - "type": "abstract-products", - "id": "035", - "attributes": { - "sku": "035", - "averageRating": 4, - "reviewCount": 2, - "name": "Asus Zenbook US303UB", - "description": "Classic design,stylish new color ASUS ZenBook series represents the essence of ASUS design spirit...", - "attributes": {...}, - "superAttributesDefinition": [...], - "superAttributes": [], - "attributeMap": {...}, - "metaTitle": "Canon PowerShot N", - "metaKeywords": "Canon,Entertainment Electronics", - "metaDescription": "Classic design,stylish new color ASUS ZenBook series represents the essence of ASUS design spirit...", - "attributeNames": {...}, - "url": "/en/asus-zenbook-us303ub-35" - }, - "links": {...} - } -} -``` - -{% info_block infoBox "Info" %} - -For detailed information on the endpoints, response attributes, possible errors, etc., see [General Product Information](/docs/scos/dev/glue-api-guides/{{page.version}}/managing-products/retrieving-product-information.html#general-product-information). - -{% endinfo_block %} - -## Rating and Reviewing Products -To post a rating and review of a product, send a POST request to the following endpoint: - -*/abstract-products/{% raw %}{{{% endraw %}product_sku{% raw %}}}{% endraw %}/product-reviews* - -{% info_block infoBox "Info" %} -Ratings and reviews can be posted for **abstract** products only. -{% endinfo_block %} - -### Request -The request should contain the rating a customer assigned to the product and their respective review. A review consists of a short summary, which is required, and a more detailed description, which is optional. - -Request sample: `POST http://glue.mysprykershop.com/abstract-products/139/product-reviews` - -where **139** is the SKU of the **abstract** product a customer wants to rate and/or review. - -{% info_block warningBox "Authentication" %} - -Ratings and reviews cannot be posted anonymously. For this reason, you always need to pass a user's authentication token when accessing the endpoint. For details on how to authenticate a user and retrieve the token, see [Authentication and Authorization](/docs/scos/dev/glue-api-guides/{{page.version}}/authentication-and-authorization.html). - -{% endinfo_block %} - -**Request Attributes:** - -| Attribute* | Type | Required | Description | -| --- | --- | --- | --- | -| **nickname** | String | yes | Specifies the customer’s nickname.
    This nickname should be displayed each time the review is shown. The customer’s actual username used for authentication can therefore be hidden. | -| **rating** | Integer | yes | Specifies the rating given to the product by the customer. | -| **summary** | String | yes | Specifies the review summary. | -| **description** | String | no | Specifies the full text of a review. | - -* Type is not mentioned. - -**Sample Request** - -```json -{ - "data": { - "type": "product-reviews", - "attributes": { - "nickname": "John Doe", - "rating": 5, - "summary": "Excellent product", - "description": "Powerful processor, bright screen, beatiful design and excellent build quality - what else do you need?" - } - } -} -``` - -### Response -If the data is posted successfully, the endpoint responds with the specified rating and review, and also provides a unique identifier in the **id** attribute. - -**Response Attributes:** -The response contains the same attributes as the request plus the unique identifier. - -| Attribute* | Type | Description | -| --- | --- | --- | -| **id** | String | Specifies a unique review identifier. | -| **nickname** | String | Specifies the customer’s nickname. | -| **rating** | Integer | Specifies the rating given to the product by the customer. | -| **summary** | String | Specifies the review summary. | -| **description** | String | Specifies the full text of the review. | - -* Type is not mentioned. - -**Sample Response** - -```json -{ - "data": { - "type": "product-reviews", - "id": "42", - "attributes": { - "rating": 5, - "nickname": "John Doe", - "summary": "Excellent product", - "description": "Powerful processor, bright screen, beatiful design and excellent build quality - what else do you need?" - }, - "links": { - "self": "http://glue.de.suite-nonsplit.local/product-reviews/42" - } - } -} -``` - -### Possible Errors - -| Status | Reason | -| --- | --- | -| 401 | The access token is invalid. | -| 403 | The access token is missing. | -| 400 | The abstract product ID is not specified. | -| 404 | An abstract product with the specified ID was not found. | -| 422 | One or more of the following reasons:
    • The **nickname** attribute is empty or not specified.
    • The **rating** attribute is empty or not specified.
    • The **summary** attribute is empty or not specified.
    • The format of the request is incorrect.
    | diff --git a/docs/scos/dev/glue-api-guides/202005.0/managing-products/retrieving-alternative-products.md b/docs/scos/dev/glue-api-guides/202005.0/managing-products/retrieving-alternative-products.md deleted file mode 100644 index 0fe65ef00ad..00000000000 --- a/docs/scos/dev/glue-api-guides/202005.0/managing-products/retrieving-alternative-products.md +++ /dev/null @@ -1,410 +0,0 @@ ---- -title: Retrieving Alternative Products -description: The article demonstrates how to find alternatives for discontinued products with the help of Glue API endpoints. -last_updated: Sep 14, 2020 -template: glue-api-storefront-guide-template -originalLink: https://documentation.spryker.com/v5/docs/retrieving-alternative-products-201903 -originalArticleId: 242c2c18-c58d-4fd9-b2cb-51b17329072e -redirect_from: - - /v5/docs/retrieving-alternative-products-201903 - - /v5/docs/en/retrieving-alternative-products-201903 -related: - - title: Retrieving Related Products - link: docs/scos/dev/glue-api-guides/page.version/managing-products/retrieving-related-products.html - - title: Retrieving Product Information - link: docs/scos/dev/glue-api-guides/page.version/managing-products/retrieving-product-information.html - - title: Alternative Products Feature Overview - link: docs/scos/user/features/page.version/alternative-products-feature-overview.html - - title: Discontinued Products Feature Overview - link: docs/scos/user/features/page.version/product-feature-overview/discontinued-products-overview.html - - title: Catalog Search - link: docs/scos/dev/glue-api-guides/page.version/searching-the-product-catalog.html ---- - -The _Alternative Products_ feature allows customers to quickly find a substitute product in case if their preferred item runs out of stock or is no longer available for other reasons. The feature is particularly useful when a certain product becomes discontinued. In this case, customers usually look for a more up-to-date generation of the same product, and suggesting possible alternatives is especially crucial. - -For more details, see [Alternative Products](/docs/scos/user/features/{{page.version}}/alternative-products-feature-overview.html) and [Discontinued Products](/docs/scos/user/features/{{page.version}}/product-feature-overview/discontinued-products-overview.html). - -The Product Alternatives API provides access to alternative products via REST API requests. In particular, you can: - -* Find out whether a concrete product is discontinued. -* Retrieve a list of alternative products of a product. - -Only concrete products can be marked as discontinued and, therefore, alternatives can be specified for concrete products only. - -In your development, the endpoints can help you to: - -* Provide alternatives to a customer if a desired product runs out or unavailable, for example, due to local restrictions. -* Provide alternatives in case a certain product is discontinued. -* Make alternative products available to customers in their shopping list or suggestions area in order to make searching for and comparing similar products easier. This can significantly enhance the shopping experience in your shop. - -{% info_block errorBox %} -It is the responsibility of the client to identify whether a product is unavailable and when to provide alternatives. The API only provides information on availability, discontinued status and possible alternatives. -{% endinfo_block %} - -## Installation -For detailed information on the modules that provide the API functionality and related installation instructions, see [Glue API: Alternative Products Feature Integration](/docs/scos/dev/feature-integration-guides/{{page.version}}/glue-api/glue-api-alternative-products-feature-integration.html). - -{% info_block infoBox %} -To be able to use **Product Alternatives API**, first, you need to have the _Alternative Products_ feature integrated with your project.
    To be able to handle discontinued products, first, integrate the _Discontinued Products_ feature. -{% endinfo_block %} - -## Managing Products -Retrieving Alternative Products -The Alternative Products feature allows customers to quickly find a substitute product in case if their preferred item runs out of stock or is no longer available for other reasons. The feature is particularly useful when a certain product becomes discontinued. In this case, customers usually seek for a more up-to-date generation of the same product, and suggesting possible alternatives is especially crucial. - -For more details, see Alternative Products and Discontinued Products. - -The Product Alternatives API provides access to alternative products via REST API requests. In particular, you can: - -Find out whether a specific concrete product is discontinued; -Retrieve a list of alternative products for a specific product. -Only concrete products can be marked as discontinued and, therefore, alternatives can be specified for concrete products only. - -In your development, the endpoints can help you to: - -Provide alternatives to a customer in the case when a desired product runs out of stock or is otherwise unavailable, for example, due to local restrictions; -Provide replacements in case a certain product is discontinued; -Make alternative products available to customers in their shopping list or suggestions area in order to make searching for and comparing similar products easier. This can significantly enhance the shopping experience in your shop. -It is the responsibility of the client to identify whether a product is unavailable and when to provide alternatives. The API only provides information on availability, discontinued status and possible alternatives. - -## Installation -For detailed information on the modules that provide the API functionality and related installation instructions, see Alternative Products. - -{% info_block infoBox %} -To be able to use Product Alternatives API, first, you need to have the Alternative Products feature integrated with your project.
    To be able to handle discontinued products, first, integrate the Discontinued Products feature. -{% endinfo_block %} - -## Checking Whether Product is Discontinued -Before suggesting an alternative product, first, check if a product is still available, for example, not discontinued. To check if a product is discontinued, see [Retrieve Concrete Products](/docs/scos/dev/glue-api-guides/{{page.version}}/managing-products/retrieving-product-information.html#retrieve-concrete-products). - - - -## Retrieving Abstract Alternative Products -To retrieve abstract alternative products, send the request: - ---- -`GET` **/concrete-products/*{% raw %}{{{% endraw %}concrete_product_sku{% raw %}}}{% endraw %}*/abstract-alternative-products** - ---- - -| Path parameter | Description | -| --- | --- | -| ***{% raw %}{{{% endraw %}concrete_product_sku{% raw %}}}{% endraw %}*** | SKU of a concrete product to get abstract alternative products of. | - - -### Request - -| String parameter | Description | Exemplary values | -| --- | --- | --- | -| include | Adds resource relationships to the request. | product-labels | - - -| Request | Usage | -| --- | --- | -| `GET https://glue.mysprykershop.com/concrete-products/cable-vga-1-1/abstract-alternative-products` | Retrieve abstract product alternatives of the product with SKU `145_29885470`. | -| `GET https://glue.mysprykershop.com/concrete-products/cable-vga-1-1/abstract-alternative-products?include=product-labels` | Retrieve general information about the abstract product with its assigned product lables included. | - -### Response - -
    - Response sample - -```json -{ - "data": [ - { - "type": "abstract-products", - "id": "cable-hdmi-1", - "attributes": { - "sku": "cable-hdmi-1", - "averageRating": null, - "reviewCount": 0, - "name": "HDMI cable", - "description": "Enjoy clear, crisp, immediate connectivity with the High-Speed HDMI Cable. This quality High-Definition Multimedia Interface (HDMI) cable allows you to connect a wide variety of devices in the realms of home entertainment, computing, gaming, and more to your HDTV, projector, or monitor. Perfect for those that interact with multiple platforms and devices, you can rely on strong performance and playback delivery when it comes to your digital experience.", - "attributes": [], - "superAttributesDefinition": [], - "superAttributes": { - "packaging_unit": [ - "As long as you want", - "Ring" - ] - }, - "attributeMap": { - "product_concrete_ids": [ - "cable-hdmi-1-1", - "cable-hdmi-1-2" - ], - "super_attributes": { - "packaging_unit": [ - "As long as you want", - "Ring" - ] - }, - "attribute_variants": { - "packaging_unit:As long as you want": { - "id_product_concrete": "cable-hdmi-1-2" - }, - "packaging_unit:Ring": { - "id_product_concrete": "cable-hdmi-1-1" - } - } - }, - "metaTitle": "", - "metaKeywords": "", - "metaDescription": "", - "attributeNames": { - "packaging_unit": "Packaging unit" - }, - "url": "/en/hdmi-cable-1" - }, - "links": { - "self": "https://glue.mysprykershop.com/abstract-products/cable-hdmi-1" - } - } - ], - "links": { - "self": "https://glue.mysprykershop.com/concrete-products/cable-vga-1-1/abstract-alternative-products" - } -} -``` - -
    - - -
    - Response sample with product labels - -```json -{ - "data": [ - { - "type": "abstract-products", - "id": "cable-hdmi-1", - "attributes": { - "sku": "cable-hdmi-1", - "averageRating": null, - "reviewCount": 0, - "name": "HDMI cable", - "description": "Enjoy clear, crisp, immediate connectivity with the High-Speed HDMI Cable. This quality High-Definition Multimedia Interface (HDMI) cable allows you to connect a wide variety of devices in the realms of home entertainment, computing, gaming, and more to your HDTV, projector, or monitor. Perfect for those that interact with multiple platforms and devices, you can rely on strong performance and playback delivery when it comes to your digital experience.", - "attributes": [], - "superAttributesDefinition": [], - "superAttributes": { - "packaging_unit": [ - "As long as you want", - "Ring" - ] - }, - "attributeMap": { - "product_concrete_ids": [ - "cable-hdmi-1-1", - "cable-hdmi-1-2" - ], - "super_attributes": { - "packaging_unit": [ - "As long as you want", - "Ring" - ] - }, - "attribute_variants": { - "packaging_unit:As long as you want": { - "id_product_concrete": "cable-hdmi-1-2" - }, - "packaging_unit:Ring": { - "id_product_concrete": "cable-hdmi-1-1" - } - } - }, - "metaTitle": "", - "metaKeywords": "", - "metaDescription": "", - "attributeNames": { - "packaging_unit": "Packaging unit" - }, - "url": "/en/hdmi-cable-1" - }, - "links": { - "self": "https://glue.mysprykershop.com/abstract-products/cable-hdmi-1" - }, - "relationships": { - "product-labels": { - "data": [ - { - "type": "product-labels", - "id": "3" - } - ] - } - } - } - ], - "links": { - "self": "https://glue.mysprykershop.com/concrete-products/cable-vga-1-1/abstract-alternative-products?include=product-labels" - }, - "included": [ - { - "type": "product-labels", - "id": "3", - "attributes": { - "name": "New product", - "isExclusive": false, - "position": 1, - "frontEndReference": null - }, - "links": { - "self": "https://glue.mysprykershop.com/product-labels/3" - } - } - ] -} -``` - -
    - - -## Retrieving Concrete Alternative Products -To retrieve concrete alternative products, send the request: - ---- -`GET`**/concrete-products/{% raw %}{{{% endraw %}concrete_product_sku{% raw %}}}{% endraw %}/concrete-alternative-products** - ---- - -| Path parameter | Description | -| --- | --- | -| ***{% raw %}{{{% endraw %}concrete_product_sku{% raw %}}}{% endraw %}*** | SKU of a concrete product to get concrete alternative products of. | - -### Request - -| String parameter | Description | Exemplary values | -| --- | --- | --- | -| include | Adds resource relationships to the request. | product-labels | - - -| Request | Usage | -| --- | --- | -| `GET https://glue.mysprykershop.com/concrete-products/cable-vga-1-1/concrete-alternative-products` | Retrieve abstract product alternatives of the product with SKU `145_29885470`. | -| `GET https://glue.mysprykershop.com/concrete-products/cable-vga-1-1/concrete-alternative-products?include=product-labels` | Retrieve general information about the abstract product with its assigned product lables included. | - -### Response - -
    - Response sample - -```json -{ - "data": [ - { - "type": "concrete-products", - "id": "cable-hdmi-1-2", - "attributes": { - "sku": "cable-hdmi-1-2", - "isDiscontinued": false, - "discontinuedNote": null, - "averageRating": null, - "reviewCount": 0, - "name": "HDMI cable as long as you want", - "description": "Enjoy clear, crisp, immediate connectivity with the High-Speed HDMI Cable. This quality High-Definition Multimedia Interface (HDMI) cable allows you to connect a wide variety of devices in the realms of home entertainment, computing, gaming, and more to your HDTV, projector, or monitor. Perfect for those that interact with multiple platforms and devices, you can rely on strong performance and playback delivery when it comes to your digital experience.", - "attributes": { - "packaging_unit": "As long as you want" - }, - "superAttributesDefinition": [ - "packaging_unit" - ], - "metaTitle": "", - "metaKeywords": "", - "metaDescription": "", - "attributeNames": { - "packaging_unit": "Packaging unit" - } - }, - "links": { - "self": "https://glue.mysprykershop.com/concrete-products/cable-hdmi-1-2" - } - } - ], - "links": { - "self": "https://glue.mysprykershop.com/concrete-products/cable-vga-1-1/concrete-alternative-products" - } -} -``` - -
    - - -
    - Response sample with product labels - -```json -{ - "data": [ - { - "type": "concrete-products", - "id": "cable-hdmi-1-2", - "attributes": { - "sku": "cable-hdmi-1-2", - "isDiscontinued": false, - "discontinuedNote": null, - "averageRating": null, - "reviewCount": 0, - "name": "HDMI cable as long as you want", - "description": "Enjoy clear, crisp, immediate connectivity with the High-Speed HDMI Cable. This quality High-Definition Multimedia Interface (HDMI) cable allows you to connect a wide variety of devices in the realms of home entertainment, computing, gaming, and more to your HDTV, projector, or monitor. Perfect for those that interact with multiple platforms and devices, you can rely on strong performance and playback delivery when it comes to your digital experience.", - "attributes": { - "packaging_unit": "As long as you want" - }, - "superAttributesDefinition": [ - "packaging_unit" - ], - "metaTitle": "", - "metaKeywords": "", - "metaDescription": "", - "attributeNames": { - "packaging_unit": "Packaging unit" - } - }, - "links": { - "self": "https://glue.mysprykershop.com/concrete-products/cable-hdmi-1-2" - }, - "relationships": { - "product-labels": { - "data": [ - { - "type": "product-labels", - "id": "3" - } - ] - } - } - } - ], - "links": { - "self": "https://glue.mysprykershop.com/concrete-products/cable-vga-1-1/concrete-alternative-products?include=product-labels" - }, - "included": [ - { - "type": "product-labels", - "id": "3", - "attributes": { - "name": "New product", - "isExclusive": false, - "position": 1, - "frontEndReference": null - }, - "links": { - "self": "https://glue.mysprykershop.com/product-labels/3" - } - } - ] -} -``` - -
    - - - - -### Possible Errors -| Code | Reason | -| --- | --- | -| 400 | Concrete product ID not specified | -| 404 | Concrete product not found | diff --git a/docs/scos/dev/glue-api-guides/202005.0/managing-products/retrieving-and-applying-product-options.md b/docs/scos/dev/glue-api-guides/202005.0/managing-products/retrieving-and-applying-product-options.md deleted file mode 100644 index e910cf67717..00000000000 --- a/docs/scos/dev/glue-api-guides/202005.0/managing-products/retrieving-and-applying-product-options.md +++ /dev/null @@ -1,701 +0,0 @@ ---- -title: Retrieving and Applying Product Options -last_updated: Sep 14, 2020 -template: glue-api-storefront-guide-template -originalLink: https://documentation.spryker.com/v5/docs/retrieving-and-applying-product-options -originalArticleId: e6b8bc1c-46dc-4116-bbcd-4905bd2c9347 -redirect_from: - - /v5/docs/retrieving-and-applying-product-options - - /v5/docs/en/retrieving-and-applying-product-options -related: - - title: Product Options feature overview - link: docs/scos/user/features/page.version/product-options-feature-overview.html ---- - -The [Product Options](/docs/scos/user/features/{{page.version}}/product-options-feature-overview.html) Feature enables shop owners to suggest various additions to the main product. Such extras enhance the customer experience and ensure their loyalty to the shop. These typically include gift wrapping, warranty services, insurance, app installation, etc. - -Options come with their own prices and tax sets. Also, different options can apply to different products. All product options available in a shop are organized in groups. - -Although options are applied to abstract products only, the *Product Options* API enables retrieving available options for both [abstract and concrete](/docs/scos/user/back-office-user-guides/{{page.version}}/catalog/products/abstract-and-concrete-products.html) products. Also, it enables selecting the necessary options when ordering products and viewing the selected options when an order is complete. For this purpose, product options are retrievable in endpoints related to [products](/docs/scos/dev/glue-api-guides/{{page.version}}/managing-products/retrieving-product-information.html) (e.g. `/abstract-products` or `/concrete-products`), [guest carts](/docs/scos/dev/glue-api-guides/{{page.version}}/managing-carts/managing-carts.html) and [carts of registered users](/docs/scos/dev/glue-api-guides/{{page.version}}/managing-carts/guest-carts/managing-guest-carts.html) (e.g. `/guest-cart-items` or `/carts/{% raw %}{{{% endraw %}cart_id{% raw %}}}{% endraw %}/items`, etc.), as well as [in order history](/docs/scos/dev/glue-api-guides/{{page.version}}/managing-customers/retrieving-customer-orders.html). - -With the help of the data provided by the API resources, you will be able to perform the following tasks: - -* retrieve product options available for any products; -* enable customers to select the options they want when placing items in a cart; -* display the selected options during checkout and in the order history. - -## Installation -For detailed information on the modules that provide the API functionality and related installation instructions, see [GLUE: Product Options Feature Integration](/docs/scos/dev/feature-integration-guides/{{page.version}}/glue-api/glue-api-product-options-feature-integration.html). - -## Retrieving Product Options for Products -To retrieve the product options available for a specific product, send a *GET* request to retrieve the product information and include **product-options** as a relationship. - -### Request -Endpoints: - -* `/abstract-products` -* `/concrete-products` - -Request sample: `GET http://glue.mysprykershop.com/concrete-products/181_31995510?include=product-options` - -where **181_31995510** is the SKU of the product you want to retrieve options for. - -### Response -The endpoints return information on the requested products. Product options are available in the `product-options` included section. - -**Response Attributes:** -Each product option is represented by a related resource with the following attributes: - -| Attribute* | Type | Description | -| --- | --- | --- | -| **sku** | String | Specifies the SKU of the product option. | -| **optionName** | String | Specifies the option name. | -| **optionGroupName** | String | Specifies the name of the group to which the option belongs. | -| **price** | Integer | Specifies the option price in cents. | -| **currencyIsoCode** | String | Specifies the ISO 4217 code of the currency in which the product option price is specified. | - -* Type and ID are not mentioned. - -
    -Sample Response - -```json -{ - "data": { - "type": "concrete-products", - "id": "181_31995510", - "attributes": {...}, - "links": {...}, - "relationships": { - "product-options": { - "data": [ - { - "type": "product-options", - "id": "OP_1_year_waranty" - }, - { - "type": "product-options", - "id": "OP_2_year_waranty" - }, - { - "type": "product-options", - "id": "OP_3_year_waranty" - }, - { - "type": "product-options", - "id": "OP_insurance" - }, - { - "type": "product-options", - "id": "OP_gift_wrapping" - } - ] - } - } - }, - "included": [ - { - "type": "product-options", - "id": "OP_1_year_waranty", - "attributes": { - "optionGroupName": "Warranty", - "sku": "OP_1_year_waranty", - "optionName": "One (1) year limited warranty", - "price": 0, - "currencyIsoCode": "EUR" - }, - "links": { - "self": "http://glue.mysprykershop.com/concrete-products/181_31995510/product-options/OP_1_year_waranty" - } - }, - { - "type": "product-options", - "id": "OP_2_year_waranty", - "attributes": { - "optionGroupName": "Warranty", - "sku": "OP_2_year_waranty", - "optionName": "Two (2) year limited warranty", - "price": 1000, - "currencyIsoCode": "EUR" - }, - "links": { - "self": "http://glue.mysprykershop.com/concrete-products/181_31995510/product-options/OP_2_year_waranty" - } - }, - { - "type": "product-options", - "id": "OP_3_year_waranty", - "attributes": { - "optionGroupName": "Warranty", - "sku": "OP_3_year_waranty", - "optionName": "Three (3) year limited warranty", - "price": 2000, - "currencyIsoCode": "EUR" - }, - "links": { - "self": "http://glue.mysprykershop.com/concrete-products/181_31995510/product-options/OP_3_year_waranty" - } - }, - { - "type": "product-options", - "id": "OP_insurance", - "attributes": { - "optionGroupName": "Insurance", - "sku": "OP_insurance", - "optionName": "Two (2) year insurance coverage", - "price": 10000, - "currencyIsoCode": "EUR" - }, - "links": { - "self": "http://glue.mysprykershop.com/concrete-products/181_31995510/product-options/OP_insurance" - } - }, - { - "type": "product-options", - "id": "OP_gift_wrapping", - "attributes": { - "optionGroupName": "Gift wrapping", - "sku": "OP_gift_wrapping", - "optionName": "Gift wrapping", - "price": 500, - "currencyIsoCode": "EUR" - }, - "links": { - "self": "http://glue.mysprykershop.com/concrete-products/181_31995510/product-options/OP_gift_wrapping" - } - } - ] -} -``` - -
    -
    - -## Retrieving Product Options for Cart Items -To retrieve the product options available for items in a cart, send a *GET* request to retrieve the cart information and include the **items/guest-cart-items**, **concrete-products**, and **product-options** resources as relationships. - -{% info_block warningBox "Note" %} - -Product option information is also available for *POST* and *PATCH* requests, which means that you can also retrieve product options when sending requests to create carts as well as adding or removing cart items. For example, you can fetch the options to display to the customer once a new product is added to a cart. - -{% endinfo_block %} - -#### Request -Endpoints for **carts of registered users**: - -* `/carts` -* `/carts/{% raw %}{{{% endraw %}cart_id{% raw %}}}{% endraw %}` -* `/carts/{% raw %}{{{% endraw %}cart_id{% raw %}}}{% endraw %}/items` -* `/carts/{% raw %}{{{% endraw %}cart_id{% raw %}}}{% endraw %}/items/{% raw %}{{{% endraw %}item_id{% raw %}}}{% endraw %}` - -{% info_block warningBox "Authentication" %} - -Carts of registered users cannot be accessed anonymously. For this reason, you always need to pass a user's authentication token when accessing the endpoint. For details on how to authenticate a user and retrieve the token, see [Authentication and Authorization](/docs/scos/dev/glue-api-guides/{{page.version}}/authentication-and-authorization.html). - -{% endinfo_block %} - -Endpoints for **guest carts:** - -* `/guest-cart-items` -* `/guest-carts` -* `/guest-carts/{% raw %}{{{% endraw %}guest_cart_id{% raw %}}}{% endraw %}` -* `/guest-carts/{% raw %}{{{% endraw %}guest_cart_id{% raw %}}}{% endraw %}/guest-cart-items` -* `/guest-carts/{% raw %}{{{% endraw %}guest_cart_id{% raw %}}}{% endraw %}/guest-cart-items/{% raw %}{{{% endraw %}guest_cart_item_id{% raw %}}}{% endraw %}` - -{% info_block warningBox "Anonymous User ID" %} - -When accessing guest carts, you need to specify the guest user ID. This is done via the `X-Anonymous-Customer-Unique-Id` header. Guest user IDs are managed by the API Client. For details, see [Managing Guest Carts](/docs/scos/dev/glue-api-guides/{{page.version}}/managing-carts/guest-carts/managing-guest-carts.html). - -{% endinfo_block %} - -Request samples: - -`GET http://glue.mysprykershop.com/carts?include=items,concrete-products,product-options` - -`GET http://glue.mysprykershop.com/guest-carts/1ce91011-8d60-59ef-9fe0-4493ef3628b2/?include=guest-cart-items,concrete-products,product-options` - -`POST http://glue.mysprykershop.com/guest-cart-items?include=guest-cart-items,concrete-products,product-option` - -`PATCH http://glue.mysprykershop.com/carts/f9a3f045-02c2-5d47-b397-8ac1f5c63e27/items/181_31995510?include=guest-cart-items,concrete-products,product-option` - -{% info_block warningBox "Performance" %} - -The above requests fetch not only product option information, but also information on the products in the cart. That can adversely affect the overall performance. Use them with caution and apply caching, where possible. - -{% endinfo_block %} - -### Response -The API returns information on the requested carts, cart items and products. Product options are available in the **product-options** resource relationship. - -If any product options have been selected when placing a product in the cart, they are specified in the `selectedProductOptions` attribute of the respective cart item. The attribute is an array. - -**Response Attributes:** -Each selected option is specified in the `selectedProductOptions` attribute of the **items** or **guest-cart-items** resource relationship. - -| Attribute* | Type | Description | -| --- | --- | --- | -| **selectedProductOptions** | Array of **product-options**. | Specifies the selected product options. | - -Each product option available for every product in the cart is represented by a related **product-options** resource with the following attributes: - -| Attribute* | Type | Description | -| --- | --- | --- | -| **sku** | String | Specifies the SKU of the product option. | -| **optionName** | String | Specifies the option name. | -| **optionGroupName** | String | Specifies the name of the group to which the option belongs. | -| **price** | Integer | Specifies the option price in cents. | -| **currencyIsoCode** | String | Specifies the ISO 4217 code of the currency in which the product option price is specified. | - -* Type and ID are not mentioned. - -
    -Sample Response - Guest Cart - -```json -{ - "data": { - "type": "guest-carts", - "id": "a460ac71-06ee-5018-b6d6-a2191d183f24", - "attributes": {...}, - "links": {...}, - "relationships": { - "guest-cart-items": { - "data": [ - { - "type": "guest-cart-items", - "id": "181_31995510-3-5" - } - ] - } - } - }, - "included": [ - { - "type": "guest-cart-items", - "id": "181_31995510-3-5", - "attributes": { - "sku": "181_31995510", - ... - "selectedProductOptions": [ - { - "optionGroupName": "Gift wrapping", - "sku": "OP_gift_wrapping", - "optionName": "Gift wrapping", - "price": 2000 - }, - { - "optionGroupName": "Warranty", - "sku": "OP_3_year_waranty", - "optionName": "Three (3) year limited warranty", - "price": 8000 - } - ] - }, - "links": { - "self": "http://glue.mysprykershop.com/guest-carts/a460ac71-06ee-5018-b6d6-a2191d183f24/guest-cart-items/181_31995510-3-5" - }, - "relationships": { - "concrete-products": { - "data": [ - { - "type": "concrete-products", - "id": "181_31995510" - } - ] - } - }, - }, - { - "type": "product-options", - "id": "OP_1_year_waranty", - "attributes": { - "optionGroupName": "Warranty", - "sku": "OP_1_year_waranty", - "optionName": "One (1) year limited warranty", - "price": 0, - "currencyIsoCode": "EUR" - }, - "links": { - "self": "http://glue.mysprykershop.com/concrete-products/181_31995510/product-options/OP_1_year_waranty" - } - }, - { - "type": "product-options", - "id": "OP_2_year_waranty", - "attributes": { - "optionGroupName": "Warranty", - "sku": "OP_2_year_waranty", - "optionName": "Two (2) year limited warranty", - "price": 1000, - "currencyIsoCode": "EUR" - }, - "links": { - "self": "http://glue.mysprykershop.com/concrete-products/181_31995510/product-options/OP_2_year_waranty" - } - }, - { - "type": "product-options", - "id": "OP_3_year_waranty", - "attributes": { - "optionGroupName": "Warranty", - "sku": "OP_3_year_waranty", - "optionName": "Three (3) year limited warranty", - "price": 2000, - "currencyIsoCode": "EUR" - }, - "links": { - "self": "http://glue.mysprykershop.com/concrete-products/181_31995510/product-options/OP_3_year_waranty" - } - }, - { - "type": "product-options", - "id": "OP_insurance", - "attributes": { - "optionGroupName": "Insurance", - "sku": "OP_insurance", - "optionName": "Two (2) year insurance coverage", - "price": 10000, - "currencyIsoCode": "EUR" - }, - "links": { - "self": "http://glue.mysprykershop.com/concrete-products/181_31995510/product-options/OP_insurance" - } - }, - { - "type": "product-options", - "id": "OP_gift_wrapping", - "attributes": { - "optionGroupName": "Gift wrapping", - "sku": "OP_gift_wrapping", - "optionName": "Gift wrapping", - "price": 500, - "currencyIsoCode": "EUR" - }, - "links": { - "self": "http://glue.mysprykershop.com/concrete-products/181_31995510/product-options/OP_gift_wrapping" - } - }, - } - ] -} -``` - -
    -
    - -
    -Sample Response - Cart of Registered User - -```json -{ - "data": [ - { - "type": "carts", - "id": "56a0b4e4-21d8-516f-acd5-90581c996676", - "attributes": {...}, - "links": {...}, - "relationships": { - "items": { - "data": [ - { - "type": "items", - "id": "181_31995510" - }, - { - "type": "items", - "id": "181_31995510-2-4-5" - }, - { - "type": "items", - "id": "181_31995510" - }, - { - "type": "items", - "id": "181_31995510-2-4-5" - } - ] - } - } - } - ], - "links": {...}, - "included": [ - { - "type": "items", - "id": "181_31995510", - "attributes": { - "sku": "181_31995510", - ... - "selectedProductOptions": [ - { - "optionGroupName": "Warranty", - "sku": "OP_2_year_waranty", - "optionName": "Two (2) year limited warranty", - "price": 4000 - }, - { - "optionGroupName": "Insurance", - "sku": "OP_insurance", - "optionName": "Two (2) year insurance coverage", - "price": 40000 - }, - { - "optionGroupName": "Gift wrapping", - "sku": "OP_gift_wrapping", - "optionName": "Gift wrapping", - "price": 2000 - } - ] - }, - "links": {...}, - "relationships": {...} - }, - { - "type": "product-options", - "id": "OP_1_year_waranty", - "attributes": { - "optionGroupName": "Warranty", - "sku": "OP_1_year_waranty", - "optionName": "One (1) year limited warranty", - "price": 0, - "currencyIsoCode": "EUR" - }, - "links": { - "self": "http://glue.mysprykershop.com/concrete-products/181_31995510/product-options/OP_1_year_waranty" - } - }, - { - "type": "product-options", - "id": "OP_2_year_waranty", - "attributes": { - "optionGroupName": "Warranty", - "sku": "OP_2_year_waranty", - "optionName": "Two (2) year limited warranty", - "price": 1000, - "currencyIsoCode": "EUR" - }, - "links": { - "self": "http://glue.mysprykershop.com/concrete-products/181_31995510/product-options/OP_2_year_waranty" - } - }, - { - "type": "product-options", - "id": "OP_3_year_waranty", - "attributes": { - "optionGroupName": "Warranty", - "sku": "OP_3_year_waranty", - "optionName": "Three (3) year limited warranty", - "price": 2000, - "currencyIsoCode": "EUR" - }, - "links": { - "self": "http://glue.mysprykershop.com/concrete-products/181_31995510/product-options/OP_3_year_waranty" - } - }, - { - "type": "product-options", - "id": "OP_insurance", - "attributes": { - "optionGroupName": "Insurance", - "sku": "OP_insurance", - "optionName": "Two (2) year insurance coverage", - "price": 10000, - "currencyIsoCode": "EUR" - }, - "links": { - "self": "http://glue.mysprykershop.com/concrete-products/181_31995510/product-options/OP_insurance" - } - }, - { - "type": "product-options", - "id": "OP_gift_wrapping", - "attributes": { - "optionGroupName": "Gift wrapping", - "sku": "OP_gift_wrapping", - "optionName": "Gift wrapping", - "price": 500, - "currencyIsoCode": "EUR" - }, - "links": { - "self": "http://glue.mysprykershop.com/concrete-products/181_31995510/product-options/OP_gift_wrapping" - } - }, - ... - ] -} -``` - -
    -
    - -### Applying Product Options to Cart Items -In order to apply various products to cart items, you need to specify the necessary options when sending *POST* requests for creating carts and adding items to them. - -### Request -Endpoints for **carts of registered users**: - -* `/carts/{% raw %}{{{% endraw %}cart_id{% raw %}}}{% endraw %}/items` - -Sample Request: -`POST /carts/{% raw %}{{{% endraw %}cart_id{% raw %}}}{% endraw %}/cart-items` - adds an item to a cart. - -{% info_block infoBox "Info" %} - -For more details on managing carts of registered users, see [Managing Carts of Registered Users](/docs/scos/dev/glue-api-guides/{{page.version}}/managing-carts/carts-of-registered-users/managing-carts-of-registered-users.html). - -{% endinfo_block %} - -**Request Body** - -```json -{ - "data": { - "type": "items", - "attributes": { - "sku": "181_31995510", - "quantity": 6, - "productOptions": [ - { - "sku": "OP_gift_wrapping" - }, - { - "sku": "OP_3_year_waranty" - } - ] - } - } -} -``` - -{% info_block warningBox "Authentication" %} - -Carts of registered users cannot be accessed anonymously. For this reason, you always need to pass a user's authentication token when accessing the endpoint. For details on how to authenticate a user and retrieve the token, see [Authentication and Authorization](/docs/scos/dev/glue-api-guides/{{page.version}}/authentication-and-authorization.html). - -{% endinfo_block %} - -Endpoints for **guest carts**: - -* `/guest-cart-items` -* `/guest-carts/{% raw %}{{{% endraw %}guest_cart_id{% raw %}}}{% endraw %}/guest-cart-items` - -Sample Requests: - -`POST /guest-cart-items` - creates a guest cart; - -`POST /guest-carts/{% raw %}{{{% endraw %}cart_id{% raw %}}}{% endraw %}/cart-items` - adds an item to a guest cart. - -{% info_block infoBox "Info" %} - -For more details on managing carts of registered users, see [Managing Guest Carts](/docs/scos/dev/glue-api-guides/{{page.version}}/managing-carts/guest-carts/managing-guest-carts.html). - -{% endinfo_block %} - -**Request Body** - -```json -{ - "data": { - "type": "guest-cart-items", - "attributes": { - "sku": "181_31995510", - "quantity": "4", - "productOptions": [ - { - "sku": "OP_gift_wrapping" - }, - { - "sku": "OP_3_year_waranty" - } - ] - } - } -} -``` - -{% info_block warningBox "Anonymous User ID" %} - -When accessing guest carts, you need to specify the guest user ID. This is done via the `X-Anonymous-Customer-Unique-Id` header. Guest user IDs are managed by the API Client. For details, see [Managing Guest Carts](/docs/scos/dev/glue-api-guides/{{page.version}}/managing-carts/guest-carts/managing-guest-carts.html). - -{% endinfo_block %} - -**Request Attributes** -No matter which type of cart is created or modified, the following attributes should be present in the request: - -| Attribute* | Type | Required | Description | -| --- | --- | --- | --- | -| **sku** | String | yes | Specifies the SKU of the product to add to the cart or to modify. | -| **quantity** | Integer | yes | Specifies the number of products to be available in the cart. | -| **productOptions** | Array of **product-option** | no | Specifies the product options to apply to the product.

    Each option must be represented by a JSON object containing only 1 attribute: **sku**. It specifies the SKU of the option to apply.

    **Note**: It is the responsibility of the API Client to track whether the selected items are compatible. For example, the client should not allow a **2**-year and a **4**-year warranty service to be applied to the same product. The API endpoints allow any combination of items, no matter whether they are compatible or not. | - -You can specify a certain product several times with different options. In this case, the product will be added as multiple cart items. - -### Response -The endpoints respond with information on the cart or item that is being created or modified. For detailed information and the possible error codes, see [Managing Carts of Registered Users](/docs/scos/dev/glue-api-guides/{{page.version}}/managing-carts/carts-of-registered-users/managing-carts-of-registered-users.html) and [Managing Guest Carts](/docs/scos/dev/glue-api-guides/{{page.version}}/managing-carts/guest-carts/managing-guest-carts.html). - -## Retrieving Product Options for Orders -To retrieve the product options applied to order items, send a *GET* request to retrieve the order information. - -### Request -Endpoint: `/orders/{% raw %}{{{% endraw %}order_id{% raw %}}}{% endraw %}` - retrieves a specific order. - -{% info_block warningBox "Authentication" %} - -Orders cannot be accessed anonymously. For this reason, you always need to pass a user's authentication token when accessing the endpoint. For details on how to authenticate a user and retrieve the token, see [Authentication and Authorization](/docs/scos/dev/glue-api-guides/{{page.version}}/authentication-and-authorization.html). - -{% endinfo_block %} - -Request sample: `GET http://glue.mysprykershop.com/orders/DE--3` - -{% info_block warningBox "Tip" %} - -You can also receive product option information immediately after checkout id complete by including the necessary information in the checkout call: *POST http://glue.mysprykershop.com/checkout?include=orders* - -{% endinfo_block %} - -### Response -The endpoints return information on the requested order(s). If any product options have been selected when placing the order, they are specified in the productOptions attribute of the respective order item. - -**Response Attributes:** -The options applied to the order are specified in the `productOptions` attribute of each element in the **items** array. - -| Attribute* | Type | Description | -| --- | --- | --- | -| **productOptions** | Array of product-option. | Specifies the product options. | - -**Sample response** - -```json -{ - "data": { - "type": "orders", - "id": "DE--2", - "attributes": { - ... - "items": [ - { - "name": "Acer Chromebook C730-C8T7", - "sku": "136_24425591", - ... - "productOptions": [ - { - "optionGroupName": "Gift wrapping", - "sku": "OP_gift_wrapping", - "optionName": "Gift wrapping", - "price": 500 - }, - { - "optionGroupName": "Warranty", - "sku": "OP_2_year_waranty", - "optionName": "Two (2) year limited warranty", - "price": 1000 - } - ] - } - ], - ... - "links": {...} - } -} -``` - -For detailed information and the possible error codes, see [Retrieving Customer's Order History](/docs/scos/dev/glue-api-guides/{{page.version}}/managing-customers/retrieving-customer-orders.html). diff --git a/docs/scos/dev/glue-api-guides/202005.0/managing-products/retrieving-product-information.md b/docs/scos/dev/glue-api-guides/202005.0/managing-products/retrieving-product-information.md deleted file mode 100644 index 74efc28d76f..00000000000 --- a/docs/scos/dev/glue-api-guides/202005.0/managing-products/retrieving-product-information.md +++ /dev/null @@ -1,1198 +0,0 @@ ---- -title: Retrieving Product Information -description: This article explains how to get various information and resources of an abstract or concrete product, such as availability, price, taxes, and image sets. -last_updated: Sep 14, 2020 -template: glue-api-storefront-guide-template -originalLink: https://documentation.spryker.com/v5/docs/retrieving-product-information -originalArticleId: b3b5a044-f7aa-40d4-8006-2c8460e86e29 -redirect_from: - - /v5/docs/retrieving-product-information - - /v5/docs/en/retrieving-product-information -related: - - title: Browsing a Category Tree - link: docs/scos/dev/glue-api-guides/page.version/retrieving-categories/retrieving-category-trees.html - - title: Price Functionality - link: docs/scos/user/features/page.version/prices-feature-overview/prices-feature-overview.html ---- - -Different Product resources allow you to retrieve all the product information available in your storage. These resources follow the same hierarchical structure that exists as a basis in the Spryker Commerce OS. Products can come with multiple Variants (Concrete products) and have Availability, Prices, Tax Sets, as well as Image Sets. Furthermore, you can see what category your product belongs to or what product label is available. - -In your development, these resources can help you to retrieve relevant information for your product listing and detail pages, for search, shopping cart, checkout, order history, wishlist and many more. - -## Installation -For detailed information on the modules that provide the API functionality and related installation instructions, see: -* [Glue API: Products Feature Integration](/docs/scos/dev/feature-integration-guides/{{page.version}}/glue-api/glue-api-product-feature-integration.html). -* [Glue API: Measurement Units Feature Integration](/docs/scos/dev/feature-integration-guides/{{page.version}}/glue-api/glue-api-measurement-units-feature-integration.html). - -## Abstract and Concrete Products -As Spryker Commerce OS implements product data in a hierarchical structure, this concept is also implemented in the Product API. The API provides separate endpoints for abstract and concrete products. Their names contain the abstract and concrete words, respectively. - - - -## Retrieve Abstract Products -To retrieve general information about an abstract product, send the request: - ---- -`GET` **/abstract-products/*{% raw %}{{{% endraw %}abstract_product_sku{% raw %}}}{% endraw %}*** - ---- - - -| Path parameter | Description | -| --- | --- | -| {% raw %}{{{% endraw %}abstract_product_sku{% raw %}}}{% endraw %} | SKU of an abstract product to get information for. | - -### Request - -| String parameter | Description | Exemplary values | -| --- | --- | --- | -| include | Adds resource relationships to the request. | abstract-product-prices, concrete-products, product-labels | -| fields | Filters out the fields to be retrieved. | name, image, description | -{% info_block warningBox "Performance" %} - -* For performance and bandwidth usage optimization, we recommend filtering out only the needed information using the `fields` string parameter. - -* If you include more resources, you can still use the `fields` string parameter to return only the needed fields. For example, `GET https://glue.mysprykershop.com/abstract-products/001?include=concrete-products&fields[abstract-products]=name,description&fields[concrete-products]=name,image`. - - -{% endinfo_block %} - - -| Request | Usage | -| --- | --- | -| `GET https://glue.mysprykershop.com/abstract-products/001` | Retrieve general information about the abstract product. | -| `GET https://glue.mysprykershop.com/abstract-products/001?include=product-labels` | Retrieve general information about the abstract product with its assigned product lables included. | - - - - - -### Response - -
    - Response sample - -```json -{ - "data": { - "type": "abstract-products", - "id": "001", - "attributes": { - "sku": "001", - "averageRating": null, - "reviewCount": 0, - "name": "Canon IXUS 160", - "description": "Add a personal touch Make shots your own with quick and easy control over picture settings such as brightness and colour intensity. Preview the results while framing using Live View Control and enjoy sharing them with friends using the 6.8 cm (2.7”) LCD screen. Combine with a Canon Connect Station and you can easily share your photos and movies with the world on social media sites and online albums like irista, plus enjoy watching them with family and friends on an HD TV. Effortlessly enjoy great shots of friends thanks to Face Detection technology. It detects multiple faces in a single frame making sure they remain in focus and with optimum brightness. Face Detection also ensures natural skin tones even in unusual lighting conditions.", - "attributes": { - "megapixel": "20 MP", - "flash_range_tele": "4.2-4.9 ft", - "memory_slots": "1", - "usb_version": "2", - "brand": "Canon", - "color": "Red" - }, - "superAttributesDefinition": [ - "color" - ], - "superAttributes": { - "color": [ - "Red" - ] - }, - "attributeMap": { - "product_concrete_ids": [ - "001_25904006" - ], - "super_attributes": { - "color": [ - "Red" - ] - }, - "attribute_variants": [] - }, - "metaTitle": "Canon IXUS 160", - "metaKeywords": "Canon,Entertainment Electronics", - "metaDescription": "Add a personal touch Make shots your own with quick and easy control over picture settings such as brightness and colour intensity. Preview the results whi", - "attributeNames": { - "megapixel": "Megapixel", - "flash_range_tele": "Flash range (tele)", - "memory_slots": "Memory slots", - "usb_version": "USB version", - "brand": "Brand", - "color": "Color" - }, - "url": "/en/canon-ixus-160-1" - }, - "links": { - "self": "https://glue.mysprykershop.com/abstract-products/001" - } - } -} -``` - -
    - -
    - Response sample with product labels - -```json -{ - "data": { - "type": "abstract-products", - "id": "001", - "attributes": {...}, - "links": {...}, - "relationships": { - "product-labels": { - "data": [ - { - "type": "product-labels", - "id": "3" - }, - { - "type": "product-labels", - "id": "5" - } - ] - } - } - }, - "included": [ - { - "type": "product-labels", - "id": "3", - "attributes": { - "name": "Standard Label", - "isExclusive": false, - "position": 3, - "frontEndReference": "" - }, - "links": { - "self": "https://glue.mysprykershop.com/product-labels/3" - } - }, - { - "type": "product-labels", - "id": "5", - "attributes": { - "name": "SALE %", - "isExclusive": false, - "position": 5, - "frontEndReference": "highlight" - }, - "links": { - "self": "https://glue.mysprykershop.com/product-labels/5" - } - } - ] -} -``` - -
    - - - - - - - - - - -| Attribute | Type | Description | -| --- | --- | --- | -| sku | String | SKU of the abstract product | -| name | String | Name of the abstract product | -| description | String | Description of the abstract product | -| attributes | Object | Dist of attributes and their values | -| superAttributeDefinition | String[] | Attributes flagged as super attributes, that are however not relevant to distinguish between the product variants | -| attributeMap|Object|Each super attribute / value combination and the corresponding concrete product IDs are listed here| -|attributeMap.super_attributes|Object|Applicable super attribute and its values for the product variants| -|attributeMap.attribute_variants|Object|List of super attributes with the list of values| -|attributeMap.product_concrete_ids|String[]|Product IDs of the product variants| -|metaTitle|String|Meta title of the product| -|metaKeywords|String|Meta keywords of the product.| -|metaDescription|String|Meta description of the product.| -|attributeNames | Object | All non-super attribute / value combinations for the abstract product. | - - - -| Included resource | Attribute | Type | Description | -| --- | --- | --- | --- | -| product-labels | name | String | Specifies the label name. | -| product-labels | isExclusive | Boolean | Indicates whether the label is `exclusive`.
    If the attribute is set to true, the current label takes precedence over other labels the product might have. This means that only the current label should be displayed for the product, and all other possible labels should be hidden. | -| product-labels | position | Integer | Indicates the label priority.
    Labels should be indicated on the frontend according to their priority, from the highest (**1**) to the lowest, unless a product has a label with the `isExclusive` attribute set.| -| product-labels | frontEndReference | String |Specifies the label custom label type (CSS class).
    If the attribute is an empty string, the label should be displayed using the default CSS style. | - - - - - -For the attributes of other included resources, see: -* [Retrieve Price of an Abstract Product](#prices-response-attributes) -* [Retrieve Concrete Products](#concrete-products-response-attributes) - -## Retrieve Concrete Products -To retrieve general information about a concrete product, send the request: - ---- -`GET` **/concrete-products/*{% raw %}{{{% endraw %}concrete_product_sku{% raw %}}}{% endraw %}*** - ---- - -| Path parameter | Description | -| --- | --- | -| {% raw %}{{{% endraw %}concrete_product_sku{% raw %}}}{% endraw %} | SKU of a concrete product to get information for. | - -### Request -| String parameter | Description | Exemplary values | -| --- | --- | --- | -| include | Adds resource relationships to the request. | concrete-product-prices, product-measurement-units, sales-units, product-labels | -| fields | Filters out the fields to be retrieved. | name, image, description | -{% info_block warningBox "Performance" %} - -* For performance and bandwidth usage optimization, we recommend filtering out only the needed information using the `fields` string parameter. - -* If you include more resources, you can still use the `fields` string parameter to return only the needed fields. For example, `GET https://glue.mysprykershop.com/concrete-products/fish-1-1?include=sales-units&fields[concrete-products]=name,description&fields[sales-units]=conversion,precision`. - - -{% endinfo_block %} - -Request samples: -| Request | Usage | -| --- | --- | -| `GET https://glue.mysprykershop.com/concrete-products/001_25904006` | Get information about the `001_25904006` product. | -| `GET https://glue.mysprykershop.com/concrete-products/fish-1-1?include=sales-units,product-measurement-units` | Get information about the `fish-1-1` product with the information on its sales units and product mesurement units included. | -| `GET https://glue.mysprykershop.com/concrete-products/001_25904006?include=product-labels` | Retrieve information about the `001_25904006` product with product labels included. | - - - - -### Response -
    - Response sample - -```json -{ - "data": { - "type": "concrete-products", - "id": "001_25904006", - "attributes": { - "sku": "001_25904006", - "isDiscontinued": false, - "discontinuedNote": null, - "averageRating": null, - "reviewCount": 0, - "name": "Canon IXUS 160", - "description": "Add a personal touch Make shots your own with quick and easy control over picture settings such as brightness and colour intensity. Preview the results while framing using Live View Control and enjoy sharing them with friends using the 6.8 cm (2.7”) LCD screen. Combine with a Canon Connect Station and you can easily share your photos and movies with the world on social media sites and online albums like irista, plus enjoy watching them with family and friends on an HD TV. Effortlessly enjoy great shots of friends thanks to Face Detection technology. It detects multiple faces in a single frame making sure they remain in focus and with optimum brightness. Face Detection also ensures natural skin tones even in unusual lighting conditions.", - "attributes": { - "megapixel": "20 MP", - "flash_range_tele": "4.2-4.9 ft", - "memory_slots": "1", - "usb_version": "2", - "brand": "Canon", - "color": "Red" - }, - "superAttributesDefinition": [ - "color" - ], - "metaTitle": "Canon IXUS 160", - "metaKeywords": "Canon,Entertainment Electronics", - "metaDescription": "Add a personal touch Make shots your own with quick and easy control over picture settings such as brightness and colour intensity. Preview the results whi", - "attributeNames": { - "megapixel": "Megapixel", - "flash_range_tele": "Flash range (tele)", - "memory_slots": "Memory slots", - "usb_version": "USB version", - "brand": "Brand", - "color": "Color" - } - }, - "links": { - "self": "https://glue.mysprykershop.com/concrete-products/001_25904006" - } - } -} -``` - -
    - -
    - Response sample with sales units and product measurement units - -```json -{ - "data": { - "type": "concrete-products", - "id": "cable-vga-1-1", - "attributes": { - "sku": "cable-vga-1-1", - "isDiscontinued": false, - "discontinuedNote": null, - "averageRating": null, - "reviewCount": 0, - "name": "VGA cable (1.5m)", - "description": "Enjoy clear, crisp, immediate connectivity with the High-Speed HDMI Cable. This quality High-Definition Multimedia Interface (HDMI) cable allows you to connect a wide variety of devices in the realms of home entertainment, computing, gaming, and more to your HDTV, projector, or monitor. Perfect for those that interact with multiple platforms and devices, you can rely on strong performance and playback delivery when it comes to your digital experience.", - "attributes": { - "packaging_unit": "Ring" - }, - "superAttributesDefinition": [ - "packaging_unit" - ], - "metaTitle": "", - "metaKeywords": "", - "metaDescription": "", - "attributeNames": { - "packaging_unit": "Packaging unit" - } - }, - "links": { - "self": "https://glue.mysprykershop.com/concrete-products/cable-vga-1-1?include=sales-units,product-measurement-units" - }, - "relationships": { - "product-measurement-units": { - "data": [ - { - "type": "product-measurement-units", - "id": "METR" - } - ] - }, - "sales-units": { - "data": [ - { - "type": "sales-units", - "id": "32" - } - ] - } - } - }, - "included": [ - { - "type": "product-measurement-units", - "id": "METR", - "attributes": { - "name": "Meter", - "defaultPrecision": 100 - }, - "links": { - "self": "https://glue.mysprykershop.com/product-measurement-units/METR" - } - }, - { - "type": "sales-units", - "id": "32", - "attributes": { - "conversion": 1, - "precision": 100, - "isDisplayed": true, - "isDefault": true, - "productMeasurementUnitCode": "METR" - }, - "links": { - "self": "https://glue.mysprykershop.com/concrete-products/cable-vga-1-1/sales-units/32" - }, - "relationships": { - "product-measurement-units": { - "data": [ - { - "type": "product-measurement-units", - "id": "METR" - } - ] - } - } - } - ] -} -``` - -
    - -
    - Response sample with product labels - -```json -{ - "data": { - "type": "concrete-products", - "id": "001_25904006", - "attributes": { - "sku": "001_25904006", - "isDiscontinued": false, - "discontinuedNote": null, - "averageRating": null, - "reviewCount": 0, - "name": "Canon IXUS 160", - "description": "Add a personal touch Make shots your own with quick and easy control over picture settings such as brightness and colour intensity. Preview the results while framing using Live View Control and enjoy sharing them with friends using the 6.8 cm (2.7”) LCD screen. Combine with a Canon Connect Station and you can easily share your photos and movies with the world on social media sites and online albums like irista, plus enjoy watching them with family and friends on an HD TV. Effortlessly enjoy great shots of friends thanks to Face Detection technology. It detects multiple faces in a single frame making sure they remain in focus and with optimum brightness. Face Detection also ensures natural skin tones even in unusual lighting conditions.", - "attributes": { - "megapixel": "20 MP", - "flash_range_tele": "4.2-4.9 ft", - "memory_slots": "1", - "usb_version": "2", - "brand": "Canon", - "color": "Red" - }, - "superAttributesDefinition": [ - "color" - ], - "metaTitle": "Canon IXUS 160", - "metaKeywords": "Canon,Entertainment Electronics", - "metaDescription": "Add a personal touch Make shots your own with quick and easy control over picture settings such as brightness and colour intensity. Preview the results whi", - "attributeNames": { - "megapixel": "Megapixel", - "flash_range_tele": "Flash range (tele)", - "memory_slots": "Memory slots", - "usb_version": "USB version", - "brand": "Brand", - "color": "Color" - } - }, - "links": { - "self": "https://glue.mysprykershop.com/concrete-products/001_25904006" - } - } -} -``` - -
    - - - - -| Attribute | Type | Description | -| --- | --- | --- | -| sku | String | SKU of the concrete product | -| name | String | Name of the concrete product | -| description | String | Description of the concrete product | -| attributes | Object | List of attribute keys and their values for the product | -| superAttributeDefinition | String[] | List of attributes that are flagged as super attributes | -| metaTitle|String|Meta title of the product| -|metaKeywords|String|Meta keywords of the product| -|metaDescription|String|Meta description of the product| -|attributeNames | String | List of attribute keys and their translations | - - -| Included resource | Attribute |Type |Description | -| --- | --- | --- | --- | -| product-measurement-units | attributes | object | List of attributes of the product measurement unit. | -| product-measurement-units| name| string| Measurement unit name. | -| product-measurement-units| defaultPrecision |integer| The default ratio between a sales unit and a base unit. It is used when precision for a related sales unit is not defined. | - -For other attributes of the included resources, see: - -* [Retrieve Price of a Concrete Product](#prices-response-attributes) for price response attributes. -* [Retrieve Sales Units](#sales-units-response-attributes) for sales units and product measurement units response attributes. -* [Retrieve Abstract Products](#abstract-products-response-attributes) for product lables response attributes. - - - - - -## Retrieve Availability of an Abstract Product -To retrieve availability of an abstract product, send the request: - ---- -`GET` **/abstract-products/*{% raw %}{{{% endraw %}abstract_product_sku{% raw %}}}{% endraw %}*/abstract-product-availabilities** - - -| Path parameter | Description | -| --- | --- | -| ***{% raw %}{{{% endraw %}abstract_product_sku{% raw %}}}{% endraw %}*** | SKU of an abstract product to get abailability for. | - -### Request - -Request sample : `GET https://glue.mysprykershop.com/abstract-products/001/abstract-product-availabilities` - -### Response - -Response sample: - -```json -{ - "data": [{ - "type": "abstract-product-availabilities", - "id": "001", - "attributes": { - "availability": true, - "quantity": 10 - }, - "links": { - "self": "https://glue.mysprykershop.com/abstract-products/001/abstract-product-availabilities" - } - }], - "links": { - "self": "https://glue.mysprykershop.com/abstract-products/001/abstract-product-availabilities" - } -} -``` - - -| Field | Type | Description | -| --- | --- | --- | -| availability | Boolean | Boolean to inform about the availability | -| quantity | Integer | Available stock (all warehouses aggregated) | - - - - -## Retrieve Availability of a Concrete Product - ---- -`GET` **/concrete-products/*{% raw %}{{{% endraw %}concrete_product_sku{% raw %}}}{% endraw %}*/concrete-product-availabilities** - ---- - -| Path parameter | Description | -| --- | --- | -| ***{% raw %}{{{% endraw %}concrete_product_sku{% raw %}}}{% endraw %}*** | SKU of a concrete product to get abailability for. | - -### Request - -Request sample: `GET https://glue.mysprykershop.com/concrete-products/001_25904006/concrete-product-availabilities` - - -### Response -Response sample: - -```json -{ - "data": [{ - "type": "concrete-product-availabilities", - "id": "001_25904006", - "attributes": { - "availability": true, - "quantity": 10, - "isNeverOutOfStock": false - }, - "links": { - "self": "https://glue.mysprykershop.com/concrete-products/001_25904006/concrete-product-availabilities" - } - }], - "links": { - "self": "https://glue.mysprykershop.com/concrete-products/001_25904006/concrete-product-availabilities" - } -} -``` - -| Field | Type | Description | -| --- | --- | --- | -| availability | Boolean | Boolean to inform about the availability | -| quantity|Integer|Available stock (all warehouses aggregated) | -| isNeverOutOfStock | Boolean | A boolean to show if this is a product that is never out of stock | - - - -## Retrieve Price of an Abstract Product - -To retrieve price of an abstract prdocut, send the request: - ---- -`GET` **/abstract-products/*{% raw %}{{{% endraw %}abstract_product_sku{% raw %}}}{% endraw %}*/abstract-product-prices** - ---- - - -| Path parameter | Description | -| --- | --- | -| ***{% raw %}{{{% endraw %}abstract_product_sku{% raw %}}}{% endraw %}*** | SKU of an abstract product to get the price of. | - - -### Request - - -| Request | Usage | -| --- | --- | -| `GET https://glue.mysprykershop.com/abstract-products/001/abstract-product-prices` | Retrieve the price of the `001` product. | -| `GET https://glue.mysprykershop.com/abstract-products/001/abstract-product-prices?currency=CHF&priceMode=GROSS_MODE` | Retrieve the gross price of the `001` product in Swiss Franc. | - -| String parameter | Description | Exemplary values | -| --- | --- | --- | -| currency | Defines the currency to retrieve the price in. | USD, EUR, CHF | -| priceMode | Defines the price mode to retrieve the price in. | GROSS_MODE, NET_MODE | - - - - -### Response - -Response sample: - -```json -{ - "data": [ - { - "type": "abstract-product-prices", - "id": "001", - "attributes": { - "price": 9999, - "prices": [ - { - "priceTypeName": "DEFAULT", - "netAmount": null, - "grossAmount": 9999, - "currency": { - "code": "EUR", - "name": "Euro", - "symbol": "€" - } - }, - { - "priceTypeName": "ORIGINAL", - "netAmount": null, - "grossAmount": 12564, - "currency": { - "code": "EUR", - "name": "Euro", - "symbol": "€" - } - } - ] - }, - "links": { - "self": "https://glue.mysprykershop.com/abstract-products/001/abstract-product-prices" - } - } - ], - "links": { - "self": "https://glue.mysprykershop.com/abstract-products/001/abstract-product-prices" - } -} -``` - -Response sample with a gross price in Swiss Franc: - -``` -{ - "data": [ - { - "type": "abstract-product-prices", - "id": "001", - "attributes": { - "price": 11499, - "prices": [ - { - "priceTypeName": "DEFAULT", - "netAmount": null, - "grossAmount": 11499, - "currency": { - "code": "CHF", - "name": "Swiss Franc", - "symbol": "CHF" - } - }, - { - "priceTypeName": "ORIGINAL", - "netAmount": null, - "grossAmount": 14449, - "currency": { - "code": "CHF", - "name": "Swiss Franc", - "symbol": "CHF" - } - } - ] - }, - "links": { - "self": "https://glue.mysprykershop.com/abstract-products/001/abstract-product-prices" - } - } - ], - "links": { - "self": "https://glue.mysprykershop.com/abstract-products/001/items?currency=CHF&priceMode=GROSS_MODE" - } -} -``` - - - -| Field | Type | Description | -| --- | --- | --- | -| price | Integer | Price to pay for that product in cents | -| priceTypeName|String|Price type | -| netAmount|Integer|Net price in cents| -|grossAmount|Integer|Gross price in cents| -|currency.code|String|Currency code| -|currency.name|String|Currency name| -|currency.symbol | String | Currency symbol | - - - - -## Retrieve Price of a Concrete Product - -To retrieve price of an concrete prdocut, send the request: - ---- -`GET` **/concrete-products/*{% raw %}{{{% endraw %}concrete_product_sku{% raw %}}}{% endraw %}*/concrete-product-prices** - ---- - - -| Path parameter | Description | -| --- | --- | -| ***{% raw %}{{{% endraw %}concrete_product_sku{% raw %}}}{% endraw %}*** | SKU of a concrete product to get the price of. | - - - -### Request - - -| Request | Usage | -| --- | --- | -| `GET https://glue.mysprykershop.com/concrete-products/001_25904006/concrete-product-prices` | Retrieve the price of the `001_25904006` product. | -| `GET https://glue.mysprykershop.com/concrete-products/001_25904006/concrete-product-prices?currency=CHF&priceMode=GROSS_MODE` | Retrieve the gross price of the `001_25904006` product in Swiss Franc. | - -| String parameter | Description | Exemplary values | -| --- | --- | --- | -| currency | Defines the currency to retrieve the price in. | USD, EUR, CHF | -| priceMode | Defines the price mode to retrieve the price in. | GROSS_MODE, NET_MODE | - - - -### Response - - -Response sample: -```json -{ - "data": [ - { - "type": "concrete-product-prices", - "id": "001_25904006", - "attributes": { - "price": 9999, - "prices": [ - { - "priceTypeName": "DEFAULT", - "netAmount": null, - "grossAmount": 9999, - "currency": { - "code": "EUR", - "name": "Euro", - "symbol": "€" - } - }, - { - "priceTypeName": "ORIGINAL", - "netAmount": null, - "grossAmount": 12564, - "currency": { - "code": "EUR", - "name": "Euro", - "symbol": "€" - } - } - ] - }, - "links": { - "self": "https://glue.mysprykershop.com/concrete-products/001_25904006/concrete-product-prices" - } - } - ], - "links": { - "self": "https://glue.mysprykershop.com/concrete-products/001_25904006/concrete-product-prices" - } -} -``` - -Response sample with a gross price in Swiss Franc: - -``` -{ - "data": [ - { - "type": "concrete-product-prices", - "id": "001_25904006", - "attributes": { - "price": 11499, - "prices": [ - { - "priceTypeName": "DEFAULT", - "netAmount": null, - "grossAmount": 11499, - "currency": { - "code": "CHF", - "name": "Swiss Franc", - "symbol": "CHF" - } - }, - { - "priceTypeName": "ORIGINAL", - "netAmount": null, - "grossAmount": 14449, - "currency": { - "code": "CHF", - "name": "Swiss Franc", - "symbol": "CHF" - } - } - ] - }, - "links": { - "self": "https://glue.mysprykershop.com/concrete-products/001_25904006/concrete-product-prices" - } - } - ], - "links": { - "self": "https://glue.mysprykershop.com/concrete-products/001_25904006/items?currency=CHF&priceMode=GROSS_MODE" - } -} -``` - - - -| Field | Type | Description | -| --- | --- | --- | -| price | Integer | Price to pay for that product in cents | -| priceTypeName|String|Price type | -| netAmount|Integer|Net price in cents| -|grossAmount|Integer|Gross price in cents| -|currency.code|String|Currency code| -|currency.name|String|Currency name| -|currency.symbol | String | Currency symbol | - - - -## Retrieve Tax Sets -To retrieve tax rates of a product, send the request: - ---- -`GET` **/abstract-products/*{% raw %}{{{% endraw %}abstract_product_sku{% raw %}}}{% endraw %}*/tax-sets** - ---- - -| Path parameter | Description | -| --- | --- | -| ***{% raw %}{{{% endraw %}abstract_product_sku{% raw %}}}{% endraw %}*** | SKU of an abstract product to get the tax rates of. | - -### Request - -Request sample: `GET https://glue.mysprykershop.com/abstract-products/209/product-tax-sets` - -### Response - -Response sample: -```json -Sample response -{ - "data": [ - { - "type": "product-tax-sets", - "id": "deb94215-a1fc-5cdc-af6e-87ec3a847480", - "attributes": { - "name": "Communication Electronics", - "restTaxRates": [ - { - "name": "Austria Standard", - "rate": "20.00", - "country": "AT" - }, - { - "name": "Belgium Standard", - "rate": "21.00", - "country": "BE" - }, - { - "name": "Bulgaria Standard", - "rate": "20.00", - "country": "BG" - }, - { - "name": "Czech Republic Standard", - "rate": "21.00", - "country": "CZ" - }, - { - "name": "Denmark Standard", - "rate": "25.00", - "country": "DK" - }, - { - "name": "France Standard", - "rate": "20.00", - "country": "FR" - }, - { - "name": "Germany Standard", - "rate": "19.00", - "country": "DE" - }, - { - "name": "Hungary Standard", - "rate": "27.00", - "country": "HU" - }, - { - "name": "Italy Standard", - "rate": "22.00", - "country": "IT" - }, - { - "name": "Netherlands Standard", - "rate": "21.00", - "country": "NL" - }, - { - "name": "Romania Standard", - "rate": "20.00", - "country": "RO" - }, - { - "name": "Slovakia Standard", - "rate": "20.00", - "country": "SK" - }, - { - "name": "Slovenia Standard", - "rate": "22.00", - "country": "SI" - }, - { - "name": "Luxembourg Reduced1", - "rate": "3.00", - "country": "LU" - }, - { - "name": "Poland Reduced1", - "rate": "5.00", - "country": "PL" - } - ] - }, - "links": { - "self": "https://glue.mysprykershop.com/abstract-products/177/product-tax-sets" - } - } - ], - "links": { - "self": "https://glue.mysprykershop.com/abstract-products/177/product-tax-sets" - } -} -``` - - - - -| Field | Description | -| --- | --- | -| name | Tax set name | -| restTaxRates.name | Tax rate name | -| restTaxRates.rate | Tax rate | -| restTaxRates.country | Applicable country for the tax rate | - - -  - - - -## Retrieve Image Sets of an Abstract Product -To retrieve image sets of an abstract product, send the request: - ---- -`GET` **/abstract-products/*{% raw %}{{{% endraw %}abstract_product_sku{% raw %}}}{% endraw %}*/abstract-product-image-sets** - ---- - -| Path parameter | Description | -| --- | --- | -| ***{% raw %}{{{% endraw %}abstract_product_sku{% raw %}}}{% endraw %}*** | SKU of an abstract product to get the image sets of. | - -### Request - -Request sample : `GET https://glue.mysprykershop.com/abstract-products/001/abstract-product-image-sets` - - -### Response - -Response sample: -```js -Sample response -{ - "data": [ - { - "type": "abstract-product-image-sets", - "id": "177", - "attributes": { - "imageSets": [ - { - "name": "default", - "images": [ - { - "externalUrlLarge": "//images.icecat.biz/img/norm/high/24867659-4916.jpg", - "externalUrlSmall": "//images.icecat.biz/img/norm/medium/24867659-4916.jpg" - } - ] - } - ] - }, - "links": { - "self": "https://glue.mysprykershop.com/abstract-products/177/abstract-product-image-sets" - } - } - ], - "links": { - "self": "https://glue.mysprykershop.com/abstract-products/177/abstract-product-image-sets" - } -} -``` - - -| Field | Description | -| --- | --- | -| name | Image set name | -| externalUrlLarge | URLs to the image per image set per image | -| externalUrlSmall | URLs to the image per image set per image | - - - - -## Retrieve Image Sets of a Concrete Product -To retrieve image sets of a concrete product, send the request: - ---- -`GET` **/concrete-products/*{% raw %}{{{% endraw %}concrete_product_sku{% raw %}}}{% endraw %}*/concrete-product-image-sets** - ---- - -| Path parameter | Description | -| --- | --- | -| ***{% raw %}{{{% endraw %}concrete_product_sku{% raw %}}}{% endraw %}*** | SKU of a concrete product to get the image sets of. | - -### Request -Request sample : `GET https://glue.mysprykershop.com/concrete-products/001_25904006/concrete-product-image-sets` - - -### Response - - -Response sample: - -```json -Sample response -{ - "data": [ - { - "type": "concrete-product-image-sets", - "id": "177_25913296", - "attributes": { - "imageSets": [ - { - "name": "default", - "images": [ - { - "externalUrlLarge": "//images.icecat.biz/img/norm/high/24867659-4916.jpg", - "externalUrlSmall": "//images.icecat.biz/img/norm/medium/24867659-4916.jpg" - } - ] - } - ] - }, - "links": { - "self": "https://glue.mysprykershop.com/concrete-products/177_25913296/concrete-product-image-sets" - } - } - ], - "links": { - "self": "https://glue.mysprykershop.com/concrete-products/177_25913296/concrete-product-image-sets" - } -} -``` - -| Field | Description | -| --- | --- | -| name | Image set name | -| externalUrlLarge | URLs to the image per image set per image | -| externalUrlSmall | URLs to the image per image set per image | - - -## Retrieve Sales Units - -To get sales unit of a product, send the request: - ---- -`GET` **/concrete-products/*{% raw %}{{{% endraw %}concrete_product_sku{% raw %}}}{% endraw %}*/sales-units** - ---- - - -| Path parameter | Description | -| --- | --- | -|***{% raw %}{{{% endraw %}concrete_product_sku{% raw %}}}{% endraw %}*** | SKU of a concrete product to get sales units for. | - -### Request -Request sample: `GET https://glue.mysprykershop.com/concrete-products/cable-vga-1-2/sales-units` - -### Response -Response sample: - -```json -{ - "data": [ - { - "type": "sales-units", - "id": "34", - "attributes": { - "conversion": 0.01, - "precision": 10, - "isDisplayed": true, - "isDefault": false, - "productMeasurementUnitCode": "CMET" - }, - "links": { - "self": "https://glue.mysprykershop.com/concrete-products/cable-vga-1-2/sales-units/34" - } - }, - { - "type": "sales-units", - "id": "33", - "attributes": { - "conversion": 1, - "precision": 100, - "isDisplayed": true, - "isDefault": true, - "productMeasurementUnitCode": "METR" - }, - "links": { - "self": "https://glue.mysprykershop.com/concrete-products/cable-vga-1-2/sales-units/33" - } - } - ], - "links": { - "self": "https://glue.mysprykershop.com/concrete-products/cable-vga-1-2/sales-units" - } -} -``` - - - -| Attribute | Type | Description | -| --- | --- | --- | -| conversion | integer | Factor to convert a value from sales to base unit. If it is "null", the information is taken from the global conversions. | -| precision | integer | Ratio between a sales unit and a base unit. | -| is displayed | boolean | Defines if the sales unit is displayed on the product details page. | -| is default | boolean | Defines if the sales unit is selected by default on the product details page. | -| measurementUnitCode | string | Code of the measurement unit. | - - -See [Retrieving Measurement Units](/docs/scos/dev/glue-api-guides/{{page.version}}/retrieving-measurement-units.html) for more information on managing the sales units. - - -## Possible errors - -| Code | Constant | Meaning | -| --- | --- | --- | -| 301 | RESPONSE_CODE_CANT_FIND_ABSTRACT_PRODUCT | Abstract product is not found. | -| 302 | RESPONSE_CODE_CANT_FIND_CONCRETE_PRODUCT | Concrete product is not found. | -| 303 | RESPONSE_CODE_ABSTRACT_PRODUCT_IMAGE_SETS_NOT_FOUND | Can`t find abstract product image sets. | -| 304 | RESPONSE_CODE_CONCRETE_PRODUCT_IMAGE_SETS_NOT_FOUND | Can`t find concrete product image sets. | -| 305 | RESPONSE_CODE_ABSTRACT_PRODUCT_AVAILABILITY_NOT_FOUND | Availability is not found. | -| 306 | RESPONSE_CODE_CONCRETE_PRODUCT_AVAILABILITY_NOT_FOUND | Availability is not found. | -| 307 | RESPONSE_CODE_ABSTRACT_PRODUCT_PRICES_NOT_FOUND | Can`t find abstract product prices. | -| 308 | RESPONSE_CODE_CONCRETE_PRODUCT_PRICES_NOT_FOUND | Can`t find concrete product prices. | -| 310 | RESPONSE_CODE_CANT_FIND_PRODUCT_TAX_SETS | Could not get tax set, product abstract with provided id not found. | -| 311 | RESPONSE_CODE_ABSTRACT_PRODUCT_SKU_IS_MISSING | Abstract product SKU is not specified. | -| 312 | RESPONSE_CODE_CONCRETE_PRODUCT_SKU_IS_MISSING | Concrete product SKU is not specified. | -| 313 | RESPONSE_CODE_INVALID_CURRENCY | Currency is invalid. | -| 314 | RESPONSE_CODE_INVALID_PRICE_MODE | Price mode is invalid. | diff --git a/docs/scos/dev/glue-api-guides/202005.0/managing-products/retrieving-product-labels.md b/docs/scos/dev/glue-api-guides/202005.0/managing-products/retrieving-product-labels.md deleted file mode 100644 index 48fa00ad575..00000000000 --- a/docs/scos/dev/glue-api-guides/202005.0/managing-products/retrieving-product-labels.md +++ /dev/null @@ -1,381 +0,0 @@ ---- -title: Accessing Product Labels -description: The article explores how to retrieve a product label by the label ID or product provided in the Product Labels API. -last_updated: Sep 14, 2020 -template: glue-api-storefront-guide-template -originalLink: https://documentation.spryker.com/v5/docs/retrieving-product-labels -originalArticleId: c5dc18d6-5967-43ba-88a4-6df66ea431ac -redirect_from: - - /v5/docs/retrieving-product-labels - - /v5/docs/en/retrieving-product-labels -related: - - title: Product Labels - link: docs/scos/user/back-office-user-guides/page.version/merchandising/product-labels/product-labels.html - - title: Glue API - Promotions & Discounts feature integration - link: docs/scos/dev/feature-integration-guides/page.version/glue-api/glue-api-promotions-and-discounts-feature-integration.html ---- - -[Product labels](/docs/scos/user/features/{{page.version}}/product-labels-feature-overview.html) are used to draw your customers' attention to some specific products. Each of them has a name, a priority, and a validity period. The Product Labels API provides endpoints for getting labels via the REST HTTP requests. - -{% info_block warningBox "Note" %} -Product labels are available only for abstract products. -{% endinfo_block %} - -## Installation -For detailed information on the modules that provide the API functionality and related installation instructions, see Product Labels API. - -## Get Product Label by ID -To retrieve a product label, send the following GET request: - -**/product-labels/{% raw %}{{{% endraw %}label-id{% raw %}}}{% endraw %}** - -Request sample: *GET http://glue.mysprykershop.com/product-labels/3* - -where **3** is the ID of the label you want to retrieve. - -{% info_block warningBox "Note" %} -Label IDs can be found in the **Products / Product Labels** section of the Back Office. -{% endinfo_block %} - -![Product Labels](https://spryker.s3.eu-central-1.amazonaws.com/docs/Glue+API/Glue+API+Storefront+Guides/Managing+Products/Accessing+Product+Labels/product_labels_2.png) - -### Response -The endpoint responds with information on the requested product label, including the CSS class that can be used to display the label on a storefront. - -**Attributes** - -| Attribute | Type | Description | -| --- | --- | --- | -| **name** | String | Specifies the label name. | -| **isExclusive** | Boolean | Indicates whether the label is **exclusive**.
    If the attribute is set to true, the current label takes precedence over other labels the product might have. This means that only the current label should be displayed for the product, and all other possible labels should be hidden. | -| **position** | Integer | Indicates the label priority.
    Labels should be indicated on the frontend according to their priority, from the highest (**1**) to the lowest, unless a product has a label with the **isExclusive** attribute set.| -| **frontEndReference** | String |Specifies the label custom label type (CSS class).
    If the attribute is an empty string, the label should be displayed using the default CSS style. | - -**Sample** - -```json -{ - "data": { - "type": "product-labels", - "id": "3", - "attributes": { - "name": "Standard Label", - "isExclusive": false, - "position": 3, - "frontEndReference": "" - }, - "links": { - "self": "http://glue.mysprykershop.com/product-labels/3" - } - } -} -``` - -### Possible errors -| Code | Reason | -| --- | --- | -| 400 | Product label ID is not specified. | -| 404 | A label with the specified ID does not exist. | - -## Get Product Labels by Product -To retrieve all labels for a product, send a GET request to the following endpoints and include **product-labels** as relationship: - -* **/abstract-products/{% raw %}{{{% endraw %}product-sku{% raw %}}}{% endraw %}?include=product-labels** - for *abstract* products; -* **/abstract-products/{% raw %}{{{% endraw %}product-sku{% raw %}}}{% endraw %}/related-products?include=product-labels** - for *related* products; -* **/concrete-products/{% raw %}{{{% endraw %}product-sku{% raw %}}}{% endraw %}?include=product-labels** - for *concrete* products; -* **/concrete-products/{% raw %}{{{% endraw %}product-sku{% raw %}}}{% endraw %}/abstract-alternative-products?include=product-labels** - for *abstract alternative* products; -* **/concrete-products/{% raw %}{{{% endraw %}product-sku{% raw %}}}{% endraw %}/concrete-alternative-products?include=product-labels** - for *concrete alternative* products. - -Request sample: *GET http://glue.mysprykershop.com/abstract-products/001?include=product-labels* - -where **001** is the SKU of the product you need labels for. - -**Response** -The endpoint responds with information on the requested product, and the labels are available in the requested relationship. For each assigned label, the attributes are the same as when requesting that specific label. - -**Sample** - -```json -{ - "data": { - "type": "abstract-products", - "id": "001", - "attributes": {...}, - "links": {...}, - "relationships": { - "product-labels": { - "data": [ - { - "type": "product-labels", - "id": "3" - }, - { - "type": "product-labels", - "id": "5" - } - ] - } - } - }, - "included": [ - { - "type": "product-labels", - "id": "3", - "attributes": { - "name": "Standard Label", - "isExclusive": false, - "position": 3, - "frontEndReference": "" - }, - "links": { - "self": "http://glue.mysprykershop.com/product-labels/3" - } - }, - { - "type": "product-labels", - "id": "5", - "attributes": { - "name": "SALE %", - "isExclusive": false, - "position": 5, - "frontEndReference": "highlight" - }, - "links": { - "self": "http://glue.mysprykershop.com/product-labels/5" - } - } - ] -} -``` - -### Possible errors -For information on the possible error responses, see [Retrieving Product Information](/docs/scos/dev/glue-api-guides/{{page.version}}/managing-products/retrieving-product-information.html). - -## Get Product Labels for Cart Items -To retrieve labels for all products in a cart, send a GET request to the following endpoints and include **product-labels** as a relationship: - -| Cart Type | Endpoints* | Sample Request | Description | Notes | -| --- | --- | --- | --- | --- | -| **Guest Cart** | */guest-carts/?include=guest-cart-items,concrete-products,product-labels* | `GET /guest-carts?include=guest-cart-items,concrete-products,product-labels` | Gets labels for all products in all guest carts of a guest user. | To fetch carts of a guest user, the user's unique identifier must be passed in the **X-Anonymous-Customer-Unique-Id** header of the request. The header value is managed by the API client. For details, see [Managing Guest Carts](/docs/scos/dev/glue-api-guides/{{page.version}}/managing-carts/guest-carts/managing-guest-carts.html). | -| **Guest Cart** | */guest-carts/**{% raw %}{{{% endraw %}cart_ID{% raw %}}}{% endraw %}**?include=guest-cart-items,concrete-products,product-labels* | `GET /guest-carts/f9a3f045-02c2-5d47-b397-8ac1f5c63e27?include=guest-cart-items,concrete-products,product-labels` | Gets labels for all products in a specific guest cart. | To fetch carts of a guest user, the user's unique identifier must be passed in the **X-Anonymous-Customer-Unique-Id** header of the request. The header value is managed by the API client. For details, see [Managing Guest Carts](/docs/scos/dev/glue-api-guides/{{page.version}}/managing-carts/guest-carts/managing-guest-carts.html). | -| **Guest Cart** | */guest-carts/**{% raw %}{{{% endraw %}cart_ID{% raw %}}}{% endraw %}/up-selling-products**?include=guest-cart-items,concrete-products,product-labels* | `GET /guest-carts/f9a3f045-02c2-5d47-b397-8ac1f5c63e27/up-selling-products?include=guest-cart-items,concrete-products,product-labels` | Gets product labels for all **up-selling products** of a specific guest cart. | To fetch carts of a guest user, the user's unique identifier must be passed in the **X-Anonymous-Customer-Unique-Id** header of the request. The header value is managed by the API client. For details, see [Managing Guest Carts](/docs/scos/dev/glue-api-guides/{{page.version}}/managing-carts/guest-carts/managing-guest-carts.html). | -| **Registered Customer Cart** | */carts/?include=items,concrete-products,product-labels* | `GET /carts?include=items,concrete-products,product-labels` | Gets labels for all products in all carts of a customer. | To fetch carts of registered customers, you need to authenticate the customers and pass the authentication token as part of your request. For details, see [Managing Carts of Registered Users](/docs/scos/dev/glue-api-guides/{{page.version}}/managing-carts/managing-carts.html). | -| **Registered Customer Cart** | */carts/**{% raw %}{{{% endraw %}cart_ID{% raw %}}}{% endraw %}**?include=items,concrete-products,product-labels* | `GET /carts/369541fa2e-02c2-5d47-b397-8ac1f5c58ff9?include=items,concrete-products,product-labels` | Gets labels for all products in a specific cart. | To fetch carts of registered customers, you need to authenticate the customers and pass the authentication token as part of your request. For details, see [Managing Carts of Registered Users](/docs/scos/dev/glue-api-guides/{{page.version}}/managing-carts/managing-carts.html). | -| **Registered Customer Cart** | */carts/**{% raw %}{{{% endraw %}cart_ID{% raw %}}}{% endraw %}/up-selling-products**?include=items,concrete-products,product-labels* | `GET /carts/369541fa2e-02c2-5d47-b397-8ac1f5c58ff9/up-selling-products?include=items,concrete-products,product-labels` | Gets product labels for all **up-selling products** of a specific cart. | To fetch carts of registered customers, you need to authenticate the customers and pass the authentication token as part of your request. For details, see [Managing Carts of Registered Users](/docs/scos/dev/glue-api-guides/{{page.version}}/managing-carts/managing-carts.html). | - -* **cart_ID** is the unique cart identifier assigned to it upon creation. - -{% info_block warningBox "Performance" %} -The above requests fetch not only label information, but also information on the products in the cart. That can adversely affect the overall performance. Use them with caution and apply caching, where possible. -{% endinfo_block %} - -### Response -The endpoint responds with information on the requested cart, including the products in it and the labels assigned to them. For each assigned label, the attributes are the same as when requesting a specific label. - -**Sample:** - -```json -{ - "data": [ - { - "type": "guest-carts", - "id": "f9a3f045-02c2-5d47-b397-8ac1f5c63e27", - "attributes": {...}, - "links": {...}, - "relationships": { - "guest-cart-items": { - "data": [ - { - "type": "guest-cart-items", - "id": "020_21081478" - } - ] - } - } - } - ], - "links": {...}, - "included": [ - { - "type": "product-labels", - "id": "3", - "attributes": { - "name": "Standard Label", - "isExclusive": false, - "position": 3, - "frontEndReference": "" - }, - "links": { - "self": "http://glue.mysprykershop.com/product-labels/3" - } - }, - { - "type": "product-labels", - "id": "5", - "attributes": { - "name": "SALE %", - "isExclusive": false, - "position": 5, - "frontEndReference": "highlight" - }, - "links": { - "self": "http://glue.mysprykershop.com/product-labels/5" - } - }, - { - "type": "concrete-products", - "id": "020_21081478", - "attributes": {...}, - "links": {...}, - "relationships": { - "product-labels": { - "data": [ - { - "type": "product-labels", - "id": "3" - }, - { - "type": "product-labels", - "id": "5" - } - ] - } - } - }, - { - "type": "guest-cart-items", - "id": "020_21081478", - "attributes": { - "sku": "020_21081478", - "quantity": "6", - "groupKey": "020_21081478", - "abstractSku": "020", - "amount": null, - "calculations": {...}, - "selectedProductOptions": [] - }, - "links": {...}, - "relationships": { - "concrete-products": { - "data": [ - { - "type": "concrete-products", - "id": "020_21081478" - } - ] - } - } - } - ] -} -``` - -### Possible Errors -For information on the possible error responses, see [Managing Guest Carts](/docs/scos/dev/glue-api-guides/{{page.version}}/managing-carts/guest-carts/managing-guest-carts.html) and [Managing Carts of Registered Users](/docs/scos/dev/glue-api-guides/{{page.version}}/managing-carts/carts-of-registered-users/managing-carts-of-registered-users.html). - -## Get Product Labels for Wishlist Items -To retrieve labels for all products in a wishlist, send a GET request to the following endpoints and include **product-labels** as a relationship: - -* */wishlists?include=wishlist-items,concrete-products,product-labels* - **all** wishlists of a customer; -* */wishlists/**{% raw %}{{{% endraw %}wishlist_ID{% raw %}}}{% endraw %}**?include=wishlist-items,concrete-products,product-labels* - specific wishlist. - -Request sample: `GET http://glue.mysprykershop.com/wishlists/19154981-f490-56b5-9537-359703a2ed08?include=wishlist-items,concrete-products,product-labels` - -where **19154981-f490-56b5-9537-359703a2ed08** is the ID of the wishlist you need labels for. - -{% info_block warningBox "Performance" %} -The above requests fetch not only label information, but also information on the products in the wishlist. That can adversely affect the overall performance. Use them with caution and apply caching, where possible. -{% endinfo_block %} - -### Response -The endpoint responds with information on the requested wishlist, including the products in it and the labels assigned to them. For each assigned label, the attributes are the same as when requesting that specific label. - -**Sample:** - -```json -{ - "data": { - "type": "wishlists", - "id": "19154981-f490-56b5-9537-359703a2ed08", - "attributes": {...}, - "links": {...}, - "relationships": { - "wishlist-items": { - "data": [ - { - "type": "wishlist-items", - "id": "020_21081478" - } - ] - } - } - }, - "included": [ - { - "type": "product-labels", - "id": "3", - "attributes": { - "name": "Standard Label", - "isExclusive": false, - "position": 3, - "frontEndReference": "" - }, - "links": { - "self": "http://glue.mysprykershop.com/product-labels/3" - } - }, - { - "type": "product-labels", - "id": "5", - "attributes": { - "name": "SALE %", - "isExclusive": false, - "position": 5, - "frontEndReference": "highlight" - }, - "links": { - "self": "http://glue.mysprykershop.com/product-labels/5" - } - }, - { - "type": "concrete-products", - "id": "020_21081478", - "attributes": {...}, - "links": {...}, - "relationships": { - "product-labels": { - "data": [ - { - "type": "product-labels", - "id": "3" - }, - { - "type": "product-labels", - "id": "5" - } - ] - } - } - }, - { - "type": "wishlist-items", - "id": "020_21081478", - "attributes": {...}, - "links": {...}, - "relationships": { - "concrete-products": { - "data": [ - { - "type": "concrete-products", - "id": "020_21081478" - } - ] - } - } - } - ] -} -``` - -### Possible Errors -For information on the possible error responses, see [Managing Wishlists](/docs/scos/dev/glue-api-guides/{{page.version}}//managing-wishlists/managing-wishlists.html). diff --git a/docs/scos/dev/glue-api-guides/202005.0/managing-products/retrieving-related-products.md b/docs/scos/dev/glue-api-guides/202005.0/managing-products/retrieving-related-products.md deleted file mode 100644 index fdc84bf7e2b..00000000000 --- a/docs/scos/dev/glue-api-guides/202005.0/managing-products/retrieving-related-products.md +++ /dev/null @@ -1,1149 +0,0 @@ ---- -title: Retrieving Related Products -description: The article demonstrates how to find alternatives for discontinued products with the help of Glue API endpoints. -last_updated: Sep 15, 2020 -template: glue-api-storefront-guide-template -originalLink: https://documentation.spryker.com/v5/docs/retrieving-related-products -originalArticleId: e46eed39-3641-4e35-9014-89c27fe73b4c -redirect_from: - - /v5/docs/retrieving-related-products - - /v5/docs/en/retrieving-related-products -related: - - title: Retrieving Alternative Products - link: docs/scos/dev/glue-api-guides/page.version/managing-products/retrieving-alternative-products.html - - title: Retrieving Product Information - link: docs/scos/dev/glue-api-guides/page.version/managing-products/retrieving-product-information.html - - title: Product Relations Feature Overview - link: docs/scos/user/features/page.version/product-relations-feature-overview.html - - title: Catalog Search - link: docs/scos/dev/glue-api-guides/page.version/searching-the-product-catalog.html ---- - -Using the **Product Relations** feature, sellers can define a list of comparable or additional items for each product. You can display such items, also called Related Products, in search and in the cart together with the products selected by customers. This can help boosting the cross- and up-selling performance of the outlet. - -{% info_block infoBox %} -Only [abstract](/docs/scos/user/features/{{page.version}}/product-feature-overview/product-feature-overview.html -{% endinfo_block %} products support Product Relations. For more details, see [Product Relations](/docs/scos/user/features/{{page.version}}/product-relations-feature-overview.html).) - -The Product Relations API provides REST endpoints to retrieve the related products. Using it, you can: - -* Retrieve a list of related items for a specific related product; -* Get a list of related products for all items in a cart (for both guest carts and carts of registered users). - -In your development, the endpoints can help you to: - -* Provide comparable products on the product details pages and in search results to make it easier for customers to compare; -* Provide additional products items in a customer's cart to offer upscale variations, accessories and other additional items for products in the cart. This will help you in boosting the cart value. - -{% info_block infoBox %} -To be able to use **Product Relations API**, first, you need to have the Product Relations feature integrated with your project. For details, see [Product Relation Integration](/docs/scos/dev/feature-integration-guides/{{page.version}}/glue-api/glue-api-product-relations-feature-integration.html). -{% endinfo_block %} - -{% info_block infoBox %} -Different types of relations, as well as their logic, are defined on the project level and can vary depending on the project-specific implementation. The API does not define any new relations. Its task is only to present related products via REST requests. -{% endinfo_block %} - -## Installation -For detailed information on the modules that provide the API functionality and related installation instructions, see [GLUE API: Product Relations Feature Integration](/docs/scos/dev/feature-integration-guides/{{page.version}}/glue-api/glue-api-product-relations-feature-integration.html). - -## Retrieving Related Items of an Abstract Product -To get related items of an abstract product, send the request: - ---- -`GET` **/abstract-products/*{% raw %}{{{% endraw %}abstract_product_sku{% raw %}}}{% endraw %}*/related-products** - ---- - -| Path parameter | Description | -| --- | --- | -| ***{% raw %}{{{% endraw %}abstract_product_sku{% raw %}}}{% endraw %}*** | SKU of an abstract product to retrieve related products of. | - -### Request -| String parameter | Description | Exemplary values | -| --- | --- | --- | -| include | Adds resource relationships to the request. | product-labels | - - - -| Request | Usage | -| --- | --- | -| `GET https://glue.mysprykershop.com/abstract-products/122/related-products` | Retrieve related products of the specified product. | -| `GET https://glue.mysprykershop.com/abstract-products/122/related-products?include=product-labels` | Retrieve related products of the specified product. Product labels assigned to the related products are included. | - - - - -### Response - -
    -Response sample - -```json - { - "data": [ - { - "type": "abstract-products", - "id": "128", - "attributes": { - "sku": "128", - "name": "Lenovo ThinkCentre E73", - "description": "", - - "superAttributesDefinition": [ - "internal_memory" - ], - "superAttributes": { - "processor_frequency": [ - "3.6 GHz", - "3.2 GHz" - ] - }, - "attributeMap": { - "attribute_variants": { - "processor_frequency:3.6 GHz": { - "id_product_concrete": "128_27314278" - }, - "processor_frequency:3.2 GHz": { - "id_product_concrete": "128_29955336" - } - }, - "super_attributes": { - "processor_frequency": [ - "3.6 GHz", - "3.2 GHz" - ] - }, - "product_concrete_ids": [ - "128_29955336", - "128_27314278" - ] - }, - "metaTitle": "Lenovo ThinkCentre E73", - "metaKeywords": "Lenovo,Tax Exempt", - "metaDescription": "Small Form Factor Small Form Factor desktops provide the ultimate performance with full-featured scalability, yet weigh as little as 13.2 lbs / 6 kgs. Keep", - "attributeNames": { - "processor_threads": "Processor Threads", - "pci_express_slots_version": "PCI Express slots version", - "internal_memory": "Max internal memory", - "stepping": "Stepping", - "brand": "Brand", - "processor_frequency": "Processor frequency" - } - }, - "links": { - "self": "http://mysprykershop.com/abstract-products/128" - } - }, - { - "type": "abstract-products", - "id": "129", - "attributes": { - "sku": "129", - "name": "Lenovo ThinkCenter E73", - "description": "Eco-friendly and Energy Efficient Lenovo Desktop Power Manager lets you balance power management and performance to save energy and lower costs. The E73 is also ENERGY STAR compliant, EPEAT® Gold and Cisco EnergyWise™ certified—so you can feel good about the planet and your bottom line. With SuperSpeed USB 3.0, transfer data up to 10 times faster than previous USB technologies. You can also connect to audio- and video-related devices with WiFi and Bluetooth® technology. With 10% more processing power, 4th generation Intel® Core™ processors deliver the performance to increase business productivity for your business. They can also guard against identity theft and ensure safe access to your network with built-in security features.", - "attributes": { - "processor_threads": "8", - "processor_cores": "4", - "processor_codename": "Haswell", - "pci_express_slots_version": "3", - "brand": "Lenovo" - }, - "superAttributesDefinition": [], - "superAttributes": { - "processor_frequency": [ - "3 GHz", - "3.6 GHz", - "3.2 GHz" - ] - }, - "attributeMap": { - "attribute_variants": { - "processor_frequency:3 GHz": { - "id_product_concrete": "129_24325712" - }, - "processor_frequency:3.6 GHz": { - "id_product_concrete": "129_27107297" - }, - "processor_frequency:3.2 GHz": { - "id_product_concrete": "129_30706500" - } - }, - "super_attributes": { - "processor_frequency": [ - "3 GHz", - "3.6 GHz", - "3.2 GHz" - ] - }, - "product_concrete_ids": [ - "129_30706500", - "129_27107297", - "129_24325712" - ] - }, - "metaTitle": "Lenovo ThinkCenter E73", - "metaKeywords": "Lenovo,Tax Exempt", - "metaDescription": "Eco-friendly and Energy Efficient Lenovo Desktop Power Manager lets you balance power management and performance to save energy and lower costs. The E73 is", - "attributeNames": { - "processor_threads": "Processor Threads", - "processor_cores": "Processor cores", - "processor_codename": "Processor codename", - "pci_express_slots_version": "PCI Express slots version", - "brand": "Brand", - "processor_frequency": "Processor frequency" - } - }, - "links": { - "self": "http://mysprykershop.com/abstract-products/129" - } - }, - { - "type": "abstract-products", - "id": "130", - "attributes": { - "sku": "130", - "name": "Lenovo ThinkStation P300", - "description": "Optional Flex Module The innovative Flex Module lets you customize I/O ports, so you add only what you need. With the 2 available 5.25\" bays on the P300 Tower, you can mix and match components including an ultraslim ODD, 29-in-1 media card reader, Firewire, and eSATA – up to 8 configurations among an ODD, HDD, and Flex Module. We've redesigned our ThinkStations. No more bulky handles, just a clean-looking, functional design. An extended lip on the top lid that includes a red touch point, combined with a ledge on the back-side, make the P300 exceptionally easy to lift and carry. The P300 workstation features a 15-month life cycle with no planned hardware changes that affect the preloaded software image. Image stability for long-term deployments helps to reduce transition, qualification, and testing costs to ensure savings for your business.", - "attributes": { - "processor_cores": "4", - "processor_threads": "8", - "bus_type": "DMI", - "stepping": "C0", - "brand": "Lenovo" - }, - "superAttributesDefinition": [], - "superAttributes": { - "processor_frequency": [ - "3.5 GHz", - "3.3 GHz", - "3.6 GHz" - ] - }, - "attributeMap": { - "attribute_variants": { - "processor_frequency:3.5 GHz": { - "id_product_concrete": "130_24725761" - }, - "processor_frequency:3.3 GHz": { - "id_product_concrete": "130_24326086" - }, - "processor_frequency:3.6 GHz": { - "id_product_concrete": "130_29285281" - } - }, - "super_attributes": { - "processor_frequency": [ - "3.5 GHz", - "3.3 GHz", - "3.6 GHz" - ] - }, - "product_concrete_ids": [ - "130_29285281", - "130_24326086", - "130_24725761" - ] - }, - "metaTitle": "Lenovo ThinkStation P300", - "metaKeywords": "Lenovo,Tax Exempt", - "metaDescription": "Optional Flex Module The innovative Flex Module lets you customize I/O ports, so you add only what you need. With the 2 available 5.25\" bays on the P300 To", - "attributeNames": { - "processor_cores": "Processor cores", - "processor_threads": "Processor Threads", - "bus_type": "Bus type", - "stepping": "Stepping", - "brand": "Brand", - "processor_frequency": "Processor frequency" - } - }, - "links": { - "self": "http://mysprykershop.com/abstract-products/130" - } - }, - { - "type": "abstract-products", - "id": "131", - "attributes": { - "sku": "131", - "name": "Lenovo ThinkStation P900", - "description": "Thermal Design: Elegant & Efficient. Patented tri-channel cooling with just 3 system fans – as opposed to 10 that other workstations typically rely on—and a direct cooling air baffle directs fresh air into the CPU and memory. ThinkStation P900 delivers new technologies and design to keep your workstation cool and quiet. The innovative Flex Module lets you customize I/O ports, so you add only what you need. Using the 5.25\" bays, you can mix and match components including an ultraslim ODD, 29-in-1 media card reader, Firewire, and eSATA. The Flex Connector is a mezzanine card that fits into the motherboard and allows for expanded storage and I/O, without sacrificing the use of rear PCI. It supports SATA/SAS/PCIe advanced RAID solution. ThinkStation P900 includes two available connectors (enabled with each CPU).", - "attributes": { - "processor_frequency": "2.4 GHz", - "processor_cores": "6", - "processor_threads": "12", - "stepping": "R2", - "brand": "Lenovo", - "color": "Black" - }, - "superAttributesDefinition": [ - "processor_frequency", - "color" - ], - "superAttributes": [], - "attributeMap": { - "attribute_variants": [], - "super_attributes": [], - "product_concrete_ids": [ - "131_24872891" - ] - }, - "metaTitle": "Lenovo ThinkStation P900", - "metaKeywords": "Lenovo,Tax Exempt", - "metaDescription": "Thermal Design: Elegant & Efficient. Patented tri-channel cooling with just 3 system fans – as opposed to 10 that other workstations typically rely on—an", - "attributeNames": { - "processor_frequency": "Processor frequency", - "processor_cores": "Processor cores", - "processor_threads": "Processor Threads", - "stepping": "Stepping", - "brand": "Brand", - "color": "Color" - } - }, - "links": { - "self": "http://glue.de.suite-split-released.local/abstract-products/131" - } - } - ], - "links": { - "self": "http://mysprykershop.com/abstract-products/122/related-products" - } -} -``` -
    - - - - - - - -
    -Response sample with included product labels - -```json - { - "data": [ - { - "type": "abstract-products", - "id": "128", - "attributes": { - "sku": "128", - "averageRating": null, - "reviewCount": 0, - "name": "Lenovo ThinkCentre E73", - "description": "Small Form Factor Small Form Factor desktops provide the ultimate performance with full-featured scalability, yet weigh as little as 13.2 lbs / 6 kgs. Keep your business-critical information safe through USB port disablement and the password-protected BIOS and HDD. You can also safeguard your hardware by physically securing your mouse and keyboard, while the Kensington slot enables you to lock down your E73. Lenovo Desktop Power Manager lets you balance power management and performance to save energy and lower costs. The E73 is also ENERGY STAR compliant, EPEAT® Gold and Cisco EnergyWise™ certified—so you can feel good about the planet and your bottom line. With SuperSpeed USB 3.0, transfer data up to 10 times faster than previous USB technologies. You can also connect to audio- and video-related devices with WiFi and Bluetooth® technology.", - "attributes": { - "processor_threads": "8", - "pci_express_slots_version": "3", - "internal_memory": "8 GB", - "stepping": "C0", - "brand": "Lenovo" - }, - "superAttributesDefinition": [ - "internal_memory" - ], - "superAttributes": { - "processor_frequency": [ - "3.6 GHz", - "3.2 GHz" - ] - }, - "attributeMap": { - "product_concrete_ids": [ - "128_29955336", - "128_27314278" - ], - "super_attributes": { - "processor_frequency": [ - "3.6 GHz", - "3.2 GHz" - ] - }, - "attribute_variants": { - "processor_frequency:3.6 GHz": { - "id_product_concrete": "128_27314278" - }, - "processor_frequency:3.2 GHz": { - "id_product_concrete": "128_29955336" - } - } - }, - "metaTitle": "Lenovo ThinkCentre E73", - "metaKeywords": "Lenovo,Tax Exempt", - "metaDescription": "Small Form Factor Small Form Factor desktops provide the ultimate performance with full-featured scalability, yet weigh as little as 13.2 lbs / 6 kgs. Keep", - "attributeNames": { - "processor_threads": "Processor Threads", - "pci_express_slots_version": "PCI Express slots version", - "internal_memory": "Max internal memory", - "stepping": "Stepping", - "brand": "Brand", - "processor_frequency": "Processor frequency" - }, - "url": "/en/lenovo-thinkcentre-e73-128" - }, - "links": { - "self": "https://glue.mysprykershop.com/abstract-products/128" - }, - "relationships": { - "product-labels": { - "data": [ - { - "type": "product-labels", - "id": "5" - } - ] - } - } - }, - { - "type": "abstract-products", - "id": "129", - "attributes": { - "sku": "129", - "averageRating": null, - "reviewCount": 0, - "name": "Lenovo ThinkCenter E73", - "description": "Eco-friendly and Energy Efficient Lenovo Desktop Power Manager lets you balance power management and performance to save energy and lower costs. The E73 is also ENERGY STAR compliant, EPEAT® Gold and Cisco EnergyWise™ certified—so you can feel good about the planet and your bottom line. With SuperSpeed USB 3.0, transfer data up to 10 times faster than previous USB technologies. You can also connect to audio- and video-related devices with WiFi and Bluetooth® technology. With 10% more processing power, 4th generation Intel® Core™ processors deliver the performance to increase business productivity for your business. They can also guard against identity theft and ensure safe access to your network with built-in security features.", - "attributes": { - "processor_threads": "8", - "processor_cores": "4", - "processor_codename": "Haswell", - "pci_express_slots_version": "3", - "brand": "Lenovo" - }, - "superAttributesDefinition": [], - "superAttributes": { - "processor_frequency": [ - "3 GHz", - "3.6 GHz", - "3.2 GHz" - ] - }, - "attributeMap": { - "product_concrete_ids": [ - "129_30706500", - "129_27107297", - "129_24325712" - ], - "super_attributes": { - "processor_frequency": [ - "3 GHz", - "3.6 GHz", - "3.2 GHz" - ] - }, - "attribute_variants": { - "processor_frequency:3 GHz": { - "id_product_concrete": "129_24325712" - }, - "processor_frequency:3.6 GHz": { - "id_product_concrete": "129_27107297" - }, - "processor_frequency:3.2 GHz": { - "id_product_concrete": "129_30706500" - } - } - }, - "metaTitle": "Lenovo ThinkCenter E73", - "metaKeywords": "Lenovo,Tax Exempt", - "metaDescription": "Eco-friendly and Energy Efficient Lenovo Desktop Power Manager lets you balance power management and performance to save energy and lower costs. The E73 is", - "attributeNames": { - "processor_threads": "Processor Threads", - "processor_cores": "Processor cores", - "processor_codename": "Processor codename", - "pci_express_slots_version": "PCI Express slots version", - "brand": "Brand", - "processor_frequency": "Processor frequency" - }, - "url": "/en/lenovo-thinkcenter-e73-129" - }, - "links": { - "self": "https://glue.mysprykershop.com/abstract-products/129" - } - }, - { - "type": "abstract-products", - "id": "130", - "attributes": { - "sku": "130", - "averageRating": null, - "reviewCount": 0, - "name": "Lenovo ThinkStation P300", - "description": "Optional Flex Module The innovative Flex Module lets you customize I/O ports, so you add only what you need. With the 2 available 5.25\" bays on the P300 Tower, you can mix and match components including an ultraslim ODD, 29-in-1 media card reader, Firewire, and eSATA – up to 8 configurations among an ODD, HDD, and Flex Module. We've redesigned our ThinkStations. No more bulky handles, just a clean-looking, functional design. An extended lip on the top lid that includes a red touch point, combined with a ledge on the back-side, make the P300 exceptionally easy to lift and carry. The P300 workstation features a 15-month life cycle with no planned hardware changes that affect the preloaded software image. Image stability for long-term deployments helps to reduce transition, qualification, and testing costs to ensure savings for your business.", - "attributes": { - "processor_cores": "4", - "processor_threads": "8", - "bus_type": "DMI", - "stepping": "C0", - "brand": "Lenovo" - }, - "superAttributesDefinition": [], - "superAttributes": { - "processor_frequency": [ - "3.5 GHz", - "3.3 GHz", - "3.6 GHz" - ] - }, - "attributeMap": { - "product_concrete_ids": [ - "130_29285281", - "130_24326086", - "130_24725761" - ], - "super_attributes": { - "processor_frequency": [ - "3.5 GHz", - "3.3 GHz", - "3.6 GHz" - ] - }, - "attribute_variants": { - "processor_frequency:3.5 GHz": { - "id_product_concrete": "130_24725761" - }, - "processor_frequency:3.3 GHz": { - "id_product_concrete": "130_24326086" - }, - "processor_frequency:3.6 GHz": { - "id_product_concrete": "130_29285281" - } - } - }, - "metaTitle": "Lenovo ThinkStation P300", - "metaKeywords": "Lenovo,Tax Exempt", - "metaDescription": "Optional Flex Module The innovative Flex Module lets you customize I/O ports, so you add only what you need. With the 2 available 5.25\" bays on the P300 To", - "attributeNames": { - "processor_cores": "Processor cores", - "processor_threads": "Processor Threads", - "bus_type": "Bus type", - "stepping": "Stepping", - "brand": "Brand", - "processor_frequency": "Processor frequency" - }, - "url": "/en/lenovo-thinkstation-p300-130" - }, - "links": { - "self": "https://glue.mysprykershop.com/abstract-products/130" - } - }, - { - "type": "abstract-products", - "id": "131", - "attributes": { - "sku": "131", - "averageRating": null, - "reviewCount": 0, - "name": "Lenovo ThinkStation P900", - "description": "Thermal Design: Elegant & Efficient. Patented tri-channel cooling with just 3 system fans – as opposed to 10 that other workstations typically rely on—and a direct cooling air baffle directs fresh air into the CPU and memory. ThinkStation P900 delivers new technologies and design to keep your workstation cool and quiet. The innovative Flex Module lets you customize I/O ports, so you add only what you need. Using the 5.25\" bays, you can mix and match components including an ultraslim ODD, 29-in-1 media card reader, Firewire, and eSATA. The Flex Connector is a mezzanine card that fits into the motherboard and allows for expanded storage and I/O, without sacrificing the use of rear PCI. It supports SATA/SAS/PCIe advanced RAID solution. ThinkStation P900 includes two available connectors (enabled with each CPU).", - "attributes": { - "processor_frequency": "2.4 GHz", - "processor_cores": "6", - "processor_threads": "12", - "stepping": "R2", - "brand": "Lenovo", - "color": "Black" - }, - "superAttributesDefinition": [ - "processor_frequency", - "color" - ], - "superAttributes": { - "color": [ - "Silver" - ] - }, - "attributeMap": { - "product_concrete_ids": [ - "131_24872891" - ], - "super_attributes": { - "color": [ - "Silver" - ] - }, - "attribute_variants": [] - }, - "metaTitle": "Lenovo ThinkStation P900", - "metaKeywords": "Lenovo,Tax Exempt", - "metaDescription": "Thermal Design: Elegant & Efficient. Patented tri-channel cooling with just 3 system fans – as opposed to 10 that other workstations typically rely on—an", - "attributeNames": { - "processor_frequency": "Processor frequency", - "processor_cores": "Processor cores", - "processor_threads": "Processor Threads", - "stepping": "Stepping", - "brand": "Brand", - "color": "Color" - }, - "url": "/en/lenovo-thinkstation-p900-131" - }, - "links": { - "self": "https://glue.mysprykershop.com/abstract-products/131" - } - } - ], - "links": { - "self": "https://glue.mysprykershop.com/abstract-products/122/related-products?include=product-labels" - }, - "included": [ - { - "type": "product-labels", - "id": "5", - "attributes": { - "name": "SALE %", - "isExclusive": false, - "position": 3, - "frontEndReference": "highlight" - }, - "links": { - "self": "https://glue.mysprykershop.com/product-labels/5" - } - } - ] -} -``` -
    - - - - - - - - -| Attribute | Type | Description | -| --- | --- | --- | -| sku | String | SKU of the abstract product | -| name | String | Name of the abstract product | -| description | String | Description of the abstract product | -| attributes | Object | Dist of attributes and their values | -| superAttributeDefinition | String[] | Attributes flagged as super attributes, that are however not relevant to distinguish between the product variants | -| attributeMap|Object|Each super attribute / value combination and the corresponding concrete product IDs are listed here| -|attributeMap.super_attributes|Object|Applicable super attribute and its values for the product variants| -|attributeMap.attribute_variants|Object|List of super attributes with the list of values| -|attributeMap.product_concrete_ids|String[]|Product IDs of the product variants| -|metaTitle|String|Meta title of the product| -|metaKeywords|String|Meta keywords of the product.| -|metaDescription|String|Meta description of the product.| -|attributeNames | Object | All non-super attribute / value combinations for the abstract product. | - -| Included resource | Attribute | Type | Description | -| --- | --- | --- | --- | -| product labels | name | String | Specifies the label name. | -| product labels | isExclusive | Boolean | Indicates whether the label is `exclusive`.
    If the attribute is set to true, the current label takes precedence over other labels the product might have. This means that only the current label should be displayed for the product, and all other possible labels should be hidden. | -| product labels | position | Integer | Indicates the label priority.
    Labels should be indicated on the frontend according to their priority, from the highest (**1**) to the lowest, unless a product has a label with the `isExclusive` attribute set.| -| product labels | frontEndReference | String |Specifies the label custom label type (CSS class).
    If the attribute is an empty string, the label should be displayed using the default CSS style. | - - - - - -## Retrieving Upselling Products of a Registered User's Cart -To get upselling items for all products in a cart of a registered customer, send the request: - ---- -`GET` **/carts/*{% raw %}{{{% endraw %}cart_id{% raw %}}}{% endraw %}*/up-selling-products** - ---- - - -| Path parameter | Description | -| --- | --- | -| ***{% raw %}{{{% endraw %}cart_id{% raw %}}}{% endraw %}}*** | ID of a cart to get upselling items of. [Retrieve all carts](/docs/scos/dev/glue-api-guides/{{page.version}}/managing-carts/carts-of-registered-users/managing-carts-of-registered-users.html#retrieve-all-carts) to get it. | - -### Request -Request sample : `GET http://mysprykershop.com/carts/1ce91011-8d60-59ef-9fe0-4493ef3628b2/up-selling-products` - - -### Response - - - -
    - Sample Response - -```json -{ - "data": [ - { - "type": "abstract-products", - "id": "163", - "attributes": { - "sku": "163", - "averageRating": null, - "reviewCount": 0, - "name": "Asus ZenPad Z380C-1B", - "description": "Bigger while smaller ASUS ZenPad 8.0 is an 8-inch tablet with a 76.5% screen-to-body ratio—an incredible engineering achievement made possible by reducing the bezel width to the bare minimum. ASUS VisualMaster is a suite of exclusive visual enhancement technologies that combine hardware and software to optimize all aspects of the display—including contrast, sharpness, color, clarity, and brightness—resulting in an incredibly realistic viewing experience. With ASUS VisualMaster, it’s just like being there. ASUS Audio Cover is an entertainment accessory that brings cinematic, 5.1-channel surround sound to ASUS ZenPad 8.0. DTS-HD Premium Sound and SonicMaster technology provide further enhancement, ensuring the ultimate audio experience on ASUS ZenPad 8.0. Intelligent contrast enhancement analyzes and optimizes each pixel in an image before it is reproduced, rendering more detail in the highlights and shadows to reveal the true beauty in your pictures.", - "attributes": { - "processor_cores": "4", - "storage_media": "flash", - "display_technology": "IPS", - "internal_memory": "2GB", - "brand": "Asus", - "color": "Black" - }, - "superAttributesDefinition": [ - "storage_media", - "internal_memory", - "color" - ], - "superAttributes": { - "color": [ - "Black" - ] - }, - "attributeMap": { - "product_concrete_ids": [ - "163_29728850" - ], - "super_attributes": { - "color": [ - "Black" - ] - }, - "attribute_variants": [] - }, - "metaTitle": "Asus ZenPad Z380C-1B", - "metaKeywords": "Asus,Communication Electronics", - "metaDescription": "Bigger while smaller ASUS ZenPad 8.0 is an 8-inch tablet with a 76.5% screen-to-body ratio—an incredible engineering achievement made possible by reducin", - "attributeNames": { - "processor_cores": "Processor cores", - "storage_media": "Storage media", - "display_technology": "Display technology", - "internal_memory": "Max internal memory", - "brand": "Brand", - "color": "Color" - }, - "url": "/en/asus-zenpad-z380c-1b-163" - }, - "links": { - "self": "https://glue.mysprykershop.com/abstract-products/163" - } - }, - { - "type": "abstract-products", - "id": "164", - "attributes": { - "sku": "164", - "averageRating": null, - "reviewCount": 0, - "name": "Asus ZenPad Z380C-1B", - "description": "Bigger while smaller ASUS ZenPad 8.0 is an 8-inch tablet with a 76.5% screen-to-body ratio—an incredible engineering achievement made possible by reducing the bezel width to the bare minimum. ASUS VisualMaster is a suite of exclusive visual enhancement technologies that combine hardware and software to optimize all aspects of the display—including contrast, sharpness, color, clarity, and brightness—resulting in an incredibly realistic viewing experience. With ASUS VisualMaster, it’s just like being there. ASUS Audio Cover is an entertainment accessory that brings cinematic, 5.1-channel surround sound to ASUS ZenPad 8.0. DTS-HD Premium Sound and SonicMaster technology provide further enhancement, ensuring the ultimate audio experience on ASUS ZenPad 8.0. Intelligent contrast enhancement analyzes and optimizes each pixel in an image before it is reproduced, rendering more detail in the highlights and shadows to reveal the true beauty in your pictures.", - "attributes": { - "processor_cores": "4", - "storage_media": "flash", - "display_technology": "IPS", - "internal_memory": "2GB", - "brand": "Asus", - "color": "White" - }, - "superAttributesDefinition": [ - "storage_media", - "internal_memory", - "color" - ], - "superAttributes": { - "color": [ - "White" - ] - }, - "attributeMap": { - "product_concrete_ids": [ - "164_29565390" - ], - "super_attributes": { - "color": [ - "White" - ] - }, - "attribute_variants": [] - }, - "metaTitle": "Asus ZenPad Z380C-1B", - "metaKeywords": "Asus,Communication Electronics", - "metaDescription": "Bigger while smaller ASUS ZenPad 8.0 is an 8-inch tablet with a 76.5% screen-to-body ratio—an incredible engineering achievement made possible by reducin", - "attributeNames": { - "processor_cores": "Processor cores", - "storage_media": "Storage media", - "display_technology": "Display technology", - "internal_memory": "Max internal memory", - "brand": "Brand", - "color": "Color" - }, - "url": "/en/asus-zenpad-z380c-1b-164" - }, - "links": { - "self": "https://glue.mysprykershop.com/abstract-products/164" - } - }, - { - "type": "abstract-products", - "id": "165", - "attributes": { - "sku": "165", - "averageRating": null, - "reviewCount": 0, - "name": "Asus ZenPad Z580CA", - "description": "Fashion-inspired design The design of ASUS ZenPad S 8.0 carries modern influences and a simple, clean look that gives it a universal and stylish appeal. These elements are inspired by our Zen design philosophy of balancing beauty and strength. ASUS ZenPad S 8.0 is an 8-inch tablet that is only 6.6mm thin, weighs just 298g, and has a 74% screen-to-body ratio—an incredible engineering achievement made possible by reducing the bezel width to the bare minimum. Intelligent contrast enhancement analyzes and optimizes each pixel in an image before it is reproduced, rendering more detail in the highlights and shadows to reveal the true beauty in your pictures. ASUS ZenPad S 8.0 is equipped with ASUS Tru2Life+ technology, which improves video with fast action scenes—such as sports—by increasing the screen refresh rate, resulting in reduced blur and smooth, detailed motion.", - "attributes": { - "processor_cores": "4", - "display_technology": "IPS", - "touch_technology": "Multi-touch", - "brand": "Asus", - "color": "Black" - }, - "superAttributesDefinition": [ - "color" - ], - "superAttributes": { - "internal_storage_capacity": [ - "32 GB", - "64 GB" - ] - }, - "attributeMap": { - "product_concrete_ids": [ - "165_29879507", - "165_29879528" - ], - "super_attributes": { - "internal_storage_capacity": [ - "32 GB", - "64 GB" - ] - }, - "attribute_variants": { - "internal_storage_capacity:32 GB": { - "id_product_concrete": "165_29879528" - }, - "internal_storage_capacity:64 GB": { - "id_product_concrete": "165_29879507" - } - } - }, - "metaTitle": "Asus ZenPad Z580CA", - "metaKeywords": "Asus,Communication Electronics", - "metaDescription": "Fashion-inspired design The design of ASUS ZenPad S 8.0 carries modern influences and a simple, clean look that gives it a universal and stylish appeal. Th", - "attributeNames": { - "processor_cores": "Processor cores", - "display_technology": "Display technology", - "touch_technology": "Touch Technology", - "brand": "Brand", - "color": "Color", - "internal_storage_capacity": "Internal storage capacity" - }, - "url": "/en/asus-zenpad-z580ca-165" - }, - "links": { - "self": "https://glue.mysprykershop.com/abstract-products/165" - } - }, - { - "type": "abstract-products", - "id": "166", - "attributes": { - "sku": "166", - "averageRating": null, - "reviewCount": 0, - "name": "Asus ZenPad Z580CA-1B", - "description": "Fashion-inspired design The design of ASUS ZenPad S 8.0 carries modern influences and a simple, clean look that gives it a universal and stylish appeal. These elements are inspired by our Zen design philosophy of balancing beauty and strength. ASUS VisualMaster is a suite of exclusive visual enhancement technologies that combine hardware and software to optimize all aspects of the display—including contrast, sharpness, color, clarity, and brightness—resulting in an incredibly realistic viewing experience. With ASUS VisualMaster, it’s just like being there. ASUS ZenPad S 8.0 is equipped with ASUS Tru2Life+ technology, which improves video with fast action scenes—such as sports—by increasing the screen refresh rate, resulting in reduced blur and smooth, detailed motion.", - "attributes": { - "internal_memory": "4 GB", - "display_technology": "IPS", - "processor_cache": "2 MB", - "brand": "Asus", - "color": "White" - }, - "superAttributesDefinition": [ - "internal_memory", - "processor_cache", - "color" - ], - "superAttributes": { - "internal_storage_capacity": [ - "32 GB", - "64 GB" - ] - }, - "attributeMap": { - "product_concrete_ids": [ - "166_30230575", - "166_29565389" - ], - "super_attributes": { - "internal_storage_capacity": [ - "32 GB", - "64 GB" - ] - }, - "attribute_variants": { - "internal_storage_capacity:32 GB": { - "id_product_concrete": "166_29565389" - }, - "internal_storage_capacity:64 GB": { - "id_product_concrete": "166_30230575" - } - } - }, - "metaTitle": "Asus ZenPad Z580CA-1B", - "metaKeywords": "Asus,Communication Electronics", - "metaDescription": "Fashion-inspired design The design of ASUS ZenPad S 8.0 carries modern influences and a simple, clean look that gives it a universal and stylish appeal. Th", - "attributeNames": { - "internal_memory": "Max internal memory", - "display_technology": "Display technology", - "processor_cache": "Processor cache type", - "brand": "Brand", - "color": "Color", - "internal_storage_capacity": "Internal storage capacity" - }, - "url": "/en/asus-zenpad-z580ca-1b-166" - }, - "links": { - "self": "https://glue.mysprykershop.com/abstract-products/166" - } - } - ], - "links": { - "self": "https://glue.mysprykershop.com/carts/61ab15e9-e24a-5dec-a1ef-fc333bd88b0a/up-selling-products" - } -} -``` -
    -
    - - -See [Retrieving Related Items of an Abstract Product](#related-product-attributes) for the list of response attributes. - - - - -## Retrieving Up-Selling Products for a Guest Cart -To get up-selling items for products in a guest cart, send the request: -`GET` **/guest-carts/*{% raw %}{{{% endraw %}guest_cart_id{% raw %}}}{% endraw %}*/up-selling-products** - -| Path parameter | Description | -| --- | --- | -| ***{% raw %}{{{% endraw %}guest_cart_id{% raw %}}}{% endraw %}}*** | ID of a guest cart to get upselling items of. | - - -### Request -| Header key | Header value example | Required | Description | -|---|---|---|---| -| X-Anonymous-Customer-Unique-Id | 164b-5708-8530 | ✓ | A hyphenated alphanumeric value that is the user's unique identifier. This value is passed as a header when [creating a guest cart](/docs/scos/dev/glue-api-guides/{{page.version}}/managing-carts/guest-carts/managing-guest-carts.html#creating-a-guest-cart). | - -Request sample : `GET https://glue.mysprykershop.com/guest-carts/1ce91011-8d60-59ef-9fe0-4493ef3628b2/up-selling-products`. - - -### Response - -
    -Sample Response - -```js -{ - "data": [ - { - "type": "abstract-products", - "id": "138", - "attributes": { - "sku": "138", - "name": "Acer TravelMate P258-M", - "description": "Tactile textile The P2 series now comes with a fine linen textile pattern embossed on the outer covers. This lends a professional refined look and feel to the line that adds distinction to functionality. There are also practical benefits, as the pattern makes it a bit easier to keep a firm grip on the go, while also resisting scratches. The TravelMate P2 Series is certified to deliver the high audio and visual standards of Skype for Business1. Optimised hardware ensures that every word will be heard clearly with no gap or lag in speech, minimal background noise and zero echo. That means you can call or video chat with superior audio and visual quality. The TravelMate P2 is packed with features that make it easier to do business. Work faster with smoother gestures on the large Precision Touchpad. Quickly share business contacts with a smartphone via Contact Pickup. Log in to the TravelMate P2 faster thanks to Face Login.\t", - "attributes": { - "form_factor": "clamshell", - "processor_cache": "3 MB", - "stepping": "D1", - "brand": "Acer", - "color": "Black" - }, - "superAttributesDefinition": [ - "form_factor", - "processor_cache", - "color" - ], - "superAttributes": { - "processor_frequency": [ - "3.1 GHz", - "2.8 GHz" - ] - }, - "attributeMap": { - "attribute_variants": { - "processor_frequency:3.1 GHz": { - "id_product_concrete": "138_30657838" - }, - "processor_frequency:2.8 GHz": { - "id_product_concrete": "138_30046855" - } - }, - "super_attributes": { - "processor_frequency": [ - "3.1 GHz", - "2.8 GHz" - ] - }, - "product_concrete_ids": [ - "138_30046855", - "138_30657838" - ] - }, - "metaTitle": "Acer TravelMate P258-M", - "metaKeywords": "Acer,Entertainment Electronics", - "metaDescription": "Tactile textile The P2 series now comes with a fine linen textile pattern embossed on the outer covers. This lends a professional refined look and feel to", - "attributeNames": { - "form_factor": "Form factor", - "processor_cache": "Processor cache type", - "stepping": "Stepping", - "brand": "Brand", - "color": "Color", - "processor_frequency": "Processor frequency" - } - }, - "links": { - "self": "http://mysprykershop.com/abstract-products/138" - } - }, - { - "type": "abstract-products", - "id": "042", - "attributes": { - "sku": "042", - "name": "Samsung Galaxy S7", - "description": "Smart Design The beauty of what we've engineered is to give you the slimmest feel in your hand without compromising the big screen size. The elegantly curved front and back fit in your palm just right. It's as beautiful to look at as it is to use. We spent a long time perfecting the curves of the Galaxy S7 edge and S7. Using a proprietary process called 3D Thermoforming, we melted 3D glass to curve with such precision that it meets the curved metal alloy to create an exquisitely seamless and strong unibody. The dual-curve backs on the Galaxy S7 edge and S7 are the reason why they feel so comfortable when you hold them. Everything about the design, from the naturally flowing lines to the thin form factor, come together to deliver a grip that's so satisfying, you won't want to let go.", - "attributes": { - "usb_version": "2", - "os_version": "6", - "max_memory_card_size": "200 GB", - "weight": "152 g", - "brand": "Samsung", - "color": "Gold" - }, - "superAttributesDefinition": [ - "color" - ], - "superAttributes": [], - "attributeMap": { - "attribute_variants": [], - "super_attributes": [], - "product_concrete_ids": [ - "042_31040075" - ] - }, - "metaTitle": "Samsung Galaxy S7", - "metaKeywords": "Samsung,Communication Electronics", - "metaDescription": "Smart Design The beauty of what we've engineered is to give you the slimmest feel in your hand without compromising the big screen size. The elegantly curv", - "attributeNames": { - "usb_version": "USB version", - "os_version": "OS version", - "max_memory_card_size": "Max memory card size", - "weight": "Weight", - "brand": "Brand", - "color": "Color" - } - }, - "links": { - "self": "http://mysprykershop.com/abstract-products/042" - } - }, - { - "type": "abstract-products", - "id": "043", - "attributes": { - "sku": "043", - "name": "Samsung Galaxy S7", - "description": "Smart Design The beauty of what we've engineered is to give you the slimmest feel in your hand without compromising the big screen size. The elegantly curved front and back fit in your palm just right. It's as beautiful to look at as it is to use. We spent a long time perfecting the curves of the Galaxy S7 edge and S7. Using a proprietary process called 3D Thermoforming, we melted 3D glass to curve with such precision that it meets the curved metal alloy to create an exquisitely seamless and strong unibody. The dual-curve backs on the Galaxy S7 edge and S7 are the reason why they feel so comfortable when you hold them. Everything about the design, from the naturally flowing lines to the thin form factor, come together to deliver a grip that's so satisfying, you won't want to let go.", - "attributes": { - "usb_version": "2", - "os_version": "6", - "max_memory_card_size": "200 GB", - "weight": "152 g", - "brand": "Samsung", - "color": "White" - }, - "superAttributesDefinition": [ - "color" - ], - "superAttributes": [], - "attributeMap": { - "attribute_variants": [], - "super_attributes": [], - "product_concrete_ids": [ - "043_31040074" - ] - }, - "metaTitle": "Samsung Galaxy S7", - "metaKeywords": "Samsung,Communication Electronics", - "metaDescription": "Smart Design The beauty of what we've engineered is to give you the slimmest feel in your hand without compromising the big screen size. The elegantly curv", - "attributeNames": { - "usb_version": "USB version", - "os_version": "OS version", - "max_memory_card_size": "Max memory card size", - "weight": "Weight", - "brand": "Brand", - "color": "Color" - } - }, - "links": { - "self": "http://mysprykershop.com/abstract-products/043" - } - }, - { - "type": "abstract-products", - "id": "044", - "attributes": { - "sku": "044", - "name": "Samsung Galaxy S7", - "description": "Smart Design The beauty of what we've engineered is to give you the slimmest feel in your hand without compromising the big screen size. The elegantly curved front and back fit in your palm just right. It's as beautiful to look at as it is to use. We spent a long time perfecting the curves of the Galaxy S7 edge and S7. Using a proprietary process called 3D Thermoforming, we melted 3D glass to curve with such precision that it meets the curved metal alloy to create an exquisitely seamless and strong unibody. The dual-curve backs on the Galaxy S7 edge and S7 are the reason why they feel so comfortable when you hold them. Everything about the design, from the naturally flowing lines to the thin form factor, come together to deliver a grip that's so satisfying, you won't want to let go.", - "attributes": { - "usb_version": "2", - "os_version": "6", - "max_memory_card_size": "200 GB", - "weight": "152 g", - "brand": "Samsung", - "color": "Black" - }, - "superAttributesDefinition": [ - "color" - ], - "superAttributes": [], - "attributeMap": { - "attribute_variants": [], - "super_attributes": [], - "product_concrete_ids": [ - "044_31040076" - ] - }, - "metaTitle": "Samsung Galaxy S7", - "metaKeywords": "Samsung,Communication Electronics", - "metaDescription": "Smart Design The beauty of what we've engineered is to give you the slimmest feel in your hand without compromising the big screen size. The elegantly curv", - "attributeNames": { - "usb_version": "USB version", - "os_version": "OS version", - "max_memory_card_size": "Max memory card size", - "weight": "Weight", - "brand": "Brand", - "color": "Color" - } - }, - "links": { - "self": "http://mysprykershop.com/abstract-products/044" - } - } - ], - "links": { - "self": "http://mysprykershop.com/guest-carts/6a721c99-03d1-5c4d-8f1b-2c33ae57762a/up-selling-products" - } -} -``` -
    -
    - -See [Retrieving Related Items of an Abstract Product](#related-product-attributes) for the list of response attributes. - - -## Possible Errors -| Code | Reason | -| --- | --- | -| 400 | Cart ID is missing.
    Abstract product ID not specified.
    Cart ID is missing. | -| 404 | A cart with the specified ID was not found.
    Abstract product not found. | - - diff --git a/docs/scos/dev/glue-api-guides/202005.0/managing-returns/creating-a-return.md b/docs/scos/dev/glue-api-guides/202005.0/managing-returns/creating-a-return.md deleted file mode 100644 index 3f850a05bf6..00000000000 --- a/docs/scos/dev/glue-api-guides/202005.0/managing-returns/creating-a-return.md +++ /dev/null @@ -1,231 +0,0 @@ ---- -title: Creating a Return -description: In this article, you will find information on creating a return via the Spryker Glue API -last_updated: Sep 14, 2020 -template: glue-api-storefront-guide-template -originalLink: https://documentation.spryker.com/v5/docs/creating-a-return -originalArticleId: a8b3f4ad-1427-4497-ad15-a78fc1b11b15 -redirect_from: - - /v5/docs/creating-a-return - - /v5/docs/en/creating-a-return -related: - - title: Retrieving Returnable Items - link: docs/scos/dev/glue-api-guides/page.version/managing-returns/retrieving-returnable-items.html - - title: Retrieving Return Management Information - link: docs/scos/dev/glue-api-guides/page.version/managing-returns/retrieving-return-management-information.html - - title: Retrieving the Return Reasons - link: docs/scos/dev/glue-api-guides/page.version/managing-returns/retrieving-return-reasons.html - - title: Retrieving the Returned Items - link: docs/scos/dev/glue-api-guides/page.version/managing-returns/retrieving-the-returned-items.html ---- - -You can create a return for one or multiple sales order items. - -To create a return for a registered user, send the request: -*** -`POST` **/returns** -*** -## Request - -Request sample: `POST https://glue.mysprykershop.com/returns` - -```json -{ - "data": { - "type": "returns", - "attributes": { - "store": "DE", - "returnItems": [ - { - "salesOrderItemUuid": "b39c7e1c-12ba-53d3-8d81-5c363d5307e9", - "reason": "0" - }, - { - "salesOrderItemUuid": "b189d4f2-da12-59f3-8e05-dfb4d95b1781", - "reason": "Custom reason" - } - ] - } - } -} -``` - -| Attribute | Type | Required | Description | -| --- | --- | --- | --- | -| store | String | ✓ | Store in which the order has been placed. | -| returnItems | cell | ✓ | Set of return items. | -| salesOrderItemUuid | String | ✓ | UUID of the sales order item included in the return. | -| reason | String | x | Reason to return the item. | - -## Response -
    - Sample response - -```json -{ - "data": { - "type": "returns", - "id": "DE--1-R3", - "attributes": { - "returnReference": "DE--1-R3", - "store": "DE", - "customerReference": "DE--1", - "returnTotals": { - "refundTotal": 0, - "remunerationTotal": 49798 - }, - "returnItems": [ - { - "uuid": "3071bef7-f26f-5be4-b9e7-bef1d670a94b", - "reason": "0", - "orderItem": { - "name": "Sony Xperia Z3 Compact", - "sku": "078_24602396", - "sumPrice": 25584, - "quantity": 1, - "unitGrossPrice": 25584, - "sumGrossPrice": 25584, - "taxRate": "19.00", - "unitNetPrice": 0, - "sumNetPrice": 0, - "unitPrice": 25584, - "unitTaxAmountFullAggregation": 3676, - "sumTaxAmountFullAggregation": 3676, - "refundableAmount": 23026, - "canceledAmount": 0, - "sumSubtotalAggregation": 25584, - "unitSubtotalAggregation": 25584, - "unitProductOptionPriceAggregation": 0, - "sumProductOptionPriceAggregation": 0, - "unitExpensePriceAggregation": 0, - "sumExpensePriceAggregation": null, - "unitDiscountAmountAggregation": 2558, - "sumDiscountAmountAggregation": 2558, - "unitDiscountAmountFullAggregation": 2558, - "sumDiscountAmountFullAggregation": 2558, - "unitPriceToPayAggregation": 23026, - "sumPriceToPayAggregation": 23026, - "taxRateAverageAggregation": "19.00", - "taxAmountAfterCancellation": null, - "orderReference": "DE--8", - "uuid": "b39c7e1c-12ba-53d3-8d81-5c363d5307e9", - "isReturnable": false, - "metadata": { - "superAttributes": [], - "image": "https://images.icecat.biz/img/norm/medium/24602396-8292.jpg" - }, - "calculatedDiscounts": [], - "productOptions": [] - } - }, - { - "uuid": "b3c46290-2eaa-5b37-bba2-60171638fabb", - "reason": "Custom reason", - "orderItem": { - "name": "Canon PowerShot N", - "sku": "035_17360369", - "sumPrice": 29747, - "quantity": 1, - "unitGrossPrice": 29747, - "sumGrossPrice": 29747, - "taxRate": "19.00", - "unitNetPrice": 0, - "sumNetPrice": 0, - "unitPrice": 29747, - "unitTaxAmountFullAggregation": 4275, - "sumTaxAmountFullAggregation": 4275, - "refundableAmount": 26772, - "canceledAmount": 0, - "sumSubtotalAggregation": 29747, - "unitSubtotalAggregation": 29747, - "unitProductOptionPriceAggregation": 0, - "sumProductOptionPriceAggregation": 0, - "unitExpensePriceAggregation": 0, - "sumExpensePriceAggregation": null, - "unitDiscountAmountAggregation": 2975, - "sumDiscountAmountAggregation": 2975, - "unitDiscountAmountFullAggregation": 2975, - "sumDiscountAmountFullAggregation": 2975, - "unitPriceToPayAggregation": 26772, - "sumPriceToPayAggregation": 26772, - "taxRateAverageAggregation": "19.00", - "taxAmountAfterCancellation": null, - "orderReference": "DE--9", - "uuid": "b189d4f2-da12-59f3-8e05-dfb4d95b1781", - "isReturnable": false, - "metadata": { - "superAttributes": [], - "image": "https://images.icecat.biz/img/gallery_mediums/17360369_3328.jpg" - }, - "calculatedDiscounts": [], - "productOptions": [] - } - } - ] - }, - "links": { - "self": "http://glue.myspykershop.com/returns/DE--1-R2" - } - } -} -``` -
    - -| Attribute* | Type | Description | -| --- | --- | --- | -| returnReference | String | Unique identifier of the return in the system. You can get it when creating the return. | -| store | String | Store for which the return was created. | -| customerReference | String | Unique identifier of the customer in the system. | -| returnTotals | Object | List of totals to return. | -| refundTotal | Integer | Total sum of refunds. | -| remunerationTotal | Integer | Total sum of remuneration. | -| returnItems | Array | Set of return items. | -| uuid | String | Unique identifier of the returned item. | -| reason | String | Predefined reason why the return was created.| -| orderItem | Object | Information about the returned item. | -| name | String | Product name. | -| sku | String | SKU of the product. | -| sumPrice | Integer | Sum of the prices. | -| quantity | Integer | Number of the sales order items. | -| unitGrossPrice | Integer | Single item gross price. | -| sumGrossPrice | Integer | Sum of items gross price. | -| taxRate | Integer | Current tax rate in percentage. | -| unitNetPrice | Integer | Single item net price. | -| sumNetPrice | Integer | Sum of items' net price. | -| unitPrice | Integer | Single item price without assuming if it is new or gross, this value should be used everywhere the price is displayed, it allows switching tax mode without side effects. | -| unitTaxAmountFullAggregation | Integer | Total tax amount for a given item with additions. | -| sumTaxAmountFullAggregation | Integer | Total tax amount for a given sum of items with additions. | -| refundableAmount | Integer | Available refundable amount for an item. | -| canceledAmount | Integer | Total canceled amount for this item. | -| sumSubtotalAggregation | Integer | Sum of subtotals of the items. | -| unitSubtotalAggregation | Integer | Subtotal for the given item. | -| unitProductOptionPriceAggregation | Integer | Item total product option price. | -| sumProductOptionPriceAggregation | Integer | Item total of product options for the given sum of items. | -| unitExpensePriceAggregation | Integer | Item expense total for a given item. | -| sumExpensePriceAggregation | Integer | Sum of item expense totals for the items. | -| unitDiscountAmountAggregation | Integer | Item total discount amount. | -| sumDiscountAmountAggregation |Integer |Sum of item total discount amounts. | -| unitDiscountAmountFullAggregation | Integer | Item total discount amount. | -| sumDiscountAmountFullAggregation | Integer | Item total discount amount with additions. | -| unitPriceToPayAggregation | Integer | Item total price to pay after discounts with additions. | -| sumPriceToPayAggregation | Integer | Sum of item total price to pay after discounts with additions. | -| taxRateAverageAggregation | Integer | Item tax rate average, with additions used when recalculating tax amount after cancellation. | -| taxAmountAfterCancellation | Integer | Tax amount after cancellation, recalculated using tax average. | -| orderReference | String | Order reference number. | -| uuid | String | Unique identifier of the order. | -| isReturnable | Boolean | Specifies whether a sales order item is returnable or not. | -| calculatedDiscounts | Array | Specifies the list of calculated discounts. | -| productOptions | Array | Set of product options applied to the product. | -/* The fields mentioned are all attributes in the response. Type and ID are not mentioned. - -{% info_block infoBox "Info" %} - -If you want to adjust results number per page, use the limit parameter, that returns the number of results for a single page, and the offset parameter, that returns results starting from a particular page. See [Paging Through Orders](/docs/scos/dev/glue-api-guides/{{page.version}}/managing-customers/retrieving-customer-orders.html#paging-through-orders) for more details. - -{% endinfo_block %} - -## Possible Errors - -| Code | Reason | -| --- | --- | -| 3601 | Return can't be created. | diff --git a/docs/scos/dev/glue-api-guides/202005.0/managing-returns/retrieving-return-management-information.md b/docs/scos/dev/glue-api-guides/202005.0/managing-returns/retrieving-return-management-information.md deleted file mode 100644 index bfaf49767cf..00000000000 --- a/docs/scos/dev/glue-api-guides/202005.0/managing-returns/retrieving-return-management-information.md +++ /dev/null @@ -1,51 +0,0 @@ ---- -title: Retrieving Return Management Information -description: In this article, you will find details on how to retrieve Return Management information via the Spryker Glue API. -last_updated: Aug 11, 2020 -template: glue-api-storefront-guide-template -originalLink: https://documentation.spryker.com/v5/docs/retrieving-return-management-information -originalArticleId: 3c3cb4b5-714d-44a4-95b6-8a0c5abb43b7 -redirect_from: - - /v5/docs/retrieving-return-management-information - - /v5/docs/en/retrieving-return-management-information - - /docs/scos/dev/glue-api-guides/202005.0/retrieving-return-management-information/retrieving-return-management-information.html -related: - - title: Retrieving Returnable Items - link: docs/scos/dev/glue-api-guides/page.version/managing-returns/retrieving-returnable-items.html - - title: Creating a Return - link: docs/scos/dev/glue-api-guides/page.version/managing-returns/creating-a-return.html - - title: Retrieving the Returned Items - link: docs/scos/dev/glue-api-guides/page.version/managing-returns/retrieving-the-returned-items.html - - title: Retrieving the Return Reasons - link: docs/scos/dev/glue-api-guides/page.version/managing-returns/retrieving-return-reasons.html ---- - -The Return Management API allows developers to retrieve return information and create a return. The list of retrievable information includes: - -* Sales order items that a Buyer can return -* Returns per customer -* Predefined reasons stored in the database - -In your development, the API can help you: - -* View order details, including returnable or non-returnable items -* Create returns for the returnable items -* View return details of a specific customer -* Specify reasons for returning the sales order items - - -{% info_block warningBox "Authentication" %} - -Since the Return Management feature is available for logged-in users only, the endpoints provided by the API cannot be accessed anonymously. For this reason, you always need to pass a user's authentication token in your REST requests. For details on how to authenticate a user and retrieve the token, see Authentication and Authorization. - -{% endinfo_block %} - - -{% info_block infoBox "Info" %} - -The response code samples and their attributes in this section are subject to change and should be used for reference purposes only. - -{% endinfo_block %} - -### Installation -For details on the modules that provide the API functionality and how to install them, see Glue: Return Management Feature Integration. diff --git a/docs/scos/dev/glue-api-guides/202005.0/managing-returns/retrieving-return-reasons.md b/docs/scos/dev/glue-api-guides/202005.0/managing-returns/retrieving-return-reasons.md deleted file mode 100644 index 04673be8d2d..00000000000 --- a/docs/scos/dev/glue-api-guides/202005.0/managing-returns/retrieving-return-reasons.md +++ /dev/null @@ -1,74 +0,0 @@ ---- -title: Retrieving the Return Reasons -description: In this article, you will find details on how to retrieve the return reasons via the Spryker Glue API. -last_updated: Aug 11, 2020 -template: glue-api-storefront-guide-template -originalLink: https://documentation.spryker.com/v5/docs/retrieving-the-return-reasons -originalArticleId: 6013be3e-9de7-40ec-88f6-e68b39454d5a -redirect_from: - - /v5/docs/retrieving-the-return-reasons - - /v5/docs/en/retrieving-the-return-reasons -related: - - title: Retrieving Returnable Items - link: docs/scos/dev/glue-api-guides/page.version/managing-returns/retrieving-returnable-items.html - - title: Retrieving Return Management Information - link: docs/scos/dev/glue-api-guides/page.version/managing-returns/retrieving-return-management-information.html - - title: Retrieving the Returned Items - link: docs/scos/dev/glue-api-guides/page.version/managing-returns/retrieving-the-returned-items.html - - title: Creating a Return - link: docs/scos/dev/glue-api-guides/page.version/managing-returns/creating-a-return.html ---- - -To retrieve a list of predefined return reasons, send the request: -*** -`GET` **/return-reasons** -*** -## Request -Request sample: `GET https://glue.mysprykershop.com/return-reasons` - -## Response -Sample response: -```json -{ - "data": [ - { - "type": "return-reasons", - "id": null, - "attributes": { - "reason": "Damaged" - }, - "links": { - "self": "https://glue.mysprykershop.com/return-reasons" - } - }, - { - "type": "return-reasons", - "id": null, - "attributes": { - "reason": "Wrong Item" - }, - "links": { - "self": "https://glue.mysprykershop.com/return-reasons" - } - }, - { - "type": "return-reasons", - "id": null, - "attributes": { - "reason": "No longer needed" - }, - "links": { - "self": "https://glue.mysprykershop.com/return-reasons" - } - } - ], - "links": { - "self": "https://glue.mysprykershop.com/return-reasons" - } -} -``` - -| Attribute* | Type | Description | -| --- | --- | --- | -| reason | String | Predefined return reason. | -/* The fields mentioned are all attributes in the response. Type and ID are not mentioned. diff --git a/docs/scos/dev/glue-api-guides/202005.0/managing-returns/retrieving-returnable-items.md b/docs/scos/dev/glue-api-guides/202005.0/managing-returns/retrieving-returnable-items.md deleted file mode 100644 index 9b79bdfab4d..00000000000 --- a/docs/scos/dev/glue-api-guides/202005.0/managing-returns/retrieving-returnable-items.md +++ /dev/null @@ -1,229 +0,0 @@ ---- -title: Retrieving Returnable Items -description: In this article, you will find details on retrieving returnable items via the Spryker Glue API. -last_updated: Sep 14, 2020 -template: glue-api-storefront-guide-template -originalLink: https://documentation.spryker.com/v5/docs/retrieving-returnable-items -originalArticleId: 2ede8cf4-3a79-43ab-8da1-f5b75655a463 -redirect_from: - - /v5/docs/retrieving-returnable-items - - /v5/docs/en/retrieving-returnable-items -related: - - title: Retrieving Return Management Information - link: docs/scos/dev/glue-api-guides/page.version/managing-returns/retrieving-return-management-information.html - - title: Creating a Return - link: docs/scos/dev/glue-api-guides/page.version/managing-returns/creating-a-return.html - - title: Retrieving the Returned Items - link: docs/scos/dev/glue-api-guides/page.version/managing-returns/retrieving-the-returned-items.html - - title: Retrieving the Return Reasons - link: docs/scos/dev/glue-api-guides/page.version/managing-returns/retrieving-return-reasons.html ---- - -You can retrieve information about: - -* all items from all customer’s orders that can be returned -* items of a specific order that can be returned - -## Retrieve returnable items from all orders - -To retrieve all returnable items from all customer’s orders, send the request: -*** -`GET`**/returnable-items** -*** - -### Request -Request sample: `GET https://glue.mysprykershop.com/returnable-items` - -### Response -
    - Sample response - no returnable items - -```json - { - "data": [], - "links": { - "self": "https://glue.mysprykershop.com/returnable-items" - } -} -``` -
    - -
    - Sample response with returnable items - -```json -{ - "data": [ - { - "type": "returnable-items", - "id": "349f3ce2-0396-5ed4-a2df-c9e053cb3350", - "attributes": { - "name": "Asus Zenbook US303UB", - "sku": "141_29380410", - "sumPrice": 36742, - "quantity": 1, - "unitGrossPrice": 36742, - "sumGrossPrice": 36742, - "taxRate": "19.00", - "unitNetPrice": 0, - "sumNetPrice": 0, - "unitPrice": 36742, - "unitTaxAmountFullAggregation": 5280, - "sumTaxAmountFullAggregation": 5280, - "refundableAmount": 33068, - "canceledAmount": 0, - "sumSubtotalAggregation": 36742, - "unitSubtotalAggregation": 36742, - "unitProductOptionPriceAggregation": 0, - "sumProductOptionPriceAggregation": 0, - "unitExpensePriceAggregation": 0, - "sumExpensePriceAggregation": null, - "unitDiscountAmountAggregation": 3674, - "sumDiscountAmountAggregation": 3674, - "unitDiscountAmountFullAggregation": 3674, - "sumDiscountAmountFullAggregation": 3674, - "unitPriceToPayAggregation": 33068, - "sumPriceToPayAggregation": 33068, - "taxRateAverageAggregation": "19.00", - "taxAmountAfterCancellation": null, - "orderReference": "DE--10", - "uuid": "349f3ce2-0396-5ed4-a2df-c9e053cb3350", - "isReturnable": true, - "metadata": { - "superAttributes": [], - "image": "https://images.icecat.biz/img/gallery_mediums/img_29380410_medium_1480597659_0651_26649.jpg" - }, - "calculatedDiscounts": [], - "productOptions": [] - }, - "links": { - "self": "https://glue.mysprykershop.com/returnable-items/349f3ce2-0396-5ed4-a2df-c9e053cb3350" - } - } - ], - "links": { - "self": "https://glue.mysprykershop.com/returnable-items" - } -} -``` -
    - -| Attribute* | Type | Description | -| --- | --- | --- | -| name | String | Product name. | -| sku | String | SKU of the product. | -| sumPrice | Integer | Sum of the prices. | -| quantity | Integer | Number of the sales order items. | -| unitGrossPrice | Integer | Single item gross price. | -| sumGrossPrice | Integer | Sum of items gross price. | -| taxRate | Integer | Current tax rate in percentage. | -| unitNetPrice | Integer | Single item net price. | -| sumNetPrice | Integer | Sum of items' net price. | -| unitPrice | Integer | Single item price without assuming if it is new or gross, this value should be used everywhere the price is displayed, it allows switching tax mode without side effects. | -| unitTaxAmountFullAggregation | Integer | Total tax amount for a given item with additions. | -| sumTaxAmountFullAggregation | Integer | Total tax amount for a given sum of items with additions. | -| refundableAmount | Integer | Available refundable amount for an item. | -| canceledAmount | Integer | Total canceled amount for this item. | -| sumSubtotalAggregation | Integer | Sum of subtotals of the items. | -| unitSubtotalAggregation | Integer | Subtotal for the given item. | -| unitProductOptionPriceAggregation | Integer | Item total product option price. | -| sumProductOptionPriceAggregation | Integer | Item total of product options for the given sum of items. | -| unitExpensePriceAggregation | Integer | Item expense total for a given item. | -| sumExpensePriceAggregation | Integer | Sum of item expense totals for the items. | -| unitDiscountAmountAggregation | Integer | Item total discount amount. | -|sumDiscountAmountAggregation |Integer |Sum of item total discount amounts. | -| unitDiscountAmountFullAggregation | Integer | Item total discount amount. | -| sumDiscountAmountFullAggregation | Integer | Item total discount amount with additions. | -| unitPriceToPayAggregation | Integer | Item total price to pay after discounts with additions. | -| sumPriceToPayAggregation | Integer | Sum of item total price to pay after discounts with additions. | -| taxRateAverageAggregation | Integer | Item tax rate average, with additions used when recalculating tax amount after cancellation. | -| taxAmountAfterCancellation | Integer | Tax amount after cancellation, recalculated using tax average. | -| orderReference | String | Order reference number. | -| uuid | String | Unique identifier of the order. | -| isReturnable | Boolean | Specifies whether a sales order item is returnable or not. | -| calculatedDiscounts | Array | Specifies the list of calculated discounts. | -| productOptions | Array | Set of product options applied to the product. | -/* The fields mentioned are all attributes in the response. Type and ID are not mentioned. - -{% info_block infoBox "Info" %} - -To get returnable items of a specific sales order item by the Order Reference(s), you can specify the `orderReferences[]` parameter(s) in your request. - -Request sample: `GET https://glue.mysprykershop.com/returnable-items?orderReferences[]=DE--5` - -where **DE--5** is the Order Reference of the order you need. - -{% endinfo_block %} - -## Retrieve returnable items of a specific order -To get returnable items of a specific sales order item by the order ID, send the request: -*** -`GET` **/returnable-items/*{% raw %}{{{% endraw %}OrderID{% raw %}}}{% endraw %}*** -*** - -| Path parameter | Description | -| --- | --- | -| {% raw %}{{{% endraw %}OrderID{% raw %}}}{% endraw %} | A unique identifier of an order. [Retrieve all orders](/docs/scos/dev/glue-api-guides/{{page.version}}/managing-customers/retrieving-customer-orders.html#retrieving-all-orders) to get it. | - -### Request -Request sample: `GET https://glue.mysprykershop.com/returnable-items/14d86bb2-ea23-57ed-904c-eecc63ef10ac` - -### Response -Sample Response: -```json -{ - "data": { - "type": "returnable-items", - "id": "14d86bb2-ea23-57ed-904c-eecc63ef10ac", - "attributes": { - "name": "Samsung Galaxy S5 mini", - "sku": "066_23294028", - "sumPrice": 39353, - "quantity": 1, - "unitGrossPrice": 39353, - "sumGrossPrice": 39353, - "taxRate": "19.00", - "unitNetPrice": 0, - "sumNetPrice": 0, - "unitPrice": 39353, - "unitTaxAmountFullAggregation": 5655, - "sumTaxAmountFullAggregation": 5655, - "refundableAmount": 35418, - "canceledAmount": 0, - "sumSubtotalAggregation": 39353, - "unitSubtotalAggregation": 39353, - "unitProductOptionPriceAggregation": 0, - "sumProductOptionPriceAggregation": 0, - "unitExpensePriceAggregation": 0, - "sumExpensePriceAggregation": null, - "unitDiscountAmountAggregation": 3935, - "sumDiscountAmountAggregation": 3935, - "unitDiscountAmountFullAggregation": 3935, - "sumDiscountAmountFullAggregation": 3935, - "unitPriceToPayAggregation": 35418, - "sumPriceToPayAggregation": 35418, - "taxRateAverageAggregation": "19.00", - "taxAmountAfterCancellation": null, - "orderReference": "DE--4", - "uuid": "14d86bb2-ea23-57ed-904c-eecc63ef10ac", - "isReturnable": true, - "metadata": { - "superAttributes": [], - "image": "https://images.icecat.biz/img/gallery_mediums/23294028_3275.jpg" - }, - "calculatedDiscounts": [], - "productOptions": [] - }, - "links": { - "self": "https://glue.mysprykershop.com/returnable-items/14d86bb2-ea23-57ed-904c-eecc63ef10ac" - } - } -} -``` -For the attributes of the included resources, see [Retrieving returnable items from all orders](#retrieve-returnable-items-from-all-orders). - -## Possible Errors - -| Code | Reason | -| --- | --- | -| 3603 | Can't find returnable item by the given id. | diff --git a/docs/scos/dev/glue-api-guides/202005.0/managing-returns/retrieving-the-returned-items.md b/docs/scos/dev/glue-api-guides/202005.0/managing-returns/retrieving-the-returned-items.md deleted file mode 100644 index ac8d9c25e2e..00000000000 --- a/docs/scos/dev/glue-api-guides/202005.0/managing-returns/retrieving-the-returned-items.md +++ /dev/null @@ -1,273 +0,0 @@ ---- -title: Retrieving the Returned Items -description: In this article, you will find information on retrieving the returned items via the Spryker Glue API. -last_updated: Aug 11, 2020 -template: glue-api-storefront-guide-template -originalLink: https://documentation.spryker.com/v5/docs/retrieving-the-returned-items -originalArticleId: 05d1d519-3862-47d4-8afe-1a94e737060c -redirect_from: - - /v5/docs/retrieving-the-returned-items - - /v5/docs/en/retrieving-the-returned-items -related: - - title: Retrieving Return Management Information - link: docs/scos/dev/glue-api-guides/page.version/managing-returns/retrieving-return-management-information.html - - title: Retrieving Returnable Items - link: docs/scos/dev/glue-api-guides/page.version/managing-returns/retrieving-returnable-items.html - - title: Retrieving the Return Reasons - link: docs/scos/dev/glue-api-guides/page.version/managing-returns/retrieving-return-reasons.html - - title: Creating a Return - link: docs/scos/dev/glue-api-guides/page.version/managing-returns/creating-a-return.html ---- - -## Retrieve All Returned Items -To retrieve returns of the customer, send the request: -*** -`GET` **/returns** -*** -### Request -Request sample: `GET https://glue.mysprykershop.com/returns` - -### Response -Response sample: -```json -{ - "data": [ - { - "type": "returns", - "id": "DE--1-R3", - "attributes": { - "returnReference": "DE--1-R3", - "store": "DE", - "customerReference": "DE--1", - "returnTotals": { - "refundTotal": 0, - "remunerationTotal": 49798 - } - }, - "links": { - "self": "https://glue.mysprykershop.com/returns/DE--1-R3" - } - }, - { - "type": "returns", - "id": "DE--1-R2", - "attributes": { - "returnReference": "DE--1-R2", - "store": "DE", - "customerReference": "DE--1", - "returnTotals": { - "refundTotal": 0, - "remunerationTotal": 35418 - } - }, - "links": { - "self": "https://glue.mysprykershop.com/returns/DE--1-R2" - } - }, - { - "type": "returns", - "id": "DE--1-R1", - "attributes": { - "returnReference": "DE--1-R1", - "store": "DE", - "customerReference": "DE--1", - "returnTotals": { - "refundTotal": 0, - "remunerationTotal": 31050 - } - }, - "links": { - "self": "https://glue.mysprykershop.com/returns/DE--1-R1" - } - } - ], - "links": { - "self": "https://glue.mysprykershop.com/returns" - } -} -``` - -| Attribute* | Type | Description | -| --- | --- | --- | -| returnReference | String | Unique identifier of the return in the system. You can get it when creating the return. | -| store | String | Store for which the return was created. | -| customerReference | String | Unique identifier of the customer in the system. | -| returnTotals | Object | List of totals to return. | -| refundTotal | Integer | Total sum of refunds. | -| remunerationTotal | Integer | Total sum of remuneration. | -/* The fields mentioned are all attributes in the response. Type and ID are not mentioned. - - -## Retrieve information on a specific return -To retrieve information on a specific return item, send the request: -*** -`GET` **/returns/*{% raw %}{{{% endraw %}returnID{% raw %}}}{% endraw %}*** -*** - -| Path parameter | Description | -| --- | --- | -| {% raw %}{{{% endraw %}returnID{% raw %}}}{% endraw %} | Unique identifier of the return. | - -### Request -Request sample: `GET http://glue.mysprykershop.com/returnable-items/DE--1-R3` - -### Response -
    -Sample response - -```json -{ - "data": { - "type": "returns", - "id": "DE--1-R3", - "attributes": { - "returnReference": "DE--1-R3", - "store": "DE", - "customerReference": "DE--1", - "returnTotals": { - "refundTotal": 0, - "remunerationTotal": 49798 - }, - "returnItems": [ - { - "uuid": "3071bef7-f26f-5be4-b9e7-bef1d670a94b", - "reason": "0", - "orderItem": { - "name": "Sony Xperia Z3 Compact", - "sku": "078_24602396", - "sumPrice": 25584, - "quantity": 1, - "unitGrossPrice": 25584, - "sumGrossPrice": 25584, - "taxRate": "19.00", - "unitNetPrice": 0, - "sumNetPrice": 0, - "unitPrice": 25584, - "unitTaxAmountFullAggregation": 3676, - "sumTaxAmountFullAggregation": 3676, - "refundableAmount": 23026, - "canceledAmount": 0, - "sumSubtotalAggregation": 25584, - "unitSubtotalAggregation": 25584, - "unitProductOptionPriceAggregation": 0, - "sumProductOptionPriceAggregation": 0, - "unitExpensePriceAggregation": 0, - "sumExpensePriceAggregation": null, - "unitDiscountAmountAggregation": 2558, - "sumDiscountAmountAggregation": 2558, - "unitDiscountAmountFullAggregation": 2558, - "sumDiscountAmountFullAggregation": 2558, - "unitPriceToPayAggregation": 23026, - "sumPriceToPayAggregation": 23026, - "taxRateAverageAggregation": "19.00", - "taxAmountAfterCancellation": null, - "orderReference": "DE--8", - "uuid": "b39c7e1c-12ba-53d3-8d81-5c363d5307e9", - "isReturnable": false, - "metadata": { - "superAttributes": [], - "image": "https://images.icecat.biz/img/norm/medium/24602396-8292.jpg" - }, - "calculatedDiscounts": [], - "productOptions": [] - } - }, - { - "uuid": "b3c46290-2eaa-5b37-bba2-60171638fabb", - "reason": "Custom reason", - "orderItem": { - "name": "Canon PowerShot N", - "sku": "035_17360369", - "sumPrice": 29747, - "quantity": 1, - "unitGrossPrice": 29747, - "sumGrossPrice": 29747, - "taxRate": "19.00", - "unitNetPrice": 0, - "sumNetPrice": 0, - "unitPrice": 29747, - "unitTaxAmountFullAggregation": 4275, - "sumTaxAmountFullAggregation": 4275, - "refundableAmount": 26772, - "canceledAmount": 0, - "sumSubtotalAggregation": 29747, - "unitSubtotalAggregation": 29747, - "unitProductOptionPriceAggregation": 0, - "sumProductOptionPriceAggregation": 0, - "unitExpensePriceAggregation": 0, - "sumExpensePriceAggregation": null, - "unitDiscountAmountAggregation": 2975, - "sumDiscountAmountAggregation": 2975, - "unitDiscountAmountFullAggregation": 2975, - "sumDiscountAmountFullAggregation": 2975, - "unitPriceToPayAggregation": 26772, - "sumPriceToPayAggregation": 26772, - "taxRateAverageAggregation": "19.00", - "taxAmountAfterCancellation": null, - "orderReference": "DE--9", - "uuid": "b189d4f2-da12-59f3-8e05-dfb4d95b1781", - "isReturnable": false, - "metadata": { - "superAttributes": [], - "image": "https://images.icecat.biz/img/gallery_mediums/17360369_3328.jpg" - }, - "calculatedDiscounts": [], - "productOptions": [] - } - } - ] - }, - "links": { - "self": "https://glue.mypsprykershop.com/DE--1-R3" - } - } -} -``` -
    - -| Attribute* | Type | Description | -| --- | --- | --- | -| returnReference | String | Unique identifier of the return in the system. You can get it when creating the return. | -| store | String | Store for which the return was created. | -| customerReference | String | Unique identifier of the customer in the system. | -| returnTotals | Object | List of totals to return. | -| refundTotal | Integer | Total sum of refunds. | -| remunerationTotal | Integer | Total sum of remuneration. | -| returnItems | Array | Set of return items. | -| uuid | String | Unique identifier of the returned item. | -| reason | String | Predefined reason why the return was created.| -| orderItem | Object | Information about the returned item. | -| name | String | Product name. | -| sku | String | SKU of the product. | -| sumPrice | Integer | Sum of the prices. | -| quantity | Integer | Number of the sales order items. | -| unitGrossPrice | Integer | Single item gross price. | -| sumGrossPrice | Integer | Sum of items gross price. | -| taxRate | Integer | Current tax rate in percentage. | -| unitNetPrice | Integer | Single item net price. | -| sumNetPrice | Integer | Sum of items' net price. | -| unitPrice | Integer | Single item price without assuming if it is new or gross, this value should be used everywhere the price is displayed, it allows switching tax mode without side effects. | -| unitTaxAmountFullAggregation | Integer | Total tax amount for a given item with additions. | -| sumTaxAmountFullAggregation | Integer | Total tax amount for a given sum of items with additions. | -| refundableAmount | Integer | Available refundable amount for an item. | -| canceledAmount | Integer | Total canceled amount for this item. | -| sumSubtotalAggregation | Integer | Sum of subtotals of the items. | -| unitSubtotalAggregation | Integer | Subtotal for the given item. | -| unitProductOptionPriceAggregation | Integer | Item total product option price. | -| sumProductOptionPriceAggregation | Integer | Item total of product options for the given sum of items. | -| unitExpensePriceAggregation | Integer | Item expense total for a given item. | -| sumExpensePriceAggregation | Integer | Sum of item expense totals for the items. | -| unitDiscountAmountAggregation | Integer | Item total discount amount. | -| sumDiscountAmountAggregation |Integer |Sum of item total discount amounts. | -| unitDiscountAmountFullAggregation | Integer | Item total discount amount. | -| sumDiscountAmountFullAggregation | Integer | Item total discount amount with additions. | -| unitPriceToPayAggregation | Integer | Item total price to pay after discounts with additions. | -| sumPriceToPayAggregation | Integer | Sum of item total price to pay after discounts with additions. | -| taxRateAverageAggregation | Integer | Item tax rate average, with additions used when recalculating tax amount after cancellation. | -| taxAmountAfterCancellation | Integer | Tax amount after cancellation, recalculated using tax average. | -| orderReference | String | Order reference number. | -| uuid | String | Unique identifier of the order. | -| isReturnable | Boolean | Specifies whether a sales order item is returnable or not. | -| calculatedDiscounts | Array | Specifies the list of calculated discounts. | -| productOptions | Array | Set of product options applied to the product. | -/* The fields mentioned are all attributes in the response. Type and ID are not mentioned. diff --git a/docs/scos/dev/glue-api-guides/202005.0/managing-shopping-lists/managing-shopping-lists.md b/docs/scos/dev/glue-api-guides/202005.0/managing-shopping-lists/managing-shopping-lists.md deleted file mode 100644 index 4b84e60d789..00000000000 --- a/docs/scos/dev/glue-api-guides/202005.0/managing-shopping-lists/managing-shopping-lists.md +++ /dev/null @@ -1,1131 +0,0 @@ ---- -title: Managing Shopping Lists -last_updated: Oct 30, 2020 -template: glue-api-storefront-guide-template -originalLink: https://documentation.spryker.com/v5/docs/managing-shopping-lists -originalArticleId: 46eec688-6802-433f-998d-c6187356f25b -redirect_from: - - /v5/docs/managing-shopping-lists - - /v5/docs/en/managing-shopping-lists -related: - - title: Glue API - Shopping Lists feature integration - link: docs/scos/dev/feature-integration-guides/page.version/glue-api/glue-api-shopping-lists-feature-integration.html ---- - -With the help of the [Shopping Lists](/docs/scos/user/features/{{page.version}}/shopping-lists-feature-overview/shopping-list.html) feature, company users can manage shopping lists for their company to plan purchasing activities beforehand. Unlike [Wishlists](/docs/scos/user/features/{{page.version}}/wishlist-feature-overview.html), Shopping Lists contain not only a list of items to be purchased but also the quantity of each item. - -The endpoints provided by the **Shopping List API** provide full *Shopping List management* functionality via REST requests. -{% info_block infoBox %} - - -Shopping lists are available in B2B scenarios only. This means that access to them is provided upon proper authentication as a **Company User**. For more details, see [Logging In as Company User](/docs/scos/dev/glue-api-guides/{{page.version}}/managing-b2b-account/authenticating-as-a-company-user.html). - -{% endinfo_block %} -In your development, the resources can help you to enable the shopping list functionality in your application. - -## Installation -For detailed information on the modules that provide the API functionality and related installation instructions, see [Glue API: Shopping Lists Feature Integration](/docs/scos/dev/feature-integration-guides/{{page.version}}/glue-api/glue-api-shopping-lists-feature-integration.html). - -## Creating a Shopping List -To create a shopping list for a registered user, send the request: - ---- -`POST` **/shopping-lists** - ---- -### Request -Request sample: -`POST https://glue.mysprykershop.com/shopping-lists` - -``` -{ - "data":{ - "type": "shopping-lists", - "attributes":{ - "name":"My Shopping List" - } - } -} -``` - -| Attribute | Type | Required | Description | -| --- | --- | --- | --- | -| name | string | yes | Sets a name for the new shopping list. | - -### Response -
    -Response sample - -``` -{ - "data": { - "type": "shopping-lists", - "id": "sdb17f85-953f-565a-a4ce-e5cb02405f83", - "attributes": { - "owner": "Anne Boleyn", - "name": "Laptops", - "numberOfItems": 0, - "updatedAt": "2020-02-07 09:26:01.623754", - "createdAt": "2020-02-07 09:26:01.623754" - }, - "links": { - "self": "https://glue.mysprykershop.com/shopping-lists/sdb17f85-953f-565a-a4ce-e5cb02405f83" - } - } -} -``` -
    -
    - - -| Attribute* | Type | Description | -| --- | --- | --- | -| owner | String | First and last names of the shopping list owner. | -| name | String |Shopping list name. | -| numberOfItems | Integer | Number of items on the shopping list. | -| updatedAt | String | Date when the shopping list was last updated. | -| createdAt | String | Date when the shopping list was created. | - -*Type and ID attributes are not mentioned. - -## Adding Items to a Shopping List -To add an item to a shopping list, send the request: - ---- -`POST` **/shopping-lists/{% raw %}{{{% endraw %}shopping_list_id{% raw %}}}{% endraw %}/shopping-list-items** - ---- - -### Request -Request sample: -`POST https://glue.mysprykershop.com/shopping-lists/ecdb5c3b-8bba-5a97-8e7b-c0a5a8f8a74a/shopping-list-items` - -`POST https://glue.mysprykershop.com/shopping-lists/ecdb5c3b-8bba-5a97-8e7b-c0a5a8f8a74a/shopping-list-items?include=concrete-products` - -``` -{ - "data": { - "type": "shopping-list-items", - "attributes": { - "quantity": 4, - "sku": "005_30663301" - } - } -} -``` - -| Attribute | Type | Required | Description | -| --- | --- | --- | --- | -| quantity | Ingeger | yes | Quantity of the product to add. | -| sku | String | yes | SKU of the product to add. Only [concrete products](/docs/scos/user/features/{{page.version}}/product-feature-overview/product-feature-overview.html) are allowed. | - -| String parameter | Description | Exemplary values | -| --- | --- | --- | -| include | Adds resource relationships to the request. | shopping-list-items, concrete-products| - -{% info_block infoBox %} - -The `concrete-products` resource can be included only together with the `shopping-list-items` resource. - -{% endinfo_block %} - -### Response -
    -Response sample - -``` - { - "data": { - "type": "shopping-list-items", - "id": "00fed212-3dc9-569f-885f-3ddca41dea08", - "attributes": { - "quantity": 4, - "sku": "005_30663301" - }, - "links": { - "self": "https://glue.mysprykershop.com/shopping-lists/ecdb5c3b-8bba-5a97-8e7b-c0a5a8f8a74a/shopping-list-items/00fed212-3dc9-569f-885f-3ddca41dea08" - } - } -} -``` -
    -
    - -
    -Response sample with shopping list items and information on concrete products - ``` - { - "data": { - "type": "shopping-list-items", - "id": "6283f155-6b8a-5d8c-96b7-3af4091eea3e", - "attributes": { - "quantity": 4, - "sku": "128_27314278" - }, - "links": { - "self": "http://glue.de.suite.local/shopping-lists/ecdb5c3b-8bba-5a97-8e7b-c0a5a8f8a74a/shopping-list-items/6283f155-6b8a-5d8c-96b7-3af4091eea3e" - }, - "relationships": { - "concrete-products": { - "data": [ - { - "type": "concrete-products", - "id": "128_27314278" - } - ] - } - } - }, - "included": [ - { - "type": "concrete-products", - "id": "128_27314278", - "attributes": { - "sku": "128_27314278", - "isDiscontinued": false, - "discontinuedNote": null, - "averageRating": null, - "reviewCount": 0, - "name": "Lenovo ThinkCentre E73", - "description": "Small Form Factor Small Form Factor desktops provide the ultimate performance with full-featured scalability, yet weigh as little as 13.2 lbs / 6 kgs. Keep your business-critical information safe through USB port disablement and the password-protected BIOS and HDD. You can also safeguard your hardware by physically securing your mouse and keyboard, while the Kensington slot enables you to lock down your E73. Lenovo Desktop Power Manager lets you balance power management and performance to save energy and lower costs. The E73 is also ENERGY STAR compliant, EPEAT® Gold and Cisco EnergyWise™ certified—so you can feel good about the planet and your bottom line. With SuperSpeed USB 3.0, transfer data up to 10 times faster than previous USB technologies. You can also connect to audio- and video-related devices with WiFi and Bluetooth® technology.", - "attributes": { - "processor_threads": "8", - "pci_express_slots_version": "3", - "internal_memory": "8 GB", - "stepping": "C0", - "brand": "Lenovo", - "processor_frequency": "3.6 GHz" - }, - "superAttributesDefinition": [ - "internal_memory", - "processor_frequency" - ], - "metaTitle": "Lenovo ThinkCentre E73", - "metaKeywords": "Lenovo,Tax Exempt", - "metaDescription": "Small Form Factor Small Form Factor desktops provide the ultimate performance with full-featured scalability, yet weigh as little as 13.2 lbs / 6 kgs. Keep", - "attributeNames": { - "processor_threads": "Processor Threads", - "pci_express_slots_version": "PCI Express slots version", - "internal_memory": "Max internal memory", - "stepping": "Stepping", - "brand": "Brand", - "processor_frequency": "Processor frequency" - } - }, - "links": { - "self": "http://glue.de.suite.local/concrete-products/128_27314278" - } - } - ] -} - ``` -
    -
    - -Find all the related attribute descriptions in [Accessing All Shopping Lists of a Company User](#accessing-all-shopping-lists-of-a-company-user). - -## Accessing All Shopping Lists of a Company User -To access all shopping lists of the currently logged in Company User, send the request: - ---- -`GET` **/shopping-lists** - ---- -{% info_block infoBox %} - -The endpoint returns not only the shopping lists created by users but also the lists shared with them. - -{% endinfo_block %} -### Request -Request sample: -`GET https://glue.mysprykershop.com/shopping-lists` - -`GET https://glue.mysprykershop.com/shopping-lists?include=shopping-list-items,concrete-products` - -| String parameter | Description | Exemplary values | -| --- | --- | --- | -| include | Adds resource relationships to the request. | shopping-list-items, concrete-products| - -{% info_block infoBox %} - -The `concrete-products` resource can be included only together with the `shopping-list-items` resource. - -{% endinfo_block %} - -### Response -
    -Response sample with no shopping lists - -``` - { - "data": [], - "links": { - "self": "https://glue.mysprykershop.com/shopping-lists" - } -} -``` -
    -
    - -
    -Response sample with own and shared shopping lists - -``` -{ - "data": [ - { - "type": "shopping-lists", - "id": "ecdb5c3b-8bba-5a97-8e7b-c0a5a8f8a74a", - "attributes": { - "owner": "Spencor Hopkin", - "name": "My Shopping List", - "numberOfItems": 19, - "updatedAt": "2020-02-07 07:59:09.621433", - "createdAt": "2020-02-07 07:59:09.621433" - }, - "links": { - "self": "https://glue.mysprykershop.com/shopping-lists/ecdb5c3b-8bba-5a97-8e7b-c0a5a8f8a74a" - } - }, - { - "type": "shopping-lists", - "id": "184ea79d-a2d3-549a-8ca2-4ea36879ceee", - "attributes": { - "owner": "Spencor Hopkin", - "name": "My Shopping List 2", - "numberOfItems": 0, - "updatedAt": "2020-02-07 08:01:11.539074", - "createdAt": "2020-02-07 08:01:11.539074" - }, - "links": { - "self": "https://glue.mysprykershop.com/shopping-lists/184ea79d-a2d3-549a-8ca2-4ea36879ceee" - } - }, - { - "type": "shopping-lists", - "id": "f5ce1365-1429-5d99-97a9-c1b19e4fede6", - "attributes": { - "owner": "Niels Barr", - "name": "Shared Shopping List", - "numberOfItems": 0, - "updatedAt": "2020-02-07 09:34:41.438426", - "createdAt": "2020-02-07 09:34:41.438426" - }, - "links": { - "self": "https://glue.mysprykershop.com/shopping-lists/f5ce1365-1429-5d99-97a9-c1b19e4fede6" - } - } - ], - "links": { - "self": "https://glue.mysprykershop.com/shopping-lists" - } -} -``` -
    -
    - -
    -Response sample with shopping list items and information on concrete products - -``` -{ - "data": { - "type": "shopping-lists", - "id": "ecdb5c3b-8bba-5a97-8e7b-c0a5a8f8a74a", - "attributes": {...}, - "links": {...}, - "relationships": { - "shopping-list-items": { - "data": [ - { - "type": "shopping-list-items", - "id": "c3e12dfb-05e5-51c3-ae8f-ba2f07b6bd17" - }, - { - "type": "shopping-list-items", - "id": "00fed212-3dc9-569f-885f-3ddca41dea08" - } - ] - } - } - }, - "included": [ - { - "type": "concrete-products", - "id": "136_24425591", - "attributes": { - "sku": "136_24425591", - "isDiscontinued": false, - "discontinuedNote": null, - "averageRating": null, - "reviewCount": 0, - "name": "Acer Chromebook C730-C8T7", - "description": "Amazing mobility Slip the Acer Chromebook into your bag and work from anywhere, without recharging, because it has enough battery life to last all day long on a single charge. Indulge your eyes and see everything in vivid detail on the Acer Chromebook's Full HD display. The Acer Chromebook features the latest 802.11ac wireless technology, for a smooth internet experience at connection speeds that are up to three times faster than that of previous-generation wireless technologies. The Acer Chromebook starts within 8 seconds, so you can wait less and do more. At less than an inch thin and extremely light, the Acer Chromebook is the perfect tool for on-the-go computing. Plus, it sports a fanless design for whisper-quiet computing.", - "attributes": { - "product_type": "Chromebook", - "form_factor": "clamshell", - "processor_threads": "2", - "processor_boost_frequency": "2.58 GHz", - "brand": "Acer", - "color": "Grey" - }, - "superAttributesDefinition": [ - "form_factor", - "color" - ], - "metaTitle": "Acer Chromebook C730-C8T7", - "metaKeywords": "Acer,Entertainment Electronics", - "metaDescription": "Amazing mobility Slip the Acer Chromebook into your bag and work from anywhere, without recharging, because it has enough battery life to last all day long", - "attributeNames": { - "product_type": "Product type", - "form_factor": "Form factor", - "processor_threads": "Processor Threads", - "processor_boost_frequency": "Processor boost frequency", - "brand": "Brand", - "color": "Color" - } - }, - "links": { - "self": "https://glue.mysprykershop.com/concrete-products/136_24425591" - } - }, - { - "type": "shopping-list-items", - "id": "c3e12dfb-05e5-51c3-ae8f-ba2f07b6bd17", - "attributes": {...}, - "links": {...}, - "relationships": { - "concrete-products": { - "data": [ - { - "type": "concrete-products", - "id": "136_24425591" - } - ] - } - } - }, - { - "type": "concrete-products", - "id": "005_30663301", - "attributes": { - "sku": "005_30663301", - "isDiscontinued": false, - "discontinuedNote": null, - "averageRating": null, - "reviewCount": 0, - "name": "Canon IXUS 175", - "description": "Creative play Play with your creativity using a range of Creative Filters. Re-create the distortion of a fish-eye lens, make scenes in stills or movies look like miniature scale models and much more. Capture the stunning detail in everyday subjects using 1 cm Macro to get right up close. Enjoy exceptional quality, detailed images thanks to 20.0 Megapixels and DIGIC 4+ processing. Face Detection technology makes capturing great shots of friends effortless, while Auto Zoom intelligently helps you select the best framing at the touch of a button.", - "attributes": { - "optical_zoom": "8 x", - "combined_zoom": "32 x", - "display": "LCD", - "hdmi": "no", - "brand": "Canon", - "color": "Blue" - }, - "superAttributesDefinition": [ - "color" - ], - "metaTitle": "Canon IXUS 175", - "metaKeywords": "Canon,Entertainment Electronics", - "metaDescription": "Creative play Play with your creativity using a range of Creative Filters. Re-create the distortion of a fish-eye lens, make scenes in stills or movies loo", - "attributeNames": { - "optical_zoom": "Optical zoom", - "combined_zoom": "Combined zoom", - "display": "Display", - "hdmi": "HDMI", - "brand": "Brand", - "color": "Color" - } - }, - "links": { - "self": "https://glue.mysprykershop.com/concrete-products/005_30663301" - } - }, - { - "type": "shopping-list-items", - "id": "00fed212-3dc9-569f-885f-3ddca41dea08", - "attributes": {...}, - "links": {....}, - "relationships": { - "concrete-products": { - "data": [ - { - "type": "concrete-products", - "id": "005_30663301" - } - ] - } - } - } - ] -} -``` -
    -
    - -| Attribute* | Type | Description | -| --- | --- | --- | -| owner | String | First and last names of the shopping list owner. | -| name | String | Shopping list name. | -| numberOfItems | Integer | Number of items on the shopping list. | -| updatedAt | String | Date when the shopping list was last updated. | -| createdAt | String | Date when the shopping list was last created. | -*Type and ID attributes are not mentioned. - -| Included resource | Attribute* | Type | Description | -| --- | --- | --- | --- | -| shopping-list-items | quantity | Integer | Quantity of the product. | -| shopping-list-items | sku | String | Product SKU. | -| concrete-products | sku | String | SKU of the concrete product. | -| concrete-products | isDiscontinued | Boolean | Specifies whether a product is discontinued:
    • **true** - the product is discontinued and requires a replacement item;
    • **false** - the product is not discontinued.
    | -| concrete-products | discontinuedNote | String | SContains an optional note that was specified when marking a product as discontinued. | -| concrete-products | averageRating | Integer | Average ratting of the concrete product. | -| concrete-products | reviewCount | Integer | Number of times a product was reviewed. | -| concrete-products | name | String | Name of the concrete product. | -| concrete-products | description | String | Description of the concrete product. | -| concrete-products | attributes | Object | List of attribute keys and their values for the product. | -| concrete-products | superAttributesDefinition | String | List of attributes that are flagged as super attributes. | -| concrete-products | metaTitle | String | SMeta title of the product. | -| concrete-products |metaKeywords | String | SMeta keywords of the product. | -| concrete-products | metaDescription | String | Meta description of the product. | -| concrete-products | attributeNames | String | List of attribute keys and their translations. | - - -## Accessing Specific Shopping Lists -To access information on a specific shopping list send the request: - ---- -`GET` **/shopping-lists/{% raw %}{{{% endraw %}shopping_list_id{% raw %}}}{% endraw %}** - ---- - -{% info_block infoBox %} - -The requested list must be either owned by or shared with the currently logged in user. - -{% endinfo_block %} - - -### Request -Request sample: -`GET https://glue.mysprykershop.com/shopping-lists/sdb17f85-953f-565a-a4ce-e5cb02405f83` - -`GET https://glue.mysprykershop.com/shopping-lists/ecdb5c3b-8bba-5a97-8e7b-c0a5a8f8a74a?include=shopping-list-items` - -`GET https://glue.mysprykershop.com/shopping-lists/ecdb5c3b-8bba-5a97-8e7b-c0a5a8f8a74a?include=shopping-list-items,concrete-products` - -| Path parameter | Description | -| --- | --- | -| shopping_list_id | ID of the shopping list you want to retrieve. | - -| String parameter | Description | Exemplary values | -| --- | --- | --- | -| include | Adds resource relationships to the request. | shopping-list-items, concrete-products| - -The `concrete-products` resource can be included only together with the `shopping-list-items` resource. - -### Response -
    -Response sample - -``` -{ - "data": { - "type": "shopping-lists", - "id": "ecdb5c3b-8bba-5a97-8e7b-c0a5a8f8a74a", - "attributes": { - "owner": "Spencor Hopkin", - "name": "My Shopping List", - "numberOfItems": 19, - "updatedAt": "2020-02-07 07:59:09.621433", - "createdAt": "2020-02-07 07:59:09.621433" - }, - "links": { - "self": "https://glue.mysprykershop.com/shopping-lists/ecdb5c3b-8bba-5a97-8e7b-c0a5a8f8a74a" - } - } -} -``` -
    -
    - - -
    -Response sample with shopping list items - -``` -{ - "data": { - "type": "shopping-lists", - "id": "ecdb5c3b-8bba-5a97-8e7b-c0a5a8f8a74a", - "attributes": {...}, - "links": {...}, - "relationships": { - "shopping-list-items": { - "data": [ - { - "type": "shopping-list-items", - "id": "c3e12dfb-05e5-51c3-ae8f-ba2f07b6bd17" - }, - { - "type": "shopping-list-items", - "id": "00fed212-3dc9-569f-885f-3ddca41dea08" - } - ] - } - } - }, - "included": [ - { - "type": "shopping-list-items", - "id": "c3e12dfb-05e5-51c3-ae8f-ba2f07b6bd17", - "attributes": { - "quantity": 15, - "sku": "136_24425591" - }, - "links": { - "self": "https://glue.mysprykershop.com/shopping-lists/ecdb5c3b-8bba-5a97-8e7b-c0a5a8f8a74a/shopping-list-items/c3e12dfb-05e5-51c3-ae8f-ba2f07b6bd17" - } - }, - { - "type": "shopping-list-items", - "id": "00fed212-3dc9-569f-885f-3ddca41dea08", - "attributes": { - "quantity": 4, - "sku": "005_30663301" - }, - "links": { - "self": "https://glue.mysprykershop.com/shopping-lists/ecdb5c3b-8bba-5a97-8e7b-c0a5a8f8a74a/shopping-list-items/00fed212-3dc9-569f-885f-3ddca41dea08" - } - } - ] -} -``` -
    -
    - -
    -Response sample with shopping list items and information on concrete products - -``` -{ - "data": { - "type": "shopping-lists", - "id": "ecdb5c3b-8bba-5a97-8e7b-c0a5a8f8a74a", - "attributes": {...}, - "links": {...}, - "relationships": { - "shopping-list-items": { - "data": [ - { - "type": "shopping-list-items", - "id": "c3e12dfb-05e5-51c3-ae8f-ba2f07b6bd17" - }, - { - "type": "shopping-list-items", - "id": "00fed212-3dc9-569f-885f-3ddca41dea08" - } - ] - } - } - }, - "included": [ - { - "type": "concrete-products", - "id": "136_24425591", - "attributes": { - "sku": "136_24425591", - "isDiscontinued": false, - "discontinuedNote": null, - "averageRating": null, - "reviewCount": 0, - "name": "Acer Chromebook C730-C8T7", - "description": "Amazing mobility Slip the Acer Chromebook into your bag and work from anywhere, without recharging, because it has enough battery life to last all day long on a single charge. Indulge your eyes and see everything in vivid detail on the Acer Chromebook's Full HD display. The Acer Chromebook features the latest 802.11ac wireless technology, for a smooth internet experience at connection speeds that are up to three times faster than that of previous-generation wireless technologies. The Acer Chromebook starts within 8 seconds, so you can wait less and do more. At less than an inch thin and extremely light, the Acer Chromebook is the perfect tool for on-the-go computing. Plus, it sports a fanless design for whisper-quiet computing.", - "attributes": { - "product_type": "Chromebook", - "form_factor": "clamshell", - "processor_threads": "2", - "processor_boost_frequency": "2.58 GHz", - "brand": "Acer", - "color": "Grey" - }, - "superAttributesDefinition": [ - "form_factor", - "color" - ], - "metaTitle": "Acer Chromebook C730-C8T7", - "metaKeywords": "Acer,Entertainment Electronics", - "metaDescription": "Amazing mobility Slip the Acer Chromebook into your bag and work from anywhere, without recharging, because it has enough battery life to last all day long", - "attributeNames": { - "product_type": "Product type", - "form_factor": "Form factor", - "processor_threads": "Processor Threads", - "processor_boost_frequency": "Processor boost frequency", - "brand": "Brand", - "color": "Color" - } - }, - "links": { - "self": "https://glue.mysprykershop.com/concrete-products/136_24425591" - } - }, - { - "type": "shopping-list-items", - "id": "c3e12dfb-05e5-51c3-ae8f-ba2f07b6bd17", - "attributes": {...}, - "links": {...}, - "relationships": { - "concrete-products": { - "data": [ - { - "type": "concrete-products", - "id": "136_24425591" - } - ] - } - } - }, - { - "type": "concrete-products", - "id": "005_30663301", - "attributes": { - "sku": "005_30663301", - "isDiscontinued": false, - "discontinuedNote": null, - "averageRating": null, - "reviewCount": 0, - "name": "Canon IXUS 175", - "description": "Creative play Play with your creativity using a range of Creative Filters. Re-create the distortion of a fish-eye lens, make scenes in stills or movies look like miniature scale models and much more. Capture the stunning detail in everyday subjects using 1 cm Macro to get right up close. Enjoy exceptional quality, detailed images thanks to 20.0 Megapixels and DIGIC 4+ processing. Face Detection technology makes capturing great shots of friends effortless, while Auto Zoom intelligently helps you select the best framing at the touch of a button.", - "attributes": { - "optical_zoom": "8 x", - "combined_zoom": "32 x", - "display": "LCD", - "hdmi": "no", - "brand": "Canon", - "color": "Blue" - }, - "superAttributesDefinition": [ - "color" - ], - "metaTitle": "Canon IXUS 175", - "metaKeywords": "Canon,Entertainment Electronics", - "metaDescription": "Creative play Play with your creativity using a range of Creative Filters. Re-create the distortion of a fish-eye lens, make scenes in stills or movies loo", - "attributeNames": { - "optical_zoom": "Optical zoom", - "combined_zoom": "Combined zoom", - "display": "Display", - "hdmi": "HDMI", - "brand": "Brand", - "color": "Color" - } - }, - "links": { - "self": "https://glue.mysprykershop.com/concrete-products/005_30663301" - } - }, - { - "type": "shopping-list-items", - "id": "00fed212-3dc9-569f-885f-3ddca41dea08", - "attributes": {...}, - "links": {....}, - "relationships": { - "concrete-products": { - "data": [ - { - "type": "concrete-products", - "id": "005_30663301" - } - ] - } - } - } - ] -} -``` -
    -
    - - -Find all the related attribute descriptions in [Accessing All Shopping Lists of a Company User](#accessing-all-shopping-lists-of-a-company-user). - - -## Modifying Shopping Lists -To modify a shopping list, send the request: - ---- -`PATCH` **/shopping-lists/{% raw %}{{{% endraw %}shopping_list_id{% raw %}}}{% endraw %}** - ---- - -### Request -Request samples: -`PATCH https://glue.mysprykershop.com/shopping-lists/ecdb5c3b-8bba-5a97-8e7b-c0a5a8f8a74a` - -`PATCH https://glue.mysprykershop.com/shopping-lists/ecdb5c3b-8bba-5a97-8e7b-c0a5a8f8a74a?include=shopping-list-items,concrete-products` - -| Path parameter | Description | -| --- | --- | -| shopping_list_id | ID of the shopping list you want to retrieve. | - -| String parameter | Description | Exemplary values | -| --- | --- | --- | -| include | Adds resource relationships to the request. | shopping-list-items, concrete-products| - -{% info_block infoBox %} - -The `concrete-products` resource can be included only together with the `shopping-list-items` resource. - -{% endinfo_block %} - -``` -{ - "data":{ - "type":"shopping-lists", - "attributes":{ - "name":"New Name" - } - } -} -``` - -| Attribute | Type | Required | Description| -| --- | --- | --- |--- | -| name | String | yes |New name of the shopping list. | - -### Response -
    -Response sample - -``` -{ - "data": { - "type": "shopping-lists", - "id": "ecdb5c3b-8bba-5a97-8e7b-c0a5a8f8a74a", - "attributes": { - "owner": "Spencor Hopkin", - "name": "New Name", - "numberOfItems": 19, - "updatedAt": "2020-02-08 14:17:38.288982", - "createdAt": "2020-02-07 07:59:09.621433" - }, - "links": { - "self": "https://glue.mysprykershop.com/shopping-lists/ecdb5c3b-8bba-5a97-8e7b-c0a5a8f8a74a" - } - } -} -``` -
    -
    - -
    -Response sample with shopping list items and information on concrete products - -``` -"data": { - "type": "shopping-lists", - "id": "ecdb5c3b-8bba-5a97-8e7b-c0a5a8f8a74a", - "attributes": {...}, - "links": {...}, - "relationships": {...}, - "included": [ - { - "type": "concrete-products", - "id": "090_24495844", - "attributes": { - "sku": "090_24495844", - "isDiscontinued": false, - "discontinuedNote": null, - "averageRating": null, - "reviewCount": 0, - "name": "Sony SmartWatch 3", - "description": "The way you like it Whatever your lifestyle SmartWatch 3 SWR50 can be made to suit it. You can choose from a range of wrist straps – formal, sophisticated, casual, vibrant colours and fitness style, all made from the finest materials. Designed to perform and impress, this smartphone watch delivers a groundbreaking combination of technology and style. Downloadable apps let you customise your SmartWatch 3 SWR50 and how you use it. Tell SmartWatch 3 SWR50 smartphone watch what you want and it will do it. Search. Command. Find.", - "attributes": { - "internal_ram": "512 MB", - "flash_memory": "4 GB", - "weight": "45 g", - "protection_feature": "Water resistent", - "brand": "Sony", - "color": "Silver" - }, - "superAttributesDefinition": [ - "flash_memory", - "color" - ], - "metaTitle": "Sony SmartWatch 3", - "metaKeywords": "Sony,Smart Electronics", - "metaDescription": "The way you like it Whatever your lifestyle SmartWatch 3 SWR50 can be made to suit it. You can choose from a range of wrist straps – formal, sophisticated,", - "attributeNames": { - "internal_ram": "Internal RAM", - "flash_memory": "Flash memory", - "weight": "Weight", - "protection_feature": "Protection feature", - "brand": "Brand", - "color": "Color" - } - }, - "links": { - "self": "https://glue.mysprykershop.com/concrete-products/090_24495844" - } - }, - { - "type": "shopping-list-items", - "id": "c3e12dfb-05e5-51c3-ae8f-ba2f07b6bd17", - "attributes": { - "quantity": 1, - "sku": "090_24495844" - }, - "links": { - "self": "https://glue.mysprykershop.com/shopping-lists/ecdb5c3b-8bba-5a97-8e7b-c0a5a8f8a74a/shopping-list-items/c3e12dfb-05e5-51c3-ae8f-ba2f07b6bd17" - }, - "relationships": { - "concrete-products": { - "data": [ - { - "type": "concrete-products", - "id": "090_24495844" - } - ] - } - } - }, - { - "type": "concrete-products", - "id": "128_27314278", - "attributes": { - "sku": "128_27314278", - "isDiscontinued": false, - "discontinuedNote": null, - "averageRating": null, - "reviewCount": 0, - "name": "Lenovo ThinkCentre E73", - "description": "Small Form Factor Small Form Factor desktops provide the ultimate performance with full-featured scalability, yet weigh as little as 13.2 lbs / 6 kgs. Keep your business-critical information safe through USB port disablement and the password-protected BIOS and HDD. You can also safeguard your hardware by physically securing your mouse and keyboard, while the Kensington slot enables you to lock down your E73. Lenovo Desktop Power Manager lets you balance power management and performance to save energy and lower costs. The E73 is also ENERGY STAR compliant, EPEAT® Gold and Cisco EnergyWise™ certified—so you can feel good about the planet and your bottom line. With SuperSpeed USB 3.0, transfer data up to 10 times faster than previous USB technologies. You can also connect to audio- and video-related devices with WiFi and Bluetooth® technology.", - "attributes": { - "processor_threads": "8", - "pci_express_slots_version": "3", - "internal_memory": "8 GB", - "stepping": "C0", - "brand": "Lenovo", - "processor_frequency": "3.6 GHz" - }, - "superAttributesDefinition": [ - "internal_memory", - "processor_frequency" - ], - "metaTitle": "Lenovo ThinkCentre E73", - "metaKeywords": "Lenovo,Tax Exempt", - "metaDescription": "Small Form Factor Small Form Factor desktops provide the ultimate performance with full-featured scalability, yet weigh as little as 13.2 lbs / 6 kgs. Keep", - "attributeNames": { - "processor_threads": "Processor Threads", - "pci_express_slots_version": "PCI Express slots version", - "internal_memory": "Max internal memory", - "stepping": "Stepping", - "brand": "Brand", - "processor_frequency": "Processor frequency" - } - }, - "links": { - "self": "https://glue.mysprykershop.com/concrete-products/128_27314278" - } - }, - { - "type": "shopping-list-items", - "id": "00fed212-3dc9-569f-885f-3ddca41dea08", - "attributes": { - "quantity": 1, - "sku": "128_27314278" - }, - "links": { - "self": "https://glue.mysprykershop.com/shopping-lists/ecdb5c3b-8bba-5a97-8e7b-c0a5a8f8a74a/shopping-list-items/00fed212-3dc9-569f-885f-3ddca41dea08" - }, - "relationships": { - "concrete-products": { - "data": [ - { - "type": "concrete-products", - "id": "128_27314278" - } - ] - } - } - } - ] -} -``` -
    -
    - -Find all the related attribute descriptions in [Accessing All Shopping Lists of a Company User](#accessing-all-shopping-lists-of-a-company-user). - - -## Updating Quantity of Items in a Shopping List -To update the quantity of products in a shopping list item, send the request: - ---- -`PATCH` **/shopping-lists/{% raw %}{{{% endraw %}shopping_list_id{% raw %}}}{% endraw %}/shopping-list-items/{% raw %}{{{% endraw %}shopping_list_item_id{% raw %}}}{% endraw %}** - ---- - -### Request -Request samples: -`PATCH https://glue.mysprykershop.com/shopping-lists/ecdb5c3b-8bba-5a97-8e7b-c0a5a8f8a74a/shopping-list-items/00fed212-3dc9-569f-885f-3ddca41dea08` - -`PATCH https://glue.mysprykershop.com/shopping-lists/ecdb5c3b-8bba-5a97-8e7b-c0a5a8f8a74a/shopping-list-items/00fed212-3dc9-569f-885f-3ddca41dea08?include=concrete-products` - -| Path parameter | Description | -| --- | --- |--- | -| shopping_list_id | ID of the shopping list for which you want to change the item quantity. | -| shopping_list_item_id | ID of the shopping list item for which you want to change quantity. | - -| String parameter | Description | Exemplary values | -| --- | --- | --- | -| include | Adds resource relationships to the request. | shopping-list-items, concrete-products| - -{% info_block infoBox %} - -The `concrete-products` resource can be included only together with the `shopping-list-items` resource. - -{% endinfo_block %} - -``` -{ - "data": { - "type": "shopping-list-items", - "attributes": { - "quantity": 12, - "sku": "005_30663301" - } - } -} -``` -| Attribute | Type | Required | Description| -| --- | --- | --- |--- | -| sku | String | yes |SKU of the product the quantity of which you want to change. Only [concrete products](/docs/scos/user/features/{{page.version}}/product-feature-overview/product-feature-overview.html) are allowed. | -| quantity | Integer | yes |New quantity of the product. | - -### Response -
    -Response sample - ``` - { - "data": { - "type": "shopping-list-items", - "id": "00fed212-3dc9-569f-885f-3ddca41dea08", - "attributes": { - "quantity": 12, - "sku": "005_30663301" - }, - "links": { - "self": "https://glue.mysprykershop.com/shopping-lists/ecdb5c3b-8bba-5a97-8e7b-c0a5a8f8a74a/shopping-list-items/00fed212-3dc9-569f-885f-3ddca41dea08" - } - } -} - ``` -
    -
    - -
    -Response sample with shopping list items and information on concrete products - ``` - { - "data": { - "type": "shopping-list-items", - "id": "6283f155-6b8a-5d8c-96b7-3af4091eea3e", - "attributes": {...}, - "links": {... }, - "relationships": { - "concrete-products": { - "data": [ - { - "type": "concrete-products", - "id": "128_27314278" - } - ] - } - } - }, - "included": [ - { - "type": "concrete-products", - "id": "128_27314278", - "attributes": { - "sku": "128_27314278", - "isDiscontinued": false, - "discontinuedNote": null, - "averageRating": null, - "reviewCount": 0, - "name": "Lenovo ThinkCentre E73", - "description": "Small Form Factor Small Form Factor desktops provide the ultimate performance with full-featured scalability, yet weigh as little as 13.2 lbs / 6 kgs. Keep your business-critical information safe through USB port disablement and the password-protected BIOS and HDD. You can also safeguard your hardware by physically securing your mouse and keyboard, while the Kensington slot enables you to lock down your E73. Lenovo Desktop Power Manager lets you balance power management and performance to save energy and lower costs. The E73 is also ENERGY STAR compliant, EPEAT® Gold and Cisco EnergyWise™ certified—so you can feel good about the planet and your bottom line. With SuperSpeed USB 3.0, transfer data up to 10 times faster than previous USB technologies. You can also connect to audio- and video-related devices with WiFi and Bluetooth® technology.", - "attributes": { - "processor_threads": "8", - "pci_express_slots_version": "3", - "internal_memory": "8 GB", - "stepping": "C0", - "brand": "Lenovo", - "processor_frequency": "3.6 GHz" - }, - "superAttributesDefinition": [ - "internal_memory", - "processor_frequency" - ], - "metaTitle": "Lenovo ThinkCentre E73", - "metaKeywords": "Lenovo,Tax Exempt", - "metaDescription": "Small Form Factor Small Form Factor desktops provide the ultimate performance with full-featured scalability, yet weigh as little as 13.2 lbs / 6 kgs. Keep", - "attributeNames": { - "processor_threads": "Processor Threads", - "pci_express_slots_version": "PCI Express slots version", - "internal_memory": "Max internal memory", - "stepping": "Stepping", - "brand": "Brand", - "processor_frequency": "Processor frequency" - } - }, - "links": { - "self": "https://glue.mysprykershop.com/concrete-products/128_27314278" - } - } - ] -} - ``` -
    -
    - -## Deleting Items from a Shopping List -To delete an item from a shopping list, send the request: - ---- -`DELETE` **/shopping-lists/{% raw %}{{{% endraw %}shopping_list_id{% raw %}}}{% endraw %}/shopping-list-items/{% raw %}{{{% endraw %}shopping_list_item_id{% raw %}}}{% endraw %}** - ---- -### Request -Request sample: -`DELETE https://glue.mysprykershop.com/shopping-lists/ecdb5c3b-8bba-5a97-8e7b-c0a5a8f8a74a/shopping-list-items/00fed212-3dc9-569f-885f-3ddca41dea08` - -### Response -If the item was removed successfully, the endpoint responds with a **204 No Content** status code. - -## Deleting Shopping Lists - To delete a shopping list, send the request: - ---- -`DELETE` **shopping-lists/{% raw %}{{{% endraw %}shopping_list_id{% raw %}}}{% endraw %}** - ---- - -### Request -Request sample: -`DELETE https://glue.mysprykershop.com/shopping-lists/sdb17f85-953f-565a-a4ce-e5cb02405f83` - -### Response -If the shopping list was deleted successfully, the endpoint responds with a **204 No Content** status code. - -## Possible Errors - -| Status code | Reason | -| --- | --- | -| 400 | The provided access token is not an [access token of a Company User](/docs/scos/dev/glue-api-guides/{{page.version}}/managing-b2b-account/authenticating-as-a-company-user.html).
    **OR**
    The shopping list ID is not specified. | -| 401 | The access token is incorrect. | -| 403 | The access token is missing. | -| 422 | Could not create/update a shopping list.
    **OR**
    Could not add/update an item. | -| 404 | The specified shopping list or shopping list item could not be found. | diff --git a/docs/scos/dev/glue-api-guides/202005.0/managing-wishlists/managing-wishlists.md b/docs/scos/dev/glue-api-guides/202005.0/managing-wishlists/managing-wishlists.md deleted file mode 100644 index a42905634da..00000000000 --- a/docs/scos/dev/glue-api-guides/202005.0/managing-wishlists/managing-wishlists.md +++ /dev/null @@ -1,329 +0,0 @@ ---- -title: Managing Wishlists -description: Using the PATCH, GET, DELETE, and POST request sent to the endpoints provided in the Wishlists API, you can create, access, modify, delete, and to get wishlists. -last_updated: Apr 3, 2020 -template: glue-api-storefront-guide-template -originalLink: https://documentation.spryker.com/v5/docs/managing-wishlists -originalArticleId: 854de46f-eaf2-4621-aa94-34fe4a9378f8 -redirect_from: - - /v5/docs/managing-wishlists - - /v5/docs/en/managing-wishlists ---- - -The Wishlists API provides REST access to managing [wishlists]() of a customer. With the help of the endpoints provided by the API, you can create, list and delete wishlists, as well as manage the items inside them. - -In your development, these resources can help you to enable complete wishlist functionality for your customers. - -{% info_block warningBox "Authentication " %} - -Since wishlists are available for registered users only, the endpoints provided by the API cannot be accessed anonymously. For this reason, you always need to pass a user's authentication token in your REST requests. For details on how to authenticate a user and retrieve the token, see [Authentication and Authorization](). - -{% endinfo_block %} - -## Installation -For detailed information on the modules that provide the API functionality and related installation instructions, see [Wishlist API Feature Integration](). - -## Creating a Wishlist -To create a wishlist for a registered user, you need to send a POST request to the following endpoint: - -`/wishlists` - -Request sample: `POST http://mysprykershop.com/wishlists` -**Attributes:** -* **name** - sets a name for the new wishlist. - -**Request sample body** - -```js -{ - "data":{ - "type": "wishlists", - "attributes":{ - "name":"{% raw %}{{{% endraw %}my_name{% raw %}}}{% endraw %}" - } - } - } -``` - -**Sample Response:** - -| Field* | Type | Description | -| --- | --- | --- | -| name | String | Name of the wishlist | -| numberOfItems | Integer | Number of items in the wishlist | -| createdAt | String | Creation date of the wishlist | -| updatedAt | String | Date of the last update | - -\*The fields mentioned are all attributes in the response. Type and ID are not mentioned. - -**Sample response** - -```js -{ - "data": { - "type": "wishlists", - "id": "09264b7f-1894-58ed-81f4-d52d683e910a", - "attributes": { - "name": "Name of the wishlist", - "numberOfItems": 0, - "createdAt": "2018-08-17 10:04:35.311557", - "updatedAt": "2018-08-17 10:04:35.311557" - }, - "links": { - "self": "http://mysprykershop.com/wishlists/09264b7f-1894-58ed-81f4-d52d683e910a" - } - } - } -``` - -The response contains a unique identifier, contained in the id attribute, and a self link that can be used to access the wishlist later. - -### Possible errors -| Code | Reason | -| --- | --- | -| 202 | A wishlist with the same name already exists. | -| 203 | Cannot create a wishlist. | - -## Accessing Wishlists of User -To access all wishlists of a user, send a GET request to the following endpoint: - -`/wishlists` - -Request sample: `GET http://mysprykershop.com/wishlists` - -**Sample Response:** -| Field* | Type | Description | -| --- | --- | --- | -| name | String | Name of the wishlist. | -| numberOfItems | Integer | Number of items in the wishlist. | -| createdAt | String | Date of the creation of the wishlist. | -| updatedAt | String | Date of the last update. | - -\*The fields mentioned are all attributes in the response. Type and ID are not mentioned. - -The endpoint will respond with a **RestWishlistsResponse**. The following response is returned when a user doesn't have any wishlists: - -**Sample response** - -```js -{ - "data": [], - "links": { - "self": "http://mysprykershop.com/wishlists" - } - } -``` - -If there are any wishlists already created for a user, they will be returned in the **data** attribute of the response. - -**Sample response** - -```js -{ - "data": { - - - { - "data": [ - { - "type": "wishlists", - "id": "1623f465-e4f6-5e45-8dc5-987b923f8af4", - "attributes": { - "name": "My Wishlist Name", - "numberOfItems": 0, - "createdAt": "2018-12-16 17:24:12.601033", - "updatedAt": "2018-12-16 17:24:12.601033" - }, - "links": { - "self": "http://mysprykershop.com/wishlists/1623f465-e4f6-5e45-8dc5-987b923f8af4" - } - } - ], - "links": { - "self": "http://mysprykershop.com/wishlists" - } - } -``` - -## Modifying Wishlists -To modify a user's wishlist, send a PATCH request to the following endpoint: - -`/wishlists` - -Request sample: `PATCH http://mysprykershop.com/wishlists` - -**Sample Request Body** -The following sample changes the name of a wishlist. - -**Sample response** - -```js -{ - "data": { - "type": "wishlists", - "id": "uuid", - "attributes": { - "name": "New Name" - } - } - } -``` - -**Sample Response:** -| Field* | Type | Description | -| --- | --- | --- | -| name | String | Name of the wishlist | -| numberOfItems | Integer | Number of items in the wishlist | -| createdAt | String | Creation date of the wishlist | -| updatedAt | String | Date of the last update | - -\*The fields mentioned are all attributes in the response. Type and ID are not mentioned. - -In case of a successful update, the endpoint will also respond with a `RestWishlistsResponse`, where the wishlist name will be updated. - -**Sample response** - -### Possible errors - -| Code | Reason | -| --- | --- | -| 201 | Cannot find the wishlist. | -| 202 | A wishlist with the same name already exists. | -| 204 | Cannot update the wishlist. | - -## Deleting Wishlists -To delete a wishlist, send a DELETE request: - -`/wishlists/{% raw %}{{{% endraw %}wishlist_id{% raw %}}}{% endraw %}` - -Request sample: `DELETE http://mysprykershop.com/wishlists/09264b7f-1894-58ed-81f4-d52d683e910a` - -where `09264b7f-1894-58ed-81f4-d52d683e910a` is the ID of the wishlist you want to remove. - -**Response:** -If the wishlist was deleted successfully, the endpoint would respond with a **204 No Content status** code. - -### Possible errors -| Code | Reason | -| --- | --- | -| 201 | Cannot find the wishlist. | -| 205 | Cannot remove the wishlist. | - -## Getting Wishlists -The Wishlist API allows you not only to manage wishlists, but also to manage items inside them. Each wishlist item is referenced by the SKU of the respective product. - -To get all items in a wishlist, send a request to the following endpoint: - -`/wishlists/{% raw %}{{{% endraw %}wishlist_id{% raw %}}}{% endraw %}` - -Request sample: `GET http://mysprykershop.com/wishlists/09264b7f-1894-58ed-81f4-d52d683e910a` - -where `09264b7f-1894-58ed-81f4-d52d683e910a` is the ID of the wishlist you want to retrieve. - -**Sample Response:** -| Field* | Type | Description | -| --- | --- | --- | -| name | String | Name of the wishlist | -| numberOfItems | Integer | Number of items in the wishlist | -| createdAt | String | Сreation date of the wishlist | -| updatedAt | String | Date of the last update | - -\*The fields mentioned are all attributes in the response. Type and ID are not mentioned. - -If the specified wishlist exists, the endpoint will respond with a `RestWishlistsResponse` that contains all information on the wishlist, including information on all products that have been put there. - -**Sample response** - -```js -{ - "data": { - "type": "wishlists", - "id": "63bf7566-4596-50ce-84c4-cc7260a23c16", - "attributes": { - "name": "mylist1", - "numberOfItems": 1, - "createdAt": "2018-08-22 12:31:37.924541", - "updatedAt": "2018-08-22 12:31:37.924541" - }, - "links": { - "self": "http://mysprykershop.com/wishlists/63bf7566-4596-50ce-84c4-cc7260a23c16" - } - } - } -``` - -### Possible errors -| Code | Reason | -| --- | --- | -| 201 | Cannot find the wishlist. | - -To add an item to a wishlist, send a POST request to the following endpoint: -`/wishlists/{% raw %}{{{% endraw %}wishlist_id{% raw %}}}{% endraw %}/wishlist-items` -Request sample: `POST http://mysprykershop.com/wishlists/09264b7f-1894-58ed-81f4-d52d683e910a/wishlist-items` -where `09264b7f-1894-58ed-81f4-d52d683e910a` is the ID of the wishlist to which you want to add an item. - -**Attributes:** -* **sku** - specifies the SKU of the product you want to add to the wishlist. - -**Request sample body** - -```js -{ - "data": { - "type": "wishlist-items", - "attributes": { - "sku": "064_18404924" - } - } - } -``` - -**Sample Response:** -| Field* | Type | Description | -| --- | --- | --- | -| sku | String | Concrete product SKU. | - -\*The fields mentioned are all attributes in the response. Type and ID are not mentioned. - -The endpoint will respond with a **RestWishlistItemResponse** that contains information on the new wishlist item. - -**Sample response** - -```js -{ - "data": { - "type": "wishlist-items", - "id": "064_18404924", - "attributes": { - "sku": "064_18404924" - }, - "links": { - "self": "http://mysprykershop.com/wishlists/c917e65b-e8c3-5c8b-bec6-892529c64b30/wishlist-items/064_18404924" - } - } - } -``` - -### Possible errors -| Code | Reason | -| --- | --- | -| 201 | Cannot find the wishlist. | -| 206 | Cannot add an item to the wishlist. | - -To delete an item, send a DELETE request: -`/wishlists/{% raw %}{{{% endraw %}wishlist_id{% raw %}}}{% endraw %}/wishlist-items/{% raw %}{{{% endraw %}item_sku{% raw %}}}{% endraw %}` - -Request sample: `DELETE http://mysprykershop.com/wishlists/09264b7f-1894-58ed-81f4-d52d683e910a/wishlist-items/064_18404924` - -where: `09264b7f-1894-58ed-81f4-d52d683e910a` - the ID of the wishlist where you want to delete an item; -`064_18404924` - SKU of the item you want to remove. - -**Response:** -If the item was removed successfully, the endpoint will respond with a 204 No Content status code. - -### Possible errors: -| Code | Reason | -| --- | --- | -| 201 | Cannot find the wishlist. | -| 207 | Cannot remove the item. | -| 208 | An item with the provided SKU does not exist in the wishlist. | diff --git a/docs/scos/dev/glue-api-guides/202005.0/resolving-search-engine-friendly-urls.md b/docs/scos/dev/glue-api-guides/202005.0/resolving-search-engine-friendly-urls.md deleted file mode 100644 index 779aa25e074..00000000000 --- a/docs/scos/dev/glue-api-guides/202005.0/resolving-search-engine-friendly-urls.md +++ /dev/null @@ -1,219 +0,0 @@ ---- -title: Resolving Search Engine Friendly URLs -last_updated: Sep 15, 2020 -template: glue-api-storefront-guide-template -originalLink: https://documentation.spryker.com/v5/docs/using-search-engine-friendly-urls -originalArticleId: fde85b1f-cc09-46d7-a990-3e52367db1f2 -redirect_from: - - /v5/docs/using-search-engine-friendly-urls - - /v5/docs/en/using-search-engine-friendly-urls - - /docs/scos/dev/glue-api-guides/202005.0/using-search-engine-friendly-urls.html -related: - - title: Glue API - Spryker Core feature integration - link: docs/scos/dev/feature-integration-guides/page.version/glue-api/glue-api-spryker-core-feature-integration.html ---- - -For SEO purposes, Spryker automatically generates Search Engine Friendly (SEF) URLs for products and categories. Such URLs are included in the URL attribute of responses of all endpoints related to abstract products and product categories, for example: - -**/abstract-products endpoint response** - -```json -{ - "data": { - "type": "abstract-products", - "id": "035", - "attributes": { - "sku": "035", - "name": "Canon PowerShot N", - "description": "...", - "attributes": {...}, - "superAttributesDefinition": [...], - "superAttributes": [], - "attributeMap": {...}, - "metaTitle": "Canon PowerShot N", - "metaKeywords": "Canon,Entertainment Electronics", - "metaDescription": "...", - "attributeNames": {...}, - "url": "/en/canon-powershot-n-35" - }, - "links": {...} - } -} -``` - -**/category-trees endpoint response** - -```json -{ - "data": [ - { - "type": "category-trees", - "id": null, - "attributes": { - "categoryNodesStorage": [ - { - "nodeId": 5, - "order": 100, - "name": "Computer", - "children": [...], - "url": "/en/computer" - }, - { - "nodeId": 2, - "order": 90, - "name": "Cameras & Camcorders", - "children": [...], - "url": "/en/cameras-&-camcorders" - }, - { - "nodeId": 16, - "order": 80, - "name": "Food", - "children": [], - "url": "/en/food" - }, - { - "nodeId": 15, - "order": 80, - "name": "Cables", - "children": [], - "url": "/en/cables" - }, - { - "nodeId": 11, - "order": 80, - "name": "Telecom & Navigation", - "children": [...], - "url": "/en/telecom-&-navigation" - }, - { - "nodeId": 9, - "order": 70, - "name": "Smart Wearables", - "children": [...], - "url": "/en/smart-wearables" - } - ] - }, - "links": {...} - } - ], - "links": {...} -} -``` - -**/category-nodes endpoint response** - -```json -{ - "data": { - "type": "category-nodes", - "id": "9", - "attributes": { - "nodeId": 9, - "name": "Smart Wearables", - "metaTitle": "Smart Wearables", - "metaKeywords": "Smart Wearables", - "metaDescription": "Smart Wearables", - "isActive": true, - "children": [...], - "parents": [...], - "order": 70, - "url": "/en/smart-wearables" - }, - "links": {..} - } -} -``` - -SEF URLs can significantly boost the SEO presence of your product store and increase its search engine ranking. - -To facilitate their usage, Spryker Glue provides an endpoint that allows resolving a SEO-friendly URL, for example, `http://mysprykershop.com/en/canon-powershot-n-35`, into a URL of the relevant product resource in Glue API, for example, `http://glue.mysprykershop.com/abstract-products/035`. This capability is provided by the **URLs API**. - -## Installation -To enable the API functionality, you need to install version **201911** of Spryker Glue API. For detailed information and installation instructions, see [GLUE: Spryker Core Feature Integration](/docs/scos/dev/feature-integration-guides/{{page.version}}/glue-api/glue-api-spryker-core-feature-integration.html). - -## Usage -To resolve a SEO-friendly link into a Glue URL, send a GET request to the following endpoint: - -**/url-resolver** - -### Request -Request sample: *GET http://glue.mysprykershop.com/url-resolver?url=**/de/acer-aspire-s7-134*** - -where **/de/acer-aspire-s7-134** is the SEF URL you want to resolve, without the server name and scheme. - -{% info_block errorBox %} -Resolving of complete URLs, e.g. *http://mysprykershop.com/en/canon-powershot-n-35*, is not supported -{% endinfo_block %} - -{% info_block warningBox "Note" %} -You can use the **Accept-Language** header to specify the locale.
    Sample header: `[{"key":"Accept-Language","value":"de, en;q=0.9"}`]
    where **de**, **en** are the locales; **q=0.9** is the user's preference for a specific locale. For details, see [14.4 Accept-Language](https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.4). -{% endinfo_block %} - -### Response -If the request was successful, the endpoint responds with the type and unique identifier of the Glue resource that represents the requested product or category. Using the information provided, you can construct the URL to request the relevant resource in Glue API. - -**Response Attributes** - -| Field* | Type | Description | -| --- | --- | --- | -| **entityType** | String | Specifies the resource type, for example, **abstract-products** or **category-nodes**. | -| **entityId** | String | Specifies the resource identifier. | - -*The fields mentioned are all attributes in the response. Type and ID are not mentioned. - -**Sample Response - Products** -```json -{ - "data": [ - { - "type": "url-resolver", - "id": null, - "attributes": { - "entityType": "abstract-products", - "entityId": "134" - }, - "links": { - "self": "http://glue.mysprykershop.com/url-resolver?url=/de/acer-aspire-s7-134" - } - } - ], - "links": { - "self": "http://glue.mysprykershop.com/url-resolver?url=/de/acer-aspire-s7-134" - } -} -``` - -**Sample Response - Category Nodes** -```json -{ - "data": [ - { - "type": "url-resolver", - "id": null, - "attributes": { - "entityType": "category-nodes", - "entityId": "5" - }, - "links": { - "self": "http://glue.mysprykershop.com/url-resolver?url=/en/computer" - } - } - ], - "links": { - "self": "http://glue.mysprykershop.com/url-resolver?url=/en/computer" - } -} -``` - -**Glue Resource Link** - -Using the information of the above sample response and the Glue server name, you can construct the Glue resource URL, for example: *http://glue.mysprykershop.com/abstract-products/134*. - -### Possible Errors - -| Status | Reason | -| --- | --- | -| 404 | The provided URL does not exist. | -| 422 | The url parameter is missing. | diff --git a/docs/scos/dev/glue-api-guides/202005.0/rest-api-reference.md b/docs/scos/dev/glue-api-guides/202005.0/rest-api-reference.md deleted file mode 100644 index 568591af964..00000000000 --- a/docs/scos/dev/glue-api-guides/202005.0/rest-api-reference.md +++ /dev/null @@ -1,34 +0,0 @@ ---- -title: REST API Reference -description: This page provides an exhaustive reference for the REST API endpoints present in Spryker by default with the corresponding parameters and data formats. -last_updated: Jun 10, 2020 -template: glue-api-storefront-guide-template -originalLink: https://documentation.spryker.com/v5/docs/rest-api-reference -originalArticleId: 59a0fb96-4694-4cb4-885e-a18b0fdab225 -redirect_from: - - /v5/docs/rest-api-reference - - /v5/docs/en/rest-api-reference ---- - -This document provides an overview of REST API endpoints provided by Spryker by default. For each endpoint, you will find its URL relative to the server, REST request parameters, as well as the appropriate request and response data formats. - -
    - -{% raw %} - - - - -{% endraw %} diff --git a/docs/scos/dev/glue-api-guides/202005.0/retrieving-autocomplete-and-search-suggestions.md b/docs/scos/dev/glue-api-guides/202005.0/retrieving-autocomplete-and-search-suggestions.md deleted file mode 100644 index e4c38ea16c1..00000000000 --- a/docs/scos/dev/glue-api-guides/202005.0/retrieving-autocomplete-and-search-suggestions.md +++ /dev/null @@ -1,272 +0,0 @@ ---- -title: Getting Suggestions for Auto-Completion and Search -description: This article provides information on which endpoints to use to get search and auto-completion suggestions for your products, categories, and CMS fields. -last_updated: Sep 14, 2020 -template: glue-api-storefront-guide-template -originalLink: https://documentation.spryker.com/v5/docs/retrieving-suggestions-for-auto-completion-and-search -originalArticleId: 5a31882d-7e51-446d-ad7a-8b3826bb0437 -redirect_from: - - /v5/docs/retrieving-suggestions-for-auto-completion-and-search - - /v5/docs/en/retrieving-suggestions-for-auto-completion-and-search - - /docs/scos/dev/glue-api-guides/202005.0/getting-suggestions-for-auto-completion-and-search.html -related: - - title: Catalog Search - link: docs/scos/dev/glue-api-guides/page.version/searching-the-product-catalog.html - - title: Browsing a Category Tree - link: docs/scos/dev/glue-api-guides/page.version/retrieving-categories/retrieving-category-trees.html - - title: Retrieving Product Information - link: docs/scos/dev/glue-api-guides/page.version/managing-products/retrieving-product-information.html - - title: Using Search Engine Friendly URLs - link: docs/scos/dev/glue-api-guides/page.version/using-search-engine-friendly-urls.html ---- - -In addition to [catalog search](/docs/scos/dev/glue-api-guides/{{page.version}}/searching-the-product-catalog.html), Spryker search engine also provides auto-completion terms and suggestions for products, categories, and CMS pages. The feature allows developers to predict search strings and provide customers with available options. - -In your development, this resource can help you to enhance the customer experience by providing the relevant information for search, product filters, shopping cart, checkout, order history, wishlist, and many more. - -## Installation - -For detailed information on the modules that provide the API functionality and related installation instructions, see [GLUE: Catalog Feature Integration](/docs/scos/dev/feature-integration-guides/{{page.version}}/glue-api/glue-api-catalog-feature-integration.html). - -## Usage - -### Request - -To get a search suggestion, you need to send a _GET_ request to the following endpoint: -`/catalog-search-suggestions` - -Request sample: `GET http://glue.mysprykershop.com/catalog-search-suggestions?q=comp` - -To include search queries in your request, use the **q** URL parameter. Below you can find the most common queries to use: - -| Request | Description | -| --- | --- | -| /catalog-search-suggestions?q= | Suggestions with an empty search string | -| /catalog-search-suggestions?q=**c** | Suggestions for **1** letter | -| /catalog-search-suggestions?q=**co** | Suggestions for **2** letters | -| /catalog-search-suggestions?q=**com** | Suggestions for **3** letters | -| /catalog-search-suggestions?q=**computer** | Suggestions for the word **computer** | -| /catalog-search-suggestions?q=**telecom+%26+navigation** | Suggestions for the phrase "**telecom&navigation**" | - -### Response - -If the catalog contains any suggestions for the query string, the endpoint will respond with the relevant suggestions. The attributes of the endpoint are split into **4** main sections that provide different types of suggestions. - -**Response Attributes** - -| Field\* | Type | Description | -| --- | --- | --- | -| **completion** | Array | Provides a list of **autocompletion suggestions** for the query string.
    Each item in the array is a _String_. | -| **categories** | Array | Contains an array of **categories** matching the search query.
    Each item in the array is an _Object_ representing a single category. | -| **cmsPages** | Array | Contains an array of **CMS pages** matching the search query.
    Each item in the array is an _Object_ representing a single page. | -| **abstractProducts** | Array | Contains an array of **abstract products** matching the search query.
    Each item in the array is an _Object_ representing a product. | - -\* The fields mentioned are all attributes in the response. Type and ID are not mentioned. - -**Category Attributes** - -Each category exposes the following attributes: - -| Field | Type | Description | -| --- | --- | --- | -| **name** | String | Specifies the category name. | -| **url** | String | Specifies the category URL. | - -**CMS Page Attributes** - -Each CMS page exposes the following attributes: - -| Field | Type | Description | -| --- | --- | --- | -| **name** | String | Specifies the page title. | -| **url** | String | Specifies the page URL. | - -**Abstract Product Attributes** - -The following attributes are provided for each product in the response: - -| Field | Type | Description | -| --- | --- | --- | -| **abstractName** | String | Specifies the name of the product. | -| **abstractSku** | String | Specifies the SKU of the product. | -| **url** | String | Specifies the product details page. | -| **price** | Integer | Specifies the product price. | -| **images** | Object | Provides URLs of the product images.
    The object consists of **2** items:
    • **externalUrlSmall** - specifies the URL of the product preview image;
    • **externalUrlLarge** - specifies the URL of the large product image.
    | - -The `url` attribute of categories and abstract products exposes a Search Engine Friendly (SEF) URL of the resource that represents the respective category or product. For information on how to resolve such a URL and retrieve the corresponding resource, see [Using Search Engine Friendly URLs](/docs/scos/dev/glue-api-guides/{{page.version}}/resolving-search-engine-friendly-urls.html). - -{% info_block warningBox %} - -Although CMS pages also expose the `url` parameter, resolving of CMS page SEF URLs is not supported at the moment. - -{% endinfo_block %} - -
    - Response Sample - -```json -{ - "data": [ - { - "type": "catalog-search-suggestions", - "id": null, - "attributes": { - "completion": [ - "sony xperia z3 compact", - "computer" - ], - "categories": [ - { - "name": "Computer", - "url": "/en/computer" - } - ], - "cmsPages": [ - { - "name": "GTC", - "url": "/en/gtc" - }, - { - "name": "Imprint", - "url": "/en/imprint" - }, - { - "name": "Data Privacy", - "url": "/en/privacy" - } - ], - "abstractProducts": [ - { - "price": 25584, - "abstractName": "Sony Xperia Z3 Compact", - "abstractSku": "078", - "url": "/en/sony-xperia-z3-compact-78", - "images": [ - { - "externalUrlSmall": "https://images.icecat.biz/img/norm/medium/24602396-8292.jpg", - "externalUrlLarge": "https://images.icecat.biz/img/norm/high/24602396-8292.jpg" - } - ] - }, - { - "price": 35711, - "abstractName": "Sony Xperia Z3 Compact", - "abstractSku": "076", - "url": "/en/sony-xperia-z3-compact-76", - "images": [ - { - "externalUrlSmall": "https://images.icecat.biz/img/norm/medium/24394207-3552.jpg", - "externalUrlLarge": "https://images.icecat.biz/img/norm/high/24394207-3552.jpg" - } - ] - }, - { - "price": 14554, - "abstractName": "Sony Xperia Z3 Compact", - "abstractSku": "077", - "url": "/en/sony-xperia-z3-compact-77", - "images": [ - { - "externalUrlSmall": "https://images.icecat.biz/img/norm/medium/24584210-216.jpg", - "externalUrlLarge": "https://images.icecat.biz/img/norm/high/24584210-216.jpg" - } - ] - }, - { - "price": 15999, - "abstractName": "HP Z 440", - "abstractSku": "126", - "url": "/en/hp-z-440-126", - "images": [ - { - "externalUrlSmall": "https://images.icecat.biz/img/gallery_mediums/32770169_3402944008.jpg", - "externalUrlLarge": "https://images.icecat.biz/img/gallery_mediums/32770169_3402944008.jpg" - } - ] - }, - { - "price": 9080, - "abstractName": "HP Z 620", - "abstractSku": "127", - "url": "/en/hp-z-620-127", - "images": [ - { - "externalUrlSmall": "https://images.icecat.biz/img/gallery_mediums/img_22828284_medium_1483352627_419_25017.jpg", - "externalUrlLarge": "https://images.icecat.biz/img/norm/high/22828284-8540.jpg" - } - ] - }, - { - "price": 10680, - "abstractName": "HP 200 280 G1", - "abstractSku": "121", - "url": "/en/hp-200-280-g1-121", - "images": [ - { - "externalUrlSmall": "https://images.icecat.biz/img/gallery_mediums/img_29406823_medium_1480596185_822_26035.jpg", - "externalUrlLarge": "https://images.icecat.biz/img/gallery_raw/29406823_8847.png" - } - ] - }, - { - "price": 9999, - "abstractName": "Fujitsu CELSIUS M740", - "abstractSku": "116", - "url": "/en/fujitsu-celsius-m740-116", - "images": [ - { - "externalUrlSmall": "https://images.icecat.biz/img/gallery_mediums/img_29743424_medium_1484036296_797_10191.jpg", - "externalUrlLarge": "https://images.icecat.biz/img/norm/high/29743424-7678.jpg" - } - ] - }, - { - "price": 5448, - "abstractName": "Samsung Galaxy S4 Mini", - "abstractSku": "064", - "url": "/en/samsung-galaxy-s4-mini-64", - "images": [ - { - "externalUrlSmall": "https://images.icecat.biz/img/norm/medium/23294027-3072.jpg", - "externalUrlLarge": "https://images.icecat.biz/img/norm/high/23294027-3072.jpg" - } - ] - }, - { - "price": 19700, - "abstractName": "Samsung Galaxy S4 Mini", - "abstractSku": "063", - "url": "/en/samsung-galaxy-s4-mini-63", - "images": [ - { - "externalUrlSmall": "https://images.icecat.biz/img/gallery_mediums/29231675_7943.jpg", - "externalUrlLarge": "https://images.icecat.biz/img/gallery/29231675_7943.jpg" - } - ] - }, - { - "price": 19137, - "abstractName": "Acer Chromebook CB5-311", - "abstractSku": "135", - "url": "/en/acer-chromebook-cb5-311-135", - "images": [ - { - "externalUrlSmall": "https://images.icecat.biz/img/gallery_mediums/img_29836399_medium_1480606969_3257_31346.jpg", - "externalUrlLarge": "https://images.icecat.biz/img/gallery/29836399_4420.jpg" - } - ] - } - ] - }, - "links": { - "self": "http://glue.mysprykershop.com/catalog-search-suggestions?q=comp" - } - } - ], - "links": { - "self": "http://glue.mysprykershop.com/catalog-search-suggestions?q=comp" - } -} -``` - -
    diff --git a/docs/scos/dev/glue-api-guides/202005.0/retrieving-categories/retrieving-category-trees.md b/docs/scos/dev/glue-api-guides/202005.0/retrieving-categories/retrieving-category-trees.md deleted file mode 100644 index da1fd2ae17f..00000000000 --- a/docs/scos/dev/glue-api-guides/202005.0/retrieving-categories/retrieving-category-trees.md +++ /dev/null @@ -1,543 +0,0 @@ ---- -title: Browsing a Category Tree -description: The article helps you get the full category tree, including information on a category node, as well as retrieve categories by product easily and quickly. -last_updated: Sep 14, 2020 -template: glue-api-storefront-guide-template -originalLink: https://documentation.spryker.com/v5/docs/retrieving-category-trees -originalArticleId: 37f403f2-ba5b-44f2-b51c-61e9c8cff7b4 -redirect_from: - - /v5/docs/retrieving-category-trees - - /v5/docs/en/retrieving-category-trees ---- - -By means of the category API, you are able to retrieve the exact structure of your category tree with its hierarchical characteristics. The category nodes, which describe the tree structure, as well as the categories themselves can be retrieved. - -In your development, these resources can help you to: - -* Retrieve a category tree for your catalog -* Retrieve сategory specific information -* Find out which categories a product belongs to - -## Installation -For detailed information on the modules that provide the API functionality and related installation instructions, see [Category API Feature Integration](/docs/scos/dev/feature-integration-guides/{{page.version}}/glue-api/glue-api-category-management-feature-integration.html). - -## Get Full Category Tree -To retrieve the full category tree, containing all available nodes and their children, send the request: - ---- -`GET` **/category-trees** - ---- - -### Request - -Request sample: `GET http://mysprykershop.com/category-trees` - -Use the `Accept-Language` header to specify one or more locales. -Sample header: `[{"key":"Accept-Language","value":"de, en;q=0.9"}]` -| Header key | Header value | Description | -| --- | --- | --- | -| Accept-Language | de, en;q=0.9 | locales and probability | - -### Reponse -
    -Response sample - -```json -{ - "data": [ - { - "type": "category-trees", - "id": null, - "attributes": { - "categoryNodesStorage": [ - { - "nodeId": 5, - "order": 100, - "name": "Computer", - "url": "/en/computer", - "children": [ - { - "nodeId": 6, - "order": 100, - "name": "Notebooks", - "url": "/en/computer/notebooks", - "children": [] - }, - { - "nodeId": 7, - "order": 90, - "name": "Pc's/Workstations", - "url": "/en/computer/pc's/workstations", - "children": [] - }, - { - "nodeId": 8, - "order": 80, - "name": "Tablets", - "url": "/en/computer/tablets", - "children": [] - } - ] - }, - { - "nodeId": 2, - "order": 90, - "name": "Cameras & Camcorders", - "url": "/en/cameras-&-camcorders", - "children": [ - { - "nodeId": 4, - "order": 100, - "name": "Digital Cameras", - "url": "/en/cameras-&-camcorders/digital-cameras", - "children": [] - }, - { - "nodeId": 3, - "order": 90, - "name": "Camcorders", - "url": "/en/cameras-&-camcorders/camcorders", - "children": [] - } - ] - }, - { - "nodeId": 15, - "order": 80, - "name": "Cables", - "url": "/en/cables", - "children": [] - }, - { - "nodeId": 11, - "order": 80, - "name": "Telecom & Navigation", - "url": "/en/telecom-&-navigation", - "children": [ - { - "nodeId": 12, - "order": 80, - "name": "Smartphones", - "url": "/en/telecom-&-navigation/smartphones", - "children": [] - } - ] - }, - { - "nodeId": 9, - "order": 70, - "name": "Smart Wearables", - "url": "/en/smart-wearables", - "children": [ - { - "nodeId": 10, - "order": 70, - "name": "Smartwatches", - "url": "/en/smart-wearables/smartwatches", - "children": [] - } - ] - }, - { - "nodeId": 16, - "order": 50, - "name": "Fish", - "url": "/en/fish", - "children": [ - { - "nodeId": 18, - "order": 50, - "name": "Vegetables", - "url": "/en/fish/vegetables", - "children": [] - } - ] - } - ] - }, - "links": { - "self": "http://mysprykershop.com/category-trees" - } - } - ], - "links": { - "self": "http://mysprykershop.com/category-trees" - } -} -``` -
    -
    - -| Field* | Type | Description | -| --- | --- | --- | -| nodeId | String | Category node ID | -| order | Integer | Digits between 1 and 100, with 100 ranking the highest (on one level under the parent node) | -| name | String | Name of category associated with the node | - -\*The fields mentioned are all attributes in the response. Type and ID are not mentioned - - -## Get Categories by Product -To get all categories a product belongs to, you can send the request: - ---- -`GET` **/abstract-products/_{% raw %}{{{% endraw %}sku{% raw %}}}{% endraw %}_?include=category-nodes** - ---- -|Path parameter| Description | -|---|---| -| sku | SKU of a product to retrieve categories for. | -See [Retrieving Product Information](/docs/scos/dev/glue-api-guides/{{page.version}}/managing-products/retrieving-product-information.html) to learn more about the `/abstract-products` resource. - -### Request -Request sample : `GET http://mysprykershop.com/abstract-products/058?include=category-nodes` - -### Response -
    -Response sample - -```js -{ - "data": { - "type": "abstract-products", - "id": "137", - "attributes": { - "sku": "137", - "name": "Acer TravelMate P246-M", - "description": "Work with style and simplicity The TravelMate P2 Series comes in 13.3\", 14\", 15.6\" and 17.3\" sizes to meet various business needs. Clad in a refined textile finish that both looks and feels great, these notebooks pack the latest Intel® Core™ processors1 and discrete graphics1 to keep you at your productive best. They are also loaded with tailor-made management and security software for easy, centralised control. The P2 series now comes with a fine linen textile pattern embossed on the outer covers. This lends a professional refined look and feel to the line that adds distinction to functionality. There are also practical benefits, as the pattern makes it a bit easier to keep a firm grip on the go, while also resisting scratches. The TravelMate P2 Series is certified to deliver the high audio and visual standards of Skype for Business1. Optimised hardware ensures that every word will be heard clearly with no gap or lag in speech, minimal background noise and zero echo. That means you can call or video chat with superior audio and visual quality.", - "attributes": { - "processor_cores": "2", - "thermal_design_power": "15 W", - "processor_codename": "Broadwell", - "brand": "Acer", - "color": "Black" - }, - "superAttributesDefinition": [ - "color" - ], - "superAttributes": [], - "attributeMap": { - "attribute_variants": { - "total_storage_capacity:128 GB": { - "id_product_concrete": "137_29283480" - }, - "total_storage_capacity:500 GB": { - "id_product_concrete": "137_29283479" - } - }, - "super_attributes": { - "total_storage_capacity": [ - "128 GB", - "500 GB" - ] - }, - "product_concrete_ids": [ - "137_29283479", - "137_29283480" - ] - }, - "metaTitle": "Acer TravelMate P246-M", - "metaKeywords": "Acer,Entertainment Electronics", - "metaDescription": "Work with style and simplicity The TravelMate P2 Series comes in 13.3\", 14\", 15.6\" and 17.3\" sizes to meet various business needs. Clad in a refined textil", - "attributeNames": { - "processor_cores": "Processor cores", - "thermal_design_power": "Thermal Design Power (TDP)", - "processor_codename": "Processor codename", - "brand": "Brand", - "color": "Color" - } - }, - "links": { - "self": "http://mysprykershop.com/abstract-products/137" - }, - "relationships": { - "concrete-products": { - "data": [ - { - "type": "concrete-products", - "id": "137_29283479" - }, - { - "type": "concrete-products", - "id": "137_29283480" - } - ] - }, - "category-nodes": { - "data": [ - { - "type": "category-nodes", - "id": "14" - }, - { - "type": "category-nodes", - "id": "5" - }, - { - "type": "category-nodes", - "id": "6" - } - ] - } - } - }, - "included": [ - { - "type": "category-nodes", - "id": "14", - "attributes": { - "nodeId": 14, - "name": "Variant Showcase", - "metaTitle": "Variant Showcase", - "metaKeywords": "Variant Showcase", - "metaDescription": "These are products that have more than 1 variant.", - "isActive": true, - "children": {}, - "parents": [ - { - "nodeId": 1, - "name": "Demoshop", - "metaTitle": "Demoshop", - "metaKeywords": "English version of Demoshop", - "metaDescription": "English version of Demoshop", - "isActive": true, - "children": {}, - "parents": {}, - "order": null - } - ], - "order": 50 - }, - "links": { - "self": "http://mysprykershop.com/category-nodes/14" - } - }, - { - "type": "category-nodes", - "id": "5", - "attributes": { - "nodeId": 5, - "name": "Computer", - "metaTitle": "Computer", - "metaKeywords": "Computer", - "metaDescription": "Computer", - "isActive": true, - "children": [ - { - "nodeId": 6, - "name": "Notebooks", - "metaTitle": "Notebooks", - "metaKeywords": "Notebooks", - "metaDescription": "Notebooks", - "isActive": true, - "children": {}, - "parents": {}, - "order": 100 - }, - { - "nodeId": 7, - "name": "Pc's/Workstations", - "metaTitle": "Pc's/Workstations", - "metaKeywords": "Pc's/Workstations", - "metaDescription": "Pc's/Workstations", - "isActive": true, - "children": {}, - "parents": {}, - "order": 90 - }, - { - "nodeId": 8, - "name": "Tablets", - "metaTitle": "Tablets", - "metaKeywords": "Tablets", - "metaDescription": "Tablets", - "isActive": true, - "children": {}, - "parents": {}, - "order": 80 - } - ], - "parents": [ - { - "nodeId": 1, - "name": "Demoshop", - "metaTitle": "Demoshop", - "metaKeywords": "English version of Demoshop", - "metaDescription": "English version of Demoshop", - "isActive": true, - "children": {}, - "parents": {}, - "order": null - } - ], - "order": 100 - }, - "links": { - "self": "http://mysprykershop.com/category-nodes/5" - } - }, - { - "type": "category-nodes", - "id": "6", - "attributes": { - "nodeId": 6, - "name": "Notebooks", - "metaTitle": "Notebooks", - "metaKeywords": "Notebooks", - "metaDescription": "Notebooks", - "isActive": true, - "children": {}, - "parents": [ - { - "nodeId": 5, - "name": "Computer", - "metaTitle": "Computer", - "metaKeywords": "Computer", - "metaDescription": "Computer", - "isActive": true, - "children": {}, - "parents": [ - { - "nodeId": 1, - "name": "Demoshop", - "metaTitle": "Demoshop", - "metaKeywords": "English version of Demoshop", - "metaDescription": "English version of Demoshop", - "isActive": true, - "children": {}, - "parents": {}, - "order": null - } - ], - "order": 100 - } - ], - "order": 100 - }, - "links": { - "self": "http://mysprykershop.com/category-nodes/6" - } - } - ] - } -``` -
    -
    - -## Get a Category Node -Retrieve full information on a category node that a tree node represents. - -To retrieve a specific node by ID, send the request: - ---- -`GET` **/category-nodes/_{% raw %}{{{% endraw %}node_id{% raw %}}}{% endraw %}_** - ---- - -|Path parameter| Description | -|---|---| -| node_id | * ID of a node to get information for. | -*To identify the node ID of a category, [get full category tree](/docs/scos/dev/glue-api-guides/{{page.version}}//retrieving-categories/retrieving-category-trees.html#get-full-category-tree). The ID is located in the `nodeId` field. - -### Request -Request sample : `GET http://mysprykershop.com/category-nodes/5` - -### Response - -
    -Response sample - -```js -{ - "data": { - "type": "category-nodes", - "id": "5", - "attributes": { - "nodeId": 5, - "name": "Computer", - "metaTitle": "Computer", - "metaKeywords": "Computer", - "metaDescription": "Computer", - "isActive": true, - "order": 100, - "url": "/en/computer", - "children": [ - { - "nodeId": 6, - "name": "Notebooks", - "metaTitle": "Notebooks", - "metaKeywords": "Notebooks", - "metaDescription": "Notebooks", - "isActive": true, - "order": 100, - "url": "/en/computer/notebooks", - "children": [], - "parents": [] - }, - { - "nodeId": 7, - "name": "Pc's/Workstations", - "metaTitle": "Pc's/Workstations", - "metaKeywords": "Pc's/Workstations", - "metaDescription": "Pc's/Workstations", - "isActive": true, - "order": 90, - "url": "/en/computer/pc's/workstations", - "children": [], - "parents": [] - }, - { - "nodeId": 8, - "name": "Tablets", - "metaTitle": "Tablets", - "metaKeywords": "Tablets", - "metaDescription": "Tablets", - "isActive": true, - "order": 80, - "url": "/en/computer/tablets", - "children": [], - "parents": [] - } - ], - "parents": [ - { - "nodeId": 1, - "name": "Demoshop", - "metaTitle": "Demoshop", - "metaKeywords": "English version of Demoshop", - "metaDescription": "English version of Demoshop", - "isActive": true, - "order": null, - "url": "/en", - "children": [], - "parents": [] - } - ] - }, - "links": { - "self": "http://mysprykershop.com/category-nodes/5" - } - } -} -``` -
    - -| Field* | Type | Description | -| --- | --- | --- | -| nodeId | String | Category node ID. | -| name | String | Name of category associated with the node. | -| metaTitle | String | Meta title of the category. | -| metaKeywords | String | Meta keywords of the category. | -| metaDescription | String | Meta description of the category. | -| isActive | Boolean | Boolean to see, if the category is active. | -| order | Integer | Digits between 1 and 100, with 100 ranking the highest (on one level under the parent node). | - -\*The fields mentioned are all attributes in the response. Type and ID are not mentioned. - - -## Possible errors -| Code | Description | -| --- | --- | -| 701 | Node ID not specified or invalid. | -| 703 | A node with the specified ID was not found. | diff --git a/docs/scos/dev/glue-api-guides/202005.0/retrieving-content-items/retrieving-abstract-product-list-content-items.md b/docs/scos/dev/glue-api-guides/202005.0/retrieving-content-items/retrieving-abstract-product-list-content-items.md deleted file mode 100644 index 11c3e0e4cb8..00000000000 --- a/docs/scos/dev/glue-api-guides/202005.0/retrieving-content-items/retrieving-abstract-product-list-content-items.md +++ /dev/null @@ -1,1284 +0,0 @@ ---- -title: Getting Abstract Product List Content Item Data -description: Abstract Product List API provides resources to retrieve data on abstract products included in the Abstract Product List content item for all or specific locale -last_updated: Sep 15, 2020 -template: glue-api-storefront-guide-template -originalLink: https://documentation.spryker.com/v5/docs/getting-abstract-product-list-content-item-data-201907 -originalArticleId: a6e9bd31-eedd-4e71-abbf-5e96ffc2256f -redirect_from: - - /v5/docs/getting-abstract-product-list-content-item-data-201907 - - /v5/docs/en/getting-abstract-product-list-content-item-data-201907 -related: - - title: REST API Reference - link: docs/scos/dev/glue-api-guides/page.version/rest-api-reference.html - - title: Content Items Feature Overview - link: docs/scos/user/features/page.version/content-items-feature-overview.html ---- - -The **Abstract Product List API** implements resources allowing you to retrieve information on each abstract product included in the Abstract Product List content item available in the storage. The list consists of abstract products that come with concrete products (variants) and may have characteristic attributes, such as memory, brand or color, that help your customers distinguish your products and choose the one matching their needs. - -In particular, you can: - -* get a list of abstract products -* retrieve basic data on the abstract products related to the list -* get only specific details for abstract products -* view details of the abstract product and its variants -* check what image sets, product labels, and prices abstract products have -* retrieve information on categories abstract products are assigned to - -In your development, these resources can help you get relevant information for your product list and the product detail pages for all or a specific locale. - -{% info_block infoBox %} -See [Content Items](/docs/scos/user/features/{{page.version}}/content-items.html -{% endinfo_block %} to learn how to create and manage content items in the Back Office.) - -## Installation -For details on the modules that provide the API functionality and how to install them, see [Content Items API](/docs/scos/dev/feature-integration-guides/{{page.version}}/glue-api/glue-api-content-items-feature-integration.html). - -## Retrieving Abstract Product List Content Item Data -To retrieve the full information on the abstract product list by the content item key, send a GET request to the following endpoint: - -_/content-product-abstract-lists/{content_item_key}/content-product-abstract_ - -Request sample: _GET http://mysprykershop.com/content-product-abstract-lists/apl-1/content-product-abstract_ - -where **content-product-abstract-lists** is the Abstract Product List content item type, **apl-1** is its key, and **content-product-abstract** is the abstract product list type. - -{% info_block infoBox %} -The locale must be specified in the **header** of the GET request. If no locale is specified, data from the **default** locale will be returned. -{% endinfo_block %} - -If the request is successful and the Abstract Product List content item with the specified content item key has been found, the endpoint will respond with a **RestAbstractProductsResponse**. - -| Field* | Type | Description | -| --- | --- | --- | -|attributes | string |List of the abstract product's attributes and their values. | -| sku |string | SKU of the abstract product. | -| name | string | Name of the abstract product. | -| description | string | Description of the abstract product. | -| attributes | string{} | List of all available attributes for the product. | -|superAttributesDefinition | string[] | Attributes used to distinguish between different variants of the abstract product.| -| superAttributes | string[] | List of super attributes and their values for the product variants. | -| attributeMap | object | Combination of super attribute/value the product has and the corresponding concrete product IDs. | -| attributeMap.attribute_variants | object | List of super attributes with the list of values. | -| attributeMap.super_attributes | object | Applicable super attribute and its values for the product variant. | -| attributeMap.product_concrete_ids | string[] | IDs of the product variant. | -| metaTitle | string | Meta title of the abstract product. | -| metaKeywords | string | Meta keywords of the abstract product. | -| metaDescription|string | Meta description of the abstract product. | -| attributeNames | object | All attributes (except for the super attributes) and value combinations for the abstract product. | - -*The fields mentioned are all attributes in the response. Type and ID are not mentioned. - -
    -Sample response: - -```php -{ - "data": [ - { - "type": "abstract-products", - "id": "204", - "attributes": { - "sku": "204", - "name": "Sony PXW-FS5K", - "description": "Take control and shoot your way Real cinematic images and sound: Explore a new dimension in creative artistry. Capture beautifully detailed, cinematic video images plus high-quality audio in cinematic 24 frames per second. Add some power to your shots: Add an E-mount lens with a power zoom and smoothly focus in on your subject with up to 11x magnification. Capture it all in HD: Capture all the detail with Full HD 1920 x 1080 video shooting (AVCHD format) at 24mbs for increased detail and clarity. DSLR quality photos: Shoot stills with DSLR-like picture quality and shallow depth of field for professional looking shots.", - "attributes": { - "iso_sensitivity": "3200", - "sensor_type": "CMOS", - "white_balance": "Auto", - "wi_fi": "yes", - "brand": "Sony", - "color": "Black" - }, - "superAttributesDefinition": [ - "color" - ], - "superAttributes": [], - "attributeMap": { - "attribute_variants": [], - "super_attributes": [], - "product_concrete_ids": [ - "204_29851280" - ] - }, - "metaTitle": "Sony PXW-FS5K", - "metaKeywords": "Sony,Smart Electronics", - "metaDescription": "Take control and shoot your way Real cinematic images and sound: Explore a new dimension in creative artistry. Capture beautifully detailed, cinematic vide", - "attributeNames": { - "iso_sensitivity": "ISO sensitivity", - "sensor_type": "Sensor type", - "white_balance": "White balance", - "wi_fi": "Wi-Fi", - "brand": "Brand", - "color": "Color" - } - }, - "links": { - "self": "http://mysprykershop.com/abstract-products/204" - } - }, - { - "type": "abstract-products", - "id": "205", - "attributes": { - "sku": "205", - "name": "Toshiba CAMILEO S30", - "description": "Reach out Reach out with your 10x digital zoom and control recordings on the large 3-inch touchscreen LCD monitor. Create multi-scene video files thanks to the new Pause feature button! Save the best moments of your life with your CAMILEO S30 camcorder. Real cinematic images and sound: Explore a new dimension in creative artistry. Capture beautifully detailed, cinematic video images plus high-quality audio in cinematic 24 frames per second.", - "attributes": { - "total_megapixels": "8 MP", - "display": "LCD", - "self_timer": "10 s", - "weight": "118 g", - "brand": "Toshiba", - "color": "Black" - }, - "superAttributesDefinition": [ - "total_megapixels", - "color" - ], - "superAttributes": [], - "attributeMap": { - "attribute_variants": [], - "super_attributes": [], - "product_concrete_ids": [ - "205_6350138" - ] - }, - "metaTitle": "Toshiba CAMILEO S30", - "metaKeywords": "Toshiba,Smart Electronics", - "metaDescription": "Reach out Reach out with your 10x digital zoom and control recordings on the large 3-inch touchscreen LCD monitor. Create multi-scene video files thanks to", - "attributeNames": { - "total_megapixels": "Total Megapixels", - "display": "Display", - "self_timer": "Self-timer", - "weight": "Weight", - "brand": "Brand", - "color": "Color" - } - }, - "links": { - "self": "http://mysprykershop.com/abstract-products/205" - } - } - ] - "links": { - "self": "http://mysprykershop.com/content-product-abstract-lists/apl-1/content-product-abstract" - } -} -``` - -
    -
    - -## Retrieving Other Resources for Abstract Product Lists -You can extend the response of the content-product-abstract endpoint with the following resource relationships: - -* abstract-product-image-sets -* abstract-product-availabilities -* abstract-product-prices -* category-nodes -* product-tax-sets -* product-labels -* concrete-products - -Please see below for details of the resource relationships. - -### Getting Image Sets for Abstract Products -To get image sets assigned to abstract products, request the resource from the abstract-product-image-sets relationships endpoint: - -Request sample: _GET http://mysprykershop.com/content-product-abstract-lists/apl-1/content-product-abstract?include=**abstract-product-image-sets**_ -where **abstract-product-image-sets** is the image sets for its abstract products included in the list and **apl-1** is the key of the Abstract Product List content item. - -The following additional attributes are added to the response: - -| Field* | Type | Description | -| --- | --- | --- | -| imageSets | string | Set of images assigned to the abstract product. | -| name | string | Name of the image set. | -| images | string | Images in the image set assigned to the abstract product. | -| externalUrlLarge | string | URL of the large image displayed on the website. | -| externalUrlSmall | string | URL of the small image displayed on the website. | - -*The fields mentioned are all attributes in the response. Type and ID are not mentioned. - -If the request is successful and the abstract product image sets with the specified ID have been found, the endpoint will respond with a **RestAbstractProductsResponse**. It provides only links to the images. - -
    -Sample response: - -```php -... - }, - "links": { - "self": "http://mysprykershop.com/abstract-products/204" - }, - "relationships": { - "abstract-product-image-sets": { - "data": [ - { - "type": "abstract-product-image-sets", - "id": "204" - } - ] - } - } - }, - ... - - "links": { - "self": "http://mysprykershop.com/abstract-products/205" - }, - "relationships": { - "abstract-product-image-sets": { - "data": [ - { - "type": "abstract-product-image-sets", - "id": "205" - } - ] - } - } - } - ], - "links": { - "self": "http://mysprykershop.com/content-product-abstract-lists/apl-1/content-product-abstract?include=abstract-product-image-sets" - }, - "included": [ - { - "type": "abstract-product-image-sets", - "id": "204", - "attributes": { - "imageSets": [ - { - "name": "default", - "images": [ - { - "externalUrlLarge": "//images.icecat.biz/img/gallery/29851280_5571.jpg", - "externalUrlSmall": "//images.icecat.biz/img/gallery_mediums/29851280_5571.jpg" - } - ] - } - ] - }, - "links": { - "self": "http://mysprykershop.com/abstract-products/204/abstract-product-image-sets" - } - }, - { - "type": "abstract-product-image-sets", - "id": "205", - "attributes": { - "imageSets": [ - { - "name": "default", - "images": [ - { - "externalUrlLarge": "//images.icecat.biz/img/norm/high/6350138-1977.jpg", - "externalUrlSmall": "//images.icecat.biz/img/gallery_mediums/img_6350138_medium_1481633011_6285_13738.jpg" - } - ] - } - ] - }, - "links": { - "self": "http://mysprykershop.com/abstract-products/205/abstract-product-image-sets" - } - } - ] -} -``` - -
    -
    - -### Getting Information on Availability for Abstract Products -To retrieve the information on the availability of abstract products, request the resource from the abstract-product-availabilities relationships endpoint: - -Request sample: _GET http://mysprykershop.com/content-product-abstract-lists/apl-1/content-product-abstract?**include=abstract-product-availabilities**_ -where **abstract-product-availabilities** is the availability of the abstract products included in the list and **apl-1** is the key of the Abstract Product List content item. - -The following additional attributes will be added to the response: - -| Field* | Type | Description | -| --- | --- | --- | -| availability | boolean | Boolean to inform whether the abstract product is available or unavailable (both in the warehouse and in open orders). | -| quantity | integer | Number of products available in the stock. | - -*The fields mentioned are all attributes in the response. Type and ID are not mentioned. - -If the request is successful and the availability of abstract products with the specified content item key has been found, the resource will respond with a **RestAbstractProductAvailabilityResponse**. It provides only links to the images. - -
    -Sample response: - -```php -{ -"data": [ - { - "type": "abstract-products", - "id": "204", - "attributes": { - "sku": "204", - "name": "Sony PXW-FS5K", - "description": "Take control and shoot your way Real cinematic images and sound: Explore a new dimension in creative artistry. Capture beautifully detailed, cinematic video images plus high-quality audio in cinematic 24 frames per second. Add some power to your shots: Add an E-mount lens with a power zoom and smoothly focus in on your subject with up to 11x magnification. Capture it all in HD: Capture all the detail with Full HD 1920 x 1080 video shooting (AVCHD format) at 24mbs for increased detail and clarity. DSLR quality photos: Shoot stills with DSLR-like picture quality and shallow depth of field for professional looking shots.", - "attributes": { - "iso_sensitivity": "3200", - "sensor_type": "CMOS", - "white_balance": "Auto", - "wi_fi": "yes", - "brand": "Sony", - "color": "Black" - }, - "superAttributesDefinition": [ - "color" - ], - "superAttributes": [], - "attributeMap": { - "attribute_variants": [], - "super_attributes": [], - "product_concrete_ids": [ - "204_29851280" - ] - }, - "metaTitle": "Sony PXW-FS5K", - "metaKeywords": "Sony,Smart Electronics", - "metaDescription": "Take control and shoot your way Real cinematic images and sound: Explore a new dimension in creative artistry. Capture beautifully detailed, cinematic vide", - "attributeNames": { - "iso_sensitivity": "ISO sensitivity", - "sensor_type": "Sensor type", - "white_balance": "White balance", - "wi_fi": "Wi-Fi", - "brand": "Brand", - "color": "Color" - } - }, - "links": { - "self": "http://mysprykershop.com/abstract-products/204" - }, - "relationships": { - "abstract-product-availabilities": { - "data": [ - { - "type": "abstract-product-availabilities", - "id": "204" - } - ] - } - } - }, - { - "type": "abstract-products", - "id": "205", - "attributes": { - "sku": "205", - "name": "Toshiba CAMILEO S30", - "description": "Reach out Reach out with your 10x digital zoom and control recordings on the large 3-inch touchscreen LCD monitor. Create multi-scene video files thanks to the new Pause feature button! Save the best moments of your life with your CAMILEO S30 camcorder. Real cinematic images and sound: Explore a new dimension in creative artistry. Capture beautifully detailed, cinematic video images plus high-quality audio in cinematic 24 frames per second.", - "attributes": { - "total_megapixels": "8 MP", - "display": "LCD", - "self_timer": "10 s", - "weight": "118 g", - "brand": "Toshiba", - "color": "Black" - }, - "superAttributesDefinition": [ - "total_megapixels", - "color" - ], - "superAttributes": [], - "attributeMap": { - "attribute_variants": [], - "super_attributes": [], - "product_concrete_ids": [ - "205_6350138" - ] - }, - "metaTitle": "Toshiba CAMILEO S30", - "metaKeywords": "Toshiba,Smart Electronics", - "metaDescription": "Reach out Reach out with your 10x digital zoom and control recordings on the large 3-inch touchscreen LCD monitor. Create multi-scene video files thanks to", - "attributeNames": { - "total_megapixels": "Total Megapixels", - "display": "Display", - "self_timer": "Self-timer", - "weight": "Weight", - "brand": "Brand", - "color": "Color" - } - }, - "links": { - "self": "http://mysprykershop.com/abstract-products/205" - }, - "relationships": { - "abstract-product-availabilities": { - "data": [ - { - "type": "abstract-product-availabilities", - "id": "205" - } - ] - } - } - } -], -"links": { - "self": "http://mysprykershop.com/content-product-abstract-lists/apl-1/content-product-abstract?include=abstract-product-availabilities" -}, -"included": [ - { - "type": "abstract-product-availabilities", - "id": "204", - "attributes": { - "availability": true, - "quantity": 10 - }, - "links": { - "self": "http://mysprykershop.com/abstract-products/204/abstract-product-availabilities" - } - }, - { - "type": "abstract-product-availabilities", - "id": "205", - "attributes": { - "availability": true, - "quantity": 10 - }, - "links": { - "self": "http://mysprykershop.com/abstract-products/205/abstract-product-availabilities" - } - } -] -``` - -
    -
    - -### Getting Prices for Abstract Products -To retrieve prices of abstract products, request the resource from the abstract-product-prices relationships endpoint: - -Request sample: _GET http://mysprykershop.com/content-product-abstract-lists/apl-1/content-product-abstract?**include=abstract-product-prices**_ -where **abstract-product-prices** is the price of each abstract product included in the list and **apl-1** is the key of the Abstract Product List content item containing these products. - -The following additional attributes will be added to the response: - -| Field* | Type | Description | -| --- | --- | --- | -| price | integer | Abstract product price. | -| priceTypeName | string | Name of the price type. | -| netAmount | integer | Net price. | -| grossAmount | integer | Gross price. | -| currency.code | string | Currency code. | -| currency.name | string | Currency name. | -| currency.symbol | string | Currency symbol. | - -*The fields mentioned are all attributes in the response. Type and ID are not mentioned. - -
    -Sample response: - -```php -{ -"data": [ - { - "type": "abstract-products", - "id": "204", - "attributes": { - "sku": "204", - "name": "Sony PXW-FS5K", - "description": "Take control and shoot your way Real cinematic images and sound: Explore a new dimension in creative artistry. Capture beautifully detailed, cinematic video images plus high-quality audio in cinematic 24 frames per second. Add some power to your shots: Add an E-mount lens with a power zoom and smoothly focus in on your subject with up to 11x magnification. Capture it all in HD: Capture all the detail with Full HD 1920 x 1080 video shooting (AVCHD format) at 24mbs for increased detail and clarity. DSLR quality photos: Shoot stills with DSLR-like picture quality and shallow depth of field for professional looking shots.", - "attributes": { - "iso_sensitivity": "3200", - "sensor_type": "CMOS", - "white_balance": "Auto", - "wi_fi": "yes", - "brand": "Sony", - "color": "Black" - }, - "superAttributesDefinition": [ - "color" - ], - "superAttributes": [], - "attributeMap": { - "attribute_variants": [], - "super_attributes": [], - "product_concrete_ids": [ - "204_29851280" - ] - }, - "metaTitle": "Sony PXW-FS5K", - "metaKeywords": "Sony,Smart Electronics", - "metaDescription": "Take control and shoot your way Real cinematic images and sound: Explore a new dimension in creative artistry. Capture beautifully detailed, cinematic vide", - "attributeNames": { - "iso_sensitivity": "ISO sensitivity", - "sensor_type": "Sensor type", - "white_balance": "White balance", - "wi_fi": "Wi-Fi", - "brand": "Brand", - "color": "Color" - } - }, - "links": { - "self": "http://mysprykershop.com/abstract-products/204" - }, - "relationships": { - "abstract-product-prices": { - "data": [ - { - "type": "abstract-product-prices", - "id": "204" - } - ] - } - } - }, - { - "type": "abstract-products", - "id": "205", - "attributes": { - "sku": "205", - "name": "Toshiba CAMILEO S30", - "description": "Reach out Reach out with your 10x digital zoom and control recordings on the large 3-inch touchscreen LCD monitor. Create multi-scene video files thanks to the new Pause feature button! Save the best moments of your life with your CAMILEO S30 camcorder. Real cinematic images and sound: Explore a new dimension in creative artistry. Capture beautifully detailed, cinematic video images plus high-quality audio in cinematic 24 frames per second.", - "attributes": { - "total_megapixels": "8 MP", - "display": "LCD", - "self_timer": "10 s", - "weight": "118 g", - "brand": "Toshiba", - "color": "Black" - }, - "superAttributesDefinition": [ - "total_megapixels", - "color" - ], - "superAttributes": [], - "attributeMap": { - "attribute_variants": [], - "super_attributes": [], - "product_concrete_ids": [ - "205_6350138" - ] - }, - "metaTitle": "Toshiba CAMILEO S30", - "metaKeywords": "Toshiba,Smart Electronics", - "metaDescription": "Reach out Reach out with your 10x digital zoom and control recordings on the large 3-inch touchscreen LCD monitor. Create multi-scene video files thanks to", - "attributeNames": { - "total_megapixels": "Total Megapixels", - "display": "Display", - "self_timer": "Self-timer", - "weight": "Weight", - "brand": "Brand", - "color": "Color" - } - }, - "links": { - "self": "http://mysprykershop.com/abstract-products/205" - }, - "relationships": { - "abstract-product-prices": { - "data": [ - { - "type": "abstract-product-prices", - "id": "205" - } - ] - } - } - } -], -"links": { - "self": "http://mysprykershop.com/content-product-abstract-lists/apl-1/content-product-abstract?include=abstract-product-prices" -}, - "included": [ - { - "type": "abstract-product-prices", - "id": "204", - "attributes": { - "price": 44713, - "prices": [ - { - "priceTypeName": "DEFAULT", - "netAmount": null, - "grossAmount": 44713, - "currency": { - "code": "EUR", - "name": "Euro", - "symbol": "€" - } - } - ] - }, - "links": { - "self": "http://mysprykershop.com/abstract-products/204/abstract-product-prices" - } - }, - { - "type": "abstract-product-prices", - "id": "205", - "attributes": { - "price": 11611, - "prices": [ - { - "priceTypeName": "DEFAULT", - "netAmount": null, - "grossAmount": 11611, - "currency": { - "code": "EUR", - "name": "Euro", - "symbol": "€" - } - } - ] - }, - "links": { - "self": "http://mysprykershop.com/abstract-products/205/abstract-product-prices" - } - } - ] -} -``` - -
    -
    - -### Getting Information on the Category Assigned to Abstract Products - -To get information on all available categories which the abstract products are assigned to, send the GET request expandable with the category-nodes relationships endpoint: - -Request sample: _GET http://mysprykershop.com/content-product-abstract-lists/apl-1/content-product-abstract?**include=category-nodes**_ -where **category-nodes** is the category assigned to each abstract product included in the list and **apl-1** is the key of the Abstract Product List content item. - -The following additional attributes will be added to the response: - -| Field* | Type | Description | -| --- | --- | --- | -| parents[] | string | List of the parent category's values. | -| nodeId | string | Category node ID. | -| name | string | Name of a category associated with the node. | -| metaTitle | string | Meta title of the category. | -| metaKeywords | string | Meta keywords of the category. | -| metaDescription | string | Meta description of the category. | -| isActive | boolean | Informs if the category is active. | -| order | integer | Category arrangement displaying digits between 1 and 100, with 100 rankings the highest (on one level under the parent node). | - -*The fields mentioned are all attributes in the response. Type and ID are not mentioned. - -
    -Sample response: - -```php -{ - "data": [ - { - "type": "abstract-products", - "id": "204", - "attributes": { - "sku": "204", - "name": "Sony PXW-FS5K", - "description": "Take control and shoot your way Real cinematic images and sound: Explore a new dimension in creative artistry. Capture beautifully detailed, cinematic video images plus high-quality audio in cinematic 24 frames per second. Add some power to your shots: Add an E-mount lens with a power zoom and smoothly focus in on your subject with up to 11x magnification. Capture it all in HD: Capture all the detail with Full HD 1920 x 1080 video shooting (AVCHD format) at 24mbs for increased detail and clarity. DSLR quality photos: Shoot stills with DSLR-like picture quality and shallow depth of field for professional looking shots.", - "attributes": { - "iso_sensitivity": "3200", - "sensor_type": "CMOS", - "white_balance": "Auto", - "wi_fi": "yes", - "brand": "Sony", - "color": "Black" - }, - "superAttributesDefinition": [ - "color" - ], - "superAttributes": [], - "attributeMap": { - "attribute_variants": [], - "super_attributes": [], - "product_concrete_ids": [ - "204_29851280" - ] - }, - "metaTitle": "Sony PXW-FS5K", - "metaKeywords": "Sony,Smart Electronics", - "metaDescription": "Take control and shoot your way Real cinematic images and sound: Explore a new dimension in creative artistry. Capture beautifully detailed, cinematic vide", - "attributeNames": { - "iso_sensitivity": "ISO sensitivity", - "sensor_type": "Sensor type", - "white_balance": "White balance", - "wi_fi": "Wi-Fi", - "brand": "Brand", - "color": "Color" - } - }, - "links": { - "self": "http://mysprykershop.com/abstract-products/204" - }, - "relationships": { - "category-nodes": { - "data": [ - { - "type": "category-nodes", - "id": "2" - }, - { - "type": "category-nodes", - "id": "3" - } - ] - } - } - }, - { - "type": "abstract-products", - "id": "205", - "attributes": { - "sku": "205", - "name": "Toshiba CAMILEO S30", - "description": "Reach out Reach out with your 10x digital zoom and control recordings on the large 3-inch touchscreen LCD monitor. Create multi-scene video files thanks to the new Pause feature button! Save the best moments of your life with your CAMILEO S30 camcorder. Real cinematic images and sound: Explore a new dimension in creative artistry. Capture beautifully detailed, cinematic video images plus high-quality audio in cinematic 24 frames per second.", - "attributes": { - "total_megapixels": "8 MP", - "display": "LCD", - "self_timer": "10 s", - "weight": "118 g", - "brand": "Toshiba", - "color": "Black" - }, - "superAttributesDefinition": [ - "total_megapixels", - "color" - ], - "superAttributes": [], - "attributeMap": { - "attribute_variants": [], - "super_attributes": [], - "product_concrete_ids": [ - "205_6350138" - ] - }, - "metaTitle": "Toshiba CAMILEO S30", - "metaKeywords": "Toshiba,Smart Electronics", - "metaDescription": "Reach out Reach out with your 10x digital zoom and control recordings on the large 3-inch touchscreen LCD monitor. Create multi-scene video files thanks to", - "attributeNames": { - "total_megapixels": "Total Megapixels", - "display": "Display", - "self_timer": "Self-timer", - "weight": "Weight", - "brand": "Brand", - "color": "Color" - } - }, - "links": { - "self": "http://mysprykershop.com/abstract-products/205" - }, - "relationships": { - "category-nodes": { - "data": [ - { - "type": "category-nodes", - "id": "2" - }, - { - "type": "category-nodes", - "id": "3" - } - ] - } - } - } - ], - "links": { - "self": "http://mysprykershop.com/content-product-abstract-lists/apl-1/content-product-abstract?include=category-nodes" - }, - "included": [ - { - "type": "category-nodes", - "id": "2", - "attributes": { - "nodeId": 2, - "name": "Cameras and Camcorders", - "metaTitle": "Cameras and Camcorders", - "metaKeywords": "Cameras and Camcorders", - "metaDescription": "Cameras and Camcorders", - "isActive": true, - "children": [ - { - "nodeId": 4, - "name": "Digital Cameras", - "metaTitle": "Digital Cameras", - "metaKeywords": "Digital Cameras", - "metaDescription": "Digital Cameras", - "isActive": true, - "children": [], - "parents": [], - "order": 100 - }, - { - "nodeId": 3, - "name": "Camcorders", - "metaTitle": "Camcorders", - "metaKeywords": "Camcorders", - "metaDescription": "Camcorders", - "isActive": true, - "children": [], - "parents": [], - "order": 90 - } - ], - "parents": [ - { - "nodeId": 1, - "name": "Demoshop", - "metaTitle": "Demoshop", - "metaKeywords": "English version of Demoshop", - "metaDescription": "English version of Demoshop", - "isActive": true, - "children": [], - "parents": [], - "order": null - } - ], - "order": 90 - }, - "links": { - "self": "http://mysprykershop.com/category-nodes/2" - } - }, - { - "type": "category-nodes", - "id": "3", - "attributes": { - "nodeId": 3, - "name": "Camcorders", - "metaTitle": "Camcorders", - "metaKeywords": "Camcorders", - "metaDescription": "Camcorders", - "isActive": true, - "children": [], - "parents": [ - { - "nodeId": 2, - "name": "Cameras and Camcorders", - "metaTitle": "Cameras and Camcorders", - "metaKeywords": "Cameras and Camcorders", - "metaDescription": "Cameras and Camcorders", - "isActive": true, - "children": [], - "parents": [ - { - "nodeId": 1, - "name": "Demoshop", - "metaTitle": "Demoshop", - "metaKeywords": "English version of Demoshop", - "metaDescription": "English version of Demoshop", - "isActive": true, - "children": [], - "parents": [], - "order": null - } - ], - "order": 90 - } - ], - "order": 90 - }, - "links": { - "self": "http://mysprykershop.com/category-nodes/3" - } - } - ] -} -``` - -
    -
    - -### Getting Information on Tax Sets to Abstract Products -To get information on tax sets defined for abstract products, request the resource from the product-tax-sets relationships endpoint: - -Request sample: _GET http://mysprykershop.com/content-product-abstract-lists/apl-1/content-product-abstract?**include=product-tax-sets**_ -where **product-tax-sets** is the tax set of each abstract product included in the list and **apl-1** is the ID of the Abstract Product List content item. - -The following additional attributes will be added to the response: - -| Field* | Type | Description | -| --- | --- | --- | -| name |string | Tax set name. | -| restTaxRates.name |string | Tax rate name. | -| restTaxRates.rate | integer | Tax rate. | -| restTaxRates.country |string | Country for which the tax rate is applicable. | - -*The fields mentioned are all attributes in the response. Type and ID are not mentioned. - -
    -Sample response: - -```php -{ - "data": [ - { - "type": "abstract-products", - "id": "204", - "attributes": { - "sku": "204", - "name": "Sony PXW-FS5K", - "description": "Take control and shoot your way Real cinematic images and sound: Explore a new dimension in creative artistry. Capture beautifully detailed, cinematic video images plus high-quality audio in cinematic 24 frames per second. Add some power to your shots: Add an E-mount lens with a power zoom and smoothly focus in on your subject with up to 11x magnification. Capture it all in HD: Capture all the detail with Full HD 1920 x 1080 video shooting (AVCHD format) at 24mbs for increased detail and clarity. DSLR quality photos: Shoot stills with DSLR-like picture quality and shallow depth of field for professional looking shots.", - "attributes": { - "iso_sensitivity": "3200", - "sensor_type": "CMOS", - "white_balance": "Auto", - "wi_fi": "yes", - "brand": "Sony", - "color": "Black" - }, - "superAttributesDefinition": [ - "color" - ], - "superAttributes": [], - "attributeMap": { - "attribute_variants": [], - "super_attributes": [], - "product_concrete_ids": [ - "204_29851280" - ] - }, - "metaTitle": "Sony PXW-FS5K", - "metaKeywords": "Sony,Smart Electronics", - "metaDescription": "Take control and shoot your way Real cinematic images and sound: Explore a new dimension in creative artistry. Capture beautifully detailed, cinematic vide", - "attributeNames": { - "iso_sensitivity": "ISO sensitivity", - "sensor_type": "Sensor type", - "white_balance": "White balance", - "wi_fi": "Wi-Fi", - "brand": "Brand", - "color": "Color" - } - }, - "links": { - "self": "http://mysprykershop.com/abstract-products/204" - }, - "relationships": { - "product-tax-sets": { - "data": [ - { - "type": "product-tax-sets", - "id": "b1b7984e-c7dc-5be4-89f0-0ea50d20cbe1" - } - ] - } - } - }, - { - "type": "abstract-products", - "id": "205", - "attributes": { - "sku": "205", - "name": "Toshiba CAMILEO S30", - "description": "Reach out Reach out with your 10x digital zoom and control recordings on the large 3-inch touchscreen LCD monitor. Create multi-scene video files thanks to the new Pause feature button! Save the best moments of your life with your CAMILEO S30 camcorder. Real cinematic images and sound: Explore a new dimension in creative artistry. Capture beautifully detailed, cinematic video images plus high-quality audio in cinematic 24 frames per second.", - "attributes": { - "total_megapixels": "8 MP", - "display": "LCD", - "self_timer": "10 s", - "weight": "118 g", - "brand": "Toshiba", - "color": "Black" - }, - "superAttributesDefinition": [ - "total_megapixels", - "color" - ], - "superAttributes": [], - "attributeMap": { - "attribute_variants": [], - "super_attributes": [], - "product_concrete_ids": [ - "205_6350138" - ] - }, - "metaTitle": "Toshiba CAMILEO S30", - "metaKeywords": "Toshiba,Smart Electronics", - "metaDescription": "Reach out Reach out with your 10x digital zoom and control recordings on the large 3-inch touchscreen LCD monitor. Create multi-scene video files thanks to", - "attributeNames": { - "total_megapixels": "Total Megapixels", - "display": "Display", - "self_timer": "Self-timer", - "weight": "Weight", - "brand": "Brand", - "color": "Color" - } - }, - "links": { - "self": "http://mysprykershop.com/abstract-products/205" - }, - "relationships": { - "product-tax-sets": { - "data": [ - { - "type": "product-tax-sets", - "id": "b1b7984e-c7dc-5be4-89f0-0ea50d20cbe1" - } - ] - } - } - } - ], - "links": { - "self": "http://mysprykershop.com/content-product-abstract-lists/apl-1/content-product-abstract?include=product-tax-sets" - }, - "included": [ - { - "type": "product-tax-sets", - "id": "b1b7984e-c7dc-5be4-89f0-0ea50d20cbe1", - "attributes": { - "name": "Smart Electronics", - "restTaxRates": [ - { - "name": "Austria Standard", - "rate": "20.00", - "country": "AT" - }, - { - "name": "Belgium Standard", - "rate": "21.00", - "country": "BE" - }, - { - "name": "Bulgaria Standard", - "rate": "20.00", - "country": "BG" - }, - { - "name": "Czech Republic Standard", - "rate": "21.00", - "country": "CZ" - }, - { - "name": "Denmark Standard", - "rate": "25.00", - "country": "DK" - }, - { - "name": "France Standard", - "rate": "20.00", - "country": "FR" - }, - { - "name": "Hungary Standard", - "rate": "27.00", - "country": "HU" - }, - { - "name": "Luxembourg Standard", - "rate": "17.00", - "country": "LU" - }, - { - "name": "Netherlands Standard", - "rate": "21.00", - "country": "NL" - }, - { - "name": "Poland Standard", - "rate": "23.00", - "country": "PL" - }, - { - "name": "Romania Standard", - "rate": "20.00", - "country": "RO" - }, - { - "name": "Slovakia Standard", - "rate": "20.00", - "country": "SK" - }, - { - "name": "Slovenia Standard", - "rate": "22.00", - "country": "SI" - }, - { - "name": "Germany Reduced", - "rate": "7.00", - "country": "DE" - }, - { - "name": "Italy Reduced1", - "rate": "4.00", - "country": "IT" - } - ] - }, - "links": { - "self": "http://mysprykershop.com/abstract-products/205/product-tax-sets" - } - } - ] -} -``` - -
    -
    - -### Getting Product Labels of Abstract Products -To get information on tax sets defined for abstract products, request the resource from the product-labels relationships endpoint: - -Request sample: _GET http://mysprykershop.com/content-product-abstract-lists/apl-1/content-product-abstract?**include=product-labels**_ -where **product-labels** is the product label assigned to each abstract product included in the list and **apl-1** is the key of the Abstract Product List content item. - -The following additional attributes will be added to the response: - -| Field* | Type | Description | -| --- | --- | --- | -| name | string | Name of a product label. | -| isExclusive | boolean | Indicates if the label is Exclusive, for example, takes precedence over other labels the product might have so that only this label can be displayed for the product. | -| position | integer | Number of the position in the priority set. | -| frontEndReference | string | Defines the custom product label type. | - -*The fields mentioned are all attributes in the response. Type and ID are not mentioned. - -
    -Sample response: - -```php -{ - "data": [ - { - "type": "abstract-products", - "id": "204", - "attributes": { - "sku": "204", - "name": "Sony PXW-FS5K", - "description": "Take control and shoot your way Real cinematic images and sound: Explore a new dimension in creative artistry. Capture beautifully detailed, cinematic video images plus high-quality audio in cinematic 24 frames per second. Add some power to your shots: Add an E-mount lens with a power zoom and smoothly focus in on your subject with up to 11x magnification. Capture it all in HD: Capture all the detail with Full HD 1920 x 1080 video shooting (AVCHD format) at 24mbs for increased detail and clarity. DSLR quality photos: Shoot stills with DSLR-like picture quality and shallow depth of field for professional looking shots.", - "attributes": { - "iso_sensitivity": "3200", - "sensor_type": "CMOS", - "white_balance": "Auto", - "wi_fi": "yes", - "brand": "Sony", - "color": "Black" - }, - "superAttributesDefinition": [ - "color" - ], - "superAttributes": [], - "attributeMap": { - "attribute_variants": [], - "super_attributes": [], - "product_concrete_ids": [ - "204_29851280" - ] - }, - "metaTitle": "Sony PXW-FS5K", - "metaKeywords": "Sony,Smart Electronics", - "metaDescription": "Take control and shoot your way Real cinematic images and sound: Explore a new dimension in creative artistry. Capture beautifully detailed, cinematic vide", - "attributeNames": { - "iso_sensitivity": "ISO sensitivity", - "sensor_type": "Sensor type", - "white_balance": "White balance", - "wi_fi": "Wi-Fi", - "brand": "Brand", - "color": "Color" - } - }, - "links": { - "self": "http://mysprykershop.com/abstract-products/204" - } - }, - { - "type": "abstract-products", - "id": "205", - "attributes": { - "sku": "205", - "name": "Toshiba CAMILEO S30", - "description": "Reach out Reach out with your 10x digital zoom and control recordings on the large 3-inch touchscreen LCD monitor. Create multi-scene video files thanks to the new Pause feature button! Save the best moments of your life with your CAMILEO S30 camcorder. Real cinematic images and sound: Explore a new dimension in creative artistry. Capture beautifully detailed, cinematic video images plus high-quality audio in cinematic 24 frames per second.", - "attributes": { - "total_megapixels": "8 MP", - "display": "LCD", - "self_timer": "10 s", - "weight": "118 g", - "brand": "Toshiba", - "color": "Black" - }, - "superAttributesDefinition": [ - "total_megapixels", - "color" - ], - "superAttributes": [], - "attributeMap": { - "attribute_variants": [], - "super_attributes": [], - "product_concrete_ids": [ - "205_6350138" - ] - }, - "metaTitle": "Toshiba CAMILEO S30", - "metaKeywords": "Toshiba,Smart Electronics", - "metaDescription": "Reach out Reach out with your 10x digital zoom and control recordings on the large 3-inch touchscreen LCD monitor. Create multi-scene video files thanks to", - "attributeNames": { - "total_megapixels": "Total Megapixels", - "display": "Display", - "self_timer": "Self-timer", - "weight": "Weight", - "brand": "Brand", - "color": "Color" - } - }, - "links": { - "self": "http://mysprykershop.com/abstract-products/205" - } - } - ], - "links": { - "self": "http://mysprykershop.com/content-product-abstract-lists/apl-1/content-product-abstract?include=product-labels" -} -``` - -
    -
    - -## Retrieving Specific Attribute of Abstract Product -To retrieve a specific attribute of the abstract product, send the GET request including the following resources: -/content-product-abstract-lists/{content_item_key}/content-product-abstract?fields[abstract-products]=sku,name,description&include=abstract-product-prices - -Request sample: _GET http://mysprykershop.com/content-product-abstract-lists/apl-1/content-product-abstract?fields[abstract-products]=sku,name,description&include=abstract-product-prices_ -where **apl-1** is the key of the Abstract Product List content item you want to retrieve. - -**Sample response:** - -```php -{ - "data": [ - { - "type": "abstract-products", - "id": "204", - "attributes": { - "sku": "204", - "name": "Sony PXW-FS5K", - "description": "Take control and shoot your way Real cinematic images and sound: Explore a new dimension in creative artistry. Capture beautifully detailed, cinematic video images plus high-quality audio in cinematic 24 frames per second. Add some power to your shots: Add an E-mount lens with a power zoom and smoothly focus in on your subject with up to 11x magnification. Capture it all in HD: Capture all the detail with Full HD 1920 x 1080 video shooting (AVCHD format) at 24mbs for increased detail and clarity. DSLR quality photos: Shoot stills with DSLR-like picture quality and shallow depth of field for professional looking shots." - }, - "links": { - "self": "http://mysprykershop.com/abstract-products/204" - } - }, - { - "type": "abstract-products", - "id": "205", - "attributes": { - "sku": "205", - "name": "Toshiba CAMILEO S30", - "description": "Reach out Reach out with your 10x digital zoom and control recordings on the large 3-inch touchscreen LCD monitor. Create multi-scene video files thanks to the new Pause feature button! Save the best moments of your life with your CAMILEO S30 camcorder. Real cinematic images and sound: Explore a new dimension in creative artistry. Capture beautifully detailed, cinematic video images plus high-quality audio in cinematic 24 frames per second." - }, - "links": { - "self": "http://mysprykershop.com/abstract-products/205" - } - } - ], - "links": { - "self": "http://mysprykershop.com/content-product-abstract-lists/apl-1/content-product-abstract?fields[abstract-products]=sku,name,description&include=abstract-product-prices" - } -} -``` - -## Possible Errors - -| Code | Reason | -| --- | --- | -| 2201 | Content item not found. | -| 2202 | Content key is missing. | -| 2203 | Content type is invalid. | diff --git a/docs/scos/dev/glue-api-guides/202005.0/retrieving-content-items/retrieving-banner-content-items.md b/docs/scos/dev/glue-api-guides/202005.0/retrieving-content-items/retrieving-banner-content-items.md deleted file mode 100644 index ecb5ef415ac..00000000000 --- a/docs/scos/dev/glue-api-guides/202005.0/retrieving-content-items/retrieving-banner-content-items.md +++ /dev/null @@ -1,85 +0,0 @@ ---- -title: Retrieving Banner Content Item Data -description: Banner API implements REST API endpoint that can retrieve banner content item data available in the storage for all or a specific locale -last_updated: Sep 14, 2020 -template: glue-api-storefront-guide-template -originalLink: https://documentation.spryker.com/v5/docs/retrieving-banner-content-item-data-201907 -originalArticleId: e88d1d57-9e00-4579-a64d-b646e5d270cd -redirect_from: - - /v5/docs/retrieving-banner-content-item-data-201907 - - /v5/docs/en/retrieving-banner-content-item-data-201907 -related: - - title: REST API Reference - link: docs/scos/dev/glue-api-guides/page.version/rest-api-reference.html - - title: Content Items Feature Overview - link: docs/scos/user/features/page.version/content-items-feature-overview.html ---- - -The **Banner API** implements REST API endpoint that provides the possibility to retrieve Banner content item data available in the storage. - -In your development, these resources can help you get relevant information for your Banner content item for all or a specific locale. For example, you can view what page address your banner is linked to or what details are displayed for a specific locale. - -{% info_block infoBox %} - -For more information on creating and managing content items in CMS, see: -* [Creating Content Items](/docs/scos/user/back-office-user-guides/{{page.version}}/content/content-items/creating-content-items.html). -* [Editing Content Items](/docs/scos/user/back-office-user-guides/{{page.version}}/content/content-items/editing-content-items.html). -* [Editing Content Items in CMS Pages and Blocks](/docs/scos/user/back-office-user-guides/{{page.version}}/content/content-items/editing-content-items-in-cms-pages-and-blocks.html). - -{% endinfo_block %} - -## Installation -For details on the modules that provide the API functionality and how to install them, see [Content Items API](/docs/scos/dev/feature-integration-guides/{{page.version}}/glue-api/glue-api-content-items-feature-integration.html). - -## Retrieving Banner Content Item Data -To retrieve the Banner content item data, send a GET request to the following endpoint: - -/content-banners/{content_item_key} - -Request sample: _GET http://mysprykershop.com/content-banners/br-3_ -where **content-banners** is the content item type and **br-3** is the key of the Banner content item you want to retrieve. - -{% info_block infoBox %} - -The locale must be specified in the **header** of the GET request. If no locale is specified, data from the **default** locale will be returned. - -{% endinfo_block %} - -If the request is successful and the Banner content item with the specified content item key has been found, the endpoint will respond with **RestContentBannerResponse**. - -**Sample response:** - -```php -{ - "data": { - "type": "content-banners", - "id": "br-3", - "attributes": { - "title": "Cameras Winter Collection", - "subtitle": "The best cameras in winter 2019", - "imageUrl": "http://d2s0ynfc62ej12.cloudfront.net/b2c/17360369_3328.jpg", - "clickUrl": "/en/canon-powershot-n-35", - "altText": "Best selling cameras in winter" - }, - "links": { - "self": "http://mysprykershop.com/content-banners/br-3" - } - } -} -``` - -| Field* | Type | Description | -| --- | --- | --- | -| title | string| Heading of the banner. | -|subtitle|string | Secondary message that clarifies a title to shop visitors. | -|imageUrl | string | Address to where the image element of the banner is stored. | -| clickUrl | string | URL of the target page to which your shop visitors are redirected. | -| altText | string | Text that describes the image. | - -* The fields mentioned are all attributes in the response. Type and ID are not mentioned. - -| Code | Reason | -| --- | --- | -| 2201 | Content not found. | -|2202 | Content key is missing. | -| 2203 | Content type is invalid. | diff --git a/docs/scos/dev/glue-api-guides/202005.0/retrieving-content-items/retrieving-content-item-data.md b/docs/scos/dev/glue-api-guides/202005.0/retrieving-content-items/retrieving-content-item-data.md deleted file mode 100644 index e13af3fd0d2..00000000000 --- a/docs/scos/dev/glue-api-guides/202005.0/retrieving-content-items/retrieving-content-item-data.md +++ /dev/null @@ -1,18 +0,0 @@ ---- -title: Retrieving Content Item Data -last_updated: Sep 14, 2020 -template: glue-api-storefront-guide-template -originalLink: https://documentation.spryker.com/v5/docs/retrieving-content-item-data-201907 -originalArticleId: 57751ebd-4cae-4a61-b90f-c3a5013d7c08 -redirect_from: - - /v5/docs/retrieving-content-item-data-201907 - - /v5/docs/en/retrieving-content-item-data-201907 - - /docs/scos/dev/glue-api-guides/202005.0/retrieving-content-item-data/retrieving-content-item-data.html ---- - -This section provides guides that can help you access and manage relevant data of content items. You can retrieve information on each content item based on its content item key for all or a specific locale. - -See the following guides for more details: - -* [Retrieving Banner Content Item Data](/docs/scos/dev/glue-api-guides/{{page.version}}/retrieving-content-item-data/retrieving-banner-content-items.html) -* [Getting Abstract Product List Content Item Data](/docs/scos/dev/glue-api-guides/{{page.version}}/retrieving-content-item-data/retrieving-abstract-product-list-content-items.html) diff --git a/docs/scos/dev/glue-api-guides/202005.0/retrieving-discounts.md b/docs/scos/dev/glue-api-guides/202005.0/retrieving-discounts.md deleted file mode 100644 index d8ed1ad1065..00000000000 --- a/docs/scos/dev/glue-api-guides/202005.0/retrieving-discounts.md +++ /dev/null @@ -1,379 +0,0 @@ ---- -title: Retrieving Discounts -last_updated: Sep 15, 2020 -template: glue-api-storefront-guide-template -originalLink: https://documentation.spryker.com/v5/docs/retrieving-discounts -originalArticleId: 1afa9ae5-e357-4616-bd9b-8667501ea502 -redirect_from: - - /v5/docs/retrieving-discounts - - /v5/docs/en/retrieving-discounts - - /docs/scos/dev/glue-api-guides/202005.0/discounts-and-promotions/retrieving-discounts.html -related: - - title: Promotions & Discounts feature overview - link: docs/scos/user/features/page.version/promotions-discounts-feature-overview.html ---- - -The Discount API enables shop owners to add free value to their customers by discounting a percentage or a fixed sum of an order's subtotal or an item's price. Discounts can be applied to a purchase in **2** ways: - -1. Discounts applied to carts based on certain conditions, called [cart rules](/docs/scos/user/back-office-user-guides/{{page.version}}/merchandising/discount/creating-cart-rules.html#creating-a-cart-rule-discount); -2. Price reductions provided when redeeming a [discount voucher](/docs/pbc/all/discount-management/{{page.version}}/base-shop/manage-in-the-back-office/create-discounts.html). - -Discounts provided based on *cart rules* are calculated and taken into account automatically. *Vouchers*, on the other hand, need to be applied by customers explicitly. For this purpose, the *Discounts API* allows: - -* applying a voucher to a certain purchase contained in a specific cart; -* retrieving the discounted amount of the purchase; -* checking which vouchers and cart rules are applied to a certain purchase; -* removing a voucher from a cart. - -In your development, the API will help you to enable customers to apply voucher discounts to their purchases and check the correct order amount, discount included. - -## Installation -For detailed information on the modules that provide the API functionality and related installation instructions, see [GLUE: Promotions & Discounts Feature Integration](/docs/scos/dev/feature-integration-guides/{{page.version}}/glue-api/glue-api-promotions-and-discounts-feature-integration.html). - -## Applying Discount Vouchers -To apply a discount voucher, first, a customer needs to have a cart with some products in it. - -{% info_block infoBox "Info" %} - -For details on how to manage carts, see [Managing Carts](/docs/scos/dev/glue-api-guides/{{page.version}}/managing-carts/managing-carts.html). - -{% endinfo_block %} - -### Request -To apply a discount voucher to a cart, you need to send it via a *POST* request to the following endpoints: - -* **/carts/{% raw %}{{{% endraw %}uuid{% raw %}}}{% endraw %}/vouchers** - for carts of registered users; - -{% info_block warningBox "Authentication" %} - -Carts of registered users cannot be accessed anonymously. For this reason, you always need to pass a user's authentication token when accessing the endpoint. For details on how to authenticate a user and retrieve the token, see [Authentication and Authorization](/docs/scos/dev/glue-api-guides/{{page.version}}/authentication-and-authorization.html). - -{% endinfo_block %} - -* **/guest-carts/{% raw %}{{{% endraw %}uuid{% raw %}}}{% endraw %}/vouchers** - for guest carts. - -{% info_block warningBox "Anonymous User ID" %} - -When accessing guest carts, you need to specify the guest user ID. This is done via the `X-Anonymous-Customer-Unique-Id` header. Guest user IDs are managed by the API Client. For details, see [Managing Guest Carts](/docs/scos/dev/glue-api-guides/{{page.version}}/managing-carts/guest-carts/managing-guest-carts.html). - -{% endinfo_block %} - -Request sample: `POST http://glue.mysprykershop.com/carts/1ce91011-8d60-59ef-9fe0-4493ef3628b2/vouchers` - -where **1ce91011-8d60-59ef-9fe0-4493ef3628b2** is the UUID of the customer’s cart. - -{% info_block warningBox "Verification" %} - -You can also include the vouchers resource relationship to obtain detailed information on the discount provided by the voucher in the response data. Example: `POST http://glue.mysprykershop.com/carts/1ce91011-8d60-59ef-9fe0-4493ef3628b2/vouchers?include=vouchers` - -{% endinfo_block %} - -**Request Attributes** - -| Attribute | Type | Required | Description | -| --- | --- | --- | --- | -| **code** | String | yes | Specifies the voucher code to apply. | - -**Request Sample** - -```json -{ - "data": { - "type": "vouchers", - "attributes": { - "code": "mydiscount-qa1ma" - } - } -} -``` - -### Response -The endpoints respond with information on the cart to which the discount is applied. Brief voucher information is available in the **discounts** section. - -{% info_block warningBox "Verification" %} - -If you included the `vouchers` resource relationship in your request URL, the response will also contain detailed voucher information, including the amount of discount applied, price reduction calculation, etc. - -{% endinfo_block %} - -
    -Sample Response - -```json -{ - "data": { - "type": "carts", - "id": "56a0b4e4-21d8-516f-acd5-90581c996676", - "attributes": { - "priceMode": "GROSS_MODE", - "currency": "EUR", - "store": "DE", - "name": "Shopping cart", - "isDefault": true, - "totals": {...}, - "discounts": [ - { - "displayName": "My Discount", - "amount": 83133, - "code": null - }, - { - "displayName": "10% Discount for all orders above", - "amount": 33253, - "code": null - } - ] - }, - "links": {...}, - "relationships": { - "vouchers": { - "data": [ - { - "type": "vouchers", - "id": "mydiscount-qa1ma" - } - ] - } - } - }, - "included": [ - { - "type": "vouchers", - "id": "mydiscount-qa1ma", - "attributes": { - "amount": 83133, - "code": "mydiscount-qa1ma", - "discountType": "voucher", - "displayName": "My Discount", - "isExclusive": false, - "expirationDateTime": "2020-02-29 00:00:00.000000", - "discountPromotionAbstractSku": null, - "discountPromotionQuantity": null - }, - "links": { - "self": "http://glue.mysprykershop.com/vouchers/mydiscount-qa1ma?include=vouchers" - } - } - ] -} -``` -
    -
    - -### Possible Errors - -| Status | Reason | -| --- | --- | -| 400 | The `X-Anonymous-Customer-Unique-Id` header is empty (for guest carts only) | -| 401 | The access token is incorrect (for carts of registered users only). | -| 403 | The access token is missing (for carts of registered users only). | -| 404 | A cart with the specified **ID** was not found. | -| 422 | Incorrect voucher code or the voucher could not be applied. | - -### Viewing Discounts Applied to a Purchase - -#### Request -To view discounts applied to a purchase, send a GET request to the corresponding carts resource and include the discounts you want to retrieve as relationships. - -{% info_block infoBox "your title goes here" %} - -if you want to retrieve discounts provided by **vouchers**, include the *vouchers* resource relationship; -- OR - -if you want to retrieve discounts provided by **cart rules**, include the *cart-rules* resource relationship. - -{% endinfo_block %} - -**Request Samples:** - -* **/carts/{% raw %}{{{% endraw %}uuid{% raw %}}}{% endraw %}?include=vouchers** - *vouchers* applied to a registered user’s cart; - -* **/carts/{% raw %}{{{% endraw %}uuid{% raw %}}}{% endraw %}?include=cart-rules** - *cart rules* applied to a registered user’s cart. - -{% info_block warningBox "Authentication" %} - -Carts of registered users cannot be accessed anonymously. For this reason, you always need to pass a user's authentication token when accessing the endpoint. For details on how to authenticate a user and retrieve the token, see [Authentication and Authorization](/docs/scos/dev/glue-api-guides/{{page.version}}/authentication-and-authorization.html). - -{% endinfo_block %} - -* **/guest-carts/{% raw %}{{{% endraw %}uuid{% raw %}}}{% endraw %}?include=vouchers** - *vouchers* applied to a guest cart. - -* **/guest-carts/{% raw %}{{{% endraw %}uuid{% raw %}}}{% endraw %}?include=cart-rules** - *cart rules* applied to a guest cart. - -{% info_block warningBox "Anonymous User ID" %} - -When accessing guest carts, you need to specify the guest user ID. This is done via the `X-Anonymous-Customer-Unique-Id` header. Guest user IDs are managed by the API Client. For details, see [Managing Guest Carts](/docs/scos/dev/glue-api-guides/{{page.version}}/managing-carts/guest-carts/managing-guest-carts.html). - -{% endinfo_block %} - -**Request samples:** - -`GET http://glue.mysprykershop.com/carts/1ce91011-8d60-59ef-9fe0-4493ef3628b2?include=vouchers` - -`GET http://glue.mysprykershop.com/guest-carts/1ce91011-8d60-59ef-9fe0-4493ef3628b2?include=cart-rules` - -`GET http://glue.mysprykershop.com/carts/1ce91011-8d60-59ef-9fe0-4493ef3628b2?include=vouchers,cart-rules` - -where **1ce91011-8d60-59ef-9fe0-4493ef3628b2** is the cart ID. - -### Response -The endpoints respond with the cart information. The voucher data and the applied cart rules are available in the **included** section. - -{% info_block warningBox "Verification" %} - -The section also includes the voucher **ID** that can be used in the future to unapply the voucher. - -{% endinfo_block %} - -**Voucher Attributes** - -| Attribute | Type | Description | -| --- | --- | --- | -| **displayName** | String | Specifies the voucher display name. | -| **amount** | Integer | Specifies the amount of the discount provided by the voucher. | -| **code** | String | Specifies the voucher code. | -| **discountType** | String | Specifies the discount type.
    The value of the field is always **voucher**. | -| **isExclusive** | Boolean | Specifies whether the voucher is exclusive. | -| **expirationDateTime** | DateTimeUtc | Specifies the date and time on which the voucher expires. | -| **discountPromotionAbstractSku** | String | Specifies the SKU of the product(s) to which the voucher applies. If the voucher can be applied to any product, the value of the attribute is **null**. | -| **discountPromotionQuantity** | Integer | Specifies the amount of the product required to be able to apply the voucher. If the voucher can be applied to any number of products, the value of the attribute is **null**. | - -* The fields mentioned are all attributes in the response. Type and ID are not mentioned. - -**Cart Rules Attributes** - -| Attribute | Type | Description | -| --- | --- | --- | -| **displayName** | String | Specifies the display name of the role. | -| **discountType** | String | Specifies the discount type. | -| **amount** | Integer | Specifies the amount of the discount in cents. | -| **code** | String | Specifies the discount code. | -| **isExclusive** | Boolean | Indicates whether the discount is exclusive. | -| **expirationDateTime** | DateTimeUtc | Specifies the discount expiration time in UTC time format. | -| **discountPromotionAbstractSku** | String | Specifies the SKU of the product to which the discount applies. If the discount can be applied to any product, the value of the attribute is **null**. | -| **discountPromotionQuantity** | Integer | Specifies the amount of the product a customer needs to purchase in order to get the discount. If the discount can be applied to any number of products, the value of the attribute is **null**. | - -
    -Sample Response - -```json -{ - "data": { - "type": "carts", - "id": "1ce91011-8d60-59ef-9fe0-4493ef3628b2", - "attributes": {...}, - "links": {...}, - "relationships": { - "vouchers": { - "data": [ - { - "type": "vouchers", - "id": "mydiscount-yu8je" - } - ] - }, - "cart-rules": { - "data": [ - { - "type": "cart-rules", - "id": "1" - } - ] - } - } - }, - "included": [ - { - "type": "vouchers", - "id": "mydiscount-yu8je", - "attributes": { - "amount": 49898, - "code": "mydiscount-yu8je", - "discountType": "voucher", - "displayName": "My Discount", - "isExclusive": false, - "expirationDateTime": "2020-02-29 00:00:00.000000", - "discountPromotionAbstractSku": null, - "discountPromotionQuantity": null - }, - "links": { - "self": "http://glue.mysprykershop.com/vouchers/mydiscount-yu8je" - } - }, - { - "type": "cart-rules", - "id": "1", - "attributes": { - "amount": 19959, - "code": null, - "discountType": "cart_rule", - "displayName": "10% Discount for all orders above", - "isExclusive": false, - "expirationDateTime": "2020-12-31 00:00:00.000000", - "discountPromotionAbstractSku": null, - "discountPromotionQuantity": null - }, - "links": { - "self": "http://glue.mysprykershop.com/cart-rules/1" - } - } - ] -} -``` - -
    -
    - -### Possible Errors - -| Status | Reason | -| --- | --- | -| 400 | The `X-Anonymous-Customer-Unique-Id` header is empty (for guest carts only) | -| 401 | The access token is incorrect (for carts of registered users only). | -| 403 | The access token is missing (for carts of registered users only). | -| 404 | A cart with the specified **ID** was not found. | - -### Removing Vouchers - -**Request** -To unapply a discount voucher, send a DELETE request to the following endpoints: - -* **/carts/{% raw %}{{{% endraw %}uuid{% raw %}}}{% endraw %}/vouchers/{% raw %}{{{% endraw %}voucher_id{% raw %}}}{% endraw %}** - for carts of registered users; - -{% info_block warningBox "Authentication" %} - -Carts of registered users cannot be accessed anonymously. For this reason, you always need to pass a user's authentication token when accessing the endpoint. For details on how to authenticate a user and retrieve the token, see [Authentication and Authorization](/docs/scos/dev/glue-api-guides/{{page.version}}/authentication-and-authorization.html). - -{% endinfo_block %} - -* **/guest-carts/{% raw %}{{{% endraw %}uuid{% raw %}}}{% endraw %}/vouchers/{% raw %}{{{% endraw %}voucher_id{% raw %}}}{% endraw %}** - for guest carts. - -{% info_block warningBox "Anonymous User ID" %} - -When accessing guest carts, you need to specify the guest user ID. This is done via the `X-Anonymous-Customer-Unique-Id` header. Guest user IDs are managed by the API Client. For details, see [Managing Guest Carts](/docs/scos/dev/glue-api-guides/{{page.version}}/managing-carts/guest-carts/managing-guest-carts.html). - -{% endinfo_block %} - -Request sample: `DELETE http://glue.mysprykershop.com/carts/1ce91011-8d60-59ef-9fe0-4493ef3628b2/vouchers/mydiscount-we3ca` - -where: - -* `1ce91011-8d60-59ef-9fe0-4493ef3628b2` - is the UUID of the customer’s cart; -* `mydiscount-we3ca` - is the voucher ID. - -{% info_block warningBox "Note" %} - -The **voucher ID** can be retrieved when viewing voucher information. Typically, it is the same as the *voucher code*. - -### Response -If the voucher is deleted successfully, the endpoints respond with the **204 No Data** status code. - -### Possible Errors - -{% endinfo_block %} - -| Status | Reason | -| --- | --- | -| 400 | The `X-Anonymous-Customer-Unique-Id` header is empty (for guest carts only) | -| 401 | The access token is incorrect (for carts of registered users only). | -| 403 | The access token is missing (for carts of registered users only). | -| 404 | A cart and/or voucher with the specified **ID** was not found. | diff --git a/docs/scos/dev/glue-api-guides/202005.0/retrieving-measurement-units.md b/docs/scos/dev/glue-api-guides/202005.0/retrieving-measurement-units.md deleted file mode 100644 index f1b792709ef..00000000000 --- a/docs/scos/dev/glue-api-guides/202005.0/retrieving-measurement-units.md +++ /dev/null @@ -1,91 +0,0 @@ ---- -title: Retrieving Measurement Units -description: Retrieve details about measurement units and learn what else you can do with the resource. -last_updated: Sep 14, 2020 -template: glue-api-storefront-guide-template -originalLink: https://documentation.spryker.com/v5/docs/retrieving-measurement-units -originalArticleId: d16fe8ed-0977-42d3-9c20-9a7f1113ec0b -redirect_from: - - /v5/docs/retrieving-measurement-units - - /v5/docs/en/retrieving-measurement-units -related: - - title: Measurement Units Feature Overview - link: docs/scos/user/features/page.version/measurement-units-feature-overview.html ---- - -The Measurement Units API together with the [Measurement Units](/docs/scos/user/features/{{page.version}}/measurement-units-feature-overview.html) feature allows selling products in any measurement units configured in your shop. - -## Installation - -For detailed information on the modules that provide the API functionality and related installation instructions, see [Glue API: Measurement Units Feature Integration](/docs/scos/dev/feature-integration-guides/{{page.version}}/glue-api/glue-api-measurement-units-feature-integration.html). - -## Retrieve a Measurement Unit - -To retrieve measurement unit information by product measurement unit code, send the request: - ---- -`GET` **product-measurement-units/*{% raw %}{{{% endraw %}productMeasurementUnitCode{% raw %}}}{% endraw %}*** - ---- - - - -| Path parameter | Description | -| --- | --- | -| {% raw %}{{{% endraw %}productMeasurementUnitCode{% raw %}}}{% endraw %} | Code of a measurement unit to get information for. | - -### Request - -Request sample: `GET http://glue.mysprykershop.com/product-measurement-unit/METR` - -### Response -Response sample: - -```json -{ - "data": { - "type": "product-measurement-units", - "id": "METR", - "attributes": { - "name": "Meter", - "defaultPrecision": 100 - }, - "links": { - "self": "https://glue.mysprykershop.com/product-measurement-units/METR" - } - } -} -``` - - - -| Attribute | Type | Description | -| --- | --- | --- | -| name | string | Name of the product measurement unit. | -| defaultPrecision | integer | The default ratio between a sales unit and a base unit. It is used when precision for a related sales unit is not specified. | -| measurementUnitCode | string | Code of the measurement unit. | - - -## Other Management Options - -You can use the measurement units resource as follows: - -* Retrieve information about a concrete product, including all the measurement units defined for it - [Retrieve Concrete Products](/docs/scos/dev/glue-api-guides/{{page.version}}/managing-products/retrieving-product-information.html#retrieve-concrete-products). -* Retrieve sales unit of a product - [Retrieve Sales Units](/docs/scos/dev/glue-api-guides/{{page.version}}/managing-products/retrieving-product-information.html#retrieve-sales-units) -* Add items to carts and retrieve information about them with the amount of cart items defined in product measurement units - [Managing Carts of Registered Users](/docs/scos/dev/glue-api-guides/{{page.version}}/managing-carts/carts-of-registered-users/managing-carts-of-registered-users.html). -* Add items to guest carts and retrieve information about them with the amount of cart items defined in product measurement units - [Managing Guest Carts](/docs/scos/dev/glue-api-guides/{{page.version}}/managing-carts/guest-carts/managing-guest-carts.html). -* Retrieve information about items in an order with the amount of order items defined in product measurement units - [Retrieving an Order](/docs/scos/dev/glue-api-guides/{{page.version}}/managing-customers/retrieving-customer-orders.html#retrieving-an-order). - - - -## Possible Errors - - -|Status |Description | -| --- | --- | -| 400 | No product measurement unit code was specified. | -| 404 | Product measurement unit with the specified code does not exist. | - - - - diff --git a/docs/scos/dev/glue-api-guides/202005.0/retrieving-navigation-trees.md b/docs/scos/dev/glue-api-guides/202005.0/retrieving-navigation-trees.md deleted file mode 100644 index 8ef4ea6b5bc..00000000000 --- a/docs/scos/dev/glue-api-guides/202005.0/retrieving-navigation-trees.md +++ /dev/null @@ -1,1148 +0,0 @@ ---- -title: Retrieving Navigation Trees -description: The topic demonstrates how to retrieve navigation trees with the help of API endpoints. -last_updated: Sep 14, 2020 -template: glue-api-storefront-guide-template -originalLink: https://documentation.spryker.com/v5/docs/retrieving-navigation-trees -originalArticleId: 68e0f13b-0cc4-41eb-88ff-995e64a17185 -redirect_from: - - /v5/docs/retrieving-navigation-trees - - /v5/docs/en/retrieving-navigation-trees -related: - - title: Migration Guide - NavigationsRestApi - link: docs/scos/dev/module-migration-guides/glue-api/migration-guide-navigationsrestapi.html - - title: Browsing a Category Tree - link: docs/scos/dev/glue-api-guides/page.version/retrieving-categories/retrieving-category-trees.html - - title: Catalog Search - link: docs/scos/dev/glue-api-guides/page.version/searching-the-product-catalog.html ---- - -The Navigation feature enables back-end developers to create navigtaion elements for Storefront. The navigation elements help shop users to navigate the shop and locate the necessary products and other content. Navigation elements can be linked to CMS pages, categories, as well as internal and external links. - -A navigation element with its child nodes forms a navigation tree. You can only retrieve the entire navigation tree, but not a navigation element. - -## Installation -For detailed information on the modules that provide the API functionality and related installation instructions, see [Navigation](/docs/scos/dev/feature-integration-guides/{{page.version}}/glue-api/glue-api-navigation-feature-integration.html). - -## Retrieving a Navigation Tree -To retrieve a navigation tree, send the request: - ---- -`GET`**/navigations/*{% raw %}{{{% endraw %}navigation_key{% raw %}}}{% endraw %}*** - ---- - -| Path parameter | Description | -| --- | --- | -| ***{% raw %}{{{% endraw %}navigation_key{% raw %}}}{% endraw %}*** | Unique identifier of a navigation tree to get information for. It is always case sensitive. | - - -### Request - -Request sample: `GET http://glue.mysprykershop.com/navigations/SOCIAL_LINKS` - - -| String parameter | Description | Exemplary values | -| --- | --- | --- | -| include | Adds resource relationships to the request. | category-nodes | - - -{% info_block infoBox "Performance" %} - -If a navigation tree has a category child node, include the `category-nodes` resource to retrieve the category information without extra calls to the `/category-nodes` endpoint. Retrieving the category information can affect the performance of the Navigation API. We recommend doing it only when it is absolutely necessary. - -{% endinfo_block %} - - - - -### Response - - -
    - Response sample - -```json -{ - "data": { - "type": "navigations", - "id": "SOCIAL_LINKS", - "attributes": { - "name": "Social links", - "isActive": true, - "locale": null, - "nodes": [ - { - "isActive": true, - "nodeType": "external_url", - "title": "Twitter", - "url": "https://twitter.com/sprysys?lang=de", - "cssClass": "twitter", - "validFrom": null, - "validTo": null, - "children": [] - }, - { - "isActive": true, - "nodeType": "external_url", - "title": "Xing", - "url": "https://www.xing.com/companies/sprykersystemsgmbh", - "cssClass": "xing", - "validFrom": null, - "validTo": null, - "children": [] - }, - { - "isActive": true, - "nodeType": "external_url", - "title": "LinkedIn", - "url": "https://www.linkedin.com/company/spryker-systems-gmbh", - "cssClass": "linkedin", - "validFrom": null, - "validTo": null, - "children": [] - }, - { - "isActive": true, - "nodeType": "external_url", - "title": "YouTube", - "url": "https://www.youtube.com/channel/UC6lVOEbqXxUh0W5FMTvlPDQ", - "cssClass": "youtube", - "validFrom": null, - "validTo": null, - "children": [] - } - ] - }, - "links": { - "self": "http://glue.mysprykershop.com/navigations/SOCIAL_LINKS" - } - } -} -``` - -
    - -
    -Response sample with category nodes - -```json -{ - "data": { - "type": "navigations", - "id": "MAIN_NAVIGATION", - "attributes": { - "nodes": [ - { - "resourceId": null, - "nodeType": "label", - "children": [ - { - "resourceId": 6, - "nodeType": "category", - "children": [], - "isActive": true, - "title": "Notebooks", - "url": "/en/computer/notebooks", - "cssClass": null, - "validFrom": null, - "validTo": null - }, - { - "resourceId": 8, - "nodeType": "category", - "children": [], - "isActive": true, - "title": "Tablets", - "url": "/en/computer/tablets", - "cssClass": null, - "validFrom": null, - "validTo": null - }, - { - "resourceId": 12, - "nodeType": "category", - "children": [], - "isActive": true, - "title": "Smartphones", - "url": "/en/telecom-&-navigation/smartphones", - "cssClass": null, - "validFrom": null, - "validTo": null - }, - { - "resourceId": 10, - "nodeType": "category", - "children": [], - "isActive": true, - "title": "Smartwatches", - "url": "/en/smart-wearables/smartwatches", - "cssClass": null, - "validFrom": null, - "validTo": null - } - ], - "isActive": true, - "title": "Top Categories", - "url": null, - "cssClass": null, - "validFrom": null, - "validTo": null - }, - { - "resourceId": 5, - "nodeType": "category", - "children": [ - { - "resourceId": 6, - "nodeType": "category", - "children": [], - "isActive": true, - "title": "Notebooks", - "url": "/en/computer/notebooks", - "cssClass": null, - "validFrom": null, - "validTo": null - }, - { - "resourceId": 7, - "nodeType": "category", - "children": [], - "isActive": true, - "title": "Workstations", - "url": "/en/computer/pc's/workstations", - "cssClass": null, - "validFrom": null, - "validTo": null - }, - { - "resourceId": 8, - "nodeType": "category", - "children": [], - "isActive": true, - "title": "Tablets", - "url": "/en/computer/tablets", - "cssClass": null, - "validFrom": null, - "validTo": null - } - ], - "isActive": true, - "title": "Computer", - "url": "/en/computer", - "cssClass": null, - "validFrom": null, - "validTo": null - }, - { - "resourceId": 2, - "nodeType": "category", - "children": [ - { - "resourceId": 4, - "nodeType": "category", - "children": [], - "isActive": true, - "title": "Digital Cameras", - "url": "/en/cameras-&-camcorders/digital-cameras", - "cssClass": null, - "validFrom": null, - "validTo": null - }, - { - "resourceId": 3, - "nodeType": "category", - "children": [], - "isActive": true, - "title": "Camcorders", - "url": "/en/cameras-&-camcorders/camcorders", - "cssClass": null, - "validFrom": null, - "validTo": null - } - ], - "isActive": true, - "title": "Cameras", - "url": "/en/cameras-&-camcorders", - "cssClass": null, - "validFrom": null, - "validTo": null - }, - { - "resourceId": null, - "nodeType": "label", - "children": [ - { - "resourceId": 11, - "nodeType": "category", - "children": [ - { - "resourceId": 12, - "nodeType": "category", - "children": [], - "isActive": true, - "title": "Smartphones", - "url": "/en/telecom-&-navigation/smartphones", - "cssClass": null, - "validFrom": null, - "validTo": null - } - ], - "isActive": true, - "title": "Telecom & Navigation", - "url": "/en/telecom-&-navigation", - "cssClass": null, - "validFrom": null, - "validTo": null - }, - { - "resourceId": 9, - "nodeType": "category", - "children": [ - { - "resourceId": 10, - "nodeType": "category", - "children": [], - "isActive": true, - "title": "Smartwatches", - "url": "/en/smart-wearables/smartwatches", - "cssClass": null, - "validFrom": null, - "validTo": null - } - ], - "isActive": true, - "title": "Smart Wearables", - "url": "/en/smart-wearables", - "cssClass": null, - "validFrom": null, - "validTo": null - } - ], - "isActive": true, - "title": "Other Categories", - "url": null, - "cssClass": null, - "validFrom": null, - "validTo": null - }, - { - "resourceId": null, - "nodeType": "label", - "children": [ - { - "resourceId": null, - "nodeType": "label", - "children": [ - { - "resourceId": 2, - "nodeType": "cms_page", - "children": [], - "isActive": true, - "title": "GTC", - "url": "/en/gtc", - "cssClass": null, - "validFrom": null, - "validTo": null - }, - { - "resourceId": 3, - "nodeType": "cms_page", - "children": [], - "isActive": true, - "title": "Data privacy", - "url": "/en/privacy", - "cssClass": null, - "validFrom": null, - "validTo": null - }, - { - "resourceId": 6, - "nodeType": "cms_page", - "children": [], - "isActive": true, - "title": "Demo Landing Page", - "url": "/en/demo-landing-page", - "cssClass": null, - "validFrom": null, - "validTo": null - } - ], - "isActive": true, - "title": "CMS Pages", - "url": null, - "cssClass": null, - "validFrom": null, - "validTo": null - }, - { - "resourceId": null, - "nodeType": "label", - "children": [ - { - "resourceId": null, - "nodeType": "external_url", - "children": [], - "isActive": true, - "title": "Spryker Tech Blog", - "url": "https://tech.spryker.com/", - "cssClass": null, - "validFrom": null, - "validTo": null - }, - { - "resourceId": null, - "nodeType": "external_url", - "children": [], - "isActive": true, - "title": "Spryker Documentation", - "url": "http://spryker.github.io", - "cssClass": null, - "validFrom": null, - "validTo": null - } - ], - "isActive": true, - "title": "External Links", - "url": null, - "cssClass": null, - "validFrom": null, - "validTo": null - }, - { - "resourceId": 13, - "nodeType": "category", - "children": [], - "isActive": true, - "title": "Product Bundles", - "url": "/en/product-bundles", - "cssClass": null, - "validFrom": null, - "validTo": null - }, - { - "resourceId": null, - "nodeType": "link", - "children": [], - "isActive": true, - "title": "Product Sets", - "url": "/en/product-sets", - "cssClass": null, - "validFrom": null, - "validTo": null - }, - { - "resourceId": 14, - "nodeType": "category", - "children": [], - "isActive": true, - "title": "Variant Showcase", - "url": "/en/variant-showcase", - "cssClass": null, - "validFrom": null, - "validTo": null - } - ], - "isActive": true, - "title": "More", - "url": null, - "cssClass": null, - "validFrom": null, - "validTo": null - }, - { - "resourceId": null, - "nodeType": "link", - "children": [], - "isActive": true, - "title": "Sale %", - "url": "/en/outlet", - "cssClass": "sale__red", - "validFrom": null, - "validTo": null - }, - { - "resourceId": null, - "nodeType": "link", - "children": [], - "isActive": true, - "title": "New", - "url": "/en/new", - "cssClass": null, - "validFrom": null, - "validTo": null - } - ], - "name": "Top Navigation", - "isActive": true - }, - "links": { - "self": "http://glue.mysprykershop.com/navigations/MAIN_NAVIGATION" - }, - "relationships": { - "category-nodes": { - "data": [ - { - "type": "category-nodes", - "id": "13" - }, - { - "type": "category-nodes", - "id": "14" - }, - { - "type": "category-nodes", - "id": "10" - }, - { - "type": "category-nodes", - "id": "12" - }, - { - "type": "category-nodes", - "id": "11" - }, - { - "type": "category-nodes", - "id": "9" - }, - { - "type": "category-nodes", - "id": "4" - }, - { - "type": "category-nodes", - "id": "3" - }, - { - "type": "category-nodes", - "id": "6" - }, - { - "type": "category-nodes", - "id": "7" - }, - { - "type": "category-nodes", - "id": "8" - }, - { - "type": "category-nodes", - "id": "5" - }, - { - "type": "category-nodes", - "id": "2" - } - ] - } - } - }, - "included": [ - { - "type": "category-nodes", - "id": "13", - "attributes": { - "nodeId": 13, - "name": "Product Bundles", - "metaTitle": "Product Bundles", - "metaKeywords": "Product Bundles", - "metaDescription": "These are multiple products bundled to a new product.", - "isActive": true, - "children": [], - "parents": [ - { - "nodeId": 1, - "name": "Demoshop", - "metaTitle": "Demoshop", - "metaKeywords": "English version of Demoshop", - "metaDescription": "English version of Demoshop", - "isActive": true, - "children": [], - "parents": [], - "order": null - } - ], - "order": 60 - }, - "links": { - "self": "http://glue.mysprykershop.com/category-nodes/13" - } - }, - { - "type": "category-nodes", - "id": "14", - "attributes": { - "nodeId": 14, - "name": "Variant Showcase", - "metaTitle": "Variant Showcase", - "metaKeywords": "Variant Showcase", - "metaDescription": "These are products that have more than 1 variant.", - "isActive": true, - "children": [], - "parents": [ - { - "nodeId": 1, - "name": "Demoshop", - "metaTitle": "Demoshop", - "metaKeywords": "English version of Demoshop", - "metaDescription": "English version of Demoshop", - "isActive": true, - "children": [], - "parents": [], - "order": null - } - ], - "order": 50 - }, - "links": { - "self": "http://glue.mysprykershop.com/category-nodes/14" - } - }, - { - "type": "category-nodes", - "id": "10", - "attributes": { - "nodeId": 10, - "name": "Smartwatches", - "metaTitle": "Smartwatches", - "metaKeywords": "Smartwatches", - "metaDescription": "Smartwatches", - "isActive": true, - "children": [], - "parents": [ - { - "nodeId": 9, - "name": "Smart Wearables", - "metaTitle": "Smart Wearables", - "metaKeywords": "Smart Wearables", - "metaDescription": "Smart Wearables", - "isActive": true, - "children": [], - "parents": [ - { - "nodeId": 1, - "name": "Demoshop", - "metaTitle": "Demoshop", - "metaKeywords": "English version of Demoshop", - "metaDescription": "English version of Demoshop", - "isActive": true, - "children": [], - "parents": [], - "order": null - } - ], - "order": 70 - } - ], - "order": 70 - }, - "links": { - "self": "http://glue.mysprykershop.com/category-nodes/10" - } - }, - { - "type": "category-nodes", - "id": "12", - "attributes": { - "nodeId": 12, - "name": "Smartphones", - "metaTitle": "Smartphones", - "metaKeywords": "Smartphones", - "metaDescription": "Smartphones", - "isActive": true, - "children": [], - "parents": [ - { - "nodeId": 11, - "name": "Telecom & Navigation", - "metaTitle": "Telecom & Navigation", - "metaKeywords": "Telecom & Navigation", - "metaDescription": "Telecom & Navigation", - "isActive": true, - "children": [], - "parents": [ - { - "nodeId": 1, - "name": "Demoshop", - "metaTitle": "Demoshop", - "metaKeywords": "English version of Demoshop", - "metaDescription": "English version of Demoshop", - "isActive": true, - "children": [], - "parents": [], - "order": null - } - ], - "order": 80 - } - ], - "order": 80 - }, - "links": { - "self": "http://glue.mysprykershop.com/category-nodes/12" - } - }, - { - "type": "category-nodes", - "id": "11", - "attributes": { - "nodeId": 11, - "name": "Telecom & Navigation", - "metaTitle": "Telecom & Navigation", - "metaKeywords": "Telecom & Navigation", - "metaDescription": "Telecom & Navigation", - "isActive": true, - "children": [ - { - "nodeId": 12, - "name": "Smartphones", - "metaTitle": "Smartphones", - "metaKeywords": "Smartphones", - "metaDescription": "Smartphones", - "isActive": true, - "children": [], - "parents": [], - "order": 80 - } - ], - "parents": [ - { - "nodeId": 1, - "name": "Demoshop", - "metaTitle": "Demoshop", - "metaKeywords": "English version of Demoshop", - "metaDescription": "English version of Demoshop", - "isActive": true, - "children": [], - "parents": [], - "order": null - } - ], - "order": 80 - }, - "links": { - "self": "http://glue.mysprykershop.com/category-nodes/11" - } - }, - { - "type": "category-nodes", - "id": "9", - "attributes": { - "nodeId": 9, - "name": "Smart Wearables", - "metaTitle": "Smart Wearables", - "metaKeywords": "Smart Wearables", - "metaDescription": "Smart Wearables", - "isActive": true, - "children": [ - { - "nodeId": 10, - "name": "Smartwatches", - "metaTitle": "Smartwatches", - "metaKeywords": "Smartwatches", - "metaDescription": "Smartwatches", - "isActive": true, - "children": [], - "parents": [], - "order": 70 - } - ], - "parents": [ - { - "nodeId": 1, - "name": "Demoshop", - "metaTitle": "Demoshop", - "metaKeywords": "English version of Demoshop", - "metaDescription": "English version of Demoshop", - "isActive": true, - "children": [], - "parents": [], - "order": null - } - ], - "order": 70 - }, - "links": { - "self": "http://glue.mysprykershop.com/category-nodes/9" - } - }, - { - "type": "category-nodes", - "id": "4", - "attributes": { - "nodeId": 4, - "name": "Digital Cameras", - "metaTitle": "Digital Cameras", - "metaKeywords": "Digital Cameras", - "metaDescription": "Digital Cameras", - "isActive": true, - "children": [], - "parents": [ - { - "nodeId": 2, - "name": "Cameras & Camcorders", - "metaTitle": "Cameras & Camcorders", - "metaKeywords": "Cameras & Camcorders", - "metaDescription": "Cameras & Camcorders", - "isActive": true, - "children": [], - "parents": [ - { - "nodeId": 1, - "name": "Demoshop", - "metaTitle": "Demoshop", - "metaKeywords": "English version of Demoshop", - "metaDescription": "English version of Demoshop", - "isActive": true, - "children": [], - "parents": [], - "order": null - } - ], - "order": 90 - } - ], - "order": 100 - }, - "links": { - "self": "http://glue.mysprykershop.com/category-nodes/4" - } - }, - { - "type": "category-nodes", - "id": "3", - "attributes": { - "nodeId": 3, - "name": "Camcorders", - "metaTitle": "Camcorders", - "metaKeywords": "Camcorders", - "metaDescription": "Camcorders", - "isActive": true, - "children": [], - "parents": [ - { - "nodeId": 2, - "name": "Cameras & Camcorders", - "metaTitle": "Cameras & Camcorders", - "metaKeywords": "Cameras & Camcorders", - "metaDescription": "Cameras & Camcorders", - "isActive": true, - "children": [], - "parents": [ - { - "nodeId": 1, - "name": "Demoshop", - "metaTitle": "Demoshop", - "metaKeywords": "English version of Demoshop", - "metaDescription": "English version of Demoshop", - "isActive": true, - "children": [], - "parents": [], - "order": null - } - ], - "order": 90 - } - ], - "order": 90 - }, - "links": { - "self": "http://glue.mysprykershop.com/category-nodes/3" - } - }, - { - "type": "category-nodes", - "id": "6", - "attributes": { - "nodeId": 6, - "name": "Notebooks", - "metaTitle": "Notebooks", - "metaKeywords": "Notebooks", - "metaDescription": "Notebooks", - "isActive": true, - "children": [], - "parents": [ - { - "nodeId": 5, - "name": "Computer", - "metaTitle": "Computer", - "metaKeywords": "Computer", - "metaDescription": "Computer", - "isActive": true, - "children": [], - "parents": [ - { - "nodeId": 1, - "name": "Demoshop", - "metaTitle": "Demoshop", - "metaKeywords": "English version of Demoshop", - "metaDescription": "English version of Demoshop", - "isActive": true, - "children": [], - "parents": [], - "order": null - } - ], - "order": 100 - } - ], - "order": 100 - }, - "links": { - "self": "http://glue.mysprykershop.com/category-nodes/6" - } - }, - { - "type": "category-nodes", - "id": "7", - "attributes": { - "nodeId": 7, - "name": "Pc's/Workstations", - "metaTitle": "Pc's/Workstations", - "metaKeywords": "Pc's/Workstations", - "metaDescription": "Pc's/Workstations", - "isActive": true, - "children": [], - "parents": [ - { - "nodeId": 5, - "name": "Computer", - "metaTitle": "Computer", - "metaKeywords": "Computer", - "metaDescription": "Computer", - "isActive": true, - "children": [], - "parents": [ - { - "nodeId": 1, - "name": "Demoshop", - "metaTitle": "Demoshop", - "metaKeywords": "English version of Demoshop", - "metaDescription": "English version of Demoshop", - "isActive": true, - "children": [], - "parents": [], - "order": null - } - ], - "order": 100 - } - ], - "order": 90 - }, - "links": { - "self": "http://glue.mysprykershop.com/category-nodes/7" - } - }, - { - "type": "category-nodes", - "id": "8", - "attributes": { - "nodeId": 8, - "name": "Tablets", - "metaTitle": "Tablets", - "metaKeywords": "Tablets", - "metaDescription": "Tablets", - "isActive": true, - "children": [], - "parents": [ - { - "nodeId": 5, - "name": "Computer", - "metaTitle": "Computer", - "metaKeywords": "Computer", - "metaDescription": "Computer", - "isActive": true, - "children": [], - "parents": [ - { - "nodeId": 1, - "name": "Demoshop", - "metaTitle": "Demoshop", - "metaKeywords": "English version of Demoshop", - "metaDescription": "English version of Demoshop", - "isActive": true, - "children": [], - "parents": [], - "order": null - } - ], - "order": 100 - } - ], - "order": 80 - }, - "links": { - "self": "http://glue.mysprykershop.com/category-nodes/8" - } - }, - { - "type": "category-nodes", - "id": "5", - "attributes": { - "nodeId": 5, - "name": "Computer", - "metaTitle": "Computer", - "metaKeywords": "Computer", - "metaDescription": "Computer", - "isActive": true, - "children": [ - { - "nodeId": 6, - "name": "Notebooks", - "metaTitle": "Notebooks", - "metaKeywords": "Notebooks", - "metaDescription": "Notebooks", - "isActive": true, - "children": [], - "parents": [], - "order": 100 - }, - { - "nodeId": 7, - "name": "Pc's/Workstations", - "metaTitle": "Pc's/Workstations", - "metaKeywords": "Pc's/Workstations", - "metaDescription": "Pc's/Workstations", - "isActive": true, - "children": [], - "parents": [], - "order": 90 - }, - { - "nodeId": 8, - "name": "Tablets", - "metaTitle": "Tablets", - "metaKeywords": "Tablets", - "metaDescription": "Tablets", - "isActive": true, - "children": [], - "parents": [], - "order": 80 - } - ], - "parents": [ - { - "nodeId": 1, - "name": "Demoshop", - "metaTitle": "Demoshop", - "metaKeywords": "English version of Demoshop", - "metaDescription": "English version of Demoshop", - "isActive": true, - "children": [], - "parents": [], - "order": null - } - ], - "order": 100 - }, - "links": { - "self": "http://glue.mysprykershop.com/category-nodes/5" - } - }, - { - "type": "category-nodes", - "id": "2", - "attributes": { - "nodeId": 2, - "name": "Cameras & Camcorders", - "metaTitle": "Cameras & Camcorders", - "metaKeywords": "Cameras & Camcorders", - "metaDescription": "Cameras & Camcorders", - "isActive": true, - "children": [ - { - "nodeId": 4, - "name": "Digital Cameras", - "metaTitle": "Digital Cameras", - "metaKeywords": "Digital Cameras", - "metaDescription": "Digital Cameras", - "isActive": true, - "children": [], - "parents": [], - "order": 100 - }, - { - "nodeId": 3, - "name": "Camcorders", - "metaTitle": "Camcorders", - "metaKeywords": "Camcorders", - "metaDescription": "Camcorders", - "isActive": true, - "children": [], - "parents": [], - "order": 90 - } - ], - "parents": [ - { - "nodeId": 1, - "name": "Demoshop", - "metaTitle": "Demoshop", - "metaKeywords": "English version of Demoshop", - "metaDescription": "English version of Demoshop", - "isActive": true, - "children": [], - "parents": [], - "order": null - } - ], - "order": 90 - }, - "links": { - "self": "http://glue.mysprykershop.com/category-nodes/2" - } - } - ] -} -``` - -
    -
    - - - - - -| Field | Type | Description | -| --- | --- | --- | -| name | String | Specifies the tree name. | -| isActive | Boolean | Specifies whether the tree is active.
    If the value of the field is *true*, the tree should be displayed to the customer. Otherwise, the tree should be hidden. | -| locale | String | Specifies a locale for the tree. | -| nodes | Array | Specifies an array of node elements that comprise the navigation tree. | -| title | String | Specifies the title that should be used to display the node anywhere on the frontend. | -| url | String | Specifies the URL link the node points to.
    • If the `node_type` parameter is set to `cms_page`, `category` or `link`, the URL is relative to the application domain. For example, `/en/product-sets`.
    • If the `node_type` parameter is set to external_url, the URL contains an absolute URI. For example, `http://example.com/mypage.html`.
    • If the `node_type` parameter is set to label, the URL is always empty, because labels are intended to be text-only elements.
    | -| isActive | Boolean | Specifies whether the node is active.
    If the value of the field is true, the node should be displayed to the customer. Otherwise, the node should be hidden. | -| nodeType | String | Specifies the node type. Should be one of the following values:
    • **label** - specifies a simple label (text-only element);
    • **cms_page** - specifies a link to a CMS page;
    • **category** - specifies a link to a category page;
    • **link** - specifies a link to any page within the shop;
    • **external_url** - specifies a link to an external web site.
    | -| cssClass | String | Specifies the CSS class to be used to render the node. | -| validFrom | String | Specifies a date that the node is valid from. | -| validTo | String | Specifies a date that the node is valid to. | -| children | Array | Specifies an array of node elements that are nested within the current element. | - - - - - -| Included resource | Attribute | Type | Description | -| --- | --- | --- | --- | -| category-nodes | nodeId | String | Category node ID. | -| category-nodes | name | String | Name of the category associated with the node. | -| category-nodes | metaTitle | String | Meta title of the category. | -| category-nodes | metaKeywords | String | Meta keywords of the category. | -| category-nodes | metaDescription | String | Meta description of the category. | -| category-nodes | isActive | Boolean | Specifies whether the category is active. | -| category-nodes | order | Integer | Category rank.
    Allowed range: 1-100, where 100 is the highest rank (located on the same level as the parent node). | -| category-nodes | children | Array | Specifies an array of node elements that are nested within the current category. | -| category-nodes | parents | Array | Specifies an array of node elements that are parents for the current category. | - - - - - -### Possible Errors - -| Status | Reason | -| --- | --- | -| 400 | Navigation ID is not specified. | -| 404 | Navigation not found. | diff --git a/docs/scos/dev/glue-api-guides/202005.0/retrieving-promotional-items.md b/docs/scos/dev/glue-api-guides/202005.0/retrieving-promotional-items.md deleted file mode 100644 index 44723bb22f8..00000000000 --- a/docs/scos/dev/glue-api-guides/202005.0/retrieving-promotional-items.md +++ /dev/null @@ -1,46 +0,0 @@ ---- -title: Retrieving Promotional Items -last_updated: Oct 21, 2020 -template: glue-api-storefront-guide-template -originalLink: https://documentation.spryker.com/v5/docs/retrieving-promotional-items -originalArticleId: 5fc82c18-743b-4de9-bed3-17153448b25a -redirect_from: - - /v5/docs/retrieving-promotional-items - - /v5/docs/en/retrieving-promotional-items ---- - -The [Promotions](/docs/scos/user/features/{{page.version}}/promotions-and-discounts/discount/discount-feature-overview.html#promotional-product) functionality enables sellers to provide a promotional item that the customers can add to their carts at a discounted price or even for free. To be eligible for promotions, the purchase needs to fulfill certain discount conditions, for example, the purchase amount should exceed a certain threshold. - -{% info_block infoBox "Info" %} - -For more details on how to create the discount conditions, see [Creating a Cart Rule Discount](/docs/scos/user/back-office-user-guides/{{page.version}}/merchandising/discount/creating-cart-rules.html). - -{% endinfo_block %} - -In your development, the Promotions API will help you to enable customers to redeem the benefits provided by promotions and check the correct order amount, discount included. - -## Installation -For detailed information on the modules that provide the API functionality and related installation instructions, see [Glue API: Promotions & Discounts Feature Integration](/docs/scos/dev/feature-integration-guides/{{page.version}}/glue-api/glue-api-promotions-and-discounts-feature-integration.html). - -## Managing Promotional Items -You can do the following actions on the promotional items via API: - -* Retrieve promotional items available for a cart. -* Add applicable promotional items to cart. -* Remove the added promotional items from cart. - -## Retrieving Promotional Items Available for a Cart -For customers to be able to benefit from promotional offers, first, they need to know about them. For this purpose, you can fetch the promotions available for products in a cart and display the possible benefits to the customer. To do so, you can query the cart information and include the `promotional-items` resource relationship. The response provides the abstract SKU of the promoted product and how many of the promotional items customers can add. To present detailed information on promotional products to the customer, you can include the `abstract-products` and `concrete-products` resource relationships. - -See [Managing Carts of Registered Users](/docs/scos/dev/glue-api-guides/{{page.version}}/managing-carts/carts-of-registered-users/managing-carts-of-registered-users.html) for details on how to retrieve promotional items for a registered user’s cart. - -See [Managing Guest Carts](/docs/scos/dev/glue-api-guides/{{page.version}}/managing-carts/guest-carts/managing-guest-carts.html) for details on how to retrieve promotional items for a guest user’s cart. - -## Adding Applicable Promotional Items to Cart -Once you know what promotional items you can make use of, you can apply the discounts by adding the promotional items to cart. To retrieve details on cart rules of the promotional items you add, include the cart-rule resource relationship into your request. - -See [Managing Carts of Registered Users](/docs/scos/dev/glue-api-guides/{{page.version}}/managing-carts/carts-of-registered-users/managing-carts-of-registered-users.html) for details on how you can add promotional items to a registered user’s cart. -See [Managing Guest Carts](/docs/scos/dev/glue-api-guides/{{page.version}}/managing-carts/guest-carts/managing-guest-carts.html) for details on how you can add promotional items to a guest user’s cart. - -## Removing Promotional Items from Cart -To remove a discount applied to a promotional product, remove the promotional product(s) from the cart. For details, see Removing Items in [Managing Carts of Registered Users](/docs/scos/dev/glue-api-guides/{{page.version}}/managing-carts/carts-of-registered-users/managing-carts-of-registered-users.html#removing-items) and [Managing Guest Carts](/docs/scos/dev/glue-api-guides/{{page.version}}/managing-carts/guest-carts/managing-guest-carts.html##remove-an-item-from-a-guest-cart). Also, if a cart no longer fulfills the conditions of the promotion, all promotional products are removed automatically. diff --git a/docs/scos/dev/glue-api-guides/202005.0/retrieving-protected-resources.md b/docs/scos/dev/glue-api-guides/202005.0/retrieving-protected-resources.md deleted file mode 100644 index e8e1d646bd3..00000000000 --- a/docs/scos/dev/glue-api-guides/202005.0/retrieving-protected-resources.md +++ /dev/null @@ -1,77 +0,0 @@ ---- -title: Retrieving Protected Resources -description: The article describes how to retrieve a list of resources protected from unauthorized access. -last_updated: Sep 15, 2020 -template: glue-api-storefront-guide-template -originalLink: https://documentation.spryker.com/v5/docs/getting-the-list-of-protected-resources -originalArticleId: c6730088-7099-4fb7-bf70-d8097f148cb3 -redirect_from: - - /v5/docs/getting-the-list-of-protected-resources - - /v5/docs/en/getting-the-list-of-protected-resources -related: - - title: Authentication and Authorization - link: docs/scos/dev/glue-api-guides/page.version/managing-customers/authenticating-as-a-customer.html - - title: Logging In as Company User - link: docs/scos/dev/glue-api-guides/page.version/managing-b2b-account/authenticating-as-a-company-user.html - - title: Hide Content from Logged out Users Overview - link: docs/scos/user/features/page.version/customer-access-feature-overview.html ---- - -Shop owners can decide which resources are available to unauthenticated customers, and which of them they are not allowed to view. In Spryker Frontend, this is done via the [Managing Customer Access](/docs/scos/user/back-office-user-guides/{{page.version}}/customer/customer-customer-access-customer-groups/managing-customer-access.html) Feature. On the REST API side, the capability is supported by the **Customer Access API**. The API allows protecting resources from access by unauthorized customers and also provides an endpoint that returns a list of resources protected from unauthenticated access. - -{% info_block warningBox "Note" %} - -An attempt to retrieve any of the resources protected by the API without authentication will result in a **403 Forbidden** error. - -{% endinfo_block %} - -In your development, the API will help you to protect certain resources from guest access, as well as perform pre-flight checks to avoid accessing endpoints that a guest user doesn't have sufficient permissions to view. - -## Installation -For detailed information on how to enable the functionality and related instructions, see [Glue API: Customer Access Feature Integration](/docs/scos/dev/feature-integration-guides/{{page.version}}/glue-api/glue-api-customer-access-feature-integration.html). - -## Usage -To retrieve a list of protected resources, send a GET request to the following endpoint: - -**[/customer-access](/docs/scos/dev/glue-api-guides/{{page.version}}/rest-api-reference.html#/customer-access/get_customer_access)** - -### Request -Request sample: `GET http://glue.mysprykershop.com/customer-access` - -### Response -If the request was successful, the endpoint returns the types of API resources that should not be accessed without proper authentication. - -**Response Attributes** - -| Field* | Type | Description | -| --- | --- | --- | -| **resourceTypes** | String[] | Contains a `string` array, where each element is a resource type that is protected from unauthorized access. | - -*The fields mentioned are all attributes in the response. Type and ID are not mentioned. - -**Sample Response** - -```json -{ - "data": [ - { - "type": "customer-access", - "id": null, - "attributes": { - "resourceTypes": [ - "abstract-product-prices", - "concrete-product-prices", - "wishlists", - "wishlist-items" - ] - }, - "links": { - "self": "http://glue.mysprykershop.com/customer-access - } - } - ], - "links": { - "self": "http://glue.mysprykershop.com/customer-access - } -} -``` diff --git a/docs/scos/dev/glue-api-guides/202005.0/retrieving-store-configuration.md b/docs/scos/dev/glue-api-guides/202005.0/retrieving-store-configuration.md deleted file mode 100644 index 3d195608212..00000000000 --- a/docs/scos/dev/glue-api-guides/202005.0/retrieving-store-configuration.md +++ /dev/null @@ -1,127 +0,0 @@ ---- -title: Retrieving Store Configuration -description: This article explains how to retrieve the store configuration including currencies, countries, locales, and time zones. -last_updated: Sep 14, 2020 -template: glue-api-storefront-guide-template -originalLink: https://documentation.spryker.com/v5/docs/retrieving-store-configuration -originalArticleId: 8e5c5deb-2dd9-4de9-98fc-5e73da6ef885 -redirect_from: - - /v5/docs/retrieving-store-configuration - - /v5/docs/en/retrieving-store-configuration ---- - -Depending on your project needs, you can set up a single store that serves all your business needs or have multiple stores designed for different applications or available in different countries. Regardless of how many stores you have, a store contains such generic configuration as the currencies that can be used in transactions, countries where a store is available, supported languages and the time zone of the store. - -The configuration of the current store in a project can be retrieved via an endpoint provided by the **Stores API**. - -## Installation -For detailed information on the modules that provide the API functionality and related installation instructions, see [Glue Application Feature Integration](/docs/scos/dev/feature-integration-guides/{{page.version}}/glue-api/glue-api-glue-application-feature-integration.html). - -## Usage -To retrieve store configuration, send a GET request to the following endpoint: -`/stores` -Request sample: `GET http://mysprykershop.com/stores` -The endpoint will respond with a **RestStoresResponse**. - -**Response sample** -```js -{ - "data": [ - { - "type": "stores", - "id": "DE", - "attributes": { - "timeZone": "Europe/Berlin", - "defaultCurrency": "EUR", - "currencies": [ - { - "code": "EUR", - "name": "Euro" - }, - { - "code": "CHF", - "name": "Swiss Franc" - } - ], - "locales": [ - { - "code": "en", - "name": "en_US" - }, - { - "code": "de", - "name": "de_DE" - } - ], - "countries": [ - { - "iso2Code": "AT", - "iso3Code": "AUT", - "name": "Austria", - "postalCodeMandatory": true, - "postalCodeRegex": "\\d{4}", - "regions": [] - }, - { - "iso2Code": "DE", - "iso3Code": "DEU", - "name": "Germany", - "postalCodeMandatory": true, - "postalCodeRegex": "\\d{5}", - "regions": [] - } - ] - }, - "links": { - "self": "http://mysprykershop.com/stores/DE" - } - } - ], - "links": { - "self": "http://mysprykershop.com/stores" - } -} -``` - -### General Attributes -| Field* | Type | Description | -| --- | --- | --- | -| timeZone | String | Name of the time zone of the selected store | -| defaultCurrency | String | Default currency of the store | - -\*The fields mentioned are all attributes in the response. Type and ID are not mentioned. - -### Currencies -| Field* | Type | Description | -| --- | --- | --- | -| code | String | Currency code | -| name | String | Currency name | - -\*The fields mentioned are all attributes in the response. Type and ID are not mentioned. - -### Locales -| Field* | Type | Description | -| --- | --- | --- | -| code | String | Locale code | -| name | String | Locale name | - -\*The fields mentioned are all attributes in the response. Type and ID are not mentioned. - -### Countries -| Field* | Type | Description | -| --- | --- | --- | -| iso2Code | String | 2 digit country code | -| iso3Code | String | 3 digit country code | -| name | String | Country name | -| postalCodeMandatory | Boolean | Boolean to tell if a postal code is mandatory or not | -| postalCodeRegex | String | A regular expression for the allowed postal codes | - -\*The fields mentioned are all attributes in the response. Type and ID are not mentioned. - -### Regions -| Field* | Type | Description | -| --- | --- | --- | -| iso2Code | String | Iso 2 code for the region | -| name | String | Region name | - -\*The fields mentioned are all attributes in the response. Type and ID are not mentioned. diff --git a/docs/scos/dev/glue-api-guides/202005.0/searching-the-product-catalog.md b/docs/scos/dev/glue-api-guides/202005.0/searching-the-product-catalog.md deleted file mode 100644 index c48f16bdf9d..00000000000 --- a/docs/scos/dev/glue-api-guides/202005.0/searching-the-product-catalog.md +++ /dev/null @@ -1,558 +0,0 @@ ---- -title: Searching the Product Catalog -description: This article provides a bunch of sample requests to be used to achieve the implementation of search options and gives explanations of request values. -last_updated: Apr 3, 2020 -template: glue-api-storefront-guide-template -originalLink: https://documentation.spryker.com/v5/docs/catalog-search -originalArticleId: 231d202e-1af4-4faa-bb41-143cee62e1fc -redirect_from: - - /v5/docs/catalog-search - - /v5/docs/en/catalog-search -related: - - title: Catalog feature overview - link: docs/scos/user/features/page.version/catalog-feature-overview.html ---- - -The implementation of the search API offers you the same search experience as in the Spryker demo shops. The search engine used is Elasticsearch and search results go beyond the simple listing of products in the results section. The list of search results is paginated according to your configuration and spelling suggestions are offered when needed. In addition, sorting and facets are supported to narrow down the search results. - -In your development, this endpoint can help you to: - -* Implement catalog search functionality including facets and pagination -* Retrieve a list of products to be displayed anywhere you want. - -## Installation -For detailed information on the modules that provide the API functionality and related installation instructions, see [Catalog Search API Feature Integration](). - -## Searching for Products -To search for products, send GET requests to the following endpoint: -`/catalog-search` -Request sample: `GET http://mysprykershop.com/catalog-search?q=` -The above request is the same as searching with an empty search field in Spryker front-end (no search parameters provided). By executing such a test search request, you can get search settings, such as sorting and pagination options, a default number of items per page etc. - -{% info_block warningBox %} -Search settings are defined by the front-end search configuration. In other words, the REST API uses search settings of Spryker Shop Application. -{% endinfo_block %} - -## Sorting Parameters -| Field* | Type | Description | -| --- | --- | --- | -| sortParamNames | String | List of possible sorting parameters such as "name_asc" or "price_desc" | -| sortParamLocalizedNames | String | Localized names of the sorting parameters available as well as the sorting parameters themselves | -| currentSortParam | String | The currently applied sorting parameter | -| currentSortOrder | String | The currently applied sorting order | - -\*The fields mentioned are all attributes in the response. Type and ID are not mentioned. - -**Pagination** -| Field* | Type | Description | -| --- | --- | --- | -| numFound | String | Number of search results | -| currentPage | String | Current page of search results | -| maxPage | String | Total number of search results pages | -| currentItemsPerPage | String | Number of search results on the current page | -| defaultItemsPerPage | String | Default number of search results on one page | -| validItemsPerPageOptions | String | Another number of search results per page options | - -\*The fields mentioned are all attributes in the response. Type and ID are not mentioned. - -## Abstract Product Information -| Field* | Type | Description | -| --- | --- | --- | -| externalUrlSmall | String | URLs to the image per image set per image | -| externalUrlLarge | String | URLs to the image per image set per image | -| price | Integer | Price to pay for that product in cents | -| abstractName | String | Name of the abstract product | -| abstractSku | String | SKU of the abstract product | - -\*The fields mentioned are all attributes in the response. Type and ID are not mentioned. - -## Abstract Product Price Information -| Field* | Type | Description | -| --- | --- | --- | -| code | String | Currency code | -| name | String | Currency name | -| symbol | Integer | Currency symbol | - -\*The fields mentioned are all attributes in the response. Type and ID are not mentioned. - -
    -Sample empty response (no products found) - -```js -{ - "data": [ - { - "type": "catalog-search", - "id": null, - "attributes": { - "currency": "EUR", - "sort": { - "sortParamNames": [ - "rating", - "name_asc", - "name_desc", - "price_asc", - "price_desc" - ], - "sortParamLocalizedNames": { - "rating": "Sort by product ratings", - "name_asc": "Sort by name ascending", - "name_desc": "Sort by name descending", - "price_asc": "Sort by price ascending", - "price_desc": "Sort by price descending" - }, - "currentSortParam": null, - "currentSortOrder": null - }, - "pagination": { - "numFound": 0, - "currentPage": 0, - "maxPage": 0, - "currentItemsPerPage": 12, - "config": { - "parameterName": "page", - "itemsPerPageParameterName": "ipp", - "defaultItemsPerPage": 12, - "validItemsPerPageOptions": [ - 12, - 24, - 36 - ] - } - }, - "abstractProducts": {}, - "valueFacets": {}, - "rangeFacets": {}, - "spellingSuggestion": null - }, - "links": { - "self": "http://glue.90.spryker-shop-b2c.com/catalog-search" - } - } - ], - "links": { - "self": "http://glue.90.spryker-shop-b2c.com/catalog-search" - } - } -``` -
    -
    - -To search for products, you need to add search filters following the q parameter. Below are examples of the most common filters you can use: -| Request | Description | -| --- | --- | -| /catalog-search?q=**camera** | Search for any **camera** products | -| /catalog-search?q=camera&price%5Bmin%5D=**157**&price%5Bmax%5D=**158** | Search for camera products with price between **157** and **158** | -| /catalog-search?q=camera**&label%5B%5D=SALE+%25** | Search for **camera** products with a **SALE+%25** label | -| /catalog-search?q=camera&**brand=Canon** | Search for **Canon**-branded **camera** products | -| /catalog-search?**color[]=White**&q=camera | Search for **white camera** products | -| /catalog-search?**weight[]=132+g**&q=camera | Search for **camera** products with weight **132 g** | - -
    -Sample response for a valid request - -```js -{ - "data": { - "type": "catalog-search", - "id": null, - "attributes": { - "sort": { - "sort_param_names": [ - "rating", - "name_asc", - "name_desc", - "price_asc", - "price_desc" - ], - "current_sort_param": "1", - "current_sort_order": null - }, - "pagination": { - "num_found": 3, - "current_page": 1, - "max_page": 1, - "current_items_per_page": 12, - "config": { - "parameter_name": "page", - "items_per_page_parameter_name": "ipp", - "default_items_per_page": 12, - "valid_items_per_page_options": [ - 12, - 24, - 36 - ] - } - }, - "abstractProducts": [ - { - "images": [ - { - "externalUrlSmall": "//d2s0ynfc62ej12.cloudfront.net/b2c/26175504-2265.jpg", - "externalUrlLarge": "//d2s0ynfc62ej12.cloudfront.net/b2c/26175504-2265.jpg" - } - ], - "price": 36742, - "abstractName": "Acer Liquid Jade", - "prices": [ - { - "priceTypeName": "DEFAULT", - "currency": { - "code": "EUR", - "name": "Euro", - "symbol": "€" - }, - "grossAmount": 36742, - "DEFAULT": 36742 - }, - { - "priceTypeName": "ORIGINAL", - "currency": { - "code": "EUR", - "name": "Euro", - "symbol": "€" - }, - "grossAmount": 40000, - "ORIGINAL": 40000 - } - ], - "abstractSku": "059" - } - ], - "valueFacets": [ - { - "name": "category", - "localizedName": "Categories", - "docCount": null, - "values": [ - { - "value": 1, - "doc_count": 24 - }, - { - "value": 5, - "doc_count": 12 - }, - { - "value": 14, - "doc_count": 8 - }, - { - "value": 6, - "doc_count": 7 - }, - { - "value": 11, - "doc_count": 7 - }, - { - "value": 12, - "doc_count": 7 - }, - { - "value": 9, - "doc_count": 5 - }, - { - "value": 10, - "doc_count": 5 - }, - { - "value": 8, - "doc_count": 3 - }, - { - "value": 7, - "doc_count": 2 - } - ], - "activeValue": null, - "config": { - "parameterName": "category", - "isMultiValued": false - } - }, - { - "name": "label", - "localizedName": "Label", - "docCount": null, - "values": [ - { - "value": "SALE %", - "doc_count": 7 - }, - { - "value": "Standard Label", - "doc_count": 3 - }, - { - "value": "New", - "doc_count": 1 - } - ], - "activeValue": null, - "config": { - "parameterName": "label", - "isMultiValued": true - } - }, - { - "name": "color", - "localizedName": "Color", - "docCount": null, - "values": [ - { - "value": "Black", - "doc_count": 9 - }, - { - "value": "White", - "doc_count": 8 - }, - { - "value": "Grey", - "doc_count": 2 - }, - { - "value": "Silver", - "doc_count": 2 - }, - { - "value": "Blue", - "doc_count": 1 - }, - { - "value": "Navy", - "doc_count": 1 - } - ], - "activeValue": null, - "config": { - "parameterName": "color", - "isMultiValued": true - } - }, - { - "name": "storage_capacity", - "localizedName": "Storage Capacity", - "docCount": null, - "values": [], - "activeValue": null, - "config": { - "parameterName": "storage_capacity", - "isMultiValued": true - } - }, - { - "name": "brand", - "localizedName": "Brand", - "docCount": null, - "values": [ - { - "value": "Acer", - "doc_count": 19 - }, - { - "value": "TomTom", - "doc_count": 3 - }, - { - "value": "Asus", - "doc_count": 2 - } - ], - "activeValue": null, - "config": { - "parameterName": "brand", - "isMultiValued": false - } - }, - { - "name": "touchscreen", - "localizedName": "Touchscreen", - "docCount": null, - "values": [ - { - "value": "yes", - "doc_count": 1 - } - ], - "activeValue": null, - "config": { - "parameterName": "touchscreen", - "isMultiValued": false - } - }, - { - "name": "weight", - "localizedName": "Weight", - "docCount": null, - "values": [ - { - "value": "46 g", - "doc_count": 3 - }, - { - "value": "4.4 oz", - "doc_count": 2 - }, - { - "value": "18 g", - "doc_count": 1 - }, - { - "value": "20 g", - "doc_count": 1 - } - ], - "activeValue": null, - "config": { - "parameterName": "weight", - "isMultiValued": true - } - } - ], - "rangeFacets": [ - { - "name": "price-DEFAULT-EUR-GROSS_MODE", - "localizedName": "Price", - "min": 1879, - "max": 44436, - "activeMin": 1879, - "activeMax": 44436, - "docCount": null, - "config": { - "parameterName": "price", - "isMultiValued": false - } - }, - { - "name": "rating", - "localizedName": "Ratings", - "min": 0, - "max": 0, - "activeMin": 0, - "activeMax": 0, - "docCount": null, - "config": { - "parameterName": "rating", - "isMultiValued": false - } - } - ], - "spelling_suggestion": "cameras" - }, - "links": { - "self": "http://glue.de.shop-suite.local/search" - } - } -} -``` -
    -
    - -## Sorting Search Results -You can also define how products are sorted. By default, when you send a search request, in the response you will get information on which sorting options are available. The sorting options are contained in the **data/attributes/sort** section of a search response: - -| Field* | Type | Description | -| --- | --- | --- | -| sortParamNames | String | List of possible sorting parameters such as "name_asc" or "price_desc" | -| sortParamLocalizedNames | String | Localized names of the sorting parameters available as well as the sorting parameters themselves | -| currentSortParam | String | Currently applied sorting parameter | -| currentSortOrder | String | Currently applied sorting order | - -\*The fields mentioned are all attributes in the response. Type and ID are not mentioned. - -**Sample response** -```js -{ - "data": { - "type": "search", - ... - "sort": { - "sort_param_names": [ - "rating", - "name_asc", - "name_desc", - "price_asc", - "price_desc" - ], - "current_sort_param": "1", - "current_sort_order": null - }, -``` - -You can use the sort options to specify how to output search results in a search response: -| Request | Description | -| --- | --- | -| /catalog-search?sort=**rating**&q=cameras | Sort cameras by **product ratings**. | -| /catalog-search?sort=**name_asc**&q=cameras | Sort cameras by **name ascending**. | -| /catalog-search?sort=**name_desc**&q=cameras | Sort cameras by **name descending**. | -| /catalog-search?sort=**price_asc**&q=cameras | Sort cameras by **price ascending**. | -| /catalog-search?sort=**price_desc**&q=cameras | Sort cameras by **price descending**. | - -{% info_block warningBox %} -Sort settings are defined by the front-end search configuration. In other words, the REST API uses sort settings of Spryker Shop Application. -{% endinfo_block %} - -## Pagination -To optimize network and resource utilization, you can also paginate the search results. Pagination options can also be retrieved from a search response. They are located in **data/attributes/pagination**. - -| Field* | Type | Description | -| --- | --- | --- | -| numFound | String | Number of search results | -| currentPage | String | Current page of search results | -| maxPage | String | Total number of search results pages | -| currentItemsPerPage | String | Number of search results on the current page | -| defaultItemsPerPage | String | Default number of search results on one page | -| validItemsPerPageOptions | String | Another number of search results per page options | - -\*The fields mentioned are all attributes in the response. Type and ID are not mentioned. - -**Sample response** -```js -{ - "data": { - "type": "search", - ... - "pagination": { - "numFound": 632, - "currentPage": 4, - "maxPage": 53, - "currentItemsPerPage": 12, - "config": { - "parameterName": "page", - "itemsPerPageParameterName": "ipp", - "defaultItemsPerPage": 12, - "validItemsPerPageOptions": [ - 12, - 24, - 36 - ] - } - } - }, - - "links": { - "self": "http://mysprykershop.com/catalog-search?q=canon&include=&page[offset]=12&page[limit]=12", - "last": "http://mysprykershop.com/catalog-search?q=canon&include=&page[offset]=24&page[limit]=12", - "first": "http://mysprykershop.com/catalog-search?q=canon&include=&page[offset]=0&page[limit]=12", - "prev": "http://mysprykershop.com/catalog-search?q=canon&include=&page[offset]=0&page[limit]=12", - "next": "http://mysprykershop.com/catalog-search?q=canon&include=&page[offset]=24&page[limit]=12" - } - } -``` - -The number of items per page is controlled by the parameter which name is specified in the **itemsPerPageParameterName** attribute (by default, ipp). The default number of items per page and available options for pagination are returned by the **defaultItemsPerPage** and **validItemsPerPageOptions** parameters respectively. - -In the following table, you can find some sample requests that use pagination: - -| Request | Description | -| --- | --- | -| /catalog-search?q=canon&page[offset]=0&**page[limit]=36** | Show **36** items per page. | -| /catalog-search?q=canon&**page[offset]=12**&page[limit]=12 | Use the default number of products per page and show the **2nd** page. | -| /catalog-search?q=canon&**page[offset]=48**&page[limit]=24 | Show **24** items per page and page number **3**. | - -{% info_block warningBox %} -Pagination settings are defined by the front-end search configuration. In other words, the REST API uses pagination settings of Spryker Shop Application. -{% endinfo_block %} diff --git a/docs/scos/dev/glue-api-guides/202005.0/security-and-authentication.md b/docs/scos/dev/glue-api-guides/202005.0/security-and-authentication.md deleted file mode 100644 index 6f98bfe0fe1..00000000000 --- a/docs/scos/dev/glue-api-guides/202005.0/security-and-authentication.md +++ /dev/null @@ -1,135 +0,0 @@ ---- -title: Security and Authentication -description: This article describes the authorization mechanism used in Spryker, the modules that provide it, as well as user scopes, database tables, and extension points. -last_updated: Jun 16, 2021 -template: glue-api-storefront-guide-template -originalLink: https://documentation.spryker.com/2021080/docs/security-and-authentication -originalArticleId: f37cbced-75fa-4ea4-aad6-7afdeea109a4 -redirect_from: - - /2021080/docs/security-and-authentication - - /2021080/docs/en/security-and-authentication - - /docs/security-and-authentication - - /docs/en/security-and-authentication - - /v6/docs/security-and-authentication - - /v6/docs/en/security-and-authentication - - /v5/docs/security-and-authentication - - /v5/docs/en/security-and-authentication -related: - - title: Glue Infrastructure - link: docs/scos/dev/glue-api-guides/page.version/glue-infrastructure.html ---- - -When exposing information via Spryker Glue API and integrating with third-party applications, it is essential to protect API endpoints from unauthorized access. For this purpose, Spryker provides an authorization mechanism, using which you can request users to authenticate themselves before accessing a resource. For this purpose, Spryker Glue is shipped with an implementation of the OAuth 2.0 protocol. It allows users to authenticate themselves with their username and password and receive an access token. The token can then be used to access protected resources. - -The authorization mechanism provided by the Glue is flexible and allows you to define which endpoints specifically require authentication. Usually, protected endpoints include customer wish lists, carts, personal data and the like. Also, you may want to protect additional areas as required by your project. In addition to endpoints, you may require authorization to use specific REST verbs. For example, a certain endpoint can allow retrieving information, but not modifying it. In this case, the GET verb can be allowed for usage without authentication, while the PUT, PATCH and DELETE verbs will require user authentication to use. - -## How Authentication Works -To authenticate a user, the client must send an authentication request, containing the username and password. If the provided credentials match a valid Spryker user, the API responds with a 201 response code and a message containing an access token, also known as a bearer token. The token can then be used to access protected API resources. Schematically, the authentication and authorization scheme of Spryker REST API can be represented as follows: - -![auth-scheme.png](https://spryker.s3.eu-central-1.amazonaws.com/docs/Glue+API/Glue+API+Developer+Guides/Security+and+Authentication/auth-scheme.png) - -Access tokens issued by the API have a limited lifetime. When a token is issued, the response message contains not only the access token, but also the duration of its validity, in seconds, and a refresh token. Once the access token expires, the corresponding refresh token can be exchanged for a new pair of access and refresh tokens. - -If an invalid or expired token is passed when accessing a protected resource, or no token is passed at all, the API will respond with a 401 Unauthorized response code. This response code will also be issued if a user is not authorized to access that particular resource. The response body will contain a detailed error message. It is, therefore, the client's responsibility to handle the 401 response code and error messages correctly. - -Authentication workflow: -![authentication-workflow.PNG](https://spryker.s3.eu-central-1.amazonaws.com/docs/Glue+API/Glue+API+Developer+Guides/Security+and+Authentication/authentication-workflow.png) - -## Modules -Authentication and authorization are provided by the following modules: - -| Name | Purpose | -| --- | --- | -| league/oauth2-server | Third-party OAuth server, PhpLeague Oauth Server, integrated into Spryker | -| Oauth | Integrates PhpLeague Oauth Server with Spryker and also provides the necessary extension points. | -| OauthExtension | Provides extension point and plugin interfaces for the Oauth module. | -| OauthCustomerConnector | Provides authentication plugins for OAuth modules necessary to validate user credentials and scopes. | -| AuthRestApi | Provides authentication resources to the REST API. | - -## User Scopes -The API has scopes defined for different groups of users. A scope defines, which resources specifically users can access. - -{% info_block warningBox "Note" %} -By default, all Spryker customers are assigned to the customer scope. -{% endinfo_block %} - -To identify, which user has made a request, you can use the `getRestUser()` function of `RestRequestInterface`, for example: - -```php -class MyResourceHandler implements MyResourceInterface - /** - * @param \Spryker\Glue\GlueApplication\Rest\Request\Data\RestRequestInterface $restRequest - * - * @return \Generated\Shared\Transfer\CustomerTransfer - */ - protected function getCustomerTransfer(RestRequestInterface $restRequest): CustomerTransfer - { - return (new CustomerTransfer())->setCustomerReference($restRequest->getRestUser()->getNaturalIdentifier()); - } -``` - -To identify the user, you can use the `getSurrogateIdentifier` and `getNaturalIdentifier` functions: - -``` -$restRequest->getRestUser()->getSurrogateIdentifier(); -$restRequest->getRestUser()->getNaturalIdentifier(); -``` - -### Company User Scope -In the B2B scenario, a user can be associated with an additional scope, `company_user`. This scope is added in the following cases: - -* the user has impersonated as a Company User via the `/company-user-access-tokens` endpoint; -* the user is associated with a **single** Company User account; -* the user is associated with **several** Company User accounts and there is a default one. - -Using this additional scope, you can perform additional checks to identify whether a resource should be available to a user. For this purpose, you can identify which Company User account is currently active, and also what company and business unit it belongs to. This can be done using the following helper methods: - -```php -$restRequest->getRestUser()->getIdCompanyUser(); -$restRequest->getRestUser()->getIdCompanyBusinessUnit(); -$restRequest->getRestUser()->getIdCompany(); -``` - -{% info_block infoBox "Info" %} -B2B functionality is available in Spryker Glue API since version 201907.0. -{% endinfo_block %} - -## Endpoint Protection -In addition to user scopes, each endpoint can be secured individually. For this purpose, you need to configure the routing of your Resource Feature Module. The Route Plugins of each module define which verbs are supported by the corresponding endpoint. This is done via the config function of the plugin class. The verbs are passed to it as a set of functions that should be called when the corresponding verb is passed. - -{% info_block infoBox %} -For details, see [Resource Routing](/docs/scos/dev/concepts/glue-api/glue-infrastructure.html#resource-routing). -{% endinfo_block %} - - -For each function in the set, the second parameter determines, whether the corresponding verb requires authentication to use (the parameter value is true) or not (the value is false). If the parameter is not passed, the verb requires authentication. - -In the following example, the PUT and DELETE verbs require authentication, and the GET verb can be called anonymously. - -```php -... -class MyResourceRoutePlugin extends AbstractPlugin implements ResourceRoutePluginInterface -{ - public function configure(ResourceRouteCollectionInterface $resourceRouteCollection): ResourceRouteCollectionInterface - { - $resourceRouteCollection->addPost('post') - ->addDelete('delete', true) - ->addGet('get', false); - ... -``` - -## Database and Extension Points -All data related to API authentication functionality is stored in the following tables: - -|Table| Purpose| -| --- | --- | -| spy_oauth_access_token| Stores all issued tokens.
    The table is not used for token verification, it is added for audit purposes only. | -| spy_oauth_client|Contains a list of clients that are currently using OAuth, one record for each frontend customer. The `is_confidental` field identifies whether a specific client must provide a password. | -| spy_oauth_scope | Stores user scopes.| - -The `OAuth` and `OAuthExtension` modules also provides the following extension points: - -|Extension Point |Method| Interface| -| --- | --- | --- | -|User provider plugins|`getUserProviderPlugins()`|`\Spryker\Zed\OauthExtension\Dependency\Plugin\OauthUserProviderPluginInterface`| -|Scope provider plugins|`getScopeProviderPlugins()`|`\Spryker\Zed\OauthExtension\Dependency\Plugin\OauthScopeProviderPluginInterface`| diff --git a/docs/scos/dev/technology-partner-guides/202005.0/hosting-providers/integrating-heroku.md b/docs/scos/dev/technology-partner-guides/202005.0/hosting-providers/integrating-heroku.md deleted file mode 100644 index bb80eb7b0f1..00000000000 --- a/docs/scos/dev/technology-partner-guides/202005.0/hosting-providers/integrating-heroku.md +++ /dev/null @@ -1,192 +0,0 @@ ---- -title: Integrating Heroku -last_updated: Apr 3, 2020 -template: howto-guide-template -originalLink: https://documentation.spryker.com/v5/docs/hosting-provider-continum-1 -originalArticleId: e76aff70-95fe-444a-b692-ec5c722ce75f -redirect_from: - - /v5/docs/hosting-provider-continum-1 - - /v5/docs/en/hosting-provider-continum-1 -related: - - title: Technology Partner Integration - link: docs/scos/user/technology-partners/page.version/technology-partners.html ---- - -This article describes the aspects you need to consider when using Heroku as an application hosting solution. - -In the scenario described below, 3 applications will be sharing the Redis, Elasticsearch and database add-ons between them. - -* Preconditions -* Applications -* Heroku Configuration Variables -* Configuration -* Build & Composer -* Setup shop with data - -## Preconditions - -In order to work closely with Heroku, make sure to [install heroku console](https://devcenter.heroku.com/articles/heroku-cli). - -## Applications - -In our example, Redis and Elasticsearch add-ons are attached to Yves (front-end application), while the database add-on is attached to Zed (back-end application).
    -Please make sure to install proper version of ES and Redis, refer to [installation guide](/docs/scos/dev/set-up-spryker-locally/installing-spryker-with-development-virtual-machine/installing-spryker-with-devvm-on-macos-and-linux.html).
    -Install required add-ons only in one application, and copy configuration string to the other one. - -The application you setup will be sharing the add-ons between them so you are free to set it up to your needs. - -## Yves - -The front-end application uses Redis and Elasticsearch as data stores. - -* nginx config: `nginx_Yves.conf` -* setup script: `setup-Yves.sh` - -Procfile web: `vendor/bin/heroku-php-nginx -l data/DE/logs/application.log -C deploy/heroku/conf/nginx_Yves.conf -F deploy/heroku/conf/fpm_custom.conf public/Yves/` - -Add-ons: - -Redis - Elasticsearch - -## Zed - -The back-end application must connect to the SQL database, Redis and Elasticsearch data stores. - -nginx config: `nginx_Zed.conf` - -setup script: `setup-Zed.sh` - -Procfile: web:`phpvendor/bin/heroku-php-nginx -l data/DE/logs/application.log -C deploy/heroku/conf/nginx_Zed.conf -F deploy/heroku/conf/fpm_custom.conf public/Zed/` - -Add-ons: - -* Redis (the same instance as Yves) -* Elasticsearch (the same instance as Yves) -* Database - -## Data (for Development Purposes Only) - -It is not recommend to populate Heroku environment with data during build/deployment. - -This application populates the database, Redis and Elasticsearch data stores with test data. - -nginx config: `nginx_Data.conf` - -setup script: `setup-Data.sh` - -Procfile: irrelevant, as this is only a console application - -Add-ons: - -* Redis (the same instance as Yves and Zed) -* Elasticsearch (the same instance as Yves and Zed) -* Database (the same instance as Zed) - -## Heroku Configuration Variables - -In this example we'll be using Bonsai (for Elasticsearch), RedisCloud (for Redis) and PostgreSql (for the database) add-ons. - -Besides strictly Heroku related settings, there is only one variable that is different per application: `APPLICATION_NAME`. - -The others settings are required and must be specified for each application even though they share the same values. - -### Configuration for Yves -```php -APPLICATION_ENV="development-heroku" -APPLICATION_NAME="Yves" -APPLICATION_STORE="DE" -BONSAI_URL="http://foo:bar@cloud" -DATABASE_URL="postgres://foo:bar@cloud:5432/dbname" -ELASTIC_SEARCH_URL_NAME="BONSAI_URL" -REDISCLOUD_URL="redis://foo:bar@cloud:15250" -REDIS_URL_NAME="REDISCLOUD_URL" -YVES_HOST="spryker-yves.herokuapp.com" -YVES_HOST_PROTOCOL="https://" -ZED_HOST="spryker-zed.herokuapp.com" -ZED_HOST_PROTOCOL="https://" -``` - -### Configuration for Zed -```php -APPLICATION_ENV="development-heroku" -APPLICATION_NAME="Zed" -APPLICATION_STORE="DE" -BONSAI_URL="http://foo:bar@cloud" -DATABASE_URL="postgres://foo:bar@cloud:5432/dbname" -ELASTIC_SEARCH_URL_NAME="BONSAI_URL" -REDISCLOUD_URL="redis://foo:bar@cloud:15250" -REDIS_URL_NAME="REDISCLOUD_URL" -YVES_HOST="spryker-yves.herokuapp.com" -YVES_HOST_PROTOCOL="https://" -ZED_HOST="spryker-zed.herokuapp.com" -ZED_HOST_PROTOCOL="https://" -``` -Configuration for Data application (development environment only): -```php -APPLICATION_ENV="development-heroku" -APPLICATION_NAME="Data" -APPLICATION_STORE="DE" -BONSAI_URL="http://foo:bar@cloud" -DATABASE_URL="postgres://foo:bar@cloud:5432/dbname" -ELASTIC_SEARCH_URL_NAME="BONSAI_URL" -REDISCLOUD_URL="redis://foo:bar@cloud:15250" -REDIS_URL_NAME="REDISCLOUD_URL" -YVES_HOST="spryker-yves.herokuapp.com" -YVES_HOST_PROTOCOL="https://" -ZED_HOST="spryker-zed.herokuapp.com" -ZED_HOST_PROTOCOL="https://" -``` -`REDIS_URL_NAME` and `ELASTIC_SEARCH_URL_NAME` should point to the Heroku add-on you decided to use. - -Depending on your infrastructure, you might want to configure `GITHUB_AUTH_TOKEN` and `COMPOSER_GITHUB_OAUTH_TOKEN` as well. - - You should customize `APPLICATION_ENV` and use proper staging/production environments if you intend to use Heroku as your hosting environment. - -### HEROKU NGINX Configuration and Procfile - -Copy `deploy/heroku/conf/Procfile` to the root folder of your project. You can customize it according to your needs. - -## - -The general idea is that the Heroku specific configuration is read from the environment variables, which are configured in Heroku Config variables. - -Check `config_default-development-heroku.php `and `config_default-development-heroku_DE.php` under the config/Shared/ folder, for configuration examples on how to use Heroku config variables inside Spryker config. - -## Build & Composer - -The build process on Heroku must trigger setup script for each of the applications. - - Add this to `composer.json` to trigger setup process during Heroku deployment (assuming your configuration is stored under development-heroku* configuration files). - -```php -"scripts": { - "compile": [ - "mkdir -p ./data/DE/logs", - "echo ' config/Shared/console_env_local.php", - "./deploy/heroku/run.sh" - ] - } - ``` - -You might need to change `minimum-stability` from `dev` to `stable`, depending on your Heroku setup. - -## Heroku Build Packs - -heroku/nodejs - -heroku/php - -[https://github.com/weibeld/heroku-buildpack-graphviz.git](https://github.com/weibeld/heroku-buildpack-graphviz.git) - -## Setup Shop With Data - -In order to install demoshop data on the heroku, please login to zed application: -```php -heroku run bash --app spryker-zed -``` - -and run: -```php -./deploy/heroku/setup-Data-manually.sh -i -``` diff --git a/docs/scos/dev/technology-partner-guides/202005.0/marketing-and-conversion/analytics/fact-finder/exporting-product-data-for-fact-finder.md b/docs/scos/dev/technology-partner-guides/202005.0/marketing-and-conversion/analytics/fact-finder/exporting-product-data-for-fact-finder.md deleted file mode 100644 index 8e7dc8d5e16..00000000000 --- a/docs/scos/dev/technology-partner-guides/202005.0/marketing-and-conversion/analytics/fact-finder/exporting-product-data-for-fact-finder.md +++ /dev/null @@ -1,95 +0,0 @@ ---- -title: Exporting product data for FACT-Finder -description: Export data to FACT-Finder CSV by applying the configuration. -last_updated: Sep 15, 2020 -template: howto-guide-template -originalLink: https://documentation.spryker.com/v5/docs/search-factfinder-export-csv -originalArticleId: 190b3f92-5533-4a41-9670-347151093c69 -redirect_from: - - /v5/docs/search-factfinder-export-csv - - /v5/docs/en/search-factfinder-export-csv -related: - - title: FACT-Finder - link: docs/scos/user/technology-partners/page.version/marketing-and-conversion/analytics/fact-finder.html - - title: Installing and configuring FACT-Finder NG API - link: docs/scos/dev/technology-partner-guides/page.version/marketing-and-conversion/analytics/fact-finder/installing-and-configuring-the-fact-finder-ng-api.html - - title: Using FACT-Finder tracking - link: docs/scos/dev/technology-partner-guides/page.version/marketing-and-conversion/analytics/fact-finder/using-fact-finder-tracking.html - - title: Using FACT-Finder recommendation engine - link: docs/scos/dev/technology-partner-guides/page.version/marketing-and-conversion/analytics/fact-finder/using-fact-finder-recommendation-engine.html - - title: Using FACT-Finder search suggestions - link: docs/scos/dev/technology-partner-guides/page.version/marketing-and-conversion/analytics/fact-finder/using-fact-finder-search-suggestions.html - - title: Using FACT-Finder search - link: docs/scos/dev/technology-partner-guides/page.version/marketing-and-conversion/analytics/fact-finder/using-fact-finder-search.html - - title: Using FACT-Finder campaigns - link: docs/scos/dev/technology-partner-guides/page.version/marketing-and-conversion/analytics/fact-finder/using-fact-finder-campaigns.html ---- - -## Output Folder - -Define an output folder where the CSV files will be generated by adding the following line in your configuration file: -```php - [ - 'url' => 'http://search-web-components.fact-finder.de/FACT-Finder-7.2', - 'version' => '7.2', - 'default-query' => 'trousers', - 'channel' => 'heroku-fact-finder-de_DE', - 'search-immediate' => false, - ], -]; -... -``` - -To set up the components configuration, use the following config code as an example: - -
    -config/Shared/config_default.php - -```php -... -$config[FactFinderWebComponentsConstants::BREADCRUMB_COMPONENT_CONFIG] = [ - 'properties' => [ - 'show-only' => false, - ], - 'items' => [ - 'search', - 'filter', - 'advisor', - ], -]; - -$config[FactFinderWebComponentsConstants::SEARCH_BOX_COMPONENT_CONFIG] = [ - 'properties' => [ - 'suggest-onfocus' => 'true', - 'use-suggest' => 'true', - ], -]; - -$config[FactFinderWebComponentsConstants::SEARCH_BUTTON_COMPONENT_CONFIG] = [ - 'suggest-onfocus' => false, - 'hidesuggest-onblur' => true, - 'select-onclick' => false, - 'use-suggest' => false, - 'suggest-delay' => 0, -]; - -$config[FactFinderWebComponentsConstants::HEADER_NAVIGATION_COMPONENT_CONFIG] = [ - 'properties' => [ - 'group-count' => 4, - 'group-size' => 4, - 'hide-empty-groups' => '1', - 'fetch-initial' => '1', - ], -]; - -$config[FactFinderWebComponentsConstants::SUGGEST_CONFIG] = [ - 'properties' => [], - 'productItemType' => 'productName', - 'searchItems' => [ - [ - 'type' => 'searchTerm', - 'title' => 'Search term', - ], - [ - 'type' => 'category', - 'title' => 'Category', - ], - [ - 'type' => 'brand', - 'title' => 'Brand', - ], - ], -]; - -$config[FactFinderWebComponentsConstants::RECORD_LIST_COMPONENT_CONFIG] = [ - 'properties' => [], - 'record' => '', -]; - -$config[FactFinderWebComponentsConstants::CHECKOUT_TRACKING_CONFIG] = [ - 'properties' => [ - 'disable-auto-tracking' => true, - ], - 'items' => [ - [ - 'recordId' => 'd44c3c7b5e52f7a6b27041c1e789e954', - 'count' => '2', - ], - [ - 'recordId' => '19532fa96a8e60a27328f01520cc4', - 'count' => '4', - ], - ], -]; - -$config[FactFinderWebComponentsConstants::RECORD_COMPONENT_CONFIG] = [ - 'subscribe' => 'true', - 'is-recommendation' => false, - 'infinite-scrolling' => true, - 'infinite-debounce-delay' => 32, - 'infinite-scroll-margin' => 0, -]; - -$config[FactFinderWebComponentsConstants::ASN_GROUP_COMPONENT_CONFIG] = [ - 'opened' => false, - 'collapsible' => true, - 'lazy-load' => true, -]; - -$config[FactFinderWebComponentsConstants::ASN_GROUP_ELEMENT_CONFIG] = [ - 'selected' => true, -]; - -$config[FactFinderWebComponentsConstants::ASN_REMOVE_ALL_FILTER_CONFIG] = [ - 'align' => 'vertical', - 'show-always' => true, - 'remove-params' => false, -]; - -$config[FactFinderWebComponentsConstants::ASN_SLIDER_CONFIG] = [ - 'properties' => [ - 'align' => 'vertical', - ], -]; - -$config[FactFinderWebComponentsConstants::ASN_SLIDER_CONTROL_CONFIG] = [ - 'submit-on-input' => true, -]; - -$config[FactFinderWebComponentsConstants::PAGING_COMPONENT_CONFIG] = [ - 'properties' => [ - ], -]; - -$config[FactFinderWebComponentsConstants::PRODUCTS_PER_PAGE_COMPONENT_CONFIG] = [ - 'properties' => [ - ], - 'dropdown' => '', - 'list' => '', - 'item' => '', -]; - -$config[FactFinderWebComponentsConstants::SORT_BOX_COMPONENT_CONFIG] = [ - 'properties' => [ - ], - 'items' => [ - [ - 'key' => 'default.template', - 'title' => 'factfinder.web-components.sort.box.default.style', - ], - [ - 'key' => 'Price.asc', - 'title' => 'factfinder.web-components.sort.box.overriden.for', - ], - [ - 'key' => 'null.desc', - 'title' => 'factfinder.web-components.sort.box.relevance', - ], - ], -]; - -$config[FactFinderWebComponentsConstants::SIMILAR_PRODUCTS_COMPONENT_CONFIG] = [ - 'properties' => [ - 'max-results' => 4, - ], - 'list' => '', - 'record' => '', -]; - -$config[FactFinderWebComponentsConstants::SIMILAR_PRODUCT_ID_CONFIG] = [ - 'recordId' => 'd44c3c7b5e52f7a6b27041c1e789e954', -]; - -$config[FactFinderWebComponentsConstants::RECOMMENDATION_CONFIG] = [ - 'properties' => [ - 'max-results' => 4, - ], - 'list' => '', - 'record' => '', -]; - -$config[FactFinderWebComponentsConstants::RECOMMENDATION_RECORD_ID_CONFIG] = [ - 'recordId' => '19532fa96a8e60a27328f01520cc4', -]; - -$config[FactFinderWebComponentsConstants::TAG_CLOUD_COMPONENT_CONFIG] = [ - 'properties' => [ - ], -]; - -$config[FactFinderWebComponentsConstants::PUSHED_PRODUCTS_COMPONENT_CONFIG] = [ - 'properties' => [ - ], - 'list' => '', - 'record' => '', -]; - -$config[FactFinderWebComponentsConstants::CAMPAIGN_COMPONENT_CONFIG] = [ - 'properties' => [ - ], - 'answer' => '', - 'question' => '', - 'feedbacktext' => '', -]; -... -``` -
    -
    - -## Integration into Project - -**frontend/settings.js** - -```js -// define project relative paths to context -const paths = { - ... - - // eco folders - eco: { - // all modules - modules: './vendor/spryker-eco' - }, - - // project folders - project: { - ... - } -}; - -... - -// export settings -module.exports = { - ... - - // define settings for suite-frontend-builder finder - find: { - // webpack entry points (components) finder settings - componentEntryPoints: { - // absolute dirs in which look for - dirs: [ - ... - path.join(context, paths.eco.modules), - ... - ], - ... - }, - - ... - } -} -``` - -**src/Pyz/Yves/ShopUi/Theme/default/es6-polyfill.ts** - -```js -// add es6 polyfill -import 'core-js/fn/promise'; -import 'core-js/fn/array'; -import 'core-js/fn/set'; -import 'core-js/fn/map'; - -// check if the browser natively supports webcomponents (and es6) -const hasNativeCustomElements = !!window.customElements; - -// then load a shim for es5 transpilers (typescript or babel) -// https://github.com/webcomponents/webcomponentsjs#custom-elements-es5-adapterjs -if (hasNativeCustomElements) { - import(/* webpackMode: "eager" */'@webcomponents/webcomponentsjs/custom-elements-es5-adapter'); -} -``` - -**src/Pyz/Yves/ShopUi/Theme/default/vendor.ts** - -```js -// add es6 polyfill -import 'core-js/fn/promise'; -import 'core-js/fn/array'; -import 'core-js/fn/set'; -import 'core-js/fn/map'; - -// check if the browser natively supports webcomponents (and es6) -const hasNativeCustomElements = !!window.customElements; - -// then load a shim for es5 transpilers (typescript or babel) -// https://github.com/webcomponents/webcomponentsjs#custom-elements-es5-adapterjs -if (hasNativeCustomElements) { - import(/* webpackMode: "eager" */'@webcomponents/webcomponentsjs/custom-elements-es5-adapter'); -} -``` - -**src/Pyz/Yves/ShopUi/Theme/default/vendor.ts** - -```js -// add webcomponents polyfill -import '@webcomponents/webcomponentsjs/custom-elements-es5-adapter'; -import '@webcomponents/webcomponentsjs/webcomponents-loader'; -import '@webcomponents/webcomponentsjs/webcomponents-bundle'; -import 'ff-web-components/dist/bundle'; -``` - -Update in Core "@webcomponents/webcomponentsjs": "^2.0.4", - - **package.json** - -```json -"dependencies": { -"ff-web-components": "git+https://github.com/FACT-Finder-Web-Components/ff-web-components.git#release/3.0" -}, -``` - -## Frontend Integration - -Add the required Communication element: - -```html -{% raw %}{%{% endraw %} block content {% raw %}%}{% endraw %} - {% raw %}{%{% endraw %} include atom('communication', 'FactFinderWebComponents') with { - data: { - properties: { - component: 'url="http://search-web-components.fact-finder.de/FACT-Finder-7.2" version="7.2" default-query="trousers" channel="bergfreunde-co-uk" search-immediate="true"' - } - } - } only {% raw %}%}{% endraw %} - -{% raw %}{%{% endraw %} endblock {% raw %}%}{% endraw %} -``` - -Add a widget: -```json -{% raw %}{%{% endraw %} block content {% raw %}%}{% endraw %} - {% raw %}{%{% endraw %} include atom('communication', 'FactFinderWebComponents') with { - data: { - properties: { - component: 'url="http://search-web-components.fact-finder.de/FACT-Finder-7.2" version="7.2" default-query="trousers" channel="bergfreunde-co-uk" search-immediate="true"' - } - } - } only {% raw %}%}{% endraw %} - - {% raw %}{%{% endraw %} include atom('header-navigation', 'FactFinderWebComponents') with { - data: { - properties: { - component: 'group-count="4" group-size="4" hide-empty-groups="1" fetch-initial="1"' - } - } - } only {% raw %}%}{% endraw %} -{% raw %}{%{% endraw %} endblock {% raw %}%}{% endraw %} -``` diff --git a/docs/scos/dev/technology-partner-guides/202005.0/marketing-and-conversion/analytics/fact-finder/installing-and-configuring-fact-finder.md b/docs/scos/dev/technology-partner-guides/202005.0/marketing-and-conversion/analytics/fact-finder/installing-and-configuring-fact-finder.md deleted file mode 100644 index cfa6b45bb4f..00000000000 --- a/docs/scos/dev/technology-partner-guides/202005.0/marketing-and-conversion/analytics/fact-finder/installing-and-configuring-fact-finder.md +++ /dev/null @@ -1,41 +0,0 @@ ---- -title: Installing and configuring FACT-Finder -description: This article provides details on the installation and configuration of the FACT-Finder module. -template: howto-guide-template ---- - -## Installation - -Composer dependency: - -To install Spryker's FactFinder module, use [composer](https://getcomposer.org/): -```php -composer require spryker-eco/fact-finder-sdk -composer require spryker-eco/fact-finder -``` - -If you faced an issue with the FACT-Finder library dependency and it is not installed, please use the following instructions: - -1. Add `composer.json`> file to the respective section of your project, `FACT-Finder/FACT-Finder-PHP-Library": "1.3.*` -2. Add to the repositories section: - ```json -{"type": "git","url": "git@github.com:FACT-Finder/FACT-Finder-PHP-Library.git"} -``` -3. Run `composer update` command: -```bash -composer update -``` - - -## Channel Configuration - -Channel Management in FACT-Finder admin panel can be used for creating and removing the channels. It also creates parent-child hierarchy and manages backups. - -By default, channel settings should be the following: - -* File encoding - `UTF-8` -* Enclosing (quote) character - `"` -* Field separator - `,` -* Number of header lines - `1` -* Data record ID - `ProductNumber` -* Product number for tracking - `ProductNumber` diff --git a/docs/scos/dev/technology-partner-guides/202005.0/marketing-and-conversion/analytics/fact-finder/installing-and-configuring-the-fact-finder-ng-api.md b/docs/scos/dev/technology-partner-guides/202005.0/marketing-and-conversion/analytics/fact-finder/installing-and-configuring-the-fact-finder-ng-api.md deleted file mode 100644 index 0f1203bfd75..00000000000 --- a/docs/scos/dev/technology-partner-guides/202005.0/marketing-and-conversion/analytics/fact-finder/installing-and-configuring-the-fact-finder-ng-api.md +++ /dev/null @@ -1,562 +0,0 @@ ---- -title: Installing and configuring FACT-Finder NG API -description: Fact Finder NG API integration is used for search, tracking, and importing endpoints. -last_updated: Apr 3, 2020 -template: howto-guide-template -originalLink: https://documentation.spryker.com/v5/docs/fact-finder-ng -originalArticleId: fc2c2c43-67d7-4c50-8272-26f60ffd7b72 -redirect_from: - - /v5/docs/fact-finder-ng - - /v5/docs/en/fact-finder-ng -related: - - title: FACT-Finder - link: docs/scos/user/technology-partners/page.version/marketing-and-conversion/analytics/fact-finder.html - - title: Using FACT-Finder search suggestions - link: docs/scos/dev/technology-partner-guides/page.version/marketing-and-conversion/analytics/fact-finder/using-fact-finder-search-suggestions.html - - title: Using FACT-Finder search - link: docs/scos/dev/technology-partner-guides/page.version/marketing-and-conversion/analytics/fact-finder/using-fact-finder-search.html - - title: Using FACT-Finder recommendation engine - link: docs/scos/dev/technology-partner-guides/page.version/marketing-and-conversion/analytics/fact-finder/using-fact-finder-recommendation-engine.html - - title: Using FACT-Finder tracking - link: docs/scos/dev/technology-partner-guides/page.version/marketing-and-conversion/analytics/fact-finder/using-fact-finder-tracking.html - - title: Using FACT-Finder campaigns - link: docs/scos/dev/technology-partner-guides/page.version/marketing-and-conversion/analytics/fact-finder/using-fact-finder-campaigns.html - - title: Exporting product data for FACT-Finder - link: docs/scos/dev/technology-partner-guides/page.version/marketing-and-conversion/analytics/fact-finder/exporting-product-data-for-fact-finder.html ---- - -## Installation -To install the package use `composer require spryker-eco/fact-finder-ng` command. - -## Configuration -For using the package you have to set configuration parameters. -```php -$config[FactFinderNgConstants::FACT_FINDER_URL] = ''; # Fact-Finder URL -$config[FactFinderNgConstants::FACT_FINDER_CHANNEL] = ''; # Fact-Finder channel value -$config[FactFinderNgConstants::FACT_FINDER_USERNAME] = ''; # Fact-Finder user for authorization. -$config[FactFinderNgConstants::FACT_FINDER_PASSWORD] = ''; # Fact-Finder password for authorization. -``` -## Import Usage -Fact-Finder has an import API call. It can be used to update product information by URL set on the Fact-Finder side. To trigger the import, you have to add Console command to `ConsoleDependecyProvider`. - -**ConsoleDependencyProvider.php** - -```php -factFinderNgClient->trackCheckoutEvent($this->preparedCheckoutEventTransfers($quoteTransfer)); - - return parent::execute($request, $quoteTransfer); - } - - /** - * @param QuoteTransfer $quoteTransfer - * - * @return CartOrCheckoutEventTransfer[] - */ - protected function preparedCheckoutEventTransfers(QuoteTransfer $quoteTransfer): array - { - $eventTransfers = []; - foreach ($quoteTransfer->getItems() as $itemTransfer) { - $eventTransfer = new CartOrCheckoutEventTransfer(); - $eventTransfer->setCount($itemTransfer->getQuantity()); - $eventTransfer->setId($itemTransfer->getSku()); - $eventTransfer->setMasterId($itemTransfer->getAbstractSku()); - $eventTransfer->setPrice($itemTransfer->getUnitPriceToPayAggregation()); - $eventTransfer->setSid(uniqid()); - - $eventTransfers[] = $eventTransfer; - } - - return $eventTransfers; - } -} -``` - -## Search, Suggestion, Navigation Usage -For using search functions, you have to extend SearchClient on the project level. If you want to use different search engines, you might need to create search router, for choosing the right engine. - -**SearchRouter** - -```php -searchPlugins = $searchPlugins; - } - - /** - * Resolve here what the handler should be work - * - * @param \Spryker\Client\Search\Dependency\Plugin\QueryInterface $searchQuery - * @param array $resultFormatters - * @param array $requestParameters - * - * @return array|\Elastica\ResultSet - */ - public function search(QueryInterface $searchQuery, array $resultFormatters = [], array $requestParameters = []) - { - foreach ($this->searchPlugins as $searchPlugin) { - if ($searchPlugin->isApplicable($requestParameters)) { - return $searchPlugin->handle($searchQuery, $resultFormatters, $requestParameters); - } - } - - return []; - } -} -``` - -If you want to use ElasticSearch for specific cases, you have to create a plugin on the project level - -**ElasticSearchHandlerPlugin** - -```php -getFactory()->createElasticsearchSearchHandler()->search($searchQuery, $resultFormatters, $requestParameters); - } - - /** - * @param array $requestParameters - * - * @return bool - */ - public function isApplicable(array $requestParameters): bool - { - return true; - } -} -``` - -The Fact-Finder Ng module contains plugins for choosing search, suggestion, or navigation request should be used. By now you can create plugin stack in `SearchDependencyProvider` for using in `SearchRouter`. - -**SearchDependencyProvider** - -```php -provideFactFinderNgClient($container); - $container = $this->addSearchPlugins($container); - - return $container; - } - - /** - * @return \Pyz\Client\Search\Plugin\SearchHandlerPluginInterface[] - */ - protected function getSearchPlugins(): array - { - return [ - new FactFinderNgNavigationHandlerPlugin(), - new FactFinderNgSearchHandlerPlugin(), - new FactFinderNgSuggestHandlerPlugin(), - new ElasticSearchHandlerPlugin(), - ]; - } - - /** - * @param \Spryker\Client\Kernel\Container $container - * - * @return \Spryker\Client\Kernel\Container - */ - protected function provideFactFinderNgClient(Container $container): Container - { - $container[static::CLIENT_FACT_FINDER_NG] = function (Container $container) { - return $container->getLocator()->factFinderNg()->client(); - }; - - return $container; - } - - /** - * @param \Spryker\Client\Kernel\Container $container - * - * @return \Spryker\Client\Kernel\Container - */ - protected function addSearchPlugins(Container $container): Container - { - $container[static::PLUGINS_SEARCH] = function () { - return $this->getSearchPlugins(); - }; - - return $container; - } -} -``` - -Then SearchClient can be adjusted: - -**SearchRouter** - -```php -getFactory() - ->createSearchRouter() - ->search($searchQuery, $resultFormatters, $requestParameters); - } -} -``` - -The idea that you have to adjust places, where the search is called for adding needed params to request parameters. For example, you can adjust `SuggestionController` for adding a suggest parameter, so `FactFinderNgSuggestHandlerPlugin` will know that it should be called. - -**SuggestionController** - -```php -query->get(self::PARAM_SEARCH_QUERY); - - if (!$searchString) { - return $this->jsonResponse(); - } - - $requestParameters = array_merge($request->query->all(), ['suggest' => 1]); # Here you add new request parameter. - - $searchResults = $this - ->getFactory() - ->getCatalogClient() - ->catalogSuggestSearch($searchString, $requestParameters); - - return $this->jsonResponse([ - 'completion' => ($searchResults['completion'] ? $searchResults['completion'][0] : null), - 'suggestion' => $this->renderView('@CatalogPage/views/suggestion-results/suggestion-results.twig', $searchResults)->getContent(), - ]); - } -} -``` - -## Pagination, Sorting, and Filters -### Pagination -For the Yves layer, pagination should work out of the box. Request mapper cares about page and ipp (items for page) parameters and map it to Fact-Finder parameters. - -If you use the Glue layer, you have to add page and ipp value to request parameters. - -### Sorting -By default, the Yves layer doesn't care about sort options which suggested by Fact-Finder. If you want to use them, you have to change `SortedResultFormatterPlugin` in `CatalogDependencyProvider`. -```php -buildRoute('/factfinder', 'FactFinder', 'Search', 'index'); - $routeCollection->add(static::ROUTE_NAME_FACT_FINDER_SEARCH, $route); - - $route = $this->buildRoute('/factfinder/suggestions', 'FactFinder', 'Suggestions', 'index'); - $routeCollection->add(static::ROUTE_NAME_FACT_FINDER_SEARCH, $route); - - $route = $this->buildRoute('/factfinder/track', 'FactFinder', 'Track', 'index'); - $routeCollection->add(static::ROUTE_NAME_FACT_FINDER_TRACK, $route); - - $route = $this->buildRoute('/factfinder/recommendations', 'FactFinder', 'Recommendations', 'index'); - $routeCollection->add(static::ROUTE_FACT_FINDER_RECOMMENDATIONS, $route); - - return $routeCollection; - } -} -``` - -2. Then add the created route provider to the `RouterDependencyProvider` file: Expand a code sample - -```php -provideClients($container); - - return $container; - } - - /** - * @param \Spryker\Yves\Kernel\Container $container - * - * @return \Spryker\Yves\Kernel\Container - */ - protected function provideClients(Container $container) - { - $container[self::FACT_FINDER_SDK_CLIENT] = function () use ($container) { - return $container->getLocator() - ->factFinderSdk() - ->client(); - }; - - return $container; - } - -} -``` -2. Add it to your factory: - -```php -getProvidedDependency(FactFinderDependencyProvider::FACT_FINDER_SDK_CLIENT); - } - - ... - -} -``` diff --git a/docs/scos/dev/technology-partner-guides/202005.0/marketing-and-conversion/analytics/fact-finder/using-fact-finder-campaigns.md b/docs/scos/dev/technology-partner-guides/202005.0/marketing-and-conversion/analytics/fact-finder/using-fact-finder-campaigns.md deleted file mode 100644 index b611ffca49d..00000000000 --- a/docs/scos/dev/technology-partner-guides/202005.0/marketing-and-conversion/analytics/fact-finder/using-fact-finder-campaigns.md +++ /dev/null @@ -1,209 +0,0 @@ ---- -title: Using FACT-Finder campaigns -description: The FACT-Finder Campaign Manager module allows you to target the management of search results in order to improve the customer lead process or deliberately highlight products. -last_updated: Apr 3, 2020 -template: howto-guide-template -originalLink: https://documentation.spryker.com/v5/docs/search-factfinder-campaigns -originalArticleId: 44e9a7ff-9b8f-41bf-92da-c9753cd627f8 -redirect_from: - - /v5/docs/search-factfinder-campaigns - - /v5/docs/en/search-factfinder-campaigns -related: - - title: Installing and configuring FACT-Finder NG API - link: docs/scos/dev/technology-partner-guides/page.version/marketing-and-conversion/analytics/fact-finder/installing-and-configuring-the-fact-finder-ng-api.html - - title: Using FACT-Finder search - link: docs/scos/dev/technology-partner-guides/page.version/marketing-and-conversion/analytics/fact-finder/using-fact-finder-search.html - - title: FACT-Finder - link: docs/scos/user/technology-partners/page.version/marketing-and-conversion/analytics/fact-finder.html - - title: Using FACT-Finder tracking - link: docs/scos/dev/technology-partner-guides/page.version/marketing-and-conversion/analytics/fact-finder/using-fact-finder-tracking.html - - title: Exporting product data for FACT-Finder - link: docs/scos/dev/technology-partner-guides/page.version/marketing-and-conversion/analytics/fact-finder/exporting-product-data-for-fact-finder.html - - title: Using FACT-Finder recommendation engine - link: docs/scos/dev/technology-partner-guides/page.version/marketing-and-conversion/analytics/fact-finder/using-fact-finder-recommendation-engine.html - - title: Using FACT-Finder search suggestions - link: docs/scos/dev/technology-partner-guides/page.version/marketing-and-conversion/analytics/fact-finder/using-fact-finder-search-suggestions.html ---- - -## Prerequisites - -The FACT-Finder Campaign Manager module allows you to target the management of search results in order to improve the customer lead process or deliberately highlight products. -Campaigns are activated according to the specific criteria and are then returned accordingly in the search results. - -Campaigns are a powerful tool for visual merchandising. One of their numerous functions is automatic redirects to static pages for specific search terms, e.g. searching for "ToS" automatically redirects the user to the terms of service page. Even more importantly, campaigns allow for targeted placement of banners or the customization of search results. - -These types of the campaign can be created with the Campaign Assistant: - -* **Feedback Campaigns**: Display preset texts and banners with search results. Also used for pushed products. -* **Redirect Campaigns**: Redirect the user to the specific pages for certain search terms. -* **Advisor Campaigns**: Manages questions and answers that are presented to the shop visitor. Answers lead to specific product sets. -* **Product Campaigns**: Allows you to place campaigns on product pages instead of search result pages. - -### Feedback Campaign - -Feedback campaigns add predefined banners, texts, and products aimed to search results in reaction to specific search terms or other triggers. -These campaigns are best suited to pushing products. -A feedback campaign can also be used to place videos, point the customer towards the brand stores or to the designed zero-result pages. - -### Redirect Campaign - -Redirect campaigns react to triggers like search words and send users to specific pages, like Contact, ToS, etc. -Every webstore has a number of pages that should be available in this way. -Apart from the contact form and terms of service, payment and shipping conditions, as well as the about page, fall into that list. - -### Redirect Campaign - -Advisor campaigns give you the ability to set up questions as text or images which are presented to the customer in certain situations. -You group the questions with the preset answers the customer can choose. Each answer is combined with a product set which is displayed to the user on giving the answer. This gives you the ability to guide the user with targeted questions. -Advisor campaigns are especially useful to react to rising trends or frequently used filter combinations. - -### Product Campaign - -Product campaigns can be placed on any product detail page, shopping cart page or shop page and display a specific product set. -They employ the same method of defining product sets but are different in the way they are triggered. - -## Usage - -### Search Page - -Search result campaigns are fetched implicitly by invoking a search request. Examples of integration of advisor, redirect, feedback and pushed products campaigns can be found in `vendor/spryker-eco/fact-finder/src/SprykerEco/Yves/FactFinder/Theme/default/search/catalog.twig` - -### Product Details Page - -To fetch Fact-Finder campaigns for product page, you need to make a call using Fact-Finder client. To do that: - -1. Add FactFinder client to dependency provider: - -**Сode sample** - -```php -provideClients($container); - - return $container; - } - - /** - * @param \Spryker\Yves\Kernel\Container $container - * - * @return \Spryker\Yves\Kernel\Container - */ - protected function provideClients(Container $container) - { - ... - - $container[self::CLIENT_FACT_FINDER] = function (Container $container) { - return $container->getLocator()->factFinderSdk()->client(); - }; - - return $container; - } - -} -``` - -2. Add methods to get FactFinder client and to create product campaign request transfer: - -**Сode sample** - - ```php -getProvidedDependency(ProductDependencyProvider::CLIENT_FACT_FINDER); - } - - /** - * @return \Generated\Shared\Transfer\FactFinderSdkProductCampaignRequestTransfer - */ - public function createFactFinderSdkProductCampaignRequestTransfer() - { - return new FactFinderSdkProductCampaignRequestTransfer(); - } - -} - ``` - -3. Fetch product campaigns from controller: - -**Сode sample** - - ```php -getFactory() - ->createFactFinderSdkProductCampaignRequestTransfer(); - $factFinderSdkProductCampaignRequestTransfer->addProductNumber($storageProductTransfer->getIdProductAbstract()); - $factFinderSdkProductCampaignRequestTransfer->setSid($request->cookies->get(FactFinderConstants::COOKIE_SID_NAME)); - $factFinderProductCampaignResponseTransfer = $this->getFactory() - ->getFactFinderClient() - ->getProductCampaigns($factFinderSdkProductCampaignRequestTransfer); - $campaigns = $factFinderProductCampaignResponseTransfer->getCampaignIterator()->getCampaigns(); - - $productData = [ - ... - 'campaigns' => $campaigns, - ]; - - return $productData; - } -} -``` - -4. Inject feedback campaign templates into product details template, indicating position of campaign widget in `feedbackBlockPositionId` parameter e.g.: - -```php -{% raw %}{%{% endraw %} if campaigns is defined {% raw %}%}{% endraw %} - {% raw %}{%{% endraw %} include '@FactFinder/campaigns/partials/feedback.twig' with { - campaigns: campaigns, - feedbackBlockPositionId: 'product detail - above product', - } {% raw %}%}{% endraw %} -{% raw %}{%{% endraw %} endif {% raw %}%}{% endraw %} -``` -Additionally, you might need to add some more feedback widgets to general layout in `src/Pyz/Yves/Application/Theme/default/layout/layout.twig` -5. Inject pushed products campaign template into product details template, e.g.: - -```php -{% raw %}{%{% endraw %} if campaigns is defined {% raw %}%}{% endraw %} - {% raw %}{%{% endraw %} include '@FactFinder/campaigns/partials/pushed-products.twig' with { - campaigns: campaigns, - } {% raw %}%}{% endraw %} -{% raw %}{%{% endraw %} endif {% raw %}%}{% endraw %} -``` - -### Cart Page - -To fetch Fact-Finder campaigns for cart page, perform the same actions as for product page, but under Cart module namespace. diff --git a/docs/scos/dev/technology-partner-guides/202005.0/marketing-and-conversion/analytics/fact-finder/using-fact-finder-recommendation-engine.md b/docs/scos/dev/technology-partner-guides/202005.0/marketing-and-conversion/analytics/fact-finder/using-fact-finder-recommendation-engine.md deleted file mode 100644 index 005272e440a..00000000000 --- a/docs/scos/dev/technology-partner-guides/202005.0/marketing-and-conversion/analytics/fact-finder/using-fact-finder-recommendation-engine.md +++ /dev/null @@ -1,122 +0,0 @@ ---- -title: Using FACT-Finder recommendation engine -description: The FACT-Finder recommendation engine analyzes product and category relationships. The results are rendered in recommendations widget, which can be displayed on product details pages, homepage or in the shopping cart. -last_updated: Apr 3, 2020 -template: howto-guide-template -originalLink: https://documentation.spryker.com/v5/docs/search-factfinder-recommendation -originalArticleId: af34dba1-2862-4f46-bedb-457b14855489 -redirect_from: - - /v5/docs/search-factfinder-recommendation - - /v5/docs/en/search-factfinder-recommendation -related: - - title: Installing and configuring FACT-Finder NG API - link: docs/scos/dev/technology-partner-guides/page.version/marketing-and-conversion/analytics/fact-finder/installing-and-configuring-the-fact-finder-ng-api.html - - title: FACT-Finder - link: docs/scos/user/technology-partners/page.version/marketing-and-conversion/analytics/fact-finder.html - - title: Using FACT-Finder tracking - link: docs/scos/dev/technology-partner-guides/page.version/marketing-and-conversion/analytics/fact-finder/using-fact-finder-tracking.html - - title: Using FACT-Finder search suggestions - link: docs/scos/dev/technology-partner-guides/page.version/marketing-and-conversion/analytics/fact-finder/using-fact-finder-search-suggestions.html - - title: Using FACT-Finder search - link: docs/scos/dev/technology-partner-guides/page.version/marketing-and-conversion/analytics/fact-finder/using-fact-finder-search.html - - title: Using FACT-Finder campaigns - link: docs/scos/dev/technology-partner-guides/page.version/marketing-and-conversion/analytics/fact-finder/using-fact-finder-campaigns.html - - title: Exporting product data for FACT-Finder - link: docs/scos/dev/technology-partner-guides/page.version/marketing-and-conversion/analytics/fact-finder/exporting-product-data-for-fact-finder.html ---- - -## Prerequisites - -The FACT-Finder recommendation engine analyzes product and category relationships. The results are rendered in recommendations widget, which can be displayed on product details pages, homepage or in the shopping cart. - -## Usage - -To add recommendations widget to product page, insert the following code into `src/Pyz/Yves/Product/Theme/default/product/detail.twig`: -```html -{% raw %}{{{% endraw %} fact_finder_recommendations({id: product.sku, mainId: product.idProductAbstract}, '@FactFinder/recommendations/products.twig') {% raw %}}}{% endraw %} -``` -To add recommendations widget to cart page, modify cart controller (`src/Pyz/Yves/Cart/Controller/CartController.php`) to add array of product ids into template variables: - -
    -Click here to expand the code sample - -```php -getClient() - ->getQuote(); - - $factFinderSid = $request->cookies->get(FactFinderConstants::COOKIE_SID_NAME); - $quoteTransfer->setFactFinderSid($factFinderSid); - - $voucherForm = $this->getFactory() - ->getVoucherForm(); - - $cartItems = $this->getFactory() - ->createProductBundleGrouper() - ->getGroupedBundleItems($quoteTransfer->getItems(), $quoteTransfer->getBundleItems()); - - $cartItemsIds = []; - $cartItemsNames = []; - foreach ($cartItems as $cartItem) { - $cartItemsNames[] = $cartItem->getName(); - $cartItemsIds[] = $cartItem->getSku(); - } - - $stepBreadcrumbsTransfer = $this->getFactory() - ->getCheckoutBreadcrumbPlugin() - ->generateStepBreadcrumbs($quoteTransfer); - - $itemAttributesBySku = $this->getFactory() - ->createCartItemsAttributeProvider() - ->getItemsAttributes($quoteTransfer, $selectedAttributes); - - $promotionStorageProducts = $this->getFactory() - ->getProductPromotionMapperPlugin() - ->mapPromotionItemsFromProductStorage( - $quoteTransfer, - $request - ); - - $factFinderSdkProductCampaignRequestTransfer = $this->getFactory() - ->createFactFinderSdkProductCampaignRequestTransfer(); - $factFinderSdkProductCampaignRequestTransfer->setProductNumber($cartItemsIds); - $factFinderSdkProductCampaignRequestTransfer->setSid($factFinderSid); - - $campaigns = $this->getCampaigns( - $factFinderSdkProductCampaignRequestTransfer, - $cartItems - ); - - return $this->viewResponse([ - 'cart' => $quoteTransfer, - 'cartItems' => $cartItems, - 'attributes' => $itemAttributesBySku, - 'cartItemsIds' => $cartItemsIds, - 'cartItemsNames' => $cartItemsNames, - 'voucherForm' => $voucherForm->createView(), - 'stepBreadcrumbs' => $stepBreadcrumbsTransfer, - 'promotionStorageProducts' => $promotionStorageProducts, - 'campaigns' => $campaigns, - ]); - } - -... -``` -
    -
    - -Then add recommendations widget to cart page template `src/Pyz/Yves/Cart/Theme/default/cart/index.twig`: - -```twig -{% raw %}{{{% endraw %} fact_finder_recommendations({id: cartItemsIds, mainId: cartItemsIds}, '@FactFinder/recommendations/products.twig') {% raw %}}}{% endraw %} -``` diff --git a/docs/scos/dev/technology-partner-guides/202005.0/marketing-and-conversion/analytics/fact-finder/using-fact-finder-search-suggestions.md b/docs/scos/dev/technology-partner-guides/202005.0/marketing-and-conversion/analytics/fact-finder/using-fact-finder-search-suggestions.md deleted file mode 100644 index 24e36bd6acf..00000000000 --- a/docs/scos/dev/technology-partner-guides/202005.0/marketing-and-conversion/analytics/fact-finder/using-fact-finder-search-suggestions.md +++ /dev/null @@ -1,73 +0,0 @@ ---- -title: Using FACT-Finder search suggestions -description: The FACT-Finder Suggest module enables you to provide customers with suggested search terms while they are entering a search term. -last_updated: Sep 15, 2020 -template: howto-guide-template -originalLink: https://documentation.spryker.com/v5/docs/search-factfinder-suggest -originalArticleId: ea390c92-13f0-4de5-95d4-23d8bad22341 -redirect_from: - - /v5/docs/search-factfinder-suggest - - /v5/docs/en/search-factfinder-suggest -related: - - title: FACT-Finder - link: docs/scos/user/technology-partners/page.version/marketing-and-conversion/analytics/fact-finder.html - - title: Installing and configuring FACT-Finder NG API - link: docs/scos/dev/technology-partner-guides/page.version/marketing-and-conversion/analytics/fact-finder/installing-and-configuring-the-fact-finder-ng-api.html - - title: Using FACT-Finder search - link: docs/scos/dev/technology-partner-guides/page.version/marketing-and-conversion/analytics/fact-finder/using-fact-finder-search.html - - title: Using FACT-Finder tracking - link: docs/scos/dev/technology-partner-guides/page.version/marketing-and-conversion/analytics/fact-finder/using-fact-finder-tracking.html - - title: Using FACT-Finder recommendation engine - link: docs/scos/dev/technology-partner-guides/page.version/marketing-and-conversion/analytics/fact-finder/using-fact-finder-recommendation-engine.html - - title: Using FACT-Finder campaigns - link: docs/scos/dev/technology-partner-guides/page.version/marketing-and-conversion/analytics/fact-finder/using-fact-finder-campaigns.html - - title: Exporting product data for FACT-Finder - link: docs/scos/dev/technology-partner-guides/page.version/marketing-and-conversion/analytics/fact-finder/exporting-product-data-for-fact-finder.html ---- - -## Prerequisites - -The FACT-Finder Suggest module enables you to provide customers with suggested search terms while they are entering a search term. In this way, users do not necessarily have to enter the entire search term themselves but can choose a suggestion. As the users are presented with similar search queries, it enables them to select a suitable, more precise search term and save time when searching. The FACT-Finder Suggest entries are provided by the product information in the Search database as well as from the recent frequently searched and found search terms. The suggestions in this database are no longer linked to the data in the product database, which is why filtering by attributes (such as category) is unfortunately not possible by default. - -## Usage - -To check example implementation, please see [Fact Finder - Search Integration](/docs/scos/user/technology-partners/{{page.version}}/marketing-and-conversion/analytics/fact-finder/fact-finder-search.html). Typing in a search box triggers an API suggest request. By default , use `/fact-finder/suggestions` to get suggestions. Or you can use the `FactFinderSdk` module to make a suggest request. - -It will return a `FactFinderSdkSuggestResponseTransfer` object that contains an array of suggestions. - -Basic parameters: - -* `query` - Query text. -* `sid` - FACT-Finder session id. - -Controller example: -```php -query->get('query', '*'); - - $factFinderSuggestRequestTransfer->setQuery($query); - $factFinderSuggestRequestTransfer->setSid($request->cookies->get(FactFinderConstants::COOKIE_SID_NAME)); - - $response = $this->getFactory() - ->getFactFinderClient() - ->getSuggestions($factFinderSuggestRequestTransfer); - - return $this->jsonResponse($response->getSuggestions()); -} - -... -``` - -`FactFinderSdkSuggestResponse` has array with suggests. FACT-Finder supports multiple suggest types. -The standard types are: Product name, Manufacturer, Category, Search term. We have created suggestion for Product name, Category, Search term, Brand in our demo. diff --git a/docs/scos/dev/technology-partner-guides/202005.0/marketing-and-conversion/analytics/fact-finder/using-fact-finder-search.md b/docs/scos/dev/technology-partner-guides/202005.0/marketing-and-conversion/analytics/fact-finder/using-fact-finder-search.md deleted file mode 100644 index dd51cc9e82b..00000000000 --- a/docs/scos/dev/technology-partner-guides/202005.0/marketing-and-conversion/analytics/fact-finder/using-fact-finder-search.md +++ /dev/null @@ -1,209 +0,0 @@ ---- -title: Using FACT-Finder search -description: FACT-Finder suggests error-tolerant on-site search. FACT-Finder delivers relevant results even when spelling errors and typos occur. -last_updated: Apr 3, 2020 -template: howto-guide-template -originalLink: https://documentation.spryker.com/v5/docs/search-factfinder-search -originalArticleId: cf3c0d6c-617a-4d0f-ba73-ad99b2c0770f -redirect_from: - - /v5/docs/search-factfinder-search - - /v5/docs/en/search-factfinder-search - - /docs/scos/user/technology-partners/202005.0/marketing-and-conversion/analytics/fact-finder/fact-finder-search.html ---- - -## Prerequisites - -FACT-Finder suggests error-tolerant on-site search. The online shop's search function is its most powerful sales tool. - -FACT-Finder delivers relevant results even when spelling errors and typos occur. - -## Usage - -By default, you can use the `/fact-finder` route to see an example catalog page. Another option is to use FactFinderSdk module client to request FACT-Finder API. All parameters from `GET` request will be sent to the FACT-Finder API. - -As a response, you'll receive a `FactFinderSdkSearchResponseTransfer` object that contains data, after search navigation, bread crumbs, paging. - -Basic parameters: - -* `query` - The search term indicates the term or phrase that is to be used to search in the FACT- Finder database. -* `channel` - If your search environment consists of multiple channels, you can define what channel to search here. If no channel is specified, the first channel in the channel list is used. -* `page` - If a search result contains many results, they will be divided into pages. It limits the amount of data that has to be sent in one go. You can indicate what page should be returned. Page numbering starts with 1. -* `productsPerPage` - In the FACT-Finder Management Interface, you can define the number of results that will be returned on a page by default. To change the number, you can set it with this parameter. -* `sort` - By default, the result that is returned has been sorted for relevance. However, you can specify a different sort order here. -* `filter` - When a filter parameter is sent to FACT-Finder, the Search engine only returns results that correspond to the filter indicated. -* `searchField` - Normally FACT-Finder searches all fields defined as searchable. However, it is possible to search only one specific field as well. -* `noArticleNumberSearch` - Normally an article number search is carried out if the search term matches one or more set formats. You can also use parameters to prevent an article number search from being carried out. -* `sid` - Session ID. -* `useAsn` - Controls whether or not the ASN (after-search navigation block) is created. -* `useFoundWords` - FACT-Finder is able to return the words that were used to find the data record for the located records. -* `useCampaigns` - If you want to prevent the Campaign Manager from checking whether the search query matches a campaign, use this parameter. -* `navigation` - FACT-Finder can also replicate your entire shop navigation. -* `idsOnly` - The result normally contains all field information about the products that have been found. -* `generateAdvisorTree` - This parameter is used in conjunction with advisor campaigns. -* `disableCache` - This parameter controls whether or not the search result cache is used. -* `followSearch` - The parameter is automatically attached to all follow-up parameter sets of a search result. The parameter must not be passed on initial requests. -* `usePersonalization` - Allows the activation / deactivation of the queries personalization. -* `useSemanticEnhancer` - Allows activation / deactivation of the semantic enhancement of queries. -* `useAso` - Allows the activation / deactivation of the automatic search optimization. - -Controller example: - -**Сode sample** - - ```php -query->all(); - - $factFinderSearchRequestTransfer->setRequest($requestArray); - - $ffSearchResponseTransfer = $this->getFactory() - ->getFactFinderClient() - ->search($factFinderSearchRequestTransfer); - - if ($ffSearchResponseTransfer->getCampaignIterator()->getHasRedirect()) { - return $this->redirectResponseExternal($ffSearchResponseTransfer->getCampaignIterator()->getRedirectUrl()); - - } - - $feedbackForm = $this->getFactory() - ->createFeedbackForm(); - - if (!$ffSearchResponseTransfer->getResult()) { - $this->addErrorMessage('Search is not available at the moment'); - } - - return [ - 'searchResponse' => $ffSearchResponseTransfer, - 'pagingRote' => 'fact-finder', - 'lang' => Store::getInstance()->getCurrentLanguage(), - 'query' => isset($requestArray['query']) ? $requestArray['query'] : '', - 'page' => isset($requestArray['page']) ? $requestArray['page'] : '', - 'feedbackForm' => $feedbackForm->createView(), - ]; - } - -... -``` - -The FactFinder module includes templates. Templates can be used for changing the default partial templates in the following way: - -In `src/Pyz/Yves/Catalog/Theme/default/catalog/catalog.twig` you can put: - -```php -{% raw %}{%{% endraw %} include '@FactFinder/layout/catalog/filters.twig' with { - afterSearchNavigation: factFinderSearchResponse.getAfterSearchNavigation -} {% raw %}%}{% endraw %} - -{% raw %}{%{% endraw %} include '@FactFinder/layout/partials/sort.twig' {% raw %}%}{% endraw %} - -{% raw %}{%{% endraw %} include '@FactFinder/search/partials/pagination.twig' with { - showAlwaysFirstAndLast: true - } {% raw %}%}{% endraw %} -``` - -According to the template examples, you can set up default demoshop template for using FACT-Finder responses. - -## After Search - -`FactFinderSdkSearchResponseTransfer` has campaign iterator, bread crumbs, paging, search result, sorting parameters, result per page option, filter groups. - -You can build any front end and templates using those options in the response transfer object. - -### Filter Groups - -Default settings in the FACT-Finder admin panel are: - -For categories filter: - -* Source field -`CategoryPath` -* Field type -`CategoryPath` - -For price filter: - -* Source field - Price -* Field type - Number -* Range type - Slider - -For stock filter: - -* Source field - Stock -* Field type - Text -* Selection Type - Multi-select - -Filter groups have the following options (name - type): - -* filters -`FactFinderSdkDataFilter[]` -* name - string -* `detailedLinkCount` - int -* unit - string -* `isRegularStyle` - bool -* `isSliderStyle` - bool -* `isTreeStyle` - bool -* `isMultiSelectStyle` - bool -* `hasPreviewImages` - bool -* `hasSelectedItems` - bool -* `isSingleHideUnselectedType` - bool -* `isSingleShowUnselectedType` - bool -* `isMultiSelectOrType` - bool -* `isMultiSelectAndType` - bool -* `isTextType` - bool -* `isNumberType` - bool - -Filter has the following options (name - type): - -* item -`FactFinderSdkDataItem` -* `fieldName` - string -* `matchCount` - int -* `clusterLevel` - int -* `previewImage` - string -* `hasPreviewImage` - bool -* `absoluteMinimum` - string -* `absoluteMaximum` - string -* `selectedMinimum` - string -* `selectedMaximum` - string - -### Bread Crumbs - -Bread crumbs have following options (name - type): - -* item -`FactFinderSdkDataItem` -* `isSearchBreadCrumb` - bool -* `isFilterBreadCrumb` - bool -* `fieldName` - string - -### Paging - -Paging has the following options (name - type): - -* `pageCount` - int -* `firstPage` -`FactFinderSdkDataPage` -* `lastPage` -`FactFinderSdkDataPage` -* `previousPage` -`FactFinderSdkDataPage` -* `currentPage` -`FactFinderSdkDataPage` -* `nextPage` -`FactFinderSdkDataPage` - -Data page has the following options (name - type): - -* item -`FactFinderSdkDataItem` -* `pageNumber` - int - -Data item has the following options (name - type): - -* label - string -* url - string -* selected - bool - -### Sorting Options - -Is array of data items. diff --git a/docs/scos/dev/technology-partner-guides/202005.0/marketing-and-conversion/analytics/fact-finder/using-fact-finder-tracking.md b/docs/scos/dev/technology-partner-guides/202005.0/marketing-and-conversion/analytics/fact-finder/using-fact-finder-tracking.md deleted file mode 100644 index 53564478fa5..00000000000 --- a/docs/scos/dev/technology-partner-guides/202005.0/marketing-and-conversion/analytics/fact-finder/using-fact-finder-tracking.md +++ /dev/null @@ -1,188 +0,0 @@ ---- -title: Using FACT-Finder tracking -description: Tracking information lets the FACT-Finder Search tool automatically learn from the user behavior. -last_updated: Apr 3, 2020 -template: howto-guide-template -originalLink: https://documentation.spryker.com/v5/docs/search-factfinder-tracking -originalArticleId: 1df217ac-21ca-4b03-908d-2c5bf166b726 -redirect_from: - - /v5/docs/search-factfinder-tracking - - /v5/docs/en/search-factfinder-tracking -related: - - title: Installing and configuring FACT-Finder NG API - link: docs/scos/dev/technology-partner-guides/page.version/marketing-and-conversion/analytics/fact-finder/installing-and-configuring-the-fact-finder-ng-api.html - - title: FACT-Finder - link: docs/scos/user/technology-partners/page.version/marketing-and-conversion/analytics/fact-finder.html - - title: Using FACT-Finder search suggestions - link: docs/scos/dev/technology-partner-guides/page.version/marketing-and-conversion/analytics/fact-finder/using-fact-finder-search-suggestions.html - - title: Using FACT-Finder search - link: docs/scos/dev/technology-partner-guides/page.version/marketing-and-conversion/analytics/fact-finder/using-fact-finder-search.html - - title: Using FACT-Finder recommendation engine - link: docs/scos/dev/technology-partner-guides/page.version/marketing-and-conversion/analytics/fact-finder/using-fact-finder-recommendation-engine.html - - title: Using FACT-Finder campaigns - link: docs/scos/dev/technology-partner-guides/page.version/marketing-and-conversion/analytics/fact-finder/using-fact-finder-campaigns.html - - title: Exporting product data for FACT-Finder - link: docs/scos/dev/technology-partner-guides/page.version/marketing-and-conversion/analytics/fact-finder/exporting-product-data-for-fact-finder.html ---- - -## Prerequisites - -Tracking information lets the FACT-Finder Search tool automatically learn from the user behavior. - -The data provided through this interface can be used for a variety of purposes. They include the tracking of events such as users clicking on a detail page, placing a product into the shopping cart and purchasing it. The information can form the basis for automated search optimization. It automatically improves the search result on the basis of the established consumer behavior. Information about product clicks, shopping cart, and purchase events, in other words, the user behavior, is required for the Personalization module, which provides tailored search results for each user. The information on product purchases can also be used as a basis for the Recommendation Engine module. - -Please note, that the personalization can only work if a proper session ID is sent with each search request. - -## Usage - -By default, you can use the `/fact-finder/track` route. According to the FACT-Finder documentation, you can use tracking `GET` parameters . The user session ID will be appended on a server side. - -* **General Parameters**: - - `id` - ID of the item for which information is to be sent. - - `masterId` (optional) - If your shop contains item versions and you need to transmit the item version number with the id parameter, you will need to transmit the master item number using this parameter to ensure that the products and the possible events can be assigned to each other. - - `channel` - The name of the FACT-Finder channel in which the search was conducted. - - `sid` - Use it to pass the user's session identifier. - - `event` - This parameter specifies the event type. Use the following values for the various types: - + click - + cart - + checkout - + login - + recommendationClick - + feedback - - `title` (optional) - The item name. - - `userId` (optional) - Use it to pass a user identifier. As with the session ID, it can be anonymized. - - `cookieId` (optional) - You use this parameter to pass a token that identifies the user over a longer period of time, even when not being logged in to the shop. -* Click on the detail page: - - `sid` - Use it to pass the user's session identifier. - - `query` - The search term for which the user has searched. - - `pos` - The position of the product in the search results. - - `origPos` - It transmits the original position of the item in the search result. - - `page` - The number of the search result page on which the selected product was displayed. - - `pageSize` (optional) - The number of products per search result page at the time the click was executed. - - `origPageSize` - The default number of products per search result page. - - `simi` (optional) - The FACT-Finder similarity value for the respective product. - - `campaign` - This field has the campaign ID as its value. -* Shopping basket and purchase information: - - `count` - Quantity of product purchased. - - `price` (optional) - Product price. - - `campaign` - The search result via a campaign. This field has the campaign ID as its value. -* User login: - - `sid` - Use this to pass the user's session identifier. - - `userId` - Use this to pass a user identifier. Like the session ID, this can be anonymized. -* Recommendation Engine click: - - `mainId` - ID of the article for which the clicked article was recommended. -* Search result feedback: - - `query` - The search term for which a search was conducted and on which feedback has been provided. - - `positive` - Send the value true at this point if the customer provided positive feedback. Send false if negative feedback was provided on the result. - - `message` (optional) - If the customer left a message as justification of their opinion, you can send it using this parameter. -* Shop cachehit: - - `page` - The number of the search result page on which the selected product was displayed. - - `pageSize` - The number of products per search result page at the time the click was executed. - - `query` - The search term for which a search was conducted and on which feedback has been provided. - - `hitCount` - The amount of products found in the search result. - - `searchTime` - The time which was needed to create the search result. - - `bestSimi` - Similarity of the best product. - - `minSimi` - Similarity of the last product. - - `filterfieldName` (optional) - Information about active filters in the search result. - - `searchField` (optional) - The field for which the search was performed in case the search was limited to a specific field. - - `customSorting` (optional) - If the default sorting was not used for the search result, then please send a true. - - `additionalInfo`` (optional) - You may use this parameter to add something to the log entry, such as to enable searching the log for a specific entry. -* Suggest Tracking: - - `queryFromSuggest` - This parameter indicates that the FACT-Finder query was triggered through a selection from the suggestion list. In this case send the parameter with the value true. - - `userInput` - Please use this parameter to send the order of letters the shop user entered until the search query was triggered. - -To use tracking on the back-end, provide the dependency to your module dependency provider. - -**Сode sample** - - ```php -getLocator()->factFinderSdk()->client(); - }; - - return $container; - } - -{% raw %}{%{% endraw %} endhighlight {% raw %}%}{% endraw %} - -Add a new function to your module factory. - -{% raw %}{%{% endraw %} highlight php linenos {% raw %}%}{% endraw %} -getProvidedDependency(YourBundleDependencyProvider::FACT_FINDER_CLIENT); - } -``` - -Login tracking could be added to a `Pyz\Yves\Customer\Plugin\Provider\CustomerAuthenticationSuccessHandler` on `AuthenticationSuccess` function. - -Example of a user login tracking function: - -```php -setEvent(CustomerConstants::LOGIN_TRACKING); - $trackingTransfer->setSid($request->cookies->get(FactFinderConstants::COOKIE_SID_NAME)); - $trackingTransfer->setUserId(md5($customer->getEmail())); - - $this->factFinderSdkClient->track($trackingTransfer); - } -``` - -Shopping basket tracking function could be added to a `Yves\Cart\Handler\CartOperationHandler` changeQuantity and add functions. - -Add a session client and a fact finder sdk client to the `CartOperationHandler` class via a `DependencyProvider`. - -Example of an add to cart tracking function: - -```php -getCurrentItemTransfer($quoteTransfer, $sku); - - if ($trackItemTransfer) { - $trackRequestTransfer = new FactFinderSdkTrackingRequestTransfer(); - $trackRequestTransfer->setId($trackItemTransfer->getSku()) - ->setMasterId() // generate and add an abstract product sku - ->setEvent(static::CART_TRACK_EVENT_NAME) // static::CART_TRACK_EVENT_NAME === 'cart' - ->setCount($quantity) - ->setPrice($trackItemTransfer->getUnitPrice() / 100) - ->setSid($this->sessionClient->getId()); - - return $this->factFinderSdkClient->track($trackRequestTransfer); - } - - return new FactFinderSdkTrackingResponseTransfer(); - } -``` diff --git a/docs/scos/dev/technology-partner-guides/202005.0/marketing-and-conversion/analytics/installing-and-confiugring-minubo.md b/docs/scos/dev/technology-partner-guides/202005.0/marketing-and-conversion/analytics/installing-and-confiugring-minubo.md deleted file mode 100644 index dfb0fe563da..00000000000 --- a/docs/scos/dev/technology-partner-guides/202005.0/marketing-and-conversion/analytics/installing-and-confiugring-minubo.md +++ /dev/null @@ -1,114 +0,0 @@ ---- -title: Installing and configuring Minubo -description: Learn how to install and integrate Minubo -template: howto-guide-template ---- - -The Minubo module provides functionality to export order and customer data that was updated since last run of export. Data exported to Amazon S3 bucket as file with list of JSON-objects. - -## Export modes - -Export runs in two modes: - -1. Automatic mode - every 15 minutes (default) -2. Manual mode - using console command: -```bash -vendor/bin/console minubo:export:data -``` -As a result, the module puts two files `Customer_TIMESTAMP.json and Order_TIMESTAMP.json` with updated data to Amazon S3 bucket. If there were no changes the module would put empty files. - -## Installing and configuring Minubo - -To install and configure Minubo, do the following: - -1. To install Minubo run next command in the console: -```bash -composer require spryker-eco/minubo -``` -2. Copy over the content from `config/config.dist.php` to `config_default.php` and add the values: -```php... - use Spryker\Service\FlysystemAws3v3FileSystem\Plugin\Flysystem\Aws3v3FilesystemBuilderPlugin; - use Spryker\Shared\FileSystem\FileSystemConstants; - use SprykerEco\Shared\Minubo\MinuboConstants; - ... - $config[FileSystemConstants::FILESYSTEM_SERVICE] = [ - 'minubo' => [ - 'sprykerAdapterClass' => Aws3v3FilesystemBuilderPlugin::class, - 'root' => '/minubo/', - 'path' => 'data/', - 'key' => '..', - 'secret' => '..', - 'bucket' => '..', - 'version' => 'latest', - 'region' => '..', - ], - ]; - - $config[MinuboConstants::MINUBO_FILE_SYSTEM_NAME] = 'minubo'; - $config[MinuboConstants::MINUBO_BUCKET_DIRECTORY] = '/minubo/data/'; - $config[MinuboConstants::MINUBO_CUSTOMER_SECURE_FIELDS] = [ - 'password', - 'restore_password_date', - 'restore_password_key', - 'registration_key', - ]; - ... -``` -3. Copy over the content from `config/jobs.dist.php` to` jobs.php`: -```php... - $jobs[] = [ - 'name' => 'minubo-export', - 'command' => '$PHP_BIN vendor/bin/console minubo:export:data', - 'schedule' => '*/15 * * * *', - 'enable' => true, - 'run_on_non_production' => false, - 'stores' => ['DE'], - ]; - ... -``` -4. Add Minubo console to `ConsoleDependencyProder`: -```php... - use SprykerEco\Zed\Minubo\Communication\Console\MinuboConsole; - - class ConsoleDependencyProvider extends SprykerConsoleDependencyProvider - { - protected function getConsoleCommands(Container $container) - { - $commands = [ - ... - new MinuboConsole(), - ]; - ... - return $commands; - } - ... -``` -5. Add or update `FlysystemDependencyProvider` to project Service Layer: -```php - - - - - - - - - - - - - - - -``` - -The payload for Customer loads from `\SprykerEco\Zed\Episerver\Business\Mapper\Customer\CustomerMapper::buildPayload`, for Order from `\SprykerEco\Zed\Episerver\Business\Mapper\Order\AbstractOrderMapper` and for Newsletter from `\SprykerEco\Zed\Episerver\Business\Mapper\Customer\CustomerNewsletterMapper`. - -The abstract classes can be extended and changed in `\SprykerEco\Zed\Episerver\Business\EpiserverBusinessFactory`. diff --git a/docs/scos/dev/technology-partner-guides/202005.0/marketing-and-conversion/customer-communication/episerver/episerver-order-reference-commands.md b/docs/scos/dev/technology-partner-guides/202005.0/marketing-and-conversion/customer-communication/episerver/episerver-order-reference-commands.md deleted file mode 100644 index 04dbea585f6..00000000000 --- a/docs/scos/dev/technology-partner-guides/202005.0/marketing-and-conversion/customer-communication/episerver/episerver-order-reference-commands.md +++ /dev/null @@ -1,124 +0,0 @@ ---- -title: Episerver order reference commands -description: Learn about the order reference commands for Episerver in Spryker. -last_updated: Jun 16, 2021 -template: howto-guide-template ---- - - -The Episerver module has four different commands: - -* `\SprykerEco\Zed\Episerver\Communication\Plugin\Oms\Command\EpiserverNewOrderPlugin` -* `\SprykerEco\Zed\Episerver\Communication\Plugin\Oms\Command\EpiserverOrderCanceledPlugin` -* `\SprykerEco\Zed\Episerver\Communication\Plugin\Oms\Command\EpiserverPaymentNotReceivedPlugin` -* `\SprykerEco\Zed\Episerver\Communication\Plugin\Oms\Command\EpiserverShippingConfirmationPlugin` - - -You can use these commands in `\Pyz\Zed\Oms\OmsDependencyProvider::getCommandPlugins` - -**OmsDependencyProvider** - -```php -... -use SprykerEco\Zed\Episerver\Communication\Plugin\Oms\Command\EpiserverNewOrderPlugin; -... - -/** - * @param \Spryker\Zed\Kernel\Container $container - * - * @return \Spryker\Zed\Oms\Communication\Plugin\Oms\Command\CommandCollection - */ -protected function getCommandPlugins(Container $container) -{ - $collection = parent::getCommandPlugins($container); - - ... - $collection->add(new EpiserverNewOrderPlugin(), 'Episerver/SendNewOrderRequest'); - $collection->add(new EpiserverOrderCanceledPlugin(), 'Episerver/SendOrderCanceledRequest'); - $collection->add(new EpiserverPaymentNotReceivedPlugin(), 'Episerver/PaymentNotReceivedRequest'); - $collection->add(new EpiserverShippingConfirmationPlugin(), 'Episerver/ShippingConfirmedRequest'); - ... - - return $collection; -} -``` - -After that you are ready to use commands in the OMS setup: - -**OmsDependencyProvider** - -```html - - - - - - -``` - -**oms-statemachine** - -```html - - - - - - - - - - exclude from customer - - - exclude from customer - - - - - - - new - shipping confirmed - authorize - - - - shipping confirmed - payment pending - shipped_confirmed - - - - new - invalid - authorize - - - - payment pending - cancelled - pay - - - - cancelled - optivo_cancelled - cancel - - - - - - - - - - - - - -``` diff --git a/docs/scos/dev/technology-partner-guides/202005.0/marketing-and-conversion/customer-communication/episerver/installing-and-configuring-episerver.md b/docs/scos/dev/technology-partner-guides/202005.0/marketing-and-conversion/customer-communication/episerver/installing-and-configuring-episerver.md deleted file mode 100644 index a7b1a92c90d..00000000000 --- a/docs/scos/dev/technology-partner-guides/202005.0/marketing-and-conversion/customer-communication/episerver/installing-and-configuring-episerver.md +++ /dev/null @@ -1,53 +0,0 @@ ---- -title: Installing and configuring Episerver -description: Install and configure Episerver into Spryker Commerce OS -last_updated: Jun 16, 2021 -template: howto-guide-template -originalLink: https://documentation.spryker.com/v5/docs/episerver-installation-and-configuration -originalArticleId: 88000f11-a6d3-4fe5-b349-5aedc6f6f158 -redirect_from: - - /v5/docs/episerver-installation-and-configuration - - /v5/docs/en/episerver-installation-and-configuration - - /docs/scos/user/technology-partners/202005.0/marketing-and-conversion/customer-communication/episerver/installing-and-configuring-episerver.html - ---- - -## Installation - -To install Episerver, run the command in the console: -```php -composer require spryker-eco/episerver -``` - -## Configuration - -To set up the Episerver initial configuration, use the credentials received from your Episerver admin page. - -The `REQUEST_BASE_URL` parameter should be: `https://api.campaign.episerver.net/` - -To get `ORDER_LIST_AUTHORIZATION_CODE` or `CUSTOMER_LIST_AUTHORIZATION_CODE`, go to: - -Menu → API overview → SOAP API → Recipient lists → (Click one of your lists here) → Manage authorization codes → Authorization code - -To get any `...MAILING_ID`, go to: - -Menu → Transactional mails → ID - -```php -$config[EpiserverConstants::REQUEST_BASE_URL] = 'https://api.campaign.episerver.net/'; -$config[EpiserverConstants::REQUEST_TIMEOUT] = 30; - -$config[EpiserverConstants::ORDER_LIST_AUTHORIZATION_CODE] = 'QJd9U0M9xssRGhnJrNr5ztt9FQa2x1wA'; -$config[EpiserverConstants::CUSTOMER_LIST_AUTHORIZATION_CODE] = 'QJd9U0M9xssRGhnJrNr5ztt9FQa2x1wA'; - -$config[EpiserverConstants::ORDER_NEW_MAILING_ID] = '237667360304'; -$config[EpiserverConstants::ORDER_CANCELLED_MAILING_ID] = '237667360304'; -$config[EpiserverConstants::ORDER_SHIPPING_CONFIRMATION_MAILING_ID] = '237667360304'; -$config[EpiserverConstants::ORDER_PAYMENT_IS_NOT_RECEIVED_MAILING_ID] = '237667360304'; - -$config[EpiserverConstants::EPISERVER_CONFIGURATION_MAILING_ID_LIST] = [ - CustomerRegistrationMailTypePlugin::MAIL_TYPE => '243323625271', - CustomerRestoredPasswordConfirmationMailTypePlugin::MAIL_TYPE => '243646188958', - CustomerRestorePasswordMailTypePlugin::MAIL_TYPE => '243646188953', -]; -``` diff --git a/docs/scos/dev/technology-partner-guides/202005.0/marketing-and-conversion/customer-communication/episerver/integrating-episerver.md b/docs/scos/dev/technology-partner-guides/202005.0/marketing-and-conversion/customer-communication/episerver/integrating-episerver.md deleted file mode 100644 index c767605ded5..00000000000 --- a/docs/scos/dev/technology-partner-guides/202005.0/marketing-and-conversion/customer-communication/episerver/integrating-episerver.md +++ /dev/null @@ -1,488 +0,0 @@ ---- -title: Integrating Episerver -description: Integrate Episerver in the Spryker Commerce OS -last_updated: Jun 16, 2021 -template: howto-guide-template ---- - -This article provides step-by-step instructions on integrating the Episerver module into your project. - -## Prerequisites -Prior to integrating Episerver into your project, make sure you [installed and configured](/docs/scos/user/technology-partners/{{page.version}}/marketing-and-conversion/customer-communication/episerver/installing-and-configuring-episerver.html) the Episerver module. - -## Customer Registration / Reset Password / Reset Rassword Confirm Event - -The Episerver module has `SprykerEco\Zed\Episerver\Communication\Plugin\Customer\EpiserverCustomerMailPlugin`. - -To use it, set up `provideBusinessLayerDependencies` in the class `Pyz\Zed\Mail\MailDependencyProvider`, for example: - -**MailDependencyProvider** - -```php - ->addProvider(new EpiserverCustomerMailPlugin(), [ - CustomerRegistrationMailTypePlugin::MAIL_TYPE, - CustomerRestoredPasswordConfirmationMailTypePlugin::MAIL_TYPE, - CustomerRestorePasswordMailTypePlugin::MAIL_TYPE, -]) -``` - -## Customer (Un)Subscribe For Newsletter - -The Episerver module has `\SprykerEco\Zed\Episerver\Business\Mapper\Customer\CustomerNewsletterMapper`. - -To use it, set up `provideBusinessLayerDependencies` in the class `Pyz\Zed\Mail\MailDependencyProvider`, for example: - -**MailDependencyProvider** - -```php -->addProvider(new EpiserverNewsletterSubscriptionMailPlugin(), [ - NewsletterSubscribedMailTypePlugin::MAIL_TYPE, - NewsletterUnsubscribedMailTypePlugin::MAIL_TYPE, - CustomerChangeProfileMailTypePlugin::MAIL_TYPE, -]) -``` - -Add a page for (un)subscribing on your site's side. To complete it, first you need a controller: - -**NewsletterController** - -```php -query->get('id', ''); - if ($subscriberKey === '') { - return new RedirectResponse('/'); - } - $newsletterSubscriber = new NewsletterSubscriberTransfer(); - $newsletterSubscriber->setSubscriberKey($subscriberKey); - $newsletterSubscriptionApprovalResultTransfer = $this->getFactory() - ->getNewsletterSubscriptionClient() - ->approveDoubleOptInSubscriber($newsletterSubscriber); - if ($newsletterSubscriptionApprovalResultTransfer->getIsSuccess() === false) { - return new RedirectResponse('/'); - } - return $this->view([], [], '@NewsletterPage/views/subscription-success/subscription-success.twig'); - } - /** - * @param \Symfony\Component\HttpFoundation\Request $request - * - * @return \Symfony\Component\HttpFoundation\RedirectResponse|\Spryker\Yves\Kernel\View\View - */ - public function unsubscribeAction(Request $request) - { - $subscriberKey = $request->query->get('id', ''); - if ($subscriberKey === '') { - return new RedirectResponse('/'); - } - $newsletterSubscriberTransfer = new NewsletterSubscriberTransfer(); - $newsletterSubscriberTransfer->setSubscriberKey($subscriberKey); - $newsletterSubscriptionRequestTransfer = new NewsletterSubscriptionRequestTransfer(); - $newsletterSubscriptionRequestTransfer->setNewsletterSubscriber($newsletterSubscriberTransfer); - $newsletterSubscriptionRequestTransfer->addSubscriptionType((new NewsletterTypeTransfer()) - ->setName(NewsletterConstants::DEFAULT_NEWSLETTER_TYPE)); - $newsletterSubscriptionResponseTransfer = $this->getFactory() - ->getNewsletterSubscriptionClient() - ->unsubscribe($newsletterSubscriptionRequestTransfer); - if ($newsletterSubscriptionResponseTransfer->getSubscriptionResults()[0]->getIsSuccess() === false) { - return new RedirectResponse('/'); - } - return $this->view([], [], '@NewsletterPage/views/unsubscription-success/unsubscription-success.twig'); - } -} -``` - -Expand the factory like this: - -**NewsletterPageFactory** - -```php -getProvidedDependency(NewsletterPageDependencyProvider::CLIENT_NEWSLETTER_SUBSCRIPTION); - } -} -``` - -`CLIENT_NEWSLETTER_SUBSCRIPTION` should be defined like this: - -**NewsletterPageDependencyProvider** - -```php -addNewsletterClient($container); - $container = $this->addCustomerClient($container); - $container = $this->addNewsletterSubscriptionClient($container); - return $container; - } - /** - * @param \Spryker\Yves\Kernel\Container $container - * - * @return \Spryker\Yves\Kernel\Container - */ - protected function addNewsletterSubscriptionClient(Container $container) - { - $container[static::CLIENT_NEWSLETTER_SUBSCRIPTION] = function (Container $container) { - return new NewsletterPageToNewsletterClientBridge($container->getLocator()->newsletter()->client()); - }; - return $container; - } -} -``` - -Prepare `NewsletterPageToNewsletterClientBridge`: - -**NewsletterPageToNewsletterClientBridge** - -```php -newsletterClient->approveDoubleOptInSubscriber($newsletterSubscriber); - } -} -``` - -And a contract for it: - -**NewsletterPageToNewsletterClientInterface** - -```php -buildRoute('/newsletter/success', 'NewsletterPage', 'Newsletter', 'successAction'); - $routeCollection->add(static::ROUTE_NAME_CUSTOMER_SUBSCRIBE, $route); - - $route = $this->buildRoute('/newsletter/unsubscribe', 'NewsletterPage', 'Newsletter', 'unsubscribeAction'); - $routeCollection->add(static::ROUTE_NAME_CUSTOMER_SUBSCRIBE, $route); - - return $routeCollection; - } -} -``` - -A small template for a subscription: - -**subscription-success** - -```html -{% raw %}{%{% endraw %} extends template('page-layout-main') {% raw %}%}{% endraw %} - -{% raw %}{%{% endraw %} define data = { - title: 'newsletter.subscription.success' | trans -} {% raw %}%}{% endraw %} - -{% raw %}{%{% endraw %} block pageInfo {% raw %}%}{% endraw %}{% raw %}{%{% endraw %} endblock {% raw %}%}{% endraw %} - -{% raw %}{%{% endraw %} block content {% raw %}%}{% endraw %} -
    -

    {% raw %}{{{% endraw %}data.title{% raw %}}}{% endraw %}

    -
    -{% raw %}{%{% endraw %} endblock {% raw %}%}{% endraw %} -``` - -And the second one is almost the same: - -**unsubscription-success** - -```html -{% raw %}{%{% endraw %} extends template('page-layout-main') {% raw %}%}{% endraw %} - -{% raw %}{%{% endraw %} define data = { - title: 'newsletter.unsubscription.success' | trans -} {% raw %}%}{% endraw %} - -{% raw %}{%{% endraw %} block pageInfo {% raw %}%}{% endraw %}{% raw %}{%{% endraw %} endblock {% raw %}%}{% endraw %} - -{% raw %}{%{% endraw %} block content {% raw %}%}{% endraw %} -
    -

    {% raw %}{{{% endraw %}data.title{% raw %}}}{% endraw %}

    -
    -{% raw %}{%{% endraw %} endblock {% raw %}%}{% endraw %} -``` - -## Update User Data - -In case you want to change user data on the Episerver side, you need to extend the Customer model - -**Customer** - -```php -getNewPassword())) { - $customerResponseTransfer = $this->updatePassword(clone $customerTransfer); - if ($customerResponseTransfer->getIsSuccess() === false) { - return $customerResponseTransfer; - } - } - $customerResponseTransfer = $this->createCustomerResponseTransfer(); - $customerResponseTransfer->setCustomerTransfer($customerTransfer); - $customerEntity = $this->getCustomer($customerTransfer); - $customerEntity->fromArray($customerTransfer->modifiedToArray()); - if ($customerTransfer->getLocale() !== null) { - $this->addLocaleByLocaleName($customerEntity, $customerTransfer->getLocale()->getLocaleName()); - } - $customerResponseTransfer = $this->validateCustomerEmail($customerResponseTransfer, $customerEntity); - if (!$customerEntity->isModified() || $customerResponseTransfer->getIsSuccess() !== true) { - return $customerResponseTransfer; - } - $customerEntity->save(); - $this->sendCustomerProfileUpdateMail($customerTransfer); - if ($customerTransfer->getSendPasswordToken()) { - $this->sendPasswordRestoreMail($customerTransfer); - } - return $customerResponseTransfer; - } - /** - * @param \Generated\Shared\Transfer\CustomerTransfer $customerTransfer - * - * @return void - */ - private function sendCustomerProfileUpdateMail(CustomerTransfer $customerTransfer): void - { - $mailTransfer = new MailTransfer(); - $mailTransfer->setType(CustomerChangeProfileMailTypePlugin::MAIL_TYPE); - $mailTransfer->setCustomer($customerTransfer); - $mailTransfer->setLocale($customerTransfer->getLocale()); - $this->mailFacade->handleMail($mailTransfer); - } -} -``` - -Set up a factory for the Customer module on the project level - -**CustomerBusinessFactory** - -```php -getQueryContainer(), - $this->createCustomerReferenceGenerator(), - $this->getConfig(), - $this->createEmailValidator(), - $this->getMailFacade(), - $this->getLocaleQueryContainer(), - $this->getStore(), - $this->createCustomerExpander(), - $this->getPostCustomerRegistrationPlugins() - ); - } -} -``` - -Create one more mail plugin for Customer on data changing (without a body) - -**CustomerChangeProfileMailTypePlugin** - -```php -extend(self::MAIL_PROVIDER_COLLECTION, function (MailProviderCollectionAddInterface $mailProviderCollection) { - $mailProviderCollection - ... - ->addProvider(new EpiserverNewsletterSubscriptionMailPlugin(), [ - ... - CustomerChangeProfileMailTypePlugin::MAIL_TYPE, - ... - ]); - return $mailProviderCollection; -}); -``` diff --git a/docs/scos/dev/technology-partner-guides/202005.0/marketing-and-conversion/customer-communication/inxmail/installing-and-configuring-inxmail.md b/docs/scos/dev/technology-partner-guides/202005.0/marketing-and-conversion/customer-communication/inxmail/installing-and-configuring-inxmail.md deleted file mode 100644 index 7c9cac7c688..00000000000 --- a/docs/scos/dev/technology-partner-guides/202005.0/marketing-and-conversion/customer-communication/inxmail/installing-and-configuring-inxmail.md +++ /dev/null @@ -1,40 +0,0 @@ ---- -title: Installing and configuring Inxmail -description: Install and configure Inxmail -last_updated: Jun 16, 2021 -template: howto-guide-template ---- - -This document describes how to install and configure Inxmail. - -## Installation - -To install Inxmail run the command in the console: -```php - composer require spryker-eco/inxmail:1.1.0 - ``` - -## Configuration - -{% info_block infoBox %} - -The module supports only a subset of Inxmail REST API—transactional emails (events). - -{% endinfo_block %} - -To set up the Inxmail initial configuration, use the credentials you received from your Inxmail server. Key ID and secret you can get from Settings → API keys panel on Inxmail server: -```php - $config[InxmailConstants::API_EVENT_URL] = ''; - $config[InxmailConstants::KEY_ID] = ''; - $config[InxmailConstants::SECRET] = ''; - ``` - -Event names depend on your events names on Inxmail server: -```php - $config[InxmailConstants::EVENT_CUSTOMER_REGISTRATION] = ''; - $config[InxmailConstants::EVENT_CUSTOMER_RESET_PASSWORD] = ''; - $config[InxmailConstants::EVENT_ORDER_NEW] = ''; - $config[InxmailConstants::EVENT_ORDER_SHIPPING_CONFIRMATION] = ''; - $config[InxmailConstants::EVENT_ORDER_CANCELLED] = ''; - $config[InxmailConstants::EVENT_ORDER_PAYMENT_IS_NOT_RECEIVED] = ''; - ``` diff --git a/docs/scos/dev/technology-partner-guides/202005.0/marketing-and-conversion/customer-communication/inxmail/integrating-inxmail.md b/docs/scos/dev/technology-partner-guides/202005.0/marketing-and-conversion/customer-communication/inxmail/integrating-inxmail.md deleted file mode 100644 index 0c830e8620e..00000000000 --- a/docs/scos/dev/technology-partner-guides/202005.0/marketing-and-conversion/customer-communication/inxmail/integrating-inxmail.md +++ /dev/null @@ -1,63 +0,0 @@ ---- -title: Integrating Inxmail -description: Integrate Inxmail in the Spryker Commerce OS -last_updated: Jun 16, 2021 -template: howto-guide-template ---- - -This document desribes how to integrate Inxmail. - -### New customer registration event - -Inxmail module has `\SprykerEco\Zed\Inxmail\Communication\Plugin\Customer\InxmailPostCustomerRegistrationPlugin`. This plugin implements `PostCustomerRegistrationPluginInterface` and can be used in `\Pyz\Zed\Customer\CustomerDependencyProvider::getPostCustomerRegistrationPlugins.` - -```php - ... - use SprykerEco\Zed\Inxmail\Communication\Plugin\Customer\InxmailPostCustomerRegistrationPlugin - ... - - /** - * @return \Spryker\Zed\CustomerExtension\Dependency\Plugin\PostCustomerRegistrationPluginInterface[] - */ - protected function getPostCustomerRegistrationPlugins(): array - { - return [ - ... - new InxmailPostCustomerRegistrationPlugin(), - ... - ]; - } - ``` - -### The customer asked to reset password event - -Inxmail module has `\SprykerEco\Zed\Inxmail\Communication\Plugin\Customer\InxmailCustomerRestorePasswordMailTypePlugin`. This plugin implements `MailTypePluginInterface` and can be used in `\Pyz\Zed\Mail\MailDependencyProvider::provideBusinessLayerDependencies` - -```php - ... - use \SprykerEco\Zed\Inxmail\Communication\Plugin\Customer\InxmailCustomerRestorePasswordMailTypePlugin; - ... - - /** - * @param \Spryker\Zed\Kernel\Container $container - * - * @return \Spryker\Zed\Kernel\Container - */ - public function provideBusinessLayerDependencies(Container $container) - { - $container = parent::provideBusinessLayerDependencies($container); - - $container->extend(self::MAIL_TYPE_COLLECTION, function (MailTypeCollectionAddInterface $mailCollection) { - $mailCollection - ... - ->add(new InxmailCustomerRestorePasswordMailTypePlugin()) - ... - - return $mailCollection; - }); - - ... - - return $container; - } - ``` diff --git a/docs/scos/dev/technology-partner-guides/202005.0/marketing-and-conversion/customer-communication/inxmail/inxmail-api-requests.md b/docs/scos/dev/technology-partner-guides/202005.0/marketing-and-conversion/customer-communication/inxmail/inxmail-api-requests.md deleted file mode 100644 index 80720c63f69..00000000000 --- a/docs/scos/dev/technology-partner-guides/202005.0/marketing-and-conversion/customer-communication/inxmail/inxmail-api-requests.md +++ /dev/null @@ -1,30 +0,0 @@ ---- -title: Inxmail API requests -description: Learn about the API requests for Inxmail in Spryker. -last_updated: Jun 16, 2021 -template: howto-guide-template ---- - -This document contains API requests for Inxmail. - -`\SprykerEco\Zed\Inxmail\Business\Api\Adapter\EventAdapter` which extend `\SprykerEco\Zed\Inxmail\Business\Api\Adapter\AbstractAdapter` contains all needed data for sending data to Inxmail for events. - -It sends the request via ` \Generated\Shared\Transfer\InxmailRequestTransfer` -```xml - - - - - - - - - - - ``` - -The payload for customer loads from `\SprykerEco\Zed\Inxmail\Business\Mapper\Customer\AbstractCustomerMapper::getPayload` and for order from `\SprykerEco\Zed\Inxmail\Business\Mapper\Order\AbstractOrderMapper`. Abstract classes can be extended and changed in `\SprykerEco\Zed\Inxmail\Business\InxmailBusinessFactory.` - -For right URL's to images in the email body you should extend `\SprykerEco\Zed\Inxmail\Business\Mapper\Order\AbstractOrderMapper` and implement protected method `getImageItemLink(ArrayObject $images)`. diff --git a/docs/scos/dev/technology-partner-guides/202005.0/marketing-and-conversion/customer-communication/inxmail/inxmail-order-referenced-commands.md b/docs/scos/dev/technology-partner-guides/202005.0/marketing-and-conversion/customer-communication/inxmail/inxmail-order-referenced-commands.md deleted file mode 100644 index 524779fd863..00000000000 --- a/docs/scos/dev/technology-partner-guides/202005.0/marketing-and-conversion/customer-communication/inxmail/inxmail-order-referenced-commands.md +++ /dev/null @@ -1,49 +0,0 @@ ---- -title: Inxmail order referenced commands -description: Learn about the order referenced commands for Inxmail in Spryker. -last_updated: Jun 16, 2021 -template: howto-guide-template ---- - -Inxmail module has four different commands: - -* `\SprykerEco\Zed\Inxmail\Communication\Plugin\Oms\Command\InxmailNewOrderPlugin` -* `\SprykerEco\Zed\Inxmail\Communication\Plugin\Oms\Command\InxmailOrderCanceledPlugin` -* `\SprykerEco\Zed\Inxmail\Communication\Plugin\Oms\Command\InxmailPaymentNotReceivedPlugin` -* `\SprykerEco\Zed\Inxmail\Communication\Plugin\Oms\Command\InxmailShippingConfirmationPlugin` - -You can use this commands in `\Pyz\Zed\Oms\OmsDependencyProvider::getCommandPlugins` -```php - ... - use SprykerEco\Zed\Inxmail\Communication\Plugin\Oms\Command\InxmailNewOrderPlugin; - ... - - /** - * @param \Spryker\Zed\Kernel\Container $container - * - * @return \Spryker\Zed\Oms\Communication\Plugin\Oms\Command\CommandCollection - */ - protected function getCommandPlugins(Container $container) - { - $collection = parent::getCommandPlugins($container); - - ... - $collection->add(new InxmailNewOrderPlugin(), 'Inxmail/SendNewOrderRequest'); - ... - - return $collection; - } - ``` - -After that you are ready to use commands in OMS setup: -```php - - - - - - - - - - ``` diff --git a/docs/scos/dev/technology-partner-guides/202005.0/marketing-and-conversion/personalization-and-cross-selling/econda/adding-the-econda-tracking-code.md b/docs/scos/dev/technology-partner-guides/202005.0/marketing-and-conversion/personalization-and-cross-selling/econda/adding-the-econda-tracking-code.md deleted file mode 100644 index 964fd17e97f..00000000000 --- a/docs/scos/dev/technology-partner-guides/202005.0/marketing-and-conversion/personalization-and-cross-selling/econda/adding-the-econda-tracking-code.md +++ /dev/null @@ -1,257 +0,0 @@ ---- -title: Adding the Econda tracking code -description: Add the Econda tracking code into Spryker Commerce OS. -last_updated: Jun 16, 2021 -template: howto-guide-template -originalLink: https://documentation.spryker.com/v5/docs/econda-tracking -originalArticleId: 4cd418d8-66ff-4214-a2c0-c0b008a1f1d8 -redirect_from: - - /v5/docs/econda-tracking - - /v5/docs/en/econda-tracking - - /docs/scos/user/technology-partners/202005.0/marketing-and-conversion/personalization-and-cross-selling/econda/econda-tracking.html ---- - -Now that we have integrated Econda to the website we can start adding the tracking code. - -## Prerequisites - -To add tracking, you should also be familiar with [Twig.](/docs/scos/dev/legacy-demoshop/201811.0/twig-templates/overview-twig.html) - -To enable Econda tracking for your application, you need to add `econda_tracker.twig` to the proper page template, for example: -```php -{% raw %}{%{% endraw %} include -"@econda/partials/econda_tracker.twig" with { - 'content': '/catalog/' ~ ((category is not null) ? category.name ~ '/' : '') ~ product.name, - 'product': product, - 'category': category -} {% raw %}%}{% endraw %} -``` - -To enable Econda tracking for your application, you need to download a personalized JavaScript library from the econda Analytics Configuration menu (you can find detailed instructions on this on [https://support.econda.de/display/MONDE/Tracking-Bibliothek+herunterladen](https://support.econda.de/display/MONDE/Tracking-Bibliothek+herunterladen)). - -These instructions assume you are using Antelope for your Yves assets management. If your project uses other frontend automation you can still use the instructions as guidelines. - -Before getting started we recomend that you read the following topics: [asset management](/docs/scos/dev/legacy-demoshop/201811.0/frontend-overview.html#asset-management) -and [Twig](/docs/scos/dev/legacy-demoshop/201811.0/twig-templates/overview-twig.html) - -## Installing Assets - -After successfully downloading the `emos.js` you need to register it in Yves. One way is to create an econda folder in `assets/Yves/` folder and to copy it to SDK folder (look at picture below) - -Now you add an entry point for loading econda specific JS by adding `econda.js` file in Econda folder. - - - -Now you need to add a require line: - -```bash -require('./sdk/emos2'); //make double check the path to emos2.js -``` - -Now we need to add our new econda module to `entry.js` - - - -by adding a line `require('js/econda/econda');` - -## Integration - -Tracking is highly customizable and it depends on your setup. Please refer to [econda official documentation](https://support.econda.de/display/INDE). - -Here is a sample `econda-tracking.js` you can use as a help to integrate tracking to your website: - -**Sample econda-tracking.js** - -```js -'use strict'; - -var $ = require('jquery'); - -module.exports = { - init: function () { - window.emosTrackVersion = 2; //version of tracking lib that you are using - var hashCode = function(str){ - var hash = 0, char; - if (str.length == 0) return hash; - for (i = 0; i < str.length; i++) { - char = str.charCodeAt(i); - hash = ((hash<<5)-hash)+char; - hash = hash & hash; // Convert to 32bit integer - } - if (hash < 0) {hash = -hash;} - return "" + hash; - }; - - var emospro = { - siteid: window.econda_siteid, - content: window.econda_tracking_content, - langid: $("html").prop("lang"), - pageId: hashCode(window.location.href) - }; - - if (window.econda_search_query_string) { - emospro.search = [window.econda_search_query_string, window.econda_search_number_results]; - } - - if (window.econda_register_result) { - emospro.register = [window.econda_register_result, 0]; - } else if (window.econda_register_result == false) { - emospro.register = [0, 1]; - } - - if (window.econda_login_result) { - emospro.login = [window.econda_login_result, 0]; - } else if (window.econda_login_result == false) { - emospro.login = [0, 1]; - } - - if (window.econda_newsletter_subscription) { - emospro.Target = ['newsletter', 'Default newsletter subscription', 1, 'd']; - } - - if (window.econda_product_name) { - emospro.ec_Event = [ - { - type: 'view' , - pid: window.econda_product_sku, - sku: window.econda_product_sku, - name: window.econda_product_name, - price: window.econda_product_price, - group: window.econda_category_name, - count: 1 - } - ]; - } - - if (window.econda_billing_order_value) { - emospro.billing = [ - window.econda_billing_invoice_number, - econda_billing_customer_id, - econda_billing_location, - econda_billing_order_value - ]; - } - - if (window.econda_order_process) { - emospro.orderProcess = window.econda_order_process; - } - - if (window.econda_bought_product_name & window.econda_bought_product_name.length > 0) { - emospro.ec_Event = []; - for (var i = 0, len = econda_bought_product_name.length; i < len; i++) { - emospro.ec_Event.push({ - type: 'buy' , - pid: window.econda_bought_product_sku[i], - sku: window.econda_bought_product_sku[i], - name: window.econda_bought_product_name[i], - price: window.econda_bought_product_price[i], - count: window.econda_bought_product_count[i] - }); - } - } - - window.emosPropertiesEvent(emospro); - //console.log('econda tracking sent:'); - //console.log(emospro); - } -}; -``` - -Now you need to register your tracking module in econda.js by adding - -``` php -var econdaTracking = require('./econda-tracking'); -econdaTracking.init(); -``` -to `econda.js`. - -### Adding a Tracking Code to Twig -The econda module comes with a partial twig template `econda_tracker.twig` that you can use as an example in your project. - -**Twig Template** - -```php - -{% raw %}{%{% endraw %} if query is defined {% raw %}%}{% endraw %} - -{% raw %}{%{% endraw %} endif {% raw %}%}{% endraw %} - -{% raw %}{%{% endraw %} if number is defined {% raw %}%}{% endraw %} - -{% raw %}{%{% endraw %} endif {% raw %}%}{% endraw %} -{% raw %}{%{% endraw %} if product is defined {% raw %}%}{% endraw %} - - - -{% raw %}{%{% endraw %} endif {% raw %}%}{% endraw %} -{% raw %}{%{% endraw %} if category is defined {% raw %}%}{% endraw %} - -{% raw %}{%{% endraw %} endif {% raw %}%}{% endraw %} - -{% raw %}{%{% endraw %} if invoiceNumber is defined {% raw %}%}{% endraw %} - -{% raw %}{%{% endraw %} endif {% raw %}%}{% endraw %} - -{% raw %}{%{% endraw %} if location is defined {% raw %}%}{% endraw %} - -{% raw %}{%{% endraw %} endif {% raw %}%}{% endraw %} - -{% raw %}{%{% endraw %} if customerId is defined {% raw %}%}{% endraw %} - -{% raw %}{%{% endraw %} endif {% raw %}%}{% endraw %} - -{% raw %}{%{% endraw %} if orderValue is defined {% raw %}%}{% endraw %} - -{% raw %}{%{% endraw %} endif {% raw %}%}{% endraw %} - -{% raw %}{%{% endraw %} if orderProcess is defined {% raw %}%}{% endraw %} - -{% raw %}{%{% endraw %} endif {% raw %}%}{% endraw %} - -{% raw %}{%{% endraw %} if items is defined {% raw %}%}{% endraw %} - {% raw %}{%{% endraw %} for item in items {% raw %}%}{% endraw %} - - {##} - - - - {% raw %}{%{% endraw %} endfor {% raw %}%}{% endraw %} -{% raw %}{%{% endraw %} endif {% raw %}%}{% endraw %} - -{% raw %}{%{% endraw %} for econda_register_result in app.session.flashbag.get('flash.vars.register') {% raw %}%}{% endraw %} - -{% raw %}{%{% endraw %} endfor {% raw %}%}{% endraw %} - -{% raw %}{%{% endraw %} for econda_login_result in app.session.flashbag.get('flash.vars.login') {% raw %}%}{% endraw %} - -{% raw %}{%{% endraw %} endfor {% raw %}%}{% endraw %} - -{% raw %}{%{% endraw %} for econda_newsletter_subscription_result in app.session.flashbag.get('flash.vars.newsletter.subscription') {% raw %}%}{% endraw %} - -{% raw %}{%{% endraw %} endfor {% raw %}%}{% endraw %} -``` - -List of the accepted template variables: - -|Name |Description |Notes | -| --- | --- | --- | -| content |Path of the current page, as displayed in econda Monitor. Use slashes (“/”) to separate path components for drill-down analysis. | Translated into CONTENTLABEL parameter | -|query |Search query (could be passed to the search results page template) | Translated into QUERY parameter | -|number |Number of results returned by the search query (can be passed to the search results page template) | Translated into NUMBEROFHITS parameter | -|product | Associative array representing product data (can be passed to the product page template). Accepted keys: `abstract_name`, `abstractSku`, `price` | Product Information | -|category | Associative array representing category (can be passed to the product page template). Accepted keys: `name` |Product Information | -|invoiceNumber |Order number (can be passed to the checkout success template) | Translated into INVOICENUMBER parameter | -|location |Customer address (can be passed to the checkout success template) | Translated into LOCATION parameter | -|customerId |Customer ID (can be passed to the checkout success template) |Translated into CUSTOMERID parameter | -|orderValue |Total order value (can be passed to the checkout success template) | Translated into ORDERVALUE parameter| -|orderProcess |Checkout step name |Translated into STEPNAME parameter | -|items |Associative array representing cart items (can be passed to the checkout success template) |Link | -|flash.vars |Associative array representing intermittent data. Accepted keys: `register`, `login`, `newsletter.subscription` | | -{% info_block infoBox "Tip" %} -Remember to build your frontend by running antelope build yves from your project root folder -{% endinfo_block %} -In your project you will probably want to customize the tracking to fit the business requirements either by writing your own partial template or by overriding and extending the existing one, see [Best Practices - Twig Templates](/docs/scos/dev/legacy-demoshop/twig-templates/best-practices-twig-templates.html). - -### Checking Your Setup - -If your setup is correct you should see outgoing request going to Econda in browser developer tools when you navigate to a page that has tracing code included. diff --git a/docs/scos/dev/technology-partner-guides/202005.0/marketing-and-conversion/personalization-and-cross-selling/econda/exporting-econda-data.md b/docs/scos/dev/technology-partner-guides/202005.0/marketing-and-conversion/personalization-and-cross-selling/econda/exporting-econda-data.md deleted file mode 100644 index ff5365c5da7..00000000000 --- a/docs/scos/dev/technology-partner-guides/202005.0/marketing-and-conversion/personalization-and-cross-selling/econda/exporting-econda-data.md +++ /dev/null @@ -1,327 +0,0 @@ ---- -title: Exporting Econda data -description: Export Econda data via CSVs -last_updated: Jun 16, 2021 -template: howto-guide-template -originalLink: https://documentation.spryker.com/v5/docs/econda-export-csvs -originalArticleId: 951304bd-edff-4c99-823f-fd90f467b075 -redirect_from: - - /v5/docs/econda-export-csvs - - /v5/docs/en/econda-export-csvs - - /docs/scos/user/technology-partners/202005.0/marketing-and-conversion/personalization-and-cross-selling/econda/econda-exporting-csvs.html ---- - -To implement Econda plugin you should be familiar with the concept of [extending Spryker](/docs/scos/dev/back-end-development/extend-spryker/spryker-os-module-customisation/extend-a-core-module-that-is-used-by-another.html) and [plugins.](/docs/scos/dev/back-end-development/implementing-and-using-plugins.html) - -## Zed Output Folder - -We need to define the output folder where the generated CSV files will be saved. This is done by adding a line in your config. -```php -config [EcondaConstants::CSV_FOLDER_PATH] = APPLICATION_ROOT_DIR . '' ; -``` - -The application must have proper access(es) depending on what you expect to achieve. - -## Console - -To export the products and categories, we must register the Collectors that were created in the [Console](/docs/scos/dev/back-end-development/{{site.version}}/console-commandsconsole-commands-in-spryker.html). Econda module has already everything in place and the only thing you need to do is to add `CollectorFileExportConsole` to `Pyz\Zed\Console\ConsoleDependencyProvider` like in the snippet bellow: - -```php -criteriaBuilder - ->sql($sql) - ->setOrderBy([ - 'tree.fk_parent_category_node' => 'ASC', - 'tree.node_order' => 'DESC', - ]) - ->setParameter('fk_locale_1', $this->locale->getIdLocale()) - ->setParameter('fk_locale_2', $this->locale->getIdLocale()); - } -} -``` - -**For Products** - - ```php -criteriaBuilder - ->sql($sql) - ->setParameter('fk_locale_1', $this->locale->getIdLocale()); - } - -} -``` - -Now that we have defined queries we must register them with Econda module by adding them to project level Econda configuration. - -In the example below we assume that you are using PostgreSql but if you use MySql just register your queries under MySql key in array. - -```php - [ - - ], - 'PostgreSql' => [ - 'CategoryNodeEcondaQuery' => StorageCategoryNodeEcondaQuery::class, - 'ProductConcreteEcondaQuery' => StorageProductConcreteEcondaQuery::class - ], - ]; - - return $data[$dbEngineName]; - } -} -``` - -## How is my query mapped to CSV output ? -If you need to modify the CSV column mapping for any reason you will have to extend the `EcondaProductCollector` and `EcondaCategoryCollector` from the Econda module and implement your own `collectData` and `collectItem` methods. - -## Console -To export the products and categories, we must register the Collectors we have just created in the Console. The Econda module already has everything in place and the only thing you need to do is add `EcondaFileExportConsole` to `Pyz\Zed\Console\ConsoleDependencyProvider` as bellow: - -```php -addIgnorable('heartbeat', 'index', 'index'); - $this->addIgnorable('_profiler', 'wdt', '*'); - $this->addIgnorable('econda', 'index', '*'); - - return parent::getIgnorable(); - } - -} -``` -and a rule in your `config_default.php`: - -```php - 'econda', - 'controller' => 'index', - 'action' => '*', - 'type' => 'allow', - ], -]; - -``` -{% info_block errorBox "Warning" %} -ZED should never be accessible from public network. You should make a firewall exception to allow econda to connect to your ZED. -{% endinfo_block %} - -## Testing your Setup -To test if your ZED is reachable without login you can use CURL, running: - -```bash -curl http://mysprykershop.com/econda/index/category -``` - -should return something like: - -```php -ID,ParentID,name -5,1,Computer -2,1,"Cameras & Camcorders" -11,1,"Telecom & Navigation" -9,1,"Smart Wearables" -4,2,"Digital Cameras" -3,2,Camcorders -6,5,Notebooks -7,5,Pc's/Workstations -8,5,Tablets -10,9,Smartwatches -12,11,Smartphones -1,ROOT,Demoshop -and running: -``` - -`curl http://mysprykershop.com/econda/index/product` should return something like: - -```php -ID,Name,Description,PRODUCTURL,ImageURL,Price,Stock,ProductCategory -001_25904006,"Canon IXUS 160","Add a personal touch Make -shots your own with quick and easy control over picture -settings such as brightness and colour intensity. -Preview the results whi -",http://mysprykershop.com/en/canon-ixus-160-1,http://images.icecat.biz/img/norm/medium/25904006-8438.jpg,0,10,4 -Tracking -``` - -### Multi-Language support -If you have multi-language setup, you should provide locale as GET parameter to retrieve the proper version of a CSV file: `curl http://mysprykershop.com/econda/index/product?locale=en_US` -You can check `stores.php` file in your project to see what locales you have enabled. diff --git a/docs/scos/dev/technology-partner-guides/202005.0/marketing-and-conversion/personalization-and-cross-selling/econda/installing-econda.md b/docs/scos/dev/technology-partner-guides/202005.0/marketing-and-conversion/personalization-and-cross-selling/econda/installing-econda.md deleted file mode 100644 index 86bdeed0e1c..00000000000 --- a/docs/scos/dev/technology-partner-guides/202005.0/marketing-and-conversion/personalization-and-cross-selling/econda/installing-econda.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -title: Installing Econda -last_updated: Jun 16, 2021 -template: howto-guide-template ---- - -To install Econda, install the required module: - -```bash -composer require spryker-eco/econda -``` diff --git a/docs/scos/dev/technology-partner-guides/202005.0/marketing-and-conversion/personalization-and-cross-selling/econda/integrating-econda-cross-selling.md b/docs/scos/dev/technology-partner-guides/202005.0/marketing-and-conversion/personalization-and-cross-selling/econda/integrating-econda-cross-selling.md deleted file mode 100644 index c4ec4a539ea..00000000000 --- a/docs/scos/dev/technology-partner-guides/202005.0/marketing-and-conversion/personalization-and-cross-selling/econda/integrating-econda-cross-selling.md +++ /dev/null @@ -1,146 +0,0 @@ ---- -title: Integrating Econda cross-selling -description: Learn how to integrate Econda cross-selling -last_updated: Jun 16, 2021 -template: howto-guide-template -originalLink: https://documentation.spryker.com/v5/docs/econda-cross-sell -originalArticleId: ebbc97b5-fc12-4bd5-908b-f821e6070e40 -redirect_from: - - /v5/docs/econda-cross-sell - - /v5/docs/en/econda-cross-sell - - /docs/scos/user/technology-partners/202005.0/marketing-and-conversion/personalization-and-cross-selling/econda/econda-cross-sell.html - - /docs/scos/dev/technology-partner-guides/202005.0/marketing-and-conversion/personalization-and-cross-selling/econda/econda-cross-sell ---- -Cross sell is highly customizable and it depends on your setup. Please refer to [Econda offical documentation](https://support.econda.de/display/CSDE/Control+Panel). - -All necessary JS files are already integrated into the module, the only thing you need to do is to add your API key inside the `econda_crosssell.twig` template: -```php - -``` - -## Prerequisites - -The [econda JS SDK](http://downloads.econda.de/support/releases/js-sdk/current/econda-recommendations.php) download - -An Econda ID can be found in your account details (see image below). - - - -These instructions assume you are using Antelope for your Yves assets management. If your project uses other frontend automation you can still use the instructions as guidelines. - -Before getting started we recommend that you read the following topics: [asset management](/docs/scos/dev/legacy-demoshop/201811.0/frontend-overview.html#asset-management) -and [Twig.](/docs/scos/dev/legacy-demoshop/201811.0/twig-templates/overview-twig.html) - -## Installing assets - -After you have successfully downloaded the SDK you need to register it in Yves. One way is to create an Econda folder in `assets/Yves/` folder and extract the SDK to it (look at picture below) - - - -Now add an entry point for loading econda specific JS by adding the `econda.js` file in the Econda folder. - -Add a require line `require('./sdk/econda-recommendations');` - -Now we need to add our new Econda module to `entry.js`. - - - -by adding a line: - -```bash -require('js/econda/econda'); -``` - -## Integration - -Cross sell is highly customizable and it depends on your setup. Please refer to Econda offical [documentation](https://support.econda.de/display/CSDE/Control+Panel). - -Here is a sample `econda-widget.js` you can use as a help to integrate cross sell widget to your website: - -```bash -'use strict'; - -require('../../html/vendor/econda/cross-sell-widget.html'); - -var econda_aid = ""; - -module.exports = { - init: function() { - /** - * Setup widget, load data and render using defined rendering function - */ - if(typeof window.ecWidgets == 'undefined') { - window.ecWidgets = []; - } - if (document.getElementById('econda_widget_container')) { - var product_sku = document.getElementsByName('econda_product_sku')[0].value; - var category_name = document.getElementsByName('econda_category_name')[0].value; - window.ecWidgets.push({ - element: document.getElementById('econda_widget_container'), - renderer: {type: 'template', uri: '/assets/default/html/cross-sell-widget.html'}, - accountId: econda_aid, - id: 2, //id of widget you defined in econda UI - context: { - products: [{id: product_sku }], - categories: [{ - type: 'productcategory', - path: category_name - }] - }, - chunkSize: 3 - }); - } - } -}; -``` - -Register your tracking module in `econda.js` by adding to `econda.js`. - -```bash -var econdaWidget = require('./econda-widget'); -econdaWidget.init(); -``` - -In `econda-widget.js` we are include the `cross-sell-widget.html` for the widget template. Template example is below. - -```bash -
    -

    You may also like

    - <% for (ip = 0; ip < products.length; ip++) { %> - - <% } %> -
    -``` - -Please refer to Econda visual widget [documentation.](https://www.econda.de/en/technical-customer-support/) - -## Adding the Cross Sell Widget to Twig - -To include this snippet in your project, you need to include this code in your twig template: -```php -{% raw %}{%{% endraw %} include "@econda/partials/econda_crosssell.twig" with { - product: product, - category: category -} {% raw %}%}{% endraw %} -``` - -List of accepted template variables: - -| Name | Description | -| --- | --- | -| product | Associative array representing product data. Accepted keys: `abstractSku` | -| category | Associative array representing category. Accepted keys: `name` | - -## Building - -Do not forget to build your frontend by running antelope build yves from you project root folder. - -## Checking Your Setup - -If your setup is correct you should see the new Econda widget on the page where the cross sell widget was added. diff --git a/docs/scos/dev/technology-partner-guides/202005.0/marketing-and-conversion/personalization-and-cross-selling/econda/integrating-econda-front-end.md b/docs/scos/dev/technology-partner-guides/202005.0/marketing-and-conversion/personalization-and-cross-selling/econda/integrating-econda-front-end.md deleted file mode 100644 index fdebd00ec33..00000000000 --- a/docs/scos/dev/technology-partner-guides/202005.0/marketing-and-conversion/personalization-and-cross-selling/econda/integrating-econda-front-end.md +++ /dev/null @@ -1,166 +0,0 @@ ---- -title: Integrating Econda front end -description: Integrate frontend of the Econda module into the Spryker Commerce OS. -last_updated: Sep 15, 2020 -template: concept-topic-template -originalLink: https://documentation.spryker.com/v5/docs/econda-frontend-integration -originalArticleId: 0ec119d2-e2fb-4592-a2b2-f005157f4c83 -redirect_from: - - /v5/docs/econda-frontend-integration - - /v5/docs/en/econda-frontend-integration - - /docs/scos/user/technology-partners/202005.0/marketing-and-conversion/personalization-and-cross-selling/econda/econda-frontend-integration.html -related: - - title: Econda - link: docs/scos/user/technology-partners/page.version/marketing-and-conversion/personalization-and-cross-selling/econda.html - - title: Econda - Exporting CSVs - link: docs/scos/user/technology-partners/page.version/marketing-and-conversion/personalization-and-cross-selling/econda/econda-exporting-csvs.html - - title: Econda - Tracking - link: docs/scos/user/technology-partners/page.version/marketing-and-conversion/personalization-and-cross-selling/econda/econda-tracking.html - - title: Econda - Cross Sell - link: docs/scos/user/technology-partners/page.version/marketing-and-conversion/personalization-and-cross-selling/econda/econda-cross-sell.html ---- - -{% info_block infoBox "Info" %} - -Check [this article](/docs/scos/user/intro-to-spryker/intro-to-spryker.html#spryker-b2bb2c-demo-shops) to learn about Spryker Commerce OS (SCOS) - -{% endinfo_block %} - -## Include Econda Libraries and Scripts for Tracking and Cross-sell -Econda scripts are recommended to be connected at all the shop pages. To implement that: - -1. Place Econda libraries into `project/frontend/assets/scripts` folder. -2. Add path to folder to webpack in `frontend/configs/development.js`. - -**development.js** - -```js -CopyWebpackPlugin([ - ... - { - from: `${appSettings.paths.assets}/scripts`, - to: 'scripts', - ignore: ['*.gitkeep'] - } - ... -``` - -3. Extend `page-layout-main.twig` scripts block. - -**page-layout-main.twig** - -```xml -{% raw %}{%{% endraw %} block footerScripts {% raw %}%}{% endraw %} - {% raw %}{{{% endraw %} parent() {% raw %}}}{% endraw %} - - - - -{% raw %}{%{% endraw %} endblock {% raw %}%}{% endraw %} -``` - - ## Econda Cross Sell Integration -Extend `ProductController` on the project level. - -**ProductController** - -```php -getFactory() - ->getProductStorageClient() - ->mapProductStorageData($productData, $this->getLocale(), $this->getSelectedAttributes($request)); - - $this->assertProductRestrictions($productViewTransfer); - - return [ - 'product' => $productViewTransfer, - 'productUrl' => $this->getProductUrl($productViewTransfer), - 'econdaAccountId' => Config::get(EcondaConstants::ACCOUNT_ID), - ]; - } -} -``` - -Add a new field `econdaAccountId` to the `pdp.twig` file on the project level and extend product-detail molecule calling: - -```html -{% raw %}{%{% endraw %} define data = { - product: _view.product, - productUrl: _view.productUrl, - econdaAccountId: _view.econdaAccountId, - ... -} {% raw %}%}{% endraw %} - - -{% raw %}{%{% endraw %} include molecule('product-detail', 'ProductDetailPage') with { - class: 'box', - data: { - description: data.product.description, - attributes: data.product.attributes, - product: data.product, - econdaAccountId: data.econdaAccountId - } -} only {% raw %}%}{% endraw %} -``` - -To add Cross Sell Widget you should include Econda Cross-sell-widget molecule to the product detail page in `product-detail.twig` and add required data field: - -**product-detail.twig** - -```html -{% raw %}{%{% endraw %} define data = { - ... - product: required, - econdaAccountId: required, - category: {name: 'test'} - ... -} {% raw %}%}{% endraw %} - -{% raw %}{%{% endraw %} include molecule('econda-cross-sell-widget', 'Econda') with { - data: { - product: data.product, - category: data.category, - econdaAccountId: data.econdaAccountId - } -} only {% raw %}%}{% endraw %} -``` - -## Econda Analytics -As Econda analytic script `emos2.js` is connected, it will automatically send default statistic (visits, activity). To specify statistics: - -Include `econda-tracker.twig` molecule to the page you need to track and pass specific data to send to analytics. For example product views analytic on product detail page: -product -detail.twig - -**product -detail.twig** - -```html -{% raw %}{%{% endraw %} include molecule('econda-tracker', 'Econda') with { - data: { - product: data.product, - content: '/catalog/' ~ ((data.category is not null) ? data.category.name ~ '/' : '') ~ data.product.name, - category: data.category - } -} only {% raw %}%}{% endraw %} -``` - -This implementation will collect product information, viewed page, category and send it to econda product views statistics. - -You can refer to data contract in `econda-tracker.twig` to send another specific information. diff --git a/docs/scos/dev/technology-partner-guides/202005.0/marketing-and-conversion/personalization-and-cross-selling/econda/integrating-econda.md b/docs/scos/dev/technology-partner-guides/202005.0/marketing-and-conversion/personalization-and-cross-selling/econda/integrating-econda.md deleted file mode 100644 index f8f87b10755..00000000000 --- a/docs/scos/dev/technology-partner-guides/202005.0/marketing-and-conversion/personalization-and-cross-selling/econda/integrating-econda.md +++ /dev/null @@ -1,31 +0,0 @@ ---- -title: Integrating Econda -last_updated: Jun 16, 2021 -template: howto-guide-template -redirect_from: - - /docs/scod/user/technology-partners/202005.0/marketing-and-conversion/personalization-and-cross-selling/econda/econda-integration-into-project.html ---- - -## Prerequisites - -Our Econda module offers the integration with these services for the application you are building using Spryker. - -To integrate with Econda, you will need to connect your Econda account. If you do not have an Econda account please contact [Econda Sales](mailto:sales@econda.com?subject=Sales Request from a Spryker Contact). - -To enable Econda tracking for your application, you need to download a personalized JavaScript library from the Econda Analytics Configuration menu (you can find the detailed instructions on the [Econda website](https://support.econda.de/display/MONDE/Tracking-Bibliothek+herunterladen)). - -For [cross sell widgets](econda-cross-sell), we will demonstrate integration of JS SDK that you can download from the [Econda website](http://downloads.econda.de/support/releases/js-sdk/current/econda-recommendations.php). - -Please refer to [Econda](http://www.econda.de/) documentation on how to customize your Econda widgets. - -Some examples can be found at [https://www.econda.de/](https://www.econda.de/) - -Details on how to work with Javascript and templates in Spryker can be found in Front-End Guide. - -Econda module uses collectors to [export data to CSV](/docs/scos/user/technology-partners/{{page.version}}/marketing-and-conversion/personalization-and-cross-selling/econda/econda-exporting-csvs.html). Please read more about Collectors. - - - -## Econda JS Library and SDK - -Download a personalized JavaScript library from the Econda Analytics Configuration menu by following instructions at [https://support.econda.de/display/MONDE/Tracking-Bibliothek+herunterladen](https://support.econda.de/display/MONDE/Tracking-Bibliothek+herunterladen) and Econda JS SDK from [http://downloads.econda.de/support/releases/js-sdk/current/econda-recommendations.php](http://downloads.econda.de/support/releases/js-sdk/current/econda-recommendations.php) diff --git a/docs/scos/dev/technology-partner-guides/202005.0/operational-tools-monitoring-legal-etc/installing-and-configuring-tideways-with-vagrant.md b/docs/scos/dev/technology-partner-guides/202005.0/operational-tools-monitoring-legal-etc/installing-and-configuring-tideways-with-vagrant.md deleted file mode 100644 index 43e58061db0..00000000000 --- a/docs/scos/dev/technology-partner-guides/202005.0/operational-tools-monitoring-legal-etc/installing-and-configuring-tideways-with-vagrant.md +++ /dev/null @@ -1,33 +0,0 @@ ---- -title: Installing and configuring Tideways -last_updated: Jun 16, 2021 -template: howto-guide-template ---- - -The `spryker-eco/tideways` module provides a `TidewaysMonitoringExtensionPlugin` to send monitoring information to the tideways service. - -{% info_block infoBox "New Relic installation in Docker based projects" %} - -For installation instructions in Docker based projects, see [Configuring Tideways](/docs/scos/dev/the-docker-sdk/{{page.version}}/configuring-services.html#tideways) - -{% endinfo_block %} - -## Installing Tideways - -To install Tideways module, run: - -```bash -composer require spryker-eco/tideways -``` - -## Configuring Tideways - -To configure Tideways, do the following: -1. Install Tideways as described on the [Tideways support page](https://support.tideways.com/article/85-install-on-debian-ubuntu). -2. In your project, add `TidewaysMonitoringExtensionPlugin` to `MonitoringDependencyProvider::getMonitoringExtensions()`. - -## Implementation Overview - -Monitoring is a Spryker Module, and it provides a hook to add any monitoring provider you want to. In the Monitoring Module, you can find some service provider and controller listener for Yves and Zed which needs to be added to the `ApplicationDependencyProvider` to enable them. - -To monitor Spryker performance, go the the [Tideways application](https://app.tideways.io/login). diff --git a/docs/scos/dev/technology-partner-guides/202005.0/operational-tools-monitoring-legal-etc/loggly/configuring-loggly.md b/docs/scos/dev/technology-partner-guides/202005.0/operational-tools-monitoring-legal-etc/loggly/configuring-loggly.md deleted file mode 100644 index 6e17d7042e7..00000000000 --- a/docs/scos/dev/technology-partner-guides/202005.0/operational-tools-monitoring-legal-etc/loggly/configuring-loggly.md +++ /dev/null @@ -1,140 +0,0 @@ ---- -title: Configuring Loggly -last_updated: Jun 16, 2021 -template: howto-guide-template ---- - -To integrate Loggly, you need to have the `QueueHandler` enabled in your Logger configuration. - -In addition you need to properly configure the queue setup for Loggly to work. - -## RabbitMqDependencyProvider - -```php -append($this->getLoggerQueueOption()); - - return $queueOptionCollection; - } - - /** - * @return \Generated\Shared\Transfer\RabbitMqOptionTransfer - */ - protected function getLoggerQueueOption() - { - $queueOption = new RabbitMqOptionTransfer(); - $queueOption->setQueueName(Config::get(LogglyConstants::QUEUE_NAME)); - $queueOption->setDurable(true); - $queueOption->setType('direct'); - $queueOption->setDeclarationType(Connection::RABBIT_MQ_EXCHANGE); - $queueOption->setBindingQueue($this->getLoggerQueueBinding()); - - return $queueOption; - } - - /** - * @return \Generated\Shared\Transfer\RabbitMqOptionTransfer - */ - protected function getLoggerQueueBinding() - { - $queueOption = new RabbitMqOptionTransfer(); - $queueOption->setQueueName(Config::get(LogglyConstants::QUEUE_NAME)); - $queueOption->setDurable(true); - - return $queueOption; - } - -} -``` - -## QueueConfig - -```php - [ - 'rabbitmq' => $this->getRabbitMqQueueConsumerOptions(), - ], - ]; - } - - /** - * @return \Generated\Shared\Transfer\RabbitMqConsumerOptionTransfer - */ - protected function getRabbitMqQueueConsumerOptions() - { - $queueOptionTransfer = new RabbitMqConsumerOptionTransfer(); - $queueOptionTransfer->setConsumerExclusive(false); - $queueOptionTransfer->setNoWait(false); - - return $queueOptionTransfer; - } - -} -``` - -## QueueDependencyProvider - -```php - new LogglyLoggerQueueMessageProcessorPlugin(), - ]; - } - -} -``` diff --git a/docs/scos/dev/technology-partner-guides/202005.0/operational-tools-monitoring-legal-etc/loggly/loggly.md b/docs/scos/dev/technology-partner-guides/202005.0/operational-tools-monitoring-legal-etc/loggly/loggly.md deleted file mode 100644 index f6f3eb6a78a..00000000000 --- a/docs/scos/dev/technology-partner-guides/202005.0/operational-tools-monitoring-legal-etc/loggly/loggly.md +++ /dev/null @@ -1,142 +0,0 @@ ---- -title: Loggly -description: Overview of the Loggly integration. -template: concept-topic-template ---- - -The Loggly module provides a plugin to read log messages from a queue and send the messages via https to [Loggly](https://www.loggly.com/). - -To integrate this plugin you need to have the `QueueHandler` enabled in your Logger configuration. - -In addition you need to properly configure the queue setup for Loggly to work. - -## RabbitMqDependencyProvider - -```php -append($this->getLoggerQueueOption()); - - return $queueOptionCollection; - } - - /** - * @return \Generated\Shared\Transfer\RabbitMqOptionTransfer - */ - protected function getLoggerQueueOption() - { - $queueOption = new RabbitMqOptionTransfer(); - $queueOption->setQueueName(Config::get(LogglyConstants::QUEUE_NAME)); - $queueOption->setDurable(true); - $queueOption->setType('direct'); - $queueOption->setDeclarationType(Connection::RABBIT_MQ_EXCHANGE); - $queueOption->setBindingQueue($this->getLoggerQueueBinding()); - - return $queueOption; - } - - /** - * @return \Generated\Shared\Transfer\RabbitMqOptionTransfer - */ - protected function getLoggerQueueBinding() - { - $queueOption = new RabbitMqOptionTransfer(); - $queueOption->setQueueName(Config::get(LogglyConstants::QUEUE_NAME)); - $queueOption->setDurable(true); - - return $queueOption; - } - -} -``` - -## QueueConfig - -```php - [ - 'rabbitmq' => $this->getRabbitMqQueueConsumerOptions(), - ], - ]; - } - - /** - * @return \Generated\Shared\Transfer\RabbitMqConsumerOptionTransfer - */ - protected function getRabbitMqQueueConsumerOptions() - { - $queueOptionTransfer = new RabbitMqConsumerOptionTransfer(); - $queueOptionTransfer->setConsumerExclusive(false); - $queueOptionTransfer->setNoWait(false); - - return $queueOptionTransfer; - } - -} -``` - -## QueueDependencyProvider - -```php - new LogglyLoggerQueueMessageProcessorPlugin(), - ]; - } - -} -``` diff --git a/docs/scos/dev/technology-partner-guides/202005.0/operational-tools-monitoring-legal-etc/new-relic/configuring-new-relic-logging.md b/docs/scos/dev/technology-partner-guides/202005.0/operational-tools-monitoring-legal-etc/new-relic/configuring-new-relic-logging.md deleted file mode 100644 index 2a6e97521c3..00000000000 --- a/docs/scos/dev/technology-partner-guides/202005.0/operational-tools-monitoring-legal-etc/new-relic/configuring-new-relic-logging.md +++ /dev/null @@ -1,117 +0,0 @@ ---- -title: Configuring New Relic logging -template: howto-guide-template ---- - -This document describes how to configure different types of New Relic logging. - -## Configuring request logging - -Every request is automatically logged by New Relic. The name of the requests is the name of the used route for Yves and the `[module]/[controller]/[action]` for Zed. Also, the URL request and the host are stored as custom parameters for each request. - -To enable the New Relic monitoring extension, add it to the `MonitoringDependencyProvider` in your project: - -```php - '12345', - 'zed_de' => '12346', - 'yves_us' => '12347', - 'zed_us' => '12348', -]; -``` -Therefore, it will be possible to use the record deployment functionality built-in in the console commands, as follows: - -``` -$ vendor/bin/console newrelic:record-deployment [] [] -``` - -where the first three arguments are mandatory. A real example of usage would be: - -``` -$ vendor/bin/console newrelic:record-deployment MyStore user@gmail.com v1.2.0 "New version 1.2.0" "Fixed bugs in controller" -``` diff --git "a/docs/scos/dev/technology-partner-guides/202005.0/operational-tools-monitoring-legal-etc/new-relic/installing-and-configuring-new-relic\342\200\223with\342\200\223vagrant.md" "b/docs/scos/dev/technology-partner-guides/202005.0/operational-tools-monitoring-legal-etc/new-relic/installing-and-configuring-new-relic\342\200\223with\342\200\223vagrant.md" deleted file mode 100644 index 1d3178b45ec..00000000000 --- "a/docs/scos/dev/technology-partner-guides/202005.0/operational-tools-monitoring-legal-etc/new-relic/installing-and-configuring-new-relic\342\200\223with\342\200\223vagrant.md" +++ /dev/null @@ -1,51 +0,0 @@ ---- -title: Installing and configuring New Relic with Vagrant -template: howto-guide-template -redirect_from: - - /docs/scos/dev/technology-partner-guides/202005.0/operational-tools-monitoring-legal-etc/new-relic/installing-and-configuring-new-relic��with–vagrant.html -related: - - title: Migration Guide - Session - link: docs/scos/dev/module-migration-guides/migration-guide-session.html ---- - -{% info_block infoBox "New Relic installation in Docker based projects" %} - -For installation instructions in Docker based projects, see [Configuring New Relic](/docs/scos/dev/the-docker-sdk/{{page.version}}/configuring-services.html#configuring-new-relic) - -{% endinfo_block %} - -To install and configure New Relic, do the following. - -## Install New Relic - -The `spryker-eco/new-relic` module provides a `NewRelicMonitoringExtensionPlugin` to send monitoring information to the New Relic service. - - -To install New Relic module, run -```bash -composer require spryker-eco/new-relic -``` -This installs the following: - -* `spryker-eco/new-relic - 1.1.x` -* `spryker/monitoring - 2.x.x` -* `spryker/monitoring - 1.x.x` - -and removes the eventual New Relic legacy packages: - -* `spryker/new-relic` -* `spryker/new-relic-api` - - -## Configure New Relic - -1. [Create a New Relic account](https://newrelic.com/signup). -2. Install the New Relic PHP extension in your virtual machine as described in [New Relic setup instructions](https://rpm.newrelic.com/accounts/1131235/applications/setup). - -## Implementation overview - -Monitoring is a Spryker module that provides a hook to add any monitoring provider you want. In the Monitoring module, you can find a service provider and a controller listener for Yves and Zed that need to be added to `ApplicationDependencyProvider` to enable them. - -## New Relic API - -You can add custom New Relic events in your application with the API wrapper for New Relic in `\SprykerEco\Service\NewRelic\Plugin\NewRelicMonitoringExtensionPlugin`. For detailed information about the available API methods, see [New Relic API](https://docs.newrelic.com/docs/agents/php-agent/php-agent-api). diff --git a/docs/scos/dev/technology-partner-guides/202005.0/order-management-erpoms/punchout-catalogs/eco-punchout-catalogs-feature-integration.md b/docs/scos/dev/technology-partner-guides/202005.0/order-management-erpoms/punchout-catalogs/eco-punchout-catalogs-feature-integration.md deleted file mode 100644 index a4b56a3e199..00000000000 --- a/docs/scos/dev/technology-partner-guides/202005.0/order-management-erpoms/punchout-catalogs/eco-punchout-catalogs-feature-integration.md +++ /dev/null @@ -1,114 +0,0 @@ ---- -title: Eco- Punchout Catalogs Feature Integration -description: Integrate Eco- Punchout Catalogs Feature into the Spryker Commerce OS. -last_updated: Apr 15, 2020 -template: concept-topic-template -originalLink: https://documentation.spryker.com/v5/docs/eco-punchout-catalogs-feature-integration -originalArticleId: 7cec1513-b183-4cfa-a5b4-16cdbb7e14a5 -redirect_from: - - /v5/docs/eco-punchout-catalogs-feature-integration - - /v5/docs/en/eco-punchout-catalogs-feature-integration - - /docs/scos/user/technology-partners/202005.0/order-management-erpoms/punchout-catalogs/eco-punchout-catalogs-feature-integration.html ---- - -## Install Feature Core -### Prerequisites -Install the required features: - -| Name | Version | -| --- | --- | -| Spryker Core | {{page.version}} | -| Company Account | {{page.version}} | -| Cart | {{page.version}} | -To start feature integration, overview and install the necessary packages: - -| Name | Version | -| --- | --- | -| [Punchout Catalogs Spryker](https://github.com/punchout-catalogs/punchout-catalog-spryker/) | 2.0.1 | - -### 1) Install the Required Modules Using Composer -Run the following command(s) to install the required modules: -```bash -composer require spryker-eco/punchout-catalogs: "^1.0.0" --update-with-dependencies -``` - -{% info_block warningBox "Verification" %} -Make sure that the following modules were installed:
    ModuleExpected Directory
    `PunchoutCatalogs``vendor/spryker-eco/punchout-catalogs`
    -{% endinfo_block %} - -### 2) Set up Configuration -Add the following configuration to your project: - -| Configuration | Specification | Namespace | -| --- | --- | --- | -| Adjust `codeception.yml` | Enables tests execution for eco modules. | None | - -**codeception.yml** - -```html -include: - - vendor/spryker-eco/*/* -``` - -{% info_block warningBox "Verification" %} -Make sure that when you run `codeception run` command it also runs PunchoutCatalogs module tests. -{% endinfo_block %} - -### 3) Set up Behavior -#### Set up Punchout GUI Workflow -Enable the following behaviors by registering the plugins: - -| Plugin | Specification | Prerequisites | Namespace | -| --- | --- | --- | --- | -| `OciPunchoutCatalogConnectionFormatPlugin` | Expands punchout catalog connection form `Connection Format` choice field with `oci` option. | None |`SprykerEco\Zed\PunchoutCatalogs\Communication\Plugin\PunchoutCatalogs` | -| `CXmlPunchoutCatalogConnectionFormatPlugin` | Expands punchout catalog connection form `Connection Format` choice field with `xml` option. | None |`SprykerEco\Zed\PunchoutCatalogs\Communication\Plugin\PunchoutCatalogs` | -| `SetupRequestPunchoutCatalogConnectionTypePlugin` | Expands punchout catalog connection form `Connection Type` choice field with `setup_request` option. | None |`SprykerEco\Zed\PunchoutCatalogs\Communication\Plugin\PunchoutCatalogs` | - -**src/Pyz/Zed/PunchoutCatalogs/PunchoutCatalogsDependencyProvider.php** - -```php -Make sure that on create punchout catalog connection page you can see `Connection Type` choice field with following options [setup_request]. -{% endinfo_block %} - -Run the following command to enable Javascript and CSS changes: -```bash -console frontend:zed:build -``` -{% info_block infoBox "Verification" %} -Make sure that on a connection creation page, when you change the format from `cxml` to `oci` you can see "Username" field appeared instead of "Sender ID". -{% endinfo_block %} diff --git a/docs/scos/dev/technology-partner-guides/202005.0/order-management-erpoms/punchout-catalogs/eco-punchout-catalogs-product-bundles-feature-integration.md b/docs/scos/dev/technology-partner-guides/202005.0/order-management-erpoms/punchout-catalogs/eco-punchout-catalogs-product-bundles-feature-integration.md deleted file mode 100644 index c430cf73561..00000000000 --- a/docs/scos/dev/technology-partner-guides/202005.0/order-management-erpoms/punchout-catalogs/eco-punchout-catalogs-product-bundles-feature-integration.md +++ /dev/null @@ -1,61 +0,0 @@ ---- -title: Eco- Punchout Catalogs + Product Bundles Feature Integration -description: Integrate Eco- Punchout Catalogs + Product Bundles Feature into the Spryker Commerce OS. -last_updated: Apr 15, 2020 -template: concept-topic-template -originalLink: https://documentation.spryker.com/v5/docs/eco-punchout-catalogs-product-bundles-feature-integration -originalArticleId: e85dfa32-c141-495e-b19a-e0b2a6b7612e -redirect_from: - - /v5/docs/eco-punchout-catalogs-product-bundles-feature-integration - - /v5/docs/en/eco-punchout-catalogs-product-bundles-feature-integration - - /docs/scos/user/technology-partners/202005.0/order-management-erpoms/punchout-catalogs/eco-punchout-catalogs-product-bundles-feature-integration.html ---- - -## Install Feature Core -### Prerequisites -Install the required features: - -| Name | Version | -| --- | --- | -| Product Bundles | {{page.version}} | -To start feature integration, overview and install the necessary packages: - - -| Name | Version | -| --- | --- | -| Eco: Punchout Catalogs | 1.0.0 | - -### 1) Set up Behavior -Enable the following behaviors by registering the plugins: - -| Plugin | Specification | Prerequisites | Namespace | -| --- | --- | --- | --- | -| `BundleModePunchoutCatalogSetupRequestFormExtensionPlugin` | Expands punchout catalog connection form with Bundle Mode field. | None |`SprykerEco\Zed\PunchoutCatalogs\Communication\Plugin\PunchoutCatalogs` | - -**src/Pyz/Zed/PunchoutCatalogs/PunchoutCatalogsDependencyProvider.php** - -```php -ModuleExpected Directory`PunchoutCatalogsSpryker``vendor/punchout-catalogs/punchout-catalog-spryker` -{% endinfo_block %} - -### 2) Set up Configuration -{% info_block errorBox "Attention" %} -The following configuration creates a Zed access-point (for ERPs -{% endinfo_block %} without authentication. Make sure that your Zed is only accessible through a secured channel and only for the trusted clients (ERPs).) - -Add the following configuration to your project: - -| Configuration | Specification | Namespace | -| --- | --- | --- | -| Update config `KernelConstants::PROJECT_NAMESPACES` and `KernelConstants::CORE_NAMESPACES` | Enables autoloading for Punchout module directories. | None | -| Update config `AclConstants::ACL_DEFAULT_RULES` | Allow access to `PunchoutCatalog` routes for ALL users. | None | -| `AuthConfig::getIgnorable()` | Allow access to PunchoutCatalog routes without authentication. | Pyz\Zed\Auth | -| `PunchoutCatalogConfig::getBaseUrlYves()` | Defines urls for Punchout API endpoints. | Pyz\Zed\PunchoutCatalog | - -**config/Shared/config_default.php** - -```php - 'punchout-catalog', - 'controller' => 'request', - 'action' => 'index', - 'type' => 'allow', - ], -]; -``` - -{% info_block warningBox "Verification" %} -Make sure that you can access `http://zed.mysprykershop/punchout-catalog/request` URL when logged in as any user, e.g. admin.
    Make sure that you don't receive class not found exception after "Setup Behaviour" section plugins registration. -{% endinfo_block %} - -**src/Pyz/Zed/Auth/AuthConfig.php** - -```php -addIgnorable('punchout-catalog', 'request', 'index'); - - return parent::getIgnorable(); - } -} -``` - -{% info_block warningBox "Verification" %} -Make sure that you can access `http://zed.mysprykershop/punchout-catalog/request` without authentication. -{% endinfo_block %} - -**config/Shared/config_default.php** - -```php - sprintf('http://www.de.%s.local', $domain), - 'AT' => sprintf('http://www.at.%s.local', $domain), - 'US' => sprintf('http://www.us.%s.local', $domain), - ]; - } -} -``` - -{% info_block warningBox "Verification" %} -Make sure that you do not receive an `MissingYvesUrlConfigurationException` exception when trying to click on the Transfer Cart button on a cart page (this button will be available when the "Feature Frontend" is fully installed). -{% endinfo_block %} - -### 3) Set up Database Schema and Transfer Objects -Run the following commands to apply database changes and generate entity and transfer changes: - -```bash -console transfer:generate -console propel:install -console transfer:generate -``` -{% info_block warningBox "Verification" %} -Make sure that the following changes applied by checking your database:
    Database EntityTypeEvent
    `pgw_punchout_catalog_connection`tablecreated
    `pgw_punchout_catalog_connection_cart`tablecreated
    `pgw_punchout_catalog_connection_setup`tablecreated
    `pgw_punchout_catalog_transaction`tablecreated
    -{% endinfo_block %} -{% info_block infoBox "Verification" %} -Make sure that the following changes in transfer objects:
    TransferTypeEventPath
    `PunchoutCatalogSetupRequest`classcreated`src/Generated/Shared/Transfer/PunchoutCatalogSetupRequest`
    `PunchoutCatalogSetupResponse`classcreated`src/Generated/Shared/Transfer/PunchoutCatalogSetupResponse`
    `PunchoutCatalogProtocolData`classcreated`src/Generated/Shared/Transfer/PunchoutCatalogProtocolData`
    `PunchoutCatalogProtocolDataCart`classcreated`src/Generated/Shared/Transfer/PunchoutCatalogProtocolDataCart`
    `PunchoutCatalogProtocolDataOciCredentials`classcreated`src/Generated/Shared/Transfer/PunchoutCatalogProtocolDataOciCredentials`
    `PunchoutCatalogProtocolDataCxmlCredentials`classcreated`src/Generated/Shared/Transfer/PunchoutCatalogProtocolDataCxmlCredentials`
    `PunchoutCatalogConnectionCriteria`classcreated`src/Generated/Shared/Transfer/PunchoutCatalogConnectionCriteria`
    `PunchoutCatalogConnectionCredentialSearch`classcreated`src/Generated/Shared/Transfer/PunchoutCatalogConnectionCredentialSearch`
    `PunchoutCatalogConnectionList`classcreated`src/Generated/Shared/Transfer/PunchoutCatalogConnectionList`
    `PunchoutCatalogCxmlCredential`classcreated`src/Generated/Shared/Transfer/PunchoutCatalogCxmlCredential`
    `PunchoutCatalogOciCredential`classcreated`src/Generated/Shared/Transfer/PunchoutCatalogOciCredential`
    `PunchoutCatalogConnection`classcreated`src/Generated/Shared/Transfer/PunchoutCatalogConnection`
    `PunchoutCatalogConnectionCart`classcreated`src/Generated/Shared/Transfer/PunchoutCatalogConnectionCart`
    `PunchoutCatalogConnectionSetup`classcreated`src/Generated/Shared/Transfer/PunchoutCatalogConnectionSetup`
    `PunchoutCatalogCancelRequest`classcreated`src/Generated/Shared/Transfer/PunchoutCatalogCancelRequest`
    `PunchoutCatalogCartResponse`classcreated`src/Generated/Shared/Transfer/PunchoutCatalogCartResponse`
    `PunchoutCatalogCartResponseField`classcreated`src/Generated/Shared/Transfer/PunchoutCatalogCartResponseField`
    `PunchoutCatalogDocumentCart`classcreated`src/Generated/Shared/Transfer/PunchoutCatalogDocumentCart`
    `PunchoutCatalogDocumentCartItem`classcreated`src/Generated/Shared/Transfer/PunchoutCatalogDocumentCartItem`
    `PunchoutCatalogDocumentCartCustomer`classcreated`src/Generated/Shared/Transfer/PunchoutCatalogDocumentCartCustomer`
    `PunchoutCatalogDocumentCustomAttribute`classcreated`src/Generated/Shared/Transfer/PunchoutCatalogDocumentCustomAttribute`
    `PunchoutCatalogMapping`classcreated`src/Generated/Shared/Transfer/PunchoutCatalogMapping`
    `PunchoutCatalogMappingObject`classcreated`src/Generated/Shared/Transfer/PunchoutCatalogMappingObject`
    `PunchoutCatalogMappingObjectField`classcreated`src/Generated/Shared/Transfer/PunchoutCatalogMappingObjectField`
    `PunchoutCatalogMappingTransform`classcreated`src/Generated/Shared/Transfer/PunchoutCatalogMappingTransform`
    `PunchoutCatalogMappingTransformParams`classcreated`src/Generated/Shared/Transfer/PunchoutCatalogMappingTransformParams`
    `PunchoutCatalogCommonContext`classcreated`src/Generated/Shared/Transfer/PunchoutCatalogCommonContext`
    `PunchoutCatalogCartRequestContext`classcreated`src/Generated/Shared/Transfer/PunchoutCatalogCartRequestContext`
    `PunchoutCatalogCartResponseContext`classcreated`src/Generated/Shared/Transfer/PunchoutCatalogCartResponseContext`
    `PunchoutCatalogDocumentCustomer`classcreated`src/Generated/Shared/Transfer/PunchoutCatalogDocumentCustomer`
    `PunchoutCatalogDocumentCartItem`classcreated`src/Generated/Shared/Transfer/PunchoutCatalogDocumentCartItem`
    `PunchoutCatalogSetupRequestDocument`classcreated`src/Generated/Shared/Transfer/PunchoutCatalogSetupRequestDocument`
    `PunchoutCatalogEntryPoint`classcreated`src/Generated/Shared/Transfer/PunchoutCatalogEntryPoint`
    `PunchoutCatalogEntryPointFilter`classcreated`src/Generated/Shared/Transfer/PunchoutCatalogEntryPointFilter`
    -{% endinfo_block %} - -### 4) Add Translations -Append glossary according to your configuration: - -
    -data/import/glossary.csv - -```html -punchout-catalog.connection.list.title,Punch-out Catalog,en_US -punchout-catalog.connection.list.title,Ausstanzungskatalog,de_DE -punchout-catalog.connection.list.name,Name,en_US -punchout-catalog.connection.list.name,Name,de_DE -punchout-catalog.connection.list.date,Date,en_US -punchout-catalog.connection.list.date,Date,de_DE -punchout-catalog.connection.list.edit,Edit,en_US -punchout-catalog.connection.list.edit,Ändern,de_DE -punchout-catalog.connection.list.delete,Delete,en_US -punchout-catalog.connection.list.delete,Löschen,de_DE -punchout-catalog.connection.add-new-connection,New connection,en_US -punchout-catalog.connection.add-new-connection,Neu Anschluss,de_DE -punchout-catalog.connection.list.empty,No connections were found,en_US -punchout-catalog.connection.list.empty,Kein Anschluss wurde gefunden,de_DE -punchout-catalog.connection.create.title,Add new connection,en_US -punchout-catalog.connection.create.title,Neue Anschluss hinzufügen,de_DE -punchout-catalog.connection.name,Name,en_US -punchout-catalog.connection.name,Name,de_DE -punchout-catalog.connection.added,Connection added,en_US -punchout-catalog.connection.added,Connection wurde hinzufügt,de_DE -punchout-catalog.connection.updated,Connection updated,en_US -punchout-catalog.connection.updated,Anschluss wurde erfolgreich aktualisiert,de_DE -punchout-catalog.connection.not_updated,Error during connection update,en_US -punchout-catalog.connection.not_updated,Error during connection update DE,de_DE -punchout-catalog.error.is-not-punchout,Current session is not PunchOut,de_DE -punchout-catalog.error.is-not-punchout,Current session is not PunchOut,en_US -punchout-catalog.error.is-not-allowed,Current cart is not valid to transfer,de_DE -punchout-catalog.error.is-not-allowed,Current cart is not valid to transfer,en_US -punchout-catalog.error.missing-connection,Could not define PunchOut Connection,de_DE -punchout-catalog.error.missing-connection,Could not define PunchOut Connection,en_US -punchout-catalog.error.missing-cart-format,Could not define PunchOut Format,de_DE -punchout-catalog.error.missing-cart-format,Could not define PunchOut Format,en_US -punchout-catalog.error.general,An error happened,de_DE -punchout-catalog.error.general,An error happened,en_US -punchout-catalog.error.authentication,Authentication Failed,de_DE -punchout-catalog.error.authentication,Authentication Failed,en_US -punchout-catalog.error.invalid-data,Invalid PunchOut Format,de_DE -punchout-catalog.error.invalid-data,Invalid PunchOut Format,en_US -punchout-catalog.error.unexpected,An unexpected error happened,de_DE -punchout-catalog.error.unexpected,An unexpected error happened,en_US -punchout-catalog.cart.return,Transferring Cart to eProcurement client...,de_DE -punchout-catalog.cart.return,Transferring Cart to eProcurement client...,en_US -punchout-catalog.cart.checkout,Transfer Cart,de_DE -punchout-catalog.cart.checkout,Transfer Cart,en_US -punchout-catalog.cart.cancel,Cancel Cart & Return,de_DE -punchout-catalog.cart.cancel,Cancel Cart & Return,en_US -punchout-catalog.cart.go-to-transfer,Transfer Cart to eProcurement client,de_DE -punchout-catalog.cart.go-to-transfer,Transfer Cart to eProcurement client,en_US -punchout-catalog.cart.go-to-cancel,Cancel & Return to eProcurement client,de_DE -punchout-catalog.cart.go-to-cancel,Cancel & Return to eProcurement client,en_US -punchout-catalog.error.missing-company-business-unit,Missed Company Business Unit,de_DE -punchout-catalog.error.missing-company-business-unit,Missed Company Business Unit,en_US -punchout-catalog.error.missing-company-user,Missed Company User,de_DE -punchout-catalog.error.missing-company-user,Missed Company User,en_US -punchout-catalog.error.invalid.document.data,Invalid Document Data,de_DE -punchout-catalog.error.invalid.document.data,Invalid Document Data,en_US -punchout-catalog.error.invalid.source.data,Invalid Source Data,de_DE -punchout-catalog.error.invalid.source.data,Invalid Source Data,en_US -punchout-catalog.error.invalid.mapping.source,Invalid Mapping Source,de_DE -punchout-catalog.error.invalid.mapping.source,Invalid Mapping Source,en_US -punchout-catalog.error.invalid.mapping.format,Invalid Mapping Format,de_DE -punchout-catalog.error.invalid.mapping.format,Invalid Mapping Format,en_US -punchout-catalog.error.too-many-company-users,Customer should have only one Company user to login,de_DE -punchout-catalog.error.too-many-company-users,Customer should have only one Company user to login,en_US -``` -
    -
    - -Run the following console command to import data: - -```bash -console data:import glossary -``` - -{% info_block warningBox "Verification" %} -Make sure that in the database the configured data are added to the `spy_glossary` table. -{% endinfo_block %} - -### 5) Import Data -#### Import Punchout Catalog data -Prepare your data according to your requirements using our demo data: - -
    -vendor/punchout-catalogs/punchout-catalog-spryker/data/import/punchout_catalog_connection.csv - -```html -business_unit_key,username,password,credentials,is_active,type,format,name,mapping -business-unit-regular-1,user_1,user_1_pass,,1,setup_request,cxml,Client 1 - cXml - User 1,"{ - ""customer"": { - ""fields"": { - ""first_name"": { - ""path"": ""/cXML/Request[1]/PunchOutSetupRequest[1]/Extrinsic[@name='FirstName']"" - }, - ""last_name"": { - ""path"": ""/cXML/Request[1]/PunchOutSetupRequest[1]/Extrinsic[@name='LastName']"" - }, - ""email"": { - ""path"": ""/cXML/Request[1]/PunchOutSetupRequest[1]/Extrinsic[@name='UserEmail']"" - } - } - }, - ""cart_item"": { - ""fields"": { - ""internal_id"":{ - ""path"": ""/cXML/Request[1]/PunchOutSetupRequest[1]/ItemOut/ItemID[1]/SupplierPartAuxiliaryID"" - } - } - } -}" -business-unit-regular-1,user_1,user_1_pass,,1,setup_request,oci,Client 1 - Oci - User 1,"{ - ""customer"": { - ""fields"": { - ""first_name"": { - ""path"": ""first_name"" - }, - ""last_name"": { - ""path"": ""last_name"" - }, - ""email"": { - ""path"": ""email"" - } - } - } -}" -Supplier_Department,user_2,user_2_pass,,1,setup_request,cxml,Client 1 - cXml - User 2,"{ - ""customer"": { - ""fields"": { - ""first_name"": { - ""path"": ""/cXML/Request[1]/PunchOutSetupRequest[1]/Contact[1]/Name[1]"", - ""transform"": [{ - ""split"": { - ""sep"": ""\\s"", - ""index"": ""1"" - } - }] - }, - ""last_name"": { - ""path"": ""/cXML/Request[1]/PunchOutSetupRequest[1]/Contact[1]/Name[1]"", - ""transform"": [{ - ""split"": { - ""sep"": ""\\s"", - ""index"": ""2"" - } - }] - }, - ""email"": { - ""path"": ""/cXML/Request[1]/PunchOutSetupRequest[1]/Contact[1]/Email[1]"" - } - } - }, - ""cart_item"": { - ""fields"": { - ""internal_id"":{ - ""path"": ""/cXML/Request[1]/PunchOutSetupRequest[1]/ItemOut/ItemID[1]/SupplierPartAuxiliaryID"" - } - } - } -}" -Supplier_Department,user_2,user_2_pass,,1,setup_request,oci,Client 2 - Oci - User 2,"{ - ""customer"": { - ""fields"": { - ""first_name"": { - ""path"": ""first_name"" - }, - ""last_name"": { - ""path"": ""last_name"" - }, - ""email"": { - ""path"": ""email"" - } - } - } -}" -business-unit-regular-1,user_10,user_10_pass,,1,setup_request,cxml,Client 2 - cXml - User 1,"{}" -business-unit-regular-1,user_20,user_20_pass,,0,setup_request,cxml,Client 2 - cXml - User 20,"{}" -business-unit-mitte-1,user_30,user_30_pass,,1,setup_request,cxml,Client 3 - cXml - User 3,"{ - ""customer"": { - ""fields"": { - ""first_name"": { - ""path"": ""/cXML/Request[1]/PunchOutSetupRequest[1]/Extrinsic[@name='FirstName']"" - }, - ""last_name"": { - ""path"": ""/cXML/Request[1]/PunchOutSetupRequest[1]/Extrinsic[@name='LastName']"" - }, - ""email"": { - ""path"": ""/cXML/Request[1]/PunchOutSetupRequest[1]/Extrinsic[@name='UserEmail']"" - } - } - } -}" -business-unit-mitte-1,user_30,user_30_pass,,1,setup_request,oci,Client 3 - Oci - User 3,"{ - ""customer"": { - ""fields"": { - ""first_name"": { - ""path"": ""first_name"" - }, - ""last_name"": { - ""path"": ""last_name"" - }, - ""email"": { - ""path"": ""email"" - } - } - } -}" -``` -
    -
    - - -| Column | REQUIRED | Data Type | Data Example | -| --- | --- | --- | --- | -| `business_unit_key` | mandatory | string | `Sales_Department` | -| `username` | mandatory | string | `user_1` | -| `password` | mandatory | string | `user_1_pass` | -| `credentials` | no | string | | -| `is_active` | mandatory | bool | `1|0` | -| `type` | mandatory | string | `setup_request` | -| `format` | mandatory | string | `cxml|oci` | -| `name` | mandatory | string | `Client 1 - cXml - User 2` | -| `mapping` | mandatory | string | | - -**Data Example for mapping:** - -```html -{ - "customer": { - "fields": { - "first_name": { - "path": "/cXML/Request[1]/PunchOutSetupRequest[1]/Extrinsic[@name='FirstName']" - }, - "last_name": { - "path": "/cXML/Request[1]/PunchOutSetupRequest[1]/Extrinsic[@name='LastName']" - }, - "email": { - "path": "/cXML/Request[1]/PunchOutSetupRequest[1]/Extrinsic[@name='UserEmail']" - } - } - }, - "cart_item": { - "fields": { - "internal_id":{ - "path": "/cXML/Request[1]/PunchOutSetupRequest[1]/ItemOut/ItemID[1]/SupplierPartAuxiliaryID" - } - } - } -} -``` - -
    -vendor/punchout-catalogs/punchout-catalog-spryker/data/import/punchout_catalog_connection_cart.csv - -```html -connection_name,default_supplier_id,max_description_length,bundle_mode,totals_mode,encoding,mapping -Client 1 - cXml - User 1,spryker_sup_1,100,composite,header,base64,"{ - ""cart"": { - ""fields"": { - ""grand_total"": { - ""path"": ""/cXML/Message[1]/PunchOutOrderMessage[1]/PunchOutOrderMessageHeader[1]/Total[1]/Money[1]"" - }, - - ""tax_total"": { - ""path"": ""/cXML/Message[1]/PunchOutOrderMessage[1]/PunchOutOrderMessageHeader[1]/Tax[1]/Money[1]"" - }, - ""tax_description"": { - ""path"": ""/cXML/Message[1]/PunchOutOrderMessage[1]/PunchOutOrderMessageHeader[1]/Tax[1]/Description[1]"" - }, - - ""discount_total"": { - ""path"": ""/cXML/Message[1]/PunchOutOrderMessage[1]/PunchOutOrderMessageHeader[1]/Discount[1]/Money[1]"" - }, - ""discount_description"": { - ""path"": ""/cXML/Message[1]/PunchOutOrderMessage[1]/PunchOutOrderMessageHeader[1]/Discount[1]/Description[1]"" - }, - - ""currency"": { - ""path"": ""/cXML/Message[1]/PunchOutOrderMessage[1]/PunchOutOrderMessageHeader[1]/Total[1]/Money[1]/@currency,/cXML/Message[1]/PunchOutOrderMessage[1]/PunchOutOrderMessageHeader[1]/Tax[1]/Money[1]/@currency,/cXML/Message[1]/PunchOutOrderMessage[1]/PunchOutOrderMessageHeader[1]/Discount[1]/Money[1]/@currency"", - ""append"": true - }, - ""cart_note"": { - ""path"": ""/cXML/Message[1]/PunchOutOrderMessage[1]/PunchOutOrderMessageHeader[1]/Comments[1]"" - } - } - }, - ""cart_item"": { - ""fields"": { - ""line_number"": { - ""path"": ""@lineNumber"" - }, - ""parent_line_number"": { - ""path"": ""@parentLineNumber"" - }, - ""item_type"": { - ""path"": ""@itemType"" - }, - ""composite_item_type"": { - ""path"": ""@compositeItemType"" - }, - ""quantity"": { - ""path"": ""@quantity"" - }, - ""internal_id"": { - ""path"": ""ItemID[1]/SupplierPartAuxiliaryID[1]"" - }, - ""sku"": { - ""path"": ""ItemID[1]/SupplierPartID[1],ItemDetail[1]/BuyerPartID[1],ItemDetail[1]/ManufacturerPartID[1]"" - }, - ""unit_total"": { - ""path"": ""ItemDetail[1]/UnitPrice[1]/Money[1]"" - }, - ""currency"": { - ""path"": ""ItemDetail[1]/UnitPrice[1]/Money[1]/@currency"" - }, - ""name"": { - ""path"": ""ItemDetail[1]/Description[1]/ShortName"" - }, - ""long_description"": { - ""path"": ""ItemDetail[1]/Description[1]"" - }, - ""uom"": { - ""path"": ""ItemDetail[1]/UnitOfMeasure[1]"", - ""transform"": [{ - ""default"": { - ""value"": ""EA"" - } - }] - }, - ""brand"": { - ""path"": ""ItemDetail[1]/ManufacturerName[1]"" - }, - ""supplier_id"": { - ""path"": ""ItemDetail[1]/SupplierID[1]"" - }, - ""cart_note"": { - ""path"": ""ItemDetail[1]/Comments[1]"" - }, - ""image_url"": { - ""path"": ""ItemDetail[1]/Extrinsic[@name='ImageURL']"" - }, - ""locale"": { - ""path"": ""ItemDetail[1]/Description[1]/@xml:lang"" - } - } - } -}" -Client 1 - Oci - User 1,spryker_sup_2,128,composite,line,," -{ - ""cart_item"": { - ""fields"": { - ""quantity"": { - ""path"": ""NEW_ITEM-QUANTITY[%line_number%]"" - }, - ""internal_id"": { - ""path"": ""NEW_ITEM-EXT_PRODUCT_ID[%line_number%]"" - }, - ""parent_line_number"": { - ""path"": ""NEW_ITEM-PARENT_ID[%line_number%]"" - }, - ""item_type"": { - ""path"": ""NEW_ITEM-ITEM_TYPE[%line_number%]"", - ""transform"": - [ - { - ""map"": { - ""value"": ""composite"", - ""result"": ""R"" - } - }, - { - ""map"": { - ""value"": ""item"", - ""result"": ""O"" - } - } - ] - }, - ""sku"": { - ""path"": ""NEW_ITEM-VENDORMAT[%line_number%],NEW_ITEM-MANUFACTMAT[%line_number%]"" - }, - ""currency"": { - ""path"": ""NEW_ITEM-CURRENCY[%line_number%]"" - }, - ""unit_total"": { - ""path"": ""NEW_ITEM-PRICE[%line_number%]"" - }, - ""name"": { - ""path"": ""NEW_ITEM-DESCRIPTION[%line_number%]"" - }, - ""long_description"": { - ""path"": ""NEW_ITEM-LONGTEXT_%line_number%:132[]"" - }, - ""uom"": { - ""path"": ""NEW_ITEM-UNIT[%line_number%]"", - ""transform"": [{ - ""default"": { - ""value"": ""EA"" - } - }] - }, - ""unspsc"": { - ""path"": ""NEW_ITEM-MATGROUP[%line_number%]"" - }, - ""supplier_id"": { - ""path"": ""NEW_ITEM-VENDOR[%line_number%]"" - } - } - } -}" -Client 1 - cXml - User 2,spryker_sup_3,,single,line,url-encoded,"{ - ""cart"": { - ""fields"": { - ""grand_total"": { - ""path"": ""/cXML/Message[1]/PunchOutOrderMessage[1]/PunchOutOrderMessageHeader[1]/Total[1]/Money[1]"" - }, - - ""tax_total"": { - ""path"": ""/cXML/Message[1]/PunchOutOrderMessage[1]/PunchOutOrderMessageHeader[1]/Tax[1]/Money[1]"" - }, - ""tax_description"": { - ""path"": ""/cXML/Message[1]/PunchOutOrderMessage[1]/PunchOutOrderMessageHeader[1]/Tax[1]/Description[1]"" - }, - - ""discount_total"": { - ""path"": ""/cXML/Message[1]/PunchOutOrderMessage[1]/PunchOutOrderMessageHeader[1]/Discount[1]/Money[1]"" - }, - ""discount_description"": { - ""path"": ""/cXML/Message[1]/PunchOutOrderMessage[1]/PunchOutOrderMessageHeader[1]/Discount[1]/Description[1]"" - }, - - ""currency"": { - ""path"": ""/cXML/Message[1]/PunchOutOrderMessage[1]/PunchOutOrderMessageHeader[1]/Total[1]/Money[1]/@currency,/cXML/Message[1]/PunchOutOrderMessage[1]/PunchOutOrderMessageHeader[1]/Tax[1]/Money[1]/@currency,/cXML/Message[1]/PunchOutOrderMessage[1]/PunchOutOrderMessageHeader[1]/Discount[1]/Money[1]/@currency"", - ""append"": true - }, - ""cart_note"": { - ""path"": ""/cXML/Message[1]/PunchOutOrderMessage[1]/PunchOutOrderMessageHeader[1]/Comments[1]"" - } - } - }, - ""cart_item"": { - ""fields"": { - ""line_number"": { - ""path"": ""@lineNumber"" - }, - ""parent_line_number"": { - ""path"": ""@parentLineNumber"" - }, - ""item_type"": { - ""path"": ""@itemType"" - }, - ""composite_item_type"": { - ""path"": ""@compositeItemType"" - }, - ""quantity"": { - ""path"": ""@quantity"" - }, - ""internal_id"": { - ""path"": ""ItemID[1]/SupplierPartAuxiliaryID[1]"" - }, - ""sku"": { - ""path"": ""ItemID[1]/SupplierPartID[1],ItemDetail[1]/BuyerPartID[1],ItemDetail[1]/ManufacturerPartID[1]"" - }, - ""unit_total"": { - ""path"": ""ItemDetail[1]/UnitPrice[1]/Money[1]"" - }, - ""currency"": { - ""path"": ""ItemDetail[1]/UnitPrice[1]/Money[1]/@currency"" - }, - ""name"": { - ""path"": ""ItemDetail[1]/Description[1]/ShortName"" - }, - ""long_description"": { - ""path"": ""ItemDetail[1]/Description[1]"" - }, - ""uom"": { - ""path"": ""ItemDetail[1]/UnitOfMeasure[1]"", - ""transform"": [{ - ""default"": { - ""value"": ""EA"" - } - }] - }, - ""brand"": { - ""path"": ""ItemDetail[1]/ManufacturerName[1]"" - }, - ""supplier_id"": { - ""path"": ""ItemDetail[1]/SupplierID[1]"" - }, - ""cart_note"": { - ""path"": ""ItemDetail[1]/Comments[1]"" - }, - ""image_url"": { - ""path"": ""ItemDetail[1]/Extrinsic[@name='ImageURL']"" - }, - ""locale"": { - ""path"": ""ItemDetail[1]/Description[1]/@xml:lang"" - }, - ""options"": { - ""path"": ""ItemDetail[1]/Extrinsic/customOption()"", - ""multiple"": true - } - } - }, - ""customOption"": { - ""fields"": { - ""code"": { - ""path"": ""@name"" - }, - ""value"": { - ""path"": ""./"" - } - } - } -}" -Client 2 - Oci - User 2,spryker_sup_6,,single,line,," -{ - ""cart_item"": { - ""fields"": { - ""quantity"": { - ""path"": ""NEW_ITEM-QUANTITY[%line_number%]"" - }, - ""internal_id"": { - ""path"": ""NEW_ITEM-EXT_PRODUCT_ID[%line_number%]"" - }, - ""parent_line_number"": { - ""path"": ""NEW_ITEM-PARENT_ID[%line_number%]"" - }, - ""item_type"": { - ""path"": ""NEW_ITEM-ITEM_TYPE[%line_number%]"", - ""transform"": - [ - { - ""map"": { - ""value"": ""composite"", - ""result"": ""R"" - } - }, - { - ""map"": { - ""value"": ""item"", - ""result"": ""O"" - } - } - ] - }, - ""sku"": { - ""path"": ""NEW_ITEM-VENDORMAT[%line_number%],NEW_ITEM-MANUFACTMAT[%line_number%]"" - }, - ""currency"": { - ""path"": ""NEW_ITEM-CURRENCY[%line_number%]"" - }, - ""unit_total"": { - ""path"": ""NEW_ITEM-PRICE[%line_number%]"" - }, - ""name"": { - ""path"": ""NEW_ITEM-DESCRIPTION[%line_number%]"" - }, - ""long_description"": { - ""path"": ""NEW_ITEM-LONGTEXT_%line_number%:132[]"" - }, - ""uom"": { - ""path"": ""NEW_ITEM-UNIT[%line_number%]"", - ""transform"": [{ - ""default"": { - ""value"": ""EA"" - } - }] - }, - ""unspsc"": { - ""path"": ""NEW_ITEM-MATGROUP[%line_number%]"" - }, - ""supplier_id"": { - ""path"": ""NEW_ITEM-VENDOR[%line_number%]"" - } - } - } -}" -Client 2 - cXml - User 1,spryker_sup_4,,composite,header,url-encoded,{} -Client 3 - cXml - User 3,spryker_sup_5,,composite,line,base64,{} -Client 2 - cXml - User 20,spryker_sup_5,,composite,line,base64,{} -Client 3 - Oci - User 3,spryker_sup_5,,composite,line,,{} -``` -
    -
    - - -| Column | REQUIRED | Data Type | Data Example | -| --- | --- | --- | --- | -| `connection_name` | mandatory | string | `Client 1 - cXml - User 1` | -| default_supplier_id | mandatory | string | `323332` | -| max_description_length | mandatory | integer | `9999` | -| bundle_mode | mandatory | string | `composite | single` | -| totals_mode | mandatory | string | `list | header` | -| encoding | mandatory | string | `base64` | -| mapping | mandatory | string | | - -**Data Example for mapping:** - -```php -{ - "cart": { - "fields": { - "grand_total": { - "path": "/cXML/Message[1]/PunchOutOrderMessage[1]/PunchOutOrderMessageHeader[1]/Total[1]/Money[1]" - }, - - "tax_total": { - "path": "/cXML/Message[1]/PunchOutOrderMessage[1]/PunchOutOrderMessageHeader[1]/Tax[1]/Money[1]" - }, - "tax_description": { - "path": "/cXML/Message[1]/PunchOutOrderMessage[1]/PunchOutOrderMessageHeader[1]/Tax[1]/Description[1]" - }, - - "discount_total": { - "path": "/cXML/Message[1]/PunchOutOrderMessage[1]/PunchOutOrderMessageHeader[1]/Discount[1]/Money[1]" - }, - "discount_description": { - "path": "/cXML/Message[1]/PunchOutOrderMessage[1]/PunchOutOrderMessageHeader[1]/Discount[1]/Description[1]" - }, - - "currency": { - "path": "/cXML/Message[1]/PunchOutOrderMessage[1]/PunchOutOrderMessageHeader[1]/Total[1]/Money[1]/@currency,/cXML/Message[1]/PunchOutOrderMessage[1]/PunchOutOrderMessageHeader[1]/Tax[1]/Money[1]/@currency,/cXML/Message[1]/PunchOutOrderMessage[1]/PunchOutOrderMessageHeader[1]/Discount[1]/Money[1]/@currency", - "append": true - }, - "cart_note": { - "path": "/cXML/Message[1]/PunchOutOrderMessage[1]/PunchOutOrderMessageHeader[1]/Comments[1]" - } - } - }, - "cart_item": { - "fields": { - "line_number": { - "path": "@lineNumber" - }, - "parent_line_number": { - "path": "@parentLineNumber" - }, - "item_type": { - "path": "@itemType" - }, - "composite_item_type": { - "path": "@compositeItemType" - }, - "quantity": { - "path": "@quantity" - }, - "internal_id": { - "path": "ItemID[1]/SupplierPartAuxiliaryID[1]" - }, - "sku": { - "path": "ItemID[1]/SupplierPartID[1],ItemDetail[1]/BuyerPartID[1],ItemDetail[1]/ManufacturerPartID[1]" - }, - "unit_total": { - "path": "ItemDetail[1]/UnitPrice[1]/Money[1]" - }, - "currency": { - "path": "ItemDetail[1]/UnitPrice[1]/Money[1]/@currency" - }, - "name": { - "path": "ItemDetail[1]/Description[1]/ShortName" - }, - "long_description": { - "path": "ItemDetail[1]/Description[1]" - }, - "uom": { - "path": "ItemDetail[1]/UnitOfMeasure[1]", - "transform": [{ - "default": { - "value": "EA" - } - }] - }, - "brand": { - "path": "ItemDetail[1]/ManufacturerName[1]" - }, - "supplier_id": { - "path": "ItemDetail[1]/SupplierID[1]" - }, - "cart_note": { - "path": "ItemDetail[1]/Comments[1]" - }, - "image_url": { - "path": "ItemDetail[1]/Extrinsic[@name='ImageURL']" - }, - "locale": { - "path": "ItemDetail[1]/Description[1]/@xml:lang" - }, - "options": { - "path": "ItemDetail[1]/Extrinsic/customOption()", - "multiple": true - } - } - }, - "customOption": { - "fields": { - "code": { - "path": "@name" - }, - "value": { - "path": "./" - } - } - } -} -``` - -
    -vendor/punchout-catalogs/punchout-catalog-spryker/data/import/punchout_catalog_connection_setup.csv - -```php -connection_name,default_supplier_id,max_description_length,bundle_mode,totals_mode,encoding,mapping -Client 1 - cXml - User 1,spryker_sup_1,100,composite,header,base64,"{ - ""cart"": { - ""fields"": { - ""grand_total"": { - ""path"": ""/cXML/Message[1]/PunchOutOrderMessage[1]/PunchOutOrderMessageHeader[1]/Total[1]/Money[1]"" - }, - - ""tax_total"": { - ""path"": ""/cXML/Message[1]/PunchOutOrderMessage[1]/PunchOutOrderMessageHeader[1]/Tax[1]/Money[1]"" - }, - ""tax_description"": { - ""path"": ""/cXML/Message[1]/PunchOutOrderMessage[1]/PunchOutOrderMessageHeader[1]/Tax[1]/Description[1]"" - }, - - ""discount_total"": { - ""path"": ""/cXML/Message[1]/PunchOutOrderMessage[1]/PunchOutOrderMessageHeader[1]/Discount[1]/Money[1]"" - }, - ""discount_description"": { - ""path"": ""/cXML/Message[1]/PunchOutOrderMessage[1]/PunchOutOrderMessageHeader[1]/Discount[1]/Description[1]"" - }, - - ""currency"": { - ""path"": ""/cXML/Message[1]/PunchOutOrderMessage[1]/PunchOutOrderMessageHeader[1]/Total[1]/Money[1]/@currency,/cXML/Message[1]/PunchOutOrderMessage[1]/PunchOutOrderMessageHeader[1]/Tax[1]/Money[1]/@currency,/cXML/Message[1]/PunchOutOrderMessage[1]/PunchOutOrderMessageHeader[1]/Discount[1]/Money[1]/@currency"", - ""append"": true - }, - ""cart_note"": { - ""path"": ""/cXML/Message[1]/PunchOutOrderMessage[1]/PunchOutOrderMessageHeader[1]/Comments[1]"" - } - } - }, - ""cart_item"": { - ""fields"": { - ""line_number"": { - ""path"": ""@lineNumber"" - }, - ""parent_line_number"": { - ""path"": ""@parentLineNumber"" - }, - ""item_type"": { - ""path"": ""@itemType"" - }, - ""composite_item_type"": { - ""path"": ""@compositeItemType"" - }, - ""quantity"": { - ""path"": ""@quantity"" - }, - ""internal_id"": { - ""path"": ""ItemID[1]/SupplierPartAuxiliaryID[1]"" - }, - ""sku"": { - ""path"": ""ItemID[1]/SupplierPartID[1],ItemDetail[1]/BuyerPartID[1],ItemDetail[1]/ManufacturerPartID[1]"" - }, - ""unit_total"": { - ""path"": ""ItemDetail[1]/UnitPrice[1]/Money[1]"" - }, - ""currency"": { - ""path"": ""ItemDetail[1]/UnitPrice[1]/Money[1]/@currency"" - }, - ""name"": { - ""path"": ""ItemDetail[1]/Description[1]/ShortName"" - }, - ""long_description"": { - ""path"": ""ItemDetail[1]/Description[1]"" - }, - ""uom"": { - ""path"": ""ItemDetail[1]/UnitOfMeasure[1]"", - ""transform"": [{ - ""default"": { - ""value"": ""EA"" - } - }] - }, - ""brand"": { - ""path"": ""ItemDetail[1]/ManufacturerName[1]"" - }, - ""supplier_id"": { - ""path"": ""ItemDetail[1]/SupplierID[1]"" - }, - ""cart_note"": { - ""path"": ""ItemDetail[1]/Comments[1]"" - }, - ""image_url"": { - ""path"": ""ItemDetail[1]/Extrinsic[@name='ImageURL']"" - }, - ""locale"": { - ""path"": ""ItemDetail[1]/Description[1]/@xml:lang"" - } - } - } -}" -Client 1 - Oci - User 1,spryker_sup_2,128,composite,line,," -{ - ""cart_item"": { - ""fields"": { - ""quantity"": { - ""path"": ""NEW_ITEM-QUANTITY[%line_number%]"" - }, - ""internal_id"": { - ""path"": ""NEW_ITEM-EXT_PRODUCT_ID[%line_number%]"" - }, - ""parent_line_number"": { - ""path"": ""NEW_ITEM-PARENT_ID[%line_number%]"" - }, - ""item_type"": { - ""path"": ""NEW_ITEM-ITEM_TYPE[%line_number%]"", - ""transform"": - [ - { - ""map"": { - ""value"": ""composite"", - ""result"": ""R"" - } - }, - { - ""map"": { - ""value"": ""item"", - ""result"": ""O"" - } - } - ] - }, - ""sku"": { - ""path"": ""NEW_ITEM-VENDORMAT[%line_number%],NEW_ITEM-MANUFACTMAT[%line_number%]"" - }, - ""currency"": { - ""path"": ""NEW_ITEM-CURRENCY[%line_number%]"" - }, - ""unit_total"": { - ""path"": ""NEW_ITEM-PRICE[%line_number%]"" - }, - ""name"": { - ""path"": ""NEW_ITEM-DESCRIPTION[%line_number%]"" - }, - ""long_description"": { - ""path"": ""NEW_ITEM-LONGTEXT_%line_number%:132[]"" - }, - ""uom"": { - ""path"": ""NEW_ITEM-UNIT[%line_number%]"", - ""transform"": [{ - ""default"": { - ""value"": ""EA"" - } - }] - }, - ""unspsc"": { - ""path"": ""NEW_ITEM-MATGROUP[%line_number%]"" - }, - ""supplier_id"": { - ""path"": ""NEW_ITEM-VENDOR[%line_number%]"" - } - } - } -}" -Client 1 - cXml - User 2,spryker_sup_3,,single,line,url-encoded,"{ - ""cart"": { - ""fields"": { - ""grand_total"": { - ""path"": ""/cXML/Message[1]/PunchOutOrderMessage[1]/PunchOutOrderMessageHeader[1]/Total[1]/Money[1]"" - }, - - ""tax_total"": { - ""path"": ""/cXML/Message[1]/PunchOutOrderMessage[1]/PunchOutOrderMessageHeader[1]/Tax[1]/Money[1]"" - }, - ""tax_description"": { - ""path"": ""/cXML/Message[1]/PunchOutOrderMessage[1]/PunchOutOrderMessageHeader[1]/Tax[1]/Description[1]"" - }, - - ""discount_total"": { - ""path"": ""/cXML/Message[1]/PunchOutOrderMessage[1]/PunchOutOrderMessageHeader[1]/Discount[1]/Money[1]"" - }, - ""discount_description"": { - ""path"": ""/cXML/Message[1]/PunchOutOrderMessage[1]/PunchOutOrderMessageHeader[1]/Discount[1]/Description[1]"" - }, - - ""currency"": { - ""path"": ""/cXML/Message[1]/PunchOutOrderMessage[1]/PunchOutOrderMessageHeader[1]/Total[1]/Money[1]/@currency,/cXML/Message[1]/PunchOutOrderMessage[1]/PunchOutOrderMessageHeader[1]/Tax[1]/Money[1]/@currency,/cXML/Message[1]/PunchOutOrderMessage[1]/PunchOutOrderMessageHeader[1]/Discount[1]/Money[1]/@currency"", - ""append"": true - }, - ""cart_note"": { - ""path"": ""/cXML/Message[1]/PunchOutOrderMessage[1]/PunchOutOrderMessageHeader[1]/Comments[1]"" - } - } - }, - ""cart_item"": { - ""fields"": { - ""line_number"": { - ""path"": ""@lineNumber"" - }, - ""parent_line_number"": { - ""path"": ""@parentLineNumber"" - }, - ""item_type"": { - ""path"": ""@itemType"" - }, - ""composite_item_type"": { - ""path"": ""@compositeItemType"" - }, - ""quantity"": { - ""path"": ""@quantity"" - }, - ""internal_id"": { - ""path"": ""ItemID[1]/SupplierPartAuxiliaryID[1]"" - }, - ""sku"": { - ""path"": ""ItemID[1]/SupplierPartID[1],ItemDetail[1]/BuyerPartID[1],ItemDetail[1]/ManufacturerPartID[1]"" - }, - ""unit_total"": { - ""path"": ""ItemDetail[1]/UnitPrice[1]/Money[1]"" - }, - ""currency"": { - ""path"": ""ItemDetail[1]/UnitPrice[1]/Money[1]/@currency"" - }, - ""name"": { - ""path"": ""ItemDetail[1]/Description[1]/ShortName"" - }, - ""long_description"": { - ""path"": ""ItemDetail[1]/Description[1]"" - }, - ""uom"": { - ""path"": ""ItemDetail[1]/UnitOfMeasure[1]"", - ""transform"": [{ - ""default"": { - ""value"": ""EA"" - } - }] - }, - ""brand"": { - ""path"": ""ItemDetail[1]/ManufacturerName[1]"" - }, - ""supplier_id"": { - ""path"": ""ItemDetail[1]/SupplierID[1]"" - }, - ""cart_note"": { - ""path"": ""ItemDetail[1]/Comments[1]"" - }, - ""image_url"": { - ""path"": ""ItemDetail[1]/Extrinsic[@name='ImageURL']"" - }, - ""locale"": { - ""path"": ""ItemDetail[1]/Description[1]/@xml:lang"" - }, - ""options"": { - ""path"": ""ItemDetail[1]/Extrinsic/customOption()"", - ""multiple"": true - } - } - }, - ""customOption"": { - ""fields"": { - ""code"": { - ""path"": ""@name"" - }, - ""value"": { - ""path"": ""./"" - } - } - } -}" -Client 2 - Oci - User 2,spryker_sup_6,,single,line,," -{ - ""cart_item"": { - ""fields"": { - ""quantity"": { - ""path"": ""NEW_ITEM-QUANTITY[%line_number%]"" - }, - ""internal_id"": { - ""path"": ""NEW_ITEM-EXT_PRODUCT_ID[%line_number%]"" - }, - ""parent_line_number"": { - ""path"": ""NEW_ITEM-PARENT_ID[%line_number%]"" - }, - ""item_type"": { - ""path"": ""NEW_ITEM-ITEM_TYPE[%line_number%]"", - ""transform"": - [ - { - ""map"": { - ""value"": ""composite"", - ""result"": ""R"" - } - }, - { - ""map"": { - ""value"": ""item"", - ""result"": ""O"" - } - } - ] - }, - ""sku"": { - ""path"": ""NEW_ITEM-VENDORMAT[%line_number%],NEW_ITEM-MANUFACTMAT[%line_number%]"" - }, - ""currency"": { - ""path"": ""NEW_ITEM-CURRENCY[%line_number%]"" - }, - ""unit_total"": { - ""path"": ""NEW_ITEM-PRICE[%line_number%]"" - }, - ""name"": { - ""path"": ""NEW_ITEM-DESCRIPTION[%line_number%]"" - }, - ""long_description"": { - ""path"": ""NEW_ITEM-LONGTEXT_%line_number%:132[]"" - }, - ""uom"": { - ""path"": ""NEW_ITEM-UNIT[%line_number%]"", - ""transform"": [{ - ""default"": { - ""value"": ""EA"" - } - }] - }, - ""unspsc"": { - ""path"": ""NEW_ITEM-MATGROUP[%line_number%]"" - }, - ""supplier_id"": { - ""path"": ""NEW_ITEM-VENDOR[%line_number%]"" - } - } - } -}" -Client 2 - cXml - User 1,spryker_sup_4,,composite,header,url-encoded,{} -Client 3 - cXml - User 3,spryker_sup_5,,composite,line,base64,{} -Client 2 - cXml - User 20,spryker_sup_5,,composite,line,base64,{} -Client 3 - Oci - User 3,spryker_sup_5,,composite,line,,{} -``` -
    -
    - -| Column | REQUIRED | Data Type | Data Example | Data Explanation | -| --- | --- | --- | --- | --- | -| `connection_name` | mandatory | string | `Client 1 - cXml - User 1` | Name of the PunchoutCatalog connection. | -| `business_unit_key` | mandatory | string | `Sales_Department` | Allows customers to configure in which BU the new company user should be created (dynamic login mode) | -| `company_user_key` | mandatory | string | `Ottom--1` | Defines a dedicated company user that will be used by all ERP users (single company user login mode) | -| `login_mode` | mandatory | string | `single_user | dynamic_user_creation` | Defines if the connection uses "dynamic login" or "single company user login". | - -Register the following plugins to enable data import: - -| Plugin | Specification | Prerequisites | Namespace | -| --- | --- | --- | --- | -| `PunchoutCatalogConnectionDataImportPlugin` | Imports connections data into the database. | None | `PunchoutCatalog\Zed\PunchoutCatalog\Communication\Plugin\DataImport` | -| `PunchoutCatalogSetupDataImportPlugin` | Imports connections setup data into the database. | None | `PunchoutCatalog\Zed\PunchoutCatalog\Communication\Plugin\DataImport` | -| `PunchoutCatalogCartDataImportPlugin` | Imports connections cart data into the database. | None | `PunchoutCatalog\Zed\PunchoutCatalog\Communication\Plugin\DataImport` | - -**src/Pyz/Zed/DataImport/DataImportDependencyProvider.php** - -```php -addCustomerClient($container); - - return $container; - } - - /** - * @param \Spryker\Yves\Kernel\Container $container - * - * @return \Spryker\Yves\Kernel\Container - */ - protected function addCustomerClient(Container $container) - { - $container[static::CLIENT_CUSTOMER] = function (Container $container) { - return $container->getLocator()->customer()->client(); - }; - - return $container; - } -} -``` - - **src/Pyz/Yves/CartPage/CartPageFactory.php** - -```php -getProvidedDependency(CartPageDependencyProvider::CLIENT_CUSTOMER); - } -} -``` - -**src/Pyz/Yves/CartPage/Controller/CartController.php** - -```php -namespace Pyz\Yves\CartPage\Controller; - -use SprykerShop\Yves\CartPage\Controller\CartController as SprykerCartController; -use SprykerShop\Yves\ShopApplication\Controller\AbstractController; - -/** - * @method \SprykerShop\Yves\CartPage\CartPageFactory getFactory() - */ -class CartController extends SprykerCartController -{ - /** - * @param array|null $selectedAttributes - * - * @return array - */ - protected function executeIndexAction(?array $selectedAttributes): array - { - $data = parent::executeIndexAction($selectedAttributes); - - $data['customer'] = $$this->getFactory() - ->getCustomerClient() - ->getCustomer(); - - return $data; - } -``` - -**src/Pyz/Yves/CartPage/Theme/default/components/molecules/cart-summary/cart-summary.twig** - -```html -{% raw %}{%{% endraw %} define data = { - customer: required, -} {% raw %}%}{% endraw %} - -{% raw %}{%{% endraw %} set canProceedToCheckout = data.cart.items is not empty - and data.isQuoteValid - and (not is_granted('ROLE_USER') or can('WriteSharedCartPermissionPlugin', data.cart.idQuote)) - and (not is_granted('ROLE_USER') - or can('WriteSharedCartPermissionPlugin', data.cart.idQuote) - or data.customer.punchoutCatalogImpersonationDetails.is_punchout - ) -{% raw %}%}{% endraw %} - {% raw %}{%{% endraw %} if canProceedToCheckout {% raw %}%}{% endraw %} - {% raw %}{%{% endraw %} if data.customer.punchoutCatalogImpersonationDetails.is_punchout is defined {% raw %}%}{% endraw %} -
    - {% raw %}{%{% endraw %} widget 'PunchoutCatalogCheckoutButtonsWidget' args [data.customer] {% raw %}%}{% endraw %}{% raw %}{%{% endraw %} endwidget {% raw %}%}{% endraw %} - {% raw %}{%{% endraw %} else {% raw %}%}{% endraw %} - {% raw %}{%{% endraw %} widget 'ProceedToCheckoutButtonWidget' args [data.cart] {% raw %}%}{% endraw %} - {% raw %}{%{% endraw %} block body {% raw %}%}{% endraw %} -
    - {% raw %}{{{% endraw %} parent() {% raw %}}}{% endraw %} - {% raw %}{%{% endraw %} endblock {% raw %}%}{% endraw %} - {% raw %}{%{% endraw %} endwidget {% raw %}%}{% endraw %} - {% raw %}{%{% endraw %} endif {% raw %}%}{% endraw %} - {% raw %}{%{% endraw %} endif {% raw %}%}{% endraw %} -``` - -**src/Pyz/Yves/CartPage/Theme/default/templates/page-layout-cart/page-layout-cart.twig** - -```html -{% raw %}{%{% endraw %} define data = { - customer: _view.customer, -} {% raw %}%}{% endraw %} - - {% raw %}{%{% endraw %} block cartSummary {% raw %}%}{% endraw %} - {% raw %}{%{% endraw %} include molecule('cart-summary', 'CartPage') with { - data: { - customer: data.customer, - }, - } only {% raw %}%}{% endraw %} - {% raw %}{%{% endraw %} endblock {% raw %}%}{% endraw %} -``` - -Run the following command to enable Javascript and CSS changes: -```bash -console frontend:yves:build -``` -{% info_block warningBox "Verification" %} -Make sure that you see `Transfer Cart` and `Cancel Cart & Return` buttons on the cart page for `PunchoutCatalog` carts. -{% endinfo_block %} - -### 2) Enable Controllers -Register the following plugin: - -| Plugin | Description | Prerequisites | Namespace | -| --- | --- | --- | --- | -| `PunchoutCatalogControllerProvider` | Provides routes used in `PunchoutCatalogCheckoutButtonsWidget`. | None | `PunchoutCatalog\Yves\PunchoutCatalog\Plugin\Provider` | - -**src/Pyz/Yves/ShopApplication/YvesBootstrap.php** - -```php -getFactory() - ->getCustomerClient() - ->getCustomerByAccessToken($token); - - if (!$customerResponseTransfer->getIsSuccess()) { - $this->addErrorMessage(static::GLOSSARY_KEY_INVALID_ACCESS_TOKEN); - throw new AccessDeniedHttpException(); - } - - if ($this->isLoggedInCustomer()) { - $this->getFactory() - ->getCustomerClient() - ->logout(); - } - - $customerTransfer = $customerResponseTransfer->getCustomerTransfer(); - $token = $this->getFactory()->createUsernamePasswordToken($customerTransfer); - - $this->getFactory() - ->createCustomerAuthenticator() - ->authenticateCustomer($customerTransfer, $token); - - $returnRoute = $this->getReturnRoute($request); - - return $this->redirectResponseInternal($returnRoute); - } - - /** - * @param \Symfony\Component\HttpFoundation\Request|null $request - * - * @return string - */ - protected function getReturnRoute(?Request $request = null): string - { - if ($request === null) { - return static::ROUTE_CUSTOMER_OVERVIEW; - } - - $returnRoute = $request->query->get('returnUrl'); - - return empty($returnRoute) ? static::ROUTE_CUSTOMER_OVERVIEW : $returnRoute; - } -} -``` - -{% info_block warningBox "Verification" %} -Make sure that when you came to shop from ERP it logins you by the proper user, according to your connection Login Mode preferences, even if previously you were logged in by another customer. -{% endinfo_block %} diff --git a/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/adyen/enabling-filtering-of-payment-methods-for-adyen.md b/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/adyen/enabling-filtering-of-payment-methods-for-adyen.md deleted file mode 100644 index 7277e498643..00000000000 --- a/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/adyen/enabling-filtering-of-payment-methods-for-adyen.md +++ /dev/null @@ -1,52 +0,0 @@ ---- -title: Enabling filtering of payment methods for Ayden -description: Enable filtering available payment methods depending on the result of /paymentMethods API call in the Spryker Commerce OS. -last_updated: May 14, 2020 -template: concept-topic-template -originalLink: https://documentation.spryker.com/v5/docs/adyen-filter-payment-methods -originalArticleId: 49464b8f-9788-4edf-a44c-992245d22862 -redirect_from: - - /v5/docs/adyen-filter-payment-methods - - /v5/docs/en/adyen-filter-payment-methods -related: - - title: Payment Integration - Adyen - link: docs/scos/user/technology-partners/page.version/payment-partners/adyen.html - - title: Integrating Adyen - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/adyen/integrating-adyen.html - - title: Installing and configuring Adyen - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/adyen/installing-and-configuring-adyen.html - - title: Integrating Adyen payment methods - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/adyen/integrating-adyen-payment-methods.html ---- - -Adyen module provides filtering available payment methods depend on result of `/paymentMethods` API call. - -To enable this add `\SprykerEco\Zed\Adyen\Communication\Plugin\AdyenPaymentMethodFilterPlugin` to filter plugins list in `src/Pyz/Zed/Payment/PaymentDependencyProvider.php`: - -```php - 'AdyenCreditCard01', - AdyenConfig::ADYEN_SOFORT => 'AdyenSofort01', - AdyenConfig::ADYEN_DIRECT_DEBIT => 'AdyenDirectDebit01', - AdyenConfig::ADYEN_KLARNA_INVOICE => 'AdyenKlarnaInvoice01', - AdyenConfig::ADYEN_PREPAYMENT => 'AdyenPrepayment01', - AdyenConfig::ADYEN_IDEAL => 'AdyenIdeal01', - AdyenConfig::ADYEN_PAY_PAL => 'AdyenPayPal01', - AdyenConfig::ADYEN_ALI_PAY => 'AdyenAliPay01', - AdyenConfig::ADYEN_WE_CHAT_PAY => 'AdyenWeChatPay01', - ]; - ``` - -## Notifications - -To complete the payment modification requests (cancel, capture, refund), it's necessary to [configure notification on Adyen](https://docs.adyen.com/platforms/configure-notifications) merchant backend side. - -You can get more information form [Adyen documentation](https://docs.adyen.com/developers). - -The link to accept notifications from Adyen looks like https://mysprykershop.com/adyen/notification. - -## Adyen Configuration - -You can get your credentials by following the [instruction](https://docs.adyen.com/online-payments/classic-integrations/api-integration-ecommerce). - -You can get JS SDK url and generate your origin key by following this [instruction](https://docs.adyen.com/online-payments/classic-integrations/api-integration-ecommerce) from. diff --git a/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/adyen/integrating-adyen-payment-methods.md b/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/adyen/integrating-adyen-payment-methods.md deleted file mode 100644 index f096629e1ce..00000000000 --- a/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/adyen/integrating-adyen-payment-methods.md +++ /dev/null @@ -1,480 +0,0 @@ ---- -title: Integrating Adyen payment methods -description: Adyen supports credit card, direct debit, Klarna invoice, Prepayment, Sofort, PayPal, iDeal, AliPay, WeChatPay payment methods that can be integrated into the Spryker Commerce OS. -last_updated: Jul 27, 2020 -template: concept-topic-template -originalLink: https://documentation.spryker.com/v5/docs/adyen-provided-payment-methods -originalArticleId: 3f4c7bec-8156-4344-aec4-fe3960e25cc7 -redirect_from: - - /v5/docs/adyen-provided-payment-methods - - /v5/docs/en/adyen-provided-payment-methods -related: - - title: Payment Integration - Adyen - link: docs/scos/user/technology-partners/page.version/payment-partners/adyen.html - - title: Enabling filtering of payment methods for Ayden - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/adyen/enabling-filtering-of-payment-methods-for-adyen.html - - title: Installing and configuring Adyen - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/adyen/installing-and-configuring-adyen.html - - title: Integrating Adyen - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/adyen/integrating-adyen.html ---- - -## Credit Card - -Adyen module provides the following integration options: - - * simple - * with 3D Secure authorization - -3D Secure integration requires adjustments on the project level: - -1. Add an additional Checkout Step. Examplary implementation: - -**src/Pyz/Yves/CheckoutPage/Process/Steps/AdyenExecute3DStep.php** - - ```php -config = $config; - } - - /** - * @param \Generated\Shared\Transfer\QuoteTransfer $quoteTransfer - * - * @return bool - */ - public function requireInput(AbstractTransfer $quoteTransfer) - { - if ($quoteTransfer->getPayment()->getPaymentSelection() === AdyenConfig::ADYEN_CREDIT_CARD && - $this->config->isAdyenCreditCard3dSecureEnabled() - ) { - return true; - } - - return false; - } - - /** - * @param \Generated\Shared\Transfer\QuoteTransfer $quoteTransfer - * - * @return bool - */ - public function postCondition(AbstractTransfer $quoteTransfer) - { - return true; - } - - /** - * @param \Generated\Shared\Transfer\QuoteTransfer $quoteTransfer - * - * @return array - */ - public function getTemplateVariables(AbstractTransfer $quoteTransfer) - { - return [ - 'action' => $quoteTransfer->getPayment()->getAdyenRedirect()->getAction(), - 'fields' => $quoteTransfer->getPayment()->getAdyenRedirect()->getFields(), - ]; - } -} -``` - -2. Add template for this step: - -**src/Pyz/Yves/CheckoutPage/Theme/default/views/adyen/execute_3d.twig** - - ```php -{% raw %}{%{% endraw %} extends template('page-layout-main') {% raw %}%}{% endraw %} - -{% raw %}{%{% endraw %} block body {% raw %}%}{% endraw %} -
    - {% raw %}{%{% endraw %} for key, value in _view.fields {% raw %}%}{% endraw %} - - {% raw %}{%{% endraw %} endfor {% raw %}%}{% endraw %} -
    - -{% raw %}{%{% endraw %} endblock {% raw %}%}{% endraw %} -``` - -3. Put the step between place order and success steps: - -**src/Pyz/Yves/CheckoutPage/Process/StepFactory.php** - - ```php -getUrlGenerator(), - CheckoutPageControllerProvider::CHECKOUT_ERROR - ); - $stepCollection - ->addStep($this->createEntryStep()) - ->addStep($this->createCustomerStep()) - ->addStep($this->createAddressStep()) - ->addStep($this->createShipmentStep()) - ->addStep($this->createPaymentStep()) - ->addStep($this->createSummaryStep()) - ->addStep($this->createPlaceOrderStep()) - ->addStep($this->createAdyenExecute3DStep()) - ->addStep($this->createSuccessStep()); - return $stepCollection; - } - - /** - * @return \Spryker\Yves\StepEngine\Dependency\Step\StepInterface - */ - public function createPlaceOrderStep(): StepInterface - { - return new PlaceOrderStep( - $this->getCheckoutClient(), - $this->getFlashMessenger(), - $this->getStore()->getCurrentLocale(), - $this->getGlossaryStorageClient(), - CheckoutPageControllerProvider::CHECKOUT_PLACE_ORDER, - HomePageControllerProvider::ROUTE_HOME, - [ - 'payment failed' => CheckoutPageControllerProvider::CHECKOUT_PAYMENT, - 'shipment failed' => CheckoutPageControllerProvider::CHECKOUT_SHIPMENT, - ] - ); - } - /** - * @return \Spryker\Yves\StepEngine\Dependency\Step\StepInterface - */ - public function createAdyenExecute3DStep(): StepInterface - { - return new AdyenExecute3DStep( - CheckoutPageControllerProvider::CHECKOUT_ADYEN_EXECUTE_3D, - HomePageControllerProvider::ROUTE_HOME, - $this->getConfig() - ); - } -} - ``` - -4. Add controller to process 3D secure step: - -**src/Pyz/Yves/CheckoutPage/Controller/CheckoutController.php** - - ```php - createStepProcess()->process($request); - - if (!is_array($response)) { - return $response; - } - - return $this->view( - $response, - $this->getFactory()->getCustomerPageWidgetPlugins(), - '@CheckoutPage/views/adyen/execute_3d.twig' - ); - } -} -``` - -5. Add action to the route provider plugin: - -**src/Pyz/Yves/CheckoutPage/Plugin/Router/CheckoutPageRouteProviderPlugin.php** - - ```php - addAdyenExecute3DStepRoute($routeCollection); - // ... - - return $routeCollection; - } - - /** - * @param \Spryker\Yves\Router\Route\RouteCollection $routeCollection - * - * @return \Spryker\Yves\Router\Route\RouteCollection - */ - protected function addAdyenExecute3DStepRoute(RouteCollection $routeCollection): RouteCollection - { - $route = $this->buildRoute('/checkout/adyen-execute-3d', 'CheckoutPage', 'Checkout', 'adyenExecute3D'); - $routeCollection->add(static::ROUTE_NAME_CHECKOUT_ADYEN_EXECUTE_3D, $route); - - return $routeCollection; - } -} - ``` - -6. Extend `PlaceOrder` step to set 3D Secure url and params into `QuoteTransfer`: - -**src/Pyz/Yves/CheckoutPage/Process/Steps/PlaceOrderStep.php** - - ```php -checkoutClient->placeOrder($quoteTransfer); - - if ($checkoutResponseTransfer->getIsExternalRedirect()) { - $this->externalRedirectUrl = $checkoutResponseTransfer->getRedirectUrl(); - } - - if ($checkoutResponseTransfer->getSaveOrder() !== null) { - $quoteTransfer->setOrderReference($checkoutResponseTransfer->getSaveOrder()->getOrderReference()); - } - - $this->setCheckoutErrorMessages($checkoutResponseTransfer); - $this->checkoutResponseTransfer = $checkoutResponseTransfer; - - $quoteTransfer->getPayment()->setAdyenRedirect($checkoutResponseTransfer->getAdyenRedirect()); - - return $quoteTransfer; - } -} - ``` - -7. Move `CheckoutPageControllerProvider` from core to project level in `YvesBootstrap`: - -**\Pyz\Yves\ShopApplication\YvesBootstrap** - -```php -- use SprykerShop\Yves\CheckoutPage\Plugin\Provider\CheckoutPageControllerProvider; -+ use Pyz\Yves\CheckoutPage\Plugin\Provider\CheckoutPageControllerProvider; -``` - -8. Extend `CheckoutPageConfig` to add method for checking if 3D Secure is enabled: - -**\Pyz\Yves\CheckoutPage\CheckoutPageConfig** - -```php -get(AdyenConstants::CREDIT_CARD_3D_SECURE_ENABLED); - } -} -``` - -9. Extend `CheckoutPageFactory` to replace SprykerShop Step Factory with the project-level one: - -**\Pyz\Yves\CheckoutPage\CheckoutPageFactory** - -```php -extendPaymentMethodHandler($container); - $container = $this->extendSubFormPluginCollection($container); - - return $container; - } - - ... - - /** - * @param \Spryker\Yves\Kernel\Container $container - * - * @return \Spryker\Yves\Kernel\Container - */ - protected function extendPaymentMethodHandler(Container $container): Container - { - $container->extend(static::PAYMENT_METHOD_HANDLER, function (StepHandlerPluginCollection $paymentMethodHandlerCollection) { - $paymentMethodHandlerCollection->add(new AdyenPaymentHandlerPlugin(), PaymentTransfer::ADYEN_CREDIT_CARD); - $paymentMethodHandlerCollection->add(new AdyenPaymentHandlerPlugin(), PaymentTransfer::ADYEN_SOFORT); - $paymentMethodHandlerCollection->add(new AdyenPaymentHandlerPlugin(), PaymentTransfer::ADYEN_DIRECT_DEBIT); - $paymentMethodHandlerCollection->add(new AdyenPaymentHandlerPlugin(), PaymentTransfer::ADYEN_KLARNA_INVOICE); - $paymentMethodHandlerCollection->add(new AdyenPaymentHandlerPlugin(), PaymentTransfer::ADYEN_PREPAYMENT); - $paymentMethodHandlerCollection->add(new AdyenPaymentHandlerPlugin(), PaymentTransfer::ADYEN_IDEAL); - $paymentMethodHandlerCollection->add(new AdyenPaymentHandlerPlugin(), PaymentTransfer::ADYEN_PAY_PAL); - $paymentMethodHandlerCollection->add(new AdyenPaymentHandlerPlugin(), PaymentTransfer::ADYEN_ALI_PAY); - $paymentMethodHandlerCollection->add(new AdyenPaymentHandlerPlugin(), PaymentTransfer::ADYEN_WE_CHAT_PAY); - - return $paymentMethodHandlerCollection; - }); - - return $container; - } - - /** - * @param \Spryker\Yves\Kernel\Container $container - * - * @return \Spryker\Yves\Kernel\Container - */ - protected function extendSubFormPluginCollection(Container $container): Container - { - $container->extend(static::PAYMENT_SUB_FORMS, function (SubFormPluginCollection $subFormPluginCollection) { - $subFormPluginCollection->add(new AdyenCreditCardSubFormPlugin()); - $subFormPluginCollection->add(new AdyenSofortSubFormPlugin()); - $subFormPluginCollection->add(new AdyenDirectDebitSubFormPlugin()); - $subFormPluginCollection->add(new AdyenKlarnaInvoiceSubFormPlugin()); - $subFormPluginCollection->add(new AdyenPrepaymentSubFormPlugin()); - $subFormPluginCollection->add(new AdyenIdealSubFormPlugin()); - $subFormPluginCollection->add(new AdyenPayPalSubFormPlugin()); - $subFormPluginCollection->add(new AdyenAliPaySubFormPlugin()); - $subFormPluginCollection->add(new AdyenWeChatPaySubFormPlugin()); - - return $subFormPluginCollection; - }); - - return $container; - } -} -``` - -Add route provider plugin: - -**\Pyz\Yves\Router\RouterDependencyProvider:** - -```php -extendCommandPlugins($container); - $container = $this->extendConditionPlugins($container); - - return $container; - } - - /** - * @param \Spryker\Zed\Kernel\Container $container - * - * @return \Spryker\Zed\Kernel\Container - */ - protected function extendCommandPlugins(Container $container) - { - $container->extend(self::COMMAND_PLUGINS, function (CommandCollectionInterface $commandCollection) { - ... - $commandCollection->add(new AuthorizePlugin(), 'Adyen/Authorize'); - $commandCollection->add(new CancelPlugin(), 'Adyen/Cancel'); - $commandCollection->add(new CapturePlugin(), 'Adyen/Capture'); - $commandCollection->add(new RefundPlugin(), 'Adyen/Refund'); - $commandCollection->add(new CancelOrRefundPlugin(), 'Adyen/CancelOrRefund'); - - return $commandCollection; - }); - - return $container; - } - - /** - * @param \Spryker\Zed\Kernel\Container $container - * - * @return \Spryker\Zed\Kernel\Container - */ - protected function extendConditionPlugins(Container $container) - { - $container->extend(OmsDependencyProvider::CONDITION_PLUGINS, function (ConditionCollectionInterface $conditionCollection) { - ... - $conditionCollection->add(new IsAuthorizedPlugin(), 'Adyen/IsAuthorized'); - $conditionCollection->add(new IsCanceledPlugin(), 'Adyen/IsCanceled'); - $conditionCollection->add(new IsCancellationReceivedPlugin(), 'Adyen/IsCancellationReceived'); - $conditionCollection->add(new IsCancellationFailedPlugin(), 'Adyen/IsCancellationFailed'); - $conditionCollection->add(new IsCapturedPlugin(), 'Adyen/IsCaptured'); - $conditionCollection->add(new IsCaptureReceivedPlugin(), 'Adyen/IsCaptureReceived'); - $conditionCollection->add(new IsCaptureFailedPlugin(), 'Adyen/IsCaptureFailed'); - $conditionCollection->add(new IsRefundedPlugin(), 'Adyen/IsRefunded'); - $conditionCollection->add(new IsRefundReceivedPlugin(), 'Adyen/IsRefundReceived'); - $conditionCollection->add(new IsRefundFailedPlugin(), 'Adyen/IsRefundFailed'); - - return $conditionCollection; - }); - - return $container; - } -} -``` - -### Frontend Integration - -To make Adyen module work properly, update `payment.twig` file and add payment method forms into `customForms`: - -**src/Pyz/Yves/CheckoutPage/Theme/default/views/payment/payment.twig:** - - ```twig -... - -{% raw %}{%{% endraw %} define data = { - backUrl: _view.previousStepUrl, - forms: { - payment: _view.paymentForm - }, - title: 'checkout.step.payment.title' | trans, - customForms: { - 'Adyen/alipay': ['alipay', 'adyen'], - 'Adyen/credit-card': ['credit-card', 'adyen'], - 'Adyen/direct-debit': ['direct-debit', 'adyen'], - 'Adyen/ideal': ['ideal', 'adyen'], - 'Adyen/klarna-invoice': ['klarna-invoice', 'adyen'], - 'Adyen/paypal': ['paypal', 'adyen'], - 'Adyen/prepayment': ['prepayment', 'adyen'], - 'Adyen/sofort': ['sofort', 'adyen'], - 'Adyen/wechatpay': ['wechatpay', 'adyen'], - } -} {% raw %}%}{% endraw %} - -... -``` diff --git a/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/afterpay/installing-and-configuring-afterpay.md b/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/afterpay/installing-and-configuring-afterpay.md deleted file mode 100644 index c12f8ceea33..00000000000 --- a/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/afterpay/installing-and-configuring-afterpay.md +++ /dev/null @@ -1,113 +0,0 @@ ---- -title: Installing and configuring Afterpay -description: Learn how to install and configure AfterPay into Spryker-based project -last_updated: Jun 16, 2021 -template: howto-guide-template -originalLink: https://documentation.spryker.com/v5/docs/afterpay-installation-and-configuration -originalArticleId: e68afbe8-1d10-46cb-b897-4b2aa40788c8 -redirect_from: - - /v5/docs/afterpay-installation-and-configuration - - /v5/docs/en/afterpay-installation-and-configuration -related: - - title: Afterpay - link: docs/scos/user/technology-partners/page.version/payment-partners/afterpay.html ---- - -{% info_block errorBox %} - -Currently, AfterPay does not work correctly with [gift cards](/docs/scos/dev/feature-walkthroughs/{{page.version}}/gift-cards-feature-walkthrough.html) AfterPay. We will update the document after resolving the conflict. - -{% endinfo_block %} - -This document describes how to install and configure AfterPay. - -## Installing Afterpay - -To install AfterPay, install the AfterPay module: - -```bash -composer require spryker-eco/after-pay -``` - -## Configuring Afterpay - -To set up the AfterPay initial configuration, use the credentials you received from your AfterPay account. - -The `API_ENDPOINT_BASE_URL` parameter should be a link: you should get it from AfterPay. For test integration, you can use `https://sandbox.afterpay.io/api/v3/version` - -You should also get `API_CREDENTIALS_AUTH_KEY` and `PAYMENT_INVOICE_CHANNEL_ID` from your AfterPay account. - -You can use different Checkout Services; to select one, set up `$config[AfterPayConstants::AFTERPAY_AUTHORIZE_WORKFLOW]`: -* One-Step Authorization → `AFTERPAY_AUTHORIZE_WORKFLOW_ONE_STEP` -* Two-Step Authorization → `AFTERPAY_AUTHORIZE_WORKFLOW_TWO_STEPS` - -If you want to use Two-Step Authorization, in the Pyz layer, create the `Pyz\Yves\CheckoutPage\Process\Steps\PaymentStep.php` class and extend `SprykerShop\Yves\CheckoutPage\Process\Steps\PaymentStep.php` if `Pyz\Yves\CheckoutPage\Process\Steps\PaymentStep.php` does not exist. After that, you use `AfterPayClient`, call `getAvailablePaymentMethods()`, and handle the request for your specific logic. - -Add the new code to `config/Shared/config_default.php`: - -```php -... -use SprykerEco\Shared\AfterPay\AfterPayConfig; -use SprykerEco\Shared\AfterPay\AfterPayConstants; -... - -... -// ---------- AfterPay -$config[AfterPayConstants::API_ENDPOINT_BASE_URL] = 'https://sandboxapi.horizonafs.com/eCommerceServicesWebApi/api/v3/'; -$config[AfterPayConstants::API_CREDENTIALS_AUTH_KEY] = 'your api key'; -$config[AfterPayConstants::PAYMENT_INVOICE_CHANNEL_ID] = 'your invoice channel id'; -$config[AfterPayConstants::AFTERPAY_YVES_AUTHORIZE_PAYMENT_FAILED_URL] = 'http://www.de.afterpay.local/en/checkout/payment'; -$config[AfterPayConstants::AFTERPAY_AUTHORIZE_WORKFLOW] = AfterPayConfig::AFTERPAY_AUTHORIZE_WORKFLOW_ONE_STEP; -$config[AfterPayConstants::AFTERPAY_RISK_CHECK_CONFIGURATION] = [ - AfterPayConfig::PAYMENT_METHOD_INVOICE => AfterPayConfig::RISK_CHECK_METHOD_INVOICE, -]; -... -``` - -Replace this line in `config/Shared/config_default.php`: - -```php -$ENVIRONMENT_PREFIX = ''; -``` - -with this: - -```php -$ENVIRONMENT_PREFIX = 'AfterPay-local'; -``` - -Add a new item to the config array `$config[OmsConstants::PROCESS_LOCATION]` in `config/Shared/config_default.php`: - -```php -$config[OmsConstants::PROCESS_LOCATION] = [ - OmsConfig::DEFAULT_PROCESS_LOCATION, - $config[KernelConstants::SPRYKER_ROOT] . '/DummyPayment/config/Zed/Oms', - APPLICATION_ROOT_DIR . '/vendor/spryker-eco/after-pay/config/Zed/Oms', -]; -``` - -Add a new item to the config array `$config[OmsConstants::ACTIVE_PROCESSES]` in `config/Shared/config_default.php`: - -```php -$config[OmsConstants::ACTIVE_PROCESSES] = [ - 'DummyPayment01', - 'AfterPayInvoice01', -]; -``` - -Add a new item to the config array `$config[SalesConstants::PAYMENT_METHOD_STATEMACHINE_MAPPING]` in `config/Shared/config_default.php`: - -```php -$config[SalesConstants::PAYMENT_METHOD_STATEMACHINE_MAPPING] = [ - DummyPaymentConfig::PAYMENT_METHOD_INVOICE => 'DummyPayment01', - DummyPaymentConfig::PAYMENT_METHOD_CREDIT_CARD => 'DummyPayment01', - AfterPayConfig::PAYMENT_METHOD_INVOICE => 'AfterPayInvoice01', -]; -``` - -Add these lines to `data/import/glossary.csv`: - -```php -checkout.payment.provider.afterPay,AfterPay,en_US -checkout.payment.provider.afterPay,AfterPay,de_DE -``` diff --git a/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/afterpay/integrating-afterpay.md b/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/afterpay/integrating-afterpay.md deleted file mode 100644 index 8b5f73d81cf..00000000000 --- a/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/afterpay/integrating-afterpay.md +++ /dev/null @@ -1,120 +0,0 @@ ---- -title: Integrating AfterPay -description: Learn how to integrate AfterPay into Spryker-based project -last_updated: Jun 16, 2021 -template: howto-guide-template -related: - - title: Afterpay - link: docs/scos/user/technology-partners/page.version/payment-partners/afterpay.html ---- - -To integrate AfterPay, do the following: - -In `src/Pyz/Zed/Checkout/CheckoutDependencyProvider.php`, add a new plugin to `getCheckoutOrderSavers()`: - -```php -... -use SprykerEco\Zed\AfterPay\Communication\Plugin\Checkout\AfterPaySaveOrderPlugin; -... - -/** - * @param \Spryker\Zed\Kernel\Container $container - * - * @return \Spryker\Zed\Checkout\Dependency\Plugin\CheckoutSaveOrderInterface[] - */ - protected function getCheckoutOrderSavers(Container $container) - { - /** @var \Spryker\Zed\Checkout\Dependency\Plugin\CheckoutSaveOrderInterface[] $plugins */ - $plugins = [ - ... - new AfterPaySaveOrderPlugin(), - ]; - ``` - -In `src/Pyz/Zed/Oms/OmsDependencyProvider.php`, add: - -**Сode sample** - - ```php - ... -use Spryker\Zed\Oms\Communication\Plugin\Oms\Command\CommandCollection; -use Spryker\Zed\Oms\Communication\Plugin\Oms\Condition\ConditionCollection; -use SprykerEco\Zed\AfterPay\Communication\Plugin\Oms\Command\AuthorizePlugin; -use SprykerEco\Zed\AfterPay\Communication\Plugin\Oms\Command\CancelPlugin; -use SprykerEco\Zed\AfterPay\Communication\Plugin\Oms\Command\CapturePlugin; -use SprykerEco\Zed\AfterPay\Communication\Plugin\Oms\Command\RefundPlugin; -use SprykerEco\Zed\AfterPay\Communication\Plugin\Oms\Condition\IsAuthorizationCompletedPlugin; -use SprykerEco\Zed\AfterPay\Communication\Plugin\Oms\Condition\IsCancellationCompletedPlugin; -use SprykerEco\Zed\AfterPay\Communication\Plugin\Oms\Condition\IsCaptureCompletedPlugin; -use SprykerEco\Zed\AfterPay\Communication\Plugin\Oms\Condition\IsRefundCompletedPlugin; -... - -... - /** - * @param \Spryker\Zed\Kernel\Container $container - * - * @return \Spryker\Zed\Kernel\Container - */ - protected function addCommandPlugins(Container $container): Container - { - $container[self::COMMAND_PLUGINS] = function () { - $commandCollection = new CommandCollection(); - $commandCollection->add(new SendOrderConfirmationPlugin(), 'Oms/SendOrderConfirmation'); - $commandCollection->add(new SendOrderShippedPlugin(), 'Oms/SendOrderShipped'); - $commandCollection->add(new AuthorizePlugin(), 'AfterPay/Authorize'); - $commandCollection->add(new CancelPlugin(), 'AfterPay/Cancel'); - $commandCollection->add(new CapturePlugin(), 'AfterPay/Capture'); - $commandCollection->add(new RefundPlugin(), 'AfterPay/Refund'); - return $commandCollection; - }; - return $container; - } - /** - * @param \Spryker\Zed\Kernel\Container $container - * - * @return \Spryker\Zed\Kernel\Container - */ - protected function addConditionPlugins(Container $container): Container - { - $container[self::CONDITION_PLUGINS] = function () { - $conditionCollection = new ConditionCollection(); - $conditionCollection->add(new IsAuthorizationCompletedPlugin(), 'AfterPay/IsAuthorizationCompleted'); - $conditionCollection->add(new IsCancellationCompletedPlugin(), 'AfterPay/IsCancellationCompleted'); - $conditionCollection->add(new IsCaptureCompletedPlugin(), 'AfterPay/IsCaptureCompleted'); - $conditionCollection->add(new IsRefundCompletedPlugin(), 'AfterPay/IsRefundCompleted'); - return $conditionCollection; - }; - return $container; - } - ``` - -In the `src/Pyz/Zed/Oms/OmsDependencyProvider.php` in `provideBusinessLayerDependencies()` method replace this: - -```php -$container->extend(self::COMMAND_PLUGINS, function (CommandCollectionInterface $commandCollection) { - $commandCollection->add(new SendOrderConfirmationPlugin(), 'Oms/SendOrderConfirmation'); - $commandCollection->add(new SendOrderShippedPlugin(), 'Oms/SendOrderShipped'); - return $commandCollection; -}); -``` - -with this: -```php -$container->extend(self::COMMAND_PLUGINS, function (CommandCollectionInterface $commandCollection) { - $commandCollection->add(new SendOrderConfirmationPlugin(), 'Oms/SendOrderConfirmation'); - $commandCollection->add(new SendOrderShippedPlugin(), 'Oms/SendOrderShipped'); - $commandCollection->add(new AuthorizePlugin(), 'AfterPay/Authorize'); - $commandCollection->add(new CancelPlugin(), 'AfterPay/Cancel'); - $commandCollection->add(new CapturePlugin(), 'AfterPay/Capture'); - $commandCollection->add(new RefundPlugin(), 'AfterPay/Refund'); - return $commandCollection; -}); - -$container->extend(self::CONDITION_PLUGINS, function (ConditionCollectionInterface $conditionCollection) { - $conditionCollection->add(new IsAuthorizationCompletedPlugin(), 'AfterPay/IsAuthorizationCompleted'); - $conditionCollection->add(new IsCancellationCompletedPlugin(), 'AfterPay/IsCancellationCompleted'); - $conditionCollection->add(new IsCaptureCompletedPlugin(), 'AfterPay/IsCaptureCompleted'); - $conditionCollection->add(new IsRefundCompletedPlugin(), 'AfterPay/IsRefundCompleted'); - return $conditionCollection; -}); -``` diff --git a/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/amazon-pay/amazon-pay-sandbox-simulations.md b/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/amazon-pay/amazon-pay-sandbox-simulations.md deleted file mode 100644 index 26e20b764e9..00000000000 --- a/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/amazon-pay/amazon-pay-sandbox-simulations.md +++ /dev/null @@ -1,122 +0,0 @@ ---- -title: Amazon Pay - Sandbox Simulations -description: In this article, you can get information about sandbox simulations for the Amazon Pay module in Spryker Commerce OS. -last_updated: Apr 3, 2020 -template: concept-topic-template -originalLink: https://documentation.spryker.com/v5/docs/amazon-sandbox-simulations -originalArticleId: a8c23222-9b03-4782-9905-a4970e2110f0 -redirect_from: - - /v5/docs/amazon-sandbox-simulations - - /v5/docs/en/amazon-sandbox-simulations -related: - - title: Obtaining an Amazon Order Reference and information about shipping addresses - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/amazon-pay/obtaining-an-amazon-order-reference-and-information-about-shipping-addresses.html - - title: Amazon Pay - Refund - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/amazon-pay/legacy-demoshop-integration/amazon-pay-refund.html - - title: Handling orders with Amazon Pay API - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/amazon-pay/handling-orders-with-amazon-pay-api.html - - title: Amazon Pay - State Machine - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/amazon-pay/amazon-pay-state-machine.html - - title: Amazon Pay - Sandbox Simulations - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/amazon-pay/legacy-demoshop-integration/amazon-pay-sandbox-simulations.html - - title: Amazon Pay - Rendering a “Pay with Amazon” Button on the Cart Page - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/amazon-pay/legacy-demoshop-integration/amazon-pay-rendering-a-pay-with-amazon-button-on-the-cart-page.html - - title: Configuring Amazon Pay - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/amazon-pay/configuring-amazon-pay.html - - title: Handling orders with Amazon Pay API - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/amazon-pay/legacy-demoshop-integration/legacy-demoshop-handling-orders-with-amazon-pay-api.html - - title: Amazon Pay - Email Notifications - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/amazon-pay/legacy-demoshop-integration/amazon-pay-email-notifications.html - - title: Amazon Pay - Order Reference and Information about Shipping Addresses - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/amazon-pay/legacy-demoshop-integration/amazon-pay-order-reference-and-information-about-shipping-addresses.html ---- - - In order to reproduce some edge cases like declined payment or pending capture Amazon provides two solutions. First is special methods marked with red star on payment widget. - -![Click Me](https://spryker.s3.eu-central-1.amazonaws.com/docs/Technology+Partners/Payment+Partners/Amazon+Pay/00000005.png) - -It allows reproducing different cases of decline payment workflow. But there are more edge cases like expired authorisation or pending capture there is only one way to reproduce - pass simulation string as 'SellerNote' parameter of API request. - -## How to use the module -### Configuration -In order to use Amazon Pay system as well as related Spryker module, Amazon merchant account has to be created. After that all related credentials must be specified in spryker configuration file. - -```php -$config[AmazonpayConstants::CLIENT_ID] must be taken as value of Client Id of Amazon merchant -$config[AmazonpayConstants::CLIENT_SECRET] must be taken as value of Client Secret of Amazon merchant -$config[AmazonpayConstants::SELLER_ID] must be taken as value of Merchant ID of Amazon merchant -$config[AmazonpayConstants::ACCESS_KEY_ID] must be taken as value of Access Key ID of Amazon merchant -$config[AmazonpayConstants::SECRET_ACCESS_KEY] must be taken as value of Secret Access Key of Amazon merchant -$config[AmazonpayConstants::REGION] must be specified in ISO2 format. For example "DE" or "US". -$config[AmazonpayConstants::SANDBOX] must be set to false in production environment -$config[AmazonpayConstants::SUCCESS_PAYMENT_URL] must be specified as an URL where customer will be redirected after successful resulf of MFA challenge. -$config[AmazonpayConstants::FAILURE_PAYMENT_URL] must be specified as an URL where customer will be redirected after unsuccessful resulf of MFA challenge. -``` - -Next, two settings are about behaviour of authorization process and were described above: - -```php -$config[AmazonpayConstants::AUTH_TRANSACTION_TIMEOUT] according to info from Amazon this value is 1440. -$config[AmazonpayConstants::CAPTURE_NOW] -State Machine must be set according to the values of these two settings. - -$config[SalesConstants::PAYMENT_METHOD_STATEMACHINE_MAPPING][AmazonpayConstants::PAYMENT_METHOD] = - $config[AmazonpayConstants::CAPTURE_NOW] ? 'AmazonpayPaymentSync01' : 'AmazonpayPaymentAsync01'; -And one setting is spryker related only. It is a level of logging of Handling orders with Amazon Pay API calls -$config[AmazonpayConstants::ERROR_REPORT_LEVEL] -``` - -The value `ERRORS_ONLY` is recommended for production so that all errors can be investigated and fixed then. - -### Localization -There's only one related key in glossary: `amazonpay.payment.failed`. It defines the message to display on cart page in case of failed payment. - -### Modifications of the Project Code -The module provides not only Facade with all functionality behind but also controllers, templates, javascripts for rendering amazonpay widgets. It is usually very different from one shop to another but on early stage it could be usefull to use what bundle provides. - -First of all, AmazonpayControllerProvider must be added to YvesBootstrap. Modify `src/Pyz/Yves/Application/YvesBootstrap.php` as follows: - -```php -/** - * @param bool|null $isSsl - * - * @return \Pyz\Yves\Application\Plugin\Provider\AbstractYvesControllerProvider[] - */ -protected function getControllerProviderStack($isSsl) -{ - return [ - new AmazonpayControllerProvider($isSsl), -// other controllers of a shop -``` - -Next step is rendering Pay with Amazon button. Just insert this line in a proper place of twig template which is normally template of cart page: - -```php -{% raw %}{{{% endraw %} render(path('amazonpay_paybutton')) {% raw %}}}{% endraw %} -``` - -Make sure that the button is rendered and works properly. In the sandbox mode it is necessary to have Amazon Pay test account. Once buyer is signed in with his credentials, he must be redirected to the checkout page and Amazon Order Reference Id has to be passed. On the checkout page two widgets must be displayed as well as button for confirming purchase. Delivery method selection has to be build on merchant side and Amazon provides nothing for it. Nevertheless, it always depends on the country and therefore it has to be refreshed after the delivery address is selected from the widget. For this Amazon provides JavaScript callback `onAddressSelect`. In the bundle it triggers internal controller `getShipmentMethodsAction()` which triggers Facade's method `addSelectedAddressToQuote()`. This method retrieves selected location via Handling orders with Amazon Pay API and writes it to Quote. After that, it is possible to retrieve available shipment methods. - -For that purpose Spryker provides Shipment Bundle and its client with method `getAvailableMethods()`. - -After all the necessary data is selected, "place order" button should be available to click. After clicking the button Ajax call is sent to Yves, and `SetOrderReference`, `ConfirmOrderReference` API requests are sent to Amazon. In case of successful API calls, the customer is redirected to Amazon page for passing MFA challenge. In the case of passing the MFA challenge, the customer is redirected to the link defined in config as `AmazonpayConstants::SUCCESS_PAYMENT_URL`. In another case, the customer is redirected to the link defined in `AmazonpayConstants::FAILURE_PAYMENT_URL`. - -The rest of integration includes State machine which is different for synchronous and asynchronous modes. For the asynchronous mode endpoint URL for receiving IPN messages has to be specified. Bundle provides default one with controller looks as follows: - -```php - public function endpointAction() - -{ - $headers = getallheaders(); - $body = file_get_contents('php://input'); - - $ipnRequestTransfer = $this->getFacade()->convertAmazonpayIpnRequest($headers, $body); - $this->getFacade()->handleAmazonpayIpnRequest($ipnRequestTransfer); - - return new Response('Request has been processed'); -} -``` - -It receives HTTP header and body as array and string respectively and passes it to the Facade method `convertAmazonpayIpnRequest()` which returns transfer object. Exact type of it depends on the type of IPN request and may be one of those: - -`AmazonpayIpnPaymentAuthorizeRequest`, `AmazonpayIpnPaymentCaptureRequest`, `AmazonpayIpnPaymentRefundRequest`, `AmazonpayIpnOrderReferenceNotification`. Another Facade's method called `handleAmazonpayIpnRequest` is responsible for handling all these messages. Normally it changes the status of a payment in the database and triggers some State Machine event. Then state machine command and conditions take action. In case of any problems with receiving IPN messages it is possible to do the same manually using state machine buttons in Zed. diff --git a/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/amazon-pay/amazon-pay-state-machine.md b/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/amazon-pay/amazon-pay-state-machine.md deleted file mode 100644 index c1741f1a30b..00000000000 --- a/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/amazon-pay/amazon-pay-state-machine.md +++ /dev/null @@ -1,115 +0,0 @@ ---- -title: Amazon Pay - State Machine -description: This article describes the state machine for the Amazon Pay module in Spryker Commerce OS. -last_updated: Apr 3, 2020 -template: concept-topic-template -originalLink: https://documentation.spryker.com/v5/docs/amazon-pay-state-machine -originalArticleId: f7217f6c-8e8c-47d0-8be9-7544e8646bed -redirect_from: - - /v5/docs/amazon-pay-state-machine - - /v5/docs/en/amazon-pay-state-machine -related: - - title: Obtaining an Amazon Order Reference and information about shipping addresses - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/amazon-pay/obtaining-an-amazon-order-reference-and-information-about-shipping-addresses.html - - title: Amazon Pay - Refund - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/amazon-pay/legacy-demoshop-integration/amazon-pay-refund.html - - title: Handling orders with Amazon Pay API - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/amazon-pay/handling-orders-with-amazon-pay-api.html - - title: Amazon Pay - Sandbox Simulations - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/amazon-pay/legacy-demoshop-integration/amazon-pay-sandbox-simulations.html - - title: Amazon Pay - Rendering a “Pay with Amazon” Button on the Cart Page - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/amazon-pay/legacy-demoshop-integration/amazon-pay-rendering-a-pay-with-amazon-button-on-the-cart-page.html - - title: Amazon Pay - Sandbox Simulations - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/amazon-pay/amazon-pay-sandbox-simulations.html - - title: Configuring Amazon Pay - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/amazon-pay/configuring-amazon-pay.html - - title: Handling orders with Amazon Pay API - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/amazon-pay/legacy-demoshop-integration/legacy-demoshop-handling-orders-with-amazon-pay-api.html - - title: Amazon Pay - Email Notifications - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/amazon-pay/legacy-demoshop-integration/amazon-pay-email-notifications.html - - title: Amazon Pay - Order Reference and Information about Shipping Addresses - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/amazon-pay/legacy-demoshop-integration/amazon-pay-order-reference-and-information-about-shipping-addresses.html ---- - -The state machine is different for synchronous and asynchronous flow. Although from status "capture completed" it is the same and in the state machine, it's presented as a sub-process. - -The state machine for the synchronous flow: -![Click Me](https://spryker.s3.eu-central-1.amazonaws.com/docs/Technology+Partners/Payment+Partners/Amazon+Pay/sync.png) - -The state machine for the asynchronous flow: -![Click Me](https://spryker.s3.eu-central-1.amazonaws.com/docs/Technology+Partners/Payment+Partners/Amazon+Pay/async.png) - -## OMS Commands - -Here is a list of commands and conditions to support processing of OMS: -
    - Click here for example of injection - - ```php - - ``` -
    -
    diff --git a/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/amazon-pay/configuring-amazon-pay.md b/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/amazon-pay/configuring-amazon-pay.md deleted file mode 100644 index f155becd422..00000000000 --- a/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/amazon-pay/configuring-amazon-pay.md +++ /dev/null @@ -1,278 +0,0 @@ ---- -title: Configuring Amazon Pay -description: Configure and integrate Amazon Pay into the Spryker Commerce OS by following the instructions from this article. -last_updated: Apr 3, 2020 -template: concept-topic-template -originalLink: https://documentation.spryker.com/v5/docs/amazon-pay-configuration-scos -originalArticleId: e519a437-d5d3-409b-8d3f-e4539c475e92 -redirect_from: - - /v5/docs/amazon-pay-configuration-scos - - /v5/docs/en/amazon-pay-configuration-scos -related: - - title: Obtaining an Amazon Order Reference and information about shipping addresses - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/amazon-pay/obtaining-an-amazon-order-reference-and-information-about-shipping-addresses.html - - title: Amazon Pay - Refund - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/amazon-pay/legacy-demoshop-integration/amazon-pay-refund.html - - title: Handling orders with Amazon Pay API - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/amazon-pay/handling-orders-with-amazon-pay-api.html - - title: Amazon Pay - Sandbox Simulations - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/amazon-pay/legacy-demoshop-integration/amazon-pay-sandbox-simulations.html - - title: Amazon Pay - Rendering a “Pay with Amazon” Button on the Cart Page - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/amazon-pay/legacy-demoshop-integration/amazon-pay-rendering-a-pay-with-amazon-button-on-the-cart-page.html - - title: Amazon Pay - Sandbox Simulations - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/amazon-pay/amazon-pay-sandbox-simulations.html - - title: Handling orders with Amazon Pay API - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/amazon-pay/legacy-demoshop-integration/legacy-demoshop-handling-orders-with-amazon-pay-api.html - - title: Amazon Pay - Email Notifications - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/amazon-pay/legacy-demoshop-integration/amazon-pay-email-notifications.html - - title: Amazon Pay - Order Reference and Information about Shipping Addresses - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/amazon-pay/legacy-demoshop-integration/amazon-pay-order-reference-and-information-about-shipping-addresses.html - - title: Amazon Pay - Support of Bundled Products - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/amazon-pay/legacy-demoshop-integration/amazon-pay-support-of-bundled-products.html ---- - -{% info_block infoBox "Note" %} -Please refer to `config/Shared/config.dist.php` for the module configuration example. -{% endinfo_block %} - - -To set up the Amazon Pay initial configuration, use the credentials you received after registering as an Amazon seller: - -```php -$config[AmazonPayConstants::WIDGET_SCRIPT_PATH] = 'https://static-eu.payments-amazon.com/OffAmazonPayments/eur/lpa/js/Widgets.js'; -$config[AmazonPayConstants::WIDGET_SCRIPT_PATH_SANDBOX] = 'https://static-eu.payments-amazon.com/OffAmazonPayments/eur/sandbox/lpa/js/Widgets.js'; -$config[AmazonPayConstants::CLIENT_ID] = ''; -$config[AmazonPayConstants::CLIENT_SECRET] = ''; -$config[AmazonPayConstants::SELLER_ID] = ''; -$config[AmazonPayConstants::ACCESS_KEY_ID] = ''; -$config[AmazonPayConstants::SECRET_ACCESS_KEY] = ''; -$config[AmazonPayConstants::SECRET_ACCESS_KEY] = ''; -``` - -In case an order is being rejected by Amazon, the module will do a redirect. The default recommendation is to redirect to cart. You need to configure this: - -```php -$config[AmazonPayConstants::PAYMENT_REJECT_ROUTE] = 'cart'; -``` - -Next, specify your country and shop: - -```php -$config[AmazonPayConstants::REGION] = 'DE'; -$config[AmazonPayConstants::STORE_NAME] = 'The Shop'; -``` - -For development purposes, sandbox mode must be enabled: - -```php -$config[AmazonPayConstants::SANDBOX] = true; -``` - -The `ERROR_REPORT_LEVEL` parameter is used for internal purposes and specifies the log verbosity level. - -There are three options: - -1. Log all API responses. -2. Log errors only. -3. Disable logging. - -```php -$config[AmazonPayConstants::ERROR_REPORT_LEVEL] = TransactionLogger::REPORT_LEVEL_ERRORS_ONLY; -``` - -To configure look-and-feel of Amazon Pay button, you can use the following config values: - -```php -$config[AmazonPayConstants::WIDGET_BUTTON_TYPE] = AmazonPayConfig::WIDGET_BUTTON_TYPE_FULL; -$config[AmazonPayConstants::WIDGET_BUTTON_SIZE] = AmazonPayConfig::WIDGET_BUTTON_SIZE_MEDIUM; -$config[AmazonPayConstants::WIDGET_BUTTON_COLOR] = AmazonPayConfig::WIDGET_BUTTON_COLOR_DARK_GRAY; -``` - -According to Amazon Pay restrictions, a module can run either on a `localhost` domain or via HTTPS. If it is not possible to use `localhost`, HTTPS connection should be configured. For testing purposes, register a test account in the [Amazon Pay dashboard](https://pay.amazon.com/us). - -## OMS Configuration - -Activate the following processes. If you plan to use only one process, drop the other one. - -```php -$config[OmsConstants::PROCESS_LOCATION][] = APPLICATION_ROOT_DIR . '/vendor/spryker-eco/amazon-pay/config/Zed/Oms'; -$config[OmsConstants::ACTIVE_PROCESSES][] = 'AmazonPayPaymentAsync01'; -$config[OmsConstants::ACTIVE_PROCESSES][] = 'AmazonPayPaymentSync01'; -``` - -Default implementation for commands and options should be added to `Pyz/Zed/Oms/OmsDependencyProvider.php` - -1. Commands: - -```php -$container->extend(OmsDependencyProvider::COMMAND_PLUGINS, function (CommandCollectionInterface $commandCollection) { - $commandCollection - ->add(new CancelOrderCommandPlugin(), 'AmazonPay/CancelOrder') - ->add(new CloseOrderCommandPlugin(), 'AmazonPay/CloseOrder') - ->add(new RefundOrderCommandPlugin(), 'AmazonPay/RefundOrder') - ->add(new ReauthorizeExpiredOrderCommandPlugin(), 'AmazonPay/ReauthorizeExpiredOrder') - ->add(new CaptureCommandPlugin(), 'AmazonPay/Capture') - ->add(new UpdateSuspendedOrderCommandPlugin(), 'AmazonPay/UpdateSuspendedOrder') - ->add(new UpdateAuthorizationStatusCommandPlugin(), 'AmazonPay/UpdateAuthorizationStatus') - ->add(new UpdateCaptureStatusCommandPlugin(), 'AmazonPay/UpdateCaptureStatus') - ->add(new UpdateRefundStatusCommandPlugin(), 'AmazonPay/UpdateRefundStatus'); - - return $commandCollection; -} ); -``` - -2. Conditions: - -```php -$container->extend(OmsDependencyProvider::CONDITION_PLUGINS, function (ConditionCollectionInterface $conditionCollection) { - $conditionCollection - ->add(new IsClosedConditionPlugin(), 'AmazonPay/IsClosed') - ->add(new IsCloseAllowedConditionPlugin(), 'AmazonPay/IsCloseAllowed') - - ->add(new IsCancelledConditionPlugin(), 'AmazonPay/IsCancelled') - ->add(new IsCancelNotAllowedConditionPlugin(), 'AmazonPay/IsCancelNotAllowed') - ->add(new IsCancelledOrderConditionPlugin(), 'AmazonPay/IsOrderCancelled') - - ->add(new IsOpenConditionPlugin(), 'AmazonPay/IsAuthOpen') - ->add(new IsDeclinedConditionPlugin(), 'AmazonPay/IsAuthDeclined') - ->add(new IsPendingConditionPlugin(), 'AmazonPay/IsAuthPending') - ->add(new IsSuspendedConditionPlugin(), 'AmazonPay/IsAuthSuspended') - ->add(new IsAuthExpiredConditionPlugin(), 'AmazonPay/IsAuthExpired') - ->add(new IsClosedConditionPlugin(), 'AmazonPay/IsAuthClosed') - ->add(new IsAuthTransactionTimedOutConditionPlugin(), 'AmazonPay/IsAuthTransactionTimedOut') - ->add(new IsSuspendedConditionPlugin(), 'AmazonPay/IsPaymentMethodChanged') - - ->add(new IsCompletedConditionPlugin(), 'AmazonPay/IsCaptureCompleted') - ->add(new IsDeclinedConditionPlugin(), 'AmazonPay/IsCaptureDeclined') - ->add(new IsPendingConditionPlugin(), 'AmazonPay/IsCapturePending') - - ->add(new IsCompletedConditionPlugin(), 'AmazonPay/IsRefundCompleted') - ->add(new IsDeclinedConditionPlugin(), 'AmazonPay/IsRefundDeclined') - ->add(new IsPendingConditionPlugin(), 'AmazonPay/IsRefundPending'); - - return $conditionCollection; -}); -``` - -All default commands and conditions are stored in `SprykerEco\Zed\AmazonPay\Communication\Plugin\Oms\` namespace. - -## IPN Configuration - -In order to allow everyone to send push notifications, please extend `config_default.XXX.php` for desired environments: - -```php -$config[AclConstants::ACL_USER_RULE_WHITELIST][] = [ - 'bundle' => 'amazonpay', - 'controller' => 'ipn', - 'action' => 'endpoint', - 'type' => 'allow', -]; -``` - -Depending on your SSL configuration, you may have to extend as well: - -```php -$config[ApplicationConstants::ZED_SSL_EXCLUDED][] = 'amazonpay/ipn/endpoint'; -$config[ApplicationConstants::YVES_SSL_EXCLUDED]['aie'] = '/amazonpay/ipn/endpoint'; -``` - -## Yves Controllers - -In order to enable processing of AmazonPay commands on front end, please add `AmazonPayControllerProvider` to `YvesBootstrap`: - -```php -/** - * @param bool|null $isSsl - * - * @return \Pyz\Yves\Application\Plugin\Provider\AbstractYvesControllerProvider[] - */ -protected function getControllerProviderStack($isSsl) -{ - return [ - ... - new AmazonPayControllerProvider($isSsl), - ]; -} -``` - -## Theme Support - -To make Spryker Eco themes usable, add the following line into the function `addCoreTemplatePaths` in `Pyz/Yves/Twig/TwigConfig`: - -```php -$paths[] = APPLICATION_VENDOR_DIR . '/spryker-eco/%1$s/src/SprykerEco/Yves/%1$s/Theme/' . $themeName; -``` - -In the section include of `tsconfig.json`, add the following: - -```php -"./vendor/spryker-eco/**/*", -``` - -In the section paths of `frontend/settings.js`, add the following: - -```php -// eco folders -eco: { - // all modules - modules: './vendor/spryker-eco' -}, -``` - -In the section module.exports property dirs of `frontend/settings.js` add the following: - -```php -path.join(context, paths.eco.modules), -``` - -No matter how many SprykerEco modules you are using, these changes are required to be made only once. - -Make sure to rebuild front-end script by running `npm run yves`. - -## Checkout Integration - -To plug into checkout process, you need to add plugins into `CheckoutDependencyProvider:` - -```php -protected function getCheckoutPreConditions(Container $container) -{ - return [ - .... - new AmazonPayConfirmOrderPreConditionPlugin(), - ]; -} - -protected function getCheckoutOrderSavers(Container $container) -{ - return [ - .... - new AmazonPaySaveOrderPlugin(), - ]; -} -``` - -`AmazonPayConfirmOrderPreConditionPlugin` should be placed as the last plugin for preconditions. - -AmazonPay expects that order is not placed in some cases. For example, it happens when Synchronos mode is on, and payment cannot be processed. - -In order to handle this, extend `SuccessStep` in your project. - -```php -/** - * @param \Spryker\Shared\Kernel\Transfer\AbstractTransfer|\Generated\Shared\Transfer\QuoteTransfer $quoteTransfer - * - * @return bool - */ -public function postCondition(AbstractTransfer $quoteTransfer) -{ - if ($quoteTransfer->getAmazonpayPayment() === null) { - return true; - } - - if ($quoteTransfer->getAmazonpayPayment()->getOrderReferenceId() === null) { - return false; - } - - return true; -} -``` diff --git a/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/amazon-pay/handling-orders-with-amazon-pay-api.md b/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/amazon-pay/handling-orders-with-amazon-pay-api.md deleted file mode 100644 index 557482408a8..00000000000 --- a/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/amazon-pay/handling-orders-with-amazon-pay-api.md +++ /dev/null @@ -1,161 +0,0 @@ ---- -title: Handling orders with Amazon Pay API -description: This article provides details on the API structure of the Amazon Pay module in Spryker Commerce OS. -last_updated: Apr 3, 2020 -template: concept-topic-template -originalLink: https://documentation.spryker.com/v5/docs/amazon-pay-api -originalArticleId: 671a44d2-d42b-46eb-9125-3d4ac95044c8 -redirect_from: - - /v5/docs/amazon-pay-api - - /v5/docs/en/amazon-pay-api -related: - - title: Obtaining an Amazon Order Reference and information about shipping addresses - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/amazon-pay/obtaining-an-amazon-order-reference-and-information-about-shipping-addresses.html - - title: Amazon Pay - Refund - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/amazon-pay/legacy-demoshop-integration/amazon-pay-refund.html - - title: Configuring Amazon Pay - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/amazon-pay/configuring-amazon-pay.html - - title: Amazon Pay - Sandbox Simulations - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/amazon-pay/legacy-demoshop-integration/amazon-pay-sandbox-simulations.html - - title: Amazon Pay - Rendering a “Pay with Amazon” Button on the Cart Page - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/amazon-pay/legacy-demoshop-integration/amazon-pay-rendering-a-pay-with-amazon-button-on-the-cart-page.html - - title: Amazon Pay - Sandbox Simulations - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/amazon-pay/amazon-pay-sandbox-simulations.html - - title: Handling orders with Amazon Pay API - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/amazon-pay/legacy-demoshop-integration/legacy-demoshop-handling-orders-with-amazon-pay-api.html - - title: Amazon Pay - Email Notifications - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/amazon-pay/legacy-demoshop-integration/amazon-pay-email-notifications.html - - title: Amazon Pay - Order Reference and Information about Shipping Addresses - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/amazon-pay/legacy-demoshop-integration/amazon-pay-order-reference-and-information-about-shipping-addresses.html - - title: Amazon Pay - Support of Bundled Products - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/amazon-pay/legacy-demoshop-integration/amazon-pay-support-of-bundled-products.html ---- - -So far we discussed the client-side implementation provided by Amazon Pay. On the Spryker side, the bundle provides the tools for rendering Amazon Pay widgets. - -Another part of the implementation is the Handling orders with Amazon Pay API function wrapper, implemented as a Facade. - -Each API call involves similar classes from the module: - -* An adapter for adapting Amazon SDK that makes the rest of the module independent of the external library; -* A converter from Amazon responses to Spryker OS transfer objects; -* A logger for logging information about API calls; -* A transaction for updating transfer objects. - -Since it is a standard Spryker OS practice, an entry point is a public method of the Facade, so, the flow for a typical transaction includes the following steps: - -1. Logically grouping the affected order items, based on the transaction type: -* for authorize & capture - by AuthorizationReferenceId -* for refund & capture status update - by AmazonCaptureId -* no grouping is required for close and cancel since operations are performed for the whole order. -2. The following steps are executed for each group separately: -* Calling Facade method. -* Facade creates a related transaction handler or a collection of transaction handlers. -* The transaction handler has execute method expecting an AmazonCallTransfer object as a parameter. -* The transaction handler passes a transfer object to the adapter which is responsible for direct communication with the Handling orders with Amazon Pay API. Using the provided SDK it converts API responses into transfer objects using converters. Apart from adapters and converters, the rest of the code does not know anything about Handling orders with Amazon Pay API details and only works with Spryker OS transfer objects. -* If not all order items, belonging to a logical group, where requested for the update, a new group is created for affected order items. -* The transaction handler returns a modified transfer object. All information related to Amazon Pay is stored into. - -## Initializing Quote Transfer Objects - -After a user signs in via Amazon Pay, we can make API calls against the order. The first step is to initialize order data and store it to a quote transfer object using the Quote updater classes. These classes work in a similar way to transaction handlers. However, they only retrieve information from Amazon (if necessary) and then save it to a Quote. - -**There are three steps for initializing a new order**: - -1. Retrieve and update buyer information. -2. Create payment transfer objects. -3. Update Shipment. - -Only the first step uses an API call while the other two are only about initializing. - -The updater class for retrieving buyer data is called `GuestCustomerDataQuoteUpdater`. It uses a related adapter called `ObtainProfileInformationAdapter`, to make an API call and store data into the Quote transfer. - -We have this call instead of taking current user data to create a separation between Spryker and Amazon accounts and enable the ability to make an order without a Spryker account. -If a logged in user places an order, the order would be still assigned to him and visible in the Customer area. - -## Updating Shipment Address and Method - -Once a buyer chooses a shipping address from the Address widget, a Javascript callback is triggered. -We notify server-side that the user has changed their shipment address (for example by making an ajax request to a URL ). -Then we use the Facade method `addSelectedAddressToQuote` to return the updated Quote object and save the updated quote. -Now the quote contains updated address information and it's possible to retrieve the location's available shipment methods. -Spryker provides a Shipment bundle and uses client classes and the `getAvailableMethods` method to retrieve the data to refresh it for the buyer. -Once shipment options are updated a buyer can choose one. Usually, the shipment method affects the total price of the order and it must be recalculated using the Spryker Calculation bundle. - -## Placing an Order - -Once all necessary information is selected, an order is ready to be placed. -First, call all related API calls and then persist an order in the database. -All API related jobs are covered by only one Facade method confirmPurchase() which encapsulates three Handling orders with Amazon Pay API calls to be executed one by one: - -1. `SetOrderReferenceDetails` for specifying order total amount -2. `ConfirmOrderReference` for confirming the order -3. `GetOrderReferenceDetails` for retrieving information about buyer (like name and shipping address) - -```php -/** - * @param \Generated\Shared\Transfer\QuoteTransfer $quoteTransfer - * - * @return \Generated\Shared\Transfer\QuoteTransfer - */ -public function execute(QuoteTransfer $quoteTransfer) -{ - foreach ($this->transactionHandlers as $transactionHandler) { - $quoteTransfer = $transactionHandler->execute($quoteTransfer); - - if (!$quoteTransfer->getAmazonpayPayment()->getResponseHeader()->getIsSuccess()) { - return $quoteTransfer; - } - } - - return $quoteTransfer; -} -``` -Once a transaction finishes, we pass the updated quote transfer to the next transaction. If the transaction fails, we return the current one and it contains all information about an error and it can be retrieved and analyzed. - -See the `AmazonpayResponseHeaderTransfer` object which can be retrieved from Quote transfer with `$quoteTransfer->getAmazonpayPayment()->getResponseHeader()` - -Finally, if all steps go well, we can place an order using (for example) a client from the checkout module with an Amazon Pay saver plugin injected. If not, the decline flow takes place. - -The next step is to authorize the order. It's a separate operation because in terms of PSD2 rules authorization happening in case the customer passed MFA challenge. - -## Authorization in Asynchronous and Synchronous Modes. CaptureNow Setting - -The authorization API call is configurable and it reflects the whole payment process. First, an important setting is transaction_timeout which defines the maximum number of minutes allocated for the Authorise operation call to be processed, after which the authorization is automatically declined and you cannot capture funds against the authorization. The value zero means that the authorization result has to be returned immediately and it is asynchronous authorization. For the synchronous authorization, the value must be above zero but less than maximal possible 1440. Another important setting is CaptureNow. It can only be true or false and if set to true then both requests - Authorisation and Capture will be done in one step, within Authorise API call. Both setting are independent and may have all possible values. The whole order process and related State Machine depend on these settings and can be very different. - -## Handling Declined Payments. Synchronous Workflow -Amazon Pay documentation defines a workflow which has to be implemented on a merchant side. -{image} -In some cases, declined payments involves additional API calls. This is why there is an additional transaction collection called `HandleDeclinedOrderTransaction`. This call goes after the Authorization step and encapsulates two transaction objects: - -`GetOrderReferenceDetailsTransaction` which was used previously and `CancelOrderTransaction`. - -When all previous steps return a positive response and authorization is accepted it returns a Quote transfer object without any modifications. If payment is declined because of wrong payment method - there's nothing to do on a server-side. - -If the reason is different, we can check the state of an order using `GetOrderReferenceDetailsTransaction`. - -If it is open then the order must be canceled with a `CancelOrderTransaction` call. - -The rest of the decline flow includes logic determining where to redirect a buyer. In sandbox mode, for each test account, Amazon provides fake payment methods for emulating error API responses. - -{% info_block errorBox "Important!" %} -Even if a response has status code 200 it still may contain Constraint(s -{% endinfo_block %} in the response body.) - -There is one special constraint related to the selected payment method `PaymentMethodNotAllowed`. If it occurs (rarely) the buyer should be redirected to the same page with address and payment widgets and be able to choose a different payment method and all other order parameters as well. - -## Handling Declined Payments. Asynchronous Workflow -Unlike the synchronous authorisation, it is impossible to get the result of the authorization in the response. Authorization object stays in Pending state until authorized. Capture and Refund requests can also be processed in the same way and Amazon provides Internet Payment Notification (IPN) in order to notify the shop about the new status of any asynchronous request. IPN message is an HTTP request with some special Amazon-related headers and the body which is XML string containing all data. The merchant has to specify URL for receiving and processing IPN messages. The Bundle provides two Facade's methods - -`convertAmazonpayIpnRequest`(array `$headers`, `$body`) for converting Amazon request (which is HTTP headers and body) to the transfer object. For each type of IPN request Spryker provides related transfer object and method `convertAmazonpayIpnRequest()` returns one of them. For the processing of these transfer objects the Facade's method `handleAmazonpayIpnRequest` (`AbstractTransfer``$ipnRequestTransfer`) should be called. It `AbstractTransfer` type for its argument and it works with all types of IPN related transfer objects. A typical flow of a successful flow usually involves pending statuses of authorization and capture requests. Therefor related IPN messages have to be received and processed correctly. For retrieving same information Amazon provides also `GetAuthorizationDetails` and `GetCaptureDetails` functions and in Spryker, it is possible to update the pending statuses with State machine buttons. Once the button is clicked, the shop makes a related API call, receives a response and if the state is not pending then it updates order status according to the response message. The final status of a success flow is "capture completed". After that only Refund is available and refund workflow is asynchronous only and works in a similar way as asynchronous authorization. - -The more tricky case is authorization declined workflow. It is similar to synchronous decline which was described above but everything goes asynchronously and involves additional IPN messages. First of all, Authorisation IPN comes with "Declined" state of authorization status. Another important information here is ReasonCode and it affects all further steps of the process. For the reason codes, `TransactionTimedOut` and `AmazonRejected` the order simply goes to "authorization declined" state but for the - -InvalidPaymentMethod the customer has to change the payment method to the correct one. In this case, order receives "authorization suspended" status and Amazon sends two additional IPN messages: `OrderNotification` with the state "Open" comes in after payment method is changed by buyer and Authorisation notification as a result of authorization of a new payment method. If the new payment method passes authorization successfully then the order goes to the "auth open" state and it is possible to request a capture. In both decline cases, it is important to notify the buyer about it by email since it's the only way for him to know that payment is not possible. The text of the email letter has to be different for `InvalidPaymentMethod` case. - -Another tricky moment about asynchronous flow is "Authorisation expired" situation. Each time the shop requests capture in the asynchronous mode it should check the current status of authorisation. Capture is only possible where the status of authorisation is "Open". If authorisation has status "Closed" and `ReasonCode` is either `ExpiredUnused` or `SellerClosed` then an order should be reauthorized with `CaptureNow` setting enabled. - -## Refund -After successful authorization and capture processes order receives the status "capture completed". From this state only one operation is possible and it is Refund. A refund can be partial if more than one item set to refund or full. - -Amazon only requires the amount of money which has to be refunded and the calculation has to be implemented on the shop's side. Spryker provides a bundle for calculating the amount to refund. Regardless the chosen setting Refund is always asynchronous. Once requested, an order goes to "refund pending" status and then IPN notification will notify the shop if a refund was accepted or declined. diff --git a/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/amazon-pay/legacy-demoshop-integration/amazon-pay-configuration-for-the-legacy-demoshop.md b/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/amazon-pay/legacy-demoshop-integration/amazon-pay-configuration-for-the-legacy-demoshop.md deleted file mode 100644 index b8fa3a3e8f5..00000000000 --- a/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/amazon-pay/legacy-demoshop-integration/amazon-pay-configuration-for-the-legacy-demoshop.md +++ /dev/null @@ -1,207 +0,0 @@ ---- -title: Amazon Pay - Configuration for the Legacy Demoshop -description: Configure and integrate Amazon Pay into the Spryker Legacy Demoshop by following the instructions from this article. -last_updated: Apr 3, 2020 -template: concept-topic-template -originalLink: https://documentation.spryker.com/v5/docs/amazon-pay-configuration-demoshop -originalArticleId: 2db7cfb7-7188-4711-a65d-be5991b5e174 -redirect_from: - - /v5/docs/amazon-pay-configuration-demoshop - - /v5/docs/en/amazon-pay-configuration-demoshop -related: - - title: Obtaining an Amazon Order Reference and information about shipping addresses - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/amazon-pay/obtaining-an-amazon-order-reference-and-information-about-shipping-addresses.html - - title: Amazon Pay - Rendering a “Pay with Amazon” Button on the Cart Page - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/amazon-pay/legacy-demoshop-integration/amazon-pay-rendering-a-pay-with-amazon-button-on-the-cart-page.html - - title: Amazon Pay - Support of Bundled Products - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/amazon-pay/legacy-demoshop-integration/amazon-pay-support-of-bundled-products.html - - title: Amazon Pay - State Machine - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/amazon-pay/legacy-demoshop-integration/amazon-pay-state-machine.html - - title: Handling orders with Amazon Pay API - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/amazon-pay/legacy-demoshop-integration/legacy-demoshop-handling-orders-with-amazon-pay-api.html - - title: Handling orders with Amazon Pay API - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/amazon-pay/handling-orders-with-amazon-pay-api.html - - title: Amazon Pay - Order Reference and Information about Shipping Addresses - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/amazon-pay/legacy-demoshop-integration/amazon-pay-order-reference-and-information-about-shipping-addresses.html - - title: Configuring Amazon Pay - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/amazon-pay/configuring-amazon-pay.html - - title: Amazon Pay - Sandbox Simulations - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/amazon-pay/amazon-pay-sandbox-simulations.html - - title: Amazon Pay - Sandbox Simulations - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/amazon-pay/legacy-demoshop-integration/amazon-pay-sandbox-simulations.html ---- - -{% info_block infoBox "Note" %} - Please refer to `config/Shared/config.dist.php` for the module configuration example. -{% endinfo_block %} - -To set up the Amazon Pay initial configuration, use the credentials you received after completing the registration as an Amazon seller: -```php -$config[AmazonPayConstants::WIDGET_SCRIPT_PATH] = 'https://static-eu.payments-amazon.com/OffAmazonPayments/eur/lpa/js/Widgets.js'; -$config[AmazonPayConstants::WIDGET_SCRIPT_PATH_SANDBOX] = 'https://static-eu.payments-amazon.com/OffAmazonPayments/eur/sandbox/lpa/js/Widgets.js'; -$config[AmazonPayConstants::CLIENT_ID] = ''; -$config[AmazonPayConstants::CLIENT_SECRET] = ''; -$config[AmazonPayConstants::SELLER_ID] = ''; -$config[AmazonPayConstants::ACCESS_KEY_ID] = ''; -$config[AmazonPayConstants::SECRET_ACCESS_KEY] = ''; -``` - -In case an order is being rejected by Amazon, the module will do a redirect. The default recommendation is to redirect to cart. You need to configure this: -```php -$config[AmazonPayConstants::PAYMENT_REJECT_ROUTE] = 'cart'; -``` - -Next, specify your country and shop: -```php -$config[AmazonPayConstants::REGION] = 'DE'; -$config[AmazonPayConstants::STORE_NAME] = 'The Shop'; -``` - -For development purposes, sandbox mode must be enabled: -```php -$config[AmazonPayConstants::SANDBOX] = true; -``` - -The `ERROR_REPORT_LEVEL` parameter is used for internal purposes and specifies the log verbosity level. - -There are three options: - -1. Log all API responses. -2. Log errors only. -3. Disable logging. - -```php -$config[AmazonPayConstants::ERROR_REPORT_LEVEL] = TransactionLogger::REPORT_LEVEL_ERRORS_ONLY; -``` - -To configure look-and-feel of Amazon Pay button, you can use the following config values: -```php -$config[AmazonPayConstants::WIDGET_BUTTON_TYPE] = AmazonPayConfig::WIDGET_BUTTON_TYPE_FULL; -$config[AmazonPayConstants::WIDGET_BUTTON_SIZE] = AmazonPayConfig::WIDGET_BUTTON_SIZE_MEDIUM; -$config[AmazonPayConstants::WIDGET_BUTTON_COLOR] = AmazonPayConfig::WIDGET_BUTTON_COLOR_DARK_GRAY; -``` - -According to Amazon Pay restrictions, a module can run either on a `localhost` domain or via HTTPS. If it is not possible to use `localhost`, HTTPS connection should be configured. For testing purposes, register a test account in the [Amazon Pay dashboard](https://pay.amazon.com/us). - -## OMS Configuration - -Activate the following processes. If you plan to use only one process, drop the other one. -```php -$config[OmsConstants::PROCESS_LOCATION][] = APPLICATION_ROOT_DIR . '/vendor/spryker-eco/amazon-pay/config/Zed/Oms'; -$config[OmsConstants::ACTIVE_PROCESSES][] = 'AmazonPayPaymentAsync01'; -$config[OmsConstants::ACTIVE_PROCESSES][] = 'AmazonPayPaymentSync01'; -``` - -Default implementation for commands and options should be added to `Pyz/Zed/Oms/OmsDependencyProvider.php` - -1. Commands: -```php -$container->extend(OmsDependencyProvider::COMMAND_PLUGINS, function (CommandCollectionInterface $commandCollection) { -$commandCollection - ->add(new CancelOrderCommandPlugin(), 'AmazonPay/CancelOrder') - ->add(new CloseOrderCommandPlugin(), 'AmazonPay/CloseOrder') - ->add(new RefundOrderCommandPlugin(), 'AmazonPay/RefundOrder') - ->add(new ReauthorizeExpiredOrderCommandPlugin(), 'AmazonPay/ReauthorizeExpiredOrder') - ->add(new CaptureCommandPlugin(), 'AmazonPay/Capture') - ->add(new UpdateSuspendedOrderCommandPlugin(), 'AmazonPay/UpdateSuspendedOrder') - ->add(new UpdateAuthorizationStatusCommandPlugin(), 'AmazonPay/UpdateAuthorizationStatus') - ->add(new UpdateCaptureStatusCommandPlugin(), 'AmazonPay/UpdateCaptureStatus') - ->add(new UpdateRefundStatusCommandPlugin(), 'AmazonPay/UpdateRefundStatus'); - -return $commandCollection; -} ); -``` -2. Conditions: -```php -$container->extend(OmsDependencyProvider::CONDITION_PLUGINS, function (ConditionCollectionInterface $conditionCollection) { - $conditionCollection - ->add(new IsClosedConditionPlugin(), 'AmazonPay/IsClosed') - ->add(new IsCloseAllowedConditionPlugin(), 'AmazonPay/IsCloseAllowed') - - ->add(new IsCancelledConditionPlugin(), 'AmazonPay/IsCancelled') - ->add(new IsCancelNotAllowedConditionPlugin(), 'AmazonPay/IsCancelNotAllowed') - ->add(new IsCancelledOrderConditionPlugin(), 'AmazonPay/IsOrderCancelled') - - ->add(new IsOpenConditionPlugin(), 'AmazonPay/IsAuthOpen') - ->add(new IsDeclinedConditionPlugin(), 'AmazonPay/IsAuthDeclined') - ->add(new IsPendingConditionPlugin(), 'AmazonPay/IsAuthPending') - ->add(new IsSuspendedConditionPlugin(), 'AmazonPay/IsAuthSuspended') - ->add(new IsAuthExpiredConditionPlugin(), 'AmazonPay/IsAuthExpired') - ->add(new IsClosedConditionPlugin(), 'AmazonPay/IsAuthClosed') - ->add(new IsAuthTransactionTimedOutConditionPlugin(), 'AmazonPay/IsAuthTransactionTimedOut') - ->add(new IsSuspendedConditionPlugin(), 'AmazonPay/IsPaymentMethodChanged') - - ->add(new IsCompletedConditionPlugin(), 'AmazonPay/IsCaptureCompleted') - ->add(new IsDeclinedConditionPlugin(), 'AmazonPay/IsCaptureDeclined') - ->add(new IsPendingConditionPlugin(), 'AmazonPay/IsCapturePending') - - ->add(new IsCompletedConditionPlugin(), 'AmazonPay/IsRefundCompleted') - ->add(new IsDeclinedConditionPlugin(), 'AmazonPay/IsRefundDeclined') - ->add(new IsPendingConditionPlugin(), 'AmazonPay/IsRefundPending'); - - return $conditionCollection; -}); -``` - -All default commands and conditions are stored in `SprykerEco\Zed\AmazonPay\Communication\Plugin\Oms\` namespace. - -## IPN Configuration - -In order to allow everyone to send push notifications, please extend `config_default.XXX.php` for desired environments: -```php -$config[AclConstants::ACL_USER_RULE_WHITELIST][] = [ - 'bundle' => 'amazonpay', - 'controller' => 'ipn', - 'action' => 'endpoint', - 'type' => 'allow', -]; -``` - -Depending on your SSL configuration, you may have to extend as well: -```php -$config[ApplicationConstants::ZED_SSL_EXCLUDED][] = 'amazonpay/ipn/endpoint'; -$config[ApplicationConstants::YVES_SSL_EXCLUDED]['aie'] = '/amazonpay/ipn/endpoint'; -``` - -## Yves Controllers - -In order to enable processing of AmazonPay commands on frontend, please add `AmazonPayControllerProvider` to `YvesBootstrap`: -```php -/** - * @param bool|null $isSsl - * - * @return \Pyz\Yves\Application\Plugin\Provider\AbstractYvesControllerProvider[] - */ -protected function getControllerProviderStack($isSsl) -{ - return [ - ... - new AmazonPayControllerProvider($isSsl), - ]; -} -``` - -## Checkout Integration - -AmazonPay expects that order is not placed in some cases. For example, it happens when Synchronos mode is on, and payment cannot be processed. - -In order to handle this, extend `SuccessStep` in your project. For example: -```php -/** - * @param \Spryker\Shared\Kernel\Transfer\AbstractTransfer|\Generated\Shared\Transfer\QuoteTransfer $quoteTransfer - * - * @return bool - */ -public function postCondition(AbstractTransfer $quoteTransfer) -{ - if ($quoteTransfer->getAmazonpayPayment() === null) { - return true; - } - - if ($quoteTransfer->getAmazonpayPayment()->getOrderReferenceId() === null) { - return false; - } - - return true; -} -``` diff --git a/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/amazon-pay/legacy-demoshop-integration/amazon-pay-email-notifications.md b/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/amazon-pay/legacy-demoshop-integration/amazon-pay-email-notifications.md deleted file mode 100644 index 588461494d4..00000000000 --- a/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/amazon-pay/legacy-demoshop-integration/amazon-pay-email-notifications.md +++ /dev/null @@ -1,76 +0,0 @@ ---- -title: Amazon Pay - Email Notifications -description: You can find the details for authorization status update logic in the Spryker Legacy Demoshop. -last_updated: Apr 3, 2020 -template: concept-topic-template -originalLink: https://documentation.spryker.com/v5/docs/amazon-pay-email-notification-demoshop -originalArticleId: 22ea4e2f-4796-46f4-9e40-7cf7176bc4a8 -redirect_from: - - /v5/docs/amazon-pay-email-notification-demoshop - - /v5/docs/en/amazon-pay-email-notification-demoshop -related: - - title: Obtaining an Amazon Order Reference and information about shipping addresses - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/amazon-pay/obtaining-an-amazon-order-reference-and-information-about-shipping-addresses.html - - title: Amazon Pay - Rendering a “Pay with Amazon” Button on the Cart Page - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/amazon-pay/legacy-demoshop-integration/amazon-pay-rendering-a-pay-with-amazon-button-on-the-cart-page.html - - title: Amazon Pay - State Machine - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/amazon-pay/legacy-demoshop-integration/amazon-pay-state-machine.html - - title: Amazon Pay - Support of Bundled Products - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/amazon-pay/legacy-demoshop-integration/amazon-pay-support-of-bundled-products.html - - title: Handling orders with Amazon Pay API - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/amazon-pay/handling-orders-with-amazon-pay-api.html - - title: Amazon Pay - Order Reference and Information about Shipping Addresses - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/amazon-pay/legacy-demoshop-integration/amazon-pay-order-reference-and-information-about-shipping-addresses.html - - title: Configuring Amazon Pay - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/amazon-pay/configuring-amazon-pay.html - - title: Amazon Pay - Sandbox Simulations - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/amazon-pay/amazon-pay-sandbox-simulations.html - - title: Handling orders with Amazon Pay API - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/amazon-pay/legacy-demoshop-integration/legacy-demoshop-handling-orders-with-amazon-pay-api.html - - title: Amazon Pay - Sandbox Simulations - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/amazon-pay/legacy-demoshop-integration/amazon-pay-sandbox-simulations.html ---- - -Since Amazon Pay requires some emails being sent in specific situations, please implement on a project level following authorization status update logic. - -### UpdateOrderAuthorizationStatusTransaction - -Once the order authorization state is Suspended, the customer should receive an email stating that the order requires customer's interaction. - -Suggested email template for Suspended status is: - -Theme: Please update your payment information - -Content: - -```xml -Valued customer, - -Thank you very much for your order at Spryker Shop. -Amazon Pay was not able to process your payment. -Please navigate to -https://payments.amazon.com/en/jr/your-account/orders?language=en_GB -and update the payment information for your order. Afterward, we will -automatically request payment again from Amazon Pay and you will receive a -confirmation email. - -Kind regards -``` - -Once the order authorization is Declined, the customer should receive an email stating that the order requires customer's interaction. - -Suggested email template for Declined status is: - -Theme: Please contact us regarding your order - -Content: - -```xml -Valued customer, - -Unfortunately, Amazon Pay declined the payment for your order in our online -Spryker Shop. -Please contact us. - -Kind regards -``` diff --git a/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/amazon-pay/legacy-demoshop-integration/amazon-pay-order-reference-and-information-about-shipping-addresses.md b/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/amazon-pay/legacy-demoshop-integration/amazon-pay-order-reference-and-information-about-shipping-addresses.md deleted file mode 100644 index 3038fb6eaa6..00000000000 --- a/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/amazon-pay/legacy-demoshop-integration/amazon-pay-order-reference-and-information-about-shipping-addresses.md +++ /dev/null @@ -1,105 +0,0 @@ ---- -title: Amazon Pay - Order Reference and Information about Shipping Addresses -description: This article contains information about order reference and shipping address information in the Spryker Legacy Demoshop. -last_updated: Apr 3, 2020 -template: concept-topic-template -originalLink: https://documentation.spryker.com/v5/docs/amazon-pay-order-ref-info-demoshop -originalArticleId: fe078374-0a81-4ff4-8407-8ab489e38f09 -redirect_from: - - /v5/docs/amazon-pay-order-ref-info-demoshop - - /v5/docs/en/amazon-pay-order-ref-info-demoshop -related: - - title: Obtaining an Amazon Order Reference and information about shipping addresses - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/amazon-pay/obtaining-an-amazon-order-reference-and-information-about-shipping-addresses.html - - title: Amazon Pay - Rendering a “Pay with Amazon” Button on the Cart Page - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/amazon-pay/legacy-demoshop-integration/amazon-pay-rendering-a-pay-with-amazon-button-on-the-cart-page.html - - title: Amazon Pay - Support of Bundled Products - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/amazon-pay/legacy-demoshop-integration/amazon-pay-support-of-bundled-products.html - - title: Handling orders with Amazon Pay API - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/amazon-pay/handling-orders-with-amazon-pay-api.html - - title: Configuring Amazon Pay - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/amazon-pay/configuring-amazon-pay.html - - title: Amazon Pay - Sandbox Simulations - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/amazon-pay/amazon-pay-sandbox-simulations.html - - title: Handling orders with Amazon Pay API - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/amazon-pay/legacy-demoshop-integration/legacy-demoshop-handling-orders-with-amazon-pay-api.html - - title: Amazon Pay - Sandbox Simulations - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/amazon-pay/legacy-demoshop-integration/amazon-pay-sandbox-simulations.html - - title: Amazon Pay - Email Notifications - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/amazon-pay/legacy-demoshop-integration/amazon-pay-email-notifications.html - - title: Amazon Pay - Configuration for the Legacy Demoshop - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/amazon-pay/legacy-demoshop-integration/amazon-pay-configuration-for-the-legacy-demoshop.html ---- - -After successful authorization, a buyer will be redirected to an order details page to enter all the information necessary for placing an order: address of shipment, payment method, delivery method and some calculations about taxes, possible discounts, delivery cost, etc. - -Amazon Pay provides solutions for choosing shipping addresses and payment methods based on what the buyer previously used on Amazon. As addresses differ by country, the delivery method selection must be implemented by the shop and aligned with shipping address information. - -Amazon provides two widgets for choosing shipment and payment information, they can be placed together on the same page or separately. - -* Add the following widget on your page: - -```xml -{% raw %}{{{% endraw %} render(path('amazonpay_checkout_widget')) {% raw %}}}{% endraw %} -``` - -Configuration would be used from your current settings profile. - -Place order button should look like this: -```xml -Place order -``` - -Both widgets are similar to the `paybutton` widget that we described earlier. - -All necessary credentials have to be specified the same way and in order to retrieve the selected information, Amazon provides JavaScript callbacks. - -The first of them to use is `onOrderReferenceCreate`, which provides an Amazon order reference ID. - -This ID is a unique identifier of an order, created on Amazon's side and is required for Handling orders with Amazon Pay API calls. - -Other important callbacks are `onAddressSelect` and `onPaymentSelect`. These callbacks are triggered after selecting shipment address information and payment method respectively. Callbacks are client side notifications informing that an event has happened. - -Use the Handling orders with Amazon Pay API to retrieve data and run order operations. - -### Checkout Step Rendering - -Since payment module is generic, `PaymentController` provides method `getItems` in order to extend display of items. - -For example, in order to handle bundled products, follow these steps: - -Create template on project level `AmazonPay/Theme/default/payment/patials/checkout-item.twig`: -```twig -{% raw %}{%{% endraw %} if item.bundleProduct is defined {% raw %}%}{% endraw %} - {% raw %}{%{% endraw %} include '@checkout/checkout/partials/summary-item.twig' with {'item': item.bundleProduct, 'bundleItems' : item.bundleItems} {% raw %}%}{% endraw %} - {% raw %}{%{% endraw %} else {% raw %}%}{% endraw %} - {% raw %}{%{% endraw %} include '@checkout/checkout/partials/summary-item.twig' {% raw %}%}{% endraw %} - {% raw %}{%{% endraw %} endif {% raw %}%}{% endraw %} - ``` - -Extend `AmazonPay/Controller/PaymentController` and add the following method: -```php -/** - * @param \Generated\Shared\Transfer\QuoteTransfer $quoteTransfer - * - * @return \ArrayObject|\Generated\Shared\Transfer\ItemTransfer[] - */ - protected function getCartItems(QuoteTransfer $quoteTransfer) - { - return $this->getFactory()->createProductBundleGrouper()->getGroupedBundleItems( - $quoteTransfer->getItems(), - $quoteTransfer->getBundleItems() - ); - } - ``` - -Add corresponding method to `AmazonPayFactory`: -```php -/** - * @return \Spryker\Yves\ProductBundle\Grouper\ProductBundleGrouperInterface - */ - public function createProductBundleGrouper() - { - return new ProductBundleGrouper(); - } - ``` diff --git a/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/amazon-pay/legacy-demoshop-integration/amazon-pay-refund.md b/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/amazon-pay/legacy-demoshop-integration/amazon-pay-refund.md deleted file mode 100644 index c9b55b83470..00000000000 --- a/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/amazon-pay/legacy-demoshop-integration/amazon-pay-refund.md +++ /dev/null @@ -1,36 +0,0 @@ ---- -title: Amazon Pay - Refund -description: This article contain information on the refund process for the Amazon Pay module in Spryker. -last_updated: Apr 3, 2020 -template: concept-topic-template -originalLink: https://documentation.spryker.com/v5/docs/amazon-pay-refund-demoshop -originalArticleId: c19d05d7-86e9-4b01-b58d-7ba98ccd0e0b -redirect_from: - - /v5/docs/amazon-pay-refund-demoshop - - /v5/docs/en/amazon-pay-refund-demoshop -related: - - title: Obtaining an Amazon Order Reference and information about shipping addresses - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/amazon-pay/obtaining-an-amazon-order-reference-and-information-about-shipping-addresses.html - - title: Amazon Pay - Rendering a “Pay with Amazon” Button on the Cart Page - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/amazon-pay/legacy-demoshop-integration/amazon-pay-rendering-a-pay-with-amazon-button-on-the-cart-page.html - - title: Amazon Pay - Support of Bundled Products - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/amazon-pay/legacy-demoshop-integration/amazon-pay-support-of-bundled-products.html - - title: Handling orders with Amazon Pay API - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/amazon-pay/handling-orders-with-amazon-pay-api.html - - title: Configuring Amazon Pay - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/amazon-pay/configuring-amazon-pay.html - - title: Amazon Pay - Sandbox Simulations - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/amazon-pay/amazon-pay-sandbox-simulations.html - - title: Handling orders with Amazon Pay API - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/amazon-pay/legacy-demoshop-integration/legacy-demoshop-handling-orders-with-amazon-pay-api.html - - title: Amazon Pay - Sandbox Simulations - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/amazon-pay/legacy-demoshop-integration/amazon-pay-sandbox-simulations.html - - title: Amazon Pay - Email Notifications - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/amazon-pay/legacy-demoshop-integration/amazon-pay-email-notifications.html - - title: Amazon Pay - Order Reference and Information about Shipping Addresses - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/amazon-pay/legacy-demoshop-integration/amazon-pay-order-reference-and-information-about-shipping-addresses.html ---- - -After the successful authorization and capture processes, the order should be closed. This blocks any modifications to an order. From this state only Refund operation is possible. The refund can be partial if more than one item is set to refund or full. - -Amazon only requires the amount of money which has to be refunded, and the calculation has to be implemented on the shop's side. Spryker OS provides a module for calculating the amount to refund. Regardless of the chosen setting, the refund is always asynchronous. Once requested, an order goes to "refund pending" status and then IPN notification will notify the shop if the refund was accepted or declined. diff --git a/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/amazon-pay/legacy-demoshop-integration/amazon-pay-rendering-a-pay-with-amazon-button-on-the-cart-page.md b/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/amazon-pay/legacy-demoshop-integration/amazon-pay-rendering-a-pay-with-amazon-button-on-the-cart-page.md deleted file mode 100644 index 16dbf23d430..00000000000 --- a/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/amazon-pay/legacy-demoshop-integration/amazon-pay-rendering-a-pay-with-amazon-button-on-the-cart-page.md +++ /dev/null @@ -1,59 +0,0 @@ ---- -title: Amazon Pay - Rendering a “Pay with Amazon” Button on the Cart Page -description: This article describes the way how to render the Pay with Amazon button on the cart page. -last_updated: Apr 3, 2020 -template: concept-topic-template -originalLink: https://documentation.spryker.com/v5/docs/amazon-pay-rendering-pay-demoshop -originalArticleId: 2697ee28-7d54-438a-a1a9-8e4f24a2a4a4 -redirect_from: - - /v5/docs/amazon-pay-rendering-pay-demoshop - - /v5/docs/en/amazon-pay-rendering-pay-demoshop -related: - - title: Obtaining an Amazon Order Reference and information about shipping addresses - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/amazon-pay/obtaining-an-amazon-order-reference-and-information-about-shipping-addresses.html - - title: Amazon Pay - Support of Bundled Products - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/amazon-pay/legacy-demoshop-integration/amazon-pay-support-of-bundled-products.html - - title: Amazon Pay - Refund - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/amazon-pay/legacy-demoshop-integration/amazon-pay-refund.html - - title: Handling orders with Amazon Pay API - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/amazon-pay/handling-orders-with-amazon-pay-api.html - - title: Configuring Amazon Pay - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/amazon-pay/configuring-amazon-pay.html - - title: Amazon Pay - Sandbox Simulations - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/amazon-pay/amazon-pay-sandbox-simulations.html - - title: Handling orders with Amazon Pay API - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/amazon-pay/legacy-demoshop-integration/legacy-demoshop-handling-orders-with-amazon-pay-api.html - - title: Amazon Pay - Sandbox Simulations - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/amazon-pay/legacy-demoshop-integration/amazon-pay-sandbox-simulations.html - - title: Amazon Pay - Email Notifications - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/amazon-pay/legacy-demoshop-integration/amazon-pay-email-notifications.html - - title: Amazon Pay - Order Reference and Information about Shipping Addresses - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/amazon-pay/legacy-demoshop-integration/amazon-pay-order-reference-and-information-about-shipping-addresses.html ---- - -Usually the checkout page includes information for the buyer to review, items in the cart, prices, total price information and some other order related details. - -From this page, the buyer can proceed to checkout by clicking a related GUI element (for example hyperlink or button). - -Amazon Pay provides its own GUI element, a button which renders by Amazon Javascript code snippet and looks as follows: -![Click Me](https://spryker.s3.eu-central-1.amazonaws.com/docs/Technology+Partners/Payment+Partners/Amazon+Pay/amazonpay_button.png) - -If the buyer is a registered Amazon customer, clicking the button prompts to enter their Amazon login and password. - -If correct, Amazon creates an order reference and passes it to the shop. - -Using this reference and Amazon Pay credentials it is possible to run Handling orders with Amazon Pay API queries. - -**To insert the Amazon Pay button in your shop, add the following widget on your page:**: -```xml -{% raw %}{{{% endraw %} render(path('amazonpay_paybutton')) {% raw %}}}{% endraw %} -``` - -Configuration is used from your current settings profile. - -**Results**: - -If everything was done properly, the clickable button will be displayed and by clicking it, the user will see a popup window with Amazon prompt to login. - -The Popup looks as follows: -![Click Me](https://spryker.s3.eu-central-1.amazonaws.com/docs/Technology+Partners/Payment+Partners/Amazon+Pay/amazon_popup.png) diff --git a/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/amazon-pay/legacy-demoshop-integration/amazon-pay-sandbox-simulations.md b/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/amazon-pay/legacy-demoshop-integration/amazon-pay-sandbox-simulations.md deleted file mode 100644 index 15902c334f4..00000000000 --- a/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/amazon-pay/legacy-demoshop-integration/amazon-pay-sandbox-simulations.md +++ /dev/null @@ -1,39 +0,0 @@ ---- -title: Amazon Pay - Sandbox Simulations -description: In this article, you can get information about sandbox simulations for the Amazon Pay module in Spryker Legacy Demoshop. -last_updated: Apr 3, 2020 -template: concept-topic-template -originalLink: https://documentation.spryker.com/v5/docs/amazon-pay-simulations-demoshop -originalArticleId: fa986c53-3b3b-42c4-8674-883821273e15 -redirect_from: - - /v5/docs/amazon-pay-simulations-demoshop - - /v5/docs/en/amazon-pay-simulations-demoshop -related: - - title: Obtaining an Amazon Order Reference and information about shipping addresses - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/amazon-pay/obtaining-an-amazon-order-reference-and-information-about-shipping-addresses.html - - title: Amazon Pay - Support of Bundled Products - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/amazon-pay/legacy-demoshop-integration/amazon-pay-support-of-bundled-products.html - - title: Amazon Pay - Refund - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/amazon-pay/legacy-demoshop-integration/amazon-pay-refund.html - - title: Handling orders with Amazon Pay API - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/amazon-pay/handling-orders-with-amazon-pay-api.html - - title: Configuring Amazon Pay - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/amazon-pay/configuring-amazon-pay.html - - title: Amazon Pay - Rendering a “Pay with Amazon” Button on the Cart Page - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/amazon-pay/legacy-demoshop-integration/amazon-pay-rendering-a-pay-with-amazon-button-on-the-cart-page.html - - title: Amazon Pay - Sandbox Simulations - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/amazon-pay/amazon-pay-sandbox-simulations.html - - title: Handling orders with Amazon Pay API - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/amazon-pay/legacy-demoshop-integration/legacy-demoshop-handling-orders-with-amazon-pay-api.html - - title: Amazon Pay - Email Notifications - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/amazon-pay/legacy-demoshop-integration/amazon-pay-email-notifications.html - - title: Amazon Pay - Order Reference and Information about Shipping Addresses - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/amazon-pay/legacy-demoshop-integration/amazon-pay-order-reference-and-information-about-shipping-addresses.html ---- - -In order to reproduce some edge cases like declined payment or pending capture, Amazon provides two solutions. The first is special methods marked with a red star on payment widget. - -![Click Me](https://spryker.s3.eu-central-1.amazonaws.com/docs/Technology+Partners/Payment+Partners/Amazon+Pay/amazon_payment_widget.png) -It allows reproducing different cases of `decline` payment workflow. - -But there are more edge cases like expired authorization or pending capture for which there is only one way to reproduce - pass simulation string as `SellerNote` parameter of API request. diff --git a/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/amazon-pay/legacy-demoshop-integration/amazon-pay-state-machine.md b/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/amazon-pay/legacy-demoshop-integration/amazon-pay-state-machine.md deleted file mode 100644 index 27ee5413a83..00000000000 --- a/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/amazon-pay/legacy-demoshop-integration/amazon-pay-state-machine.md +++ /dev/null @@ -1,109 +0,0 @@ ---- -title: Amazon Pay - State Machine -description: This article describes the state machine for the Amazon Pay module in the Spryker Legacy Demoshop. -last_updated: Apr 3, 2020 -template: concept-topic-template -originalLink: https://documentation.spryker.com/v5/docs/amazon-pay-state-machine-demoshop -originalArticleId: 32aebb8a-53ef-4181-98aa-e24e7a9529c3 -redirect_from: - - /v5/docs/amazon-pay-state-machine-demoshop - - /v5/docs/en/amazon-pay-state-machine-demoshop -related: - - title: Obtaining an Amazon Order Reference and information about shipping addresses - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/amazon-pay/obtaining-an-amazon-order-reference-and-information-about-shipping-addresses.html - - title: Amazon Pay - Rendering a “Pay with Amazon” Button on the Cart Page - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/amazon-pay/legacy-demoshop-integration/amazon-pay-rendering-a-pay-with-amazon-button-on-the-cart-page.html - - title: Amazon Pay - Support of Bundled Products - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/amazon-pay/legacy-demoshop-integration/amazon-pay-support-of-bundled-products.html - - title: Handling orders with Amazon Pay API - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/amazon-pay/handling-orders-with-amazon-pay-api.html - - title: Amazon Pay - Order Reference and Information about Shipping Addresses - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/amazon-pay/legacy-demoshop-integration/amazon-pay-order-reference-and-information-about-shipping-addresses.html - - title: Configuring Amazon Pay - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/amazon-pay/configuring-amazon-pay.html - - title: Amazon Pay - Sandbox Simulations - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/amazon-pay/amazon-pay-sandbox-simulations.html - - title: Handling orders with Amazon Pay API - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/amazon-pay/legacy-demoshop-integration/legacy-demoshop-handling-orders-with-amazon-pay-api.html - - title: Amazon Pay - Sandbox Simulations - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/amazon-pay/legacy-demoshop-integration/amazon-pay-sandbox-simulations.html - - title: Amazon Pay - Email Notifications - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/amazon-pay/legacy-demoshop-integration/amazon-pay-email-notifications.html ---- - -The state machine is different for synchronous and asynchronous flow. Although from status "capture completed" it is the same and in the state machine, it's presented as a sub-process. - -The state machine for the synchronous flow: -![Synchronous flow](https://spryker.s3.eu-central-1.amazonaws.com/docs/Technology+Partners/Payment+Partners/Amazon+Pay/sync.png) - -The state machine for the asynchronous flow: -![Asynchronous flow](https://spryker.s3.eu-central-1.amazonaws.com/docs/Technology+Partners/Payment+Partners/Amazon+Pay/async.png) - -## OMS Commands -Here is a list of commands and conditions to support processing of OMS: -```php - -``` diff --git a/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/amazon-pay/legacy-demoshop-integration/amazon-pay-support-of-bundled-products.md b/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/amazon-pay/legacy-demoshop-integration/amazon-pay-support-of-bundled-products.md deleted file mode 100644 index 41c41dd8ac1..00000000000 --- a/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/amazon-pay/legacy-demoshop-integration/amazon-pay-support-of-bundled-products.md +++ /dev/null @@ -1,86 +0,0 @@ ---- -title: Amazon Pay - Support of Bundled Products -description: Amazon Pay supports the bundled products and can be configured in the Spryker shop. -last_updated: Apr 3, 2020 -template: concept-topic-template -originalLink: https://documentation.spryker.com/v5/docs/amazon-pay-support-bundled-products-demoshop -originalArticleId: a2e5fac0-8eb3-4f34-a329-527fd49bf539 -redirect_from: - - /v5/docs/amazon-pay-support-bundled-products-demoshop - - /v5/docs/en/amazon-pay-support-bundled-products-demoshop -related: - - title: Obtaining an Amazon Order Reference and information about shipping addresses - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/amazon-pay/obtaining-an-amazon-order-reference-and-information-about-shipping-addresses.html - - title: Amazon Pay - Refund - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/amazon-pay/legacy-demoshop-integration/amazon-pay-refund.html - - title: Handling orders with Amazon Pay API - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/amazon-pay/handling-orders-with-amazon-pay-api.html - - title: Configuring Amazon Pay - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/amazon-pay/configuring-amazon-pay.html - - title: Amazon Pay - Sandbox Simulations - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/amazon-pay/legacy-demoshop-integration/amazon-pay-sandbox-simulations.html - - title: Amazon Pay - Rendering a “Pay with Amazon” Button on the Cart Page - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/amazon-pay/legacy-demoshop-integration/amazon-pay-rendering-a-pay-with-amazon-button-on-the-cart-page.html - - title: Amazon Pay - Sandbox Simulations - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/amazon-pay/amazon-pay-sandbox-simulations.html - - title: Handling orders with Amazon Pay API - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/amazon-pay/legacy-demoshop-integration/legacy-demoshop-handling-orders-with-amazon-pay-api.html - - title: Amazon Pay - Email Notifications - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/amazon-pay/legacy-demoshop-integration/amazon-pay-email-notifications.html - - title: Amazon Pay - Order Reference and Information about Shipping Addresses - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/amazon-pay/legacy-demoshop-integration/amazon-pay-order-reference-and-information-about-shipping-addresses.html ---- - -Bundled products are optional in the shop, thus support of those should be configured. - -First, you have to extend `AmazonPayFactory`: - -```php -getFactory()->createProductBundleGrouper()->getGroupedBundleItems( - $quoteTransfer->getItems(), - $quoteTransfer->getBundleItems() - ); - } -} -``` diff --git a/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/amazon-pay/legacy-demoshop-integration/legacy-demoshop-handling-orders-with-amazon-pay-api.md b/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/amazon-pay/legacy-demoshop-integration/legacy-demoshop-handling-orders-with-amazon-pay-api.md deleted file mode 100644 index 917a91cd725..00000000000 --- a/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/amazon-pay/legacy-demoshop-integration/legacy-demoshop-handling-orders-with-amazon-pay-api.md +++ /dev/null @@ -1,147 +0,0 @@ ---- -title: Legacy Demoshop—Handling orders with Amazon Pay API -description: This article provides details on the API structure of the Amazon Pay module in Spryker Legacy Demoshop. -last_updated: Apr 3, 2020 -template: concept-topic-template -originalLink: https://documentation.spryker.com/v5/docs/amazon-pay-api-demoshop -originalArticleId: f78ed79d-25dc-42cb-92f0-bebaf77e6926 -redirect_from: - - /v5/docs/amazon-pay-api-demoshop - - /v5/docs/en/amazon-pay-api-demoshop -related: - - title: Obtaining an Amazon Order Reference and information about shipping addresses - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/amazon-pay/obtaining-an-amazon-order-reference-and-information-about-shipping-addresses.html - - title: Amazon Pay - Rendering a “Pay with Amazon” Button on the Cart Page - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/amazon-pay/legacy-demoshop-integration/amazon-pay-rendering-a-pay-with-amazon-button-on-the-cart-page.html - - title: Amazon Pay - Support of Bundled Products - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/amazon-pay/legacy-demoshop-integration/amazon-pay-support-of-bundled-products.html - - title: Amazon Pay - State Machine - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/amazon-pay/legacy-demoshop-integration/amazon-pay-state-machine.html - - title: Handling orders with Amazon Pay API - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/amazon-pay/handling-orders-with-amazon-pay-api.html - - title: Amazon Pay - Order Reference and Information about Shipping Addresses - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/amazon-pay/legacy-demoshop-integration/amazon-pay-order-reference-and-information-about-shipping-addresses.html - - title: Configuring Amazon Pay - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/amazon-pay/configuring-amazon-pay.html - - title: Amazon Pay - Sandbox Simulations - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/amazon-pay/amazon-pay-sandbox-simulations.html - - title: Amazon Pay - Sandbox Simulations - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/amazon-pay/legacy-demoshop-integration/amazon-pay-sandbox-simulations.html - - title: Amazon Pay - Email Notifications - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/amazon-pay/legacy-demoshop-integration/amazon-pay-email-notifications.html ---- - -So far we discussed the client side implementation provided by Amazon Pay. On the Spryker OS side, the module provides tools for rendering Amazon Pay widgets. - -Another part of the implementation is the Handling orders with Amazon Pay API function wrapper, implemented as a Facade. - -Each API call involves similar classes from the module: - -* An adapter for adapting Amazon SDK that makes the rest of the module independent of the external library; -* A converter from Amazon responses to Spryker OS transfer objects; -* A logger for logging information about API calls; -* A transaction for updating transfer objects. - -Since it is a standard Spryker OS practice, an entry point is a public method of the Facade, so the flow for a typical transaction includes the following steps: - -1. Logically grouping the affected order items, based on the transaction type: -* for authorize & capture - by AuthorizationReferenceId -* for refund & capture status update - by AmazonCaptureId -* no grouping is required for close and cancel since operations are performed for the whole order. -2. The following steps are executed for each group separately -* Calling Facade method. -* Facade creates a related transaction handler or a collection of transaction handlers. -* The transaction handler has execute method expecting an AmazonCallTransfer object as a parameter. -* The transaction handler passes a transfer object to the adapter which is responsible for direct communication with the Handling orders with Amazon Pay API. Using the provided SDK it converts API responses into transfer objects using converters. Apart from adapters and converters, the rest of the code does not know anything about Handling orders with Amazon Pay API details and only works with Spryker OS transfer objects. -* If not all order items, belonging to a logical group, where requested for the update, a new group is created for affected order items. -* The transaction handler returns a modified transfer object. All information related to Amazon Pay is stored into AmazonpayPaymentTransfer transfer object and into the database. - -## Additional Information -### Initializing Quote Transfer Objects -After a user signs in via Amazon Pay, we can make API calls against the order. The first step is to initialize order data and store it to a quote transfer object using the Quote updater classes. These classes work in a similar way to transaction handlers. However, they only retrieve information from Amazon (if necessary) and then save it to a Quote. -**There are three steps for initializing a new order:** -1. Retrieve and update buyer information. -2. Create payment transfer objects. -3. Update Shipment. - -Only the first step uses an API call while the other two are only about initializing. -The updater class for retrieving buyer data is called `GuestCustomerDataQuoteUpdater`. It uses a related adapter called `ObtainProfileInformationAdapter`, to make an API call and store data into the Quote transfer. - -We have this call instead of taking current user data to create a separation between Spryker and Amazon accounts and enable the ability to make an order without a Spryker account. -If a logged in user places an order, the order would be still assigned to him and visible in the Customer area. - -### Updating Shipment Address and Method -Once a buyer chooses a shipment address from the Address widget, a Javascript callback is triggered. -We notify the server side that the user has changed their shipping address. -Then we use the Facade method `addSelectedAddressToQuote` to return the updated quote object and save the updated quote. -Now the quote contains updated address information and it's possible to retrieve available shipment methods. -The Spryker OS provides a Shipment module and uses method `getAvailableMethods()` to retrieve the shipment methods list and send it back to the customer. -Once shipping options are updated a buyer can choose one. Usually, shipment methods affect the total price of the order and it must be recalculated using the Calculation module. - -### Placing an Order -Once all necessary information is saved into Quote, an order is ready to be placed. -First, perform all related API calls and then persist an order in the database. -All API related jobs are covered by only one Facade method confirmPurchase() which encapsulates five Handling orders with Amazon Pay API calls to be executed one after another: - -1. `SetOrderReferenceDetails` for specifying order total amount -2. `ConfirmOrderReference` for confirming the order -3. `GetOrderReferenceDetails` for retrieving information about buyer (like name and shipping address) -4. `AuthorizeOrderTransaction` for authorizing and capturing a payment and decline handling if something goes wrong. -5. `CancelPreOrderTransaction` for canceling the order. It should be done in some cases of declined authorization. - -Each API call is handled by a transaction handler object. In order to call more than one transaction, the module provides `TransactionSequence` class. `TransactionSequence` encapsulates an array of transaction objects. A developer can easily replace single transaction with sequence or replace transaction objects within transaction sequence objects. -Here is an example of an execute method for the collection: - -```php -foreach ($this->transactionHandlers as $transactionHandler) { - $amazonpayCallTransfer = $transactionHandler->execute($amazonpayCallTransfer); - - if ($amazonpayCallTransfer->getAmazonpayPayment()->getResponseHeader() && - !$amazonpayCallTransfer->getAmazonpayPayment()->getResponseHeader()->getIsSuccess()) { - break; - } -} - -return $amazonpayCallTransfer; -``` -Once a transaction is finished successfully, we pass the updated quote transfer to the next transaction. If the transaction fails, we return the current one and it contains all information about an error. - -### Authorization in Asynchronous and Synchronous Modes. CaptureNow Setting -The authorization API call is configurable and it reflects the whole payment process. - -The first important setting is the `transaction_timeout` that defines the maximum number of minutes allocated for the Authorize operation call to be processed, after which the authorization is automatically declined and you cannot capture funds against the authorization. - -Zero value means that authorization result has to be returned immediately and it is synchronous authorization. For the asynchronous authorization, the value must be above zero but less than maximum possible 1440. - -Another important setting is `CaptureNow`. It can only be true or false and if set to true then both requests - Authorization and Capture will be done in one step, within Authorize API call. - -### Handling Declined payments - Synchronous Workflow -Amazon Pay documentation defines a workflow which has to be implemented on a merchant side. - -In some cases, declined payment involves additional API calls. This is why there is an additional transaction collection called `HandleDeclinedOrderTransaction`. This call goes after the Authorization step and encapsulates two transaction objects: -GetOrderReferenceDetailsTransaction which was used previously and `CancelOrderTransaction`. -When all previous steps return a positive response and authorization is accepted it returns transfer object without any modifications. If payment is declined because of wrong payment method - there's nothing to do on a server side. -If the reason is different, we can check the state of an order using `GetOrderReferenceDetailsTransaction`. -If it is open, then the order must be canceled with a `CancelOrderTransaction` call. -The rest of decline flow includes logic determining where to redirect a buyer. In sandbox mode, for each test account, Amazon provides fake payment methods for emulating error API responses. - -{% info_block errorBox "Important" %} -Even if a response has status code 200 it still may contain Constraint(s -{% endinfo_block %} in the response body.) - -There is one special constraint related to selected payment method `PaymentMethodNotAllowed`. If it occurs (rarely) the buyer should be redirected to the same page with address and payment widgets and be able to choose a different payment method and all other order parameters as well. - -### Handling Declined Payments - Asynchronous Workflow -Unlike synchronous authorization it is impossible to get the result of authorization in the response. Authorization objects stay in Pending state until authorized. Capture and Refund requests can also be processed in the same way and Amazon provides Internet Payment Notification (IPN) in order to notify the shop about the new status of any asynchronous request. IPN message is an HTTP request with some special Amazon-related headers and the body which is an XML string containing all data. The merchant has to specify URL for receiving and processing IPN messages. - -The module provides two Facade's methods: - -* `convertAmazonPayIpnRequest` (array `$headers`, `$body`) for converting an Amazon request (which is HTTP headers and body) to the transfer object. For each type of IPN request, we provide a related transfer object and method. `convertAmazonPayIpnRequest()` returns one of them. - -* `handleAmazonPayIpnRequest` (`AbstractTransfer` `$ipnRequestTransfer`) should be called. It has `AbstractTransfer` type for its argument and it works with all types of IPN related transfer objects. A typical flow of a successful flow usually involves pending statuses of authorization and capture requests. - -Therefore, related IPN messages have to be received and processed correctly. For retrieving the same information Amazon also provides `GetAuthorizationDetails` and `GetCaptureDetails` functions and in Spryker OS it is possible to update the pending statuses with State machine buttons. Once the button is clicked, the shop makes a related API call, receives a response and if the state is not pending then it updates order status according to the response message. The final status of a success flow is "capture completed". After that only Refund is available and refund workflow is asynchronous only and works in a similar way as asynchronous authorization. - -The more tricky case is authorization declined workflow. It is similar to synchronous decline which was described above but everything goes asynchronously and involves additional IPN messages. First of all, Authorization IPN comes with "Declined" state of authorization status. Another important information here is `ReasonCode` and it affects all further steps of the process. For the reason codes `TransactionTimedOut` and `AmazonRejected` the order simply goes to authorization declined state but for the `InvalidPaymentMethod` the customer has to change the payment method to the correct one. In this case, order receives authorization suspended status and Amazon sends two additional IPN messages: `OrderNotification` with the state "Open" comes in after payment method is changed by buyer and Authorization notification as a result of authorization of a new payment method. If new payment method passes authorization successfully then order goes to the auth open state and it is possible to request a capture. In both decline cases, it is important to notify the buyer about it by email since it's the only one way for him to know that payment is not possible. The text of the email letter has to be different for `InvalidPaymentMethod` case. - -Another tricky moment about asynchronous flow is "Authorization expired" situation. Each time the shop requests capture in asynchronous mode, it should check the current status of an authorization. Capture is only possible when the status of authorization is "Open". If authorization has status Closed and `ReasonCode` is either `ExpiredUnused` or `SellerClosed` then an order should be reauthorized with `CaptureNow` setting enabled. diff --git a/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/amazon-pay/obtaining-an-amazon-order-reference-and-information-about-shipping-addresses.md b/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/amazon-pay/obtaining-an-amazon-order-reference-and-information-about-shipping-addresses.md deleted file mode 100644 index 4029952d6ce..00000000000 --- a/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/amazon-pay/obtaining-an-amazon-order-reference-and-information-about-shipping-addresses.md +++ /dev/null @@ -1,126 +0,0 @@ ---- -title: Obtaining an Amazon Order Reference and information about shipping addresses -description: This article contains information about order reference and shipping address in Spryker Commerce OS. -last_updated: Apr 3, 2020 -template: concept-topic-template -originalLink: https://documentation.spryker.com/v5/docs/amazon-order-reference-information -originalArticleId: 45fae47d-3d76-4661-af16-9fb9300e45e5 -redirect_from: - - /v5/docs/amazon-order-reference-information - - /v5/docs/en/amazon-order-reference-information -related: - - title: Amazon Pay - Refund - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/amazon-pay/legacy-demoshop-integration/amazon-pay-refund.html - - title: Handling orders with Amazon Pay API - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/amazon-pay/handling-orders-with-amazon-pay-api.html - - title: Amazon Pay - State Machine - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/amazon-pay/amazon-pay-state-machine.html - - title: Amazon Pay - Sandbox Simulations - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/amazon-pay/legacy-demoshop-integration/amazon-pay-sandbox-simulations.html - - title: Amazon Pay - Rendering a “Pay with Amazon” Button on the Cart Page - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/amazon-pay/legacy-demoshop-integration/amazon-pay-rendering-a-pay-with-amazon-button-on-the-cart-page.html - - title: Amazon Pay - Sandbox Simulations - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/amazon-pay/amazon-pay-sandbox-simulations.html - - title: Configuring Amazon Pay - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/amazon-pay/configuring-amazon-pay.html - - title: Handling orders with Amazon Pay API - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/amazon-pay/legacy-demoshop-integration/legacy-demoshop-handling-orders-with-amazon-pay-api.html - - title: Amazon Pay - Email Notifications - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/amazon-pay/legacy-demoshop-integration/amazon-pay-email-notifications.html - - title: Amazon Pay - Order Reference and Information about Shipping Addresses - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/amazon-pay/legacy-demoshop-integration/amazon-pay-order-reference-and-information-about-shipping-addresses.html ---- - -After successful authorization, a buyer will be redirected to an order detils page to enter all the information necessary for placing an order: address of shipment, payment method, delivery method and some calculations about taxes, possible discounts, delivery cost, etc. - -Amazon Pay provides solutions for choosing shipping addresses and payment methods based on what the buyer previously used on Amazon. - -As addresses differ by country, the delivery method selection must be implemented by the shop and aligned with shipping address information. - -Amazon provides two widgets for choosing shipment and payment information, they can be placed together on the same page or separately. - -The code for both widgets is: -```html - -
    - - -
    - - - - -``` -Both widgets are similar to the pay button widget that we described earlier. - -All necessary credentials have to be specified the same way and in order to retrieve the selected information, Amazon provides JavaScript callbacks. - -The first of them to use is `onOrderReferenceCreate` which provides an Amazon order reference id. - -This ID is a unique identifier of the order, created on Amazon's side and is required Handling orders with Amazon Pay API calls. - -Other important callbacks are `onAddressSelect` and `onPaymentSelect`. These callbacks are triggered after selecting shipment address information and payment method respectively. Callbacks are client-side notifications that an event has happened. - -Use the Handling orders with Amazon Pay API to retrieve data and run order operations. diff --git a/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/arvato/arvato-risk-check.md b/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/arvato/arvato-risk-check.md deleted file mode 100644 index 7c3c7a7ab78..00000000000 --- a/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/arvato/arvato-risk-check.md +++ /dev/null @@ -1,61 +0,0 @@ ---- -title: Arvato - Risk Check -description: Arvato Risk Check evaluates the probability of payment default for the customer orders. -last_updated: Apr 3, 2020 -template: concept-topic-template -originalLink: https://documentation.spryker.com/v5/docs/arvato-risk-check-2-0 -originalArticleId: 00fdc642-14bc-400f-95e0-833d665e1821 -redirect_from: - - /v5/docs/arvato-risk-check-2-0 - - /v5/docs/en/arvato-risk-check-2-0 - - /docs/scos/user/technology-partners/202005.0/payment-partners/arvato/arvato-risk-check.html -related: - - title: Arvato - Store Order 2.0 - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/arvato/arvato-store-order.html - - title: Arvato - link: docs/scos/user/technology-partners/page.version/payment-partners/arvato.html ---- - -Accounted for by external credit agency data and internal existing customer- and order-details the `RiskCheck` evaluates the probability of payment default for the customer orders. - -The returned decision codes (`Result` – `ActionCode` – `ResultCode`) manage the definition of the eShop's payment methods. -If a payment method is not permitted, the decision code provides information about alternate payment methods available for the customer. - - Additional validation of billing and shipping addresses is performed on Arvato RSS side. Refer to Arvato documentation for return code bit pattern and explanation of bits. - -The main entry point to risk check functionality is `performRiskCheck` method inside `ArvatoRssFacade` class. - -Developer is supposed to call `performRiskCheck` method providing actual `QuoteTransfer` as the first argument. -In the response `QuoteTransfer` is returned with `ArvatoRssRiskCheckResponse` transfer inside. It contains `Result`, `ResultCode`, `ActionCode`, `ResultText`, `billingAddressValidation`, `deliveryAddressValidation`. - -Response can be taken with: -```php - $quoteTransfer->getArvatoRssQuoteData()->getArvatoRssRiskCheckResponse(); - ``` -{% info_block warningBox "Note" %} -The transfer can have all fields empty if error occurred during request. -{% endinfo_block %} - -Data, that is sent to Arvato RSS and must be present in quote: - -| Name | Notes | -| --- | --- | -| `Country` | Is taken from `BillingAddress` and `ShippingAddress` | -| `City` | Is taken from `BillingAddress` and `ShippingAddress` | -| `Street` | Is taken from `BillingAddress` and `ShippingAddress` | -| `StreetNumber` | Is taken from `BillingAddress` and `ShippingAddress` | -| `ZipCode` | Is taken from `BillingAddress` and `ShippingAddress` | -| `FirstName` | Is taken from `BillingAddress` and `ShippingAddress` | -| `LastName` | Is taken from `BillingAddress` and `ShippingAddress` | -| `RegisteredOrder` | Shows if order is placed with registered customer or not. | -| `Currency` | Is taken from store configuration | -| `GrossTotalBill` | Total value of order incl. delivery fee, rebates/ credit notes and VAT (Grand Total) | -| `TotalOrderValue` | Value of goods for this order incl. VAT (Subtotal) | -| `ProductNumber` | Product number, defined by customer(default value 1). Sku is set there. | -| `ProductGroupId` | Product group number/product type (default value 1). 1 is set. | -| `UnitPrice` | Value of units incl. VAT. It is taken from `ItemTransfer`. | -| `UnitCount` | Quantity of units (maximum value 99999999). It is taken from `ItemTransfer` | - -You can check the result codes, returned by Arvato in the attachment. - -@(Embed)(https://spryker.s3.eu-central-1.amazonaws.com/docs/Technology+Partners/Payment+Partners/Arvato/arvato-rss-result-codes.xlsx) diff --git a/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/arvato/arvato-store-order.md b/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/arvato/arvato-store-order.md deleted file mode 100644 index bf6696dc1f8..00000000000 --- a/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/arvato/arvato-store-order.md +++ /dev/null @@ -1,42 +0,0 @@ ---- -title: Arvato - Store Order -description: In this article, you can get details about the Store Order service in the Arvato module. -last_updated: Apr 3, 2020 -template: concept-topic-template -originalLink: https://documentation.spryker.com/v5/docs/arvato-store-order-2-0 -originalArticleId: 3ebb6075-3b76-4c45-9e49-3f35f1f3db00 -redirect_from: - - /v5/docs/arvato-store-order-2-0 - - /v5/docs/en/arvato-store-order-2-0 - - /docs/scos/user/technology-partners/202005.0/payment-partners/arvato/arvato-store-order.html -related: - - title: Arvato - link: docs/scos/user/technology-partners/page.version/payment-partners/arvato.html ---- - - As soon as the order is activated in the eShop it has to be directly delivered by the service call StoreOrder in risk solution services. Based on the transmitted data a limit check is processed again. The result and action codes returned by `StoreOrder` should be analyzed and the order process should be stopped if applicable. - -The store order call can be added to OMS. ArvatoRss module provides a command `(SprykerEco\Zed\ArvatoRss\Communication\Plugin\Oms\Command\StoreOrderPlugin)` to invoke store order call and a condition `(SprykerEco\Zed\ArvatoRss\Communication\Plugin\Oms\Command\IsStoreOrderSuccessfulPlugin)` which checks whether the call has been successful or not. - -In case of obtaining the success result with `RiskCheck` call, `CommunicationToken` will be present in response. And need to be stored to quote and provided to store order call by developer. -All the operations over the communication token are processed by project. - -Data, which is sent to Arvato RSS and must be present in quote: - -|Name | Description | -| --- | --- | -| `RegisteredOrder` | Shows if order is placed with registered customer or not. | -| `OrderNumber` | OrderReference is set here. | -| Debitor number | Customer id from the database. | -| Payment type | Payment type which is mapped to existing payment methods via configuration. See `config.dist.php` to get an example. | -| Currency | Is taken from store configuration. | -| `GrossTotalBill` | Total value of order incl. delivery fee, rebates/ credit notes and VAT (Grand Total). | -| `TotalOrderValue` | Value of goods for this order incl. VAT (Subtotal). | -| `ProductNumber` | Product number, defined by customer(default value 1). Sku is set there. | -| `ProductGroupId` | Product group number/product type (default value 1). 1 is set. | -| `UnitPrice` | Value of units incl. VAT. | -| `UnitCount` | Quantity of units (maximum value 99999999). | - -You can check the result codes, returned by Arvato in the attachment. - -@(Embed)(https://spryker.s3.eu-central-1.amazonaws.com/docs/Technology+Partners/Payment+Partners/Arvato/arvato-rss-result-codes.xlsx) diff --git a/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/arvato/installing-and-configuring-arvato.md b/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/arvato/installing-and-configuring-arvato.md deleted file mode 100644 index c4bb8360d92..00000000000 --- a/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/arvato/installing-and-configuring-arvato.md +++ /dev/null @@ -1,67 +0,0 @@ ---- -title: Installing and configuring Arvato -description: Provide complete and comprehensive risk management for the eCommerce/mail-order industry, contributing to a high level of modularization and automation. -last_updated: Sep 15, 2020 -template: concept-topic-template -originalLink: https://documentation.spryker.com/v5/docs/arvato-2-0 -originalArticleId: fedbe73d-a0db-4f5a-af99-bd186c95a76c -redirect_from: - - /v5/docs/arvato-2-0 - - /v5/docs/en/arvato-2-0 -related: - - title: Arvato - Store Order 2.0 - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/arvato/arvato-store-order.html - - title: Arvato - link: docs/scos/user/technology-partners/page.version/payment-partners/arvato.html ---- - -The purpose of developing the risk solution services is to provide a complete and comprehensive risk management for the eCommerce/mail-order industry, contributing to a high level of modularization and automation. Besides the use of pre-configured service modules for risk management, risk solution services comprise process support up to the outsourcing of the entire operative risk management. All risk management processes are supported by a business intelligence component. -![Click Me](https://spryker.s3.eu-central-1.amazonaws.com/docs/Technology+Partners/Payment+Partners/Arvato/arvato-rss-overview.png) - -## Prerequisites - -For every service call of risk solution services an authorization is required. -The authorization data is transferred in the SOAP header and shows the following structure. - -In order to send requests, you are supposed to have the following credentials, provided by Arvato: - -| Parameter Name | Description | -| --- | --- | -| `ARVATORSS_URL` | Arvato RSS gateway. | -| `ClientID` | Unique client number in the risk solution services. Will be communicated to the client before the integration | -| `Authorization` | Password for the authorization at risk solution services | -| `ARVATORSS_PAYMENT_TYPE_MAPPING` | A map of payment names to ArvatoRss specific payment type codes. | - -The following information (also present in `config.dist.php`) should be specified in configuration: -```php - ArvatoRssConstants::ARVATORSS_URL =& ''; - ArvatoRssConstants::ARVATORSS_CLIENTID = ''; - ArvatoRssConstants::ARVATORSS_AUTHORISATION =''; - // Mapping of your payment methods to payment types, that are known by Arvato Rss. - ArvatoRssConstants::ARVATORSS_PAYMENT_TYPE_MAPPING => [ - 'invoice' => ArvatoRssPaymentTypeConstants::INVOICE - ]; - ``` - -API URLs: - -| Name | URL | -| --- | --- | -| Production URL | `https://customer.risk-solution-services.de/rss-services/risk-solution-services.v2.1` | -| Sandbox URL | `https://integration.risk-solution-services.de/rss-services/risk-solution-services.v2.1` | - -Services: -* [Risk Check](/docs/scos/user/technology-partners/{{page.version}}/payment-partners/arvato/arvato-risk-check.html) -* [Store Order](/docs/scos/user/technology-partners/{{page.version}}/payment-partners/arvato/arvato-store-order.html) - -To implement Arvato RSS you should be familiar with concept of extending the - -## Installation - -### Composer Dependency - -To install Arvato RSS module, use [Composer](https://getcomposer.org/): - -``` -composer require spryker-eco/arvato-rss -``` diff --git a/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/arvato/v.1.0/arvato-risk-check-1.0.md b/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/arvato/v.1.0/arvato-risk-check-1.0.md deleted file mode 100644 index a638766c0b7..00000000000 --- a/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/arvato/v.1.0/arvato-risk-check-1.0.md +++ /dev/null @@ -1,59 +0,0 @@ ---- -title: Arvato - Risk Check 1.0 -description: Arvato Risk Check evaluates the probability of payment default for the customer orders. -last_updated: Apr 3, 2020 -template: concept-topic-template -originalLink: https://documentation.spryker.com/v5/docs/arvato-risk-check-1-0 -originalArticleId: f125d98e-d925-475a-b900-9a875ae35171 -redirect_from: - - /v5/docs/arvato-risk-check-1-0 - - /v5/docs/en/arvato-risk-check-1-0 - - /docs/scos/user/technology-partners/202005.0/payment-partners/arvato/v.1.0/arvato-risk-check-1.0.html -related: - - title: Installing and configuring Arvato 1.0 - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/arvato/v.1.0/arvato-risk-solution-services-integration-1.0.html - - title: Arvato - link: docs/scos/user/technology-partners/page.version/payment-partners/arvato.html ---- - -Accounted for by external credit agency data and internal existing customer- and order-details the RiskCheck evaluates the probability of payment default for the customer orders. -The returned decision codes (`Result` – `ActionCode` – `ResultCode`) manage the definition of the eShop's payment methods. -If a payment method is not permitted, the decision code provides information about alternate payment methods available for the customer. - -The main entry point to risk check functionality is `performRiskCheck` method inside `ArvatoRssFacade` class. - -Developer is supposed to call `performRiskCheck` method providing actual `QuoteTransfer` as the first argument. -In the response `QuoteTransfer` is returned with `ArvatoRssRiskCheckResponse` transfer inside. It contains -`Result`, `ResultCode`, `ActionCode`, `ResultText`. - -Response can be taken with: -```php - $quoteTransfer->getArvatoRssRiskCheckResponse(); - ``` - -{% info_block warningBox "Note" %} -The transfer can have all fields empty if error occurred during request. -{% endinfo_block %} - -Data, which is sent to Arvato RSS and must be present in the quote: - -| Name | Notes | -| --- | --- | -| Country | Is taken from `BillingAddress` | -| City | Is taken from `BillingAddress` | -| Street | Is taken from `BillingAddress` | -| StreetNumber | Is taken from `BillingAddress` | -| ZipCode | Is taken from `BillingAddress` | -| FirstName | Is taken from `BillingAddress` | -| LastName | Is taken from `BillingAddress` | -| RegisteredOrder | Shows if order is placed with registered customer or not. | -| Currency | Is taken from store configuration | -| GrossTotalBill | Total value of order incl. delivery fee, rebates/ credit notes and VAT (Grand Total) | -| TotalOrderValue | Value of goods for this order incl. VAT (Subtotal) | -| ProductNumber | Product number, defined by customer(default value 1). Sku is set there. | -| ProductGroupId | Product group number/product type (default value 1). 1 is set. | -| UnitPrice | Value of units incl. VAT | -| UnitCount | Quantity of units (maximum value 99999999) | - -You can check the result codes, returned by Arvato in the attachment. -@(Embed)(https://spryker.s3.eu-central-1.amazonaws.com/docs/Technology+Partners/Payment+Partners/Arvato/arvato-rss-result-codes.xlsx) diff --git a/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/arvato/v.1.0/installing-and-configuring-arvato-1.0.md b/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/arvato/v.1.0/installing-and-configuring-arvato-1.0.md deleted file mode 100644 index 6b959b4abff..00000000000 --- a/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/arvato/v.1.0/installing-and-configuring-arvato-1.0.md +++ /dev/null @@ -1,61 +0,0 @@ ---- -title: Installing and configuring Arvato 1.0 -description: Provide complete and comprehensive risk management for the eCommerce/mail-order industry, contributing to a high level of modularization and automation. -last_updated: Sep 15, 2020 -template: concept-topic-template -originalLink: https://documentation.spryker.com/v5/docs/arvato-1-0 -originalArticleId: ab38a147-b562-42fb-9e2d-2e67ff083261 -redirect_from: - - /v5/docs/arvato-1-0 - - /v5/docs/en/arvato-1-0 - - /docs/scos/dev/technology-partner-guides/202005.0/payment-partners/arvato/v.1.0/arvato-risk-solution-services-integration-1.0.html - - /docs/scos/user/technology-partners/202005.0/payment-partners/arvato/v.1.0/arvato-risk-solution-services-integration-1.0.html - - /docs/scos/user/technology-partners/202005.0/payment-partners/arvato/arvato-risk-solution-services-integration.html -related: - - title: Arvato - Risk Check 1.0 - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/arvato/v.1.0/arvato-risk-check-1.0.html ---- - -The purpose of developing the risk solution services is to provide a complete and comprehensive risk management for the eCommerce/mail-order industry, contributing to a high level of modularization and automation. Besides the use of pre-configured service modules for risk management, risk solution services comprise process support up to the outsourcing of the entire operative risk management. All risk management processes are supported by a business intelligence component. -![Click Me](https://spryker.s3.eu-central-1.amazonaws.com/docs/Technology+Partners/Payment+Partners/Arvato/arvato-rss-overview.png) - -## Prerequisites -For every service call of risk solution services an authorization is required. -The authorization data is transferred in the SOAP header and shows the following structure. -In order to send requests, you are supposed to have the following credentials, provided by Arvato: - -| Parameter Name | Description | -| --- | --- | -| ClientID | Unique client number in the risk solution services. Will be communicated to the client before the integration | -| Authorization | Password for the authorization at risk solution services | - -The following information (also present in `config.dist.php`) should be specified in configuration: -```php - $config[ArvatoRssConstants::ARVATORSS] = [ - ArvatoRssConstants::ARVATORSS_URL => '', - ArvatoRssConstants::ARVATORSS_CLIENTID => '', - ArvatoRssConstants::ARVATORSS_AUTHORISATION => '', - ]; - ``` - -API URLs: - -|Name |URL | -| --- | --- | -| Production url |`https://customer.risk-solution-services.de/rss-services/risk-solution-services.v2.1` | -| Sandbox url |`https://integration.risk-solution-services.de/rss-services/risk-solution-services.v2.1` | - -Services: -* [Risk Check](/docs/scos/user/technology-partners/{{page.version}}/payment-partners/arvato/v.1.0/arvato-risk-check-1.0.html) - -To implement Arvato RSS you should be familiar with concept of extending the Spryker Commerce OS. See [Extending Spryker](/docs/scos/dev/back-end-development/extend-spryker/spryker-os-module-customisation/extend-a-core-module-that-is-used-by-another.html) for more details. - -## Installation - -### Composer Dependency - -To install Arvato RSS module, use [Composer](https://getcomposer.org/): - -``` -composer require spryker-eco/arvato-rss -``` diff --git a/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/billpay/billpay-switching-invoice-payments-to-a-preauthorize-mode.md b/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/billpay/billpay-switching-invoice-payments-to-a-preauthorize-mode.md deleted file mode 100644 index 9639977afc4..00000000000 --- a/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/billpay/billpay-switching-invoice-payments-to-a-preauthorize-mode.md +++ /dev/null @@ -1,377 +0,0 @@ ---- -title: Billpay - Switching invoice payments to a preauthorize mode -last_updated: Apr 3, 2020 -template: concept-topic-template -originalLink: https://documentation.spryker.com/v5/docs/billpay-payment-methods -originalArticleId: 4fdbdebb-5210-46b2-857d-aae0aa0b8c10 -redirect_from: - - /v5/docs/billpay-payment-methods - - /v5/docs/en/billpay-payment-methods -related: - - title: Billpay - link: docs/scos/user/technology-partners/page.version/payment-partners/billpay.html ---- - -Refer to [Billpay payment information](https://www.billpay.de/en/klarna-group-for-business/) for information about payment methods. - -The identity and credit check are checked within a single "pre-authorize" call after summary page was submitted. -This may lead to the "rejection" of the order. - -To switch to the authorize mode, switch Billpay configuration variables to "pre-authorize" set of configuration variables: -```php -switch Billpay configuration variables to "pre-score" set of the configuration variables: -```php -customerStepHandler->get(CheckoutDependencyProvider::CUSTOMER_STEP_HANDLER)->addToDataClass($request, $quoteTransfer); - $this->customerStepHandler->get(BillpayConstants::PAYMENT_METHOD_INVOICE)->addToDataClass($request, $quoteTransfer); - - return $quoteTransfer; - } - ``` - -Next, extend the `CheckoutDependencyProvider` to return the `StepHandlerPluginCollection`: -```php -add(new BillpayCustomerHandlerPlugin(), BillpayConstants::PAYMENT_METHOD_INVOICE); - $plugins->add(new CustomerStepHandler(), self::CUSTOMER_STEP_HANDLER); - return $plugins; - }; - ``` - -Lastly, change the `CustomerStep` constructor: -```php -customerClient = $customerClient; - $this->customerStepHandler = $customerStepHandler; - } - ``` - -#### Shipment Step - -One of the places we can call prescore is the shipment step. - -At this point, the checkout process can provide us with all the information we need to do prescoring. - -To do prescoring, add the Billpay client to Shippment step by modifying the StepFactory: -```php -getCalculationClient(), - $this->getProvidedDependency(CheckoutDependencyProvider::CLIENT_BILLPAY), - $this->createShipmentPlugins(), - CheckoutControllerProvider::CHECKOUT_SHIPMENT, - ApplicationControllerProvider::ROUTE_HOME - ); - } - ``` - -Then register the client in `CheckoutDependencyProvider`. - - ```php - add(new BillpayInvoiceSubFormPlugin()); - return $paymentSubForms; - }; - - $container[self::PAYMENT_METHOD_HANDLER] = function () { - $paymentMethodHandler = new StepHandlerPluginCollection(); - $paymentMethodHandler->add( - new BillpayPaymentHandlerPlugin(), - BillpaySharedConfig::PAYMENT_METHOD_INVOICE - ); - return $paymentMethodHandler; - }; - - ... - - /** - * @param \Spryker\Yves\Kernel\Container $container - * - * @return \Spryker\Yves\Kernel\Container - */ - protected function provideClients(Container $container) - { - - // other clients ... - - $container[self::CLIENT_BILLPAY] = function (Container $container) { - return $container->getLocator()->billpay()->client(); - }; - - return $container; - } - ``` - -Now all we need to do is modify the Shippment step constructor: -```php -calculationClient = $calculationClient; - $this->shipmentPlugins = $shipmentPlugins; - $this->billpayClient = $billpayClient; - } - ``` - -and add a client call to the execute method: -```php -shipmentPlugins->get(CheckoutDependencyProvider::PLUGIN_SHIPMENT_STEP_HANDLER); - $shipmentHandler->addToDataClass($request, $quoteTransfer); - - $quoteTransfer = $this->calculationClient->recalculate($quoteTransfer); - - //added prescoring step - if (Config::get(BillpayConstants::USE_PRESCORE)) { - $this->billpayClient->prescorePayment($quoteTransfer); - } - - return $quoteTransfer; - } - ``` - -### Twig Extension (Optional) - -To populate the [Billpay JS widget](https://techdocs.billpay.de/v1/en/For_developers/JavaScript-Widget.html) with data, use the Twig extension provided in the Billpay module. - -To register the Twig extension: - -* Add it to YvesBootstrap as follows: - -```php -protected function registerServiceProviders() - { - // other service providers ... - $this->application->register(new TwigBillpayServiceProvider()); - } - ``` - -**List of all available identifiers**: - -| Name | Description | Notes | -| --- | --- | --- | -| `salutation` | Customer salutation | Taken from billing address | -| `firstName` | Customer first name | Taken from billing address | -| `lastName` | Customer last name | Taken from billing address | -| `address` | Customer billing address street name | for example, Main Street | -| `addressNo` | Customer billing address street name extension | for example, 3a | -| `zip` | Billing address postal number | for example, 10317 | -| `city` | Billing address city | for example, Berlin | -| `phone` | Customer telephone number | | -| `dateOfBirth` | Customer date of birth | Entered at payment step | -| `cartAmount` | Total value of cart items with discounts | Equal to cart amount | -| `orderAmount` | Total value of order | | -| `currency` | currrency iso code | Defined in store configuration | -| `language` | Current user language | | -| `countryIso3Code` | Country iso3 code i.e deu | Defined in store configuration | -| `countryIso2Code` | Country iso2 code i.e de | Defined in store configuration | -| `identifier` | Unique session identifier | Autogenerated | -| `apiKey` | Billpay api key | Defined in config under key `BILLPAY_PUBLIC_API_KEY` | - -### Checking Your Setup - -You should be able to see the Billpay invoice on payment step of your checkout step. If you receive the "method not available" message when you select **Billpay invoice** at the payment step, check the `spy_payment_billpay_api_log` table in your database for logs. - -## Zed - -In Zed `BillpaySaveOrderPlugin` has to be registered in the `CheckoutDependencyProvider`: -```php -add(new IsInvoicePaidConditionPlugin(), 'Billpay/IsInvoicePaid'); - $collection->add(new IsPreauthorizedConditionPlugin(), 'Billpay/IsPreauthorized'); - $collection->add(new IsCancelledConditionPlugin(), 'Billpay/IsCancelled'); - $collection->add(new IsItemCancelledConditionPlugin(), 'Billpay/IsItemCancelled'); - - return $collection; - } - - /** - * @param \Spryker\Zed\Kernel\Container $container - * - * @return \Spryker\Zed\Oms\Communication\Plugin\Oms\Command\CommandCollection - */ - protected function getCommandPlugins(Container $container) - { - $collection = parent::getCommandPlugins($container); - - $collection->add(new PreauthorizeCommandPlugin(), 'Billpay/Preauthorize'); - $collection->add(new InvoiceCreatedCommandPlugin(), 'Billpay/InvoiceCreated'); - $collection->add(new CancelOrderCommandPlugin(), 'Billpay/CancelOrder'); - $collection->add(new CancelItemCommandPlugin(), 'Billpay/CancelItem'); - - return $collection; - } - ``` - -### Check Your Settings - -In your checkout process you can now see the Billapay as a payment method in the payment checkout step. If you log in to ZED, you will find the OMS state machine registered under `http://mysprykershop.com/oms/index/draw?process=BillpayInvoice01&format=svg&font=14&state=`. - -If the link does not work, just click **Maintenance->OMS** to list all registered OMS state machines. - -Basic state machine will look somewhat like this and you can use it as sample in your project. -![Click Me](https://spryker.s3.eu-central-1.amazonaws.com/docs/Technology+Partners/Payment+Partners/Billpay/basic_OMS_state_machine.png) diff --git a/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/billpay/integrating-billpay.md b/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/billpay/integrating-billpay.md deleted file mode 100644 index 4c5850b97c5..00000000000 --- a/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/billpay/integrating-billpay.md +++ /dev/null @@ -1,91 +0,0 @@ ---- -title: Integrating Billpay -last_updated: Apr 3, 2020 -template: concept-topic-template -originalLink: https://documentation.spryker.com/v5/docs/billpay-integration -originalArticleId: e7f0f510-4f41-4a7e-951c-25024bebcf79 -redirect_from: - - /v5/docs/billpay-integration - - /v5/docs/en/billpay-integration -related: - - title: Billpay - link: docs/scos/user/technology-partners/page.version/payment-partners/billpay.html ---- - -Billpay offers multiple payment methods (Invoice, Direct Debit, PayLater, Instalment). Availability of payment methods differs from country to country. Please contact Billpay directly or visit the [Billpay website](https://www.billpay.de/en/)e for details. - -The Billpay module provides integration with the [Invoice with prescoring](https://www.billpay.de/en/klarna-group-for-business/index.html) payment method. - -## Configuration - -Billpay comes with a `config.dist.php` file that you can use as a sample configuration for your project by copying its content to your project configuration file. You can find all of your project configuration files in the `config `folder. - -See [Configuration Management](/docs/scos/dev/back-end-development/data-manipulation/configuration-management.html) for details on the configuration. - -### Configuration Options: - -| Name | Description | -| --- | --- | -| `GATEWAY_URL` | url to Billpay API | -| `BILLPAY_MERCHANT_ID` | Merchant ID that Billpay will provide to you | -| `BILLPAY_PORTAL_ID` | Portal ID that Billpay will provide to you | -| `BILLPAY_SECURITY_KEY` | MD5 hash of the security key generated for this portal. (generated and delivered by BillPay) | -| `BILLPAY_PUBLIC_API_KEY` | Public API Key; generated and delivered by BillPay for your portal. | -| `BILLPAY_MAX_DELAY_IN_DAYS` | Amount of days that will be added to the payment due date (e.g. in case of delayed shipping) | -| `USE_MD5_HASH` | If your security key is not md5 hash encrypted, you can do that by setting this config to 1 | -| `USE_PRESCORE` | In if it is necessary to show all Billpay payment methods despite of Billpay prescore response, you can set this option to 0. It should be set to 1 by default. | - -When you add options above to your project configuration, it should look somewhat like this: -```php - [ - 'Billpay', - ], -]; - -$config[KernelConstants::DEPENDENCY_INJECTOR_ZED] = [ - 'Payment' => [ - 'Billpay', - ], - 'Oms' => [ - 'Billpay', - ], -]; -``` - -In order to use the Billpay module state machines, add the location path to configuration: -```php - 'BillpayInvoice01', -]; -``` diff --git a/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/braintree/braintree-performing-requests.md b/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/braintree/braintree-performing-requests.md deleted file mode 100644 index 78354cebfb0..00000000000 --- a/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/braintree/braintree-performing-requests.md +++ /dev/null @@ -1,72 +0,0 @@ ---- -title: Braintree - Performing Requests -description: This article contains information on the state machine commands and conditions for the Braintree module in the Spryker Commerce OS. -last_updated: Apr 3, 2020 -template: concept-topic-template -originalLink: https://documentation.spryker.com/v5/docs/braintree-performing-requests -originalArticleId: 90009c74-d477-4516-82d0-9d78ab328ba3 -redirect_from: - - /v5/docs/braintree-performing-requests - - /v5/docs/en/braintree-performing-requests ---- - -In order to perform the necessary requests in the project based on Spryker Commerce OS or SCOS, you can easily use the implemented state machine commands and conditions. The next section gives a summary of them. You can also use the facade methods directly which, however, are invoked by the state machine. - -## Braintree State Machine Commands and Conditions - -### Commands - -Authorize - -* Authorize the payment by validating the given payment data -* Response: - - Success: Payment Details accepted - - Declined: Request format error, payment details not accepted -* Plugin: `AuthorizePlugin` - -Revert - -* Revert a previous pre-authorization call -* Always reverts the complete pre-check or authorization -* Plugin: `RevertPlugin` - -Capture - -* Capture of previous (p)re-authorization call Response: - - Success: Previous (p)re-authorization still valid and accepted - - Declined: Previous (p)re- authorization expired, request format error, or internal error -* Plugin: `CapturePlugin` - -Refund - -* Refund previous captured amount -* Full and partial refunds possible -* Response: - - Success: Refund possible and accepted - - Declined: Previous capture to far in the past, request format error, or internal -* Plugin: `RefundPlugin` - -### Conditions - -|Name |Description |Plugin | -| --- | --- | --- | -| `IsAuthorizationApproved` | Checks transaction status log for successful authorization response | `IsAuthorizationApprovedPlugin` | -| `IsReversalApproved` | Checks transaction status log for successful reversal response | `IsReversalApprovedPlugin` | -| `IsCaptureApproved` | Checks transaction status log for successful capture response | `IsCaptureApprovedPlungin` | -| `IsRefundApproved` | Checks transaction status log for successful refund response | `IsRefundApprovedPlugin` | - -## Braintree Facade - -|Facade Method | Parameter | Return | Description | -| --- | --- | --- | --- | -| `saveOrderPayment` | `QuoteTransfer``CheckoutResponseTransfer` | void | Saves order payment method data according to quote and checkout response transfer data. | -| `preCheckPayment` | `QuoteTransfer` | `BraintreeTransactionResponseTransfer` | Sends pre-authorize payment request to Braintree gateway to retrieve transaction data. Checks that form data matches transaction response data. | -| `authorizePayment` | `TransactionMetaTransfer` | `BraintreeTransactionResponseTransfer` | Processes payment confirmation request to Braintree gateway. | -| `capturePayment` | `TransactionMetaTransfer` | `BraintreeTransactionResponseTransfer` | Processes capture payment request to Braintree gateway. | -| `revertPayment` | `TransactionMetaTransfer` | `BraintreeTransactionResponseTransfer` | Processes cancel payment request to Braintree gateway. | -| `refundPayment` | `SpySalesOrderItem[]``SpySalesOrder` | `BraintreeTransactionResponseTransfer` | Calculate `RefundTransfer` for given `$salesOrderItems` and `$salesOrderEntity`.Processes refund request to Braintree gateway by calculated `RefundTransfer`. | -| `isAuthorizationApproved` | `OrderTransfer` | bool | Checks if pre-authorization API request got success response from Braintree gateway. | -| `isReversalApproved` | `OrderTransfer` | bool | Checks if cancel API request got success response from Braintree gateway. | -| `isCaptureApproved` | `OrderTransfer` | bool | Checks if capture API request got success response from Braintree gateway. | -| `isRefundApproved` | `OrderTransfer` | bool | Checks if refund API request got success response from Braintree gateway. | -| `postSaveHook` | `OrderTransfer``CheckoutResponseTransfer` | `CheckoutResponseTransfer` | Execute post-save hook. | diff --git a/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/braintree/braintree-request-workflow.md b/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/braintree/braintree-request-workflow.md deleted file mode 100644 index 63aca52aae4..00000000000 --- a/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/braintree/braintree-request-workflow.md +++ /dev/null @@ -1,27 +0,0 @@ ---- -title: Braintree - Request workflow -description: This article describes the request flow for the Braintree module in the Spryker Commerce OS. -last_updated: Apr 3, 2020 -template: concept-topic-template -originalLink: https://documentation.spryker.com/v5/docs/braintree-workflow -originalArticleId: de1d1ff6-f069-46b6-b6ec-92779cfb46a5 -redirect_from: - - /v5/docs/braintree-workflow - - /v5/docs/en/braintree-workflow -related: - - title: Braintree - link: docs/scos/user/technology-partners/page.version/payment-partners/braintree.html - - title: Braintree - Performing Requests - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/braintree/braintree-performing-requests.html - - title: Installing and configuring Braintree - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/braintree/installing-and-configuring-braintree.html ---- - -Both credit card and PayPal utilize the same request flow in - -* Pre-check: to check the user information to make sure that all the needed information is correct before doing the actual pre-authorization. -* Authorize: to perform a payment risk check which is a mandatory step before every payment. The payment is considered accepted when it is authorized. -* Revert: to cancel the authorization step which cancels the payment before capturing. -* Capture: to capture the payment and receive money from the buyer. -* Refund: to refund the buyer when returning products. - diff --git a/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/braintree/installing-and-configuring-braintree.md b/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/braintree/installing-and-configuring-braintree.md deleted file mode 100644 index b585b263d17..00000000000 --- a/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/braintree/installing-and-configuring-braintree.md +++ /dev/null @@ -1,276 +0,0 @@ ---- -title: Braintree - Configuration -description: This article contains information on configuring the Braintree module for the Spryker Commerce OS. -last_updated: Apr 3, 2020 -template: concept-topic-template -originalLink: https://documentation.spryker.com/v5/docs/braintree-configuration -originalArticleId: e7838a29-b3fa-4780-a1bd-ef31cfcc0cd6 -redirect_from: - - /v5/docs/braintree-configuration - - /v5/docs/en/braintree-configuration -related: - - title: Braintree - Performing Requests - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/braintree/braintree-performing-requests.html - - title: Braintree - Request workflow - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/braintree/braintree-request-workflow.html - - title: Braintree - link: docs/scos/user/technology-partners/page.version/payment-partners/braintree.html ---- - -To configure Braintree module for Spryker Commerce OS (SCOS), do the following: - -Add `spryker-eco/braintree` to your project by running `composer require spryker-eco/braintree`. - -Please refer to `config/config.dist.php` for an example of module configuration. - -To setup the initial Braintree configuration, use the credentials you received after registering your Braintree merchant account: -```php -// the mode of the transaction, either development, integration, sandbox, production, qa (required) -$config[BraintreeConstants::ENVIRONMENT] = ''; - -// the id of the merchant used (required) -$config[BraintreeConstants::MERCHANT_ID] = ''; - -// the public key given by the defined merchant account (required) -$config[BraintreeConstants::PUBLIC_KEY] = ''; - -// the private key given by the defined merchant account (required) -$config[BraintreeConstants::PRIVATE_KEY] = ''; - -// merchant account id specifying the currency (Marketplace master merchant is used by default) -$config[BraintreeConstants::ACCOUNT_ID] = ''; - -// merchant account unique identifier (Marketplace master merchant is used by default) -$config[BraintreeConstants::ACCOUNT_UNIQUE_IDENTIFIER] = ''; - -// defaults to false -$config[BraintreeConstants::IS_VAULTED] = true; - -// defaults to false -$config[BraintreeConstants::IS_3D_SECURE] = true; -``` - -## Checkout Configuration - -To use Braintree in frontend, Braintree payment method handlers and subforms should be added to `Pyz/Yves/CheckoutPage/CheckoutPageDependencyProvider.php`. -```php -use Spryker\Yves\StepEngine\Dependency\Plugin\Form\SubFormPluginCollection; -use Spryker\Yves\StepEngine\Dependency\Plugin\Handler\StepHandlerPluginCollection; -use SprykerEco\Yves\Braintree\Plugin\BraintreeCreditCardSubFormPlugin; -use SprykerEco\Yves\Braintree\Plugin\BraintreeHandlerPlugin; -use SprykerEco\Yves\Braintree\Plugin\BraintreePayPalSubFormPlugin; -use Generated\Shared\Transfer\PaymentTransfer; - -... - -/** - * @param \Spryker\Yves\Kernel\Container $container - * - * @return \Spryker\Yves\Kernel\Container - */ -protected function addSubFormPluginCollection(Container $container): Container -{ - $container[self::PAYMENT_SUB_FORMS] = function () { - $paymentSubFormPluginCollection = new SubFormPluginCollection(); - $paymentSubFormPluginCollection->add(new BraintreeCreditCardSubFormPlugin()); - $paymentSubFormPluginCollection->add(new BraintreePayPalSubFormPlugin()); - - return $paymentSubFormPluginCollection; - }; - - return $container; -} - -/** - * @param \Spryker\Yves\Kernel\Container $container - * - * @return \Spryker\Yves\Kernel\Container - */ -protected function addPaymentMethodHandlerPluginCollection(Container $container): Container -{ - $container[self::PAYMENT_METHOD_HANDLER] = function () { - $paymentMethodHandlerCollection = new StepHandlerPluginCollection(); - $paymentMethodHandlerCollection->add(new BraintreeHandlerPlugin(), PaymentTransfer::BRAINTREE_CREDIT_CARD); - $paymentMethodHandlerCollection->add(new BraintreeHandlerPlugin(), PaymentTransfer::BRAINTREE_PAY_PAL); - - return $paymentMethodHandlerCollection; - }; - - return $container; -} -``` - -All subform and handler plugins are located in `SprykerEco\Yves\Braintree\Plugin\` namespace. - -## OMS Configuration - -Activate the following Braintree process: -```php -$config[OmsConstants::ACTIVE_PROCESSES] = [ - 'BraintreePayPal01', - 'BraintreeCreditCard01', -]; - -$config[OmsConstants::PROCESS_LOCATION] = [ - OmsConfig::DEFAULT_PROCESS_LOCATION, - APPLICATION_VENDOR_DIR . '/spryker-eco/braintree/config/Zed/Oms', -]; - -$config[SalesConstants::PAYMENT_METHOD_STATEMACHINE_MAPPING] = [ - \SprykerEco\Shared\Braintree\BraintreeConfig::PAYMENT_METHOD_CREDIT_CARD => 'BraintreeCreditCard01', - \SprykerEco\Shared\Braintree\BraintreeConfig::PAYMENT_METHOD_PAY_PAL => 'BraintreePayPal01', -]; -``` - -Default implementation for commands and options should be added to `Pyz/Zed/Oms/OmsDependencyProvider.php`. - -1. Commands: -```php -$container->extend(OmsDependencyProvider::COMMAND_PLUGINS, function (CommandCollectionInterface $commandCollection) { - $commandCollection - ->add(new AuthorizePlugin(), 'Braintree/Authorize') - ->add(new RevertPlugin(), 'Braintree/Revert') - ->add(new CapturePlugin(), 'Braintree/Capture') - ->add(new RefundPlugin(), 'Braintree/Refund'); - - return $commandCollection; -}); -``` -2. Conditions: -```php -$container->extend(OmsDependencyProvider::CONDITION_PLUGINS, function (ConditionCollectionInterface $conditionCollection) { - $conditionCollection - ->add(new IsAuthorizationApprovedPlugin(), 'Braintree/IsAuthorizationApproved') - ->add(new IsReversalApprovedPlugin(), 'Braintree/IsReversalApproved') - ->add(new IsCaptureApprovedPlugin(), 'Braintree/IsCaptureApproved') - ->add(new IsRefundApprovedPlugin(), 'Braintree/IsRefundApproved'); - - return $conditionCollection; -}); -``` -All commands and conditions are located in `SprykerEco\Zed\Braintree\Communication\Plugin\Oms\` namespace. - -## Payment Configuration - -Default implementation for checkout payment plugins should be added to `Pyz/Zed/Checkout/CheckoutDependencyProvider.php` -```php -protected function getCheckoutPreConditions(Container $container) -{ - return [ - ... - new BraintreePreCheckPlugin(), - ]; -} - -protected function getCheckoutOrderSavers(Container $container) -{ - $plugins = [ - ... - new BraintreeSaveOrderPlugin(), - ]; - - return $plugins; -} - -protected function getCheckoutPostHooks(Container $container) -{ - return [ - ... - new BraintreePostSavePlugin(), - ]; -} -``` - -All payment plugins are located in the `SprykerEco\Zed\Braintree\Communication\Plugin\Checkout\` namespace. - -## Frontend Integration -src/Pyz/Yves/CheckoutPage/Theme/default/views/payment/payment.twig - - ```php - {% raw %}{%{% endraw %} extends template('page-layout-checkout', 'CheckoutPage') {% raw %}%}{% endraw %} - -{% raw %}{%{% endraw %} define data = { - backUrl: _view.previousStepUrl, - forms: { - payment: _view.paymentForm - }, - - title: 'checkout.step.payment.title' | trans -} {% raw %}%}{% endraw %} - -{% raw %}{%{% endraw %} block content {% raw %}%}{% endraw %} - {% raw %}{%{% endraw %} embed molecule('form') with { - class: 'box', - data: { - form: data.forms.payment, - options: { - attr: { - id: 'payment-form' - } - }, - submit: { - enable: true, - text: 'checkout.step.summary' | trans - }, - cancel: { - enable: true, - url: data.backUrl, - text: 'general.back.button' | trans - } - } - } only {% raw %}%}{% endraw %} - {% raw %}{%{% endraw %} block fieldset {% raw %}%}{% endraw %} - {% raw %}{%{% endraw %} for name, choices in data.form.paymentSelection.vars.choices {% raw %}%}{% endraw %} -
    {% raw %}{{{% endraw %} ('checkout.payment.provider.' ~ name) | trans {% raw %}}}{% endraw %}
    - -
      - {% raw %}{%{% endraw %} for key, choice in choices {% raw %}%}{% endraw %} -
    • - {% raw %}{%{% endraw %} embed molecule('form') with { - data: { - form: data.form[data.form.paymentSelection[key].vars.value], - enableStart: false, - enableEnd: false, - layout: { - 'card_expires_month': 'col col--sm-4', - 'card_expires_year': 'col col--sm-8' - } - }, - embed: { - toggler: data.form.paymentSelection[key] - } - } only {% raw %}%}{% endraw %} - {% raw %}{%{% endraw %} block fieldset {% raw %}%}{% endraw %} - {% raw %}{%{% endraw %} set templateName = data.form.vars.template_path | replace('/', '-') {% raw %}%}{% endraw %} - {% raw %}{%{% endraw %} set viewName = data.form.vars.template_path | split('/') {% raw %}%}{% endraw %} - - {% raw %}{{{% endraw %} form_row(embed.toggler, { - required: false, - component: molecule('toggler-radio'), - attributes: { - 'target-selector': '.js-payment-method-' ~ templateName, - 'class-to-toggle': 'is-hidden' - } - }) {% raw %}}}{% endraw %} - - - {% raw %}{%{% endraw %} endblock {% raw %}%}{% endraw %} - {% raw %}{%{% endraw %} endembed {% raw %}%}{% endraw %} -
    • - {% raw %}{%{% endraw %} endfor {% raw %}%}{% endraw %} -
    - {% raw %}{%{% endraw %} endfor {% raw %}%}{% endraw %} - {% raw %}{%{% endraw %} endblock {% raw %}%}{% endraw %} - {% raw %}{%{% endraw %} endembed {% raw %}%}{% endraw %} -{% raw %}{%{% endraw %} endblock {% raw %}%}{% endraw %} -``` diff --git a/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/computop/computop-api-calls.md b/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/computop/computop-api-calls.md deleted file mode 100644 index fdc2ce6c79c..00000000000 --- a/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/computop/computop-api-calls.md +++ /dev/null @@ -1,62 +0,0 @@ ---- -title: Computop API calls -description: This article provides details on the API structure of the Computop module in the Spryker Commerce OS. -last_updated: Apr 3, 2020 -template: concept-topic-template -originalLink: https://documentation.spryker.com/v5/docs/computop-api-details -originalArticleId: ee47c2c1-4140-4a6a-8c8c-1281a4b1f11c -redirect_from: - - /v5/docs/computop-api-details - - /v5/docs/en/computop-api-details -related: - - title: Computop - link: docs/scos/user/technology-partners/page.version/payment-partners/computop.html - - title: Integrating the Sofort payment method for Computop - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/computop/integrating-payment-methods-for-computop/integrating-the-sofort-payment-method-for-computop.html - - title: Integrating the PayPal payment method for Computop - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/computop/integrating-payment-methods-for-computop/integrating-the-paypal-payment-method-for-computop.html - - title: Integrating the Direct Debit payment method for Computop - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/computop/integrating-payment-methods-for-computop/integrating-the-direct-debit-payment-method-for-computop.html - - title: Integrating the iDeal payment method for Computop - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/computop/integrating-payment-methods-for-computop/integrating-the-ideal-payment-method-for-computop.html - - title: Integrating the Сredit Сard payment method for Computop - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/computop/integrating-payment-methods-for-computop/integrating-the-credit-card-payment-method-for-computop.html - - title: Integrating the Easy Credit payment method for Computop - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/computop/integrating-payment-methods-for-computop/integrating-the-easy-credit-payment-method-for-computop.html - - title: Integrating the Paydirekt payment method for Computop - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/computop/integrating-payment-methods-for-computop/integrating-the-paydirekt-payment-method-for-computop.html - - title: Integrating the CRIF payment method for Computop - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/computop/integrating-payment-methods-for-computop/integrating-the-crif-payment-method-for-computop.html ---- - -## Authorization Call: - -* Authorize money. -* There is no partial authorization. Please make one API call to make authorization for all items in the order. -* It is not possible to Authorize a higher amount than in the ORDER. - -## Inquire Call: - -Status inquiries within Paygate give detailed information about the amounts that are actually authorized, captured or credited. Especially before executing reversals via the interface reverse.aspx it is recommended to check the transaction status with inquire.aspx because Reverse.aspx re-verses not only authorizations but ALWAYS THE LAST TRANSACTION STEP. - -## Reverse Call: - -* Reverse.aspx does not only reverse authorizations, but also any LAST TRANSACTION STAGE! If the last transaction was a capture, Reverse.aspx initiates the reverse, e.g. a credit. Therefore, the utmost caution is urged. Use it at your own risk. We recommend checking the transaction status with Inquire.aspx before using Reverse.aspx. -* Use it just after "Inquire" call if it returns the previous action as "Authorization". - -## Capture Call: - -* Capture money. -* Shipment price is captured with the first capture request. -* Please contact the helpdesk, if you want to capture amounts < 100 (the smallest currency unit). -* It is not possible to capture a higher amount than in the ORDER or Auth. - -## Refund Call: - -* Refund money. -* The merchant has the chance to refund more money to the customer than captured. -* Shipment price will be refunded with the last possible refund request. If You do not need to refund shipment price: - - Create `Pyz\Zed\Computop\ComputopConfig`. - - Extend it from original `SprykerEco\Zed\Computop\ComputopConfig`. - - Update `isRefundShipmentPriceEnabled` method (set up "false"). - diff --git a/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/computop/computop-oms-plugins.md b/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/computop/computop-oms-plugins.md deleted file mode 100644 index 0b1c167dd09..00000000000 --- a/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/computop/computop-oms-plugins.md +++ /dev/null @@ -1,52 +0,0 @@ ---- -title: Computop - OMS plugins -description: This article contains information on the state machine commands and conditions for the Computop module in the Spryker Commerce OS. -last_updated: Apr 3, 2020 -template: concept-topic-template -originalLink: https://documentation.spryker.com/v5/docs/computop-oms-details -originalArticleId: c5b30a67-53b8-4869-bd81-ba04d6d0c691 -redirect_from: - - /v5/docs/computop-oms-details - - /v5/docs/en/computop-oms-details -related: - - title: Computop - link: docs/scos/user/technology-partners/page.version/payment-partners/computop.html - - title: Integrating the Sofort payment method for Computop - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/computop/integrating-payment-methods-for-computop/integrating-the-sofort-payment-method-for-computop.html - - title: Integrating the PayPal payment method for Computop - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/computop/integrating-payment-methods-for-computop/integrating-the-paypal-payment-method-for-computop.html - - title: Integrating the PayNow payment method for Computop - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/computop/integrating-payment-methods-for-computop/integrating-the-paynow-payment-method-for-computop.html - - title: Integrating the Easy Credit payment method for Computop - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/computop/integrating-payment-methods-for-computop/integrating-the-easy-credit-payment-method-for-computop.html - - title: Computop API calls - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/computop/computop-api-calls.html - - title: Integrating the iDeal payment method for Computop - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/computop/integrating-payment-methods-for-computop/integrating-the-ideal-payment-method-for-computop.html - - title: Integrating the Direct Debit payment method for Computop - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/computop/integrating-payment-methods-for-computop/integrating-the-direct-debit-payment-method-for-computop.html - - title: Integrating the Сredit Сard payment method for Computop - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/computop/integrating-payment-methods-for-computop/integrating-the-credit-card-payment-method-for-computop.html - - title: Integrating the CRIF payment method for Computop - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/computop/integrating-payment-methods-for-computop/integrating-the-crif-payment-method-for-computop.html ---- - -The following plugins are used for performing calls to Paygate during OMS operation. - -## Authorize Plugin: -Makes an Authorize call to Computop. - -## Cancel Plugin: -Follow these steps to cancel the item in the order in case all the items or the last possible one got canceled: - -1. Inquire a call to Computop. -2. Reverse a call to Computop in case Inquire returned "Authorization" was the last action. -3. Change the status of the current item in our DB in case the Inquire call returned that "Authorization" was not the last action. No API calls are needed. -4. If there is any item that is not canceled yet: - - Change the status of the current item in our DB. No API calls are needed. There is no API call to change the order in Computop. - -## Capture Plugin: -Makes a Capture call to Computop. - -## Refund Plugin: -Makes a Refund call to Computop. diff --git a/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/computop/installing-and-configuring-computop.md b/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/computop/installing-and-configuring-computop.md deleted file mode 100644 index 4f54f6201bc..00000000000 --- a/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/computop/installing-and-configuring-computop.md +++ /dev/null @@ -1,73 +0,0 @@ ---- -title: Installing and configuring Computop -last_updated: Nov 4, 2020 -template: howto-guide-template ---- - -The [SprykerEco.Computop](https://github.com/spryker-eco/computop) bundle provides integration of the Computop industry partner with Spryker Commerce OS. It requires the [SprykerEco.ComputopApi](https://github.com/spryker-eco/computop-api) bundle that provides the REST Client for making API calls to the Computop Payment Provider. - -The `SprykerEco.Computop` module includes the integrations: -* Checkout process - payment forms with all the necessary fields that are required to make payment requests, save order information and so on. -* OMS (Order Management System) - state machines, all necessary commands for making modification requests and conditions for changing order statuses accordingly. - - -The `SprykerEco.Computop` module provides the following payment methods: - -* [Credit Card](/docs/scos/dev/technology-partner-guides/{{page.version}}/payment-partners/computop/integrating-payment-methods-for-computop/integrating-the-credit-card-payment-method-for-computop.html) -* [Direct Debit](/docs/scos/dev/technology-partner-guides/{{page.version}}/payment-partners/computop/integrating-payment-methods-for-computop/integrating-the-direct-debit-payment-method-for-computop.html) -* [EasyCredit](/docs/scos/dev/technology-partner-guides/{{page.version}}/payment-partners/computop/integrating-payment-methods-for-computop/integrating-the-easy-credit-payment-method-for-computop.html) -* [iDeal](/docs/scos/dev/technology-partner-guides/{{page.version}}/payment-partners/computop/integrating-payment-methods-for-computop/integrating-the-ideal-payment-method-for-computop.html) -* [Paydirekt](/docs/scos/dev/technology-partner-guides/{{page.version}}/payment-partners/computop/integrating-payment-methods-for-computop/integrating-the-paydirekt-payment-method-for-computop.html) -* [PayNow](/docs/scos/dev/technology-partner-guides/{{page.version}}/payment-partners/computop/integrating-payment-methods-for-computop/integrating-the-paynow-payment-method-for-computop.html) -* [PayPal](/docs/scos/dev/technology-partner-guides/{{page.version}}/payment-partners/computop/integrating-payment-methods-for-computop/integrating-the-paypal-payment-method-for-computop.html) -* [SofortÜberweisung](/docs/scos/dev/technology-partner-guides/{{page.version}}/payment-partners/computop/integrating-payment-methods-for-computop/integrating-the-sofort-payment-method-for-computop.html) - -## Installing Computop - -To install the payment provider, run: -``` -composer require spryker-eco/computop -``` - -## Configuration -All the necessary configurations can be found in: -``` -vendor/spryker-eco/computop/config/config.dist.php -``` - -| Configuration Key | Type | Description | -| --- | --- | --- | -| `$config[ComputopApiConstants::MERCHANT_ID]` | string | Computop merchant identifier. | -| `$config[ComputopApiConstants::BLOWFISH_PASSWORD]` | string | Password for blowfish hashing. | -| `$config[ComputopApiConstants::HMAC_PASSWORD]` | string | Password for hmac hashing. | -| `$config[ComputopConstants::PAYDIREKT_SHOP_KEY]` | string | Shop key for Paydirect payment method. | -| `$config[ComputopConstants::IDEAL_ISSUER_ID]` | string | Issuer ID for Ideal payment method. | -| `$config[ComputopConstants::PAY_NOW_INIT_ACTION]` | string | Init API call endpoint for PayNow payment method. | -| `$config[ComputopConstants::CREDIT_CARD_INIT_ACTION]` |string | Init API call endpoint for Credit Card payment method. | -| `$config[ComputopConstants::PAYPAL_INIT_ACTION]` | string | Init API call endpoint for PayPal payment method. | -| `$config[ComputopConstants::DIRECT_DEBIT_INIT_ACTION]` | string | Init API call endpoint for Direct Debit payment method. | -| `$config[ComputopConstants::SOFORT_INIT_ACTION]` | string | Init API call endpoint for Sofort payment method. | -| `$config[ComputopConstants::PAYDIREKT_INIT_ACTION]` |string | Init API call endpoint for Paydirect payment method. | -| `$config[ComputopConstants::IDEAL_INIT_ACTION]` | string | Init API call endpoint for Ideal payment method. | -| `$config[ComputopConstants::EASY_CREDIT_INIT_ACTION]` | string | Init API call endpoint for Easy Credit payment method. | -| `$config[ComputopApiConstants::EASY_CREDIT_STATUS_ACTION]` | string | Status API call endpoint for Easy Credit payment method. | -| `$config[ComputopApiConstants::EASY_CREDIT_AUTHORIZE_ACTION]` | string | Authorize API call endpoint for Easy Credit payment method. | -| `$config[ComputopApiConstants::AUTHORIZE_ACTION]` | string | Authorize API call endpoint. | -| `$config[ComputopApiConstants::CAPTURE_ACTION]` | string | Capture API call endpoint. | -| `$config[ComputopApiConstants::REVERSE_ACTION]` | string | Reserve API call endpoint. | -| `$config[ComputopApiConstants::INQUIRE_ACTION]` | string | Inquire API call endpoint. | -| `$config[ComputopApiConstants::REFUND_ACTION]` | string | Refund API call endpoint. | -| `$config[ComputopApiConstants::RESPONSE_MAC_REQUIRED]` | array | MAC is required for methods (to check MAC on response). | -| `$config[ComputopConstants::CREDIT_CARD_TEMPLATE_ENABLED]` | bool | Is custom template enabled for Credit Card payment method. | -| `$config[ComputopConstants::CREDIT_CARD_TX_TYPE]` | string | TX TYPE for Credit Card payment method (empty string). | -| `$config[ComputopConstants::PAY_NOW_TX_TYPE]` | string | TX TYPE for PayNow payment method (empty string). | -| `$config[ComputopConstants::PAY_PAL_TX_TYPE]` | string | TX TYPE for PayPal payment method (Auth). | -| `$config[ComputopConstants::PAYMENT_METHODS_WITHOUT_ORDER_CALL]` | array | Array of payment methods without order call. | -| `$config[ComputopApiConstants::PAYMENT_METHODS_CAPTURE_TYPES]` | array | Array with mapping payment methods and their capture types (MANUAL or AUTO). | -| `$config[ComputopConstants::CRIF_ENABLED]` | bool | Is CRIF risk check enabled. | -| `$config[ComputopApiConstants::CRIF_ACTION]` | string | CRIF API call endpoint. | -| `$config[ComputopApiConstants::CRIF_PRODUCT_NAME]` | string | `QuickCheckConsumer` or
    `CreditCheckConsumer` or
    `QuickCheckBusiness` or
    `CreditCheckBusiness` or
    `IdentCheckConsume`. | -| `$config[ComputopApiConstants::CRIF_LEGAL_FORM]` | string | PERSON or COMPANY or UNKNOWN. | -| `$config[ComputopConstants::CRIF_GREEN_AVAILABLE_PAYMENT_METHODS]` | array | List of payment methods available with green response code. | -| `$config[ComputopConstants::CRIF_YELLOW_AVAILABLE_PAYMENT_METHODS] ` | array | List of payment methods available with yellow response code. | -| `$config[ComputopConstants::CRIF_RED_AVAILABLE_PAYMENT_METHODS]` | array | List of payment methods available with red response code. | diff --git a/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/computop/integrating-payment-methods-for-computop/computop-sofort.md b/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/computop/integrating-payment-methods-for-computop/computop-sofort.md deleted file mode 100644 index fa7d5ad8e1b..00000000000 --- a/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/computop/integrating-payment-methods-for-computop/computop-sofort.md +++ /dev/null @@ -1,75 +0,0 @@ ---- -title: Integrating the Sofort payment method for Computop -description: Integrate Sofort payment through Computop into the Spryker-based shop. -last_updated: Apr 3, 2020 -template: concept-topic-template -originalLink: https://documentation.spryker.com/v5/docs/computop-sofort -originalArticleId: f61fd0ab-f0b6-4c13-bfbf-a02bcd79d535 -redirect_from: - - /v5/docs/computop-sofort - - /v5/docs/en/computop-sofort -related: - - title: Computop - link: docs/scos/user/technology-partners/page.version/payment-partners/computop.html - - title: Integrating the PayNow payment method for Computop - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/computop/integrating-payment-methods-for-computop/integrating-the-paynow-payment-method-for-computop.html - - title: Integrating the Easy Credit payment method for Computop - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/computop/integrating-payment-methods-for-computop/integrating-the-easy-credit-payment-method-for-computop.html - - title: Computop API calls - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/computop/computop-api-calls.html - - title: Integrating the iDeal payment method for Computop - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/computop/integrating-payment-methods-for-computop/integrating-the-ideal-payment-method-for-computop.html - - title: Integrating the Paydirekt payment method for Computop - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/computop/integrating-payment-methods-for-computop/integrating-the-paydirekt-payment-method-for-computop.html - - title: Computop - OMS plugins - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/computop/computop-oms-plugins.html - - title: Integrating the Direct Debit payment method for Computop - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/computop/integrating-payment-methods-for-computop/integrating-the-direct-debit-payment-method-for-computop.html - - title: Integrating the Сredit Сard payment method for Computop - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/computop/integrating-payment-methods-for-computop/integrating-the-credit-card-payment-method-for-computop.html - - title: Integrating the CRIF payment method for Computop - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/computop/integrating-payment-methods-for-computop/integrating-the-crif-payment-method-for-computop.html ---- - -Example State Machine: -![Click Me](https://spryker.s3.eu-central-1.amazonaws.com/docs/Technology+Partners/Payment+Partners/Computop/computop-sofort-flow-example.png) - -## Front-End Integration -To adjust the frontend appearance, provide the following templates in your theme directory: -`src//Yves/Computop/Theme//sofort.twig` - -## State Machine Integration -The Computop provides a demo state machine for Sofort payment method which implements Capture flow. - -To enable the demo state machine, extend the configuration with the following values: - -```php - 'ComputopSofort', -]; - -$config[OmsConstants::ACTIVE_PROCESSES] = [ - ... - 'ComputopSofort', -]; -``` - -## Sofort Payment Flow - -1. There is a radio button on "Payment" step. After submitting the order the customer will be redirected to the Computop (Paygate form implementation). The GET consists of 3 parameters: - - data (encrypted parameters, e.g. currency, amount, description); - - length (length of `data` parameter); - - merchant id (assigned by Computop); -Customer sets up all data just after the redirect to Computop. -Init action: "Capture". There are no Order and Authorization calls provided for this payment method. -2. By default, on success the customer will be redirected to "Success" step. The response contains `payId`. On error, the customer will be redirected to "Payment" step with the error message by default. Response data is stored in the DB. -3. Capture/Refund and Cancel actions are implemented in the admin panel (on manage order). On requests, Spryker will use `payId` parameter stored in the DB to identify a payment. - -## Set Up Details -Important for a live MID is: - -1. Merchant must have a bank account at the Sofort Bank. -2. The contract with Sofort must be extended specifically for credits. -3. The credit function must be configured in the Sofort project, as well as in the Computop (on the MID). diff --git a/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/computop/integrating-payment-methods-for-computop/integrating-the-credit-card-payment-method-for-computop.md b/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/computop/integrating-payment-methods-for-computop/integrating-the-credit-card-payment-method-for-computop.md deleted file mode 100644 index 722065a8c97..00000000000 --- a/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/computop/integrating-payment-methods-for-computop/integrating-the-credit-card-payment-method-for-computop.md +++ /dev/null @@ -1,83 +0,0 @@ ---- -title: Integrating the Сredit Сard payment method for Computop -description: Integrate Credit Card payment through Computop into the Spryker-based shop. -last_updated: Apr 3, 2020 -template: concept-topic-template -originalLink: https://documentation.spryker.com/v5/docs/computop-credit-card -originalArticleId: 97b957ad-74f9-46d5-bc1c-62a2d6ece433 -redirect_from: - - /v5/docs/computop-credit-card - - /v5/docs/en/computop-credit-card -related: - - title: Computop - link: docs/scos/user/technology-partners/page.version/payment-partners/computop.html - - title: Integrating the Sofort payment method for Computop - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/computop/integrating-payment-methods-for-computop/integrating-the-sofort-payment-method-for-computop.html - - title: Integrating the PayPal payment method for Computop - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/computop/integrating-payment-methods-for-computop/integrating-the-paypal-payment-method-for-computop.html - - title: Integrating the PayNow payment method for Computop - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/computop/integrating-payment-methods-for-computop/integrating-the-paynow-payment-method-for-computop.html - - title: Computop API calls - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/computop/computop-api-calls.html - - title: Integrating the Direct Debit payment method for Computop - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/computop/integrating-payment-methods-for-computop/integrating-the-direct-debit-payment-method-for-computop.html - - title: Integrating the iDeal payment method for Computop - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/computop/integrating-payment-methods-for-computop/integrating-the-ideal-payment-method-for-computop.html - - title: Integrating the Easy Credit payment method for Computop - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/computop/integrating-payment-methods-for-computop/integrating-the-easy-credit-payment-method-for-computop.html - - title: Integrating the Paydirekt payment method for Computop - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/computop/integrating-payment-methods-for-computop/integrating-the-paydirekt-payment-method-for-computop.html - - title: Integrating the CRIF payment method for Computop - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/computop/integrating-payment-methods-for-computop/integrating-the-crif-payment-method-for-computop.html - - title: Computop - OMS plugins - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/computop/computop-oms-plugins.html ---- - -Example State Machine: -![Click Me](https://spryker.s3.eu-central-1.amazonaws.com/docs/Technology+Partners/Payment+Partners/Computop/computop-credit-card-flow-example.png) - -## Front-end Integration - -To adjust the frontend appearance, provide the following templates in your theme directory: -`src//Yves/Computop/Theme//credit_card.twig` - -## State Machine Integration - -The Computop provides a demo state machine for the Credit Card payment method which implements Authorization/Capture flow. - -To enable the demo state machine, extend the configuration with the following values: - -```php - 'ComputopCreditCard', -]; - -$config[OmsConstants::ACTIVE_PROCESSES] = [ - ... - 'ComputopCreditCard', -]; -``` - -## Credit Card Payment Flow - -1. There is a radio button on "Payment" step. After submitting the order the customer will be redirected to the to Computop (Pay gate form implementation). The GET consists of 3 parameters: - - data (encrypted parameters, e.g. currency, amount, description); - - length (length of 'data' parameter); - - merchant id (assigned by Computop).The customer sets up all data just after redirect to Computop. - Init action: "Order". -2. By default, on success the customer will be redirected to "Success" step. The response contains `payId` On error, the customer will be redirected to "Payment" step with the error message by defaul. Response data is stored in the DB. -3. Authorization is added right after success init action by default. Capture/Refund and Cancel actions are implemented in the admin panel (on manage order). On requests, Spryker will use `payId` parameter stored in the DB to identify a payment. - -## Set Up Details: - -For partial capturing: - -1. Case: Merchant uses neither ETM nor PCN (`PseudoCardNumber`). After authorization has been done, you are able to do one capture. This can be a partial or a complete capture of the authorized amount. After the capture is performed you cannot do another capture. If it is a partial capture, the rest of the initial authorized amount is released. -2. Case: Merchant uses ETM (Extended Transactions Management). You can do partial captures as long as the as the initial amount of the authorization has not been reached or you send `FinishAuth=Y` with the last capture you like to do. (see page 83 of Computop documentation) -3. Case: Merchant uses PCN. With the authorization request you get back the PCN and other credit card parameter (Expiry Date, Brand). PCN and the other parameters can be stored. - -You capture the full amount of the authorization via `capture.aspx` => Nothing else has to be done. - -You capture a partial amount of the authorization => The rest of the amount forfeited. To do the next partial capture, you have to use the PCN with the `direct.aspx` (page 53 of Computop documentation) and the additional parameter VBV=NO in the request to get a new authorization. After that you proceed as described above. diff --git a/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/computop/integrating-payment-methods-for-computop/integrating-the-crif-method-for-computop.md b/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/computop/integrating-payment-methods-for-computop/integrating-the-crif-method-for-computop.md deleted file mode 100644 index c256600dbb0..00000000000 --- a/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/computop/integrating-payment-methods-for-computop/integrating-the-crif-method-for-computop.md +++ /dev/null @@ -1,212 +0,0 @@ ---- -title: Integrating the CRIF payment method for Computop -description: In this article, you can find information on the CRIF process for Spryker Commerce OS. -last_updated: Apr 3, 2020 -template: concept-topic-template -originalLink: https://documentation.spryker.com/v5/docs/computop-crif -originalArticleId: ffe9a53f-0a3d-44b1-8529-2d5c00f7a50a -redirect_from: - - /v5/docs/computop-crif - - /v5/docs/en/computop-crif - - /docs/scos/dev/technology-partner-guides/202005.0/payment-partners/computop/integrating-payment-methods-for-computop/integrating-the-crif-payment-method-for-computop.html -related: - - title: Computop - link: docs/scos/user/technology-partners/page.version/payment-partners/computop.html - - title: Integrating the Sofort payment method for Computop - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/computop/integrating-payment-methods-for-computop/integrating-the-sofort-payment-method-for-computop.html - - title: Integrating the PayPal payment method for Computop - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/computop/integrating-payment-methods-for-computop/integrating-the-paypal-payment-method-for-computop.html - - title: Integrating the PayNow payment method for Computop - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/computop/integrating-payment-methods-for-computop/integrating-the-paynow-payment-method-for-computop.html - - title: Computop API calls - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/computop/computop-api-calls.html - - title: Integrating the Direct Debit payment method for Computop - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/computop/integrating-payment-methods-for-computop/integrating-the-direct-debit-payment-method-for-computop.html - - title: Integrating the iDeal payment method for Computop - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/computop/integrating-payment-methods-for-computop/integrating-the-ideal-payment-method-for-computop.html - - title: Integrating the Сredit Сard payment method for Computop - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/computop/integrating-payment-methods-for-computop/integrating-the-credit-card-payment-method-for-computop.html - - title: Integrating the Easy Credit payment method for Computop - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/computop/integrating-payment-methods-for-computop/integrating-the-easy-credit-payment-method-for-computop.html - - title: Integrating the Paydirekt payment method for Computop - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/computop/integrating-payment-methods-for-computop/integrating-the-paydirekt-payment-method-for-computop.html ---- - -## General Information About CRIF - -Popular with customers, risky for the merchant: Payment methods such as direct debit or purchase on account involve a high level of default risk. Computop Paycontrol, an automated credit rating with all standard credit agencies, combines flexibility and payment security for online business. With Paycontrol you can, amongst other things, automatically obtain information from CRIF without having to connect your shop system to individual information interfaces. - -CRIF (formerly Deltavista) provides information on about 80 million individuals, 6 million companies, and 10 million payment, register, and address records from Germany, Austria and Switzerland. -![Click Me](https://spryker.s3.eu-central-1.amazonaws.com/docs/Technology+Partners/Payment+Partners/Computop/CRIF-process-flow.png) - -## Calling the Interface - -To carry out a CRIF order check via a Server-to-Server connection, go to [that URL](https://www.computop-paygate.com/deltavista.aspx). - -For security reasons, Paygate rejects all payment requests with formatting errors. Therefore please use the correct data type for each parameter. - -## Integration with Checkout. -Integrated into Computop module CRIF provides risk check functionality based on customer, cart, address and other data. CRIF analyzes information and provides result as color response code (GREEN, YELLOW, RED) which corresponds to potential risks. Based on this result payment methods should be filtered. Only allowed payment methods should be displayed on checkout payment page. Module provides possibility to configure list of allowed payment methods for each response color. - -1. First of all you need to add CRIF specific configurations into `config_default.php` file: - -**config/Shared/config_default.php** - -```php -$config[ComputopConstants::CRIF_ENABLED] = false; // Enable or disable CRIF functionality. -$config[ComputopApiConstants::CRIF_ACTION] = 'https://www.computop-paygate.com/deltavista.aspx'; //CRIF API call enpoint. -$config[ComputopApiConstants::CRIF_PRODUCT_NAME] = ''; //This is checking method, could be: QuickCheckConsumer, CreditCheckConsumer, QuickCheckBusiness, CreditCheckBusiness, IdentCheckConsumer -$config[ComputopApiConstants::CRIF_LEGAL_FORM] = ''; // Legal form of the person/company sought, could be: PERSON, COMPANY, UNKNOWN - -$config[ComputopConstants::CRIF_GREEN_AVAILABLE_PAYMENT_METHODS] = []; //List of allowed payment methods if CRIF returns GREED code, for example: computopCreditCard, computopDirectDebit and so on. -$config[ComputopConstants::CRIF_YELLOW_AVAILABLE_PAYMENT_METHODS] = []; //List of allowed payment methods if CRIF returns YELLOW code, for example: computopPaydirekt, computopEasyCredit and so on. -$config[ComputopConstants::CRIF_RED_AVAILABLE_PAYMENT_METHODS] = []; //List of allowed payment methods if CRIF returns RED code, for example: computopSofort, computopPayPal and so on. -``` - -2. Extend `ShipmentStep` to add CRIF risk check call before checkout payment step: - -\Pyz\Yves\CheckoutPage\Process\Steps\ShipmentStep - -```php -computopClient = $computopClient; - } - - /** - * @param \Symfony\Component\HttpFoundation\Request $request - * @param \Generated\Shared\Transfer\QuoteTransfer $quoteTransfer - * - * @return \Generated\Shared\Transfer\QuoteTransfer - */ - public function execute(Request $request, AbstractTransfer $quoteTransfer) - { - $quoteTransfer = parent::execute($request, $quoteTransfer); - - return $this->computopClient->performCrifApiCall($quoteTransfer); - } -} -``` - -3. Extend `StepFactory` to update shipment checkout step: - -\Pyz\Yves\CheckoutPage\Process\StepFactory - -```php -getCalculationClient(), - $this->getShipmentPlugins(), - CheckoutPageControllerProvider::CHECKOUT_SHIPMENT, - HomePageControllerProvider::ROUTE_HOME, - $this->getComputopClient() - ); - } - - /** - * @return \SprykerEco\Client\Computop\ComputopClientInterface - */ - public function getComputopClient(): ComputopClientInterface - { - return $this->getProvidedDependency(CheckoutPageDependencyProvider::CLIENT_COMPUTOP); - } -} -``` - -4. Extend `CheckoutPageFactory` for project level `StepFactory` usage: - -\Pyz\Yves\CheckoutPage\CheckoutPageFactory - -```php -/Yves/Computop/Theme//direct_debit.twig` - -## State Machine Integration -The Computop provides a demo state machine for Direct Debit payment method which implements Authorization/Capture flow. - -To enable the demo state machine, extend the configuration with the following values: -```php - 'ComputopDirectDebit', -]; - -$config[OmsConstants::ACTIVE_PROCESSES] = [ - ... - 'ComputopDirectDebit', -]; -``` - -## Direct Debit Payment Flow: - -1. There is a radio button on "Payment" step. After submitting the order the customer will be redirected to the Computop (Paygate form implementation). The GET consists of 3 parameters: - - data (encrypted parameters, e.g. currency, amount, description); - - length (length of 'data' parameter); - - merchant id (assigned by Computop); -Customer sets up all data just after the redirect to Computop. Init action: "Authorization". There is no Order call provided for this payment method. But Authorization call is working as Order call - without holding money. There is no call for holding money for this payment method. -2. By default, on success the customer will be redirected to "Success" step. The response contains `payId`. On error, the customer will be redirected to "Payment" step with the error message by default. Response data is stored in the DB. -3. Capture/Refund and Cancel actions are implemented in the admin panel (on manage order). On requests, Spryker will use `payId` parameter stored in the DB to identify a payment. - -## Set Up Details: -For partial refunds: -1. Partial refunds are possible for direct debit transactions. -2. But please note, that you can not test it in test mode. -3. If you want to test it, you have to say it afterwards to Computop help desk, so that they can prepare the transaction. - diff --git a/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/computop/integrating-payment-methods-for-computop/integrating-the-easy-credit-payment-method-for-computop.md b/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/computop/integrating-payment-methods-for-computop/integrating-the-easy-credit-payment-method-for-computop.md deleted file mode 100644 index 86c9a1c658d..00000000000 --- a/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/computop/integrating-payment-methods-for-computop/integrating-the-easy-credit-payment-method-for-computop.md +++ /dev/null @@ -1,72 +0,0 @@ ---- -title: Integrating the Easy Credit payment method for Computop -description: Integrate Easy Credit payment through Computop into the Spryker-based shop. -last_updated: Apr 3, 2020 -template: concept-topic-template -originalLink: https://documentation.spryker.com/v5/docs/computop-easy-credit -originalArticleId: 4e64d474-8078-469e-ba2e-65f623d9287d -redirect_from: - - /v5/docs/computop-easy-credit - - /v5/docs/en/computop-easy-credit -related: - - title: Computop - link: docs/scos/user/technology-partners/page.version/payment-partners/computop.html - - title: Integrating the Sofort payment method for Computop - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/computop/integrating-payment-methods-for-computop/integrating-the-sofort-payment-method-for-computop.html - - title: Integrating the PayPal payment method for Computop - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/computop/integrating-payment-methods-for-computop/integrating-the-paypal-payment-method-for-computop.html - - title: Integrating the PayNow payment method for Computop - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/computop/integrating-payment-methods-for-computop/integrating-the-paynow-payment-method-for-computop.html - - title: Computop API calls - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/computop/computop-api-calls.html - - title: Integrating the iDeal payment method for Computop - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/computop/integrating-payment-methods-for-computop/integrating-the-ideal-payment-method-for-computop.html - - title: Integrating the Direct Debit payment method for Computop - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/computop/integrating-payment-methods-for-computop/integrating-the-direct-debit-payment-method-for-computop.html - - title: Integrating the Сredit Сard payment method for Computop - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/computop/integrating-payment-methods-for-computop/integrating-the-credit-card-payment-method-for-computop.html - - title: Integrating the CRIF payment method for Computop - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/computop/integrating-payment-methods-for-computop/integrating-the-crif-payment-method-for-computop.html - - title: Integrating the Paydirekt payment method for Computop - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/computop/integrating-payment-methods-for-computop/integrating-the-paydirekt-payment-method-for-computop.html ---- - -Example State Machine -![Click Me](https://spryker.s3.eu-central-1.amazonaws.com/docs/Technology+Partners/Payment+Partners/Computop/computop-easy-credit-flow-example.png) - -## Front-end Integration -To adjust the frontend appearance, provide the following templates in your theme directory: -`src//Yves/Computop/Theme//easy_credit.twig` - -## State Machine Integration -The Computop provides a demo state machine for Easy Credit payment method which implements Authorization/Capture flow. - -To enable the demo state machine, extend the configuration with the following values: - -```php - 'ComputopEasyCredit', -]; - -$config[OmsConstants::ACTIVE_PROCESSES] = [ - ... - 'ComputopEasyCredit', -]; -``` - -## Easy Credit Payment Flow: - -1. - There is a radio button on "Payment" step. - After submitting the order the customer will be redirected to the Computop (Paygate form implementation). - The GET consists of 3 parameters: - - data (encrypted parameters, e.g. currency, amount, description); - - length (length of 'data' parameter); - - merchant id (assigned by Computop); - Customer sets up all data just after the redirect to Computop. - Init action: "Order". -2. By default, on success the customer will be redirected to "Success" step. The response contains `payId`. On error, the customer will be redirected to "Payment" step with the error message by default. Response data is stored in the DB. -3. Status call is added right after the success init action. On requests, Spryker will use <`payId` parameter stored in the DB to identify a payment. Response data is stored in the DB. -4. Authorization is added by default right after place order. Capture/Refund and Cancel actions are implemented in the admin panel (on manage order). On requests, Spryker will use `payId` parameter stored in the DB to identify a payment. diff --git a/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/computop/integrating-payment-methods-for-computop/integrating-the-ideal-payment-method-for-computop.md b/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/computop/integrating-payment-methods-for-computop/integrating-the-ideal-payment-method-for-computop.md deleted file mode 100644 index 5e5f7954d3a..00000000000 --- a/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/computop/integrating-payment-methods-for-computop/integrating-the-ideal-payment-method-for-computop.md +++ /dev/null @@ -1,65 +0,0 @@ ---- -title: Integrating the iDeal payment method for Computop -description: Integrate iDeal payment through Computop into the Spryker-based shop. -last_updated: Apr 3, 2020 -template: concept-topic-template -originalLink: https://documentation.spryker.com/v5/docs/computop-ideal -originalArticleId: 66b99556-dcd9-4493-aa16-6b5ac9f6431e -redirect_from: - - /v5/docs/computop-ideal - - /v5/docs/en/computop-ideal -related: - - title: Integrating the Sofort payment method for Computop - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/computop/integrating-payment-methods-for-computop/integrating-the-sofort-payment-method-for-computop.html - - title: Integrating the PayPal payment method for Computop - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/computop/integrating-payment-methods-for-computop/integrating-the-paypal-payment-method-for-computop.html - - title: Integrating the PayNow payment method for Computop - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/computop/integrating-payment-methods-for-computop/integrating-the-paynow-payment-method-for-computop.html - - title: Integrating the Easy Credit payment method for Computop - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/computop/integrating-payment-methods-for-computop/integrating-the-easy-credit-payment-method-for-computop.html - - title: Integrating the Direct Debit payment method for Computop - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/computop/integrating-payment-methods-for-computop/integrating-the-direct-debit-payment-method-for-computop.html - - title: Integrating the Сredit Сard payment method for Computop - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/computop/integrating-payment-methods-for-computop/integrating-the-credit-card-payment-method-for-computop.html - - title: Integrating the CRIF payment method for Computop - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/computop/integrating-payment-methods-for-computop/integrating-the-crif-payment-method-for-computop.html - - title: Integrating the Paydirekt payment method for Computop - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/computop/integrating-payment-methods-for-computop/integrating-the-paydirekt-payment-method-for-computop.html ---- - -Example State Machine: -![Click Me](https://spryker.s3.eu-central-1.amazonaws.com/docs/Technology+Partners/Payment+Partners/Computop/computop-ideal-flow-example.png) - -## Front-end Integration - -To adjust the frontend appearance, provide the following templates in your theme directory: -`src//Yves/Computop/Theme//ideal.twig` - -## State Machine Integration - -The Computop provides a demo state machine for iDeal payment method which implements Capture flow. - -To enable the demo state machine, extend the configuration with the following values: -```php - 'ComputopIdeal', -]; - -$config[OmsConstants::ACTIVE_PROCESSES] = [ - ... - 'ComputopIdeal', -]; -``` - -## iDeal Payment Flow: - -1. There is a radio button on "Payment" step. After submitting the order the customer will be redirected to the Computop (Paygate form implementation). The GET consists of 3 parameters: - - data (encrypted parameters, f.e. currency, amount, description); - - length (length of `data` parameter); - - merchant id (assigned by Computop); -Customer sets up all data just after the redirect to Computop. -Init action: "Capture". There are no Order and Authorization calls provided for this payment method. -2. By default, on success the customer will be redirected to "Success" step. The response contains `payId`. On error, the customer will be redirected to "Payment" step with the error message by default. Response data is stored in the DB. -3. Refund action is implemented in the admin panel (on manage order). On requests, Spryker will use `payId` parameter stored in the DB to identify a payment. diff --git a/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/computop/integrating-payment-methods-for-computop/integrating-the-paydirekt-payment-method-for-computop.md b/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/computop/integrating-payment-methods-for-computop/integrating-the-paydirekt-payment-method-for-computop.md deleted file mode 100644 index 152748e7bba..00000000000 --- a/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/computop/integrating-payment-methods-for-computop/integrating-the-paydirekt-payment-method-for-computop.md +++ /dev/null @@ -1,73 +0,0 @@ ---- -title: Integrating the Paydirekt payment method for Computop -description: Integrate Paydirekt payment through Computop into the Spryker-based shop. -last_updated: Apr 3, 2020 -template: concept-topic-template -originalLink: https://documentation.spryker.com/v5/docs/computop-paydirekt -originalArticleId: fbc377c7-544a-45a7-a7ad-e9112f317a43 -redirect_from: - - /v5/docs/computop-paydirekt - - /v5/docs/en/computop-paydirekt -related: - - title: Computop - link: docs/scos/user/technology-partners/page.version/payment-partners/computop.html - - title: Integrating the Sofort payment method for Computop - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/computop/integrating-payment-methods-for-computop/integrating-the-sofort-payment-method-for-computop.html - - title: Integrating the PayPal payment method for Computop - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/computop/integrating-payment-methods-for-computop/integrating-the-paypal-payment-method-for-computop.html - - title: Integrating the PayNow payment method for Computop - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/computop/integrating-payment-methods-for-computop/integrating-the-paynow-payment-method-for-computop.html - - title: Integrating the Easy Credit payment method for Computop - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/computop/integrating-payment-methods-for-computop/integrating-the-easy-credit-payment-method-for-computop.html - - title: Computop API calls - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/computop/computop-api-calls.html - - title: Integrating the iDeal payment method for Computop - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/computop/integrating-payment-methods-for-computop/integrating-the-ideal-payment-method-for-computop.html - - title: Computop - OMS plugins - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/computop/computop-oms-plugins.html - - title: Integrating the Direct Debit payment method for Computop - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/computop/integrating-payment-methods-for-computop/integrating-the-direct-debit-payment-method-for-computop.html - - title: Integrating the Сredit Сard payment method for Computop - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/computop/integrating-payment-methods-for-computop/integrating-the-credit-card-payment-method-for-computop.html ---- - -Example State Machine: -![Click Me](https://spryker.s3.eu-central-1.amazonaws.com/docs/Technology+Partners/Payment+Partners/Computop/computop-paydirekt-flow-example.png) - -## Front-end Integration -To adjust the frontend appearance, provide the following templates in your theme directory: -`src//Yves/Computop/Theme//paydirekt.twig` - -## State Machine Integration -The Computop provides a demo state machine for Paydirekt payment method which implements Authorization/Capture flow. - -To enable the demo state machine, extend the configuration with the following values: - -```php - 'ComputopPaydirekt', -]; - -$config[OmsConstants::ACTIVE_PROCESSES] = [ - ... - 'ComputopPaydirekt', -]; -``` - -## Paydirekt Payment Flow - -1. There is a radio button on "Payment" step. - After submitting the order the customer will be redirected to the Computop (Paygate form implementation). The GET consists of 3 parameters: - - data (encrypted parameters, e.g. currency, amount, description); - - length (length of 'data' parameter); - - merchant id (assigned by Computop); -Customer sets up all data just after the redirect to Computop. -Init action: "Authorization". There is no Order call provided for this payment method. -2. By default, on success the customer will be redirected to "Success" step. The response contains `payId`. On error, the customer will be redirected to "Payment" step with the error message by default. Response data is stored in the DB. -3. Capture/Refund and Cancel actions are implemented in the admin panel (on manage order). On requests, Spryker will use `payId` parameter stored in the DB to identify a payment. - -## Set Up Details - - Credits are possible up to 200% of the captured amount if such setup is enabled for the merchant and that payment method within Paygate by Computop helpdesk. diff --git a/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/computop/integrating-payment-methods-for-computop/integrating-the-paynow-payment-method-for-computop.md b/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/computop/integrating-payment-methods-for-computop/integrating-the-paynow-payment-method-for-computop.md deleted file mode 100644 index 24b34d66afd..00000000000 --- a/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/computop/integrating-payment-methods-for-computop/integrating-the-paynow-payment-method-for-computop.md +++ /dev/null @@ -1,364 +0,0 @@ ---- -title: Integrating the PayNow payment method for Computop -description: Integrate PayNow payment through Computop into the Spryker-based shop. -last_updated: Apr 3, 2020 -template: concept-topic-template -originalLink: https://documentation.spryker.com/v5/docs/computop-paynow -originalArticleId: 1b14e718-0267-4e49-8b41-c4c147191f03 -redirect_from: - - /v5/docs/computop-paynow - - /v5/docs/en/computop-paynow -related: - - title: Computop - link: docs/scos/user/technology-partners/page.version/payment-partners/computop.html - - title: Integrating the Sofort payment method for Computop - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/computop/integrating-payment-methods-for-computop/integrating-the-sofort-payment-method-for-computop.html - - title: Integrating the PayPal payment method for Computop - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/computop/integrating-payment-methods-for-computop/integrating-the-paypal-payment-method-for-computop.html - - title: Integrating the Easy Credit payment method for Computop - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/computop/integrating-payment-methods-for-computop/integrating-the-easy-credit-payment-method-for-computop.html - - title: Computop API calls - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/computop/computop-api-calls.html - - title: Integrating the iDeal payment method for Computop - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/computop/integrating-payment-methods-for-computop/integrating-the-ideal-payment-method-for-computop.html - - title: Integrating the Paydirekt payment method for Computop - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/computop/integrating-payment-methods-for-computop/integrating-the-paydirekt-payment-method-for-computop.html - - title: Computop - OMS plugins - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/computop/computop-oms-plugins.html - - title: Integrating the Direct Debit payment method for Computop - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/computop/integrating-payment-methods-for-computop/integrating-the-direct-debit-payment-method-for-computop.html - - title: Integrating the Сredit Сard payment method for Computop - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/computop/integrating-payment-methods-for-computop/integrating-the-credit-card-payment-method-for-computop.html ---- - - Example State Machine -![Click Me](https://spryker.s3.eu-central-1.amazonaws.com/docs/Technology+Partners/Payment+Partners/Computop/computop_paynow.png) - -## Front-end Integration - -To adjust the frontend appearance, provide the following templates in your theme directory: `src//Yves/Computop/Theme//paynow.twig` - -## State Machine Integration - -The Computop provides a demo state machine for the PayNow payment method which implements `Authorization/Capture` flow. - -To enable the demo state machine, extend the configuration with the following values: -```php - 'ComputopPayNow01', -]; - -$config[OmsConstants::ACTIVE_PROCESSES] = [ - ... - 'ComputopPayNow01', - ]; - ``` - - ### Checkout Integration - -Add the following lines to `Yves\Checkout\CheckoutDependencyProvider.php` -```php -$container[static::PAYMENT_METHOD_HANDLER] = function () { - $paymentMethodHandler = new StepHandlerPluginCollection(); - ..... - $paymentMethodHandler->add(new ComputopPaymentHandlerPlugin(), PaymentTransfer::COMPUTOP_PAY_NOW); - - return $paymentMethodHandler; -}; - -$container[static::PAYMENT_SUB_FORMS] = function () { - $paymentSubFormPlugin = new SubFormPluginCollection(); - ..... - $paymentSubFormPlugin->add(new PayNowSubFormPlugin()); - - return $paymentSubFormPlugin; -}; - -protected function provideClients(Container $container) -{ - $container = parent::provideClients($container); - - ..... - - $container[static::CLIENT_COMPUTOP] = function (Container $container) { - return $container->getLocator()->computop()->client(); - }; - - return $container; -} -``` - -Computop PayNow payment method also provides a new Checkout Step for filling the Credit Card data and sending it to the Computop paygate. You have to create `Yves/Checkout/Process/Steps/PayNowStep.php` class with the following content: -
    - Click here to expand the code sample - - ```php - isMethodPayNow($quoteTransfer)) { - return true; - } - - return false; - } - - /** - * @param \Spryker\Shared\Kernel\Transfer\AbstractTransfer|\Generated\Shared\Transfer\QuoteTransfer $quoteTransfer - * - * @return bool - */ - public function postCondition(AbstractTransfer $quoteTransfer) - { - return true; - } - - /** - * @param \Spryker\Shared\Kernel\Transfer\AbstractTransfer|\Generated\Shared\Transfer\QuoteTransfer $quoteTransfer - * - * @return array - */ - public function getTemplateVariables(AbstractTransfer $quoteTransfer) - { - return [ - 'data' => $quoteTransfer->getPayment()->getComputopPayNow()->getData(), - 'len' => $quoteTransfer->getPayment()->getComputopPayNow()->getLen(), - 'merchant' => $quoteTransfer->getPayment()->getComputopPayNow()->getMerchantId(), - 'action' => $quoteTransfer->getPayment()->getComputopPayNow()->getUrl(), - 'brandOptions' => $this->getBrandOptions(), - ]; - } - - /** - * @param \Spryker\Shared\Kernel\Transfer\AbstractTransfer|\Generated\Shared\Transfer\QuoteTransfer $quoteTransfer - * - * @return bool - */ - protected function isMethodPayNow(AbstractTransfer $quoteTransfer) - { - return $quoteTransfer->getPayment()->getPaymentSelection() === ComputopConfig::PAYMENT_METHOD_PAY_NOW; - } - - /** - * @return array - */ - protected function getBrandOptions() - { - return [ - 'VISA' => 'Visa', - 'MasterCard' => 'Master Card', - 'AMEX' => 'American Express', - 'DINERS' => 'Diners Club', - 'JCB' => 'JCB', - 'CBN' => 'CBN', - 'SWITCH' => 'Switch', - 'SOLO' => 'Solo', - ]; - } -} -``` -
    -
    - -Then you need to add it to `Yves/Checkout/Process/StepFactory.php` right after the `PlaceOrder` step and before the `Success` step. -```php -protected function createPayNowStep() -{ - return new PayNowStep( - CheckoutControllerProvider::CHECKOUT_COMPUTOP_PAYNOW, - ApplicationControllerProvider::ROUTE_HOME - ); -} - -public function createStepCollection() -{ - $stepCollection = new StepCollection( - $this->getUrlGenerator(), - CheckoutControllerProvider::CHECKOUT_ERROR - ); - - $stepCollection - .... - ->addStep($this->createPlaceOrderStep()) - ->addStep($this->createPayNowStep()) - ->addStep($this->createSuccessStep()); - - return $stepCollection; -} -``` - -Also you need to add action to `Yves/Checkout/Controller/CheckoutController.php` -```php -public function paynowAction(Request $request) -{ - return $this->createStepProcess()->process($request); -} -``` - -And define this action in `Yves/Checkout/Plugin/Provider/CheckoutControllerProvider.php` -```php -protected function defineControllers(Application $app) -{ - $allowedLocalesPattern = $this->getAllowedLocalesPattern(); - - ..... - - $this->createController('/{checkout}/computop/paynow', self::CHECKOUT_COMPUTOP_PAYNOW, 'Checkout', 'Checkout', 'paynow') - ->assert('checkout', $allowedLocalesPattern . 'checkout|checkout') - ->value('checkout', 'checkout') - ->method('GET|POST'); -} -``` - -The final step is to create a template for rendering `PayNow` step in `Yves/Checkout/Theme/default/checkout/paynow.twig` - -
    - Click here to expand the code sample - - ```xml -{% raw %}{%{% endraw %} extends "@checkout/layout.twig" {% raw %}%}{% endraw %} - - {% raw %}{%{% endraw %} block breadcrumb {% raw %}%}{% endraw %}{% raw %}{%{% endraw %} endblock {% raw %}%}{% endraw %} - - {% raw %}{%{% endraw %} block content {% raw %}%}{% endraw %} -
    -
    -
    -
    -
    - - -
    -
    - - -
    -
    - - -
    -
    - - -
    - - - - -
    -
    - -
    -
    -
    -
    -
    -
    -{% raw %}{%{% endraw %} endblock {% raw %}%}{% endraw %} - ``` -
    -
    - -To make this specific step work only with PayNow payment method we have to update `Yves/Checkout/Process/Steps/PlaceOrderStep.php` -```php -public function execute(Request $request, AbstractTransfer $quoteTransfer) -{ - if ($this->isPaymentPayNow($quoteTransfer) && $this->isComputopPaymentExist($quoteTransfer)) { - return $quoteTransfer; - } - - $quoteTransfer = parent::execute($request, $quoteTransfer); - - if ($this->isPaymentPayNow($quoteTransfer)) { - $this->setComputopInitData($quoteTransfer); - } - - return $quoteTransfer; -} - -protected function isPaymentPayNow(QuoteTransfer $quoteTransfer) -{ - return $quoteTransfer->getPayment()->getPaymentSelection() === ComputopConfig::PAYMENT_METHOD_PAY_NOW; -} - -protected function isComputopPaymentExist(QuoteTransfer $quoteTransfer) -{ - $quoteTransfer = $this->computopClient->isComputopPaymentExist($quoteTransfer); - - return (bool)$quoteTransfer->getPayment()->getIsComputopPaymentExist(); -} -``` - -Also, you will need to add `ComputopClient` to `PlaceOrderSpet` dependecy `Yves/Checkout/Process/StepFactory.php` -```php -public function getComputopClient() -{ - return $this->getProvidedDependency(CheckoutDependencyProvider::CLIENT_COMPUTOP); -} - -protected function createPlaceOrderStep() -{ - return new PlaceOrderStep( - $this->getCheckoutClient(), - $this->getFlashMessenger(), - $this->getComputopClient(), - CheckoutControllerProvider::CHECKOUT_PLACE_ORDER, - ApplicationControllerProvider::ROUTE_HOME, - [ - 'payment failed' => CheckoutControllerProvider::CHECKOUT_PAYMENT, - ShipmentCheckoutConnectorConfig::ERROR_CODE_SHIPMENT_FAILED => CheckoutControllerProvider::CHECKOUT_SHIPMENT, - ] - ); -} -``` - -## PayNow Payment Flow - -1. There is a radio button on Payment step. After submitting the order, the customer is redirected to the to PayNow checkout step. The step contains Credit Card form with the following fields: - - Credit Card brand choice; - - Credit Card number; - - Credit Card expires date (in the format `YYYYMM`, e.g. 201807); - - Credit Card security code (CVV); - - Data (hidden field, encrypted parameters, e.g. currency, amount, description); - - Length (hidden field, length of `data` parameter); - - Merchant id (hidden field, assigned by Computop). - -Form posts directly to Computop paygate. After the process is requested, Computop redirects the customer to success or failure URL. - -2. By default, on success the customer will be redirected to "Success" step. The response contains `payId`. On error, the customer will be redirected to "Payment" step with the error message. Response data is stored in the DB. -3. Authorization is added by default right after the success init action. Capture/Refund and Cancel actions are implemented in the Administration Interface (on manage order). On requests, Spryker will use `payId` parameter stored in the DB to identify a payment. diff --git a/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/computop/integrating-payment-methods-for-computop/integrating-the-paypal-payment-method-for-computop.md b/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/computop/integrating-payment-methods-for-computop/integrating-the-paypal-payment-method-for-computop.md deleted file mode 100644 index ed7e4630f34..00000000000 --- a/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/computop/integrating-payment-methods-for-computop/integrating-the-paypal-payment-method-for-computop.md +++ /dev/null @@ -1,64 +0,0 @@ ---- -title: Integrating the PayPal payment method for Computop -description: Integrate PayPal payment through Computop into the Spryker-based shop. -last_updated: Apr 3, 2020 -template: concept-topic-template -originalLink: https://documentation.spryker.com/v5/docs/computop-paypal -originalArticleId: 3eb048f4-4dc8-496b-bf4b-78e39f08451f -redirect_from: - - /v5/docs/computop-paypal - - /v5/docs/en/computop-paypal -related: - - title: Computop - link: docs/scos/user/technology-partners/page.version/payment-partners/computop.html - - title: Integrating the Sofort payment method for Computop - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/computop/integrating-payment-methods-for-computop/integrating-the-sofort-payment-method-for-computop.html - - title: Integrating the PayNow payment method for Computop - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/computop/integrating-payment-methods-for-computop/integrating-the-paynow-payment-method-for-computop.html - - title: Integrating the Easy Credit payment method for Computop - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/computop/integrating-payment-methods-for-computop/integrating-the-easy-credit-payment-method-for-computop.html - - title: Computop API calls - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/computop/computop-api-calls.html - - title: Integrating the iDeal payment method for Computop - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/computop/integrating-payment-methods-for-computop/integrating-the-ideal-payment-method-for-computop.html - - title: Integrating the Paydirekt payment method for Computop - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/computop/integrating-payment-methods-for-computop/integrating-the-paydirekt-payment-method-for-computop.html - - title: Computop - OMS plugins - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/computop/computop-oms-plugins.html - - title: Integrating the Direct Debit payment method for Computop - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/computop/integrating-payment-methods-for-computop/integrating-the-direct-debit-payment-method-for-computop.html - - title: Integrating the Сredit Сard payment method for Computop - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/computop/integrating-payment-methods-for-computop/integrating-the-credit-card-payment-method-for-computop.html ---- - -Example State Machine -![Click Me](https://spryker.s3.eu-central-1.amazonaws.com/docs/Technology+Partners/Payment+Partners/Computop/computop-paypal-flow-example.png) - -## Front-End Integration -To adjust frontend appearance, provide following templates in your theme directory: -`src//Yves/Computop/Theme//paypal.twig` - -## State Machine Integration -The Computop provides a demo state machine for PayPal payment method which implements Authorization/Capture flow. - -To enable the demo state machine, extend the configuration with the following values: - -```php - - ComputopConfig::PAYMENT_METHOD_PAY_PAL => 'ComputopPayPal', -]; - -$config[OmsConstants::ACTIVE_PROCESSES] = [ - ... - 'ComputopPayPal', -]; -``` - -## PayPal Payment Flow: - -1.There is a radio button on "Payment" step. After submit order customer will be redirected to the to Computop (Paygate form implementation). The GET consists of 3 parameters: - - data (encrypted parameters, e.g. currency, amount, description); - - length (length of `data` parameter); - - merchant id (assigned by Computop); -2. By default, on success the customer will be redirected to "Success" step. The response contains `payId`. On error, the customer will be redirected to "Payment" step with the error message by default. Response data is stored in the DB. -3. Authorization is added right after success init action by default. Capture/Refund and Cancel actions are implemented in the admin panel (on manage order). On requests, Spryker will use `payId` parameter stored in the DB to identify a payment. diff --git a/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/crefopay/crefopay-callbacks.md b/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/crefopay/crefopay-callbacks.md deleted file mode 100644 index 9bf8b2cc2f5..00000000000 --- a/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/crefopay/crefopay-callbacks.md +++ /dev/null @@ -1,33 +0,0 @@ ---- -title: CrefoPay callbacks -description: Callbacks are redirects performed by the CrefoPay system. -last_updated: Apr 3, 2020 -template: concept-topic-template -originalLink: https://documentation.spryker.com/v5/docs/crefopay-callback -originalArticleId: b6e5b737-9eb4-41c2-bc36-e7522aee9fd9 -redirect_from: - - /v5/docs/crefopay-callback - - /v5/docs/en/crefopay-callback -related: - - title: Integrating CrefoPay - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/crefopay/integrating-crefopay.html - - title: Installing and configuring CrefoPay - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/crefopay/installing-and-configuring-crefopay.html - - title: CrefoPay—Enabling B2B payments - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/crefopay/crefopay-enabling-b2b-payments.html - - title: CrefoPay payment methods - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/crefopay/crefopay-payment-methods.html - - title: CrefoPay capture and refund Processes - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/crefopay/crefopay-capture-and-refund-processes.html - - title: CrefoPay notifications - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/crefopay/crefopay-notifications.html ---- - -Callbacks are redirects performed by the CrefoPay system. The CrefoPay system redirects customers back to the URLs configured for the merchants shop. For each shop, you can define a single URL of each of the following types: confirmation, success and error. -These callbacks are used only for payment methods that redirect to a different page like PayPal. - -Callback URLs can be configured in merchant back end and must have the following format: - -* Confirmation URL: `http://de.mysprykershop.com/crefo-pay/callback/confirmation ` -* Success URL: `http://de.mysprykershop.com/crefo-pay/callback/success` -* Failure URL: `http://de.mysprykershop.com/crefo-pay/callback/failure` diff --git a/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/crefopay/crefopay-capture-and-refund-processes.md b/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/crefopay/crefopay-capture-and-refund-processes.md deleted file mode 100644 index a19aac2c437..00000000000 --- a/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/crefopay/crefopay-capture-and-refund-processes.md +++ /dev/null @@ -1,52 +0,0 @@ ---- -title: CrefoPay capture and refund Processes -description: This article describes the capture and refund processes for the Crefopay module in Spryker Commerce OS. -last_updated: Apr 3, 2020 -template: concept-topic-template -originalLink: https://documentation.spryker.com/v5/docs/crefopay-capture-refund-processes -originalArticleId: 37f60927-7ab4-4e82-8ad7-92512dd975ef -redirect_from: - - /v5/docs/crefopay-capture-refund-processes - - /v5/docs/en/crefopay-capture-refund-processes -related: - - title: Integrating CrefoPay - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/crefopay/integrating-crefopay.html - - title: CrefoPay - link: docs/scos/user/technology-partners/page.version/payment-partners/crefopay.html - - title: Installing and configuring CrefoPay - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/crefopay/installing-and-configuring-crefopay.html - - title: CrefoPay callbacks - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/crefopay/crefopay-callbacks.html - - title: CrefoPay—Enabling B2B payments - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/crefopay/crefopay-enabling-b2b-payments.html - - title: CrefoPay payment methods - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/crefopay/crefopay-payment-methods.html - - title: CrefoPay notifications - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/crefopay/crefopay-notifications.html ---- - -CrefoPay module can have different capture and refund processes: - -* separate transaction for each order item and expense; -* combined transaction for all order items. - -For these purposes, the module has different OMS plugins: - -* `CapturePlugin` -* `CaptureSplitPlugin` -* `RefundPlugin` -* `RefundSplitPlugin` - -You can use the following settings to manage expenses behavior: - -* `$config[CrefoPayConstants::CAPTURE_EXPENSES_SEPARATELY]` -* `$config[CrefoPayConstants::REFUND_EXPENSES_WITH_LAST_ITEM]` - -With `CapturePlugin` in place, the amount of items in order is captured as one transaction. If you use `$config[CrefoPayConstants::CAPTURE_EXPENSES_SEPARATELY]`, separate transaction will be created for all expenses. `CaptureSplitPlugin` triggers a separate transaction for each order item. - -`RefundSplitPlugin` triggers a separate refund call for each order item that you want to refund. `RefundPlugin` implemented for case when you want to refund amount that can be more than item amount. - -{% info_block warningBox "Note" %} -You'll get an exception if you trigger Refund process for items with different CaptureIDs (items captured in different transactions). -{% endinfo_block %} -`$config[CrefoPayConstants::REFUND_EXPENSES_WITH_LAST_ITEM]` allows you to refund expenses. It refunds them after the last item has been refunded. diff --git a/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/crefopay/crefopay-enabling-b2b-payments.md b/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/crefopay/crefopay-enabling-b2b-payments.md deleted file mode 100644 index 7112dbc0f4f..00000000000 --- a/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/crefopay/crefopay-enabling-b2b-payments.md +++ /dev/null @@ -1,47 +0,0 @@ ---- -title: CrefoPay—Enabling B2B payments -description: CrefoPay module provides B2B strategy in payments. -last_updated: Apr 3, 2020 -template: concept-topic-template -originalLink: https://documentation.spryker.com/v5/docs/crefopay-business-to-business-model -originalArticleId: 1eacc2d6-3736-4b0f-85ac-5e3d5276dabc -redirect_from: - - /v5/docs/crefopay-business-to-business-model - - /v5/docs/en/crefopay-business-to-business-model -related: - - title: Integrating CrefoPay - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/crefopay/integrating-crefopay.html - - title: CrefoPay - link: docs/scos/user/technology-partners/page.version/payment-partners/crefopay.html - - title: Installing and configuring CrefoPay - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/crefopay/installing-and-configuring-crefopay.html - - title: CrefoPay payment methods - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/crefopay/crefopay-payment-methods.html - - title: CrefoPay capture and refund Processes - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/crefopay/crefopay-capture-and-refund-processes.html - - title: CrefoPay callbacks - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/crefopay/crefopay-callbacks.html - - title: CrefoPay notifications - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/crefopay/crefopay-notifications.html ---- - -CrefoPay module enables B2B strategy in payments. - -To enable the B2B business model for CrefoPay: - -1. Set `$config[CrefoPayConstants::IS_BUSINESS_TO_BUSINESS]` to true. -2. Add company data into `QuoteTransfer` on project level. It should be done before customer goes to checkout payment step. - -**Company Data** - -```php -$quoteTransfer->setCrefoPayCompany( - (new CrefoPayApiCompanyTransfer()) - ->setCompanyName('Company Name') - ->setCompanyRegisterType('UNKNOWN') - ->setCompanyRegistrationID('registration-id') - ->setCompanyTaxID('tax-id') - ->setCompanyVatID('vat-id') - ->setEmail('business.email@company.com') -); -``` diff --git a/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/crefopay/crefopay-notifications.md b/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/crefopay/crefopay-notifications.md deleted file mode 100644 index 94e7f6af081..00000000000 --- a/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/crefopay/crefopay-notifications.md +++ /dev/null @@ -1,17 +0,0 @@ ---- -title: CrefoPay notifications -description: Merchant Notification System (MNS) is a push notification service for merchants that CrefoPay module uses. -last_updated: Apr 3, 2020 -template: concept-topic-template -originalLink: https://documentation.spryker.com/v5/docs/crefopay-notifications -originalArticleId: d9630c8d-6d6d-49dc-8ca5-ea25a6b7d461 -redirect_from: - - /v5/docs/crefopay-notifications - - /v5/docs/en/crefopay-notifications ---- - -Merchant Notification System (MNS) is a push notification service for merchants. The MNS allows merchants to receive a multitude of notifications asynchronously in order to decouple the merchant system from CrefoPay’s payment systems. Also, with the MNS, merchants can react to any kind of change in the payment status of processed transactions. - -Notification calls will be targeted at the notification-URL that is configured for the shop. Multiple notification-URLs may be configured for a single shop. This allows merchants to inform more than one system, for example shop system and ERP system. - -The Notification-URL can be configured in merchant back end and must have the following format: `http://de.mysprykershop.com/crefo-pay/notification`. diff --git a/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/crefopay/crefopay-payment-methods.md b/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/crefopay/crefopay-payment-methods.md deleted file mode 100644 index 40c7d3678ea..00000000000 --- a/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/crefopay/crefopay-payment-methods.md +++ /dev/null @@ -1,79 +0,0 @@ ---- -title: CrefoPay payment methods -description: CrefoPay supports key payment methods across different regions, channels, and verticals.- bill, cash on delivery, credit card, direct debit, Paypal, cash in advance, sofort payment -last_updated: Apr 3, 2020 -template: concept-topic-template -originalLink: https://documentation.spryker.com/v5/docs/crefopay-provided-payment-methods -originalArticleId: a70f823c-bd03-4bf3-abd4-aba30f324a89 -redirect_from: - - /v5/docs/crefopay-provided-payment-methods - - /v5/docs/en/crefopay-provided-payment-methods -related: - - title: Integrating CrefoPay - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/crefopay/integrating-crefopay.html - - title: CrefoPay - link: docs/scos/user/technology-partners/page.version/payment-partners/crefopay.html - - title: Installing and configuring CrefoPay - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/crefopay/installing-and-configuring-crefopay.html - - title: CrefoPay capture and refund Processes - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/crefopay/crefopay-capture-and-refund-processes.html - - title: CrefoPay—Enabling B2B payments - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/crefopay/crefopay-enabling-b2b-payments.html - - title: CrefoPay callbacks - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/crefopay/crefopay-callbacks.html - - title: CrefoPay notifications - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/crefopay/crefopay-notifications.html ---- - -CrefoPay supports key payment methods across different regions, channels, and verticals. This article gives overview of these payment methods. - -## Bill -After checkout, shop generates a bill/invoice with the account information and payment reference provided by CrefoPay included. - -Account information and payment reference are provided in response to a reserve call. - -You can find the state machine example in `vendor/spryker-eco/crefo-pay/config/Zed/Oms/CrefoPayBill01.xml` - -## Cash on Delivery -After checkout, user makes payment only after receiving the product. This payment is not made via CrefoPay checkout, so CrefoPay cannot process it. As a result, merchants have to process 'Cash on Delivery' payments separately. - -You can find the state machine example in `vendor/spryker-eco/crefo-pay/config/Zed/Oms/CrefoPayCashOnDelivery01.xml` - -## Credit Card -You can find the state machine example in `vendor/spryker-eco/crefo-pay/config/Zed/Oms/CrefoPayCrediCard01.xml` - -## Credit Card with 3D Secure -If a credit card holder is registered with 3D Secure process, once a purchase is confirmed, they are forwarded to the entry page of their bank where they need to enter the password sent by their bank. Payment is carried out only after the correct password is entered. MasterCard's solution is "MasterCard Secure Code" while Visa's is "Verified by Visa". - -You can find the state machine example in `vendor/spryker-eco/crefo-pay/config/Zed/Oms/CrefoPayCrediCard3D01.xml` - -## Direct Debit -Direct Debit is processed by the bank system once it is transferred to the bank gateway. This can take several days. While being processed, the order has PayPending status. - -As a result of the reconciliation process, the bank system provides feedback which is evaluated automatically within CrefoPay system: - -* in case of a positive feedback, the status of the order is set to Paid; -* in case of a negative return, it gets the Paymentfailed status; -* in case CrefoPay does not receive any feedback (which is a rare case), CrefoPay system waits for the so-called grace period to pass; -* in case CrefoPay system does not receive a negative feedback within this grace period, the status of the order is set to Paid. - -In case CrefoPay does not receive any feedback (which is a rare case), CrefoPay system waits for the so-called grace period to pass. If CrefoPay system does not receive a negative feedback within this grace period, the status of the order is set to Paid. - -You can find the state machine example in `vendor/spryker-eco/crefo-pay/config/Zed/Oms/CrefoPayDirectDebit01.xml` - -## PayPal -During checkout, user is redirected to PayPal login page. After a successful authentication or cancellation, PayPal informs CrefoPay about the outcome. Then, CrefoPay performs a callback and redirects the user back to the shop. - -You can find the state machine example in `vendor/spryker-eco/crefo-pay/config/Zed/Oms/CrefoPayPayPal01.xml` - -## Cash in Advance -After checkout, shop delivers the order after payment has been received from the user. - -The shop learns about the incoming payment by receiving a notification from the Merchant Notification Service. - -You can find the state machine example in `vendor/spryker-eco/crefo-pay/config/Zed/Oms/CrefoPayPrepaid01.xml` - -## SofortÜberweisung -After confirmation an order during checkout, the user is redirected to the SOFORTBank website where they can select a bank. This takes them to the entry page of the selected bank to authenticate. Then, they trigger an online bank transfer from this environment. Similarly to PayPal, SofortÜberweisung informs CrefoPay about the outcome, CrefoPay performs a callback and redirects the user back to the shop. - -You can find the state machine example in `vendor/spryker-eco/crefo-pay/config/Zed/Oms/CrefoPaySofort01.xml` diff --git a/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/crefopay/crefopay.md b/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/crefopay/crefopay.md deleted file mode 100644 index f3e3c3b63e4..00000000000 --- a/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/crefopay/crefopay.md +++ /dev/null @@ -1,22 +0,0 @@ ---- -title: CrefoPay -template: concept-topic-template ---- - -`SprykerEco.CrefoPay` [spryker-eco/crefo-pay](https://github.com/spryker-eco/crefo-pay) module provides integration of Spryker e-commerce system with the CrefoPay technology partner. It requires `SprykerEco.CrefoPayApi` [spryker-eco/crefo-pay-api](https://github.com/spryker-eco/crefo-pay-api) module that provides the REST Client for making API calls to CrefoPay Payment Provider. - -The `SprykerEco.CrefoPay` module includes integration with: - -* **Checkout process** - payment forms with all necessary fields that are required to make a payment request, save order information and so on. -* **OMS (Order Management System)** - state machines, all necessary commands for making modification requests and conditions for changing order statuses accordingly. - -The `SprykerEco.CrefoPay` module provides the following payment methods: - -* [Bill](/docs/scos/dev/technology-partner-guides/{{page.version}}/payment-partners/crefopay/crefopay-payment-methods.html#bill) -* [Cash on Delivery](/docs/scos/dev/technology-partner-guides/{{page.version}}/payment-partners/crefopay/crefopay-payment-methods.html#cash-on-delivery) -* [Credit Card](/docs/scos/dev/technology-partner-guides/{{page.version}}/payment-partners/crefopay/crefopay-payment-methods.html#credit-card) -* [Card with 3D secure](/docs/scos/dev/technology-partner-guides/{{page.version}}/payment-partners/crefopay/crefopay-payment-methods.html#credit-card-with-3d-secure) -* [Direct Debit](/docs/scos/dev/technology-partner-guides/{{page.version}}/payment-partners/crefopay/crefopay-payment-methods.html#direct-debit) -* [PayPal](/docs/scos/dev/technology-partner-guides/{{page.version}}/payment-partners/crefopay/crefopay-payment-methods.html#paypal) -* [Cash in advance](/docs/scos/dev/technology-partner-guides/{{page.version}}/payment-partners/crefopay/crefopay-payment-methods.html#cash-in-advance) -* [SofortÜberweisung](/docs/scos/dev/technology-partner-guides/{{page.version}}/payment-partners/crefopay/crefopay-payment-methods.html#sofort-berweisung) diff --git a/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/crefopay/installing-and-configuring-crefopay.md b/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/crefopay/installing-and-configuring-crefopay.md deleted file mode 100644 index c5d2e08b826..00000000000 --- a/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/crefopay/installing-and-configuring-crefopay.md +++ /dev/null @@ -1,100 +0,0 @@ ---- -title: Installing and configuring CrefoPay -description: This article provides instructions on the installation and configuration of the CrefoPay module for the Spryker Commerce OS. -last_updated: Sep 15, 2020 -template: concept-topic-template -originalLink: https://documentation.spryker.com/v5/docs/crefopay-configuration -originalArticleId: 314ad2ea-73cd-406a-a68b-7f9886f109a6 -redirect_from: - - /v5/docs/crefopay-configuration - - /v5/docs/en/crefopay-configuration -related: - - title: Integrating CrefoPay - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/crefopay/integrating-crefopay.html - - title: CrefoPay - link: docs/scos/user/technology-partners/page.version/payment-partners/crefopay.html - - title: CrefoPay payment methods - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/crefopay/crefopay-payment-methods.html - - title: CrefoPay capture and refund Processes - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/crefopay/crefopay-capture-and-refund-processes.html - - title: CrefoPay—Enabling B2B payments - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/crefopay/crefopay-enabling-b2b-payments.html - - title: CrefoPay callbacks - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/crefopay/crefopay-callbacks.html - - title: CrefoPay notifications - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/crefopay/crefopay-notifications.html ---- - -To integrate CrefoPay into your project, first you need to install and configure the CrefoPay module. This topic describes how to do that. - -## Installation -To install the CrefoPay module, run: - -``` -composer require spryker-eco/crefo-pay -``` - -## Configuration -### General Configuration -You can find all necessary configurations in `vendor/spryker-eco/crefo-pay/config/config.dist.php`. - -The table below describes all general configuration keys and their values. -All necessary configurations can be found in `vendor/spryker-eco/crefo-pay/config/config.dist.php`. - -|Configuration Key |Type | Description| -| --- | --- | --- | -| `$config [CrefoPayConstants::MERCHANT_ID]`| int | Merchant ID assigned by CrefoPay. | -|` $config [CrefoPayConstants::STORE_ID]` |string |Store ID of the merchant assigned by CrefoPay as a merchant can have more than one store.| -| `$config [CrefoPayConstants::REFUND_DESCRIPTION]` | string | Description to be shown to the end user on the refund.| -| `$config [CrefoPayConstants::SECURE_FIELDS_API_ENDPOINT] `| string | Secure fields API endpoint.| -|`$config [CrefoPayConstants::IS_BUSINESS_TO_BUSINESS] `|bool | Set true in case of b2b model. | -| `$config [CrefoPayConstants::CAPTURE_EXPENSES_SEPARATELY] `|bool | If set true, allows capturing expenses in different transactions. | -| `$config [CrefoPayConstants::REFUND_EXPENSES_WITH_LAST_ITEM]`|bool|If set true, allows refunding expenses when the last item is refunded. | -|` $config [CrefoPayConstants::SECURE_FIELDS_PLACEHOLDERS] ` | array | Placeholders for CC payment method fields (account name, card number, cvv). | -| `$config [CrefoPayApiConstants::CREATE_TRANSACTION_API_ENDPOINT]` | string | Create Transaction API endpoint. | -| `$config [CrefoPayApiConstants::RESERVE_API_ENDPOINT] ` | string | Reserve API endpoint. | -| `$config [CrefoPayApiConstants::CAPTURE_API_ENDPOINT]` | string | Capture API endpoint. | -| `$config [CrefoPayApiConstants::CANCEL_API_ENDPOINT]` | string | Cancel API endpoint. | -|`$config [CrefoPayApiConstants::REFUND_API_ENDPOINT]` | string | Refund API endpoint. | -| `$config [CrefoPayApiConstants::FINISH_API_ENDPOINT]` | string | Finish API endpoint. | -| `$config [CrefoPayApiConstants::PRIVATE_KEY] ` | string | Integration private key. Provided by CrefoPay. | -| `$config [CrefoPayApiConstants::PUBLIC_KEY]` | string | Integration public key. Provided by CrefoPay. | - -### Specific Configuration -Add necessary payment methods to State Machine (OMS) configuration in the following file: - -inconfig_default.php - -```php -$config[OmsConstants::PROCESS_LOCATION] = [ - ... -APPLICATION_ROOT_DIR . '/vendor/spryker-eco/crefo-pay/config/Zed/Oms', -]; -$config[OmsConstants::ACTIVE_PROCESSES] = [ - ... - 'CrefoPayBill01', - 'CrefoPayCashOnDelivery01', - 'CrefoPayDirectDebit01', - 'CrefoPayPayPal01', - 'CrefoPayPrepaid01', - 'CrefoPaySofort01', - 'CrefoPayCreditCard01', - 'CrefoPayCreditCard3D01', -]; -$config[SalesConstants::PAYMENT_METHOD_STATEMACHINE_MAPPING] = [ - ... -CrefoPayConfig::CREFO_PAY_PAYMENT_METHOD_BILL => 'CrefoPayBill01', - CrefoPayConfig::CREFO_PAY_PAYMENT_METHOD_CASH_ON_DELIVERY => 'CrefoPayCashOnDelivery01', - CrefoPayConfig::CREFO_PAY_PAYMENT_METHOD_DIRECT_DEBIT => 'CrefoPayDirectDebit01', - CrefoPayConfig::CREFO_PAY_PAYMENT_METHOD_PAY_PAL => 'CrefoPayPayPal01', - CrefoPayConfig::CREFO_PAY_PAYMENT_METHOD_PREPAID => 'CrefoPayPrepaid01', - CrefoPayConfig::CREFO_PAY_PAYMENT_METHOD_SOFORT => 'CrefoPaySofort01', - CrefoPayConfig::CREFO_PAY_PAYMENT_METHOD_CREDIT_CARD => 'CrefoPayCreditCard01', - CrefoPayConfig::CREFO_PAY_PAYMENT_METHOD_CREDIT_CARD_3D => 'CrefoPayCreditCard3D01', -]; -``` - -See [CrefoPay payment methods](/docs/scos/dev/technology-partner-guides/{{page.version}}/payment-partners/crefopay/crefopay-payment-methods.html) for more information on the payment methods provided by CrefoPay. - -## Next steps -Once you are done with the installation and configuration of the CrefoPay module, [integrate CrefoPay into your project](/docs/scos/dev/technology-partner-guides/{{page.version}}/payment-partners/crefopay/crefopay-integration.html). diff --git a/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/crefopay/integrating-crefopay.md b/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/crefopay/integrating-crefopay.md deleted file mode 100644 index 28299665d60..00000000000 --- a/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/crefopay/integrating-crefopay.md +++ /dev/null @@ -1,635 +0,0 @@ ---- -title: Integrating CrefoPay -description: This article provides instructions on integrating CrefoPay into the Spryker Commerce OS. -last_updated: Sep 15, 2020 -template: concept-topic-template -originalLink: https://documentation.spryker.com/v5/docs/crefopay-integration -originalArticleId: 01dec6fb-12cd-49da-b7db-b37553151437 -redirect_from: - - /v5/docs/crefopay-integration - - /v5/docs/en/crefopay-integration - - /docs/scos/dev/technology-partner-guides/202005.0/payment-partners/crefopay/crefopay-integration.html -related: - - title: CrefoPay - link: docs/scos/user/technology-partners/page.version/payment-partners/crefopay.html - - title: Installing and configuring CrefoPay - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/crefopay/installing-and-configuring-crefopay.html - - title: CrefoPay payment methods - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/crefopay/crefopay-payment-methods.html - - title: CrefoPay capture and refund Processes - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/crefopay/crefopay-capture-and-refund-processes.html - - title: CrefoPay—Enabling B2B payments - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/crefopay/crefopay-enabling-b2b-payments.html - - title: CrefoPay callbacks - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/crefopay/crefopay-callbacks.html - - title: CrefoPay notifications - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/crefopay/crefopay-notifications.html ---- - -This article provides step-by-step instructions on integrating the CrefoPay system into your project. - -## Prerequisites -Prior to integrating CrefoPay into your project, make sure you [installed and configured the CrefoPay module](/docs/scos/dev/technology-partner-guides/{{page.version}}/payment-partners/crefopay/installing-and-configuring-crefopay.html). - -## Integrating CrefoPay into Your Project -To integrate CrefoPay, do the following: - -1. Add shipment step plugin, payment subform plugins and payment method handlers: - -
    - \Pyz\Yves\CheckoutPage\CheckoutPageDependencyProvider - -```php -extendShipmentHandlerPluginCollection($container); - $container = $this->extendSubFormPluginCollection($container); - $container = $this->extendPaymentMethodHandler($container); - - return $container; - } - -... - - /** - * @param \Spryker\Yves\Kernel\Container $container - * - * @return \Spryker\Yves\Kernel\Container - */ - protected function extendShipmentHandlerPluginCollection(Container $container): Container - { - $container->extend(static::PLUGIN_SHIPMENT_HANDLER, function (StepHandlerPluginCollection $shipmentHandlerPlugins) { - $shipmentHandlerPlugins->add(new CrefoPayQuoteExpanderPlugin(), static::PLUGIN_CREFO_PAY_SHIPMENT_STEP); - - return $shipmentHandlerPlugins; - }); - - return $container; - } - - /** - * @param \Spryker\Yves\Kernel\Container $container - * - * @return \Spryker\Yves\Kernel\Container - */ - protected function extendSubFormPluginCollection(Container $container): Container - { - $container->extend(static::PAYMENT_SUB_FORMS, function (SubFormPluginCollection $paymentSubFormPluginCollection) { - $paymentSubFormPluginCollection->add(new CrefoPayBillSubFormPlugin()); - $paymentSubFormPluginCollection->add(new CrefoPayCashOnDeliverySubFormPlugin()); - $paymentSubFormPluginCollection->add(new CrefoPayDirectDebitSubFormPlugin()); - $paymentSubFormPluginCollection->add(new CrefoPayPayPalSubFormPlugin()); - $paymentSubFormPluginCollection->add(new CrefoPayPrepaidSubFormPlugin()); - $paymentSubFormPluginCollection->add(new CrefoPaySofortSubFormPlugin()); - $paymentSubFormPluginCollection->add(new CrefoPayCreditCardSubFormPlugin()); - $paymentSubFormPluginCollection->add(new CrefoPayCreditCard3DSubFormPlugin()); - - return $paymentSubFormPluginCollection; - }); - - return $container; - } - - /** - * @param \Spryker\Yves\Kernel\Container $container - * - * @return \Spryker\Yves\Kernel\Container - */ - protected function extendPaymentMethodHandler(Container $container): Container - { - $container->extend(static::PAYMENT_METHOD_HANDLER, function (StepHandlerPluginCollection $paymentMethodHandlerCollection) { - $paymentMethodHandlerCollection->add(new NopaymentHandlerPlugin(), NopaymentConfig::PAYMENT_PROVIDER_NAME); - $paymentMethodHandlerCollection->add(new CrefoPayPaymentExpanderPlugin(), CrefoPayConfig::CREFO_PAY_PAYMENT_METHOD_BILL); - $paymentMethodHandlerCollection->add(new CrefoPayPaymentExpanderPlugin(), CrefoPayConfig::CREFO_PAY_PAYMENT_METHOD_CASH_ON_DELIVERY); - $paymentMethodHandlerCollection->add(new CrefoPayPaymentExpanderPlugin(), CrefoPayConfig::CREFO_PAY_PAYMENT_METHOD_DIRECT_DEBIT); - $paymentMethodHandlerCollection->add(new CrefoPayPaymentExpanderPlugin(), CrefoPayConfig::CREFO_PAY_PAYMENT_METHOD_PAY_PAL); - $paymentMethodHandlerCollection->add(new CrefoPayPaymentExpanderPlugin(), CrefoPayConfig::CREFO_PAY_PAYMENT_METHOD_PREPAID); - $paymentMethodHandlerCollection->add(new CrefoPayPaymentExpanderPlugin(), CrefoPayConfig::CREFO_PAY_PAYMENT_METHOD_SOFORT); - $paymentMethodHandlerCollection->add(new CrefoPayPaymentExpanderPlugin(), CrefoPayConfig::CREFO_PAY_PAYMENT_METHOD_CREDIT_CARD); - $paymentMethodHandlerCollection->add(new CrefoPayPaymentExpanderPlugin(), CrefoPayConfig::CREFO_PAY_PAYMENT_METHOD_CREDIT_CARD_3D); - - return $paymentMethodHandlerCollection; - }); - - return $container; - } -} -``` -
    -
    - -2. Extend `ShipmentStep` to add payment methods filtering logic: - -\Pyz\Yves\CheckoutPage\Process\Steps\ShipmentStep - -```php -shipmentPlugins->get(CheckoutPageDependencyProvider::PLUGIN_CREFO_PAY_SHIPMENT_STEP); - - return $crefoPayPlugin->addToDataClass($request, $quoteTransfer); - } -} -``` - -3. Extend `StepFactory` for the project-level `ShipmentStep` usage: - -\Pyz\Yves\CheckoutPage\Process\StepFactory - -```php -getUrlGenerator(), - CheckoutPageControllerProvider::CHECKOUT_ERROR - ); - - $stepCollection - ->addStep($this->createEntryStep()) - ->addStep($this->createCustomerStep()) - ->addStep($this->createAddressStep()) - ->addStep($this->createShipmentStep()) - ->addStep($this->createPaymentStep()) - ->addStep($this->createSummaryStep()) - ->addStep($this->createPlaceOrderStep()) - ->addStep($this->createSuccessStep()); - - return $stepCollection; - } - - /** - * @return \SprykerShop\Yves\CheckoutPage\Process\Steps\ShipmentStep - */ - public function createShipmentStep() - { - return new ShipmentStep( - $this->getCalculationClient(), - $this->getShipmentPlugins(), - CheckoutPageControllerProvider::CHECKOUT_SHIPMENT, - HomePageControllerProvider::ROUTE_HOME - ); - } -} -``` - -4. Extend `CheckoutPageFactory` for the project-level `StepFactory` usage: - -\Pyz\Yves\CheckoutPage\CheckoutPageFactory - -```php - -{% raw %}{%{% endraw %} endblock {% raw %}%}{% endraw %} - -{% raw %}{%{% endraw %} block sidebar {% raw %}%}{% endraw %}{% raw %}{%{% endraw %} endblock {% raw %}%}{% endraw %} - -{% raw %}{%{% endraw %} block header {% raw %}%}{% endraw %} - {% raw %}{%{% endraw %} include organism('header') with { - data: { - showSearchForm: false, - showNavigation: false - } - } only {% raw %}%}{% endraw %} -{% raw %}{%{% endraw %} endblock {% raw %}%}{% endraw %} - -{% raw %}{%{% endraw %} block breadcrumbs {% raw %}%}{% endraw %} - {% raw %}{%{% endraw %} include view('cart-checkout-breadcrumb', 'CheckoutWidget') with { - data: { - isCartPage: false, - checkoutBreadcrumbs: data.breadcrumbs - } - } only {% raw %}%}{% endraw %} -{% raw %}{%{% endraw %} endblock {% raw %}%}{% endraw %} - -{% raw %}{%{% endraw %} block footer {% raw %}%}{% endraw %}{% raw %}{%{% endraw %} endblock {% raw %}%}{% endraw %} -``` - -6. Extend payment twig to add CrefoPay payment methods: - -Pyz/Yves/CheckoutPage/Theme/default/views/payment/payment.twig - -```php -{% raw %}{%{% endraw %} extends template('page-layout-checkout', 'CheckoutPage') {% raw %}%}{% endraw %} - -{% raw %}{%{% endraw %} define data = { - backUrl: _view.previousStepUrl, - forms: { - payment: _view.paymentForm - }, - title: 'checkout.step.payment.title' | trans, - customForms: { - 'crefoPay/bill': ['bill', 'crefoPay'], - 'crefoPay/cash-on-delivery': ['cash-on-delivery', 'crefoPay'], - 'crefoPay/direct-debit': ['direct-debit', 'crefoPay'], - 'crefoPay/paypal': ['paypal', 'crefoPay'], - 'crefoPay/prepaid': ['prepaid', 'crefoPay'], - 'crefoPay/sofort': ['sofort', 'crefoPay'], - 'crefoPay/credit-card': ['credit-card', 'crefoPay'], - 'crefoPay/credit-card-3d': ['credit-card-3d', 'crefoPay'] - } -} {% raw %}%}{% endraw %} - -{% raw %}{%{% endraw %} block content {% raw %}%}{% endraw %} - {% raw %}{%{% endraw %} include molecule('script-loader') with { - class: 'js-crefopay-payment-form__script-loader', - attributes: { - src: 'https://libs.crefopay.de/3.0/secure-fields.js' - } - } only {% raw %}%}{% endraw %} - - {% raw %}{%{% endraw %} include atom('crefopay-checkbox-helper', 'CrefoPay') with { - attributes: { - 'trigger-selector': '.toggler-radio', - 'payment-container-selector': '.js-crefopay-payment', - 'target-selector': '.radio__input', - 'custom-attribute-name': 'data-crefopay', - 'custom-attribute-value': 'paymentMethod', - 'joint-container-selector': '.form' - } - } only {% raw %}%}{% endraw %} - - {% raw %}{%{% endraw %} embed molecule('form') with { - class: 'box', - data: { - form: data.forms.payment, - options: { - attr: { - id: 'payment-form' - } - }, - submit: { - enable: true, - text: 'checkout.step.summary' | trans - }, - cancel: { - enable: true, - url: data.backUrl, - text: 'general.back.button' | trans - }, - customForms: data.customForms - } - } only {% raw %}%}{% endraw %} - {% raw %}{%{% endraw %} block fieldset {% raw %}%}{% endraw %} - {% raw %}{%{% endraw %} for name, choices in data.form.paymentSelection.vars.choices {% raw %}%}{% endraw %} - {% raw %}{%{% endraw %} set paymentProviderIndex = loop.index0 {% raw %}%}{% endraw %} -
    {% raw %}{{{% endraw %} ('checkout.payment.provider.' ~ name) | trans {% raw %}}}{% endraw %}
    -
      - {% raw %}{%{% endraw %} for key, choice in choices {% raw %}%}{% endraw %} -
    • - {% raw %}{%{% endraw %} embed molecule('form') with { - data: { - form: data.form[data.form.paymentSelection[key].vars.value], - enableStart: false, - enableEnd: false, - customForms: data.customForms - }, - embed: { - index: loop.index ~ '-' ~ paymentProviderIndex, - toggler: data.form.paymentSelection[key] - } - } only {% raw %}%}{% endraw %} - {% raw %}{%{% endraw %} block fieldset {% raw %}%}{% endraw %} - {% raw %}{{{% endraw %} form_row(embed.toggler, { - required: false, - component: molecule('toggler-radio'), - attributes: { - 'target-selector': '.js-payment-method-' ~ embed.index, - 'class-to-toggle': 'is-hidden' - } - }) {% raw %}}}{% endraw %} - - {% raw %}{%{% endraw %} endblock {% raw %}%}{% endraw %} - {% raw %}{%{% endraw %} endembed {% raw %}%}{% endraw %} -
    • - {% raw %}{%{% endraw %} endfor {% raw %}%}{% endraw %} -
    - {% raw %}{%{% endraw %} endfor {% raw %}%}{% endraw %} - {% raw %}{%{% endraw %} endblock {% raw %}%}{% endraw %} - {% raw %}{%{% endraw %} endembed {% raw %}%}{% endraw %} -{% raw %}{%{% endraw %} endblock {% raw %}%}{% endraw %} -``` - -7. Add controller provider: - -\Pyz\Yves\ShopApplication\YvesBootstrap - -```php -extendCommandPlugins($container); - $container = $this->extendConditionPlugins($container); - - return $container; - } - - /** - * @param \Spryker\Zed\Kernel\Container $container - * - * @return \Spryker\Zed\Kernel\Container - */ - protected function extendCommandPlugins(Container $container): Container - { - $container->extend(self::COMMAND_PLUGINS, function (CommandCollectionInterface $commandCollection) { - ... - $commandCollection->add(new CancelPlugin(), 'CrefoPay/Cancel'); - $commandCollection->add(new CapturePlugin(), 'CrefoPay/Capture'); //Or you can use CaptureSplitPlugin instead. OMS command name (second param) should not be changed. - $commandCollection->add(new RefundPlugin(), 'CrefoPay/Refund'); ////Or you can use RefundSplitPlugin instead. OMS command name (second param) should not be changed. - $commandCollection->add(new FinishPlugin(), 'CrefoPay/Finish'); - - return $commandCollection; - }); - - return $container; - } - - /** - * @param \Spryker\Zed\Kernel\Container $container - * - * @return \Spryker\Zed\Kernel\Container - */ - protected function extendConditionPlugins(Container $container): Container - { - $container->extend(OmsDependencyProvider::CONDITION_PLUGINS, function (ConditionCollectionInterface $conditionCollection) { - ... - $conditionCollection->add(new IsReserveCallSuccessfulPlugin(), 'CrefoPay/IsReserveCallSuccessful'); - $conditionCollection->add(new IsAcknowledgePendingReceivedPlugin(), 'CrefoPay/IsAcknowledgePendingReceived'); - $conditionCollection->add(new IsMerchantPendingReceivedPlugin(), 'CrefoPay/IsMerchantPendingReceived'); - $conditionCollection->add(new IsCiaPendingReceivedPlugin(), 'CrefoPay/IsCiaPendingReceived'); - $conditionCollection->add(new IsCancelCallSuccessfulPlugin(), 'CrefoPay/IsCancelCallSuccessful'); - $conditionCollection->add(new IsCanceledReceivedPlugin(), 'CrefoPay/IsCanceledReceived'); - $conditionCollection->add(new IsExpiredReceivedPlugin(), 'CrefoPay/IsExpiredReceived'); - $conditionCollection->add(new IsCaptureCallSuccessfulPlugin(), 'CrefoPay/IsCaptureCallSuccessful'); - $conditionCollection->add(new IsPaidReceivedPlugin(), 'CrefoPay/IsPaidReceived'); - $conditionCollection->add(new IsRefundCallSuccessfulPlugin(), 'CrefoPay/IsRefundCallSuccessful'); - $conditionCollection->add(new IsChargeBackReceivedPlugin(), 'CrefoPay/IsChargeBackReceived'); - $conditionCollection->add(new IsFinishCallSuccessfulPlugin(), 'CrefoPay/IsFinishCallSuccessful'); - $conditionCollection->add(new IsDoneReceivedPlugin(), 'CrefoPay/IsDoneReceived'); - - return $conditionCollection; - }); - - return $container; - } -} -``` - -10. Extend `PaymentDependencyProvider` to add payment method filter plugin: - -\Pyz\Zed\Payment\PaymentDependencyProvider - -```php - 'HeidelpayCreditCardSecureAuthorize01', - HeidelpayConfig::PAYMENT_METHOD_SOFORT => 'HeidelpaySofort01', - HeidelpayConfig::PAYMENT_METHOD_PAYPAL_AUTHORIZE => 'HeidelpayPaypalAuthorize01', - HeidelpayConfig::PAYMENT_METHOD_PAYPAL_DEBIT => 'HeidelpayPaypalDebit01', - HeidelpayConfig::PAYMENT_METHOD_IDEAL => 'HeidelpayIdeal01', -]; -``` diff --git a/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/heidelpay/heidelpay-oms-workflow.md b/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/heidelpay/heidelpay-oms-workflow.md deleted file mode 100644 index 3a0e8ed8507..00000000000 --- a/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/heidelpay/heidelpay-oms-workflow.md +++ /dev/null @@ -1,16 +0,0 @@ ---- -title: Heidelpay OMS workflow -last_updated: Nov 4, 2020 -template: concept-topic-template ---- - -We use state machines for handling and managing orders and payments. -To use Heidelpay, [create a new OMS](/docs/scos/dev/back-end-development/data-manipulation/create-an-order-management-system-spryker-commerce-os.html) which includes necessary Heildelpay payment methods. You can use the same state machines or build new ones. The state machine commands and conditions trigger Heidelpay facade calls in order to perform the needed requests to Heidelpay API. - -Some examples of the basic and fully functional state machines for each payment method were already built: `vendor/spryker-eco/heidelpay/config/Zed/Oms` - -* `HeidelpaySofort01.xml` -* `HeidelpayPaypalDebit01.xml` -* `HeidelpayIdeal01.xml` -* `HeidelpaySofort01.xml` -* `HeidelpayCreditCardSecureAuthorize01.xml` diff --git a/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/heidelpay/heidelpay-workflow-for-errors.md b/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/heidelpay/heidelpay-workflow-for-errors.md deleted file mode 100644 index e03332f7f04..00000000000 --- a/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/heidelpay/heidelpay-workflow-for-errors.md +++ /dev/null @@ -1,45 +0,0 @@ ---- -title: Heidelpay workflow for errors -description: This article describes the procedure for handling errors in Heidelpay. -last_updated: Apr 3, 2020 -template: concept-topic-template -originalLink: https://documentation.spryker.com/v5/docs/heidelpay-error-workflow -originalArticleId: 7b17736d-b6ae-4099-91ba-ae219c71ff65 -redirect_from: - - /v5/docs/heidelpay-error-workflow - - /v5/docs/en/heidelpay-error-workflow -related: - - title: Heidelpay - link: docs/scos/user/technology-partners/page.version/payment-partners/heidelpay.html - - title: Integrating the Credit Card Secure payment method for Heidelpay - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/heidelpay/integrating-payment-methods-for-heidelpay/integrating-the-credit-card-secure-payment-method-for-heidelpay.html - - title: Configuring Heidelpay - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/heidelpay/configuring-heidelpay.html - - title: Integrating the Paypal Authorize payment method for Heidelpay - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/heidelpay/integrating-payment-methods-for-heidelpay/integrating-the-paypal-authorize-payment-method-for-heidelpay.html - - title: Integrating Heidelpay - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/heidelpay/integrating-heidelpay.html - - title: Integrating the Direct Debit payment method for Heidelpay - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/heidelpay/integrating-payment-methods-for-heidelpay/integrating-the-direct-debit-payment-method-for-heidelpay.html - - title: Installing Heidelpay - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/heidelpay/installing-heidelpay.html - - title: Integrating the Easy Credit payment method for Heidelpay - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/heidelpay/integrating-payment-methods-for-heidelpay/integrating-the-easy-credit-payment-method-for-heidelpay.html - - title: Integrating the Invoice Secured B2C payment method for Heidelpay - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/heidelpay/integrating-payment-methods-for-heidelpay/integrating-the-invoice-secured-b2c-payment-method-for-heidelpay.html ---- - -From the user's perspective, there is almost no difference between successful and unsuccessful order flow. - -The only exception is a redirect to the URL after the `placeOrderAction` (`/checkout/place-order`) is complete. Both URLs can be configured as follows: -```php - $config[HeidelpayConstants::CONFIG_YVES_URL] = 'http://' . $config[ApplicationConstants::HOST_YVES]; - - //url which is used in case if order was successfuly handled by Heidelpay - $config[HeidelpayConstants::CONFIG_YVES_CHECKOUT_SUCCESS_URL] = 'http://' . $config[ApplicationConstants::HOST_YVES] . '/checkout/success'; - - //url which is used in case if order was unsuccessfully handled by Heidelpay - $config[HeidelpayConstants::CONFIG_YVES_CHECKOUT_PAYMENT_FAILED_URL] = 'http://' . $config[ApplicationConstants::HOST_YVES] . '/heidelpay/payment-failed?error_code=%s'; - ``` -Data flow containing information about the Heidelpay transaction error is marked red. -[Heidelpay error handling workflow](https://spryker.s3.eu-central-1.amazonaws.com/docs/scos/dev/technology-partner-guides/payment-partners/heidelpay/heidelpay-workflow-for-errors.md/heidelpay-error-handling-workflow.png) diff --git a/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/heidelpay/installing-heidelpay.md b/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/heidelpay/installing-heidelpay.md deleted file mode 100644 index e5f752881e9..00000000000 --- a/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/heidelpay/installing-heidelpay.md +++ /dev/null @@ -1,47 +0,0 @@ ---- -title: Installing Heidelpay -description: This article contains installation information for the Heidelpay module into the Spryker Legacy Demoshop. -last_updated: Apr 3, 2020 -template: concept-topic-template -originalLink: https://documentation.spryker.com/v5/docs/heidelpay-installation -originalArticleId: 67bcd483-2e01-4784-8db0-7971fb288eec -redirect_from: - - /v5/docs/heidelpay-installation - - /v5/docs/en/heidelpay-installation -related: - - title: Heidelpay - link: docs/scos/user/technology-partners/page.version/payment-partners/heidelpay.html - - title: Integrating Heidelpay - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/heidelpay/integrating-heidelpay.html - - title: Integrating the Credit Card Secure payment method for Heidelpay - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/heidelpay/integrating-payment-methods-for-heidelpay/integrating-the-credit-card-secure-payment-method-for-heidelpay.html - - title: Configuring Heidelpay - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/heidelpay/configuring-heidelpay.html - - title: Integrating the Direct Debit payment method for Heidelpay - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/heidelpay/integrating-payment-methods-for-heidelpay/integrating-the-direct-debit-payment-method-for-heidelpay.html - - title: Integrating the Paypal Authorize payment method for Heidelpay - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/heidelpay/integrating-payment-methods-for-heidelpay/integrating-the-paypal-authorize-payment-method-for-heidelpay.html - - title: Heidelpay workflow for errors - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/heidelpay/heidelpay-workflow-for-errors.html - - title: Integrating the Split-payment Marketplace payment method for Heidelpay - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/heidelpay/integrating-payment-methods-for-heidelpay/integrating-the-split-payment-marketplace-payment-method-for-heidelpay.html - - title: Integrating the Easy Credit payment method for Heidelpay - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/heidelpay/integrating-payment-methods-for-heidelpay/integrating-the-easy-credit-payment-method-for-heidelpay.html ---- - -To install Heidelpay, if necessary, add the Heidelpay repo to your repositories in composer.json: - - ```php - "repositories": [ - ... - { - "type": "git", - "url": "https://github.com/spryker-eco/Heidelpay.git" - } - ], - ``` - -and run the following console command: -```php -composer require spryker-eco/heidelpay -``` diff --git a/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/heidelpay/integrating-heidelpay.md b/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/heidelpay/integrating-heidelpay.md deleted file mode 100644 index 16cd5362c74..00000000000 --- a/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/heidelpay/integrating-heidelpay.md +++ /dev/null @@ -1,286 +0,0 @@ ---- -title: Integrating Heidelpay -description: This article contains information on integrating the Heidelpay module into the Spryker Commerce OS. -last_updated: Apr 3, 2020 -template: concept-topic-template -originalLink: https://documentation.spryker.com/v5/docs/heidelpay-integration-scos -originalArticleId: ae1be6c7-db19-4b46-9e12-d173acf18ed6 -redirect_from: - - /v5/docs/heidelpay-integration-scos - - /v5/docs/en/heidelpay-integration-scos -related: - - title: Heidelpay - link: docs/scos/user/technology-partners/page.version/payment-partners/heidelpay.html - - title: Integrating the Credit Card Secure payment method for Heidelpay - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/heidelpay/integrating-payment-methods-for-heidelpay/integrating-the-credit-card-secure-payment-method-for-heidelpay.html - - title: Configuring Heidelpay - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/heidelpay/configuring-heidelpay.html - - title: Integrating the Direct Debit payment method for Heidelpay - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/heidelpay/integrating-payment-methods-for-heidelpay/integrating-the-direct-debit-payment-method-for-heidelpay.html - - title: Integrating the Paypal Authorize payment method for Heidelpay - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/heidelpay/integrating-payment-methods-for-heidelpay/integrating-the-paypal-authorize-payment-method-for-heidelpay.html - - title: Installing Heidelpay - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/heidelpay/installing-heidelpay.html - - title: Heidelpay workflow for errors - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/heidelpay/heidelpay-workflow-for-errors.html - - title: Integrating the Split-payment Marketplace payment method for Heidelpay - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/heidelpay/integrating-payment-methods-for-heidelpay/integrating-the-split-payment-marketplace-payment-method-for-heidelpay.html - - title: Integrating the Easy Credit payment method for Heidelpay - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/heidelpay/integrating-payment-methods-for-heidelpay/integrating-the-easy-credit-payment-method-for-heidelpay.html ---- - -To integrate Heidelpay, follow the steps below: - -## Back-end Integration - -1. Add sub form plugins and payment method handlers: - -Pyz\Yves\CheckoutPage\CheckoutPageDependencyProvider - -```php - protected function addSubFormPluginCollection(Container $container): Container -{ - $container[self::PAYMENT_SUB_FORMS] = function () { - $subFormPluginCollection = new SubFormPluginCollection(); - ... - $subFormPluginCollection->add(new HeidelpaySofortSubFormPlugin()); - $subFormPluginCollection->add(new HeidelpayPaypalAuthorizeSubFormPlugin()); - $subFormPluginCollection->add(new HeidelpayPaypalDebitSubFormPlugin()); - $subFormPluginCollection->add(new HeidelpayIdealSubFormPlugin()); - $subFormPluginCollection->add(new HeidelpayCreditCardSecureSubFormPlugin()); - - return $subFormPluginCollection; - }; - - return $container; -} - -protected function addPaymentMethodHandlerPluginCollection(Container $container): -{ - $container[self::PAYMENT_METHOD_HANDLER] = function () { - $stepHandlerPluginCollection = new StepHandlerPluginCollection(); - ... - $stepHandlerPluginCollection->add(new HeidelpayHandlerPlugin(), PaymentTransfer::HEIDELPAY_SOFORT); - $stepHandlerPluginCollection->add(new HeidelpayHandlerPlugin(), PaymentTransfer::HEIDELPAY_PAYPAL_AUTHORIZE); - $stepHandlerPluginCollection->add(new HeidelpayHandlerPlugin(), PaymentTransfer::HEIDELPAY_PAYPAL_DEBIT); - $stepHandlerPluginCollection->add(new HeidelpayHandlerPlugin(), PaymentTransfer::HEIDELPAY_IDEAL); - $stepHandlerPluginCollection->add(new HeidelpayCreditCardHandlerPlugin(), PaymentTransfer::HEIDELPAY_CREDIT_CARD_SECURE); - - return $stepHandlerPluginCollection; - }; - - return $container; -} -``` - -2. Add controller provider: - -\Pyz\Yves\ShopApplication\YvesBootstrap - -```php - protected function getControllerProviderStack($isSsl) -{ - return [ - ... - new HeidelpayControllerProvider($isSsl), - ];> -} -``` - -3. Add checkout plugins: - -\Pyz\Zed\Checkout\CheckoutDependencyProvider - -```php - protected function getCheckoutOrderSavers(Container $container) -{ - $plugins = [ - ... - new HeidelpaySaveOrderPlugin(), - ]; - - return $plugins; -} - -protected function getCheckoutPostHooks(Container $container) -{ - return [ - ... - new HeidelpayPostSavePlugin(), - ]; -} -``` - -4. Add OMS commands and conditions: - -\Pyz\Zed\Oms\OmsDependencyProvider - -```php -public function provideBusinessLayerDependencies(Container $container) -{ - $container = parent::provideBusinessLayerDependencies($container); - $container = $this->addCommandPlugins($container); - $container = $this->addConditionPlugins($container); - - return $container; -} -protected function addConditionPlugins(Container $container): Container -{ - $container[self::CONDITION_PLUGINS] = function () { - $conditionCollection = new ConditionCollection(); - $conditionCollection->add(new IsAuthorizationCompletedPlugin(), 'Heidelpay/IsAuthorizationCompleted'); - $conditionCollection->add(new IsDebitCompletedPlugin(), 'Heidelpay/IsDebitCompleted'); - $conditionCollection->add(new IsCaptureApprovedPlugin(), 'Heidelpay/IsCaptureApproved'); - - return $conditionCollection; - }; - - return $container; -} - -protected function addCommandPlugins(Container $container): Container -{ - $container[self::COMMAND_PLUGINS] = function () { - $commandCollection = new CommandCollection(); - $commandCollection->add(new SendOrderConfirmationPlugin(), 'Oms/SendOrderConfirmation'); - $commandCollection->add(new SendOrderShippedPlugin(), 'Oms/SendOrderShipped'); - $commandCollection->add(new AuthorizePlugin(), 'Heidelpay/Authorize'); - $commandCollection->add(new DebitPlugin(), 'Heidelpay/Debit'); - $commandCollection->add(new CapturePlugin(), 'Heidelpay/Capture'); - - return $commandCollection; - }; - - return $container; -} -``` - -## Front-end Integration - -To make Heidelpay module work with your project, it's necessary to extend the frontend part: - -tsconfig.json - -```json - "include": [ - "./vendor/spryker/spryker-shop/**/*", - "./vendor/spryker-eco/**/*", - "./src/Pyz/Yves/**/*" -], -``` - -frontend/settings.js - -```bash - // eco folders -eco: { - // all modules - modules: './vendor/spryker-eco' -}, -... - componentEntryPoints: { - // absolute dirs in which look for - dirs: [ - ... - path.join(context, paths.eco.modules), - ... - ], - ``` - -src/Pyz/Yves/CheckoutPage/Theme/default/views/payment/payment.twig - -```twig - ... - -{% raw %}{%{% endraw %} block content {% raw %}%}{% endraw %} - {% raw %}{%{% endraw %} embed molecule('form') with { - class: 'box', - data: { - form: data.forms.payment, - options: { - attr: { - id: 'payment-form' - } - }, - submit: { - enable: true, - text: 'checkout.step.summary' | trans - }, - cancel: { - enable: true, - url: data.backUrl, - text: 'general.back.button' | trans - } - } - } only {% raw %}%}{% endraw %} - {% raw %}{%{% endraw %} block fieldset {% raw %}%}{% endraw %} - {% raw %}{%{% endraw %} for name, choices in data.form.paymentSelection.vars.choices {% raw %}%}{% endraw %} - {% raw %}{%{% endraw %} set paymentProviderIndex = loop.index {% raw %}%}{% endraw %} -
    {% raw %}{{{% endraw %} ('checkout.payment.provider.' ~ name) | trans {% raw %}}}{% endraw %}
    -
      - {% raw %}{%{% endraw %} for key, choice in choices {% raw %}%}{% endraw %} -
    • - {% raw %}{%{% endraw %} embed molecule('form') with { - data: { - form: data.form[data.form.paymentSelection[key].vars.value], - enableStart: false, - enableEnd: false - }, - embed: { - index: loop.index ~ '-' ~ paymentProviderIndex, - toggler: data.form.paymentSelection[key] - } - } only {% raw %}%}{% endraw %} - {% raw %}{%{% endraw %} block fieldset {% raw %}%}{% endraw %} - {% raw %}{%{% endraw %} for name, choices in data.form.paymentSelection.vars.choices {% raw %}%}{% endraw %} - {% raw %}{%{% endraw %} set paymentProviderIndex = (loop.index0) {% raw %}%}{% endraw %} -
      {% raw %}{{{% endraw %} ('checkout.payment.provider.' ~ name) | trans {% raw %}}}{% endraw %}
      -
        - {% raw %}{%{% endraw %} if choices is iterable {% raw %}%}{% endraw %} - {% raw %}{%{% endraw %} for key, choice in choices {% raw %}%}{% endraw %} -
      • - {% raw %}{%{% endraw %} include molecule('payment-method', 'CheckoutPage') with { - data: { - form: data.form[data.form.paymentSelection[key].vars.value], - index: loop.index ~ '-' ~ paymentProviderIndex, - toggler: data.form.paymentSelection[key], - } - } only {% raw %}%}{% endraw %} -
      • - {% raw %}{%{% endraw %} endfor {% raw %}%}{% endraw %} - {% raw %}{%{% endraw %} else {% raw %}%}{% endraw %} -
      • - {% raw %}{%{% endraw %} include molecule('payment-method', 'CheckoutPage') with { - data: { - form: data.form[data.form.paymentSelection[paymentProviderIndex].vars.value], - index: loop.index ~ '-' ~ paymentProviderIndex, - toggler: data.form.paymentSelection[paymentProviderIndex], - parentFormId: data.options.attr.id - } - } only {% raw %}%}{% endraw %} -
      • - {% raw %}{%{% endraw %} endif {% raw %}%}{% endraw %} -
      - {% raw %}{%{% endraw %} endfor {% raw %}%}{% endraw %} - {% raw %}{%{% endraw %} endblock {% raw %}%}{% endraw %} - {% raw %}{%{% endraw %} endembed {% raw %}%}{% endraw %} -
    • - {% raw %}{%{% endraw %} endfor {% raw %}%}{% endraw %} -
    - {% raw %}{%{% endraw %} endfor {% raw %}%}{% endraw %} - {% raw %}{%{% endraw %} endblock {% raw %}%}{% endraw %} - {% raw %}{%{% endraw %} endembed {% raw %}%}{% endraw %} -{% raw %}{%{% endraw %} endblock {% raw %}%}{% endraw %} -``` - -src/Pyz/Yves/Twig/TwigConfig.php - -```twig - protected function addCoreTemplatePaths(array $paths) -{ - ... - $paths[] = APPLICATION_VENDOR_DIR . '/spryker-eco/%1$s/src/SprykerEco/Yves/%1$s/Theme/' . $themeName; - - return $paths; -} -``` diff --git a/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/heidelpay/integrating-payment-methods-for-heidelpay/integrating-the-credit-card-secure-payment-method-for-heidelpay.md b/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/heidelpay/integrating-payment-methods-for-heidelpay/integrating-the-credit-card-secure-payment-method-for-heidelpay.md deleted file mode 100644 index 78f423d431e..00000000000 --- a/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/heidelpay/integrating-payment-methods-for-heidelpay/integrating-the-credit-card-secure-payment-method-for-heidelpay.md +++ /dev/null @@ -1,117 +0,0 @@ ---- -title: Integrating the Credit Card Secure payment method for Heidelpay -description: Integrate Credit Card payment through Heidelpay into the Spryker-based shop. -last_updated: Sep 15, 2020 -template: concept-topic-template -originalLink: https://documentation.spryker.com/v5/docs/heidelpay-credit-card -originalArticleId: 462d69ef-ef32-44ac-968f-6e9b0ef40db5 -redirect_from: - - /v5/docs/heidelpay-credit-card - - /v5/docs/en/heidelpay-credit-card -related: - - title: Heidelpay - link: docs/scos/user/technology-partners/page.version/payment-partners/heidelpay.html - - title: Configuring Heidelpay - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/heidelpay/configuring-heidelpay.html - - title: Integrating the Direct Debit payment method for Heidelpay - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/heidelpay/integrating-payment-methods-for-heidelpay/integrating-the-direct-debit-payment-method-for-heidelpay.html - - title: Integrating the Paypal Authorize payment method for Heidelpay - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/heidelpay/integrating-payment-methods-for-heidelpay/integrating-the-paypal-authorize-payment-method-for-heidelpay.html - - title: Integrating Heidelpay - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/heidelpay/integrating-heidelpay.html - - title: Installing Heidelpay - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/heidelpay/installing-heidelpay.html - - title: Heidelpay workflow for errors - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/heidelpay/heidelpay-workflow-for-errors.html - - title: Integrating the Split-payment Marketplace payment method for Heidelpay - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/heidelpay/integrating-payment-methods-for-heidelpay/integrating-the-split-payment-marketplace-payment-method-for-heidelpay.html - - title: Integrating the Easy Credit payment method for Heidelpay - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/heidelpay/integrating-payment-methods-for-heidelpay/integrating-the-easy-credit-payment-method-for-heidelpay.html ---- - -## Setup - -The following configuration should be made after Heidelpay has been [installed](/docs/scos/dev/technology-partner-guides/{{page.version}}/payment-partners/heidelpay/installing-heidelpay.html) and [integrated](/docs/scos/dev/technology-partner-guides/{{page.version}}/payment-partners/heidelpay/configuring-heidelpay.html). - -## Configuration - -Example (for testing only): -```php -$config[HeidelpayConstants::CONFIG_HEIDELPAY_TRANSACTION_CHANNEL_IDEAL] = '31HA07BC8142C5A171744B56E61281E5'; -+$config[HeidelpayConstants::CONFIG_YVES_CHECKOUT_ASYNC_RESPONSE_URL] = $YVES_HOST_PROTOCOL . '://' . $config[ApplicationConstants::HOST_YVES] . '/heidelpay/cc-register-response'; -``` - -This value should be taken from HEIDELPAY - -## Registration Concept - -Payment flow with credit card is divided into two workflows - based on the existing "Registration" and without/with the new "Registration". **"Registration"** means that customer's **anonymized** credit card data will be persisted in the database in order to use it again next time, if customer **uses the same shipping address**. The idea is visually represented in the image below: -![Click Me](https://spryker.s3.eu-central-1.amazonaws.com/docs/Technology+Partners/Payment+Partners/Heidelpay/Heidelpay+-+Credit+Card+Secure/9241664.png) - -## Checkout Payment Step Display - -With the credit card, two payment options are possible - using the already existing - registration (if available) or creating a new registration (always available) with the payment frame. `CreditCardSecureDataProvider` in Yves is responsible for that (`getOptions()` method). It makes a request into Zed in order to get available payment options, available for the current quote.  - -* Payment option - "new registration". The new credit card registration is done inside of the iframe* on the payment step. To be able to display the iframe, Zed makes a "registration" request for the current quote each time customer accesses the payment step. Iframe URL is generated by Heidelpay for one-time usage. Iframe will contain the standard form for entering credit card data. 
    - -{% info_block errorBox "Attention" %} -Please note that iframe doesn't have a submit button, it will be submitted with javascript when customer submits the payment step. -{% endinfo_block %} - -* Payment option - "last successful registration". Zed will try to find an existing registration for current customer, based on the used shipping address ID (so it's available only for the registered customer). If one is found, then it will be added as a payment option. It contains anonymized credit card data and should be displayed as in the image in the [Registration Concept](#registration-concept) section. Each registration has it's "registration number" hash, which is then used to authorize money on the customer's credit card. - -* for security reasons, merchant is not allowed (or has to obtain a - special permit) to process/store credit card data directly on it's website. - -Each payment option has its own template. You can find and customize it under - `Yves/Theme/default/credit-card/`. - -## Payment Step Submitting - -* When customer chooses a new registration (fills in the payment form in the iframe) and clicks "Go To Summary" button, data inside the payment iframe will be serialised and sent as a POST request to Heidelpay payment system*. Heidelpay then processes the request and sends asynchronous POST request to the shop's `CONFIG_YVES_CHECKOUT_ASYNC_RESPONSE_URL` in Yves (`CreditCardController::registrationRequestAction`). This request will contain an anonymized customer credit card data and registration number (hash). This data will be persisted in Zed for future customer recognition and for the next step. In response, Heidelpay expects to get a plain URL where to redirect customer. In case of failure it is `HeidelpayController::paymentFailedAction()`, and in case of success - `CreditCardController::registrationSuccessAction()`. `RegistrationSuccessAction()` will find customer registration (through Zed) and set it to quote. Then customer is redirected to summary page** -* When customer chooses the existing registration, it is simply set to quote and customer goes to summary step as usual. - -* This javascript behavior can be found and customized under - `assets/Yves/js/modules/creditCardFrame.js` file.
    -
    ** This overhead with payment->registrationRequest->registrationSuccess->summary is necessary, because `registrationRequest` is called asynchronously from the outside, where customer session is not available. Later on, `registrationSuccess` action is called already where customer session is available, so we can add registration to quote there. - -## Summary Review and Order Submitting - -On the review page, it might be necessary to display customer registration details (like anonymised credit card data, etc). For that use `Yves/Heidelpay/Theme/default/partial/summary.twig` as a reference and include it to your summary page template. - -On "save order" event save Heidelpay payment per order and items, as usual. - -When state machine is initialized, an event "send - authorize request" will trigger the authorize request. In case of success, the payment system will return a redirect URL for customer, where the payment can be completed. Request and response will be fully persisted in the database (`spy_payment_heidelpay_transaction_log`).  - -On "post save hook" event, we check in transaction log table if the authorize request was sent successfully and if so, we set external redirect response (URL is obtained from the previous step) and redirect the customer to the payment website, where customer confirms the payment using 3D secure validation and so on. Below is the code sample from `HeidelpayPostSavePlugin`: - -``` -/** - * @method \SprykerEco\Zed\Heidelpay\Business\HeidelpayFacadeInterface getFacade() - * @method \SprykerEco\Zed\Heidelpay\Business\HeidelpayBusinessFactory getFactory() - */ -class HeidelpayPostSavePlugin extends BaseAbstractPlugin implements CheckoutPostCheckPluginInterface -{ - /** - * @param \Generated\Shared\Transfer\QuoteTransfer $quoteTransfer - * @param \Generated\Shared\Transfer\CheckoutResponseTransfer $checkoutResponseTransfer - * - * @return void - */ - public function execute(QuoteTransfer $quoteTransfer, CheckoutResponseTransfer $checkoutResponseTransfer) - { - $this->getFacade()->postSaveHook($quoteTransfer, $checkoutResponseTransfer); - } -} -``` - -On payment confirmation, response is sent to the Heidelpay and Heidelpay makes an asynchronous POST request to the shop's `CONFIG_HEIDELPAY_PAYMENT_RESPONSE_URL` - URL (Yves), with the result of payment (see `HeidelpayController::paymentAction()`). This is called "external response transaction", the result will be persisted in `spy_payment_heidelpay_transaction_log` as usual. - - The most important data here - is the payment reference ID which can be used for further transactions like capture/cancel/etc.  - -In the response Heidelpay expects an URL string which defines where customer has to be redirected. In case if customer successfully confirmed payment, it should be a link to checkout order success step, in case of failure - checkout payment failed action with error code (See See `HeidelpayController::paymentFailedAction()` and [Heidelpay workflow for errors](/docs/scos/dev/technology-partner-guides/{{page.version}}/payment-partners/heidelpay/heidelpay-workflow-for-errors.html) section). Heidelpay redirects customer to the given URL and payment process is finished.  - -Capture the money - later on, when the item is shipped to the customer, it is time to call "capture" command of the state machine to capture money from the customer's account. It is done in CapturePlugin of the OMS command. In the provided basic order state machine for `CreditCardSecureAuthorize` method, command will be executed automatically, when order is manually moved into the "shipped" state. Now order can be considered as "paid". diff --git a/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/heidelpay/integrating-payment-methods-for-heidelpay/integrating-the-direct-debit-payment-method-for-heidelpay.md b/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/heidelpay/integrating-payment-methods-for-heidelpay/integrating-the-direct-debit-payment-method-for-heidelpay.md deleted file mode 100644 index d9ab36b567d..00000000000 --- a/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/heidelpay/integrating-payment-methods-for-heidelpay/integrating-the-direct-debit-payment-method-for-heidelpay.md +++ /dev/null @@ -1,413 +0,0 @@ ---- -title: Integrating the Direct Debit payment method for Heidelpay -description: Integrate direct debit payment through Heidelpay into the Spryker-based shop. -last_updated: Sep 15, 2020 -template: concept-topic-template -originalLink: https://documentation.spryker.com/v5/docs/integrating-the-direct-debit-payment-method-for-heidelpay.html -originalArticleId: 4a6911b7-99b8-45e1-a1ff-624714f73822 -redirect_from: - - /v5/docs/integrating-the-direct-debit-payment-method-for-heidelpay.html - - /v5/docs/en/integrating-the-direct-debit-payment-method-for-heidelpay.html -related: - - title: Heidelpay - link: docs/scos/user/technology-partners/page.version/payment-partners/heidelpay.html - - title: Integrating the Credit Card Secure payment method for Heidelpay - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/heidelpay/integrating-payment-methods-for-heidelpay/integrating-the-credit-card-secure-payment-method-for-heidelpay.html - - title: Configuring Heidelpay - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/heidelpay/configuring-heidelpay.html - - title: Integrating the Paypal Authorize payment method for Heidelpay - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/heidelpay/integrating-payment-methods-for-heidelpay/integrating-the-paypal-authorize-payment-method-for-heidelpay.html - - title: Integrating Heidelpay - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/heidelpay/integrating-heidelpay.html - - title: Installing Heidelpay - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/heidelpay/installing-heidelpay.html - - title: Heidelpay workflow for errors - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/heidelpay/heidelpay-workflow-for-errors.html - - title: Integrating the Easy Credit payment method for Heidelpay - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/heidelpay/integrating-payment-methods-for-heidelpay/integrating-the-easy-credit-payment-method-for-heidelpay.html - - title: Integrating the Invoice Secured B2C payment method for Heidelpay - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/heidelpay/integrating-payment-methods-for-heidelpay/integrating-the-invoice-secured-b2c-payment-method-for-heidelpay.html ---- - -## Setup -The following configuration should be made after Heidelpay has been [installed](/docs/scos/dev/technology-partner-guides/{{page.version}}/payment-partners/heidelpay/installing-heidelpay.html) and [integrated](/docs/scos/dev/technology-partner-guides/{{page.version}}/payment-partners/heidelpay/integrating-heidelpay.html). - -## Configuration -```php -$config[HeidelpayConstants::CONFIG_HEIDELPAY_TRANSACTION_CHANNEL_DIRECT_DEBIT] = ''; //You can use public test account for testing with channel `31HA07BC8142C5A171749A60D979B6E4` but replace it with real one when you go live. Config should be taken from Heidelpay. -$config[HeidelpayConstants::DIRECT_DEBIT_REGISTRATION_ASYNC_RESPONSE_URL] = $config[HeidelpayConstants::CONFIG_YVES_URL] . '/heidelpay/dd-register-response'; // This setting is store sensitive and should be set in store related config (config_default_DE.php for example). - -$config[OmsConstants::PROCESS_LOCATION] = [ - ... - APPLICATION_ROOT_DIR . '/vendor/spryker-eco/heidelpay/config/Zed/Oms', -]; - -$config[OmsConstants::ACTIVE_PROCESSES] = [ - ... - 'HeidelpayDirectDebit01', -]; -$config[SalesConstants::PAYMENT_METHOD_STATEMACHINE_MAPPING] = [ - ... -HeidelpayConfig::PAYMENT_METHOD_DIRECT_DEBIT => 'HeidelpayDirectDebit01', -]; -``` -## The Process of a Direct Debit Account Registration -Payment flow with direct debit is divided into two workflows - based on the new "Registration," and without/with the existing "Registration." Existing "Registration" means that customer's bank account data (IBAN, Account Holder and so on) will be persisted in the database to use it again next time if customer uses the same shipping address. Otherwise, use the new "Registration" option. - -When you go to the checkout payment page and choose the DirectDebit payment method, there are two payment options - to use the already existing registration (if available) or to create a new registration (always available) with the two fields IBAN and Account Holder. Existing registration is available only for registered customer after he placed an order with DirectDebit payment method, and he uses the same shipping address. - -## Integration into Project -All general integration parts of Heidelpay module should be done before the following steps. - -1. Adjust `CheckoutPageDependencyProvider` on project level to add Direct Debit subform and payment method handler. Also, add `HeidelpayClient` into dependencies. It's used in specific `DirectDebitRegistration` checkout step. - -\Pyz\Yves\CheckoutPage\CheckoutPageDependencyProvider - -```php -extendSubFormPluginCollection($container); - $container = $this->extendPaymentMethodHandler($container); - $container = $this->addHeidelpayClient($container); - - return $container; - } - - ... - - /** - * @param \Spryker\Yves\Kernel\Container $container - * - * @return \Spryker\Yves\Kernel\Container - */ - protected function extendSubFormPluginCollection(Container $container): Container - { - $container->extend(static::PAYMENT_SUB_FORMS, function (SubFormPluginCollection $subFormPluginCollection) { - ... - $subFormPluginCollection->add(new HeidelpayDirectDebitSubFormPlugin()); - - return $subFormPluginCollection; - }); - - return $container; - } - - /** - * @param \Spryker\Yves\Kernel\Container $container - * - * @return \Spryker\Yves\Kernel\Container - */ - protected function extendPaymentMethodHandler(Container $container): Container - { - $container->extend(static::PAYMENT_METHOD_HANDLER, function (StepHandlerPluginCollection $stepHandlerPluginCollection) { - ... - $stepHandlerPluginCollection->add(new HeidelpayDirectDebitHandlerPlugin(), HeidelpayConfig::PAYMENT_METHOD_DIRECT_DEBIT); - - return $stepHandlerPluginCollection; - }); - - return $container; - } - - /** - * @param \Spryker\Yves\Kernel\Container $container - * - * @return \Spryker\Yves\Kernel\Container - */ - protected function addHeidelpayClient(Container $container): Container - { - $container[static::CLIENT_HEIDELPAY] = function () use ($container) { - return $container->getLocator()->heidelpay()->client(); - }; - - return $container; - } -} -``` - -2. Extend `StepFactory` on project level to add specific `DirectDebitRegistration` checkout step. This step should be included right before the Payment step. - -\Pyz\Yves\CheckoutPage\Process\StepFactory - -```php -getUrlGenerator(), - CheckoutPageControllerProvider::CHECKOUT_ERROR - ); - - $stepCollection - ->addStep($this->createEntryStep()) - ->addStep($this->createCustomerStep()) - ->addStep($this->createAddressStep()) - ->addStep($this->createShipmentStep()) - ->addStep($this->createHeidelpayDirectDebitRegistrationStep()) - ->addStep($this->createPaymentStep()) - ->addStep($this->createSummaryStep()) - ->addStep($this->createPlaceOrderStep()) - ->addStep($this->createSuccessStep()); - - return $stepCollection; - } - - /** - * @return \Spryker\Yves\StepEngine\Dependency\Step\StepInterface - */ - public function createHeidelpayDirectDebitRegistrationStep(): StepInterface - { - return new HeidelpayDirectDebitRegistrationStep( - CheckoutPageControllerProvider::CHECKOUT_HEIDELPAY_DIRECT_DEBIT_REGISTRATION, - HomePageControllerProvider::ROUTE_HOME, - $this->getHeidelpayClient() - ); - } - - /** - * @return \SprykerEco\Client\Heidelpay\HeidelpayClientInterface - */ - public function getHeidelpayClient(): HeidelpayClientInterface - { - return $this->getProvidedDependency(CheckoutPageDependencyProvider::CLIENT_HEIDELPAY); - } -} -``` - -3. Extend Yves Factory to create `StepFactory` from project level instead of Spryker Core. - -\Pyz\Yves\CheckoutPage\CheckoutPageFactory - -```php -createStepProcess()->process($request); - } -} -``` - -5. Extend `CheckoutPageRouteProviderPlugin` to register controller action described above. - -\Pyz\Yves\CheckoutPage\Controller\CheckoutController - -```php -addDirectDebitRegistrationRoute($routeCollection); - // ... - - return $routeCollection; - } - - /** - * @param \Spryker\Yves\Router\Route\RouteCollection $routeCollection - * - * @return \Spryker\Yves\Router\Route\RouteCollection - */ - protected function addDirectDebitRegistrationRoute(RouteCollection $routeCollection): RouteCollection - { - $route = $this->buildRoute('/checkout/integrating-the-direct-debit-payment-method-for-heidelpay.html-registration', 'CheckoutPage', 'Checkout', 'heidelpayDirectDebitRegistration'); - $routeCollection->add(static::ROUTE_NAME_CHECKOUT_HEIDELPAY_DIRECT_DEBIT_REGISTRATION, $route); - - return $routeCollection; - } -} -``` - -6. Adjust define data section in the template of Checkout Payment step to include DirectDebit payment method template. - -src/Pyz/Yves/CheckoutPage/Theme/default/views/payment/payment.twig - -```twig -... -{% raw %}{%{% endraw %} define data = { - backUrl: _view.previousStepUrl, - forms: { - payment: _view.paymentForm - }, - - title: 'checkout.step.payment.title' | trans, - customForms: { - ... - 'heidelpay/direct-debit': ['direct-debit', 'heidelpay'], - } -} {% raw %}%}{% endraw %} -... -``` - -7. Adjust `OmsDependencyProvider` to add debit on registration and refund OMS commands and conditions related to it. - -\Pyz\Zed\Oms\OmsDependencyProvider - -```php -extendCommandPlugins($container); - $container = $this->extendConditionPlugins($container); - - return $container; - } - - /** - * @param \Spryker\Zed\Kernel\Container $container - * - * @return \Spryker\Zed\Kernel\Container - */ - protected function extendCommandPlugins(Container $container): Container - { - $container->extend(self::COMMAND_PLUGINS, function (CommandCollectionInterface $commandCollection) { - ... - $commandCollection->add(new DebitOnRegistrationPlugin(), 'Heidelpay/DebitOnRegistration'); - $commandCollection->add(new RefundPlugin(), 'Heidelpay/Refund'); - - return $commandCollection; - }); - - return $container; - } - - /** - * @param \Spryker\Zed\Kernel\Container $container - * - * @return \Spryker\Zed\Kernel\Container - */ - protected function extendConditionPlugins(Container $container): Container - { - $container->extend(OmsDependencyProvider::CONDITION_PLUGINS, function (ConditionCollectionInterface $conditionCollection) { - ... - $conditionCollection->add(new IsDebitOnRegistrationCompletedPlugin(), 'Heidelpay/IsDebitOnRegistrationCompleted'); - $conditionCollection->add(new IsRefundedPlugin(), 'Heidelpay/IsRefunded'); - - return $conditionCollection; - }); - - return $container; - } -} -``` - -## OMS State Machine -You can find an example of DirectDebit state machine in `vendor/spryker-eco/heidelpay/config/Zed/Oms/HeidelpayDirectDebit01.xml` - -The state machine includes two main processes: **Debit on Registration** and **Refund**. After the order is placed successfully, the debit process starts. In this process, we use the identification of direct debit registration. In case of return order refund process is used. - diff --git a/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/heidelpay/integrating-payment-methods-for-heidelpay/integrating-the-easy-credit-payment-method-for-heidelpay.md b/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/heidelpay/integrating-payment-methods-for-heidelpay/integrating-the-easy-credit-payment-method-for-heidelpay.md deleted file mode 100644 index 4273ae48e4d..00000000000 --- a/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/heidelpay/integrating-payment-methods-for-heidelpay/integrating-the-easy-credit-payment-method-for-heidelpay.md +++ /dev/null @@ -1,552 +0,0 @@ ---- -title: Integrating the Easy Credit payment method for Heidelpay -description: Integrate easy credit payment through Heidelpay into the Spryker-based shop. -last_updated: Sep 15, 2020 -template: concept-topic-template -originalLink: https://documentation.spryker.com/v5/docs/heidelpay-easy-credit -originalArticleId: ff6398ff-8a51-46e6-8fa0-4dd78784a5f9 -redirect_from: - - /v5/docs/heidelpay-easy-credit - - /v5/docs/en/heidelpay-easy-credit -related: - - title: Heidelpay - link: docs/scos/user/technology-partners/page.version/payment-partners/heidelpay.html - - title: Integrating the Credit Card Secure payment method for Heidelpay - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/heidelpay/integrating-payment-methods-for-heidelpay/integrating-the-credit-card-secure-payment-method-for-heidelpay.html - - title: Configuring Heidelpay - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/heidelpay/configuring-heidelpay.html - - title: Integrating the Paypal Authorize payment method for Heidelpay - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/heidelpay/integrating-payment-methods-for-heidelpay/integrating-the-paypal-authorize-payment-method-for-heidelpay.html - - title: Integrating Heidelpay - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/heidelpay/integrating-heidelpay.html - - title: Integrating the Direct Debit payment method for Heidelpay - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/heidelpay/integrating-payment-methods-for-heidelpay/integrating-the-direct-debit-payment-method-for-heidelpay.html - - title: Installing Heidelpay - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/heidelpay/installing-heidelpay.html - - title: Heidelpay workflow for errors - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/heidelpay/heidelpay-workflow-for-errors.html - - title: Integrating the Invoice Secured B2C payment method for Heidelpay - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/heidelpay/integrating-payment-methods-for-heidelpay/integrating-the-invoice-secured-b2c-payment-method-for-heidelpay.html ---- - -## Setup - -The following configuration should be implemented after Heidelpay has been [installed](/docs/scos/dev/technology-partner-guides/{{page.version}}/payment-partners/heidelpay/installing-heidelpay.html) and [integrated](/docs/scos/dev/technology-partner-guides/{{page.version}}/payment-partners/heidelpay/integrating-heidelpay.html). - -## Configuration - -| Configuration Key | Type | Description | -| --- | --- | --- | -| `HeidelpayConstants::CONFIG_HEIDELPAY_EASYCREDIT_CRITERIA_REJECTED_DELIVERY_ADDRESS` | string | Criteria to reject by delivery address (for example 'Packstation') | -| `HeidelpayConstants::CONFIG_HEIDELPAY_EASYCREDIT_CRITERIA_GRAND_TOTAL_LESS_THAN` | int | Criteria to reject if grand total less than (for example 200) | -| `HeidelpayConstants::CONFIG_HEIDELPAY_EASYCREDIT_CRITERIA_GRAND_TOTAL_MORE_THAN` | int | Criteria to reject if grand total greater than (for example 5000) | -| `HeidelpayConstants::CONFIG_HEIDELPAY_TRANSACTION_CHANNEL_EASY_CREDIT` | string | Transaction channel for Easy Credit payment method (provided by Heidelpay) | - -1. Activate Heidelpay Easycredit payment method. - -**OMS Configuration** - -```php -$config[OmsConstants::PROCESS_LOCATION] = [ - ... - APPLICATION_ROOT_DIR . '/vendor/spryker-eco/heidelpay/config/Zed/Oms', -]; -$config[OmsConstants::ACTIVE_PROCESSES] = [ - ... - 'HeidelpayEasyCredit01', -]; -$config[SalesConstants::PAYMENT_METHOD_STATEMACHINE_MAPPING] = [ - ... - HeidelpayConfig::PAYMENT_METHOD_EASY_CREDIT => 'HeidelpayEasyCredit01', -]; -``` - -2. Add Easycredit checkout steps to `StepFactory`. - -\Pyz\Yves\CheckoutPage\Process\StepFactory - -```php -getUrlGenerator(), - CheckoutPageControllerProvider::CHECKOUT_ERROR - ); - - $stepCollection - ->addStep($this->createEntryStep()) - ->addStep($this->createCustomerStep()) - ->addStep($this->createAddressStep()) - ->addStep($this->createShipmentStep()) - ->addStep($this->createHeidelpayEasyCreditInitializeStep()) - ->addStep($this->createPaymentStep()) - ->addStep($this->createHeidelpayEasyCreditStep()) - ->addStep($this->createSummaryStep()) - ->addStep($this->createPlaceOrderStep()) - ->addStep($this->createSuccessStep()); - - return $stepCollection; - } - - /** - * @return \SprykerEco\Yves\Heidelpay\CheckoutPage\Process\Steps\HeidelpayEasycreditInitializeStep - */ - public function createHeidelpayEasyCreditInitializeStep(): HeidelpayEasycreditInitializeStep - { - return new HeidelpayEasycreditInitializeStep( - CheckoutPageControllerProvider::CHECKOUT_EASYCREDIT_INITIALIZE, - HomePageControllerProvider::ROUTE_HOME, - $this->getHeidelpayClient() - ); - } - - /** - * @return \SprykerEco\Yves\Heidelpay\CheckoutPage\Process\Steps\HeidelpayEasycreditStep - */ - public function createHeidelpayEasyCreditStep(): HeidelpayEasycreditStep - { - return new HeidelpayEasycreditStep( - CheckoutPageControllerProvider::CHECKOUT_EASYCREDIT, - HomePageControllerProvider::ROUTE_HOME - ); - } - - /** - * @return \SprykerEco\Client\Heidelpay\HeidelpayClientInterface - */ - public function getHeidelpayClient(): HeidelpayClientInterface - { - return $this->getProvidedDependency(CheckoutPageDependencyProvider::CLIENT_HEIDELPAY); - } -} -``` - -3. Extend `CheckoutPageFactory` to change step factory creation: - -\Pyz\Yves\CheckoutPage\CheckoutPageFactory - -```php -createStepProcess()->process($request); - } -} -``` - -5. Extend `CheckoutPageRouteProviderPlugin` to add `Easycredit` actions: - -\Pyz\Yves\CheckoutPage\Plugin\Router\CheckoutPageControllerProvider - -```php -buildRoute('/checkout/easycredit', 'CheckoutPage', 'Checkout', 'easyCreditAction'); - $routeCollection->add(static::ROUTE_NAME_CHECKOUT_EASYCREDIT, $route); - - $route = $this->buildRoute('/checkout/easycredit-initialize', 'CheckoutPage', 'Checkout', 'easyCreditAction'); - $routeCollection->add(static::ROUTE_NAME_CHECKOUT_EASYCREDIT_INITIALIZE, $route); - - return $routeCollection; - } -} -``` - -6. Update `CheckoutPageDependencyProvider` with `Easycredit` related modifications: - -\Pyz\Yves\CheckoutPage\CheckoutPageDependencyProvider - -```php -addHeidelpayClient($container); - - return $container; - } - - /** - * @param \Spryker\Yves\Kernel\Container $container - * - * @return \Spryker\Yves\Kernel\Container - */ - protected function addSubFormPluginCollection(Container $container): Container - { - $container[self::PAYMENT_SUB_FORMS] = function () { - $subFormPluginCollection = new SubFormPluginCollection(); - ... - $subFormPluginCollection->add(new HeidelpayEasyCreditSubFormPlugin()); - - return $subFormPluginCollection; - }; - - return $container; - } - - /** - * @param \Spryker\Yves\Kernel\Container $container - * - * @return \Spryker\Yves\Kernel\Container - */ - protected function addPaymentMethodHandlerPluginCollection(Container $container): Container - { - $container[self::PAYMENT_METHOD_HANDLER] = function () { - $stepHandlerPluginCollection = new StepHandlerPluginCollection(); - ... - $stepHandlerPluginCollection->add(new HeidelpayHandlerPlugin(), PaymentTransfer::HEIDELPAY_EASY_CREDIT); - - return $stepHandlerPluginCollection; - }; - - return $container; - } - - /** - * @param \Spryker\Yves\Kernel\Container $container - * - * @return \Spryker\Yves\Kernel\Container - */ - protected function addHeidelpayClient(Container $container): Container - { - $container[static::CLIENT_HEIDELPAY] = function () use ($container) { - return $container->getLocator()->heidelpay()->client(); - }; - - return $container; - } -} -``` - -7. Update `payment.twig` template with `Easycredit` payment method: - -src/Pyz/Yves/CheckoutPage/Theme/default/views/payment/payment.twig - -```html -{% raw %}{%{% endraw %} extends template('page-layout-checkout', 'CheckoutPage') {% raw %}%}{% endraw %} - -{% raw %}{%{% endraw %} define data = { - backUrl: _view.previousStepUrl, - forms: { - payment: _view.paymentForm - }, - - title: 'checkout.step.payment.title' | trans, - customForms: { - ... - 'heidelpay/easy-credit': ['easy-credit', 'heidelpay'], - } -} {% raw %}%}{% endraw %} - -{% raw %}{%{% endraw %} block content {% raw %}%}{% endraw %} - ... -{% raw %}{%{% endraw %} endblock {% raw %}%}{% endraw %} -``` - -8. Update `summary.twig` to template to display `Easycredit` related fees: -
    -src/Pyz/Yves/CheckoutPage/Theme/default/views/payment/payment.twig - -```html -{% raw %}{%{% endraw %} extends template('page-layout-checkout', 'CheckoutPage') {% raw %}%}{% endraw %} - -{% raw %}{%{% endraw %} define data = { - backUrl: _view.previousStepUrl, - transfer: _view.quoteTransfer, - cartItems: _view.cartItems, - shippingAddress: _view.quoteTransfer.shippingAddress, - billingAddress: _view.quoteTransfer.billingAddress, - shipmentMethod: _view.quoteTransfer.shipment.method.name, - paymentMethod: _view.quoteTransfer.payment.paymentMethod, - heidelpayEasyCredit: _view.quoteTransfer.payment.heidelpayEasyCredit | default(null), - - forms: { - summary: _view.summaryForm - }, - - overview: { - shipmentMethod: _view.quoteTransfer.shipment.method.name, - expenses: _view.quoteTransfer.expenses, - voucherDiscounts: _view.quoteTransfer.voucherDiscounts, - cartRuleDiscounts: _view.quoteTransfer.cartRuleDiscounts, - - prices: { - subTotal: _view.quoteTransfer.totals.subtotal, - storeCurrency: _view.quoteTransfer.shipment.method.storeCurrencyPrice, - grandTotal: _view.quoteTransfer.totals.grandtotal, - tax: _view.quoteTransfer.totals.taxtotal.amount, - discountTotal: _view.quoteTransfer.totals.discounttotal | default - } - }, - - title: 'checkout.step.summary.title' | trans -} {% raw %}%}{% endraw %} - -{% raw %}{%{% endraw %} block content {% raw %}%}{% endraw %} -
    -
    -
    - {% raw %}{{{% endraw %} 'checkout.step.summary.with_method' | trans {% raw %}}}{% endraw %} {% raw %}{{{% endraw %}data.paymentMethod{% raw %}}}{% endraw %} -
    {% raw %}{{{% endraw %} 'checkout.step.summary.payment' | trans {% raw %}}}{% endraw %}
    -
    - {% raw %}{%{% endraw %} if data.heidelpayEasyCredit is not null {% raw %}%}{% endraw %} - {% raw %}{{{% endraw %} data.heidelpayEasyCredit.amortisationText {% raw %}}}{% endraw %} - -
    -
    -
      -
    • {% raw %}{{{% endraw %} 'heidelpay.payment.easy_credit.order_total' | trans {% raw %}}}{% endraw %} {% raw %}{{{% endraw %} data.heidelpayEasyCredit.totalOrderAmount | money {% raw %}}}{% endraw %}
    • -
    • {% raw %}{{{% endraw %} 'heidelpay.payment.easy_credit.interest' | trans {% raw %}}}{% endraw %} {% raw %}{{{% endraw %} data.heidelpayEasyCredit.accruingInterest | money {% raw %}}}{% endraw %}
    • -
    • {% raw %}{{{% endraw %} 'heidelpay.payment.easy_credit.total_inc_interest' | trans {% raw %}}}{% endraw %} {% raw %}{{{% endraw %} data.heidelpayEasyCredit.totalAmount | money {% raw %}}}{% endraw %}
    • -
    -
    - {% raw %}{%{% endraw %} endif {% raw %}%}{% endraw %} -
    - - {% raw %}{%{% endraw %} include molecule('display-address') with { - class: 'text-small', - data: { - address: data.billingAddress - } - } only {% raw %}%}{% endraw %} -
    - -
    - {% raw %}{{{% endraw %} 'checkout.step.summary.with_method' | trans {% raw %}}}{% endraw %} {% raw %}{{{% endraw %} data.shipmentMethod {% raw %}}}{% endraw %} -
    {% raw %}{{{% endraw %} 'checkout.step.summary.shipping' | trans {% raw %}}}{% endraw %}
    -
    - - {% raw %}{%{% endraw %} include molecule('display-address') with { - class: 'text-small', - data: { - address: data.shippingAddress - } - } only {% raw %}%}{% endraw %} -
    -
    - -
    -
    - {% raw %}{%{% endraw %} for item in data.cartItems {% raw %}%}{% endraw %} - {% raw %}{%{% endraw %} set item = item.bundleProduct is defined ? item.bundleProduct : item {% raw %}%}{% endraw %} - {% raw %}{%{% endraw %} embed molecule('summary-item', 'CheckoutPage') with { - data: { - name: item.name, - quantity: item.quantity, - price: item.sumPrice | money, - options: item.productOptions | default({}), - bundleItems: item.bundleItems | default([]), - quantitySalesUnit: item.quantitySalesUnit, - amountSalesUnit: item.amountSalesUnit, - amount: item.amount - }, - embed: { - isLast: not loop.last, - item: item - } - } only {% raw %}%}{% endraw %} - {% raw %}{%{% endraw %} block body {% raw %}%}{% endraw %} - {% raw %}{{{% endraw %}parent(){% raw %}}}{% endraw %} - {% raw %}{%{% endraw %} if widgetExists('CartNoteQuoteItemNoteWidgetPlugin') {% raw %}%}{% endraw %} - {% raw %}{%{% endraw %} if embed.item.cartNote is not empty {% raw %}%}{% endraw %} - {% raw %}{{{% endraw %} widget('CartNoteQuoteItemNoteWidgetPlugin', embed.item) {% raw %}}}{% endraw %} {# @deprecated Use molecule('note-list', 'CartNoteWidget') instead. #} - {% raw %}{%{% endraw %} endif {% raw %}%}{% endraw %} - {% raw %}{%{% endraw %} elseif embed.item.cartNote is not empty {% raw %}%}{% endraw %} - {% raw %}{%{% endraw %} include molecule('note-list', 'CartNoteWidget') ignore missing with { - data: { - label: 'cart_note.checkout_page.item_note', - note: embed.item.cartNote - } - } only {% raw %}%}{% endraw %} - {% raw %}{%{% endraw %} endif {% raw %}%}{% endraw %} - {% raw %}{%{% endraw %} if embed.isLast {% raw %}%}{% endraw %}
    {% raw %}{%{% endraw %} endif {% raw %}%}{% endraw %} - {% raw %}{%{% endraw %} endblock {% raw %}%}{% endraw %} - {% raw %}{%{% endraw %} endembed {% raw %}%}{% endraw %} - {% raw %}{%{% endraw %} endfor {% raw %}%}{% endraw %} -
    - - {% raw %}{%{% endraw %} if data.transfer.cartNote is not empty {% raw %}%}{% endraw %} - {% raw %}{%{% endraw %} if widgetExists('CartNoteQuoteNoteWidgetPlugin') {% raw %}%}{% endraw %} -
    - {% raw %}{{{% endraw %} widget('CartNoteQuoteNoteWidgetPlugin', data.transfer) {% raw %}}}{% endraw %} {#@deprecated Use molecule('note-list', 'CartNoteWidget') instead.#} -
    - {% raw %}{%{% endraw %} else {% raw %}%}{% endraw %} -
    - {% raw %}{%{% endraw %} include molecule('note-list', 'CartNoteWidget') ignore missing with { - data: { - label: 'cart_note.checkout_page.quote_note', - note: data.transfer.cartNote - } - } only {% raw %}%}{% endraw %} -
    - {% raw %}{%{% endraw %} endif {% raw %}%}{% endraw %} - {% raw %}{%{% endraw %} endif {% raw %}%}{% endraw %} - -
    - {% raw %}{%{% endraw %} widget 'CheckoutVoucherFormWidget' args [data.transfer] only {% raw %}%}{% endraw %} - {% raw %}{%{% endraw %} elsewidget 'CheckoutVoucherFormWidgetPlugin' args [data.transfer] only {% raw %}%}{% endraw %} {# @deprecated Use CheckoutVoucherFormWidget instead. #} - {% raw %}{%{% endraw %} endwidget {% raw %}%}{% endraw %} -
    - - {% raw %}{%{% endraw %} embed molecule('form') with { - class: 'box', - data: { - form: data.forms.summary, - submit: { - enable: can('SeeOrderPlaceSubmitPermissionPlugin'), - text: 'checkout.step.place.order' | trans - }, - cancel: { - enable: true, - url: data.backUrl, - text: 'general.back.button' | trans - } - }, - embed: { - overview: data.overview - } - } only {% raw %}%}{% endraw %} - {% raw %}{%{% endraw %} block body {% raw %}%}{% endraw %} - {% raw %}{%{% endraw %} include molecule('summary-overview', 'CheckoutPage') with { - data: embed.overview - } only {% raw %}%}{% endraw %} - -
    - {% raw %}{{{% endraw %}parent(){% raw %}}}{% endraw %} - {% raw %}{%{% endraw %} endblock {% raw %}%}{% endraw %} - {% raw %}{%{% endraw %} endembed {% raw %}%}{% endraw %} -
    -
    -{% raw %}{%{% endraw %} endblock {% raw %}%}{% endraw %} -``` -
    -
    - -## Checkout Payment Step Display -Displays payment method name with a radio button. No extra input fields are required. - -## Payment Step Submitting -No further actions are needed, the quote being filled with payment method selection as default. After selecting Easy Credit as a payment method "HP.IN" request will be sent. In the response, Heidelpay returns an URL string which defines where the customer has to be redirected. If everything was ok, the user would be redirected to the Easy Credit Externally. - -## Summary Review and Order Submitting -Once the customer is redirected back to us, the response from Easy Credit is sent to the Heidelpay, and Heidelpay makes a synchronous POST request to the shop's `CONFIG_HEIDELPAY_PAYMENT_RESPONSE_URL URL` (Yves), with the result of payment (see `EasyCreditController::paymentAction()`). It is called "external response transaction," the result will be persisted in `spy_payment_heidelpay_transaction_log` as usual. The most important data here - is the payment reference ID which can be used for further transactions like `finalize/reserve/etc`. - -After that, the customer can see the order summary page, where they can review all related data. - -There the user will see: - -* rate plan (`CRITERION.EASYCREDIT_AMORTISATIONTEXT`) -* interest fees (`CRITERION_EASYCREDIT_ACCRUINGINTEREST`) -* total sum including the interest fees (`CRITERION.EASYCREDIT_TOTALAMOUNT`) - -If the customer has not yet completed the HP.IN they must do that again. - -**On the "save order" event** - save Heidelpay payment per order and items, as usual. - -**When the state machine is initialized**, an event "send authorize on registration request" will trigger the authorize on registration request. In case of success, the state will be changed. - -Finalize - later on, when the item is shipped to the customer, it is time to call "finalize" command of the state machine. This will send HP.FI request to the Payment API. This is done in FinalizePlugin of the OMS command. - diff --git a/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/heidelpay/integrating-payment-methods-for-heidelpay/integrating-the-ideal-payment-method-for-heidelpay.md b/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/heidelpay/integrating-payment-methods-for-heidelpay/integrating-the-ideal-payment-method-for-heidelpay.md deleted file mode 100644 index cbaab0a4627..00000000000 --- a/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/heidelpay/integrating-payment-methods-for-heidelpay/integrating-the-ideal-payment-method-for-heidelpay.md +++ /dev/null @@ -1,67 +0,0 @@ ---- -title: Integrating the iDeal payment method for Heidelpay -description: Integrate iDeal payment through Heidelpay into the Spryker-based shop. -last_updated: Sep 15, 2020 -template: concept-topic-template -originalLink: https://documentation.spryker.com/v5/docs/heidelpay-ideal -originalArticleId: 0c6b9c6f-6d54-45d3-a7c8-d204e92358e1 -redirect_from: - - /v5/docs/heidelpay-ideal - - /v5/docs/en/heidelpay-ideal -related: - - title: Heidelpay - link: docs/scos/user/technology-partners/page.version/payment-partners/heidelpay.html - - title: Integrating the Easy Credit payment method for Heidelpay - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/heidelpay/integrating-payment-methods-for-heidelpay/integrating-the-easy-credit-payment-method-for-heidelpay.html - - title: Integrating Heidelpay - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/heidelpay/integrating-heidelpay.html - - title: Integrating the Paypal Debit payment method for Heidelpay - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/heidelpay/integrating-payment-methods-for-heidelpay/integrating-the-paypal-debit-payment-method-for-heidelpay.html - - title: Integrating the Split-payment Marketplace payment method for Heidelpay - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/heidelpay/integrating-payment-methods-for-heidelpay/integrating-the-split-payment-marketplace-payment-method-for-heidelpay.html - - title: Configuring Heidelpay - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/heidelpay/configuring-heidelpay.html - - title: Integrating the Invoice Secured B2C payment method for Heidelpay - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/heidelpay/integrating-payment-methods-for-heidelpay/integrating-the-invoice-secured-b2c-payment-method-for-heidelpay.html - - title: Integrating the Direct Debit payment method for Heidelpay - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/heidelpay/integrating-payment-methods-for-heidelpay/integrating-the-direct-debit-payment-method-for-heidelpay.html - - title: Installing Heidelpay - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/heidelpay/installing-heidelpay.html ---- - -### Setup - -The following configuration should be made after Heidelpay has been [installed](/docs/scos/dev/technology-partner-guides/{{page.version}}/payment-partners/heidelpay/installing-heidelpay.html) and [integrated](/docs/scos/dev/technology-partner-guides/{{page.version}}/payment-partners/heidelpay/integrating-heidelpay.html). - -#### Configuration - -Example (for testing only): -```php -$config[HeidelpayConstants::CONFIG_HEIDELPAY_TRANSACTION_CHANNEL_IDEAL] = '31HA07BC8142C5A171744B56E61281E5'; -``` -This value should be taken from HEIDELPAY. - -#### Checkout Payment Step Display - -Displays payment method name with a radio button. No extra input fields are required. - -#### Payment Step Submitting - -No extra actions needed, quote being filled with payment method selection as default. - -#### Summary Review and Order - Submitting - -On "save order" event - save Heidelpay payment per order and items, as usual. - -When state machine is initialized, an event "send authorize request" will trigger the authorize request. In case of success, the payment system will return a redirect URL for customer, where the payment can be completed. Request and response will be fully persisted in the database (`spy_payment_heidelpay_transaction_log`).  - -On "post save hook" event we check in transaction log table if the authorize request was sent successfully and if so, we set an external redirect response to the next step (`IdealController::authorizeAction()`) where the form will be displayed with 3 fields: bank country, bank name and account holder name. The URL obtained in the previous step will be a "form action". When customer submits the form, he will be redirected to the iDeal website to complete the payment.  - -On payment confirmation, response from iDeal is sent to the Heidelpay and Heidelpay makes an asynchronous POST request to the shop's `CONFIG_HEIDELPAY_PAYMENT_RESPONSE_URL` URL (Yves), with the result of payment (see `HeidelpayController::paymentAction()`). This is called "external response transaction", the result will be persisted in `spy_payment_heidelpay_transaction_log` as usual. - - The most important data here - is the payment reference ID which can be used for further transactions like capture/cancel/etc.  - -In the response Heidelpay expects an URL string which defines where customer has to be redirected. In case if customer successfully confirmed payment, it should be a link to the checkout order success step, in case of the failure - checkout payment failed action with the error code (see `HeidelpayController::paymentFailedAction()` and [Heidelpay workflow for errors](/docs/scos/dev/technology-partner-guides/{{page.version}}/payment-partners/heidelpay/heidelpay-workflow-for-errors.html) section). Heidelpay redirects customer to the given URL and the payment process is finished.  - -Capture the money - later on, when the item is shipped to the customer, it is time to call "capture" command of the state machine to capture the money from the customer's account. This is done in CapturePlugin of the OMS command. In the provided basic order state machine for iDeal authorize method, command will be executed automatically, when order is manually moved into the "shipped" state. Now order can be considered as "paid". diff --git a/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/heidelpay/integrating-payment-methods-for-heidelpay/integrating-the-invoice-secured-b2c-payment-method-for-heidelpay.md b/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/heidelpay/integrating-payment-methods-for-heidelpay/integrating-the-invoice-secured-b2c-payment-method-for-heidelpay.md deleted file mode 100644 index efb4b20507c..00000000000 --- a/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/heidelpay/integrating-payment-methods-for-heidelpay/integrating-the-invoice-secured-b2c-payment-method-for-heidelpay.md +++ /dev/null @@ -1,221 +0,0 @@ ---- -title: Integrating the Invoice Secured B2C payment method for Heidelpay -description: Integrate invoice secured B2C payment through Heidelpay into the Spryker-based shop. -last_updated: Sep 15, 2020 -template: concept-topic-template -originalLink: https://documentation.spryker.com/v5/docs/heidelpay-invoice-secured-b2c -originalArticleId: 0888d297-e9a1-48b9-8e88-607796ddf7e9 -redirect_from: - - /v5/docs/heidelpay-invoice-secured-b2c - - /v5/docs/en/heidelpay-invoice-secured-b2c -related: - - title: Heidelpay - link: docs/scos/user/technology-partners/page.version/payment-partners/heidelpay.html - - title: Integrating the Credit Card Secure payment method for Heidelpay - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/heidelpay/integrating-payment-methods-for-heidelpay/integrating-the-credit-card-secure-payment-method-for-heidelpay.html - - title: Configuring Heidelpay - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/heidelpay/configuring-heidelpay.html - - title: Integrating the Paypal Authorize payment method for Heidelpay - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/heidelpay/integrating-payment-methods-for-heidelpay/integrating-the-paypal-authorize-payment-method-for-heidelpay.html - - title: Integrating Heidelpay - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/heidelpay/integrating-heidelpay.html - - title: Integrating the Direct Debit payment method for Heidelpay - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/heidelpay/integrating-payment-methods-for-heidelpay/integrating-the-direct-debit-payment-method-for-heidelpay.html - - title: Installing Heidelpay - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/heidelpay/installing-heidelpay.html - - title: Heidelpay workflow for errors - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/heidelpay/heidelpay-workflow-for-errors.html - - title: Integrating the Easy Credit payment method for Heidelpay - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/heidelpay/integrating-payment-methods-for-heidelpay/integrating-the-easy-credit-payment-method-for-heidelpay.html ---- - -## Setup -The following configuration should be made after Heidelpay has been [installed](/docs/scos/dev/technology-partner-guides/{{page.version}}/payment-partners/heidelpay/installing-heidelpay.html) and [integrated](/docs/scos/dev/technology-partner-guides/{{page.version}}/payment-partners/heidelpay/integrating-heidelpay.html). - -## Configuration -```php -$config[HeidelpayConstants::CONFIG_HEIDELPAY_TRANSACTION_CHANNEL_INVOICE_SECURED_B2C] = ''; //You can use public test account for testing with channel `31HA07BC8142C5A171749A60D979B6E4` but replace it with real one when you go live. Config should be taken from Heidelpay. - -$config[OmsConstants::PROCESS_LOCATION] = [ - ... - APPLICATION_ROOT_DIR . '/vendor/spryker-eco/heidelpay/config/Zed/Oms', -]; - -$config[OmsConstants::ACTIVE_PROCESSES] = [ - ... - 'HeidelpayInvoiceSecuredB2c01', -]; -$config[SalesConstants::PAYMENT_METHOD_STATEMACHINE_MAPPING] = [ - ... - HeidelpayConfig::PAYMENT_METHOD_INVOICE_SECURED_B2C => 'HeidelpayInvoiceSecuredB2c01', -]; -``` -## Notifications -Heidelpay InvoiceSecuredB2C payment method uses push notifications to inform the shop about the results of the transaction. An HTTP post request sends a push notification to a shop URL. The push notification contains the transaction response in XML format with all necessary data related to payment and transaction type. Headers of the HTTP request contain information about timestamp when the notification was sent and the number of retries. The body of the HTTP POST request includes the XML response of the reported transaction. There is no additional parameter encoding available; it is posted raw "text/xml". To confirm the notification, the shop server must reply with the HTTP status code "200". All other HTTP status codes are considered as an error, and a resend of the notification. Delivery is repeated up to 30 times if the merchant's server has not responded with HTTP status code "200“. The periods between the trials are increasing. -Notification URL for your website is `http://mysprykershop.com/heidelpay/notification`. It should be set up on Heidelpay's side with the help of Heidelpay support team. - - -## Integration into Project -All global integration parts of Heidelpay module should be done before the following steps. - -1. Adjust `CheckoutPageDependencyProvider` on project level to add `InvoiceSecuredB2c` subform and payment method handler. - -\Pyz\Yves\CheckoutPage\CheckoutPageDependencyProvider - -```php -extendSubFormPluginCollection($container); - $container = $this->extendPaymentMethodHandler($container); - - return $container; - } - - ... - - /** - * @param \Spryker\Yves\Kernel\Container $container - * - * @return \Spryker\Yves\Kernel\Container - */ - protected function extendSubFormPluginCollection(Container $container): Container - { - $container->extend(static::PAYMENT_SUB_FORMS, function (SubFormPluginCollection $subFormPluginCollection) { - ... - $subFormPluginCollection->add(new HeidelpayInvoiceSecuredB2cSubFormPlugin()); - - return $subFormPluginCollection; - }); - - return $container; - } - - /** - * @param \Spryker\Yves\Kernel\Container $container - * - * @return \Spryker\Yves\Kernel\Container - */ - protected function extendPaymentMethodHandler(Container $container): Container - { - $container->extend(static::PAYMENT_METHOD_HANDLER, function (StepHandlerPluginCollection $stepHandlerPluginCollection) { - ... - $stepHandlerPluginCollection->add(new HeidelpayHandlerPlugin(), HeidelpayConfig::PAYMENT_METHOD_INVOICE_SECURED_B2C); - - return $stepHandlerPluginCollection; - }); - - return $container; - } -} -``` - -2. Adjust define data section in the template of the Checkout Payment step to include `InvoiceSecuredB2c` payment method template. - -src/Pyz/Yves/CheckoutPage/Theme/default/views/payment/payment.twig - -```php -... -{% raw %}{%{% endraw %} define data = { - backUrl: _view.previousStepUrl, - forms: { - payment: _view.paymentForm - }, - - title: 'checkout.step.payment.title' | trans, - customForms: { - ... - 'heidelpay/invoice-secured-b2c': ['invoice-secured-b2c', 'heidelpay'], - } -} {% raw %}%}{% endraw %} -... -``` - -3. Adjust `OmsDependencyProvider` to add conditions that represent notification receiving. - -\Pyz\Zed\Oms\OmsDependencyProvider - -```php -extendConditionPlugins($container); - - return $container; - } - - /** - * @param \Spryker\Zed\Kernel\Container $container - * - * @return \Spryker\Zed\Kernel\Container - */ - protected function extendConditionPlugins(Container $container): Container - { - $container->extend(OmsDependencyProvider::CONDITION_PLUGINS, function (ConditionCollectionInterface $conditionCollection) { - ... - $conditionCollection->add(new IsAuthorizationFinishedPlugin(), 'Heidelpay/IsAuthorizationFinished'); - $conditionCollection->add(new IsAuthorizationFailedPlugin(), 'Heidelpay/IsAuthorizationFailed'); - $conditionCollection->add(new IsFinalizingFinishedPlugin(), 'Heidelpay/IsFinalizingFinished'); - $conditionCollection->add(new IsFinalizingFailedPlugin(), 'Heidelpay/IsFinalizingFailed'); - $conditionCollection->add(new IsOrderPaidPlugin(), 'Heidelpay/IsOrderPaid'); - - return $conditionCollection; - }); - - return $container; - } -} -``` - -## Bank Account Information -After a customer placed an order, we receive payment response with information about bank account information where the customer has to pay. This information is stored into DB in `spy_payment_heidelpay.connector_invoice_account_info`. This information can be sent to the customer in the order confirmation e-mail or customer can be notified about this information in any other way. - -{% info_block errorBox "Attention" %} -As far as we receive payment response from Heidelpay asynchronously, we can never be sure that the bank account information is stored in the DB before the customer is redirected to the checkout success page. -{% endinfo_block %} - -## OMS State Machine -You can find an example of InvoiceSecuredB2c state machine in `vendor/spryker-eco/heidelpay/config/Zed/Oms/HeidelpayInvoiceSecuredB2c01.xml` - -The state machine includes two main processes: Authorization and Finalize. After the order is placed successfully, the authorization process starts. After success authorization call, state machine expects to receive a notification to get information about finishing authorization transaction. If successful notification received finalize process starts. Notification behavior for completing the process is the same as for authorization. After the order was successfully finalized, the state machine waits for receiving notifications with information about customer payment. If the order was fully paid, the shipment process could be started. diff --git a/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/heidelpay/integrating-payment-methods-for-heidelpay/integrating-the-paypal-authorize-payment-method-for-heidelpay.md b/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/heidelpay/integrating-payment-methods-for-heidelpay/integrating-the-paypal-authorize-payment-method-for-heidelpay.md deleted file mode 100644 index 128cd9a9489..00000000000 --- a/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/heidelpay/integrating-payment-methods-for-heidelpay/integrating-the-paypal-authorize-payment-method-for-heidelpay.md +++ /dev/null @@ -1,86 +0,0 @@ ---- -title: Integrating the Paypal Authorize payment method for Heidelpay -description: Integrate Paypal Authorize payment through Heidelpay into the Spryker-based shop. -last_updated: Sep 15, 2020 -template: concept-topic-template -originalLink: https://documentation.spryker.com/v5/docs/heidelpay-authorize -originalArticleId: cca1472a-1775-4b02-9545-454b3e1326a8 -redirect_from: - - /v5/docs/heidelpay-authorize - - /v5/docs/en/heidelpay-authorize -related: - - title: Heidelpay - link: docs/scos/user/technology-partners/page.version/payment-partners/heidelpay.html - - title: Integrating the Credit Card Secure payment method for Heidelpay - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/heidelpay/integrating-payment-methods-for-heidelpay/integrating-the-credit-card-secure-payment-method-for-heidelpay.html - - title: Configuring Heidelpay - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/heidelpay/configuring-heidelpay.html - - title: Integrating the Direct Debit payment method for Heidelpay - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/heidelpay/integrating-payment-methods-for-heidelpay/integrating-the-direct-debit-payment-method-for-heidelpay.html - - title: Integrating Heidelpay - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/heidelpay/integrating-heidelpay.html - - title: Heidelay - Sofort (Online Transfer) - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/heidelpay/integrating-payment-methods-for-heidelpay/integrating-the-sofort-payment-method-for-heidelpay.html - - title: Installing Heidelpay - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/heidelpay/installing-heidelpay.html - - title: Heidelpay workflow for errors - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/heidelpay/heidelpay-workflow-for-errors.html - - title: Integrating the Split-payment Marketplace payment method for Heidelpay - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/heidelpay/integrating-payment-methods-for-heidelpay/integrating-the-split-payment-marketplace-payment-method-for-heidelpay.html ---- - -### Setup - -The following configuration should be made after Heidelpay has been [installed](/docs/scos/dev/technology-partner-guides/{{page.version}}/payment-partners/heidelpay/installing-heidelpay.html) and [integrated](/docs/scos/dev/technology-partner-guides/{{page.version}}/payment-partners/heidelpay/configuring-heidelpay.html). - -#### Configuration - -Example (for testing only): -```php -$config[HeidelpayConstants::CONFIG_HEIDELPAY_TRANSACTION_CHANNEL_PAYPAL] = '31HA07BC8142C5A171749A60D979B6E4'; -``` - -This value should be taken from HEIDELPAY - -#### Checkout Payment Step Display -Displays payment method name with radio button. No extra input fields are required. - -#### Payment Step Submitting -No extra actions needed, quote is filled with payment method selection by default. - -### Workflow -#### Summary Review and Order -**Submitting** - -On "save order" event save Heidelpay payment per order and items, as usual. - -When state machine is initialized, a "send authorize request" event will trigger the authorize request. In case of success, payment system will return a redirect URL to customer, where the payment can be completed. Request and response will be fully persisted in the database (`spy_payment_heidelpay_transaction_log`).  - -On "post save hook" event, we check in the transaction log table if the authorize request was sent successfully and if so, we set external redirect response (URL is obtained from the previous step) and redirect the customer to Paypal website, where customer confirms the payment.
    -Below is the code sample from `HeidelpayPostSavePlugin`: -```php -/** - * @method \SprykerEco\Zed\Heidelpay\Business\HeidelpayFacadeInterface getFacade() - * @method \SprykerEco\Zed\Heidelpay\Business\HeidelpayBusinessFactory getFactory() - */ -class HeidelpayPostSavePlugin extends BaseAbstractPlugin implements CheckoutPostCheckPluginInterface -{ - /** - * @param \Generated\Shared\Transfer\QuoteTransfer $quoteTransfer - * @param \Generated\Shared\Transfer\CheckoutResponseTransfer $checkoutResponseTransfer - * - * @return void - */ - public function execute(QuoteTransfer $quoteTransfer, CheckoutResponseTransfer $checkoutResponseTransfer) - { - $this->getFacade()->postSaveHook($quoteTransfer, $checkoutResponseTransfer); - } - ``` - -On payment confirmation, the response is sent to Heidelpay and Heidelpay makes an asynchronous POST request to the shop's `CONFIG_HEIDELPAY_PAYMENT_RESPONSE_URLURL` (Yves), with the result of payment (see `HeidelpayController::paymentAction()`). This is called "external response transaction", and its result will be persisted in `spy_payment_heidelpay_transaction_log` as usual. - -The most important data here is the payment reference ID which can be used for further transactions like `capture/cancel/etc`. - -In the response Heidelpay expects an URL string which defines where customer has to be redirected. In case if customer successfully confirmed payment, it should be a link to checkout order success step, in case of failure - checkout payment failed action with error code (see `HeidelpayController::paymentFailedAction()` and [Heidelpay workflow for errors](/docs/scos/dev/technology-partner-guides/{{page.version}}/payment-partners/heidelpay/heidelpay-workflow-for-errors.html) section). Heidelpay redirects customer to the given URL and the payment process is finished.  - -Capture the money - later on, when the item is shipped to the customer, it is time to call "capture" command of the state machine to capture the money from the customer's account. It is done in CapturePlugin of the OMS command. In the provided basic order of state machine for Paypal authorize method, the command will be executed automatically, when order is manually moved into the "shipped" state. Now the order can be considered as "paid". diff --git a/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/heidelpay/integrating-payment-methods-for-heidelpay/integrating-the-paypal-debit-payment-method-for-heidelpay.md b/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/heidelpay/integrating-payment-methods-for-heidelpay/integrating-the-paypal-debit-payment-method-for-heidelpay.md deleted file mode 100644 index 1417f19d7bd..00000000000 --- a/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/heidelpay/integrating-payment-methods-for-heidelpay/integrating-the-paypal-debit-payment-method-for-heidelpay.md +++ /dev/null @@ -1,89 +0,0 @@ ---- -title: Integrating the Paypal Debit payment method for Heidelpay -description: Integrate Paypal debit workflow payment through Heidelpay into the Spryker-based shop. -last_updated: Sep 15, 2020 -template: concept-topic-template -originalLink: https://documentation.spryker.com/v5/docs/heidelpay-paypal-debit -originalArticleId: 0d830bf2-3f62-4fa6-9dc7-a4f954cb832f -redirect_from: - - /v5/docs/heidelpay-paypal-debit - - /v5/docs/en/heidelpay-paypal-debit -related: - - title: Heidelpay - link: docs/scos/user/technology-partners/page.version/payment-partners/heidelpay.html - - title: Integrating the Credit Card Secure payment method for Heidelpay - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/heidelpay/integrating-payment-methods-for-heidelpay/integrating-the-credit-card-secure-payment-method-for-heidelpay.html - - title: Configuring Heidelpay - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/heidelpay/configuring-heidelpay.html - - title: Integrating the Paypal Authorize payment method for Heidelpay - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/heidelpay/integrating-payment-methods-for-heidelpay/integrating-the-paypal-authorize-payment-method-for-heidelpay.html - - title: Integrating Heidelpay - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/heidelpay/integrating-heidelpay.html - - title: Heidelay - Sofort (Online Transfer) - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/heidelpay/integrating-payment-methods-for-heidelpay/integrating-the-sofort-payment-method-for-heidelpay.html - - title: Integrating the Direct Debit payment method for Heidelpay - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/heidelpay/integrating-payment-methods-for-heidelpay/integrating-the-direct-debit-payment-method-for-heidelpay.html - - title: Installing Heidelpay - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/heidelpay/installing-heidelpay.html - - title: Heidelpay workflow for errors - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/heidelpay/heidelpay-workflow-for-errors.html ---- - -### Setup - -The following configuration should be made after Heidelpay has been [installed](/docs/scos/dev/technology-partner-guides/{{page.version}}/payment-partners/heidelpay/installing-heidelpay.html) and [integrated](/docs/scos/dev/technology-partner-guides/{{page.version}}/payment-partners/heidelpay/integrating-heidelpay.html). - -#### Configuration - -Example (for testing only): - -```php -$config[HeidelpayConstants::CONFIG_HEIDELPAY_TRANSACTION_CHANNEL_PAYPAL] = '31HA07BC8142C5A171749A60D979B6E4'; -``` -This value should be taken from HEIDELPAY - -#### Checkout Payment Step Display - -Displays payment method name with radio button. No extra input fields are required. - -#### Payment step submit - -No extra actions needed, quote being filled with payment method selection as default. - -### Workflow - -#### Summary Review and Order Submit - -On "save order" event - save Heidelpay payment - per order and items, as usual. - -When state machine is initialized, an event "send debit request" will trigger debit request. In case of success, payment system will return a redirect url for customer, where the payment can be completed. Request and response will be fully persisted in the database (`spy_payment_heidelpay_transaction_log`).  - -On "post save hook" event, we check in transaction log table if the debit request was sent successfully and if so, we set external redirect response (URL is obtained from the previous step) and redirect customer to the Paypal website where the customer confirms the payment. 
    -Below is the code sample from `HeidelpayPostSavePlugin`: -```php/** - * @method \SprykerEco\Zed\Heidelpay\Business\HeidelpayFacadeInterface getFacade() - * @method \SprykerEco\Zed\Heidelpay\Business\HeidelpayBusinessFactory getFactory() - */ -class HeidelpayPostSavePlugin extends BaseAbstractPlugin implements CheckoutPostCheckPluginInterface -{ - /** - * @param \Generated\Shared\Transfer\QuoteTransfer $quoteTransfer - * @param \Generated\Shared\Transfer\CheckoutResponseTransfer $checkoutResponseTransfer - * - * @return void - */ - public function execute(QuoteTransfer $quoteTransfer, CheckoutResponseTransfer $checkoutResponseTransfer) - { - $this->getFacade()->postSaveHook($quoteTransfer, $checkoutResponseTransfer); - } -} -``` -On payment confirmation response is sent to the Heidelpay and Heidelpay makes an asynchronous POST request to the shop's `CONFIG_HEIDELPAY_PAYMENT_RESPONSE_URL` - URL (Yves), with the result of payment (see `HeidelpayController::paymentAction()` ). This is called "external response transaction", the result will be persisted in `spy_payment_heidelpay_transaction_log` as usual. - - The most important data here is the payment reference ID which can be used for further transactions like capture/cancel/etc.  - -In the response Heidelpay expects an URL string which shows where customer has to be redirected. In case if customer successfully confirmed payment, there should be a link to checkout order success step, in case of failure - checkout payment failed action with error code (see`HeidelpayController::paymentFailedAction()` and [Heidelpay workflow for errors](/docs/scos/dev/technology-partner-guides/{{page.version}}/payment-partners/heidelpay/heidelpay-workflow-for-errors.html) section). Heidelpay redirects customer to the given URL and payment process is finished.  - -Now the order can be considered as "paid". diff --git a/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/heidelpay/integrating-payment-methods-for-heidelpay/integrating-the-sofort-payment-method-for-heidelpay.md b/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/heidelpay/integrating-payment-methods-for-heidelpay/integrating-the-sofort-payment-method-for-heidelpay.md deleted file mode 100644 index db1f0487968..00000000000 --- a/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/heidelpay/integrating-payment-methods-for-heidelpay/integrating-the-sofort-payment-method-for-heidelpay.md +++ /dev/null @@ -1,85 +0,0 @@ ---- -title: Integrating the Sofort payment method for Heidelpay -description: Integrate Sofort payment through Heidelpay into the Spryker-based shop. -last_updated: Sep 15, 2020 -template: concept-topic-template -originalLink: https://documentation.spryker.com/v5/docs/heidelpay-sofort -originalArticleId: a64cded5-da7c-4e92-9b47-d3d9b42d2f1d -redirect_from: - - /v5/docs/heidelpay-sofort - - /v5/docs/en/heidelpay-sofort -related: - - title: Heidelpay - link: docs/scos/user/technology-partners/page.version/payment-partners/heidelpay.html - - title: Integrating the Credit Card Secure payment method for Heidelpay - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/heidelpay/integrating-payment-methods-for-heidelpay/integrating-the-credit-card-secure-payment-method-for-heidelpay.html - - title: Configuring Heidelpay - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/heidelpay/configuring-heidelpay.html - - title: Integrating the Paypal Authorize payment method for Heidelpay - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/heidelpay/integrating-payment-methods-for-heidelpay/integrating-the-paypal-authorize-payment-method-for-heidelpay.html - - title: Integrating Heidelpay - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/heidelpay/integrating-heidelpay.html - - title: Integrating the Direct Debit payment method for Heidelpay - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/heidelpay/integrating-payment-methods-for-heidelpay/integrating-the-direct-debit-payment-method-for-heidelpay.html - - title: Installing Heidelpay - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/heidelpay/installing-heidelpay.html - - title: Heidelpay workflow for errors - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/heidelpay/heidelpay-workflow-for-errors.html - - title: Integrating the Easy Credit payment method for Heidelpay - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/heidelpay/integrating-payment-methods-for-heidelpay/integrating-the-easy-credit-payment-method-for-heidelpay.html ---- - -## Setup - -The following configuration should be made after Heidelpay has been [installed](/docs/scos/dev/technology-partner-guides/{{page.version}}/payment-partners/heidelpay/installing-heidelpay.html) and [integrated](/docs/scos/dev/technology-partner-guides/{{page.version}}/payment-partners/heidelpay/integrating-heidelpay.html). - -## Configuration - -Example (for testing only): -```php -$config[HeidelpayConstants::CONFIG_HEIDELPAY_TRANSACTION_CHANNEL_SOFORT] = '31HA07BC8142C5A171749CDAA43365D2'; -``` - -## Checkout Payment Step Display -Displays payment method name with radio button. No extra input fields are required. - -## Payment Step Submitting -No extra actions needed, quote being filled with payment method selection as default. - -## Workflow -### Summary Review and Order - Submit - -On "save order" event - save Heidelpay payment, per order and items, as usual - -When state machine is initialized, an event "send authorize request" will trigger the authorize request. In case of success, payment system will return a redirect URL for customer where the payment can be completed. Request and response will be fully persisted in the database (`spy_payment_heidelpay_transaction_log`).  - -On "post save hook" event, we check in the transaction log table, if the authorize request was sent successful, and if so, we set external redirect response (URL is obtained from the previous step) and redirect customer to the Sofort webiste, where customer confirms the payment. 
    -Below is the code sample from `HeidelpayPostSavePlugin`: -```php -/** - * @method \SprykerEco\Zed\Heidelpay\Business\HeidelpayFacadeInterface getFacade() - * @method \SprykerEco\Zed\Heidelpay\Business\HeidelpayBusinessFactory getFactory() - */ -class HeidelpayPostSavePlugin extends BaseAbstractPlugin implements CheckoutPostCheckPluginInterface -{ - /** - * @param \Generated\Shared\Transfer\QuoteTransfer $quoteTransfer - * @param \Generated\Shared\Transfer\CheckoutResponseTransfer $checkoutResponseTransfer - * - * @return void - */ - public function execute(QuoteTransfer $quoteTransfer, CheckoutResponseTransfer $checkoutResponseTransfer) - { - $this->getFacade()->postSaveHook($quoteTransfer, $checkoutResponseTransfer); - } -} -``` - -On payment confirmation, response is sent to the Heidelpay and Heidelpay makes an asynchronous POST request to the shop's `CONFIG_HEIDELPAY_PAYMENT_RESPONSE_URL` URL (Yves), with the result of payment (see `HeidelpayController::paymentAction()`). This is called "external response transaction", the result will be persisted in `spy_payment_heidelpay_transaction_log` as usual. - -The most important data here - is the payment reference ID which can be used for further transactions like capture/cancel/etc.  - -In the response Heidelpay expects an URL string which defines where customer has to be redirected. In case if customer successfully confirmed payment, it should be link to checkout order success step, in case of failure - checkout payment failed action with error code (see `HeidelpayController::paymentFailedAction()` and [Heidelpay workflow for errors](/docs/scos/dev/technology-partner-guides/{{page.version}}/payment-partners/heidelpay/heidelpay-workflow-for-errors.html) section). Heidelpay redirects customer to the given URL and payment process is finished.  - -Now order can be considered as "paid", no further capture is needed. diff --git a/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/heidelpay/integrating-payment-methods-for-heidelpay/integrating-the-split-payment-marketplace-payment-method-for-heidelpay.md b/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/heidelpay/integrating-payment-methods-for-heidelpay/integrating-the-split-payment-marketplace-payment-method-for-heidelpay.md deleted file mode 100644 index 9c23a938417..00000000000 --- a/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/heidelpay/integrating-payment-methods-for-heidelpay/integrating-the-split-payment-marketplace-payment-method-for-heidelpay.md +++ /dev/null @@ -1,51 +0,0 @@ ---- -title: Integrating the Split-payment Marketplace payment method for Heidelpay -description: Integrate Split payment Marketplace through Heidelpay into the Spryker-based shop. -last_updated: Sep 15, 2020 -template: concept-topic-template -originalLink: https://documentation.spryker.com/v5/docs/heidelpay-split-payment-marketplace -originalArticleId: a9903cbd-4eca-4432-8af0-291a2afa5ec3 -redirect_from: - - /v5/docs/heidelpay-split-payment-marketplace - - /v5/docs/en/heidelpay-split-payment-marketplace -related: - - title: Heidelpay - link: docs/scos/user/technology-partners/page.version/payment-partners/heidelpay.html - - title: Integrating the Credit Card Secure payment method for Heidelpay - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/heidelpay/integrating-payment-methods-for-heidelpay/integrating-the-credit-card-secure-payment-method-for-heidelpay.html - - title: Configuring Heidelpay - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/heidelpay/configuring-heidelpay.html - - title: Integrating the Direct Debit payment method for Heidelpay - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/heidelpay/integrating-payment-methods-for-heidelpay/integrating-the-direct-debit-payment-method-for-heidelpay.html - - title: Integrating the Paypal Authorize payment method for Heidelpay - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/heidelpay/integrating-payment-methods-for-heidelpay/integrating-the-paypal-authorize-payment-method-for-heidelpay.html - - title: Integrating Heidelpay - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/heidelpay/integrating-heidelpay.html - - title: Installing Heidelpay - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/heidelpay/installing-heidelpay.html - - title: Heidelpay workflow for errors - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/heidelpay/heidelpay-workflow-for-errors.html - - title: Integrating the Easy Credit payment method for Heidelpay - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/heidelpay/integrating-payment-methods-for-heidelpay/integrating-the-easy-credit-payment-method-for-heidelpay.html ---- - -## Setup - -The following configuration should be made after Heidelpay has been [installed](/docs/scos/dev/technology-partner-guides/{{page.version}}/payment-partners/heidelpay/installing-heidelpay.html) and [integrated](/docs/scos/dev/technology-partner-guides/{{page.version}}/payment-partners/heidelpay/configuring-heidelpay.html). - -## Configuration - -Example: -```php -// Heidelpay Split-payment marketplace logic -$config[HeidelpayConstants::CONFIG_IS_SPLIT_PAYMENT_ENABLED_KEY] = true; -``` - -## Project Implementation - -A project level should set quote items and expenses information the field Heidelpay Item Channel Id. It could be done [using cart expander plugin](/docs/scos/user/features/{{page.version}}/cart-feature-overview/cart-functionality-and-calculations/cart-functionality.html#cart-expanders). - -Example: -```php -$quoteItem->setHeidelpayItemChannelId('........'); -``` diff --git a/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/klarna/klarna-invoice-pay-in-14-days.md b/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/klarna/klarna-invoice-pay-in-14-days.md deleted file mode 100644 index 52bcc63b89d..00000000000 --- a/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/klarna/klarna-invoice-pay-in-14-days.md +++ /dev/null @@ -1,66 +0,0 @@ ---- -title: Klarna - Invoice Pay in 14 days -description: In this article, you will find invoice pay scenarios for the payment process with Klarna. -last_updated: Sep 15, 2020 -template: concept-topic-template -originalLink: https://documentation.spryker.com/v5/docs/klarna-invoice-pay-in-14-days -originalArticleId: 24200b80-af7f-4333-8673-9f38e8469b9e -redirect_from: - - /v5/docs/klarna-invoice-pay-in-14-days - - /v5/docs/en/klarna-invoice-pay-in-14-days -related: - - title: Klarna - link: docs/scos/user/technology-partners/page.version/payment-partners/klarna.html - - title: Klarna payment workflow - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/klarna/klarna-payment-workflow.html - - title: Klarna - Part Payment Flexible - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/klarna/klarna-part-payment-flexible.html - - title: Klarna state machine commands and conditions - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/klarna/klarna-state-machine-commands-and-conditions.html ---- - -## Payment Workflow Scenarios -![Click Me](https://spryker.s3.eu-central-1.amazonaws.com/docs/Technology+Partners/Payment+Partners/Klarna/invoice_paymentworkflow.png) - -## Cancel Workflow Scenarios -![Click Me](https://spryker.s3.eu-central-1.amazonaws.com/docs/Technology+Partners/Payment+Partners/Klarna/invoice_cancelworkflow.png) - -## Refund Workflow Scenarios -![Click Me](https://spryker.s3.eu-central-1.amazonaws.com/docs/Technology+Partners/Payment+Partners/Klarna/flexible_refundworkflow.png) - -## Integrating Klarna Part Payment -The configuration to integrate Part payment using Klarna is: - -`SHARED_SECRET`: shared token. - -`EID`: the id of the merchant, received from Klarna. - -`TEST_MODE`: `true` or `false`. - -`KLARNA_INVOICE_MAIL_TYPE`: type for user notification. Possible values are: - -`KlarnaConstants::KLARNA_INVOICE_TYPE_MAIL` - -`KlarnaConstants::KLARNA_INVOICE_TYPE_EMAIL` - -`KlarnaConstants::KLARNA_INVOICE_TYPE_NOMAIL` - -`KLARNA_PCLASS_STORE_TYPE`: pClasses storage type. Could be `json`, `xml`, `sql`. Default type is `json`. - -`KLARNA_PCLASS_STORE_URI`: URI for pClasses storage. Default `APPLICATION_ROOT_DIR . '/data/DE/pclasses.json`'. - -`KLARNA_CHECKOUT_CONFIRMATION_URI`: checkout confirmation URI, `default value $domain . '/checkout/klarna/success`'. - -`KLARNA_CHECKOUT_TERMS_URI`: checkout terms URI, default value `$domain`. - -`KLARNA_CHECKOUT_PUSH_URI`: checkout push URI, default value `$domain . '/checkout/klarna/push'`. - -`KLARNA_CHECKOUT_UR`I: checkout URI, default value `$domain`. - -`KLARNA_PDF_URL_PATTERN`: pdf URL pattern, default value `https://online.testdrive.klarna.com/invoices/%s.pdf`. - -You can copy over configuration to your config from the Klarna modules `config.dist.php` file. - -## Perform Requests - -In order to perform the needed requests, you can easily use the implemented [Klarna State Machine Commands and Conditions](/docs/scos/dev/technology-partner-guides/{{page.version}}/payment-partners/klarna/klarna-state-machine-commands-and-conditions.html). The next section gives a summary of them. diff --git a/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/klarna/klarna-part-payment-flexible.md b/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/klarna/klarna-part-payment-flexible.md deleted file mode 100644 index b4fa22f6f6b..00000000000 --- a/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/klarna/klarna-part-payment-flexible.md +++ /dev/null @@ -1,53 +0,0 @@ ---- -title: Klarna - Part Payment Flexible -description: In this article, you will find part payment flexible scenarios for the payment process with Klarna. -last_updated: Sep 15, 2020 -template: concept-topic-template -originalLink: https://documentation.spryker.com/v5/docs/klarna-part-payment-flexible -originalArticleId: 8691cfae-c559-4b1a-8c0a-f249a0c69db0 -redirect_from: - - /v5/docs/klarna-part-payment-flexible - - /v5/docs/en/klarna-part-payment-flexible -related: - - title: Klarna - link: docs/scos/user/technology-partners/page.version/payment-partners/klarna.html - - title: Klarna payment workflow - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/klarna/klarna-payment-workflow.html - - title: Klarna - Invoice Pay in 14 days - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/klarna/klarna-invoice-pay-in-14-days.html - - title: Klarna state machine commands and conditions - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/klarna/klarna-state-machine-commands-and-conditions.html ---- - -## Payment Workflow Scenarios -![Click Me](https://spryker.s3.eu-central-1.amazonaws.com/docs/Technology+Partners/Payment+Partners/Klarna/flexible_paymentworkflow.png) - -## Cancel Workflow Scenarios -![Click Me](https://spryker.s3.eu-central-1.amazonaws.com/docs/Technology+Partners/Payment+Partners/Klarna/flexible_cancelworkflow.png) - -## Refund Workflow Scenarios -![Click Me](https://spryker.s3.eu-central-1.amazonaws.com/docs/Technology+Partners/Payment+Partners/Klarna/flexible_refundworkflow.png) - -## Integrating Klarna Part Payment -The configuration to integrate `Part Payment` using Klarna is: - -* `SHARED_SECRET`: shared token -* `EID`: the id of the merchant, received from Klarna. -* `TEST_MODE`: `true ` or `false`. -* `KLARNA_INVOICE_MAIL_TYPE`: type of the user notifications. Possible values are: - - `KlarnaConstants::KLARNA_INVOICE_TYPE_MAIL` - - `KlarnaConstants::KLARNA_INVOICE_TYPE_EMAIL` - - `KlarnaConstants::KLARNA_INVOICE_TYPE_NOMAIL` -* `KLARNA_PCLASS_STORE_TYPE`: pClasses storage type. Could be `json`, `xml`, `sql`. Default type is `json`. -* `KLARNA_PCLASS_STORE_URI`: URI for pClasses storage. Default `APPLICATION_ROOT_DIR . '/data/DE/pclasses.json'`. -* `KLARNA_CHECKOUT_CONFIRMATION_URI`: checkout confirmation URI, default value `$domain . '/checkout/klarna/success`'. -* `KLARNA_CHECKOUT_TERMS_URI`: checkout terms URI, default value `$domain`. -* `KLARNA_CHECKOUT_PUSH_URI`: checkout push URI, default value `$domain . '/checkout/klarna/push'`. -* `KLARNA_CHECKOUT_URI`: checkout URI, default value `$domain`. -* `KLARNA_PDF_URL_PATTERN:` pdf URL pattern, default value `https://online.testdrive.klarna.com/invoices/%s.pdf`. -* `NL_PART_PAYMENT_LIMIT`: maximum allowed limit for part payment in the Netherlands (in cents). - -You can copy over configuration to your config file from the Klarna bundles `config.dist.php` file. - -## Perform Requests -In order to perform the needed requests, you can easily use the implemented [Klarna State Machine Commands and Conditions](/docs/scos/dev/technology-partner-guides/{{page.version}}/payment-partners/klarna/klarna-state-machine-commands-and-conditions.html). The next section gives you a summary of them. diff --git a/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/klarna/klarna-payment-workflow.md b/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/klarna/klarna-payment-workflow.md deleted file mode 100644 index a8db9535319..00000000000 --- a/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/klarna/klarna-payment-workflow.md +++ /dev/null @@ -1,29 +0,0 @@ ---- -title: Klarna payment workflow -description: In this article, you will find part payment request flow with Klarna. -last_updated: Apr 3, 2020 -template: concept-topic-template -originalLink: https://documentation.spryker.com/v5/docs/klarna-payment-workflow -originalArticleId: 1e62cf24-f67c-431d-8975-0114b37fe9c5 -redirect_from: - - /v5/docs/klarna-payment-workflow - - /v5/docs/en/klarna-payment-workflow -related: - - title: Klarna - Invoice Pay in 14 days - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/klarna/klarna-invoice-pay-in-14-days.html - - title: Klarna - link: docs/scos/user/technology-partners/page.version/payment-partners/klarna.html - - title: Klarna - Part Payment Flexible - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/klarna/klarna-part-payment-flexible.html - - title: Klarna state machine commands and conditions - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/klarna/klarna-state-machine-commands-and-conditions.html ---- - -Both `Part Payment` and `Invoice` payment methods have the same request flow. It basically consists of the following steps: - -* Pre-check: reserves the amount of the purchase -* Check order status: checks if the order status is `pending accepted`. If it's not, OMS waits for 2 hours and then calls again `KlarnaApi` to retrieve the status of the order. In case the status is `denied` the order is canceled. -* Capture payment: activates the reservation that corresponds to the given reference number -* Update payment: if activation fails, we need to update the reservation that corresponds to the given reference number -* Refund: performs a partial refund. -* Cancel: cancels a reservation. diff --git a/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/klarna/klarna-state-machine-commands-and-conditions.md b/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/klarna/klarna-state-machine-commands-and-conditions.md deleted file mode 100644 index 4522cce0c9a..00000000000 --- a/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/klarna/klarna-state-machine-commands-and-conditions.md +++ /dev/null @@ -1,90 +0,0 @@ ---- -title: Klarna state machine commands and conditions -description: This article includes the state machine commands and conditions provided by Klarna. -last_updated: Apr 3, 2020 -template: concept-topic-template -originalLink: https://documentation.spryker.com/v5/docs/klarna-state-machine-commands-and-conditions -originalArticleId: b9402978-b848-4f71-9497-f56a3fb51d06 -redirect_from: - - /v5/docs/klarna-state-machine-commands-and-conditions - - /v5/docs/en/klarna-state-machine-commands-and-conditions -related: - - title: Klarna - Invoice Pay in 14 days - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/klarna/klarna-invoice-pay-in-14-days.html - - title: Klarna - link: docs/scos/user/technology-partners/page.version/payment-partners/klarna.html - - title: Klarna - Part Payment Flexible - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/klarna/klarna-part-payment-flexible.html - - title: Klarna payment workflow - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/klarna/klarna-payment-workflow.html ---- - -## Commands - -Check - -* Checks order Status -* Update order status -* Plugin: `CheckPlugin` - -Capture - -* Activates the reservation that corresponds to the given reference number -* Response: - - Success: order activated - - Declined: capture failed. Need to update order -* Plugin: `CapturePlugin` - -Update - -* Updates a reservation -* Response: -* Success: Reservation updated -* Declined: Some error occurred -* Plugin: `UpdatePlugin` - -Cancel - -* Cancels a reservation -* Plugin: `CancelPlugin` - -Refund - -* Performs a partial refund -* Response: - - Success: Refund possible and accepted - - Declined: Some error occurred -* Plugin: `RefundPlugin` - -## Conditions - -| Name | Description | Plugin | -| --- | --- | --- | -| `IsOrderStatusApproved` | Checks if order payment status is pending accepted | `IsOrderStatusApprovedPlugin` | -| `IfHasCapture` | Checks if the capture response is successful | `IfHasCapturePlugin` | -| `IsOrderDenied` | Checks if order payment status is denied | `IsOrderDeniedPlugin` | - -## KlarnaFacade - -| Facade Method | Param | Return | Description | -| --- | --- | --- | --- | -| `saveOrderPayment` | `QuoteTransfer`, `CheckoutResponseTransfer` | void | Saves the payment for the submitted order | -| `reserveAmount` | `QuoteTransfer` | `KlarnaReserveAmountResponseTransfer` | Reserves the amount of the purchase | -| `updatePayment` | `QuoteTransfer` | `KlarnaReserveAmountResponseTransfer` | Update the reservation matching the given reservation number | -| `capturePayment` | `SpyPaymentKlarna`, `OrderTransfer` | array | Activate the reservation matching the given reservation number | -| `capturePartPayment` | array `$orderItems`, `SpyPaymentKlarna`, `OrderTransfer` | array | Activate the reservation matching the given reservation number | -| `refundPayment` | `SpyPaymentKlarna` | string | Performs a complete refund | -| `refundPartPayment` | array `$orderItems`, `SpyPaymentKlarna` | string | Performs a partial refund | -| `sendInvoiceByMail` | `SpyPaymentKlarna` | string | Sends an activated invoice to the customer via e-mail | -| `sendInvoiceByPost` | `SpyPaymentKlarna` | string | Requests a postal send-out of an activated invoice to a customer by Klarna | -| `getInstallments` | `QuoteTransfer` | `KlarnaInstallmentResponseTransfer` | Get available Part Payments | -| `getPaymentLogs` | `ObjectCollection $orders` | array | Return all payment logs for submitted orders | -| `getKlarnaCheckoutHtml` | `QuoteTransfer` | `KlarnaCheckoutTransfer` | Return checkout values | -| `getKlarnaSuccessHtml` | `KlarnaCheckoutTransfer` | `KlarnaCheckoutTransfer` | Return success values | -| `createCheckoutOrder` | `KlarnaCheckoutTransfer` | bool | Creates checkout order | -| `checkOrderStatus` | `SpyPaymentKlarna` | int | Return order status | -| `cancelOrder` | `SpyPaymentKlarna` | bool | Cancels payment | -| `getKlarnaPaymentById` | `int $salesOrderId` | array | Return order payment data | -| `getInvoicePdfUrl` | `int $salesOrderId` | string | Return pdf URL from config | -| `checkoutService` | `QuoteTransfer` | `KlarnaCheckoutServiceTransfer` | Perform a checkout service request | -| `getAddressUpdater` | `OrderTransfer` | `AddressUpdater` | Return `AddressUpdater` from the factory | diff --git a/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/payolution/installing-and-configuring-payolution.md b/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/payolution/installing-and-configuring-payolution.md deleted file mode 100644 index d6cd5ec9857..00000000000 --- a/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/payolution/installing-and-configuring-payolution.md +++ /dev/null @@ -1,234 +0,0 @@ ---- -title: Installing and configuring Payolution -description: This article contains information on configuring the Payolution module for the Spryker Commerce OS. -last_updated: Apr 3, 2020 -template: concept-topic-template -originalLink: https://documentation.spryker.com/v5/docs/payolution-configuration -originalArticleId: 2e015052-52eb-4952-98d9-5107b0dc7fed -redirect_from: - - /v5/docs/payolution-configuration - - /v5/docs/en/payolution-configuration -related: - - title: Integrating the installment payment method for Payolution - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/payolution/integrating-the-installment-payment-method-for-payolution.html - - title: Payolution - Performing Requests - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/payolution/payolution-performing-requests.html - - title: Payolution request flow - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/payolution/payolution-request-flow.html - - title: Payolution - link: docs/scos/user/technology-partners/page.version/payment-partners/payolution.html - - title: Integrating the invoice paymnet method for Payolution - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/payolution/integrating-the-invoice-payment-method-for-payolution.html ---- - -To integrate Payolution into your project, first you need to install and configure the CrefoPay module. This topic describes how to do that. - -## Installation -To install the Payolution module, run: -```bash -composer require spryker-eco/payolution -``` -## Configuration -Please refer to `config/config.dist.php` for example of module configuration. - -To set up the initial Payolution configuration, use the credentials you received after registering your Payolution merchant account: -```php -$config[PayolutionConstants::TRANSACTION_GATEWAY_URL] = ''; -$config[PayolutionConstants::CALCULATION_GATEWAY_URL] = ''; -$config[PayolutionConstants::TRANSACTION_SECURITY_SENDER] = ''; -$config[PayolutionConstants::TRANSACTION_USER_LOGIN] = ''; -$config[PayolutionConstants::TRANSACTION_USER_PASSWORD] = ''; -$config[PayolutionConstants::CALCULATION_SENDER] = ''; -$config[PayolutionConstants::CALCULATION_USER_LOGIN] = ''; -$config[PayolutionConstants::CALCULATION_USER_PASSWORD] = ''; -$config[PayolutionConstants::TRANSACTION_CHANNEL_PRE_CHECK] = ''; -$config[PayolutionConstants::TRANSACTION_CHANNEL_INVOICE] = ''; -$config[PayolutionConstants::TRANSACTION_CHANNEL_INSTALLMENT] = ''; -$config[PayolutionConstants::CALCULATION_CHANNEL] = ''; -``` - -Next, specify modes and order limits: -```php -$config[PayolutionConstants::TRANSACTION_MODE] = 'CONNECTOR_TEST'; -$config[PayolutionConstants::CALCULATION_MODE] = 'TEST'; -$config[PayolutionConstants::MIN_ORDER_GRAND_TOTAL_INVOICE] = '500'; -$config[PayolutionConstants::MAX_ORDER_GRAND_TOTAL_INVOICE] = '500000'; -$config[PayolutionConstants::MIN_ORDER_GRAND_TOTAL_INSTALLMENT] = '500'; -$config[PayolutionConstants::MAX_ORDER_GRAND_TOTAL_INSTALLMENT] = '500000'; - ``` - -### Checkout Configuration - -To use Payolution in frontend, add Payolution payment method handlers and subform to `Pyz/Yves/Checkout/CheckoutDependencyProvider.php` -```php - $container[static::PAYMENT_METHOD_HANDLER] = function () { - $paymentHandlerPlugins = new StepHandlerPluginCollection(); - - $paymentHandlerPlugins->add(new PayolutionHandlerPlugin(), PaymentTransfer::PAYOLUTION_INVOICE); - $paymentHandlerPlugins->add(new PayolutionHandlerPlugin(), PaymentTransfer::PAYOLUTION_INSTALLMENT); - - return $paymentHandlerPlugins; - }; - - $container[static::PAYMENT_SUB_FORMS] = function () { - $paymentSubFormPlugins = new SubFormPluginCollection(); - - $paymentSubFormPlugins->add(new PayolutionInstallmentSubFormPlugin()); - $paymentSubFormPlugins->add(new PayolutionInvoiceSubFormPlugin()); - - return $paymentSubFormPlugins; - }; - ``` - -All subform and handler plugins are located in `SprykerEco\Yves\Payolution\Plugin\` namespace. - -### OMS Configuration - -Activate the following Payolution process: -```php -$config[OmsConstants::ACTIVE_PROCESSES][] ='PayolutionInstalmentPayment01', -$config[OmsConstants::ACTIVE_PROCESSES][] ='PayolutionInvoicePayment01', - - ``` - -Default implementation for commands and options should be added to `Pyz/Zed/Oms/OmsDependencyProvider.php` - -Commands: -```php -$container->extend(OmsDependencyProvider::COMMAND_PLUGINS, function (CommandCollectionInterface $commandCollection) { - $commandCollection - ->add(new PreAuthorizePartialPlugin(), 'Payolution/PreAuthorize') - ->add(new ReAuthorizePartialPlugin(), 'Payolution/ReAuthorize') - ->add(new RevertPartialPlugin(), 'Payolution/Revert') - ->add(new CapturePartialPlugin(), 'Payolution/Capture') - ->add(new RefundPlugin(), 'Payolution/Refund'); - - return $commandCollection; -}); -``` - -Plugins `PreAuthorizePlugin`, `ReAuthorizePlugin`, `RevertPlugin`, `CapturePlugin` still can be used but they cannot execute partial operations - -Conditions: -```php -$container->extend(OmsDependencyProvider::CONDITION_PLUGINS, function (ConditionCollectionInterface $conditionCollection) { - $conditionCollection - ->add(new IsPreAuthorizationApprovedPlugin(), 'Payolution/IsPreAuthorizationApproved') - ->add(new IsReAuthorizationApprovedPlugin(), 'Payolution/IsReAuthorizationApproved') - ->add(new IsReversalApprovedPlugin(), 'Payolution/IsReversalApproved') - ->add(new IsCaptureApprovedPlugin(), 'Payolution/IsCaptureApproved') - ->add(new IsRefundApprovedPlugin(), 'Payolution/IsRefundApproved'); - - return $conditionCollection; -}); -``` - -All commands and conditions are located in `SprykerEco\Zed\Payolution\Communication\Plugin\Oms\` namespace. - -### Payment Configuration - -Default implementation for checkout payment plugins should be added to `Pyz/Zed/Payment/PaymentDependencyProvider.php` -```php - $container->extend(static::CHECKOUT_PLUGINS, function (CheckoutPluginCollection $pluginCollection) { - $pluginCollection - ->add(new PayolutionPreCheckPlugin(), PayolutionConfig::PROVIDER_NAME, static::CHECKOUT_PRE_CHECK_PLUGINS) - ->add(new PayolutionSaveOrderPlugin(), PayolutionConfig::PROVIDER_NAME, static::CHECKOUT_ORDER_SAVER_PLUGINS) - ->add(new PayolutionPostCheckPlugin(), PayolutionConfig::PROVIDER_NAME, static::CHECKOUT_POST_SAVE_PLUGINS); - - return $pluginCollection; - }); - ``` - -All payment plugins are located in `SprykerEco\Zed\Payolution\Communication\Plugin\Checkout\` namespace. - -## Frontend Integration -To show Payolution on Frontend, extend the payment view: - -src/Pyz/Yves/CheckoutPage/Theme/default/views/payment/payment.twig - - ```php - {% raw %}{%{% endraw %} extends template('page-layout-checkout', 'CheckoutPage') {% raw %}%}{% endraw %} - -{% raw %}{%{% endraw %} define data = { - backUrl: _view.previousStepUrl, - forms: { - payment: _view.paymentForm - }, - title: 'checkout.step.payment.title' | trans, - customForms: {} -} {% raw %}%}{% endraw %} - -{% raw %}{%{% endraw %} block content {% raw %}%}{% endraw %} - {% raw %}{%{% endraw %} embed molecule('form') with { - class: 'box', - data: { - form: data.forms.payment, - options: { - attr: { - id: 'payment-form' - } - }, - submit: { - enable: true, - text: 'checkout.step.summary' | trans - }, - cancel: { - enable: true, - url: data.backUrl, - text: 'general.back.button' | trans - }, - customForms: data.customForms - } - } only {% raw %}%}{% endraw %} - {% raw %}{%{% endraw %} block fieldset {% raw %}%}{% endraw %} - {% raw %}{%{% endraw %} for name, choices in data.form.paymentSelection.vars.choices {% raw %}%}{% endraw %} - {% raw %}{%{% endraw %} set paymentProviderIndex = loop.index0 {% raw %}%}{% endraw %} -
    {% raw %}{{{% endraw %} ('checkout.payment.provider.' ~ name) | trans {% raw %}}}{% endraw %}
    -
      - {% raw %}{%{% endraw %} for key, choice in choices {% raw %}%}{% endraw %} -
    • - {% raw %}{%{% endraw %} embed molecule('form') with { - data: { - form: data.form[data.form.paymentSelection[key].vars.value], - enableStart: false, - enableEnd: false, - customForms: data.customForms - }, - embed: { - index: loop.index ~ '-' ~ paymentProviderIndex, - toggler: data.form.paymentSelection[key] - } - } only {% raw %}%}{% endraw %} - {% raw %}{%{% endraw %} block fieldset {% raw %}%}{% endraw %} - {% raw %}{{{% endraw %} form_row(embed.toggler, { - required: false, - component: molecule('toggler-radio'), - attributes: { - 'target-class-name': 'js-payment-method-' ~ embed.index, - } - }) {% raw %}}}{% endraw %} - {% raw %}{%{% endraw %} set templateName = data.form.vars.template_path | replace('/', '-') {% raw %}%}{% endraw %} - {% raw %}{%{% endraw %} set viewName = data.form.vars.template_path | split('/') {% raw %}%}{% endraw %} - - - {% raw %}{%{% endraw %} endblock {% raw %}%}{% endraw %} - {% raw %}{%{% endraw %} endembed {% raw %}%}{% endraw %} -
    • - {% raw %}{%{% endraw %} endfor {% raw %}%}{% endraw %} -
    - {% raw %}{%{% endraw %} endfor {% raw %}%}{% endraw %} - {% raw %}{%{% endraw %} endblock {% raw %}%}{% endraw %} - {% raw %}{%{% endraw %} endembed {% raw %}%}{% endraw %} -{% raw %}{%{% endraw %} endblock {% raw %}%}{% endraw %} - -``` diff --git a/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/payolution/integrating-the-installment-payment-method-for-payolution.md b/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/payolution/integrating-the-installment-payment-method-for-payolution.md deleted file mode 100644 index 16f30c53f56..00000000000 --- a/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/payolution/integrating-the-installment-payment-method-for-payolution.md +++ /dev/null @@ -1,56 +0,0 @@ ---- -title: Integrating the installment payment method for Payolution -description: Integrate installment payment through Payolution into the Spryker-based shop. -last_updated: Apr 3, 2020 -template: concept-topic-template -originalLink: https://documentation.spryker.com/v5/docs/payolution-installment -originalArticleId: fbd4ca6b-824f-40f4-96c3-58f2346f09bd -redirect_from: - - /v5/docs/payolution-installment - - /v5/docs/en/payolution-installment -related: - - title: Payolution - Performing Requests - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/payolution/payolution-performing-requests.html - - title: Payolution request flow - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/payolution/payolution-request-flow.html - - title: Payolution - link: docs/scos/user/technology-partners/page.version/payment-partners/payolution.html - - title: Integrating the invoice paymnet method for Payolution - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/payolution/integrating-the-invoice-payment-method-for-payolution.html - - title: Installing and configuring Payolution - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/payolution/installing-and-configuring-payolution.html ---- - -## Installment Scenarios - -### Standard Case -![Click Me](https://spryker.s3.eu-central-1.amazonaws.com/docs/Technology+Partners/Payment+Partners/Payolution/payolution-installment-standard-case.png) - -### Full Refund -![Click Me](https://spryker.s3.eu-central-1.amazonaws.com/docs/Technology+Partners/Payment+Partners/Payolution/payolution-installment-fullrefund-case.png) - -### Partial Refund -![Click Me](https://spryker.s3.eu-central-1.amazonaws.com/docs/Technology+Partners/Payment+Partners/Payolution/payolution-installment-partialrefund-case.png) - -## Integrating Payolution Installment Payment -The In order to integrate installment payment, two simple steps are needed: setting Payolution installment payment configuration and calling the facade functions. - -### Setting Payolution Installment Configuration -As installment requests use additional type of requests called Calculation Requests, two groups of configuration are defined: transaction configuration for handling the basic requests (pre-authorization, re-authorization, etc), and calculation configuration for handling calculation requests. The configuration to integrate installment payments using Payolution is: - -* `TRANSACTION_GATEWAY_URL`: the gateway URL to connect with Payolution services (required). -* `CALCULATION_GATEWAY_URL`: the gateway URL to connect with Payolution calculation service (required). -* `TRANSACTION_SECURITY_SENDER`: the sender id (required). -* `TRANSACTION_USER_LOGIN`: the sender username (required). -* `TRANSACTION_USER_PASSWORD`: the sender password (required). -* `CALCULATION_SENDER`: the sender name for the calculation request (optional, default is Spryker). -* `CALCULATION_USER_LOGIN`: the sender username for the calculation request (required). -* `CALCULATION_USER_PASSWORD`: the sender password for the calculation request (required). -* `TRANSACTION_MODE`: the mode of the transaction, either test or live (required). -* `CALCULATION_MODE`: the mode of the calculation, either test or live (required). -* `TRANSACTION_CHANNEL_PRE_CHECK`: a Payolution channel for handling pre-check requests, in case of using Pre-check (optional). -* `TRANSACTION_CHANNEL_INSTALLMENT`: a Payolution channel for handling installment requests except Pre-check and calculation as they have their own channel (required). -* `CALCULATION_CHANNEL`: a Payolution channel for handling calculation requests (required). -* `MIN_ORDER_GRAND_TOTAL_INSTALLMENT`: the allowed minimum order grand total amount for installment payments in the shop e.g. the minimum allowed payment is $2 (required). -* `MAX_ORDER_GRAND_TOTAL_INSTALLMENT`: the allowed maximum order grand total amount for installment payments in the shop e.g. the maximum allowed payment is $5000 (required). -* `PAYOLUTION_BCC_EMAIL_ADDRESS`: Payolution email address to send copies of payment details to Payolution. diff --git a/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/payolution/integrating-the-invoice-payment-method-for-payolution.md b/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/payolution/integrating-the-invoice-payment-method-for-payolution.md deleted file mode 100644 index bc82a0a11a2..00000000000 --- a/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/payolution/integrating-the-invoice-payment-method-for-payolution.md +++ /dev/null @@ -1,95 +0,0 @@ ---- -title: Integrating the invoice paymnet method for Payolution -description: Integrate invoice payment through Payolution into the Spryker-based shop. -last_updated: Sep 15, 2020 -template: concept-topic-template -originalLink: https://documentation.spryker.com/v5/docs/payolution-invoice -originalArticleId: 088f793f-d601-4f23-af18-d4feebcad52e -redirect_from: - - /v5/docs/payolution-invoice - - /v5/docs/en/payolution-invoice -related: - - title: Payolution - Performing Requests - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/payolution/payolution-performing-requests.html - - title: Payolution request flow - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/payolution/payolution-request-flow.html - - title: Integrating the installment payment method for Payolution - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/payolution/integrating-the-installment-payment-method-for-payolution.html - - title: Payolution - link: docs/scos/user/technology-partners/page.version/payment-partners/payolution.html - - title: Installing and configuring Payolution - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/payolution/installing-and-configuring-payolution.html ---- - -## Workflow Scenarios - -Payments from Payolution to Merchant are not included in the sequence diagrams since they occur on a regular basis (e.g. every week). -```html - - - - - - - - - - - - - - - - - -
    -

    Standard Case

    -

    - - -

    -
    -

    Full Refund Before Payment

    -

    - - -

    -
    -

    Partial Refund Before Payment

    -

    - - -

    -
    -

    Full Refund After Payment

    -

    - - -

    -
    -

    Partial Refund After Payment

    -

    - - -

    -
     
    -``` -## Integrating Payolution Invoice Payment -To integrate invoice payments, two simple steps are needed: setting Payolution invoice payment configuration and calling the facade functions. - -### Setting Payolution Invoice Configuration -The configuration to integrate invoice payments using Payolution is: - -* `TRANSACTION_GATEWAY_URL`: the gateway URL to connect with Payolution services (required). -* `TRANSACTION_SECURITY_SENDER `: the sender id (required). -* `TRANSACTION_USER_LOGIN`: the sender username (required). -* `TRANSACTION_USER_PASSWORD`: the sender password (required). -* `TRANSACTION_MODE`: the mode of the transaction, either test or live (required). -* `TRANSACTION_CHANNEL_PRE_CHECK`: a Payolution channel for handling pre-check requests, in case of using Pre-check (optional). -* `TRANSACTION_CHANNEL_INVOICE`: a Payolution channel for handling invoice requests except Pre-check as it has its own channel (required). -* `MIN_ORDER_GRAND_TOTAL_INVOICE`: the allowed minimum order grand total amount for invoice payments in the shop e.g. the minimum allowed payment is $2 (required). -* `MAX_ORDER_GRAND_TOTAL_INVOICE`: the allowed maximum order grand total amount for invoice payments in the shop e.g. the maximum allowed payment is $5000 (required). -* `PAYOLUTION_BCC_EMAIL_ADDRESS`: Payolution email address to send copies of payment details to Payolution. - -### Performing Requests -In order to perform the needed requests, you can easily use the implemented state machine commands and conditions. See [Payolution—Performing Requests](/docs/scos/user/technology-partners/{{page.version}}/payment-partners/payolution/payolution-performing-requests.html) for a summary. You can also use the facade methods directly which, however, are invoked by the state machine. diff --git a/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/payolution/payolution-performing-requests.md b/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/payolution/payolution-performing-requests.md deleted file mode 100644 index e3d84f245d0..00000000000 --- a/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/payolution/payolution-performing-requests.md +++ /dev/null @@ -1,106 +0,0 @@ ---- -title: Payolution - Performing Requests -description: This article includes the state machine commands and conditions provided by Payolution. -last_updated: Apr 3, 2020 -template: concept-topic-template -originalLink: https://documentation.spryker.com/v5/docs/payolution-requests -originalArticleId: ae763bda-29db-415a-9beb-24ba861281be -redirect_from: - - /v5/docs/payolution-requests - - /v5/docs/en/payolution-requests - - /docs/scos/user/technology-partners/202005.0/payment-partners/payolution/payolution-performing-requests.html -related: - - title: Integrating the invoice paymnet method for Payolution - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/payolution/integrating-the-invoice-payment-method-for-payolution.html - - title: Payolution request flow - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/payolution/payolution-request-flow.html - - title: Integrating the installment payment method for Payolution - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/payolution/integrating-the-installment-payment-method-for-payolution.html - - title: Payolution - link: docs/scos/user/technology-partners/page.version/payment-partners/payolution.html - - title: Installing and configuring Payolution - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/payolution/installing-and-configuring-payolution.html ---- - -To perform the needed requests, you can easily use the implemented state machine commands and conditions. This article gives a summary of them. You can also use the facade methods directly, which, however, are invoked by the state machine. - -## Payolution State Machine Commands and Conditions - -### Commands - -**PreAuthorize** - -* Send order and customer data to Payolution -* Risk check performed by Payolution -* Response: - - Success: Risk check passed - - Declined: Request format error or risk check failed -* Plugin: `PreAuthorizePlugin` - -**ReAuthorize** - -* Send updated order data (e.g., new price) -* New risk check (taking into account the previous pre-authorization call) -* Full and partial reauthorization possible. -* Response: - - Success: Risk check passed and update accepted - - Declined: Request format error, update not accepted (e.g., price too high), or risk check failed -* Plugin: `ReAuthorizePlugin` - -**Revert** - -* Revert a previous pre-authorization call -* Always reverts the complete pre-authorization -* Full and partial revert possible. -* Plugin: `RevertPlugin` - -**Capture** - -* Capture of previous (p)re-authorization call -* Full and partial capture possible. Captured amount cannot exceed the authorized amount. -* Response: - - Success: Previous (p)re-authorization still valid and accepted - - Declined: Previous (p)re- authorization expired, request format error, or internal error -* Plugin: `CapturePlugin` - -**Refund** - -* Refund previously captured amount -* Full and partial refunds possible -* Response: - - Success: Refund possible and accepted - - Declined: Previous capture to far in the past, request format error, or internal -* Plugin: `RefundPlugin` - -## Conditions - -| Name | Description | Plugin | -| --- | --- | --- | -| `IsPreAuthorizationApproved` | Checks transaction status log for successful pre-authorization response | `IsPreAuthorizationApprovedPlugin` | -| `IsReAuthorizationApproved` | Checks transaction status log for successful re-authorization response | `IsReAuthorizationApprovedPlugin` | -| `IsReversalApproved` | Checks transaction status log for successful reversal response | `IsReversalApprovedPlugin` | -| `IsCaptureApproved` | Checks transaction status log for successful capture response | `IsCaptureApprovedPlungin` | -| `IsRefundApproved` | Checks transaction status log for successful refund response | `IsRefundApprovedPlugin` | - -## Payolution Facade - -| Facade Method | Param | Return | Description | -| --- | --- | --- | --- | -| `saveOrderPayment` | `QuoteTransfer``CheckoutResponseTransfer` | void | Saves the payment for the coming order | -| `preCheckPayment` | `QuoteTransfer` | `PayolutionTransactionResponseTransfer` | Performs the Pre-check request | -| `preAuthorizePayment` | `OrderTransfer`int (Payment entity ID) | `PayolutionTransactionResponseTransfer` | Performs the Pre-authorization request | -| `reAuthorizePayment` | `OrderTransfer`int (Payment entity ID) | `PayolutionTransactionResponseTransfer` | Performs the Re-authorization request | -| `revertPayment` | `OrderTransfer`int (Payment entity ID) | `PayolutionTransactionResponseTransfer` | Performs the Revert request | -| `capturePayment` | `OrderTransfer`int (Payment entity ID) | `PayolutionTransactionResponseTransfer` | Performs the Capture request | -| `refundPayment` | `OrderTransfer`int (Payment entity ID) | `PayolutionTransactionResponseTransfer` | Performs the Refund request | -| `calculateInstallmentPayments` | `OrderTransfer` | `PayolutionCalculationResponseTransfer` | Calculates available installments for the payment | -| `isPreAuthorizationApproved` | `OrderTransfer` | bool | Checks if the Pre-authorization request is approved | -| `isReAuthorizationApproved` | `OrderTransfer` | bool | Checks if the Re-authorization request is approved | -| `isReversalApproved` | `OrderTransfer` | bool | Checks if the Revert request is approved | -| `isCaptureApproved` | `OrderTransfer` | bool | Checks if the Capture request is approved | -| `isRefundApproved` | `OrderTransfer` | bool | Checks if the Refund request is approved | - -## Core Module Structure Diagram - -The Payolution core module uses the following class and flow and structure: -![Click Me](https://spryker.s3.eu-central-1.amazonaws.com/docs/Technology+Partners/Payment+Partners/Payolution/payolution-core-bundle-structure.png) diff --git a/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/payolution/payolution-request-flow.md b/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/payolution/payolution-request-flow.md deleted file mode 100644 index 5c02812852c..00000000000 --- a/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/payolution/payolution-request-flow.md +++ /dev/null @@ -1,36 +0,0 @@ ---- -title: Payolution request flow -description: This article describes the request flow for Payolution. -last_updated: Sep 15, 2020 -template: concept-topic-template -originalLink: https://documentation.spryker.com/v5/docs/payolution-workflow -originalArticleId: f2860a87-e64e-4786-890f-8ea480c78fe8 -redirect_from: - - /v5/docs/payolution-workflow - - /v5/docs/en/payolution-workflow -related: - - title: Integrating the invoice paymnet method for Payolution - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/payolution/integrating-the-invoice-payment-method-for-payolution.html - - title: Integrating the installment payment method for Payolution - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/payolution/integrating-the-installment-payment-method-for-payolution.html - - title: Payolution - link: docs/scos/user/technology-partners/page.version/payment-partners/payolution.html - - title: Installing and configuring Payolution - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/payolution/installing-and-configuring-payolution.html - - title: Payolution - Performing Requests - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/payolution/payolution-performing-requests.html ---- - -Both [invoice](/docs/scos/user/technology-partners/{{page.version}}/payment-partners/payolution/payolution-provided-payment-methods/payolution-invoice-payment.html) and [installment](/docs/scos/user/technology-partners/{{page.version}}/payment-partners/payolution/payolution-provided-payment-methods/payolution-installment-payment.html) payemnt methods utilize the same request flow. It basically consists of the following requests: - -* Calculation (for installment only): to calculate the installment amounts, dues, and durations. -* Pre-check (optional): to check the user information in order to make sure that all the needed information is correct before doing the actual pre-authorization. -* Pre-authorize: to perform a payment risk check which is a mandatory step before every payment. The payment is basically considered accepted when it is authorized. -* Re-authorize: to update an existing authorization if necessary. -* Revert: to cancel the authorization step which basically cancels the payment before capturing. -* Capture: to capture the payment and receive money from the buyer. -* Refund: to refund the buyer when returning products. - -![Click Me](https://spryker.s3.eu-central-1.amazonaws.com/docs/Technology+Partners/Payment+Partners/Payolution/payolution-workflow.png) - -See Payolution - [Performing Requests](/docs/scos/user/technology-partners/{{page.version}}/payment-partners/payolution/payolution-performing-requests.html) for detailed information on the requests. diff --git a/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/ratenkauf-by-easycredit/installing-and-configuring-ratenkauf-by-easycredit.md b/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/ratenkauf-by-easycredit/installing-and-configuring-ratenkauf-by-easycredit.md deleted file mode 100644 index 6766b7fb2b0..00000000000 --- a/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/ratenkauf-by-easycredit/installing-and-configuring-ratenkauf-by-easycredit.md +++ /dev/null @@ -1,1021 +0,0 @@ ---- -title: Installing and configuring ratenkauf by easyCredit -description: This article contains installation and configuration information for the ratenkauf by easyCredit module into the Spryker-based shop. -last_updated: Apr 3, 2020 -template: concept-topic-template -originalLink: https://documentation.spryker.com/v5/docs/ratenkauf-by-easycredit-installation-and-configuration -originalArticleId: bb0abfd9-0e73-4a4f-92ef-4dc0b5f753fc -redirect_from: - - /v5/docs/ratenkauf-by-easycredit-installation-and-configuration - - /v5/docs/en/ratenkauf-by-easycredit-installation-and-configuration -related: - - title: ratenkauf by easyCredit - link: docs/scos/user/technology-partners/page.version/payment-partners/ratenkauf-by-easycredit.html ---- - -## Installation - -To install Easycredit, run the following command in console: -```bash -composer require spryker-eco/easycredit -``` - -After installation, run the `propel:install` command or check the following migration: - -```php -CREATE SEQUENCE "spy_payment_easycredit_api_log_pk_seq"; - -CREATE TABLE "spy_payment_easycredit_api_log" -( - "id_payment_easycredit_api_log" INTEGER NOT NULL, - "type" VARCHAR NOT NULL, - "request" TEXT NOT NULL, - "response" TEXT NOT NULL, - "status_code" INT2, - "error_code" VARCHAR, - "error_message" VARCHAR, - "error_type" VARCHAR, - "created_at" TIMESTAMP, - "updated_at" TIMESTAMP, - PRIMARY KEY ("id_payment_easycredit_api_log") -); - -CREATE SEQUENCE "spy_payment_easycredit_order_identifier_pk_seq"; - -CREATE TABLE "spy_payment_easycredit_order_identifier" -( - "id_payment_easycredit_order_identifier" INTEGER NOT NULL, - "fk_sales_order" INTEGER NOT NULL, - "identifier" VARCHAR NOT NULL, - "confirmed" BOOLEAN NOT NULL, - PRIMARY KEY ("id_payment_easycredit_order_identifier") -); -``` - - -## Configuration -Perform the initial configuration of Easycredit: - -```php - 'Easycredit01', -]; - -... -$config[EasycreditConstants::SHOP_IDENTIFIER] = 'Your shop identifier'; -$config[EasycreditConstants::SHOP_TOKEN] = 'Your shop token'; -$config[EasycreditConstants::API_URL] = 'https://ratenkauf.easycredit.de/ratenkauf-ws/rest/v2'; -$config[EasycreditConstants::SUCCESS_URL] = $config[ApplicationConstants::BASE_URL_YVES] . '/easycredit/payment/success'; -$config[EasycreditConstants::CANCELLED_URL] = $config[ApplicationConstants::BASE_URL_YVES] . '/checkout/payment'; -$config[EasycreditConstants::DENIED_URL] = $config[ApplicationConstants::BASE_URL_YVES] . '/checkout/payment'; -``` - -## Integration -To integrate Easycredit into your project, do the following: - -1. Update `CheckoutPageDependencyProvider` by adding a new payment subform and a payment method handler. -To show the Easycredit payment method on the payment step, define `SubFormPlugin` and `StepHandlerPlugin`. - -CheckoutPageDependencyProvider.php - -```php -public const CLIENT_EASYCREDIT = 'CLIENT_EASYCREDIT'; - -... - /** - * @param \Spryker\Yves\Kernel\Container $container - * - * @return \Spryker\Yves\Kernel\Container - */ - public function provideDependencies(Container $container): Container - { - $container = parent::provideDependencies($container); - $container = $this->addEasycreditClient($container); - - return $container; - } - - /** - * @param \Spryker\Yves\Kernel\Container $container - * - * @return \Spryker\Yves\Kernel\Container - */ - protected function addSubFormPluginCollection(Container $container): Container - { - $container[static::PAYMENT_SUB_FORMS] = function () { - $subFormPluginCollection = new SubFormPluginCollection(); - $subFormPluginCollection->add(new EasycreditSubFormPlugin()); - - return $subFormPluginCollection; - }; - return $container; - } - - /** - * @param \Spryker\Yves\Kernel\Container $container - * - * @return \Spryker\Yves\Kernel\Container - */ - protected function addPaymentMethodHandlerPluginCollection(Container $container): Container - { - $container[self::PAYMENT_METHOD_HANDLER] = function () { - $stepHandlerPluginCollection = new StepHandlerPluginCollection(); - $stepHandlerPluginCollection->add(new EasycreditHandlerPlugin(), PaymentTransfer::EASYCREDIT); - return $stepHandlerPluginCollection; - }; - - return $container; - } - - /** - * @param \Spryker\Yves\Kernel\Container $container - * - * @return \Spryker\Yves\Kernel\Container - */ - protected function addEasycreditClient(Container $container): Container - { - $container[static::CLIENT_EASYCREDIT] = function (Container $container) { - return $container->getLocator()->easycredit()->client(); - }; - - return $container; - } -... -``` - -2. The next dependency provider you should update is `OmsDependencyProvider`. -To use commands and conditions for events in OMS, define them. - -OmsDependencyProvider - -```php -... -$container->extend(self::CONDITION_PLUGINS, function (ConditionCollectionInterface $conditionCollection) { - $conditionCollection->add(new IsOrderConfirmedPlugin(), 'Easycredit/IsOrderConfirmed'); - return $conditionCollection; -}); -... -``` - -3. And one more dependency provider to be updated is `CheckoutDependencyProvider`. -To send requests to Easycredit, you need the technical order identifier value. After adding this plugin, the order identifier will be saved to the database in table `spy_payment_easycredit_order_identifier`. - -CheckoutDependencyProvider - -```php -... -protected function getCheckoutOrderSavers(Container $container) -{ - return [ - ... - new EasycreditOrderIdentifierPlugin(), - ]; -} - -... -``` - -To use Easycredit requests during the checkout process, you have to create your own checkout steps. To implement the checkout steps, follow the guidelines below: - -1. Extend `StepFactory`. - -CheckoutPageFactory - -```php -getEasycreditClient() - ); - } - - /** - * @return StepInterface - */ - public function createSummaryStep(): StepInterface - { - return new SprykerShopSummaryStep( - $this->getProductBundleClient(), - $this->getShipmentService(), - $this->getConfig(), - SprykerShopCheckoutPageControllerProvider::CHECKOUT_SUMMARY, - HomePageControllerProvider::ROUTE_HOME, - $this->getCheckoutClient() - ); - - } - - /** - * @return StepInterface - */ - public function createShipmentStep(): StepInterface - { - return new ShipmentStep( - $this->getCalculationClient(), - $this->getShipmentPlugins(), - $this->createShipmentStepPostConditionChecker(), - $this->createGiftCardItemsChecker(), - SprykerShopCheckoutPageControllerProvider::CHECKOUT_SHIPMENT, - HomePageControllerProvider::ROUTE_HOME, - $this->getEasycreditClient() - ); - - } - - /** - * @return \Spryker\Yves\StepEngine\Process\StepCollectionInterface - */ - public function createStepCollection(): StepCollectionInterface - { - $stepCollection = new StepCollection( - $this->getUrlGenerator(), {% raw %}{%{% endraw %} if data.easycredit {% raw %}%}{% endraw %} - {% raw %}{%{% endraw %} include molecule('easycredit-summary', 'Easycredit') with { - data: { - interest: data.easycredit.interest, - url: data.easycredit.url, - text: data.easycredit.text - } - } only {% raw %}%}{% endraw %} - {% raw %}{%{% endraw %} endif {% raw %}%}{% endraw %} - - CheckoutPageControllerProvider::CHECKOUT_ERROR - ); - $stepCollection - ->addStep($this->createEntryStep()) - ->addStep($this->createCustomerStep()) - ->addStep($this->createAddressStep()) - ->addStep($this->createShipmentStep()) - ->addStep($this->createPaymentStep()) - ->addStep($this->createEasycreditStep()) - ->addStep($this->createSummaryStep()) - ->addStep($this->createPlaceOrderStep()) - ->addStep($this->createSuccessStep()); - return $stepCollection; - } - - /** - * @return EasycreditClientInterface - */ - protected function getEasycreditClient(): EasycreditClientInterface - { - return $this->getProvidedDependency(CheckoutPageDependencyProvider::CLIENT_EASYCREDIT); - } -} -``` - -3. Now you can extend the basic steps on the project level and can create your Easycredit step that will be called when a user takes Easycredit as `PaymentMethod`. -Examples of steps implementations: - -EasycreditStep.php - -```php -easycreditClient = $easycreditClient; - } - - /** - * @param \Spryker\Shared\Kernel\Transfer\AbstractTransfer|\Generated\Shared\Transfer\QuoteTransfer $quoteTransfer - * - * @return bool - */ - public function requireInput(AbstractTransfer $quoteTransfer) - { - return false; - } - - /** - * @param \Symfony\Component\HttpFoundation\Request $request - * @param \Spryker\Shared\Kernel\Transfer\AbstractTransfer|\Generated\Shared\Transfer\QuoteTransfer $quoteTransfer - * - * @return \Spryker\Shared\Kernel\Transfer\AbstractTransfer - */ - public function execute(Request $request, AbstractTransfer $quoteTransfer) - { - $payment = $quoteTransfer->getPayment(); - if ($payment->getPaymentSelection() === 'easycredit') { - $responseTransfer = $this->easycreditClient->sendInitializePaymentRequest($quoteTransfer); - $this->redirectUrl = static::URL_EASYCREDIT_REDIRECT_URL . $responseTransfer->getPaymentIdentifier(); - $quoteTransfer->getPayment()->getEasycredit()->setVorgangskennung($responseTransfer->getPaymentIdentifier()); - } - return $quoteTransfer; - } - - /** - * @param \Spryker\Shared\Kernel\Transfer\AbstractTransfer|\Generated\Shared\Transfer\QuoteTransfer $quoteTransfer - * - * @return bool - */ - public function postCondition(AbstractTransfer $quoteTransfer) - { - return true; - } - - /** - * Return external redirect url, when redirect occurs not within same application. Used after execute. - * - * @return string - */ - public function getExternalRedirectUrl() - { - return $this->redirectUrl; - } - - /** - * Requirements for this step, return true when satisfied. - * - * @param \Generated\Shared\Transfer\QuoteTransfer $quoteTransfer - * - * @return bool - */ - public function preCondition(AbstractTransfer $quoteTransfer) - { - return true; - } - -``` - -ShipmentStep.php - -```php -easycreditClient = $client; - } - - /** - * @param Request $request - * @param QuoteTransfer $quoteTransfer - * @return \Generated\Shared\Transfer\QuoteTransfer - */ - public function execute(Request $request, AbstractTransfer $quoteTransfer) - { - $easycreditLegalTextTransfer = new EasycreditLegalTextTransfer(); - $easycreditLegalTextTransfer->setText($this->easycreditClient->sendApprovalTextRequest()->getText()); - $quoteTransfer->setEasycreditLegalText($easycreditLegalTextTransfer); - return parent::execute($request, $quoteTransfer); - } -} -``` - -SummaryStep.php - -```php -getPayment() && $quoteTransfer->getPayment()->getEasycredit()) { - $easycreditData = [ - 'interest' => $quoteTransfer->getPayment()->getEasycredit()->getAnfallendeZinsen(), - 'url' => $quoteTransfer->getPayment()->getEasycredit()->getUrlVorvertraglicheInformationen(), - 'text' => $quoteTransfer->getPayment()->getEasycredit()->getTilgungsplanText(), - ]; - } - - return [ - 'quoteTransfer' => $quoteTransfer, - 'cartItems' => $this->productBundleClient->getGroupedBundleItems( - $quoteTransfer->getItems(), - $quoteTransfer->getBundleItems() - ), - 'easycredit' => $easycreditData, - ]; - } -} -``` - -4. To run the step process for the new Easycredit step, extend the default `CheckoutController` with a new action for handling the Easycredit step. - -\CheckoutController - -```php -createStepProcess()->process($request); - } -} -``` - -5. After creating a new action in the checkout controller, define a new route in `CheckoutPageRouteProviderPlugin`. - -CheckoutPageRouteProviderPlugin.php - -```php -addEasycreditStepRoute($routeCollection); - - return $routeCollection; - } - - /** - * @param \Spryker\Yves\Router\Route\RouteCollection $routeCollection - */ - public function addEasycreditStepRoute($routeCollection) - { - $route = $this->buildRoute('/checkout/easycredit', 'CheckoutPage', 'Checkout', 'easyCredit'); - $route = $route->setMethods(['GET', 'POST']); - $routeCollection->add(static::CHECKOUT_EASY_CREDIT, $route); - - return $routeCollection; - } -} - -``` - -6. Also, the Easycredit bundle has its own `YvesController` for handling a success response from Easycredit, so you have to define a controller in `RouterDependencyProvider`. - -RouterDependencyProvider.php - -```php -{% raw %}{{{% endraw %} ('checkout.payment.provider.' ~ name) | trans {% raw %}}}{% endraw %} -
      - {% raw %}{%{% endraw %} for key, choice in choices {% raw %}%}{% endraw %} -
    • - {% raw %}{%{% endraw %} embed molecule('form') with { - data: { - form: data.form[data.form.paymentSelection[key].vars.value], - enableStart: false, - enableEnd: false, - customForms: data.customForms - }, - embed: { - index: loop.index ~ '-' ~ paymentProviderIndex, - toggler: data.form.paymentSelection[key] - } - } only {% raw %}%}{% endraw %} - {% raw %}{%{% endraw %} block fieldset {% raw %}%}{% endraw %} - {% raw %}{{{% endraw %} form_row(embed.toggler, { - required: false, - component: molecule('toggler-radio'), - attributes: { - 'target-selector': '.js-payment-method-' ~ embed.index, - 'class-to-toggle': 'is-hidden' - } - }) {% raw %}}}{% endraw %} - - {% raw %}{%{% endraw %} endblock {% raw %}%}{% endraw %} - {% raw %}{%{% endraw %} endembed {% raw %}%}{% endraw %} -
    • - {% raw %}{%{% endraw %} endfor {% raw %}%}{% endraw %} -
    - {% raw %}{%{% endraw %} endfor {% raw %}%}{% endraw %} - {% raw %}{%{% endraw %} endblock {% raw %}%}{% endraw %} - {% raw %}{%{% endraw %} endembed {% raw %}%}{% endraw %} -{% raw %}{%{% endraw %} endblock {% raw %}%}{% endraw %} -``` - -
    -summary.twig - -Summary step - `src/Pyz/Yves/CheckoutPage/Theme/default/views/summary/summary.twig` - -```php -{% raw %}{%{% endraw %} extends template('page-layout-checkout', 'CheckoutPage') {% raw %}%}{% endraw %} - - {% raw %}{%{% endraw %} define data = { - backUrl: _view.previousStepUrl, - transfer: _view.quoteTransfer, - cartItems: _view.cartItems, - easycredit: _view.easycredit, - shippingAddress: _view.quoteTransfer.shippingAddress, - billingAddress: _view.quoteTransfer.billingAddress, - shipmentMethod: _view.quoteTransfer.shipment.method.name, - paymentMethod: _view.quoteTransfer.payment.paymentMethod, - - forms: { - summary: _view.summaryForm - }, - - overview: { - shipmentMethod: _view.quoteTransfer.shipment.method.name, - expenses: _view.quoteTransfer.expenses, - voucherDiscounts: _view.quoteTransfer.voucherDiscounts, - cartRuleDiscounts: _view.quoteTransfer.cartRuleDiscounts, - - prices: { - subTotal: _view.quoteTransfer.totals.subtotal, - storeCurrency: _view.quoteTransfer.shipment.method.storeCurrencyPrice, - grandTotal: _view.quoteTransfer.totals.grandtotal, - tax: _view.quoteTransfer.totals.taxtotal.amount, - discountTotal: _view.quoteTransfer.totals.discounttotal | default - } - }, - - title: 'checkout.step.summary.title' | trans -} {% raw %}%}{% endraw %} - - {% raw %}{%{% endraw %} block content {% raw %}%}{% endraw %} -
    -
    -
    - {% raw %}{{{% endraw %} 'checkout.step.summary.with_method' | trans {% raw %}}}{% endraw %} {% raw %}{{{% endraw %}data.paymentMethod{% raw %}}}{% endraw %} -
    {% raw %}{{{% endraw %} 'checkout.step.summary.payment' | trans {% raw %}}}{% endraw %}
    -
    - - {% raw %}{%{% endraw %} include molecule('display-address') with { - class: 'text-small', - data: { - address: data.billingAddress - } - } only {% raw %}%}{% endraw %} -
    - -
    - {% raw %}{{{% endraw %} 'checkout.step.summary.with_method' | trans {% raw %}}}{% endraw %} {% raw %}{{{% endraw %} data.shipmentMethod {% raw %}}}{% endraw %} -
    {% raw %}{{{% endraw %} 'checkout.step.summary.shipping' | trans {% raw %}}}{% endraw %}
    -
    - - {% raw %}{%{% endraw %} include molecule('display-address') with { - class: 'text-small', - data: { - address: data.shippingAddress - } - } only {% raw %}%}{% endraw %} -
    -
    - -
    -
    - {% raw %}{%{% endraw %} for item in data.cartItems {% raw %}%}{% endraw %} - {% raw %}{%{% endraw %} set item = item.bundleProduct is defined ? item.bundleProduct : item {% raw %}%}{% endraw %} - {% raw %}{%{% endraw %} embed molecule('summary-item', 'CheckoutPage') with { - data: { - name: item.name, - quantity: item.quantity, - price: item.sumPrice | money, - options: item.productOptions | default({}), - bundleItems: item.bundleItems | default([]), - quantitySalesUnit: item.quantitySalesUnit, - amountSalesUnit: item.amountSalesUnit, - amount: item.amount - }, - embed: { - isLast: not loop.last, - item: item - } - } only {% raw %}%}{% endraw %} - {% raw %}{%{% endraw %} block body {% raw %}%}{% endraw %} - {% raw %}{{{% endraw %}parent(){% raw %}}}{% endraw %} - {% raw %}{%{% endraw %} if widgetExists('CartNoteQuoteItemNoteWidgetPlugin') {% raw %}%}{% endraw %} - {% raw %}{%{% endraw %} if embed.item.cartNote is not empty {% raw %}%}{% endraw %} - {% raw %}{{{% endraw %} widget('CartNoteQuoteItemNoteWidgetPlugin', embed.item) {% raw %}}}{% endraw %} {# @deprecated Use molecule('note-list', 'CartNoteWidget') instead. #} - {% raw %}{%{% endraw %} endif {% raw %}%}{% endraw %} - {% raw %}{%{% endraw %} elseif embed.item.cartNote is not empty {% raw %}%}{% endraw %} - {% raw %}{%{% endraw %} include molecule('note-list', 'CartNoteWidget') ignore missing with { - data: { - label: 'cart_note.checkout_page.item_note', - note: embed.item.cartNote - } - } only {% raw %}%}{% endraw %} - {% raw %}{%{% endraw %} endif {% raw %}%}{% endraw %} - {% raw %}{%{% endraw %} if embed.isLast {% raw %}%}{% endraw %}
    {% raw %}{%{% endraw %} endif {% raw %}%}{% endraw %} - {% raw %}{%{% endraw %} endblock {% raw %}%}{% endraw %} - {% raw %}{%{% endraw %} endembed {% raw %}%}{% endraw %} - {% raw %}{%{% endraw %} endfor {% raw %}%}{% endraw %} -
    - - {% raw %}{%{% endraw %} if data.transfer.cartNote is not empty {% raw %}%}{% endraw %} - {% raw %}{%{% endraw %} if widgetExists('CartNoteQuoteNoteWidgetPlugin') {% raw %}%}{% endraw %} -
    - {% raw %}{{{% endraw %} widget('CartNoteQuoteNoteWidgetPlugin', data.transfer) {% raw %}}}{% endraw %} {#@deprecated Use molecule('note-list', 'CartNoteWidget') instead.#} -
    - {% raw %}{%{% endraw %} else {% raw %}%}{% endraw %} -
    - {% raw %}{%{% endraw %} include molecule('note-list', 'CartNoteWidget') ignore missing with { - data: { - label: 'cart_note.checkout_page.quote_note', - note: data.transfer.cartNote - } - } only {% raw %}%}{% endraw %} -
    - {% raw %}{%{% endraw %} endif {% raw %}%}{% endraw %} - {% raw %}{%{% endraw %} endif {% raw %}%}{% endraw %} - -
    - {% raw %}{%{% endraw %} widget 'CheckoutVoucherFormWidget' args [data.transfer] only {% raw %}%}{% endraw %} - {% raw %}{%{% endraw %} elsewidget 'CheckoutVoucherFormWidgetPlugin' args [data.transfer] only {% raw %}%}{% endraw %} {# @deprecated Use CheckoutVoucherFormWidget instead. #} - {% raw %}{%{% endraw %} endwidget {% raw %}%}{% endraw %} -
    - % embed molecule('form') with { - class: 'box', - data: { - form: data.forms.summary, - submit: { - enable: can('SeeOrderPlaceSubmitPermissionPlugin'), - text: 'checkout.step.place.order' | trans - }, - cancel: { - enable: true, - url: data.backUrl, - text: 'general.back.button' | trans - } - }, - embed: { - overview: data.overview - } - } only {% raw %}%}{% endraw %} - {% raw %}{%{% endraw %} block body {% raw %}%}{% endraw %} - {% raw %}{%{% endraw %} include molecule('summary-overview', 'CheckoutPage') with { - data: embed.overview - } only {% raw %}%}{% endraw %} - -
    - {% raw %}{{{% endraw %}parent(){% raw %}}}{% endraw %} - {% raw %}{%{% endraw %} endblock {% raw %}%}{% endraw %} - {% raw %}{%{% endraw %} endembed {% raw %}%}{% endraw %} - {% raw %}{%{% endraw %} if data.easycredit {% raw %}%}{% endraw %} - {% raw %}{%{% endraw %} include molecule('easycredit-summary', 'Easycredit') with { - data: { - interest: data.easycredit.interest, - url: data.easycredit.url, - text: data.easycredit.text - } - } only {% raw %}%}{% endraw %} - {% raw %}{%{% endraw %} endif {% raw %}%}{% endraw %} -
    -
    -{% raw %}{%{% endraw %} endblock {% raw %}%}{% endraw %} -``` -
    -
    - -**pdp.twig** - -PDP page - `src/Pyz/Yves/ProductDetailPage/Theme/default/views/pdp/pdp.twig` - -```php -{% raw %}{%{% endraw %} extends template('page-layout-main') {% raw %}%}{% endraw %} - -{% raw %}{%{% endraw %} define data = { - product: _view.product, - productUrl: _view.productUrl, - - title: product.metaTitle | default(_view.product.name), - metaTitle: product.metaTitle | default(_view.product.name), - metaDescription: _view.product.metaDescription | default, - metaKeywords: _view.product.metaKeywords | default -} {% raw %}%}{% endraw %} - -{% raw %}{%{% endraw %} block headScripts {% raw %}%}{% endraw %} - {% raw %}{{{% endraw %} parent() {% raw %}}}{% endraw %} - -{% raw %}{%{% endraw %} endblock {% raw %}%}{% endraw %} - -{% raw %}{%{% endraw %} block breadcrumbs {% raw %}%}{% endraw %} - {% raw %}{%{% endraw %} widget 'ProductBreadcrumbsWithCategoriesWidget' args [data.product] only {% raw %}%}{% endraw %} - {% raw %}{%{% endraw %} elsewidget 'ProductCategoryWidgetPlugin' args [data.product] only {% raw %}%}{% endraw %} {# @deprecated Use ProductBreadcrumbsWithCategoriesWidget instead. #} - {% raw %}{%{% endraw %} endwidget {% raw %}%}{% endraw %} -{% raw %}{%{% endraw %} endblock {% raw %}%}{% endraw %} - -{% raw %}{%{% endraw %} block title {% raw %}%}{% endraw %} -

    {% raw %}{{{% endraw %} data.product.name {% raw %}}}{% endraw %}

    - -{% raw %}{%{% endraw %} endblock {% raw %}%}{% endraw %} - -{% raw %}{%{% endraw %} block content {% raw %}%}{% endraw %} -
    -
    - {% raw %}{%{% endraw %} include molecule('product-carousel', 'ProductDetailPage') with { - class: 'box', - data: { - product: data.product - } - } only {% raw %}%}{% endraw %} -
    - -
    - {% raw %}{%{% endraw %} include molecule('product-configurator', 'ProductDetailPage') with { - class: 'box', - data: { - product: data.product - } - } only {% raw %}%}{% endraw %} -
    -
    - -{% raw %}{%{% endraw %} widget 'ProductAlternativeListWidget' args [data.product] only {% raw %}%}{% endraw %} -{% raw %}{%{% endraw %} elsewidget 'ProductAlternativeWidgetPlugin' args [data.product] only {% raw %}%}{% endraw %} {# @deprecated Use ProductAlternativeListWidget instead. #} -{% raw %}{%{% endraw %} endwidget {% raw %}%}{% endraw %} - -{% raw %}{%{% endraw %} include molecule('product-detail', 'ProductDetailPage') with { - class: 'box', - data: { - description: data.product.description, - attributes: data.product.attributes - } -} only {% raw %}%}{% endraw %} - -{% raw %}{%{% endraw %} widget 'ProductReplacementForListWidget' args [data.product.sku] only {% raw %}%}{% endraw %} -{% raw %}{%{% endraw %} elsewidget 'ProductReplacementForWidgetPlugin' args [data.product.sku] only {% raw %}%}{% endraw %} {# @deprecated Use ProductReplacementForListWidget instead. #} -{% raw %}{%{% endraw %} endwidget {% raw %}%}{% endraw %} - -{% raw %}{%{% endraw %} widget 'ProductDetailPageReviewWidget' args [data.product.idProductAbstract] only {% raw %}%}{% endraw %} -{% raw %}{%{% endraw %} elsewidget 'ProductReviewWidgetPlugin' args [data.product.idProductAbstract] only {% raw %}%}{% endraw %} {# @deprecated Use ProductDetailPageReviewWidget instead. #} -{% raw %}{%{% endraw %} endwidget {% raw %}%}{% endraw %} - -{% raw %}{%{% endraw %} widget 'SimilarProductsWidget' args [data.product] only {% raw %}%}{% endraw %} -{% raw %}{%{% endraw %} elsewidget 'SimilarProductsWidgetPlugin' args [data.product] only {% raw %}%}{% endraw %} {# @deprecated Use SimilarProductsWidget instead. #} -{% raw %}{%{% endraw %} endwidget {% raw %}%}{% endraw %} - -{% raw %}{%{% endraw %} if widgetExists('ProductCmsBlockWidgetPlugin') {% raw %}%}{% endraw %} - {% raw %}{{{% endraw %} widget('ProductCmsBlockWidgetPlugin', data.product) {% raw %}}}{% endraw %} {# @deprecated Use molecule('product-cms-block', 'CmsBlockWidget') instead. #} -{% raw %}{%{% endraw %} else {% raw %}%}{% endraw %} - {% raw %}{%{% endraw %} include molecule('product-cms-block', 'CmsBlockWidget') ignore missing with { - class: 'box', - data: { - idProductAbstract: data.product.idProductAbstract - } - } only {% raw %}%}{% endraw %} -{% raw %}{%{% endraw %} endif {% raw %}%}{% endraw %} - -{% raw %}{%{% endraw %} endblock {% raw %}%}{% endraw %} -``` - - {% info_block infoBox "Note" %} -You might want to configure the product detail page to add some validation and show the Easycredit badge in `src/Pyz/Yves/ProductDetailPage/Theme/default/components/molecules/product-configurator/product-configurator.twig` -{% endinfo_block %} - -product-configurator.twig - -```php -... - {% raw %}{%{% endraw %} set easyCreditMinTreshold = 20000 {% raw %}%}{% endraw %} - {% raw %}{%{% endraw %} set easyCreditMaxTreshold = 500000 {% raw %}%}{% endraw %} - {% raw %}{%{% endraw %} if data.product.price > easyCreditMinTreshold and data.product.price < easyCreditMaxTreshold {% raw %}%}{% endraw %} - {% raw %}{%{% endraw %} include molecule('easycredit-badge', 'EasyCredit' ) with { - data: { - title: 'EasyCredit:', - id: 'easy-credit-id' - }, - attributes: { - 'easycredit-options': '{ - "webshopId": "", - "finanzierungsbetrag": "' ~ data.product.price / 100 ~ '" , - "textVariante": "KURZ" - }' - } - } only {% raw %}%}{% endraw %} - {% raw %}{%{% endraw %} endif {% raw %}%}{% endraw %} -... -``` diff --git a/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/ratepay/disabling-address-updates-from-the-backend-application-for-ratepay.md b/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/ratepay/disabling-address-updates-from-the-backend-application-for-ratepay.md deleted file mode 100644 index 9e6d50e6713..00000000000 --- a/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/ratepay/disabling-address-updates-from-the-backend-application-for-ratepay.md +++ /dev/null @@ -1,45 +0,0 @@ ---- -title: Disabling address updates from the backend application for RatePay -description: Disable address updates from the backend application for Ratepay. -last_updated: Apr 3, 2020 -template: concept-topic-template -originalLink: https://documentation.spryker.com/v5/docs/ratepay-disable-address-updates -originalArticleId: c76fe229-57f4-421b-8f40-b0bd3c357907 -redirect_from: - - /v5/docs/ratepay-disable-address-updates - - /v5/docs/en/ratepay-disable-address-updates - - /docs/scos/user/technology-partners/202005.0/payment-partners/ratepay/ratepay-how-to-disable-address-updates-from-the-backend-application.html -related: - - title: RatePay - link: docs/scos/user/technology-partners/page.version/payment-partners/ratepay.html - - title: RatePay - Payment Workflow - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/ratepay/ratepay-payment-workflow.html - - title: RatePay facade methods - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/ratepay/ratepay-facade-methods.html - - title: Integrating the Invoice payment method for RatePay - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/ratepay/integrating-payment-methods-for-ratepay//integrating-the-invoice-payment-method-for-ratepay.html - - title: RatePay- Core Module Structure Diagram - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/ratepay/ratepay-core-module-structure-diagram.html - - title: Integrating the Installment payment method for RatePay - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/ratepay/integrating-payment-methods-for-ratepay//integrating-the-installment-payment-method-for-ratepay.html - - title: Integrating the Prepayment payment method for RatePay - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/ratepay/integrating-payment-methods-for-ratepay//integrating-the-prepayment-payment-method-for-ratepay.html - - title: RatePay - State Machine Commands and Conditions - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/ratepay/ratepay-state-machine-commands-and-conditions.html - - title: Integrating the Direct Debit payment method for RatePay - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/ratepay/integrating-payment-methods-for-ratepay/integrating-the-direct-debit-payment-method-for-ratepay.html ---- - -To disable updates on addresses from the backend application, follow the steps described below: - -**Step 1**: - -* Overwrite on project side -`/vendor/spryker/spryker/Bundles/Sales/src/Spryker/
    Zed/Sales/Presentation/Detail/boxes/addresses.twig` -* Remove ' `Edit`' button - -**Step 2**: - -* Overwrite on project side -`/vendor/spryker/spryker/Bundles/Sales/src/Spryker/
    Zed/Sales/Communication/Controller/EditController.php` -* Disable ' `addressAction`' diff --git a/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/ratepay/integrating-payment-methods-for-ratepay/integrating-the-direct-debit-payment-method-for-ratepay.md b/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/ratepay/integrating-payment-methods-for-ratepay/integrating-the-direct-debit-payment-method-for-ratepay.md deleted file mode 100644 index e66f4ecbf8c..00000000000 --- a/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/ratepay/integrating-payment-methods-for-ratepay/integrating-the-direct-debit-payment-method-for-ratepay.md +++ /dev/null @@ -1,72 +0,0 @@ ---- -title: Integrating the Direct Debit payment method for RatePay -description: Integrate direct debit payment through Ratepay into the Spryker-based shop. -last_updated: Sep 15, 2020 -template: concept-topic-template -originalLink: https://documentation.spryker.com/v5/docs/ratepay-direct-debit -originalArticleId: 29e413b4-d22d-4ce4-9400-39a13df370b3 -redirect_from: - - /v5/docs/ratepay-direct-debit - - /v5/docs/en/ratepay-direct-debit - - /docs/scos/user/technology-partners/202005.0/payment-partners/ratepay/integrating-payment-methods-for-ratepay/integrating-the-direct-debit-payment-method-for-ratepay.html -related: - - title: RatePay - link: docs/scos/user/technology-partners/page.version/payment-partners/ratepay.html - - title: RatePay - Payment Workflow - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/ratepay/ratepay-payment-workflow.html - - title: RatePay facade methods - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/ratepay/ratepay-facade-methods.html - - title: Disabling address updates from the backend application for RatePay - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/ratepay/disabling-address-updates-from-the-backend-application-for-ratepay.html - - title: Integrating the Invoice payment method for RatePay - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/ratepay/integrating-payment-methods-for-ratepay//integrating-the-invoice-payment-method-for-ratepay.html - - title: RatePay- Core Module Structure Diagram - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/ratepay/ratepay-core-module-structure-diagram.html - - title: Integrating the Installment payment method for RatePay - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/ratepay/integrating-payment-methods-for-ratepay//integrating-the-installment-payment-method-for-ratepay.html - - title: Integrating the Prepayment payment method for RatePay - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/ratepay/integrating-payment-methods-for-ratepay//integrating-the-prepayment-payment-method-for-ratepay.html - - title: RatePay - State Machine Commands and Conditions - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/ratepay/ratepay-state-machine-commands-and-conditions.html ---- - -## Workflow Scenarios - - -### Payment Flow -![Click Me](https://spryker.s3.eu-central-1.amazonaws.com/docs/Technology+Partners/Payment+Partners/Ratepay/ratepay-ddelv-payment-flow.png) - -### Cancellation Flow -![Click Me](https://spryker.s3.eu-central-1.amazonaws.com/docs/Technology+Partners/Payment+Partners/Ratepay/ratepay-ddelv-payment-flow.png) - -### Partial Cancellation Flow -![Click Me](https://spryker.s3.eu-central-1.amazonaws.com/docs/Technology+Partners/Payment+Partners/Ratepay/ratepay-ddelv-partial-cancellation-flow.png) - -### Refund Flow -![Click Me](https://spryker.s3.eu-central-1.amazonaws.com/docs/Technology+Partners/Payment+Partners/Ratepay/ratepay-ddelv-refund-flow.png) - -## Integrating Direct Debit - -Direct Debit Payment -In order to integrate direct debit payment, two simple steps are needed: set RatePAY Direct Debit payment configuration and call the facade functions. - -### Set RatePay Direct Debit Configuration - -The configuration to integrate Direct Debit payments using RatePAY is: - -* `PROFILE_ID`: merchant's login (required). -* `SECURITY_CODE`: merchant's password (required). -* `SHOP_ID`: shop identifier (required). -* `SYSTEM_ID`: system identifier (required). -* `CLIENT_VERSION`: client system version. -* `CLIENT_NAME`: client name. -* `RATEPAY_REQUEST_VERSION`: request version. -* `RATEPAY_REQUEST_XMLNS_URN`: request XMLNS urn. -* `MODE`: the mode of the transaction, either test or live (required). -* `API_TEST_URL`: test mode API url. -* `API_LIVE_URL`: live mode API url. -* `DEBIT_PAY_TYPES`: debit pay types, can be DIRECT-DEBIT or BANK-TRANSFER. - -## Performing Requests - -In order to perform the needed requests, you can easily use the implemented state machine commands and conditions. The [RatePAY State Machine Commands and Conditions](/docs/scos/user/technology-partners/{{page.version}}/payment-partners/ratepay/ratepay-state-machine-commands-and-conditions.html) section gives a summary of them. You can also use the facade methods directly which, however, are invoked by the state machine. diff --git a/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/ratepay/integrating-payment-methods-for-ratepay/integrating-the-installment-payment-method-for-ratepay.md b/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/ratepay/integrating-payment-methods-for-ratepay/integrating-the-installment-payment-method-for-ratepay.md deleted file mode 100644 index a1dee6c5e47..00000000000 --- a/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/ratepay/integrating-payment-methods-for-ratepay/integrating-the-installment-payment-method-for-ratepay.md +++ /dev/null @@ -1,83 +0,0 @@ ---- -title: Integrating the Installment payment method for RatePay -description: Integrate installment payment through Ratepay into the Spryker-based shop. -last_updated: Sep 15, 2020 -template: concept-topic-template -originalLink: https://documentation.spryker.com/v5/docs/ratepay-installment -originalArticleId: 51b5e8c5-3b82-4733-9ce0-e9738436d95d -redirect_from: - - /v5/docs/ratepay-installment - - /v5/docs/en/ratepay-installment - - /docs/scos/user/technology-partners/202005.0/payment-partners/ratepay/integrating-payment-methods-for-ratepay//integrating-the-installment-payment-method-for-ratepay.html -related: - - title: RatePay - link: docs/scos/user/technology-partners/page.version/payment-partners/ratepay.html - - title: RatePay - Payment Workflow - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/ratepay/ratepay-payment-workflow.html - - title: RatePay facade methods - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/ratepay/ratepay-facade-methods.html - - title: Disabling address updates from the backend application for RatePay - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/ratepay/disabling-address-updates-from-the-backend-application-for-ratepay.html - - title: Integrating the Invoice payment method for RatePay - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/ratepay/integrating-payment-methods-for-ratepay//integrating-the-invoice-payment-method-for-ratepay.html - - title: RatePay- Core Module Structure Diagram - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/ratepay/ratepay-core-module-structure-diagram.html - - title: Integrating the Prepayment payment method for RatePay - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/ratepay/integrating-payment-methods-for-ratepay//integrating-the-prepayment-payment-method-for-ratepay.html - - title: RatePay - State Machine Commands and Conditions - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/ratepay/ratepay-state-machine-commands-and-conditions.html - - title: Integrating the Direct Debit payment method for RatePay - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/ratepay/integrating-payment-methods-for-ratepay/integrating-the-direct-debit-payment-method-for-ratepay.html ---- - -The shop must implement the Calculation Request operation to calculate an example installment plan and show it to the customer. Some input parameters for the calculation are passed from the shop (e.g. the shopping basket total), others are stored in the merchant's RatePAY profile held by the Gateway (e.g. the allowed interest rate range). The merchant's profile parameters can be retrieved by the Configuration Request operation. - -## Workflow Scenarios - -### Payment Flow -![Click Me](https://spryker.s3.eu-central-1.amazonaws.com/docs/Technology+Partners/Payment+Partners/Ratepay/ratepay-installment-payment-flow.png) - -### Cancellation Flow -![Click Me](https://spryker.s3.eu-central-1.amazonaws.com/docs/Technology+Partners/Payment+Partners/Ratepay/ratepay-installment-cancellation-flow.png) - -### Partial Cancellation Flow -![Click Me](https://spryker.s3.eu-central-1.amazonaws.com/docs/Technology+Partners/Payment+Partners/Ratepay/ratepay-installment-partial-cancellation-flow.png) - -### Refund Flow -![Click Me](https://spryker.s3.eu-central-1.amazonaws.com/docs/Technology+Partners/Payment+Partners/Ratepay/ratepay-installment-refund-flow.png) - -## Integrating RatePAY Installment Payment - -In order to integrate installment payment, two simple steps are needed: set RatePAY installment payment configuration and call the facade functions. - -### Set RatePAY Installment Configuration - -The installment requests use two additional types of requests called Configuration and Calculation Requests. - -Three groups of configuration are defined: - -* transaction configuration for handling the basic requests (init-payment, payment-request, etc) -* installment configuration for handling configuration -* calculation for handling calculation requests. - -The configuration to integrate Installment payment method using RatePAY is: - -* `PROFILE_ID`: merchant's login (required). -* `SECURITY_CODE`: merchant's password (required). -* `SHOP_ID`: shop identifier (required). -* `SYSTEM_ID`: system identifier (required). -* `CLIENT_VERSION`: client system version. -* `CLIENT_NAME`: client name. -* `RATEPAY_REQUEST_VERSION`: request version. -* R `ATEPAY_REQUEST_XMLNS_URN`: request XMLNS urn. -* `MODE`: the mode of the transaction, either test or live (required). -* `API_TEST_URL`: test mode API url. -* `API_LIVE_URL`: live mode API url. -* `DEBIT_PAY_TYPES`: debit pay types, can be DIRECT-DEBIT or BANK-TRANSFER. -* `INSTALLMENT_CALCULATION_TYPES`: installment calculator types, can be by time or by date. - -You can copy over configs to your config from the RatePAY module's `config.dist.php` file. - -### Perform Requests - -In order to perform the needed requests, you can easily use the implemented state machine commands and conditions. The [RatePAY State Machine Commands and Conditions](/docs/scos/user/technology-partners/{{page.version}}/payment-partners/ratepay/ratepay-state-machine-commands-and-conditions.html) section gives a summary of them. You can also use the facade methods directly which, however, are invoked by the state machine. diff --git a/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/ratepay/integrating-payment-methods-for-ratepay/integrating-the-invoice-payment-method-for-ratepay.md b/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/ratepay/integrating-payment-methods-for-ratepay/integrating-the-invoice-payment-method-for-ratepay.md deleted file mode 100644 index 6193ee99635..00000000000 --- a/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/ratepay/integrating-payment-methods-for-ratepay/integrating-the-invoice-payment-method-for-ratepay.md +++ /dev/null @@ -1,76 +0,0 @@ ---- -title: Integrating the Invoice payment method for RatePay -description: Integrate invoice payment through Ratepay into the Spryker-based shop. -last_updated: Sep 15, 2020 -template: concept-topic-template -originalLink: https://documentation.spryker.com/v5/docs/ratepay-invoice -originalArticleId: 7784b024-eaeb-4a22-b51d-f41c42b8c857 -redirect_from: - - /v5/docs/ratepay-invoice - - /v5/docs/en/ratepay-invoice - - /docs/scos/user/technology-partners/202005.0/payment-partners/ratepay/integrating-payment-methods-for-ratepay//integrating-the-invoice-payment-method-for-ratepay.html -related: - - title: RatePay facade methods - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/ratepay/ratepay-facade-methods.html - - title: Disabling address updates from the backend application for RatePay - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/ratepay/disabling-address-updates-from-the-backend-application-for-ratepay.html - - title: RatePay- Core Module Structure Diagram - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/ratepay/ratepay-core-module-structure-diagram.html - - title: Integrating the Prepayment payment method for RatePay - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/ratepay/integrating-payment-methods-for-ratepay//integrating-the-prepayment-payment-method-for-ratepay.html - - title: RatePay - link: docs/scos/user/technology-partners/page.version/payment-partners/ratepay.html - - title: RatePay - Payment Workflow - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/ratepay/ratepay-payment-workflow.html - - title: RatePay - State Machine Commands and Conditions - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/ratepay/ratepay-state-machine-commands-and-conditions.html - - title: Integrating the Installment payment method for RatePay - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/ratepay/integrating-payment-methods-for-ratepay//integrating-the-installment-payment-method-for-ratepay.html - - title: Integrating the Direct Debit payment method for RatePay - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/ratepay/integrating-payment-methods-for-ratepay/integrating-the-direct-debit-payment-method-for-ratepay.html ---- - -## Workflow Scenarios -### Payment Flow -![Click Me](https://spryker.s3.eu-central-1.amazonaws.com/docs/Technology+Partners/Payment+Partners/Ratepay/ratepay-installment-payment-flow.png) - -### Cancellation Flow -![Click Me](https://spryker.s3.eu-central-1.amazonaws.com/docs/Technology+Partners/Payment+Partners/Ratepay/ratepay-invoice-cancellation-flow.png) - -### Partial Cancellation Flow -![Click Me](https://spryker.s3.eu-central-1.amazonaws.com/docs/Technology+Partners/Payment+Partners/Ratepay/ratepay-invoice-partial-cancellation-flow.png) - -### Refund Flow -![Click Me](https://spryker.s3.eu-central-1.amazonaws.com/docs/Technology+Partners/Payment+Partners/Ratepay/ratepay-invoice-refund-flow.png) - - -## Integrating RatePAY Invoice Payment -To integrate invoice payment, you need to: RatePAY invoice payment configuration and call the facade functions. - -## Setting RatePAY Invoice Configuration -The configuration to integrate invoice payments using RatePAY is: - - * `PROFILE_ID`: merchant’s login (required). - - * `SECURITY_CODE`: merchant’s password (required). - - * `SHOP_ID`: shop identifier (required). - - * `SYSTEM_ID`: system identifier (required). - - * `CLIENT_VERSION`: client system version. - - * `CLIENT_NAME`: client name. - - * `RATEPAY_REQUEST_VERSION`: request version. - - * `RATEPAY_REQUEST_XMLNS_URN`: request XMLNS urn. - - * `MODE`: the mode of the transaction, either test or live (required). - - * `API_TEST_URL`: test mode API url. - - * `API_LIVE_URL`: live mode API url. - -## Perform Requests -To perform the needed requests, use the [RatePAY State Machine Commands and Conditions](/docs/scos/user/technology-partners/{{page.version}}/payment-partners/ratepay/ratepay-state-machine-commands-and-conditions.html) . You can also use the `facademethods`directly which, however, are invoked by the state machine. diff --git a/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/ratepay/integrating-payment-methods-for-ratepay/integrating-the-prepayment-payment-method-for-ratepay.md b/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/ratepay/integrating-payment-methods-for-ratepay/integrating-the-prepayment-payment-method-for-ratepay.md deleted file mode 100644 index 8ec0656397d..00000000000 --- a/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/ratepay/integrating-payment-methods-for-ratepay/integrating-the-prepayment-payment-method-for-ratepay.md +++ /dev/null @@ -1,69 +0,0 @@ ---- -title: Integrating the Prepayment payment method for RatePay -description: Integrate prepayment through Ratepay into the Spryker-based shop. -last_updated: Apr 3, 2020 -template: concept-topic-template -originalLink: https://documentation.spryker.com/v5/docs/ratepay-prepayment -originalArticleId: c0c3f3d0-adee-40ff-a64d-e550848a41e6 -redirect_from: - - /v5/docs/ratepay-prepayment - - /v5/docs/en/ratepay-prepayment - - /docs/scos/user/technology-partners/202005.0/payment-partners/ratepay/integrating-payment-methods-for-ratepay//integrating-the-prepayment-payment-method-for-ratepay.html -related: - - title: RatePay - link: docs/scos/user/technology-partners/page.version/payment-partners/ratepay.html - - title: RatePay facade methods - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/ratepay/ratepay-facade-methods.html - - title: Disabling address updates from the backend application for RatePay - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/ratepay/disabling-address-updates-from-the-backend-application-for-ratepay.html - - title: RatePay- Core Module Structure Diagram - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/ratepay/ratepay-core-module-structure-diagram.html - - title: Integrating the Invoice payment method for RatePay - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/ratepay/integrating-payment-methods-for-ratepay//integrating-the-invoice-payment-method-for-ratepay.html - - title: RatePay - Payment Workflow - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/ratepay/ratepay-payment-workflow.html - - title: RatePay - State Machine Commands and Conditions - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/ratepay/ratepay-state-machine-commands-and-conditions.html - - title: Integrating the Installment payment method for RatePay - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/ratepay/integrating-payment-methods-for-ratepay//integrating-the-installment-payment-method-for-ratepay.html - - title: Integrating the Direct Debit payment method for RatePay - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/ratepay/integrating-payment-methods-for-ratepay/integrating-the-direct-debit-payment-method-for-ratepay.html ---- - -## Workflow Scenarios - -### Payment Flow -![Click Me](https://spryker.s3.eu-central-1.amazonaws.com/docs/Technology+Partners/Payment+Partners/Ratepay/ratepay_prepayment_payment_flow.png) - -### Cancellation Flow -![Click Me](https://spryker.s3.eu-central-1.amazonaws.com/docs/Technology+Partners/Payment+Partners/Ratepay/ratepay_prepayment_cancellation_flow.png) - -### Partial Cancellation Flow -![Click Me](https://spryker.s3.eu-central-1.amazonaws.com/docs/Technology+Partners/Payment+Partners/Ratepay/ratepay_prepayment_payment_flow.png) - -### Refund Flow -![Click Me](https://spryker.s3.eu-central-1.amazonaws.com/docs/Technology+Partners/Payment+Partners/Ratepay/payolution_installment_partialrefund_case.png) - -## Integrating RatePay Prepayment Payment - -To integrate prepayment payment: set RatePAY prepayment payment configuration and call the facade functions. - -### Set RatePay Prepayment Configuration - -The configuration to integrate prepayment payments using RatePAY is: - -* `PROFILE_ID`: merchant's login (required). -* `SECURITY_CODE`: merchant's password (required). -* `SHOP_ID`: shop identifier (required). -* `SYSTEM_ID`: system identifier (required). -* `CLIENT_VERSION`: client system version. -* `CLIENT_NAME`: client name. -* `RATEPAY_REQUEST_VERSION`: request version. -* `RATEPAY_REQUEST_XMLNS_URN`: request XMLNS urn. -* `MODE`: the mode of the transaction, either test or live (required). -* `API_TEST_URL`: test mode API URL. -* `API_LIVE_URL`: live mode API URL. - -### Performing Requests - -In order to perform the needed requests, you can easily use the implemented state machine commands and conditions. The RatePAY State Machine Commands and Conditions section gives a summary of them. You can also use the facade methods directly which, however, are invoked by the state machine. diff --git a/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/ratepay/ratepay-core-module-structure-diagram.md b/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/ratepay/ratepay-core-module-structure-diagram.md deleted file mode 100644 index 2254ac4c2e0..00000000000 --- a/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/ratepay/ratepay-core-module-structure-diagram.md +++ /dev/null @@ -1,34 +0,0 @@ ---- -title: RatePay- Core Module Structure Diagram -description: This article includes module schema with the class structure and flow. -last_updated: Apr 3, 2020 -template: concept-topic-template -originalLink: https://documentation.spryker.com/v5/docs/ratepay-structure-diag -originalArticleId: 8543e757-6840-4977-8d48-80239ec9c6fc -redirect_from: - - /v5/docs/ratepay-structure-diag - - /v5/docs/en/ratepay-structure-diag - - /docs/scos/user/technology-partners/202005.0/payment-partners/ratepay/ratepay-core-module-structure-diagram.html -related: - - title: RatePay - link: docs/scos/user/technology-partners/page.version/payment-partners/ratepay.html - - title: RatePay facade methods - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/ratepay/ratepay-facade-methods.html - - title: Disabling address updates from the backend application for RatePay - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/ratepay/disabling-address-updates-from-the-backend-application-for-ratepay.html - - title: Integrating the Prepayment payment method for RatePay - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/ratepay/integrating-payment-methods-for-ratepay//integrating-the-prepayment-payment-method-for-ratepay.html - - title: Integrating the Invoice payment method for RatePay - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/ratepay/integrating-payment-methods-for-ratepay//integrating-the-invoice-payment-method-for-ratepay.html - - title: RatePay - Payment Workflow - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/ratepay/ratepay-payment-workflow.html - - title: RatePay - State Machine Commands and Conditions - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/ratepay/ratepay-state-machine-commands-and-conditions.html - - title: Integrating the Installment payment method for RatePay - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/ratepay/integrating-payment-methods-for-ratepay//integrating-the-installment-payment-method-for-ratepay.html - - title: Integrating the Direct Debit payment method for RatePay - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/ratepay/integrating-payment-methods-for-ratepay/integrating-the-direct-debit-payment-method-for-ratepay.html ---- - -The RatePay core module uses the following class structure and flow. -![Click Me](https://spryker.s3.eu-central-1.amazonaws.com/docs/Technology+Partners/Payment+Partners/Ratepay/ratepay_core_module_structure.png) diff --git a/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/ratepay/ratepay-facade-methods.md b/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/ratepay/ratepay-facade-methods.md deleted file mode 100644 index 039d4732415..00000000000 --- a/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/ratepay/ratepay-facade-methods.md +++ /dev/null @@ -1,51 +0,0 @@ ---- -title: RatePay facade methods -description: This article includes facade methods provided by Ratepay. -last_updated: Apr 3, 2020 -template: concept-topic-template -originalLink: https://documentation.spryker.com/v5/docs/ratepay-facade -originalArticleId: c136b06e-c1d3-49fa-a37a-e08e3f618c90 -redirect_from: - - /v5/docs/ratepay-facade - - /v5/docs/en/ratepay-facade - - /docs/scos/user/technology-partners/202005.0/payment-partners/ratepay/ratepay-facade-methods.html - - /docs/scos/dev/technology-partner-guides/202005.0/payment-partners/ratepay/integrating-payment-methods-for-ratepay/ratepay-facade-methods.html -related: - - title: RatePay - link: docs/scos/user/technology-partners/page.version/payment-partners/ratepay.html - - title: RatePay - Payment Workflow - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/ratepay/ratepay-payment-workflow.html - - title: Disabling address updates from the backend application for RatePay - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/ratepay/disabling-address-updates-from-the-backend-application-for-ratepay.html - - title: Integrating the Invoice payment method for RatePay - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/ratepay/integrating-payment-methods-for-ratepay//integrating-the-invoice-payment-method-for-ratepay.html - - title: RatePay- Core Module Structure Diagram - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/ratepay/ratepay-core-module-structure-diagram.html - - title: Integrating the Installment payment method for RatePay - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/ratepay/integrating-payment-methods-for-ratepay//integrating-the-installment-payment-method-for-ratepay.html - - title: Integrating the Prepayment payment method for RatePay - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/ratepay/integrating-payment-methods-for-ratepay//integrating-the-prepayment-payment-method-for-ratepay.html - - title: RatePay - State Machine Commands and Conditions - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/ratepay/ratepay-state-machine-commands-and-conditions.html - - title: Integrating the Direct Debit payment method for RatePay - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/ratepay/integrating-payment-methods-for-ratepay/integrating-the-direct-debit-payment-method-for-ratepay.html ---- - -| Facade Method | Param | Return | Description | -| --- | --- | --- | --- | -| `saveOrderPayment` | `QuoteTransfer`, `CheckoutResponseTransfer` | void | Saves RatePAY payment method data according to quote and checkout response transfer data. | -| `initPayment` | `QuoteTransfer` | `RatepayResponseTransfer` | Performs the init payment request to RatePAY Gateway to retrieve transaction data. | -| `requestPayment` | `QuoteTransfer` | `RatepayResponseTransfer` | Performs check the customer and order details payment request to RatePAY Gateway. | -| `confirmPayment` | `OrderTransfer` | `RatepayResponseTransfer` | Performs the payment confirmation request to RatePAY Gateway. | -| `confirmDelivery` | `OrderTransfer`, array (Order Items) | `RatepayResponseTransfer` | Performs the delivery confirmation request to RatePAY Gateway. | -| `cancelPayment` | `OrderTransfer`, array (Order Items) | `RatepayResponseTransfer` | Performs the cancel payment request to RatePAY Gateway. | -| `refundPayment` | `OrderTransfer`, array (Order Items) | `RatepayResponseTransfer` | Performs the refund payment request to RatePAY Gateway. | -| `installmentConfiguration` | `QuoteTransfer` | `RatepayInstallmentConfigurationResponseTransfer` | Performs the installment payment method calculator configuration request to RatePAY Gateway. | -| `installmentCalculation` | `QuoteTransfer` | `RatepayInstallmentCalculationResponseTransfer` | Performs the installment payment method calculator calculation request to RatePAY Gateway. | -| `isPaymentConfirmed` | `OrderTransfer` | bool | Checks if the payment confirmation API request got success response from RatePAY Gateway. | -| `isDeliveryConfirmed` | `OrderTransfer` | bool | Checks if the delivery confirmation API request got success response from RatePAY Gateway. | -| `isRefundApproved` | `OrderTransfer` | bool | Checks if the payment refund API request got success response from RatePAY Gateway. | -| `isCancellationConfirmed` | `OrderTransfer` | bool | Checks if the payment cancellation API request got success response from RatePAY Gateway. | -| `requestProfile` | | `RatepayProfileResponseTransfer` | Retrieves profile data from Ratepay Gateway. | -| `expandItems` | `CartChangeTransfer` | `CartChangeTransfer` | Expands cart items with necessary for RatePAY information (short_description, long_description, etc). | -| `install` | `MessengerInterface` | void | Installs module translations to project glossary. | diff --git a/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/ratepay/ratepay-payment-workflow.md b/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/ratepay/ratepay-payment-workflow.md deleted file mode 100644 index f7b6f40c37a..00000000000 --- a/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/ratepay/ratepay-payment-workflow.md +++ /dev/null @@ -1,59 +0,0 @@ ---- -title: RatePay - Payment Workflow -description: This article describes the request flow that uses Ratepay. -last_updated: Apr 3, 2020 -template: concept-topic-template -originalLink: https://documentation.spryker.com/v5/docs/ratepay-payment-workflow -originalArticleId: f514f3c8-bab1-4bbe-872f-926f07d80e43 -redirect_from: - - /v5/docs/ratepay-payment-workflow - - /v5/docs/en/ratepay-payment-workflow - - /docs/scos/user/technology-partners/202005.0/payment-partners/ratepay/ratepay-payment-workflow.html -related: - - title: RatePay - link: docs/scos/user/technology-partners/page.version/payment-partners/ratepay.html - - title: RatePay facade methods - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/ratepay/ratepay-facade-methods.html - - title: Disabling address updates from the backend application for RatePay - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/ratepay/disabling-address-updates-from-the-backend-application-for-ratepay.html - - title: Integrating the Invoice payment method for RatePay - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/ratepay/integrating-payment-methods-for-ratepay//integrating-the-invoice-payment-method-for-ratepay.html - - title: RatePay- Core Module Structure Diagram - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/ratepay/ratepay-core-module-structure-diagram.html - - title: Integrating the Prepayment payment method for RatePay - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/ratepay/integrating-payment-methods-for-ratepay//integrating-the-prepayment-payment-method-for-ratepay.html - - title: RatePay - State Machine Commands and Conditions - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/ratepay/ratepay-state-machine-commands-and-conditions.html - - title: Integrating the Installment payment method for RatePay - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/ratepay/integrating-payment-methods-for-ratepay//integrating-the-installment-payment-method-for-ratepay.html - - title: Integrating the Direct Debit payment method for RatePay - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/ratepay/integrating-payment-methods-for-ratepay/integrating-the-direct-debit-payment-method-for-ratepay.html ---- - -Invoice, Prepayment and Direct Debit methods have the same request flow. -The payment workflow consists of the following requests: - -* `PAYMENT INIT`- Initialize the transaction and get a valid transaction-id. -* `PAYMENT QUERY`- Check the customer and order details, perform a configurable risk scoring, retrieve the payment products permitted in the given context. The PAYMENT_QUERY full can be booked with a guaranteed acceptance. This means that all products given back will be accepted by a following PAYMENT_REQUEST. -* `PAYMENT REQUEST`- Check the customer and order details, perform risk scoring, return either customer acceptance or rejection. -* `PAYMENT CONFIRM`- Finalize the payment process. -* `CONFIRMATION DELIVER`- Immediately after the ordered goods have been delivered to the customer, the merchant must send a Confirmation Deliver message to the RatePAY Gateway. - - Installment method has additional requests for installment calculator: - -* `CONFIGURATION REQUEST`- Retrieve the stored configuration parameters for a certain merchant profile. - -* `CALCULATION REQUEST`- Provides an installment plan depending on the request parameters and stored parameters of the merchant profile. - -## Payment Change Workflow -Trigger payment change processing and fee charging: - -`PAYMENT CHANGE`cancellation - Merchant cancels some or all items of the order. - -`PAYMENT CHANGE`refund - Merchant returns some or all items of the order. - -## Payment Workflow Diagram -![Payment Workflow Diagram](https://spryker.s3.eu-central-1.amazonaws.com/docs/Technology+Partners/Payment+Partners/Ratepay/ratepay-payment-workflow.png) - -## Checkout and Delivery process flow -![RatePay - Checkout Delivery Process Flow](https://spryker.s3.eu-central-1.amazonaws.com/docs/Technology+Partners/Payment+Partners/Ratepay/ratepay-checkout-delivery-process-flow.png) diff --git a/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/ratepay/ratepay-state-machine-commands-and-conditions.md b/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/ratepay/ratepay-state-machine-commands-and-conditions.md deleted file mode 100644 index 767c01cf1cf..00000000000 --- a/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/ratepay/ratepay-state-machine-commands-and-conditions.md +++ /dev/null @@ -1,74 +0,0 @@ ---- -title: RatePay - State Machine Commands and Conditions -description: This article includes the state machine commands and conditions provided by Ratepay. -last_updated: Apr 3, 2020 -template: concept-topic-template -originalLink: https://documentation.spryker.com/v5/docs/ratepay-state-machine -originalArticleId: 27aa3eae-3882-4eeb-a7c7-602fb16dccd0 -redirect_from: - - /v5/docs/ratepay-state-machine - - /v5/docs/en/ratepay-state-machine - - /docs/scos/user/technology-partners/202005.0/payment-partners/ratepay/ratepay-state-machine-commands-and-conditions.html -related: - - title: RatePay - link: docs/scos/user/technology-partners/page.version/payment-partners/ratepay.html - - title: RatePay facade methods - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/ratepay/ratepay-facade-methods.html - - title: Disabling address updates from the backend application for RatePay - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/ratepay/disabling-address-updates-from-the-backend-application-for-ratepay.html - - title: Integrating the Prepayment payment method for RatePay - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/ratepay/integrating-payment-methods-for-ratepay//integrating-the-prepayment-payment-method-for-ratepay.html - - title: RatePay- Core Module Structure Diagram - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/ratepay/ratepay-core-module-structure-diagram.html - - title: Integrating the Invoice payment method for RatePay - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/ratepay/integrating-payment-methods-for-ratepay//integrating-the-invoice-payment-method-for-ratepay.html - - title: RatePay - Payment Workflow - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/ratepay/ratepay-payment-workflow.html - - title: Integrating the Installment payment method for RatePay - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/ratepay/integrating-payment-methods-for-ratepay//integrating-the-installment-payment-method-for-ratepay.html - - title: Integrating the Direct Debit payment method for RatePay - link: docs/scos/dev/technology-partner-guides/page.version/payment-partners/ratepay/integrating-payment-methods-for-ratepay/integrating-the-direct-debit-payment-method-for-ratepay.html ---- - -## Commands - -### ConfirmDelivery - -* Send delivery confirmation data to RatePAY -* Response: - - Success: Delivery confirmed - - Declined: Request format error or delivery confirmation error -* Plugin: `ConfirmDeliveryPlugin` - -### ConfirmPayment - -* Send payment confirmation data to RatePAY -* Response: - - Success: Payment confirmed - - Declined: Request format error or payment confirmation error -* Plugin: `ConfirmPaymentPlugin` - -### CancelPayment - -* Send order items cancellation data to RatePAY -* Response: - - Success: Order items canceled successfully - - Declined: Request format error or order items cancellation error -* Plugin: `CancelPaymentPlugin` - -### RefundPayment - -* Send refund order items data to RatePAY -* Response: - - Success: Order items refunded successfully - - Declined: Request format error or order items refund error -* Plugin: `RefundPaymentPlugin` - -## Conditions - -| Name | Description | Plugin | -| --- | --- | --- | -| `IsRefunded` | Checks transaction status for successful order items refund response | `IsRefundedPlugin` | -| `IsPaymentConfirmed` | Checks transaction status for successful order items payment response | `IsPaymentConfirmedPlugin` | -| `IsDeliveryConfirmed` | Checks transaction status for successful order items delivery response | `IsDeliveryConfirmedPlugin` | -| `IsCancellationConfirmed` | Checks transaction status for successful order items cancellation response | `IsCancellationConfirmedPlugin` | diff --git a/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/ratepay/ratepay-state-machines.md b/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/ratepay/ratepay-state-machines.md deleted file mode 100644 index fdea41b6a16..00000000000 --- a/docs/scos/dev/technology-partner-guides/202005.0/payment-partners/ratepay/ratepay-state-machines.md +++ /dev/null @@ -1,16 +0,0 @@ ---- -title: RatePay state machines -description: Offer intelligent payment solutions for handling most popular paylater models like invoice and installments on the internet for the DACH region by integrating RatePay into the Spryker-based shop. -last_updated: Sep 15, 2020 -template: concept-topic-template ---- - -We use state machines for handling and managing orders and payments. To integrate RatePAY payments, a state machine for RatePAY should be created. - -A basic and fully functional state machine for each payment method is already built: -* `RatepayInvoice01.xml` -* `RatepayPrepayment01.xml` -* `RatepayElv01.xml` -* `RatepayInstallment01.xml` - -You can use the same state machines or build new ones. The state machine commands and conditions trigger RatePay facade methods calls in order to perform the needed requests to RatePAY. diff --git a/docs/scos/dev/technology-partner-guides/202005.0/product-information-pimerp/akeneo/installing-and-configuring-akeneo.md b/docs/scos/dev/technology-partner-guides/202005.0/product-information-pimerp/akeneo/installing-and-configuring-akeneo.md deleted file mode 100644 index d4fafb8eb7a..00000000000 --- a/docs/scos/dev/technology-partner-guides/202005.0/product-information-pimerp/akeneo/installing-and-configuring-akeneo.md +++ /dev/null @@ -1,537 +0,0 @@ ---- -title: Installing and configuring Akeneo -description: This article provides installation and configuration details for the Akeneo module in the Spryker-based project. -last_updated: Sep 15, 2020 -template: concept-topic-template -originalLink: https://documentation.spryker.com/v5/docs/akeneo-installation-configuration -originalArticleId: 12ad7c8f-cfd1-4cb5-9120-60d4bccf5657 -redirect_from: - - /v5/docs/akeneo-installation-configuration - - /v5/docs/en/akeneo-installation-configuration -related: - - title: Akeneo - link: docs/scos/user/technology-partners/page.version/product-information-pimerp/akeneo.html ---- - -## Installation - -To install AkeneoPim, add `AkeneoPimMiddlewareConnector` by running the console command. Set `akeneo/api-php-client` version that you need. -```bash -composer require akeneo/api-php-client:^4.0.0 spryker-eco/akeneo-pim:^1.0.0 spryker-eco/akeneo-pim-middleware-connector:^1.0.0 -``` - -## Global Configuration - -Add `SprykerMiddleware` to your project's core namespaces: -```php -$config[KernelConstants::CORE_NAMESPACES] = [ - 'SprykerShop', - 'SprykerMiddleware', - 'SprykerEco', - 'Spryker', -]; -``` -To set up the Akeneo initial configuration, use the credentials you received from your PIM: -```php -$config[AkeneoPimConstants::HOST] = ''; -$config[AkeneoPimConstants::USERNAME] = ''; -$config[AkeneoPimConstants::PASSWORD] = ''; -$config[AkeneoPimConstants::CLIENT_ID] = ''; -$config[AkeneoPimConstants::CLIENT_SECRET] = ''; -``` - -Next, specify your paths to the additional map files: -```php -$config[AkeneoPimMiddlewareConnectorConstants::LOCALE_MAP_FILE_PATH] = APPLICATION_ROOT_DIR . '/data/import/maps/locale_map.json'; -$config[AkeneoPimMiddlewareConnectorConstants::ATTRIBUTE_MAP_FILE_PATH] = APPLICATION_ROOT_DIR . '/data/import/maps/attribute_map.json'; -$config[AkeneoPimMiddlewareConnectorConstants::SUPER_ATTRIBUTE_MAP_FILE_PATH] = APPLICATION_ROOT_DIR . '/data/import/maps/super_attribute_map.json'; -``` - -This being done, specify the ID of the category template that should be assigned to the imported categories: -```php -$config[AkeneoPimMiddlewareConnectorConstants::FK_CATEGORY_TEMPLATE] = 1; -``` - -Next, specify the name of a tax set for the imported products: -```php -$config[AkeneoPimMiddlewareConnectorConstants::TAX_SET] = 1; -``` - -Finally, specify the locales that should be imported to shops and stores in which imported products are to be available, and specify how prices should be mapped according to locales: -```php -$config[AkeneoPimMiddlewareConnectorConstants::LOCALES_FOR_IMPORT] = [ - 'de_DE', - 'de_AT', -]; -$config[AkeneoPimMiddlewareConnectorConstants::ACTIVE_STORES_FOR_PRODUCTS] = [ - 'DE', - 'AT' -]; -$config[AkeneoPimMiddlewareConnectorConstants::LOCALES_TO_PRICE_MAP] = [ - 'de_DE' => [ - 'currency' => 'EUR', - 'type' => 'DEFAULT', - 'store' => 'DE', - ], - 'en_US' => [ - 'currency' => 'USD', - 'type' => 'DEFAULT', - 'store' => 'US', - ], -]; -``` - -## Dependency Configuration - -Add Middleware Process console command to `src/Pyz/Zed/Console/ConsoleDependencyProvider.php` in your project: -```php -... -use SprykerMiddleware\Zed\Process\Communication\Console\ProcessConsole; -... - -protected function getConsoleCommands(Container $container) -{ - $commands = [ - ... - new ProcessConsole(), - ]; - ... - - return $commands; -} -``` - -Create `ProcessDependencyProvider` on a project level for specifying `ConfigurationPlugins`. Add `src/Pyz/Zed/Process/ProcessDependencyProvider.php` file: -```php -getFacade()->importProductsAbstract($data); - } -} -``` - -Implement your own `DataImporter` for importing products to the shop database. It can be a business module inside the `AkeneoPimMiddlewareConnector` module. Example: - -AkeneoDataImporter.php - - ```php - dataImporterPublisher = $dataImporterPublisher; - $this->dataSetStepBroker = $dataSetStepBroker; - $this->dataSet = $dataSet; - $this->writerPlugins = $writerPlugins; - } - - /** - * @param array $data - * - * @return void - */ - public function import(array $data): void - { - EventBehaviorConfig::disableEvent(); - foreach ($data as $item) { - $this->dataSet->exchangeArray($item); - $this->dataSetStepBroker->execute($this->dataSet); - /** @var DataSetWriterPluginInterface $writerPlugin */ - foreach ($this->writerPlugins as $writerPlugin) { - $writerPlugin->write($this->dataSet); - } - } - foreach ($this->writerPlugins as $writerPlugin) { - $writerPlugin->write($this->dataSet); - } - EventBehaviorConfig::enableEvent(); - $this->dataImporterPublisher->triggerEvents(); - } -} -``` - -Implement facade methods for the `AkeneoPimMiddlewareConnector` module. Example: - -```php -class AkeneoPimMiddlewareConnectorFacade extends SprykerAkeneoPimMiddlewareConnectorFacade implements AkeneoPimMiddlewareConnectorFacadeInterface -... - /** - * @param array $data - */ - public function importProductsAbstract(array $data): void - { - $this->getFactory() - ->createProductAbstractImporter() - ->import($data); - } -... -... -``` - -## Dataset Step Broker and Writer - -Business Factory method is used for Importer creation. Determine the data writing approach and how you want to broke the payload. The `AkeneoImporter` you implemented usually expects the implementation of `\Spryker\Zed\DataImport\Business\Model\DataSet\DataSetStepBrokerInterface`. - -For better understanding, see the example of the `AkeneoDataImporter` creation for importing abstract products in `AkeneoPimMiddlewareConnectorBusinessFactory.` - -AkeneoPimMiddlewareConnectorBusinessFactory - - ```php -... -class AkeneoPimMiddlewareConnectorBusinessFactory extends SprykerAkeneoPimMiddlewareConnectorBusinessFactory -... - - /** - * @return \Pyz\Zed\AkeneoPimMiddlewareConnector\Business\AkeneoDataImporter\AkeneoDataImporterInterface - */ - public function createProductAbstractImporter() - { - return new AkeneoDataImporter( - $this->createDataImporterPublisher(), - $this->createProductAbstractImportDataSetStepBroker(), - $this->createDataSet(), - $this->getProvidedDependency(AkeneoPimMiddlewareConnectorDependencyProvider::PRODUCT_ABSTRACT_PROPEL_WRITER_PLUGINS) - ); - } - - /** - * @return \Spryker\Zed\DataImport\Business\Model\DataSet\DataSetInterface - */ - public function createDataSet() - { - return new DataSet(); - } - - /** - * @return \Spryker\Zed\DataImport\Business\Model\DataSet\DataSetStepBrokerInterface - * - * @throws \Spryker\Zed\Kernel\Exception\Container\ContainerKeyNotFoundException - */ - public function createProductAbstractImportDataSetStepBroker() - { - $dataSetStepBroker = new DataSetStepBroker(); - $dataSetStepBroker->addStep(new ProductAbstractStep()); - - return $dataSetStepBroker; - } -... -``` - -As you can see, in `DataSetStepBroker,` you can add your own steps for preparing data for writers. You can find ready made steps in the `DataImport` module or implement your own steps. Example: - -ProductAbstractStep - - ```php - setSku($dataSet[static::KEY_ABSTRACT_SKU]); - - $productAbstractEntityTransfer - ->setColorCode($dataSet[static::KEY_COLOR_CODE]) - ->setFkTaxSet($dataSet[static::KEY_TAX_ID) - ->setAttributes(json_encode($dataSet[static::KEY_ATTRIBUTES])) - ->setNewFrom($dataSet[static::KEY_NEW_FROM]) - ->setNewTo($dataSet[static::KEY_NEW_TO]); - - $dataSet[static::DATA_PRODUCT_ABSTRACT_TRANSFER] = $productAbstractEntityTransfer; - } - - /** - * @param \Spryker\Zed\DataImport\Business\Model\DataSet\DataSetInterface $dataSet - * - * @return void - */ - protected function importProductCategories(DataSetInterface $dataSet): void - { - $dataSet[static::DATA_PRODUCT_CATEGORY_TRANSFER] = []; - } -} -``` - -You can change default data mappers and translators for overriding keys or values. By default, Akeneo has a list of predefined mappers, translators and validators for each import type, but it can be adjusted to meet your requirements. Check the [middleware documentation](/docs/scos/dev/back-end-development/data-manipulation/data-ingestion/spryker-middleware.html) for more details. - -You also need to take care of that data that is to be written to the database. Two approaches can be used for that. - -For attributes and categories, Spryker has implemented writer steps, so no plugins are required for that. Example: - -AkeneoPimMiddlewareConnectorBusinessFactory - - ```php -/** - * @return \Pyz\Zed\AkeneoPimMiddlewareConnector\Business\AkeneoDataImporter\AkeneoDataImporterInterface - */ -public function createCategoryImporter(): AkeneoDataImporterInterface -{ - return new AkeneoDataImporter( - $this->createDataImporterPublisher(), - $this->createCategoryImportDataSetStepBroker(), - $this->createDataSet() - ); -} - -/** - * @return \Spryker\Zed\DataImport\Business\Model\DataSet\DataSetStepBrokerInterface - */ -public function createCategoryImportDataSetStepBroker() -{ - $dataSetStepBroker = new DataSetStepBroker(); - $dataSetStepBroker->addStep($this->createCategoryWriteStep()); - - return $dataSetStepBroker; -} - -/** - * @return \Spryker\Zed\DataImport\Business\Model\DataImportStep\DataImportStepInterface - */ -public function createCategoryWriteStep() -{ - return new CategoryWriterStep($this->createCategoryReader()); -} - -/** - * @return \Spryker\Zed\CategoryDataImport\Business\Model\Reader\CategoryReader - */ -public function createCategoryReader(): CategoryReader -{ - return new CategoryReader(); -} -``` - -The example demonstrates how you can skip adding plugins for writing data to the database. - -Product import is a more complex operation, so Spryker provides bulk insertion plugins for that. They are faster than the writer steps. - -You can use the existing plugins or create your own. The right way to add external plugins is to use dependency providers. We have two types of writer plugins: Propel plugins and PDO plugins. Check the examples for both of them below. - -AkeneoPimMiddlewareConnectorBusinessFactory - - ```php -/** - * @return \Pyz\Zed\AkeneoPimMiddlewareConnector\Business\AkeneoDataImporter\AkeneoDataImporterInterface - */ -public function createProductAbstractImporter() -{ - return new AkeneoDataImporter( - $this->createDataImporterPublisher(), - $this->createProductAbstractImportDataSetStepBroker(), - $this->createDataSet(), - $this->getProvidedDependency(AkeneoPimMiddlewareConnectorDependencyProvider::PRODUCT_ABSTRACT_PROPEL_WRITER_PLUGINS) - ); -} -``` - -AkeneoPimMiddlewareConnectorDependencyProvider - - ```php - ... -class AkeneoPimMiddlewareConnectorDependencyProvider extends SprykerAkeneoPimMiddlewareConnectorDependencyProvider -{ - public const PRODUCT_ABSTRACT_PROPEL_WRITER_PLUGINS = 'PRODUCT_ABSTRACT_PROPEL_WRITER_PLUGINS'; - - /** - * @param \Spryker\Zed\Kernel\Container $container - * - * @return \Spryker\Zed\Kernel\Container - */ - protected function addProductAbstractPropelWriterPlugins(Container $container): Container - { - $container[static::PRODUCT_ABSTRACT_PROPEL_WRITER_PLUGINS] = function () { - return [ - new ProductAbstractPropelWriterPlugin(), - ]; - }; - - return $container; - } - -... -} -``` - -When we use only `ProductAbstractPropelWriterPlugin`, `ProductStores`, `ProductPrices`, etc are not imported. If you want to import something other than products, you need to add more writer plugins. - -For example, if you want to import a product store, provide one more plugin in dependency provider. - -AkeneoPimMiddlewareConnectorDependencyProvider - - ```php - /** - * @param \Spryker\Zed\Kernel\Container $container - * - * @return \Spryker\Zed\Kernel\Container - */ -protected function addProductAbstractPropelWriterPlugins(Container $container): Container -{ - $container[static::PRODUCT_ABSTRACT_PROPEL_WRITER_PLUGINS] = function () { - return [ - new ProductAbstractPropelWriterPlugin(), - new ProductAbstractStorePropelWriterPlugin(), - ]; - }; - - return $container; -} -``` - -In case you add more writer plugins, you might have to add more steps to dataset step broker. - -## Console Commands - -Now the following console commands are available in your project. Run them one by one. -```bash -1) Command to import super attributes: -vendor/bin/console middleware:process:run -p SUPER_ATTRIBUTE_IMPORT_PROCESS -o data/import/maps/super_attribute_map.json - -2) Command to prepare locale mapping: -vendor/bin/console middleware:process:run -p LOCALE_MAP_IMPORT_PROCESS -o data/import/maps/locale_map.json - -3) Command to prepare products attributes mapping: -vendor/bin/console middleware:process:run -p ATTRIBUTE_MAP_PROCESS -o data/import/maps/attribute_map.json - -4) Command to import categories: -vendor/bin/console middleware:process:run -p DEFAULT_CATEGORY_IMPORT_PROCESS - -5) Command to import products attributes: -vendor/bin/console middleware:process:run -p ATTRIBUTE_IMPORT_PROCESS - -6) Command to prepare product models data in local file: -vendor/bin/console middleware:process:run -p PRODUCT_MODEL_PREPARATION_PROCESS -o data/import/maps/product_models.json - -7) Command to import product model data (abstract products): -vendor/bin/console middleware:process:run -p DEFAULT_PRODUCT_MODEL_IMPORT_PROCESS -i data/import/maps/product_models.json - -8) Command to prepare products data in local file: -vendor/bin/console middleware:process:run -p PRODUCT_PREPARATION_PROCESS -o data/import/maps/products.json - -9) Command to import product model data (abstract products): -vendor/bin/console middleware:process:run -p DEFAULT_PRODUCT_IMPORT_PROCESS -i data/import/maps/products.json -``` - - - -1. On a project level, you can change `DefaultProductImportDictionary` instead of using the `EnrichAttributes` translator function or extending it. -2. Price attributes (`pim_catalog_price_collection`), except the one with `attribute_key = 'price'`, are skipped. For correct import, products should contain an attribute with `attribute_type pim_catalog_price_collection` and `attribute_key 'price'`. - diff --git a/docs/scos/dev/technology-partner-guides/202005.0/shipment/seven-senders/installing-and-configuring-seven-senders.md b/docs/scos/dev/technology-partner-guides/202005.0/shipment/seven-senders/installing-and-configuring-seven-senders.md deleted file mode 100644 index 4745a8e8565..00000000000 --- a/docs/scos/dev/technology-partner-guides/202005.0/shipment/seven-senders/installing-and-configuring-seven-senders.md +++ /dev/null @@ -1,22 +0,0 @@ ---- -title: Installing and configuring Seven Senders -template: howto-guide-template ---- - - -This document describes how to install and configure the Seven Senders technology partner. - -## Installation - -To install Seven Senders, run the command in the console: -```bash -composer require spryker-eco/sevensenders:1.0.0 -``` - -## Configuration - -To set up the Seven Senders initial configuration, use the credentials you received from your Seven Senders server. Space id, key id and secret you can get from Settings → API keys panel on Seven Senders server: -```php -$config[SevensendersConstants::API_KEY] = ''; -$config[SevensendersConstants::API_URL] = ''; -``` diff --git a/docs/scos/dev/technology-partner-guides/202005.0/shipment/seven-senders/integrating-seven-senders.md b/docs/scos/dev/technology-partner-guides/202005.0/shipment/seven-senders/integrating-seven-senders.md deleted file mode 100644 index d951288a36f..00000000000 --- a/docs/scos/dev/technology-partner-guides/202005.0/shipment/seven-senders/integrating-seven-senders.md +++ /dev/null @@ -1,89 +0,0 @@ ---- -title: Integrating Seven Senders -template: howto-guide-template ---- - -This document describes how to integrate the Seven Senders technology partner. - -## Integration - -## Oms commands - -Seven Senders module has two different commands: - -* `\SprykerEco\Zed\Sevensenders\Communication\Plugin\Oms\Command\SevensendersOrderPlugin` -* `\SprykerEco\Zed\Sevensenders\Communication\Plugin\Oms\Command\SevensendersShipmentPlugin` - -You can use this commands in `\Pyz\Zed\Oms\OmsDependencyProvider::getCommandPlugins` -```php -... -use Spryker\Zed\Oms\Communication\Plugin\Oms\Command\SendOrderConfirmationPlugin; -use Spryker\Zed\Oms\Communication\Plugin\Oms\Command\SendOrderShippedPlugin; -... - -/** - * @param \Spryker\Zed\Kernel\Container $container - * - * @return \Spryker\Zed\Oms\Communication\Plugin\Oms\Command\CommandCollection - */ -protected function getCommandPlugins(Container $container) -{ - $collection = parent::getCommandPlugins($container); - - ... - $collection->add(new SevenordersOrderPlugin(), 'Sevensenders/NewOrder'); - $collection->add(new SevenordersShipmentPlugin(), 'Sevensenders/NewShipment'); - ... - - return $collection; -} -``` - -After you are ready to use commands in OMS setup: -```xml - - - - -``` - -## Oms conditions - -Sevensenders module has two different conditions: - -* `SprykerEco\Zed\Sevensenders\Communication\Plugin\Oms\Condition\IsSuccessfulPreviousOrderResponseConditionPlugin` -* `SprykerEco\Zed\Sevensenders\Communication\Plugin\Oms\Condition\IsSuccessfulPreviousShipmentResponseConditionPlugin` - -You can use these commands in `\Pyz\Zed\Oms\OmsDependencyProvider::getConditionPlugins` -```php -... -use SprykerEco\Zed\Sevensenders\Communication\Plugin\Oms\Condition\IsSuccessfulPreviousOrderResponseConditionPlugin; -use SprykerEco\Zed\Sevensenders\Communication\Plugin\Oms\Condition\IsSuccessfulPreviousShipmentResponseConditionPlugin; -... - -/** - * @param \Spryker\Zed\Kernel\Container $container - * - * @return \Spryker\Zed\Oms\Communication\Plugin\Oms\Condition\ConditionCollection - */ -protected function getConditionPlugins(Container $container) -{ - $collection = parent::getConditionPlugins($container); - - ... - $collection->add(new IsSuccessfulPreviousOrderResponseConditionPlugin(), 'Sevensenders/IsSuccessfulResponse'); - $collection->add(new IsSuccessfulPreviousShipmentResponseConditionPlugin(), 'Sevensenders/IsSuccessfulResponse'); - ... - - return $collection; -} -``` - -After you are ready to use commands in OMS setup: -```xml - - new - shipping confirmed - shipping_confirmed - -``` diff --git a/docs/scos/dev/technology-partner-guides/202005.0/shipment/seven-senders/seven-senders-api-requests.md b/docs/scos/dev/technology-partner-guides/202005.0/shipment/seven-senders/seven-senders-api-requests.md deleted file mode 100644 index 173b57606c9..00000000000 --- a/docs/scos/dev/technology-partner-guides/202005.0/shipment/seven-senders/seven-senders-api-requests.md +++ /dev/null @@ -1,28 +0,0 @@ ---- -title: Seven Senders—API requests -template: concept-topic-template ---- - -## API Requests - -`\SprykerEco\Zed\Inxmail\Business\Api\Adapter\EventAdapter` extending `\SprykerEco\Zed\Sevensenders\Business\Api\Adapter\SevensendersApiAdapter` contains everything for sending data to Seven Senders system for events. - -You should use `\Generated\Shared\Transfer\SevensendersRequestTransfer` for request and `\Generated\Shared\Transfer\SevensendersResponseTransfer` -```xml - - - - - - - - - - - - - - -``` diff --git a/docs/scos/dev/technology-partner-guides/202005.0/shipment/seven-senders/seven-senders-mappers.md b/docs/scos/dev/technology-partner-guides/202005.0/shipment/seven-senders/seven-senders-mappers.md deleted file mode 100644 index 7de82c6abb9..00000000000 --- a/docs/scos/dev/technology-partner-guides/202005.0/shipment/seven-senders/seven-senders-mappers.md +++ /dev/null @@ -1,43 +0,0 @@ ---- -title: Seven Senders—Mappers -template: concept-topic-template ---- - -For mapping data from Spryker to Seven Senders `\SprykerEco\Zed\Sevensenders\Business\Mapper\OrderMapper` and `\SprykerEco\Zed\Sevensenders\Business\Mapper\ShipmentMapper` are used by default. -```php - (string)$orderTransfer->getIdSalesOrder(), - 'order_url' => '', - 'order_date' => $orderTransfer->getCreatedAt(), - 'delivered_with_seven_senders' => true, - 'boarding_complete' => true, - 'language' => $orderTransfer->getLocale() ? $orderTransfer->getLocale()->getLocaleName() : '', - 'promised_delivery_date' => $orderTransfer->getShipmentDeliveryTime(), - ]; - - $transfer = new SevensendersRequestTransfer(); - $transfer->setPayload($payload); - - return $transfer; - } -} - -``` - -You can extend `OrderMapper` on the project level and map fields as you need. If you want to create a new mapper you should implement `SprykerEco\Zed\Sevensenders\Business\Mapper\MapperInterface`. diff --git a/docs/scos/dev/technology-partner-guides/202005.0/shipment/seven-senders/seven-senders-persistance-layer.md b/docs/scos/dev/technology-partner-guides/202005.0/shipment/seven-senders/seven-senders-persistance-layer.md deleted file mode 100644 index 5ee808bf3e1..00000000000 --- a/docs/scos/dev/technology-partner-guides/202005.0/shipment/seven-senders/seven-senders-persistance-layer.md +++ /dev/null @@ -1,39 +0,0 @@ ---- -title: Seven Senders—Persistence layer -template: concept-topic-template ---- - -There is a table in the database for saving response and request data: - -```xml - - - - - - - - - - - - - - - - - - - -
    - - - - -
    -
    -``` diff --git a/docs/scos/dev/the-docker-sdk/202005.0/configuring-debugging-in-docker.md b/docs/scos/dev/the-docker-sdk/202005.0/configuring-debugging-in-docker.md deleted file mode 100644 index 107acd82317..00000000000 --- a/docs/scos/dev/the-docker-sdk/202005.0/configuring-debugging-in-docker.md +++ /dev/null @@ -1,91 +0,0 @@ ---- -title: Configuring debugging in Docker -description: Learn about debugging a Spryker setup in docker. -last_updated: Jul 21, 2020 -template: howto-guide-template -originalLink: https://documentation.spryker.com/v5/docs/debugging-setup-in-docker -originalArticleId: 2da65b72-267d-4d1b-a1b7-c5c4656b86ea -redirect_from: - - /v5/docs/debugging-setup-in-docker - - /v5/docs/en/debugging-setup-in-docker ---- - -This document provides information about setting up the debugging for Spryker in Docker. - -[Xdebug](https://xdebug.org) is used to debug setup in Docker. To enable Xdebug, run the command: -```bash -docker/sdk {run|start|up} -x -``` -## Configuring Xdebug in PhpStorm - Required Configuration - -This section describes the required configuration for Xdebug in PHPStorm. - -### Xdebug configuration -Follow the steps to configure Xdebug in PHPstorm: -1. Open **Preferences** → **Languages & Frameworks** → **PHP** → **Debug**. - -2. In the **Xdebug** block: - - a. Depending on your requirements, change the **Debug port** value. It is set to "9000" by default. - b. If not selected, select the **Can accept external connections** checkbox. - c. If selected, clear the **Force break at first line when no path mapping specified** and **Force break at first line when a script is outside the project** checkboxes. - -![image](https://spryker.s3.eu-central-1.amazonaws.com/docs/Developer+Guide/Installation/Spryker+in+Docker/Debugging+Setup+in+Docker/binary.png) - -3. In the **External connections** block: - - a. Increase **Max. simultaneous connection** from 4 to 5. - b. If selected, unselect the **Ignore external connections through unregistered server configurations** and **Break at first line in PHP scripts** checkboxes. - -![image 2](https://spryker.s3.eu-central-1.amazonaws.com/docs/Developer+Guide/Installation/Spryker+in+Docker/Debugging+Setup+in+Docker/binary2.png) - -### Servers configuration -Follow the steps to configure servers: -1. Open PHPStorm → **Preferences** → **Languages & Frameworks** → **PHP** → **Servers**. - -2. Add a server: - - 1. In the **Name** field, enter *spryker*. - 2. In the **Host** section, enter *spryker*. - 3. Select the **Use path mappings** checkbox. - 4. Set the absolute path to the `/data` folder on the server for the folder with your Spryker project files. - ![Servers config](https://spryker.s3.eu-central-1.amazonaws.com/docs/Developer+Guide/Installation/Spryker+in+Docker/Debugging+Setup+in+Docker/servers-confg.png) - - -## Configuring Xdebug in PhpStorm - Optional Configuration -This section describes the optional configuration for Xdebug in PHPStorm. - -### Remote PHP Interpreter Setup -Follw the steps to add a PHP interpreter: -1. Open **Preferences** → **Languages & Frameworks** → **PHP**. -2. Add new remote PHP interpreter: - a. Server: "Docker" - b. Image name: "spryker_app:latest" - c. PHP interpreter path: **php** - -![Remote php interpreter](https://spryker.s3.eu-central-1.amazonaws.com/docs/Developer+Guide/Installation/Spryker+in+Docker/Debugging+Setup+in+Docker/remote-php-interpreter.png) - -### Remote Debug configuration -Follow the steps to add a PHP Remote Debug configuration: -1. Open **Run** → **Edit Configurations...**. -![Edit configurations](https://spryker.s3.eu-central-1.amazonaws.com/docs/Developer+Guide/Installation/Spryker+in+Docker/Debugging+Setup+in+Docker/edit-configs.png) - -2. Add new **PHP Remote Debug** configuration. -![PHP remote debug](https://spryker.s3.eu-central-1.amazonaws.com/docs/Developer+Guide/Installation/Spryker+in+Docker/Debugging+Setup+in+Docker/php-remote-debug.png) - -3. Set the name to "spryker". -4. Select the **spryker** server. -5. Set the **PHPSTORM** IDE key. - -## Debugging with Xdebug - -To debug an application, do the following: - -1. Make a breakpoint: -![Breakpoint](https://spryker.s3.eu-central-1.amazonaws.com/docs/Developer+Guide/Installation/Spryker+in+Docker/Debugging+Setup+in+Docker/breakpoint.png) - -2. Click ![Start listening](https://spryker.s3.eu-central-1.amazonaws.com/docs/Developer+Guide/Docker+SDK/Configuring+debugging+in+Docker/start-listening.png) -3. Open the application in browser. -4. Navigate to the action for which you configured the breakpoint in step 1. The debugging process should be running in the IDE: -![Debug process](https://spryker.s3.eu-central-1.amazonaws.com/docs/Developer+Guide/Installation/Spryker+in+Docker/Debugging+Setup+in+Docker/debug-process.png) - diff --git a/docs/scos/dev/the-docker-sdk/202005.0/deploy-file-reference-1.0.md b/docs/scos/dev/the-docker-sdk/202005.0/deploy-file-reference-1.0.md deleted file mode 100644 index 5a7e148a94c..00000000000 --- a/docs/scos/dev/the-docker-sdk/202005.0/deploy-file-reference-1.0.md +++ /dev/null @@ -1,757 +0,0 @@ ---- -title: Deploy File Reference - 1.0 -description: Use this reference to create a deploy file for building environment for Spryker in Docker. -last_updated: Sep 14, 2020 -template: howto-guide-template -originalLink: https://documentation.spryker.com/v5/docs/deploy-file-reference-10 -originalArticleId: 71f6c7e1-d7e8-4233-8f1b-3fd3d06f9e2d -redirect_from: - - /v5/docs/deploy-file-reference-10 - - /v5/docs/en/deploy-file-reference-10 -related: - - title: Docker SDK - link: docs/scos/dev/the-docker-sdk/page.version/the-docker-sdk.html - - title: Services - link: docs/scos/dev/the-docker-sdk/page.version/services.html ---- - -This reference page describes version 1 of the Deploy file format. This is the newest version. -
    -

    Glossary

    -
    -
    Deploy file
    -
    A YAML file defining Spryker infrastructure and services for Spryker tools used to deploy Spryker applications in different environments.
    - -
    Region
    -
    Defines one or more isolated instances of Spryker applications that have only one persistent database to work with; limits the visibility of a project's Stores to operate only with the Stores that belong to a Region; refers to geographical terms like data centers, regions and continents in the real world.
    - -
    Group
    -
    Defines a group of Spryker applications within a Region that is scaled separately from other groups; can be assumed as an auto scaling group in the Cloud.
    - -
    Store
    -
    A store related context a request is processed in.
    - -
    Application
    -
    A Spryker application, like Zed, Yves or Glue.
    - -
    Service
    -
    An external storage or utility service. Represents service type and configuration. The configuration can be defined on different levels: project-wide, region-wide, store-specific or endpoint-specific with limitations based on the service type.
    - -
    Endpoint
    -
    A point of access to Application or Service. The key format is `domain[:port]`. By default, the port for HTTP endpoints is 80 . Port is mandatory for TCP endpoints.
    - -
    -
    - -## Deploy File Structure - -The topics below are organized alphabetically for top-level keys and sub-level keys to describe the hierarchy. - -You can use the extended YAML syntax according to [YAML™ Version 1.2](https://yaml.org/spec/1.2/spec.html). -Find B2B/B2C deploy file examples for [development](/docs/scos/dev/installation/spryker-in-docker/installation-guides/modes-overview.html#development-mode) and [demo](/docs/scos/dev/installation/spryker-in-docker/installation-guides/modes-overview.html#demo-mode) environments in the table: - -| Development mode | Demo mode | -| --- | --- | -| [B2C Demo Shop deploy file](https://github.com/spryker-shop/b2c-demo-shop/blob/master/deploy.dev.yml) | [B2C Demo Shop deploy file](https://github.com/spryker-shop/b2c-demo-shop/blob/master/deploy.yml) | -| [B2B Demo Shop deploy file](https://github.com/spryker-shop/b2b-demo-shop/blob/master/deploy.dev.yml) | [B2B Demo Shop deploy file](https://github.com/spryker-shop/b2b-demo-shop/blob/master/deploy.yml) | - -*** -**version**: - -Defines the version of the Deploy file format. - -This reference page describes the Deploy file format for versions 1.*. - -```yaml -version: 1.0 - -namespace: spryker-demo -... -``` -{% info_block infoBox "Optional variable" %} - -If not specified, the default value applies: -`version: "0.1"` - - - -{% endinfo_block %} - -*** - -**namespace**: - -Defines the namespace to separate different deployments in a single environment. - -For example, Docker images, containers and volume names start with a `namespace:` to avoid intersections between different deployments on a single host machine. - -```yaml -version: 1.0 -namespace: spryker-demo -``` -{% info_block infoBox "Optional variable" %} - -If not specified, the default value applies: -`namespace: spryker` - - - -{% endinfo_block %} -*** - -**tag**: - -Defines a tag to separate different boots for a single deployment. - -By default, the tag is a randomly generated, unique value. - -For example, Docker images and volumes are tagged with a `tag:` to avoid intersections between different boots for a signle deployment on a single host machine. The tag can be set directly in the deploy file to ensure that all the boots of a deployment run with the same images and volumes. -```yaml -version: 1.0 - -tag: '1.0' -``` -```yaml -version: 1.0 - -tag: 'custom-one' -``` -{% info_block infoBox "Optional variable" %} - -If not specified, the default value applies: -`tag: '1.0'` - - - -{% endinfo_block %} - -*** - -**environment**: - -Defines the environment name for Spryker applications mainly to point to specific configuration files, namely `config/Shared/config-default_%environment_name%{store}.php`. - -The `APPLICATION_ENV` environment variable is set for all the corresponding Spryker applications. -```yaml -version: 1.0 - -environment: 'docker' -``` - -{% info_block infoBox "Optional variable" %} - -If not specified, the default value applies: -`environment: 'docker'` - - - -{% endinfo_block %} - -*** - -**image:** - -Defines the Docker image configuraion to run Spryker applications in. - -*** -**image:tag** - -Defines the image tag according to the `spryker/php` images located at [Docker Hub](https://hub.docker.com/r/spryker/php/tags). Possible values are: -1. `spryker/php:7.2` - applies the default image (currently, it is Debian). - -2. `spryker/php:7.2-debian` - applies Debian as a base image. - -3. `spryker/php:7.2-alpine` - applies Alpine as a base image. The Alpine images are smaller, but you may have issues with: - * iconv - * NFS - * Non-lating languages - * Tideways - -```yaml -version: 1.0 - -image: - tag: spryker/php:7.2 -``` - -{% info_block infoBox "Optional variable" %} - -If not specified, the default value applies: -`image: spryker/php:7.2` - - - -{% endinfo_block %} -*** - -**image: php:** - -Defines the PHP settings for Spryker applications. - -* `image: php: ini:` - defines `php.ini` configuration. -* `image: php: enabled-extensions` - defines enabled PHP extensions. Only `blackfire` and `newrelic` are allowed here. - -```yaml -image: - ... - php: - ini: - memory_limit: 2048M - enabled-extensions: - - blackfire - - newrelic -``` -*** - -**regions**: - -Defines the list of **Regions**. - - -* `regions: services:` - defines settings for **Region**-specific `services:`. Only `database:` is currently allowed here. -* `regions: stores:` - defines the list of **Stores**. - -* `regions: stores: services:` - defines application-wide, **Store**-specific settings for **Services**. Only `broker:`, `key_value_store:` and `search:` are currently allowed here. See [services:](#services-reference) to learn more. - -```yaml -version: "1.0" - -regions: - REGION-1: - services: - # Region-specific services settings - - stores: - STORE-1: - services: - # Store-specific services settings - STORE-2: - services: - # Store-specific services settings - - ``` - -*** - -**groups**: - -Defines the list of **Groups**. - -* `groups: region:` - defines the relation to a **Region** by key. -* `groups: applications:` - defines the list of **Applications**. See [groups: applications:](#groups-applications) to learn more. - -```yaml -version: "1.0" - -groups: - BACKEND-1: - region: REGION-1 - applications: - zed_1: - application: zed - endpoints: - zed.store1.spryker.local: - store: STORE-1 - services: - # Application-Store-specific services settings - zed.store2.spryker.local: - store: STORE-2 - services: - # Application-Store-specific services settings - STOREFRONT-1: - region: REGION-1 - applications: - yves_1: - application: yves - endpoints: - yves.store1.spryker.local: - store: STORE-1 - services: - # Application-Store-specific services settings - yves.astore2t.spryker.local: - store: STORE-2 - services: - # Application-Store-specific services settings - glue_1: - application: glue - endpoints: - glue.store1.spryker.local: - store: STORE-1 - glue.store2.spryker.local: - store: STORE-2 - - ``` - -Applications can be defined as **Store**-agnostic, as in the example above. Also, applications can be defined as **Store**-specific by leaving a single endpoint pointing to each application. You can see it in the example below. You can use both approaches to scale applications separately by **Store**. -```yaml -version: "1.0" - -groups: - BACKEND-1: - region: REGION-1 - applications: - zed_store_1: - application: zed - endpoints: - zed.store1.spryker.local: - store: STORE-1 - zed_store_2: - application: zed - endpoints: - zed.store2.spryker.local: - store: STORE-2 - - ``` - -*** - -**groups: applications**: - -Defines the list of **Applications**. - -The key must be project-wide unique. - -Each `application:` should contain the following: - -* `groups: applications: application:` - defines the type of **Application**. Possible values are `Zed`, `Yves` and `Glue`. -* `groups: applications: endpoints:` - defines the list of **Endpoints** to access the **Application**. See [groups: applications: endpoints:](#groups-applications-endpoints) to learn more. - -*** - -**services:** - -Defines the list of **Services** and their project-wide settings. - -Each service has its own set of settings to be defined. See [Services](#services) to learn more. - -Find common settings for all services below: - -* `engine:` - defines a third-party application supported by Spryker that does the job specific for the **Service**. For example, you can currently set `database:engine:` to `postgres` or `mysql`. -* `endpoints:` - defines the list of **Endpoints** that point to the **Service** web interface or port. -* `version:` - defines the version of the service to be installed. If `database:engine:` is set to `mysql`, also defines if MySQL or MariaDB is used according to the [version](https://github.com/spryker/docker-sdk#supported-services). See [Database](/docs/scos/dev/installation/spryker-in-docker/configuration/services.html#database) for detailed configuration instructions. -{% info_block infoBox "Optional variable" %} -If not specified, the [default version](https://github.com/spryker/docker-sdk#supported-services -{% endinfo_block %} applies.) - -```yaml -services: -database: - engine: postgres - version: 9.6 - root: - username: "root" - password: "secret" - -broker: - engine: rabbitmq - api: - username: "root" - password: "secret" - endpoints: - queue.spryker.local: - - session: - engine: redis - version: 5.0 - - key_value_store: - engine: redis - - search: - engine: elastic - version: 6.8 - - scheduler: - engine: jenkins - version: 2.176 - endpoints: - scheduler.spryker.local: - - mail_catcher: - engine: mailhog - endpoints: - mail.spryker.local: - ``` -{% info_block warningBox %} -After changing a service version, make sure to re-import demo data: -1. Remove all Spryker volumes: -```shell -docker/sdk clean-data -``` - -2. Populate Spryker demo data: -```shell -docker/sdk demo-data -``` -{% endinfo_block %} -Service settings can be extended on other levels for specific contexts. See [regions: services:](#regions-services), [regions: stores: services:](#regions-stores-services) and [groups: applications: endpoints: services:](groups-applications-endpoints-services) to learn more. - -*** - -**groups: applications: endpoints:** - -Defines the list of **Endpoints** to access the **Application**. - -The format of the key is `domain[:port]`. The key must be project-wide unique. -* `groups: applications: endpoints: store:` defines the **Store** as context to process requests within. - -* `groups: applications: endpoints: services:` defines the **Store**-specific settings for services. Only `session:` is currently allowed here. See [Services](#services) to learn more. - -**services: endpoints:** -Defines the list of **Endpoints** to access a **Service** for development or monitoring needs. The format of the key is `domain[:port]`. The key must be project-wide unique. -* `services: endpoints: protocol:` defines the protocol. Possible values are: `tcp`and `http`. The default one is `http`. - -A port must be defined if protocol is set to `tcp`. The TCP port must be project-wide unique. - -*** - -**docker**: - -Defines the settings for Spryker Docker SDK tools to make deployment based on Docker containers. -```yaml -version: 1.0 - -docker: - - ssl: - enabled: true - - testing: - store: STORE-1 - - mount: - baked: - - ``` - -*** - -**docker: docker-machine:** -Defines the virtualization engine to be used for the overall development environment. Possible values are: -1. `docker:`. -2. `parallels:` -[Parallels](https://www.parallels.com/) requires a paid license to be used. - -When no engine is defined in `deploy.yml`, the Docker Engine is used. -*** - -**docker: newrelic:** - -Defines the [New Relic](/docs/scos/dev/installation/spryker-in-docker/configuration/services.html#new-relic) configuration. - -* `docker: newrelic: license:` - defines the New Relic license which should be acquired from [New Relic](https://www.newrelic.com/). - -```yaml -docker: - newrelic: - license: eu01xxaa7460e1ea3abdfbbbd34e85c10cd0NRAL -``` - -*** - -**docker: ssl:** - -Defines configuration for SSL module in Spryker Docker SDK. - -If `docker: ssl: enabled:` is set to `true`, all endpoints use HTTPS. -```yaml -version: 1.0 - -docker: - ssl: - enabled: true - - ``` -{% info_block infoBox "Optional variable" %} - -If not specified, the default value applies: -`enabled: false` - - - -{% endinfo_block %} - -To enable secure connection in your browser, register the self-signed CA certificate from `./docker/generator/openssl/default.crt` in your system. - - -*** - -**docker: debug:** - -Defines the configuration for debugging. - -If `docker: debug: enabled:` is set to `true`, all applications work in debugging mode. -```yaml -version: 1.0 - -docker: - debug: - enabled: true - - ``` - -*** -**docker: logs:** -* `docker: logs: path:` defines the path to the directory with Docker logs. - -{% info_block infoBox "Optional variable" %} - -If not specified, the default value applies: -`path: '/var/log/spryker'` - - - -{% endinfo_block %} - -*** -**docker: testing:** - -Defines the configuration for testing. - -* `docker: testing: store:` defines a **Store** as the context for running tests using specific console commands, like `docker/sdk console code:test`. - -{% info_block infoBox "Optional variable" %} - -If not specified, the default value applies: -`store: DE` - - - -{% endinfo_block %} -*** - -**docker: mount** - -Defines the mode for mounting source files into application containers. - -1. `baked:`- source files are copied into the image, so they cannot be changed from host machine. -{% info_block infoBox "Optional variable" %} - -If not specified, the default value applies: -`baked:baked` - - - -{% endinfo_block %} -2. `native:`- source files are mounted from host machine into containers directly. We recommend using it Linux. -3. `docker-sync:`- source files are synced from host machine into containers during runtime. Use it as a workaround solution with MacOS and Windows. - - -`As mount:` is a platform-specific setting. You can define multiple mount modes. Use the`platforms:` list to define the mount mode for a particular platform. Possible platforms are `windows`, `macos` and `linux`. - -The first mount mode matching the host platform is selected by default. -```yaml -version: 1.0 - -docker: - mount: - native: - platforms: - - linux - - docker-sync: - platforms: - - macos - - windows - - ``` - *** - -**composer:** - -Defines the composer settings to be used during deployment. - -1. `mode:` - defines whether packages should be installed from the `require` or `require-dev` section of `composer.json`. Possible values are `--no-dev`and `-dev`. - -2. `autoload:` - defines composer autoload options. Possible values are `--optimize` and `--classmap-authoritative`. - - - -{% info_block infoBox "Optional variable" %} - -If not specified, the default values apply: - -1. Development mode: - * `mode: --dev` - * `autoload: --optimize` -2. Demo mode: - * `mode: --no-dev` - * `autoload: --classmap-authoritative` - -{% endinfo_block %} - -*** - -### Services - -You can configure and use external tools that are shipped with Spryker in Docker as services. -If a service has a dedicated configuration, it is configured and run when the current environment is set up and executed. - - -The following services are supported: - -* blackfire -* broker -* database -* key_value_store -* kibana -* mail_catcher -* redis-gui -* scheduler -* search -* session -* swagger - -*** -**blackfire:** -An application profiler **Service** used for testing and debugging. -* Project-wide - - `blackfire: engine:` - possible value is `blackfire`. - - `blackfire: server-id:` - defines the server id used to authenticate with Blackfire. Use it only if you have a shared agent between multiple environments. - - `blackfire: server-token:` - defines the server token used to authenticate with Blackfire. Use it only if you have a shared agent between multiple environments. - - `blackfire: client-id:` - defines the client ID from the Client ID/Client Token credentials pair. - - `blackfire: client-token:` - defines the client Token from the Client ID/Client Token credentials pair. -*** -**broker:** - -A message broker **Service**. - -* Project-wide - - - `broker: engine:` - possible values is `rabbitmq`. - - `broker: api: username`, `database: api: password:` - defines the credentails for the message broker's API. - - `broker: endpoints:` - defines the service's port or/and web-interface that can be accessed via given endpoints. - -* Store-specific - - - `broker: namespace:` - defines a namespace (virtual host). - - `broker: username:`, `broker: password:` - defines the credentials to access the namespace (virtual host) defined by `broker: namespace:`. - - -*** - -**database:** - -An SQL database management system **Service**. - -* Project-wide - - - `database: engine:` - possible values are `postgres`and `mysql`. - - `database: version:` - defines the version of the database engine. If `database:engine:` is set to `mysql`, also defines if MySQL or MariaDB is used according to the [version](https://github.com/spryker/docker-sdk#supported-services). See [Database](/docs/scos/dev/installation/spryker-in-docker/configuration/services.html#database) for detailed configuration instructions. - - `database: root: username:`, `database: root: password:` - defines the user with root privileges. - - `database: endpoints:` - defines the service's port that can be accessed via given endpoints. - -* Region-specific - - - `database: database:` - defines database name. - - `database: username:`, `database: password:` - defines database credentials. - - -*** - -**key_value_store:** - -A key-value store **Service** for storing business data. - -* Project-wide - - * `key_value_store: engine:` - possible value is: `redis`. - * `session: endpoints:` - defines the service's port that can be accessed via given endpoints. - -* Store-specific - - * `key_value_store: namespace:` - defines a namespace (number for Redis). - - -*** - -**kibana:** - -A **Service** to visualize Elasticsearch data and navigate the Elastic Stack. - -* Project-wide - * `kibana: engine:` - possible value is: `kibana`. - * `kibana: endpoints:` - defines the service's port and web interface that can be accessed via given endpoints. - - -*** - -**mail_catcher:** - -A mail catcher **Service** used to catch all outgoing emails for development or testing needs. - -* Project-wide - - - `mail_catcher: engine:` - possible value is `mailhog`. - - `mail_catcher: endpoints:`- defines the service's port and web interface that can be accessed via given endpoints. - - - - -*** -**redis-gui:** - -A **Service** that provides a graphical user interface to access Redis databases. - - -* Project-wide - - `redis-gui: engine:` - possible value is `redis-commander`. - - `redis-gui: endpoints:`- defines the service's port and web interface that can be accessed via given endpoints. - - -*** - - - -**scheduler:** - -A scheduler **Service** used to run application-specific jobs periodically in the background. - -* Project-wide - * `scheduler: engine:` - possible value is `jenkins`. - * `scheduler: endpoints:` - defines the service's port and web interface that can be accessed via given endpoints. - - -*** -**search:** - -A search **Service** that provides a distributed, multitenant-capable full-text search engine. - -* Project-wide - * `search: engine:` - possible value is `elastic`. - * `search: endpoints:` - defines the service's port and web interface that can be accessed via given endpoints. -*** - -**session:** - -A key-value store **Service** for storing session data. - -* Project-wide - - - `session: engine:` - possible values is `redis`. - - `session: endpoints:` - defines the service's port that can be accessed via given endpoints. - -* Endpoint-specific - - - `session: namespace:` - defines a namespace (number for Redis). - - - - - -*** -**swagger:** - -The swagger-ui **Service** used to run Swagger UI to develop API endpoints. - -* Project-wide - * `swagger: engine:`- possible value is `swagger-ui`. - * `swagger-ui: endpoints:` - defines the service's port or/and web interface that can be accessed via given endpoints. - - - -*** - -### Change log - -* Initial reference document is introduced. diff --git a/docs/scos/dev/the-docker-sdk/202005.0/docker-environment-infrastructure.md b/docs/scos/dev/the-docker-sdk/202005.0/docker-environment-infrastructure.md deleted file mode 100644 index cdbd34b364b..00000000000 --- a/docs/scos/dev/the-docker-sdk/202005.0/docker-environment-infrastructure.md +++ /dev/null @@ -1,26 +0,0 @@ ---- -title: Docker Environment Infrustructure -last_updated: Apr 3, 2020 -template: howto-guide-template -originalLink: https://documentation.spryker.com/v5/docs/docker-environment-infrastructure -originalArticleId: 4522f09b-3adc-4703-af50-273fd7454939 -redirect_from: - - /v5/docs/docker-environment-infrastructure - - /v5/docs/en/docker-environment-infrastructure ---- - -This document describes the infrustructure of Spryker in Docker environment. - -Spryker containers follow the rules: - -1. **Single responsibility** - each container is responsible for a single role which must be defined in specification. -2. **Immutability** - container does not create or change files in its own file system. If container requires storage, a volume should be designated for the purpose. Temporary files are not covered by the rule. -3. **A single process or a process group** - there is a single process running as an entry point of container. The name of the process must be defined in specification. -4. **Process run without root permissions.** -5. **Only single-purpose ports are exposed** - the only exposed ports are the ones supporting the single responsibility of container. The port(s) must be defined in specification. Service ports are not covered by the rule. - -Below, you can find the diagram of Spryker in Docker environment: - - ![Local docker environment diagram](https://spryker.s3.eu-central-1.amazonaws.com/docs/Developer+Guide/Installation/Spryker+in+Docker/docker-local-environment-diagram.png) - - diff --git a/docs/scos/dev/the-docker-sdk/202005.0/services.md b/docs/scos/dev/the-docker-sdk/202005.0/services.md deleted file mode 100644 index bd6104b0bae..00000000000 --- a/docs/scos/dev/the-docker-sdk/202005.0/services.md +++ /dev/null @@ -1,410 +0,0 @@ ---- -title: Services -last_updated: Sep 15, 2020 -template: howto-guide-template -originalLink: https://documentation.spryker.com/v5/docs/services -originalArticleId: 0e4f58e4-8a89-44e9-96ff-864c483461a0 -redirect_from: - - /v5/docs/services - - /v5/docs/en/services -related: - - title: Deploy File Reference - 1.0 - link: docs/scos/dev/the-docker-sdk/page.version/deploy-file-reference-1.0.html - - title: Docker SDK - link: docs/scos/dev/the-docker-sdk/page.version/the-docker-sdk.html ---- - -## General Information -This page describes configuration options of the services shipped with Spryker in Docker by default. Find the list of the services below: - -* Database -* ElasticSearch -* Kibana UI -* RabbitMQ -* Swagger UI -* Redis -* Redis GUI -* MailHog -* Blackfire -* New Relic - -{% info_block infoBox %} - -* Before you start configuring a service, make sure to install or update Docker SDK to the latest version: -```bash -git clone https://github.com/spryker/docker-sdk.git ./docker -``` - -* After enabling a service, make sure to apply the new configuration: - 1. Bootstrap docker setup: - ```bash - docker/sdk boot {deploy.yaml | deploy.dev.yaml} - ``` - - 2. Once the job finishes, build and start the instance: - ```bash - docker/sdk up - ``` - - - - -{% endinfo_block %} - -## Database -In Docker SDK, [PostgreSQL](https://www.postgresql.org/) is provided as a service by default, but you can switch to MySQL or MariaDB as described below. - -### MySQL -[MySQL](https://www.mysql.com) is an open source relational database management system based on Structured Query Language (SQL). MySQL enables data to be stored and accessed across multiple storage engines, including InnoDB, CSV and NDB. MySQL is also capable of replicating data and partitioning tables for better performance and durability. - -See [MySQL documentation](https://dev.mysql.com/doc/) for more details. - -#### Configuration -Follow the steps below to switch database engine to MySQL: -1. Adjust `deploy.*.yaml` in the `services:` section: -```yaml -... -services: - database: - engine: mysql - ... - endpoints: - localhost:3306: -... -``` -2. Regenerate demo data: -```bash -docker/sdk clean-data -docker/sdk demo-data -``` - -### MariaDB - -[MariaDB](https://mariadb.org/) is a community-developed, commercially supported fork of the [MySQL](https://www.mysql.com/) relational database management system. - -See [MariaDB knowledge base](https://mariadb.com/kb/en/) for more details. - -#### Configuration -Follow the steps below to switch the database service to MariaDB: - -1. Adjust `deploy.*.yaml` in the `services:` section: - -```yaml -... -services: - database: - engine: mysql - version: mariadb-10.4 - ... - endpoints: - localhost:3306: -... -``` -2. Regenerate demo data: - -```bash -docker/sdk clean-data -docker/sdk demo-data -``` - -## ElasticSearch - -[Elasticsearch](https://www.elastic.co/elasticsearch/) is a search engine based on the Lucene library. It provides a distributed, multitenant-capable full-text search engine with an HTTP web interface and schema-free JSON documents. - -See: -* [Configure Elasticsearch](/docs/scos/dev/back-end-development/data-manipulation/data-interaction/search/configure-elasticsearch.html) to learn more about Elastcisearch configuration in Spryker. -* [Elasticsearch documentation](https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html) for more information on Elasticsearch. - -### Configuration - -Adjust `deploy.*.yaml` in the `services:` section to open the port used for accessing ElasticSearch: -```yaml -services: - search: - engine: elastic - endpoints: - localhost:9200 - protocol: tcp -``` - -## Kibana UI - -[Kibana](https://www.elastic.co/kibana) is an open source analytics and visualization platform designed to work with Elasticsearch. You use Kibana to search, view, and interact with data stored in Elasticsearch indices. You can easily perform advanced data analysis and visualize your data in a variety of charts, tables, and maps. - -See [Kibana documentation](https://www.elastic.co/guide/en/kibana/current/index.html) to learn more. - -In Docker SDK, Kibana UI is provided as a service by default. - -### Configuration -Follow the steps to configure an endpoint for Kibana UI: -1. Adjust `deploy.*.yaml` in the `services:` section: -```yaml -services: - ... - kibana: - engine: kibana - endpoints: - {custom_endpoint}: -``` -2. Adjust host file: -```bash -echo "127.0.0.1 {custom_endpoint}" | sudo tee -a /etc/hosts -``` - -## RabbitMQ - -[RabbitMQ](https://www.rabbitmq.com/) is a messaging broker - an intermediary for messaging. It gives your applications a common platform to send and receive messages, and your messages a safe place to live until received. - -### Configuration - -Adjust `deploy.*.yaml` in the `services:` section to open the port used for accessing RabbitMQ: -```yaml -services: - broker: - ... - endpoints: - ... - localhost:5672: - protocol: tcp - api.queue.spryker.local: -``` -## Swagger UI - -[Swagger UI](https://swagger.io/tools/swagger-ui/) allows anyone—be it your development team or your end consumers—to visualize and interact with the API’s resources without having any of the implementation logic in place. It’s automatically generated from your OpenAPI (formerly known as Swagger) Specification, with the visual documentation making it easy for back end implementation and client-side consumption. - -See [Swagger UI documentation](https://swagger.io/docs/open-source-tools/swagger-ui/usage/installation/) for more details. - -In Docker SDK, Swagger UI is provided as a service by default. - -### Rest API Reference in Spryker - -Spryker provides the basic functionality to generate [OpenApi schema specification](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md) for REST API endpoints. This document provides an overview of REST API endpoints. For each endpoint, you will find the URL, REST request parameters as well as the appropriate request and response data formats. - -### Configuration -Follow the steps to configure an endpoint for Swagger UI: -1. Adjust `deploy.*.yaml` in the `services:` section: -```yaml -services: - ... - swagger: - engine: swagger-ui - endpoints: - {custom_endpoint}: -``` - -2. Adjust the `host` file: -```bash -echo "127.0.0.1 {custom_endpoint}" | sudo tee -a /etc/hosts -``` - -## Redis - -[Redis](https://redis.io) is an open source (BSD licensed), in-memory data structure store, used as a database, cache and message broker. It supports data structures such as strings, hashes, lists, sets, sorted sets with range queries, bitmaps, hyperloglogs, geospatial indexes with radius queries and streams. - -See [Redis documentation](https://redis.io/documentation) for more details. - -### Configuration - -Adjust `deploy.*.yaml` in the `services:` section to open the port used for accessing Redis: -```yaml -services: - key_value_store: - engine: redis - endpoints: - localhost:16379: - protocol: tcp -``` - - -## Redis GUI -[Redis Commander](http://joeferner.github.io/redis-commander/) is a web management tool that provides a graphical user interface to access Redis databases and perform basic operations like view keys as a tree, view CRUD keys or import/export databases. - -### Configuration -Follow the steps to configure an endpoint for Redis Commander: - -1. Adjust `deploy.*.yaml` in the `services:` section: - -```yaml -services: -... - redis-gui: - engine: redis-commander - endpoints: - {custom_endpoint}: //redis-commander.spryker.local: -``` - -2. Adjust hosts file: -```bash -echo "127.0.0.1 {custom_endpoint}" | sudo tee -a /etc/hosts -``` - - - - -## MailHog - -[MailHog](https://github.com/mailhog/MailHog) is a mail catcher service that is used with Spryker in Docker for Demo and Development environments. Developers use this email testing tool to catch and show emails locally without an SMTP (Simple Mail Transfer Protocol) server. - -With the MailHog service, developers can: - -* configure an application to use MailHog for SMTP delivery; -* view messages in the web UI or retrieve them via JSON API. - -{% info_block infoBox %} - -By default the following applies: -* `http://mail.demo-spryker.com/` is used to see incoming emails. -* Login is not required - -{% endinfo_block %} -### Configuration -Adjust `deploy.*.yaml` in the `services:` section to specify a custom endpoint: -```yaml -services: - ... - mail_catcher: - engine: mailhog - endpoints: - {custom_endpoint}: -``` - -## Blackfire -[Blackfire](https://blackfire.io/) is a tool used to profile, test, debug, and optimize performance of PHP applications. It gathers data about consumed server resources like memory, CPU time, and I/O operations. The data and configuration can be checked via Blackfire web interface. - -### Configuration - -Follow the steps to enable Blackfire: - -1. Adjust `deploy.*.yaml` in the `image:` section to enable the Blackfire PHP extension: - -```yaml -image: - tag: spryker/php:7.3 # Use the same tag you had in `image:` - php: - ... - enabled-extensions: - - blackfire -``` - -2. Adjust `deploy.*.yaml` in the `services:` section to configure Blackfire client: - -```yaml -services: - ... - blackfire: - engine: blackfire - server-id: {server_id} - server-token: {server_token} - client-id: {client_id} - client-token: {client-token} -``` - -### Alternative Configuration - -Use the following configuration if you are going to change server or client details often, or if you don’t want to define them in your deploy file. - -Follow the steps to enable Blackfire: - -1. Adjust `deploy.*.yaml` in the `image:` section to enable the Blackfire PHP extension: - -```yaml -image: - tag: spryker/php:7.3 # Use the same tag you had in `image:` - php: - ... - enabled-extensions: - - blackfire -``` - -2. Adjust `deploy.*.yaml` in the `services:` section to enable Blackfire service: - -```yaml -services: - ... - blackfire: - engine: blackfire -``` - -3. Pass Blackfire client details: - -```bash - BLACKFIRE_CLIENT_ID={client_id} BLACKFIRE_CLIENT_TOKEN={client-token} docker/sdk cli - ``` - -4. Pass Blackfire server details: - -```bash -BLACKFIRE_SERVER_ID={client-token} BLACKFIRE_SERVER_TOKEN={server_token} docker/sdk up -``` - -{% info_block warningBox "Note" %} - -You can pass the server details only with the `docker/sdk up` command. - -{% endinfo_block %} - -It is not obligatory to pass all the details as environment variables or define all the details in the deploy file. You can pass the details in any combination. - -## New Relic -[New Relic](https://newrelic.com/) is a tool used to track the performance of services, environment to quickly find and fix issues. - -The solution consists of a client and a server. The client is used to collect the data about applications in an environment and send it to the server for further analysis and presentation. The server is used to aggregate, analyse and present the data. - -### Configuration - -Follow the steps to enable New Relic: - -1. Adjust `deploy.*.yml` in the `docker:` section: - -```yaml -docker: - newrelic: - license: {new_relic_license) -``` - -2. Adjust `deploy.*.yml` in the `image:` section: - -```yaml -image: - tag: spryker/php:7.3 # the image tag that has been previously used in `image:` - php: - ... - enabled-extensions: - - newrelic -``` - -### Alternative Configuration - -Use this configuration if you are going to change New Relic license often or don’t want to define it in the deploy file. - -Follow the steps to enable New Relic: - -1. Adjust `deploy.*.yml` in the `docker:` section: - -```yaml -docker: - newrelic: -``` - -2. Adjust `deploy.*.yml` in the `image:` section: - -```yaml -image: - tag: spryker/php:7.3 # the image tag that has been previously used in `image:` - php: - ... - enabled-extensions: - - newrelic -``` - -3. Pass the New Relic license: - -```bash -NEWRELIC_LICENSE={new_relic_license} docker/sdk up -``` -{% info_block warningBox "Note" %} - -You can pass the New Relic license only with the `docker/sdk up` command. - -{% endinfo_block %} - diff --git a/docs/scos/dev/the-docker-sdk/202005.0/the-docker-sdk.md b/docs/scos/dev/the-docker-sdk/202005.0/the-docker-sdk.md deleted file mode 100644 index 8ce44a07a25..00000000000 --- a/docs/scos/dev/the-docker-sdk/202005.0/the-docker-sdk.md +++ /dev/null @@ -1,34 +0,0 @@ ---- -title: Docker SDK -description: Spryker Docker SDK is a tool that builds a production-like Docker infrustructure for Spryker. -last_updated: Sep 14, 2020 -template: howto-guide-template -originalLink: https://documentation.spryker.com/v5/docs/docker-sdk -originalArticleId: 47cb7364-6eab-490a-9a90-73b42658e03b -redirect_from: - - /v5/docs/docker-sdk - - /v5/docs/en/docker-sdk -related: - - title: Deploy File Reference - 1.0 - link: docs/scos/dev/the-docker-sdk/page.version/deploy-file-reference-1.0.html - - title: Services - link: docs/scos/dev/the-docker-sdk/page.version/services.html ---- - -Spryker Docker SDK is a tool designed to help you set up docker environment for your Spryker project. - -The tool builds a production-like Docker infrastructure for Spryker based on the provided [Deploy file](/docs/scos/dev/installation/spryker-in-docker/docker-sdk/deploy-file-reference-1.0.html). - -Spryker Docker SDK is used for the following purposes: - -1. Building production-like Docker images. -2. Serving as part of development environment based on Docker. -3. Simplifying the process of setting up a local demo of Spryker project. - -**What's next?** -Before you start installing your Spryker in Docker, follow the installation prerequisites for your operating system: -* [Linux](/docs/scos/dev/installation/spryker-in-docker/docker-installation-prerequisites/docker-installation-prerequisites-linux.html) -* [MacOS](/docs/scos/dev/installation/spryker-in-docker/docker-installation-prerequisites/docker-installation-prerequisites-macos.html) -* [Windows](/docs/scos/dev/installation/spryker-in-docker/docker-installation-prerequisites/docker-installation-prerequisites-windows.html) - - diff --git a/docs/scos/user/intro-to-spryker/releases/release-notes/release-notes-2018.12.0.md b/docs/scos/user/intro-to-spryker/releases/release-notes/release-notes-2018.12.0.md deleted file mode 100644 index 556abd0fb9d..00000000000 --- a/docs/scos/user/intro-to-spryker/releases/release-notes/release-notes-2018.12.0.md +++ /dev/null @@ -1,96 +0,0 @@ ---- -title: Release Notes 2018.12.0 -description: This document contains business level description of major new features and enhancements released in November of 2018. -last_updated: Jun 16, 2021 -template: concept-topic-template -originalLink: https://documentation.spryker.com/2021080/docs/release-notes-2018-12-0 -originalArticleId: ed7ff54e-895b-4b0c-a4e0-3731e5547b6e -redirect_from: - - /2021080/docs/release-notes-2018-12-0 - - /2021080/docs/en/release-notes-2018-12-0 - - /docs/release-notes-2018-12-0 - - /docs/en/release-notes-2018-12-0 - - /v5/docs/release-notes-2018-12-0 - - /v5/docs/en/release-notes-2018-12-0 - - /v4/docs/release-notes-2018-12-0 - - /v4/docs/en/release-notes-2018-12-0 - - /v3/docs/release-notes-2018-12-0 - - /v3/docs/en/release-notes-2018-12-0 - - /v2/docs/release-notes-2018-12-0 - - /v2/docs/en/release-notes-2018-12-0 - - /v1/docs/release-notes-2018-12-0 - - /v1/docs/en/release-notes-2018-12-0 - - /v6/docs/release-notes-2018-12-0 - - /v6/docs/en/release-notes-2018-12-0 -related: - - title: Managing Wishlists - link: docs/pbc/all/shopping-list-and-wishlist/page.version/base-shop/manage-using-glue-api/glue-api-manage-wishlists.html - - title: Retrieving Customer's Order History - link: docs/scos/dev/glue-api-guides/page.version/managing-customers/retrieving-customer-orders.html ---- - - The Spryker Commerce OS is an end-to-end solution for e-commerce. This document contains business level description of major new features and enhancements released in November of 2018. - -For information about installing the Spryker Commerce OS, see [Getting Started Guide](/docs/scos/dev/developer-getting-started-guide.html). - -## Spryker Glue REST API -In response to multiple customer requests, we are happy to introduce Glue as a new application layer to the Spryker Commerce OS architecture. Glue provides API infrastructure, own application, feature resources, and documentation generators. -![Spryker Glue REST API](https://spryker.s3.eu-central-1.amazonaws.com/docs/About/Releases/Release+notes/Release+Notes+2018.12.0/image4.jpg) - -### API Application Infrastructure -The Glue allows you to use the power of the Spryker Commerce OS in a variety of custom-built applications. With Glue, you can build a mobile commerce application or implement a Spryker Shop by using a single-page JS framework. Basically, you can enable any touch points required by your business. As an application, Glue knows how to read and interpret API resources and leverage feature modules that expose existing Spryker functionality. It is an integration and extension point for your Spryker implementation. - -## Glue (Storefront) -### Catalog Browsing -The catalog browsing endpoints allow you to request search results and also use the Elasticsearch facet implementation. Furthermore, you can retrieve product-related information beyond price and category, including product labels and relations. - -**Documentation**: [Catalog Search](/docs/pbc/all/search/{{site.version}}/base-shop/manage-using-glue-api/glue-api-search-the-product-catalog.html). - -### Login/Registration -Endpoints ensure access-token login and retrieval. Customers can also register and request new passwords in case they forgot or want to change their current password. - -**Documentation**: [Managing customers](/docs/scos/dev/glue-api-guides/{{site.version}}/managing-customers/managing-customers.html). - -### Cart -Customers and guests can add products to their cart. Guest carts are now also persisted and retrievable via anonymous IDs, handled by your client application. - -**Documentation**: [Managing Carts](/docs/pbc/all/cart-and-checkout/{{site.version}}/base-shop/manage-using-glue-api/manage-carts-of-registered-users/manage-items-in-carts-of-registered-users.html). - -### Checkout -Retrieve all the necessary information to build your checkout for guest customers and already registered customers with their personal data. If you offer different shipment or payment methods on your own conditions, they will be considered. - -**Documentation**: [Checking Out Purchases and Getting Checkout Data](/docs/pbc/all/cart-and-checkout/{{site.version}}/base-shop/manage-using-glue-api/check-out/check-out-purchases.html). - -### Customer Account -Your customers can benefit from the same shop experience with the customer account endpoints. Not only can basic customer information be administered, but also wishlist and order history functionality is offered. - -**Documentation**: [Managing Customers](/docs/scos/dev/glue-api-guides/{{site.version}}/managing-customers/managing-customers.html), [Managing Wishlists](/docs/pbc/all/shopping-list-and-wishlist/{{site.version}}/base-shop/manage-using-glue-api/glue-api-manage-wishlists.html), [Retrieving Customer's Order History](/docs/pbc/all/order-management-system/{{site.version}}/base-shop/glue-api-retrieve-orders.html). - -## Documentation Swagger Generator -![Documentation Swagger generator](https://spryker.s3.eu-central-1.amazonaws.com/docs/About/Releases/Release+notes/Release+Notes+2018.12.0/image3.png) - -To help you keep track of your API development, we implemented a simple command that will create a YAML file to be used in your Swagger implementation to share the progress of development in your company. - -**Documentation**: -* [REST API B2B Demo Shop reference](/docs/scos/dev/glue-api-guides/{{site.version}}/old-glue-infrastructure/rest-api-b2b-demo-shop-reference.html). -* [REST API B2C Demo Shop reference](/docs/scos/dev/glue-api-guides/{{site.version}}/old-glue-infrastructure/rest-api-b2c-demo-shop-reference.html) - -## B2C API React Example -![B2C API React example](https://spryker.s3.eu-central-1.amazonaws.com/docs/About/Releases/Release+notes/Release+Notes+2018.12.0/image2.png) - -To demonstrate how to use Spryker’s API, we’ve included an example application based on a React JS library. It leverages a selection of existing endpoints to provide a complete shop experience - from browsing the catalog to placing an order. - -{% info_block warningBox %} - -This application is released for the sole purpose of illustrating API usage. It is part of the documentation and should not under any circumstances be used as a starting point for any project. - -{% endinfo_block %} - -## Demo Shops -### B2C Demo Shop -After the initial release of our new B2C Demo Shop, we are happy to announce the new standard template for it. This new template comes with a responsive design and stylized interface to emphasize the idea behind a good B2C online shop. -![B2C demo shop](https://spryker.s3.eu-central-1.amazonaws.com/docs/About/Releases/Release+notes/Release+Notes+2018.12.0/image1.png) - -### B2B Demo Shop -Our B2B Demo Shop interface has been updated to be responsive on every device. -![B2B demo shop](https://spryker.s3.eu-central-1.amazonaws.com/docs/About/Releases/Release+notes/Release+Notes+2018.12.0/image5.png) diff --git a/docs/scos/user/intro-to-spryker/releases/release-notes/release-notes-code-releases-may-2020/release-notes-code-releases-may-2020.md b/docs/scos/user/intro-to-spryker/releases/release-notes/release-notes-code-releases-may-2020/release-notes-code-releases-may-2020.md deleted file mode 100644 index 88bfc5a2112..00000000000 --- a/docs/scos/user/intro-to-spryker/releases/release-notes/release-notes-code-releases-may-2020/release-notes-code-releases-may-2020.md +++ /dev/null @@ -1,164 +0,0 @@ ---- -title: Release Notes - Code Releases May, 2020 -last_updated: Jun 16, 2021 -template: concept-topic-template -originalLink: https://documentation.spryker.com/2021080/docs/release-notes-code-releases-may-2020 -originalArticleId: b4b00976-8ca0-4d78-b966-1a4bf1e93738 -redirect_from: - - /2021080/docs/release-notes-code-releases-may-2020 - - /2021080/docs/en/release-notes-code-releases-may-2020 - - /docs/release-notes-code-releases-may-2020 - - /docs/en/release-notes-code-releases-may-2020 - - /v5/docs/release-notes-code-releases-may-2020 - - /v5/docs/en/release-notes-code-releases-may-2020 - - /v6/docs/release-notes-code-releases-may-2020 - - /v6/docs/en/release-notes-code-releases-may-2020 -related: - - title: Security Release Notes - Code Releases May, 2020 - link: docs/scos/user/intro-to-spryker/releases/release-notes/release-notes-code-releases-may-2020/security-release-notes-code-releases-may-2020.html ---- - -The Spryker Commerce OS is an end-to-end solution for digital commerce. This document contains a business level description of new features and enhancements we are announcing in May of 2020 as part of the [code release](/docs/scos/user/intro-to-spryker/spryker-release-process.html#atomic-code-releases). -For information about installing the Spryker Commerce OS see [Getting Started Guide](/docs/scos/dev/developer-getting-started-guide.html). - - -## Spryker Commerce OS - -### Custom Order Reference - -**Custom Order Reference** is a small but powerful feature that allows adding an external reference to the orders that were placed by a Customer. It can be a reference to a system that manages internal purchases or a ticket system. Irrespective of the purpose of the external system, which can vary from invoicing to accounting, the reference to it can always be saved on the Storefront and in the Back Office. -**Custom Order Reference** is the out-of-the-box solution that increases transparency and allows you to control purchases for the B2B companies more efficiently. -![image](https://spryker.s3.eu-central-1.amazonaws.com/docs/About/Releases/Release+notes/Release+Notes%3A+Code+Releases+May%2C+2020/image1.png) - -#### Documentation - -[Custom Order Reference](/docs/scos/user/features/202005.0/order-management-feature-overview/custom-order-reference-overview.html) - -### Filter and Search in Order Archive - -**Filter and Search in Order Archive** allows B2C users to search and filter orders in their order archive, and for B2B users, it opens even more possibilities. **Filter and Search** adds two new permissions that allow B2B users to view their orders, orders of their Business Units, and orders of their Company. The order management has now become easier and provides multiple tools to find an order by order reference, product name, or product SKU and to see products of the orders on the order archive page. -![image](https://spryker.s3.eu-central-1.amazonaws.com/docs/About/Releases/Release+notes/Release+Notes%3A+Code+Releases+May%2C+2020/image7.png) - -#### Documentation - -[Filter and Search in Order Archive](/docs/scos/user/features/202005.0/customer-account-management-feature-overview/customer-account-management-feature-overview.html) - -### Adding Shipment Cost to RFQ - -**Adding shipment cost for RFQ** is a new step in the Quotation Process at Spryker. Previously, it was not possible to create a quote with a shipment cost, which created limitations in digital negotiations about a purchase. Now, the negotiations can go further: the B2B Customers can negotiate with Supplier not only the item price and volume of order but the shipment cost of the purchase as well. - -![image](https://spryker.s3.eu-central-1.amazonaws.com/docs/About/Releases/Release+notes/Release+Notes%3A+Code+Releases+May%2C+2020/image3.png) - - -#### Documentation - -[Quotation Process and RFQ](/docs/scos/user/features/202005.0/quotation-process-feature-overview.html) - -### Configuration (YAML) File for Batch Data Import - -We have improved data importers’ usability. -Using a **YAML configuration file** as a parameter of data:import **console command** you will now be able to **import several CSV data files in a batch**, having the flexibility of defining it without changing your project’s source code. -You may now change names and location of the CSV files to be imported, define a YAML configuration file with a data subset to import as a bulk, making it easier to manage your data import operation. - -![image](https://spryker.s3.eu-central-1.amazonaws.com/docs/About/Releases/Release+notes/Release+Notes%3A+Code+Releases+May%2C+2020/image4.png) - -#### Documentation - -[Importing Data with a Configuration File](/docs/scos/dev/data-import/202005.0/importing-data-with-a-configuration-file.html) - -### Data Import Documentation - -We have improved data importers’ documentation, making it easier to understand how Spryker Demo Shop data import works for most common import operations: Products, Prices, Stock, Content, Merchandising, etc. -You will have access to detailed information about CSV files content, dependencies, and mandatory information needed to run your usual data import operation. - -#### Documentation - -[Demo Shop Data Import](/docs/scos/dev/data-import/202005.0/demo-shop-data-import/importing-demo-shop-data.html) - -### Product Relation per Store - -We have enhanced our multi-store feature with a new product management functionality. -Starting from this release, **Product Relations** can be assigned to stores. You can now define different **Product Relations** of the same type (related product or up-sell) and assign them to specific stores. -This way, you can adjust the relations between products depending on your markets. - -![image](https://spryker.s3.eu-central-1.amazonaws.com/docs/About/Releases/Release+notes/Release+Notes%3A+Code+Releases+May%2C+2020/image6.gif) - -#### Documentation - -[Product Relations](/docs/scos/user/features/202005.0/product-relations-feature-overview.html) - -### Product Abstract Card on Product List - -We have improved our Front-end component **Product Abstract Card** to fully support the Product Group feature. Whenever you hover the color selector on the card, the picture, title, and price of the product are updated to match your selection. -![image](https://spryker.s3.eu-central-1.amazonaws.com/docs/About/Releases/Release+notes/Release+Notes%3A+Code+Releases+May%2C+2020/image8.gif) - -#### Documentation - -[Product Groups](/docs/scos/user/features/202005.0/product-groups-feature-overview.html) - -## Spryker Glue API - -In this release, we continue exposing functionality with high-impact on your **B2C and B2B Storefront**. -Enabling your customers to create shopping lists, allowing you to sell products by any unit of measure that you specifically define, and offering your customers discounts with promotional products are only a part of the APIs provided in this release. - -### Measurement Units API - -Both in the B2B and B2C contexts, you’ll find many cases when you want to sell products not by unit but by different measures. For example, you can offer apples by “kilogram” and cables by “Centimeter”, “Meter” or “Feet” instead of by “Item”. This API enables you to **use measurement units throughout the purchasing’s user journey in product detail pages, cart, checkout, and orders**. - -#### Documentation - -[Measurement Units API](/docs/scos/dev/glue-api-guides/202005.0/retrieving-measurement-units.html) - -### Shopping Lists API - -In the B2B context, shopping lists play a key role. Company users can create and manage shopping lists of frequently purchased products to help them complete recurrent purchases and to organize their shopping preferences with ease. With this API, you can **enable your customers’ company users to create and retrieve shopping lists, edit and delete them, add and remove items from a shopping list, etc**. - -#### Documentation - -[Shopping Lists API](/docs/scos/dev/glue-api-guides/202005.0/managing-shopping-lists/managing-shopping-lists.html) - -### Promotional Products API - -Equally important in B2B and B2C are product discounts and promotions. In our previous release, we already provided endpoints for cart rules and vouchers. Now you will also be able to make use of the API to **offer discounts consisting of promotional products**. With this API, you can apply promotional product discounts to allow adding a promotional product to cart and highlight it among the cart items. - -#### Documentation - -[Promotions API](/docs/scos/dev/glue-api-guides/202005.0/retrieving-promotional-items.html) - -### Checkout API - Shipment and Payment Methods - -The checkout process is paramount for your business in any business model. With this API, you will be able to **integrate shipment and payment methods** seamlessly in your checkout process. You can get shipment and payment methods with one single request and also make use of only the information you need on each checkout step, with clear identification and decoupling of the selected methods’ information. - -#### Documentation - -* [Check out purchases](/docs/scos/dev/glue-api-guides/202005.0/checking-out/checking-out-purchases.html) -* [Retrieving Customer's Order History](/docs/pbc/all/order-management-system/{{site.version}}/base-shop/glue-api-retrieve-orders.html) - -### Refresh Token API - Create Possibility to Invalidate Refresh Tokens - -To enable the maximum level of security for your system, you must be able to invalidate refresh tokens in the presence of potential menaces. With this API **refresh tokens are made persistent long-term and you will be able to revoke them at any time for each user**. You can also configure the amount of time for persistence and clean the refresh tokens up from the database when necessary. - -#### Documentation -[Token Revocation](/docs/scos/dev/glue-api-guides/202009.0/managing-customers/managing-customer-authentication-tokens.html#revoke-a-refresh-token) - -### Swagger Documentation Generator Contains “Includes” by Endpoint - -In order to make it easier for API consumers to understand the content of those endpoints following the compound documents section of the JSONAPI specification, in this release, we have introduced improvements that will allow you to have upfront information by endpoint about the **primary resources that can be included in the response**. This can be useful not only for a basic understanding of the endpoints but also for automation purposes. - -#### Documentation -[Resource Relationships](/docs/scos/dev/glue-api-guides/{{site.version}}/glue-api-tutorials/document-glue-api-resources.html#describe-resource-relationships) - -## Technical Enhancements - -### Enable Jenkins v2 with SSL - -We have improved our Jenkins v2 support and security of cross-service communication covered with SSL by enabling additional API configuration. - -### Cart Performance Improvements - -A few last code releases were aiming to bring cart operation to a new performance level. We have raised our acceptance criteria for cart operations to 100 independent cart items and optimized the related calculation stack. -Also, there were a few infrastructural releases bringing performance improvements across all Spryker applications with glossary and class resolver optimizations. - -### Yves Console - a Dedicated Storefront Console - -There are many DevOps operations which are relevant only for Yves Application, such as router and template engine warmers. Therefore, we have introduced an independent way of running Yves relevant console commands with a separate application context. diff --git a/docs/scos/user/intro-to-spryker/releases/release-notes/release-notes-code-releases-may-2020/security-release-notes-code-releases-may-2020.md b/docs/scos/user/intro-to-spryker/releases/release-notes/release-notes-code-releases-may-2020/security-release-notes-code-releases-may-2020.md deleted file mode 100644 index 247d182fee7..00000000000 --- a/docs/scos/user/intro-to-spryker/releases/release-notes/release-notes-code-releases-may-2020/security-release-notes-code-releases-may-2020.md +++ /dev/null @@ -1,102 +0,0 @@ ---- -title: Security Release Notes - Code Releases May, 2020 -last_updated: Jun 16, 2021 -template: concept-topic-template -originalLink: https://documentation.spryker.com/2021080/docs/security-release-notes-code-releases-may-2020 -originalArticleId: 8f45ce0b-1aac-4d54-8b3f-ac46e9ec6f1a -redirect_from: - - /2021080/docs/security-release-notes-code-releases-may-2020 - - /2021080/docs/en/security-release-notes-code-releases-may-2020 - - /docs/security-release-notes-code-releases-may-2020 - - /docs/en/security-release-notes-code-releases-may-2020 - - /v5/docs/security-release-notes-code-releases-may-2020 - - /v5/docs/en/security-release-notes-code-releases-may-2020 - - /v6/docs/security-release-notes-code-releases-may-2020 - - /v6/docs/en/security-release-notes-code-releases-may-2020 ---- - -The following information pertains to security-related issues that have been recently resolved. Issues are listed by description and affected modules. - - {% info_block warningBox "Note" %} - -If you need any additional support with this content, please contact support@spryker.com. If you found a new security vulnerability, please inform us via security@spryker.com. - -{% endinfo_block %} - -## CSRF vulnerabilities -Starting from PHP 7.3, the session cookie supports the [SameSite attribute](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie/SameSite), which decreases the attack surface. `symfony/http-foundation` supports the attribute since version 3.4.28, having it empty by default but configurable. Since versions 4.2.0, 4.3.0, and 4.4.0, the attribute is set to `lax` by default. We recommend updating and activating the feature accordingly. - -## CSRF protection in cart manipulation forms -Previously, without CSRF protection, it was possible to manipulate carts externally. To prevent this possibility, we’ve set a CSRF token to be generated for each cart-related operation. - -Affected modules: - -* CartPage (3.17.0) -* CustomerPage (2.17.0) -* CustomerReorderWidget (6.8.0) -* DiscountPromotionWidget (3.2.0) -* ProductDetailPage (3.7.0) -* ProductSetWidget (1.6.0) - - -Implementation instructions: -1. Update the modules: -```bash -composer update spryker-shop/cart-page spryker-shop/customer-page spryker-shop/customer-reorder-widget spryker-shop/discount-promotion-widget spryker-shop/product-detail-page spryker-shop/product-set-widget -``` -2. Add the following global widgets to `ShopApplicationDependencyProvider::getGlobalWidgets()` on the project level: -* `AddToCartFormWidget::class` -* `AddItemsFormWidget::class` -* `CartChangeQuantityFormWidget::class` -* `CustomerReorderFormWidget::class` -* `CustomerReorderItemsFormWidget::class` - -3. Adjust project-level templates for the cart-related operations, if you have any. Check the changes in core templates as an example. - -## CSRF protection in the login form -Previously, the login form was vulnerable to [Login CSRF attacks](https://en.wikipedia.org/wiki/Cross-site_request_forgery#Forging_login_requests). To avoid this vulnerability, we’ve set a CSRF token to be generated for every login form. - -Affected modules: -* Security (1.2.0) -* CustomerPage (2.18.0) -* AgentPage (1.6.0) - -To implement the changes, update the modules: -```bash -composer update spryker/security spryker-shop/agent-page spryker-shop/customer-page -``` -## CSRF protection for account deletion -To prevent CSRF attacks, we’ve set account deletion to be done only on POST requests with a CSRF token. - -Affected modules: - -* Customer (7.27.0) - -To implement the changes, update the modules: -```bash -composer require spryker/customer:"^7.27.0" --update-with-dependencies -``` - -## Vulnerabilities in Symfony components -We’ve updated Symfony components to get the security fixes. - -Affected modules: -* Symfony (3.3.8) - -To implement the changes, update the modules: -```bash -composer require spryker/symfony:"^3.3.8" --update-with-dependencies -``` -## Validation for the log file name of Zed request Repeater -The Log file name of the Repeater is now validated by regex and does not allow forbidden symbols. - -Affected modules: -* ZedRequest (3.14.0) - -To implement the changes, update the modules: - ```bash - composer require spryker/zed-request:"^3.14.0" --update-with-dependencies - ``` - -P.S. Thanks for reading, stay safe. -