Link to home
Start Free TrialLog in
Avatar of Aidy_B
Aidy_B

asked on

Oscommerce configuration for image folders

Does anyone know if i can specify different folders on different domains for the product images and the site graphics.

The senario is as follows:
I have an oscommerce site which was setup by someone who hosts it aswell. I have ftp access to the domain which is hosting the site and all the files and scripts are within that domains folders, except the images folder which actually hold the images being used, which is held on a different domain that i do not have ftp access to (this is clearly shown in the config as all folder setting are for local access but the image bit shows the path to a different domain). The reason for this is the site is basically a reseller site for someone elses products, one of many, for which that someone else controls the product database with respect to adding and removing products (and hence images) but i can control the pricing. My problem stems from the fact that i want to modify the site skin (including graphical images) but if i set the image path to the local images folder, i will no longer have any of the product images showing as they are not in the local one.

So in short, can anyone enlighten me to how, or if, i can specify the local image folder for site design graphics, but a remote images folder for the product images.
If it cant be done then fair enough but please, no suggestions of coping the contents of the remote folder into mine as apart from being obvious, that dosnt solve the updating and maintenance issues.

Hoping some one can help..
Avatar of nicholassolutions
nicholassolutions
Flag of United States of America image

I've never set up oscommerce or looked at the source. I just downloaded it and I'm taking a look through it. I think you should have two configure.php files:

catalog/includes/configure.php
catalog/admin/includes/configure.php

Can you post the current contents of those files? (obviously remove any sensitive info, such as replacing your domain with mysite.com etc). I think if I can take a look at them I might be able to help you figure out what changes to make.

-Matt
Avatar of Aidy_B
Aidy_B

ASKER

catalog/profadmin/includes/configure.php -

<?php
/*
  osCommerce, Open Source E-Commerce Solutions
  http://www.oscommerce.com

  Copyright (c) 2003 osCommerce

  Released under the GNU General Public License
*/

// Define the webserver and path parameters
// * DIR_FS_* = Filesystem directories (local/physical)
// * DIR_WS_* = Webserver directories (virtual/URL)
  define('HTTP_SERVER', 'http://www.mydomain.com'); // eg, http://localhost - should not be empty for productive servers
  define('HTTP_CATALOG_SERVER', 'http://www.mydomain.com');
  define('HTTPS_CATALOG_SERVER', '');
  define('ENABLE_SSL_CATALOG', 'false'); // secure webserver for catalog module
  define('DIR_FS_DOCUMENT_ROOT', '/home/****/public_html/catalog/'); // where the pages are located on the server
  define('DIR_WS_ADMIN', '/catalog/profadmin/'); // absolute path required
  define('DIR_FS_ADMIN', '/home/****/public_html/catalog/profadmin/'); // absolute pate required
  define('DIR_WS_CATALOG', '/catalog/'); // absolute path required
  define('DIR_FS_CATALOG', '/home/****/public_html/catalog/'); // absolute path required
  define('DIR_WS_IMAGES', 'images/');
  define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/');
  define('DIR_WS_CATALOG_IMAGES', DIR_WS_CATALOG . 'images/');
  define('DIR_WS_INCLUDES', 'includes/');
  define('DIR_WS_BOXES', DIR_WS_INCLUDES . 'boxes/');
  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_CATALOG_LANGUAGES', DIR_WS_CATALOG . 'includes/languages/');
  define('DIR_FS_CATALOG_LANGUAGES', DIR_FS_CATALOG . 'includes/languages/');
  define('DIR_FS_CATALOG_IMAGES', DIR_FS_CATALOG . 'images/');
  define('DIR_FS_CATALOG_MODULES', DIR_FS_CATALOG . 'includes/modules/');
  define('DIR_FS_BACKUP', DIR_FS_ADMIN . 'backups/');

// define our database connection
  define('DB_SERVER', 'localhost.mydomain.com'); // eg, localhost - should not be empty for productive servers
  define('DB_SERVER_USERNAME', '*****');
  define('DB_SERVER_PASSWORD', '*****');
  define('DB_DATABASE', '****_database');
  define('USE_PCONNECT', 'false'); // use persisstent connections?
  define('STORE_SESSIONS', ''); // leave empty '' for default handler or set to 'mysql'
?>


catalog/includes/configure.php -

<?php
/*
  osCommerce, Open Source E-Commerce Solutions
  http://www.oscommerce.com

  Copyright (c) 2003 osCommerce

  Released under the GNU General Public License
*/

// Define the webserver and path parameters
// * DIR_FS_* = Filesystem directories (local/physical)
// * DIR_WS_* = Webserver directories (virtual/URL)
  define('HTTP_SERVER', 'http://www.mydomain.com'); // eg, http://localhost - should not be empty for productive servers
  define('HTTPS_SERVER', ''); // eg, https://localhost - should not be empty for productive servers
  define('ENABLE_SSL', false); // secure webserver for checkout procedure?
  define('HTTP_COOKIE_DOMAIN', 'www.mydomain.com');
  define('HTTPS_COOKIE_DOMAIN', '');
  define('HTTP_COOKIE_PATH', '/catalog/');
  define('HTTPS_COOKIE_PATH', '');
  define('DIR_WS_HTTP_CATALOG', '/catalog/');
  define('DIR_WS_HTTPS_CATALOG', '');
  define('DIR_WS_IMAGES', 'http://www.OTHERDOMAIN.co.uk/catalog/images/');
  define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/');
  define('DIR_WS_INCLUDES', 'includes/');
  define('DIR_WS_BOXES', DIR_WS_INCLUDES . 'boxes/');
  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/');
  define('DIR_FS_CATALOG', '/home/****/public_html/catalog/');
  define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');
  define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');

// define our database connection
  define('DB_SERVER', 'localhost.mydomain.com'); // eg, localhost - should not be empty for productive servers
  define('DB_SERVER_USERNAME', '****_****');
  define('DB_SERVER_PASSWORD', '****');
  define('DB_DATABASE', '****_database');
  define('USE_PCONNECT', 'false'); // use persistent connections?
  define('STORE_SESSIONS', ''); // leave empty '' for default handler or set to 'mysql'
?>


I have removed my domain and put 'mydomain' but for the other domain i have put 'OTHERDOMAIN'. All the database username refs have been starred for the purpose of this post.

Thanks in advance.
Aidy.
ASKER CERTIFIED SOLUTION
Avatar of nicholassolutions
nicholassolutions
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Aidy_B

ASKER

sorry its been a while, life suddenly got a bit manic.
I intend to try the above this coming week so i will feedback on results attained.

Aidy.
Avatar of Aidy_B

ASKER

Apologies, but i am no longer going to be involved in this project so, in pure anticipation of what may have worked, im awarding all points to you.
Thanks for your input.
Adrian.
Well thanks for the A. If you do find yourself coming back to this question, feel free to continue with it; I wil stay subscribed and help the best I can.

Matt