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
stringthat refers to the specific ID of a document of this collection; - list_frame_color_tags is a
[]ofstrings that refer to the IDs of theTagscollection; - list_line_tags is a
[]ofstrings that refer to the IDs of theTagscollection; - list_size_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 theVariantscollection; - logLoadingModel is a
stringthat refers to the ID of theLog_Loading_Modelscollection; - mainBrandRef is a
stringthat refers to the ID of theMainBrandscollection; - Each element in variants_map contains an id field that refers to the ID of the
Variantscollection.
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);