Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Scaled image resizing for thumbnails


garindan

Recommended Posts

Ah - beautiful. I need to set both width and height in admin for it to work - I was only setting one to avoid thumbnail skewing.

 

So it works on my machine - now I've got to hassle my ISP to install GD.

 

Thanks for this contribution, it makes a big difference -

 

Michael

Link to comment
Share on other sites

I managed to get it working perfectly on my test server. But when I uploaded html_output.php to the live server it causes display issues.

 

I only see the left column. No columns, no items, etc.

 

Now the only real difference I noticed between the 2 servers is the apache version. My test server is 2.x and the live one is 1.3.29

 

Could this be causing the problem?

 

Thanks for any advice

Link to comment
Share on other sites

  • 1 month later...

I use the Automatic Thumbnail Creator v1.0 contrib without any problems (Awsome BTW) until the other day. All my files are jpegs and are around 30-50k in size (400x400) I have the thumbnails resized to 125x125. Works great.... Until now...

 

Here's the problem,

Whenever I add a new product it shows up fine in the admin section where I added the item. But when I go to the live shop it shows the product list page blank except for the header.php and column_left.php. The right column and product list is gone. When the item shows up in the "New Products" module I click the picture and it goes right to the page and loads with no problems? It's only the category product list that's blank? I have no idea why this happens. I reloaded OSC to the stock install, change the HTML_OUTPUT.php and it still does this.

 

My Webpage

 

Thanks for any help.

Link to comment
Share on other sites

You both should check to see at what point the function is returning a result. Use echo statements in the function code. Pay particular attention to the image paths.

I have no idea what you mean by that.

 

All I did was cut and paste from the readme and it worked fine. No it doesn't work anymore???

 

Is there a limit to the size of the picture (size or dimensions) that may be causing the error?

Edited by 808smokey
Link to comment
Share on other sites

The edit button is gone.... :angry:

 

Anyways, I figured it out, Kinda.

 

The problem was one of the pictures (jpegs) was corrupted (I think). It would show just fine in admin but not the live shop (admin doesn't have the HTML_OUTPUT changed) so I just deleted the product and everything is fine now. I'm not really sure how that jpeg would screw it up, kinda strange.

 

I've added several other products and haven't had any problems so far.

 

Thanks

Link to comment
Share on other sites

I was getting similar problems with the store after adding a product and noticed that the mod was not automatically creating thumbnails. I had to manually make the thumbnails with name set as imagename-90x90.jpg, then it works.

I've added the import/export module and noticed that the spreadsheet file doesn't show up a thumbnail fieldname, only an imagename field...

So when i checked some other thumbnail mods, it tells you to add another table to your database like so:

 

ALTER TABLE `products` ADD `products_bimage` VARCHAR(64) AFTER `products_image`;

 

The thumbs4.zip mod didn't have instructions like this in it, but im pressuming it should have? It says in the thumbs4 mod that the only file to be modified is html_output.php. Anyone any ideas why i have to keep making the thumbnails manually?

Link to comment
Share on other sites

It creates the thumbnail when the image is first accessed through the catalog side. It doesn't bother to do the same on the admin side (the changes weren't as straightforward on the admin side so I kept thing simple). So all you have to do is to call up the catalog/index.php and display the image for the thumbnail to be created. It can then be used both through catalog and admin.

Edited by radders
Link to comment
Share on other sites

The edit button is gone.... :angry:

 

Anyways, I figured it out, Kinda.

 

The problem was one of the pictures (jpegs) was corrupted (I think). It would show just fine in admin but not the live shop (admin doesn't have the HTML_OUTPUT changed) so I just deleted the product and everything is fine now. I'm not really sure how that jpeg would screw it up, kinda strange.

 

I've added several other products and haven't had any problems so far.

 

Thanks

Now that's not the case. The "Corrupted" jpeg isn't corrupted at all. It has a dimesnion of 281x400. It won't work like that unless I make 280x400 only seems to work for me with numbers ending with a "0".

 

 

:blink:

Link to comment
Share on other sites

Alright please Disregard my last few posts about the "corrupt" jpg and sizes. (I'd edit them but the "edit" button's gone again :angry:

 

I FOUND THE PROBLEM

 

Whenever I create/add a new product it works only in admin.

In the live shop it only shows left column and top (header) Rest is blank.

 

When I go the webshell (ixwebhosting admin tool) it shows the user:group name of the new jpeg wrong.

 

It should say "my_user_name:my_user_group"

 

Instead it says "httpd:my_user_group"

 

Does anyone know why or what httpd means?

 

I've add no new users or changed any permissions or anything I can think of that would cause this. I'm calling tech support tomorrow to see if they know why but I figured I give it a try here since maybe I caused it and don't realize it.

 

Thanks

Link to comment
Share on other sites

Dave,

 

Great Contribution works like a dream on a few sites I have set up for people.

 

I was wondering though, how does the file know where to look in the database for the images sizes?

 

I have installed multi-stores and I have the auto thumbs installed on the main store, and that works fine. However I have another store installed in a sub directory, and it is only resizing some pictures, and those are being resized to 100x80 which i dont have a clue where that size is coming from as I have the small images set to 75x75 in my configuration table. Also with the multi stores, you have a config table for each store, so I am not running this from table.configuration it is being run from configuration2.

 

Hence why im wondering how it knows which table in the database to get SMALL_IMAGE_WIDTH etc from.

 

I just cant fathom where it is getting 100x80 for the size :S

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