maxime_06 Posted July 12, 2016 Share Posted July 12, 2016 HiI 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 More sharing options...
shokinro Posted July 13, 2016 Share Posted July 13, 2016 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 More sharing options...
Simonas Invertus Posted July 14, 2016 Share Posted July 14, 2016 Yes, it is possible. No, there is no hook for this thing. You will need to do override. But as shokinro said it is strongly recommended to use database. You can call cron job for webservice and update database with new prices every hour or more often if there is a need. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now