Repository navigation
FAQ
Answers to common questions about Selldone Core, including the errors you may see at start-up and how to fix them. If your question is not here, search the issues or open a new one. Security problems go to security@selldone.com, never to public issues.
SelldoneCore.Setup() needs the platform meta tags in <head>. Add at least service-url, selldone-gapi, selldone-iframe, selldone-cdn-images, selldone-cdn-jsons and selldone-cdn-ar (see Getting Started). Similar messages, such as The images CDN is not defined in [selldone-cdn-images] meta tag!, name the missing tag. If you cannot edit <head>, set the same keys on window.selldone_config before calling Setup().
Harmless for most apps. It means there is no <meta name="csrf-token">, so no X-CSRF-TOKEN header is added. Add the tag only if the server that renders your page issues a CSRF token.
The package entry point is index.ts, and some enums import images. Use a bundler that compiles TypeScript from node_modules and handles asset imports, such as Vite (the official Storefront uses Vite). For TypeScript, types/assets.d.ts declares *.svg, *.png, *.jpg, *.gif and *.mp3 modules.
The root re-exports helper/, models/, server/, utils/ and prototypes/ only. Import enums, gapi/, timeserie/ and types/ by file path, for example import { Currency } from "@selldone/core-js/enums/payment/Currency". Default exports such as GlobalRules, ScrollHelper and the cookie helper are also imported by path.
-
Storefront SDK: optional.
StorefrontSDK.Setup()calls it if Core is not initialized. -
Backoffice SDK: yes. Call
SelldoneCore.Setup()first, otherwise it throws❌ console.style not found. Please initialize 'SelldoneCore.Setup()' before initializing the Backoffice SDK.
Enum name / title values are i18n keys. Translate them with your i18n library, for example i18n.global.t(Currency.USD.name). Translation files are in selldone/translate.
GlobalRules, MapHelper and a few other helpers translate messages with window.$i18n_global. Pass your i18n instance once: SelldoneCore.Setup({ i18n: i18n.global }). Date helpers such as DateConverter.SecondsToString() use window.$t, and relative dates use window.$language when no locale is passed.
Responses are stored only for requests chained with .cache(callback) before .then(). Use api.optimize(600).fetchSomething().cache(render).then(render). The store lives in memory and is cleared on reload; CleanCache() clears it manually. See Server and APIs.
Yes. Importing the package root installs the extensions in prototypes/ (for example limit, sumByKey, uniqueByKey) and the Date helpers in helper/date/DateConverter.ts (addDays, setStart…). Selldone packages rely on them. See Helpers and Utilities → Prototypes.
Selldone Core targets the browser: Setup(), SetupService, CDN, cookies and local-storage helpers use document, window and localStorage. Pure types and many enums can be imported anywhere TypeScript runs, but initialize and call runtime helpers in the browser.
Follow the existing patterns: a class or interface plus a namespace with the same name, fields documented with their backend source, and catalog entries with a code and i18n keys. Keep changes backward compatible, because every Selldone package depends on Core. Read the contributing guide.