Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Change from viariable to fixed pathnames


René H4

Recommended Posts

Hi, I am debugging a fault in a script.

The script is written for the official version of OSc. I use Frozen, so I think these lines need to be changed?

    if(!file_exists(DIR_FS_CATALOG . DIR_WS_MODULES .'payment/'. $payment . '.php'))


and         
  

  require_once(DIR_FS_CATALOG . DIR_WS_MODULES .'payment/'. $payment . '.php');

To what exactly? I can't figure out.
 

Link to comment
Share on other sites

I believe that it's

    if (!file_exists(DIR_FS_CATALOG . 'includes/modules/payment/'. $payment . '.php'))

and

  require_once(DIR_FS_CATALOG . 'includes/modules/payment/'. $payment . '.php');

Here's the commit.  It says that the following were removed

  define('DIR_WS_IMAGES', 'images/');
  define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/');
  define('DIR_WS_INCLUDES', 'includes/');
  define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/');
  define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/');
  define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/');
  define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/');
  define('DIR_WS_DOWNLOAD_PUBLIC', 'pub/');

So anything with DIR_WS_MODULES should be replaced with 'includes/modules/' and then you can concatenate neighboring strings. 

DIR_FS_CATALOG and $payment should stay the same.  If you continue to have trouble, try replacing $payment with $GLOBALS['payment'] and output both (either to log or screen; preferably log if a live site). 

Always back up before making changes.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...