Notes field only for certain product types In my shop, I have two different kinds of products.type items and my products have variants.

For one of products type, I would like to show the note field in the cart.

My product types are:


products 
options


For product type options, I don't want to show the note field.

How can I set this up? 

Tried this without success.

{% for item in cart.lineItems %}
&lt;form method="POST"&gt;
&lt;input type="hidden" name="action" value="commerce/cart/updateLineItem"&gt;
&lt;input type="hidden" name="lineItemId" value="{{ item.id }}"&gt;

{% if product.type('products') %}
&lt;input class="form-control" type="text" placeholder="Productsort"  name="note" value="{{ item.note }}" required&gt;
{% endif %}
&lt;input class="form-control" type="submit" class="button" value="Bijwerken"/&gt;
&lt;/form&gt;
{% endfor %}
I think you can do something like;

{% if product.type('products') %}
    code to show notes field
{% endif %}


See the product model docs here https://craftcommerce.com/docs/product-model

The note attribute is part of the lineitem model so you should be able to show it. 

https://craftcommerce.com/docs/line-item-model#note

The following should work.

{% for item in order.lineitems %}
    {{ item.note }}
{% endfor %}


You could try naming your input field like so;

&lt;input class="form-control" type="text" placeholder="Productsort"  name="item[note]" value="{{ item.note }}" required&gt;


I'd need to test this though. I've done something along these lines but can't remember exactly what I did.