Skip to main content
Version: 1.0.0

CataloguesProducts

Purpose​

The CataloguesProducts collection stores detailed information about each product associated with a specific catalogue in ARShades. Each document in this collection represents a single product and contains all the metadata, configuration, and references needed for its management and display within a catalogue. This collection is designed to support a wide range of product attributes, including multilingual descriptions, product codes (EAN, UPC, SKU), image URLs, 3D viewer settings, and visibility status. It also manages relationships to other collections, such as catalogue references, product variants, tags, brands, and logging information.

Document schema​

{
"age": "string",
"catalogRef": "string",
"catalogues_variants_map": [
{
"eanCode": "string",
"id": "string",
"skuCode": "string",
"upcCode": "string",
"variantName": "string"
}
],
"descriptionDe": "string",
"descriptionEn": "string",
"descriptionEs": "string",
"descriptionFr": "string",
"descriptionIt": "string",
"eanCode": "string",
"glassesCode": "string",
"glassesInclinationCoeff": "string",
"glassesInclinationCoeffIos": "string",
"glassesYCoeff": "string",
"glassesYCoeffAndroid": "string",
"glassesZCoeff": "string",
"glassesZCoeffAndroid": "string",
"id": "string",
"imgUrl": "string",
"isVisible": "boolean",
"lastUpdate": "timestamp",
"list_line_tags": ["string"],
"list_tags": ["string"],
"list_variants": ["string"],
"logLoadingModel": "string",
"mainBrandRef": "string",
"mainProduct": "string",
"modelName": "string",
"multiple3dViewerLink": "string",
"notesNumber": "number",
"priority": "number",
"status": "string",
"thumbnail": "string",
"upcCode": "string",
"urlImage": "string",
"urlProduct": "string",
"urlShadow": "string"
}

Indexes​

  • catalogRef is a string that refers to the ID of the Catalogues collection to which it belongs;
  • Each element in catalogues_variants_map contains an id field that refers to the ID of the CataloguesVariants collection;
  • id is a string that refers to the specific ID of a document of this collection;
  • list_line_tags is a [] of strings that refer to the IDs of the Tags collection;
  • list_tags is a [] of strings that refer to the IDs of the Tags collection;
  • list_variants is a [] of strings that refer to the IDs of the CataloguesVariants collection;
  • logLoadingModel is a string that refers to the ID of the Log_Loading_Models collection;
  • mainBrandRef is a string that refers to the ID of the MainBrands collection;
  • mainProduct is a string that refers to the ID of the Products collection.

Query examples​

// Fetch the CatalogueProduct Reference Doc from Firebase
const catalogueProductRefDoc = doc(db, CataloguesProducts, catalogueProductID);

// Get the Document Snapshot from the CatalogueProduct Reference Doc
const catalogueProductRefSnap = await getDoc(catalogueProductRefDoc);