Official Topic For 'change Default Image Directories' Contrib
#41
Posted 10 August 2007 - 10:47 PM
Error Error: Destination does not exist.
Error Error: Catalog products images directory does not exist: ..//catalog/images/products/
^
note this destination is there but it is not working
also then a product does work it does not upload in the normal product/... folder it wants to load like this barrels__barrel_accessories/barrels/autococker/Ceramic_1.gif not in the products folder.....
and for the Manufacturers thing there is no errors, it uploads the image but then when it comes back to the normal info to shows you the image, its not there...
so i guess it real doesn't upload it...
I dont know whats up I know I installed it right I followed the steps...
I installed the 1.4v
#42
Posted 11 August 2007 - 12:39 PM
JS_Supplies, on Aug 10 2007, 11:03 PM, said:
What's the problem? Do you recieve any error messages?
product and category image sub-directories
#43
Posted 11 August 2007 - 02:28 PM
1. Manufacturers image problem
when I go to edit a manufacturers image and use the browse and get my image I want and click down it reload the hold window and nothing happen, no errors, no image was ever upload becuase it comes up and says this....
[img]http://img116.imageshack.us/img116/2712/mwindowrj2.gif[/img]
and I did make the manufacturers folder for the images
2. Product image problem
Ok, when I upload product, no image is uploaded, two error come up, and the product image file trail is not right is says "S2_1.gif"
Error Error: Destination does not exist.
Error Error: Catalog products images directory does not exist: ..//catalog/images/products/
^
note this destination is there
#44
Posted 11 August 2007 - 02:46 PM
JS_Supplies, on Aug 11 2007, 03:28 PM, said:
when I go to edit a manufacturers image and use the browse and get my image I want and click down it reload the hold window and nothing happen, no errors, no image was ever upload
and I did make the manufacturers folder for the images
define('DIR_FS_MANUFACTURERS_IMAGES',
and the code you have in catalog/admin/manufacturers.php at about line 41. It should be this: $manufacturers_image = new upload('manufacturers_image');
$manufacturers_image->set_destination(DIR_FS_CATALOG_IMAGES . DIR_FS_MANUFACTURERS_IMAGES);
if ($manufacturers_image->parse() && $manufacturers_image->save()) {
tep_db_query("update " . TABLE_MANUFACTURERS . " set manufacturers_image = '" . DIR_FS_MANUFACTURERS_IMAGES . $manufacturers_image->filename . "' where manufacturers_id = '" . (int)$manufacturers_id . "'");
}
JS_Supplies, on Aug 11 2007, 03:28 PM, said:
Ok, when I upload product, no image is uploaded, two error come up, and the product image file trail is not right is says "S2_1.gif"
Error Error: Destination does not exist.
Error Error: Catalog products images directory does not exist: ..//catalog/images/products/
No-one's verified if this fix works or not though so let me know!
product and category image sub-directories
#45
Posted 11 August 2007 - 05:00 PM
and I tried that one thing that you put to fix it but it did not work for me.
I tried creating a new product and it haves still two errors
Error Error: Destination does not exist.
Error Error: Catalog products images directory does not exist: ..//catalog/images/products/
and I have created the "products" folder so I dont understand that error
[img]http://img74.imageshack.us/img74/6631/pthingfi9.jpg[/img]
thats what it looks like after uploading a image to the product
Edited by JS_Supplies, 11 August 2007 - 05:01 PM.
#46
Posted 11 August 2007 - 05:21 PM
JS_Supplies, on Aug 11 2007, 06:00 PM, said:
and I tried that one thing that you put to fix it but it did not work for me.
I tried creating a new product and it haves still two errors
Error Error: Destination does not exist.
Error Error: Catalog products images directory does not exist: ..//catalog/images/products/
and I have created the "products" folder so I dont understand that error
okay.. what've you got in admin/includes/configure.php on the line that starts:
define('DIR_FS_CATALOG',
product and category image sub-directories
#47
Posted 11 August 2007 - 05:42 PM
define('DIR_FS_CATALOG', DIR_FS_DOCUMENT_ROOT . DIR_WS_CATALOG);
#48
Posted 11 August 2007 - 05:45 PM
JS_Supplies, on Aug 11 2007, 06:42 PM, said:
define('DIR_FS_CATALOG', DIR_FS_DOCUMENT_ROOT . DIR_WS_CATALOG); define('DIR_FS_CATALOG', DIR_FS_DOCUMENT_ROOT);
product and category image sub-directories
#49
Posted 11 August 2007 - 06:21 PM
I dont know it this helps but this is how my oscommerce was installed:
[img]http://img181.imageshack.us/img181/4862/untitledlu6.jpg[/img]
#50
Posted 11 August 2007 - 06:59 PM
define('DIR_FS_DOCUMENT_ROOT'
and define('DIR_WS_CATALOG'
I'm only asking because I don't understand why the error message says the directory as: ..//catalog/images/products/it shouldn't be using ../ and their should be something between the two slashes '/'.
product and category image sub-directories
#51
Posted 11 August 2007 - 07:13 PM
Dragen, on Aug 11 2007, 02:59 PM, said:
define('DIR_FS_DOCUMENT_ROOT'
and define('DIR_WS_CATALOG'
I'm only asking because I don't understand why the error message says the directory as: ..//catalog/images/products/it shouldn't be using ../ and their should be something between the two slashes '/'.
define('DIR_FS_DOCUMENT_ROOT', $DOCUMENT_ROOT); // where your pages are located on the server. if $DOCUMENT_ROOT doesnt suit you, replace with your local path. (eg, /usr/local/apache/htdocs)
define('DIR_WS_CATALOG', '/catalog/');
#52
Posted 11 August 2007 - 07:16 PM
try chaging this:
define('DIR_WS_CATALOG', '/catalog/');
to this: define('DIR_WS_CATALOG', 'catalog/');
product and category image sub-directories
#53
Posted 11 August 2007 - 07:40 PM
Error: Destination does not exist.
Error Error: Catalog products images directory does not exist: ../images/products/
#54
Posted 11 August 2007 - 09:21 PM
are you sure you copied the code properly in my fix?
// copy image only if modified
unset($_SESSION['categoryfile']);
$cid = explode('_', $cPath);
$categoryfile = '';
foreach($cid as $key => $value){
if($value != '0'){
$cdat = tep_db_query("SELECT `categories_name` FROM `categories_description` WHERE `categories_id` = '" . $value . "' && `language_id` = '1'");
$cat = tep_db_fetch_array($cdat);
$categoryfile .= $cat['categories_name'] . "/";
}
}
$_SESSION['categoryfile'] = $categoryfile;
$products_image = new upload('products_image');
$products_image->set_destination(DIR_FS_CATALOG_IMAGES . DIR_FS_PRODUCTS_IMAGES . $categoryfile);
if ($products_image->parse() && $products_image->save()) {
$products_image_name = DIR_FS_PRODUCTS_IMAGES . $categoryfile . $products_image->filename;
} else {
$products_image_name = (isset($HTTP_POST_VARS['products_previous_image']) ? $HTTP_POST_VARS['products_previous_image'] : '');
}
break;
}
}
// check if the catalog image directory exists
if (is_dir(DIR_FS_CATALOG_IMAGES . DIR_FS_PRODUCTS_IMAGES . $categoryfile)) {
if (!is_writeable(DIR_FS_CATALOG_IMAGES . DIR_FS_PRODUCTS_IMAGES . $categoryfile)) $messageStack->add(ERROR_CATALOG_PRODUCT_IMAGE_DIRECTORY_NOT_WRITEABLE, 'error');
} else {
$messageStack->add(ERROR_CATALOG_PRODUCT_IMAGE_DIRECTORY_DOES_NOT_EXIST, 'error');
unset($_SESSION['categoryfile']);
}
?>
and are you using the drop-down menu to select the categories (shown below)?[img]http://i48.photobucket.com/albums/f238/DragenMyspace/drop-downcategories.gif[/img]
If you are then that will cause an error.
you need to select categories by clicking on it in the main list instead
product and category image sub-directories
#55
Posted 11 August 2007 - 10:44 PM
[img]http://img381.imageshack.us/img381/6981/untitledia7.jpg[/img]
#56
Posted 11 August 2007 - 11:35 PM
JS_Supplies, on Aug 11 2007, 11:44 PM, said:
<?php
// copy image only if modified
unset($_SESSION['categoryfile']);
$cid = explode('_', $cPath);
$categoryfile = '';
foreach($cid as $key => $value){
if($value != '0'){
$cdat = tep_db_query("SELECT `categories_name` FROM `categories_description` WHERE `categories_id` = '" . $value . "' && `language_id` = '1'");
$cat = tep_db_fetch_array($cdat);
$categoryfile .= $cat['categories_name'] . "/";
}
}
$_SESSION['categoryfile'] = $categoryfile;
$products_image = new upload('products_image');
$products_image->set_destination('..' . DIR_WS_CATALOG . 'images/' . . DIR_FS_PRODUCTS_IMAGES . $categoryfile);
if ($products_image->parse() && $products_image->save()) {
$products_image_name = DIR_FS_PRODUCTS_IMAGES . $categoryfile . $products_image->filename;
} else {
$products_image_name = (isset($HTTP_POST_VARS['products_previous_image']) ? $HTTP_POST_VARS['products_previous_image'] : '');
}
break;
}
}
// check if the catalog image directory exists
if (is_dir('..' . DIR_WS_CATALOG . 'images/' . . DIR_FS_PRODUCTS_IMAGES . $categoryfile)) {
if (!is_writeable('..' . DIR_WS_CATALOG . 'images/' . . DIR_FS_PRODUCTS_IMAGES . $categoryfile)) $messageStack->add(ERROR_CATALOG_PRODUCT_IMAGE_DIRECTORY_NOT_WRITEABLE, 'error');
} else {
$messageStack->add(ERROR_CATALOG_PRODUCT_IMAGE_DIRECTORY_DOES_NOT_EXIST, 'error');
unset($_SESSION['categoryfile']);
}
?>
also to get the correct error message if it doesn't work open admin/includes/languages/categories.php:
find the line starting:
define('ERROR_CATALOG_PRODUCT_IMAGE_DIRECTORY_DOES_NOT_EXIST',
replace with:define('ERROR_CATALOG_PRODUCT_IMAGE_DIRECTORY_DOES_NOT_EXIST', 'Error: Catalog products images directory does not exist: ' . '..' . DIR_WS_CATALOG . 'images/' . . DIR_FS_PRODUCTS_IMAGES . $_SESSION['categoryfile']);
Edited by Dragen, 11 August 2007 - 11:38 PM.
product and category image sub-directories
#57
Posted 12 August 2007 - 12:21 AM
Edited by JS_Supplies, 12 August 2007 - 12:22 AM.
#58
Posted 13 August 2007 - 02:14 AM
#59
Posted 13 August 2007 - 09:55 AM
If you have the code in admin/categories.php how it is in my original fix that I linked you to.. (before I changed it in my last post)
and the same with admin/includes/languages/categories.php..
change this prt back:
define('ERROR_CATALOG_PRODUCT_IMAGE_DIRECTORY_DOES_NOT_EXIST',
basically undoing what my last post told you to do.Then when you go to upload a product and press submit. When it shows the error message, refresh the page (f5). Sometimes the error message lags, so it may say something different (although I doubt it..)
then copy out the exact error message.. for me.
product and category image sub-directories
#60
Posted 13 August 2007 - 01:46 PM
// copy image only if modified
unset($_SESSION['categoryfile']);
$cid = explode('_', $cPath);
$categoryfile = '';
foreach($cid as $key => $value){
if($value != '0'){
$cdat = tep_db_query("SELECT `categories_name` FROM `categories_description` WHERE `categories_id` = '" . $value . "' && `language_id` = '1'");
$cat = tep_db_fetch_array($cdat);
$categoryfile .= $cat['categories_name'] . "/";
}
}
$_SESSION['categoryfile'] = $categoryfile;
$products_image = new upload('products_image');
$products_image->set_destination(DIR_FS_CATALOG_IMAGES . DIR_FS_PRODUCTS_IMAGES . $categoryfile);
if ($products_image->parse() && $products_image->save()) {
$products_image_name = DIR_FS_PRODUCTS_IMAGES . $categoryfile . $products_image->filename;
} else {
$products_image_name = (isset($HTTP_POST_VARS['products_previous_image']) ? $HTTP_POST_VARS['products_previous_image'] : '');
}
break;
}
}
// check if the catalog image directory exists
if (is_dir(DIR_FS_CATALOG_IMAGES . DIR_FS_PRODUCTS_IMAGES . $categoryfile)) {
if (!is_writeable(DIR_FS_CATALOG_IMAGES . DIR_FS_PRODUCTS_IMAGES . $categoryfile)) $messageStack->add(ERROR_CATALOG_PRODUCT_IMAGE_DIRECTORY_NOT_WRITEABLE, 'error');
} else {
$messageStack->add(ERROR_CATALOG_PRODUCT_IMAGE_DIRECTORY_DOES_NOT_EXIST, 'error');
unset($_SESSION['categoryfile']);
}
admin/includes/languages/categories.php (line 96)define('ERROR_CATALOG_PRODUCT_IMAGE_DIRECTORY_DOES_NOT_EXIST', 'Error: Catalog products images directory does not exist: ' . DIR_FS_CATALOG_IMAGES . DIR_FS_PRODUCTS_IMAGES . $_SESSION['categoryfile']);
Is this right?









