Zen Cart Logo
Forums / All Other Contributions/Addons / Main Image Replacer (MIR) Contrib - Official Thread

Main Image Replacer (MIR) Contrib - Official Thread

Views: 7,641

Results 1 to 20 of 22
10 Jul 2008, 2:52 PM
#1
qhome avatar

qhome

Totally Zenned

Join Date:
Feb 2004
Posts:
1,702
Plugin Contributions:
5

Main Image Replacer (MIR) Contrib - Official Thread

Main Image Replacer is a simple override that will check your product description for an override command and will use the specified data/image to replace the main image. If there is no override, it will appear as normal.

DOWNLOAD AT: Main Image Replacer

It's easy to use:

  • Simply upload the file path to your server
  • Edit the product description (text-mode)
  • Add these tags <!--| |-->
  • Any data in between those tags will be used in place of the main image.

Supports HTML, Text, Flash, etc.

1 Aug 2008, 2:29 PM
#2
qhome avatar

qhome

Totally Zenned

Join Date:
Feb 2004
Posts:
1,702
Plugin Contributions:
5

Re: Main Image Replacer (MIR) Contrib - Official Thread

I've uploaded it to the downloads section as well. DOWNLOAD AT: Main Image Replacer

1 Aug 2008, 2:59 PM
#3
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Re: Main Image Replacer (MIR) Contrib - Official Thread

This is interesting...

If I put a URL to call an image from an external site, will it do that? EG:

<!--|http://www.anywebsite.com/images/product-image.jpg|-->
1 Aug 2008, 4:26 PM
#4
anafor avatar

anafor

New Zenner

Join Date:
Jul 2008
Location:
Ukraine, CK
Posts:
28
Plugin Contributions:
2

Re: Main Image Replacer (MIR) Contrib - Official Thread

Is it possible to add additional images as well?
It would be nice if yes)
P.S. It a great thing to make zencart more look "Web 2.0-friendly"! Thank you!

1 Aug 2008, 5:25 PM
#5
qhome avatar

qhome

Totally Zenned

Join Date:
Feb 2004
Posts:
1,702
Plugin Contributions:
5

Re: Main Image Replacer (MIR) Contrib - Official Thread

schoolboy:

This is interesting...

If I put a URL to call an image from an external site, will it do that? EG:

<!--|http://www.anywebsite.com/images/product-image.jpg|-->

That is exactly correct. Image, flash, iframe, anything.

anafor:

Is it possible to add additional images as well?
It would be nice if yes)
P.S. It a great thing to make zencart more look "Web 2.0-friendly"! Thank you!

Currently only works with the main image. Its not really Web2.0.. doesn't use Ajax or anything. It's really just php replacing the variable value with your custom value if it exists.

It is a fundamental of my TPP contrib and the concept could pretty much be used to replace anything via user defined tags from within the product description.

9 Aug 2008, 2:34 PM
#6
dontknowwhatimdoing avatar

dontknowwhatimdoing

Zen Follower

Join Date:
Aug 2008
Posts:
131
Plugin Contributions:
0

Re: Main Image Replacer (MIR) Contrib - Official Thread

This is a very simple mod, but may be a LIFESAVER for me if it works!

I have thousands of preview GIF images, and all my Large images are .JPEG...

I will probably be forced to use dummy .jpg main images, so I can link the correct JPEG large images...

Then I can just override the dummy jpg main image with the correct GIF... and VIOLA... I have a gif preview with a jpeg large image

I'll follow up here after I install this!

9 Aug 2008, 3:22 PM
#7
qhome avatar

qhome

Totally Zenned

Join Date:
Feb 2004
Posts:
1,702
Plugin Contributions:
5

Re: Main Image Replacer (MIR) Contrib - Official Thread

why not use a simple batch image converter and change them all to be the same? or better yet, change them all to png to keep transparency

9 Aug 2008, 3:30 PM
#8
dontknowwhatimdoing avatar

dontknowwhatimdoing

Zen Follower

Join Date:
Aug 2008
Posts:
131
Plugin Contributions:
0

