Peakhour's Opencart 3 plugin transparently enables efficient full page caching on the Opencart 3 platform. Once installed Opencart will issue Cache Tag headers on page responses, along with Cache Control headers for cacheable pages. The plugin also uses Opencart's event system to notify Peakhour when content is changed through the Opencart admin.
- Choose Peakhour.io as a backend within Magento's built in full page cache settings.
- Fully supports flush by cache tags
- Fully supports cache vary on cookie value, vary on Logged in user, Language, and Currency
- Manually flush by URL if required.
- Configure caching for custom routes
- Ajax Cart and Wishlist
- Opencart 3 or greater
- PHP 5.6 or greater
Before installing make a backup of your Opencart site as a precaution. If you have a development environment it is recommended that you install the plugin there first to test and confirm functionality.
To properly utilise full page caching you need to enable the SEO urls feature of Opencart. SEO urls enables you to have urls like /my-awesome-product/ rather than /index.php?route=product/product&path=20&product_id=42
You will need a Peakhour account to be able to utilise this extension. If you don't already have one you can sign up here, installation of the extension does not automatically create an account for you. Pricing is based on page views and all new signups get a free trial. Once you have your account the only other change you need to make to activate our acceleration and web application firewall is a DNS change. Do not enable the plugin until you have successfully configured your domain behind the Peakhour service.
- Log in to your Opencart admin
- Using the left menu navigate to Extensions -> Installer, then click on the "Upload" button next to "Upload file"
- Once uploaded use the left menu to navigate to 'Extensions' link immediately below the 'Installer' link from step 2.
- From the 'Choose your extension type' dropdown choose 'Modules'
- Scroll down until you find 'Peakhour' and then click on the '+' button on the right to install.
- Under the 'General' tab, you need to fill in the 'Peakhour API Key' setting, to obtain your API key:
- Log in to your Peakhour account
- Click on API Keys in the left menu.
- If you don't have a key for your domain then enter your domain name and click Create
- Copy the generated key and paste into the API Key field in the Peakhour.io settings section
- Enter your domain name as it appears in your Peakhour account (ie leave off www, https etc.)
- Click the blue disk icon in the top right to save your settings.
- Click on the orange trash can to test flush your site, you should see a success message.
There will be a couple of Page Rules that need to be configured which will depend on how you have setup your SEO urls.
For example if you have put the checkout process under /checkout then you should have a Page Rule
/checkout* that explicitly disables CDN
Then you have a catchall rule, eg:
!*.* (assuming your urls don't have dots in them)
With the following settings:
- Strip outgoing cookies = disabled
- Serve Stale Content = enabled
- CDN Subkey - Cookie = _phcache_vary
- CDN Status = enabled
- Browser TTL = don't cache
As always if you need help then Contact Us and we'll assist.