Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Contribution] Additional Images Module


Parikesit

Recommended Posts

Update: I renamed the "oscommerce_products" table to simply "products", but since the error concerning header.php is showing up when I try to reach the page and/or the admin area I can't really say if that helped or not... :'(

don't rename tables on your shop. most likely the shop was setup with non-standard tables for some reason.

 

the missing function in that error is a function in this file /catalog/admin/includes/functions/html_output.php

Link to comment
Share on other sites

I can help you change the additional images configurer so that it will work with your non-standard tables if you try again. if you get all your files restored, the errors should go away.

Link to comment
Share on other sites

I can help you change the additional images configurer so that it will work with your non-standard tables if you try again. if you get all your files restored, the errors should go away.

 

 

I shut the computer down and went for some lunch and coffee at McDonalds and that seemed to be trick with the "header-issue". It's currently working, without me doing anything in particular... :P

 

But I'd still GREATLY appreciate some help getting the contrib to work, returning back to the missing table-issue. I can't do without it actually since I'll be selling used goods and have to be able to present detailed pictures..

 

I'm located in Sweden, with a swedish webhost (spray.se) and have installed OSC using something called "Spray OneClickSite". When installing OSC to the server I've chosen Swedish as prefered language. Could this have something to do with the tables not having standard names?

 

Thanks again for your time... :blush:

Edited by VintageManiac
Link to comment
Share on other sites

I shut the computer down and went for some lunch and coffee at McDonalds and that seemed to be trick with the "header-issue". It's currently working, without me doing anything in particular... :P

 

But I'd still GREATLY appreciate some help getting the contrib to work, returning back to the missing table-issue. I can't do without it actually since I'll be selling used goods and have to be able to present detailed pictures..

 

I'm located in Sweden, with a swedish webhost (spray.se) and have installed OSC using something called "Spray OneClickSite". When installing OSC to the server I've chosen Swedish as prefered language. Could this have something to do with the tables not having standard names?

 

Thanks again for your time... :blush:

your host must be offering a modified version. you will have lots more problems with contributions if they have changed table names.

Link to comment
Share on other sites

When I go to "New Product" I still only see 1 image upload box.

then you need to do more work on the admin/categories.php. use a compare tool like WinDiff.

Link to comment
Share on other sites

your host must be offering a modified version. you will have lots more problems with contributions if they have changed table names.

 

 

I'm suspecting so to, I've been having similar issuses with some other contribs I tried to add earlier... *sigh* And there's no way to change the table names?

Link to comment
Share on other sites

I'm suspecting so to, I've been having similar issuses with some other contribs I tried to add earlier... *sigh* And there's no way to change the table names?

yes there is, if done carefully.

there are two files

catalog/includes/tablenames.php

catalog/admin/includes/tablenames.php

If everything has been programmed correctly on your shop, all you need to do is to rename the tables using phpMyAdmin then go to those files and change the constant definition for that table. Re-upload the file.

 

You can download the correct version of osCommerce from this site and compare your files. you will then know what is standard and which tables should be changed.

 

but there is no guarantee everything is programmed correctly. Are you using your hosts version because of specific compatibility issues with them? or just because it's easy?

 

hope that helps

Edited by surfalot
Link to comment
Share on other sites

yes there is, if done carefully.

there are two files

catalog/includes/tablenames.php

catalog/admin/includes/tablenames.php

If everything has been programmed correctly on your shop, all you need to do is to rename the tables using phpMyAdmin then go to those files and change the constant definition for that table. Re-upload the file.

 

You can download the correct version of osCommerce from this site and compare your files. you will then know what is standard and which tables should be changed.

 

but there is no guarantee everything is programmed correctly. Are you using your hosts version because of specific compatibility issues with them? or just because it's easy?

 

hope that helps

 

Because it's easy. :-"

 

I'm making a complete backup onto my harddrive via ftp right now, then I'll try to rename the tables. Hopefully that'll work.

 

Am I understandnig this right: in tablenames.php it's defined which table to call? Just so I somewhat know what I'm doing and more importantly why... ;)

 

Thanks again for your help. :rolleyes:

Link to comment
Share on other sites

yes there is, if done carefully.

there are two files

catalog/includes/tablenames.php

catalog/admin/includes/tablenames.php

If everything has been programmed correctly on your shop, all you need to do is to rename the tables using phpMyAdmin then go to those files and change the constant definition for that table. Re-upload the file.

 

You can download the correct version of osCommerce from this site and compare your files. you will then know what is standard and which tables should be changed.

 

but there is no guarantee everything is programmed correctly. Are you using your hosts version because of specific compatibility issues with them? or just because it's easy?

 

hope that helps

 

 

 

Since you've enlightened med about the fact that my host seems to rename the tables, I'm taking the long way around and installing a default package of OSC instead, hopefully I'll won't have to deal with these errors in the future then. As you pointed out, I'm having the same issues with other contribs also. Hopefully this will work...

Link to comment
Share on other sites

