"Xtra db row market" v.4.0.0: Admin panel and integration with Market Mass Edit
Large-scale update of the plug-in of "magical" additional fields with various types of product module data, integration with the mass editing plugin, and its own admin panel
Plugin xtradbrowmarket 4.0.0: own control panel and full integration with Market Mass Edit
Date: August 11, 2026
Author: webitproff
Project: xtradbrowmarket — Extrafields Market Custom i18n for Cotonti
Table of Contents
- Introduction
- Section 1. New xtradbrowmarket administration panel
- Section 2. Deep integration with the Market Mass Edit plugin
- Conclusion
Introduction
The xtradbrowmarket plugin (Extrafields Market Custom i18n) was originally created to conveniently extend the product card in the Market PRO v.5 module with custom field sets in a separate database table, with multilingual support. However, before version 4.0.0 it lacked a dedicated administrative interface, and its data remained inaccessible for mass editing.
The large-scale update covered in this article solves both tasks: the plugin gets a full-fledged admin panel with search, filtering and translation management, as well as deep integration with the Market Mass Edit plugin, which allows editing dozens of products in a single form where columns are divided into groups:
- data in standard fields of the Market module table itself
- extrafield data (magic additional fields with various data types) stored in the Market module table
- extrafield data of the Market module that resides in the xtradbrowmarket plugin tables
In this article we will take a detailed look at the new administrative part of xtradbrowmarket, its interface and functionality, and then describe how the integration with marketmassedit was implemented and what benefits it brings to online store owners on Cotonti.
Section 1. New xtradbrowmarket administration panel
Starting with version 4.0.0, the plugin adds its own section to Cotonti administrative tools (Extensions → Extrafields Market Custom i18n → Administration). The interface is built on a three-tab scheme using Bootstrap 5 and XTemplate, providing a modern look and high performance.
1.1. Access and navigation
The admin panel is available at:
/admin?m=other&p=xtradbrowmarketThree tabs are switched via the tab parameter:
- Statistics (
tab=stats) — summary information and a table of all registered extrafields. - Edit (
tab=edit) — mass edit form for main extrafield values. - Edit + Translations (
tab=i18n) — extended form including translations into additional languages.
All tabs support direct URLs, so you can bookmark them in your browser.
1.2. “Statistics” tab — complete usage picture
The first tab gives the administrator a quick overview of the plugin state and its integration with products.
1.2.1. Key metric cards
At the top, three contrasting info blocks are placed:
- Total products — total number of products in the Market module (with non-empty title). This figure shows the potential coverage.
- Records in xtradbrowmarket — how many rows exist in the plugin's own table (
cot_xtradbrowmarket). Since a record is created only when at least one field is saved, this counter reflects how many products already have data filled. - Filled records — number of rows where at least one extrafield is not empty. This helps estimate how actively the added fields are used.
These three numbers instantly give an idea of how deeply custom fields are embedded in the catalog.
1.2.2. Extrafields parameters table
Below the cards, a full table is displayed with all fields registered for the cot_xtradbrowmarket table. For each field the following are shown:
- Field name (
field_name) — technical name used in templates and code. - Type (
field_type) — input, textarea, select, checkbox, datetime, etc. - Description (
field_description) — human-readable explanation set when creating the field. - Variants (
field_variants) — for select, radio, checklistbox — list of possible values. - Parameters (
field_params) — additional settings (e.g., range for range type or date format). - Default value (
field_default). - Required (
field_required) — yes/no. - Enabled (
field_enabled) — yes/no.
Thus, the administrator can evaluate the configuration of all additional fields in one place, without going to the general “Extrafields” section of Cotonti. This is especially convenient when there are many fields and you need to quickly check their types or variants, and most importantly we have a picture exactly of our “magic fields”.
1.3. “Edit” tab — efficient data management
The second tab is intended for directly changing the extrafield values of your cot_xtradbrowmarket table. It is designed to minimize the time to find the right products and allow quick adjustments.
1.3.1. Filter panel
Before the edit table, an advanced search panel is placed, allowing to filter products by several criteria:
- Search string — search by product title (
`fieldmrkt_title`from the`cot_market`table) or by full text (title + descriptionfieldmrkt_text), or by product code (SKU) (fieldmrkt_pcod). Switching between search areas is done via radio buttons. - Product ID — exact filter by numeric identifier.
- Category — dropdown with Select2 support for convenient Market category selection. Selecting a parent category automatically includes all its subcategories.
- Product status — filter by state: all, pending (moderation), published, drafts.
Filters are combined, and results update instantly. After applying, an informational message about the number of found records is shown, e.g.: “Found 12 records for query "notebooks"”.
1.3.2. Mass edit table (form)
The main part of the tab is occupied by a form in the form of a table, whose rows correspond to records from cot_xtradbrowmarket joined with products (cot_market) via LEFT JOIN.
Table columns:
- ID — product identifier, a link to the product page on the site (opens in a new window). This allows quick navigation to the product view.
- Product title — readable title from
cot_market, helps to orient. - Dynamic columns — one column for each registered “magic field”. Column headers are taken from localized field names (via the
cot_extrafield_titlefunction from Cotonti Extrafields API).
In each cell of the dynamic column, an input element corresponding to the field type is rendered:
- For
input,textarea— text field/area. - For
select— dropdown with options. - For
checkbox— checkbox. - For
datetime— set of fields for date and time selection. - For
country— selector with country autocomplete. - And so on — all types supported by the Extrafields API.
Thanks to the use of the cot_build_extrafields function, each field is generated exactly as in the standard product edit form. This guarantees correct server-side value processing.
1.3.3. Saving and intelligent update
Below the table there is a “Save” (Update) button. When clicked, a POST request with all changed data is sent.
The saving logic is based on comparing new values with old ones (the current record is loaded beforehand via the function xtradbrowmarket_load). Changes are applied only to fields that actually differ. After saving, the plugin counts the number of actually updated products and shows a precise message, e.g.: “Updated records: 2”. This eliminates the false impression of changes when the administrator simply clicked the button without altering data.
An important feature is the preservation of filter state after form submission. All current search and pagination parameters are passed via hidden fields, so the redirect returns the user to the same page with the same filters, not to the base URL. This eliminates the need to reconfigure filters after each save.
1.3.4. Pagination
The table supports page splitting. The number of items per page is set in plugin settings (default 20). Navigation (pagenav) is displayed both above and below the table and correctly retains all active filters in the URL.
1.4. “Edit + Translations” tab — multilingual management
The third tab extends the functionality of the previous one by adding translation support for text fields. It becomes available when multilingual support is activated in plugin settings (xtradbrowmarket_i18n_use = 1).
1.4.1. i18n status indication
Before the edit form, a warning is shown: a green informational message if multilingual is on, or a yellow warning if off. This lets you immediately understand whether translation fields will be displayed.
1.4.2. Translation table structure
The table is similar to the “Edit” tab, but for each extrafield whose type is input or textarea, under the main field one or more additional fields are shown — one per active additional language.
For example, if English (en) and Ukrainian (ua) are set as additional languages, under the field page_h1 (default language — Russian) two additional text fields with labels EN and UA will appear. The column headers then become two-line: field name on top, language code below.
1.4.3. Saving translations
The saving mechanism is split:
- The main value (for the default language) is saved to the
`cot_xtradbrowmarket`table. - Translations are saved to the
`cot_xtradbrowmarket_i18n`table by calling thextradbrowmarket_i18n_savefunction.
The system accounts for changes both in the main field and in any of the translations. If only translations were changed and the main field remained the same, the updated records counter will still increase. Thus, the administrator gets accurate feedback.
Filters and pagination work identically to the “Edit” tab, ensuring a unified user experience.
1.5. Technical details of admin implementation
The new control panel is built on the same principles as the admin panels of marketmassedit, aliasmarketpro, aliaspagepro and many others. This ensures compatibility and a familiar interface for administrators already acquainted with these tools. All these extensions are always available for free either in the developer's repositories or in the Cotonti extensions marketplace.
- Security: To prevent SQL errors due to missing columns, the real table structure is checked (
SHOW COLUMNS FROM) with filtering only of “own” fields. Fields added via JOIN from other tables are not filtered. - Dynamic form building: All form elements are created using standard Cotonti functions (
cot_build_extrafields,cot_inputbox,cot_selectbox, etc.), which guarantees correct data processing and expected HTML. - Deduplication protection: Duplicate column names are removed via
array_unique, and array merging after filtering guarantees that fields fromxtradbrowmarketare not lost. - Multilingual integration: The logic for determining active additional languages fully mirrors plugin settings and is used both in the interface and during saving.
Thanks to a well-thought-out architecture, the administrator gets a powerful tool for managing “magic” product fields that organically fits into the Cotonti ecosystem. The Extrafields Market Custom i18n plugin is currently the first and only extension in the Cotonti web application builder that has its own admin panel and interface for managing extrafield data all in one place. We see on the left a list of product names with links and what already lies in the additional fields of each product card. All this can be edited in a single interface with a good search form. This saves a ton of time, because previously to solve these tasks you had to open each product separately and edit it individually to make corrections or fill the required fields.
Section 2. Deep integration with the Market Mass Edit plugin
One of the main innovations of version 4.0.0 is the ability to mass-edit xtradbrowmarket fields directly in the interface of the Market Mass Edit plugin. This became possible thanks to the hook system, which allows extending functionality without modifying source code.
2.1. What is Market Mass Edit
Market Mass Edit is an administrative plugin providing a convenient interface for quick viewing and mass editing of Market module products. It adds to the “Tools” section (Extensions → Market Mass Edit → Administration) the following tabs:
- Product list — search, filtering by category, status, product code.
- Mass editing — a table where you can simultaneously change titles, aliases, meta tags, categories, prices, statuses and other standard fields.
However, before integration with xtradbrowmarket, its capabilities were limited only to fields stored directly in the cot_market table. Custom extrafields from cot_xtradbrowmarket remained invisible, and to change them you had to open each product page separately.
2.2. Integration architecture: hooks as the key mechanism
Cotonti allows extending functionality through hooks — points in the code where the system includes registered handlers. The developers of marketmassedit provided several hooks, following the example of pagemassedit (a plugin for pages). Exactly these hooks are used for integration.
The xtradbrowmarket plugin registers five handlers in its plugins/xtradbrowmarket/ folder:
marketmassedit.massedit.sql.fields— adds columns to the SQL query and signals the need for LEFT JOIN.marketmassedit.massedit.flags— sets the visibility flagSHOW_XTRAfor the template.marketmassedit.massedit.headers— outputs headers of additional columns.marketmassedit.massedit.loop— for each row of the table generates input fields with actual values.marketmassedit.massedit.save— saves changed data after form submission.
All handlers are automatically connected if the xtradbrowmarket plugin is active, and have no effect on marketmassedit when disabled.
2.3. Handler files: detailed breakdown
2.3.1. xtradbrowmarket.marketmassedit.massedit.sql.fields.php
$selectFields[] = Cot::$db->xtradbrowmarket . '.*';
$needXtraJoin = Cot::$db->xtradbrowmarket;
This simple code adds all columns of the cot_xtradbrowmarket table to the selected fields list and tells marketmassedit that a LEFT JOIN with this table is needed on the key itempagid = fieldmrkt_id.
2.3.2. xtradbrowmarket.marketmassedit.massedit.flags.php
$t->assign('SHOW_XTRA', 1);
Sets a flag that the marketmassedit template uses to display additional columns.
2.3.3. xtradbrowmarket.marketmassedit.massedit.headers.php
$extrafields = xtradbrowmarket_getExtrafields();
if (!empty($extrafields)) {
foreach ($extrafields as $exfld) {
$t->assign('XTRA_HEADER_TITLE', htmlspecialchars(cot_extrafield_title($exfld, 'xtra_')));
$t->parse('MAIN.XTRA_HEADER');
}
}
For each registered extrafield, a column header is generated. The name is taken from localization (the $L array), which allows displaying human-readable headers in any language. If it is not in your localization strings, the value from field_description is inserted.
2.3.4. xtradbrowmarket.marketmassedit.massedit.loop.php
$extrafields = xtradbrowmarket_getExtrafields();
if (!empty($extrafields)) {
foreach ($extrafields as $exfld) {
$fname = $exfld['field_name'];
$value = $row[$fname] ?? null;
$inputName = 'rxtra_' . $fname . '[' . $id . ']';
$fieldHtml = cot_build_extrafields($inputName, $exfld, $value);
$t->assign('XTRA_COLUMN_HTML', $fieldHtml);
$t->parse('MAIN.MANAGE_ROW.XTRA_COLUMN');
}
}
Here $row is the current row from the joined SQL query, containing all columns of cot_xtradbrowmarket. For each field, a form element with a correct name (array rxtra_<field_name>[$id]) is built. The cot_build_extrafields function generates HTML depending on the field type — text field, textarea, select, checkbox, etc.
2.3.5. xtradbrowmarket.marketmassedit.massedit.save.php
Saving is the most critical part. The handler receives an array $ids (identifiers of products marked in the form), then for each ID:
- Loads current data from
xtradbrowmarket_load. - Compares new values from
$_POSTwith old ones. - For checkboxes, separately checks the presence of the key in
$_POST(if the key is missing, the checkbox was unchecked, value 0). - For
checklistbox, correctly handles the array by removing the service elementnullval. - For
datetime, assembles a timestamp from the day/month/year/hour/minute array. - Calls
xtradbrowmarket_saveonly when real changes exist. - At the end, calls
cot_extrafield_movefilesto process uploaded files (if such fields exist).
This approach guarantees that even complex field types are processed correctly, and the database is not burdened with useless UPDATE queries.
2.4. How it looks in the Market Mass Edit interface
When the xtradbrowmarket plugin is active, in the Mass editing tab of the marketmassedit plugin the following changes occur:
- Table headers are supplemented with columns corresponding to each extrafield. They are visually highlighted with color (yellow background) to distinguish from standard fields.
- In each product row, cells with input elements for custom fields appear. The administrator can simultaneously change, for example, “Custom title” and “Supplier link” for dozens of products.
- On save, data from these columns is processed by the
savehook and written tocot_xtradbrowmarket. The standardmarketmasseditmechanism also saves all other fields, ensuring operation atomicity. - Change highlighting:
marketmasseditindependently tracks which products were actually updated and shows a message like “Updated products: 5”. Thextradbrowmarketplugin does not interfere with this logic; it only provides data for saving.
2.5. Benefits of integration
- Time saving. No need to open each product individually to fill or adjust custom fields. All changes are made in a single view for tens and hundreds of products at once.
- Data consistency. Using the standard Cotonti extrafields mechanism ensures all values undergo the same validation and formatting as during regular editing.
- Flexibility. The integration is built on hooks, so other developers can similarly connect their plugins to
marketmassedit. - Backward compatibility. If
xtradbrowmarketis disabled,marketmasseditcontinues to work as usual, without any errors or extra columns.
2.6. Technical notes for developers
During integration implementation, all the difficulties encountered with the similar integration of pagemassedit and xtradbrowpage were taken into account:
- Protection against missing columns.
marketmasseditdynamically checks the existence of columns incot_market, but skips fields coming through the hook (with a dot in the name) so as not to losextradbrowmarket.*. - Correct checkbox processing. As with
pagemassedit, a special check is provided for checkboxes, since the browser does not send unchecked boxes. - Complex type support.
datetime,checklistbox,fileand other types are handled individually in thesavehook, which eliminates errors like “count(): Argument #1 must be of type Countable|array”.
As a result, users received a seamless experience: “magic” fields became a full part of mass product editing.
Conclusion
The update of the xtradbrowmarket plugin to version 4.0.0 elevates the management of additional product fields to a qualitatively new level. Its own administration panel with well-thought-out filters, pagination and multilingual support makes daily catalog work convenient and efficient. And the deep integration with Market Mass Edit turns the process of filling and updating data into a quick operation available literally in a few clicks.
We continue to develop the plugin ecosystem for Cotonti, striving to provide maximum opportunities for online store owners and developers. Follow updates in the official repository and on the support forum. You can support the developer financially to create new plugins and improve existing developments, as well as hire for task execution.
Reviews
No reviews yet
Comments (0)
Page Discussion in Telegram
Related Posts
Similar pages
Content author
Offline
Sodium Carbonate
Last logged: 2026-08-11 12:35
Чем могу помочь?
Оказываю весь спектр услуг по CMF Cotonti. Разработка открытых и закрытых корпоративных интернет порталов, небольших социальных сетей, торговые площадки, маркетплейсы, биржи фриланса, каталоги товаров оптовых поставщиков, интернет-магазин под заказ, чтобы делать совместные покупки и групповые совместные продажи от имени нескольких продавцов.
Разработки на GitHub бесплатно
Telegram
- Page published: 2026-08-11 11:32
- Last update: 2026-08-11 12:16
- Language:
Русский