Magento – Add new field in customer billing and shipping page

custommagento-1.9

I used this tutorial: Add new field in magento(1.9) customer registration to add new custom field in magento.

But I want to show custom field in billing and shipping address. How to do this?

Best Answer

Ok. Lets Go to your "billing.phtml" file Which is Located at

frontend\rwd\default\template\persistent/checkout/onepage/billing.phtml

And Paste Following Code If You want to Checkbox Field.

<div class="field">
    <input id="p_method_cashondelivery" value="cashondelivery" type="checkbox" name="cod" title="Cash On Delivery" onclick="<?php echo "checked!!!!";?>" class="checkbox" autocomplete="off">
    <label for="p_method_cashondelivery">Cash On Delivery </label>
</div>

Same Way You Can Add Custom Field In Shipping Address File.

frontend\rwd\default\template\checkout/onepage/shipping.phtml