Product pages - Get customization information for products

Tiber
Excursionist
19 3 1

Do we have to loop through all properties? Is there a way to just get a specific one without a for loop

{% 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 %}

  

0 Likes
miriamc
New Member
1 0 0

I too am wondering about breaking lines apart when the UI Element is text box - long. If I enter multiple lines of text with a line break, the Cart shows it as one continuous line, no breaks.


@mtbielen wrote:

Thank you for the tutorial. I am trying to add the customization to the email template. I have 4 line properties for my products. When I add the following code to the templates, all my line properties show us as one line (ie -Line 1: xxxx -Line 2: xxxx -Line 3: xxxx 

{{ line.title }}{% for p in line.properties %}{% unless p.last == blank %} - {{ p.first }}: {{ p.last }}{% endunless %}{% endfor %}

 How do I break the line properties in the email to show across multiple lines. For example:

-Line 1: xxxx

-Line 2: xxxx

-Line 3: xxxx

Thanks,

Michelle




I get:

Line 1 Line 2 Line 3

0 Likes
acs49
New Member
2 0 0

Whenever I add this code, it removes the quantity. Why?

0 Likes
acs49
New Member
2 0 0

Okay, I'm dumb - I figured it out  

0 Likes
gisselleyes
Tourist
3 0 1

Hi there!

I am also not able to find the type="submit". Are you able to explain how you did it? I would really appreciate it, thank you!

0 Likes
Neddymtz
New Member
1 0 0

is there a step by step on how to do this?

 

0 Likes
Gariep
Excursionist
15 0 3

i did not had this either, you can try to add it elsewhere in your code, it will change the position of the input box.   

0 Likes
Gariep
Excursionist
15 0 3

Is there a way to have the customizable input available only for specific(s) variant?  I have a product with generic variant and personalized variant.  At the moment i'm force to have 2 different product, one for generic, one for personalized. 

I was thinking adding something like this 

if variant = x

  customised input code 

end

Otherwise is it possible to have a different liquid template for a specific variant? 

 

0 Likes
danielavezzi
New Member
1 0 0

where do I go to have access to the answers from the customers in these extra variations that I created? Usually, the normal variations' answers appear on the order page, but the variations created with the codes do not appear for me on the order page...

0 Likes
CherishedNZ
New Member
1 0 0

Hi there,

I am having real trouble trying to get my custom line options to show in cart.  I have tried several attempts at this.  I've put in the cart code for sections as mentioned in this article.  I've refeshed pages, i've deleted cookies, i've tried on different devices but no matter what I'm doing, the custom options won't show in cart.  They are working perfectly fine in the product page on the one product i'm trying this on.  What am I doing wrong please?

0 Likes