If I wanted to change the function getPrice for instance? [Edit] Lets suppose that I wanted to change the way that the price is calculated. e.g.: if the customer is from a certain state, the price should be multiplied by 1.12.

closed as unclear what you're asking by Jai, Manoj Deswal, Dhiren Vasoya, Piyush, sv3n Feb 9 '18 at 13:09

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.


The best way to change would be using Plugins(Interceptors)

There are three types of plugins:

  • before
  • around
  • after

You can read more about here http://devdocs.magento.com/guides/v2.0/extension-dev-guide/plugins.html