Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Contribution] Additional Images Module


Parikesit

Recommended Posts

surfalot, it looks very nice and more customization on v2.0.0.

But I have a problem and want you to help me out. While saving added image on thumb image field at the product edit page, it appears on next page that Fatal error: Call to undefined function: imagecreatefromjpeg() in D:\www\catalog\admin\includes\classes\alterimage.php on line 220.

Sorry if I confuse you coz I'm very new user. Thanksss.

Link to comment
Share on other sites

Hello, has install module (Version v2.0.0) All it was perfectly installed, but the opportunity to add additional images and has not appeared. Can something be wrong I specify in a configuration?

 

img_1.gif

 

 

img_2.gif

Link to comment
Share on other sites

im getting this error, Fatal error: Call to undefined function: imagecreatefromgif() in /***********/admin/includes/classes/alterimage.php on line 232, any ideas?

you don't have GD functions compiled into your PHP at your web host. ask them to provide GD 2.0 functions in your PHP.

You should still be able to use this contribution. You just can't use the Image sizing portion.

you have 2 choices:

1. if you want 3 sizes, you will have to create the 3 image set manually and upload each in their appropriate upload box.

2. If you want to upload only one image size (just like the original osCommerce product image) you can simply upload the one image in the Thumb or Single Image spot.

Link to comment
Share on other sites

surfalot, it looks very nice and more customization on v2.0.0.

But I have a problem and want you to help me out. While saving added image on thumb image field at the product edit page, it appears on next page that Fatal error: Call to undefined function: imagecreatefromjpeg() in D:\www\catalog\admin\includes\classes\alterimage.php on line 220.

Sorry if I confuse you coz I'm very new user. Thanksss.

see above post.

 

quote-ith the abstract:

PHP GD 2.0 and PHP 4.3.2 and better are required for processing images. You may use this

contribution without the image processing if your host does not meet the

requirements.

Link to comment
Share on other sites

Hello, has install module (Version v2.0.0) All it was perfectly installed, but the opportunity to add additional images and has not appeared. Can something be wrong I specify in a configuration?

quote-ith the Getting Started section of the doc:

 

 

ADDITIONAL IMAGES

-----------------

 

After a successful install the product edit page and the product/category list

pages should show features for the Additional Images. On the Product edit page

you will now see 3 product image upload locations. These are for the primary or

default image with every product. You must fill this image location first for

every product before adding additional images.

 

One-step-back from the Product edit page is the product/catagory list pages.

when you have a product selected, the right side tab will show the product summary

and a button to add an additional image.

 

have you read that and not understude where to look, or read it but didn't find it where it is suppose to be, or did you not read this? B)

Link to comment
Share on other sites

Hi Todd ( surfalot ), thanks for your great effort. I 've read many posts here in regards of having more pictures saved for a product.

 

I decide to try your version of More Pics 6 V1.2 contributions. Nevertheless, I notice that you had uploaded a latest version of Additional Images V2.0 recently. I'm wondering

 

What is the main difference between " More_pics_6 V1.2" and " Additional Images V2.0 " ?

 

