Hi and thanks for reading, I'm working on magento EE 1.13, here I added new price fields to product edit page (offer price and deal price) beside the original price and special price fields. and here the problem come: I need to make magento use deal price or offer price when they are set, I find it complicated and not easy to find. what I think is maybe I can override addFinalPrice method or override getFinalPrice method, but I'm not sure if it's right, need your help guys in this. any idea will be appreciated, thanks in advance. update: is there any way to save final price in database after saving finishing editing the product?
-
1please echeck this link http://stackoverflow.com/questions/9721583/changing-the-price-in-quote-while-adding-product-to-cart-magento. You have to create your observer with a event(before add product) and set the custom price – mjdevloper Oct 09 '14 at 08:55
-
thak you for your answer and that's what I did at the end :) – rramiii Oct 10 '14 at 11:43
2 Answers
you need to add observer on event catalog_product_get_final_price. please check my below answer.

- 1
- 1

- 1,062
- 10
- 28
-
Yes U R right, that's what I did. because I found many classes defining getFinalPrice() function and will be hard to override them all. – rramiii Oct 10 '14 at 11:41
you misunderstood the concept i guess:
the purpose of the getFinalPrice method is to find the price respecting tier price, special price, and the regular price.
If you just want a final price, give the product a regular price and don't use tier_prices, special prices for the product. It is not for saving but for loading...
Update:
"is there any way to save final price in database after saving finishing editing the product?"
You don´t save the final price, the final price is built dynamically. If you want additional prices you need to add a price attribute and use the final price event to check your additional prices and use them - if needed - as final price.

- 5,395
- 3
- 21
- 27
-
thank you for your respond, I know this information but what I'm trying to do is to add two more prices (deal and offer price) which will take priority on regular, special and tier price. at the end will have 5 levels of pricing instead of 3 :) – rramiii Oct 08 '14 at 17:00
-
catalog rules are applied after setting final price (it's calculated on dispatch of catalog_product_get_final_price event). if my information wrong pleas correct me and will be thank full :) – rramiii Oct 08 '14 at 17:02