osCommerse configure.php troubles

An osCommerse installation was giving me a bunch of problems with configure.php and it’s modules, boxes and other paths.  The problem was the install did not like virtual directory paths, but worked fine with physical directory paths.  Here is a quick fix that may help you. Add the following code to set the include path in your appication_top.php file(s). Do this in \www\includes\application_top.php: // ADD INCLUDED PATH MANUALLY // set_include_path(get_include_path() . PATH_SEPARATOR . '/home/cgt001/www'); // END ADD INCLUDED...

read more

osCommerce Get Cheapest Product in Category

Here’s a function that you can use to find and get the cheapest product in any category. The function looks at the base price (product_price) and special price (specials_new_products_price) and chooses the lesser value; I added it to includes/functions/general.php, but you can add it anywhere it makes sense to do so.   //// // Get Cheapest Product in Category // function tep_get_cheapest_prod_in_cat($cat_id=0) {   global $languages_id; $res=false;   $categories = array(); ...

read more

osCommerce required files Error “Fatal error: require() [function.require]: Failed opening required ‘includes/functions/compatibility.php’” Solved

We encountered the following error on of our osCommerce sites, Fatal error: require() [function.require]: Failed opening required ‘includes/functions/compatibility.php’ the problem was that the site’s web_root directory was not in php’s include path. To quickly fix the problem without having to mess with php.ini, or server settings we included the following line of code: set_include_path(get_include_path() . PATH_SEPARATOR . $absolute_path_to_web_root); as the first directive in...

read more