Optional Shipping Address

Not sure where to ask this?

I am building an ecommerce site that sells products and services. If someone buys a product (e.g. t-shirt) then I need both their Shipping Address + Billing Address.

However, if they are buying a service (e.g. online subscription) then I only need a Billing Address.

It would be confusing to to customers if the checkout process starts off asking someone for a Shipping Address when it isn’t required. And so I am wondering how to code my website so it is flexible regardless of what is being purchased.

Maybe I could put an attribute in the backend Product table called “isShippable” and if that is checked and their shopping cart has onr or more “isShippable” items, then I would need to have my checkout form ask for a Shipping Address?

Otherwise, the checkout form would just ask for a Billing Address by default.

Thoughts?

I think the best place would be the Business forum, if you agree.

In my opinion you’ve already figured out a good solution. :slight_smile:

So you agree with my logic that “isShippable” is an attribute of a Product and my Checkout module can just scan the list of Products in the shopping cart and then determine which addresses to ask for?

I do, though more knowledgeable members might have better ways to achieve the same.

Yes, a boolean flag sounds like a simple solution to your problem. There are much complex ways of doing it but if you are designing something specific that is probably fine. If you are designing a more generic system product types might be more appropriate. For example, a product type of downloadable or even going further separate fulfillment strategies for products. Shipping a physical product is the the fullfilment process and fulfillment can differ greatly across products, vendors, distributors, etc. It depends on how flexible you want to make the platform.

1 Like

Okay, thanks.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.