Web Notification
Last updated
Last updated
To enable web push notification for vendors to receive notifications on new order placement. You will have to setup firebase web push notification.
Here are the steps to create a web app on firebase:
Go to your firebase console
Click on the settings/gear icon on the top left section of your console
Click on project settings
On the project settings page, scroll down to the "Your apps" section
Click on "Add app" button
A dialog will appear. Click on the web icon </>
A app registration page with show. Fill in the required info click Register app.
After that you can click on the Continue to console
After creating a web app on the firebase console, you will need to add some info to fuodz backend for web notification to be able to work.
Go the fuodz backend
Click on setting menu
then from the dropdown select settings
On the settings page click on Push notification setting(Firebase)
All but one of the required info on the page get be gotten form the Your apps section on firebase console.
Open firebase console and go to project settings (follow the instructions from above)
Scroll to the Your Apps section and find the Web App you created following the instructions above.
Copy the values from the firebaseConfig section, then paste them in the backend section.
You will not Web Push Key Pair in this section. Just save the the rest and follow the instruction below on how to get the Web Push Key Pair value.
To get your project Web Push Key Pair. Go to project settings again. On the top click on Cloud Messaging.
Open the Cloud Messaging tab of the Firebase console Settings pane and scroll to the Web configuration section.
In the Web Push certificates tab, click Generate Key Pair. The console displays a notice that the key pair was generated, and displays the public key string and date added.
The Key pair is the Web Push Key Pair for fuodz backend.
Copy the Key pair from firebase and paste it into the Web Push Key pair on the foudz backend