Forums / Upgrading from 1.3.x to 1.3.9 / 1.3.6 - not showing extra images on Product detail (using IH2)

1.3.6 - not showing extra images on Product detail (using IH2)

Locked

Started by quentinjs on 30 Oct 2006, 6:47 AM · Views: 9,031

Results 1 to 20 of 31
This thread is locked. New replies are disabled.
30 Oct 2006, 6:47 AM
#1
quentinjs avatar

quentinjs

Zen Follower

Join Date:
Mar 2004
Location:
Calgary, Alberta
Posts:
289
Plugin Contributions:
0

1.3.6 - not showing extra images on Product detail (using IH2)

Since I upgraded last night I have noticed that extra images are not showing up on the product detail page.

for example: http://www.totalgarage.ca/products/index.php?main_page=product_info&cPath=4_52&products_id=461

has a link to a product called ezrect.jpg and in the same folder are the files
ezrect_1.jpg ezrect_2.jpg ezrect_3.jpg and ezrect_4.jpg

but only the original one is showing. I do have the ImageHandler2 installed but I don't believe that is the culprit.

anyone else having this problem?

30 Oct 2006, 8:04 AM
#2
jetx avatar

jetx

Zen Follower

Join Date:
Apr 2006
Posts:
425
Plugin Contributions:
0

Re: 1.3.6 - not showing extra images on Product detail (using IH2)

First check in admin under catalogue/product type/edit layout, that you have "show product additional images" set to 1.

30 Oct 2006, 9:18 AM
#3
ryk avatar

ryk

Totally Zenned

Join Date:
Oct 2004
Location:
Southport, UK
Posts:
3,644
Plugin Contributions:
6

Re: 1.3.6 - not showing extra images on Product detail (using IH2)

Interesting - I'm having the same problem, and yes, that switch is ON.

I've also tried switching to the Classic Template and the problem still exists.

Also have IH2, but have noticed that the "i in pink" symbol symbol is missing from the product tools although the Image Handler link from admin>tools still functions correctly (although another oddity is that the medium size images have larger file sizes than the large ones!)

I have other commitments today but it looks like there may be a conflict between IH2 and 1.3.6

Development Manager @ JSWeb Ltd - suppliers of Applepay/Googlepay for Zencart
20 years with Zencart !

30 Oct 2006, 2:39 PM
#4
quentinjs avatar

quentinjs

Zen Follower

Join Date:
Mar 2004
Location:
Calgary, Alberta
Posts:
289
Plugin Contributions:
0

Re: 1.3.6 - not showing extra images on Product detail (using IH2)

That was a good idea, but mine was set as well. That you have IH2 installed makes it more likely that its IH2 that could part of the problem, but all other places IH2 seems to be working fine including in thhe IH2->admin wher it shows all the images for the product.

30 Oct 2006, 2:43 PM
#5
ryk avatar

ryk

Totally Zenned

Join Date:
Oct 2004
Location:
Southport, UK
Posts:
3,644
Plugin Contributions:
6

Re: 1.3.6 - not showing extra images on Product detail (using IH2)

Mine shows the images in admin when you go through Tools>Image Handler; it's just the the link symbol is missing from the Categories/Products pages.

Development Manager @ JSWeb Ltd - suppliers of Applepay/Googlepay for Zencart
20 years with Zencart !

31 Oct 2006, 1:11 AM
#6
cjmarley avatar

cjmarley

Zen Follower

Join Date:
May 2004
Posts:
96
Plugin Contributions:
2

Re: 1.3.6 - not showing extra images on Product detail (using IH2)

quentinjs:

Since I upgraded last night I have noticed that extra images are not showing up on the product detail page.

I'm seeing this issue as well. No additional images are showing.

31 Oct 2006, 7:27 AM
#7
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,511
Plugin Contributions:
176

Re: 1.3.6 - not showing extra images on Product detail (using IH2)

1.3.6 changed several ereg_replace() function calls with str_replace(). This will NOT work for Image Handler, which uses a modified version of the previous ereg_replace() call. Thus, it is necessary to continue using the ereg_replace() syntax as distributed with Image Handler if you want to use the features provided by IH on your site.

