Line Items Not Displaying In Cart

Solved
Fritz_Digital
New Member
1 0 0

Hey all,

I've got a product in my store that uses three drop-down style line items (flavors), but the cart and checkout page only display the last line item (with the label of the first line item). 

I've been browsing the forums, but I can't find an answer.

This is my code:

 

           {% if template contains '06pack' %}
           

           <p class="line-item-property__field">
             <label>Flavor 1</label><br>
             <select required class="required" id="flavor-1" name="properties[Flavor 1]">
               <option value="Snickerdoodle">Snickerdoodle</option>
               <option value="Sprinkle">Sprinkle</option>
               <option value="Oatmeal Chip">Oatmeal Chip</option>
               <option value="PB Chip">PB Chip</option>
               <option value="Brownie">Brownie</option>
               <option value="M&M">M&M</option>
               <option value="Confetti Cake">Confetti Cake</option>
               <option value="Chocolate Chip">Chocolate Chip</option>
               <option value="Oreo">Oreo</option>
               <option value="Red Velvet">Red Velvet</option>
               <option value="Carrot Cake">Carrot Cake</option>
               <option value="White Chocolate Cranberry Oatmeal">White Chocolate Cranberry Oatmeal</option>
               <option value="Unicorn Magic">Unicorn Magic</option>
             </select>
           </p>

           <p class="line-item-property__field">
             <label>Flavor 2</label><br>
             <select required class="required" id="flavor-1" name="properties[Flavor 1]">
               <option value="Snickerdoodle">Snickerdoodle</option>
               <option value="Sprinkle">Sprinkle</option>
               <option value="Oatmeal Chip">Oatmeal Chip</option>
               <option value="PB Chip">PB Chip</option>
               <option value="Brownie">Brownie</option>
               <option value="M&M">M&M</option>
               <option value="Confetti Cake">Confetti Cake</option>
               <option value="Chocolate Chip">Chocolate Chip</option>
               <option value="Oreo">Oreo</option>
               <option value="Red Velvet">Red Velvet</option>
               <option value="Carrot Cake">Carrot Cake</option>
               <option value="White Chocolate Cranberry Oatmeal">White Chocolate Cranberry Oatmeal</option>
               <option value="Unicorn Magic">Unicorn Magic</option>
             </select>
           </p>
           
           <p class="line-item-property__field">
             <label>Flavor 3</label><br>
             <select required class="required" id="flavor-1" name="properties[Flavor 1]">
               <option value="Snickerdoodle">Snickerdoodle</option>
               <option value="Sprinkle">Sprinkle</option>
               <option value="Oatmeal Chip">Oatmeal Chip</option>
               <option value="PB Chip">PB Chip</option>
               <option value="Brownie">Brownie</option>
               <option value="M&M">M&M</option>
               <option value="Confetti Cake">Confetti Cake</option>
               <option value="Chocolate Chip">Chocolate Chip</option>
               <option value="Oreo">Oreo</option>
               <option value="Red Velvet">Red Velvet</option>
               <option value="Carrot Cake">Carrot Cake</option>
               <option value="White Chocolate Cranberry Oatmeal">White Chocolate Cranberry Oatmeal</option>
               <option value="Unicorn Magic">Unicorn Magic</option>
             </select>
           </p>

        
           <style>
             .ep_inline_block {display:inline-block;vertical-align:middle;margin-left:10px;}
             .ep_block {display:block;margin-top:10px;margin-bottom:2px;}
           </style>
               

           {% endif %}

 


Any help @Jason or others?

Accepted Solutions (3)

Accepted Solutions
LitExtension
Shopify Partner
1963 326 400

This is an accepted solution.

Hi @Fritz_Digital,

Please change the code of Flavor 2 and Flavor 3, it will work fine. Refer: https://i.imgur.com/QFvZFXr.png

Hope it helps!

LitExtension - #1 Shopping Cart Migration Expert
If our answer is helpful then please accept as solution!
Are you looking for a solution to migrate to Shopify? Contact us for further assistance.
Try our FREE DEMO now!

View solution in original post

Jason
Shopify Expert
10438 169 2081

This is an accepted solution.

Whilst you do have three options, they are all called the same thing. Is that intentional? I don't think it is, but I can see this entire code in action hence me not be 100% sure.


I would have expected your fields to be named like so (to follow your naming convention)

<select required class="required" id="flavor-1" name="properties[Flavor 1]">
...
<select required class="required" id="flavor-2" name="properties[Flavor 2]">
...
<select required class="required" id="flavor-3" name="properties[Flavor 3]">
I jump on these forums to help and share some insights. Not looking to be hired, and not looking for work.
Don't hand out staff invites or give admin password to forum members unless absolutely needed. In most cases the help you need can be handled without that.
★ http://freakdesign.com.au ★

View solution in original post

LitExtension
Shopify Partner
1963 326 400

This is an accepted solution.

Hi @Fritz_Digital,

I feel I gave the first correct and detailed instructions. Did you check it?

If it helped you solve your issue, please mark it as a solution. Thank you and good luck.

LitExtension - #1 Shopping Cart Migration Expert
If our answer is helpful then please accept as solution!
Are you looking for a solution to migrate to Shopify? Contact us for further assistance.
Try our FREE DEMO now!

View solution in original post

Replies 3 (3)
LitExtension
Shopify Partner
1963 326 400

This is an accepted solution.

Hi @Fritz_Digital,

Please change the code of Flavor 2 and Flavor 3, it will work fine. Refer: https://i.imgur.com/QFvZFXr.png

Hope it helps!

LitExtension - #1 Shopping Cart Migration Expert
If our answer is helpful then please accept as solution!
Are you looking for a solution to migrate to Shopify? Contact us for further assistance.
Try our FREE DEMO now!

View solution in original post

Jason
Shopify Expert
10438 169 2081

This is an accepted solution.

Whilst you do have three options, they are all called the same thing. Is that intentional? I don't think it is, but I can see this entire code in action hence me not be 100% sure.


I would have expected your fields to be named like so (to follow your naming convention)

<select required class="required" id="flavor-1" name="properties[Flavor 1]">
...
<select required class="required" id="flavor-2" name="properties[Flavor 2]">
...
<select required class="required" id="flavor-3" name="properties[Flavor 3]">
I jump on these forums to help and share some insights. Not looking to be hired, and not looking for work.
Don't hand out staff invites or give admin password to forum members unless absolutely needed. In most cases the help you need can be handled without that.
★ http://freakdesign.com.au ★

View solution in original post

LitExtension
Shopify Partner
1963 326 400

This is an accepted solution.

Hi @Fritz_Digital,

I feel I gave the first correct and detailed instructions. Did you check it?

If it helped you solve your issue, please mark it as a solution. Thank you and good luck.

LitExtension - #1 Shopping Cart Migration Expert
If our answer is helpful then please accept as solution!
Are you looking for a solution to migrate to Shopify? Contact us for further assistance.
Try our FREE DEMO now!

View solution in original post