I have a store which has a slightly modified checkout.
I can't find the exact link right now on the original example, but I ditched the address drop-down and added an address grid where it lists the addresses in a grid layout with a button below to add a new one (you click it and a form opens)
EDIT: http://hkpatel201.blogspot.co.uk/2013/04/change-shipping-address-dropdown-at.html Might be the tutorial.
This works fine, but it can be a bit confusing for some customers.
Is there way of adding a "delete address" link within the checkout? There's one in the account panel:
<a href="#" onclick="return deleteAddress(this.id);" class="red-link"><?php echo $this->__('Delete Address') ?></a>
And
<script type="text/javascript">
//<![CDATA[
function deleteAddress(addressId) {
if(confirm('<?php echo Mage::helper('core')->jsQuoteEscape($this->__('Are you sure you want to delete this address?')) ?>')) {
window.location='<?php echo $this->getDeleteUrl() ?>id/'+addressId;
}
return false;
}
//]]>
</script>
Which I naively thought would work within the checkout, but it didn't.
Deleting an address via the customer model is straightforward, so surely as long as the page refreshes I should have no problem?
Plus, the administrator can just as easily remove addresses as well, so it can't have any consequences on relationships with old orders etc.
Any help would be awesome :)
Tom