CartDiscount
ObjectFusion lookup resolver for retrieving a cart discount by its ID.
Fields
- ChannelConnection!
channelsDeprecated Gets a list of channels associated with the specified cart discount.
Deprecated: Do not use. This has no effect and will be removed in 5.0.0- CartDiscountCodeConnection!
discountCodes A list of discount codes associated with the cart discount.
- String
displayName The display name of the cart discount.
- ID!
id The unique identifier for the cart discount.
- String!
name The name of the cart discount.
- String!
predicate The predicate that defines the conditions under which the cart discount is applied. For example, a predicate could specify that the discount only applies if the cart total exceeds a certain amount or if specific products are in the cart.
Thor predicates are boolean expressions. Cart discounts and shipping rules evaluate against cart context; product discounts evaluate against price and product context. Cart predicate language and product predicate language.- Int!
priority The priority of the cart discount, which determines the order in which discounts are applied. Lower priority discounts are applied first.
- Boolean!
requiresDiscountCode True if the cart discount requires a discount code before it applies.
- CartDiscountTarget!
target The target of the cart discount, which specifies what the discount applies to. For example: shipping, total price or all/specific line items.
- DateTime
validFrom The date and time the discount is valid from.
- DateTime
validUntil The date and time the discount is valid until.
- CartDiscountValue!
value The value of the cart discount, which can be an absolute or relative discount.
Queries
Gets a cart discount by its ID.
Returns a list of cart discounts.
Mutations
Creates a new cart discount based on the provided input.
This mutation deletes a cart discount based on the provided input.
Creates a new cart discount based on the provided input.