Question

I figured out that if you set a tier price higher than the regular price, it will show the regular price anyway. Seems this is the "normal" funcionality, always show the lower price if it's possible.

But I need to change this funcionality, for example set a regular price of $10 for a product and $15 for a customer group X.

How can I do it? I don't know what to modify, I looked for getFinalPrice functions, but I don't see clearly where it does this logic of get the lower price.

Was it helpful?

Solution

For your problem

You can look in this file

vendor/magento/module-catalog/Model/Product/Type/Price.php

Go to above file and start debugging as your issue related to tier price

you can look below methods for this issue

  • getBasePrice()

  • _applyTierPrice()

  • calculatePrice()

I think you need to modify all three methods.

Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top