Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Product listing


FWR Media

Recommended Posts

8 minutes ago, raiwa said:

Sorry, but this is not subject of kiss it image thumbnailer. This should be a separate module.

Usually it should be a separate module, yes. But the problem is that KISSIT modifies the tep_image() function. You could at least "leave an open door" to include such a function for overlaying something when a  product is out of stock.

KISSIT is a critical module. Why wasnt it included in the core? :S

Link to comment
Share on other sites

1 minute ago, Owl Sauron said:

Usually it should be a separate module, yes. But the problem is that KISSIT modifies the tep_image() function. You could at least "leave an open door" to include such a function for overlaying something when a  product is out of stock.

KISS IT image thumb is open source. Anyone can add a module which does what you ask for. There is no "closed door". Anyway it can also and maybe better be done with a css overlay. I believe @burt has something in his store.

3 minutes ago, Owl Sauron said:

KISSIT is a critical module. Why wasnt it included in the core? :S

a question for Gary, not for me.

Link to comment
Share on other sites

New version uploaded:
 
 
Version 28 BS for OsC 2.3.4.1 CE Frozen and all BS EDGE versions and GOLD
Change log r28:
1. Fixed some missing hardcoded paths in tep_image function
2. Removed support for 2.3.4 standard (non BS) and previous versions
3. Added modified product_info gallery module with KissIt thumbnail support. For 2,3,4,1, CE Frozen modularized product info page.
Link to comment
Share on other sites

  • 3 weeks later...

2 questions.

When updating do you uninstall previous version or just overwrite the files? I just overwritten the files and reset thumbnailer.

 getting this error

PHP Notice:  Could not extract image size. in catalog/includes/modules/kiss_image_thumbnailer/classes/Image.php on line 181

PHP Warning:  Division by zero in catalog/includes/modules/kiss_image_thumbnailer/classes/Image.php on line 264

Anyway quick way to find the image that may be causing this. I have some html with images and wondering if that could be the problem. Have images set to width 100% height not set.

"Do what I'm thinking Not what I said." https:windowanddoorparts.us

Link to comment
Share on other sites

You can just overwrite the files.

There is nothing changed in the new version what could produce this error.

You should set the image sizes both, width and height or none and better fixed px sizes. Anyway the image-responsive class is used, so sizes will be adapted to available space.

html with images shouldn't be a problem. KissIt image thumbs are only created if using tep_image function. If using <img src=... it doesn't interact.

Edited by raiwa
Link to comment
Share on other sites

  • 2 weeks later...

Hello @raiwa

For some unknown reason my products main image does not load/display when there are more images for the product.
Colorbox layout = 1113

Now stuck trying to find what is the cause
I have disabled as many page modules and Header Tags as I can
Using older site merged with Frozen updates
 
In Chrome inspect also no reference to main image

  <?php echo $pi_output;
    echo
'1 product id: ' . $product_info['products_id'] . '<br>' .
'2 pi_counter = ' . $pi_counter . '<br>'.
'3 kW x kH: ' . KISSIT_MAIN_PRODUCT_IMAGE_WIDTH .' x ' . KISSIT_MAIN_PRODUCT_IMAGE_HEIGHT . '<br>' .
 '4: products_image = ' . $product_info['products_image'] . '<br>';
   ?>

So then:

1 product id: 2043
2 pi_counter = 1
3 kW x kH: 250 x 250
4: products_image = Front_big.jpg

I have not used any htmlcontent for any images

Please let me know if anything comes to mind on this, I would appreciate it.

Getting the Phoenix off the ground

Link to comment
Share on other sites

Hello Pierre @Peper,

If you wish to show the same main image which shows in the product listings on the product info page, you have to repeat it as the first big image. Always if you use more than one image. If you use only one image, the main image is used as the only big image.

This is coded like this since OsC 2.3., nothing to do with KissIt image thumbs.

 

best regards

Rainer

Link to comment
Share on other sites

 @raiwa Rainer, I've been doing it wrong for few years, that's how I thought it should work.

So you are saying load the cm_pi_gallery.php and the cm_pi_gallery_kissit.php for products page.

