item.title returning title + variant title

Highlighted
Shopify Expert
136 0 0
Regarding the cart template, when I use item.title and variant.title in separate table cells as follows;

<td class="itemTitle">
   {{ item.title }}
</td>
<td>
  {{item.variant.title}}
</td>
- in Vision it correctly displays the product title then the variant title like this;
Arbor Draft   	 151cm
However, once uploaded, I get this..
Cartel Soft - Blanco - XS	 Blanco - XS
Blanco - XS being the variant title. Is this a change in the DB or do I need to append the code? http://ellefuns.myshopify.com/cart
Winners - 2008 McFarlane Prize for Excellence in Australian Web Design: http://mcfarlaneprize.com/ Finalists - 2007 McFarlane Prize for Excellence in Australian Web Design: http://mcfarlaneprize.com/ HQ: http://www.propellerglobal.com/ | Domains & Hosting: http://domains.propellerglobal.com/ Shopify Stores: http://shop.proplaster.com.au | http://www.thekhalsaraj.com | http://www.productivegardens.com.au | http://www.elephantrose.com.au | http://www.stradbrokeweddings.com.au | http://www.solution-central.com.au
0 Likes
Highlighted
New Member
247 0 0

Have you tried using item.product.title instead of item.title?

Since item is of the type line_item and so has the combined product title + variant title name.

0 Likes
Highlighted
Shopify Expert
136 0 0

Yep, that works. Thanks Daniel.

Winners - 2008 McFarlane Prize for Excellence in Australian Web Design: http://mcfarlaneprize.com/ Finalists - 2007 McFarlane Prize for Excellence in Australian Web Design: http://mcfarlaneprize.com/ HQ: http://www.propellerglobal.com/ | Domains & Hosting: http://domains.propellerglobal.com/ Shopify Stores: http://shop.proplaster.com.au | http://www.thekhalsaraj.com | http://www.productivegardens.com.au | http://www.elephantrose.com.au | http://www.stradbrokeweddings.com.au | http://www.solution-central.com.au
0 Likes