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.