sreichel / magento-Defcon2-Imaclean

Free extension from magento connect.
10 stars 5 forks source link

Changes I would recommend #11

Closed addison74 closed 3 years ago

addison74 commented 3 years ago

First Change /app/code/community/Defcon2/Imaclean/Block/Adminhtml/Imaclean/Grid.php

line 50 from

'caption' => Mage::helper('defcon2imaclean')->__('delete'),

to

'caption' => Mage::helper('defcon2imaclean')->__('Delete'),

Second Change /app/code/community/Defcon2/Imaclean/Block/Adminhtml/Imaclean.php

line 17 from

$this->_headerText = Mage::helper('defcon2imaclean')->__('Items Manager. These files are not in database.');

to

$this->_headerText = Mage::helper('defcon2imaclean')->__('Orphan Product Images');

Third Change /app/code/community/Defcon2/Imaclean/etc/adminhtml.xml

This is the new content of the file which moves ImaClean link to Tools menu.

<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
 * Defcon2_Imaclean
 *
 * @category   Defcon2
 * @package    Defcon2_Imaclean
 * @copyright  Copyright (c) 2016 Manuel Canepa (http://cv.manuelcanepa.com.ar/)
 * @license    http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
 */
-->
<config>
    <menu>
        <system>
        <children>
        <tools>
            <children>
                    <d2imaclean module="defcon2imaclean" translate="title">
                <title>ImaClean</title>
                <sort_order>2000</sort_order>
                <action>adminhtml/imaclean</action>
            </d2imaclean>
            </children>
        </tools>
        </children>
        </system>
    </menu>
    <acl>
    <resources>
            <admin>
                <children>
                    <system>
            <children>
                <tools>
                <children>
                                <d2imaclean>
                    <title>ImaClean</title>
                                </d2imaclean>
                </children>
                </tools>
                        </children>
                    </system>
                </children>
            </admin>
        </resources>
    </acl>
</config>
addison74 commented 3 years ago

Fourth Change

/app/code/community/Defcon2/Imaclean/Block/Adminhtml/Renderer

Line 50 reduce the image size to the one in product editing page Images Section from

return "<img src='" . $location . "media/catalog/product{$url}' alt='{$url}' title='{$url}' width='150' height='150' />";

to

return "<img src='" . $location . "media/catalog/product{$url}' alt='{$url}' title='{$url}' width='100' height='100' />";

addison74 commented 3 years ago

Fifth Change I would suggest a Resource folder in /Model. This extension is using the "old" style Mysql4.

addison74 commented 3 years ago

And these are improvements:

1. It would be great if we have similar tool for cleaning the orphan images of the categories. We could start from the current form of ImaClean and insert a new column in the grid to differentiate between Product and Category, to filter the images.

2. Imaclean helped me finding images and download them via direct link, without having to connect to the server and take them from there. The current version could be improved by adding a link on Actions column bellow to Delete link for saving an image.

addison74 commented 3 years ago

Improvements are already achieved in this fresh extension: https://github.com/fballiano/magento1-image-cleaner.

sreichel commented 3 years ago

@ADDISON74 Thanks. I'll check fballianos module and archive this soon. Thanks for your effort :)

addison74 commented 3 years ago

I am looking forward for your comments related to the new flavor which deals pretty well with orphan images for catalog/product/wysiwyg. Fabrizio really did a great job in a short time.