3

Hi I'm using Magento 2.

I'm trying to override Pricing\Price\ConfigurablePriceResolver by adding a plugin or preference in the app/code folder but I can't make it work.

I need to replace the function resolvePrice() in

Magento\ConfigurableProduct\Pricing\Price\ConfigurablePriceResolver

with my custom code so it won't have any bug.

bumped to the homepage by Community 17 hours ago

This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.

0

There is an excellent answer to the plugin option of your questions here: how magento getting configurable product lowest price of associated products?

You can see the setup of the module and an aroundResolvePrice method/function

I have worked on this problem before and came to conclusion that it may not be possible to use a preference for ConfigurablePriceResolver. I only say this because I could not get my extension to have any effect using a preference no matter how I tried it. If somebody knows how I'd love to see that.

  • This does not really answer the question. If you have a different question, you can ask it by clicking Ask Question. You can also add a bounty to draw more attention to this question once you have enough reputation. - From Review – Jai Jan 27 at 23:03
  • The linked answer I provided shows him exactly how to setup the aroundResolvePrice plugin method that he requested. The other half explains my suspicion that a preference can not be used on this type of class. – Todd Jan 28 at 19:36
  • Perhaps it would have been better to leave this question without any suggestion for a solution like 90% of the dang questions here. Really frustrating to be called out for helping @Jai, especially since you contributed NOTHING to this question. :) – Todd May 14 at 15:48

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.