<p>From the <a href="https://craftcommerce.com/support/accessing-product-info-from-order" rel="nofollow noreferrer">docs</a></p>

<pre><code>{% for item in order.lineItems %}
    {% set variant = item.purchasable %}
    {% set product = variant.product %}
    &lt;li&gt;{{ product.getUrl() }} - {{ variant.sku }} ({{ item.qty }})&lt;/li&gt;
{% endfor %}
</code></pre>

CC BY-SA 3.0
2018-03-14T09:47:41.347Z
2018-03-14T09:47:41.347Z
Robin Schambach
<pre><code>{{ item.purchasable.url }}
</code></pre>

<p>should do it. </p>

CC BY-SA 3.0
2018-03-14T09:41:26.577Z
If you are using products and variants only.
Luke Holder
CC BY-SA 3.0
2018-03-14T10:03:42.700Z
Thanks a loot Luke. It works really well, with a little correction: {{ item.purchasa**b**le.url }}
Nermin
CC BY-SA 3.0
2018-03-14T09:41:10.647Z
2018-03-14T22:10:38.993Z
2018-03-14T22:10:38.993Z
Luke Holder
<p>Is it possible to link to the product from the shopping cart?
Something like <code>{{ item.url }}</code> within <code>cart.lineItems</code></p>

<p>When using <code>{{ product.url }}</code> looping through <code>craft.commerce.products</code> I am getting a list with all product entries.</p>

<plugin-craftcommerce><ecommerce>
Link to the product from the shopping cart
# Link to the product from the shopping cart

(Asked by: username_0 on 2018-03-14)

Is it possible to link to the product from the shopping cart?
Something like `{{ item.url }}` within `cart.lineItems`

When using `{{ product.url }}` looping through `craft.commerce.products` I am getting a list with all product entries.

**Tags:** plugin-craftcommerce, ecommerce

---

## 2 answers

### Answer by username_1 on 2018-03-14. Score: 1 | Accepted answer

From the docs
{% for item in order.lineItems %}
    {% set variant = item.purchasable %}
    {% set product = variant.product %}
    {{ product.getUrl() }} - {{ variant.sku }} ({{ item.qty }})
{% endfor %}


---

### Answer by username_2 on 2018-03-14. Score: 2

{{ item.purchasable.url }}

should do it.

> **Comments:**
> **username_2**: If you are using products and variants only.  
> **username_0**: Thanks a loot Luke. It works really well, with a little correction: {{ item.purchasa**b**le.url }}  

---