If, while upgrading, you changed these particular statements without noting that the ereg_replace() calls were actually customizations, then you'll need to revert those changes back to the approach used by IH.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

31 Oct 2006, 8:06 AM
#8
ryk avatar

ryk

Totally Zenned

Join Date:
Oct 2004
Location:
Southport, UK
Posts:
3,644
Plugin Contributions:
6

Re: 1.3.6 - not showing extra images on Product detail (using IH2)

DrByte:

1.3.6 changed several ereg_replace() function calls with str_replace(). This will NOT work for Image Handler, which uses a modified version of the previous ereg_replace() call. Thus, it is necessary to continue using the ereg_replace() syntax as distributed with Image Handler if you want to use the features provided by IH on your site.

If, while upgrading, you changed these particular statements without noting that the ereg_replace() calls were actually customizations, then you'll need to revert those changes back to the approach used by IH.

So a full file re-install of IH (merging IT into 1.3.6) should hopefully cure the problem? Or should we be looking to modify the IH?

For the non-programmers amongst us, can you explain the pros/cons of the 2 calls?

Development Manager @ JSWeb Ltd - suppliers of Applepay/Googlepay for Zencart
20 years with Zencart !

31 Oct 2006, 10:06 AM
#9
ryk avatar

ryk

Totally Zenned

Join Date:
Oct 2004
Location:
Southport, UK
Posts:
3,644
Plugin Contributions:
6

Re: 1.3.6 - not showing extra images on Product detail (using IH2)

Replacing includes\modules\additional_images.php seems to do the trick - in fact, best put it in includes\modules\YOUR_TEMPLATE.

Development Manager @ JSWeb Ltd - suppliers of Applepay/Googlepay for Zencart
20 years with Zencart !

31 Oct 2006, 10:33 AM
#10
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,511
Plugin Contributions:
176

Re: 1.3.6 - not showing extra images on Product detail (using IH2)

Ryk:

Replacing includes\modules\additional_images.php seems to do the trick - in fact, best put it in includes\modules\YOUR_TEMPLATE.

Correct .

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

31 Oct 2006, 10:36 AM
#11
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,511
Plugin Contributions:
176

Re: 1.3.6 - not showing extra images on Product detail (using IH2)

Ryk:

For the non-programmers amongst us, can you explain the pros/cons of the 2 calls?

You're not really gonna torture me like that are you ? :cry:

In short ... the ereg approach must be used by IH in order to allow different filename extensions for different sized images.
When not allowing that option, the str_replace call is much faster and efficient.

