News:

Looking for documentation? Take a look on our wiki

Main Menu

Best way to override product price?

Started by Meisseli, October 31, 2018, 13:12:18 PM

Previous topic - Next topic

Meisseli

I am developing VM store (3.x) that need to override the product price when customer is logged in. Situation is that there is a base price, normal VM price for every product, stored in database. When user login to VM, VM need the get the product price from another ERP system from external call (customer number + product id --> returns custom price to VM). So technically the price have to be overridden before adding to cart, ignoring the base price. Since there may be hundreds of customers and thousands of products, we can't set the prices to VM, current price have to be fetched in particular time. Price overriding process may be very near the VM custom text plugin pricing, but propably the plugin is not the preffered way to do this.

Which is the best way to do this? Which PHP files relate to product pricing in general, in /models etc?