Magento – How to get “address_id” from quote

magento-1.9multishippingquoteshipping-address

I'm trying to get address_id of sales_flat_quote_address table as mentioned in attached image from quote during multi-shipping checkout process but no luck. I want to use that address_id in following file path. Any help should be appreciated. Thanks.
File Path:-
/app/code/local/Mage/Shipping/Model/Carrier/Flatrate.php

sales_flat_quote_address Table

Best Answer

Have you tried these:

$quote->getBillingAddress()->getId(); // billing address id
$quote->getShippingAddress()->getId(); // shipping address id

For multi-shipping:

$addresses = $quote->getAllShippingAddresses();
foreach ($addresses as $address) {
    $address_id = $address->getId();
}
Related Topic