What does this code do in cm_pi_gallery_kissit? I can see its calling the main image $product_info['products_image'] - or is it ..else { if no smaller images show main image only

else {
          list($width, $height) = file_exists('images/' . $product_info['products_image'])? getimagesize('images/' . $product_info['products_image']) : array(150,150); 
          $pi_output .= '<div class="piGal">';

...

Getting the Phoenix off the ground

Link to comment
Share on other sites

Sorry, not sure if I understand your question.

1. the kiss it module replaces the standard module

See instructions:

OsC 2.3.4.1 CE Frozen:

In: admin => Modules => Content Modules:

Uninstall: Gallery [product_info]

Install : Gallery KissIt [product_info]

 

2. the code you posted says: use the main image if no big image is available, this is the same in standard and kissit module.

Link to comment
Share on other sites

@raiwa

Ok, I see now. i checked on a default install of CE frozen, the main image also is added in admin and the result is the same as what i'm getting

Your addon is doing what it should but as soon as there are 2 or more images added in admin the 1st image is omitted and does not display in catalog

 

pic.jpg

 

What is the purpose for the Products "Main Image" in admin

Edited by Peper

Getting the Phoenix off the ground

Link to comment
Share on other sites

It allows to use a smaller or different image in product listings

 

Link to comment
Share on other sites

  • 3 weeks later...

I have added this wonderful addon to my latest CE version-

One thing there is a bug that shows up on the live side of product info.php-

The images have a extra /> at each end

The Error debug Console displays the following which shall elaborate what I am trying to say...

<img src="images/aura-of-diamond.jpg" alt="Aura Of Daimond Krishna Crown 1" title="Aura Of Daimond Krishna Crown 1" class="img-responsive" id="piGalImg_1" <img="" width="400" height="300"></img>   />

Code causing it is from cm_pi_gallery_kissit.php

 $pi_output .=  tep_image('images/' . $pi['image'], htmlspecialchars ($product_info['products_name']) . ' ' . $pi_counter, (($pi_counter > 1 )? round(KISSIT_MAIN_PRODUCT_IMAGE_WIDTH/(($pi_total <= 5)? $pi_total-1 : 5)) : KISSIT_MAIN_PRODUCT_IMAGE_WIDTH), (($pi_counter > 1 )? round(KISSIT_MAIN_PRODUCT_IMAGE_HEIGHT/(($pi_total <= 5)? $pi_total-1 : 5)) : KISSIT_MAIN_PRODUCT_IMAGE_HEIGHT), 'id="piGalImg_' . $pi_counter . '" '. ((KISSIT_MAIN_PRODUCT_WATERMARK_SIZE > 0)? preg_replace('%<img width="[0-9 ]+" height="[0-9 ]+" src="(.*)title=.+%', 'data-highres="$1', tep_image('images/' . $pi['image'], null, $width, $height)) : 'data-highres="'. 'images/' . $pi['image'] . '"'));
          }  

Any help fixing this would be deeply appreciated...

Regds./

radhavallabh

Edited by radhavallabh
Link to comment
Share on other sites

Hello @radhavallabh,

Your output looks strange:

- you have no image size values

- your image is not a kiss it thumbnail, it is a normal image instead

I get this output if only the main image is used:

<div class="piGal"><img width="250" height="250" src="images/thumbs/250_250/microsoft/intkeyboardps2.gif" title="Microsoft Internet Keyboard PS/2" alt="Microsoft Internet Keyboard PS/2" class="img-responsive" data-highres="images/microsoft/intkeyboardps2.gif" /></div></div>

and this if additional big images are used:

<div class="piGal" data-imgcount="155"><img width="250" height="250" src="images/thumbs/250_250/samsung/galaxy_tab_1.jpg" title="Samsung Galaxy Tab 1" alt="Samsung Galaxy Tab 1" class="img-responsive" id="piGalImg_1" data-highres="images/thumbs/640_480/samsung/galaxy_tab_1.jpg" /><img width="83" height="83" src="images/thumbs/83_83/samsung/galaxy_tab_2.jpg" title="Samsung Galaxy Tab 2" alt="Samsung Galaxy Tab 2" class="img-responsive" id="piGalImg_2" data-highres="images/thumbs/640_480/samsung/galaxy_tab_2.jpg" /><img width="83" height="83" src="images/thumbs/83_83/samsung/galaxy_tab_3.jpg" title="Samsung Galaxy Tab 3" alt="Samsung Galaxy Tab 3" class="img-responsive" id="piGalImg_3" data-highres="images/thumbs/640_480/samsung/galaxy_tab_3.jpg" /><img width="83" height="83" src="images/thumbs/83_83/samsung/galaxy_tab_4.jpg" title="Samsung Galaxy Tab 4" alt="Samsung Galaxy Tab 4" class="img-responsive" id="piGalImg_4" data-highres="images/thumbs/640_480/samsung/galaxy_tab_4.jpg" /></div><div hidden><div id="piGalDiv_4"><iframe width="560" height="315" src="http://www.youtube.com/embed/tAbsmHMAhrQ" frameborder="0" allowfullscreen></iframe></div></div></div>

Can you please provide more info:

- your exact oscommerce version is the latest 2.3.4.1 CE Frozen release, please confirm

- you are using the latest kissit image thumbnailer version 2.8.1., please confirm

- you are using the image gallery content module provided with kiss it image thumbnaile and it is unmodified, please confirm

- your relevant kissit image thumbnailer configuration values are the original settings, please confirm or post the settings

- please explain any changes you applied to the image settings if they are not standard

Thanks and best regards

Rainer

Edited by raiwa
Link to comment
Share on other sites

@raiwa

hi raiwan,

thank you for this addon. I had installed this addon, and got error message, google online for answer, but not many related post. Ask server company not respond it yet. Here is the error message:

Fatal error: Call to undefined function tep_image_legacy() in /includes/functions/html_output.php on line 100

if ( !is_numeric ( $width ) || !is_numeric ( $height ) || $original_img_size[0] < KISSIT_MIN_IMAGE_SIZE || $original_img_size[1] < KISSIT_MIN_IMAGE_SIZE ) return tep_image_legacy( $src, $alt, $width, $height, $parameters, $responsive, $bootstrap_css );


what should I do to fix this error so the front end show properly without error message, by the way the admin has no error message, seems working fine.

Thanks. Lyn

PS. Extra info

my oscomerce version is 234.1 Edge
Server Info

   
   
   
Apache Version 2.4.33
PHP Version 5.6.36
MySQL Version 5.6.39
Architecture x86_64
Operating System linux
   
Path to Sendmail /usr/sbin/sendmail
Path to Perl /usr/bin/perl
Perl Version 5.10.1
Kernel Version 3.10.0-714.10.2.lve1.5.17.el6h.x86_64
Edited by ce7
Link to comment
Share on other sites

10 hours ago, raiwa said:

Hello @radhavallabh,

Your output looks strange:

- you have no image size values

- your image is not a kiss it thumbnail, it is a normal image instead

I get this output if only the main image is used:


<div class="piGal"><img width="250" height="250" src="images/thumbs/250_250/microsoft/intkeyboardps2.gif" title="Microsoft Internet Keyboard PS/2" alt="Microsoft Internet Keyboard PS/2" class="img-responsive" data-highres="images/microsoft/intkeyboardps2.gif" /></div></div>

and this if additional big images are used:


<div class="piGal" data-imgcount="155"><img width="250" height="250" src="images/thumbs/250_250/samsung/galaxy_tab_1.jpg" title="Samsung Galaxy Tab 1" alt="Samsung Galaxy Tab 1" class="img-responsive" id="piGalImg_1" data-highres="images/thumbs/640_480/samsung/galaxy_tab_1.jpg" /><img width="83" height="83" src="images/thumbs/83_83/samsung/galaxy_tab_2.jpg" title="Samsung Galaxy Tab 2" alt="Samsung Galaxy Tab 2" class="img-responsive" id="piGalImg_2" data-highres="images/thumbs/640_480/samsung/galaxy_tab_2.jpg" /><img width="83" height="83" src="images/thumbs/83_83/samsung/galaxy_tab_3.jpg" title="Samsung Galaxy Tab 3" alt="Samsung Galaxy Tab 3" class="img-responsive" id="piGalImg_3" data-highres="images/thumbs/640_480/samsung/galaxy_tab_3.jpg" /><img width="83" height="83" src="images/thumbs/83_83/samsung/galaxy_tab_4.jpg" title="Samsung Galaxy Tab 4" alt="Samsung Galaxy Tab 4" class="img-responsive" id="piGalImg_4" data-highres="images/thumbs/640_480/samsung/galaxy_tab_4.jpg" /></div><div hidden><div id="piGalDiv_4"><iframe width="560" height="315" src="http://www.youtube.com/embed/tAbsmHMAhrQ" frameborder="0" allowfullscreen></iframe></div></div></div>

Can you please provide more info:

- your exact oscommerce version is the latest 2.3.4.1 CE Frozen release, please confirm

- you are using the latest kissit image thumbnailer version 2.8.1., please confirm

- you are using the image gallery content module provided with kiss it image thumbnaile and it is unmodified, please confirm

- your relevant kissit image thumbnailer configuration values are the original settings, please confirm or post the settings

- please explain any changes you applied to the image settings if they are not standard

Thanks and best regards

Rainer

Hi,

I am using latest 2.3.4.1 CE Frozen release.. AND latest Kissitthumbnailer version using all files intact unedited.

Sorry it was my silly mistake while going through again I realized.. I forgot to save the html_output.php edited file. It works like a charm now.:biggrin:

I HAD A QUERY IS IT POSSIBLE TO LOCK THE RIGHT CLICK FUNCTION ON THE IMAGES AND LOCK THE IMAGE TO AVOID THE USERS TO DOWNLOAD THEM ON DESKTOP OR MOBILE..I REALLY NEED THIS TO GET WORKING..

 

THANK YOU

WARM REGDS.

RADHAVALLABH

 

 

Link to comment
Share on other sites

2 hours ago, ce7 said:

Fatal error: Call to undefined function tep_image_legacy() in /includes/functions/html_output.php on line 100

@ce7It has been a long time since I installed this add-on but don't you need to add that function when you install it?

Dan

Link to comment
Share on other sites

6 hours ago, Dan Cole said:

@ce7It has been a long time since I installed this add-on but don't you need to add that function when you install it?

Dan

@Dan Cole
hi Dan,

I follow the install instruction. It does said that request that function. Normally it will be defined in catalog/includes/functions/general.php ?

I did installed other addons, but I never delete the code, just comment the code out, so when I do search, i can no find this function.....my oscommerce version is 234.1 Edge, any hit where i can find the code, thanks!

Link to comment
Share on other sites

@ce7,

The original tep_image function is renamed to tep_image_legacy when you apply the kiss it image modifications to includes/functions/html_output.php (not general.php).

So you should have the following below the modified tep_image function:

////
// The HTML image wrapper function
  function tep_image_legacy($src, $alt = '', $width = '', $height = '', $parameters = '', $responsive = true, $bootstrap_css = '') {
    if ( (empty($src) || ($src == 'images/')) && (IMAGE_REQUIRED == 'false') ) {
      return false;
    }

Please revise your modifications and apply exact what is said in the instructions. Do not comment out anything additional on your own.

Link to comment
Share on other sites

14 hours ago, ce7 said:

@Dan Cole
hi Dan,

I follow the install instruction. It does said that request that function. Normally it will be defined in catalog/includes/functions/general.php ?

I did installed other addons, but I never delete the code, just comment the code out, so when I do search, i can no find this function.....my oscommerce version is 234.1 Edge, any hit where i can find the code, thanks!

Per the instructions...

Find these lines ( lines 74-76 in a standard osCommerce 2.3.4 ) ..

 

///

// The HTML image wrapper function

  function tep_image($src, $alt = '', $width = '', $height = '', $parameters = '', $responsive = true, $bootstrap_css = '') {

Replace with the following:

////

// New HTML image wrapper function modified for KISS Image Thumbnailer by FWR Media

  function tep_image($src, $alt = '', $width = '', $height = '', $parameters = '', $responsive = true, $bootstrap_css = '') {

    // Include the Database installation file if executed for the first time.

    if ( !defined('KISSIT_SHARPEN_THUMBNAIL') ) require_once 'includes/modules/kiss_image_thumbnailer/db_install.php';

    // If width and height are not numeric then we can't do anything with it

    // If original image width and height are less than KISSIT_MIN_IMAGE_SIZE, we do not need a thumb

    if ( is_file($src ) ) {

      $original_img_size = getimagesize($src);

      if ( !is_numeric ( $width ) || !is_numeric ( $height ) || $original_img_size[0] < KISSIT_MIN_IMAGE_SIZE || $original_img_size[1] < KISSIT_MIN_IMAGE_SIZE ) return tep_image_legacy( $src, $alt, $width, $height, $parameters, $responsive, $bootstrap_css );

    } else {

      if ( !is_numeric ( $width ) || !is_numeric ( $height ) ) return tep_image_legacy( $src, $alt, $width, $height, $parameters, $responsive, $bootstrap_css );

    }

 

Link to comment
Share on other sites

16 hours ago, raiwa said:

@ce7,

The original tep_image function is renamed to tep_image_legacy when you apply the kiss it image modifications to includes/functions/html_output.php (not general.php).

So you should have the following below the modified tep_image function:


////
// The HTML image wrapper function
  function tep_image_legacy($src, $alt = '', $width = '', $height = '', $parameters = '', $responsive = true, $bootstrap_css = '') {
    if ( (empty($src) || ($src == 'images/')) && (IMAGE_REQUIRED == 'false') ) {
      return false;
    }

Please revise your modifications and apply exact what is said in the instructions. Do not comment out anything additional on your own.

hi raiwa,

Thank you for point out my problem. After reading your post, i went back to recheck my file, I comment out and did not copy the rename part, that is why the problem happened. Thank you!!!

anther question, if i like to change the location where the thumbnails save, like from catalog/images/   to catalog/images/thumbnails/  what should I do?
 

Lyn

 

Link to comment
Share on other sites

4 hours ago, ce7 said:

anther question, if i like to change the location where the thumbnails save, like from catalog/images/   to catalog/images/thumbnails/  what should I do

@ce7, you should read the installation doc: :wink:

Check and adjust the Configuration Settings in Admin for your needs:

O.

Link to comment
Share on other sites

39 minutes ago, raiwa said:

@ce7, you should read the installation doc: :wink:

Check and adjust the Configuration Settings in Admin for your needs:

O.

@raiwa
Hi...raiwa,

I am not native English speaker, so misunderstood sometimes :blush:
with the 234.1 Edge version of the product_info.php i have, i am trying hard to figure out how to put code, but it is too hard, this is the file I have:

	<?php
/*
  $Id$
	  osCommerce, Open Source E-Commerce Solutions
  http://www.oscommerce.com
	  Copyright (c) 2010 osCommerce
	  Released under the GNU General Public License
*/
	  require('includes/application_top.php');
	  if (!isset($_GET['products_id'])) {
    tep_redirect(tep_href_link('index.php'));
  }
	  require('includes/languages/' . $language . '/product_info.php');
	  $product_check_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int)$_GET['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'");
  $product_check = tep_db_fetch_array($product_check_query);
	  require('includes/template_top.php');
	  if ($product_check['total'] < 1) {
?>
	<div class="contentContainer">
	  <div class="row">
    <?php echo $oscTemplate->getContent('product_info_not_found'); ?>
  </div>
 
</div>
	<?php
  } else {
    $product_info_query = tep_db_query("select p.products_id, pd.products_name, pd.products_description, p.products_model, p.products_quantity, p.products_image, pd.products_url, p.products_price, p.products_tax_class_id, p.products_date_added, p.products_date_available, p.manufacturers_id, p.products_gtin from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int)$_GET['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'");
    $product_info = tep_db_fetch_array($product_info_query);
	    tep_db_query("update " . TABLE_PRODUCTS_DESCRIPTION . " set products_viewed = products_viewed+1 where products_id = '" . (int)$_GET['products_id'] . "' and language_id = '" . (int)$languages_id . "'");
	?>
	<?php echo tep_draw_form('cart_quantity', tep_href_link('product_info.php', tep_get_all_get_params(array('action')). 'action=add_product', 'NONSSL'), 'post', 'class="form-horizontal" role="form"'); ?>
	<?php
  if ($messageStack->size('product_action') > 0) {
    echo $messageStack->output('product_action');
  }
?>
	<div class="contentContainer">
	  <div class="row is-product">
    <?php echo $oscTemplate->getContent('product_info'); ?>
  </div>
	</div>
	</form>
	<?php
  }
  require('includes/template_bottom.php');
  require('includes/application_bottom.php');
?>
	


I dont know much about PHP, only memory long time ago at uni for basic c++, so excuse me if i ask silly questions :unsure:  thank you!

Link to comment
Share on other sites

You do not have to modify anything in product_info.php if you are using the latest modularized version.

modify product info:

OsC 2.3.4.1 CE Frozen:

In: admin => Modules => Content Modules:

Uninstall: Gallery [product_info]

 

Install : Gallery KissIt [product_info]

I believe this is not difficult to understand, even for non native speakers :wink:, but of course, you have to read it.

 

Please understand: I spent a lot of time writing the instructions. So I do not like to spent again time to explain what has been already explained in the instructions.

1. you should follow the instructions and not change code on your own and then come here and complain that something doesn't work

2. If you do not understand enough english, use google translater, it is really very basic language what is used in the instructions.

3. Sorry, but I don't have the impression that you didn't understand the instructions. I have the impression that you just didn't read them.

 

Edited by raiwa
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...