Venture: Product Item Properties on Separate Lines

Solved
Highlighted
Tourist
6 0 1

I am using the Venture theme, and I have an issue :-)

Currently when a product with variations is added to the cart, the cart show the variation underneath the product name on a single line separated by a "/".

2020-07-03_22-52-32.jpg

 

 

 

This is the same when I add additional line item properties also, only those are not separated at all, just on a single line...

However, what I actually want would be the product name, then each variant option and line item property on a separate line below like this....

PRODUCT NAME

Design Style 01
3M 7125 Black Matte 022
Additional Line Item Property 1
Additional Line Item Property 2....

Any help with this would be appreciated...

Than you.

0 Likes
Highlighted
Shopify Partner
2214 481 625

Hey @sihartley,

Following is the screenshot of fresh venture theme sections/cart-template.liquid file.

Please cross check your code with this.

cart-code.jpg

 

If your cart-template.liquid file modified then you need to do changes to remove "/" ( slash) and put lines for the item properties.

Please check.

Thanks!

 

If helpful then please Like and Accept Solution.
Do you need custom changes on store ? Hire me.
Feel free to Contact me on dmw.webartisan@gmail.com
Follow us on Instagram @dmw.webartisan
0 Likes
Highlighted
Tourist
6 0 1

Hi,

Thanks for your help, and taking the time to assist me. From what I can see the screenshot you supplied, and what I have are the same, please see my screenshot bellow...

2020-07-04_00-52-57.jpg

0 Likes
Highlighted
Shopify Partner
2214 481 625

Hey @sihartley,

Please provide your website URL. So I can try to add products and check the cart page and debug.

Thanks!

 

If helpful then please Like and Accept Solution.
Do you need custom changes on store ? Hire me.
Feel free to Contact me on dmw.webartisan@gmail.com
Follow us on Instagram @dmw.webartisan
0 Likes
Highlighted
Tourist
6 0 1
Highlighted
Shopify Partner
2214 481 625

This is an accepted solution.

Hey @sihartley,

Thanks for the URL.

Replace the following code 
{% unless item.variant.title contains 'Default' %}
     <p>{{ item.variant.title }}</p>
 {% endunless %}
  with this new code
 
 {% comment %}
  {% unless item.variant.title contains 'Default' %}
        <p>{{ item.variant.title }}</p>
  {% endunless %}
  {% endcomment %}
  
 {% assign titles =item.variant.title | split: "/"  %}
      {% for title in titles %}
        {% if title != "Default" %}
          <p>{{ title }}</p>
       {% endif %}
      {% endfor %}

 

Please take the backup of your code and try this. Let me know if this works.

 

Thanks!

If helpful then please Like and Accept Solution.
Do you need custom changes on store ? Hire me.
Feel free to Contact me on dmw.webartisan@gmail.com
Follow us on Instagram @dmw.webartisan
0 Likes
Highlighted
Tourist
6 0 1

Hey,

That did it! Thank you I really appreciate your time.

 

Thank you!

1 Like
Highlighted
Tourist
6 0 1

Hey @dmwwebartisan ,

Sorry to bother you again about this, the piece of code you gave me fixed the per line issue for line items that are variants, but it does not work for additional line items I add through html... 
So if I add a second color option like this...

<p class="line-item-property__field">
<label>Color</label>
<select required class="required" id="color" name="properties[Color]">
<option value="3M 7125 Black Matte 022">3M 7125 Black Matte 022</option>
<option value="3M 7125 Black Gloss 012">3M 7125 Black Gloss 012</option>
<option value="3M 7125 White Gloss 010">3M 7125 White Gloss 010</option>
<option value="3M 7125 Cardinal Red 053">3M 7125 Cardinal Red 053</option>
<option value="3M 7125 Bright Orange 014">3M 7125 Bright Orange 014</option>
<option value="3M 7125 Bright Yellow 015">3M 7125 Bright Yellow 015</option>
<option value="3M 7125 Apple Green 196">3M 7125 Apple Green 196</option>
<option value="3M 7125 Sapphire Blue 037">3M 7125 Sapphire Blue 037</option>
</select>
</p>

And a custom text area like this....

<p class="design_notes_field line-item-property__field">
<label for="design-notes">Design Notes</label>
<textarea id="design-notes" name="properties[Design Notes]" rows="1" cols="50"></textarea>
</p>

I end up with this...

2020-07-04_14-27-49.jpg

My end goal is to have all line items appear like the first two bulleted line items, but code you sent only seems to work for product variants... 

Thanks again for your time...

Simon

0 Likes
Tourist
6 0 1

Hey again @dmwwebartisan ,

I think I got it done, by adding the <p> tag as follows....

                  {% 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>{{ p.first }}: 
                        {% if p.last contains '/uploads/' %}
                          <a href="{{ p.last }}">{{ p.last | split: '/' | last }}</a>
                        {% else %}
                {{ p.last }}</p>
                        {% endif %}
                      {% endunless %}
                    {% endfor %}
                  {% endif %}
Now, this works, but would ask if this is acceptable? I don't want to break anything... 
 
Simon
0 Likes
Highlighted
Shopify Partner
2214 481 625

Hey @sihartley,

Sorry for the late reply. Yes, it will work. If there is a liquid error then it shows. If not then it should work.

so you did it and best of luck! :)

Thanks!

If helpful then please Like and Accept Solution.
Do you need custom changes on store ? Hire me.
Feel free to Contact me on dmw.webartisan@gmail.com
Follow us on Instagram @dmw.webartisan
0 Likes