I have created the module for adding the new custom field in the
Billing and Shipping address of the Onepage checkout. All the code of
the module is given below. Step: – 1
Add Custom Field into Billing Address tab of the Onepage Checkout in Frontend. app\design\frontend\[Package_name]\[Theme_name]\template\checkout\onepage\billing.phtml
Step: – 2
Add Custom Field into Shipping Address tab of the Onepage Checkout in Frontend. app\design\frontend\[Package_name]\[Theme_name]\template\checkout\onepage\shipping.phtml
Step: – 3
Add Custom Field into Customer Address Edit tab in Frontend. app\design\frontend\[Package_name]\[Theme_name]\template\customer\address\edit.phtml
I have made some changes to the Address Templates in Magento Admin. if
you are using Magento Version 1.3.2.4 then you have to made changes in
the following file. app/code/core/Mage/Customer/etc/config.xml
and if you are using Magento Upper Version than 1.3.2.4 then you can
chage from the Admin panel of the Magento as given following path. System->Configuration->Customers->Customer Configurations->Address Templates
Add following code in the “Text” Textarea.
Step: – 5
I have made some changes to the Address Templates in Magento Admin. if
you are using Magento Version 1.3.2.4 then you have to made changes in
the following file. app/code/core/Mage/Customer/etc/config.xml
and if you are using Magento Upper Version than 1.3.2.4 then you can
chage from the Admin panel of the Magento as given following path. System->Configuration->Customers->Customer Configurations->Address Templates
Add following code in the “HTML” Textarea.
I have made some changes to the Address Templates in Magento Admin. if
you are using Magento Version 1.3.2.4 then you have to made changes in
the following file. app/code/core/Mage/Customer/etc/config.xml
and if you are using Magento Upper Version than 1.3.2.4 then you can
chage from the Admin panel of the Magento as given following path. System->Configuration->Customers->Customer Configurations->Address Templates
Add following code in the “PDF” Textarea.
Steps for adding a custom field in the default Contact Us form are given below: Step 1: Update the Contact Us form
First you have to edit the form.phtml file form template. which is located in (For default theme):
app/design/frontend/base/default/template/contacts/form.phtml
Now open the form.phtml file Add the following code in the desired position:
Note: Here i used above code for my requirment. You should use code as your requirment. I used class=”required-entry” on the above code. This tells to the javascript validation that this field is required. Step 2: Create a custom transactional email template for Contact Form
Now you need to create a custom email template for contact form with include the new field. To do this-
Go: System -> Transactional Emails from Magento backend. then follw:
Click on the Add New Template button
From Load default template section, select “Contact Form” from the dropdwn list and click Load Template button.
In the Template Information section, set the Template Name to “Custom Contact Form”
In the Template Content field, add the Name Prefix: {{var data.name-prefix}} line which is like:
Now click on the Save Config button. Step 3: Assign the Custom template for Contact Us
Now you have to assign Custom templete for your Contact Us form. To do this-
Go: System -> Configuration . Then click on the Contacts tab from left panel under the General.
In the Email Options section, set the Email Template to “Custom Contact Form”. which like-
After that click on the Save Config button and you’re all done.
SET FOREIGN_KEY_CHECKS=0;-- Here's where we reset the orders TRUNCATE`sales_flat_order`;TRUNCATE`sales_flat_order_address`;TRUNCATE`sales_flat_order_grid`;TRUNCATE`sales_flat_order_item`;TRUNCATE`sales_flat_order_status_history`;TRUNCATE`sales_flat_quote`;TRUNCATE`sales_flat_quote_address`;TRUNCATE`sales_flat_quote_address_item`;TRUNCATE`sales_flat_quote_item`;TRUNCATE`sales_flat_quote_item_option`;TRUNCATE`sales_flat_order_payment`;TRUNCATE`sales_flat_quote_payment`;TRUNCATE`sales_flat_shipment`;TRUNCATE`sales_flat_shipment_item`;TRUNCATE`sales_flat_shipment_grid`;TRUNCATE`sales_flat_invoice`;TRUNCATE`sales_flat_invoice_grid`;TRUNCATE`sales_flat_invoice_item`;TRUNCATE`sendfriend_log`;TRUNCATE`tag`;TRUNCATE`tag_relation`;TRUNCATE`tag_summary`;TRUNCATE`wishlist`;TRUNCATE`log_quote`;TRUNCATE`report_event`;ALTERTABLE`sales_flat_order`AUTO_INCREMENT=1;ALTERTABLE`sales_flat_order_address`AUTO_INCREMENT=1;ALTERTABLE`sales_flat_order_grid`AUTO_INCREMENT=1;ALTERTABLE`sales_flat_order_item`AUTO_INCREMENT=1;ALTERTABLE`sales_flat_order_status_history`AUTO_INCREMENT=1;ALTERTABLE`sales_flat_quote`AUTO_INCREMENT=1;ALTERTABLE`sales_flat_quote_address`AUTO_INCREMENT=1;ALTERTABLE`sales_flat_quote_address_item`AUTO_INCREMENT=1;ALTERTABLE`sales_flat_quote_item`AUTO_INCREMENT=1;ALTERTABLE`sales_flat_quote_item_option`AUTO_INCREMENT=1;ALTERTABLE`sendfriend_log`AUTO_INCREMENT=1;ALTERTABLE`sales_flat_order_payment`AUTO_INCREMENT=1;ALTERTABLE`sales_flat_quote_payment`AUTO_INCREMENT=1;ALTERTABLE`sales_flat_shipment`AUTO_INCREMENT=1;ALTERTABLE`sales_flat_shipment_item`AUTO_INCREMENT=1;ALTERTABLE`sales_flat_invoice`AUTO_INCREMENT=1;ALTERTABLE`sales_flat_invoice_grid`AUTO_INCREMENT=1;ALTERTABLE`sales_flat_invoice_item`AUTO_INCREMENT=1;ALTERTABLE`sales_flat_shipment_grid`AUTO_INCREMENT=1;ALTERTABLE`tag`AUTO_INCREMENT=1;ALTERTABLE`tag_relation`AUTO_INCREMENT=1;ALTERTABLE`tag_summary`AUTO_INCREMENT=1;ALTERTABLE`wishlist`AUTO_INCREMENT=1;ALTERTABLE`log_quote`AUTO_INCREMENT=1;ALTERTABLE`report_event`AUTO_INCREMENT=1;-- Here's where we reset the customersTRUNCATE`customer_address_entity`;TRUNCATE`customer_address_entity_datetime`;TRUNCATE`customer_address_entity_decimal`;TRUNCATE`customer_address_entity_int`;TRUNCATE`customer_address_entity_text`;TRUNCATE`customer_address_entity_varchar`;TRUNCATE`customer_entity`;TRUNCATE`customer_entity_datetime`;TRUNCATE`customer_entity_decimal`;TRUNCATE`customer_entity_int`;TRUNCATE`customer_entity_text`;TRUNCATE`customer_entity_varchar`;TRUNCATE`log_customer`;TRUNCATE`log_visitor`;TRUNCATE`log_visitor_info`;ALTERTABLE`customer_address_entity`AUTO_INCREMENT=1;ALTERTABLE`customer_address_entity_datetime`AUTO_INCREMENT=1;ALTERTABLE`customer_address_entity_decimal`AUTO_INCREMENT=1;ALTERTABLE`customer_address_entity_int`AUTO_INCREMENT=1;ALTERTABLE`customer_address_entity_text`AUTO_INCREMENT=1;ALTERTABLE`customer_address_entity_varchar`AUTO_INCREMENT=1;ALTERTABLE`customer_entity`AUTO_INCREMENT=1;ALTERTABLE`customer_entity_datetime`AUTO_INCREMENT=1;ALTERTABLE`customer_entity_decimal`AUTO_INCREMENT=1;ALTERTABLE`customer_entity_int`AUTO_INCREMENT=1;ALTERTABLE`customer_entity_text`AUTO_INCREMENT=1;ALTERTABLE`customer_entity_varchar`AUTO_INCREMENT=1;ALTERTABLE`log_customer`AUTO_INCREMENT=1;ALTERTABLE`log_visitor`AUTO_INCREMENT=1;ALTERTABLE`log_visitor_info`AUTO_INCREMENT=1;-- This is to Reset all the ID countersTRUNCATE`eav_entity_store`;ALTERTABLE`eav_entity_store`AUTO_INCREMENT=1;SET FOREIGN_KEY_CHECKS=1;