Post by Johnathan » Tue Jul 20, 2010 3:08 am

It would be good to have the ability to remove a category, manufacturer, or main product image. Additional images for products are removable, but for other images if you want to remove them you have to edit the database. (This has been resolved as of 1.5.2)

Image
Image Image Image Image


User avatar
Global Moderator

Posts

Joined
Fri Dec 18, 2009 3:08 am


Post by Purebeads » Thu Jul 22, 2010 1:14 pm

I don't fully understand what you said.

Active Member

Posts

Joined
Fri Apr 30, 2010 12:07 pm

Post by Johnathan » Thu Jul 22, 2010 1:18 pm

Set an image for a category and save. Now try and get rid of the picture. It can't be done unless you edit the MySQL database.

Image
Image Image Image Image


User avatar
Global Moderator

Posts

Joined
Fri Dec 18, 2009 3:08 am


Post by Xsecrets » Thu Jul 22, 2010 1:50 pm

well you can use the image browser to actually delete the image from the server.

OpenCart commercial mods and development http://spotonsolutions.net
Layered Navigation
Shipment Tracking
Vehicle Year/Make/Model Filter


Guru Member

Posts

Joined
Sun Oct 25, 2009 3:51 am
Location - FL US

Post by Purebeads » Thu Jul 22, 2010 2:01 pm

I'm doing some experimenting now. I have some solutions. Just give me a sec.

Active Member

Posts

Joined
Fri Apr 30, 2010 12:07 pm

Post by Purebeads » Thu Jul 22, 2010 2:17 pm

The behavior of the program is rather strange. You can't delete the image, but you can replace it. But you can't replace it with the image of the gray camera because the gray camera is not in the Image Manager.

Another thing you can do is to go into the Image Manager via a product and delete the image in there. What will happen, however, is that NO image will then appear for that category -- the image of the gray camera will not be restored.

After deleting the image from the Image Manager, when I go back into that category in Admin, I see the gray camera (though as I said, the gray camera does not appear in the cart). The fact that the gray camera can be seen in the category page is good, because you can then click it and insert another picture.

Clearly, this is a bug or a shortcoming of the program, but since you can replace the image (even after deleting it), I don't see it as a big problem. The only true problem is if you want to restore the image of that gray camera.

Active Member

Posts

Joined
Fri Apr 30, 2010 12:07 pm

Post by Johnathan » Thu Jul 22, 2010 11:52 pm

Not to disagree with you both :) but...
Xsecrets wrote:well you can use the image browser to actually delete the image from the server.
That doesn't actually solve the problem: as Purebeads mentioned, that deletes the image, but not the reference. If you check the database you can see the image reference is still set for the category, which means the image will just be not found.

Purebeads, actually deleting the image reference and replacing the product image with the "no_image.jpg" gray camera aren't the same thing. Usually OpenCart displays the gray camera icon if an image is not set -- however, if there's already a reference there it won't even display anything because it can't find the image.

Additionally, if you use a conditional like "if there's an image then do something", that conditional will fail unless the reference is removed. So even if you managed to replace the image with the gray camera image, you'll still be displaying images that you don't want to.

As you've both mentioned, you can always replace the image with a different image. If you want to delete the image, though, there's no method to do that. What I think needs to be added is the ability to get rid of the reference, so that it will display the "no_image.jpg" image when there's not an image set.

Image
Image Image Image Image


User avatar
Global Moderator

Posts

Joined
Fri Dec 18, 2009 3:08 am


Post by Purebeads » Fri Jul 23, 2010 1:49 am

You can always create your own version of the gray camera and use that. It seems to me that as long as you have the ability to change images, deleting it altogether isn't that important.

Active Member

Posts

Joined
Fri Apr 30, 2010 12:07 pm

Post by Moggin » Fri Jul 23, 2010 2:27 am

Purebeads wrote:You can always create your own version of the gray camera and use that...
I just copied the existing grey-camera placeholder image into the main images file. If I need to swap out an image for a placeholder, there it is. I went for the quick fix! ( Since I'm no MySQL genius :))

Active Member

Posts

Joined
Wed May 05, 2010 4:56 am

Post by Purebeads » Fri Jul 23, 2010 2:40 am

So you were having this problem too, Moggin?

Turning the gray camera into an image file isn't that difficult. You do a print screen, pull the print screen into your photo-editing program, crop off the excess, and save it as a GIF or PNG file.

Oh, it just occurred to me that the gray camera image is probably in the OpenCart zip file.

Active Member

Posts

Joined
Fri Apr 30, 2010 12:07 pm

Post by Johnathan » Fri Jul 23, 2010 11:37 pm

Purebeads wrote:You can always create your own version of the gray camera and use that. It seems to me that as long as you have the ability to change images, deleting it altogether isn't that important.
It's not a cart-breaking bug, but it's one that I think should be fixed (and would probably be easy to fix).

Image
Image Image Image Image


User avatar
Global Moderator

Posts

Joined
Fri Dec 18, 2009 3:08 am


Post by BbWebConsult » Sat Jan 29, 2011 6:09 am

I've had the same problem. I had to edit manually in the DB
The ability to remove the main image should be implemented.

Diseño web Barcelona


User avatar
Newbie

Posts

Joined
Tue Jan 25, 2011 4:18 am


Post by afwollis » Sat Jan 29, 2011 4:06 pm

is it "need to be done in 1.5+" or "could someone make it for 1.4.9.1, etc" ?
I can provide some help with the second part :)

