Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Image distortions - no solution yet


agaldes

Recommended Posts

Hello Oscommerce gurus,

 

I'm using Oscommerce 2.3. It's working in all respects (thank you) except that image management appears to be 'questionable'. The image distortion issues that so many people discuss and offer solutions to is causing me trouble.

 

I've tried many of the "addon's" and other solutions in forums and blogs with no luck. Different versions, etc.

 

I'd like to resolve my own issue but i need to know where the images are 'presented' from. I've narrowed it down to the "includes/functions/html_output.php" file but i suspect that my changes are also influenced by a Div. That is, i can make changes to that file but the expected changes are not reflected.

 

For example, i can change the "category picture" (the very small one at the top of a list of products within a given category) but not the images relating to the products in the list.

 

I'll write the code myself to calculate the best fit of the images but i need to know where to do it.

 

Can i have a little guidance in this matter?

 

Thanks,

-Andrew G

Link to comment
Share on other sites

It sounds like you are overthinking this. The solution is very simple: log into your Admin, then go to Configuration >> Images. Change the values for the various images so that you are specifying Width or Height but not both. For an even better solution, leave all the Width and Height settings blank and make your images the right size to start with.

 

Regards

Jim

See my profile for a list of my addons and ways to get support.

Link to comment
Share on other sites

Hi Jim,

 

Thanks. yes, i've tried several combinations of options in the Config, Images section of the Admin area. However, if i set values to NULL (nothing) or 0, the mage appears to be invisible - it's got a depth of nothing at that point.

 

Any thoughts?

 

-Andrew

Link to comment
Share on other sites

The style looks like this when i leave out the height completely: "style="width:180px;height:0px;" in the "<a" class "class=prods_pic_bg". It has a "0" even though i've specified NULL/nothing in that field.

 

-Andrew

Link to comment
Share on other sites

I just tested this in a stock osCommerce 2.3.3 install, and it doesn't work that way. Apparently you've changed something in the image functions. In your Admin >> Configuration >> Images, is Calculate Image Size set to true? Try that setting with all of the Height and Width settings blank.

 

If you've made code changes, the most likely location is the tep_image() function in html_output.php.

 

Regards

Jim

See my profile for a list of my addons and ways to get support.

Link to comment
Share on other sites

Thanks Jim,

 

Here are my settings. The images do not appear at all with these settings:

 

 

Small Image Width

Small Image Height

Box Image Width 145

Box Image Height 180

Subcategory Image Width 137

Subcategory Image Height 111

Shopping Cart Image Width 180

Shopping Cart Image Height 145

Product Info Image Height 185

Product Info Image Width 230

Calculate Image Size true

Show Image Category in Title true

Image Required true

Image Category in Title Width 50

Image Category in Title Height 40

Specials Image Width 192

Specials Image Height 155

Link to comment
Share on other sites

I just duplicated those settings (or rather the ones that I have) and the images show up just like they're supposed to. You have a lot of extra image settings in that section, which tells me you have modified the stock osCommerce install. It's likely that one of your modifications has messed up the images. Again, stock osCommerce does not do what you are saying yours does.

 

I suggest starting with your backup of the includes/functions/html_output.php file. That should get you back to the correct image display. If it doesn't, then that code has been replaced by something else, and you'll have to hunt that down.

 

Regards

Jim

See my profile for a list of my addons and ways to get support.

Link to comment
Share on other sites

Hi Jim,

 

Indeed you're right. The Oscommerce system i'm using has been themed. It's possible that in the process, the theme'er broke something.

 

Thanks for your help Jim,

-Andrew

Link to comment
Share on other sites

What osCommerce calls a Theme is just a group of Javascript and CSS files. That won't have the effects you are seeing. It appears that your "Theme" has made more modifications than would normally be done. You will need to look at the changes it made to find the problem. Given the fundamental problem you are seeing here, it might be simpler to just remove this theme and make whatever changes you want yourself.

 

The standard osCommerce themes are generated by Themeroller. Instructions can be found here.

 

Regards

Jim

See my profile for a list of my addons and ways to get support.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...