We use the SOAP API to process orders and carts, and would like to able to override the default price in some cases.

I have played around with the options and bundle_options variables as outlined in documentation, but can never seem to get a custom price to be used when adding the item to the cart.

Is this functionality natively supported through the API? If not, are there plugins that add support for this through the API?

  • There is no native method/function for this. Seems you have to rewrite the add method of Mage_Checkout_Model_Cart_Product_Api to achive your goal. Oct 20 '14 at 11:12

You can use an observer class to listen to checkout_cart_product_add_after, and use a product’s “Super Mode” to set custom prices against the quote item.

In your /app/code/local/{namespace}/{yourmodule}/etc/config.xml:


And then create an Observer class at /app/code/local/{namespace}/{yourmodule}/Model/Observer.php

    class <namespace>_<modulename>_Model_Observer
        public function modifyPrice(Varien_Event_Observer $obs)
            // Get the quote item
            $item = $obs->getQuoteItem();
            // Ensure we have the parent item, if it has one
            $item = ( $item->getParentItem() ? $item->getParentItem() : $item );
            // Load the custom price
            $price = $this->_getPriceByItem($item);
            // Set the custom price
            // Enable super mode on the product.

        protected function _getPriceByItem(Mage_Sales_Model_Quote_Item $item)

            //use $item to determine your custom price.

            return $price;


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.