Also the order of tabs could be changed to put images after data and be renamed like this:
General
Data
Images
Options
Discounts
Specials
Modules for OpenCart 2.3.0.2
Homepage Module [Free - since OpenCart 0.7.7]
Multistore Extensions
Store Manager Multi-Vendor/Multi-Store management tool
If you're not living on the edge ... you're taking up too much space!
I don't think my comments on this issue would be appreciated, but here they are anyway.montanaflynn wrote:Thanks fido, but I am looking for opencart to make these changes in later releases. If you have any comments or suggestions they would be appreciated.
Currently, the only way to remove images is to do it via FTP. The "Image Manager" I pointed you to, allows you to do it from the OpenCart admin. It is available for versions 1.3.2 and 1.3.4. Maybe you should ask your client if they want to wait for the next release when Daniel may or may not include some means of managing images.
Modules for OpenCart 2.3.0.2
Homepage Module [Free - since OpenCart 0.7.7]
Multistore Extensions
Store Manager Multi-Vendor/Multi-Store management tool
If you're not living on the edge ... you're taking up too much space!
Why not, it is up to people to buy anything if they need it and you provide something usefull so why not point towards it.fido-x wrote:I don't think my comments on this issue would be appreciated, but here they are anyway.montanaflynn wrote:Thanks fido, but I am looking for opencart to make these changes in later releases. If you have any comments or suggestions they would be appreciated.
You are not the only one

Norman in 't Veldt
Moderator OpenCart Forums
_________________ READ and Search BEFORE POSTING _________________
Our FREE search: Find your answer FAST!.
[How to] BTW + Verzend + betaal setup.
I'm actually looking into this now, my initial idea was to create a dbase-routine to remove the image from the dbase when the button is clicked.Qphoria wrote:I second this... a nice small x next to the image to remove would be good. or use the do not enter sign that the option remove button uses
But now that I'm thinking about it, all it needs to do is go back to the original state :
- empty hidden field
- default preview because hidden field is empty
My javascript just isn't good enough to solve this (I don't know any javascript for that matter

This is what I have so far:
behind the image preview I added:
Code: Select all
<span class="remove" onclick="image_remove('image', 'preview');"> </span>
Code: Select all
<script type="text/javascript"><!--
function image_remove(field, preview) {
$('#' + field).replaceWith('');
$('#' + preview).replaceWith('<img src="<?php echo $no_image; ?>" alt="" id="' + preview + '" class="image" onclick="image_upload(\'' + field + '\', \'' + preview + '\');" />');
};
//--></script>
Now the page still works

It's actually pretty straight forward ... the value of the field "image" needs to be replaced by nothing and the preview relaced by <img src="<?php echo $no_image; ?>" alt="" id="' + preview + '" class="image" onclick="image_upload(\'' + field + '\', \'' + preview + '\');" />
anyone here to finalize this?
Opencart specialist | Our website | Our modules

haha
so, here it is, how to add the button:
next to your preview image (or whereever you want the remove button) add:
Code: Select all
<span class="remove" onclick="image_remove('image', 'preview');"> </span>
Code: Select all
<script type="text/javascript"><!--
function image_remove(field, preview) {
document.getElementById(field).value = '';
$('#' + preview).replaceWith('<img src="<?php echo $no_image; ?>" alt="" id="' + preview + '" class="image" onclick="image_upload(\'' + field + '\', \'' + preview + '\');" />');
};
//--></script>
Code: Select all
$this->data['no_image'] = $this->model_tool_image->resize('no_image.jpg', 100, 100);
Opencart specialist | Our website | Our modules
Users browsing this forum: No registered users and 4 guests