Developer notes
Data model (prefix ?:kv_mcs_)
Section titled “Data model (prefix ?:kv_mcs_)”| Table | Contents |
|---|---|
notices |
One row per notice: public ref, SHA-256 of the notifier’s status key, object (product / vendor / url), company, URLs, category (Transparency Database value), explanation, notifier, source type, status (new, review, decided, closed), unfounded, decision id. |
decisions |
Decisions and statements of reasons: measure, grounds, explanation, category, content type, scope, dates, automated means, facts, redress, puid, status (draft, issued, superseded, discarded), version / replaces_id, applied. |
complaints |
Complaints against decisions (vendor or notifier) and their outcome. |
messages |
Prepared messages (receipt, decision, statement, complaint outcome, trader request) and when they were sent. |
misuse |
Warnings, suspensions, trusted flaggers, lifts per notifier e-mail / domain or vendor. |
traders |
Trade register, self-certification (with the text and date), admin checks, requests per vendor. |
log |
Audit log. |
rate |
Fixed-window rate-limit counters (always dropped on uninstall). |
Transparency Database mapping
Section titled “Transparency Database mapping”Dsa\Tdb::statement() builds the API v1 record; Dsa\Tdb::problems() checks the documented rules (one decision field present, ground-dependent fields, *_other fields, dates, puid = letters, digits, -, _). Measures:
| Measure | Fields |
|---|---|
product_disabled |
decision_visibility = DECISION_VISIBILITY_CONTENT_DISABLED |
product_removed |
DECISION_VISIBILITY_CONTENT_REMOVED |
product_demoted |
DECISION_VISIBILITY_CONTENT_DEMOTED |
product_labelled |
DECISION_VISIBILITY_CONTENT_LABELLED |
content_other |
DECISION_VISIBILITY_OTHER + decision_visibility_other |
vendor_suspended |
decision_account = DECISION_ACCOUNT_SUSPENDED, decision_provision = DECISION_PROVISION_TOTAL_SUSPENSION |
vendor_terminated |
DECISION_ACCOUNT_TERMINATED, DECISION_PROVISION_TOTAL_TERMINATION |
service_partial |
DECISION_PROVISION_PARTIAL_SUSPENSION |
payment_suspended |
decision_monetary = DECISION_MONETARY_SUSPENSION |
source_type comes from the notice (SOURCE_ARTICLE_16, SOURCE_TRUSTED_FLAGGER) or is SOURCE_VOLUNTARY for own initiative. The end date goes into the end_date_* field of each decision field used.
Core hooks
Section titled “Core hooks”| Hook | Use |
|---|---|
update_product_pre, update_product_post |
Own-initiative draft when an admin saves a vendor product from Active to Disabled / Hidden. |
tools_update_status_before_query, tools_change_status |
Same for the status toggle of product lists. |
change_company_status_before_mail |
Draft when an admin suspends or disables an active vendor. |
vendor_data_premoderation_disapprove_products_pre |
Draft with the disapproval reason. |
delete_company |
Marks the vendor’s trader row as ended; it is deleted six months later (Art. 30(5)). Notices and statements stay. |
Template hooks (storefront): products:product_detail_bottom (post), companies:top_links (post). Controllers: admin kv_mcs, vendor panel kv_mcs_vendor, storefront kv_mcs (report, done, status, complaint) and products.post / companies.post (view variables).
DAC7 engine
Section titled “DAC7 engine”Dac7\Hub calls the public classes of Vendor KYC & Verification (Dac7\Calculator::report(), Settings::operatorMissing(), Filings::getList(), Years::get(), TaxProfiles::looksLikeVat()) only when that add-on is active and its tables exist. VIES checks use \Tygh\Addons\KvEuVatValidation\Checker::check() when EU VAT Number Validation is active. TINs are masked (last two characters) in the data check.
Full page cache and security
Section titled “Full page cache and security”- Product and vendor pages carry only static links and, optionally, seller data that is the same for every visitor (tagged with the
kv_mcs_traderstable). The form, confirmation and status pages are separate dispatches outside the cache list. - Status pages need the reference plus a 128-bit key; only its SHA-256 is stored on the notice. The prepared receipt message keeps the status link so an administrator can still send it; it is visible only to administrators with the “View Compliance Suite” privilege.
- The storefront
kv_mcscontroller is CSRF-validated (schemas/security/csrf_validation.post.php). - Trusted flagger status is never taken from the typed e-mail alone:
SOURCE_TRUSTED_FLAGGERis set only when an administrator confirms the notice. - Stored notices count against the rate limit; failed attempts count against three times the limit (separate bucket).
- The rate limit uses
ClientIp::rateKey()(REMOTE_ADDR, Cloudflare only from its ranges, own proxies only from the trusted list; IPv6 per /64) and the notifier e-mail. A honeypot field drops bots. - Vendors reach only
kv_mcs_vendormodes; every query there is scoped by the vendor’s company.
Upgrades
Section titled “Upgrades”Upgrade\Synchronizer adds missing tables, columns, settings, texts and e-mail templates after an in-place upgrade. Retention: Retention keeps 7 tables and the settings on uninstall (setting delete_data_on_uninstall).