Showing results for 
Search instead for 
Did you mean: 

Price calculed from external DB

Price calculed from external DB

Under Magento 1, I had programmed to calculate, on the fly, a simple item price from an external Db.

For that, I had overloaded the Mage\Catalog\Model\Product::getFinalPrice() method.

This made it possible to calculate the price of the products in the catalog and in the shopping cart (with the quantity ordered as a parameter).


Under Magento 2, the overload of the \Magento\Catalog\Model\Product::getFinalPrice method does not have the same result. The prices displayed in the shopping cart do not correspond to the calculated one.


Does anyone have any idea how to realize this?