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

Add PostCartAmountIncDiscCodeQualifier #108

Merged
merged 1 commit into from
Jun 23, 2024
Merged

Conversation

jgodson
Copy link
Owner

@jgodson jgodson commented Jun 23, 2024

Adds the new feature for #107

Before (using two qualifiers to attempt this):
image

After:
image

image

classesUsed.forEach((className) => {

// Qualifier and PostCartAmountQualifier need to come first since they are inherited by other classes
const classNameOrder = ["Campaign", "Qualifier", "PostCartAmountQualifier", "Selector"];
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because of the new inheritance from PostCartAmountQualifier, I needed to make sure the classes were declared before inheriting from them.

@@ -427,6 +442,7 @@ ${INDENT[this.IL]})`;
if (classesUsed.indexOf(inheritsFrom) === -1) {
classesUsed.push(inheritsFrom);
}
addUsedClass(inheritsFrom, allClasses);
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Didn't have second level inheritance accounted for (ie: NewestThing > Thing and then Thing > OldestThing), but this covers that.

@jgodson jgodson merged commit 9ab04aa into master Jun 23, 2024
1 check passed
@jgodson jgodson deleted the discouted-subtotal-both branch June 23, 2024 14:27
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

Successfully merging this pull request may close these issues.

1 participant