Skip to content

Developer notes

← Overview

Table Contents
?:kv_vrb_sections + ?:kv_vrb_section_descriptions Sections (steps): position, status, plan ids (CSV); title and description per language
?:kv_vrb_fields + ?:kv_vrb_field_descriptions Fields: section, type (T text, A text area, S drop-down, M multiple choice, C checkbox, D date, F file), required, position, status, plan ids, condition (cond_field_id, cond_value), min_len, max_len, format, file types / size / count, is_document, vsp_map; label, help, placeholder and options per language
?:kv_vrb_applications One row per vendor (company_id): plan, applicant user, language, submitted, updated (by), declined_at, purged_at
?:kv_vrb_answers company_id + field_id → value (multiple choice as a JSON list) and a label snapshot
?:kv_vrb_files Uploaded files: vendor, field, original name, storage path (custom_files storage), size
  • Storefront form: template hook vendors:apply_fields (post) inside the core form apply_for_vendor_form; data from controllers/frontend/companies.post.php (GET companies.apply_for_vendor). Field names: kv_vrb[<field_id>], files kv_vrb_files[<field_id>][]. Steps, conditions and client checks: js/addons/kv_vendor_registration_builder/func.js (uses the core form validator per step and ce.formpre_apply_for_vendor_form).
  • Validation: controllers/frontend/companies.pre.php (POST companies.apply_for_vendor) runs before the core controller; on errors it saves the posted data and redirects back to the form.
  • Storing: core hook update_company (action add, storefront area) stores the answers and files for the new company in the same request.
  • Admin: kv_vendor_registration_builder.form|section|field (builder), .manage (list), .export (CSV), .download?file_id= , POST .update_section|delete_section|update_field|delete_field|update_answers|delete_file|purge|cleanup. The Application tab: controllers/backend/companies.post.php + hook companies:tabs_extra. Privileges view_kv_vrb / manage_kv_vrb (section Vendors); the vendor panel has no access.
  • Console: php admin.php --dispatch=kv_vendor_registration_builder.cleanup (privacy cleanup).

Used (same arguments in 4.17.2 and 4.21.2): update_company, delete_company (removes answers and files), change_company_status_before_mail (New → Disabled starts the retention countdown; → Active/Pending stops it), before_dispatch (hourly cleanup in the admin area).

Own hook: kv_vendor_registration_builder_notify_pre($data, $rules) before the e-mail event kv_vendor_registration_builder.submitted is dispatched.

companies.apply_for_vendor is not a cacheable dispatch, so the form and the values restored after an error come from the visitor’s own request. The add-on prints nothing on cacheable pages and writes nothing on storefront GET requests; the cleanup mark uses files in var/kv_storage while the full page cache is on.

License\Client checks the license from the admin panel or cron only. Gated: the custom fields on the storefront form, their validation and storing, and the e-mails of new applications. Not gated: the admin builder, list, Application tab, CSV export, downloads and the privacy cleanup.

Saving a half-finished application to continue later, vendor-side editing of the answers after approval, per-storefront forms on Multi-Vendor Ultimate (one form for all storefronts), REST API.

app/addons/kv_vendor_registration_builder/
addon.xml, init.php, func.php
Tygh/Addons/KvVendorRegistrationBuilder/
Config.php settings
Form.php sections, fields, plans
Answers.php visibility rules, validation, storage, display
Documents.php uploads, protected storage, downloads
Applications.php application rows, list, CSV, retention
Service.php storefront flow, admin edit, Vendor Storefront Pro prefill
Notifier.php, ApplicationDataProvider.php e-mail event
StorageData.php, License/, Upgrade/Synchronizer.php
controllers/frontend/companies.pre.php, companies.post.php
controllers/backend/kv_vendor_registration_builder.php, companies.post.php, kv_vendor_registration_builder_license.php
schemas/menu/menu_multivendor.post.php, schemas/permissions/*, schemas/notifications/events.post.php
design/backend/templates/addons/kv_vendor_registration_builder/ views (form, section, field, manage), hooks, components, license
var/themes_repository/responsive/templates/addons/kv_vendor_registration_builder/ hooks/vendors/apply_fields.post.tpl, components/field.tpl
js/addons/kv_vendor_registration_builder/func.js, backend.js
var/langs/en/addons/kv_vendor_registration_builder.po