francois21, on 20 August 2011, 13:51, said:
But if I want no image for this product, if I try to delete image whith X button --> it si not possible I have the waiting image and nothing, when I Save, image is here and not delete.
If I browse server and try to delete this image from server it is not possible
alert message Can not delete image: image still in use by other products :: microsoft-intellimouse-explorer-1.jpg
If i want some product without image, how can I do?
Thank's
Francois
Oh... never though anyone want to create product without an image
Edit your
path_to_admin/categories.php. Around
line 231, insert the following code:
} else {
$sql_data_array['products_image'] = '';
$sql_data_array['products_images'] = '';
}
The complete block of code will look like this:
$sql_data_array = array('products_quantity' => (int)tep_db_prepare_input($HTTP_POST_VARS['products_quantity']),
'products_model' => tep_db_prepare_input($HTTP_POST_VARS['products_model']),
'products_price' => tep_db_prepare_input($HTTP_POST_VARS['products_price']),
'products_date_available' => $products_date_available,
'products_weight' => (float)tep_db_prepare_input($HTTP_POST_VARS['products_weight']),
'products_status' => tep_db_prepare_input($HTTP_POST_VARS['products_status']),
'products_tax_class_id' => tep_db_prepare_input($HTTP_POST_VARS['products_tax_class_id']),
'manufacturers_id' => (int)tep_db_prepare_input($HTTP_POST_VARS['manufacturers_id']));
$products_images = isset($_POST['products_images']) ? $_POST['products_images'] : array();
$products_images = array_unique($products_images);
if (tep_not_null($products_images)) {
$sql_data_array['products_image'] = tep_db_prepare_input($products_images[0]);
$sql_data_array['products_images'] = tep_db_prepare_input(implode(',', $products_images));
} else {
$sql_data_array['products_image'] = '';
$sql_data_array['products_images'] = '';
}
francois21, on 20 August 2011, 13:51, said:
alert message Can not delete image: image still in use by other products :: microsoft-intellimouse-explorer-1.jpg
Francois
That's right. OPI can not delete an image if that image still in use by any product.
Thanks'
zaenal
Edited by Parikesit, 20 August 2011, 14:53.