Product Customization not working with Json

Solved

Product Customization not working with Json

kellie1
Tourist
8 0 5

Hi! I'm trying to make a custom template enable monogram options for certain products. Ever since I updated my theme to 2.0, I"m having a bit of trouble making one on the new one. 

 

The steps I've taken so far:

1) create custom template and apply the product of interest to the new template ("custom-initials")

2) create new section and copy paste code from "main-product.liquid" to "main-custom-product.liquid" 

3) I wanted to paste the below code right above the "add to cart" section, but couldn't locate the place where i could insert the code. In my previous version, it was easy to spot the places signaled by button/cart/when type of words, but nothing seems to be valid in the main-product liquid.

 

<div>

<label for ="custom-name">Initials (up to 2 letters)</label>

<input type="text" id="custom-name" form="{{product_form_id}}" name ="properties[Initials]" />

 

4) I have a snippet called product-form.liquid and this seems more like the place where the above code belongs but I don't know how to make this into a template bc if i put this code in here, the monogram option appears on every single product page.

 

If anyone can give me guidance, that'd be amazing! Let me know if this makes sense. Thanks so much 🙂 

Accepted Solution (1)

LitExtension
Shopify Partner
4915 1005 1183

This is an accepted solution.

Hi @kellie1,

As each theme will have different files, so I will guide you as described:

#1: In step 2, after you create the 'main-custom-product.liquid' file, you need to go back to step 1, edit the template json file just created and change it so that it calls the file 'main-custom-product.liquid'.  Refer

Screenshot.png

#2: In step 4, you need to create a new product-form file, then copy the code like step 2 and call the new file again. So you can change anything to create this new file and it won't affect other templates.

Hope it is clear to you.

LitExtension - Shopping Cart Migration Expert
Check out our Shopify migration app to migrate your online store to Shopify
Contact us:
- Email: contact@litextension.com

View solution in original post

Replies 4 (4)

LitExtension
Shopify Partner
4915 1005 1183

This is an accepted solution.

Hi @kellie1,

As each theme will have different files, so I will guide you as described:

#1: In step 2, after you create the 'main-custom-product.liquid' file, you need to go back to step 1, edit the template json file just created and change it so that it calls the file 'main-custom-product.liquid'.  Refer

Screenshot.png

#2: In step 4, you need to create a new product-form file, then copy the code like step 2 and call the new file again. So you can change anything to create this new file and it won't affect other templates.

Hope it is clear to you.

LitExtension - Shopping Cart Migration Expert
Check out our Shopify migration app to migrate your online store to Shopify
Contact us:
- Email: contact@litextension.com
kellie1
Tourist
8 0 5

This did the trick! Thank you so much for taking the time to help 🙂 

ozlandflowerco
Visitor
1 0 0

Taking this a step further, how do you add the customization information for the product to the order summary when the customer goes to check-out? I was able to do this in the Brooklyn theme, but am having trouble adding this to the updated Sense theme with the cart.json file.

sunniecreative
Visitor
1 0 0

Hi, I have the same problem with adding the customization information for the product to the order summary. I wonder if you figure it out. Thank you!