To prevent the deletion of a Product from deleting the image(s) for it you would have to edit the file:
/your_secret_admin/includes/functions/general.php
and add the code in RED around line 1362:
Code:function zen_remove_product($product_id, $ptc = 'true') { global $db; $product_image = $db->Execute("select products_image from " . TABLE_PRODUCTS . " where products_id = '" . (int)$product_id . "'"); $duplicate_image = $db->Execute("select count(*) as total from " . TABLE_PRODUCTS . " where products_image = '" . zen_db_input($product_image->fields['products_image']) . "'"); // =============== // =============== CODE CHANGED: TURN OFF DELETION OF IMAGES WHEN PRODUCTS ARE DELETED // =============== if (false && $duplicate_image->fields['total'] < 2 and $product_image->fields['products_image'] != '' && PRODUCTS_IMAGE_NO_IMAGE != substr($product_image->fields['products_image'], strrpos($product_image->fields['products_image'], '/')+1)) {
NOTE: Making this change means the images will NEVER be deleted from the server unless you manually delete them


Reply With Quote