Since you've enlightened med about the fact that my host seems to rename the tables, I'm taking the long way around and installing a default package of OSC instead, hopefully I'll won't have to deal with these errors in the future then. As you pointed out, I'm having the same issues with other contribs also. Hopefully this will work...

If you are not too far into developing your site, that is the best route. I like hosts that provide Fantastico, it's a PHP script installer that has osCommerce in it as well (standard).

 

You should check with your host about any issues they have with osCommerce installations. Often when hosts offer it (outside of Fantastico) the code has been changed to compensate for restrictions the host may impose.

 

Choose you host carefully when you decide to go with osCommerce. Some simply won't support it or have restrictions that make it very difficult to operate.

Link to comment
Share on other sites

Ok, I have added this contribution and this is what is happening....

 

Fatal error: Call to undefined function process_uploads() in /home/admin/public_html/shop/admin/categories.php on line 437

 

this is line 437

$add_images_error = process_uploads($image_subdirectory,'thumb_images','medium_images','popup_images',$sql_data_array,$messageStack);

 

 

Anytime I try to add additional images, this is the error I get. I am certain this is happening because when I go to add an image, it says it is trying to upload the image to the directory when in fact the image is already there. It will try to upload it to say: public_html/images/ then the space below it inserts the category name.

 

Also, on products that already had an additional image from the earlier version, I am getting problem below..no thumbnails are being created.

popup.jpg

prodinfo.jpg

Edited by swtnhpy
Link to comment
Share on other sites

I have installation problem at Database Install step for additional Images Module.

when I enter

"http://www.tokaidocanada.com/catalog/admin/additional_images_configure.php"

 

All I got this error message

I check the line 27 " require('includes/application_top.php');"

 

Warning: main(includes/application_top.php): failed to open stream: No such file or directory in /home/hsphere/local/home/dice0126/tokaidocanada.com/catalog/admin/additional_images_configure.php on line 27 Warning: main(includes/application_top.php): failed to open stream: No such file or directory in /home/hsphere/local/home/dice0126/tokaidocanada.com/catalog/admin/additional_images_configure.php on line 27 Fatal error: main(): Failed opening required 'includes/application_top.php' (include_path='.:/hsphere/shared/apache/libexec/php4ext/php/') in /home/hsphere/local/home/dice0126/tokaidocanada.com/catalog/admin/additional_images_configure.php on line 27

 

I spent two days to figure out.

:'(

 

Thank you

Link to comment
Share on other sites

If you are not too far into developing your site, that is the best route. I like hosts that provide Fantastico, it's a PHP script installer that has osCommerce in it as well (standard).

 

You should check with your host about any issues they have with osCommerce installations. Often when hosts offer it (outside of Fantastico) the code has been changed to compensate for restrictions the host may impose.

 

Choose you host carefully when you decide to go with osCommerce. Some simply won't support it or have restrictions that make it very difficult to operate.

 

 

It worked fine, I'm not having (yet atleast...!) problems with osc now. :thumbsup:

thanks for all the help! :rolleyes:

Link to comment
Share on other sites

Ok, I have added this contribution and this is what is happening....

 

Fatal error: Call to undefined function process_uploads() in /home/admin/public_html/shop/admin/categories.php on line 437

 

this is line 437

$add_images_error = process_uploads($image_subdirectory,'thumb_images','medium_images','popup_images',$sql_data_array,$messageStack);

Anytime I try to add additional images, this is the error I get. I am certain this is happening because when I go to add an image, it says it is trying to upload the image to the directory when in fact the image is already there. It will try to upload it to say: public_html/images/ then the space below it inserts the category name.

 

Also, on products that already had an additional image from the earlier version, I am getting problem below..no thumbnails are being created.

popup.jpg

prodinfo.jpg

you need to look for the additions in 2_files_to_compare\catalog\admin\includes\functions\general.php. the function you are missing is there.

Link to comment
Share on other sites

I have installation problem at Database Install step for additional Images Module.

when I enter

"http://www.tokaidocanada.com/catalog/admin/additional_images_configure.php"

 

All I got this error message

I check the line 27 " require('includes/application_top.php');"

 

Warning: main(includes/application_top.php): failed to open stream: No such file or directory in /home/hsphere/local/home/dice0126/tokaidocanada.com/catalog/admin/additional_images_configure.php on line 27 Warning: main(includes/application_top.php): failed to open stream: No such file or directory in /home/hsphere/local/home/dice0126/tokaidocanada.com/catalog/admin/additional_images_configure.php on line 27 Fatal error: main(): Failed opening required 'includes/application_top.php' (include_path='.:/hsphere/shared/apache/libexec/php4ext/php/') in /home/hsphere/local/home/dice0126/tokaidocanada.com/catalog/admin/additional_images_configure.php on line 27

 

I spent two days to figure out.

:'(

 

Thank you

that's because your shop is setup with non-standard paths. your admin isn't here:

http://www.tokaidocanada.com/catalog/admin/

 

