I want to set billing and shipping address to Quote. Actually I am creating an API for which I need to get Shipping Price and other normal checkout information. So I am thinking that, if I can able to set billing and shipping address to quote then it will easy to fetch shipping price from quote. Please help me to achieve this. Many thanks.
The quote class has:
public function setBillingAddress(Mage_Sales_Model_Quote_Address $address) public function setShippingAddress(Mage_Sales_Model_Quote_Address $address) public function addAddress(Mage_Sales_Model_Quote_Address $address)
the address object is:
$address = Mage::getModel('sales/quote_address')->setAddressType($type);
$type can be
or simply use:
public function getBillingAddress() public function getShippingAddress()
both again methods of the quote object.
$quoteObject->collectTotals() to get the totals calculated.