Jump to content

  • You cannot start a new topic
  • You cannot reply to this topic

How To Fill The Addon Setting From Database In Cs Cart Rate Topic   - - - - -

 

Posted 13 February 2018 - 06:18 AM #1

I new to cscart. I need to fill the settings from database for my new addon.
 
I have below code in my 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 as $val){
           $arr_sett[$val['feature_id']]=$val['description'];
       }    
      Registry::get('view')->assign('option_details',@$arr_sett);


     }
Here the select box does not fill fn_add_setting_info() data. How can I do . Please help me.
 
Thanks & Regards
Amelia


 
  • Vivek Gupta
  • Senior Member
  • Members
  • Join Date: 09-Jul 15
  • 247 posts

Posted 13 February 2018 - 06:43 AM #2

Please check reference addon: Email marketing 

Check file : app/addons/email_marketing/schemas/settings/actions.functions.post.php
Function Name: fn_settings_variants_addons_email_marketing_em_madmimi_list()     // fn_settings_variants_addons_ + addon_id +_+ item_id

For item id:  
em_madmimi_list (app/addons/email_marketing/addon.xml)
 

<item id="em_madmimi_list">
    <type>selectbox</type>
</item>

Vivek Gupta 
 


 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 19580 posts

Posted 13 February 2018 - 01:07 PM #3

Please take a look

 

http://docs.cs-cart...._structure.html


GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    CS-Cart RU                         24500 руб.
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      CS-Cart RU + UniTheme    36000 руб.