Zen Cart Logo
Forums / Built-in Shipping and Payment Modules / How and where the configuration_values are defined

How and where the configuration_values are defined

Locked

Views: 1,106

Results 1 to 5 of 5
This thread is locked. New replies are disabled.
7 Mar 2007, 9:30 AM
#1
andy1234 avatar

andy1234

Zen Follower

Join Date:
Oct 2006
Posts:
148
Plugin Contributions:
0

How and where the configuration_values are defined

Hi Zen cart Gurus,

I have a very specific question - how and where the paypal parameters are linked to the configuration table. To be more specific:

  1. The file includes/modules/payment/paypal.php has variables names like MODULE_PAYMENT_PAYPAL_BUSINESS_ID or MODULE_PAYMENT_PAYPAL_CURRENCY

  2. Those parameters are listed in the CONFIGURATION table as configuration_keys, while their values are in the next field configuration_values

  3. How and where those configuration keys are linked to the configuration values? I just cannot find any db queries calling the values from the configuration table.

I would appreciate your help.

Thanks

Andy

7 Mar 2007, 10:35 AM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: How and where the configuration_values are defined

Can I ask why you're asking ?

7 Mar 2007, 11:51 AM
#3
andy1234 avatar

andy1234

Zen Follower

Join Date:
Oct 2006
Posts:
148
Plugin Contributions:
0

Re: How and where the configuration_values are defined

I am developing a few custom payment modules and have to create multiple instances for each payment gateway. is there something wrong in my question?

8 Mar 2007, 5:39 AM
#4
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: How and where the configuration_values are defined

All the configuration keys are loaded from the database and converted into defined constants during the application_top process via the initSystem (init_includes, etc).

I don't recommend intercepting that.

Instead, if you are attempting to clone modules, I strongly recommend creating unique key/constant names so as to not end up with clashes.

8 Mar 2007, 5:58 AM
#5
andy1234 avatar

andy1234

Zen Follower

Join Date:
Oct 2006
Posts:
148
Plugin Contributions:
0

Re: How and where the configuration_values are defined

Thank you, I have found it already. You are right, it is a bad way to change those variables. Instead, I am using another way:

  1. created a few new tables for multiple gateways of the same category with different client ids
  2. calling those variables when generating the order submit button.

Almost done and it works fine. The only problem is that i have to rewrite all your payment classes to call the variables from another table.

All the best

Andy