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
stringthat refers to the ID of theCataloguescollection to which it belongs; - Each element in catalogues_variants_map contains an id field that refers to the ID of the
CataloguesVariantscollection; - id is a
stringthat refers to the specific ID of a document of this collection; - list_line_tags is a
[]ofstrings that refer to the IDs of theTagscollection; - list_tags is a
[]ofstrings that refer to the IDs of theTagscollection; - list_variants is a
[]ofstrings that refer to the IDs of theCataloguesVariantscollection; - logLoadingModel is a
stringthat refers to the ID of theLog_Loading_Modelscollection; - mainBrandRef is a
stringthat refers to the ID of theMainBrandscollection; - mainProduct is a
stringthat refers to the ID of theProductscollection.
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);