6

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.

1
  • Did you find the solution for this? I'm having the same issue.
    – andy jones
    Aug 28, 2019 at 7:49

1 Answer 1

1

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.

4
  • @slayerbleast You are always welcome :) May 9, 2018 at 13:23
  • is it possible to set negotiated price is greater than original price ? Oct 2, 2018 at 9:51
  • @PratikMehta It will apply for all user, not for particular Oct 2, 2018 at 9:52
  • Yes, But i can not do this i actually stuck on $quote->collectTotals(); code. Could you please help me ? Oct 2, 2018 at 9:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.