Jump to content

Need to delete multiple images at once


Recommended Posts

  • 1 year later...
  • 5 months later...
  • 2 months later...
  • 1 month later...

This is rather annoying, yes. Several of my products uses at least 2-3 images for user understanding. Having to remove them bit by bit because "OH YOU SHOULDN'T HAVE MORE THAN ONE IMAGE" isn't an answer, it's an insult of how I run things.

Checkbox and mass delete or the option of not copying images when duplicating a product please. It worked just fine in 1.6, so the implementation can't be that bad.

Link to comment
Share on other sites

  • 4 weeks later...

I would appretiate solution for this too! Spent hours searching for some module but really nothing available at the moment! 
I have several products with more than 10 pictures and sorting it out with select-delete-confirm one by one is REALLY confusing...☹️

 

Link to comment
Share on other sites

  • 7 months later...
  • 2 weeks later...

Still on the wishlist: mass deletion of more than 2 (or 3) images per product. 
A legacy problem from moving, migrating and updating Prestashop versions, resulted in many copies of the same image per product. With 6000 products it's a pain to remove them by hand on every single product.

0001.jpg

Edited by pandorrah (see edit history)
Link to comment
Share on other sites

  • 1 month later...
  • 1 year later...
  • 1 year later...
On 12/31/2018 at 5:35 PM, Mostafa.J said:

at leaaaaaaast they have to give us the option to skip confirming deleting after each process to nt double the time wasting !  -.-

Yeah I agree, this should be included as default in settings - an option to disable confirmation modal.

Well for now I made this javascript for presta 1.7.8.7 that overrides this confirmation routine and so you can just click "delete" button and poof image is gone instantly.

You can load it in your browser's developer console or use as a userscript.

formImagesProduct.delete = function(id) {
	const dropZoneElem = $('#product-images-dropzone');
	const formZoneElem = $('#product-images-form-container');

	$.ajax({
		url: dropZoneElem.find(`.dz-preview[data-id="${id}"]`).attr('url-delete'),
		complete() {
			formZoneElem.find('.close').click();
			const wasCover = !!dropZoneElem.find(`.dz-preview[data-id="${id}"] .iscover`).length;
			dropZoneElem.find(`.dz-preview[data-id="${id}"]`).remove();
			$(`.images .product-combination-image [value=${id}]`).parent().remove();
			imagesProduct.checkDropzoneMode();
			if (wasCover === true) {
				// The controller will choose the oldest image as the new cover.
				imagesProduct.updateDisplayCover(imagesProduct.getOlderImageId());
			}
		},
	});
	dropZoneElem.removeClass('d-none d-md-block');
	dropZoneElem.css('height', '');
	formZoneElem.find('#product-images-form').html('');
	formZoneElem.hide();
	dropZoneElem.find('.dz-preview.active').removeClass('active');
}

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...