Skip to main content
Version: 1.0.0

Products

Purpose​

The Products collection contains detailed information about every glasses available in ARShades. Each document includes product metadata, multilingual descriptions, codes, images, tags, variants, and references to related collections, supporting product management and display across the platform.

Document schema​

{
"age": "string",
"availableVariants": "number",
"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",
"lastUpdate": "timestamp",
"list_frame_color_tags": ["string"],
"list_line_tags": ["string"],
"list_size_tags": ["string"],
"list_tags": ["string"],
"list_variants": ["string"],
"logLoadingModel": "string",
"mainBrandRef": "string",
"modelName": "string",
"multiple3dViewerLink": "string",
"notesNumber": "number",
"priority": "number",
"status": "string",
"thumbnail": "string",
"upcCode": "string",
"urlImage": "string",
"urlProduct": "string",
"urlShadow": "string"
"variants_map": [
{
"eanCode": "string",
"id": "string",
"publishedInARSLibrary": "timestamp",
"skuCode": "string",
"upcCode": "string",
"variantName": "string"
}
]
}

Indexes​

  • id is a string that refers to the specific ID of a document of this collection;
  • list_frame_color_tags is a [] of strings that refer to the IDs of the Tags collection;
  • list_line_tags is a [] of strings that refer to the IDs of the Tags collection;
  • list_size_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 Variants 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;
  • Each element in variants_map contains an id field that refers to the ID of the Variants collection.

Query examples​

// Fetch the Product Reference Doc from Firebase
const productRefDoc = doc(db, Products, productID);

// Get the Document Snapshot from the Product Reference Doc
const productRefSnap = await getDoc(productRefDoc);