{docurl}
Adding a button to copy Shipping info to Billing info
Although the data will be copied over if you click "update" sometimes it is definitely convenient to have a button that does it immediately. This can be accomplished by adding some javascript to the "Main page template" on the "Main Page" tab.
Right under the %beginform% token add the code:
<script language="JavaScript">
function CopyBilltoShipto()
{
document.PhoneOrdersMain.BillFirstName.value = document.PhoneOrdersMain.ShipFirstName.value;
document.PhoneOrdersMain.BillLastName.value = document.PhoneOrdersMain.ShipLastName.value;
document.PhoneOrdersMain.BillEmail.value = document.PhoneOrdersMain.ShipEmail.value;
document.PhoneOrdersMain.BillPhone.value = document.PhoneOrdersMain.ShipPhone.value;
document.PhoneOrdersMain.BillFax.value = document.PhoneOrdersMain.ShipFax.value;
document.PhoneOrdersMain.BillCompany.value = document.PhoneOrdersMain.ShipCompany.value;
document.PhoneOrdersMain.BillAddress.value = document.PhoneOrdersMain.ShipAddress.value;
document.PhoneOrdersMain.BillCity.value = document.PhoneOrdersMain.ShipCity.value;
document.PhoneOrdersMain.BillStateSelect.value = document.PhoneOrdersMain.ShipStateSelect.value;
document.PhoneOrdersMain.BillState.value = document.PhoneOrdersMain.ShipState.value;
document.PhoneOrdersMain.BillZip.value = document.PhoneOrdersMain.ShipZip.value;
document.PhoneOrdersMain.BillCountry.value = document.PhoneOrdersMain.ShipCountry.value;
}
</script>
then where you want the button to display add html that will run the function when the button is clicked:
<input type="button" value="Copy Shipping to Billing" ONCLICK="JavaScript:CopyBilltoShipto();">
Last update: 2009-10-21 23:37
Author: Michael Brock
Revision: 1.0
You cannot comment on this entry
Records in this category
- I do not want all users of the module to be able to change the product price and/or quantity while taking orders. How do I do this?
- Is it possible to display the inventory count, short message, etc. (from Merchant's inventory feature) on the product listing and basket pages?
- Is it possible to sort the product in the "product listing" on the Product Search pop-up?
- Is it possible to control whether or not in-active products are displayed in the "Product Search" listing?
- The page loads sometimes take a little while. Is it possible to display a "loading" graphic to remind the user that the page is loading?
- How can I display the Order Status Manger's "Order note" field on the Phone Order Manager page?
- I use the %stocklevel% token to display the inventory count of products listed in the "Search products" window but they are not matching the inventory count in Merchant admin. Why?
- Is it possible to display the fields added by Merchant's Customer Custom Fields module on the Phone Order Manager page and to edit the data?
- How do I display the Shopper Selected Sales Tax list on my Phone Order Manager page?
- What does the "Add all products in ctgy:" option do?
- Is it possible to enter items into the basket which are not in Merchant's databases, such as auction items?
- Is there any way to add a negative number to the basket total, for example, to give a discount to a customer?
- Is it possible to display a link in Phone Order Manager which will add a product to the basket or bring up the Product Search window with results for a particular search term? For example, I'd like to be able to see all results for "certs".
- How do I add new users?
- How can I set a default price group to use for all customers?
- Issues with restricting order quantity by Merchant's inventory feature
- Collecting payment data on the POM page
- Using our Coupons module with Phone Order Manager
- Using Gift Certificate Manager with Phone Order Manager
- Adding a button to copy Shipping info to Billing info














