-
Notifications
You must be signed in to change notification settings - Fork 1.7k
magento/devdocs#7367: Added the article "addProductsToCart mutation" #7774
Conversation
An admin must run tests on this PR before it can be merged. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@andrewbess, thank you for your contribution!
Could you please apply the following minor CR recommendations from my side?
Thank you!
Hello @dmytro-ch. Thank you in advance. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From a technical perspective, the changes look good to me. ✔️
Thank you!
} | ||
``` | ||
|
||
We can consider `selected_option` and `entered_option` as a unique identifier. They meet the criteria: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would say UID of selected_option
and entered_option
. The option itself is not an identifier
Hi @andrewbess. Thanks for the great work. Please, check my notices above. |
I reorganized the content so that selected and entered options are discussed toward the beginning. I would like to know more about the selected option example. Is this way more efficient than the traditional way of adding a configurable product by specifying a parent SKU like `WSH12` and a child SKU like `WSH12-29-Green`? Do we need to specify how to find `uid` values?
This file was created in another PR that was merged after you submitted this PR. Changing the contents so that they'll match exactly, avoiding a merge conflict.
I reorganized the content of I would like to know more about the selected option example. Is this way more efficient than the traditional way of adding a configurable product by specifying a parent SKU like Do we need to specify how to find The |
Hello @rogyar.
I think my proposed syntax will be more understandable for all developers (juniors, middles, etc.) Also, I want to fix it for all mutation topics, if you'll approve my proposition. Thank you in advance. |
Hi @andrewbess that makes sense, thank you for the clarification. |
Hello @keharper |
running tests |
Hi @andrewbess, thank you for your contribution! |
Purpose of this pull request
This pull request (PR) provides a new article for AddProductsToCart single mutation.
Also, this PR adds deprecation notices to the single-product type mutations
Affected DevDocs pages
Related Issues (if relevant)
whatsnew
Added information about the
addProductsToCart
mutation to add any type of product to the active cart. We recommend using this mutation instead of single-purpose mutations such asaddSimpleProductsToCart
.