Hi all,

I'm running v1.3.8a.

I wish to have individual sub directories level to the images directory based on the Product ID, and would like this to show up in the drop down box on the Admin Product screen under "Upload to directory:"

My Current Image dir listing is (I've created these sub directories using FTP)

images/shoes/productid_a/
images/shoes/productid_b/
images/shoes/productid_c/
images/shirts/productid_d/
images/shirts/productid_e/
images/shirts/productid_f/

The "Upload to directory:" drop down box shows;

Main Directory
shoes
shirts

I would like it to show the productID sub directories based on which category I'm in. For example if I adding a product under the category (name = "shoes") then I would like to see the dropdown display;

productid_a
productid_b
productid_c


I can do this via Easy Populate or via myPhpAdmin but it would be nice to have it on the UI in the admin screen.

I am looking at the code in 'admin/includes/modules/product/collect_info' btwn line 438 & 450 ;
PHP Code:
<?php
  $dir 
= @dir(DIR_FS_CATALOG_IMAGES);
  
$dir_info[] = array('id' => '''text' => "Main Directory");
  while (
$file $dir->read()) {
    if (
is_dir(DIR_FS_CATALOG_IMAGES $file) && strtoupper($file) != 'CVS' && $file != "." && $file != "..") {
      
$dir_info[] = array('id' => $file '/''text' => $file);
    }
  }
  
$dir->close();
  
sort($dir_info);

  
$default_directory substr$pInfo->products_image0,strpos$pInfo->products_image'/')+1);
?>
I'm not sure where to add the code
PHP Code:
'/category_name/' 
.

Any pointers?

Hope this makes sense, and is not too long winded.

Thx in advance