[4.0] Output Produce Price When Call For Price Is Ticked?

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
4 yıl önce
Hi All,

I was wondering if there is a way to output the product price even if call for price is ticked?

The reason I want this is because I want to use the price behind the scenes for a JS finance calculator, but I still want it to say "Call for price" on the page and in the search.

Any ideas would be fantastic.

Cheers
4 yıl önce
You could create a plugin which injects the required information on the product page, you write your own method for retrieving the price which extends ProductModelFactory. This way you don't break code, no modifications to source and can easily be upgraded. I believe this would be the best way to achieve this.

Have a look at

Presentation/Nop.Web/Factories/ProductModelFactory.cs >  PrepareProductPriceModel
4 yıl önce
Hi, Is there a tutorial that shows how to extend something like this via a plugin?  I've been changing source code because I can't seem to wrap my head around how a plugin might do this. The examples I've found are too simple and there's so many layers of abstraction, not sure where to start.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.