it's here

 

http://www.tokaidocanada.com/admin/

 

so you need to compare or upload your /admin/ files there instead. Then remember this oddity about your installation for your next contrib install.

 

once you have you files in the right place, use this for the configuration

 

http://www.tokaidocanada.com/admin/additio...s_configure.php

 

and BTW, you should secure your admin section. it has a file manager you don't want folks playing with.

Edited by surfalot
Link to comment
Share on other sites

i got a question : when you fly the mouse ver the additional pics, they show bigger at the palce and size of in the main image,

but i d like that when you move the mouse on something different than a thumbnails , that the original image show again , like a status : "onrelease"

because the only way now is to refresh the page to see the main image

any idea ?

MS2

Link to comment
Share on other sites

hi todd

 

just a small question. I've installed your version of Additional Images for a while. Eveything is fine except a bug ( perhaps ) in the upload directory and a minor problem with STS (which I'm not sure if it is ) .

 

let's see the bug first .

 

the upload path is a bit strange,

 

the upload path is something like " product/sub-categories/categories "

 

it is not a big problem as I edit it manually to " product/categories/sub-categories "

 

any ideas if I might mess up anything ?? where should I check ? thanks

Link to comment
Share on other sites

i can see amazon another idea, the main image is shown also as a thumbnails so you can always come back to it ... god idea no

the main image will show on your thumb menu if you have Thumb Menu: Show parent image set to true in the settings.

I considered you other request and didn't think it would be desirable for most. I'll think about it.

Link to comment
Share on other sites

hi todd

 

just a small question. I've installed your version of Additional Images for a while. Eveything is fine except a bug ( perhaps ) in the upload directory and a minor problem with STS (which I'm not sure if it is ) .

 

let's see the bug first .

 

the upload path is a bit strange,

 

the upload path is something like " product/sub-categories/categories "

 

it is not a big problem as I edit it manually to " product/categories/sub-categories "

 

any ideas if I might mess up anything ?? where should I check ? thanks

it's a bug, but not mine. ever notice when on the new product edit page, that the page title shows the categories path backwards?

(New Product in "Action > DVD Movies")

 

I used the same function to get the path for auto-fill function.

Link to comment
Share on other sites

it's a bug, but not mine. ever notice when on the new product edit page, that the page title shows the categories path backwards?

(New Product in "Action > DVD Movies")

 

I used the same function to get the path for auto-fill function.

 

yes. you are right. ( New Product in "Action > DVD Movies")

 

I'm sorry . I would check other contribution I installed .

 

Todd , perhaps you may tell me what files I might check ?

Link to comment
Share on other sites

yes. you are right. ( New Product in "Action > DVD Movies")

 

I'm sorry . I would check other contribution I installed .

 

Todd , perhaps you may tell me what files I might check ?

its a bug in the base osCommerce. you can fix it with this change to the Additional Images code.

 

look in admin/categories.php for: (two places)

		  $category_path_pieces = explode(' > ',tep_output_generated_category_path($current_category_id));
	  foreach ($category_path_pieces as $tkey => $piece) {
		$category_path_pieces[$tkey] = tep_catname_to_dir($piece);
	  }

 

replace with: (both times)

		  $category_path_pieces_tmp = explode(' > ',tep_output_generated_category_path($current_category_id));
	  $category_path_pieces = array();
	  for ($i=sizeof($category_path_pieces_tmp)-1; $i >= 0; $i--) {
		$category_path_pieces[] = tep_catname_to_dir($category_path_pieces_tmp[$i]);
	  }

Link to comment
Share on other sites

I must be the biggest dummy or I just way too tired, but I have been through contribution download page and have downloaded every single one of the files....updates, fixes, new versions....and I never did find sql file to add "thumb_images" to Table "additional_images", "products_image_description to "products", or additional images to the configuration table, so I manually entered these into the databases and now everything is configured through the

//catalog/admin/additional_images_configure.php

but now it is telling me that it doesn't have configuration keys missing in configuration_group additional images.

Picture5.png

Am I supposed to add all these keys or does it want just these columns added....Does someone have the sql file?

Thanks for any help you can give...

Signed

the big dummy!

Link to comment
Share on other sites

I must be the biggest dummy or I just way too tired, but I have been through contribution download page and have downloaded every single one of the files....updates, fixes, new versions....and I never did find sql file to add "thumb_images" to Table "additional_images", "products_image_description to "products", or additional images to the configuration table, so I manually entered these into the databases and now everything is configured through the

//catalog/admin/additional_images_configure.php

but now it is telling me that it doesn't have configuration keys missing in configuration_group additional images.

 

Am I supposed to add all these keys or does it want just these columns added....Does someone have the sql file?

Thanks for any help you can give...

Signed

the big dummy!

there is no SQL file any more, the configuration utility was suppose to make this easier. Did you click one "run configuration utility" button like the instructions say?

BTW, there are no updates to this version. It's mostly all new. there will be an update coming since there have been a few bugs.

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