Skip to content
This repository was archived by the owner on Nov 19, 2024. It is now read-only.

Cart query Object improvement #8352

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/_includes/graphql/cart-object-24.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
8 changes: 5 additions & 3 deletions src/guides/v2.3/graphql/queries/cart.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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)
8 changes: 5 additions & 3 deletions src/guides/v2.4/graphql/queries/cart.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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)