View Source ExCatalog (ex_catalog v1.5.6)
Documentation for ExCatalog
.
Link to this section Summary
Functions
Change the status active or disabled, this controls which products the user can see, (by default only the active products are displayed)
List all the categories (the index).
List product with preloads by sku and optional currency conversion.
List all products with preloads and optional currency conversion..
List product with preloads by category and optional currency conversion.
List product with preloads by country and optional currency conversion.
List product with preloads by manufacturer and optional currency conversion.
List version.
Link to this section Functions
Change the status active or disabled, this controls which products the user can see, (by default only the active products are displayed)
examples
Examples
iex> id = Ecto.UUID.generate
iex> ExCatalog.active(:category, id)
iex> ExCatalog.active(:product, id)
index(limit \\ 25, metadata \\ nil, cursor \\ nil, deleted \\ false)
View SourceList all the categories (the index).
examples
Examples
iex> ExCatalog.index(25)
List product with preloads by sku and optional currency conversion.
examples
Examples
iex> price = Money.new(:USD, 100)
iex> product = %{sku: "12345", price: price, title: "test product", sub_title: "test product", description: "test product"}
iex> ExCatalog.product(product.sku)
products(limit \\ 25, currency \\ :USD, deleted \\ false, owner_id \\ nil)
View SourceList all products with preloads and optional currency conversion..
examples
Examples
iex> ExCatalog.products(25)
iex> ExCatalog.products(25,:USD)
products(limit \\ 25, metadata, cursor, currency, deleted, owner_id)
View Sourceproducts_by_category(slug, limit \\ 25, currency \\ :USD, deleted \\ false, opts \\ [])
View SourceList product with preloads by category and optional currency conversion.
examples
Examples
iex> ExCatalog.products_by_category("test_category", 1, :USD, false, order_by: :sku)
products_by_category(slug, limit, metadata, cursor, currency, deleted, opts)
View Sourceproducts_by_country(origin, limit \\ 25, currency \\ :USD, deleted \\ false, opts \\ [])
View SourceList product with preloads by country and optional currency conversion.
examples
Examples
iex> ExCatalog.products_by_country(["US"], 2, :USD, false, order_by: :sku)
products_by_country(origin, limit, metadata, cursor, currency, deleted, opts)
View Sourceproducts_by_manufacturer(slug, limit \\ 25, currency \\ :USD, deleted \\ false, opts \\ [])
View SourceList product with preloads by manufacturer and optional currency conversion.
examples
Examples
iex> ExCatalog.products_by_manufacturer("test_manufacturer", 2, :USD, false, order_by: :sku)
products_by_manufacturer(slug, limit, metadata, cursor, currency, deleted, opts)
View SourceList version.