Issue while adding custom field in billing address section in Magento - php

I followed this tutorial for inserting new field in billing address section in Magento checkout.
I added new module, form field in billing.phtml page as described in this tutorial. I make sure that the module is enabled in advanced section in admin panel. And the attribute is saved in eav_attribute, sales_flat_order_address, sales_flat_quote_address tables.
The issue is when I make place order the checkout page become broken and nothing can done.
How can I solve this? Please help..

Related

How to add custom filed name 'mobile number' in customer registration form in magento 2?

I want to add mobile number field in customer registration page. And also want to display that field in admin site customer listing page.
For that I don't want to change in core file. May I create my own extension for that ? If yes then how can i do that please guide me, I am new in magento.
Please go to stores->configuration->customer configuration and enable mobile number.

add billing address field in magento

I need to add a one new billing address field
which should be shown in frontend and admin both also in packaging slip.
For this I have search on google and I found the below link
http://www.magentocommerce.com/wiki/5_-_modules_and_development/how_to_add_custom_field_in_billing_and_shipping_address_in_frontend_and_backend
I have exactly follow all the steps they have suggested ,
but the new field is not appeared in the admin at the customer address section.
I am using the magento1.7.02 version.
Please suggest me what could be the issue or the changes should be.
I have added fields in magento admin panel
using the steps given in the link, directly in the database.
http://excellencemagentoblog.com/magento-adding-custom-field-to-customer-address
Then insert a record and check.
For checkout page, add the field in the path
/app/design/frontend/base/default/template/persistent/checkout/onepage/billing.phtml
Then you have add the address format using the above url. Kindly let me know, if you have any clarification.

Magento Address Field not available in One Page Checkout

I have created couple of custom fields in Magento's customer addresses using a tutorial available here.
When a customer edits his/her address the fields are shown, when he is checking out through the one page checkout being logged in, the addresses appear as a drop down. In this case the address is hidden from the client using a display:none; style.
The problem is that the custom address attributes are not available but the regular attributes are available.
What I think is that when the customer is editing the address, the controller is customer and when he is on onepage the controller is checkout. There is some error or I am missing something so that the onepage controller fails to pull custom address fields.
What I have done:
I have overridden the billing.phtml file in
/app/design/frontend/base/default/template/checkout/onepage
The fields show up in the onepage checkout billing section. But when the system is loading a default address the fields values are not loaded like other values get loaded. For example, the phone number is loaded by calling the function
$this->getAddress()->getTelephone();
but when i call my custom field whose name is address_mobile like
$this->getAddress()->getAddressMobile();
The system can not pull the value, like it pulls for telephone. Below is the source code of how the field appears in hidden section.
The one step checkout does not look for any custom fields.
If you look in app / design / frontend / base / default / template / persistent / checkout / onepage / Billing.phtml
In this instance were looking at the billing address that can be changed you can also do the same for shipping if required.
What you will need to do is update the template file above ( Ideally moving it to your package under app design frontend ). This will be showing the new form fields on the checkout but it wont actually persist to the database. In order to save these values to the database you are going to need to override the OnePageController.php and the saveBilling / saveShipping methods to store your data.
If you need any more help on this let me know and I will look to find an example that you can use.

Create "custom" Customer attributes in registration of Magento 1.7.0.2

I want to create some Custom Customer Attributes (like "company", or "prefered color") during the registration of a new customer in my web shop Magento 1.7.0.2
I have found an extension that creates custom attributes for customer, customer address and category.Hwg_Attributemanager-0.3.0
But it has a major problem...It doesnt show the textfields on the front-end.
(some users working 1.7.0.2 verified that happened to them)
Does anybody know a similar stable extension for 1.7.0.2 Magento for creating custom attributes for customer during registration?
There is a table called customer_form_attribute. That one decides what attributes are shown on which forms. You need to add a record to the table with your attribute. Let's say that your new attribute has the id '25'. You need to add these lines in the table I mentioned.
form_code |attribute_id
customer_account_create|25
customer_account_edit |25
adminhtml_customer |25
checkout_register |25
The last line is not important. If you add it it will show the attribute when registering during checkout.

VirtueMart Custom Address Fields

I'm building a shipping module for Virtuemart 2 for a South African Courier Company, and I need to add a few extra fields to the addresses, and change some existing ones.
I have to add Location Type (Drop down), Building Details (Text) and pre-populate state and city with my own fields (Drop down).
I already managed to find a solution for State, as there is a database table called _virtuemart_states, and adding to that seems to work. However, that’s about as far as I get...
The extra fields should be read and saved by my shipping module for later use... And should also be saved to the address so that a client can check out later using the same address.
try this,
I think the VM2.x is already providing those option.
You can add as many as custom address fields from back end
Under configuration of VM - > Shopper Fields.
www.yousite.com/administrator/index.php?option=com_virtuemart&view=userfields
If you are planning for shipping plugin just check the code for creating custom address fields and try that in your plugin .
Hope its help you..

Categories