Skip to content
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

Discount applied N times per cart #7259

Open
danFbach opened this issue Jul 17, 2024 · 1 comment
Open

Discount applied N times per cart #7259

danFbach opened this issue Jul 17, 2024 · 1 comment

Comments

@danFbach
Copy link
Contributor

I've searched the forums and made a post related to this, but I don't believe this is possible with the current code base.

I'm trying to build a discount rule that allows a discount rule to be applied once per cart.

With a discount like:
image
With many products assigned to it as eligible for discount, the first item of each product is discounted at 100%.

I want it to only discount ONE of MANY, once per cart.

I'm trying to build a discount rule to support this, but there is no information available in the DiscountRequirementValidationRequest model about what discounts have already been applied to the cart and if one were to try to parse the cart again, it would result in stack overflow because you would eventually call that DiscountRequirement again which would call it self again...

I thought about storing a temp setting saying discount x is applied on customer y's cart, on product z, but since the DiscountRequirementValidationRequest model doesn't contain any info about the product it is validating for either, this isn't possible.

Am I missing something that could be used to enable a function like this? From what I've tried, I think something needs to be changed outside of the plugin area to support a function like this.

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

No branches or pull requests

3 participants