1

In system.xml file, for cloning the fields we use clone_fields and clone_model. Here is the example:

<group id="placeholder" translate="label" sortOrder="300" showInDefault="1" showInWebsite="1" showInStore="1">
    <label>Product Image Placeholders</label>
    <clone_fields>1</clone_fields>
    <clone_model>Magento\Catalog\Model\Config\CatalogClone\Media\Image</clone_model>
    <field id="placeholder" type="image" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1">
        <backend_model>Magento\Config\Model\Config\Backend\Image</backend_model>
        <upload_dir config="system/filesystem/media" scope_info="1">catalog/product/placeholder</upload_dir>
        <base_url type="media" scope_info="1">catalog/product/placeholder</base_url>
    </field>
</group>

Above code gives output like this enter image description here

What I want is to copy fields with group like

Prefix1_Group
    -> prifix1_image (field)
Prefix2_Group
    -> prifix2_image (field)
Prefix3_Group
    -> prifix3_image (field)

I have set of fields which are repeating in different group with group_name prefix. Please let me know if there is any other way to do this. Thank you.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.