Skip to content

Producer

The Producer object represents a single Producer in the storefront.

classDiagram
  direction LR
  Producer --> ProductsList
  Producer --> Url
  Producer --> ProducerUrl
  ProductsList "1" --o "*" Product
  class ProductsList{
  }
  class Product{
  }
  class Url{
  }
  class ProducerUrl{
  }
  class Producer{
    int id
    string name
    string description
    ProducerUrl url
    Url imageUrl
    string website
    ProductsList products
    Metafields metafields
  }

Properties

Attribute name Type Description
id int The unique identifier of the Producer.
name string The name of the Producer.
description string The description of the Producer.
url ProducerUrl The ProducerUrl object representing the url to the producer product list.
imageUrl Url The Url object that represents the url of the producer's image.
website string The url of the producer's website.
products ProductsList Reference to the ProductsList object that represents the products list of Product objects associated with the producer.
metafields Metafields Reference to the Metafields object that provides access to the namespaced containers for key - value pairs of data associated with the producer.

Examples

id property

{{ producer.id }}
1

name property

{{ producer.name }}
Philips

description property

{{ producer.description }}
Description of Philips

url property

{{ producer.url }}
/link/to/philips

imageUrl property

{{ producer.imageUrl }}
/link/to/philips/logo

website property

{{ producer.website }}
/link/to/philips/website

products property

{% for product in producer.products %}
    <h1>{{ product.name }}</h1>
    <p>{{ product.description }}</p>
    <br>
{% endfor %}
<h1>Philips SHP 2000</h1>
<p>Full-size, lightweight headphones with a fully adjustable headband and earpieces ensure a perfect fit and comfortable listening.</p>
<br>
<h1>ColdGear - Hood</h1>
<p>High-quality balaclava made of ColdGear fabric.</p>
<br>

metafields property

{{ producer.metafields.someNamespaceName.key }}
some value