For OpenCart 2.3, 3.0, 4.0 and 4.1
What your customers get
- "Add to home screen" / "Install app" on phones and desktops that support it, with your name, icon and colours.
- An optional install bar that offers the install once; a visitor who closes it is not asked again for 14 days.
- A friendly offline page in your colours with a "Try again" button instead of the browser's dinosaur.
- Faster repeat visits: pictures, styles and scripts are reused from the device while pages always come fresh from your shop.
What you set
- App name and short name, theme colour (browser bar, splash screen), splash background colour.
- How it opens: app window, app window with browser buttons, full screen or normal tab.
- Icon: any picture from your image folder (for example your logo). The module makes the 192 and 512 pixel icons itself, centred on your splash colour. With no picture it draws an icon from the first letter of your app name.
- Cache version: raise the number after you change your theme and every visitor loads fresh files.
- One switch to turn everything off without uninstalling.
- A checks panel with links to your manifest, service worker and offline page, and warnings for the things a browser needs (a secure https address, the PHP image library, the icon file).
How it works
- The module serves the web app manifest, the service worker, the offline page and the icons itself, and adds one small script to your page footer. No core files are edited and no files need to be copied to your store root.
- The worker never touches checkout, cart or account pages: it only handles page loads (network first, offline page if the connection is gone) and static files. Requests that change data (forms, orders) are never intercepted.
- Every storefront text is in one language file you can copy and translate.
Notes
- Browsers only offer installation on https addresses (and on localhost). On a plain http store the module works but the install is not offered.
- The offline page is shown only for page loads; it does not make the shop browsable offline.
- Installing is a browser feature: whether and when the install bar appears is up to the visitor's browser.