0

I was in the process of adding a custom field in the Magento Billing and checkout process. So far, I have successfully added it in the front-end. But it won't save to the database, so I guess this is where the error lies.

I have already created a module, all with the xml files and mysql files.

The question is...

When I added the field in the phtml files, like the following

<input type="text" id="billing:company" name="billing[company]" value="<?php echo $this->escapeHtml($this->getAddress()->getCompany()) ?>" title="<?php echo $this->__('Company') ?>" class="input-text <?php echo $this->helper('customer/address')->getAttributeValidationClass('company') ?>" />

What exactly is this one?

$this->getAddress()->getCompany()

And how will I be able to make one for my custom field? For example I added a field with the Ability attribute. Should I have something like the following?

$this->getAddress()->getAbility()

Thanks.

Severino Lorilla Jr.
  • 1,637
  • 4
  • 20
  • 33

1 Answers1

0

Take a look @

Add custom field in the billing and shipping address in the checkout and customer address edit page in frontend and customer addresses details in Admin

MagePal Extensions
  • 17,646
  • 2
  • 47
  • 62
  • @ R.S, Please look: http://stackoverflow.com/questions/29794666/issue-while-adding-custom-field-in-billing-address-section-in-magento – Deepu Sasidharan Apr 22 '15 at 10:31