Magento 2 installation
To use the PushPro extension for Magento, your store needs to be HTTPS-enabled. HTTPS makes your website more secure by encrypting the traffic between your server and your visitors. If your website is already HTTPS-enabled, great! If not, keep reading.
You must first acquire a SSL certificate. You can either ask your hosting provider to activate it for you, or obtain a SSL certificate yourself. You can get one for free via Let’s Encrypt. Check out their guide to get started.
Once you acquired and activated your SSL certificate, you must enable HTTPS for your Magento store. Walk through the following steps:
- Navigate to your Magento Admin dashboard
- On the menu, click on stores
- In the square ‘General’, click on ‘Web’, and then click on ‘Base URLs’
- Make sure that your Base URL starts with “https://”
- Click on ‘Base URLs (Secure)’
- Make sure that your Secure Base URL starts with “https://”
- Change the settings to 'Use Secure URLs on Storefront' and 'Use Secure URLs in Admin' to 'Yes'.
- Click on ‘Save Config’
- Go to ‘Cache Management’ and empty all caches.
- Done, navigate to your website to check if it starts with https!
Once you have enabled HTTPS, include the code snippet we generated for you in the PushPro portal in the extension panel in Magento. You can verify if you set everything up correctly by following the steps as described here.
Verify your setup
You can verify if you set everything up correctly by navigating to https://yourdomain.com/. If you see a push notification opt-in request, everything is working! That’s all, your website is now ready to send push notifications!
If you do not see an opt-in request, you can check whether the code snippet and javascript file were correctly added. Navigate to https://yourdomain.com/sw.js. Here you should find the following text:
importScripts('https://storage.googleapis.com/push-pro-java-scripts/pushpro-sw.js');
Next up, you can verify whether you correctly added the code snippet. On https://yourdomain.com/, right-click anywhere on the website and select “Page Source”. Here, you should find the following text:
<script></script>
window.__pushpro = {
site_uuid: "your-unique-identifier",
}
https://storage.googleapis.com/push-pro-java-scripts/pushpro-lib.js">