Hello all
I have a question. It is about that we have created custom fields with variable product data, which are fed via an automatic API from our Access database.
I am wondering if it is possible to automate it, if an item from the database does not have all fields and for example only weight, is it possible to hide the yellow text (see picture) in this case?
Only those “columns” should be displayed that are available in the database. If not all of them are present, they should not be displayed and preferably also below each other and not offset.
this must be possible or?
or is it possible to solve this in a different way without “text” in the template?
I have this code ( conditional logic code)
{% if product.metafields.custom_fields.gewicht %}
<p>Gewicht: {{ product.metafields.custom_fields.gewicht }}</p>
{% endif %}
An This CSS Code
.custom-field {
display: block;
margin-bottom: 10px;
}
But I do not know where to copy this code? Can you tell me how to embed the code correctly?
We use the Impulse theme.
Thank you very much!!!
