SS Product Ingredients #2 showing the same ingredients on all product pages

Hello everyone,

I am in a bit of a pickle here with a section that I purchased from the Section Store. It’s SS Product Ingredients #2. IDK if anyone has a personal experience with it specifically. It is supposed to be showing key ingredients with a brief description and an image. However, it shows the same ingredients across all of my products - 15 or so. I created product metafields for each ingredient since the buttons where the name of the herb is displayed can only draw from single line text metafield. Since all product metafields show across all products whether they are relevant or not to them, I decided to only fill out the ones that are relevant to that specific product and leave the rest blank. I also created individual product templates for each product. However, the section still shows all ingredients and the ones that I left blank don’t have text but show the image. I did contact Shopify AI, it said I supposedly did things right and to contact the product developer. I did, however their first response was to create metafields and separate templates, which I had, and some coding tutorial based on another one of their products. I am on Sense 15.4.1. If anyone has any suggestions to help my case I would be highly appreciative. Thank you

Hi @Vasilisa1

Welcome to the community.

I do recommend to people, Section Store, as it looks like a good way to improve the base theme. But I did not test it myself. So no experience with it.

But for metafields, it does depend on code. If the code just displays the metafield, without any condition, then yeah, all will show. And you need to add a check, for example,
if product.metafields.custom.ingredient != blank
so it doesn’t show if it is empty. Note, just an example, do not use the code. I checked the demo site and if you have access to that section code, find
<div class="ingredients-items
after that is a for loop and inside, every item start looks like

<p class="ingredients-item-{{some_id}}">{{ some value }}</p>

So you may want to try to wrap that p element with condition so it may look, simplified:

{% if some_value != blank %}
 <p class="ingredients-item-{{some_id}}">{{ some value }}</p>
{% endif %}

some_value could be a metafield but also some variable. A lot of guessing from my side :slight_smile:

Merchants for THIRD party issues contact that THIRD party directly.
For customizations of THIRD party technologies that is an advanced customization beyond the scope of the forums and contributors courtesy as it is literal work.

For blanks Laza_Binaery’s got it for the general case based on the descriptiosn vagueness.
Though there’s a typo of !- needing to be !=
{% if some_value !- blank %}
should be
{% if some_value != blank %}

alternate in some uncommon cases, add a set of styles , or a style attribute to hide those elements if this section has some sort of dynamic frontend behavior; but it is way better to NOT render what is NOT needed.
Example of attribute
<p class="ingredients-item-{{some_id}}" {% if some_value == blank %}style="display:none;"{% endif %}>{{ some value }}</p>
A set of styles would be looping over metafields in a separate custom-liquid block to output a element with rules targeting elements IF those helements have some way to be uniquely targeted based on the metafield.


Otherwise you’ve basically rolled into a tool store parking lot with a custom made car engine hoping the cashiers can interpret it.
Either put in waaaay more effort to provide a CONCISE and clear example of the problem(without posting copyright protected code), or hire someone or roll the dice on AI coding tools.

Either they are correct in their policy or you’re not describing the issue to them properly.
But it is a common problem in theme ecosystem for sections|blocks to show even when some content is empty, generally as a result of bad shopify theme policies; as there is a soft expectation the merchant will put the effort in to customization and or just removing the section|block from specific resources etc etc

Sections can’t do everything off the shelf, build the bespoke systems you need.

Either this needs an advanced theme customization beyond the scope of the forums.
Or you can solve this just using common features a dynamic source, or alternate template issues.
Read the friendly manual your business depends on it it.
https://help.shopify.com/en/manual/online-store/themes/theme-structure/sections-and-blocks#metafields-and-dynamic-sources
https://help.shopify.com/en/manual/online-store/themes/os20/theme-structure/templates#create-a-new-template

Or the section is being used statically in which case it’s CODE needs to be duplicated and given unique names for each resources, etc a very manual process, or it needs to be fixed and turned into a dynamic section to meet expecations.

Or your omitting critical detail creating a lot of work, like your pointing at a problem and expecting insight from just pointing.
Providing a screenshot of some product metafields circled is no where near enough context for others to guess at the code, or other products settings, what’s in the “empty” fields, or all your other choices (‘and some coding tutorial based on’) etc etc etc etc etc ad nauseum.

It’s a word generator it’s literally built to tell you what you want to hear to no effect.

Thank you for your very friendly reply. I had a whole bunch screenshots inserted, however that is all shopify let me upload as a new user. Thanks again :slight_smile:

Thank you for your reply, I will look into that! It makes sense to set it not to show if blank. I had been banging my head against the wall all day trying to figure it out on my own and eventually went blank myself, haha. Thanks again! :folded_hands: