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.

Supported Features

  • 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

Requirements

  • Opencart 3 or greater
  • PHP 5.6 or greater

Download

Installation

Prerequisites

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.

Plugin Configuration

  1. Log in to your Opencart admin
  2. Using the left menu navigate to Extensions -> Installer, then click on the "Upload" button next to "Upload file"
  3. Once uploaded use the left menu to navigate to 'Extensions' link immediately below the 'Installer' link from step 2.
  4. From the 'Choose your extension type' dropdown choose 'Modules'
  5. Scroll down until you find 'Peakhour' and then click on the '+' button on the right to install.
  6. Under the 'General' tab, you need to fill in the 'Peakhour API Key' setting, to obtain your API key:
    1. Log in to your Peakhour account
    2. Click on API Keys in the left menu.
    3. If you don't have a key for your domain then enter your domain name and click Create
    4. Copy the generated key and paste into the API Key field in the Peakhour.io settings section
  7. Enter your domain name as it appears in your Peakhour account (ie leave off www, https etc.)
  8. Click the blue disk icon in the top right to save your settings.
  9. Click on the orange trash can to test flush your site, you should see a success message.

Peakhour Configuration

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:

  1. Strip outgoing cookies = disabled
  2. Serve Stale Content = enabled
  3. CDN Subkey - Cookie = _phcache_vary
  4. CDN Status = enabled
  5. Browser TTL = don't cache

As always if you need help then Contact Us and we'll assist.