Magento – Show custom price for product In all the pages

catalogmagento-1.9priceproduct

I want to change the price accordingly to custom conditions which i created in my custom module. I rewrote the price model file in my custom module like

<models>
    <catalog>
        <rewrite>
            <product_type_price>My_Module_Model_Price</product_type_price>
        </rewrite>
    </catalog>
</models>

Also I rewrote the function in my price model file

public function getPrice($product){ ... 
    My Conditions Logic.....
    return $new_price;
}

in price model file. $new_price is the price which I get from the calculations from my condition logic. My Problem is that in Product List Page, if my custom price is greater than The Default Price of Product then my custom price becomes regular price and Magento marks the default price as Special Price. While if my custom price is less than the default price then only default price is displayed while in Product View Page My Custom Price is Displaying correctly. I attach screen shot of list page. Can anyone tell me what I am missing.

enter image description here

Best Answer

Check your list.phtml file there is condtion which displays regular price and special price. it should give you direction on what is happening.

Related Topic