Help with Line Item Property not showing up in cart

Hi! New Shopify user I followed this tutorial https://docs.shopify.com/themes/customization/products/get-customization-information-for-products to add radio buttons to my product page. I successfully added the code into my product page (all 3 options are working and are clickable) but its not showing up in my cart. Please help! I am using the Studio Theme.

I added this code into my main-product.liquid

Choose your finish
Clip Ons
Screw-back Clip Ons
Hypoallergenic Hooks

in not sure if I need to add the same code into main-cart-items.liquid

Bit hard to tell without knowing your store url, but one thing to look out for is if you have additional payment options or Ajax cart enabled. These bypass the regular HTML submit function so the additional properties are not passed through.

Did you ever figure this out? I’m having the same issue with Studio theme. The line item properties show up on the product page but not in the cart. I’ve figured out how to fix it in other older themes but haven’t been able to figure it out for this new 2.0 theme.

1 Like

Me too!

In Shopify 2.0 main product template has two form one containing hidden page type and product ID.

Another which have variant list visible on product page. Please add your line item in second form tag which has type data-type="add-to-cart-form**"** .

2 Likes

This works, thanks so much!

Im having same issue and I have no idea what you are saying, Im not good at coding and I would like some visual or step by step instruction :slightly_smiling_face:

Go to theme/edit code, then open up ā€œsectionsā€ on the left and find the one called main-product.liquid. Then locate this line of code (On mine it is around line 472):

{%- form ā€˜product’, product, id: product_form_id, class: ā€˜form’, data-type: ā€˜add-to-cart-form’ -%}

Right below that is where you want to enter your code from the line item property generator. Then it should work and show up in the cart.

That solution will work if you want the same fields to show up on every product. If you only want them on certain products it gets a bit more complicated. If that’s your situation let me know and I’ll try to figure out the best way to explain it!

1 Like

so confusing and shopify support is not even helpful.

@lvkevin21

Why don’t u share collaborate access to is and will fix it for u

Hey,

Thanks for this. It seems to have half worked for me. The properties are showing on the product page, however they still don’t show in the cart when the fields are filled, and I’m wondering if it is because of this app I’m using, could it be overwriting the code? the app is Measurement price Calculator. any insight would be helpful thanks.

I’m not sure if the app would be affecting it. Make sure that you’ve put the line item property code somewhere before the end of the 2nd form on the main product section. Here’s what my code looks like - I showed where to put the line item code in bold. That made it work for me on Studio theme, other themes may be different and I don’t know if your app is affecting it somehow. Good luck…hope it will help!

{%- form ā€˜product’, product, id: product_form_id, class: ā€˜form’, data-type: ā€˜add-to-cart-form’ -%}

PUT LINE ITEM CODE HERE

{%- if product.selected_or_first_available_variant.available -%} {{ 'products.product.add_to_cart' | t }} {%- else -%} {{ 'products.product.sold_out' | t }} {%- endif -%}
{%- if block.settings.show_dynamic_checkout -%} {{ form | payment_button }} {%- endif -%}
{%- endform -%}

Thanks for the reply.

I have done exactly this. The theme I’m using is called Ride. the properties show on the Product page but do not show up in the cart. However, the properties crated from the measurement app I’m using do all show up.

I Don’t really know much about coding but I am good at following instructions. at a loss here. this sucks shouldn’t be this difficult.

I really appreciate the help though.

Update*

The app Devs got back to me and It is infect their app that is doing this and they want 35$/hour to fix it for me :disappointed_face:

@MB-EBO ,

Don’t know your expertise but this could be one time fix which requires single payment. Let me know if you are interested.

You would not require any APP for this. Contact details are in BIO.