Jump to content

Hook and/or override to modify product price


Recommended Posts

Hello,

 

Can anyone tell me which hook and/or override I need to modify if I want to create my own module to modify a product price?

 

The situation is like this: every customer on our shop can have a different price for a product. It's possible that customer A has to pay 50 EUR for product A, while customer B only has to pay 40 EUR for the same product. The logic for this rule has already been written, all I need to know is where to implement it.

Basically what I need is something like a function where the input is the product & the logged in customer (this I can get from the session) and it will return the new price. but I can't find which hook I need to implement in my module or which override I need to modify.

 

Anyone any clue which one I need ? thanks :)

Link to comment
Share on other sites

Yep, I looked into that, and that is unfortunately not enough - customers can be in more than 1 customer group :) and prestashop unfortunately doesn't handle that well, it will only handle the price/discount for the default customer group. so if my client will be in customer group A, which gives 10% discount on products in category A, and also in customer group B, which gives 10% discount on products in category B, then he will get only 10% discount in one of those categories - dependable on which one is his default - not in both.

Link to comment
Share on other sites

my code logic is basically just a call to a remote server :) so really, the prestashop code will be very minimum :) i just need to have the have the customer & product id, make the remote request, and give back the response (which will be the price).

so, very simple I guess :)

Link to comment
Share on other sites

  • 4 weeks later...
×
×
  • Create New...