Русское коммьюнити разработчиков OpenCart - myopencart.ru

some useful mods:
[Released] Orders and Comments AT-A-GLANCE, [Released] Prof. Invoice and Packingslip, [Released] Recently viewed

My commercial modules: [W]ebme Compare Products, [W]ebme Bought With This


Active Member

Posts

Joined
Tue Jan 11, 2011 5:41 am
Location - Ukraine

Post by ifyouseek » Mon Jun 20, 2011 6:06 am

i find it strange that no fix has been made for this. i did have a vqmod in my 1.4.7 verison which allowed direct modification of the image filename but since upgrading i no longer have it.

I need to remove a lot of images from the main root categories to stop them displaying in the category discription in the new v1.5 and cannot do it without edited the dasebase manually

Active Member

Posts

Joined
Thu May 06, 2010 4:40 pm

Post by dreamdev » Thu Jun 23, 2011 7:49 pm

Bump BUMP!

This is something we need a hotfix for oh holy Open Cart devs <3 Me myself have no problem with this, if I were running the site myself - but some of the people Ive set up an opencart solution for, dont have the skill required to modify MySQL database.

Ofcourse, I can implement the GreyCamera picture into The Image Manager, but it shouldnt really be necessary. There should be a fix for this.

Newbie

Posts

Joined
Thu Jun 16, 2011 7:44 pm

Post by Johnathan » Thu Jun 23, 2011 10:11 pm

Johnathan wrote:Additionally, if you use a conditional like "if there's an image then do something", that conditional will fail unless the reference is removed. So even if you managed to replace the image with the gray camera image, you'll still be displaying images that you don't want to.
As I pointed out above, there's still problems with using the no_image.jpg image as a replacement. Hopefully Daniel will actually consider this a bug someday.

Image
Image Image Image Image


User avatar
Global Moderator

Posts

Joined
Fri Dec 18, 2009 3:08 am


Post by dreamdev » Fri Jun 24, 2011 2:09 pm

Hope so aswell! :-) Daniel is a great guy, and seeing as this is a pretty important problem - yet probably extremely easy to do.. I think this is coming soon. I tried abit yesterday, just adding a php file exist command to the .tpl - but it wouldnt work. I couldnt incorporate the $thumb variable into my script, also tried echoing out the $thumb.. nothing would appear - yet right beneath its being used in an <img>.. and it shows there.

This is really something I should be able to fix myself, I'll post the "temporary fix" if I get it done.

Newbie

Posts

Joined
Thu Jun 16, 2011 7:44 pm

Post by Johnathan » Fri Jun 24, 2011 10:31 pm

Yeah, it shouldn't be too hard. If you clear the value of the post variable for the image (with a button or link in the .tpl file), then it should post the empty value and write it to the database.

Image
Image Image Image Image


User avatar
Global Moderator

Posts

Joined
Fri Dec 18, 2009 3:08 am


Post by Pammi » Thu Sep 22, 2011 2:40 am

I'm using 1.5.1.1 and I see no way to delete a category image besides deleting the category itself. I see this is an old topic, open cart is new to me so just though I'd mention this issue once again in hopes there's a fix by now or coming soon.

Newbie

Posts

Joined
Thu Sep 22, 2011 1:02 am

Post by Johnathan » Fri Sep 23, 2011 12:53 am

The fix for category images (for 1.4.x and 1.5.x):

IN:

Code: Select all

/admin/view/template/catalog/category_form.tpl
AFTER:

Code: Select all

<img src="<?php echo $preview; ?>" alt="" id="preview" class="image" onclick="image_upload('image', 'preview');" />
ADD:

Code: Select all

<input type="button" value="Remove Image" onclick="$('#image').val(''); $('#preview').attr('src', '<?php echo HTTP_IMAGE; ?>no_image.jpg');" />
It should work similarly for the manufacturer and product forms.

Image
Image Image Image Image


User avatar
Global Moderator

Posts

Joined
Fri Dec 18, 2009 3:08 am

Who is online

Users browsing this forum: No registered users and 6 guests