Skip to main content

Frontend Guidelines

All addons are reviewed before they are available on Shoptet Marketplace. To ensure that your addon is approved, please follow the guidelines below. We strongly recommend that you go through the guidelines before submitting your addon.

CDN Usage

We require that all JavaScript, CSS, and static assets are served from Shoptet CDN. This ensures that assets are delivered securely and efficiently. Here are the benefits of using Shoptet CDN:

  1. Content is cached and served faster than through the e-shop domain.
  2. CDN requests do not count towards the limit of concurrent connections to the same domain name.
  3. No need for additional DNS lookups.
  4. Reduced risk of outages caused by slow third-party servers.

The Addon Repository will automatically upload all assets to Shoptet CDN for you.

Although Partner Developers can use FTP /user/documents/ on their own partner e-shop for storing CSS and JS files, this approach is discouraged in favor of using the Addon Repository.

How to Test

Use the Network tab in the browser developer tools to ensure all addon assets are served from the https://cdn.myshoptet.com/ domain.

XHR Requests and Trailing Slashes

All XHR requests should be properly cached. Use the /cache/ prefix for e-shop URLs to enable caching. Uncached requests can be tolerated only when triggered by user interaction. Ensure that your request URLs end with a trailing slash / to minimize unnecessary redirects.

note

For multilingual e-shops, place /cache/ before the language prefix, e.g., https://multi.shoptet.com/cache/sk/blog/.

How to Test

Check the Network tab in the browser developer tools to verify that all XHR requests are cached and end with a trailing slash /.

Source Code Accessibility and Readability

Source code must be unminified, well-documented, and readable. The Addon Repository will handle minification automatically.

How to Test

The source code of the addon will be reviewed for accessibility and readability during the approval process.

Code Security and Custom Codes

Use custom codes for shared code parts and API endpoints for e-shop-specific code. This approach ensures security and maintainability.

How to Test

The source code will be evaluated for security and proper implementation of custom codes during the review process.

API Guidelines

note

To be updated by the API team.