All things Shopify and commerce
I added the following liquid code to my product page:
<p class="line-item-property__field">
<label for="name">Name</label><br>
<textarea required class="required" id="name" name="properties[Name]" form="product-form-{{ section.id }}"></textarea>
</p>
<p class="line-item-property__field">
<label for="ort">Ort</label><br>
<textarea required class="required" id="ort" name="properties[Ort] form="product-form-{{ section.id }}"></textarea>
</p>
<p class="line-item-property__field">
<label for="land">Land</label><br>
<textarea required class="required" id="land" name="properties[Land] form="product-form-{{ section.id }}"></textarea>
</p>
<p class="line-item-property__field">
When I put the product to the cart and go to the Cart page, I only see the first line property (name) being displayed. When I look at the code of main-cart-items.liquid it seems that it goes through a list of properties. But it seems that the list of properties that goes from the product page to the cart has essentially only the length of 1.
What do I have to do so that all line item properties are displayed in the cart?
Solved! Go to the solution
This is an accepted solution.
If this is the exact code you have on your page then this happens because you're missing a closing quotation mark on second and third textareas.
This is how browser sees their names:
<textarea required class="required" id="name" name="properties[Name]" form="product-form-{{ section.id }}"></textarea>
<textarea required class="required" id="ort" name="properties[Ort] form="product-form-{{ section.id }}"></textarea>
<textarea required class="required" id="land" name="properties[Land] form="product-form-{{ section.id }}"></textarea>
They are not even part of the same product form because of this.
This is an accepted solution.
If this is the exact code you have on your page then this happens because you're missing a closing quotation mark on second and third textareas.
This is how browser sees their names:
<textarea required class="required" id="name" name="properties[Name]" form="product-form-{{ section.id }}"></textarea>
<textarea required class="required" id="ort" name="properties[Ort] form="product-form-{{ section.id }}"></textarea>
<textarea required class="required" id="land" name="properties[Land] form="product-form-{{ section.id }}"></textarea>
They are not even part of the same product form because of this.
You were 100% right.... I should have used a real code editor!
Thank you VERY much for helping me and fixing the bug. Everything is working now!!! Great!
Extra pair of eyes is always helpful in cases like this.
June brought summer energy to our community. Members jumped in with solutions, clicked ...
By JasonH Jun 5, 2025Learn how to build powerful custom workflows in Shopify Flow with expert guidance from ...
By Jacqui May 7, 2025Did You Know? May is named after Maia, the Roman goddess of growth and flourishing! ...
By JasonH May 2, 2025