Magento – Apply customer specific price

customshopping-cart-price-rules

I have to make a shop on which products' prices are specific per customer.

I must call an external service which returns me a product price depending of a customer and an ordered quantity.

First, do you think it's possible ?

I don't know where to start. I think I need to programmatically apply a custom shopping cart price rules defined by a custom extension but I don't know how to do this.

Where to start ?
How/Where to deal with price value which depend of ordered quantity ?

Thanks.

Best Answer

Hello You need to override the Price Model name as Mage_Catalog_Model_Product_Type_Price

and override the Method getPrice($product) and hear you can call the external price price through API.

For Example. this pseudo code

if(you have customer Id then) {
        // Call the Extenal API and bind the Price hear.
        return Mage::helper('price/data')->getPrice($product);
    } else {
        //else return Default Magento Price.
        return $product->getData('price');
}

Hope this will help you.

Related Topic