2

By default all users fill out shipping information first, and then can select "Use same address for billing".

Because 95% of items I am selling are digital, 9 out of 10 sales will be digital and have no shipping.

What I would like to do is ask for a billing address, and then user the <input type="hidden" name="sameAddress" value="1"> to set the shipping address.

This is what I have now which works...

shop/checkout/addresses

<div class="col-xs-12 col-sm-6">
    {% include 'shop/_includes/addresses/fieldset' with {
        title: "Billing Information"|t,
        class: 'ShippingAddress',
        name: 'shippingAddress'
    } %}
</div>
<div class="col-xs-12 col-sm-6">
    {% include 'shop/_includes/addresses/fieldset' with {
        title: "Shipping Information"|t,
        class: 'BillingAddress hidden',
        name: 'billingAddress'
    } %}
</div>

...


{% if freeShipping %}
    <input type="hidden" name="sameAddress" value="1">
{% else %}
    <input type="hidden" name="sameAddress" value="0">
    <label>
    <input type="checkbox" name="sameAddress" id="sameAddress" checked="checked"> Use same address for shipping
    </label>
{% endif %}

As you can see I'm still setting the shipping first, To the user it just looks like I am asking for billing first. This works until I have something that requires shipping. If a user un-checks "Use same address", then I show what looks like the Shipping Address. But in reality, it's the billing address they are changing.

TL;DR

By default, shipping drives billing. I would like billing to drive shipping.

Thank you for any suggestions!

2

Unfortunately, I found myself in the exact same situation.

What I ended up doing was including both the billing and shipping form on the same page but the billing form hidden. I used vue.js form/model binding to ensure the values were copied to the billing form. This way it captures two identical addresses, but at least they have the opportunity to edit the information separately at final checkout if shipping is required.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.