Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cannot find declaration of Constant 1

Status
Not open for further replies.

GKChesterton

Programmer
Aug 17, 2006
278
US
A table display routine in osCommerce has this bit of goodness:
Code:
$width = (int)(100 / MAX_DISPLAY_CATEGORIES_PER_ROW) . '%';
I find that MAX_DISPLAY_CATEGORIES_PER_ROW is 3. I'd like to change that to 1. What I expect to find in the myriad lines of PHP from osCommerce is something like:
Code:
defi[s][/s]ne('MAX_DISPLAY_CATEGORIES_PER_ROW','3')
However, searching on the constant name only shows the line I've snipped and some immediate neighbors. Not a definition.
How can a search on all pages for "max_display_categories" (not case sensitive, not whole word) fail to bring up the declaration? How can I get to it?



[purple]If we knew what it was we were doing, it would not be called
research [blue]database development[/blue], would it? [tab]-- Albert Einstein[/purple]​
 
Just do it from the admin section:

admin->configuration->Maximum Values->Categories to List Per Row
 
Thank you, Xaqte, for a good suggestion which I will follow.

I'd still like to know the answer, though; because I'm integrating osCommerce with a custom search application which does require a lot of code review, and because I must understand PHP generally.

[purple]If we knew what it was we were doing, it would not be called
research [blue]database development[/blue], would it? [tab]-- Albert Einstein[/purple]​
 
because the definition is created at runtime dynamically through an iteration over the configuration table

i'm not familiar with oscommerce but a brief look at their code suggests that the dynamic code is in application-top.php (both in catalog/includes and catalog/admin/include).
in the former the code is found between lines 69 and 73. in the admin variant it is 65-69.

hope that helps.
 
JPADIE : dude . YOU . are . GOOD . thanks !

[purple]If we knew what it was we were doing, it would not be called
research [blue]database development[/blue], would it? [tab]-- Albert Einstein[/purple]​
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top