Universal CDN
Universal CDN
Universal CDN
The add-on moves the loading of the store's static files — images, CSS and JS — to a separate CDN domain. Your server still builds the storefront pages, while the images, styles and scripts reach the customer from the nearest node of a content delivery network.
What a CDN is. A Content Delivery Network is a geographically distributed network of caching servers. The farther a customer is from your server, the longer the files take to arrive; a CDN serves them from a node located close to the customer and takes most of the traffic off your server. The result: pages open faster, the hosting load drops, and page speed is one of the signals search engines use for ranking.
How the add-on works. It does not upload files anywhere: the add-on rewrites the static file addresses in the rendered storefront HTML from the store domain to the CDN domain. The content delivery network, in turn, fetches a file from your server on the first request and serves it from its cache afterwards. That is why the add-on works with any CDN service able to proxy an origin server: Cloudflare, Yandex Cloud CDN, NGENIX, CDNvideo, Selectel, BunnyCDN, KeyCDN and others.
There are five settings: the CDN server address and three independent switches — images, CSS, JS — plus, on Multi-Vendor, loading the vendor panel static files through the CDN. They are set on the Add-ons → CS-Commerce addons → Universal CDN page. On CS-Cart Ultimate and Multi-Vendor Ultimate the settings are kept separately for every storefront.
The add-on leaves the administration panel alone: the addresses there stay unchanged. Even if the CDN domain is set up incorrectly and the storefront is left without styles, the panel opens as usual — just log in and fix the address or disable the add-on.
The add-on is compatible with the entire CS-Cart 4.x branch and supports the CS-Cart, CS-Cart Ultimate, Multi-Vendor, Multi-Vendor Plus and Multi-Vendor Ultimate editions. On CS-Cart Ultimate and Multi-Vendor Ultimate the settings are kept per storefront; on Multi-Vendor the vendor panel is covered by a separate setting.
The add-on overrides the root index.tpl template of the Responsive theme and themes based on it, and processes the fully rendered page. It therefore does not depend on the blocks and hooks a theme uses: every absolute static file address on a storefront page gets rewritten. If your theme does not inherit Responsive, please contact our support center.
The add-on works with any CDN service able to fetch files from the origin server on demand (origin pull, reverse proxy mode). Services that require files to be uploaded to their storage beforehand are not supported — the add-on uploads nothing.
At the moment there is no information about the add-on being incompatible with any theme. If the add-on conflicts with your theme or another solution, please contact our support center.
After success payment, your order will be automatically marked as Paid within a few minutes. Once order changed to Paid status - add-on License activation passed success and you will received an e-mail with confirmation the receipt of payment and a second e-mail with a download add-on link. You can also download the add-on in our License Management section of our website. To install the add-on on your website, please follow these steps:
- Download the latest version of the add-on on our website in the "License Management" section or via the link sent by e-mail.
- Go to Add-ons → Manage Add-ons and in the gear button, select Manual Installation.
- Select the downloaded file and complete the installation of the add-on.
Add-on installation is completed. To go to the add-on settings page, select the installed add-on in the top menu Add-ons → CS-Commerce add-on
All the add-on settings sit on one page: Add-ons → CS-Commerce addons → Universal CDN, the CDN settings tab. The same page opens from the add-on settings button in the Add-ons → Manage add-ons list.
The sidebar of the page shows the installed version, available upgrades and the upgrade subscription term. Links to the documentation and the support center are there too.
The setup order is as follows:
- Configure the CDN service so that the CDN domain proxies your store — see the Preparing the CDN service section.
- Make sure the store files open through the CDN domain: for example, a product image at an address like
https://cdn.example.com/images/detailed/0/…. - Enter the CDN domain in the add-on settings, enable the switches you need and click Save.
- Open the storefront and check in the page source that the static file addresses point to the CDN domain.
If you enter an incorrect CDN address, or the address is not ready yet, the storefront stops showing images, styles and scripts. In that case log in to the administration panel, disable the add-on, then enter the correct address or wait until the CDN is ready, and enable the add-on again.
The administration panel keeps working meanwhile: the add-on does not rewrite addresses there (see the What the add-on rewrites and where section).
CDN server url
The domain the CDN serves your store files from, for example cdn.example.com. No protocol is needed: the add-on strips http:// and https:// if entered and uses the protocol of the current request — on a storefront opened over HTTPS the static file addresses point to https:// as well. The CDN domain therefore needs a valid certificate if the store runs over HTTPS.
While the field is empty, the add-on rewrites nothing, even when enabled.
Load images from CDN
Moves everything stored in the store's images/ directory to the CDN domain: product, category and banner images, logos, payment system icons and other files uploaded through the administration panel. Images the storefront loads via AJAX are covered too — for example, when switching product variations or in live search results.
Load css files from CDN
Moves the compiled theme styles from var/cache/misc/assets/design/ and the whole design/ directory to the CDN domain — along with the styles, the theme files they reference go through the CDN: fonts, background images, icons. See the note on fonts in the Preparing the CDN service section.
Load JS files from CDN
Moves the compiled scripts from var/cache/misc/assets/js/ to the CDN domain. Inline scripts and scripts from third-party domains (counters, widgets) are left untouched.
Load static from CDN on VENDOR panel
Multi-Vendor only. Disabled by default. When enabled, static file addresses are rewritten in the vendor panel as well — by the same rules and with the same switches as on the storefront. The store administration panel (an administrator account, not a vendor one) is never affected, whatever the setting value.
The three switches are independent: you can, for example, serve only images through the CDN and keep the styles and scripts on your own server. That is a convenient starting point — images make up most of the traffic, and a CDN misconfiguration shows up immediately without breaking the layout.
After changing the values, click Save. The settings take effect immediately. If a full-page cache runs on the storefront, clear it: cached pages contain the previous addresses.
The add-on steps in at the last stage of page assembly: once the storefront template has been rendered, it goes through the finished HTML and replaces the static file addresses. Strictly the beginning of an address is replaced — the current store address plus the path to a static directory — with the CDN domain and the same path:
https://shop.example.com/images/→https://cdn.example.com/images/— when images are enabled;https://shop.example.com/var/cache/misc/assets/design/andhttps://shop.example.com/design/→ the same paths on the CDN domain — when CSS is enabled;https://shop.example.com/var/cache/misc/assets/js/→ the same path on the CDN domain — when JS is enabled.
Several practical rules follow from this.
Only absolute store addresses are rewritten
An address must start with the current store address — the one the storefront is opened at. Relative links (/images/… without a domain), links to other domains and links to static files outside the listed directories are left as they are. Absolute links to images/ inside product and page descriptions inserted through the editor are rewritten like all the others.
Where it applies
- the storefront — always, when the add-on is enabled and the CDN address is filled in;
- the vendor panel on Multi-Vendor — only with the Load static from CDN on VENDOR panel setting enabled;
- the store administration panel — never.
AJAX responses
The page template override only covers full page loads. For images the storefront receives via AJAX (switching variations and options, live search, loading lists), the add-on additionally rewrites the address while the image data is being prepared, so those images are served from the CDN too.
Protocol
The CDN domain gets the protocol of the current request: https:// on an HTTPS storefront, http:// on HTTP. The add-on creates no mixed content.
Caching
The add-on does not manage or purge the CDN cache. If the CDN keeps serving an old version after a file has been replaced on the server, purge the cache for that path in the CDN service panel. The style and script files compiled by CS-Cart are recreated when the CS-Cart cache is cleared, and the storefront starts referencing the new files, so this problem usually does not arise for them.
The add-on is designed for a CDN in origin-proxy mode (origin pull, reverse proxy): you give the service the store address as the origin, get a CDN domain, and on the first request for any file the network fetches it from your server at the same path. Nothing has to be uploaded in advance — the service reads the images/, design/ and var/cache/misc/assets/ directories by itself.
What must be ready before enabling the add-on
- Origin. A resource with the origin
https://shop.example.com(the store address the storefront opens at) is created in the CDN service. Files must be served at the same path as on the server:https://cdn.example.com/images/logos/1/logo.pngmust return the same ashttps://shop.example.com/images/logos/1/logo.png. - Domain and certificate. The CDN domain (your own subdomain via CNAME or a domain issued by the service) responds over HTTPS with a valid certificate if the store runs over HTTPS. The add-on applies the storefront protocol automatically, and the browser blocks files with an invalid certificate.
- Fonts. Web fonts loaded from another domain are accepted by the browser only with the
Access-Control-Allow-Originheader. With the Load css files from CDN setting enabled, the theme fonts from thedesign/directory go to the CDN domain, so CORS must be enabled for fonts (or for all files) in the service settings — otherwise the theme icons and fonts will not load. - Origin protection. If bot protection or IP restrictions sit in front of the store, the CDN service addresses must be allowed — otherwise the network cannot fetch the files.
Checking before enabling
Open any product image in the browser with the store domain replaced by the CDN domain. If the image opens, the origin is set up correctly and the address can be entered in the add-on. If the service responds with an error, sort it out before enabling the add-on: once enabled, the storefront is left without the files the CDN cannot serve.
A convenient start is the single Load images from CDN switch: images make up most of the traffic, and a misconfiguration shows up immediately without breaking the layout. Styles and scripts can be moved to the CDN as the next step, after checking that the theme fonts load.
The add-on keeps its settings in its own table, apart from the general add-on settings, and can keep them per storefront.
CS-Cart Ultimate and Multi-Vendor Ultimate
The standard storefront switcher appears in the header of the settings page. With a storefront selected, you set the CDN address and the switches for that storefront only: every storefront has its own store address and, as a rule, its own CDN domain. On the storefront the add-on applies the settings of the storefront whose address the page is opened at.
When All storefronts is selected in the switcher, the fields are not editable, and an Apply to all icon shows up next to every field. It unlocks the field for input, and on save the value is written to all storefronts at once — a convenient way to enable, say, images through the CDN everywhere in one go. Fields without that icon are not changed by such a save.
Separate settings per storefront for Multi-Vendor Ultimate appeared in version 5.1.0. After upgrading from an earlier version, check the add-on settings for every storefront.
CS-Cart, Multi-Vendor and Multi-Vendor Plus
There is one set of settings per store; the page has no storefront switcher.
The vendor panel on Multi-Vendor
Vendors do not see the add-on settings and cannot change them: the settings page is available to the store administrator only. The add-on's effect on the vendor panel is controlled by a single administrator setting — Load static from CDN on VENDOR panel.
In order to have access to add-on upgrades, you must have an active upgrade subscription. If the subscription period has expired, you will only have access to upgrades released before the expiration date of your subscription. You can renew your upgrades subscription in the "License Management" section on our website.
The add-on supports instant upgrades via the CS-Cart Upgrade Center. The built-in CS-Cart Notification Center (bell) will notify you about new versions release of the add-on. Upgrades via Upgrades Center will allow you to switch to a newer version without losing add-on data and settings.
Before start an upgrade process, it is highly recommended to make a full backup of the site (database and files) of your store using the server or hosting methods.
Upgrade through the Upgrade Center
- In the top menu, go to Administration → Upgrade Center;
- In the gear menu, click "Refresh available upgrades"
- Find and add-on on list of available upgrades and click the Download button and than Install button;
- Follow all the instructions that will be shown during the upgrade process;
- It is recommended to clear the CS-Cart templates cache after the upgrades are installed by deleting the var/cache folder on your server or adding the ctpl parameter to the address bar (example: https://domain.com/admin.php?ctpl).
Addon Reinstallation by uninstall old and install new:
Reinstalling an add-on means deleting the add-on's settings and data. Reinstallation will allow you to get a clean installation of the latest addon version. To reinstall the add-on with saving the add-on settings and data, please contact us via our Support Center to provide this service.
To completely reinstall an add-on without saving data, follow these steps:
- Go to Add-ons → Manage add-ons and find the old installed add-on.
- Click the delete button in the gear menu of the add-on.
- Download the latest version of the add-on on our website in the "License Management" section.
- Go to Add-ons → Manage add-ons and in the gear menu select Manual Installation. Select the previously downloaded file and complete the installation of the add-on.
The technical support of the add-on is already included in its price. Before contacting the support center, please make sure you are using the latest released version of the add-on. Old versions of the add-on are not supported by technical support.
To use our technical support, follow these steps:
- On our support center site https://helpdesk.cs-commerce.com/, log in with your account;
- Click on the "Create ticket" button;
- Fill in all the required fields and create ticket (you will receive a confirmation email);
- Expect a response from a specialist (a notification will be sent to your e-mail about the response) in accordance with the regulations of the technical support service.
If you have not received an answer within the time frame specified in the regulations, write us a message to the e-mail [email protected] with the subject of the ticket and we will try to resolve your issue as soon as possible.
Technical support via chat on the site, direct phone calls or e-mail letters is not provided. All help discuss goes through the support center. Carefully study the documentation for the add-on and the terms of technical support before creating a ticket. We recommend that you familiarize with the general restrictions:
- Fragments of code or some files of an add-on may have a private (encoded) part. The coded part does not create problems on add-on customizations;
- The add-on will work only on those domains that are specified in the user's license. If you try to use the solution the domains of which are not included in the license, the add-on will be automatically disabled;
- Installing on local machines is not allowed by the licensing system. For the add-on to work on an additional domain (alias), specify this alias on the license management page. Up to three aliases are allowed per domain for testing and development purposes. You can change the main license domain yourself on the license management page.
To have possibility to add or change license domains and aliases, the upgrade subscription must be active. To change the license domain of an expired upgrades subscription, you must first renew your subscription.
Version 5.2.0 of March 10, 2026
- Added compatibility with PHP 8.3.
- Added Russian translations.
- Basic security updates of the add-on.
Version 5.1.1 of September 12, 2024
- Basic security updates of the add-on.
Version 5.1.0 of September 27, 2023
- Added separate settings per storefront for Multi-Vendor Ultimate stores. After installing the upgrade, check the add-on settings for every storefront.
Version 5.0.0 of July 25, 2023
- Added the ability to serve static files through the CDN in the vendor panel of the Multi-Vendor edition.
- Basic security updates of the add-on.
Version 4.3.1 of October 3, 2022
- Added compatibility with PHP 8.0.
Version 4.3 of July 18, 2022
- Basic security updates.
Version 4.2 of May 13, 2022
- Basic update for better compatibility with the latest CS-Cart versions.
Version 4.1 of January 12, 2022
- Improved the add-on display for the latest CS-Cart versions.
- Improvements to the license check and upgrade delivery functions of the add-on.
Version 4.0 of September 11, 2020
- A new generation of the add-on with a built-in upgrade center.
- Fixed: on AJAX page loads images were output without the CDN server address.
Version 3.1.1 of March 20, 2019
- The add-on has been completely rebuilt: all image links are now loaded through the CDN, not only those that went through the CS-Cart image loader.
Version 2.1 of August 7, 2018
- Added compatibility with multiple storefronts.
Version 2.0 of July 22, 2016
- Optional upgrade.
Version 1.0 of May 13, 2016
- The first release of the add-on.