-
-
Notifications
You must be signed in to change notification settings - Fork 11
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
Extract method _calculateProductQuantity
in observer
#33
Comments
Thanks for your useful feedback. Indeed, the tagged version is quite old. I would accept a pull request with such a change. Afterwards, I would tag a new version. Mind that we switched the namespace from |
Great, one pull request coming up! :) |
In the observer on line 58...
Is that used to filter out non-configurable products? If so, isn't that already covered by...
If not, please explain :) |
It's been a while since I wrote this code :-) Mind that we iterate over all visible quote items and then filter by |
Correct, I realized that right after posting my comment :) I'm still a bit confused, though. So I think my question is, what scenario is the (Hope I'm making sense) |
Mind that |
Aha, makes sense, tnx! |
Actually, checking for It's already being filtered out in
You agree? |
I think you should be right :-) |
This will be fixed with #34. |
We have the following custom business logic to implement in our aggregation module.
Customers (mostly departments, affiliates, ...) can place orders and together they can lower the price of an item by using a "global" tier pricing setup.
So the final price of an item should be based on the total quantity available in the cart - as implemented right now by this package - plus the quantities already ordered by other customers.
We are using the latest tagged version v2.1.0, where the methods in the observer are defined as
private
. In the master branch, however, they already seem to be defined asprotected
.So we could already rewrite
_calcConfigProductTierPricing
and implement our own logic. Even better, imo, would be to extract the quantity calculation to its own method.This way we could implement our logic in a very DRY way...
Wdyt?
Would you accept a pull request that implements this?
The text was updated successfully, but these errors were encountered: