Jump to content

Controle prices from external source


maxime_06

Recommended Posts

Hi
I do not know PrestaShop. I envision it for my project, but I have a particular constraint: The prices of the articles come from an external database where they are pre-calculated for each couple article / customer.
So from PrestaShop, I have to 'overload' getting the price function, by personnal PHP code which will access to the external database. I don't want to populate prices into PrestaShop database. My prices will stay in the external database and i must fetch a price each time an article is displayed.
Is it possible to do that with PrestaShop ?
Maybe with a hook system ?
Thank you for your answers.

Link to comment
Share on other sites

I do not think there is wan easier way to do that without updating PrestaShop database.

Since the price is always load from database at every where. Some places load data into an entity/class object, other places just read from database into an array.

 

You may have to write code to override the price one by one, for each in Product Detail page, you can override the price after the object $product is loaded.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...