Forums / Templates, Stylesheets, Page Layout / Problems with new payment module

Problems with new payment module

Locked
Results 1 to 4 of 4
This thread is locked. New replies are disabled.
01 Feb 2008, 16:45
#1
dayo avatar

dayo

Zen Follower

Join Date:
Dec 2006
Posts:
187
Plugin Contributions:
1

Problems with new payment module

Hello

I have been trying to clone & refine an existing payment module but when I click the install button, it odes not proceed to the edit path.

The error log reveals
[client xx.xx.xx.xx] PHP Warning: reset(): Passed variable is not an array or object in /server/path/to/store_admin/modules.php on line 278, referer: http://mysite/store_admin/modules.php?set=payment&module=new_module 
[client xx.xx.xx.xx] PHP Warning: Variable passed to each() is not an array or object in /server/path/to/store_admin/modules.php on line 279, referer: http://mysite/store_admin/modules.php?set=payment&module=new_module


Looking at the referenced lines in module.php suggests the array from function keys is not getting passed along.

The function was just simply edited but not sure what I may have done wrong.

    function keys() {
      return array('MODULE_PAYMENT_NEW_MODULE_STATUS', 'MODULE_PAYMENT_NEW_MODULE_ID', 'MODULE_PAYMENT_NEW_MODULE_REFERRAL_ID', 'MODULE_PAYMENT_NEW_MODULE_LOGO', 'MODULE_PAYMENT_NEW_MODULE_DEFAULT_CURRENCY', 'MODULE_PAYMENT_NEW_MODULE_USER_CURRENCY', 'MODULE_PAYMENT_NEW_MODULE_DEFAULT_LANGUAGE', 'MODULE_PAYMENT_NEW_MODULE_LANGUAGE', 'MODULE_PAYMENT_NEW_MODULE_TRANSACTION_ID_PREFIX', 'MODULE_PAYMENT_NEW_MODULE_SORT_ORDER', 'MODULE_PAYMENT_NEW_MODULE_ZONE', 'MODULE_PAYMENT_NEW_MODULE_ORDER_STATUS_ID');
    }    


Any tips on what might be causing this error?

Thanks
01 Feb 2008, 18:24
#2
dayo avatar

dayo

Zen Follower

Join Date:
Dec 2006
Posts:
187
Plugin Contributions:
1

Re: Problems with new payment module

OK figured out what the main issue was.

The sql insert statement was missing some fields as I had copied and started to mofify
01 Feb 2008, 20:22
#3
dayo avatar

dayo

Zen Follower

Join Date:
Dec 2006
Posts:
187
Plugin Contributions:
1

Re: Problems with new payment module

I will like to use pull down boxes and put in the following code

$db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Default Currency', 'MODULE_PAYMENT_NEW_CURRENCY', 'EUR', 'Your default currency', '6', '5', 'zen_cfg_pull_down_new_currency', now())"); 


I set up the options in admin/function/general.php under function zen_cfg_pull_down_new_currency but I can see from the results that my syntax is wrong as the pull down box does not appear.

Any pointers will be appreciated

Thanks
01 Feb 2008, 22:47
#4
dayo avatar

dayo

Zen Follower

Join Date:
Dec 2006
Posts:
187
Plugin Contributions:
1

Re: Problems with new payment module

Managed to figure out the correct syntax