Jump to content



Photo
* * * * * 1 votes

KissIT Image Thumnailer


  • Please log in to reply
167 replies to this topic

#161 ONLINE   joli1811

joli1811

    Anybody seen this leprechaun say yeah !!

  • Community Sponsor
  • 2,135 posts
  • Real Name:john dunlop
  • Gender:Male
  • Location:Ireland

Posted 05 July 2014 - 17:34

go back a bit in the thread remember to empty your cache and let them rebuild

 

 

http://forums.oscomm...umnailer/page-3

 

$quality = !is_numeric ( $quality ) ? 7 : floor ( $quality / 10 );
         if ( $quality < 0 ) {
         $quality = 0;
         } elseif ( $quality > 9 ) {
         $quality = 9;
         }


To improve is to change; to be perfect is to change often.

#162   swcharlie

swcharlie
  • Members
  • 24 posts
  • Real Name:Schalk
  • Gender:Male

Posted 05 July 2014 - 18:11

Just before seeing your reply I seem to have gotten it working with the following:

 

          //$quality = is_null ( $quality ) ? 0 : $quality;
          $quality = is_null ( $quality ) ? 7 : floor ( $quality / 10 );
          $filters = is_null ( $filters ) ? null : $filters;
          return imagepng( $this->_image, $save_in, $quality, $filters );
          break;
        default :

 

But will raher replace it with the above code. Thanks!



#163 ONLINE   joli1811

joli1811

    Anybody seen this leprechaun say yeah !!

  • Community Sponsor
  • 2,135 posts
  • Real Name:john dunlop
  • Gender:Male
  • Location:Ireland

Posted 05 July 2014 - 19:05

Nice that you posted for others to see :thumbsup:

 

Regards

Joli


To improve is to change; to be perfect is to change often.

#164   smiley

smiley
  • Members
  • 209 posts
  • Real Name:Neil
  • Gender:Male
  • Location:Australia

Posted 07 August 2014 - 08:16

Seems in the most recent 2.3.4
catalog/product_info.php has been modified as per the release notes.

Note: "Replace bxGallery and FancyBox with PhotosetGrid and Colorbox."

On page 16 of the release notes - e.g. - no $pi_entry  :rolleyes:

Has anyone made this work please?


HTH
Neil

Common sense is genius dressed in working clothes.
Ralph Waldo Emerson

#165   Blackhex87

Blackhex87
  • Members
  • 4 posts
  • Real Name:Andréas Karlsson

Posted 10 August 2014 - 19:31

Hello all,

 

First, thanks for this great contribution!

 

I'm also trying to install this on a 2.3.4 store and I've currently only come up with the following fix for the main image:

echo tep_image(DIR_WS_IMAGES . $pi['image'], '', '', '', 'id="piGalImg_' . $pi_counter . '"');

I changed this code to:

echo tep_image(DIR_WS_IMAGES . $pi['image'], '', KISSIT_MAIN_PRODUCT_IMAGE_WIDTH, KISSIT_MAIN_PRODUCT_IMAGE_HEIGHT, 'id="piGalImg_' . $pi_counter . '"');

I'm yet to try the other images in the PhotosetGrid...

 

Any ideas to this or how to install it?

 

This first line change did cause me this error:

 

Warning: imagepng() [function.imagepng]: gd-png error: compression level must be 0 through 9 in /home/akvaries/public_html/OsCommerce234/includes/modules/kiss_image_thumbnailer/classes/Image.php on line 146

 

But I think the fix is in an earlier post =)

 

Best regards / Andy



#166   Blackhex87

Blackhex87
  • Members
  • 4 posts
  • Real Name:Andréas Karlsson

Posted 10 August 2014 - 19:51

Hello again =)

 

I fixed my product_info.php with this:

 

Replace:

echo tep_image(DIR_WS_IMAGES . $pi['image'], '', '', '', 'id="piGalImg_' . $pi_counter . '"');

With this:

echo '<a href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_image']) . '" target="_blank">' . tep_image(DIR_WS_IMAGES . $pi['image'], '', KISSIT_MAIN_PRODUCT_IMAGE_WIDTH, KISSIT_MAIN_PRODUCT_IMAGE_HEIGHT, 'hspace="5" vspace="5" id="piGalImg_' . $pi_counter . '"');

Open: Catalog/includes/modules/kiss_image_thumbnailer/classes/Image.php

 

Replace:

        case self::IMAGETYPE_PNG :
          $quality = is_null ( $quality ) ? 0 : $quality;
          $filters = is_null ( $filters ) ? null : $filters;
          return imagepng ( $this->_image, $save_in, $quality, $filters );
          break;

With this:

        case self::IMAGETYPE_PNG :
          $quality = is_null ( $quality ) ? 7 : floor ( $quality / 10 );
          $filters = is_null ( $filters ) ? null : $filters;
          return imagepng ( $this->_image, $save_in, $quality, $filters );
          break;

That did it for me =)

 

Hope this helps!

 

Best regards / Andy

 



#167   Blackhex87

Blackhex87
  • Members
  • 4 posts
  • Real Name:Andréas Karlsson

Posted 10 August 2014 - 19:54

Once again =)

 

Sorry, but there is indeed an error..

 

The whole product description is wrapped inside an hyperlink reference... not as intended..

 

Looking for a solution..

 

Best regards / Andy



#168   Blackhex87

Blackhex87
  • Members
  • 4 posts
  • Real Name:Andréas Karlsson

Posted 10 August 2014 - 19:57

Found the solution quickly =)

 

This code:

echo '<a href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_image']) . '" target="_blank">' . tep_image(DIR_WS_IMAGES . $pi['image'], '', KISSIT_MAIN_PRODUCT_IMAGE_WIDTH, KISSIT_MAIN_PRODUCT_IMAGE_HEIGHT, 'hspace="5" vspace="5" id="piGalImg_' . $pi_counter . '"');

Should look like this ( at the end):

echo '<a href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_image']) . '" target="_blank">' . tep_image(DIR_WS_IMAGES . $pi['image'], '', KISSIT_MAIN_PRODUCT_IMAGE_WIDTH, KISSIT_MAIN_PRODUCT_IMAGE_HEIGHT, 'hspace="5" vspace="5" id="piGalImg_' . $pi_counter . '"') . '</a>';

Best regards / Andy