Skip to content

Custom Field Groups#


Custom Field Groups in Miva Merchant provide an efficient way to organize and manage custom fields within the admin interface. By grouping related custom fields, administrators can streamline workflows, simplify data entry, and enhance the overall usability of the platform.


Benefits of Custom Field Groups#

  1. Improved Organization:
    • Grouping related fields reduces clutter and makes navigation easier for administrators.
  2. Enhanced Usability:
    • Logical grouping ensures that data entry and updates are more intuitive.
  3. Scalability:
    • As the number of custom fields grows, groups provide a structured way to manage them efficiently.

Creating Custom Field Groups#

Follow these steps to create a new Custom Field Group:

Step 1: Navigate to Custom Field Groups#

  1. Log in to your Miva Merchant admin interface.
  2. Go to Settings > Utilities > Custom Field Groups.

Step 2: Create a New Group#

  1. Click New Group.
  2. Fill in the following fields:
    • Code: A unique identifier for the group (e.g., specs).
    • Name: A descriptive name for the group (e.g., Product Specifications).
  3. Click Save to create the group.

Assigning Fields to Custom Field Groups#

Once a group is created, custom fields can be assigned to it for better organization.

Steps:#

  1. Navigate to the Custom Fields tab in Settings > Utilities.
  2. Select an existing custom field or create a new one.
  3. Use the Group Dropdown to select the appropriate group for the field.
  4. Save the custom field to finalize the assignment.

Practical Applications of Custom Field Groups#

Example 1: Product Specifications Group#

Group all product-related custom fields, such as:

  • Material
  • Dimensions
  • Warranty Information

Example 2: Customer Preferences Group#

Organize customer-related custom fields, such as:

  • Preferred Contact Method
  • Interests
  • Subscription Status

Example 3: Order Notes Group#

Group order-specific custom fields, including:

  • Special Instructions
  • Gift Messages
  • Internal Notes

Displaying Custom Fields from Groups in Templates#

Custom Field Groups are primarily used for organization in the admin interface and do not directly affect template usage. However, you can load and display all custom fields in a group programmatically.

Loading and Displaying Custom Fields from a Group#

The following example demonstrates how to load and display all custom fields in a group for a specific product:

<mvt:do file="g.Module_Root $ '/modules/util/customfld.mvc'" name="l.success" value="Group_Load_Code('specs', l.cf_group)" />
<mvt:do file="g.Module_Root $ '/modules/util/customfld.mvc'" name="l.success" value="ProductFieldAndValueList_Load_Group(l.settings:product:id, l.cf_group:id, l.settings:cf_field_values)" />

<mvt:foreach iterator="field" array="l.settings:cf_field_values">
    <p>&mvte:field:name;: &mvte:field:value;</p>
</mvt:foreach>

Explanation:

  1. Group_Load_Code loads the custom field group by its code (specs) and assigns it to l.cf_group.
  2. ProductFieldAndValueList_Load_Group loads all custom fields and their values for the current product (l.settings:product:id) in the specified group.
  3. The foreach loop iterates through the loaded fields and dynamically displays their names and values.

Best Practices#

  1. Group Fields Logically:

    • Create meaningful groups for specific data categories (e.g., products, orders, customers).
  2. Use Descriptive Group Names:

    • Ensure group names clearly describe their purpose to aid admin usability.
  3. Filter Fields Regularly:

    • Use the filter feature to manage fields efficiently, especially in stores with a large number of custom fields.
  4. Test Assignments:

    • Verify that fields are assigned to the correct group and appear as expected in the admin interface.
  5. Document Group Usage:

    • Maintain a record of groups and their assigned fields for better organization and future scalability.

Summary#

Custom Field Groups are an essential tool for organizing and managing custom fields in Miva Merchant. By categorizing fields into logical groups, you can enhance admin usability, streamline workflows, and scale your store’s data management efficiently.

Ready to explore more? Learn how to Use Custom Fields in Templates → or dive into Custom Field Functions → for advanced applications.