Magento 1
The Magento 1 plugin enhances your ecommerce store to work seamlessly with the Peakhour service. Peakhour can dramatically cut requests to your origin which means your server can focus on the important things, ie making sales!
Supported Features#
- Automatically add expires headers to pages to enable caching of dynamic content while avoiding whitelisted urls.
- Intelligently load mini cart content via Ajax when cached content is served.
- Automatically flush cached assets/content from the Peakhour global CDN when making changes through the Magento admin.
- Enable manual flushing of the Peakhour CDN from within the Magento admin area.
Requirements#
- Magento 1.7x or greater
- PHP 5.4 or greater
Download#
Click here to download the latest version (v1..0.0) of the plugin.
Installation#
It is recommended that you install this plugin via the Magento marketplace, please see the official docs for instructions on how to do this
Overview#
A slow loading page is the main reason a client will leave your website. The Peakhour acceleration and security service can dramatically reduce page load times by optimising and caching content on its Anycast network. Our Web Application Firewall uses industry leading rulesets and blocklists to protect your site from malicious visits.
Plugin Features#
- Add expires headers to enable caching of dynamic content
- Automatic flushing of content from Peakhour's global CDN when making changes through the Magento admin
- Manually flush content without having to log in to the Peakhour admin
- Make your minicart load via Ajax to enable caching of nearly all content.
- Replace form key validation with a strict referrer check when adding items to the cart
Configuration#
Account Details#
This is the minimum configuration that you have to perform. You must first sign up for the Peakhour service which you can do here.
Peakhour.io API key: This is obtained through your Peakhour Account, log in to your Peakhour account, then click on 'API Keys', enter the name of your domain and click create, then cut and paste the generated value here.
Domain Name: The name of your domain, eg domain.com, do not include www. or http:// etc
CDN Settings#
This section controls automated flushing when editing through the magento interface and also whether cache control headers are added within magento. This allows Peakhour to automatically pick up cacheable content rather than configuring page rules with in Peakhour.
Automatic Purging: enable automatic flushing of Peakhour's cache when editing content
Purge product categories on product update: When editing a product also flush any categories it belongs to. You want to do this if the category displays lists of products
Purge product on automatic stock update: Enable this if you display whether an item is in stock or remove the product from sale when out of stock.
Automatically Add cache headers for pages: By default Magento 1 returns "Cache-Control: no-cache, no-store, must-revalidate" headers for content. This setting will replace this with "Cache-Control: max-age=${expiry}, public, s-maxage=${expiry}". This enables Peakhour to start caching pages without the need to configure page rules
Cache expiry in seconds: Set the time that the Peakhour CDN will let a page sit in its cache before checking for new content.
List of url keys not to cache: List of url keys, eg 'checkout' which will not have expires headers added to if the url contains the key
Manual Purging#
Purge All: Instantly remove all cached content from the Peakhour cache.
Purge pattern: Purge all cached urls that match the pattern using * as a wilcard.
Advanced#
Purge peakhour when flushing magento storage?: Enabling this feature means Peakhour will be flushed when you click on the 'Flush Cache Storage' under the System -> Cache Storage Managenet section of the Magento Admin.
Peakhour purge mode for flush cache storage: Choose the mode you want when flushing from the Magento cache management page. Typically you only need to flush cached pages and non optimised resources.
Ajax mini cart#
Enable Ajax cart: Does what it says. Please note this requires jquery to perform an ajax request. Jquery is installed by default in 1.9 but not 1.7. Only enable if you have minicart functionality and jquery installed
Name of the magento block that generates cart html: In magento 1.9 this is 'minicart_content', however this might be different if you have your own custom mini cart.
selector for mini cart count: This is the html selector (using jquery syntax) to identify the element that displays the count of items in the minicart.
selector for mini cart subtotal: This is the html selector (using jquery syntax) to identify the element that displays the cart subtotal. Not all minicarts have this.
selector for mini cart content: The html element under which the mini cart content is.
selector for removing nocount class: Some minicarts have a class that hides the display of the mini cart count if the count is 0. Enter this to remove it.
Form Key override#
Enable Form Key Override: You must enable this if you have form key security enabled and are caching product pages with Peakhour. Peakhour will have an invalid form key for the current session which will mean a client can't add an item to the cart.
Enable referrer check: To get back the security lost by disabling form key validation you can enable a strict referrer check. This means that only requests with a referrer that is your domain name can add to the cart.