PhoenixKit.Modules.Shop.Web.Components.ShopCards (phoenix_kit v1.7.71)

Copy Markdown View Source

Reusable product display components for the shop storefront.

Provides product card and pagination components shared between the main catalog page and category pages.

Summary

Functions

Renders a product card with image, title, price, and optional category badge.

Renders a "load more" button + page links for product grids.

Functions

product_card(assigns)

Renders a product card with image, title, price, and optional category badge.

Attributes

  • product (:map) (required)
  • currency (:any) (required)
  • language (:string) - Defaults to "en".
  • filter_qs (:string) - Defaults to "".
  • show_category (:boolean) - Defaults to false.

shop_pagination(assigns)

Renders a "load more" button + page links for product grids.

Attributes

  • page (:integer) (required)
  • total_pages (:integer) (required)
  • total_products (:integer) (required)
  • per_page (:integer) (required)
  • base_path (:string) (required)
  • active_filters (:map) - Defaults to %{}.
  • enabled_filters (:list) - Defaults to [].