[Skip to main content](#vessel-content)

#   Masse delete not fudet images

##

- **[the heatkiller](/forum/user/10523-the-heatkiller "View the heatkiller's Profile")**
- [![the heatkiller's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/10523-the-heatkiller "View the heatkiller's Profile") Topic Author
- [ Offline](/forum/user/10523-the-heatkiller)

Less More

- Posts: 37
- Thank you received: 1
-
-
-
- [](http://www.dcom.dk)
-

11 years 7 months ago [\#195151](#195151) by [the heatkiller](/forum/user/10523-the-heatkiller "View the heatkiller's Profile")  *[Masse delete not fudet images](/forum/26-product-category-display/875749-masse-delete-not-fudet-images#195151 "-- HikaShop version -- : 2.4.0 -- Joomla version -- : 3.4 -- PHP version -- : 5.6.6 -- Browser(s) name and version -- :   www.dcom.dk  Hello everyone I was wondering if there is a function that can erase images which are not found or is damaged.  The reason I spøre into this is my sides have over 13000 products which are blver import with cvs but part of the bill shoulder does not look like it worked so I am to have found a way to find all the pictures that do not work on my since then it becomes clear again, that I may be new pictures up.  any good ideas?  Theis")* was created by *[the heatkiller](/forum/user/10523-the-heatkiller "View the heatkiller's Profile")*

-- HikaShop version -- : 2.4.0
-- Joomla version -- : 3.4
-- PHP version -- : 5.6.6
-- Browser(s) name and version -- : [ www.dcom.dk](http://www.dcom.dk)

Hello everyone
I was wondering if there is a function that can erase images which are not found or is damaged.

The reason I spøre into this is my sides have over 13000 products which are blver import with cvs but part of the bill shoulder does not look like it worked so I am to have found a way to find all the pictures that do not work on my since then it becomes clear again, that I may be new pictures up.

any good ideas?

Theis

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84NzU3NDktbWFzc2UtZGVsZXRlLW5vdC1mdWRldC1pbWFnZXM/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Xavier](/forum/user/4105-xavier "View Xavier's Profile")**
- [![Xavier's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4105.png)](/forum/user/4105-xavier "View Xavier's Profile")
- [ Offline](/forum/user/4105-xavier)

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

11 years 7 months ago [\#195159](#195159) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[Masse delete not fudet images](/forum/26-product-category-display/875749-masse-delete-not-fudet-images#195159 "-- HikaShop version -- : 2.4.0 -- Joomla version -- : 3.4 -- PHP version -- : 5.6.6 -- Browser(s) name and version -- :   www.dcom.dk  Hello everyone I was wondering if there is a function that can erase images which are not found or is damaged.  The reason I spøre into this is my sides have over 13000 products which are blver import with cvs but part of the bill shoulder does not look like it worked so I am to have found a way to find all the pictures that do not work on my since then it becomes clear again, that I may be new pictures up.  any good ideas?  Theis")*

Hi,

There is not functions like that by default in HikaShop.
It will require a custom script.

What could potentially be done, is to export all the products in csv via the mass actions with only the images informations.
Then thanks to the custom script, look over all the images, and if they are not in the csv file so delete them.
It require good PHP knowledges.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84NzU3NDktbWFzc2UtZGVsZXRlLW5vdC1mdWRldC1pbWFnZXM/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[the heatkiller](/forum/user/10523-the-heatkiller "View the heatkiller's Profile")**
- [![the heatkiller's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/10523-the-heatkiller "View the heatkiller's Profile") Topic Author
- [ Offline](/forum/user/10523-the-heatkiller)

Less More

- Posts: 37
- Thank you received: 1
-
-
-
- [](http://www.dcom.dk)
-

11 years 7 months ago [\#195334](#195334) by [the heatkiller](/forum/user/10523-the-heatkiller "View the heatkiller's Profile")  Replied by *[the heatkiller](/forum/user/10523-the-heatkiller "View the heatkiller's Profile")* on topic *[Masse delete not fudet images](/forum/26-product-category-display/875749-masse-delete-not-fudet-images#195334 "-- HikaShop version -- : 2.4.0 -- Joomla version -- : 3.4 -- PHP version -- : 5.6.6 -- Browser(s) name and version -- :   www.dcom.dk  Hello everyone I was wondering if there is a function that can erase images which are not found or is damaged.  The reason I spøre into this is my sides have over 13000 products which are blver import with cvs but part of the bill shoulder does not look like it worked so I am to have found a way to find all the pictures that do not work on my since then it becomes clear again, that I may be new pictures up.  any good ideas?  Theis")*

Yes it is probably easiest to take it in the database or cvs.
But do you think it is possible to get Hika system to brands the picture where the user defult picture on the database?
With a piece of text or something

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84NzU3NDktbWFzc2UtZGVsZXRlLW5vdC1mdWRldC1pbWFnZXM/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Xavier](/forum/user/4105-xavier "View Xavier's Profile")**
- [![Xavier's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4105.png)](/forum/user/4105-xavier "View Xavier's Profile")
- [ Offline](/forum/user/4105-xavier)

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

11 years 7 months ago [\#195343](#195343) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[Masse delete not fudet images](/forum/26-product-category-display/875749-masse-delete-not-fudet-images#195343 "-- HikaShop version -- : 2.4.0 -- Joomla version -- : 3.4 -- PHP version -- : 5.6.6 -- Browser(s) name and version -- :   www.dcom.dk  Hello everyone I was wondering if there is a function that can erase images which are not found or is damaged.  The reason I spøre into this is my sides have over 13000 products which are blver import with cvs but part of the bill shoulder does not look like it worked so I am to have found a way to find all the pictures that do not work on my since then it becomes clear again, that I may be new pictures up.  any good ideas?  Theis")*

Hi,

Sorry but I don't really understand your question.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84NzU3NDktbWFzc2UtZGVsZXRlLW5vdC1mdWRldC1pbWFnZXM/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[the heatkiller](/forum/user/10523-the-heatkiller "View the heatkiller's Profile")**
- [![the heatkiller's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/10523-the-heatkiller "View the heatkiller's Profile") Topic Author
- [ Offline](/forum/user/10523-the-heatkiller)

Less More

- Posts: 37
- Thank you received: 1
-
-
-
- [](http://www.dcom.dk)
-

11 years 7 months ago [\#195542](#195542) by [the heatkiller](/forum/user/10523-the-heatkiller "View the heatkiller's Profile")  Replied by *[the heatkiller](/forum/user/10523-the-heatkiller "View the heatkiller's Profile")* on topic *[Masse delete not fudet images](/forum/26-product-category-display/875749-masse-delete-not-fudet-images#195542 "-- HikaShop version -- : 2.4.0 -- Joomla version -- : 3.4 -- PHP version -- : 5.6.6 -- Browser(s) name and version -- :   www.dcom.dk  Hello everyone I was wondering if there is a function that can erase images which are not found or is damaged.  The reason I spøre into this is my sides have over 13000 products which are blver import with cvs but part of the bill shoulder does not look like it worked so I am to have found a way to find all the pictures that do not work on my since then it becomes clear again, that I may be new pictures up.  any good ideas?  Theis")*

You know when hikashop can not find the picture inserts the default picture.

If you look at this product,
[ www.dcom.dk/p/149513-](http://www.dcom.dk/p/149513-)
There are errors in the first image when image can not be found or it is broken.

If you could get hikashop every time it use the default picture to also deleted these images every time it can not be found or is damaged from File_paht then it would be easy for me to see which of my 13000 product does not have a real picture that works :whistle:

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84NzU3NDktbWFzc2UtZGVsZXRlLW5vdC1mdWRldC1pbWFnZXM/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Xavier](/forum/user/4105-xavier "View Xavier's Profile")**
- [![Xavier's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4105.png)](/forum/user/4105-xavier "View Xavier's Profile")
- [ Offline](/forum/user/4105-xavier)

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

11 years 7 months ago [\#195546](#195546) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[Masse delete not fudet images](/forum/26-product-category-display/875749-masse-delete-not-fudet-images#195546 "-- HikaShop version -- : 2.4.0 -- Joomla version -- : 3.4 -- PHP version -- : 5.6.6 -- Browser(s) name and version -- :   www.dcom.dk  Hello everyone I was wondering if there is a function that can erase images which are not found or is damaged.  The reason I spøre into this is my sides have over 13000 products which are blver import with cvs but part of the bill shoulder does not look like it worked so I am to have found a way to find all the pictures that do not work on my since then it becomes clear again, that I may be new pictures up.  any good ideas?  Theis")*

Hi,

If HikaShop take the default picture that's because it can't find the image on the server, so we can't delete it as we don't know the path. But if you are talking about the entry in the database, yes, that could be a good thing.

I add it on our Todo list. ![:)](/media/kunena/emoticons/3.png ":)")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84NzU3NDktbWFzc2UtZGVsZXRlLW5vdC1mdWRldC1pbWFnZXM/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[the heatkiller](/forum/user/10523-the-heatkiller "View the heatkiller's Profile")**
- [![the heatkiller's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/10523-the-heatkiller "View the heatkiller's Profile") Topic Author
- [ Offline](/forum/user/10523-the-heatkiller)

Less More

- Posts: 37
- Thank you received: 1
-
-
-
- [](http://www.dcom.dk)
-

11 years 7 months ago [\#195870](#195870) by [the heatkiller](/forum/user/10523-the-heatkiller "View the heatkiller's Profile")  Replied by *[the heatkiller](/forum/user/10523-the-heatkiller "View the heatkiller's Profile")* on topic *[Masse delete not fudet images](/forum/26-product-category-display/875749-masse-delete-not-fudet-images#195870 "-- HikaShop version -- : 2.4.0 -- Joomla version -- : 3.4 -- PHP version -- : 5.6.6 -- Browser(s) name and version -- :   www.dcom.dk  Hello everyone I was wondering if there is a function that can erase images which are not found or is damaged.  The reason I spøre into this is my sides have over 13000 products which are blver import with cvs but part of the bill shoulder does not look like it worked so I am to have found a way to find all the pictures that do not work on my since then it becomes clear again, that I may be new pictures up.  any good ideas?  Theis")*

super ![:)](/media/kunena/emoticons/3.png ":)")

but do you have a ide to what files i shall look in to ? to try to fix this problem ![:)](/media/kunena/emoticons/3.png ":)")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84NzU3NDktbWFzc2UtZGVsZXRlLW5vdC1mdWRldC1pbWFnZXM/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Xavier](/forum/user/4105-xavier "View Xavier's Profile")**
- [![Xavier's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4105.png)](/forum/user/4105-xavier "View Xavier's Profile")
- [ Offline](/forum/user/4105-xavier)

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

11 years 7 months ago [\#195871](#195871) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[Masse delete not fudet images](/forum/26-product-category-display/875749-masse-delete-not-fudet-images#195871 "-- HikaShop version -- : 2.4.0 -- Joomla version -- : 3.4 -- PHP version -- : 5.6.6 -- Browser(s) name and version -- :   www.dcom.dk  Hello everyone I was wondering if there is a function that can erase images which are not found or is damaged.  The reason I spøre into this is my sides have over 13000 products which are blver import with cvs but part of the bill shoulder does not look like it worked so I am to have found a way to find all the pictures that do not work on my since then it becomes clear again, that I may be new pictures up.  any good ideas?  Theis")*

Hi,

I think that the best place will be in the image helper: "administrator/components/com_hikashop/helpers/image.php" in the function "_checkImage()".
This function only check if the image exists, so if it is not the case, you could potentially delete the entry in the "#__hikashop_file" table.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84NzU3NDktbWFzc2UtZGVsZXRlLW5vdC1mdWRldC1pbWFnZXM/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[the heatkiller](/forum/user/10523-the-heatkiller "View the heatkiller's Profile")**
- [![the heatkiller's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/10523-the-heatkiller "View the heatkiller's Profile") Topic Author
- [ Offline](/forum/user/10523-the-heatkiller)

Less More

- Posts: 37
- Thank you received: 1
-
-
-
- [](http://www.dcom.dk)
-

11 years 7 months ago [\#195973](#195973) by [the heatkiller](/forum/user/10523-the-heatkiller "View the heatkiller's Profile")  Replied by *[the heatkiller](/forum/user/10523-the-heatkiller "View the heatkiller's Profile")* on topic *[Masse delete not fudet images](/forum/26-product-category-display/875749-masse-delete-not-fudet-images#195973 "-- HikaShop version -- : 2.4.0 -- Joomla version -- : 3.4 -- PHP version -- : 5.6.6 -- Browser(s) name and version -- :   www.dcom.dk  Hello everyone I was wondering if there is a function that can erase images which are not found or is damaged.  The reason I spøre into this is my sides have over 13000 products which are blver import with cvs but part of the bill shoulder does not look like it worked so I am to have found a way to find all the pictures that do not work on my since then it becomes clear again, that I may be new pictures up.  any good ideas?  Theis")*

Oh nice i will start to work on it an tun back when i kohw somting ore need more help ![:)](/media/kunena/emoticons/3.png ":)")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84NzU3NDktbWFzc2UtZGVsZXRlLW5vdC1mdWRldC1pbWFnZXM/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Xavier](/forum/user/4105-xavier "View Xavier's Profile")**
- [![Xavier's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4105.png)](/forum/user/4105-xavier "View Xavier's Profile")
- [ Offline](/forum/user/4105-xavier)

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

11 years 7 months ago [\#195984](#195984) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[Masse delete not fudet images](/forum/26-product-category-display/875749-masse-delete-not-fudet-images#195984 "-- HikaShop version -- : 2.4.0 -- Joomla version -- : 3.4 -- PHP version -- : 5.6.6 -- Browser(s) name and version -- :   www.dcom.dk  Hello everyone I was wondering if there is a function that can erase images which are not found or is damaged.  The reason I spøre into this is my sides have over 13000 products which are blver import with cvs but part of the bill shoulder does not look like it worked so I am to have found a way to find all the pictures that do not work on my since then it becomes clear again, that I may be new pictures up.  any good ideas?  Theis")*

Hi,

You can replace the function with that code: Code:

function _checkImage($path){ if(!empty($path)){ jimport('joomla.filesystem.file'); if(JFile::exists($path)){ return true; } $db = JFactory::getDBO(); $query = 'DELETE FROM '.hikashop_table('file').' WHERE file_path = \''.$db-&gt;quote($path).'\' AND file_type=\'product\''; $db-&gt;setQuery($query); $db-&gt;query(); } return false; }

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84NzU3NDktbWFzc2UtZGVsZXRlLW5vdC1mdWRldC1pbWFnZXM/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[the heatkiller](/forum/user/10523-the-heatkiller "View the heatkiller's Profile")**
- [![the heatkiller's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/10523-the-heatkiller "View the heatkiller's Profile") Topic Author
- [ Offline](/forum/user/10523-the-heatkiller)

Less More

- Posts: 37
- Thank you received: 1
-
-
-
- [](http://www.dcom.dk)
-

11 years 7 months ago [\#196011](#196011) by [the heatkiller](/forum/user/10523-the-heatkiller "View the heatkiller's Profile")  Replied by *[the heatkiller](/forum/user/10523-the-heatkiller "View the heatkiller's Profile")* on topic *[Masse delete not fudet images](/forum/26-product-category-display/875749-masse-delete-not-fudet-images#196011 "-- HikaShop version -- : 2.4.0 -- Joomla version -- : 3.4 -- PHP version -- : 5.6.6 -- Browser(s) name and version -- :   www.dcom.dk  Hello everyone I was wondering if there is a function that can erase images which are not found or is damaged.  The reason I spøre into this is my sides have over 13000 products which are blver import with cvs but part of the bill shoulder does not look like it worked so I am to have found a way to find all the pictures that do not work on my since then it becomes clear again, that I may be new pictures up.  any good ideas?  Theis")*

Okay i will look in to it tanks ![:)](/media/kunena/emoticons/3.png ":)")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84NzU3NDktbWFzc2UtZGVsZXRlLW5vdC1mdWRldC1pbWFnZXM/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[the heatkiller](/forum/user/10523-the-heatkiller "View the heatkiller's Profile")**
- [![the heatkiller's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/10523-the-heatkiller "View the heatkiller's Profile") Topic Author
- [ Offline](/forum/user/10523-the-heatkiller)

Less More

- Posts: 37
- Thank you received: 1
-
-
-
- [](http://www.dcom.dk)
-

11 years 7 months ago [\#196015](#196015) by [the heatkiller](/forum/user/10523-the-heatkiller "View the heatkiller's Profile")  Replied by *[the heatkiller](/forum/user/10523-the-heatkiller "View the heatkiller's Profile")* on topic *[Masse delete not fudet images](/forum/26-product-category-display/875749-masse-delete-not-fudet-images#196015 "-- HikaShop version -- : 2.4.0 -- Joomla version -- : 3.4 -- PHP version -- : 5.6.6 -- Browser(s) name and version -- :   www.dcom.dk  Hello everyone I was wondering if there is a function that can erase images which are not found or is damaged.  The reason I spøre into this is my sides have over 13000 products which are blver import with cvs but part of the bill shoulder does not look like it worked so I am to have found a way to find all the pictures that do not work on my since then it becomes clear again, that I may be new pictures up.  any good ideas?  Theis")*

i tink it works at soon i know what to do with it´s error i get a error on line 423 that i do get.

Parse error: syntax error, unexpected 'path' (T_STRING) in /media/mynewdrive/html/Dcom3.0/administrator/components/com_hikashop/helpers/image.php on line 423

any idea ![:)](/media/kunena/emoticons/3.png ":)")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84NzU3NDktbWFzc2UtZGVsZXRlLW5vdC1mdWRldC1pbWFnZXM/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Xavier](/forum/user/4105-xavier "View Xavier's Profile")**
- [![Xavier's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4105.png)](/forum/user/4105-xavier "View Xavier's Profile")
- [ Offline](/forum/user/4105-xavier)

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

11 years 7 months ago [\#196016](#196016) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[Masse delete not fudet images](/forum/26-product-category-display/875749-masse-delete-not-fudet-images#196016 "-- HikaShop version -- : 2.4.0 -- Joomla version -- : 3.4 -- PHP version -- : 5.6.6 -- Browser(s) name and version -- :   www.dcom.dk  Hello everyone I was wondering if there is a function that can erase images which are not found or is damaged.  The reason I spøre into this is my sides have over 13000 products which are blver import with cvs but part of the bill shoulder does not look like it worked so I am to have found a way to find all the pictures that do not work on my since then it becomes clear again, that I may be new pictures up.  any good ideas?  Theis")*

Please try that code instead: Code:

function _checkImage($path){ if(!empty($path)){ jimport('joomla.filesystem.file'); if(JFile::exists($path)){ return true; } $db = JFactory::getDBO(); $query = 'DELETE FROM '.hikashop_table('file').' WHERE file_path = '.$db-&gt;quote($path).' AND file_type=\'product\''; $db-&gt;setQuery($query); $db-&gt;query(); } return false; }

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84NzU3NDktbWFzc2UtZGVsZXRlLW5vdC1mdWRldC1pbWFnZXM/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[the heatkiller](/forum/user/10523-the-heatkiller "View the heatkiller's Profile")**
- [![the heatkiller's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/10523-the-heatkiller "View the heatkiller's Profile") Topic Author
- [ Offline](/forum/user/10523-the-heatkiller)

Less More

- Posts: 37
- Thank you received: 1
-
-
-
- [](http://www.dcom.dk)
-

11 years 7 months ago [\#196044](#196044) by [the heatkiller](/forum/user/10523-the-heatkiller "View the heatkiller's Profile")  Replied by *[the heatkiller](/forum/user/10523-the-heatkiller "View the heatkiller's Profile")* on topic *[Masse delete not fudet images](/forum/26-product-category-display/875749-masse-delete-not-fudet-images#196044 "-- HikaShop version -- : 2.4.0 -- Joomla version -- : 3.4 -- PHP version -- : 5.6.6 -- Browser(s) name and version -- :   www.dcom.dk  Hello everyone I was wondering if there is a function that can erase images which are not found or is damaged.  The reason I spøre into this is my sides have over 13000 products which are blver import with cvs but part of the bill shoulder does not look like it worked so I am to have found a way to find all the pictures that do not work on my since then it becomes clear again, that I may be new pictures up.  any good ideas?  Theis")*

okey no error but also notings happen after i put the lines in.
Hmm what are we misssing

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84NzU3NDktbWFzc2UtZGVsZXRlLW5vdC1mdWRldC1pbWFnZXM/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[the heatkiller](/forum/user/10523-the-heatkiller "View the heatkiller's Profile")**
- [![the heatkiller's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/10523-the-heatkiller "View the heatkiller's Profile") Topic Author
- [ Offline](/forum/user/10523-the-heatkiller)

Less More

- Posts: 37
- Thank you received: 1
-
-
-
- [](http://www.dcom.dk)
-

11 years 7 months ago [\#196135](#196135) by [the heatkiller](/forum/user/10523-the-heatkiller "View the heatkiller's Profile")  Replied by *[the heatkiller](/forum/user/10523-the-heatkiller "View the heatkiller's Profile")* on topic *[Masse delete not fudet images](/forum/26-product-category-display/875749-masse-delete-not-fudet-images#196135 "-- HikaShop version -- : 2.4.0 -- Joomla version -- : 3.4 -- PHP version -- : 5.6.6 -- Browser(s) name and version -- :   www.dcom.dk  Hello everyone I was wondering if there is a function that can erase images which are not found or is damaged.  The reason I spøre into this is my sides have over 13000 products which are blver import with cvs but part of the bill shoulder does not look like it worked so I am to have found a way to find all the pictures that do not work on my since then it becomes clear again, that I may be new pictures up.  any good ideas?  Theis")*

Cut it has somting to do with i´am ursning joomla 3,4

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84NzU3NDktbWFzc2UtZGVsZXRlLW5vdC1mdWRldC1pbWFnZXM/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Xavier](/forum/user/4105-xavier "View Xavier's Profile")**
- [![Xavier's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4105.png)](/forum/user/4105-xavier "View Xavier's Profile")
- [ Offline](/forum/user/4105-xavier)

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

11 years 7 months ago [\#196141](#196141) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[Masse delete not fudet images](/forum/26-product-category-display/875749-masse-delete-not-fudet-images#196141 "-- HikaShop version -- : 2.4.0 -- Joomla version -- : 3.4 -- PHP version -- : 5.6.6 -- Browser(s) name and version -- :   www.dcom.dk  Hello everyone I was wondering if there is a function that can erase images which are not found or is damaged.  The reason I spøre into this is my sides have over 13000 products which are blver import with cvs but part of the bill shoulder does not look like it worked so I am to have found a way to find all the pictures that do not work on my since then it becomes clear again, that I may be new pictures up.  any good ideas?  Theis")*

Hi,

A better solution, because easily customizable, and no code lost when updating will be to edit the view "product / show_block_img" via the menu Display &gt; Views in HikaShop and at the top at the file add this code: Code:

&lt;?php if(!empty ($this-&gt;element-&gt;images)){ $image = reset($this-&gt;element-&gt;images); } if(isset($image-&gt;file_path) &amp;&amp; !empty($image-&gt;file_path)){ $config = hikashop_config(); $uploadFolder = ltrim(JPath::clean(html_entity_decode($config-&gt;get('uploadfolder'))),DS); $uploadFolder = rtrim($uploadFolder,DS).DS; $uploadFolder_url = str_replace(DS,'/',$uploadFolder); $uploadFolder = JPATH_ROOT.DS.$uploadFolder; $fullPath = $uploadFolder.$image-&gt;file_path; if(!JFile::exists($fullPath)) { $db = JFactory::getDBO(); $query = 'DELETE FROM '.hikashop_table('file').' WHERE file_path = '.$db-&gt;quote($image-&gt;file_path).' AND file_type=\'product\''; $db-&gt;setQuery($query); $db-&gt;query(); } } ?&gt;

The following user(s) said Thank You: [Jerome](/forum/user/80-jerome "View Jerome's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84NzU3NDktbWFzc2UtZGVsZXRlLW5vdC1mdWRldC1pbWFnZXM/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[the heatkiller](/forum/user/10523-the-heatkiller "View the heatkiller's Profile")**
- [![the heatkiller's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/10523-the-heatkiller "View the heatkiller's Profile") Topic Author
- [ Offline](/forum/user/10523-the-heatkiller)

Less More

- Posts: 37
- Thank you received: 1
-
-
-
- [](http://www.dcom.dk)
-

11 years 7 months ago -  11 years 7 months ago [\#196204](#196204) by [the heatkiller](/forum/user/10523-the-heatkiller "View the heatkiller's Profile")  Replied by *[the heatkiller](/forum/user/10523-the-heatkiller "View the heatkiller's Profile")* on topic *[Masse delete not fudet images\[Solved\]](/forum/26-product-category-display/875749-masse-delete-not-fudet-images#196204 "-- HikaShop version -- : 2.4.0 -- Joomla version -- : 3.4 -- PHP version -- : 5.6.6 -- Browser(s) name and version -- :   www.dcom.dk  Hello everyone I was wondering if there is a function that can erase images which are not found or is damaged.  The reason I spøre into this is my sides have over 13000 products which are blver import with cvs but part of the bill shoulder does not look like it worked so I am to have found a way to find all the pictures that do not work on my since then it becomes clear again, that I may be new pictures up.  any good ideas?  Theis")*

Yes it works ![:cheer:](/media/kunena/emoticons/2.png ":cheer:")

Tanks you are lifesaver now it is easy to see what product the are missing images

You save me a lot off time

Theis

Last edit: 11 years 7 months ago by [the heatkiller](/forum/user/10523-the-heatkiller "View the heatkiller's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84NzU3NDktbWFzc2UtZGVsZXRlLW5vdC1mdWRldC1pbWFnZXM/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.103 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
