Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Product listing


FWR Media

Recommended Posts

KissIT Image Thumbnailer

 

Compatibility: PHP 5.2/5.3/5.4 ( PHP 4 or ancient versions of PHP5 will NOT work )

osCommerce 2.2

osCommerce 2.3.X

 

Main Benefits:

Images should never be resized by the browser/html/javascript as this is EXTREMELY slow. Supplying the browser with correctly scaled images will speed up the loading of image rich osCommerce shops dramatically.

 

Being a KISS ( Keep It Simple Stupid ) contribution this installs extremely quickly and with minimal core file changes.

 

KissIT thumbnails any and all osCommerce images where the image dimensions are not equal to the image output dimensions.

 

PHP image manipulation functions are very heavy on resources, KissIT is optimised to only use such functions when thumbs are first created, after which no such functions are used again. Ensuring that KissIT provides the best possible performance.

 

In osCommerce 2.3.1 product pages the gallery system ( bxGallery ) uses both browser and javascript resizing, KissIT improves this greatly by providing much smaller thumbnails.

 

Please note: KissMT will only deal with images where the correct osCommerce wrapper function is used ( tep_image() ) and where numeric width and height are passed into the wrapper.

 

Contribution location: KissIT Image Thumbnailer

Edited by FWR Media
Link to comment
Share on other sites

Depends what you mean by "solved"

 

bxGallery does what bxGallery does, it loads enormous full sized images and then reduces them for display via javascript.

 

KissIT will create a thumb of the correct ( much smaller ) size for the main product image, bxGallery will continue to thumb the image as it did before but it will be sized from the much smaller KissIT thumbnail as opposed top the enormous original image.

 

So e.g. if the original uploaded image was 1 MB in size with KissIT enabled bxGaller may be thumbnailing an image of just 13kB or so and the main product image would be just 13kB also ( not real sizes, just examples )..

Link to comment
Share on other sites

Hi,

 

I have installed this on a 2.3.1 site, on a PHP 5.2.17 server, and now I get the following error at the top of the index page:

 

Warning: getimagesize(images/no_image_available_150_150.gif) [function.getimagesize]: failed to open stream: No such file or directory in /home/username/public_html/catalog/includes/modules/kiss_image_thumbnailer/classes/Image_Helper.php on line 77

 

Many thanks

Edited by Mort-lemur

Now running on a fully modded, Mobile Friendly 2.3.4 Store with the Excellent MTS installed - See my profile for the mods installed ..... So much thanks for all the help given along the way by forum members.

Link to comment
Share on other sites

@@Mort-lemur are you sure you uploaded all of the files? I never got that error on my install...

 

Yep - I uploaded the whole directory to the correct location, and looking at the files, thumbs are being created ok

 

Thanks

Edited by Mort-lemur

Now running on a fully modded, Mobile Friendly 2.3.4 Store with the Excellent MTS installed - See my profile for the mods installed ..... So much thanks for all the help given along the way by forum members.

Link to comment
Share on other sites

@@Mort-lemur

 

Does the image exist at catalog/images/no_image_available_150_150.gif?

Link to comment
Share on other sites

Ah I see what the problem was, the image in the download was called: no_image_available_150_150.gif.png

 

so I have copied the file to images twice, once as no_image_available_150_150.gif and once as no_image_available_150_150.png and now all is well.

 

Many Thanks

Now running on a fully modded, Mobile Friendly 2.3.4 Store with the Excellent MTS installed - See my profile for the mods installed ..... So much thanks for all the help given along the way by forum members.

Link to comment
Share on other sites

That is a small bug.

 

Please everyone rename

 

catalog/images/no_image_available_150_150.gif.png

 

To just

 

catalog/images/no_image_available_150_150.gif

Link to comment
Share on other sites

Hi Robert - when I did that it gave me an error, I had to have a .gif and a .png file

Now running on a fully modded, Mobile Friendly 2.3.4 Store with the Excellent MTS installed - See my profile for the mods installed ..... So much thanks for all the help given along the way by forum members.

Link to comment
Share on other sites

Yup .. nuts! the image is a PNG, I Smushed it and didn't notice the change in filename and mime.

 

Please use the attached and delete any .png

post-68771-0-52912100-1341862543_thumb.gif

Edited by FWR Media
Link to comment
Share on other sites

@@modem2.0

 

Possibly, depends how many need/want it.

 

Initially I need feedback on the initial offering ( r7 - revision 7 ) then feature requests are more than welcome.

Link to comment
Share on other sites

Thanks Robert, I can't give feedback on current version as I need watermark. I have too many products images to add watermark to all of them manually. I'm currently using ocsThumb, but it is an old, buggy and unsupported addon, so if I find a better one I'll change it.

That's why I asked.

Link to comment
Share on other sites

Rob, my /public_html/includes/modules/kiss_image_thumbnailer/thumbs/ is working with 0755 permissions level on my host.

 

What do you think about adding a appropriately coded .htaccess file in there similar to what should be in the /public_html/images/ folder for security purposes?

 

Thanks

I am not a professional webmaster or PHP coder by background or training but I will try to help as best I can.

I remember what it was like when I first started with osC. It can be overwhelming.

However, I strongly recommend considering hiring a professional for extensive site modifications, site cleaning, etc.

There are several good pros here on osCommerce. Look around, you'll figure out who they are.

