-
Image Handler 5 (for v1.5.5 - v1.5.8) Support Thread
Welcome to the new support thread for Image Handler 5, v5.00.
I don't have a download link yet, but will post back once this version of the plugin has been uploaded to the Zen Cart plugins. Anyone wanting to try the v5.0.0-beta4 version can download that zip-file from the plugin's GitHub repository.
Image Handler 5 will be submitted as a new add-on with a new name to minimize confusion so this new clean support thread could be started. The bugs/issues reported in the old support thread have been addressed in this new version, and the readme has been revamped to provide more information upfront to those who use this plugin which will (hopefully) address some of the usual install and configuration questions.
This version of Image Handler removes all core-file changes required by previous IH versions, requiring only two (2) template-override file updates. Those updates are both comprised of added "notifiers", allowing Image Handler and associated large-image display plugins (like Fual Slimbox and ColorBox) interoperation.
The previous support threads can be found here:
All support related questions for Image Handler 5 for v1.5.5 should be posted on THIS support thread.
- The Image Handler 4 Support thread will continue to serve as the support thread for Image Handler 4 for v1.5.x (for ZC v1.5.0 through 1.5.4).
- The Image Handler 3 Support thread will continue to serve as the support thread for Image Handler 3 for v1.3.x (for ZC v1.3.9).
- The Image Handler 2 Support thread will continue to serve as the support thread for those who are using Image Handler 2 for v1.3.x (ZC v1.3.8).
Any IH2, IH3 or IH4 questions posted here will be (gently or not so gently) re-directed back to the appropriate support thread ... and vice versa.
-
Re: Image Handler 5 (for v1.5.5) Support Thread
Hi there,
Thanks for this update. I am upgraded from v4 on 1.55e zencart, so perhaps it is upgrade related. Everything else seems okay. I get a blank page for adding a second image, and the following in error log:-
[17-Oct-2017 18:26:35 UTC] PHP Fatal error: Uncaught Error: Call to undefined function find_additional_images() in /home/****/public_html/****/includes/ih_manager.php:119
Stack trace:
#0 /home/*****/public_html/****/image_handler.php(53): require()
#1 {main}
thrown in /home/****/public_html/****/includes/ih_manager.php on line 119[/QUOTE]
But I am using the beta and latest version, so perhaps this is not an issue in pending download version. I did overwrite of files and tried finding that function with developer tool kit. Everything else seems okay, am using colorbox if it makes any difference and it installed perfectly.
-
Re: Image Handler 5 (for v1.5.5) Support Thread
Oopsie! Thanks for the report.
You can correct the issue by changing lines 119-120 to the following:
Code:
$ih_manager->findAdditionalImages($array, DIR_FS_CATALOG . DIR_WS_IMAGES . $data['imgBaseDir'],
$data['imgExtension'], $data['imgBase'] );
-
Re: Image Handler 5 (for v1.5.5) Support Thread
Thats okay - hope you are well btw.
I tried the edit and also latest repository, but it is still the same at the moment. But it could be upgrade issue or remnants from IH 4.
-
Re: Image Handler 5 (for v1.5.5) Support Thread
Quote:
Originally Posted by
HeathenMagic
Thats okay - hope you are well btw.
I tried the edit and also latest repository, but it is still the same at the moment. But it could be upgrade issue or remnants from IH 4.
All's good here! Would you do a search, using your admin's Tools->Developers Tool Kit, to see where find_additional_images is being used in the admin-level PHP files?
-
Re: Image Handler 5 (for v1.5.5) Support Thread
I have the following result:-
Quote:
/home/****/public_html/includes/ih_manager.php
Line #118 : find_additional_images($array, DIR_FS_CATALOG . DIR_WS_IMAGES . $data['imgBaseDir'],
Which I didn't see before so it seems to have the function mentioned okay. I am able to delete and add new photos etc, and testing everything else seems okay.
-
Re: Image Handler 5 (for v1.5.5) Support Thread
Quote:
Originally Posted by
HeathenMagic
I have the following result:-
Which I didn't see before so it seems to have the function mentioned okay. I am able to delete and add new photos etc, and testing everything else seems okay.
Right, you need to change /admin/ih_manager.php on those lines, changing find_additional_images to $ih_manager->findAdditionalImages. That should correct the debug-log generated.
-
Re: Image Handler 5 (for v1.5.5) Support Thread
Quote:
Originally Posted by
lat9
Right, you need to change /admin/ih_manager.php on those lines, changing find_additional_images to $ih_manager->findAdditionalImages. That should correct the debug-log generated.
Hi lat9. Great work that you & the ZC team are doing! My sincere thanks for your time & effort helping those of us (like me) with only enough coding experience to be dangerous :bigups:.
I've been experiencing a similar problem to HeathMagic tho my error log shows findAdditionalImages instead of find_additional_images:
Quote:
[21-Oct-2017 17:10:09 Australia/Brisbane] PHP Fatal error: Call to a member function findAdditionalImages() on null in C:\wamp64\www\MY_ADMIN\includes\ih_manager.php on line 119
[21-Oct-2017 17:10:09 Australia/Brisbane] PHP Stack trace:
[21-Oct-2017 17:10:09 Australia/Brisbane] PHP 1. {main}() C:\wamp64\www\MY_ADMIN\image_handler.php:0
[21-Oct-2017 17:10:09 Australia/Brisbane] PHP 2. require() C:\wamp64\www\MY_ADMIN\image_handler.php:53
Nothing showed up in my search for instances of find_additional_images as you suggested in post #5. I searched for any instances of findAdditionalImages and the only instance of this without $ih_manager-> was at Line # 26 of C:\wamp64\www\MY_ADMIN/includes/classes/ImageHandlerAdmin.php. I tried altering this, but when it caused the whole IH5 admin to fail to appear and a bug report stated and unexpected '$ih_manager', I reverted back to the original file.
Any ideas?
My system:
- zen-cart-v1.5.5e running on WAMP with SSL installed
- Template: a clone of responsive_sheffield_blue_2.0 with all the code changes I've been able to find to make it consistent with ZC1.5.5
- A range of plugins:ckeditor-for-zencart_v3.7, Direct Bank Deposit V1.5.revised, one_page_checkout-1.4.0, aupost.2.2.1, backup_mysql_plugin_v5c
- originally had IH4 installed (downloaded from Github 4 Oct) but had to uninstall it as I think it was the culprit messing up my drop-down menus
Thanks in advance.
Thanks again
-
Re: Image Handler 5 (for v1.5.5) Support Thread
Quote:
Originally Posted by
GerriM
Hi lat9. Great work that you & the ZC team are doing! My sincere thanks for your time & effort helping those of us (like me) with only enough coding experience to be dangerous :bigups:.
I've been experiencing a similar problem to HeathMagic tho my error log shows
findAdditionalImages instead of [B]find_additional_images:
Nothing showed up in my search for instances of
find_additional_images as you suggested in post #5
. I searched for any instances of
findAdditionalImages and the only instance of this without
$ih_manager-> was at Line # 26 of
C:\wamp64\www\MY_ADMIN/includes/classes/ImageHandlerAdmin.php. I tried altering this, but when it caused the whole IH5 admin to fail to appear and a bug report stated and unexpected '$ih_manager', I reverted back to the original file.
Any ideas?
My system:
- zen-cart-v1.5.5e running on WAMP with SSL installed
- Template: a clone of responsive_sheffield_blue_2.0 with all the code changes I've been able to find to make it consistent with ZC1.5.5
- A range of plugins:ckeditor-for-zencart_v3.7, Direct Bank Deposit V1.5.revised, one_page_checkout-1.4.0, aupost.2.2.1, backup_mysql_plugin_v5c
- originally had IH4 installed (downloaded from Github 4 Oct) but had to uninstall it as I think it was the culprit messing up my drop-down menus
Thanks in advance.
Thanks again
My bad, the correction should have been changing find_additional_images to $ih_admin->findAdditionalImages.
P.S. I'll get that change updated on GitHub, too. Thanks for the report.
-
Re: Image Handler 5 (for v1.5.5) Support Thread
Thanks, that worked, I can confirm additional images are uploaded :-)
-
Re: Image Handler 5 (for v1.5.5) Support Thread
Quote:
Originally Posted by
HeathenMagic
Thanks, that worked, I can confirm additional images are uploaded :-)
Thanks, again, for the report ... and the follow-up that I got it right this time!:blush:
-
Re: Image Handler 5 (for v1.5.5) Support Thread
Thanks lat9: the additional images uploaded in IH5 Admin for me also.
However a different error log was generated in my case (seems related to my zen_colourbox.php file) and on the product page, only one product image showed up and the product description disappeared:
Quote:
[22-Oct-2017 06:38:20 Australia/Brisbane] Request URI: /index.php?main_page=product_info&cPath=66&products_id=180, IP address: ::1
#1 ColorBoxObserver::update() called at [C:\wamp64\www\includes\classes\observers\ColorBoxObserver.php:41]
#2 ColorBoxObserver->update() called at [C:\wamp64\www\includes\classes\class.base.php:103]
#3 base->notify() called at [C:\wamp64\www\includes\modules\MY_TEMPLATE\additional_images.php:165]
#4 require(C:\wamp64\www\includes\modules\MY_TEMPLATE\additional_images.php) called at [C:\wamp64\www\includes\templates\template_default\templates\tpl_modules_addition al_images.php:13]
#5 require(C:\wamp64\www\includes\templates\template_default\templates\tpl_modules_ additional_images.php) called at [C:\wamp64\www\includes\templates\MY_TEMPLATE\templates\tpl_product_info_display. php:84]
#6 require(C:\wamp64\www\includes\templates\MY_TEMPLATE\templates\tpl_product_info_ display.php) called at [C:\wamp64\www\includes\modules\pages\product_info\main_template_vars.php:178]
#7 require(C:\wamp64\www\includes\modules\pages\product_info\main_template_vars.php ) called at [C:\wamp64\www\includes\templates\MY_TEMPLATE\common\tpl_main_page.php:251]
#8 require(C:\wamp64\www\includes\templates\MY_TEMPLATE\common\tpl_main_page.php) called at [C:\wamp64\www\index.php:97]
[22-Oct-2017 06:38:20 Australia/Brisbane] PHP Warning: require(includes/modules/zen_colorbox.php): failed to open stream: No such file or directory in C:\wamp64\www\includes\classes\observers\ColorBoxObserver.php on line 41
[22-Oct-2017 06:38:20 Australia/Brisbane] PHP Stack trace:
[22-Oct-2017 06:38:20 Australia/Brisbane] PHP 1. {main}() C:\wamp64\www\index.php:0
[22-Oct-2017 06:38:20 Australia/Brisbane] PHP 2. require() C:\wamp64\www\index.php:97
[22-Oct-2017 06:38:20 Australia/Brisbane] PHP 3. require() C:\wamp64\www\includes\templates\MY_TEMPLATE\common\tpl_main_page.php:251
[22-Oct-2017 06:38:20 Australia/Brisbane] PHP 4. require() C:\wamp64\www\includes\modules\pages\product_info\main_template_vars.php:178
[22-Oct-2017 06:38:20 Australia/Brisbane] PHP 5. require() C:\wamp64\www\includes\templates\MY_TEMPLATE\templates\tpl_product_info_display. php:84
[22-Oct-2017 06:38:20 Australia/Brisbane] PHP 6. require() C:\wamp64\www\includes\templates\template_default\templates\tpl_modules_addition al_images.php:13
[22-Oct-2017 06:38:20 Australia/Brisbane] PHP 7. base->notify() C:\wamp64\www\includes\modules\MY_TEMPLATE\additional_images.php:165
[22-Oct-2017 06:38:20 Australia/Brisbane] PHP 8. ColorBoxObserver->update() C:\wamp64\www\includes\classes\class.base.php:103
[22-Oct-2017 06:38:20 Australia/Brisbane] PHP Fatal error: require(): Failed opening required 'includes/modules/zen_colorbox.php' (include_path='.;C:\php\pear') in C:\wamp64\www\includes\classes\observers\ColorBoxObserver.php on line 41
[22-Oct-2017 06:38:20 Australia/Brisbane] PHP Stack trace:
[22-Oct-2017 06:38:20 Australia/Brisbane] PHP 1. {main}() C:\wamp64\www\index.php:0
[22-Oct-2017 06:38:20 Australia/Brisbane] PHP 2. require() C:\wamp64\www\index.php:97
[22-Oct-2017 06:38:20 Australia/Brisbane] PHP 3. require() C:\wamp64\www\includes\templates\MY_TEMPLATE\common\tpl_main_page.php:251
[22-Oct-2017 06:38:20 Australia/Brisbane] PHP 4. require() C:\wamp64\www\includes\modules\pages\product_info\main_template_vars.php:178
[22-Oct-2017 06:38:20 Australia/Brisbane] PHP 5. require() C:\wamp64\www\includes\templates\MY_TEMPLATE\templates\tpl_product_info_display. php:84
[22-Oct-2017 06:38:20 Australia/Brisbane] PHP 6. require() C:\wamp64\www\includes\templates\template_default\templates\tpl_modules_addition al_images.php:13
[22-Oct-2017 06:38:20 Australia/Brisbane] PHP 7. base->notify() C:\wamp64\www\includes\modules\MY_TEMPLATE\additional_images.php:165
[22-Oct-2017 06:38:20 Australia/Brisbane] PHP 8. ColorBoxObserver->update() C:\wamp64\www\includes\classes\class.base.php:103
Getting there :smile:. Thanks
-
Re: Image Handler 5 (for v1.5.5) Support Thread
@GerriM, thanks for the report. I'll get that change in the works.
-
Re: Image Handler 5 (for v1.5.5) Support Thread
Quote:
Originally Posted by
lat9
@GerriM, thanks for the report. I'll get that change in the works.
Here's the preview, I'll be updating GitHub shortly. Change /includes/classes/observers/ColorBoxObserver.php, adding the bits highlighted:
Code:
<?php
// -----
// An observer-class to enable the "Colorbox" plugin to operate with the notification updates in the
// main_product_image and additional_images processing, provided by "Image Handler" v5.0.0 and later.
//
// Copyright (c) 2017 Vinos de Frutas Tropicales
//
class ColorBoxObserver extends base
{
public function __construct()
{
if (defined('ZEN_COLORBOX_STATUS') && ZEN_COLORBOX_STATUS == 'true') {
$this->attach(
$this,
array(
//- From /includes/modules/additional_images.php
'NOTIFY_MODULES_ADDITIONAL_IMAGES_SCRIPT_LINK',
)
);
}
}
public function update(&$class, $eventID, $p1, &$p2, &$p3, &$p4, &$p5, &$p6, &$p7, &$p8, &$p9)
{
switch ($eventID) {
// -----
// This notifier gives notice that an additional image's script link is requested. A monitoring observer sets
// the $p2 value to boolean true if it has provided an alternate form of that link; otherwise, the base code will
// create that value.
//
// $p1 ... (r/o) ... An associative array, containing the 'flag_display_large', 'products_name', 'products_image_large', 'large_link' and 'thumb_slashes' values.
// $p2 ... (r/w) ... A reference to the $script_link value, set initially to boolean false; if an observer modifies that value, the
// the default module's processing is bypassed.
//
case 'NOTIFY_MODULES_ADDITIONAL_IMAGES_SCRIPT_LINK':
$flag_display_large = $p1['flag_display_large'];
$products_name = $p1['products_name'];
$products_image_large = $p1['products_image_large'];
$thumb_slashes = $p1['thumb_slashes'];
$large_link = $p1['large_link'];
require DIR_WS_MODULES . zen_get_module_directory('zen_colorbox.php');
if (isset($script_link)) {
$p2 = $script_link;
}
break;
default:
break;
}
}
}
-
Re: Image Handler 5 (for v1.5.5) Support Thread
I've got v5.0.0-beta5 packaged up (https://github.com/DivaVocals/zen_Im...g/v5.0.0-beta5) for additional pre-testing. This includes the corrections for the issues reported by @HeathenMagic and @GerriM as well as the changes provided by @Design75 to re-instate the search function.
-
Re: Image Handler 5 (for v1.5.5) Support Thread
Quote:
Originally Posted by
lat9
I've got v5.0.0-beta5 packaged up (
https://github.com/DivaVocals/zen_Im...g/v5.0.0-beta5) for additional pre-testing. This includes the corrections for the issues reported by @HeathenMagic and @GerriM as well as the changes provided by @Design75 to re-instate the search function.
Thanks, Lat9. I'll let you know how it goes...and apologies if there's a few days delay.
-
Re: Image Handler 5 (for v1.5.5) Support Thread
Quote:
Originally Posted by
lat9
Well done, Lat9! I've tested my system, and you solved the issue I had. Thank you.
My delayed in testing/replying was because I detected another problem not long after posting #12 and was busy uninstalling/reinstalling plugins to try and find out if that was being caused by IH5 or another plugin. It may be both since, although I can't pinpoint exactly when this issue started occurring, I can confirm OPC was working OK while IH4 was loaded. Please let me know if I should, instead post this on the OPC support thread
This issue occurs during the One Page Checkout Confirm Button: During a customer sale, on the Select Shipping/Payment and Confirm Your Order page, when I click the Confirm Order / Review Order button (which depends on Payment Methods Requiring Confirmation setting), the button changes from black to blue but doesn’t cause transfer to the final checkout page. No error log is generated and I can return to shopping but checkout won't progress to completion.
The OPC and IH4 support threads refer to an incompatibility issue which I believe was addressed in IH5 (tho the error symptoms weren't identical). In any case, I tried a few things with no luck:
1. uninstall OPC 1.4.0 and installed OPC 1.4.1
2. tried processing orders without OPC turned on: the orders were processed completely - no error
3. uninstalled IH5Beta4 and installed IH5Beta5. OPC Confirm Order button still didn’t work.
4. turned on the OPC debug. This generated two files. I’ve attached the one citing multiple Notices.
Can you help, please? Thanks.
-
Re: Image Handler 5 (for v1.5.5) Support Thread
Quote:
Originally Posted by
lat9
Well done, Lat9! The Beta5 version solved the issue I had. Thank you.
My delayed in testing/replying was because I detected another problem not long after posting #12 and was busy uninstalling/reinstalling plugins to try and find out if that was being caused by IH5 or another plugin. I think it’s both because, while I can't pinpoint exactly when this issue started occurring, I can confirm I was successfully using OPC while IH4 was loaded.…
A problem occurs during the One-Page Checkout: At the Select Shipping/Payment and Confirm Your Order page, when I click the Confirm Order / Review Order button (which depends on Payment Methods Requiring Confirmation setting), the button changes from black to blue but doesn’t cause transfer to the final checkout page. No error log is generated and I can return to shopping but checkout won't progress to completion.
The OPC and IH4 support threads refer to an incompatibility issue between these which I believe was addressed in IH5 (tho the error symptoms weren't identical). In any case, I tried a few things with no luck:
1. uninstall OPC 1.4.0 and installed OPC 1.4.1
2. tried processing orders without OPC turned on: orders were processed completely - no error
3. uninstalled IH5Beta4 and installed IH5Beta5. OPC’s Confirm Order button still didn’t work.
4. turned on the OPC debug. This generated two files. I’ve attached the one citing multiple Notices.
Can you help, please? Thanks.
Attachment 17373
-
Re: Image Handler 5 (for v1.5.5) Support Thread
@GerriM, I just installed OPC v1.4.1 along with IH5-beta4 on a vanilla ZC1.5.5e and checked out with no issue so the problem that you're having is not an OPC/IH interoperation issue.
You can continue any discussion regarding the OPC issue over in that plugin's support thread.
-
Re: Image Handler 5 (for v1.5.5) Support Thread
Thanks for that info, lat9. At least I know now it's not IH5.
-
Re: Image Handler 5 (for v1.5.5) Support Thread
Image Handler 5, v5.0.0, has been submitted to the Zen Cart plugins for review. When approved, it can be downloaded from https://www.zen-cart.com/downloads.php?do=file&id=2169. I'll update this thread when the plugin's download is available.
-
Re: Image Handler 5 (for v1.5.5) Support Thread
Quote:
Originally Posted by
lat9
IH5 is now available for download from the Zen Cart plugins!
-
Re: Image Handler 5 (for v1.5.5) Support Thread
Update from IH4 is not clear in the instructions. We run the IH4 uninstall, then we upload IH5 files, refresh admin. That seems to only get us two of the settings in the configuration>images. To fully install I need to go into the database and remove the version number row and refresh the admin and then we get a full install. Seems that the IH4 uninstall doesn't remove the version number, so IH5 install only runs and upgrade... Are we supposed to not run the IH4 uninstall first?
-
Re: Image Handler 5 (for v1.5.5) Support Thread
Quote:
Originally Posted by
barco57
Update from IH4 is not clear in the instructions. We run the IH4 uninstall, then we upload IH5 files, refresh admin. That seems to only get us two of the settings in the configuration>images. To fully install I need to go into the database and remove the version number row and refresh the admin and then we get a full install. Seems that the IH4 uninstall doesn't remove the version number, so IH5 install only runs and upgrade... Are we supposed to not run the IH4 uninstall first?
I'll need to re-test, now that you've brought it up, but I'm pretty sure that IH5 updates directly from IH4 ... no uninstall required.
-
Re: Image Handler 5 (for v1.5.5) Support Thread
Love this Plug in. Might I be so bold as to suggest a change to how you Determin the folder under bmz_cache that you put the item into. As you suggest I place my picture into subfolders of the main folder for my products. Unfortuatly I name my items starting with the 2 digit year and as I have many individual items using the current method if I donot use the "Hashed" method they all go into the same folder. I beleive that the following would place them into the same folder under bmz_cache as they are in my images section. The sugested change needs to be made to include\functions\extra_functions\functions_bmz_io.php
PHP Code:
function getCacheName($data, $ext='')
{
if (IH_CACHE_NAMING == 'Hashed') {
$md5 = (IH_CACHE_NAMING == 'Hashed') ? md5($data) : $data;
$file = $GLOBALS['bmzConf']['cachedir'] . '/' . $md5{0} . '/' . $md5 . $ext;
}
else {
$md5 = $data;
$filepos = strpos($md5,"-");
$filepos = ($filepos===false) ? 1 : $filepos ;
$file = $GLOBALS['bmzConf']['cachedir'] . '/' .substr($md5,0,$filepos). '/' . $md5 . $ext;
}
io_makeFileDir($file);
return $file;
}
I will understand if you do not want to make the change. In the mean time I will continue to used hashed to keep the images under control.
-
Re: Image Handler 5 (for v1.5.5) Support Thread
@brittainmark, I've noted your request in IH5's GitHub repository: https://github.com/DivaVocals/zen_Im...dler/issues/72 ... otherwise, I'll forget!
-
Re: Image Handler 5 (for v1.5.5) Support Thread
I'm in process up updating from zc 1.5.5e to 1.5.5f. Using Responsive Sheffield Blue 2.0. In 1.5.5e I was using older Colorbox that was part of RSB template, and IH4. All worked. As part of updating to 1.5.5f I want to update those two mods. I stripped out both completely and removed any residual tables in the db the were left behind after uninstall.
I then added Zen Colorbox 2, most recent download. Now I'm in process of adding IH5. One snag I've hit - in includes/modules/Your Template/additional_images there is a piece if Colorbox modification to the file at the same location that IH5 modifies the same file. I note that the file included in the Colorbox 2 set has IH4 modifications in it as well so I presume I would merge in favour of the IH5 file, but don't know where (of if) to place the bit of Colorbox 2 code.
First sample below is from the Colorbox file and the lower is from the IH5 file.
Thanks for any help.
Code:
// Link Preparation:
// bof Zen Colorbox 2012-04-30 niestudio
if(function_exists('zen_colorbox')){
include 'zen_colorbox.php';
} else {
$script_link = '<script type="text/javascript"><!--' . "\n" . 'document.write(\'' . ($flag_display_large ? '<a href="javascript:popupWindow(\\\'' . str_replace($products_image_large, urlencode(addslashes($products_image_large)), $large_link) . '\\\')">' . $thumb_slashes . '<br />' . TEXT_CLICK_TO_ENLARGE . '</a>' : $thumb_slashes) . '\');' . "\n" . '//--></script>';
}
// eof Zen Colorbox 2012-04-30 niestudio
Code:
// Link Preparation:
//-bof-image_handler-lat9 *** 4 of 4 ***
// -----
// This notifier gives notice that an additional image's script link is requested. A monitoring observer sets
// the $p2 value to boolean true if it has provided an alternate form of that link; otherwise, the base code will
// create that value.
//
// $p1 ... (r/o) ... An associative array, containing the 'flag_display_large', 'products_name', 'products_image_large' and 'thumb_slashes' values.
// $p2 ... (r/w) ... A reference to the $script_link value, set here to boolean false; if an observer modifies that value, the
// this module's processing is bypassed.
//
$script_link = false;
$zco_notifier->notify(
'NOTIFY_MODULES_ADDITIONAL_IMAGES_SCRIPT_LINK',
array(
'flag_display_large' => $flag_display_large,
'products_name' => $products_name,
'products_image_large' => $products_image_large,
'thumb_slashes' => $thumb_slashes
),
$script_link
);
if ($script_link === false) {
$script_link = '<script type="text/javascript"><!--' . "\n" . 'document.write(\'' . ($flag_display_large ? '<a href="javascript:popupWindow(\\\'' . str_replace($products_image_large, urlencode(addslashes($products_image_large)), $large_link) . '\\\')">' . $thumb_slashes . '<br />' . TEXT_CLICK_TO_ENLARGE . '</a>' : $thumb_slashes) . '\');' . "\n" . '//--></script>';
}
//-eof-image_handler-lat9 *** 4 of 4 ***
-
Re: Image Handler 5 (for v1.5.5) Support Thread
Quote:
Originally Posted by
soxophoneplayer
I'm in process up updating from zc 1.5.5e to 1.5.5f. Using Responsive Sheffield Blue 2.0. In 1.5.5e I was using older Colorbox that was part of RSB template, and IH4. All worked. As part of updating to 1.5.5f I want to update those two mods. I stripped out both completely and removed any residual tables in the db the were left behind after uninstall.
I then added Zen Colorbox 2, most recent download. Now I'm in process of adding IH5. One snag I've hit - in includes/modules/Your Template/additional_images there is a piece if Colorbox modification to the file at the same location that IH5 modifies the same file. I note that the file included in the Colorbox 2 set has IH4 modifications in it as well so I presume I would merge in favour of the IH5 file, but don't know where (of if) to place the bit of Colorbox 2 code.
First sample below is from the Colorbox file and the lower is from the IH5 file.
Thanks for any help.
Code:
// Link Preparation:
// bof Zen Colorbox 2012-04-30 niestudio
if(function_exists('zen_colorbox')){
include 'zen_colorbox.php';
} else {
$script_link = '<script type="text/javascript"><!--' . "\n" . 'document.write(\'' . ($flag_display_large ? '<a href="javascript:popupWindow(\\\'' . str_replace($products_image_large, urlencode(addslashes($products_image_large)), $large_link) . '\\\')">' . $thumb_slashes . '<br />' . TEXT_CLICK_TO_ENLARGE . '</a>' : $thumb_slashes) . '\');' . "\n" . '//--></script>';
}
// eof Zen Colorbox 2012-04-30 niestudio
Code:
// Link Preparation:
//-bof-image_handler-lat9 *** 4 of 4 ***
// -----
// This notifier gives notice that an additional image's script link is requested. A monitoring observer sets
// the $p2 value to boolean true if it has provided an alternate form of that link; otherwise, the base code will
// create that value.
//
// $p1 ... (r/o) ... An associative array, containing the 'flag_display_large', 'products_name', 'products_image_large' and 'thumb_slashes' values.
// $p2 ... (r/w) ... A reference to the $script_link value, set here to boolean false; if an observer modifies that value, the
// this module's processing is bypassed.
//
$script_link = false;
$zco_notifier->notify(
'NOTIFY_MODULES_ADDITIONAL_IMAGES_SCRIPT_LINK',
array(
'flag_display_large' => $flag_display_large,
'products_name' => $products_name,
'products_image_large' => $products_image_large,
'thumb_slashes' => $thumb_slashes
),
$script_link
);
if ($script_link === false) {
$script_link = '<script type="text/javascript"><!--' . "\n" . 'document.write(\'' . ($flag_display_large ? '<a href="javascript:popupWindow(\\\'' . str_replace($products_image_large, urlencode(addslashes($products_image_large)), $large_link) . '\\\')">' . $thumb_slashes . '<br />' . TEXT_CLICK_TO_ENLARGE . '</a>' : $thumb_slashes) . '\');' . "\n" . '//--></script>';
}
//-eof-image_handler-lat9 *** 4 of 4 ***
Unless something has drastically changed in the ColorBox plugin, you should use the version of the file distributed by IH5. That will cause the ColorBox observer-class also distributed by IH5 to take control at the appropriate spot.
-
Re: Image Handler 5 (for v1.5.5) Support Thread
Quote:
Originally Posted by
lat9
Unless something has drastically changed in the ColorBox plugin, you should use the version of the file distributed by IH5. That will cause the ColorBox observer-class also distributed by IH5 to take control at the appropriate spot.
Done and done. Thankyou.
FYI - I did have same issue as in post #23 above, and used same fix.
-
Re: Image Handler 5 (for v1.5.5) Support Thread
Quote:
Originally Posted by
soxophoneplayer
Done and done. Thankyou.
FYI - I did have same issue as in post #23 above, and used same fix.
Thanks for the follow-up; I'll see what's going on in that upgrade scenario, too.
-
Re: Image Handler 5 (for v1.5.5) Support Thread
Hi
This is a general question:
Is there a simple way to get the IH image ?
Asking this, because I doing a autocomplete search box and if possible, it would be best to use already resized images.
I'm following the admin image_handler page, but I guess that's for comparing , etc...
Thanks
-
Re: Image Handler 5 (for v1.5.5) Support Thread
Quote:
Originally Posted by
mesnitu
Hi
This is a general question:
Is there a simple way to get the IH image ?
Asking this, because I doing a autocomplete search box and if possible, it would be best to use already resized images.
I'm following the admin image_handler page, but I guess that's for comparing , etc...
Thanks
Is this for a storefront or admin search box?
-
Re: Image Handler 5 (for v1.5.5) Support Thread
In this case Store front
thanks
-
Re: Image Handler 5 (for v1.5.5) Support Thread
That one's easy, then! When you call the zen_image() function and have IH loaded and enabled, that function (in turn) calls the IH function to handle that image. Net/net, that's the way to get a resized/cached version of the image.
-
Re: Image Handler 5 (for v1.5.5) Support Thread
Thanks
So I guess the other one it's difficult,... and that's the one I need. I didn't explain myself. The autocomplete is for the store front, but ,(still testing) I'm creating a json file in the admin area, so it's there that I need to get the IH (small) image path.
-
Re: Image Handler 5 (for v1.5.5) Support Thread
Quote:
Originally Posted by
mesnitu
Thanks
So I guess the other one it's difficult,... and that's the one I need. I didn't explain myself. The autocomplete is for the store front, but ,(still testing) I'm creating a json file in the admin area, so it's there that I need to get the IH (small) image path.
The admin-side is a bit more complicated, since that version of the zen_image function doesn't look for/use the IH-supplied re-formatting. Which type of Cache File-Naming Convention are you using?
-
Re: Image Handler 5 (for v1.5.5) Support Thread
Quote:
Originally Posted by
lat9
Which type of Cache File-Naming Convention are you using?
That's a IH5 feature right ? I'm still using IH4, but I intend to move to IH5, but I didn't had the time yet.
Perhaps I shod upgrade first and ask later ... is this stable now ?
-
Re: Image Handler 5 (for v1.5.5) Support Thread
Quote:
Originally Posted by
mesnitu
That's a IH5 feature right ? I'm still using IH4, but I intend to move to IH5, but I didn't had the time yet.
Perhaps I shod upgrade first and ask later ... is this stable now ?
The GitHub repository is in a bit of flux, but the released version is stable. Since you're using IH4, you're using the hashed version of the cache file naming.
I'd recently looked this up for a client, so here's the process, assuming that you're using the IH-4/5 default settings.
- Take the products_image definition from the products table in the database, let's call this $products_image.
- Prepend that value with the images' directory: $image_source = DIR_WS_IMAGES . $products_image;
- Append that value with the default settings: $image_source .= ('85' . '255:255:255' . 'Center');
- Create an md5-hash of that value: $cache_filename = md5($image_source);
That $cache_filename now contains the filename portion associated with the cached image. Images are stored in the /bmz_cache/$cache_filename[0]/$cache_filename.image.$dimensions.$extension, where $dimensions = $width . 'x' . $height (of the image) and $extension is the image-file's base extension.
That description's probably a bit muddy; just post back if you have additional questions.
-
Re: Image Handler 5 (for v1.5.5) Support Thread
Thank you! I'll be looking if I can do this.
It would be a nice addition to IH.
Recently I made some changes how to handle images with ep4bookx ( import addition to deal with bookx product type using EP4).
And basically, it allows to rename, resize, download books images or authors images from a temp folder, to the destination folders.
I had to search for some script to use GD, since I didn't manage to use IH. ( maybe my fault).
Another thing that I'm planing to do, is to create export newsletter to MailChimp ( html format).
And it would be nice to use IH.
What I'm trying to say, is that IH could be a "library" to image handling, globally.
But, I do understand the amount of work and that somebody has to pay the bills.
Thanks
-
Re: Image Handler 5 (for v1.5.5) Support Thread
Quote:
Originally Posted by
mesnitu
Thank you! I'll be looking if I can do this.
It would be a nice addition to IH.
Recently I made some changes how to handle images with ep4bookx ( import addition to deal with bookx product type using EP4).
And basically, it allows to rename, resize, download books images or authors images from a temp folder, to the destination folders.
I had to search for some script to use GD, since I didn't manage to use IH. ( maybe my fault).
Another thing that I'm planing to do, is to create export newsletter to MailChimp ( html format).
And it would be nice to use IH.
What I'm trying to say, is that IH could be a "library" to image handling, globally.
But, I do understand the amount of work and that somebody has to pay the bills.
Thanks
Umm... Do you need just the filename or do you need the html <img> tag that provides the image? (or even from that to pull the filename?) If you use the zen_image function to return the generated value, then you will receive the html tag that should contain all that is necessary to display the image. If it is the directory path only needed then the string can be parsed from the content (src parameter), if it is an image tag, then it is the entire returned value from the function.
-
Re: Image Handler 5 (for v1.5.5) Support Thread
Quote:
Originally Posted by
mc12345678
Umm... Do you need just the filename or do you need the html <img> tag that provides the image? (or even from that to pull the filename?) If you use the zen_image function to return the generated value, then you will receive the html tag that should contain all that is necessary to display the image. If it is the directory path only needed then the string can be parsed from the content (src parameter), if it is an image tag, then it is the entire returned value from the function.
I guess one could achieve this in the front store, and the images paths would be easy to get. And maybe I'll do that, still testing. I thought that using a json file, the searches would be faster. It's all very beautiful when testing with 50 books. But with the inteire catalog, that's when man's get separated from boys. A lot of jquery knowledge is needed, etc, etc.... And I'm a boy :)
Anyway, I leave my suggestion open, to use IH as a tool that could be use by other modules, etc.
Thanks
-
Re: Image Handler 5 (for v1.5.5) Support Thread
New install of ZenCart 1.5.5f - installed IH 4.3.2.
Decided to change to IH 5.5.0.
Uninstalled 4.3.2 and installed 5.5.0.
No 'Turn on IH' in Admin>Configuration>Images - just a reference to version number..
As per post #23 above, deleted the IH version row in the database..
Now have 'IH resize images' (set to 'yes') and the expected IH options..
But:
No IH icons appear in Admin Category/Product area (next to 'copy', 'move'..) and IH functionality only possible from Admin>Tools>Image Handler5
Is this a 'feature' or is there something I missed?
-
Re: Image Handler 5 (for v1.5.5) Support Thread
Quote:
Originally Posted by
MrSensible
New install of ZenCart 1.5.5f - installed IH 4.3.2.
Decided to change to IH 5.5.0.
Uninstalled 4.3.2 and installed 5.5.0.
No 'Turn on IH' in Admin>Configuration>Images - just a reference to version number..
As per post #23 above, deleted the IH version row in the database..
Now have 'IH resize images' (set to 'yes') and the expected IH options..
But:
No IH icons appear in Admin Category/Product area (next to 'copy', 'move'..) and IH functionality only possible from Admin>Tools>Image Handler5
Is this a 'feature' or is there something I missed?
I've got that re-install issue corrected for the next version of IH5. If you're not seeing that image-handler icon on the categories/products listing, then something is "wrong".
Zen Cart 1.5.5f includes in its base "detection" of image-handler and IH5 expects that base operation to be present. Since you installed/uninstalled IH 4.3.2, it's possible that that uninstall script restored an older version of /admin/includes/modules/category_product_listing.php.
-
Re: Image Handler 5 (for v1.5.5) Support Thread
For some reason my template not showing additional images; here is my template code:
PHP Code:
require(DIR_WS_MODULES . zen_get_module_directory('additional_images.php'));
?>
<?php
if ($flag_show_product_info_additional_images != 0 && $num_images > 0) {
/*if($prodinfo_image_effects==2){
unset($list_box_contents[0][0]);
$list_box_contents[0] = array_values($list_box_contents[0]);
}*/
for($row=0;$row<sizeof($list_box_contents);$row++)
{
$params = "";
//if (isset($list_box_contents[$row]['params'])) $params .= ' ' . $list_box_contents[$row]['params'];
for($col=0;$col<sizeof($list_box_contents[$row]);$col++)
{
$r_params = "";
if (isset($list_box_contents[$row][$col]['params'])) $r_params .= ' ' . (string)$list_box_contents[$row][$col]['params'];
if (isset($list_box_contents[$row][$col]['text']['thumb']))
{
echo '<li' . $r_params . '>' . $list_box_contents[$row][$col]['text']['thumb'] . '</li>';
}
}
}
}
?>
-
Re: Image Handler 5 (for v1.5.5) Support Thread
I traced it down to this in includes/modules/additional_images.php this is the code that seems to be the problem:
PHP Code:
$num_images = count($images_array);
$list_box_contents = array();
$title = '';
if ($num_images > 0) {
If I leave it like this:
PHP Code:
$temp_num_images=sizeof($images_array);
$num_images = sizeof($images_array);
$list_box_contents = '';
$title = '';
if ($num_images) {
it displays the additional images any clue why>?
-
Re: Image Handler 5 (for v1.5.5) Support Thread
I figured it out I had one line that had sizeof($images_array)
-
Re: Image Handler 5 (for v1.5.5) Support Thread
I had the same issue as per post #23 and #42 above. Had to delete the IH Version number from the database and that refreshed the install.
Warning for anyone else watch out for this as that got me too:
Quote:
Since you installed/uninstalled IH 4.3.2, it's possible that that uninstall script restored an older version of /admin/includes/modules/category_product_listing.php
Now on to the problem I can't solve. All is OK when I click on a category and it lists the products. IH pop-up works there. If I click to view a product though I get a white screen from just below the breadcrumbs and in the error log I have:
Quote:
PHP Fatal error: Call to undefined function zen_lightbox() in includes/classes/observers/FualSlimboxObserver.php on line 44
Line 44:
PHP Code:
$image_link = zen_lightbox($products_image_large, $products_name, LARGE_IMAGE_WIDTH, LARGE_IMAGE_HEIGHT);
Through testing I have ascertained that this code breaks things:
/includes/modules/MYTEMPLATE/additional_images.php
PHP Code:
//-bof-image_handler-lat9 *** 4 of 4 ***
// -----
// This notifier gives notice that an additional image's script link is requested. A monitoring observer sets
// the $p2 value to boolean true if it has provided an alternate form of that link; otherwise, the base code will
// create that value.
//
// $p1 ... (r/o) ... An associative array, containing the 'flag_display_large', 'products_name', 'products_image_large' and 'thumb_slashes' values.
// $p2 ... (r/w) ... A reference to the $script_link value, set here to boolean false; if an observer modifies that value, the
// this module's processing is bypassed.
//
$script_link = false;
$zco_notifier->notify(
'NOTIFY_MODULES_ADDITIONAL_IMAGES_SCRIPT_LINK',
array(
'flag_display_large' => $flag_display_large,
'products_name' => $products_name,
'products_image_large' => $products_image_large,
'thumb_slashes' => $thumb_slashes
),
$script_link
);
if ($script_link === false) {
$script_link = '<script type="text/javascript"><!--' . "\n" . 'document.write(\'' . ($flag_display_large ? '<a href="javascript:popupWindow(\\\'' . str_replace($products_image_large, urlencode(addslashes($products_image_large)), $large_link) . '\\\')">' . $thumb_slashes . '<br />' . TEXT_CLICK_TO_ENLARGE . '</a>' : $thumb_slashes) . '\');' . "\n" . '//--></script>';
}
//-eof-image_handler-lat9 *** 4 of 4 ***
I used to have Zen Lightbox installed but I'm working on an upgrade to V1.5.5f and I started with a stock install so there will be no remnants of Lightbox left. I have also run the uninstall sql to remove references from my database.
Running PHP Version 5.5.38 and MySQL 5.5.58. If that could be playing a part? Upgrading my store so I can go to PHP 7.
The site is not open to the outside world yet but I can enable it if needs be. Before I do that does any one have any ideas?
Brent
PS there are slight differences with /includes/modules/MYTEMPLATE/additional_images.php and the stock file. These don't appear to be intentional but wasn't sure. For example line 86:
PHP Code:
if (count($images_array) > 0) {
vs
PHP Code:
if (sizeof($images_array)) {
line 97:
PHP Code:
$num_images = count($images_array);
vs
PHP Code:
$num_images = sizeof($images_array);
line 101:
PHP Code:
if ($num_images > 0) {
vs
PHP Code:
if ($num_images) {
-
Re: Image Handler 5 (for v1.5.5) Support Thread
Somewhere, remaining in your configuration is one of two settings, either ZEN_LIGHTBOX_STATUS (set to 'true') or FUAL_SLIMBOX (set to 'true').
You can use your admin's Tools->Developer's Tool Kit to search (using the Look-up CONSTANT or language defines section) to search and change those settings to 'false'. That will get you going, then you need to run the SQL uninstall script for Zen Lightbox or Fual Slimbox (whichever was installed) and/or use your site's phpMyAdmin to locate and delete those configuration settings.
-
Re: Image Handler 5 (for v1.5.5) Support Thread
Thanks for getting back to me and giving me a few pointers!
I did do a search using the tool kit and includes/classes/observers/FualSlimboxObserver.php was the only place I found ZEN_LIGHTBOX or FUAL_SLIMBOX.
I also ran the uninstall sql for Zen Lightbox twice just to be sure my database was clean.
What I didn't do was search my database for config settings left behind. I have just taken a peak in a backup and there are indeed some settings left over so I'll clear them out.
I now understand what is going wrong. All obvious once you see the light :blush:
Brent
-
Re: Image Handler 5 (for v1.5.5) Support Thread
Brent, I'll also "stiffen-up" that observer processing so that the presence of that function is also required (as well as the partial uninstall of the older IH versions).
Thanks to you for the report.
-
1 Attachment(s)
Re: Image Handler 5 (for v1.5.5) Support Thread
My pleasure. Thanks to you I'm pleased to confirm all is now working. :clap: It also highlighted the fact I had a lot of other junk in the database left over from uninstall scripts that only partially worked.
When you are next looking at the mod can you check:
Quote:
/includes/modules/MYTEMPLATE/additional_images.php
Should the changes in the stock file be pulled across? I posted the snippets above but see my screen shot which is easier to view.
Attachment 17733
Brent
-
Re: Image Handler 5 (for v1.5.5) Support Thread
Both code-bits provide the same function; the ones in IH5 are currently more "recent" and specific than those in your "stock" file.
-
Re: Image Handler 5 (for v1.5.5) Support Thread
Thank you. Your code it is then.
I did tried both versions and they both seemed to work but I like to sort things like this out as if ignored they have a habit of coming back to bite you years later.
-
Re: Image Handler 5 (for v1.5.5) Support Thread
Quote:
Originally Posted by
Brent
Thank you. Your code it is then.
I did tried both versions and they both seemed to work but I like to sort things like this out as if ignored they have a habit of coming back to bite you years later.
Amen to that! Due diligence is a good thing.
-
Re: Image Handler 5 (for v1.5.5) Support Thread
Count or sizeof:
Quote:
I did tried both versions and they both seemed to work
They are the same thing. sizeof is just an alias of count. So, makes more sense to use count as it is the "real" function.
-
Re: Image Handler 5 (for v1.5.5) Support Thread
I'm back for a few more pointers :)
I had Image Handler 5 working in my test store on V1.5.5f. My store upgrade was ready so I delete my V1.5.1 files, copy the new ones across and run the database upgrade.
On the new live site though Image Handler is playing up. No copies of my images are placed in my bmz_cache unless I first open first open that product in my Admin by going to for example /image_handler.php?products_filter=1843¤t_category_id=87. After this page has loaded the image is created in the cache.
Up to this point IH has created the correct link so if I view the image it displays the correct path but obviously no image. Go to IH in Admin view that product and the image is created.
I've compared the files in my live and test store and they are identical except for the configure files. I assume it is therefore my database again but I am stumped as the test site was started by exporting and importing my live database so it should be the same.
Brent
PS. I can't show you it in action on my site as I have IH disabled so assume a link will not be of use?
-
Re: Image Handler 5 (for v1.5.5) Support Thread
Quote:
Originally Posted by
Brent
I'm back for a few more pointers :)
I had Image Handler 5 working in my test store on V1.5.5f. My store upgrade was ready so I delete my V1.5.1 files, copy the new ones across and run the database upgrade.
On the new live site though Image Handler is playing up. No copies of my images are placed in my bmz_cache unless I first open first open that product in my Admin by going to for example /image_handler.php?products_filter=1843¤t_category_id=87. After this page has loaded the image is created in the cache.
Up to this point IH has created the correct link so if I view the image it displays the correct path but obviously no image. Go to IH in Admin view that product and the image is created.
I've compared the files in my live and test store and they are identical except for the configure files. I assume it is therefore my database again but I am stumped as the test site was started by exporting and importing my live database so it should be the same.
Brent
PS. I can't show you it in action on my site as I have IH disabled so assume a link will not be of use?
There was an issue that I and others had upgrading IH5 - even after running the uninstall sql from IH4 something wonky happened with the new install and IH wouldn't perform - it was apparentlyed related to new IH version number table in the database configuration tables. The solution was to go into phpMyAdmin and delete that table (even though it looked correct version), then go into store admin, whereupon IH5 would reinstall itself correctly. Of course I backed up my db before doing this.
-
Re: Image Handler 5 (for v1.5.5) Support Thread
Thanks for the feedback. Yes I too had to do that but that was to get all the correct configuration settings in my test site. In my live site it installed correctly the first time with all the correct settings. I've compared the entries in both databases and they are the same.
I'll give it a shot though as I have nothing to lose.
Brent
-
Re: Image Handler 5 (for v1.5.5) Support Thread
OK tried that but it is still the same. Also this time I had to remove all the other config entries and not just the version number to get it to install again.
So unfortunately my issue is still as in post #56 above. Also to add to that I get no entries in my error log :(
-
Re: Image Handler 5 (for v1.5.5) Support Thread
Check your IH-5 settings, since you've reinstalled ... the default for IH resize images is 'no'; you should change that to 'yes' to enable storefront operation.
-
Re: Image Handler 5 (for v1.5.5) Support Thread
Setting it to yes breaks the image links. As soon as I do this the image url changes to say /bmz_cache/c/testjpg.image.100x80.jpg but if you check the folder the image is not there. If I then go to edit the image details for that product in IH Admin the script creates the image and all is OK.
Somehow only the Admin side is creating the cache but the catalogue side doesn't.
The other strange thing is if I then go to the additional images tab (I'm running TPP) the thumbnail image is broken but if I click to view it will open the larger image but in the original location. This is with IH enabled.
In my test store I have the same setup and all is OK.
I can show you it all in action but as it is a live store I can't leave IH enabled at the moment.
-
Re: Image Handler 5 (for v1.5.5) Support Thread
Brent, check your Private Messages ...
-
Re: Image Handler 5 (for v1.5.5) Support Thread
That was a tricky one (thanks to @Brent for providing me access). Turns out that the live store's DIR_FS_CATALOG was pointing to his test-site's file-system directory and correcting that fixed the issue.
Why it is that only Image Handler was affected is a puzzle.
-
Re: Image Handler 5 (for v1.5.5) Support Thread
I've just submitted Image Handler 5, v5.1.0, to the Plugins for review. Once approved, that download will be available here: https://www.zen-cart.com/downloads.php?do=file&id=2169
This release contains changes associated with the following GitHub issues; see https://github.com/divavocals/zen_Image-Handler/ for additional information:
#64: Invalid inputs to imagepng results in bloated output files.
#66: Move admin "About/Help" content to a separate language file.
#70: Split admin processing into separate processing files, enables different permissions.
#71: Clarify the term "default", used in the admin processing and the readme.
#73: Use PHP 'pathinfo' to determine file extensions.
#75: Correct debug error on admin tools menu.
#78: Correct install/upgrade processing, since IH4's uninstall doesn't remove the IH_VERSION constant.
#79: Remove "Scan for old IH 0.x and 1.0 'original' images"
#80: Clean up PHP Notices
#83: Add "View Configuration" admin-menu item.
#86: Restructure to improve code readability.
#88: Medium/Large: Will find/use alternate image extensions if primary is not found
#89: Remove mixed-case file-extension handling.
#90: Add debug/trace capability.
#97: Additional checks for Fual Slimbox integration.
#98: Update additional_images.php notifier to that used in Zen Cart 1.5.6.
#100: Globalize use of $zco_notifier to enable plugin integrations.
#101: Correct incorrect warning about background definitions.
#102: Correct PHP Warning when an image is missing.
#106: Additional restructuring and debug.
#109: Note admin activity when `bmz_cache` is cleared.
#110: Migrate the majority of the readme to markdown.
#117: Large image width/height constants do not exist.
#118: ColorBox observer needs to globalize $template_dir.
#126: Correct PHP Notice on doubly-defined constants.
-
Re: Image Handler 5 (for v1.5.5) Support Thread
Image Handler 5, v5.1.0, is now available for download from the Zen Cart plugins.
-
Re: Image Handler 5 (for v1.5.5) Support Thread
zc1.5.5f test store with Bootstrap Template, CanadaPost, OPC, IH5.1, NO colorbox or other;
Additional Images - on a sample product I can add one additional image to the product. The resulting added image, in the IH admin, has only a delete option button, and not an 'add' button. If I go to the original image on that screen I can add an additional image, but it replaces the additional image previously loaded. ie only one additional image allowed.
On my IH5 install I tried method 1, then in case Bootstrap was considered as having large popup, I tried method 2. With the your temp/modules/additional_images file I tried using full IH5 file, and full Bootstrap mod file, and merged version of the two. In the merged version I tried merging over ONLY the 'Globals' term but not the one different placement of the line #147 in IH5:
Code:
$link_parameters = 'class="additionalImages centeredContent back"' . ' ' . 'style="width:' . $col_width . '%;"';
and I also tried swapping that line's location from where it appears in the Bootstrap file.
All of the above yield the same result. Is there another file I should be looking at?
IH5 is turned on and Additional Images is set to 3 per row. I didn't uninstall/re-install IH5 after each attempted variation.
Thanks
-
Re: Image Handler 5 (for v1.5.5) Support Thread
IH-5, v5.1.0 and later, has some major User-Interface (UI) changes.
If you want to add an image to a product using the Image Handler 'tool', you need to first select the 'primary' image ... that's where the 'add' becomes available. I've got documentation on the updated interface available on the GitHub site: https://github.com/DivaVocals/zen_Im...age_handler.md.
-
Re: Image Handler 5 (for v1.5.5) Support Thread
Quote:
If I go to the original image on that screen I can add an additional image, but it replaces the additional image previously loaded. ie only one additional image allowed.
I can confirm this behavior of it only allowing one additional image.
-
Re: Image Handler 5 (for v1.5.5) Support Thread
Quote:
Originally Posted by
lat9
IH-5, v5.1.0 and later, has some major User-Interface (UI) changes.
If you want to add an image to a product using the Image Handler 'tool', you need to first select the 'primary' image ... that's where the 'add' becomes available. I've got documentation on the updated interface available on the GitHub site:
https://github.com/DivaVocals/zen_Im...age_handler.md.
Selecting the primary, then add does allow adding one additional image. But on the additional image there is no add to put in further additional images. If you go back to the primary and select add it replaces the initial additional image, still leaving only one.
I've been fiddling with this in Bootstrap template, but also tried in test version of my livesite which is zc 1.5.5f and Responsive Classic clone, with IH5.0. In IH5.0 multiple additional images work and with each image added the option to add a further image is given. When I update to IH5.1 (after backing up) my existing additional images disappeared. And the behaviour from the bootstrap test site was replicated. When re-installed site from backup the additional images reappeared (and message in admin panel that IH had been successfully updated from 5.1 to 5.0 ;-))
Also, if it makes any difference, my WAMP is set at php7.1.13 and my desktop is Windows 10, browser Firefox.
I have enabled IH debug.
-
Re: Image Handler 5 (for v1.5.5) Support Thread
I've just submitted v5.1.1 to the Zen Cart plugins for review.
This release contains changes associated with the following GitHub issues:
#129: Invalid cached images' location when DIR_FS_CATALOG is set to /.
#130: Can't add more than one additional image.
#134: Debug-log generated on initial entry.
-
Re: Image Handler 5 (for v1.5.5) Support Thread
I am having trouble with the product info (Medium) imaging enlarging to a large image. After clicking, it does not enlarge, it is set to hover. I have a feeling it is something simple, any suggestion? Thank you!
-
Re: Image Handler 5 (for v1.5.5) Support Thread
Quote:
Originally Posted by
creyesx6
I am having trouble with the product info (Medium) imaging enlarging to a large image. After clicking, it does not enlarge, it is set to hover. I have a feeling it is something simple, any suggestion? Thank you!
I apologize, I should have included more information: I am using 1.5.5F, site url: bellafurnitureandmattress.com, I have not loaded any medium or large images. I am using IH with Alto Template. Using Ultimate URL's, Dynamic Price Updater, Wishlist. I am not using Lightbox
-
Re: Image Handler 5 (for v1.5.5) Support Thread
Quote:
Originally Posted by
creyesx6
I apologize, I should have included more information: I am using 1.5.5F, site url: bellafurnitureandmattress.com, I have not loaded any medium or large images. I am using IH with Alto Template. Using Ultimate URL's, Dynamic Price Updater, Wishlist. I am not using Lightbox
Newest release of Alto uses old version IH4.3. I found zoom hover mucked things up back when I used that version of IH. I turned it off and removed the jscript_imagehover file.
-
Re: Image Handler 5 (for v1.5.5) Support Thread
Quote:
Originally Posted by
lat9
I've just submitted v5.1.1 to the Zen Cart plugins for review.
This release contains changes associated with the following GitHub issues:
#129: Invalid cached images' location when DIR_FS_CATALOG is set to /.
#130: Can't add more than one additional image.
#134: Debug-log generated on initial entry.
v5.1.1 is now available for download from the Zen Cart plugins.
-
Re: Image Handler 5 (for v1.5.5) Support Thread
Quote:
Originally Posted by
creyesx6
I apologize, I should have included more information: I am using 1.5.5F, site url: bellafurnitureandmattress.com, I have not loaded any medium or large images. I am using IH with Alto Template. Using Ultimate URL's, Dynamic Price Updater, Wishlist. I am not using Lightbox
Quote:
Originally Posted by
soxophoneplayer
Newest release of Alto uses old version IH4.3. I found zoom hover mucked things up back when I used that version of IH. I turned it off and removed the jscript_imagehover file.
Right, and this support-thread is associated with Image-Handler 5, not 4.
-
Re: Image Handler 5 (for v1.5.5) Support Thread
Quote:
Originally Posted by
soxophoneplayer
Newest release of Alto uses old version IH4.3. I found zoom hover mucked things up back when I used that version of IH. I turned it off and removed the jscript_imagehover file.
Great, Thank you very much for your help !!
-
Re: Image Handler 5 (for v1.5.5) Support Thread
Quote:
Originally Posted by
lat9
v5.1.1 is now available for download from the Zen Cart plugins.
Thanks, I did use the update, but I am assuming the jscript_hoverfile is still there. Thank you!!
-
Re: Image Handler 5 (for v1.5.5) Support Thread
Yes, that jscript_imagehover file is still there ... although updated to (hopefully) correct the interoperability issue.
-
Re: Image Handler 5 (for v1.5.5) Support Thread
Quote:
Originally Posted by
lat9
Yes, that jscript_imagehover file is still there ... although updated to (hopefully) correct the interoperability issue.
Yes, so I am nearly there. The large images are working exactly as needed. However after updating the catalog I found that products with multiple images are not displaying on the product info page. I just have a blank image. I am using IH 5 with 1.5.5+.
Here is a url to show what is happening with multiple images: http://bellafurnitureandmattress.com...nton-p-14.html
I noticed when going to the Image Manager to check this product that the medium image has a - only without an image. Images were added via FTP and Easy Populate 4.
Thanks for the plugin and help!
-
Re: Image Handler 5 (for v1.5.5) Support Thread
Quote:
Originally Posted by
creyesx6
Yes, so I am nearly there. The large images are working exactly as needed. However after updating the catalog I found that products with multiple images are not displaying on the product info page. I just have a blank image. I am using IH 5 with 1.5.5+.
Here is a url to show what is happening with multiple images:
http://bellafurnitureandmattress.com...nton-p-14.html
I noticed when going to the Image Manager to check this product that the medium image has a - only without an image. Images were added via FTP and Easy Populate 4.
Thanks for the plugin and help!
There's apparently something awry with the merge/update that you made for the /includes/modules/alto/additional_images.php, since no images are being populated. Remember that the Alto theme started out with IH-4, which needs to be fully replaced for IH-5 to operate properly.
-
Re: Image Handler 5 (for v1.5.5) Support Thread
1st time using IH5 :blush:
Is it normal that the watermark doesn't appear on the product listing page images?
All 3 configs (WATERMARK_SMALL_IMAGES, WATERMARK_MEDIUM_IMAGES & WATERMARK_LARGE_IMAGES) have a value set to "yes".
-
Re: Image Handler 5 (for v1.5.5) Support Thread
Quote:
Originally Posted by
rbarbour
1st time using IH5 :blush:
Is it normal that the watermark doesn't appear on the product listing page images?
All 3 configs (WATERMARK_SMALL_IMAGES, WATERMARK_MEDIUM_IMAGES & WATERMARK_LARGE_IMAGES) have a value set to "yes".
I've just tested IH 5.1.1, setting all watermarks enabled and using the Responsive Classic template with the demo products. I can see the watermark on the small images, but its very faint.
-
Re: Image Handler 5 (for v1.5.5) Support Thread
Quote:
Originally Posted by
lat9
I've just tested IH 5.1.1, setting all watermarks enabled and using the Responsive Classic template with the demo products. I can see the watermark on the small images, but its very faint.
Nope, changed to the Responsive Classic template.
Watermarks now only appear on additional images and on images within the popup window.
I am not worried about it, just installed to see if it conflicted with a mod I was working on.
-
Re: Image Handler 5 (for v1.5.5) Support Thread
Quote:
Originally Posted by
lat9
There's apparently something awry with the merge/update that you made for the /includes/modules/alto/additional_images.php, since no images are being populated. Remember that the Alto theme started out with IH-4, which needs to be fully replaced for IH-5 to operate properly.
Yes! Absolutely right. The template is now updated with IH5.
Another question I have is regarding the product listing images. I have multiple sized images, how can I have them all the same size so the images look organized and not of various sizes? Same goes for new products, featured, etc. I indicated 300 x 240 on the config/image page with no luck.
Thanks again!
-
Re: Image Handler 5 (for v1.5.5) Support Thread
Quote:
Originally Posted by
creyesx6
Yes! Absolutely right. The template is now updated with IH5.
Another question I have is regarding the product listing images. I have multiple sized images, how can I have them all the same size so the images look organized and not of various sizes? Same goes for new products, featured, etc. I indicated 300 x 240 on the config/image page with no luck.
Thanks again!
I usually configure IH-5 for a minimum height and let the width "go with the flow", since it's the image-height variations that can make a site visually unappealing.
-
Re: Image Handler 5 (for v1.5.5) Support Thread
Quote:
Originally Posted by
lat9
I usually configure IH-5 for a minimum height and let the width "go with the flow", since it's the image-height variations that can make a site visually unappealing.
I have always assumed the opposite. After having a look, yes I agree the image-height fixed size looks much better.
Thank you!
-
Re: Image Handler 5 (for v1.5.5) Support Thread
Hi,
Just installed IH5 on a fresh zen cart 1.5.5f, than added fual slimbox after.
All seemed well except I just noticed the Mini IH Icon doesn't actually show on the Admin Product pages, all the other icons shows except the IH5 icon.
The only I can see IH5 is to go to Admin > Tools > Image Handler 5.
What have I done wrong??
-
Re: Image Handler 5 (for v1.5.5) Support Thread
You're apparently missing the /YOUR_ADMIN/includes/extra_datafiles/image_handler.php file, which defines the constant FILENAME_IMAGE_HANDLER.
-
Re: Image Handler 5 (for v1.5.5) Support Thread
Thank you for your reply, just checked and the files are there.
Where to next please?
-
Re: Image Handler 5 (for v1.5.5) Support Thread
A couple more things that you can check. Starting with zc1.5.5, the file /YOUR_ADMIN/includes/modules/category_product_listing.php should contain the following code fragment around line 367:
Code:
<?php if (defined('FILENAME_IMAGE_HANDLER') && file_exists(DIR_FS_ADMIN . FILENAME_IMAGE_HANDLER . '.php')) { ?>
<?php echo '<a href="' . zen_href_link(FILENAME_IMAGE_HANDLER, 'products_filter=' . $products->fields['products_id'] . '¤t_category_id=' . $current_category_id) . '">' . zen_image(DIR_WS_IMAGES . 'icon_image_handler.gif', ICON_IMAGE_HANDLER) . '</a>'; ?>
<?php } ?>
You've already checked that the extra_datafile (which defines FILENAME_IMAGE_HANDLER) exists, so the other requirements for that icon's display are:
- The presence of /YOUR_ADMIN/image_handler.php.
- The presence of /YOUR_ADMIN/images/icon_image_handler.gif.
Are both of those files present?
-
Re: Image Handler 5 (for v1.5.5) Support Thread
Thank you Cindy, your solution for looking for (category_product_listing.php), was the key :) It fixed it!
I forgot to mention that before installing IH5, I installed IH4 because I didn't notice there was an IH5, so I uninstalled IH4 from the Admin Tools, which I think must have caused this .php file to be altered and also leave a couple of outer variations of that file which were not deleted when I uninstalled IH4.
I do have one other issue if you can help me with please, my additional images are showing a MEDIUM size image on Image Handler Page, just small and large.. is this normal??
Also, I want to make the main front page images for my products for the what's new and featured, I have changed very much all the sizing in Config > Images, but the images stay the same, any ideas??
Thank you once again!!!
-
Re: Image Handler 5 (for v1.5.5) Support Thread
SORRY, could't edit in time.
in above message I meant to say (my additional images are [NOT] showing a MEDIUM size image on Image Handler Page).
-
Re: Image Handler 5 (for v1.5.5) Support Thread
Right, for IH-5 the medium images are no longer displayed (or generated) within the admin for additional images ... since they're not used in the storefront.
-
Re: Image Handler 5 (for v1.5.5) Support Thread
Note also that there's a fair amount of documentation on the plugin's GitHub repository: https://github.com/DivaVocals/zen_Image-Handler.
Just scroll down to view the readme.md file and make use of the links towards the bottom of the page for additional information regarding the admin configuration and "Image Handler" operations.
-
Re: Image Handler 5 (for v1.5.5) Support Thread
Okay folks, I've spent a long time reviewing this and I must be missing something quite obvious. Searching high and low, I can't find others representing something similar. Can you help me narrow this down?
This issue was discovered after upgrading to php 7.1, upgrading to zencart 1.5.5f and upgrading to IH 5. When trying to add the first image to a product through IH, the following error is encountered. The physical file is uploaded to the correct directory.
Error!
Unable to determine the page link!
Function used:
zen_href_link('', '', 'SSL')
Using ZenCart 1.5.5f
Recently upgraded to 1.5.5f through standard docs
Installed via FTP upload, ZC Install
PHP 7.1.13 / MySQL 5.5.5
Custom template is in use
Please let me know if any other details would be helpful. Thank you!
-
Re: Image Handler 5 (for v1.5.5) Support Thread
@jsickles, what version of IH are you using?
-
Re: Image Handler 5 (for v1.5.5) Support Thread
@lat9 - thank you for your response! Of course I forgot to provide the IH version, given I was in the IH5 thread. :) The version installed was IH 5.1.0 and when I was typing this reply, I put in the words 'latest version' as well. However, to ensure this was accurate before posting, I checked - and sure enough a 5.1.1 was recently released which has a fix for this. After updating, everything appears to be working. Thanks again!
-
Re: Image Handler 5 (for v1.5.5) Support Thread
@jsickles, thanks for the follow-up that the issue you described has been corrected in IH-5.1.1.
-
Re: Image Handler 5 (for v1.5.5) Support Thread
@lat9 - I've got a new one for you if you don't mind. After a lot of digging in 5.1.1 it appears that when using additional images, the file type extension is case sensitive. When a case different case is uploaded, the file type shows red and fails to load on the store page. Is this a new behavior? Easy correction? Documentation I'm overlooking? Thank you!
Jeff
-
Re: Image Handler 5 (for v1.5.5) Support Thread
Linux is generally case sensitive. To your server image1.jpg and image1.JPG are two entirely different files.
On a windoze box, your best bet is spacetornado renamer. It can change the case on all your files AND get rid of the spaces folks tend to add to the name. Standard use is lower case extensions with no spaces in the names.
Your cpanel can change image types and resize the images.
If you've already uploaded a large amount of JPG files, you can change that with a MySQL update.