Unique Product Templates and Metafields?

Highlighted
Shopify Partner
16 0 4

So I have set up an alternate product template with some snippets on the page for content. My question is, what is the best approach for populating this information for each individual product? I have hundreds of products. I think metafields may be the best approach. I'm assuming I would have to provide and "if" logic where "if product.id ===, add its unique metafield to div. 

 

Is this correct or is there an easier solution? Example. I want unique subheadings below the product title for each product. I also want to populate an faq accordion I created with the product features and descriptions. This has to be different for every product. Creating separate templates for each product is a no go as I would have to add hundreds of templates which would slow the site down I assume.

0 Likes
Highlighted
Shopify Partner
1366 24 246

You could do that with Metafields, no need for the "product.id ==", just see if that product metafields is not blank.

Can be done but it is hard to maintain.

 

A better solution would be using the upcoming functionality "sections everywhere": https://www.shopify.com/enterprise/unite-2019#3

That should allow better and simplified customization of content.

Hopefully this will be live soon...

https://sections.design tips, tricks & Shopify sections
Highlighted

Hi!

 

I do this all the time for custom and smart product page templates. The easiest way to do so that isn't going to break the bank and provide a lot of functionality is to use a tool called Accentuate Custom Fields. You can use that within your product pages and templates to add, manage and configure that information on your page so it's not only searchable, but also intuitive for the shopping experience. Let me know if you have more questions or want to learn more. 

 

 

Contact me for service
Highlighted
Shopify Partner
16 0 4

Yes! I'm using advanced custom fields now (liked the UI better). I don't think sections would necessarily achieve what I would need as sections would affect every product with that template. Correct me if I am wrong, @Mircea_Piturca ? Maybe I don't understand the purpose of sections quite yet. For now, I've created snippets ( I suppose sections would have worked too? but I don't really want the client playing with things. lol and would still need metafields) and then created the metafields and inserted them into the snippet. After, simply created about 3-4 alternate templates for my different styles. I kinda solved my own question playing around with it enough, but I'm going to mark yours as the solution so you get the pointos @JCausseaux1 ! Thanks friends!

0 Likes
Highlighted
Shopify Expert
10007 116 1822

The question to use metafields or not will come down to the data itself, and the ease of use for editing later. You might some advantages to adding the extra content in the description itself, and using theme code to split that out for display on the front end. This can make things far easier for day to day editing. Splitting content is quite easy and once there’s rules in place you can find this is a quicker options. It’s not without risk, but still pretty fun to build in.

 

Metafields will always be a top choice for me but I don’t ignore the end user and the general workflow they want.

★ Winning Partner of the Build a Business competition. ★ http://freakdesign.com.au
0 Likes
Highlighted
New Member
1 0 0

Hi @wandrr,

 

Did you find out how to best populating your information for each individual product? Did you use metafields? I have created the same snippet called "product-accordions" that you referred to in another thread. However, now I am encountering the same problems of not being able to change information for each individual product. Can you help me?

 

0 Likes