Link to comment
Share on other sites

@@altoid

 

Sure .. I'd suggest: -

 

php_flag engine off
<Files ~ "\.(php*|s?p?html|cgi|pl|exe)$">
deny from all
</Files>

Link to comment
Share on other sites

The site wasn't processing thumbs with that coding. I'd get no images at all as I clicked through the site. I switched to:

 

 

<FilesMatch "\.(php([0-9]|s)?|s?p?html|cgi|pl|exe)$">

Order Deny,Allow

Deny from all

</FilesMatch>

 

the thumbs process then again

 

FYI on that

I am not a professional webmaster or PHP coder by background or training but I will try to help as best I can.

I remember what it was like when I first started with osC. It can be overwhelming.

However, I strongly recommend considering hiring a professional for extensive site modifications, site cleaning, etc.

There are several good pros here on osCommerce. Look around, you'll figure out who they are.

Link to comment
Share on other sites

Hi I have been testing this on a MS 2.2 Shop on a local server and get a couple of errors.

 

1 Fatal error Cannot use string offset as an array in tax.php (chemos tax class)

I was able to stop this error by removing the variable ['rate'] at the end of this string

if (isset($this->tax_rates[$class_id][$country_id][$zone_id]['rate']) == false) {

as I don't use tax in the shop.

 

 

 

 

1 Notice

 

Notice: Undefined index: \modules\kiss_image_thumbnailer\classes\Image_Helper.php on line 126

 

This appears before every image.

 

really like the ease of the new creation just wondered it you know what this might be.

much appreciation for your time

Doug

Edited by douglaswalker
Link to comment
Share on other sites

1 Notice

 

Notice: Undefined index: \modules\kiss_image_thumbnailer\classes\Image_Helper.php on line 126

 

This appears before every image.

 

The first error is nothing at all to do with KissIT.

 

The second error however is a good catch.

 

Line 126 in catalog/includes/modules/kiss_image_thumbnailer/classes/Image_helper.php

 

Find ..

 

	  if ( false !== $parameters ) $this->html .= ' ' . tep_output_string( $parameters );

 

Change to ...

 

	  if ( false !== $parameters ) $this->_html .= ' ' . tep_output_string( $parameters );

 

Thanks for the report, helps me to offer a better product.

Link to comment
Share on other sites

A new revision has been uploaded ( Revision 9 ) this revision has no known issues.

 

Meaning that all issues found so far in this support thread have been dealt with.

Link to comment
Share on other sites

Rob, just a note of appreciation for this add on. I installed the latest and in particular appreciate the explanation you provided in the 2_3_1_product_info.htm document concerning image scaling. It helped me understand what's going on. for my shop the image width works better with a 200 setting, it's good to have the control.

 

I presume it's something to do with bxGallery, but with multiple images you lose the alt attribute apparently. Single images have ALT, multiple lose it for some reason.

 

May not be a big deal; I only caught that in Bing Webmaster tools that flagged out what they call "non-compliant".

 

Here's what they say:

 

SEO Suggestion The <img> tag does not have an ALT attribute defined

SEO Explanation As a general rule, search engines do not interpret the content of image files. The text provided in the <img alt> attribute enables the site owner to provide relevant information to the search engine and to the end user. Alt text is helpful to end users if they have images disabled or if the image does not properly load. In addition, the Alt text is utilized by screen readers. Make sure that your Alt text is descriptive and accurately reflects what the image represents and supports the content on the page.

Recommended Action Use the <img alt> attribute to write descriptive content for the image: <img source="pic.gif" alt="Accurate and descriptive keyword text that represents the image."</img>.

 

Just thought I'd mention that in case you think it's something to be addressed.

 

Thanks

Edited by altoid

I am not a professional webmaster or PHP coder by background or training but I will try to help as best I can.

I remember what it was like when I first started with osC. It can be overwhelming.

However, I strongly recommend considering hiring a professional for extensive site modifications, site cleaning, etc.

There are several good pros here on osCommerce. Look around, you'll figure out who they are.

Link to comment
Share on other sites

I presume it's something to do with bxGallery, but with multiple images you lose the alt attribute apparently. Single images have ALT, multiple lose it for some reason.

 

Hi and thanks for the feedback.

 

Yes the multiple images have no alt tag and the reasons for it are that the standard product_info multiple images have no alt tag and I didn't think to change it.

 

Now that I did try to change it bxGallery breaks showing a link in an unfortunate place, which is why I imagine the osC team left it out in the first place :)

Link to comment
Share on other sites

Hi and thanks for the feedback.

 

Yes the multiple images have no alt tag and the reasons for it are that the standard product_info multiple images have no alt tag and I didn't think to change it.

 

Now that I did try to change it bxGallery breaks showing a link in an unfortunate place, which is why I imagine the osC team left it out in the first place :)

 

OK, as Bing places this as a "low" category issue, I'll be content to live with it as is. Not that I'd have much option given I couldn't figure out what to do about it anyway.... :).

 

thanks for the follow up

I am not a professional webmaster or PHP coder by background or training but I will try to help as best I can.

I remember what it was like when I first started with osC. It can be overwhelming.

However, I strongly recommend considering hiring a professional for extensive site modifications, site cleaning, etc.

There are several good pros here on osCommerce. Look around, you'll figure out who they are.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...