Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Wanting to modify an addon


gsmiley007

Recommended Posts

Hi

 

I tried the line, but I get:

 

Notice: Use of undefined constant STORE_OWNER_EMAIL_ADDRESS

 

I want to display the email in an html page. So I'm trying to understand how to retrieve values from the database. I would like to use other values in the database as well.

 

 

<?php echo STORE_OWNER_EMAIL_ADDRESS; ?>

 

and you will see the email address of the store owner, assuming he has inserted it in his admin area under configuration.

 

What exactly do you want to do with it?

Link to comment
Share on other sites

Hi

 

I'm trying to modify an addon and I can't figure out how Os commerce assigns database entries to variables?

 

Ie

 

How do I use the variable: STORE_OWNER_EMAIL_ADDRESS?

 

The file is in a subdirectory ie /catalog/newmod/

 

Thanks

 

This is not a database entry it is what is called a define.

 

example ..

 

define( 'MY_TEST', 'I am a test' );

 

The above allows me to do <?php echo MY_TEST; ?> and what is actually printed to screen is "I am a test"

 

If you look in the languages files (catalog/includes/languages/) you will see loads of these.

 

If you ever wonder in osCommerce what a capitalised string seperated by underscores is .. it is a define.

Link to comment
Share on other sites

Rob - incorrect, very rarely!

 

This is a database entry, please see the configuration table, configuration id #3

 

Ooops too late, too tired, too tipsy. :)

 

@gsmiley007

 

In the configuration table of the database are also these capitalised strings with underscores, These are defined at run time in application by the following code ..

 

// set the application parameters
 $configuration_query = tep_db_query('select configuration_key as cfgKey, configuration_value as cfgValue from ' . TABLE_CONFIGURATION);
 while ($configuration = tep_db_fetch_array($configuration_query)) {
   define($configuration['cfgKey'], $configuration['cfgValue']);
 }

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...