How To Create CUSTOM PRODUCT OPTIONS on Shopify 2.0

How To Create CUSTOM PRODUCT OPTIONS on Shopify 2.0

You can make customizable products by entering a line of code in the backend of your store.

In this tutorial, we will create a template that has a form for engraving on a product. A form will appear that says “name for engraving.” This way, your customers can have their items engraved. This is just one example of the many custom product options you have on Shopify. For custom product options Shopify read further.

To create customizable Shopify 2.0 products, go to Online Store. Click on your theme and click Actions. From the dropdown menu, click Duplicate.

Now that you have a duplicate, next to the theme you want to edit click on Customize, then click on create product template.

Save and go back to the Online Store and click on the themes. On the theme you edited in the first step click on actions and edit code.

Search for "main-product" under the sections directory in the main-product directory search for {%- form 'products' it's around like 400. 

Make space and paste the following code 

{% if product.template_suffix == 'customizable' %}

 {% endif %} 

 

and click on save.


Go to the https://ui-elements-generator.myshopify.com/  and you get the code and paste it after the: {% if product.template_suffix == ‘customizable’ %}

and above the: 

{% endif %}

 

Click on Save! 

Go to the online store and it will show that the last time it was saved was just now. Because the version’s not live, yet, you can’t switch the product templates. Go to Action and click Publish. Now you have to change the template. Go to Products and choose the product where you want the engraving. Go to Theme Templates and choose the “product customizable” template. Save. Go into your online store, click the product, and a field saying “Your name for engraving” should be there.

Back to blog