keat Posted September 9, 2016 Share Posted September 9, 2016 I've cleaned up a few orphaned images today by deleting them from the images/source folder. However, when I edit a product and look in the images tab, these deleted images still appear in the drop down. So what's the best method of removing orphaned images. Quote Link to comment Share on other sites More sharing options...
keat Posted September 9, 2016 Author Share Posted September 9, 2016 I found the orphaned entries in the cubecart_filemanager table. However, this got me thinking about the slow page refresh when editing a product. Maybe I could export the inventory, file manager and image_index tables and use something like MS Access to link the tables and run a query to find which images are not associated with a product. If i then remove these entries from the file manger table, it might speed up the page refresh. any thoughts ? Quote Link to comment Share on other sites More sharing options...
ayz1 Posted September 9, 2016 Share Posted September 9, 2016 To speed up the page refresh when editing a product create a new folder in the images/source folder e.g. pictures then copy all of the files in the images/source folder into the new folder images/source/pictures (easy to do in cPanel) then run an sql query on the filemanager table to update the filepath to pictures/ UPDATE `CubeCart_filemanager` SET `filepath` = "pictures/"; Once all done delete the image files from the images/source folder. Quote Link to comment Share on other sites More sharing options...
keat Posted September 9, 2016 Author Share Posted September 9, 2016 I got the impression previously that this process was to separate images in to many directories. I didn't realise that it was all images in to one directory. Maybe I'll look at this then. Quote Link to comment Share on other sites More sharing options...
ayz1 Posted September 9, 2016 Share Posted September 9, 2016 Well you can separate into several folders but that's going to be a pain. The above will remove the lag when doing general editing and the only time when there will be a lag problem is when changing images on a product because the pictures folder would have to be opened, however this is not done very often if at all once a product is listed. Quote Link to comment Share on other sites More sharing options...
keat Posted September 9, 2016 Author Share Posted September 9, 2016 Sorted. definitely more responsive initially. I assume that any new images will start to be uploaded to the source folder ? However, if this is the case, then a similar update once every 12 months won't be hard work. Quote Link to comment Share on other sites More sharing options...
ayz1 Posted September 9, 2016 Share Posted September 9, 2016 Yes just add images as normal and then move files over to new folder at regular intervals. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.