porrier Posted September 21, 2015 Share Posted September 21, 2015 Hello! Would't it be nice when one could put the images in different subdirectories instead putting all that stuff in one folder? Is there a module available for this? I had a solution for this in the old version 2.2 but I think that does not work anymore with version 2.3.4 and PHP 5.6.1. The changes were made in the categories.php of admin near line 348: $products_image->set_destination(DIR_FS_CATALOG_IMAGES . $HTTP_POST_VARS['products_image_destination']);and near line 351: $products_image_name = $HTTP_POST_VARS['products_image_destination'] . $products_image->filename;and near line 607: Image Destination DirectoryOne could chosse a directory where the pictures were to be stored. I am not a programmer to be able to adapt that old solution to Version 2.3.4 of osCommerce. Regards Andreas Link to comment Share on other sites More sharing options...
♥14steve14 Posted September 22, 2015 Share Posted September 22, 2015 Try http://addons.oscommerce.com/info/7088 I have this working on the BS Gold edition and as far as I remember I made no alterations to get it to work. REMEMBER BACKUP, BACKUP AND BACKUP Link to comment Share on other sites More sharing options...
porrier Posted September 22, 2015 Author Share Posted September 22, 2015 Try http://addons.oscommerce.com/info/7088 I have this working on the BS Gold edition and as far as I remember I made no alterations to get it to work. Thank you for the link to the mod. I tried to build it in, but the docu mentiones a part that does not exist in my categories.php. $products_image = new upload('products_image'); $products_image->set_destination(DIR_FS_CATALOG_IMAGES); if ($products_image->parse() && $products_image->save()) { $products_image_name = $products_image->filename; } else { $products_image_name = (isset($HTTP_POST_VARS['products_previous_image']) ? $HTTP_POST_VARS['products_previous_image'] : ''); } break; Would you send your admin categories.php to me so I can compare it? It would really be nice to have such a function with different subdirectories for images. Regards Andreas Link to comment Share on other sites More sharing options...
♥14steve14 Posted September 22, 2015 Share Posted September 22, 2015 PM sent. Hope it helps as the file has been heavily modded. REMEMBER BACKUP, BACKUP AND BACKUP Link to comment Share on other sites More sharing options...
♥bruyndoncx Posted September 22, 2015 Share Posted September 22, 2015 @@burt I store my images per brand, but I was thinking, this kinda solution looks generic enough to me and might be a good addition to the core - or not ? KEEP CALM AND CARRY ON I do not use the responsive bootstrap version since i coded my responsive version earlier, but i have bought every 28d of code package to support burts effort and keep this forum alive (albeit more like on life support). So if you are still here ? What are you waiting for ?! Find the most frequent unique errors to fix: grep "PHP" php_error_log.txt | sed "s/^.* PHP/PHP/g" |grep "line" |sort | uniq -c | sort -r > counterrors.txt Link to comment Share on other sites More sharing options...
porrier Posted September 22, 2015 Author Share Posted September 22, 2015 PM sent. Hope it helps as the file has been heavily modded.Did not get it. Did you sent it? Andreas Link to comment Share on other sites More sharing options...
porrier Posted September 22, 2015 Author Share Posted September 22, 2015 @@burtI store my images per brand, but I was thinking, this kinda solution looks generic enough to me and might be a good addition to the core - or not ?Per brand is a good idea if I only would get the thing running. I insert a new directory into the input field but it is not greated. The webserver has write permissions to the images directory.I'll create it manually and see if it stores the image then. Andreas Link to comment Share on other sites More sharing options...
♥14steve14 Posted September 23, 2015 Share Posted September 23, 2015 Did not get it. Did you sent it? Andreas Sent it. Check your messages in your account. @@bruyndoncx I save my images by category. I think it makes it easier to find and replace images as the manufacturers update theirs. I also name the images something sensible so they are easy to find, whether it helps with SEO I have no idea. But its down to personal preference. REMEMBER BACKUP, BACKUP AND BACKUP Link to comment Share on other sites More sharing options...
♥bruyndoncx Posted September 23, 2015 Share Posted September 23, 2015 @@14steve14 But its down to personal preference.exactly, that is why this kind of solution is generic enough to work for most people. KEEP CALM AND CARRY ON I do not use the responsive bootstrap version since i coded my responsive version earlier, but i have bought every 28d of code package to support burts effort and keep this forum alive (albeit more like on life support). So if you are still here ? What are you waiting for ?! Find the most frequent unique errors to fix: grep "PHP" php_error_log.txt | sed "s/^.* PHP/PHP/g" |grep "line" |sort | uniq -c | sort -r > counterrors.txt Link to comment Share on other sites More sharing options...
porrier Posted September 23, 2015 Author Share Posted September 23, 2015 Sent it. Check your messages in your account. @@bruyndoncx I save my images by category. I think it makes it easier to find and replace images as the manufacturers update theirs. I also name the images something sensible so they are easy to find, whether it helps with SEO I have no idea. But its down to personal preference. Found it in the private message of my account here, thank you! I'll look at it and try to get that thing working. At the moment there is a difference in my categories.php compared to what the doc says. Andreas Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.