Addon.xml file dynamicaly variable

hi
im developing addon sample product_variations and im want add dynamically selecbox to xml file
sample:
function fn_settings_variants_addons_sample_addon_3_0_selectable_box()
{
$schema = array(
‘fields’ => array(
‘product_id’ => array(‘title’ => __(‘product_id’), ‘sort_by’ => ‘’),
‘product’ => array(‘title’ => __(‘product_name’), ‘sort_by’ => ‘product’),
‘min_qty’ => array(‘title’ => __(‘min_order_qty’), ‘sort_by’ => ‘’),
‘max_qty’ => array(‘title’ => __(‘max_order_qty’), ‘sort_by’ => ‘’),
‘product_code’ => array(‘title’ => __(‘sku’), ‘sort_by’ => ‘code’),
‘amount’ => array(‘title’ => __(‘quantity’), ‘sort_by’ => ‘amount’),
‘price’ => array(‘title’ => __(‘price’), ‘sort_by’ => ‘price’),
‘weight’ => array(‘title’ => __(‘weight’), ‘sort_by’ => ‘weight’),
‘image’ => array(‘title’ => __(‘image’), ‘sort_by’ => ‘’),
),
);
$result = array();

if (!empty($schema['fields'])) {
    foreach ($schema['fields'] as $field_id => $field) {
        $result[$field_id] = $field['title'];
    }
}

return $result;

}
on page

Example of the Addon.xml File (Scheme 3.0) — CS-Cart 4.16.x documentation

Sorry, we were unable to generate a preview for this web page, because the following oEmbed / OpenGraph tags could not be found: description, image

but havnt func.php

how can add this on project

You should create the func.php file and put your function there. The name should be

fn_settings_variants_addons_[ADDON_ID]_[SETTING_ID]()

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.