Page 1 of 2

[vQmod] Image Filename

Posted: Mon Mar 07, 2011 9:07 am
by d7a7z7e7d
This extension will show the image path and filename on the Product, Category
and Manufacturer admin pages. This will allow you to bypass the Image Manager
when you already know the location and filename of the image.

Features:
  • Comes with vQmod file for plug and play installation!
  • Uses Ajax as you type to show you whether or not the file was found.
  • Automatically updates the image thumbnail if the file was found.
Download Image Filename Extension for FREE Now!
image-filename-thumb.png

image-filename-thumb.png (5.79 KiB) Viewed 10636 times


Re: [vQmod] Image Filename

Posted: Wed Mar 09, 2011 8:42 pm
by pafmax
Great timesaving mod!

But please, please, make it available for the additional image tab. Adding several images for the same product is a pain and usually you tend to number the images for the product: copy/paste, edit number, continue is much faster than waiting for the image browser, seek the file buried in a folder, click, wait and repeat… ;)

Re: [vQmod] Image Filename

Posted: Thu Mar 10, 2011 2:02 am
by d7a7z7e7d
I just released 1.0.1 that adds support for additional images.

Re: [vQmod] Image Filename

Posted: Sat Mar 12, 2011 2:02 am
by pafmax
Thanks! Great job!

Re: [vQmod] Image Filename

Posted: Wed Mar 23, 2011 10:39 am
by cdn_hopeful
Is it just me or is the downloaded file without an extension?

http://www.opencart.com/index.php?route ... d_id=26359

Re: [vQmod] Image Filename

Posted: Wed Mar 23, 2011 11:23 am
by d7a7z7e7d
Ive been hearing this... Try renaming to .zip

Re: [vQmod] Image Filename

Posted: Thu Mar 24, 2011 10:40 am
by cdn_hopeful
Problem Solved.

Renaming to Zip does the trick. I tried renaming it to .xml at first, that didn't go over too well.

Re: [vQmod] Image Filename

Posted: Tue Aug 09, 2011 6:37 pm
by pafmax
Hi d7a7z7e7d,

Can you please update this mod to work on OC 1.5.1? I tried editing like this as commented in your extension page:

Code: Select all

Line 49: <search position="replace" offset="4"><![CDATA[<tbody id="image-row<?php echo $image_row; ?>">]]></search>
Line 51: <tbody id="image-row<?php echo $image_row; ?>">
Line 59: <search position="replace" offset="4"><![CDATA[html = '<tbody id="image-row' + image_row + '">';]]></search>
Line 61: html = '<tbody id="image-row' + image_row + '">';
But keep getting:

Code: Select all

<b>Notice</b>: Undefined index:  file in <b>/htdocs/[mysite]/vqmod/vqcache/vq-admin_view_template_catalog_product_form.tpl</b> on line <b>603</b>
On the image path, and it breaks everything afer a save.

Thanks! :)

Re: [vQmod] Image Filename

Posted: Fri Aug 26, 2011 1:18 am
by Xciso
Will this work with 1.5.1.1?

Re: [vQmod] Image Filename

Posted: Sat Sep 10, 2011 1:26 pm
by OnNets
Xciso wrote:Will this work with 1.5.1.1?
yeah! any update for 1.5.1.1?

Re: [vQmod] Image Filename

Posted: Tue Sep 20, 2011 6:19 am
by anti91
it's not compatible 1.5.1.1

Re: [vQmod] Image Filename

Posted: Sun Sep 25, 2011 9:45 pm
by terrier
I have updated to support OC1.5.x onwards

http://www.opencart.com/index.php?route ... on_id=3377

All Credits still belongs to d7a7z7e7d

I just update to compatible with OC1.5.x!

Enjoy~

Re: [vQmod] Image Filename

Posted: Sat Nov 12, 2011 2:36 am
by Melon
Not working on 1.5.1.3 ?

Re: [vQmod] Image Filename

Posted: Sat Nov 12, 2011 2:52 am
by Melon
http://www.opencart.com/index.php?route ... on_id=3377

Use that file ^^

To make work in 1.5.1.3 change all "preview" to "thumb".

Hope that helps!

Re: [vQmod] Image Filename

Posted: Thu Dec 22, 2011 3:15 am
by Ampeter
Melon wrote:http://www.opencart.com/index.php?route ... on_id=3377

Use that file ^^

To make work in 1.5.1.3 change all "preview" to "thumb".

Hope that helps!
You also have to replace this:

Code: Select all

				$this->load->library('json');
				
				$this->response->setOutput(Json::encode($json));
with this:

Code: Select all

$this->response->setOutput(json_encode($json));	
So that it tells you if the file was found or not... it wont update the thumbnail (I'm totally clueless when it comes to ajax...there seems to be a problem getting the src but I don't know how to fix it) but it'll work when you press save.

