Delete duplicate images in Hikashop after import
When you've done an import, you may see the same product photos multiple times in Hikashop. You can remove these manually, but with many products this is no fun.
Removing duplicate images in Hikashop via the Database
Of course you always make a backup of your website and database first (e.g. via akeebabackup).
Then go to the PHPmyadmin environment and there execute the following SQL query to remove the duplicate images.
DELETE n1 FROM #__hikashop_file n1, #__hikashop_file n2 WHERE n1.file_id > n2.file_id AND n1.file_ref_id = n2.file_ref_id AND n1.file_path = n2.file_path AND n1.file_type='product'
Images are imported as files
During the import it also happens that images are seen as downloadable files, these files were also previously imported as images, so are redundant and can be deleted.
Of course you always make a backup of your website and database first (e.g. via akeebabackup)
Then go to the PHPmyadmin environment and there execute the following SQL query to delete the "files".
DELETE FROM `#__hikashop_file` WHERE `file_type` = 'file'
Want to know more?
Wondering if I'm the right partner for your project? Then take a look at my portfolio, see what my clients say or contact me directly.
About Jeroen
I have been working with the Joomla! CMS since 2006. Besides building and maintaining Joomla! websites and webshops, I am also familiar with search engine optimization (SEO), Joomla hosting and developing templates and extensions. Furthermore, I am a frequent visitor and speaker at JoomlaDays and various Joomla user groups.
I am committed to the Joomla! community as a member of the Extensions Directory team and the organization of Joomla user group Breda and JoomlaDagen Netherlands. In short: Are you looking for a Joomla Specialist, you should contact me!
