History | Log In     View a printable version of the current page. Get help!  
Issue Details (XML | Word)

Key: OSC-56
Type: Improvement Improvement
Status: Open Open
Priority: Major Major
Assignee: Frank Heinen
Reporter: Harald Ponce de Leon
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
osCommerce Core

Original images with subdirectory

Created: 02/Nov/06 02:20 AM   Updated: 26/Dec/07 07:20 PM
Component/s: Core Framework
Affects Version/s: 3.0 Alpha 3
Fix Version/s: None


 Description  « Hide
When you have thousands of products you feel the need to organize your images by something (e.g. the manufacturers name). But resize process do not work with sub dirs.
adding someting like:

      preg_match("/(.*)\/(.*)/i",$image,$subdir);
      if (!empty($subdir[1])) { $subdir[1] = '/'.$subdir[1];}
      if (!file_exists(DIR_FS_CATALOG . DIR_WS_IMAGES . 'products/' . $this->_groups[$group_id]['code']. $subdir[1])) {
        mkdir(DIR_FS_CATALOG . DIR_WS_IMAGES . 'products/' . $this->_groups[$group_id]['code'] . $subdir[1]);
        @chmod(DIR_FS_CATALOG . DIR_WS_IMAGES . 'products/' . $this->_groups[$group_id]['code'] . $subdir[1], 0777);
      }
  
to the resize function could be helpful.
Something should be changed in products_edit too(to create the subdir and save the image in it).

* Ticket imported from Trac. Original reporter: pknet

 All   Comments   Change History      Sort Order:
Frank Heinen [26/Dec/07 07:20 PM]
Putting all images into one directory is not wise when you have more then a thousand products. When you have more then two thousand then you are not even able to retrieve them anymore from the server by FTP, this is the default file amount limit.

We will discuss this point and see if this solution or another can fix this problem.

Thanks for your suggestion.