Re: [vQmod] Image Filename

Posted: Mon Sep 10, 2012 9:50 pm
by FFCalberto
Ampeter wrote:
Melon wrote:

Code: Select all

$this->response->setOutput(json_encode($json));	

Can you kindly note all steps (from the default .xml) to get it compatible with 1.5.3.1?
I’ve tried different combination but no one working properly & get back “no_image.jpg”..
i've find/replace

dataType: 'json' >> dataType: 'html'
preview >> thumb

everywhere in the original .xml,
reuploaded but still when i select "additional images"
it doesn't save the path..
(and return no_image.jpg)...
From HTML <... src ...> is empty!

Even tried to replace your last pice of code you wrote but nothing.. =/

Help please

Re: [vQmod] Image Filename

Posted: Mon Sep 10, 2012 10:06 pm
by Ampeter
Get this file (it's NOT the same as the original file in the first post!):

http://www.opencart.com/index.php?route ... on_id=3377

Replace all instances of "preview" with "thumb".

Replace:

Code: Select all

            $this->load->library('json');
            
            $this->response->setOutput(Json::encode($json));

with:

Code: Select all

$this->response->setOutput(json_encode($json));  
And it should work for 1.5.3.1 at least. The thumbnail wont be auto-replaced (you would need to edit the ajax function and I'm afraid that's beyond my abilities) but when you press save the correct image location will be saved.

Hope that helps :)

Re: [vQmod] Image Filename

Posted: Mon Sep 10, 2012 10:19 pm
by FFCalberto
Ampeter wrote:Get this file (it's NOT the same as the original file in the first post!):

http://www.opencart.com/index.php?route ... on_id=3377

Hope that helps :)
I went there before, anyway i've just re-done all steps from the beginning but still not working under 1.5.3.1 (maybe other vqmod extensions are in conflict? :o )

I add images writing the path data/name.jpg , save (without even move onto other tabs of the product)
but then i come back and i see

"no_image.jpg"

Anyway thanks Ampeter for this HIGH speed answer ;)

WAIT: Replace all instances of "preview" with "thumb".
i've replaced ALL (like ALL where was written preview, even $, IDs and other) that was ok right?

WAIT2:
The image inside
Product->Data works correctly inserting the path

instead the
Product->Images (that's mainly what i'll be use this module for)

is not working properly, after saving & re-entering it says "no_image.jpg"
And front end there are just empty boxes..
=/

maybe my remove_category_image.xml Vqmod extension conflict? (even if i think is not this the problem..)

[thanks in advance ;) ]

Re: [vQmod] Image Filename

Posted: Thu Sep 13, 2012 5:02 pm
by FFCalberto
Could anyone who have modify it for 1.5.3.1 gently contact me?
-(i did the modification i said in the previous post)

Inside #tab-image (inside Admin->Catalog->Product->Image)

i insert the correct image path name, save, BUT then it doesn't catch the file and write "no-image.jpg" ???

Any idea?
Thanks

Re: [vQmod] Image Filename

Posted: Thu Sep 13, 2012 9:03 pm
by FFCalberto
that's what i've noticed (and probabily the reason because the "image path" works only on Product->Data image and NOT in Product->Image (tab-image)

1)inside Image_Filenamev1.0.3.xml (already modify [search&replace] as instructions written above)

Code: Select all

<file name="admin/view/template/catalog/product_form.tpl">
		<operation>
			<search position="before"><![CDATA[function image_upload(field, thumb) {]]></search>
			<add><![CDATA[   ..........
2)inside admin/view/template/catalog/product_form.tpl

2a)inside TAG <div id="tab-data"> and this works

Code: Select all

<a onclick="image_upload('image', 'thumb');"><?php echo $text_browse; ?></a>&nbsp;&nbsp;|&nbsp;&nbsp;<a onclick="$('#thumb').attr('src', '<?php echo $no_image; ?>'); $('#image').attr('value', '');"><?php echo $text_clear; ?></a>

2b)inside <div id="tab-image"> and this does NOT work

Code: Select all

 <a onclick="image_upload('image<?php echo $image_row; ?>', 'thumb<?php echo $image_row; ?>');"><?php echo $text_browse; ?></a>&nbsp;&nbsp;|&nbsp;&nbsp;<a onclick="$('#thumb<?php echo $image_row; ?>').attr('src', '<?php echo $no_image; ?>'); $('#image<?php echo $image_row; ?>').attr('value', '');"><?php echo $text_clear; ?></a>

Seems like at point (1) Image_Filenamev1.0.3.xml doesn't "catch" by searching
function image_upload(field, thumb)
on the (2) point..

So how shoud i modify the .xml to do its job also inside the "tab-image"?
eg: something like <![CDATA[function image_upload(field *> with reg expr?


Hope you can give me an answer with this more detailed reply..