1. In the Orders Billing template, wrap a div around the Shipping Address section and give it an id, like so:
Code: Select all
<div id="shippingaddress">
<!-- shipping address section goes here /-->
</div>
Code: Select all
{JQueryTools action='incjs' include=''}
{literal}
<__script__ type="text/javascript">
//on page load
$(document).ready(function() {
// Hide Shipping Address by Default then inject checkbox
$("#shippingaddress").hide().before('<p><strong>Shipping Address is same as Billing:</strong><input id="copyaddress" type="checkbox" name="same_as_billing" checked=checked /></p>');
// toggle #shippingaddress form when the checkbox is checked or unchecked
$("#copyaddress").click(function () {
$("#shippingaddress").toggle();
});
});
</__script>
{/literal}