php - How to fill the addon setting from database in cs cart -
i new cscart. need fill settings database new addon.
i have below code in addon.xml
<settings edition_type="root,ult:vendor"> <sections> <section id="general"> <items> <item id="general"> <type>header</type> </item> <item id="info_feature"> <type>info</type> <handler>fn_add_setting_info</handler> </item> <item id="order_status"> <type>selectbox</type> <default_value>fn_add_setting_info</default_value> </item> </items> </section> </sections> </settings> in func.php function fn_add_setting_info() { $all_datas=get_feature_description(); foreach($all_datas $val){ $arr_sett[$val['feature_id']]=$val['description']; } registry::get('view')->assign('option_details',@$arr_sett); }
here select box not fill fn_add_setting_info() data. how can . please me.
in func.php function fn_settings_variants_addons_sharesoft_fancycolor_order_status() { $all_datas=get_feature_description(); foreach($all_datas $val){ $arr_sett[$val['feature_id']]=$val['description']; } return $arr_sett; } addon.xml <item id="order_status"> <type>selectbox</type> <default_value>fn_add_setting_info</default_value> </item>
this way fill select box value database values.
Comments
Post a Comment