You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 19, 2024. It is now read-only.
Copy file name to clipboardExpand all lines: src/_includes/graphql/cart-object-24.md
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,14 +5,18 @@ Attribute | Data Type | Description
5
5
`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
6
6
`applied_reward_points`| [`RewardPointsAmount`][RewardPointsAmount] | The amount of reward points applied to the cart
7
7
`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
8
+
`available_gift_wrappings` | [GiftWrapping]! | The list of available gift wrapping options for the cart
8
9
`available_payment_methods` | [[AvailablePaymentMethod]][AvailablePaymentMethod] | Available payment methods
9
10
`billing_address` | [BillingCartAddress][BillingCartAddress] | Contains the billing address specified in the customer's cart
10
11
`email` | String | The customer's email address
11
12
`gift_message` | [GiftMessage][GiftMessage] | A gift message added to the cart
13
+
`gift_receipt_included` | Boolean! | Indicates if the customer requested a gift receipt for the cart
14
+
`gift_wrapping` | GiftWrapping | The selected gift wrapping for the cart
12
15
`id` | ID! | The ID of the cart
13
16
`is_virtual` | Boolean! | Indicates whether the cart contains only virtual products
14
17
`items` | [[CartItemInterface]][CartItemInterface] | Contains the items in the customer's cart
15
18
`prices` | [CartPrices][CartPrices] | Contains subtotals and totals
19
+
`printed_card_included` | Boolean! | Indicates if the customer requested a printed card for the cart
The `setGiftOptionsOnCart` mutation allows the buyer to set the following gift options on the cart level:
7
+
8
+
* Gift messages
9
+
* Gift wrapping
10
+
* A gift receipt to accompany the order
11
+
* A printed card to accompany the order
12
+
13
+
{:.bs-callout-info}
14
+
Gift messages are a feature of {{site.data.var.ce}}. All other gift options require {{site.data.var.ee}}.
15
+
16
+
To remove a gift message, set the `gift_message` object to null. To remove gift wrapping, set the `gift_wrapping_id` attribute to null.
17
+
18
+
Use the [updateCartItems mutation]({{page.baseurl}}/graphql/mutations/update-cart-items.html) to set gift messages and gift wrapping on individual items.
19
+
20
+
These options are configured on the **Stores** > Configuration > **Sales** > **Sales** > **Gift Options** screen. To determine whether these options are enabled, specify these attributes in the [`storeConfig` query]({{page.baseurl}}/graphql/queries/store-config.html).
21
+
22
+
*`allow_gift_receipt`
23
+
*`allow_gift_wrapping_on_order`
24
+
*`allow_printed_card`
25
+
*`cart_gift_wrapping`
26
+
*`cart_printed_card`
27
+
*`printed_card_price`
28
+
*`sales_gift_wrapping`
29
+
*`sales_printed_card`
30
+
31
+
Gift wrapping is available for simple, configurable, bundle products as well as physical gift cards.
The `updateCartItems` mutation allows you to replace the current quantity of one or more cart items with the specified quantities. It does not perform calculations to determine the quantity of cart items.
6
+
The `updateCartItems` mutation allows you to modify items in the specified cart. You can also replace the current quantity of one or more cart items with the specified quantities. The mutation does not perform calculations to determine the quantity of cart items.
9
7
10
8
{:.bs-callout-info}
11
9
Setting the quantity to `0` removes an item from the cart.
@@ -91,31 +89,43 @@ mutation {
91
89
92
90
The `UpdateCartItemsInput` object is listed first. All child objects are listed in alphabetical order.
0 commit comments