# `PhoenixKitEcommerce.Catalogue.CategoryCommerce`
[🔗](https://github.com/BeamLabEU/phoenix_kit_ecommerce/blob/0.5.11/lib/phoenix_kit_ecommerce/catalogue/category_commerce.ex#L1)

Embedded schema for the shop fields a catalogue category stores under
`category.data["ecommerce"]`. See `PhoenixKitEcommerce.Catalogue.ItemCommerce`
moduledoc for the discovery contract this namespace is reached through.

# `t`

```elixir
@type t() :: %PhoenixKitEcommerce.Catalogue.CategoryCommerce{
  featured_item_uuid: term(),
  option_schema: term(),
  shop_status: term(),
  storefront_filters: term()
}
```

# `cast`

```elixir
@spec cast(map() | nil, map() | nil) ::
  {:ok, map()} | {:error, [{atom(), String.t()}]}
```

Merges `params` (submitted form/API values, or `nil`) over `current`
(the existing `data["ecommerce"]` map, or `nil`) and validates the
result.

Returns `{:ok, map}` with the full resulting namespace (defaults
included) or `{:error, [{field, message}]}`.

# `changeset`

```elixir
@spec changeset(t(), map()) :: Ecto.Changeset.t()
```

Changeset — `option_schema` reuses `PhoenixKitEcommerce.OptionTypes.validate_options/1`.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
