do you know if its possible to create following product attributes on a product page using metafields (see image)? If yes, which definitions do I have to use?
I want to display different attributes for each product with metafields, going from 0 (lowest) to 5 (highest). If e.g. 5, I want to display 5 filled dots.
@TillBa Yes it’s possible, use a number type and set a min and max of 1 to 5
Though you’ll want to put them in a metaobject and THAT is what is referenced in the products custom data.
This helps organize metafields so your not fighting for space in the product admin with other future metafields.
An advanced alternative is to use a JSON type metafield, useful if importing data from some other system that’s already structured.
Making that exact design is an advanced theme customization, reach out if you need services to implement it.
Then create a product metafield “Custom features list”. With just one item list of reference to the metafield we just created, “Custom feature”.
In your theme, find a main product information section file. Could be main-product.liquid, or similar and add 2 part of code. one in schema. For example after existing “custom_liquid” add a few lines for custom_feature (so just last part.
Thank you very much for your quick reply. Im using Focal Theme and I do have these two files named custom liquid and main product liquid but I dont know where to add your codes. Can you help me with that?
I have read to that one should use a number type metafield with a range set from 1 to 5. This allows to dynamically display the number of filled dots based on the metafield value.
Coming to the implementation part, add the code in the snippets/product-info or snippets/product-form files (in the Focal Theme).
A developer can also help you in this regard. I hope this solves your problem.