How to Delete Duplicate Images in Bulk

  • Posts: 17
  • Thank you received: 0
9 years 11 months ago #182044

-- url of the page with the problem -- : www.whitediamondjewels.com
-- HikaShop version -- : 2.3.4
-- Joomla version -- : 1.5.19
-- PHP version -- : 5.3
-- Browser(s) name and version -- : Firefox 33.1
-- Error-message(debug-mod must be tuned on) -- : n/a

Hi there,

I had been having issues with migrating products form VM2 into HIkashop and with your help and updates it finally worked. However, Now I have over 40 duplicate images showing for each product. I have looked into the Image folders and there are multiples and I have renamed folders in an effort to sort out which one is active but I am getting lost in these thumbnails.

Is there a way to do bulk deletion or mapping or something? We have over 4K products so going individually to delete the images seem a bit too much.

Suggestions?

Thank you,

Colleen

Last edit: 9 years 11 months ago by colleen22.

Please Log in or Create an account to join the conversation.

  • Posts: 13201
  • Thank you received: 2322
9 years 11 months ago #182072

Hi,

If it's just the thumbnails which are duplicated, you can delete all thumbnails folders and their contents.
The needed thumbnails will be automatically re-generated when displaying the product page on frontend.
This way, no more duplicate image.

Please Log in or Create an account to join the conversation.

  • Posts: 17
  • Thank you received: 0
9 years 11 months ago #182161

HI I had lot of folders - and I deleted all of them. Actually I coped one set to my hard drive just in case.

I deleted them all in the end - and I still get too many thumbnails on most images. I cleared the cache in Joomla - and I am still seeing the 50x50 thumbnails duplicated over 40 times on products.

See attached images - you can see the files I deleted - I took a picture of the copied folders on my Filezilaa. Then you can see what I had on my server. And then you can see what I had left when I deleted them.

Perhaps there is a delay for these changes?

The other question I am struggling with is Add to Cart shows up on some Product Pages and not Others and I can't find the reason - I only want the Add to Cart to display on the product details page - not the category page, not the products listing pages - only on the product itself page. I have Add to Cart in Main Config settings to yes. But sometimes is is working as in Necklaces under Diamond Jewelry. And most times it is not. I can't find the pattern to make it consistently work - or not work.

Both issues are inconsistent when I map things out - I am really confused. I had to install and reinstall Hikashop a few times to get it working finally - so I don't know if that is causing all of this somehow. But I am ready to start over again - I have spend a ton of time trying to map out patters to repeat settings and that still doesn't get the same results.

Thank you,
Colleen

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
9 years 11 months ago #182201

Hi,

1. Deleting the images on the drive won't help as the issue is that you have the image entries in the hikashop_file table of your database for the images.
You will need to run such query via your phpmyadmin to clean that table:
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_type='product'
Please backup your database before that operation....just in case. And make sure that you replace #__ with your table prefix.

2. Having the add to cart showing on some products listings and not others is normal. When you edit your products listings menus/modules via the menu Display->Content menus/modules, you have an option there to display or not add to cart buttons for that particular listing, overriding the default setting of the HikaShop configuration.
If you don't want the add to cart button on your listings, then you should edit all your products listing menus/modules and make sure that this option is turned off.

Please Log in or Create an account to join the conversation.

  • Posts: 17
  • Thank you received: 0
9 years 11 months ago #182319

#1 I pasted your snippet and updated the prefix and it took while but came back with Table Went Away - I tried a few times and no luck.

I am excited though- I see over 100K rows and I see the file_path duplicates - so it's nice to know I am in the right place with your help!

I am testing out #2 - as we speak....

Thank you,
C

Please Log in or Create an account to join the conversation.

  • Posts: 17
  • Thank you received: 0
9 years 11 months ago #182329

OK

So I conducted a few more tests -

I understand the Config Product Parameters is the Master on / off for Add to Cart button - I see and have tested it -

When on ON the products listing page - every product gets an Add to Cart Button underneath the thumbnail on the initial products listing page.See attached -
And when I click on a product from this page - the Add to Cart Button is there next to the photo on the individual product page
And when I turn it off - from the config it goes completely away from the Product Listings page AND the individual Product page -

I get that - so we are good on that -

I have also tried to control this in the Display Menus - but things don't work out so easily - The settings on the Local level if you let me call it that - go very wonky -

If I leave the Global Config to OFF in Products Parameters - and then go to Local Level - I am getting all sorts of results -
14K Men's Diamonds even with no on global and no on local - I see add to cart button on some products and not on others -
If I have the Global on No for PL and then Local On No - and then go in and set to yes - it gets bumped to inherit when I save and then I can't change it to anything else? -

I thought I saw in the directions / manual that when the item was created - makes a difference?

Should I delete all the menus and start fresh? Or maybe I am confusing a step here -

Attached what I am trying to do

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 13201
  • Thank you received: 2322
9 years 7 months ago #196294

Hi,

Wow what a late reply...
So if I understand correctly your issue, disabling the "Add to cart" button from the menu settings just give a random result ?

Have you solved your issue ? Please try to use the latest version of HikaShop.
Isn't the issue coming from the fact that the menu is a category listing one, and it use an associated module, so you have to check the settings of this associated module ?

Please Log in or Create an account to join the conversation.

Time to create page: 0.084 seconds
Powered by Kunena Forum