Conversation
…be shown, made sure the best offer among them is shown when there's multiple bumps for same products with different 'offer price' and they all are eligible to show in the checkout page, made sure the one with be 'best offer' (cheapest price) show's for that offer product. Before this fix, in the described scenario the bump that was created last was showing in the checkout page for that 'offer product' regardless of their 'offer price', which shouldn't be the case. For more clarity, take 2 bumps for example, where both of the bump is for a product 'smartphone'. One of the bump is like: 'if you buy a 'laptop' you'll get '30% discount' on the 'smartphone'. And the other one is, if you buy a 'macbook' you'll get '50% discount' on the 'smartphone'. Now, if a customer adds both 'laptop' & 'macbook' to their cart which one of 'those 2 discounts for the smartphone' should be shown? should he see the '30%' or should he see the '50%' discount? Clearly he should get the 'best' among those 2 which is '50%'. And that's basically what was done in this commit. Resolves #47
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
when there's multiple bumps for same products with different 'offer price' and they all are eligible to be shown in the checkout page, made sure the one with be 'best offer' (cheapest price) show's for the bump.
Before this fix, in the described scenario the bump that was created last, was showing in the checkout page for that 'offer product' regardless of their 'offer price', which shouldn't be the case.
For more clarity, take 2 bumps for example, where both of the bumps is for a product
smartphone. One of the bump is like: if you buy alaptopyou'll get30% discounton thesmartphone. And the other one is, if you buy amacbookyou'll get50% discounton that samesmartphone.Now, if a customer adds both
laptop&macbookto their cart which one of 'those 2 discounts for the smartphone' should be shown?should he see the '30%' or should he see the '50%' discount?
Clearly he should get the 'best' among those 2 which is '50%'.
And that's basically what was done in this commit. Before this fix it used to show the 'offer price' from the bump that was created last.
Resolves #47