PhoenixKitEcommerce.Catalogue.ShopSections (PhoenixKitEcommerce v0.5.0)

Copy Markdown View Source

Function components rendering the "Shop" section that PhoenixKitEcommerce.Catalogue.Extension adds to the catalogue item and category forms. Field names/labels are ported from PhoenixKitEcommerce.Web.ProductForm's Pricing card and PhoenixKitEcommerce.Web.CategoryForm's basic-fields card, adapted to the item[ecommerce][...] / category[ecommerce][...] namespace the extension slot absorbs (see PhoenixKitCatalogue.Extensions.absorb/3).

Fields only the Shopify sync or a data migration ever write (shopify, price_modifiers, legacy_product_uuid, translation_fingerprints, storefront_filters) have no form input here.

Summary

Functions

Shop section for the category form. assigns carries :form, :category, :data (the category's data) and :current_language.

Shop section for the item form. assigns carries :form, :item, :data (the item's data, so data["ecommerce"] is the current commerce map) and :current_language.

Functions

category(assigns)

Shop section for the category form. assigns carries :form, :category, :data (the category's data) and :current_language.

Attributes

  • form (:any) - Defaults to nil.
  • category (:any) - Defaults to nil.
  • data (:map) - Defaults to %{}.
  • current_language (:string) - Defaults to nil.

item(assigns)

Shop section for the item form. assigns carries :form, :item, :data (the item's data, so data["ecommerce"] is the current commerce map) and :current_language.

Attributes

  • form (:any) - Defaults to nil.
  • item (:any) - Defaults to nil.
  • data (:map) - Defaults to %{}.
  • current_language (:string) - Defaults to nil.