3

We're setting up a Craft Commerce site and the merchant wants to give the option to the customer to pickup the order from their physical store instead of shipping it to a specified address.

If the customer selects that option then they shouldn't have to provide a shipping address or billing address.

Is this possible in Craft Commerce? If not is there a plugin or a suggested way to do this?

1 Answer 1

2

You could make 'pickup from store' a shipping method.

Then in your checkout form, if a visitor chooses that shipping method, make sure you don't show the shipping address form, and add a hidden input to set order.shippingSameAsBilling to true. Commerce will then populate the shipping address with the billing address details. Code is untested, but it should be something like:

{% if order.shippingMethodHandle == 'pickupInStore' %}
    {{ hiddenInput('shippingSameAsBilling', 1) }}
{% else %}
    {# Show the shipping address form #}
{% endif %}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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