Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Global Defines


samccandless

Recommended Posts

Posted

Hello everyone....

 

I am new to the osCommerce product and trying to document the various modules, process flow (where do clicks & links lead to), etc.

 

Where can I find the include file that contains all of the different:

 

  • Global variables (ie: field lengths, image buttons, values when a button is clicked, etc.)
    • ENTRY_TELEPHONE_MIN_LENGTH
    • IMAGE_BUTTON_CONTINUE
    • ENTRY_PASSWORD_CONFIRMATION_TEXT
  • Global variables (ie: database names, queries)
    • tep_db_query
  • Global functions
    • tep_db_perform
  • etc...

We are currently experiencing an issue with some of our $customer_id fields are not inserting/updating into all of the various tables "cleanly".   This is causing user issues when trying to log in, shop, etc.

 

Looking at the /catalog/create_account.php right now and I am curious to determine IF the form is actually submitting back through the logic to "sanitize", "validate" the user inputs upon clicking the [Continue] button.

 

Searching thru the various folders under /catalog/ and drilling-down, I see there are lots of modules, css's, includes, functions, etc.

 

Thanks!

-Scott M

Posted

It's best to learn how to search for any string yourself, so you don't have to keep asking others for help.

 

On a Windows box, in the store root, findstr /s /c:"ENTRY_TELEPHONE_MIN_LENGTH" *.php . There is also a regular expression flag /r and an ignore case flag /i if you want to search that way.

 

On a Linux box, in the store root, grep -r "ENTRY_TELEPHONE_MIN_LENGTH" *.php  (note that the recursion switch for grep varies among versions used... otherwise do find . -name "*.php" -print |xargs grep "ENTRY_TELEPHONE_MIN_LENGTH"). There is also an ignore case flag -i.

 

I think all you're looking for is in PHP files. If not, use *.* instead of *.php. To find the file with the definition for tep_db_query, search for function tep_db_query.

Posted

I agree learning how to find things is key.  My suggestion is to use an IDE like Netbeans, which is free and can do a ton to help you out.  Say you come across a function and you want to know where it's defined, then right click / Navigate / go to definition.  This works for constants and more.  You can have it search your whole project for something and it will show you the line you can click on.  There are a ton of helpful features and it let you know if you have a mistake when you creating or changing code like a missing bracket.

 

Another thing I like is xdebug which can be set up to create a link on you test site that will open netbeans to the file and line of an error, warning, etc...

 

Netbeans will also connect to your mysql database and you can do anything you would do wiht phpMyadmin right in your IDE.

I'm not really a dog.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...