Re: Main Image Replacer (MIR) Contrib - Official Thread

Thanks for the suggestion, but it's just not viable for me.

It would be massively inefficient for load time: the nature of the images is that the gif version uses less memory than a preview--i use a different kind of icon completely for preview/ main image. the primary view needs to be a .jpg, or it completely distorts the image & explodes memory usage.

I'm only new to zen cart, and so far, this is the biggest limitation I've found.

Important: ** I believe I put in the code correctly, but for some reason, your mod isn't functioning for me.**

I wonder what I've overlooked?

I can see the description code with the <!-- | mysite.com/images/image.gif |--> on my product listing page-- (but it's not inserting it into the image URL of the main image)

I don't see the code at all on the category/ preview page which has multiple product listings...

9 Aug 2008, 4:22 PM
#9
qhome avatar

qhome

Totally Zenned

Join Date:
Feb 2004
Posts:
1,702
Plugin Contributions:
5

Re: Main Image Replacer (MIR) Contrib - Official Thread

Hm, I think you are trying to do more than it does. This only works on the product page. The main image on the product page will be replaced by the code or text within the <!--| |--> brackets. You also need to use full html for images.

This is correct:

<!--|<img src="www.mysite.com/images/image.gif" alt="productname" />|-->

This is not:

<!-- | mysite.com/images/image.gif |-->

Do you have a link I can see?

9 Aug 2008, 9:40 PM
#10
dontknowwhatimdoing avatar

dontknowwhatimdoing

Zen Follower

Join Date:
Aug 2008
Posts:
131
Plugin Contributions:
0

Re: Main Image Replacer (MIR) Contrib - Official Thread

Sample Code

<!--bof Product description --> <div id="productDescription" class="productGeneral biggerText">Sample Listing<br /> Info about product <!--|<img src="http://mysite.com/images/widgets/sample-image.jpg" />|--></div> <!--eof Product description -->

Sorry, I messed up when I posted the example.

It's not linking to the image, maybe it's my template, zj_silver -- I put tpl_modules_main_product_image.php in the right place

Even If I get it Fixed, It wont Address My Issue :(
I guess I'm going to be forced to use .jpgs on the previews instead of gifs, since even if I get the mod working, it's only stuff on the product page I can change.

If you know a good free program to convert thousands of gif to jpg in an efficient way, let me know. Otherwise, I'm just going to use adobe & save the images for the web, one by one.

10 Aug 2008, 2:41 AM
#11
qhome avatar

qhome

Totally Zenned

Join Date:
Feb 2004
Posts:
1,702
Plugin Contributions:
5

Re: Main Image Replacer (MIR) Contrib - Official Thread

dontknowwhatimdoing:

If you know a good free program to convert thousands of gif to jpg in an efficient way, let me know. Otherwise, I'm just going to use adobe & save the images for the web, one by one.

LOL!
Just use Advanced Batch Converter. I swear by it. The trial version only does 50 at a time, but its pretty easy to keep hitting the convert button. You can resize, rename, change format all in one and its very intuitive.

10 Aug 2008, 2:48 AM
#12
dontknowwhatimdoing avatar

dontknowwhatimdoing

Zen Follower

Join Date:
Aug 2008
Posts:
131
Plugin Contributions:
0

Re: Main Image Replacer (MIR) Contrib - Official Thread

Thank you!!! I just downloaded it... I'm going to use it!

This will save SooOooooOOo much time lol.

Seriously, I'll accomplish more in life now :p

26 Feb 2009, 6:26 PM
#13
kevinp avatar

kevinp

New Zenner

Join Date:
Jul 2008
Posts:
23
Plugin Contributions:
0

Re: Main Image Replacer (MIR) Contrib - Official Thread

Is there an example of this in use? Sorry, from the description I don't quite get it :dontgetit

27 Feb 2009, 4:31 AM
#14
qhome avatar

qhome

Totally Zenned

Join Date:
Feb 2004
Posts:
1,702
Plugin Contributions:
5

Re: Main Image Replacer (MIR) Contrib - Official Thread

KevinP:

Is there an example of this in use? Sorry, from the description I don't quite get it :dontgetit

This lets you override the normal main image by including an override tag with an image link in the actual product description.

For example. Say you have 3 products. Usually you'd have an image for each product that you'd upload to go along with that product.
But maybe for product 3, you want to use a flash image, or link to an offsite image, or use a div block with text in it. You can include the replacer tags in your description, and in-between the tags, include the content (html) that you want to replace the normal main image with.

3 Mar 2009, 9:43 PM
#15
kevinp avatar

kevinp

New Zenner

Join Date:
Jul 2008
Posts:
23
Plugin Contributions:
0

Re: Main Image Replacer (MIR) Contrib - Official Thread

Thanks, qhome. OK, think I get it (I'm new at this.) If I'm reading the description correctly, I don't know that I'd see the difference in an example site, anyhow...

4 Mar 2009, 3:09 PM
#16
qhome avatar

qhome

Totally Zenned

Join Date:
Feb 2004
Posts:
1,702
Plugin Contributions:
5

Re: Main Image Replacer (MIR) Contrib - Official Thread

It was originally written for a guy who wanted to have a banner exchange system as his product image, so the banner would constantly change dynamically without him having to upload a new image all the time. I enhanced it to work with pretty much any html content. So you could have flash movies, text, etc in the spot where the image usually is.

23 Nov 2009, 10:38 PM
#17
ftdc avatar

ftdc

New Zenner

Join Date:
Oct 2009
Location:
Stockholm, Sweden
Posts:
16
Plugin Contributions:
0

Re: Main Image Replacer (MIR) Contrib - Official Thread

this looks interesting is there a chance to override the link to make a product link to any site you want that would be great!!!:shocking:

11 Mar 2010, 1:30 PM
#18
jokermode avatar

jokermode

New Zenner

Join Date:
Mar 2010
Posts:
26
Plugin Contributions:
0

Re: Main Image Replacer (MIR) Contrib - Official Thread

qhome:

Main Image Replacer is a simple override that will check your product description for an override command and will use the specified data/image to replace the main image. If there is no override, it will appear as normal.

It's easy to use:

  • Simply upload the file path to your server
  • Edit the product description (text-mode)
  • Add these tags <!--| |-->
  • Any data in between those tags will be used in place of the main image.

Supports HTML, Text, Flash, etc.
:frusty: :frusty: :frusty:
i'd done everything that needed ...but the main image have'nt changed

1 May 2011, 11:06 PM
#19
busyboardwalk avatar

busyboardwalk

New Zenner

Join Date:
Jul 2010
Posts:
6
Plugin Contributions:
0

Re: Main Image Replacer (MIR) Contrib - Official Thread

Has anyone gotten this to work? Is there a similar module available somewhere? My goal is to offer 360 views of certain products in my store. They are available via a link from my supplier's web site. Please help! :smile:

2 May 2011, 1:45 AM
#20
busyboardwalk avatar

busyboardwalk

New Zenner

Join Date:
Jul 2010
Posts:
6
Plugin Contributions:
0

Re: Main Image Replacer (MIR) Contrib - Official Thread

Ok, I was able to get this mod to work, but am having a couple of issues. Hopefully they can be worked out. ANY help would be greatly appreciated. :)

What I wanna do: I'm attempting to pull in images from an external site via specific links/URLs.

What's happening:

  1. When I add the text and tags to the description, it seems to only work for certain types of images. For instance, it doesn't work for the flash 360 images (ex link: http://www.website.com/img/products/flash360.ashx?pid=ADKEZ-120&cid=DVSS). But it works for the standard/static images (ex link: http://www.website.com/img/products/small.ashx?pid=ADKEZ-120&id=591). I really need to link to the flash images for these products. :(

  2. When it works for the standard/static images, it pulls them in, but I lose the functionality that allows a larger image to be displayed. The "view larger image" link is gone and the picture is just there. How can this be fixed?

Again, any help would be greatly appreciated!