Snippets with the tag: shipping

Check if shipping methods are available

Description

function to know that there is any shipping method available

Code

public function haveShippingMethods()
{
	if (count(Mage::getSingleton('checkout/session')->getQuote()->getShippingAddress()->getShippingRatesCollection())) {
		return true;
	}
	return false;
}

Array of billing and shipping addresses

Description

use this code to get an array of billing address and shipping address

Code

$all_data = array();
$customer = Mage::getModel(‘customer/session’)->getCustomer();
foreach($customer->getAddressesCollection() as $customer_address)
{
$all_data[] = $customer_address;
}
var_dump($all_data);