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 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)
Link to this function

index(limit \\ 25, metadata \\ nil, cursor \\ nil, deleted \\ false)

View Source

List all the categories (the index).

examples

Examples

iex> ExCatalog.index(25)
Link to this function

product(sku, currency \\ nil, deleted \\ false)

View Source

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)
Link to this function

products(limit \\ 25, currency \\ :USD, deleted \\ false, owner_id \\ nil)

View Source

List all products with preloads and optional currency conversion..

examples

Examples

iex> ExCatalog.products(25)
iex> ExCatalog.products(25,:USD)
Link to this function

products(limit \\ 25, metadata, cursor, currency, deleted, owner_id)

View Source
Link to this function

products_by_category(slug, limit \\ 25, currency \\ :USD, deleted \\ false, opts \\ [])

View Source

List product with preloads by category and optional currency conversion.

examples

Examples

iex> ExCatalog.products_by_category("test_category", 1, :USD, false, order_by: :sku)
Link to this function

products_by_category(slug, limit, metadata, cursor, currency, deleted, opts)

View Source
Link to this function

products_by_country(origin, limit \\ 25, currency \\ :USD, deleted \\ false, opts \\ [])

View Source

List product with preloads by country and optional currency conversion.

examples

Examples

iex> ExCatalog.products_by_country(["US"], 2, :USD, false, order_by: :sku)
Link to this function

products_by_country(origin, limit, metadata, cursor, currency, deleted, opts)

View Source
Link to this function

products_by_manufacturer(slug, limit \\ 25, currency \\ :USD, deleted \\ false, opts \\ [])

View Source

List product with preloads by manufacturer and optional currency conversion.

examples

Examples

iex> ExCatalog.products_by_manufacturer("test_manufacturer", 2, :USD, false, order_by: :sku)
Link to this function

products_by_manufacturer(slug, limit, metadata, cursor, currency, deleted, opts)

View Source

List version.