Hello everybody,
does somebody know how to create a mandatory parameter for a module in the admin site?
I explain myself : after installing a module (in my case ,it's a shipping module that I developed myself) , you are directed to the page of the installed module and when you click on the installed module, there are some personalized parameters on the right side to be filled in. so my question is there : how can I have a mandatory parameter? that means that if the parameter is not filled in , then the module should not work... and better the admin can have a message that there's a configuration missing. is that possible?
in my case my parameters are defined like this :
tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) VALUES ('The Netherlands - Sender ID', 'MODULE_SHIPPING_NL_SENDER_ID', '', 'For using this module in The Netherlands, you need to register on test.nl', '6', '0', now())");
thanks in advance for your help
Miri
Latest News: (loading..)
mandatory module's parameters?
Started by amd.miri, Dec 09 2011, 13:51
2 replies to this topic
#1
Posted 09 December 2011, 13:51
#2
Posted 09 December 2011, 14:29
There is no validation for what is entered of is is entered, however, the whole thing is a form.
Maybe the easiest would be to add a text saying what you want to say, as you already did in the field description
To prevent the module from working, you can add a condition for this either within function execute() (or quote()) or earlier, when the class is checking if the module is enabled or not , something like this
Maybe the easiest would be to add a text saying what you want to say, as you already did in the field description
To prevent the module from working, you can add a condition for this either within function execute() (or quote()) or earlier, when the class is checking if the module is enabled or not , something like this
Looking for a way to create your own osCommerce template ? click
#3
Posted 12 December 2011, 09:34
mmm... your suggestion gives me some new ideas... ok I'll try it and I'll come back for the feedback, thanks Georges














