0

I want to add customer DOB field in billing address on checkout page, for this I have added below code :

<div class="field">
    <label for="billing:dob" class="required"><em>*</em><?php echo $this->__('Date Of Birth') ?></label>
    <div class="input-box">
        <input type="test" name="billing[dob]" id="billing:dob" value="<?php echo $this->escapeHtml($this->getAddress()->getDob()) ?>" title="<?php echo Mage::helper('core')->quoteEscape($this->__('Date Of Birth')) ?>" class="date-pick input-text validate-date required-entry" data-date-format="dd-mm-yyyy" />
    </div>
</div>

On place order billing address saved in customer but not DOB.

Am I doing something wrong? Is there any other way to do so?

4

You can do it via back-end

Configuration → Customers → Cusotmers Configuration → Name and Address Options

Then make changes in : Show Date of Birth = Optional or required

Note : It will also enable DOB field in billing and customer account registration.

  • When I enable, it is showing in customer account but not on checkout page. – Vinaya Maheshwari Jan 13 '17 at 7:25
  • I have checked it on my store Magento ver. 1.9.2.1 and it's showing there please revert back your changes if you have made. Then check it – Arunendra Jan 13 '17 at 7:26
  • I removed billing.phtml from my theme but still not showing. – Vinaya Maheshwari Jan 13 '17 at 7:31
  • Please clear your cache as well as – Arunendra Jan 13 '17 at 7:33
  • I cleared cache, but still not showing, And when I tried with my code (as in question) also not saving value in attribute. – Vinaya Maheshwari Jan 13 '17 at 9:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.