Add field to a featured product
  • 15 Dec 2022
  • 1 Minute to read
  • Contributors
  • Dark
    Light

Add field to a featured product

  • Dark
    Light

Article Summary

You have the possibility to add the Upload Field to the featured product.

While the old themes require a manual code snippet to be insert, all new Shopify themes that support the app block allow you to add the app block to display the Upload Field.

How to?

1. Open the theme editor.
2. Go to your featured product.
3. Open the so-called “Featured product” tab.
4. Add the "App block" to this section.
(It will just show the Upload Field if you have already created a field and set targeting to this product.)
5. Click on the dotted dots behind the Uploadly app block, hold it clicked and move it to the required position.
6. Don't forget to save.


________________

How to if my theme does not support app blocks?

To add the button to the featured product, you have to edit your featured-product template code by opening:
Online Store > Themes, and clicking More actions > Edit Code for your published theme.

Steps to follow:

Go to your Shopify Admin

1.    Navigate to Online Store
2.    Select Themes
3.    Navigate to Actions (three dots in next to customize)
4.    Click on Edit code

Your feature product template code is usually inside sections/featured-product.liquid but this depends on your theme.
Select the correct template from the left menu, then paste this code in where you’d like the field to appear:

5.    Locate sections/product-template.liquid and paste this code:

<div class="photouploadapp" data-photouploadapp-product-json="{{ product | json | escape }}" data-photouploadapp-collections-json="{{ product.collections | json | escape }}"></div>



(You may have to experiment a little until you find the right place, every theme is different, so there is no universal solution.)

6.    Don't forget to save!


Not able to figure it out? 😅
🛠 Use our: Setup service


Was this article helpful?