Magento – Set shipping address for a quote

cartmagento-1.9quoteshippingshipping-address

I want to set shipping address for a particular quote.

I load quote:

$quote = Mage::getModel('sales/quote')->load($quoteId);

I load address from a customer model:

$shippingAddress = Mage::getModel('customer/address')->load($addressId);

after that i want to set shipping address by this code:

$quote->setShippingAddress($addressId)->save();

but setShippingAddress method returns me an error:

Internal Error. Please see log for details

I have no idea how to resolve that.

Best Answer

According to your error:

var/www/html/magentoce/app/code/core/Mage/Api/Model/Server/Adapter/Soap.php in Line:196

Which corresponds to that code:

if ($this->_extensionLoaded()) {
            throw new SoapFault($code, $message);
        }

Where $this->_extensionLoaded is the following:

protected function _extensionLoaded()
    {
        return class_exists('SoapServer', false);
    }

It looks like the problem is caused by the fact that you don't have SOAP installed/enabled on your server.