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.
* checkpoint
* checkpoint
* minor updates
* review comments
* one more review comment
* more review comments
* correct linting error
* remove stray character from TOC
Copy file name to clipboardExpand all lines: guides/v2.3/graphql/product/product-interface.md
+58-12Lines changed: 58 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -42,7 +42,9 @@ Attribute | Data type | Description
42
42
`new_to_date` | String | The end date for new product listings
43
43
`only_x_left_in_stock` | Float | The "Only X left Threshold" assigned to the product. This attribute is defined in the `InventoryGraphQl` module.
44
44
`options_container` | String | If the product has multiple options, determines where they appear on the product page
45
-
`price` | ProductPrices | The price of an item. A `ProductPrice` object is returned. See [ProductPrices](#ProductPrices) for more information.
45
+
`price` | ProductPrices | Deprecated. Use `price_range` instead.<br/>The price of an item. A `ProductPrice` object is returned
46
+
`price_range` | [PriceRange!](#PriceRange) | A `PriceRange` object, indicating the range of prices for the product
47
+
`price_tiers` | [TierPrice] | An array of `TierPrice` objects
46
48
`product_links` | [ProductLinksInterface] | An array of [ProductLinks](#ProductLinks) objects
47
49
`related_products` | [ProductInterface] | An array of related products
48
50
`short_description` | ComplexTextValue | An object that contains a short description of the product. Its use depends on the store's theme. The object can include simple HTML tags
@@ -55,8 +57,8 @@ Attribute | Data type | Description
55
57
`swatch_image` | String | The file name of a swatch image. This attribute is defined in the `SwatchesGraphQl` module.
56
58
`tax_class_id` | Int | An ID assigned to a tax class. This attribute is defined in the `TaxGraphQl` module.
57
59
`thumbnail` | [ProductImage](#ProductImage) | An object that contains the URL and label for the product's thumbnail image
58
-
`tier_price` | Float | The price when tier pricing is in effect and the items purchased threshold has been reached
59
-
`tier_prices` | [ProductTierPrices] | An array of [ProductTierPrices](#ProductTier) objects
60
+
`tier_price` | Float | Deprecated. Use `price_tiers` instead. The price when tier pricing is in effect and the items purchased threshold has been reached
61
+
`tier_prices` | [ProductTierPrices] | Deprecated. Use `price_tiers` instead. An array of [ProductTierPrices](#ProductTier) objects
60
62
`type_id` | String | One of `simple`, `virtual`, `bundle`, `downloadable`,`grouped`, `configurable`
61
63
`updated_at` | String | The timestamp indicating when the product was last updated
62
64
`upsell_products` | [ProductInterface] | An array of up-sell products
@@ -68,15 +70,46 @@ Attribute | Data type | Description
68
70
69
71
### ProductPrices object {#ProductPrices}
70
72
73
+
{:.bs-callout-info}
74
+
The `ProductPrices` object has been deprecated. Use the `PriceRange` object instead.
75
+
71
76
The `ProductPrices` object contains the regular price of an item, as well as its minimum and maximum prices. Only composite products, which include bundle, configurable, and grouped products, can contain a minimum and maximum price.
72
77
73
78
Attribute | Data Type | Description
74
79
--- | --- | ---
75
-
`maximalPrice` | Price | Used for composite (bundle, configurable, grouped) products. This is the highest possible final price for all the options defined within a composite product. If you're specifying a price range, this would be the "to" value.
76
-
`minimalPrice` | Price | Used for composite (bundle, configurable, grouped) products. This is the lowest possible final price for all the options defined within a composite product. If you're specifying a price range, this would be the "from" value.
77
-
`regularPrice` | Price | The base price of a product.
80
+
`maximalPrice` | Price | Deprecated. Use `PriceRange.maximum_price` instead. Used for composite (bundle, configurable, grouped) products. This is the highest possible final price for all the options defined within a composite product. If you're specifying a price range, this would be the "to" value
81
+
`minimalPrice` | Price | Deprecated. Use `PriceRange.minimum_price` instead. Used for composite (bundle, configurable, grouped) products. This is the lowest possible final price for all the options defined within a composite product. If you're specifying a price range, this would be the "from" value
82
+
`regularPrice` | Price | Deprecated. Use `PriceRange.maximum_price` or `PriceRange.minimum_price` instead. The base price of a product
83
+
84
+
### PriceRange object {#PriceRange}
85
+
86
+
The `PriceRange` object defines the price range for a product. If a product only has a single price, the minimum and maximum price will be the same.
87
+
88
+
Attribute | Data Type | Description
89
+
--- | --- | ---
90
+
`maximum_price` | ProductPrice | The highest possible final price for a product
91
+
`minimum_price` | ProductPrice | The lowest possible final price for a product
92
+
93
+
### ProductPrice object {#ProductPrice}
94
+
95
+
The `ProductPrice` object includes the regular price, final price, and the difference between those two prices.
96
+
97
+
Attribute | Data Type | Description
98
+
--- | --- | ---
99
+
`discount` | ProductDiscount | The amount of the discount applied to the product. It represents the difference between the `final_price` and `regular_price`
100
+
`final_price`| Money! | The price of the product after applying discounts
101
+
`regular_price` | Money! | The regular price of the product, without any applied discounts
78
102
79
-
#### Price object {#Price}
103
+
### ProductDiscount object {#ProductDiscount}
104
+
105
+
The `ProductDiscount` object expresses the discount applied to a product as a fixed amount, such as $5, and as a percentage, such as 10%. The discount originates from special pricing or a catalog price rule.
106
+
107
+
Attribute | Data Type | Description
108
+
--- | --- | ---
109
+
`amount_off` | Float | The actual value of the discount
110
+
`percent_off` | Float | The discount expressed as a percentage
111
+
112
+
### Price object {#Price}
80
113
81
114
The `Price` object defines the price of a product as well as any tax-related adjustments.
82
115
@@ -178,15 +211,28 @@ Attribute | Type | Description
178
211
179
212
### ProductTierPrices object {#ProductTier}
180
213
214
+
{:.bs-callout-info}
215
+
The `ProductTierPrices` object and all of its attributes have been deprecated. Use `TierPrice` instead.
216
+
181
217
The `ProductTierPrices` object defines a tier price, which is a quantity discount offered to a specific customer group.
182
218
183
219
Attribute | Type | Description
184
220
--- | --- | ---
185
-
`customer_group_id` | Int | The ID of the customer group
186
-
`percentage_value` | Float | The percentage discount of the item
187
-
`qty` | Float | The number of items that must be purchased to qualify for tier pricing
188
-
`value` | Float | The price of the fixed price item
189
-
`website_id` | Int | The ID assigned to the website
221
+
`customer_group_id` | Int | Deprecated. There is no replacement because this value is not relevant for the storefront. The ID of the customer group
222
+
`percentage_value` | Float | Deprecated. Use `TierPrice.discount` instead. The percentage discount of the item
223
+
`qty` | Float | Deprecated. Use `TierPrice.quantity` instead. The number of items that must be purchased to qualify for tier pricing
224
+
`value` | Float | Deprecated. Use `TierPrice.final_price` instead. The price of the fixed price item
225
+
`website_id` | Int | Deprecated. There is no replacement because this value is not relevant for the storefront. The ID assigned to the website
226
+
227
+
### TierPrice object {#TierPrice}
228
+
229
+
The `TierPrice` object defines a tier price, which is a price based on the quantity purchased.
230
+
231
+
Attribute | Type | Description
232
+
--- | --- | ---
233
+
`discount` | ProductDiscount | The price discount applied to this tier
234
+
`final_price`| Money! | The price of the product at this tier
235
+
`quantity` | Float | The minimum number of items that must be purchased to qualify for this price tier
Copy file name to clipboardExpand all lines: guides/v2.3/graphql/queries/cart.md
+177Lines changed: 177 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -523,6 +523,183 @@ The `3T1free` rule is applied first, and Magento returns the price of a single s
523
523
}
524
524
```
525
525
526
+
### Tier price example
527
+
528
+
In the following example, tier prices has been established for product `24-UG01` and `24-UG05`, as shown in the following table:
529
+
530
+
Product | Quantity | Fixed/Discount | Amount
531
+
--- | --- | --- | --- |
532
+
24-UG01 | 5 | Discount | 5%
533
+
24-UG01 | 10 | Discount | 10%
534
+
24-UG01 | 15 | Discount | 15%
535
+
24-UG05 | 5 | Fixed | $16
536
+
24-UG05 | 10 | Fixed | $11
537
+
538
+
The cart in the example contains 12 units of `24-UG05` and 8 units of `24-UG-01`, so the price of `24-UG05` is $11, and the price of `24-UG01` is $18.05 (5% off).
0 commit comments