<pre><code>craft.product.type(x).all()
</code></pre>

<p>Will do it, without <code>commerce</code></p>

CC BY-SA 4.0
2018-08-06T19:03:39.243Z
2018-08-06T19:03:39.243Z
Robin Schambach
<p>I figured out the problem. It should be</p>

<pre><code>{% set silentItems = craft.products.type('silentAuctionItems').all() %}
</code></pre>

<p>You don't put .commerce between craft and .products.</p>

<p>Thanks!</p>

CC BY-SA 4.0
2018-08-06T19:08:59.953Z
Documentation link for posterity: https://github.com/craftcms/commerce-docs/blob/v2/en/changes-in-commerce-2.md#product-queries
Brad Bell
CC BY-SA 4.0
2018-08-06T19:05:05.793Z
2018-08-06T19:05:05.793Z
Jonathan Weedin
<p>I've never had success using Craft 3 with Commerce 2 beta. I always get an error that ".find()" is not recognized, and ".all()" doesn't work either.</p>

<p>My latest attempt has given me this error:</p>

<blockquote>
  <p>Twig Runtime Error – Twig_Error_Runtime
  Calling unknown method: craft\commerce\services\Products::type()</p>
</blockquote>

<p>The line in question is this one:</p>

<pre><code>{% set silentItems = craft.commerce.products.type('silentAuctionItems').find() %}
</code></pre>

<p>If I delete</p>

<pre><code>.type('silentAuctionItems').find()
</code></pre>

<p>the error doesn't come up, but I don't get any products displaying.</p>

<p>I've searched through the Commerce documentation, and I can't find anything about this problem.</p>

<p>Thanks for any help you can provide!</p>

CC BY-SA 4.0
2018-08-06T18:53:38.207Z
My mistake: I actually have Commerce 2 beta running on this installation. I installed Commerce through the Craft 3 plugin store. And it's still giving me the template errors.
Jonathan Weedin
<plugin-craftcommerce><craft3>
Getting products with Craft 3 and Craft Commerce 2
# Getting products with Craft 3 and Craft Commerce 2

(Asked by: username_0 on 2018-08-06)

I've never had success using Craft 3 with Commerce 2 beta. I always get an error that ".find()" is not recognized, and ".all()" doesn't work either.
My latest attempt has given me this error:

Twig Runtime Error – Twig_Error_Runtime
  Calling unknown method: craft\commerce\services\Products::type()

The line in question is this one:
{% set silentItems = craft.commerce.products.type('silentAuctionItems').find() %}

If I delete
.type('silentAuctionItems').find()

the error doesn't come up, but I don't get any products displaying.
I've searched through the Commerce documentation, and I can't find anything about this problem.
Thanks for any help you can provide!

**Tags:** plugin-craftcommerce, craft3

> **Comments:**
> **username_0**: My mistake: I actually have Commerce 2 beta running on this installation. I installed Commerce through the Craft 3 plugin store. And it's still giving me the template errors.  

---

## 2 answers

### Answer by username_1 on 2018-08-06. Score: 1 | Accepted answer

craft.product.type(x).all()

Will do it, without commerce


---

### Answer by username_0 on 2018-08-06. Score: 2

I figured out the problem. It should be
{% set silentItems = craft.products.type('silentAuctionItems').all() %}

You don't put .commerce between craft and .products.
Thanks!

> **Comments:**
> **username_2**: Documentation link for posterity: https://github.com/craftcms/commerce-docs/blob/v2/en/changes-in-commerce-2.md#product-queries  

---