( i've just wanted to add extra pictures to the product . ) Which one is better , " More_pics_6 V1.2" or " Additional Images V2.0 " ?

 

Regards

Jason

Link to comment
Share on other sites

Hi Todd ( surfalot ), thanks for your great effort. I 've read many posts here in regards of having more pictures saved for a product.

 

I decide to try your version of More Pics 6 V1.2 contributions. Nevertheless, I notice that you had uploaded a latest version of Additional Images V2.0 recently. I'm wondering

 

What is the main difference between " More_pics_6 V1.2" and " Additional Images V2.0 " ?

 

( i've just wanted to add extra pictures to the product . ) Which one is better , " More_pics_6 V1.2" or " Additional Images V2.0 " ?

 

Regards

Jason

Additional Images V2.0 has many more features, see the contribution for details. More Pics is easier to install. More Pics is limited to 6 pics, AI has unlimited per product.

Link to comment
Share on other sites

Many thanks Todd. :D

 

As usual with Surfalot contributions: works like Swiss Clockwork, my choice for #1 image contribution.

 

Beware: back-up before you start, because install is not for the fainthearted ("faint heart ne'er won fair lady")

"If you're working on something new, then you are necessarily an amateur."

Link to comment
Share on other sites

Additional Images V2.0 has many more features, see the contribution for details. More Pics is easier to install. More Pics is limited to 6 pics, AI has unlimited per product.

 

thanks , todd . I will then install AI V2.0 , thanks !!

Link to comment
Share on other sites

Hi todd

 

I've installed Additional Images V2.0 . it works great . thanks for your effort.

 

but I may have a small problem. Everytime I added an extra image or updated the value in admin -> Category -> additional Images Manual, it goes to a blank page. I've to click " back " button and reload the page at IE7. The value undated and the image was added successfully.

 

Do you have any clue what I might have mess up or miss ? what should I check ? appreciate if you may help.

 

Regards

Jason

Link to comment
Share on other sites

Hi todd

 

I've installed Additional Images V2.0 . it works great . thanks for your effort.

 

but I may have a small problem. Everytime I added an extra image or updated the value in admin -> Category -> additional Images Manual, it goes to a blank page. I've to click " back " button and reload the page at IE7. The value undated and the image was added successfully.

 

Do you have any clue what I might have mess up or miss ? what should I check ? appreciate if you may help.

 

Regards

Jason

 

i think I had the similar problem with other part of manual in admin -> , it goes to a blank page everytime I update the value in admin, not limited to additiona images. I had this problem after installing additional iamges. I think I might revised some file incorrectly. but what should I look into ?? appreciate much if someone may give me some hints.

Link to comment
Share on other sites

i think I had the similar problem with other part of manual in admin -> , it goes to a blank page everytime I update the value in admin, not limited to additiona images. I had this problem after installing additional iamges. I think I might revised some file incorrectly. but what should I look into ?? appreciate much if someone may give me some hints.

where you see

error_reporting(E_ALL & ~E_NOTICE);

in includes/application_top.php, change to:

error_reporting(E_ALL);

 

any difference?

Link to comment
Share on other sites

where you see

error_reporting(E_ALL & ~E_NOTICE);

in includes/application_top.php, change to:

error_reporting(E_ALL);

 

any difference?

 

hi todd , nice to hear from you.

 

I've try the above, but no difference.

 

<?php
   /*
     $Id: application_top.php,v 1.280 2003/07/12 09:38:07 hpdl Exp $

     osCommerce, Open Source E-Commerce Solutions
     [url="http://www.oscommerce.com"]http://www.oscommerce.com[/url]

     Copyright © 2003 osCommerce

     Released under the GNU General Public License
   */

   // start the timer for the page parse time log
     define('PAGE_PARSE_START_TIME', microtime());

   // set the level of error reporting

  error_reporting(E_ALL & ~E_NOTICE);

   // check if register_globals is enabled.
   // since this is a temporary measure this message is hardcoded. The requirement will be removed before 2.2 is finalized.
     if (function_exists('ini_get')) {
       ini_get('register_globals') or exit('Server Requirement Error: register_globals is disabled in your PHP configuration. This can be enabled in your php.ini configuration file or in the .htaccess file in your catalog directory.');
     }

 

I've checked all the edit files once again, I'm wondering if upload.php (under admin/includes/classes ) may affect

 

here is the part of upload.php which I'm not sure if it was correct

 

          if ( tep_not_null($file['tmp_name']) && ($file['tmp_name'] != 'none') && is_uploaded_file($file['tmp_name']) ) {
           if (sizeof($this->extensions) > 0) {
             if (!in_array(strtolower(substr($file['name'], strrpos($file['name'], '.')+1)), $this->extensions)) {
               if ($this->message_location == 'direct') {
                 $messageStack->add(ERROR_FILETYPE_NOT_ALLOWED, 'error');
  // BOF: Additional Images
            } elseif ($this->message_location == 'session') {
  // EOF: Additional Images
/*
            } else {
*/
                 $messageStack->add_session(ERROR_FILETYPE_NOT_ALLOWED, 'error');
               }

               return false;
             }
           }

 

the probelm is : When I edit something or undate the products page in admin. I was redirect to a blank page. I need to navigate back using backbutton and reload the page. the value was actually updated or the image was actually saved successfully. it was fine. but I don't know why it direct to a blank page after. Is there any file I might check ?

 

 

The problem so far is related to the admin pannel. The store looks fine. and the pictures look great. thanks for your effort in this great contribution , todd.

 

Jason

Link to comment
Share on other sites

where you see

error_reporting(E_ALL & ~E_NOTICE);

in includes/application_top.php, change to:

error_reporting(E_ALL);

 

any difference?

 

Hi todd ,

 

after change it error_reporting(E_ALL & ~E_NOTICE); to error_reporting(E_ALL)

 

although i see no difference in admin pannel , i see error message in my store cataloge page now after the above change.

 

 

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at mydomain.com/public_html/shop/includes/filenames.php:1) in mydomain.com/public_html/shop/includes/functions/sessions.php on line 97

 

Notice: Use of undefined constant FILENAME_ALLPRODS - assumed 'FILENAME_ALLPRODS' in mydomain.com/public_html/shop/includes/header_tags.php on line 15

 

Notice: Use of undefined constant FILENAME_ALLPRODS - assumed 'FILENAME_ALLPRODS' in mydomain.com/public_html/shop/includes/header_tags.php on line 15

 

Notice: Undefined variable: the_manufacturers in

mydomain.com/public_html/shop/includes/header_tags.php on line 110

 

 

I've installed also HeaderTags_V_2.6.2 . should I look in those files once again ? regards Jason

Edited by jasonwai
Link to comment
Share on other sites

Hi todd ,

 

after change it error_reporting(E_ALL & ~E_NOTICE); to error_reporting(E_ALL)

 

although i see no difference in admin pannel , i see error message in my store cataloge page now after the above change.

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at mydomain.com/public_html/shop/includes/filenames.php:1) in mydomain.com/public_html/shop/includes/functions/sessions.php on line 97

 

Notice: Use of undefined constant FILENAME_ALLPRODS - assumed 'FILENAME_ALLPRODS' in mydomain.com/public_html/shop/includes/header_tags.php on line 15

 

Notice: Use of undefined constant FILENAME_ALLPRODS - assumed 'FILENAME_ALLPRODS' in mydomain.com/public_html/shop/includes/header_tags.php on line 15

 

Notice: Undefined variable: the_manufacturers in

mydomain.com/public_html/shop/includes/header_tags.php on line 110

I've installed also HeaderTags_V_2.6.2 . should I look in those files once again ? regards Jason

yes. each of those, although seemingly minor, can contribute to blank pages.

 

the first one listed is most likely an extra CR or spaces after the end php tag "?>" at the end of the file

FILENAME_ALLPRODS needs to be defined in includes/filenames.php

don't have a clue what "the_manufacturers" is or why it's not $the_manufacturers

Link to comment
Share on other sites

here is the part of upload.php which I'm not sure if it was correct

 

          if ( tep_not_null($file['tmp_name']) && ($file['tmp_name'] != 'none') && is_uploaded_file($file['tmp_name']) ) {
           if (sizeof($this->extensions) > 0) {
             if (!in_array(strtolower(substr($file['name'], strrpos($file['name'], '.')+1)), $this->extensions)) {
               if ($this->message_location == 'direct') {
                 $messageStack->add(ERROR_FILETYPE_NOT_ALLOWED, 'error');
  // BOF: Additional Images
            } elseif ($this->message_location == 'session') {
  // EOF: Additional Images
/*
            } else {
*/
                 $messageStack->add_session(ERROR_FILETYPE_NOT_ALLOWED, 'error');
               }

               return false;
             }
           }

 

the probelm is : When I edit something or undate the products page in admin. I was redirect to a blank page. I need to navigate back using backbutton and reload the page. the value was actually updated or the image was actually saved successfully. it was fine. but I don't know why it direct to a blank page after. Is there any file I might check ?

The problem so far is related to the admin pannel.

Jason

that change looks right. the change is to replace the } else { line in each case in the file.

Link to comment
Share on other sites

the probelm is : When I edit something or undate the products page in admin. I was redirect to a blank page. I need to navigate back using backbutton and reload the page. the value was actually updated or the image was actually saved successfully. it was fine. but I don't know why it direct to a blank page after. Is there any file I might check ?

Maybe i can help with a simple trick.

You can easily do that on your "local" server.

Just copy all the files in: 1_files_to_upload and in: 2_files_to_compare from the contribution, over a clean new osC-install.

Than use a compare programm like WinMerge to compare your actual shop (which has the error), with the clean install (including the contribution).

Take a look at the list of files to be modified under: C. FILES MODIFICATION (EDIT) in the: install-readme.txt and start checking/comparing those files for a start. I'm sure you will easily find the problem.

And if the error is not caused by any other contribution you will the solution.

Edited by berkedam

"If you're working on something new, then you are necessarily an amateur."

Link to comment
Share on other sites

Maybe i can help with a simple trick.

You can easily do that on your "local" server.

Just copy all the files in: 1_files_to_upload and in: 2_files_to_compare from the contribution, over a clean new osC-install.

Than use a compare programm like WinMerge to compare your actual shop (which has the error), with the clean install (including the contribution).

Take a look at the list of files to be modified under: C. FILES MODIFICATION (EDIT) in the: install-readme.txt and start checking/comparing those files for a start. I'm sure you will easily find the problem.

And if the error is not caused by any other contribution you will the solution.

 

 

thanks. i'm checking the modified files with the stock ones. In admin/categories.php, I'm wondering if there is " } " immediately after " //EOF:Additional Images " (about 298 lines ) ......

 

            if ($HTTP_POST_VARS['products_image_pop'] != $del_products['products_image_pop']) {
              $sql_data_array['products_image_pop'] = tep_db_prepare_input($HTTP_POST_VARS['products_image_pop']);
            } elseif (isset($HTTP_POST_VARS['delete_image_pop']) && tep_not_null($HTTP_POST_VARS['delete_image_pop'])) {
              tep_db_query("update " . TABLE_PRODUCTS . " set products_image_pop = NULL where products_id = '" . (int)$products_id . "' limit 1");
            }
          }
          // EOF: Additional Images
          }    
             if ($action == 'insert_product') {
               $insert_sql_data = array('products_date_added' => 'now()');

Link to comment
Share on other sites

thanks. i'm checking the modified files with the stock ones. In admin/categories.php, I'm wondering if there is " } " immediately after " //EOF:Additional Images " (about 298 lines ) ......

 

No, not in the files to compare.

 

		  if (isset($HTTP_POST_VARS['products_image_pop']) && tep_not_null($HTTP_POST_VARS['products_image_pop']) && ($HTTP_POST_VARS['products_image_pop'] != 'none')) {
		if ($HTTP_POST_VARS['products_image_pop'] != $del_products['products_image_pop']) {
		  $sql_data_array['products_image_pop'] = tep_db_prepare_input($HTTP_POST_VARS['products_image_pop']);
		} elseif (isset($HTTP_POST_VARS['delete_image_pop']) && tep_not_null($HTTP_POST_VARS['delete_image_pop'])) {
		  tep_db_query("update " . TABLE_PRODUCTS . " set products_image_pop = NULL where products_id = '" . (int)$products_id . "' limit 1");
		}
	  }
	  // EOF: Additional Images

	  if ($action == 'insert_product') {
		$insert_sql_data = array('products_date_added' => 'now()');

		$sql_data_array = array_merge($sql_data_array, $insert_sql_data);

		tep_db_perform(TABLE_PRODUCTS, $sql_data_array);
		$products_id = tep_db_insert_id();

		tep_db_query("insert into " . TABLE_PRODUCTS_TO_CATEGORIES . " (products_id, categories_id) values ('" . (int)$products_id . "', '" . (int)$current_category_id . "')");
	  } elseif ($action == 'update_product') {

Link to comment
Share on other sites

No, not in the files to compare.

 

		  if (isset($HTTP_POST_VARS['products_image_pop']) && tep_not_null($HTTP_POST_VARS['products_image_pop']) && ($HTTP_POST_VARS['products_image_pop'] != 'none')) {
		if ($HTTP_POST_VARS['products_image_pop'] != $del_products['products_image_pop']) {
		  $sql_data_array['products_image_pop'] = tep_db_prepare_input($HTTP_POST_VARS['products_image_pop']);
		} elseif (isset($HTTP_POST_VARS['delete_image_pop']) && tep_not_null($HTTP_POST_VARS['delete_image_pop'])) {
		  tep_db_query("update " . TABLE_PRODUCTS . " set products_image_pop = NULL where products_id = '" . (int)$products_id . "' limit 1");
		}
	  }
	  // EOF: Additional Images

	  if ($action == 'insert_product') {
		$insert_sql_data = array('products_date_added' => 'now()');

		$sql_data_array = array_merge($sql_data_array, $insert_sql_data);

		tep_db_perform(TABLE_PRODUCTS, $sql_data_array);
		$products_id = tep_db_insert_id();

		tep_db_query("insert into " . TABLE_PRODUCTS_TO_CATEGORIES . " (products_id, categories_id) values ('" . (int)$products_id . "', '" . (int)$current_category_id . "')");
	  } elseif ($action == 'update_product') {

 

Hi Todd

 

Thanks for your help. I've compared all the modifired files again and again. with the stock OSC and with files before modification, but do not have a clue why the admin page goes blank when trying to edit the value in the admin pannel. Besides, the value was actually entered successfully but I do not why it goes to blank page. I've to press the back button and reload the page.

 

I like the features that Additional Images provided and do not want to uninstall this contribution. I'm still trying to find a solution.

 

Jason

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...