*****Warning: Post typed as I wandered through my thought process. Please bear with me*****
Ohhhh I see....the define you listed below tells the code which file to look in. I think I get it now!
PHP Code:
define('FILENAME_ORDER_EDIT', 'edit_orders.php');
So, I would write it this way:
PHP Code:
define('FILENAME_RECENT_PRODUCTS', 'recent_products.php');
But, as you said...there are several folders I could place such a file in (or several files I could add the define to). How do I determine how the define is being used in Zen Cart in order to determine where to place it?
Since this mod has no class folder, no functions folder, no extra datafiles folder or an extra configures folder....How do I determine which of those is the best one to create for the new defines file?
:::thinking:::: the file that calls this define is the one referenced in the error log: includes/templates/custom_template/templates/tpl_modules_recent_products.php. The code from that file which actually calls the define (if I understand all this correctly), is:
PHP Code:
include(DIR_WS_MODULES . zen_get_module_directory(FILENAME_RECENT_PRODUCTS));
So....I'm guessing here....the above include is telling zen cart what the name of the module is? And the define statement is telling zen cart which file some of that mod's code is in?
Is that right? If so, I would think that adding the define statement to the language file would be appropriate?
Doing so would change language/english/extra_definitions/recent_products.php file
from:
PHP Code:
<?php
// recently viewed sidebox title name
define('BOX_HEADING_RECENTLY_VIEWED', 'Recently Viewed');
?>
to
PHP Code:
<?php
// recently viewed sidebox title name
define('BOX_HEADING_RECENTLY_VIEWED', 'Recently Viewed');
// define file name
define('FILENAME_RECENT_PRODUCTS', 'recent_products.php');
?>
Is that right?
Bookmarks