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>
    <field id="placeholder" type="image" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1">
        <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>

Above code gives output like this enter image description here

What I want is to copy fields with group like

    -> prifix1_image (field)
    -> prifix2_image (field)
    -> 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 and acknowledge you have read our privacy policy.