1

We've a WIP that need virtual products. Not the official plugin, but a custom product type that don’t required any shipping. I was wondering if anyone ever try to do so, and how.

I was thinking about a Switch Field for that particular Product Type that will affect all the checkout process (if no product need shipping in the order, of course) : don't show the "Shipping Address" form, skip the Shipping Method choice and hide any shipping mentions on the order and emails.

Note: I already have a custom module to do custom actions on event for this product type. Extend Craft Commerce is a possibility.

2 Answers 2

1

There is nothing stopping you selling products that are not physical. Just mark the product as free shipping, and skip the address and shipping method selection screens entirely (the front-end is totally up to you).

p.s Product Type settings even have a 'has dimensions' checkbox you can turn off.

p.p.s check out https://github.com/craftcms/digital-products

1
  • The website will also sell physical products, so use the 'Free Shipping' checkbox to this matter is not an option. Free Shipping Products will still need shipping. p.s. Our "Virtual Product" type is already setup to hide the dimensions/weight fiels. p.p.s. The "official plugin" I was referring in my question is the Digital Products plugin by the Craft team. Commented Jan 31, 2019 at 15:13
1

Finally found a solution by adding a template variable to my custom module. I can now test from both front-end and back-end if the order really need shipping* with a single if statement.

  • I split my product types in two segment; physical and virtual, so I can easily loop through my order lineItems to look at the product typeId.

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.