Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Images


Guest

Recommended Posts

Hello everyone,

 

I've been looking at the default behavior of OSC and found something that I'd like to change. It's the DIR_WS_IMAGES variable in admin/includes/configure.php and catalog/includes/configure.php.

 

I added a definition like this:

 

define('DIR_WS_PRODUCT_IMAGES', DIR_WS_IMAGES . 'images/product/');

 

I also created the correct directory (images/product)

 

:huh: What I'm a little confused about though is what files I have to add the variable to in order for OSC to look for my product images in the correct location?

 

TIA

Link to comment
Share on other sites

That's it. Just make sure the directory is writeable by the webserver.

Not quite.

 

osC will not look in that directory unless you tell it to. The paths are embedded in the image file names in the database. They're relative to:

 

define('DIR_WS_IMAGES', 'images/');

 

Defining a new subdirectory in the configure.php file will not be of any use.

 

This contribution will handle the file naming.

 

http://www.oscommerce.com/community/contributions,3873

Local: Mac OS X 10.5.8 - Apache 2.2/php 5.3.0/MySQL 5.4.10 • Web Servers: Linux

Tools: BBEdit, Coda, Versions (Subversion), Sequel Pro (db management)

Link to comment
Share on other sites

Not quite.

 

osC will not look in that directory unless you tell it to. The paths are embedded in the image file names in the database. They're relative to:

 

define('DIR_WS_IMAGES', 'images/');

 

Defining a new subdirectory in the configure.php file will not be of any use.

 

This contribution will handle the file naming.

 

http://www.oscommerce.com/community/contributions,3873

 

At present I don't feel overly confident about messing with the default structure of most of OSC, so I'm wondering, since I don't have thousands of products (only about 200 at present), if in the short term it might be feasible for me to just go into the database and change the embedded path names to the image path of my products? I know that isn't a smart choice (because of being to high maintenance) in a db with thousands of items, but is it a smart choice for what I'm doing at present (until I get up to speed on PHP)?

 

Thanks for the contribution by the way. I appreciate it.

Link to comment
Share on other sites

I'm wondering, since I don't have thousands of products (only about 200 at present), if in the short term it might be feasible for me to just go into the database and change the embedded path names to the image path of my products?

Sure, with phpMyAdmin that's easy.

 

But be aware, the image subdirectory contribution is a very simple install, there's no database work involved. I kept it that way on purpose to make it easy for newbies to use. You can just rename the existing categories.php to categories.php.bak and upload the new one, then make a few entries into the languages file to support the new field names.

Local: Mac OS X 10.5.8 - Apache 2.2/php 5.3.0/MySQL 5.4.10 • Web Servers: Linux

Tools: BBEdit, Coda, Versions (Subversion), Sequel Pro (db management)

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...