When we take a look at template/checkout/onepage/billing.phtml
we can see that the dropdown actually comes from the function getAddressesHtmlSelect
, this function is located in the block class extended by the billing block being Mage_Checkout_Block_Onepage_Abstract
.
Here you can see that a couple of values are required for each address being the database ID coming from the table customer_address_entity
and the formatted address value. So if we're gonna add an address to that list it is required to have it exist as an entity in the database. Although I've never used it before you should be able to load an address like so
$address = Mage::getModel('customer/address')->load(14); // 14 is the id of the address
In your case I would suggest extending the function from that class in your own custom extension and making it work something like this. (mind you, this is untested)
class Namespace_Block_Model_Onepage_Abstract extends Mage_Checkout_Block_Onepage_Abstract
{
public function getAddressesHtmlSelect($type)
{
if ($this->isCustomerLoggedIn())
{
$options = array();
// this is getting your fixed address
$address = Mage::getModel('customer/address')->load(14);
$options[] = array(
'value' => $address->getId(),
'label' => $address->format('oneline')
);
// resume default working or function
foreach ($this->getCustomer()->getAddresses() as $address) {
$options[] = array(
'value' => $address->getId(),
'label' => $address->format('oneline')
);
}
$addressId = $this->getAddress()->getCustomerAddressId();
if (empty($addressId)) {
if ($type=='billing') {
$address = $this->getCustomer()->getPrimaryBillingAddress();
} else {
$address = $this->getCustomer()->getPrimaryShippingAddress();
}
if ($address) {
$addressId = $address->getId();
}
}
$select = $this->getLayout()->createBlock('core/html_select')
->setName($type.'_address_id')
->setId($type.'-address-select')
->setClass('address-select')
->setExtraParams('onchange="'.$type.'.newAddress(!this.value)"')
->setValue($addressId)
->setOptions($options);
$select->addOption('', Mage::helper('checkout')->__('New Address'));
return $select->getHtml();
}
return '';
}
}
Now all you need to do is create an address in the database and use it's ID in the load function.