Read Product.Price from web service

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
7 years ago
I am integrating nopCommerce to an ERP System. Now nopCommerce is showing the products and their prices. What I want to do is, to not show the prices in the MS SQL database, but for every product just before it is shown to read the price from a web service in our ERP system. I tried much to find the code line where the price of the products is set to change or override it, but still I couln't find it.
Where have I to overwrite to not show the product.price from database but my own price?
7 years ago
This may not be the most efficient method, because if you read the price everything it's displayed, it'll slow down your site a lot. How often is the price updated?
7 years ago
Yes, I know and I agree, but still our company wants to do that. If I want to do that, can you tell me where I find the code and have to change?
7 years ago
wooncherk wrote:
This may not be the most efficient method, because if you read the price everything it's displayed, it'll slow down your site a lot. How often is the price updated?

The price must be read at two different time schedules:
1. When reading the products and listing them, then the price must be read from ERP, because every customer has its own price. For that the price of the product with the amount of 1 will be read. This price could be changed once daily. (Maybe we can read the prices for this option once a week, but then we need to save different prices per customer). Where can I implement that?
2. When selecting a product for shopping cart, then the price must be read from the ERP. This time the price is dependent from the customer, product, the amount that is selected and some other properties. So this time it must be directly read from the ERP. Where can I implement that?
7 years ago
Hi,

for it you need to  change code of PriceCalculationService.cs
Either change code or override these methods via plugin.

GetUnitPrice
GetFinalPrice

Be Careful you need to check everything after implement your changes.

May be Just override GetUnitPrice will work for you..
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.