@lsretail/ls-push-notifications
v1.5.0
Published
LS eCommerce push notification module
Downloads
69
Readme
ls-push-notifications
This package adds the following functionality:
- Asking users for permission to send push notifications.
- Sends push notifications if allowed once the order status gets changed.
To use enable push notifications, follow these steps:
- Sign up for a OneSignal account.
- Follow this guide after creating the account, to create an app OneSignal | Quickstart Guide
- Create a the folder structure
push/onesignal/
in the root of the venia-concept package and a file inside calledOneSignalSDKWorker.js
. - Copy this text into the file and save:
importScripts("https://cdn.onesignal.com/sdks/web/v16/OneSignalSDK.sw.js");
- Add the following to
venia-concept/upward.yml
.
status: veniaResponse.status
headers: veniaResponse.headers
body: veniaResponse.body
+myStaticIncludes:
+ resolver: directory
+ directory:
+ resolver: inline
+ inline: './push'
Settings:
- Add USE_SIMINIA_THEME=true to your .env file to use the package with a siminia theme.