I'm having trouble with controlling where the zoomed image displays. In Firefox, it is displaying at the top of the page above my header. See http://archaeo-logical.com for a demo. Why is this happening?
Jake
Printable View
I'm having trouble with controlling where the zoomed image displays. In Firefox, it is displaying at the top of the page above my header. See http://archaeo-logical.com for a demo. Why is this happening?
Jake
Looking at the html source code on your listings, there is no zooming script on any product thumbnail. Do you even have IH2 enabled?
I commented out the lines
// if (strstr($this->src, $ihConf['large']['suffix'])) {
// $this->sizetype = 'large';
// } elseif (strstr($this->src, $ihConf['medium']['suffix'])) {
// $this->sizetype = 'medium';
// } elseif ((intval($this->width) == intval($ihConf['small']['width'])) && (intval($this->height) == intval($ihConf['small']['height']))) {
// $this->sizetype = 'small';
// } else
// $this->sizetype = 'generic';
}
and it seems to work now... Do you think there will be any complications later on for this???
Hi thanks for your reply, i deleted all images in the medium and large folders but this makes no difference.
I have been uploading an image via add new product in addmin or i have also tried tools>image handler2 add new image. Both produce dead links on the med and large image sizes on the website. when i get properties of the dead link image, it points at http://kivalin.com/shop/images/medium/e68c_1_b_MED.JPG
If zen cart 1.3.7 doesn't use the med and large image folders why is the image link pointing to it? I noticed a couple of others have had this same problem. Any ideas anyone?
Cedar, I think your first problem is that when you deleted all of your images, you didn't clear the bmz_cache, did you? Second, after you leleted all of your images, you FIRST tried to add the images back by adding them to the product, itself....that's a no-no with IH. And, it will point to _MED and _LRG folders, IF you want more than one image per product, because you have to upload a medium and a large image for this to happen.
If you just want one image per product, you need to first, clear IH bmz_cache, found in the IH admin section, then upload one image (it has to be a large image, say 500x500, WITHOUT the _LRG) suffix to IH default image field. Then, after that, sizes are controlled by the settings in Admin>configuration>images.
The bottom 2 fields, ARE for the _MED and _LRG images, but that's ONLY if you want more than one image per product.
Ya, listen to get em fast. The issue is you're misunderstanding the way IH2 works. Only only only upload ONE large image. Name it imagename.jpg, with NO suffix whatsoever. Do not upload a medium image, do not upload a small. Go ahead and delete your entire medium and small folders, they are not needed anymore.
Yea, but if they ever decide to use more than one image, then they WILL need those folders. When you upload any _MED or _LRG images to display a different hover image, and yet another pop-up image, then IH needs to put those images in the Medium and Large folders, to be able to call them. So, I wouldn't delete the folders, just the present images in them.
It pains me to see all this mass confusion and the same questions being posted over and over again. Enough already!!
I wrote this, read it, and then read it again.
Allow me to contribute yet another explanation of the basic concept of WHAT IH2 does in layman's terms.
---------------------------------------------------------------------------------------
Yes, the browser can resize an image simply by providing the width and height parameters that you wish to display.
However, if you do it that way, the entire image file still has to make it to the browser, so that the browser can alter the image.
You do realize how large the image files are?
If you have a screen full of thumbnails to display, using this methodology will tax a surfer's patience.
Clearly, the download of large image files to fill a screen of thumbnails is not a good idea.
Another draw back to browser resizing is the plain fact that the browser is not in the business of image editing.
The browser will resize the image without any regard for image quality.
Definitely a bad thing, unless you don't want to the customer to get a good look at what you're selling.
Therefore, it stands to reason that we don't want to rely on the browser to resize our images. Agreed!
The Generic ZenCart Scenario (without IH2)
The generic version of ZenCart provides a facility for us to upload and store PRE-sized images. That is to say, images that we have
sized, in advanced, into thumbnails, medium size, and large size images.
We name these files, so that we can determine which is which, as follows:
And, so that the system can find them we store them in separate folders as follows:
- THUMBNAIL==> imageA.jpg
- MEDIUM ==> imageA_MED.jpg
- LARGE ==> imageA_LRG.jpg
../ZenCart / IMAGES / imageA.jpg../ZenCart / IMAGES / MEDIUM / imageA_MED.jpg../ZenCart / IMAGES / LARGE / imageA_LRG.jpgWhen you enter a new product, and you indicate an image file, that image file name is stored in the database as the primary image.
Zencart will look for that image in the main image folder called:
../ZenCart / IMAGES /.
I'm going to be honest, there is no way to make this any clearer.
Having to pre-resize three diferent images and maintain them in three separate folder is a colossal pain the rump.:yuck:
Enter the IH2 contribution to ZenCart courtesy of Tim Kroeger. :clap:
The IH2 ZenCart Scenario
With IH2, the whole idea of you having to PRE-size images has been deprecated, eradicated, erased, removed, and taken away.
Furthermore, the need to store product images in the MEDIUM and LARGE image folders has also been deprecated, eradicated, erased, removed, and taken away.
Read that again.
So what happens?
Using your favorite image editing software in the comfort of your computer, you create a single image of the product. It needs to be the largest size that you want to display on the screen. I chose 300x500 pixels, you can have a bigger size or a smaller a size, it's up to you. But remember the rule, smaller files load faster. It is beyond the scope of this posting, but a good idea to become familiar with image editing pitfalls.
Where do you put the images?
In the main image folder ONLY. Nowhere else, or they won't be found. IH2 is not going to look in the old folders! Put all your images in the main image folder: ../ZenCart / IMAGES / imageA.jpg
IH2 will look at the settings you placed in ADMIN > CONFIGURATION > IMAGES and use those settings to automatically create the other sized images
The very first time an image is required, IH2 will resize your large image into a thumbnail or medium image, and store it in the bmz_cache.
What's the bmz_cache?
I don't know if you noticed, but Tim Kroeger authored the IH2 contribution, and he operates a website called www.breakmyzencart.com.
It's a safe bet to say that bmz stands for "break my zencart".
Nonetheless, it is a cache of sub-folders where IH2 stores the presized images it automatically created the first time, so that it does not have to resize them again.
The image handler always checks the cache prior to resizing the image.
This is important! Try to remember.
Thumbnails and medium sized images are taken from the bmz_cache. So? If you modified the large image in the main image folder or you change the size parameters of the thumbnail and/or medium images, it will have no effect on the images already in the bmz_cache. Because they already exist in the bmz_cache, they will not be recreated. You have to remoooooove them from the bmz_cache to force IH2 to regenerate them.
How do I clear the bmz_cache?
In theory, you should go to ADMIN > TOOLS > IMAGE HANDLER2 and click. There is a link there called "Clear image cache". This link should clear the cache.
I usually use Filezilla to delete all of the subfolders in the bmz_cache. You, of course, can choose for yourself, which approach works best.
Additional Images?
Pay attention, this is not rocket science. We've been using imageA.jpg as an example. Let's say that imageA.jpg is the only image you have for the product, and you want to display additonal images. Great idea!!
Name the additional image imageA_anything.jpg and store it in the same folder with the rest of images. You can replace anything with anything you want.
I promise you, if you do what I just said, ZenCart will correlate all the images that have the same value to the left of the underscore. And, for those of you who don't know it yet, Lightbox will also find these additional images.
You can call them like this example:
store them all in the main image folder, and they will all be considered images of the same product. But remember, there is only one main image and that's the one stored inthe database when you created the product in ADMIN > CATEGORIES > PRODUCTS.
- imageA.jpg
- imageA_01.jpg
- imageA_02.jpg
- imageA_red.jpg
- imageA_wackadoo.jpg
Summary
Read this posting more than once. It was meant to be a simple clarification of concept, not a technical thesis on image editing. There is additional doumentation on Tim's website at www.breakmysencart.com/ihdoc.
If you appreciate his efforts, the poor guy's a perpetual student, send him some money before he starves to death. I'm sure he'll appreciate it.
Help! Just uploaded the files and now I can't get to the admin login!
Warning: main(/kunden/homepages/22/d180071874/htdocs/bulldogpaintball/includes/extra_configures/bmz_image_handler_conf.php) [function.main]: failed to open stream: No such file or directory in /homepages/22/d180071874/htdocs/bulldogpaintball/admin/includes/extra_configures/bmz_image_handler_conf.php on line 12
Fatal error: main() [function.require]: Failed opening required '/kunden/homepages/22/d180071874/htdocs/bulldogpaintball/includes/extra_configures/bmz_image_handler_conf.php' (include_path='.:/usr/local/lib/php') in /homepages/22/d180071874/htdocs/bulldogpaintball/admin/includes/extra_configures/bmz_image_handler_conf.php on line 12
Can anyone tell me what to do to fix this? Thanks.