<p>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 <code>if</code> statement.</p>

<ul>
<li>I split my product types in two segment; physical and virtual, so I can easily loop through my order <code>lineItems</code> to look at the product <code>typeId</code>.</li>
</ul>

CC BY-SA 4.0
2019-02-01T14:16:59.160Z
2019-02-01T14:16:59.160Z
Maxime Lafrenière
<p>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>

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

<p>p.p.s check out <a href="https://github.com/craftcms/digital-products" rel="nofollow noreferrer">https://github.com/craftcms/digital-products</a></p>

CC BY-SA 4.0
2019-01-31T15:13:37.887Z
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.
Maxime Lafrenière
CC BY-SA 4.0
2019-01-31T14:35:48.863Z
2019-01-31T14:35:48.863Z
Luke Holder
<p>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.</p>

<p>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.</p>

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

<craft3><plugin-craftcommerce2><shipping>
Skipping the shipping part for custom virtual product
# Skipping the shipping part for custom virtual product

(Asked by: username_0 on 2019-01-31)

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.

**Tags:** craft3, plugin-craftcommerce2, shipping

---

## 2 answers

### Answer by username_0 on 2019-02-01. Score: 1 | Accepted answer

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`.


---

### Answer by username_1 on 2019-01-31. Score: 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>

> **Comments:**
> **username_0**: 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.  

---

