Skip to content

discount combination rules #1163

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
tebbs-thomas opened this issue Mar 1, 2025 · 3 comments
Open

discount combination rules #1163

tebbs-thomas opened this issue Mar 1, 2025 · 3 comments

Comments

@tebbs-thomas
Copy link

Is it possible to manage the discount combination rules with this library, or is there any plan to implement this feature in the future?
Thanks.

@timoheyden
Copy link

Hi Thomas,
what exactly do you mean with "manage discount combination rules"?
What do you want to achieve?

@Jamflynt
Copy link

Jamflynt commented Apr 2, 2025

I suspect @tebbs-thomas means setting combinesWith on the PriceRule for combining discounts. We're currently wondering the same thing but it does not look like this is possible for whatever reason.

We may have to rewrite an entire process in a custom GraphQL call as a workaround.

@timoheyden you wouldn't happen to know of a way would you?

@timoheyden
Copy link

At least you can retrieve the information about a specific discount if it is possible the combine with another discount type as well as creating new discounts with the information if they should be combinable with other discount types.
Should be very simple as these are just booleans.

And yes, for the mutation ShopifySharp provides already the model for the request called DiscountCodeBasic. But every other discount type models exists in the ShopifySharp package (automatic basic, bxgy, ...).

Query: (https://shopify.dev/docs/api/admin-graphql/2025-01/queries/discountNodes?language=graphql)
query { discountNodes(query: "combines_with:product_discounts", first: 10) { edges { node { id discount { ... on DiscountCodeBasic { title status combinesWith { productDiscounts } } ... on DiscountCodeFreeShipping { title status combinesWith { productDiscounts } } } } } } }

Mutation: (https://shopify.dev/docs/api/admin-graphql/2025-01/mutations/discountcodebasiccreate)

Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants