Answers.Body: <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>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-03-14T09:47:41.347Z
Answers.LastActivityDate: 2018-03-14T09:47:41.347Z
Answers.UserDisplayName: Robin Schambach
Answers.Body: <pre><code>{{ item.purchasable.url }}
  </code></pre>
  
  <p>should do it. </p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-03-14T09:41:26.577Z
Answers.Text: If you are using products and variants only.
Answers.UserDisplayName: Luke Holder
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-03-14T10:03:42.700Z
Answers.Text: Thanks a loot Luke. It works really well, with a little correction: {{ item.purchasa**b**le.url }}
Answers.UserDisplayName: Nermin
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-03-14T09:41:10.647Z
Answers.LastActivityDate: 2018-03-14T22:10:38.993Z
Answers.LastEditDate: 2018-03-14T22:10:38.993Z
Answers.UserDisplayName: Luke Holder
Body: <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>
  
Tags: <plugin-craftcommerce><ecommerce>
Title: Link to the product from the shopping cart
ThreadText: # 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](https://craftcommerce.com/support/accessing-product-info-from-order)
  
  ```
  {% for item in order.lineItems %}
      {% set variant = item.purchasable %}
      {% set product = variant.product %}
      <li>{{ product.getUrl() }} - {{ variant.sku }} ({{ item.qty }})</li>
  {% 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 username_2. It works really well, with a little correction: {{ item.purchasa**b**le.url }}  
  
  ---
  
  