How i can round rule_price from table catalogrule_product_price ?
i try to change calcPriceRule from Mage_CatalogRule_Helper_Data, no results!
have you an idea of what function save rule_price in catalogrule_product_price ?
Thanx
Magento Stack Exchange is a question and answer site for users of the Magento e-Commerce platform. It only takes a minute to sign up.
Sign up to join this communityHow i can round rule_price from table catalogrule_product_price ?
i try to change calcPriceRule from Mage_CatalogRule_Helper_Data, no results!
have you an idea of what function save rule_price in catalogrule_product_price ?
Thanx
I think the easiest would be to hook into the event catalog_product_get_final_price
and just round the price to the amount you want.
Is there anywhere on Magento.stackexchange a great answer how to implement an observer I can link to for the future? To lazy to write it down all the time, please add the link to the comments
You can see this Mage_CatalogRule_Model_Observer
, function processFrontFinalPrice
it's called when get final price, so you can change something in this.
if (!isset($this->_rulePrices[$key])) {
$rulePrice = Mage::getResourceModel('catalogrule/rule')
->getRulePrice($date, $wId, $gId, $pId);
$this->_rulePrices[$key] = $rulePrice;
}
By override model observer.
Some articles, maybe relate to