The model object
The model
object can be accessed from the product
object's media
attribute. The model
object contains information about a 3D model uploaded from the product details page in the Shopify admin.
This page describes the different attributes of the model
object.
model.alt
Returns the alt tag of the model set on the product details page of the Shopify admin.
model.id
Returns the media_id
of the model.
model.media_type
Returns the type of the object (model
). This can be used to filter the product
object's media array.
Input
{% assign models = product.media | where: "media_type", "model" %}
{% for model in models %}
{{ model.alt }}
{% endfor %}
Output
Model of the black stroller
Model of the grey stroller
model.position
Returns the position of the model in the product
object's media array.
model.preview_image
Returns a preview image for the model.
model.sources
Returns an array of model source objects.