Appearance
Admin Settings & Configuration
Flow ID: AD-13 Module(s): settings Complexity: Medium Last Updated: 2026-11-16 — 4.130.0 resync: customer-grade registry rows corrected (label vs numeric threshold) and the numeric validation of the thresholds noted (#1031); previous, 2026-10-19 — 4.128.0 resync: External frontend brands page and the
brandsstorefront-config section (#935), reCAPTCHA v3 secret validation bound to the controller,Adv_settings.phpcitations re-based; previous, 2026-10-13 — 4.127.0 resync: Customer notifications panel (push, per-event e-mail/push, cap, quiet hours, retention; #559),Adv_settings.phpcitations re-based; previous, 2026-10-02 — 4.125.0 resync: Viva Wallet merchant-credential registration guard noted; previous, 2026-09-29
Business Overview
All platform configuration is stored in a database-backed registry (registry table) with a group/key/value/language structure. The Registry library provides get/set/delete with PSCache caching, encryption for secrets via the CI Encryption library, method chaining, and pipe-delimited array storage. Five settings controllers manage 50+ integration providers across 20+ admin pages, organized into the ecommercen/settings/ HMVC module.
The settings system is the central nervous system of the platform -- almost every feature (payments, feeds, analytics, AI, notifications, SSO, loyalty, search, and third-party integrations) is configured through registry values that are read at runtime.
API Reference
Admin Panel Routes
All settings routes are session-based admin panel pages (no REST API endpoints).
| Route | Controller | Method | Description | Required Roles |
|---|---|---|---|---|
settings | Adv_settings | index() | General settings: site title, email, company, cart, payments, price tracking | ADVISABLE, ADMIN |
settings/third_party_providers | Adv_settings | third_party_providers() | 15+ third-party integrations | ADVISABLE, ADMIN |
settings/google | Adv_settings | google() | GA4, reCAPTCHA (hybrid v2+v3), Tag Manager, Recommendations AI | ADVISABLE, ADMIN |
settings/subsystem_settings | Adv_settings | subsystem_settings() | Loyalty points configuration | ADVISABLE, ADMIN |
settings/notification_settings | Adv_settings | notification_settings() | Email, SMS, OneSignal push (deprecated), customer push notifications (FCM) and per-order-event e-mail/push settings, see AD-61 | ADVISABLE, ADMIN, DEVELOPER (SMS and OneSignal fields: ADVISABLE, DEVELOPER only) |
settings/payment_settings | Adv_settings | payment_settings() | 12+ payment provider configs | ADVISABLE, ADMIN |
settings/other_settings | Adv_settings | other_settings() | Filters, stock, tags, bundles, display | ADVISABLE, ADMIN |
settings/xml_feeds_settings | Adv_settings | xml_feeds_settings() | Feed tokens and price modifiers | ADVISABLE only, for reading and saving; other roles get 401 from _remap() (Adv_settings.php:44-57, list :65-73) (#1054) |
settings/e-commercen-plus | Adv_settings | eCommercenPlus() | Email campaigns: points, birthday, reviews | ADVISABLE, ADMIN |
settings/only_advisable | Adv_settings | only_advisable() | Developer-only: Matomo, AI, Farmakon, feature flags, and the MCP Connector on/off switch (MCP_CONNECTOR.ENABLED, saved for ADVISABLE sessions only -- see Business Rules) | ADVISABLE only, for reading and saving; other roles get 401 from _remap() (Adv_settings.php:44-57, list :65-73) (#1054) |
settings/variation_settings | Adv_settings | variation_settings() | Product variation display config | ADVISABLE, ADMIN |
settings/attribute_settings | Adv_settings | attribute_settings() | Product attribute config | ADVISABLE, ADMIN |
settings/ai_content_generation_settings | Adv_settings | ai_content_generation_settings() | OpenAI provider configuration. The page shows the OpenAI API key in a plain-text input, so it is refused to non-Advisable sessions. The 17 AI_CONTENT_GENERATION_PROVIDER_OPEN_AI keys are also saved only for an Advisable session, as a second line (saveAiContentGenerationOpenAiSettings(), Adv_settings.php:101-126, called at :2747) (#1054) | ADVISABLE only, for reading and saving; other roles get 401 from _remap() (Adv_settings.php:44-57, list :65-73) |
settings/ai_content_generation_prompts | Adv_settings | ai_content_generation_prompts() | AI prompt templates per entity | ADVISABLE only, for reading and saving; other roles get 401 from _remap() (Adv_settings.php:44-57, list :65-73) (#1054) |
settings/mailchimp | Adv_settings | mailchimp() | Mailchimp API integration | ADVISABLE, ADMIN |
settings/availableCountries | Adv_settings | availableCountries() | Country enable/disable | ADVISABLE, ADMIN |
settings/videoShowcase | Adv_settings | videoShowcase() | Video showcase settings | ADVISABLE, ADMIN |
settings/social_auth | AdvSocialAuthSettings | index() | Google/Facebook OAuth credentials | ADVISABLE only |
settings/social_links | AdvSocialLinksSettings | index() | Social media profile URLs | ADVISABLE, ADMIN |
settings/plus_settings | AdvGeneralSettings | index() (route plus/general_settings) | eCommercen Plus general settings: smart recommendations, Advisable AI connection, recommendation blocks, related products. The admin menu offers it to ADVISABLE only; the controller admits ADMIN too (AdvGeneralSettings.php:9). 19 of its post fields are written only for an Advisable session (isAdvisableSession(), :20); an ADMIN can still write smart_recommendations_based_on_cart and smart_recommendations_last_seen. getAiValues() returns empty advisableAiAppSecret and advisableAiAdminSecret to any other role, so the decrypted secrets are not in the form HTML (:115-137) (#1054) | ADVISABLE, ADMIN |
settings/mobile_app_settings | Adv_settings | mobile_app_settings() (:2986) | Mobile app minimum-version / store-URL settings, registry group APP_UPDATE (src/Domains/StorefrontConfig/AppUpdate/AppUpdateConfigResolver.php:49); feeds the appUpdate section of GET /rest/storefront-config (#840). Menu: application/config/admin_menu.php:341-347 | ADVISABLE, DEVELOPER, ADMIN |
settings/externalHome | Adv_settings | externalHome() (:3127) | External-frontend home hero config, registry group HOME_EXTERNAL (src/Domains/StorefrontConfig/Home/HomeConfigResolver.php:36); feeds the home section of GET /rest/storefront-config (#841). Menu: application/config/admin_menu.php:348-354 | ADVISABLE, ADMIN |
settings/externalBrands | Adv_settings | externalBrands() (:3222) | External-frontend top brands, registry group BRANDS_EXTERNAL (src/Domains/StorefrontConfig/Brands/BrandsConfigResolver.php:35-36); feeds the brands section of GET /rest/storefront-config (#935). Menu: application/config/admin_menu.php:355-361 | ADVISABLE, ADMIN (also checked inside the action, :3224-3227) |
settings/favicons | AdvFavicons | index() / save() | Favicon upload, generation, manifest. save() calls CachedFragmentReader::forget('files/favicons/view.html') after writing the fragment (ecommercen/settings/controllers/AdvFavicons.php:91-94; failure is logged as a warning, not surfaced); the storefront reads the fragment through CachedFragmentReader::read() (application/views/main.php:10) — see SY-28 Storage Abstraction | ADVISABLE, ADMIN |
settings/email_views | AdvEmailViewer | index() | Email template preview (21 templates) | ADVISABLE, ADMIN |
settings/email_views/editEmailSubjects | AdvEmailViewer | editEmailSubjects() | Per-language email subject editor | ADVISABLE, ADMIN |
Code Flow
Registry Read/Write Pattern
Every settings controller follows the same pattern:
Adv_settings::{page}()
|-- POST submission check
| |-- Run validation rules
| |-- If valid:
| | |-- registry->setValue($group, $key, $value, $lang?, $encrypted?)
| | | |-- Updates in-memory data array
| | | |-- Calls registry_model->set_regval()
| | | | |-- Checks if (reggroup, regkey, lang) exists
| | | | |-- If exists: UPDATE regval
| | | | |-- If not: INSERT new row
| | | | \-- Encrypts value if $encrypted=true via Encryption library
| | | \-- Returns $this (method chaining)
| | \-- redirect back to same page
|-- GET display:
| |-- registry->value($group, $key, $lang?, $encrypted?)
| | |-- Looks up in-memory array: data[$group][$key][$lang]
| | \-- Decrypts if $encrypted=true
| |-- Merge into render array
| \-- Load viewRegistry Initialization (On Every Request)
Registry::__construct()
|-- Load registry_model + pscache + encryption
|-- pscache->model('registry_model', 'all', [])
| |-- Check file cache for 'registry_model_all_[]'
| |-- On miss: registry_model->all() -> SELECT * FROM registry
| \-- Cache result
|-- parseDb($data)
| |-- Build nested array: data[$reggroup][$regkey][$lang] = $regval
| \-- Empty lang mapped to 'BASE' constantRegistry Live Refresh
Registry::live() [called in Adv_admin_controller constructor]
|-- pscache->updateCache('registry_model', 'all', []) [invalidates cache]
|-- pscache->model('registry_model', 'all', []) [re-fetches from DB]
\-- parseDb($data) [rebuild in-memory array]Encrypted Values Flow
Registry::setValue('SOCIAL_AUTH', 'GOOGLE_CLIENT_SECRET', $value, '', true)
|-- registry_model->set_regval(..., $encrypted=true)
| |-- encryption->encrypt($regval) [CI Encryption library]
| \-- Store encrypted ciphertext in DB
Registry::value('SOCIAL_AUTH', 'GOOGLE_CLIENT_SECRET', '', true)
|-- Read raw (encrypted) value from in-memory array
\-- encryption->decrypt($value) -> plaintextDomain Layer
Settings HMVC Module (ecommercen/settings/)
| File | Lines | Description |
|---|---|---|
controllers/Adv_settings.php | 3,289 | Main settings controller with 20+ page methods, each handling GET display + POST save. Extends Admin_c. |
controllers/AdvSocialAuthSettings.php | 93 | Google + Facebook OAuth client credentials. ADVISABLE-only. Encrypted secrets. |
controllers/AdvSocialLinksSettings.php | 52 | Social media profile URLs (Facebook, Twitter, Instagram, LinkedIn, Pinterest, TikTok). |
controllers/AdvFavicons.php | 110 | Favicon upload with image generation (multiple sizes) and manifest creation. Uses FaviconImageGenerator + FaviconHtmlGenerator. |
controllers/AdvEmailViewer.php | 252 | Email template preview (21 entries) with mock data, and per-language subject editor for EMAIL_SUBJECTS registry group. See AD-53 Email Template Viewer for the full code flow, known issues, and subject key catalog. |
controllers/AdvMcpConnectorSettings.php | 130 | Self-serve MCP connector token management: list, generate, rotate, and revoke tokens carrying seo, analytics and/or content scopes via Advisable\Mcp\Auth\TokenService. Reads the connector's on/off switch through isMcpConnectorEnabled() (disabled notice, and generate/rotate/revoke blocked, while off) but does not own it: the switch is MCP_CONNECTOR.ENABLED on only_advisable. |
Notification Settings Field: Return Form Recipient E-mail
The notification_settings() route in Adv_settings.php (ecommercen/settings/controllers/Adv_settings.php:1071-1127) exposes a "Return form recipient e-mail" field that is not listed in the API Reference routes table. This field (return_form_recipient_email, ecommercen/settings/controllers/Adv_settings.php:1095) accepts a valid email address, with valid_email validation (ecommercen/settings/controllers/Adv_settings.php:1149-1154, now with a labelled rule and form_error() in the view), and writes to the registry group RETURN_FORM key RECIPIENT_EMAIL (write at ecommercen/settings/controllers/Adv_settings.php:1095; read back for form display at :1120). The view field is rendered at application/views/admin/settings/notification_settings.php:67-79. This setting provides the shop recipient address for product return-form submission emails, and falls back to the EMAIL_CONTACT_FORM SMTP profile admin email when unset (fallback logic in ecommercen/forms/controllers/Adv_forms.php:128-131).
Customer notifications panel (#559). The same page also hosts the customer push-notification settings, saved by saveCustomerNotificationSettings() into registry group NOTIFICATIONS (ecommercen/settings/controllers/Adv_settings.php:1217-1248; view data :1250-1289; markup application/views/admin/settings/notification_settings.php:84-249): the push master switch, daily marketing cap, quiet hours (HH:MM, validated by notificationTimeIsValid(), :1206-1215), test customer ids, device and history retention, and a per-order-event table (customer e-mail on/off, push mode off/with/instead_of_sms, push title and body per language) (validation :1156-1197). The SMS and OneSignal values are written only when canEditNotificationProviders() allows ADVISABLE or DEVELOPER (:1083-1093,1201-1204); other roles reaching the page save only the notification settings. Behaviour of the settings, and the order-email hooks that read the per-event e-mail switch, is documented in SY-35 Push Notifications and AD-61 Push Notification Campaigns.
Registry Library (application/libraries/Registry.php)
| Method | Signature | Description |
|---|---|---|
value() | value($regGroup, $regKey, $langAbbr='', $encrypted=false) | Get single value. Returns null if not found. |
setValue() | setValue($regGroup, $regKey, $regVal='', $langAbbr='', $encrypted=false) | Set/upsert value. Returns $this for chaining. |
getGroupAsArray() | getGroupAsArray($regGroup, $langAbbr='', $encryptedKeys=[]) | Get all keys in a group as associative array. |
setArray() | setArray($regKey, $regGroup, $langAbbr, $regVal=[]) | Store array as pipe-delimited string. |
getArray() | getArray($regKey, $regGroup, $langAbbr) | Read pipe-delimited string back as array. |
delete() | delete($regGroup, $regKey, $langAbbr='') | Remove a specific value. |
live() | live() | Force cache refresh and re-read from DB. Returns $this. |
Registry Model (application/models/Registry_model.php)
| Method | Description |
|---|---|
all() | SELECT * FROM registry (all rows, used for PSCache population) |
set_regval($regkey, $reggroup, $lang, $regval, $encrypted) | Upsert pattern: check existence, then UPDATE or INSERT. Encrypts if flagged. |
delete($regGroup, $regKey, $langAbbr) | DELETE matching row |
Architecture
Registry Groups Inventory
The following registry groups are managed across all settings controllers:
| Group | Settings Page | Key Values |
|---|---|---|
SITE | index | TITLE (per-lang), EMAIL_FORM, COMPANY_ADDRESS (per-lang) |
ESHOP | index, subsystem, only_advisable | SANITIZE_INTERVAL, COMPANY_PHONE, PAYMENTS_ACTIVE, TRANS_COST_LIMIT, LIMIT_ON_PRODUCTS, DEFAULT_CURRENCY, SLUG_TO_GREEKLISH, plus 15+ more |
BLOG | index | RSSTITLE (per-lang), RSSDESCRIPTION (per-lang) |
GLOBAL | index, only_advisable | ADMIN_EMAIL, CDN_URL, STOREFRONT_BASE_URL, LOGO, SITE_MODE |
SMS | index, notifications | SMS_LIMIT, IS_ENABLED, SEND_IS_ENABLED, FOR_PAYWAY, PROVIDER |
EMAIL_* | index (dynamic groups) | SMTP_HOST, SMTP_PORT, SMTP_USER, SMTP_PASS (encrypted), SMTP_AUTO_SSL_TLS, SENDER_EMAIL, FROM_NAME, ADMIN_EMAIL |
EMAIL | notifications | SEND_EMAIL_TO_CLIENT_FOR_ADMIN_ORDER, NOTIFICATION_LOW_STOCK, NOTIFICATION_NEW_PRODUCT |
EMAIL_SUBJECTS | email subjects | Per-language email subject lines |
PRICE_TRACK | index | ENABLED, ENABLED_GRAPH (written only for an Advisable session, savePriceTrackGraphSetting() Adv_settings.php:89-96, called at :176; #1054), TRACK_DAYS, SHOW_DISCOUNT_ON_VALUE, DISCOUNT_LABEL (per-lang) |
SKROUTZ | third_party | ANALYTICS_KEY, ANALYTICS_IS_ENABLED |
BESTPRICE | third_party | ANALYTICS_KEY, ANALYTICS_IS_ENABLED |
FACEBOOK | third_party | IS_ENABLED, PIXEL_ID |
FACEBOOK_CONVERSION | third_party | ENABLED, PIXEL_ID, PIXEL_ACCESS_TOKEN, PIXEL_TESTING_CODE, TIMEOUT, CONNECT_TIMEOUT |
CRITEO | third_party | IS_ENABLED, ACCOUNT_ID |
AGORA | third_party | IS_ENABLED, API_URL, API_KEY, CATALOG_ID, TEAM_ID, BANNERS_, PIXEL_, DSPL_* (20+ keys) |
TABOOLA | third_party | IS_ENABLED, ID |
LINKWISE | third_party | IS_ENABLED, PROGRAM_ID |
SMARTCART | third_party | IS_ENABLED, API_URL, API_KEY, DISABLE_PRODUCT_STOCK_CHECK |
SHOPFLIX | third_party | IS_ENABLED, IS_PRODUCTION, API_EMAIL, API_KEY |
MANAGO | third_party | ENABLE_MONITOR_SCRIPT, ENABLE_API, API_BASE_URL, CLIENT_ID, plus 15+ keys |
GOOGLE | GA_TRACKING_ID, RECAPTCHA v2/v3 keys (RECAPTCHA_KEY/SECRET, RECAPTCHA_V3_KEY/SECRET encrypted, RECAPTCHA_V3_THRESHOLD), TAG_MANAGER keys, RECOMMENDATIONS keys | |
POINT_SYSTEM | subsystem | IS_ENABLED, ORDER_EDIT_KEEP_PRODUCT_POINTS |
ONE_SIGNAL | notifications | IS_ENABLED, APP_ID, SAFARI_WEB_ID -- deprecated since #559: nothing sends through OneSignal any more; fields kept for one release, editable only by ADVISABLE and DEVELOPER |
NOTIFICATIONS | notifications | PUSH_ENABLED, MARKETING_DAILY_CAP, QUIET_HOURS_START/END, TEST_CUSTOMER_IDS, DEVICE_RETENTION_DAYS, HISTORY_RETENTION_MONTHS, and per order event EMAIL_, PUSH_, PUSH_TITLE_/PUSH_BODY_ (per language) -- see SY-35 |
PAYPAL | payments | USERNAME, PASSWORD, SIGNATURE |
PAYPAL_ADVANCED | payments | CLIENT_ID, CLIENT_SECRET, SANDBOX |
ALPHABANK | payments | VERSION, ID, SSK, SUBMIT |
EUROBANK | payments | MERCHANT_ID, SECRET, URL, USE_INSTALLMENTS, INSTALLMENTS |
PIRAEUSBANK | payments | ACQUIRER_ID, MERCHANT_ID, POS_ID, USERNAME, PASSWORD, REQUEST_TYPE, INSTALLMENTS, BNPL, plus more |
PIRAEUSBANK_EXTERNAL | payments | 13 keys -- Piraeus POS credentials for the external-frontend channel; written unconditionally |
PIRAEUSBANK_GIFTCARDS_EXTERNAL | payments | 13 keys -- Piraeus POS credentials for the gift-cards channel; written only inside the GIFT_CARDS.ENABLED guard |
ETHNIKIBANK | payments | PUBLIC_KEY, PRIVATE_KEY |
ETHNIKIBANK_NBGPAY | payments | APP_ID, APP_KEY, IS_SANDBOX |
ETHNIKIBANK_EE | payments | DIRECT_API_KEY |
VIVAWALLET | payments | PAYMENT_PARAMETERS, CLIENT_ID, CLIENT_SECRET, plus more |
STRIPE | payments | PUBLIC_KEY, SECRET_KEY, WEBHOOK_KEY |
KLARNA_PAYMENTS | payments | USERNAME, PASSWORD, API_REGION |
IRIS | payments | MERCHANT_ID, SECRET |
JCC | payments | MERCHANT_ID, ACQUIRER_ID, PASSWORD |
CARDLINK | payments | MERCHANT_ID, SHARED_SECRET |
PAY_BY_BANK | payments | MERCHANT_ID, API_KEY, PROVIDER |
SOCIAL_AUTH | social_auth | GOOGLE_LOGIN_ENABLED, GOOGLE_PROJECT_ID, GOOGLE_CLIENT_ID, GOOGLE_CLIENT_SECRET (encrypted), FACEBOOK_LOGIN_ENABLED, FACEBOOK_CLIENT_ID, FACEBOOK_CLIENT_SECRET (encrypted) |
SOCIAL_LINKS | social_links | FACEBOOK, TWITTER, INSTAGRAM, LINKEDIN, PINTEREST, TIKTOK |
MATOMO | only_advisable | ENABLED, SHOW_ADMIN_DASHBOARD, TOKEN (encrypted), SITE_ID (encrypted), SITE_URL, PRODUCT_ID_PREFIX, TIMEOUT, CONNECT_TIMEOUT |
ADVISABLE_AI | only_advisable | SHOW_ADMIN_DASHBOARD |
VIEW_METRICS | only_advisable | ENABLED, PERIOD, per-object-type ENABLED/PERIOD |
MCP_CONNECTOR | only_advisable | ENABLED -- MCP Connector on/off switch, stored as '1'/'0' ((int)(bool), Adv_settings.php:2382); a missing row reads as off. The one key on this page written only for ADVISABLE sessions (guard :2381); read through isMcpConnectorEnabled() (ecommercen/helpers/registry_helper.php:597-624); seeded once by migration 20261002120000_add_mcp_connector_enabled_registry_key.php (#824) |
FARMAKON | only_advisable | IS_ENABLED, ADDRESS, EXCLUDED_PRODUCT_LIST |
BUILDER | only_advisable | ENABLED |
COOKIES | only_advisable | ENABLED |
SUPPLIER | only_advisable | ENABLED |
DATABOX | only_advisable | ENABLED, TOKEN (encrypted) |
MARKETDATA | only_advisable | ENABLED, MARKETDATA_KEY (encrypted), MARKETDATA_TYPE |
EUROPHARMACY | only_advisable | ENABLED (stored as (int), Adv_settings.php:2426), BASE_URL, USERNAME, PASSWORD (encrypted, :2429) |
FLAGGED_CONTENT | only_advisable | EVENTS, MAPS, VIDEO |
ECOMMERCEN_PLUS | eCommercenPlus, only_advisable | CUSTOMER_REVIEW_REWARD_ENABLE, CUSTOMER_REVIEW_REWARD, PRODUCT_PAGE_COMBO_ENABLED, AFTER_ADD_TO_CART_RECOMMENDATIONS_ENABLED |
EMAIL_FOR_TOTAL_POINTS | eCommercenPlus | IS_ENABLED, TOTAL_POINTS, INTERVAL, INTERVAL_REPEAT |
EMAIL_FOR_BIRTHDAY | eCommercenPlus | IS_ENABLED, POINTS_TO_ADD, REPEAT |
GIFT_CARDS | payments | ENABLED |
GIFT_PACKAGING | other | ENABLE, COST |
OTHER | other, only_advisable | DEFAULT_FILTER_FRONT, LOW_STOCK_END_OF_LIST, ENABLE_LOGIN_AND_BUY, SHOW_PRODUCT_HITS, plus 20+ feature flags |
AFFILIATION_VARIATIONS_GROUPS | third_party | GROUPS_FOR_SIZE, GROUPS_FOR_COLOR |
AFFILIATION_ATTRS_GROUPS | third_party | GROUPS_FOR_SIZE, GROUPS_FOR_COLOR |
AI_CONTENT_GENERATION_PROVIDER_OPEN_AI | ai_settings | IS_ENABLED, API_KEY, MODEL, MAX_TOKENS, TEMPERATURE, plus 12+ params |
AI_CONTENT_GENERATION_PROMPTS | ai_prompts | Dynamic per-entity prompt templates |
ATTRIBUTES | attribute_settings | DISPLAY_FILTERS_IN_LISTINGS, MERGE_DUPLICATE_VALUES_BY_NAME -- controls attribute filter sidebar visibility and deduplication |
EMAIL_NEWSLETTER | notifications | SMTP config (HOST, PORT, USER, PASS encrypted, AUTO_SSL_TLS, SENDER_EMAIL, FROM_NAME, ADMIN_EMAIL) -- dedicated SMTP for newsletter sending |
GLAMI | third_party | IS_ENABLED -- Glami marketplace feed toggle |
KLARNA_OSM | payments | ENABLED, IS_PRODUCTION, CLIENT_ID -- Klarna On-Site Messaging (financing widgets on PDP + checkout) |
MAILCHIMP_LOGGING | mailchimp | SMTP config (HOST, PORT, USER, PASS encrypted, AUTO_SSL_TLS, SENDER_EMAIL, FROM_NAME, ADMIN_EMAIL) -- Mailchimp event logging emails |
RETURN_FORM | notifications | RECIPIENT_EMAIL -- shop recipient address for product return-form submissions (falls back to EMAIL_CONTACT_FORM admin email) |
NEWSLETTER | notifications | DEFAULT_GROUP -- default user group for new subscribers |
PAYWAY_ADMIN | payments | delivery, paid_at_store, bank_transfer -- admin-available payment methods |
PAYWAY_EXTERNAL | payments | METHODS -- curated external-frontend payway pool (delivery, bank_transfer, paid_at_store, vivawallet, eurobank, paybybank) |
PAYWAY_GIFT_CARDS_EXTERNAL | payments | METHODS -- curated external-frontend gift-card payway pool (vivawallet only) |
PRODUCT_CART_CUSTOMISATIONS | other | ENABLED -- cart customization feature toggle |
RELATED_RECOMMENDATIONS | other | ENABLED -- related product recommendations toggle |
VIVA_ENABLED_PAYWAYS | payments | vivawallet_iris, etc. -- active Viva Wallet sub-methods |
WIZARD | (internal) | INITIALWIZARD_COMPLETED_AT -- setup wizard completion marker |
APP_UPDATE | mobile_app_settings | ANDROID_MINIMUM_VERSION, ANDROID_STORE_URL, IOS_MINIMUM_VERSION, IOS_STORE_URL -- mobile-app update gate published as appUpdate on GET /rest/storefront-config (#840; key names from src/Domains/StorefrontConfig/AppUpdate/AppPlatform.php:21,27) |
HOME_EXTERNAL | externalHome | HERO_SLIDESHOW_GROUP_ID, HERO_SLIDESHOW_LIMIT -- external-frontend home hero published as home on GET /rest/storefront-config (#841; src/Domains/StorefrontConfig/Home/HomeConfigResolver.php:36-38) |
BRANDS_EXTERNAL | externalBrands | TOP_VENDOR_IDS -- ordered, pipe-joined vendor ids for an external frontend's top-brands row, published as brands on GET /rest/storefront-config (#935; src/Domains/StorefrontConfig/Brands/BrandsConfigResolver.php:35-36) |
Caching Architecture
+-----------+
| PSCache | (file-based, L2 cache)
+-----------+
|
Admin requests: | Frontend requests:
Registry::live() | Registry reads from
forces refresh --------+---------- pre-loaded in-memory array
|
+-----------+
| registry | (MySQL table)
+-----------+The entire registry table is loaded once into PSCache, then parsed into an in-memory nested array. Admin controllers call Registry::live() to force a refresh on each admin page load. Frontend controllers rely on the cached version.
Data Model
registry Table
| Column | Type | Description |
|---|---|---|
id | INT(11) PK AI | Record ID |
reggroup | VARCHAR(150) | Configuration group (e.g., ESHOP, PAYPAL, SITE) |
regkey | VARCHAR(150) | Configuration key within group |
regval | TEXT | Value (plaintext or encrypted ciphertext) |
lang | VARCHAR(2) | Language abbreviation (empty string for non-localized values) |
Indexes: reggroup, regkey, (regkey, lang), (reggroup, regkey, lang) -- the last is a covering index for the upsert pattern.
Storage Patterns
| Pattern | Example | Storage |
|---|---|---|
| Simple value | setValue('ESHOP', 'PAYMENTS_ACTIVE', '1') | regval = '1', lang = '' |
| Per-language | setValue('SITE', 'TITLE', 'My Shop', 'el') | regval = 'My Shop', lang = 'EL' |
| Encrypted | setValue('PAYPAL', 'PASSWORD', $pw, '', true) | regval = encrypted_ciphertext, lang = '' |
| Array | setArray('PAYWAY', 'METHODS', '', ['cod','card']) | regval = 'cod|card', lang = '' |
Configuration
Related Config Files
| File | Description |
|---|---|
application/config/auth.php | Auth provider flags, hash type, static users |
application/config/email_groups.php | Defines available email group names for SMTP settings |
application/config/ai_content_generation_prompts.php | Defines entity/field structure for AI prompt settings |
application/config/emailViews.json | Email template configuration for the email viewer |
ecommercen/helpers/registry_helper.php | Helper functions for registry access outside controllers, including isMcpConnectorEnabled() (the MCP Connector gate, #824) |
Environment Variables
The registry itself has no direct environment variable dependencies, but many settings pages reference .env values via env() calls for initial/fallback values. The encryption key used for encrypted registry values is configured via the CI Encryption library config.
Client Extension Points
- Settings controllers extend
Admin_c-- client repos can override any settings controller by placing a same-named file inapplication/controllers/. - New registry groups can be created at any time by simply calling
setValue()with a new group name -- no schema changes needed. - Encryption keys are per-installation (from CI config), so encrypted values are not portable between environments.
- Custom settings pages can be added by creating new controllers in the
settingsmodule (in client repos, inapplication/controllers/), using the sameRegistryread/write pattern. - Registry helper (
ecommercen/helpers/registry_helper.php) provides functions for registry access in contexts without controller access.
Business Rules
- Encryption for sensitive fields: API keys, secrets, and passwords use the 5th parameter
trueonsetValue()/value()to encrypt/decrypt via the CI Encryption library. Encrypted values are stored as ciphertext in the DB. - reCAPTCHA v3 secret encryption guard:
google_recaptcha_v3_secretis validated by acallback_recaptchaV3SecretIsStorablerule (ecommercen/settings/controllers/Adv_settings.php:831, message:834-837) beforegooglePost()runs (Adv_settings::recaptchaV3SecretIsStorable(),:875-896). It round-trips the submitted value through the CI Encryption library directly and refuses to save -- surfacingsettings.admin.google.recaptchaV3Secret.encryptionErrornext to the field -- ifAPP_ENCRYPTION_KEYis missing or invalid, instead of silently persisting a secret that cannot be decrypted back. Clearing the field (empty value) is always allowed.google()runs the validation bound to the controller,form_validation->run($this)(:752):MY_Form_validation::run()only rebinds its CI instance when handed an object (application/libraries/MY_Form_validation.php:119-123), so under HMVC an unboundrun()looks the callback up on the CI super-object, never finds it, and fails the rule. Before 4.128.0google()calledrun()unbound, so every non-empty v3 secret was refused with the encryption error even with a valid key, and the v3 layer could not be switched on from the admin. Every other settings page with acallback_rule already ranrun($this)(:1077,:2991,:3133,:3233). - Multi-language support: The
langcolumn separates per-language values. Empty string ('') is mapped to the constantBASEinternally. Language abbreviations are auto-uppercased. - Role-based access: General settings require ADVISABLE + ADMIN roles. Social auth settings are restricted to ADVISABLE only. Individual keys inside the shared pages can be guarded by role, because a page's constructor admits ADMIN too: the general
index()page writes the SMS limit only for ADVISABLE sessions (Adv_settings.php:188-191, rule:292-294), andonly_advisable()writesMCP_CONNECTOR.ENABLEDonly for ADVISABLE sessions (see the MCP Connector switch rule below). Theonly_advisable,xml_feeds_settings,ai_content_generation_promptsandai_content_generation_settingspages are Advisable-only for real, on GET and POST:_remap()refuses every other session with 401 before the action runs (Adv_settings.php:44-57, list:65-73, #1054), although the constructor admits ADMIN (:23). The key guard onMCP_CONNECTOR.ENABLEDstays as a second line, and the same two-line pattern applies toPRICE_TRACK.ENABLED_GRAPH, the OpenAI keys and the Plus general-settings fields (see their rows above). - Array values: Stored as pipe-delimited strings (e.g.,
val1|val2|val3). UsesetArray()/getArray()for transparent serialization. - Cache invalidation:
Registry::live()invalidates PSCache and re-reads from DB. Called on every admin page load. Frontend reads use the cached version without refresh. - Upsert pattern:
Registry_model::set_regval()checks if a row exists for (reggroup, regkey, lang) and either UPDATEs or INSERTs. This prevents duplicate entries. - No validation on values: Registry stores raw string values. Type casting and validation happen in the controller layer before calling
setValue(). - Logo upload: The
index()method handles logo file upload separately viaupdateLogo()and stores the filename inGLOBAL.LOGO. - Storefront base URL (headless deployments): The
index()page exposesGLOBAL.STOREFRONT_BASE_URL(POST fieldglobal_storefront_base_url), saved and rendered alongsideGLOBAL.CDN_URL(ecommercen/settings/controllers/Adv_settings.php: CDN_URL write:104, STOREFRONT_BASE_URL write:105, reads:139-140) with atrimvalidation rule (:209). An empty value preserves thebase_url()fallback inStorefrontUrl, so single-domain deployments are unaffected. The value is consumed at runtime by thestorefront_url()helper to build customer-facing email and link bases — see SY-24 Email Dispatch System anddocs/guides/storefront-url.mdfor the headless setup guide. - External-frontend payway panels (curated capability pools): The
payment_settingspage exposes two additional payway selectors introduced for external-frontend consumers (#672 → #679):PAYWAY_EXTERNAL.METHODS(writeecommercen/settings/controllers/Adv_settings.php:1312-1315, render:1512) andPAYWAY_GIFT_CARDS_EXTERNAL.METHODS(write:1324-1327, render:1522). Both filter the POST against a curated pool on save viaarray_values(array_intersect($post, $pool)). The pools are hand-maintained capability lists, not derived:getExternalPayWays()returnsdelivery,bank_transfer,paid_at_store,vivawallet,eurobank,paybybank(ecommercen/helpers/eshop_helper.php:375-441; #749 added the last two, scoped by epic #748 -- the helper's docblock records that admission is a product-owner scope decision and that the staging acceptance run #756 is the go-live gate, not the admission gate);getExternalGiftCardPayWays()returnsvivawalletonly (:450-455). The page's other three payway selections (PAYWAY,PAYWAY_ADMIN,PAYWAY_GIFT_CARDS) stay unfiltered -- deliberate, per the in-code comment atAdv_settings.php:1300-1311. - Piraeus per-channel POS credential blocks: Two 13-key credential blocks were added for #674.
PIRAEUSBANK_EXTERNALis written unconditionally onpayment_settingssave (Adv_settings.php:1373-1385, comment:1368-1372).PIRAEUSBANK_GIFTCARDS_EXTERNALis written only inside theGIFT_CARDS.ENABLEDguard (:1413-1425, comment:1408-1412), because its fields only render when gift cards are enabled -- an unguarded save would wipe stored credentials. - Viva Wallet external-channel source code (#729): The
payment_settingspage exposesVIVAWALLET.EXTERNAL_SOURCE_CODE(writeecommercen/settings/controllers/Adv_settings.php:1464, render:1637, validation:1742) so the external/headless checkout channel can use its own Viva Wallet source code -- each source code carries its own success/failure return URLs registered in the Viva merchant portal, so sharingVIVAWALLET.SOURCE_CODEwith the storefront was returning external-channel customers to the rendered storefront instead of the calling application. Read viagetVivaWalletExternalSettings()(ecommercen/helpers/registry_helper.php:432-481), which delegates togetVivaWalletMergedSettings()and swaps onlysource_code-- with no fallback toVIVAWALLET.SOURCE_CODEwhen unset, so an unconfigured external source code fails closed (novivawalletadapter registered) rather than silently reusing the storefront one. Consumed bysrc/Domains/Checkout/Payment/PaymentInitializerFactory.php:155-159. The adapter is likewise not registered over REST whenVIVAWALLET.MERCHANT_ID/API_KEYare missing:registerVivaWallet()requireshasMerchantCredentials()(src/Domains/Checkout/Payment/PaymentInitializerFactory.php:169-171, #865); see CF-08 Payment Processing. XML_FEEDS.CUSTOM_PRICE_ENABLEDmaster switch (#592): A new Advisable-only master switch on theonly_advisablepage, written atAdv_settings.php:2350. An ON→OFF transition resets all 14 per-feedCUSTOM_PRICE_*flags (:2352-2374, flags at:2360-2373) while deliberately preserving the*_MODIFIERpercentage values. Read back at:2457; validation rule at:2524. It also gatesxml_feeds_settings()at:1997-2005($customPriceEnabledat:2002) and:2037-2066, so a save with the switch off no longer wipes modifier values.MCP_CONNECTOR.ENABLED-- MCP Connector on/off switch, guarded by key (#824): The switch that decides whether themcp/c/<token>endpoint exists (see IN-24 MCP Connector). It is a checkbox panel on theonly_advisablepage (application/views/admin/settings/only_advisable.php:318-337, POST fieldmcpConnectorEnabled, lang keyseshop.admin.only_for_advisable.enable_mcp_connector.header/.label), saved atAdv_settings.php:2471-2478as(int)(bool)(so stored'1'/'0'), then the whole pscache is cleared (:2477) so the change applies at once in every language, rendered back at:2536-2537with the same truthiness as the gate (so the box shows what is enforced), and validated with atrimrule at:2615. It is guarded twice since #1054:_remap()refuses every non-Advisable session with 401 beforeonly_advisable()runs (Adv_settings.php:44-57, list:65-73), and the write still sits insideallowRole([AUTH_ROLE_ADVISABLE], $this->sessionRoles)(comment:2466-2470) as defence in depth, becauseAdv_settings::__construct()admitsAUTH_ROLE_ADMIN(:23). Should a session without the Advisable role ever reach the action, it does not write the key at all: the stored value, or the absence of a row, stays exactly as it was and an unposted checkbox is never coerced to0. A missing row reads as off. Like every registry read, the gate sees a change only once the per-language registry cache refreshes (see Caching Architecture):Registry::live()does it on every admin request, so the redirect after a save refreshes the saving admin's language, and theCronjobcontroller and several job libraries do too, while the migration's direct INSERT refreshes nothing -- a seeded row is seen after the next admin request or cron run, or when the cache expires (86400 s by default,application/config/cache.php:7). The runtime gate isisMcpConnectorEnabled()(ecommercen/helpers/registry_helper.php:597-624), shared byMcp::connector()andAdvMcpConnectorSettings. It replaced theAPP_MCP_CONNECTOR_ENABLEDenv var, which is retired: the forward-only migration20261002120000_add_mcp_connector_enabled_registry_key.phpseeds each environment's row once from it (never overwriting an existing row), and a fresh install starts off. The token page's disabled notice (settings.mcp_connector.disabled_notice) now reads "The MCP Connector is disabled. It can be enabled by Advisable."- External frontend brands (#935):
settings/externalBrandslets the merchant choose an ordered list of brands for an external frontend's top-brands row (the mobile app shows it above its brand list), published asbrands.topVendorIdsonGET /rest/storefront-config(REST 1.117,application/config/rest_api_versions.php:145). It is the external channel's own setting: it neither reads nor changesshop_vendor.is_promo/shop_vendor.order, which drive the rendered storefront's home brand carousel (Adv_vendors_model::getPromoVendors(),ecommercen/eshop/models/Adv_vendors_model.php:454-468) -- the same channel split asPAYWAY/PAYWAY_EXTERNALandHOME_EXTERNAL.- Page: a two-list picker (crlcu Multiselect; markup
application/views/admin/settings/external_brands.php:15-71, initialised atapplication/views/admin/footer_js.php:4046-4070). The left list holds every brand named in the admin's language (vendors_model->vendorsCombo(false),ecommercen/settings/controllers/Adv_settings.php:3248) minus the chosen ones (:3255), sorted by name in the browser (footer_js.php:4053-4057), with a search box (external_brands.php:20-24,footer_js.php:4058-4060) in which Enter does not submit the form (:4063-4067). The right list is what the section publishes now, in saved order (Adv_settings.php:3250-3252), so a deleted brand drops out of both; a chosen brand with no name in the admin's language is labelled#<id>(:3251). Arrows move brands across and up/down reorder them (external_brands.php:35-43,61-68); there is "move all back" but no "move all right". The left list is not posted (submitAllLeft: false,footer_js.php:4061), which keeps a large brand catalogue under PHP'smax_input_vars; the chosen options are pre-selected in the markup (external_brands.php:54), so a save without working JavaScript keeps the list. Option labels are HTML-escaped (:27,:53). - Save: the
externalBrandsVendorExistscallback runs once per postedexternal_brands_top_vendor_ids[]value (ruleAdv_settings.php:3265-3277, callback:3286-3298): an empty value passes, a non-digit or zero is refused, and anything else must be a liveshop_vendorrow, otherwisesettings.admin.externalBrands.notFoundis shown. The page then storesBrandsConfigResolver::vendorIds()of the posted list -- posted order, positive integers, no repeats -- withsetArray('TOP_VENDOR_IDS', 'BRANDS_EXTERNAL', '', ...)(:3234-3241; key first, group second). The action checks ADVISABLE + ADMIN itself before it reads the post or writes Registry (:3224-3227), in addition to the constructor gate (:23-26). - REST section:
BrandsConfigResolver::resolve()(src/Domains/StorefrontConfig/Brands/BrandsConfigResolver.php:57-64) reads the key, normalises it withvendorIds()(:73-84:FILTER_VALIDATE_INTwithmin_range1, a repeated id keeps its first position), then keeps only ids that are liveshop_vendorrows, in saved order, with oneINquery that selects onlyshop_vendor.id(liveVendorIds(),:92-106; skipped for an empty list,:94-97). The check runs on every read, so a brand deleted by any path (admin, REST write API, SQL) drops out.[]means render no row: an unset key, an empty list, malformed entries and all chosen brands deleted all publish[], and a client never substitutes its own list. Whether a brand has anything to sell is not decided here; the client resolves the ids against its ownGET /rest/product/vendor?filter[hasSellableProducts]=1list. Wired as the tenth provider section (src/Domains/StorefrontConfig/StorefrontConfigProvider.php:52,86; DIsrc/Domains/StorefrontConfig/container.php:71-74; OpenAPIsrc/Rest/StorefrontConfig/Controllers/StorefrontConfig.php:393-419).
- Page: a two-list picker (crlcu Multiselect; markup
Registry Usage Statistics
The settings system manages 85 unique registry groups (4.128.0 added BRANDS_EXTERNAL) across all settings controllers (Adv_settings.php, AdvSocialAuthSettings.php, AdvSocialLinksSettings.php, AdvFavicons.php, AdvEmailViewer.php, AdvMcpConnectorSettings.php).
Production scale: Live databases contain 94 unique registry groups with 890+ registry entries in total. That production figure was measured before 4.121.0 added the four external-frontend groups below, so it is counted against the pre-4.121.0 controller inventory of 77 — leaving 17 groups created outside the settings controllers, by runtime code (jobs, libraries, integrations) via
setValue()calls, or by client-specific customizations. The inventory table above is a representative, non-exhaustive sample of the controller-managed groups plus additional groups discovered from production data and code analysis.
Top 30 Registry Groups by Usage Frequency (Codebase-Wide)
This table shows how frequently each registry group is read via value() across all ecommercen/ PHP files. Higher counts indicate groups that are critical runtime dependencies -- modifying these groups has broader impact.
| # | Registry Group | value() Calls | Primary Consumers |
|---|---|---|---|
| 1 | XML_FEEDS | 136 | Feed generators (src/Feeds/), feed settings |
| 2 | OTHER | 118 | Feature flags throughout admin and storefront |
| 3 | ESHOP | 97 | Core e-commerce: products, orders, checkout, reporting |
| 4 | AGORA | 73 | ProjectAgora ad integration |
| 5 | MANAGO | 51 | ManaGo marketing automation |
| 6 | POINT_SYSTEM | 38 | Loyalty points system |
| 7 | MAILCHIMP | 38 | Mailchimp newsletter integration |
| 8 | ADVISABLE_AI | 35 | AI features (recommendations, content generation) |
| 9 | GOOGLE_RECOMMENDATIONS | 29 | Google Recommendations AI |
| 10 | PIRAEUSBANK | 27 | Piraeus Bank payment gateway |
| 11 | SMART_RECOMMENDATIONS | 23 | Smart recommendation engine |
| 12 | MATOMO | 23 | Matomo analytics |
| 13 | VIVAWALLET | 23 | Viva Wallet payments |
| 14 | APCOPAY | 21 | ApcoPay (Piraeus) payments |
| 15 | GOOGLE | 22 | GA4, reCAPTCHA (hybrid v2+v3), Tag Manager |
| 16 | EUROBANK | 18 | Eurobank payment gateway |
| 17 | AI_CONTENT_GENERATION_PROVIDER_OPEN_AI | 17 | OpenAI content generation |
| 18 | ETHNIKIBANK_EE | 16 | Ethniki Bank express checkout |
| 19 | PUBLIC_MARKETPLACE | 15 | Public/Mirakl marketplace |
| 20 | MOOSEND | 15 | Moosend email marketing |
| 21 | FACEBOOK_CONVERSION | 14 | Meta Conversions API |
| 22 | APIFON | 14 | Apifon SMS provider |
| 23 | SMARTCART | 13 | Skroutz SmartCart marketplace |
| 24 | PAY_BY_BANK | 13 | PayByBank payments |
| 25 | ALPHABANK | 13 | Alpha Bank payment gateway |
| 26 | SOCIAL_LINKS | 12 | Social media URLs |
| 27 | SOCIAL_AUTH | 11 | Google/Facebook OAuth |
| 28 | KLARNA_PAYMENTS | 11 | Klarna payment gateway |
| 29 | FARMAKON | 11 | Farmakon ERP integration |
| 30 | ECOMMERCEN_PLUS | 11 | Email campaigns (points, birthday, reviews) |
ESHOP Group Deep Dive
The ESHOP group is the third most-referenced registry group (97 value() calls across 44 files). It contains core platform configuration keys spanning multiple settings pages.
Known ESHOP keys (from settings controller analysis):
| Key | Settings Page | Description |
|---|---|---|
SANITIZE_INTERVAL | index | Days before guest customer cleanup |
COMPANY_PHONE | index | Company phone number |
PAYMENTS_ACTIVE | index | Enable/disable payments |
TRANS_COST_LIMIT | index | Free shipping threshold |
LIMIT_ON_PRODUCTS | index | Products per page limit |
DEFAULT_CURRENCY | index | Default currency code |
SLUG_TO_GREEKLISH | index | Transliterate slugs to Greeklish |
MINIMUM_CART_TOTAL_FOR_PAID_AT_STORE | index | Minimum cart for store pickup |
DEFAULT_POINT_FACTOR | subsystem | Points per euro spent |
POINT_FACTOR_TYPE | subsystem | Points calculation method |
SPEND_POINTS | subsystem | Points needed per euro discount |
REWARD_CASH | subsystem | Cash value of point reward |
REWARD_NEW_CUSTOMER | subsystem | Points awarded to new customers |
POINTS_TO_NEW_CUSTOMER | subsystem | Points awarded on registration |
ESHOP_CUSTOMER_GRADE_1 / _2 / _3 | subsystem | Customer tier label text (output as the group name by the Top Ranking Customers report, ecommercen/eshop/models/Adv_reporting_model.php:1403) |
ESHOP_CUSTOMER_GRADE_1_VALUE / _2_VALUE / _3_VALUE | subsystem | Customer tier numeric spend threshold (compared with SUM(total_vat), Adv_reporting_model.php:1410-1412; read as gold/silver/bronze limits at ecommercen/audience/models/AdvCustomerTagModel.php:729-731). Must be numeric while the point system is on (Adv_settings.php:1048-1050,1061-1063) |
BLOG_PRODUCT_ENABLED | only_advisable | Blog-product linking |
BLOG_PRODUCT_CATEGORY_ENABLED | only_advisable | Blog-category linking |
BLOG_PRODUCT_TWO_WAY_SYNC | only_advisable | Two-way blog-product sync |
EVENT_ARTICLE_PRODUCT_ENABLED | only_advisable | Event-product linking |
FILTER_CATEGORY_GROUP_TAGS_ENABLED | only_advisable | Category group tag filters |
IMPORT_PRODUCTS_FROM_EXCEL_ENABLED | only_advisable | Excel product import |
Note: The full ESHOP group in production databases may contain significantly more keys (estimated 50+ keys across all settings pages and feature flags) than what is declared in the settings controller alone, since other controllers and libraries also write to this group.
OTHER Group Deep Dive
The OTHER group is the second most-referenced (118 value() calls) and functions as a catch-all for feature flags:
| Key | Description |
|---|---|
DEFAULT_FILTER_FRONT | Default product filter on storefront |
LOW_STOCK_END_OF_LIST | Push low-stock products to end of listings |
ENABLE_LOGIN_AND_BUY | Require login before purchase |
SHOW_PRODUCT_HITS | Display product view counts |
ORDER_TAGS_ENABLED | Enable order tagging system |
ORDER_EDIT_KEEP_PRODUCT_VALUES | Keep original prices when editing orders |
| Plus 20+ additional feature flags | Various feature toggles across the platform |
Known Issues & Security Gaps
- The admin menu and the
Adv_settingsconstructor disagree on roles. The constructor admits only ADVISABLE and ADMIN (ecommercen/settings/controllers/Adv_settings.php:23-26), but the menu offers theAdv_settingspages toAUTH_ROLE_DEVELOPERtoo (for examplesettings/notification_settings,application/config/admin_menu.php:196, andsettings/mobile_app_settings,:345). A user holding DEVELOPER without ADVISABLE or ADMIN gets the 401 page on every one of them, and since #936 the action no longer runs behind it (ecommercen/core/Adv_base_controller.php:187,system/core/Common.php:713). So the DEVELOPER role in the routes table above only has an effect for a user who also holds ADVISABLE or ADMIN, such as the SMS and OneSignal fields gated bycanEditNotificationProviders()(Adv_settings.php:1201-1204). The reverse also holds:settings/google(admin_menu.php:228-233),third_party_providers,other_settings,variation_settings,attribute_settings,availableCountriesandvideoShowcaseare listed for ADVISABLE and DEVELOPER only, so an ADMIN-only user, whom the constructor admits, has no menu entry for them and reaches them only by URL. - A brand with no name in the admin's language cannot be added to the external top brands. The left list comes from
vendorsCombo(false)(ecommercen/settings/controllers/Adv_settings.php:3248), which inner-joins the brand's translation in the admin's language (ecommercen/eshop/models/Adv_vendors_model.php:155-167). An already chosen brand without one is still kept and shown as#<id>(Adv_settings.php:3251), but a new one cannot be picked until it has a name in the admin's language.
Tests
| Test | Covers |
|---|---|
tests/Legacy/Settings/AdvSettingsRecaptchaV3SecretTest.php | recaptchaV3SecretIsStorable(): public callback, round-trip accepted, refused when encryption fails or does not round-trip, empty secret accepted; google() runs validation bound to the controller (4.128.0 regression) |
tests/Legacy/Settings/AdvSettingsExternalBrandsTest.php | externalBrandsVendorExists() (live brand accepted, missing or malformed refused, empty accepted without a lookup), the per-id rule and message, the in-action role check refusing before any write and passing allowed roles |
tests/Unit/Domains/StorefrontConfig/Brands/BrandsConfigResolverTest.php | BrandsConfigResolver: no query for an unset or all-malformed list, the key read as the admin writes it, merchant order kept, deleted brands dropped, repeats kept once, one IN filter on the vendor primary key, vendorIds() normalisation |
tests/Unit/Domains/StorefrontConfig/StorefrontConfigProviderTest.php | The provider's sections, including brands |
tests/Integration/Domains/StorefrontConfig/ContainerTest.php | DI wiring of every section resolver, the live brands contract and the live vendor check keeping order |
tests/Integration/Domains/Support/Repository/Specification/SelectSqlTest.php | The Select specification liveVendorIds() uses, against a real connection |
tests/Legacy/Settings/AdvSettingsExternalHomeHeroGroupTest.php | externalHome slideshow-group validation |
tests/Legacy/Settings/AdvSettingsMobileAppSettingsTest.php | mobile_app_settings validation |
tests/Legacy/Settings/AdvOnlyAdvisableCustomPriceResetTest.php | XML_FEEDS.CUSTOM_PRICE_ENABLED ON→OFF reset |
tests/Legacy/Settings/AdvXmlFeedsSettingsCustomPriceModifierGuardTest.php | xml_feeds_settings keeps modifiers while the switch is off |
tests/Legacy/Settings/AdvEmailViewerHooksTest.php, AdvEmailViewerSubjectSuffixTest.php | Email viewer, see AD-53 |
Most settings pages (index, third_party_providers, payment_settings, other_settings, ...) have no tests.
Related Flows
- AD-01 Admin Auth & SSO -- auth configuration (static users, SSO env vars)
- AD-22 Audience & Campaigns --
SMART_RECOMMENDATIONS.IS_ENABLED_CUSTOMER_TAGfeature flag - AD-23 Gift Cards --
GIFT_CARDS.ENABLEDand payment method config - AD-24 Bundles --
PRODUCT_BUNDLES.ENABLEDfeature flag - AD-44 Social Auth Settings --
SOCIAL_AUTHregistry group (Google/Facebook OAuth) - IN-24 MCP Connector --
MCP_CONNECTOR.ENABLEDon/off switch (Advisable-only, saved fromonly_advisable) and theAdvMcpConnectorSettingstoken page - CF-07 Checkout -- payment methods read from
METHODS.PAYWAYregistry - IN-01 Feed Generation -- feed tokens and config from
xml_feeds_settings - CF-34 AI Recommendations -- OpenAI provider config from
AI_CONTENT_GENERATION_PROVIDER_OPEN_AI - AD-53 Email Template Viewer -- email template preview (email-related config lives in settings)
- AD-57 Advisable Newsfeed -- newsfeed toggle configuration in admin settings
- SY-24 Email Dispatch System -- SMTP credentials, sender names, and per-group email settings configured here are consumed by
Adv_mailer - SY-35 Push Notifications -- the
NOTIFICATIONSregistry group read by the push domain - CF-29 Contact Forms -- the reCAPTCHA keys set on
settings/googleand the captcha traits that read them - AD-61 Push Notification Campaigns -- the push campaign admin page and the Customer notifications panel