
|
If you were logged in you would be able to see more operations.
|
|
|
|
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
|
|
Description
|
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 |
Show » |
|
|
We will discuss this point and see if this solution or another can fix this problem.
Thanks for your suggestion.