diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml index 53486d426bd..16d6c6ac503 100644 --- a/.github/workflows/linter.yml +++ b/.github/workflows/linter.yml @@ -11,14 +11,11 @@ name: Lint Code Base # https://help.github.com/en/articles/workflow-syntax-for-github-actions # -############################# -# Start the job on all push # -############################# +################################### +# Start the job on a pull request # +################################### on: - pull_request: - branches: - - master - - 2.*-develop + pull_request ############### # Set the Job # @@ -50,4 +47,5 @@ jobs: VALIDATE_ALL_CODEBASE: false DEFAULT_BRANCH: master VALIDATE_HTML: false + VALIDATE_OPENAPI: false MARKDOWN_CONFIG_FILE: .markdownlint.json diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml deleted file mode 100644 index 04526efa2e6..00000000000 --- a/.github/workflows/main.yml +++ /dev/null @@ -1,22 +0,0 @@ -name: Markdown linting test - -on: - pull_request: - branches: - - master - - 2.*-develop - -jobs: - test: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - - name: Set up Ruby - uses: actions/setup-ruby@v1 - with: - ruby-version: 2.6 - - name: Install mdl gem - run: gem install mdl - - name: Run mdl - run: mdl --style=_checks/styles/style-rules-prod --ignore-front-matter --git-recurse -- . diff --git a/README.md b/README.md index 99cdcb9943c..0310f8a04d4 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ This site is built by [Jekyll](https://jekyllrb.com/), which is an open-source t You can build the site locally in the following ways: - [Installing the project dependencies locally](#build-locally) (Mac, Linux) -- [Using Docker (docker-compose)](#docker-docker-compose) (Mac, Linux, Windows) +- [Using Docker (docker-compose)](https://github.com/magento/devdocs/wiki/Build-DevDocs-with-Docker) (Mac, Linux, Windows) - [Using a Vagrant virtual machine](https://github.com/magento-devdocs/vagrant-for-magento-devdocs) (Mac, Linux, Windows) - [Build DevDocs in Windows](https://github.com/magento/devdocs/wiki/Build-DevDocs-in-Windows) (Windows 7 & 10) - [Building older versions of the documentation](https://github.com/magento/devdocs/wiki/Build-DevDocs-with-Docker) diff --git a/Rakefile b/Rakefile index 5243b19f5f6..3c65d2827c6 100644 --- a/Rakefile +++ b/Rakefile @@ -78,13 +78,14 @@ task :whatsnew do print 'Generating data for the What\'s New digest: $ '.magenta # Generate tmp/whats-new.yml - if since.nil? || since.empty? - sh 'bin/whatsup_github', 'since', last_update - elsif since.is_a? String - sh 'bin/whatsup_github', 'since', since - else - abort 'The "since" argument must be a string. Example: "jul 4"' - end + report = + if since.nil? || since.empty? + `bin/whatsup_github since '#{last_update}'` + elsif since.is_a? String + `bin/whatsup_github since #{since}` + else + abort 'The "since" argument must be a string. Example: "jul 4"' + end # Merge generated tmp/whats-new.yml with existing src/_data/whats-new.yml generated_data = YAML.load_file generated_file @@ -94,6 +95,9 @@ task :whatsnew do puts "Writing updates to #{current_file}" File.write current_file, current_data.to_yaml + + abort report if report.include? 'MISSING whatsnew' + puts report end desc 'Generate index for Algolia' diff --git a/_plugins/debug/site_post_render.rb b/_plugins/debug/site_post_render.rb new file mode 100644 index 00000000000..8e72a2bae95 --- /dev/null +++ b/_plugins/debug/site_post_render.rb @@ -0,0 +1,40 @@ +# frozen_string_literal: true + +# Copyright © Magento, Inc. All rights reserved. +# See COPYING.txt for license details. + +# To enable this plugin, add to your '_config.local.yml' the following: +# +# debug: site_post_render +# +# This plugin runs an IRB session (https://github.com/ruby/irb) of a Jekyll application in a serving mode when it's at a state after rendering the whole site, but before writing any files. +# See the ":site, :post_render" hook: https://jekyllrb.com/docs/plugins/hooks/ +# Available objects to explore are 'site' and 'payload'. +# +# Several helpful methods (to use a method, chain to an object such as 'site.methods', 'payload.keys'): +# - '.methods.sort' +# - '.instance_variables.sort' +# - '.keys.sort' +# +# Examples: +# +# To view available configuration data of the site +# > payload.site.keys +# +# To view the number of pages: +# > payload.site.pages.count +# +# To find a page by path and view its data: +# > page = payload.site.pages.select { |page| page.path == 'cloud/env/variables-build.md' }[0] +# > page.data +# +# To exit from the IRB session: +# > exit! +# +Jekyll::Hooks.register :site, :post_render do |site, payload| + next unless site.config['serving'] + + # rubocop:disable Lint/Debugger + binding.irb if site.config['debug'] == 'site_post_render' + # rubocop:enable Lint/Debugger +end diff --git a/_plugins/debug/site_pre_render.rb b/_plugins/debug/site_pre_render.rb new file mode 100644 index 00000000000..bae552f6b0c --- /dev/null +++ b/_plugins/debug/site_pre_render.rb @@ -0,0 +1,40 @@ +# frozen_string_literal: true + +# Copyright © Magento, Inc. All rights reserved. +# See COPYING.txt for license details. + +# To enable this plugin, add to your '_config.local.yml' the following: +# +# debug: site_pre_render +# +# This plugin runs an IRB session (https://github.com/ruby/irb) of a Jekyll application in a serving mode when it's at a state just before rendering the whole site. +# See the ":site, :pre_render" hook: https://jekyllrb.com/docs/plugins/hooks/ +# Available objects to explore are 'site' and 'payload'. +# +# Several helpful methods (to use a method, chain to an object such as 'site.methods', 'payload.keys'): +# - '.methods.sort' +# - '.instance_variables.sort' +# - '.keys.sort' +# +# Examples: +# +# To view available configuration data of the site +# > payload.site.keys +# +# To view the number of pages: +# > payload.site.pages.count +# +# To find a page by path and view its data: +# > page = payload.site.pages.select { |page| page.path == 'cloud/env/variables-build.md' }[0] +# > page.data +# +# To exit from the IRB session: +# > exit! +# +Jekyll::Hooks.register :site, :pre_render do |site, payload| + next unless site.config['serving'] + + # rubocop:disable Lint/Debugger + binding.irb if site.config['debug'] == 'site_pre_render' + # rubocop:enable Lint/Debugger +end diff --git a/docker-compose.yaml b/docker-compose.yaml index bbd6e90c73c..0f41e76b8bc 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -2,7 +2,7 @@ version: '3.6' services: jekyll: - image: jekyll/jekyll:latest + image: jekyll/jekyll:3.8.6 command: jekyll serve --watch --incremental --open-url --livereload ports: - 4000:4000 diff --git a/src/_data/toc/php-developer-guide.yml b/src/_data/toc/php-developer-guide.yml index 578e2636859..d14ff9431a6 100644 --- a/src/_data/toc/php-developer-guide.yml +++ b/src/_data/toc/php-developer-guide.yml @@ -265,6 +265,9 @@ pages: - label: Array Manager url: /extension-dev-guide/framework/array-manager.html + - label: URL Library + url: /extension-dev-guide/framework/url-library.html + - label: Security children: diff --git a/src/_data/whats-new.yml b/src/_data/whats-new.yml index 647ee4d1398..98fe53cefc4 100644 --- a/src/_data/whats-new.yml +++ b/src/_data/whats-new.yml @@ -4,8 +4,118 @@ description: This page contains recent changes that we think you'd like to know We exclude from this list proofreading, spelling checks, and all minor updates. link: "/whats-new.html" thread: "/whatsnew-feed.xml" -updated: Tue Nov 17 05:06:39 2020 +updated: Wed Dec 16 16:19:47 2020 entries: +- description: Added an [example](https://devdocs.magento.com/guides/v2.4/javascript-dev-guide/javascript/requirejs.html) + of overwriting a Knockout JS .html template file in the `requirejs-config.js` + file. + versions: 2.3.x, 2.4.x + type: Major Update + date: December 14, 2020 + link: https://github.com/magento/devdocs/pull/8367 + contributor: sathiyaaa + profile: https://github.com/sathiyaaa +- description: Added [descriptions](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/framework/serializer.html) + for the JsonHexTag, Base64Json, and FormData serializer implementations. + versions: 2.3.x, 2.4.x + type: Major Update + date: December 14, 2020 + link: https://github.com/magento/devdocs/pull/8382 + contributor: drpayyne + profile: https://github.com/drpayyne +- description: Added a new topic describing the [URL Library](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/framework/url-library.html). + versions: 2.4.x + type: New Topic + date: December 14, 2020 + link: https://github.com/magento/devdocs/pull/8384 + contributor: drpayyne + profile: https://github.com/drpayyne +- description: Published [release notes](https://devdocs.magento.com/quality-patches/release-notes.html) + for the 1.0.13 Magento Quality Patch (MQP) package release. + versions: 2.3.x, 2.4.x + type: Major Update + date: December 10, 2020 + link: https://github.com/magento/devdocs/pull/8375 + contributor: Rykh + profile: https://github.com/Rykh +- description: Added an [explanation and example](http://devdocs.magento.com/guides/v2.4/javascript-dev-guide/javascript/requirejs.html) + of passing parameters to JavaScript using the `data-mage-init` HTML attribute. + versions: 2.3.x, 2.4.x + type: Major Update + date: December 9, 2020 + link: https://github.com/magento/devdocs/pull/8311 + contributor: sathiyaaa + profile: https://github.com/sathiyaaa +- description: Added a new topic describing how to [customize the Magento Admin design](https://devdocs.magento.com/guides/v2.4/howdoi/admin/customize_admin.html). + versions: 2.3.x, 2.4.x + type: New Topic + date: December 8, 2020 + link: https://github.com/magento/devdocs/pull/8351 + contributor: BarnyShergold + profile: https://github.com/BarnyShergold +- description: Added an [explanation and example](https://devdocs.magento.com/guides/v2.3/install-gde/install/cli/install-cli-subcommands-maint.html) + of using the `$_GET['skin']` parameter to set a different layout and localized + content for each store in a multistore setup. + versions: 2.3.x, 2.4.x + type: Major Update + date: December 7, 2020 + link: https://github.com/magento/devdocs/pull/8247 + contributor: dineshvb + profile: https://github.com/dineshvb +- description: Instructions on how to remove plugins from the [Elasticsearch service](https://devdocs.magento.com/cloud/project/services-elastic.html#additional-search-configuration). + versions: 2.4.x + type: Technical + date: December 4, 2020 + link: https://github.com/magento/devdocs/pull/8336 + contributor: bdenham + profile: https://github.com/bdenham +- description: Added detailed examples to [Define the GraphQL schema for a module](https://devdocs.magento.com/guides/v2.4/graphql/develop/create-graphqls-file.html). + versions: 2.3.x, 2.4.x + type: Major Update + date: November 30, 2020 + link: https://github.com/magento/devdocs/pull/8232 + contributor: sathiyaaa + profile: https://github.com/sathiyaaa +- description: Published [release notes](https://devdocs.magento.com/quality-patches/release-notes.html) + for the 1.0.12 Magento Quality Patch (MQP) package release. + versions: 2.3.x, 2.4.x + type: Major Update + date: November 26, 2020 + link: https://github.com/magento/devdocs/pull/8271 + contributor: ilima-ebay + profile: https://github.com/ilima-ebay +- description: Updated Composer package versions to correct 2.4.x [sample data upgrade + instructions](https://devdocs.magento.com/guides/v2.4/comp-mgr/cli/cli-rc1-samp.html). + versions: 2.4.x + type: Technical + date: November 24, 2020 + link: https://github.com/magento/devdocs/pull/8259 + contributor: jeff-matthews + profile: https://github.com/jeff-matthews +- description: Simplified and updated the [GraphQL tutorial](https://devdocs.magento.com/guides/v2.4/graphql/tutorials/checkout/index.html). + versions: 2.3.x, 2.4.x + type: Major Update + date: November 23, 2020 + link: https://github.com/magento/devdocs/pull/8046 + contributor: dobooth + profile: https://github.com/dobooth +- description: Published [ece-tools 2002.1.4 package release notes](https://devdocs.magento.com/cloud/release-notes/cloud-tools.html). + This release fixes search engine and database validation issues that can cause + deployment failure. + versions: 2.x + type: Technical + date: November 19, 2020 + link: https://github.com/magento/devdocs/pull/8249 + contributor: meker12 + profile: https://github.com/meker12 +- description: Published [release notes](https://devdocs.magento.com/quality-patches/release-notes.html) + for the 1.0.10 Magento Quality Patch (MQP) package release. + versions: 2.3.x, 2.4.x + type: Major Update + date: November 19, 2020 + link: https://github.com/magento/devdocs/pull/8252 + contributor: viktym + profile: https://github.com/viktym - description: Published [release notes](https://devdocs.magento.com/quality-patches/release-notes.html) for the 1.0.10 Magento Quality Patch (MQP) package release. versions: '' @@ -74,8 +184,8 @@ entries: link: https://github.com/magento/devdocs/pull/8187 contributor: jeff-matthews profile: https://github.com/jeff-matthews -- description: Reorganized the [system requirements](https://devdocs.magento.com/guides/v2.4/install-gde/system-requirements.html) pages in the Magento Installation - Guide to to make it more coherent. +- description: Reorganized the [system requirements](https://devdocs.magento.com/guides/v2.4/install-gde/system-requirements.html) + pages in the Magento Installation Guide to to make it more coherent. versions: 2.3.x, 2.4.x type: Major Update date: November 5, 2020 diff --git a/src/_includes/cloud/enable-ssh.md b/src/_includes/cloud/enable-ssh.md index fcbd99f702e..ce9206189a0 100644 --- a/src/_includes/cloud/enable-ssh.md +++ b/src/_includes/cloud/enable-ssh.md @@ -15,89 +15,31 @@ For more information on SSH keys, see the following: ## Locate an existing SSH key pair {#existing} -An existing SSH key pair is typically located in the `.ssh` subdirectory of the user's home directory. This folder is hidden and may not display in the file manager or finder unless configured to display hidden files and folders. - -You can quickly verify if you have SSH keys by entering commands using terminal access. - -To check for SSH keys, enter the following command: - -```bash -ls ~/.ssh -``` - -If you have SSH keys, a directory listing is displayed similar to the following: - -```terminal -id_rsa id_rsa.pub known_hosts -``` - -If you do not have SSH keys, you need to generate the keys for adding to your Magento ECE account and GitHub account. See [Create a new SSH key pair](#ssh-create-new-key-pair). - -If you already have SSH keys, continue to: - -- [Add a public SSH key to your Magento account](#ssh-add-to-account) section -- [Add your SSH key to your GitHub account](https://help.github.com/articles/adding-a-new-ssh-key-to-your-github-account/) - -## Create a new SSH key pair {#ssh-create-new-key-pair} - -Use the `ssh-keygen` command to create an SSH key pair. `ssh-keygen` is typically installed on Linux systems. +An existing SSH key pair is typically located in the `.ssh` subdirectory of the user home directory. This folder is hidden and may not display in the File Manager or Finder if your system is not configured to display hidden files and folders. {:.procedure} -To create an SSH key pair: +To check for SSH keys: -1. The command syntax follows, entering the email used for your GitHub account: +1. In the terminal, list the contents of your SSH directory. ```bash - ssh-keygen -t rsa + ls ~/.ssh ``` - GitHub also uses the key length `-b 4096` in the command. Follow the prompts to complete the key. - -1. When prompted to "Enter a file in which to save the key," press **Enter** to save the file to the default location. The prompt displays the location. - -1. When prompted to enter a secure passphrase, enter a phrase to use like a password. Make note of this passphrase. You may be requested to enter it depending on tasks you complete using a terminal during development. +1. Review the output. -1. After creating the SSH key pair, start the ssh-agent: + If you have SSH keys, a directory listing is displayed similar to the following: - For Mac or Linux: - - ```bash - eval "$(ssh-agent -s)" + ```terminal + id_rsa id_rsa.pub known_hosts ``` - For Mac, you can edit the `~/.ssh/config` file to automatically load keys into the ssh-agent and store passphrases in your keychain. - - ```conf - Host * - AddKeysToAgent yes - UseKeychain yes - IdentityFile ~/.ssh/id_rsa - ``` +If the directory does not exist or has no SSH key files, you must generate at least one SSH key and add it to your GitHub account. For instructions, see [Generate a new SSH key](https://docs.github.com/en/free-pro-team@latest/github/authenticating-to-github/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent) in the GitHub documentation. - {:.bs-callout-info} - You can specify multiple SSH keys by adding multiple `IdentityFile` entries to your configuration. +If you have at least one SSH key in your directory, add the key to your Magento and GitHub accounts: - For Windows: - - ```shell - eval $(ssh-agent -s) - ``` - -1. Add the SSH key to the ssh-agent. If you used a different name for the key file name, replace `id_rsa` with that file name. - - For Mac: - - ```bash - ssh-add -K ~/.ssh/id_rsa - ``` - - For Windows or Linux: - - ```shell - ssh-add ~/.ssh/id_rsa - ``` - -1. [Add your SSH key to your GitHub account.](https://help.github.com/articles/adding-a-new-ssh-key-to-your-github-account/) The instructions include Mac, Windows, and Linux. +- [Add an SSH key to your GitHub account](https://help.github.com/articles/adding-a-new-ssh-key-to-your-github-account/) +- [Add your public SSH key to your Magento account](#ssh-add-to-account) ### Test the SSH keys {#test} @@ -120,13 +62,14 @@ You can add SSH keys to your account in any of the following ways: - Using the [{{site.data.var.ece}} CLI](#add-key-cli) - Using the [{{site.data.var.ece}} Web Interface](#add-key-web) -### Add a key using the CLI {#add-key-cli} +### Add your SSH key using the CLI {#add-key-cli} {:.procedure} To add an SSH key using the CLI: 1. Open a terminal application on your local workstation. -1. If you haven't done so already, log in (or switch to) the [Magento file system owner]({{ site.baseurl }}/cloud/before/before-workspace-file-sys-owner.html) to the server on which your SSH keys are located. + +1. If you have not done so already, log in (or switch to) the [Magento file system owner]({{ site.baseurl }}/cloud/before/before-workspace-file-sys-owner.html) to the server on which your SSH keys are located. 1. Log in to your project: @@ -140,30 +83,43 @@ To add an SSH key using the CLI: magento-cloud ssh-key:add ~/.ssh/id_rsa.pub ``` -### Add a key using the Project Web Interface {#add-key-web} +{:.bs-callout-tip} +You can list and delete SSH keys using the Magento Cloud CLI commands `ssh-key:list` and `ssh-key:delete`. -You will select and add your SSH public key to each environment in your account. +### Add your SSH key using the Project Web Interface {#add-key-web} + +You must add your SSH public key to your account. After you add the key, you must redeploy all active environments on your account to install the key. - Starter: Add to Master (Production) and any environments you create by branching from Master -- Pro: Add the key to Staging, Production, and Integration environments +- Pro: Add the key to the Staging, Production, and Integration environments {:.procedure} -To add an SSH key using the Project Web Interface: +To add an SSH key using the Project Web interface: + +1. Get your public key. -1. Copy your SSH public key to the clipboard. + - In the terminal, navigate to the `~/.ssh` directory. - If you do not already have SSH keys on that machine, see [GitHub documentation](https://help.github.com/articles/generating-an-ssh-key) to create them. + - Copy the contents of the public key file `~/.ssh/.pub` to the clipboard. + + If there are no SSH key files in the directory, you must create one. See [Generate a new SSH key](https://docs.github.com/en/free-pro-team@latest/github/authenticating-to-github/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent) in the GitHub documentation. 1. Login and access your project through the [Project Web Interface](https://accounts.magento.cloud). -1. In your selected branch, an icon displays if you do not have an SSH key added. + +1. In your project, look for the **No SSH key** icon to the right of the command field. This icon is visible when the project does not contain an SSH key. ![No SSH key]({{ site.baseurl }}/common/images/cloud/cloud_ssh-key-install.png) -1. Copy and paste the content of your public SSH key in the screen. +1. Click the icon to add the key. + + - Copy and paste the content of your public SSH key in the **Public key** field. + + ![Add SSH key]({{ site.baseurl }}/common/images/cloud/cloud_ssh-key-add.png) - ![Add SSH key]({{ site.baseurl }}/common/images/cloud/cloud_ssh-key-add.png) + - Follow the prompts on your screen to complete the task. -1. Follow the prompts on your screen to complete the task. +{:.bs-callout-tip} +You can view and manage the SSH keys on your account in _Account settings_. In the upper right corner of the Project Web interface, click **your-user-name** > **Account Settings**. ## Set global Git variables diff --git a/src/_includes/graphql/cart-object-24.md b/src/_includes/graphql/cart-object-24.md index 87911498ab1..12923b79227 100644 --- a/src/_includes/graphql/cart-object-24.md +++ b/src/_includes/graphql/cart-object-24.md @@ -5,13 +5,13 @@ Attribute | Data Type | Description `applied_gift_cards` | [[`AppliedGiftCard`]][AppliedGiftCard] | An array of `AppliedGiftCard` objects. An `AppliedGiftCard` object contains the `code` text attribute, which specifies the gift card code. `applied_gift_cards` is a Commerce-only attribute, defined in the GiftCardAccountGraphQl module `applied_reward_points`| [`RewardPointsAmount`][RewardPointsAmount] | The amount of reward points applied to the cart `applied_store_credit` | [`AppliedStoreCredit`][AppliedStoreCredit] | Contains store credit information applied to the cart. `applied_store_credit` is a Commerce-only attribute, defined in the CustomerBalanceGraphQl module -`available_gift_wrappings` | [GiftWrapping]! | The list of available gift wrapping options for the cart +`available_gift_wrappings` | [[GiftWrapping]][GiftWrapping]! | The list of available gift wrapping options for the cart `available_payment_methods` | [[AvailablePaymentMethod]][AvailablePaymentMethod] | Available payment methods `billing_address` | [BillingCartAddress][BillingCartAddress] | Contains the billing address specified in the customer's cart `email` | String | The customer's email address `gift_message` | [GiftMessage][GiftMessage] | A gift message added to the cart `gift_receipt_included` | Boolean! | Indicates if the customer requested a gift receipt for the cart -`gift_wrapping` | GiftWrapping | The selected gift wrapping for the cart +`gift_wrapping` | [GiftWrapping][GiftWrapping] | The selected gift wrapping for the cart `id` | ID! | The ID of the cart `is_virtual` | Boolean! | Indicates whether the cart contains only virtual products `items` | [[CartItemInterface]][CartItemInterface] | Contains the items in the customer's cart @@ -29,6 +29,7 @@ Attribute | Data Type | Description [CartItemInterface]: {{page.baseurl}}/graphql/queries/cart.html#CartItemInterface [CartPrices]: {{page.baseurl}}/graphql/queries/cart.html#CartPrices [GiftMessage]: {{page.baseurl}}/graphql/queries/cart.html#GiftMessage +[GiftWrapping]: {{page.baseurl}}/graphql/queries/cart.html#GiftWrapping [RewardPointsAmount]: {{page.baseurl}}/graphql/queries/cart.html#RewardPointsAmount [SelectedPaymentMethod]: {{page.baseurl}}/graphql/queries/cart.html#SelectedPaymentMethod [ShippingCartAddress]: {{page.baseurl}}/graphql/queries/cart.html#ShippingCartAddress diff --git a/src/_includes/graphql/customer-orders-output.md b/src/_includes/graphql/customer-orders-output.md index 5d84468f304..c3a932eaa4f 100644 --- a/src/_includes/graphql/customer-orders-output.md +++ b/src/_includes/graphql/customer-orders-output.md @@ -43,23 +43,23 @@ Attribute | Data type | Description --- | --- | --- `billing_address` | [OrderAddress](#OrderAddress) | The billing address for the order `carrier` | String | The shipping carrier for the order delivery -`comments` | [[SalesCommentItem](#SalesCommentItem)] | Comments on the order +`comments` | [[SalesCommentItem]](#SalesCommentItem) | Comments on the order `created_at` | String | Deprecated. Use the `order_date` attribute instead -`credit_memos` | [[CreditMemo](#CreditMemo)] | Contains a list of credit memos for the order +`credit_memos` | [[CreditMemo]](#CreditMemo) | Contains a list of credit memos for the order `grand_total` | Float | Deprecated. Use the `totals.grand_total` attribute instead `gift_message` | [GiftMessage](#GiftMessage) | The entered gift message for the order `gift_receipt_included` | Boolean! | Indicates if the customer requested a gift receipt for the order `gift_wrapping` | [GiftWrapping](#GiftWrapping) | The selected gift wrapping for the order `id` | ID! | Unique identifier for the order `increment_id` | String | Deprecated. Use the `id` attribute instead -`invoices` | [[Invoice](#Invoice)]! | Contains a list of invoices for the order -`items` | [[OrderItemInterface](#OrderItemInterface)] | An array containing the items purchased in this order +`invoices` | [[Invoice]](#Invoice)! | Contains a list of invoices for the order +`items` | [[OrderItemInterface]](#OrderItemInterface) | An array containing the items purchased in this order `number` | String! | The order number `order_date` | String! | The date the order was placed `order_number` | String! | Deprecated. Use the `number` attribute instead -`payment_methods` | [[PaymentMethod](#PaymentMethod)] | Payment details for the order +`payment_methods` | [[PaymentMethod]](#PaymentMethod) | Payment details for the order `printed_card_included` | Boolean! | Indicates if the customer requested a printed card for the order -`shipments` | [[OrderShipment](#OrderShipment)] | Shipment list for the order +`shipments` | [[OrderShipment]](#OrderShipment) | Shipment list for the order `shipping_address` | [OrderAddress](#OrderAddress) | Shipping address for the order `shipping_method` | String | Shipping method for the order `status` | String! | The current status of the order @@ -73,9 +73,9 @@ The `CreditMemo` object contains details about credit memos applied to an order. Attribute | Data type | Description --- | --- | --- -`comments` | [[SalesCommentItem](#SalesCommentItem)] | Comments on the credit memo +`comments` | [[SalesCommentItem]](#SalesCommentItem) | Comments on the credit memo `id` | ID! | The unique ID of the credit memo -`items` | [[CreditMemoItemInterface](#CreditMemoItemInterface)] | An array containing details about refunded items +`items` | [[CreditMemoItemInterface]](#CreditMemoItemInterface) | An array containing details about refunded items `number` | String! | The sequential credit memo number `total` | [CreditMemoTotal](#CreditMemoTotal) | Contains details about the total refunded amount @@ -95,11 +95,11 @@ Attribute | Data type | Description --- | --- | --- `adjustment` | Money! | An adjustment manually applied to the order `base_grand_total` | Money! | The final base grand total amount in the base currency -`discounts` | [Discount] | The applied discounts to the order +`discounts` | [[Discount]](#Discount) | The applied discounts to the order `grand_total` | Money! | The final total amount, including shipping, discounts, and taxes `shipping_handling` | [ShippingHandling](#ShippingHandling) | Contains details about the shipping and handling costs for the credit memo `subtotal` | Money! | The subtotal of the order, excluding shipping, discounts, and taxes -`taxes` | [[TaxItem](#TaxItem)]! | An array containing information about taxes on individual orders +`taxes` | [[TaxItem]](#TaxItem)! | An array containing information about taxes on individual orders `total_shipping` | Money! | The shipping amount for the credit memo `total_tax` | Money! | The amount of tax applied to all orders @@ -126,9 +126,9 @@ The `Invoice` object provides details about a customer invoice. Attribute | Data type | Description --- | --- | --- -`comments` | [[SalesCommentItem](#SalesCommentItem)] | Comments on the invoice +`comments` | [[SalesCommentItem]](#SalesCommentItem) | Comments on the invoice `id` | ID! | The internal ID of the invoice -`items` | [[InvoiceItemInterface](#InvoiceItemInterface)]! | Contains details about invoiced products +`items` | [[InvoiceItemInterface]](#InvoiceItemInterface)! | Contains details about invoiced products `number` | String! | The sequential number of the invoice `total` | [InvoiceTotal](#InvoiceTotal)! | Invoice total amount details @@ -149,11 +149,11 @@ The InvoiceTotal object contains details about the totals of an invoice. Attribute | Data type | Description --- | --- | --- `base_grand_total` | Money! | The final base grand total amount in the base currency -`discounts` | [Discount] | The applied discounts to the invoice +`discounts` | [[Discount]](#Discount) | The applied discounts to the invoice `grand_total` | Money! | The final total amount, including shipping, discounts, and taxes `shipping_handling` | [ShippingHandling](#ShippingHandling) | Contains details about the shipping and handling costs for the invoice `subtotal` | Money! | The subtotal of the invoice, excluding shipping, discounts, and taxes -`taxes` | [[TaxItem](#TaxItem)] | An array containing information about taxes on individual invoices +`taxes` | [[TaxItem]](#TaxItem) | An array containing information about taxes on individual invoices `total_shipping` | Money! | The shipping amount for the invoice `total_tax` | Money! | The amount of tax applied to all invoices @@ -227,11 +227,11 @@ Attribute | Data type | Description Attribute | Data type | Description --- | --- | --- -`comments` | [[SalesCommentItem](#SalesCommentItem)] | Comments added to the shipment +`comments` | [[SalesCommentItem]](#SalesCommentItem) | Comments added to the shipment `id` | ID! | The unique ID of the shipment -`items` | [[ShipmentItemInterface](#ShipmentItemInterface)] | Contains items included in the shipment +`items` | [[ShipmentItemInterface]](#ShipmentItemInterface) | Contains items included in the shipment `number` | String! | The sequential credit shipment number -`tracking` | [[ShipmentTracking](#ShipmentTracking)] | Contains shipment tracking detail +`tracking` | [[ShipmentTracking]](#ShipmentTracking) | Contains shipment tracking detail #### OrderTotal attributes {#OrderTotal} @@ -240,11 +240,11 @@ The `OrderTotal` object contains details about the sales total amounts used to c Attribute | Data type | Description --- | --- | --- `base_grand_total` | Money! | The final base grand total amount in the base currency -`discounts` | [Discount] | The applied discounts to the order +`discounts` | [[Discount]](#Discount) | The applied discounts to the order `grand_total` | Money! | The final total amount, including shipping, discounts, and taxes `shipping_handling` | [ShippingHandling](#ShippingHandling) | The shipping and handling costs for the order `subtotal` | Money! | The subtotal of the order, excluding shipping, discounts, and taxes -`taxes` | [[TaxItem](#TaxItem)]! | An array containing information about taxes on individual orders +`taxes` | [[TaxItem]](#TaxItem)! | An array containing information about taxes on individual orders `total_shipping` | Money! | The shipping costs for the order `total_tax` | Money! | The amount of tax applied to the order @@ -254,7 +254,7 @@ The PaymentMethod data type contains details about the payment method used to pa Attribute | Data type | Description --- | --- | --- -`additional_data` | [[KeyValue](#KeyValue)] | Additional data per payment method type +`additional_data` | [[KeyValue]](#KeyValue) | Additional data per payment method type `name` | String! | The label that describes the payment method `type` | String! | The payment method code that indicates how the order was paid for @@ -378,8 +378,8 @@ Attribute | Data type | Description --- | --- | --- `amount_excluding_tax` | Money | The shipping amount, excluding tax `amount_including_tax` | Money | The shipping amount, including tax -`discounts` | [ShippingDiscount] | The applied discounts to the shipping -`taxes` | [[TaxItem](#TaxItem)] | Contains details about taxes applied for shipping +`discounts` | [[ShippingDiscount]](#ShippingDiscount) | The applied discounts to the shipping +`taxes` | [[TaxItem]](#TaxItem) | Contains details about taxes applied for shipping `total_amount`| Money! | The total amount for shipping #### TaxItem attributes {#TaxItem} diff --git a/src/_includes/graphql/customer-output-24.md b/src/_includes/graphql/customer-output-24.md index cfa9c27d7f1..e926f274357 100644 --- a/src/_includes/graphql/customer-output-24.md +++ b/src/_includes/graphql/customer-output-24.md @@ -2,10 +2,16 @@ {% assign customeraddress_text = '[CustomerAddress](#customerAddressOutput)' %} {% assign customeroutput_text = '[CustomerOrders](#customerOrders)' %} {% assign crossref_text = '. See [`orders` input attributes](#orders) for details' %} +{% assign productreview_text = '[ProductReviews](#ProductReviews)!' %} +{% assign rewardpoints_text = '[RewardPoints](#RewardPoints)' %} +{% assign wishlist_text = '[Wishlist](#Wishlist)!' %} {% else %} {% assign customeraddress_text = 'CustomerAddress' %} {% assign customeroutput_text = '[CustomerOrders]' %} {% assign crossref_text = '' %} +{% assign productreview_text = '[ProductReviews]!' %} +{% assign rewardpoints_text = '[RewardPoints]' %} +{% assign wishlist_text = '[Wishlist]!' %} {% endif %} Attribute | Data Type | Description @@ -27,11 +33,11 @@ Attribute | Data Type | Description `middlename` |String | The customer's middle name `orders()` | {{ customeroutput_text }} | A list of the customer's placed orders{{ crossref_text }} `prefix` | String | An honorific, such as Dr., Mr., or Mrs. -`reviews(pageSize: Int = 20 currentPage: Int = 1)` | ProductReviews! | The list of reviews of the product -`reward_points` | RewardPoints | Details about the customer's reward points +`reviews(pageSize: Int = 20 currentPage: Int = 1)` | {{ productreview_text }} | The list of reviews of the product +`reward_points` | {{ rewardpoints_text }} | Details about the customer's reward points `suffix` | String | A value such as Sr., Jr., or III `taxvat` | String | The customer's Tax/VAT number (for corporate customers) -`wishlist` | Wishlist! | Contains the contents of the customer's wish lists +`wishlist` | {{ wishlist_text }} | Contains the contents of the customer's wish lists For B2B, company users can have the following attributes. diff --git a/src/_includes/graphql/invoice-item-interface.md b/src/_includes/graphql/invoice-item-interface.md index 48799c6a6b5..fca641cba07 100644 --- a/src/_includes/graphql/invoice-item-interface.md +++ b/src/_includes/graphql/invoice-item-interface.md @@ -2,7 +2,7 @@ Attribute | Data type | Description --- | --- | --- `discounts` | [Discount] | Contains information about the final discount amount for the base product, including discounts on options `id` | ID! | The unique ID of the invoice item -`order_item` | OrderItemInterface | Contains details about an individual order item +`order_item` | [OrderItemInterface]({{page.baseurl}}/graphql/interfaces/order-item-interface.html) | Contains details about an individual order item `product_name` | String | The name of the base product `product_sale_price` | Money! | The sale price for the base product including selected options `product_sku` | String! | The SKU of the base product diff --git a/src/_includes/graphql/order-item-interface.md b/src/_includes/graphql/order-item-interface.md index 2df31613a76..738680bc075 100644 --- a/src/_includes/graphql/order-item-interface.md +++ b/src/_includes/graphql/order-item-interface.md @@ -1,7 +1,7 @@ Attribute | Data Type | Description --- | --- | --- `discounts` | [Discount] | Final discount information for the product -`entered_options` | [OrderItemOption] | The entered option for the base product, such as a logo or image +`entered_options` | [`[OrderItemOption]`](#OrderItemOption) | The entered option for the base product, such as a logo or image `id` | ID! | The unique identifier for the order item `product_name` | String | The name of the base product `product_sale_price` | Money! | The sale price of the base product, including selected options @@ -14,5 +14,12 @@ Attribute | Data Type | Description `quantity_refunded` | Float | The number of refunded items `quantity_returned` | Float | The number of returned items `quantity_shipped` | Float | The number of shipped items -`selected_options` | [OrderItemOption] | The selected options for the base product, such as color or size -`status` | String | The status of the order item \ No newline at end of file +`selected_options` | [`[OrderItemOption]`](#OrderItemOption) | The selected options for the base product, such as color or size +`status` | String | The status of the order item + +#### OrderItemOption attributes {#OrderItemOption} + +Attribute | Data type | Description +--- | --- | --- +`label` | String! | The name of the option +`value` | String! | The value of the option \ No newline at end of file diff --git a/src/_includes/graphql/product-review.md b/src/_includes/graphql/product-review.md index 5123474cd05..b4c28c30587 100644 --- a/src/_includes/graphql/product-review.md +++ b/src/_includes/graphql/product-review.md @@ -5,8 +5,8 @@ Attribute | Data Type | Description `average_rating` | Float! | The average rating for product review `created_at` | String! | Date indicating when the review was created `nickname` | String! | The customer's nickname. Defaults to the customer name, if logged in -`product` | ProductInterface! | Contains details about the reviewed product -`ratings_breakdown` | [ProductReviewRating!]! | An array of ratings by rating category, such as quality, price, and value +`product` | [ProductInterface!]({{ page.baseurl }}/graphql/interfaces/product-interface.html)| Contains details about the reviewed product +`ratings_breakdown` | [[ProductReviewRating!]](#ProductReviewRating)! | An array of ratings by rating category, such as quality, price, and value `summary` | String! | The summary (title) of the review `text` | String! | The review text diff --git a/src/cloud/cdn/cloud-vcl-custom-snippets.md b/src/cloud/cdn/cloud-vcl-custom-snippets.md index 975f99ea4fc..fad26c8ba07 100644 --- a/src/cloud/cdn/cloud-vcl-custom-snippets.md +++ b/src/cloud/cdn/cloud-vcl-custom-snippets.md @@ -45,6 +45,9 @@ You can create and manage custom VCL snippets from the Magento Admin UI or by us - [Magento Admin UI](#manage-custom-vcl-snippets-from-the-magento-admin-ui)—We recommend using the Magento Admin UI to manage custom VCL snippets because it automates the process to validate and upload the custom snippet and apply your changes to the Fastly service configuration. Additionally, you can view and edit the custom VCL snippets added to the Fastly service configuration from the Admin UI. +{:.bs-callout-info} +You must use the Fastly API to [delete custom VCL snippets](https://devdocs.magento.com/cloud/cdn/cloud-vcl-custom-snippets.html#manage-vcl), or you can delete the contents of the snippet in the Magento Admin UI and upload an empty snippet. See [Delete a custom snippet](https://devdocs.magento.com/cloud/cdn/fastly-vcl-badreferer.html#delete-the-custom-vcl-snippet). + - [Fastly API](#manage-custom-vcl-snippets-using-the-api)—Manage custom VCL snippets using the API if you cannot access the Magento Admin UI. For example, if the site is down and you need to troubleshoot the Fastly service configuration or add a custom VCL snippet. Additionally, some operations can only be completed using the API, for example reactivating an older VCL version or viewing all the VCL snippets included in a specified the VCL version. See [API quick reference for VCL snippets](#manage-vcl). ### Example VCL snippet code {#vcl-curl} diff --git a/src/cloud/cdn/fastly-vcl-badreferer.md b/src/cloud/cdn/fastly-vcl-badreferer.md index b79157d706f..93129c36c62 100644 --- a/src/cloud/cdn/fastly-vcl-badreferer.md +++ b/src/cloud/cdn/fastly-vcl-badreferer.md @@ -73,7 +73,7 @@ Before creating a snippet based on this example, review the values to determine - `name` — Name for the VCL snippet. For this example, we used `block_bad_referrer`. -- `dynamic` — Value 0 indicates a [regular snippet](https://docs.fastly.com/guides/vcl-snippets/using-regular-vcl-snippets) to upload to the versioned VCL for the Fastly configuration. +- `dynamic` — Value 0 indicates a [regular snippet](https://docs.fastly.com/en/guides/using-regular-vcl-snippets) to upload to the versioned VCL for the Fastly configuration. - `priority` — Determines when the VCL snippet runs. The priority is `5` to run this snippet code before any of the default Magento VCL snippets (`magentomodule_*`) assigned a priority of 50. You must set the priority for each custom snippet higher or lower than 50 depending on when you want your snippet to run. Snippets with lower priority numbers run first. diff --git a/src/cloud/project/user-admin.md b/src/cloud/project/user-admin.md index c7ca922e432..fd22365f459 100644 --- a/src/cloud/project/user-admin.md +++ b/src/cloud/project/user-admin.md @@ -27,7 +27,7 @@ You can manage access to {{site.data.var.ece}} projects by adding users and assi ## Add user authentication requirements -For added security, Magento provides project-level MFA enforcement to require two-factor authentication for SSH access to {{ site.data.var.ece }} project source code and environments. See [MFA enforcement for SSH]. +For added security, Magento provides project-level MFA enforcement to require two-factor authentication for SSH access to {{ site.data.var.ece }} project source code and environments. See [Enable MFA for SSH]. When MFA enforcement is enabled on a {{site.data.var.ece}} project, all users with SSH access to an environment in that project must enable two-factor authentication (TFA) on their {{site.data.var.ece}} account. For automated processes, users must create an API token that machine users can use to authenticate from the command line. See [Enable user accounts for TFA and SSH access](#update-account-security-settings). @@ -44,7 +44,7 @@ To add a user to a project or environment, you need the email address associated ### Manage users with the CLI {#cloud-user-mg-cli} -You can use the {{site.data.var.ece}} command line client to manage users and integrate this with any other automated system. +Use the {{site.data.var.ece}} command line client to manage users and integrate this with any other automated system. Available commands: @@ -175,7 +175,7 @@ After you add a user to a Cloud project, ask the user to review their account se - Enable two-factor authentication (TFA) - Magento recommends adding two-factor authentication to all accounts to meet security and compliance standards. Projects configured with [MFA enforcement][] require two-factor authentication for all accounts that require SSH access to {{site.data.var.ece}} projects. + Magento recommends adding two-factor authentication to all accounts to meet security and compliance standards. Projects configured with [MFA enforcement][Enable MFA for SSH] require two-factor authentication on accounts that use SSH to access the projects. - Enable SSH keys @@ -183,9 +183,9 @@ After you add a user to a Cloud project, ask the user to review their account se - Create an API token - You can generate an API token on your account that can be used for secure SSH access to an environment. You need the token to enable authentication workflows for automated processes. + Users can generate an API token that can be used for secure SSH access to an environment. You need the token to enable authentication workflows for automated processes. - On projects with MFA enforcement enabled, you must use the API token to authenticate SSH access requests from automated accounts to bypass authentication workflows which require two-factor authentication. + On projects with MFA enforcement enabled, you must use the API token to authenticate SSH access requests from automated accounts. The token allows automated processes to bypass authentication workflows which require two-factor authentication. ### Enable TFA for Cloud accounts @@ -319,5 +319,5 @@ To create an API token: [FreeOTP (Android)]: https://play.google.com/store/apps/details?id=org.fedorahosted.freeotp [GAuth Authenticator (Firefox OS, desktop, others)]: https://github.com/gbraad/gauth [Google Authenticator (Android/iPhone/BlackBerry)]: https://support.google.com/accounts/answer/1066447?hl=en -[MFA enforcement]: {{ site.baseurl }}/cloud/project/project-enable-mfa-enforcement.html +[Enable MFA for SSH]: {{ site.baseurl }}/cloud/project/project-enable-mfa-enforcement.html [snapshots]: {{ site.baseurl }}/cloud/project/project-webint-snap.html diff --git a/src/guides/v2.3/coding-standards/docblock-standard-general.md b/src/guides/v2.3/coding-standards/docblock-standard-general.md index 034d6b2fca2..502df040e2e 100644 --- a/src/guides/v2.3/coding-standards/docblock-standard-general.md +++ b/src/guides/v2.3/coding-standards/docblock-standard-general.md @@ -20,7 +20,7 @@ The goal of this standard is to unify usage of code DocBlocks for all files, not The following is assumed by default: -* Formatting according to the [phpDocumentor](https://docs.phpdoc.org/latest/references/phpdoc/basic-syntax.html#what-is-a-docblock){:target="_blank"} standard +* Formatting according to the [phpDocumentor](https://docs.phpdoc.org/latest/guide/references/phpdoc/basic-syntax.html#basic-syntax) standard * Requirements apply for all files regardless of programming language, but a DocBlock standard for the particular language may override it. ## General principles diff --git a/src/guides/v2.3/config-guide/cli/config-cli-subcommands-catalog-sync.md b/src/guides/v2.3/config-guide/cli/config-cli-subcommands-catalog-sync.md index 2db9de54537..db2dd80f8bf 100644 --- a/src/guides/v2.3/config-guide/cli/config-cli-subcommands-catalog-sync.md +++ b/src/guides/v2.3/config-guide/cli/config-cli-subcommands-catalog-sync.md @@ -7,6 +7,9 @@ Magento compiles catalog data into tables using indexers. This process is automa The commands used to sync catalog data are part of the `magento/saas-export` package. See [Install and configure Product Recommendations]({{ site.baseurl }}/recommendations/install-configure.html) for more information. +{:.bs-callout-info} +See the [user guide](https://docs.magento.com/user-guide/system/catalog-sync.html) to learn how to use the Catalog Sync dashboard in the Admin UI to observe and manage the Magento to SaaS syncing process. + {:.bs-callout-info} When you trigger a data resync from the command line, it can take up to an hour for the data to update. diff --git a/src/guides/v2.3/config-guide/secy/secy-xframe.md b/src/guides/v2.3/config-guide/secy/secy-xframe.md index f405b1d7618..fd657fb1dbb 100644 --- a/src/guides/v2.3/config-guide/secy/secy-xframe.md +++ b/src/guides/v2.3/config-guide/secy/secy-xframe.md @@ -31,12 +31,6 @@ Set a value for `X-Frame-Options` in `/app/etc/env.php`. Following 'x-frame-options' => 'SAMEORIGIN', ``` -If you want to allow any website to load page, you can use `*`: - -```php -'x-frame-options' => '*', -``` - We require you to edit `env.php` because it's more secure than setting a value in the [Magento Admin](https://glossary.magento.com/magento-admin). ## Verify your setting for `X-Frame-Options` @@ -57,4 +51,3 @@ Look for the `X-Frame-Options` value in the headers. * [mozilla.org](https://developer.mozilla.org/en-US/docs/HTTP/X-Frame-Options) * [security.stackexchange.com](http://security.stackexchange.com/questions/67889/why-do-browsers-enforce-the-same-origin-security-policy-on-iframes) -* [MSDN blog](http://blogs.msdn.com/b/ieinternals/archive/2010/03/30/combating-clickjacking-with-x-frame-options.aspx) diff --git a/src/guides/v2.3/config-guide/varnish/config-varnish-advanced.md b/src/guides/v2.3/config-guide/varnish/config-varnish-advanced.md index 40118dea672..cbf8b36b33d 100644 --- a/src/guides/v2.3/config-guide/varnish/config-varnish-advanced.md +++ b/src/guides/v2.3/config-guide/varnish/config-varnish-advanced.md @@ -9,7 +9,7 @@ functional_areas: Varnish provides several features that prevent customers from experiencing long delays and timeouts when the Magento server is not functioning properly. These features can be configured in the `default.vcl` file. This topic describes the additions that Magento provides in the VCL (Varnish Configuration Language) file you download from [Magento Admin](https://glossary.magento.com/magento-admin). -See the [Varnish Reference Manual](https://www.varnish-cache.org/docs/4.1/reference/index.html) for details about using the Varnish Configuration Language. +See the [Varnish Reference Manual](https://varnish-cache.org/docs/6.5/reference/index.html) for details about using the Varnish Configuration Language. ## Health check {#health} @@ -31,7 +31,7 @@ Every 5 seconds, this health check calls the `pub/health_check.php` script. This The `health_check.php` script is located in the `pub` directory. If your Magento root directory is `pub`, then be sure to change the path in the `url` parameter from `/pub/health_check.php` to `health_check.php`. -For more information, see the [Varnish health checks](https://varnish-cache.org/docs/4.1/users-guide/vcl-backends.html?highlight=health%20check#health-checks) documentation. +For more information, see the [Varnish health checks](https://varnish-cache.org/docs/6.5/users-guide/vcl-backends.html#health-checks) documentation. ## Grace mode {#grace} @@ -82,8 +82,7 @@ bin/magento cache:flush Saint mode is not part of the main Varnish package. It is a separately-versioned vmod that must be downloaded and installed. As a result, you should re-compile Varnish from source, as described in the following articles: -* [Installing Varnish 5.1](https://varnish-cache.org/docs/5.1/installation/index.html) -* [Installing Varnish 4.1](https://varnish-cache.org/docs/4.1/installation/install.html) (Stable) +* [Installing Varnish 6.5](https://varnish-cache.org/docs/6.5/installation/index.html) After you've recompiled, you can install the Saint mode [module](https://glossary.magento.com/module). In general, follow these steps: diff --git a/src/guides/v2.3/config-guide/varnish/config-varnish-install.md b/src/guides/v2.3/config-guide/varnish/config-varnish-install.md index d7ebcab4ab2..ec9cb84bc26 100644 --- a/src/guides/v2.3/config-guide/varnish/config-varnish-install.md +++ b/src/guides/v2.3/config-guide/varnish/config-varnish-install.md @@ -11,7 +11,7 @@ functional_areas: Installing the Varnish software is beyond the scope of this guide. For more information about installing Varnish, see: -* [installation wiki](http://wiki.mikejung.biz/Varnish) +* [Installation wiki](https://www.varnish-software.com/wiki/start/index.html) * [Varnish installation guides](https://www.varnish-cache.org/docs) * [How to install Varnish (Tecmint)](http://www.tecmint.com/install-varnish-cache-web-accelerator) diff --git a/src/guides/v2.3/extension-dev-guide/cli-cmds/cli-howto.md b/src/guides/v2.3/extension-dev-guide/cli-cmds/cli-howto.md index 9bbd9cc373f..76e93bc4613 100644 --- a/src/guides/v2.3/extension-dev-guide/cli-cmds/cli-howto.md +++ b/src/guides/v2.3/extension-dev-guide/cli-cmds/cli-howto.md @@ -126,7 +126,7 @@ Following is a summary of the process: ``` {:.bs-callout-info} - Style the output text by using ``, ``, or `` tags. See [Symfony](https://symfony.com/doc/master/console/coloring.html){:target="_blank"} documentation for more information about styling. + Style the output text by using ``, ``, or `` tags. See [Symfony](https://symfony.com/doc/current/console/coloring.html){:target="_blank"} documentation for more information about styling. 1. Declare your Command class in `Magento\Framework\Console\CommandListInterface` and configure the command name using dependency injection (`/etc/di.xml`): diff --git a/src/guides/v2.3/extension-dev-guide/framework/serializer.md b/src/guides/v2.3/extension-dev-guide/framework/serializer.md index b11ecf55de5..93cd922c8fa 100644 --- a/src/guides/v2.3/extension-dev-guide/framework/serializer.md +++ b/src/guides/v2.3/extension-dev-guide/framework/serializer.md @@ -26,12 +26,22 @@ For security reasons, `SerializerInterface` implementations, such as the Json an ### Json (default) The [`Magento\Framework\Serialize\Serializer\Json`]({{ site.mage2bloburl }}/{{ page.guide_version }}/lib/internal/Magento/Framework/Serialize/Serializer/Json.php){:target="_blank"} class serializes and unserializes data using the [JSON](http://www.json.org/){:target="_blank"} format. -This class does not unserialize objects. + +### JsonHexTag + +The [`Magento\Framework\Serialize\Serializer\JsonHexTag`]({{ site.mage2bloburl }}/{{ page.guide_version }}/lib/internal/Magento/Framework/Serialize/Serializer/JsonHexTag.php){:target="_blank"} class serializes and unserializes data using the [JSON](http://www.json.org/){:target="_blank"} format using the `JSON_HEX_TAG` option enabled. + +### Base64Json + +The [`Magento\Framework\Serialize\Serializer\Base64Json`]({{ site.mage2bloburl }}/{{ page.guide_version }}/lib/internal/Magento/Framework/Serialize/Serializer/Base64Json.php){:target="_blank"} class serializes and encodes in the base64 format, and decodes the base64 encoded string and unserializes data using the [JSON](http://www.json.org/){:target="_blank"} format. ### Serialize The [`Magento\Framework\Serialize\Serializer\Serialize`]({{ site.mage2bloburl }}/{{ page.guide_version }}/lib/internal/Magento/Framework/Serialize/Serializer/Serialize.php){:target="_blank"} class is less secure than the Json implementation but provides better performance on large arrays. -This class does not unserialize objects in [PHP](https://glossary.magento.com/php) 7. + +### FormData + +The [`Magento\Framework\Serialize\Serializer\FormData`]({{ site.mage2bloburl }}/{{ page.guide_version }}/lib/internal/Magento/Framework/Serialize/Serializer/FormData.php){:target="_blank"} class unserializes the form data using the [JSON](http://www.json.org/){:target="_blank"} format. This class does not serialize objects to a form data format. {:.bs-callout-warning} Magento discourages using the Serialize implementation directly because it can lead to security vulnerabilities. Always use the `SerializerInterface` for serializing and unserializing. @@ -129,4 +139,4 @@ Here is an example: } ... -``` \ No newline at end of file +``` diff --git a/src/guides/v2.3/extension-dev-guide/framework/url-library.md b/src/guides/v2.3/extension-dev-guide/framework/url-library.md new file mode 100644 index 00000000000..5717e0059e7 --- /dev/null +++ b/src/guides/v2.3/extension-dev-guide/framework/url-library.md @@ -0,0 +1,89 @@ +--- +group: php-developer-guide +title: URL Library +contributor_name: Adarsh Manickam +contributor_link: https://github.com/drpayyne +--- + +## Overview + +This URL library provides numerous utilities to work with URLs. Some of the most useful URL utilities are described below. + +## URL Utilities + +### Encoder + +The [`Magento\Framework\Url\EncoderInterface`]({{ site.mage2bloburl }}/{{ page.guide_version }}/lib/internal/Magento/Framework/Url/EncoderInterface.php){:target="_blank"} provides a method to `encode` the URL provided to it into a base64 format and also escapes the special charaters described in the table below. + +|Special Character|Encoded Value| +|--- |--- | +| `+` | `-` | +| `/` | `_` | +| `=` | `,` | + +### Decoder + +The [`Magento\Framework\Url\DecoderInterface`]({{ site.mage2bloburl }}/{{ page.guide_version }}/lib/internal/Magento/Framework/Url/DecoderInterface.php){:target="_blank"} provides a method to `decode` the base64 encoded URL provided to it and also decodes the special characters described in the table below. + +|Special Character|Decoded Value| +|--- |--- | +| `-` | `+` | +| `_` | `/` | +| `,` | `=` | + +## Usage + +Declare `SerializerInterface` as a [constructor dependency]({{ page.baseurl }}/extension-dev-guide/depend-inj.html) to get an instance of a serializer class. + +```php +use Magento\Framework\Url\DecoderInterface; +use Magento\Framework\Url\EncoderInterface; + +/** + * @var EncoderInterface + */ +private $encoder; + +/** + * @var DecoderInterface + */ +private $decoder; + +/** + * QuickCartTaxInput constructor. + * + * @param EncoderInterface $encoder + * @param DecoderInterface $decoder + */ +public function __construct( + EncoderInterface $encoder, + DecoderInterface $decoder +) { + $this->encoder = $encoder; + $this->decoder = $decoder; +} + +/** + * Encodes URL to base64 format and escapes special characters. + * + * @param string $url + * + * @return string + */ +public function encodeURL($url): string +{ + return $this->encoder->encode($url); +} + +/** + * Decodes URL from base64 format and special characters. + * + * @param string $encodedUrl + * + * @return string + */ +public function decodeURL($encodedUrl): string +{ + return $this->decoder->decode($encodedUrl); +} +``` diff --git a/src/guides/v2.3/extension-dev-guide/view-models.md b/src/guides/v2.3/extension-dev-guide/view-models.md index 48f5ef03612..eb4495fed8a 100644 --- a/src/guides/v2.3/extension-dev-guide/view-models.md +++ b/src/guides/v2.3/extension-dev-guide/view-models.md @@ -24,7 +24,7 @@ View models can be used by passing the view model class as an argument to a temp ```xml - OrangeCompany\Catalog\ViewModel\MyNewViewModel + OrangeCompany\Catalog\ViewModel\MyNewViewModel ``` @@ -34,7 +34,7 @@ In the following example, the same view model is used with an existing block in ```xml - OrangeCompany\Catalog\ViewModel\MyNewViewModel + OrangeCompany\Catalog\ViewModel\MyNewViewModel ``` @@ -78,7 +78,7 @@ The view model class is passed as an argument to the `product.info.upsell` block upsell - Magento\Catalog\ViewModel\Product\Listing\PreparePostData + Magento\Catalog\ViewModel\Product\Listing\PreparePostData ``` diff --git a/src/guides/v2.3/graphql/mutations/add-bundle-products.md b/src/guides/v2.3/graphql/mutations/add-bundle-products.md index 1ffc7265f82..7fd846ff375 100644 --- a/src/guides/v2.3/graphql/mutations/add-bundle-products.md +++ b/src/guides/v2.3/graphql/mutations/add-bundle-products.md @@ -247,8 +247,8 @@ Attribute | Data Type | Description Error | Description --- | --- +`Could not find a cart with ID "XXX"` | The specified `cart_id` value does not exist in the `quote_id_mask` table. `Could not find a product with SKU "XXX"` | A simple product with the SKU specified in the `data.sku` argument does not exist. -`Could not find a cart with ID "XXX"` | The specified `cart_id` value does not exist in the `quote_id_mask` database table. `Required parameter "cart_id" is missing` | The `cart_id` argument is omitted or contains an empty value. ## Related topics diff --git a/src/guides/v2.3/graphql/mutations/add-configurable-products.md b/src/guides/v2.3/graphql/mutations/add-configurable-products.md index 326c09561b3..056bd8f1406 100644 --- a/src/guides/v2.3/graphql/mutations/add-configurable-products.md +++ b/src/guides/v2.3/graphql/mutations/add-configurable-products.md @@ -144,10 +144,12 @@ Attribute | Data Type | Description Error | Description --- | --- +`Could not find a cart with ID "XXX"` | The specified `cart_id` value does not exist in the `quote_id_mask` table. `Could not add the product with SKU configurable to the shopping cart: The product that was requested doesn't exist. Verify the product and try again.` | The simple product with the SKU specified in the `data`.`sku` attribute does not exist. `Could not find a product with SKU "XXX"` | The configurable product with SKU specified in the `parent_sku` argument does not exist. `Could not find specified product.` | The simple product specified in the `data`.`sku` argument is not assigned to the configurable product provided in the `parent_sku` attribute. `Required parameter "cart_id" is missing` | The `cart_id` argument was omitted or contains an empty value. +`Required parameter "cart_items" is missing` | The `cart_items` argument was omitted or contains an empty array. `Required parameter "email" is missing` | The `email` argument was omitted or contains an empty value. `The requested qty is not available` | The requested quantity specified `data`.`quantity` is not available. diff --git a/src/guides/v2.3/graphql/mutations/add-downloadable-products.md b/src/guides/v2.3/graphql/mutations/add-downloadable-products.md index e230661c91f..7247b746826 100644 --- a/src/guides/v2.3/graphql/mutations/add-downloadable-products.md +++ b/src/guides/v2.3/graphql/mutations/add-downloadable-products.md @@ -258,6 +258,8 @@ Attribute | Data Type | Description Error | Description --- | --- +`Could not find a cart with ID "XXX"` | The specified `cart_id` value does not exist in the `quote_id_mask` table. +`Could not find a product with SKU "YYY"` | A product with the SKU specified in the `data`.`sku` argument does not exist. `Required parameter "cart_id" is missing` | The mutation does not contain a `cart_id` argument. `Required parameter "cart_items" is missing` | The `cart_items` argument is empty or is not of type `array`. `Please specify product link(s).` | You tried to add a downloadable product in which the `Links can be purchased separately` option is enabled, but you did not specify individual product links. diff --git a/src/guides/v2.3/graphql/payment-methods/braintree-vault.md b/src/guides/v2.3/graphql/payment-methods/braintree-vault.md index fa5aa37af3e..b696bedcd02 100644 --- a/src/guides/v2.3/graphql/payment-methods/braintree-vault.md +++ b/src/guides/v2.3/graphql/payment-methods/braintree-vault.md @@ -20,7 +20,7 @@ The following diagram shows the workflow for placing an order when Braintree Vau 1. The client renders the token information, and the customer selects a payment method. - When the customer selects a stored payment method, the PWA uses the [`setPaymentMethodOnCart`]({{page.baseurl}}/graphql/mutations/set-payment-method.html) mutation to set the payment method to `braintree_cc_vault`. The vaulted public hash is passed with other optional properties in the [`braintree_cc_vault`](#braintree_cc_vault-object). + When the customer selects a stored payment method, the PWA uses the [`setPaymentMethodOnCart`]({{page.baseurl}}/graphql/mutations/set-payment-method.html) mutation to set the payment method to [`braintree_cc_vault`](#braintree_cc_vault-object). The vaulted public hash is passed with other optional properties in the `braintree_cc_vault`. 1. Magento returns a `Cart` object. @@ -35,7 +35,7 @@ The following diagram shows the workflow for placing an order when Braintree Vau ## `setPaymentMethodOnCart` mutation When you set the payment method to Braintree in the [`setPaymentMethodOnCart`]({{page.baseurl}}/graphql/mutations/set-payment-method.html) -mutation, the `payment_method` object must contain a `braintree_cc_vault` object. +mutation, the `payment_method` object must contain a [`braintree_cc_vault`](#braintree_cc_vault-object) object. ### braintree_cc_vault object @@ -54,18 +54,20 @@ The following example shows the `setPaymentMethodOnCart` mutation constructed fo ```graphql mutation { - setPaymentMethodOnCart(input: { - cart_id: "IeTUiU0oCXjm0uRqGCOuhQ2AuQatogjG" - payment_method: { - code: "braintree_cc_vault" - braintree_cc_vault: { - public_hash: "fake-public-hash" + setPaymentMethodOnCart( + input: { + cart_id: "IeTUiU0oCXjm0uRqGCOuhQ2AuQatogjG" + payment_method: { + code: "braintree_cc_vault" + braintree_cc_vault: { public_hash: "fake-public-hash" } } } - }) { - cart { - selected_payment_method { - code + ) { + cart { + selected_payment_method { + code + title + } } } } @@ -80,6 +82,7 @@ mutation { "cart": { "selected_payment_method": { "code": "braintree_cc_vault" + "title": "Stored Cards" } } } diff --git a/src/guides/v2.3/graphql/payment-methods/payflow-pro.md b/src/guides/v2.3/graphql/payment-methods/payflow-pro.md index 0a813053839..95b555c7d20 100644 --- a/src/guides/v2.3/graphql/payment-methods/payflow-pro.md +++ b/src/guides/v2.3/graphql/payment-methods/payflow-pro.md @@ -33,25 +33,28 @@ The following example shows the `setPaymentMethodOnCart` mutation constructed fo ```graphql mutation { - setPaymentMethodOnCart(input: { - cart_id: "IeTUiU0oCXjm0uRqGCOuhQ2AuQatogjG" - payment_method: { - code: "payflowpro" - payflowpro: { + setPaymentMethodOnCart( + input: { + cart_id: "IeTUiU0oCXjm0uRqGCOuhQ2AuQatogjG" + payment_method: { + code: "payflowpro" + payflowpro: { cc_details: { - cc_exp_month: 12 - cc_exp_year: 2021 - cc_last_4: 1111 - cc_type: "VI" + cc_exp_month: 12 + cc_exp_year: 2021 + cc_last_4: 1111 + cc_type: "VI" + } } } } - }) - { + ) { cart { selected_payment_method { code + title } + } } } ``` @@ -65,6 +68,7 @@ mutation { "cart": { "selected_payment_method": { "code": "payflowpro" + "title": "Payflow Pro" } } } diff --git a/src/guides/v2.3/graphql/queries/cart.md b/src/guides/v2.3/graphql/queries/cart.md index 8e74144d186..4d5ecf98e9e 100644 --- a/src/guides/v2.3/graphql/queries/cart.md +++ b/src/guides/v2.3/graphql/queries/cart.md @@ -696,7 +696,7 @@ The `CartItemPrices` object can contain the following attributes. Attribute | Data Type | Description --- | --- | --- -`discounts`| [Discount] | An array of discounts to be applied to the cart item +`discounts`| [[Discount]](#Discount) | An array of discounts to be applied to the cart item `price` | Money! | The price of the item before any discounts were applied `row_total` | Money! | The value of the `price` multiplied by the quantity of the item `row_total_including_tax` | Money! | The value of `row_total` plus the tax applied to the item @@ -718,8 +718,8 @@ The `CartPrices` object can contain the following attributes. Attribute | Data Type | Description --- | --- | --- `applied_taxes` | [[CartTaxItem]](#CartTaxItem) | An array containing the names and amounts of taxes applied to the item -`discount` | CartDiscount | Deprecated. Use `discounts` instead -`discounts` | [Discount] | An array containing all discounts applied to the cart +`discount` | [CartDiscount](#CartDiscount) | Deprecated. Use `discounts` instead +`discounts` | [[Discount]](#Discount) | An array containing all discounts applied to the cart `grand_total` | Money | The total, including discounts, taxes, shipping, and other fees `subtotal_excluding_tax` | Money | Subtotal without taxes `subtotal_including_tax` | Money | Subtotal with taxes @@ -786,5 +786,7 @@ Attribute | Data Type | Description * [createEmptyCart mutation]({{page.baseurl}}/graphql/mutations/create-empty-cart.html) * [addSimpleProductsToCart mutation]({{page.baseurl}}/graphql/mutations/add-simple-products.html) +* [setShippingAddressesOnCart mutation]({{page.baseurl}}/graphql/mutations/set-shipping-address.html) +* [setShippingMethodsOnCart mutation]({{page.baseurl}}/graphql/mutations/set-shipping-method.html) * [setBillingAddressOnCart mutation]({{page.baseurl}}/graphql/mutations/set-billing-address.html) * [setPaymentMethodOnCart mutation]({{page.baseurl}}/graphql/mutations/set-payment-method.html) diff --git a/src/guides/v2.3/graphql/queries/category-list.md b/src/guides/v2.3/graphql/queries/category-list.md index 81425e74864..98ca81871bd 100644 --- a/src/guides/v2.3/graphql/queries/category-list.md +++ b/src/guides/v2.3/graphql/queries/category-list.md @@ -276,6 +276,86 @@ The following query returns breadcrumb information about categories that have th } ``` +### Return the categoryList by url_key filters + +The following query returns information about the Gear category using a `url_key` filter. You must pass the `url_key` value without a suffix and specify either the `eq` or `in` keyword. + +**Request:** + +```graphql +{ + categoryList(filters: { url_key: { eq: "gear" } }) { + id + level + name + path + url_path + url_key + children_count + } +} +``` + +**Response:** + +```json +{ + "data": { + "categoryList": [ + { + "id": 3, + "level": 2, + "name": "Gear", + "path": "1/2/3", + "url_path": "gear", + "url_key": "gear", + "children_count": "3" + } + ] + } +} +``` + +### Return the categoryList by url_path filters + +The following query returns information about the Gear > Bags category using the `url_path` filter. Do not specify a suffix in the `url_path` value. The `url_path` filter accepts either the `eq` or `in` keyword. + +**Request:** + +```graphql +{ + categoryList(filters: { url_path: { eq: "gear/bags" } }) { + id + level + name + path + url_path + url_key + children_count + } +} +``` + +**Response:** + +```json +{ + "data": { + "categoryList": [ + { + "id": 4, + "level": 3, + "name": "Bags", + "path": "1/2/3/4", + "url_path": "gear/bags", + "url_key": "bags", + "children_count": "0" + } + ] + } +} +``` + ## Input attributes You must specify the `filters` attribute as input to your query. diff --git a/src/guides/v2.3/graphql/queries/customer.md b/src/guides/v2.3/graphql/queries/customer.md index a2cb63d8caf..113d693b498 100644 --- a/src/guides/v2.3/graphql/queries/customer.md +++ b/src/guides/v2.3/graphql/queries/customer.md @@ -273,7 +273,7 @@ The `customer` object can contain the following attributes: Attribute | Data type | Description --- | --- | --- -`items` | [[WishlistItem](#wishlistitem)] | An array of items in the customer's wish list +`items` | [[WishlistItem]](#wishlistitem) | An array of items in the customer's wish list `items_count` | Int | The number of items in the wish list `id` | ID | The unique identifier of the wish list `sharing_code` | String | An encrypted code that Magento uses to link to the wish list diff --git a/src/guides/v2.3/javascript-dev-guide/javascript/js_init.md b/src/guides/v2.3/javascript-dev-guide/javascript/js_init.md index 901aee6df91..f2f2967037c 100644 --- a/src/guides/v2.3/javascript-dev-guide/javascript/js_init.md +++ b/src/guides/v2.3/javascript-dev-guide/javascript/js_init.md @@ -44,6 +44,7 @@ Consider the example of adding a custom carousel JS: $(element).(config); }; }); + ``` 1. Add the RequireJS config to the `app/design/frontend///requirejs-config.js` file. diff --git a/src/guides/v2.3/javascript-dev-guide/javascript/requirejs.md b/src/guides/v2.3/javascript-dev-guide/javascript/requirejs.md index 4ec97bd15c3..0d632cbe6f5 100644 --- a/src/guides/v2.3/javascript-dev-guide/javascript/requirejs.md +++ b/src/guides/v2.3/javascript-dev-guide/javascript/requirejs.md @@ -62,6 +62,38 @@ paths: { } ``` +Consider the example of overwriting an HTML file in the adminhtml. +In this example, the `max-length` value of the text-box in the `adminhtml` is altered. The HTML file is located at `vendor/magento/module_ui/view/base/web/templates/form/element/input.html`. + +1. Create a `requirejs-config.js` file under `app/code///view/base/` and add the following code: + + ```javascript + var config = { + paths: { + 'ui/template/form/element/input': '_/template/form/element/input' + } + }; + ``` + +1. Create an `input.html` file under `app/code///view/base/web/template/form/` and copy the contents of the `input.html` file from the `module_ui` template file. +1. Change the maxlength value to `512`, which was originally set to `256`. +1. Upgrade the Magento application: + + ```bash + bin/magento setup:upgrade + ``` + +1. Generate the dependency injection configuration: + + ```bash + bin/magento setup:di:compile + ``` + +1. Confirm the modification by inspecting the element source code and check the `maxlength` value, which should be `512` as specified in the template. + +{:.bs-callout-info} +The path for `Magento_Ui/templates` is set to be `ui/template` in the `requirejs-config.js` module of `module_ui`, hence `ui/template` is used for specifying the path. If no paths are set, `/templates` should be used. + ### deps {#requirejs-config-deps} The `deps` configuration is used to add a dependency. It can either be used directly under `var config = {}` or under a [shim configuration](#requirejs-config-shim). Adding modules under an independent `deps` configuration will load the specified modules in all pages. diff --git a/src/guides/v2.3/javascript-dev-guide/widgets/widget_prompt.md b/src/guides/v2.3/javascript-dev-guide/widgets/widget_prompt.md index e81a43f7264..239bdc26991 100644 --- a/src/guides/v2.3/javascript-dev-guide/widgets/widget_prompt.md +++ b/src/guides/v2.3/javascript-dev-guide/widgets/widget_prompt.md @@ -20,7 +20,7 @@ The prompt widget can be initialized with or without binding to a certain elemen ```javascript $('#prompt_init').prompt({ - title: 'Prompt title', + title: $.mage.__('Prompt title'), actions: { confirm: function(){}, //callback on 'Ok' button click cancel: function(){}, //callback on 'Cancel' button click @@ -33,12 +33,13 @@ $('#prompt_init').prompt({ ```javascript require([ + 'jquery', 'Magento_Ui/js/modal/prompt' -], function(prompt) { // Variable that represents the `prompt` function +], function($, prompt) { // Variable that represents the `prompt` function prompt({ - title: 'Some title', - content: 'Some content', + title: $.mage.__('Some title'), + content: $.mage.__('Some content'), actions: { confirm: function(){}, cancel: function(){}, @@ -223,9 +224,9 @@ The prompt widget implements the following events: 'use strict'; $('.prompt-modal-content').prompt({ - title: 'Prompt Title', + title: $.mage.__('Prompt Title'), modalClass: 'prompt', - value: 'Value by default', + value: $.mage.__('Value by default'), validation: true, promptField: '[data-role="promptField"]', validationRules: ['required-entry'], @@ -269,10 +270,10 @@ The prompt widget implements the following events: 'use strict'; prompt({ - title: 'Prompt Title', - content: $('.prompt-modal-content'), + title: $.mage.__('Prompt Title'), + content: $.mage.__($('.prompt-modal-content')), modalClass: 'prompt', - value: 'Value by default', + value: $.mage.__('Value by default'), validation: true, promptField: '[data-role="promptField"]', validationRules: ['required-entry'], diff --git a/src/guides/v2.3/performance-best-practices/software.md b/src/guides/v2.3/performance-best-practices/software.md index 1a083d456fe..b1fec9a7e7c 100644 --- a/src/guides/v2.3/performance-best-practices/software.md +++ b/src/guides/v2.3/performance-best-practices/software.md @@ -24,10 +24,12 @@ See [Magento 2.2.x technology stack requirements]({{page.baseurl}}/install-gde/s ## Operating system -Operating system configurations and optimizations are similar for Magento as other high-load web applications. As the number of concurrent connections handled by the server increases, the number of available sockets can become fully allocated. The Linux kernel supports a mechanism to "reuse" and "recycle" TCP connections. Be aware that more aggressive recycling than re-use may cause issues on the load balancers. To enable these kernel settings, set the following values in `/etc/sysctl.conf`: +Operating system configurations and optimizations are similar for Magento as compared to other high-load web applications. As the number of concurrent connections handled by the server increases, the number of available sockets can become fully allocated. The Linux kernel supports a mechanism to "reuse" TCP connections. To enable this mechanism, set the following value in `/etc/sysctl.conf`: + +{:.bs-callout-info} +Enabling net.ipv4.tcp_tw_reuse has no effect on incoming connections. ```terminal -net.ipv4.tcp_tw_recycle = 1 net.ipv4.tcp_tw_reuse = 1 ``` diff --git a/src/guides/v2.3/rest/modules/catalog.md b/src/guides/v2.3/rest/modules/catalog.md index 899584dff3c..da62103b7c5 100644 --- a/src/guides/v2.3/rest/modules/catalog.md +++ b/src/guides/v2.3/rest/modules/catalog.md @@ -43,36 +43,99 @@ Third-party modules may define other custom attributes. The following example uses the `POST V1/categories` call to assign four custom attributes to the "My New Category" category. +## Request + ```json { -"category": { + "category": { + "parent_id": 2, + "name": "Kids", + "is_active": true, + "level": 2, + "include_in_menu": true, + "custom_attributes": [ + { + "attribute_code": "description", + "value": "kids category description" + }, + { + "attribute_code": "meta_title", + "value": "Kids meta title" + }, + { + "attribute_code": "meta_keywords", + "value": "Kids meta keywords" + }, + { + "attribute_code": "meta_description", + "value": "Kids meta description" + }, + { + "attribute_code": "url_key", + "value": "kids" + }, + { + "attribute_code": "url_path", + "value": "kids" + } + ] + } +} +``` + +## Response + +```json +{ + "id": 42, "parent_id": 2, - "name": "My New Category", + "name": "Kids", "is_active": true, + "position": 9, "level": 2, + "children": "", + "created_at": "2020-12-18 08:50:47", + "updated_at": "2020-12-18 08:50:47", + "path": "1/2/43", + "available_sort_by": [], "include_in_menu": true, - "custom_attributes":[ - { - "attribute_code":"description", - "value":"Women category description" - }, - { - "attribute_code":"meta_title", - "value":"Women meta title" - }, - { - "attribute_code":"meta_keywords", - "value":"Women meta keywords" - }, - { - "attribute_code":"meta_description", - "value":"Women meta description" - }, - { - "attribute_code":"url_key", - "value":"women-test-key" - } - ] - } + "custom_attributes": [ + { + "attribute_code": "description", + "value": "kids category description" + }, + { + "attribute_code": "meta_title", + "value": "Kids meta title" + }, + { + "attribute_code": "meta_keywords", + "value": "Kids meta keywords" + }, + { + "attribute_code": "meta_description", + "value": "Kids meta description" + }, + { + "attribute_code": "is_anchor", + "value": "1" + }, + { + "attribute_code": "path", + "value": "1/2/43" + }, + { + "attribute_code": "children_count", + "value": "0" + }, + { + "attribute_code": "url_key", + "value": "kids" + }, + { + "attribute_code": "url_path", + "value": "kids" + } + ] } ``` diff --git a/src/guides/v2.3/rest/performing-searches.md b/src/guides/v2.3/rest/performing-searches.md index 2f787b5c130..017f7153c06 100644 --- a/src/guides/v2.3/rest/performing-searches.md +++ b/src/guides/v2.3/rest/performing-searches.md @@ -21,9 +21,9 @@ where: Condition | Notes --- | --- -`eq` | Equals. +`eq` | Equals `finset` | A value within a set of values -`from` | The beginning of a range. Must be used with `to` +`from` | The beginning of a range. Must be used with `to`. `gt` | Greater than `gteq` | Greater than or equal `in` | In. The `value` can contain a comma-separated list of values. @@ -32,11 +32,11 @@ Condition | Notes `lteq` | Less than or equal `moreq` | More or equal `neq` | Not equal -`nfinset` | A value that is not within a set of values +`nfinset` | A value that is not within a set of values. `nin` | Not in. The `value` can contain a comma-separated list of values. `notnull` | Not null `null` | Null -`to` | The end of a range. Must be used with `from` +`to` | The end of a range. Must be used with `from`. {:.bs-callout-info} `condition_type` is optional if the operator is `eq`. @@ -93,6 +93,18 @@ searchCriteria[filter_groups][0][filters][0][value]=2016-07-01 00:00:00& searchCriteria[filter_groups][0][filters][0][condition_type]=gt ``` +## Simple search using an `in` conditions type + +The following search finds all the products that are provided in the value field. When you specify the `in` condition type, the value field must be a comma separated list. + +```http +GET /rest//V1/products? +searchCriteria[filter_groups][0][filters][0][field]=entity_id& +searchCriteria[filter_groups][0][filters][0][value]=1,2,3,4,5& +searchCriteria[filter_groups][0][filters][0][condition_type]=in +``` +The query returns 5 items. + ### Logical OR search The following example searches for all products whose names contain the string `Leggings` or `Parachute`. The instances of `%25` in the example are converted into the SQL wildcard character `%`. diff --git a/src/guides/v2.3/rest/tutorials/orders/order-create-shipment.md b/src/guides/v2.3/rest/tutorials/orders/order-create-shipment.md index 19acdadcf2c..babdcc78778 100644 --- a/src/guides/v2.3/rest/tutorials/orders/order-create-shipment.md +++ b/src/guides/v2.3/rest/tutorials/orders/order-create-shipment.md @@ -37,7 +37,7 @@ where `3` is the order id. **Payload:** -The `tracks` array optionally allows you to include one or more tracking numbers for the [shipment](https://glossary.magento.com/shipment). +The `notify` field is used to trigger Magento to send the shipment email. The `tracks` array optionally allows you to include one or more tracking numbers for the [shipment](https://glossary.magento.com/shipment). {% collapsible Show code sample %} @@ -57,6 +57,7 @@ The `tracks` array optionally allows you to include one or more tracking numbers "qty": 1 } ], + "notify": true, "tracks": [ { "track_number": "1Y-9876543210", @@ -75,4 +76,4 @@ A shipment ID, such as `3`. ## Verify this step -Log in to [Admin](https://glossary.magento.com/admin). Click **Sales** > **Shipments**. The shipment is displayed in the grid. Then click **Sales** > **Orders**. The status is Complete. +Log in to [Admin](https://glossary.magento.com/admin). Click **Sales** > **Shipments**. The shipment is displayed in the grid. Then click **Sales** > **Orders**. The order status is Complete. diff --git a/src/guides/v2.4/extension-dev-guide/framework/url-library.md b/src/guides/v2.4/extension-dev-guide/framework/url-library.md new file mode 120000 index 00000000000..990051bf1ea --- /dev/null +++ b/src/guides/v2.4/extension-dev-guide/framework/url-library.md @@ -0,0 +1 @@ +../../../v2.3/extension-dev-guide/framework/url-library.md \ No newline at end of file diff --git a/src/guides/v2.4/graphql/interfaces/customizable-option-interface.md b/src/guides/v2.4/graphql/interfaces/customizable-option-interface.md index 5f360a898b4..f9515084fd1 100644 --- a/src/guides/v2.4/graphql/interfaces/customizable-option-interface.md +++ b/src/guides/v2.4/graphql/interfaces/customizable-option-interface.md @@ -268,3 +268,75 @@ The following query returns information about the customizable options configure } } ``` + +The following query returns information about the customizable options configured for the product with a `sku` of `xyz` with Custom Option type Text Field. + +* Custom option Option Type is text field with required field. +* Option Title is `Favorite Color`. +* Price is `$5`, Price Type is `Fixed`, Option SKU is `favoriteColorSku` and Max. Characters is `20`. + +**Request:** + +```graphql +{ + products(filter: { sku: { eq: "xyz" } }) { + items { + id + name + sku + __typename + ... on CustomizableProductInterface { + options { + title + required + sort_order + option_id + ... on CustomizableFieldOption { + value { + uid + sku + price + price_type + max_characters + } + } + } + } + } + } +} +``` + +**Response:** + +```json +{ + "data": { + "products": { + "items": [ + { + "id": 10, + "name": "Savvy Shoulder Tote", + "sku": "24-WB05", + "__typename": "SimpleProduct", + "options": [ + { + "title": "Favorite Color", + "required": true, + "sort_order": 2, + "option_id": 2, + "value": { + "uid": "Y3VzdG9tLW9wdGlvbi8y", + "sku": "favoriteColorSku", + "price": 5, + "price_type": "FIXED", + "max_characters": 20 + } + } + ] + } + ] + } + } +} +``` diff --git a/src/guides/v2.4/graphql/interfaces/product-interface.md b/src/guides/v2.4/graphql/interfaces/product-interface.md index 63dc9ee3f09..d193ac944e9 100644 --- a/src/guides/v2.4/graphql/interfaces/product-interface.md +++ b/src/guides/v2.4/graphql/interfaces/product-interface.md @@ -168,7 +168,7 @@ Attribute | Data Type | Description Attribute | Data Type | Description --- | --- | --- -`items` | [ProductReview]! | An array of product reviews +`items` | [[ProductReview]](#ProductReview)! | An array of product reviews `page_info` | [SearchResultPageInfo!]({{page.baseurl}}/graphql/queries/products.html#SearchResultPageInfo) | Metadata for pagination rendering #### ProductReview object {#ProductReview} diff --git a/src/guides/v2.4/graphql/mutations/add-bundle-products.md b/src/guides/v2.4/graphql/mutations/add-bundle-products.md index c459d940d20..425ffb2030b 100644 --- a/src/guides/v2.4/graphql/mutations/add-bundle-products.md +++ b/src/guides/v2.4/graphql/mutations/add-bundle-products.md @@ -242,8 +242,8 @@ Attribute | Data Type | Description Error | Description --- | --- -`Could not find a product with SKU "XXX"` | A simple product with the SKU specified in the `data.sku` argument does not exist. `Could not find a cart with ID "XXX"` | The specified `cart_id` value does not exist in the `quote_id_mask` database table. +`Could not find a product with SKU "XXX"` | A simple product with the SKU specified in the `data.sku` argument does not exist. `Required parameter "cart_id" is missing` | The `cart_id` argument is omitted or contains an empty value. ## Related topics diff --git a/src/guides/v2.4/graphql/mutations/add-configurable-products.md b/src/guides/v2.4/graphql/mutations/add-configurable-products.md index 0c83d8a6bf1..c87b2595e09 100644 --- a/src/guides/v2.4/graphql/mutations/add-configurable-products.md +++ b/src/guides/v2.4/graphql/mutations/add-configurable-products.md @@ -139,10 +139,12 @@ Attribute | Data Type | Description Error | Description --- | --- +`Could not find a cart with ID "XXX"` | The specified `cart_id` value does not exist in the `quote_id_mask` table. `Could not add the product with SKU configurable to the shopping cart: The product that was requested doesn't exist. Verify the product and try again.` | The simple product with the SKU specified in the `data`.`sku` attribute does not exist. `Could not find a product with SKU "XXX"` | The configurable product with SKU specified in the `parent_sku` argument does not exist. `Could not find specified product.` | The simple product specified in the `data`.`sku` argument is not assigned to the configurable product provided in the `parent_sku` attribute. `Required parameter "cart_id" is missing` | The `cart_id` argument was omitted or contains an empty value. +`Required parameter "cart_items" is missing` | The `cart_items` argument was omitted or contains an empty array. `Required parameter "email" is missing` | The `email` argument was omitted or contains an empty value. `The requested qty is not available` | The requested quantity specified `data`.`quantity` is not available. diff --git a/src/guides/v2.4/graphql/mutations/add-downloadable-products.md b/src/guides/v2.4/graphql/mutations/add-downloadable-products.md index fae34653084..76f2b38d169 100644 --- a/src/guides/v2.4/graphql/mutations/add-downloadable-products.md +++ b/src/guides/v2.4/graphql/mutations/add-downloadable-products.md @@ -261,6 +261,8 @@ Attribute | Data Type | Description Error | Description --- | --- +`Could not find a cart with ID "XXX"` | The specified `cart_id` value does not exist in the `quote_id_mask` database table. +`Could not find a product with SKU "YYY"` | A product with the SKU specified in the `data`.`sku` argument does not exist. `Required parameter "cart_id" is missing` | The mutation does not contain a `cart_id` argument. `Required parameter "cart_items" is missing` | The `cart_items` argument is empty or is not of type `array`. `Please specify product link(s).` | You tried to add a downloadable product in which the `Links can be purchased separately` option is enabled, but you did not specify individual product links. diff --git a/src/guides/v2.4/graphql/mutations/add-products-to-cart.md b/src/guides/v2.4/graphql/mutations/add-products-to-cart.md index ea7aa9f92d1..1d50b649f14 100644 --- a/src/guides/v2.4/graphql/mutations/add-products-to-cart.md +++ b/src/guides/v2.4/graphql/mutations/add-products-to-cart.md @@ -365,7 +365,8 @@ Attribute | Data Type | Description Code | Error | Description --- | --- | --- +`CART_ID_INVALID` | `Could not find a cart with ID` | The specified cart ID is invalid. `PRODUCT_NOT_FOUND` | `Could not find a product with SKU "XXX"` | A product with the SKU specified in the argument `data`.`sku` does not exist. `NOT_SALABLE` | `Product that you are trying to add is not available.` | A requested product is not available -`INSUFFICIENT_STOCK` | `This product is out of stock` | A requested product is out of stock -`UNDEFINED` | `UNDEFINED` | An error message is not matched with any code +`INSUFFICIENT_STOCK` | `This product is out of stock` | The requested product is out of stock +`UNDEFINED` | `UNDEFINED` | The error message does not match any error code diff --git a/src/guides/v2.4/graphql/queries/cart.md b/src/guides/v2.4/graphql/queries/cart.md index fc482b48690..9175c47d1f8 100644 --- a/src/guides/v2.4/graphql/queries/cart.md +++ b/src/guides/v2.4/graphql/queries/cart.md @@ -706,7 +706,7 @@ The `CartItemPrices` object can contain the following attributes. Attribute | Data Type | Description --- | --- | --- -`discounts`| [Discount] | An array of discounts to be applied to the cart item +`discounts`| [[Discount]](#Discount) | An array of discounts to be applied to the cart item `price` | Money! | The price of the item before any discounts were applied `row_total` | Money! | The value of the `price` multiplied by the quantity of the item `row_total_including_tax` | Money! | The value of `row_total` plus the tax applied to the item @@ -728,8 +728,8 @@ The `CartPrices` object can contain the following attributes. Attribute | Data Type | Description --- | --- | --- `applied_taxes` | [[CartTaxItem]](#CartTaxItem) | An array containing the names and amounts of taxes applied to the item -`discount` | CartDiscount | Deprecated. Use `discounts` instead -`discounts` | [Discount] | An array containing all discounts applied to the cart +`discount` | [CartDiscount](#CartDiscount) | Deprecated. Use `discounts` instead +`discounts` | [[Discount]](#Discount) | An array containing all discounts applied to the cart `gift_options` | [GiftOptionsPrices](#GiftOptionsPrices) | The list of prices for the selected gift options `grand_total` | Money | The total, including discounts, taxes, shipping, and other fees `subtotal_excluding_tax` | Money | Subtotal without taxes @@ -825,5 +825,7 @@ Attribute | Data Type | Description * [createEmptyCart mutation]({{page.baseurl}}/graphql/mutations/create-empty-cart.html) * [addSimpleProductsToCart mutation]({{page.baseurl}}/graphql/mutations/add-simple-products.html) +* [setShippingAddressesOnCart mutation]({{page.baseurl}}/graphql/mutations/set-shipping-address.html) +* [setShippingMethodsOnCart mutation]({{page.baseurl}}/graphql/mutations/set-shipping-method.html) * [setBillingAddressOnCart mutation]({{page.baseurl}}/graphql/mutations/set-billing-address.html) * [setPaymentMethodOnCart mutation]({{page.baseurl}}/graphql/mutations/set-payment-method.html) diff --git a/src/guides/v2.4/graphql/queries/customer.md b/src/guides/v2.4/graphql/queries/customer.md index 78807350083..cf05a81a578 100644 --- a/src/guides/v2.4/graphql/queries/customer.md +++ b/src/guides/v2.4/graphql/queries/customer.md @@ -622,7 +622,7 @@ Attribute | Data Type | Description Attribute | Data Type | Description --- | --- | --- -`items` | [ProductReview]! | An array of product reviews +`items` | [[ProductReview]](#ProductReview)! | An array of product reviews `page_info` | [SearchResultPageInfo!]({{page.baseurl}}/graphql/queries/products.html#SearchResultPageInfo) | Metadata for pagination rendering #### ProductReview object {#ProductReview} @@ -633,7 +633,7 @@ Attribute | Data Type | Description Attribute | Data type | Description --- | --- | --- -`items` | [[WishlistItem](#wishlistitem)] | An array of items in the customer's wish list +`items` | [[WishlistItem]](#wishlistitem) | An array of items in the customer's wish list `items_count` | Int | The number of items in the wish list `id` | ID | The unique identifier of the wish list `sharing_code` | String | An encrypted code that Magento uses to link to the wish list diff --git a/src/guides/v2.4/performance-best-practices/software.md b/src/guides/v2.4/performance-best-practices/software.md index 08bb6ad71a5..a11ec261df9 100644 --- a/src/guides/v2.4/performance-best-practices/software.md +++ b/src/guides/v2.4/performance-best-practices/software.md @@ -24,10 +24,12 @@ See [Magento technology stack requirements]({{page.baseurl}}/install-gde/system- ## Operating system -Operating system configurations and optimizations are similar for Magento as other high-load web applications. As the number of concurrent connections handled by the server increases, the number of available sockets can become fully allocated. The Linux kernel supports a mechanism to "reuse" and "recycle" TCP connections. Be aware that more aggressive recycling than re-use may cause issues on the load balancers. To enable these kernel settings, set the following values in `/etc/sysctl.conf`: +Operating system configurations and optimizations are similar for Magento as compared to other high-load web applications. As the number of concurrent connections handled by the server increases, the number of available sockets can become fully allocated. The Linux kernel supports a mechanism to "reuse" TCP connections. To enable this mechanism, set the following value in `/etc/sysctl.conf`: + +{:.bs-callout-info} +Enabling net.ipv4.tcp_tw_reuse has no effect on incoming connections. ```terminal -net.ipv4.tcp_tw_recycle = 1 net.ipv4.tcp_tw_reuse = 1 ``` diff --git a/src/guides/v2.4/test/integration/annotations.md b/src/guides/v2.4/test/integration/annotations.md index c0e11ac80b8..a6a296bc696 100644 --- a/src/guides/v2.4/test/integration/annotations.md +++ b/src/guides/v2.4/test/integration/annotations.md @@ -20,7 +20,7 @@ Data Fixture|`@magentoDataFixture`|`@magentoDataFixture ||`|Points to a class or a method which creates testing entities (fixtures) for test execution before the transaction has begun. You will need to implement a rollback file for changes made here. (e.g. Fixture file my_fixture.php would also require a my_fixture_rollback.php that reverts the original fixture's changed.) Application Area|`@magentoAppArea`|`@magentoAppArea adminhtml|frontend|global`|Configures test environment in the context of specified application area. Enable/Disable Cache|`@magentoCache`|`@magentoCache |all enabled|disabled`|Enables or disables certain cache segment or all of them to prevent isolation problems. -Indexer Dimension Mode|`@magentoIndexerDimensionMode`|`@magentoIndexerDimensionMode `|Sets the indexer dimension mode for the test run. More information can be found in the [DevBlog](https://community.magento.com/t5/Magento-DevBlog/Indexers-parallelization-and-optimization/ba-p/104922_). +Indexer Dimension Mode|`@magentoIndexerDimensionMode`|`@magentoIndexerDimensionMode `|Sets the indexer dimension mode for the test run. More information can be found in the [DevBlog](https://community.magento.com/t5/Magento-DevBlog/Indexers-parallelization-and-optimization/ba-p/104922). Register Components|`@magentoComponentsDir`|`@magentoComponentsDir `|Registers fixture components from specified directory (recursively). Unregisters the components after the test is finished. ### Applying annotations diff --git a/src/whats-new.md b/src/whats-new.md index a0b9d5b4cfe..f73daf7ea70 100644 --- a/src/whats-new.md +++ b/src/whats-new.md @@ -15,9 +15,18 @@ title: What's new on DevDocs {% assign grouped_by_year = entries | group_by_exp: "entry", "entry.date | date: '%Y'" %} -{% for group in grouped_by_year limit:2 %} +{% for year_group in grouped_by_year limit:2 %} -## {{ group.name }} +{% assign grouped_by_month = year_group.items | group_by_exp: "entry", "entry.date | date: '%B'" %} +## {{ year_group.name }} + +{% for month_group in grouped_by_month %} +### {{ month_group.name }} + +{% assign grouped_by_date = month_group.items | group_by: "date" %} + +{% for date_group in grouped_by_date %} +#### {{ date_group.name }} @@ -25,25 +34,21 @@ title: What's new on DevDocs - + - {% for item in group.items %} + {% for item in date_group.items %} - + {% endfor %}
Description Versions TypeDatePull request
{{ item.description | markdownify }} {{ item.versions }} {{ item.type }} - {%- if item.link -%} - {{ item.date | date: "%B %e" }} - {%- else -%} - {{ item.date | date: "%B %e" }} - {%- endif -%} - {{ item.link | split: "/" | last }}
+{% endfor %} +{% endfor %} -{% endfor %} +{% endfor %}