Display custom line item in cart

Tourist
38 0 1

Hello guys, 

 

I am using an app (Product Personalizer) for item that customers can customize (with their name on the item usually).

The app is working great and I'm happy about it but I still have one issue I can't solve.

 

The customization (that the customer enters itself) is not displayed in the cart. 

This can lead to confusion, I received several email of customer saying "I'm not sure the customization has been saved as I can't see it in the card so I'm not sure if I should buy".

 

However, when the customer validates the cart, the customization is then displayed in the checkout process.

But obviously, I would like to have this information displayed earlier, directly in the cart page.

 

I've tried to follow this tutorial : https://help.shopify.com/en/themes/customization/products/features/get-customization-information-for...

But I don't have such code in my cart template :

{{ item.product.title }}

Can someone help me with this ?

How should I do to display the customized informations that are displayed in the checkout process also in the cart page ?

 

Thanks in advance

0 Likes

On your cart template , i guess you have {{ product.title }} find that line  .

 

Vijendra Sisodiya

Founder of VsisodiyaDesign
0 Likes

use like this:

{{ line_item.product.title }}

for use info :

https://help.shopify.com/en/themes/liquid/objects/line_item#line_item-title 

Shopify theme developer and customization

I Would like to add new functionality or customize an existing one, please hire me.
If helpful then please Like and Accept Solution .
Email: ashiquehussaincodediary@gmail.com

0 Likes
Tourist
38 0 1

Well thanks guy, I found the trick here.

In fact the {{ item.product.title }} was present in another file due to the theme structure.

 

In case that can help people, I use Wokiee theme, and the {{ item.product.title }} property is in the files cartpage-design1.liquid & cartpage-design2.liquid

 

I added the following piece of code and it works perfectly now

 

{% assign property_size = item.properties | size %}
{% if property_size > 0 %}
  {% for p in item.properties %}
    {% assign first_character_in_key = p.first | truncate: 1, '' %}
    {% unless p.last == blank or first_character_in_key == '_' %}
      {{ p.first }}:
      {% if p.last contains '/uploads/' %}
        <a class="lightbox" href="{{ p.last }}">{{ p.last | split: '/' | last }}</a>
      {% else %}
        {{ p.last }}
      {% endif %}
      <br>
    {% endunless %}
  {% endfor %}
{% endif %}
0 Likes