Setting the shipping address to be the billing address by default - xmpie-users/uStore-js GitHub Wiki

When delivery is turned on for a store, the default checkout settings requests the customer to enter a shipping address.

Some customers want the shipping address to be set to "Use Billing Address" by default, and allow the cusotmer to manually change to another address only if they want to.

Alt

This JavaScript can be added to the relevant store to achieve this:

<script type="text/javascript">
  $(document).ready(function(){
    if (window.location.href.toLowerCase().indexOf ("checkoutfinal") > -1 && document.referrer.toLowerCase().indexOf ("checkoutfinal") == -1)
      $('#radAsBilling').click();
  })
</script>

For information on how to add JavaScript to your store: How to add JavaScript to a storefront.

⚠️ **GitHub.com Fallback** ⚠️