@avvyr/storefront-sdk - v0.19.0
    Preparing search index...

    Function mergeCatalogs

    • Fill a slim profile's catalog positions from the catalogs: the options' labels, group, pictures and attributes come from the catalog, the profile's own fields (price, charges) win. A slim answer without options takes every catalog item. Groups from the catalog when the profile has none.

      Parameters

      • profile: OptionProfileView
      • catalogs: Record<string, OptionCatalogView | null | undefined>
      • Optionalonly: ReadonlySet<string> | null

        fill only these option codes (server rendering: the chosen fabric); the others stay as the slim answer has them

      Returns OptionProfileView