(Okay, it's a lot more detailed than that for non-programmers ... but ... you said ... )

The change to str_replace in 1.3.6 was a result of numerous complaints about how the ereg was working without IH in prior versions.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

31 Oct 2006, 2:57 PM
#12
quentinjs avatar

quentinjs

Zen Follower

Join Date:
Mar 2004
Location:
Calgary, Alberta
Posts:
289
Plugin Contributions:
0

Re: 1.3.6 - not showing extra images on Product detail (using IH2)

Will we loose any other functionality by replacing the file? Based on your knowledge, could IH be modified to work with the 1.3.6 files?

31 Oct 2006, 9:45 PM
#13
qhome avatar

qhome

Totally Zenned

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

Re: 1.3.6 - not showing extra images on Product detail (using IH2)

http://us3.php.net/manual/en/function.ereg-replace.php

To see when or when not to use ereg_replace you can look here. ereg means regular expression strings. If not using regular expressions and just using simple string calls, str_replace is just more optimized because there is less self-validation that it needs to do.

IH2 might be using regular expressions which is why they used that and why it might not work with str_replace

31 Oct 2006, 10:19 PM
#14
IDEASLady avatar

IDEASLady

Totally Zenned

Join Date:
Aug 2005
Location:
Trujillo Alto, Puerto Rico
Posts:
1,456
Plugin Contributions:
4

Re: 1.3.6 - not showing extra images on Product detail (using IH2)

Why am I not seeing this issue? I have a fresh install 1.3.6, with IH2 installed... :huh:

You can see on my testing site: HERE the additional images are showing...

IDEASLady
IDEAS Creative Studio

Your image... our business!

31 Oct 2006, 11:19 PM
#15
ryk avatar

ryk

Totally Zenned

Join Date:
Oct 2004
Location:
Southport, UK
Posts:
3,644
Plugin Contributions:
6

Re: 1.3.6 - not showing extra images on Product detail (using IH2)

ideasgirl:

Why am I not seeing this issue? I have a fresh install 1.3.6, with IH2 installed... :huh:

Probably because you installed 1.3.6 and then I-H (perhaps without doing a file comparison? :D )

quentinjs:

Will we loose any other functionality by replacing the file? Based on your knowledge, could IH be modified to work with the 1.3.6 files?
I don't think so - it doesn't seem to have had any ill-effects on the site where I was having trouble (https://www.pinkpoppies.co.uk)

Development Manager @ JSWeb Ltd - suppliers of Applepay/Googlepay for Zencart
20 years with Zencart !

1 Nov 2006, 1:12 AM
#16
qhome avatar

qhome

Totally Zenned

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

Re: 1.3.6 - not showing extra images on Product detail (using IH2)

ideasgirl:

Why am I not seeing this issue? I have a fresh install 1.3.6, with IH2 installed... :huh:

You can see on my testing site: HERE the additional images are showing...

Looks like there is another bug on your demo site there ideasgirl, and maybe others: As you can see I have everything filled in and its giving me an empty error. Happens on Opera and IE.

1 Nov 2006, 1:34 AM
#17
IDEASLady avatar

IDEASLady

Totally Zenned

Join Date:
Aug 2005
Location:
Trujillo Alto, Puerto Rico
Posts:
1,456
Plugin Contributions:
4

Re: 1.3.6 - not showing extra images on Product detail (using IH2)

qhome:

Looks like there is another bug on your demo site there ideasgirl, and maybe others: As you can see I have everything filled in and its giving me an empty error. Happens on Opera and IE.
Since that's just a testing site there are lots of things not "on" or just as defaults. You can find some reference about this on THIS THREAD. You can check the site now, it's not supposed to give the error. For the system you weren't entering a "company name" while it was an obligatory field to fill; but just didn't show the "*" besides it.

IDEASLady
IDEAS Creative Studio

Your image... our business!

1 Nov 2006, 2:35 AM
#18
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,511
Plugin Contributions:
176

Re: 1.3.6 - not showing extra images on Product detail (using IH2)

quentinjs:

Will we loose any other functionality by replacing the file? Based on your knowledge, could IH be modified to work with the 1.3.6 files?

Yes. Just install IH after installing v1.3.6 ... or don't apply the changes from ereg_replace to str_replace in the modules..._images... files.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

7 Nov 2006, 7:08 AM
#19
ideadirect avatar

ideadirect

New Zenner

Join Date:
Jun 2005
Posts:
76
Plugin Contributions:
0

Re: 1.3.6 - not showing extra images on Product detail (using IH2)

DrByte:

Yes. Just install IH after installing v1.3.6 ... or don't apply the changes from ereg_replace to str_replace in the modules..._images... files.

So if I have a 1.3.5 site with IH working fine and I upgrade to 1.3.6 (by installing in a new directory and then transferring to live). Can I then just re-install IH for 1.3.6? Will the additional images show that were on 1.3.5?

The second half of your sentence is a foreign language to me. "don't apply the changes from ereg_replace..." I have no idea what that means. At no time during the install process do I see anything related to "applying" anything. Is this related to WinMerge? Sounds easier to just reinstall IH but I don't want to accidentally lose all my additional images already setup.

7 Nov 2006, 7:41 AM
#20
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,511
Plugin Contributions:
176

Re: 1.3.6 - not showing extra images on Product detail (using IH2)

Yes, I was referring to WinMerge.

In a nutshell ... to retain the IH2-specific support for differing file-extensions when upgrading to v1.3.6, SKIP these 3 files from v1.3.6, and use the IH2 versions of these files from the v1.3.5 version of IH2:

/includes/modules/ additional_images.php
/includes/modules/ main_product_image.php
/includes/modules/pages/popup_image_additional/header_php.php

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.