I am currently working on developing a QR Code Scanner using Ionic and Firebase. I have encountered an issue where the app displays a Product not found
toast message when I scan a QR Code to match the PLU with the information stored in Firebase. Unfortunately, I have been unable to determine the root cause of this issue.
Although I am able to retrieve user and organization data from the database, I am facing difficulties when it comes to the product (PLU) scanner functionality.
I have made attempts to modify the scan() function in home.page.ts and have made adjustments in the data-service.service.ts file, but these changes have not resolved the issue.
home.page.ts
import { Component, NgZone } from '@angular/core';
import { BarcodeScanner } from '@ionic-native/barcode-scanner/ngx';
import { Toast } from '@ionic-native/toast/ngx';
import { DataServiceService } from '../../app/data-service.service';
... (truncated for brevity) ...
data-service.service.ts
import { Injectable } from '@angular/core';
import { HttpClient } from '@angular/common/http';
import { environment } from '../environments/environment';
... (truncated for brevity) ...
Firebase structure: https://i.sstatic.net/dby8n.png
The main objective of the Ionic App is to scan QR codes and display the relevant information stored in the Firebase database.