Updates To Ez Admin Helper Addon (V4 Only) - Image Issues

We have just released a new version of EZ Admin Helper (existing clients will get update automatically) that will help you with identifying and resolving detailed image issues.



A new action has been created for “Check detailed images”.

There are 3 parameters to this action. These are:[list]

[]fix_paths - If a file referenced in the db does not exist in the filesystem but one of the same base-name (but different suffix) does exist (and there is only one), then change the reference in the DB to be the new (alternate) filename and update the sizes of the new file to match.

[
]check_sizes - Check that the image size of the file matches the image size in the database - report any differences.

[*]fix_sizes - If check_sizes above identifies a difference and this parameter is set then update the database accordingly.

[/list]

These changes were brought about by a client who had resized all the images in the filesystem to better optimize the images. Unfortunately, the program used saved everything as a jpg regardless of what the source file type was. This caused 2 problems. One - there were a lot of “no-image” for category/product/option detailed images and Two - the new image sizes didn't match what the database thought should be there.



So our of the 11K+ detailed images on their site, it automatically fixed the paths of about 700 of them. Additionally, it fixed the sizes of about 900 more. The report showed that there are still 200+ products on the site where there is no image file in the filesystem. They will have to address this manually.



But the above automation probably saved the client about 10+ hours of manual importing of images.



The documentation here will be updated shortly. And here is the addon product (EZ Admin Helper) product detail page

Tony, if I may make a suggestion, CS-Cart is piling up all the images in images folder which bogs down server performance and disk space after certain point. One little idea that I had was to go back and clean up images/detailed/ folder by comparing with active products in database.



It can be an extension on its own or part of your admin toolkit. It could offer backup- to a zip file-then-delete images for disabled products.



Thanks

It does one half of the equation. If an entry exists in the images table and there's no corresponding product then the entry is deleted. Unfortunately, going the other way would need to be a separate method. Since the folder name is based on image id the likelihood of deleting a valid image could be pretty high.