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

Utilities: Product fields ​

Utilities → Product fields

Field layout on the Product Properties tab of the product card — it sits inside the outer ExtJS tab named Product.

Cookbook

Sections, hiding fields, and the link to extra fields: Product fields cookbook. End-to-end example: Wholesale price.

Purpose ​

The tool controls the layout of fields on the Product Properties tab:

  • visibility and order
  • groups by section
  • labels and widget xtypes

A new column in ms3_products — the physical table behind msProductData — is created in Extra fields. After you create the field, a row appears here on its own.

Interface ​

Two cards stacked one above the other; the interface has no section selector.

Sections ​

The upper card holds the sections table with drag sorting. Columns: drag handle, Visibility, Key, Title, Actions.

Fields ​

The lower card lists all fields at once, with a Section column. There is no filter by the selected section.

Row columns:

  • drag handle
  • Visibility — a checkbox right in the row, followed by Save changes
  • Field (key)
  • Title (label)
  • Type (xtype)
  • Section
  • Description
  • Actions

Section management ​

Creating a section ​

  1. Click Add section
  2. Fill the form:
FieldDescriptionRequired
Section keyUnique identifier (Latin letters)Yes
Lexicon keyKey for the translated titleOne of the two is required
TitleDisplay nameOne of the two is required
HiddenThe section is hidden on the product cardNo

The section key is fixed

The key field is read-only in the edit dialog. Changing a section_key means deleting the section and creating it again — and deleting a base section leaves its fields with no section.

Lexicon

If a lexicon key is set, the title comes from the localization files. The interface is translated into several languages.

Editing a section ​

Click the edit icon to the right of the title, or double-click the section.

Deleting a section ​

Caution

When you delete a section, its fields move to No section. The fields themselves stay.

Field management ​

Editing a field ​

Click a field. The edit dialog opens.

Available parameters:

ParameterDescription
Title (label)Display name of the field
PlaceholderHint inside the input
DescriptionHint under the field
SectionWhich section the field belongs to
Widget type (xtype)Only while creating the field. The edit dialog locks this control
VisibilityWhether the field shows on the card
WidthGrid columns: any integer from 1 to 12

Widget types (xtype) ​

TypeDescription
textfieldSingle-line text
numberfieldNumber
textareaMultiline text
xcheckbox, checkboxCheckbox
switchToggle
comboboxDropdown
colorpickerColour picker
datefieldDate field
ms3-combo-vendorVendor picker
ms3-combo-autocompleteAutocomplete from a list
ms3-combo-optionsPick from product options
ms3-combo-selectPick from a fixed set of values
ms3-repeaterTable of rows (JSON)
ms3-key-valueKey-to-value set (JSON)

That is everything DynamicField.vue can render.

Moving fields ​

You move fields like this:

  • Inside a section, drag them up or down
  • Between sections, change the section in the edit dialog

Default sections ​

Defaults (seed product_data):

KeyTitleSeed fields
mainMain dataarticle, weight, color, size, vendor_id, made_in
pricingPrices and stockprice, old_price, stock
seoSEOempty section. You add the fields
additionalAdditionaltags, new, favorite, popular

Saving changes ​

  • Dragging does not save the order: the interface shows a reminder, and the save button is what writes the change
  • When you edit a field or a section, click Save
  • Reload the page to see the change on the product card

API endpoints ​

Next to the ordinary configuration read sits GET /api/mgr/config/page-fields/{page_key}/all, which returns the fields including the hidden ones. The layout editor itself reads the configuration in that mode.

Get field configuration ​

http
GET /api/mgr/config/page-fields/product_data

Response:

json
{
  "success": true,
  "data": {
    "fields": [
      {
        "name": "article",
        "label": "SKU",
        "xtype": "textfield",
        "section": 1,
        "visible": true,
        "sort_order": 0
      }
    ]
  }
}

Get sections ​

http
GET /api/mgr/config/sections/product_data

Save field configuration ​

http
PUT /api/mgr/config/page-fields/product_data

Write permission: mssetting_save. A GET is available to any manager session without mssetting_save.

Request body is a fields array (not one field):

json
{
  "fields": [
    {
      "name": "article",
      "label": "Product SKU",
      "section": 1,
      "visible": true,
      "sort_order": 0
    }
  ]
}

Save sections ​

The UI adds a new section locally, then saves the whole list:

http
PUT /api/mgr/config/sections/product_data
json
{
  "sections": [
    {
      "section_key": "custom",
      "lexicon_key": "ms3_section_custom",
      "label": "Additional",
      "hidden": false,
      "sort_order": 100
    }
  ]
}

Delete a section ​

http
DELETE /api/mgr/config/sections/product_data/{section_key}

A base section (main, pricing, seo, additional) can be deleted, and the deletion is permanent: this utility has no route for creating sections — only GET, PUT and DELETE on /config/sections/{page_key}. Recreating one means doing it by hand, with the same section_key.

The guard exists, but in another utility

A default section is protected from deletion only in Form fields: ModelFieldSectionService refuses to delete a section with is_default. Product fields has no such check, neither in the service nor in the interface — the delete button is available for every section.

Configuration examples ​

Hide fields you do not need ​

If color and size are options, turn off visibility for color and size.

Create an "SEO" section ​

The seo section is already in the seed. If you deleted it, add it again (key seo). Document tab fields (longtitle, description) are not part of product_data. Their visibility is ms3_product_main_fields. Into the empty SEO section you move your own fields from main / additional, or extra fields.