Community Add-Ons
| Maintainers: | sumaiya |
Delete Category Image (ONLY)
for osCommerce Online Merchant v2.2
This contribution is created to delete a category image without deleting the category itself. It has nothing to do with multiple images for a sinle category
Lets have the category image delete button displayed if there is category image is available:
Change Step 3 with following changes:
Find:
------------------------------------
$contents[] = array('text' => '<br>' . tep_info_image($cInfo->categories_image, $cInfo->categories_name, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT) . '<br>' . $cInfo->categories_image);
Add following under it:
-------------------------------------------
if ($cInfo->categories_image) $contents[] = array('text' =>'<br><a href="' . tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $category_path_string . '&cID=' . $cInfo->categories_id . '&action=delete_category_image') . '">' . tep_image_button('button_delete_image.gif', IMAGE_DELETE) . '</a>');
-----------------------------------------------
Finally, don't forget to produce and add "button_delete_image.gif" in your /catalog/admin/includes/languages/[YOUR_LANGUAGE]/images/buttons folder
