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 65377603b01..3bc6a3901a8 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 @@ -26,8 +32,8 @@ 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 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/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.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 284e693e77b..97344e15f4a 100644 --- a/src/guides/v2.4/graphql/interfaces/product-interface.md +++ b/src/guides/v2.4/graphql/interfaces/product-interface.md @@ -167,7 +167,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