Skip to content
  1. Extras
  2. MiniShop3
  3. Manager interface
  4. Utilities
  5. Model fields

Utilities: Model fields

Manage existing model fields from the database.

Purpose

Manage fields registered in ms3_product_fields:

  • View all model fields
  • Edit display settings
  • Assign fields to sections
  • Configure widgets (xtype)
  • Manage field sections

Difference from "Extra fields"

AspectModel fieldsExtra fields
SourceExisting DB fieldsNew fields
Column creationNoYes (ALTER TABLE)
DeletionFrom configuration onlyFull removal
UseDisplay configurationSchema extension

Interface

Model selection

Model filter at the top:

  • msProductData — product data
  • msVendor — vendors
  • msOrder — orders
  • msOrderAddress — addresses

Sections panel

Left panel lists sections for the selected model.

Section actions:

  • Add new section
  • Edit existing
  • Delete section
  • Reorder (drag-and-drop)

Fields table

Right side shows fields and settings:

ColumnDescription
NameSystem field name
LabelDisplay name
Type (xtype)Widget type
SectionSection assignment
VisibilityShow field
WidthGrid width (3–12)

Editing a field

Click a row to open the edit dialog.

Basic parameters

ParameterDescription
LabelDisplay field name
DescriptionHint below input
SectionGroup where the field appears
VisibilityShow in form

Widget type (xtype)

TypeDescription
textfieldText field
numberfieldNumber field
textareaMultiline field
comboDropdown
datefieldDate picker
checkboxCheckbox

Grid width

Uses a 12-column grid:

ValueWidthDescription
325%Quarter row
433%Third row
650%Half row
867%Two thirds
12100%Full row

Data source for combo

For combo type set JSON configuration:

json
{
  "store": [
    ["value1", "Option 1"],
    ["value2", "Option 2"],
    ["value3", "Option 3"]
  ]
}

Or load from API:

json
{
  "url": "/api/mgr/options/list",
  "valueField": "id",
  "displayField": "name"
}

Section management

Creating a section

  1. Click "+" in the sections panel
  2. Fill the form:
FieldDescription
KeyUnique identifier
LabelDisplay name
OrderPosition in section list

Editing a section

Click the edit icon next to the section name.

Deleting a section

Note

Deleting a section does not delete fields; they move to "No section".

Section order

Drag sections to change display order.

Usage examples

Grouping price fields

  1. Create section "Prices":

    • Key: prices
    • Label: Prices
  2. Move fields into the section:

    • price → Prices
    • old_price → Prices
    • wholesale_price → Prices (if added)

Field width

For compact layout:

FieldWidth
article6 (50%)
price3 (25%)
old_price3 (25%)
weight4 (33%)
remains4 (33%)

Hiding technical fields

Fields often hidden:

  • id — auto-generated
  • createdon — technical dates
  • source — when using a single media source

API endpoints

Model list

GET /api/mgr/model-fields/models

Response:

json
{
  "success": true,
  "object": {
    "models": [
      { "value": "msProductData", "label": "Product data" },
      { "value": "msVendor", "label": "Vendor" }
    ]
  }
}

Model field list

GET /api/mgr/model-fields?model=msProductData

Update field

PUT /api/mgr/model-fields/{id}

Request body:

json
{
  "label": "Product SKU",
  "xtype": "textfield",
  "section_id": 1,
  "visible": true,
  "width": 6,
  "description": "Unique product code"
}

Model sections

GET /api/mgr/model-fields/sections?model=msProductData

Create section

POST /api/mgr/model-fields/sections

Request body:

json
{
  "model": "msProductData",
  "key": "prices",
  "label": "Prices",
  "sort_order": 10
}

Delete section

DELETE /api/mgr/model-fields/sections/{id}

Configuration impact

Changes here affect:

  1. Product card — field display on the "Data" tab
  2. Grids — available columns
  3. Import — fields available for mapping
  4. API — object serialization

To apply changes in the UI you may need:

  • Page reload
  • Browser cache clear
  • MODX cache clear