storefront/products

Types

pub type Product {
  Product(
    id: String,
    handle: String,
    available_for_sale: Bool,
    title: String,
    description: String,
    description_html: String,
    price_range: utils.PriceRange,
    featured_image: utils.Image,
    seo: utils.Seo,
    tags: List(String),
    updated_at: String,
    variants: List(utils.ProductVariant),
    images: List(utils.Image),
  )
}

Constructors

pub type ProductOption {
  ProductOption(id: String, name: String, values: List(String))
}

Constructors

  • ProductOption(id: String, name: String, values: List(String))
pub type Products {
  Products(products: List(Product))
}

Constructors

  • Products(products: List(Product))
pub type ShopifyCollection {
  ShopifyCollection(
    handle: String,
    title: String,
    description: String,
    seo: utils.Seo,
    updated_at: String,
  )
}

Constructors

  • ShopifyCollection(
      handle: String,
      title: String,
      description: String,
      seo: utils.Seo,
      updated_at: String,
    )
pub type ShopifyProduct {
  ShopifyProduct(
    id: String,
    handle: String,
    available_for_sale: Bool,
    title: String,
    description: String,
    description_html: String,
    price_range: utils.PriceRange,
    variants: utils.Connection(utils.ProductVariant),
    featured_image: utils.Image,
    images: utils.Connection(utils.Image),
    seo: utils.Seo,
    tags: List(String),
    updated_at: String,
  )
}

Constructors

Values

pub const get_product_query: String

Queries

pub const get_product_recommendations_query: String
pub const get_products_query: String
pub fn product_decoder() -> decode.Decoder(Product)
pub fn product_to_json(product: Product) -> json.Json
pub fn products_decoder() -> decode.Decoder(Products)
pub fn reshape_product(
  product: ShopifyProduct,
  filter_hidden_products: Bool,
) -> Product
pub fn reshape_products(
  products: List(ShopifyProduct),
) -> List(Product)
Search Document