Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Images Not Displaying


djms

Recommended Posts

Can anybody tell me what wrong with the following code that would prevent the referenced images from displaying?

 

I'm working in the products section in the osCommerce admin database. Underneath the item description I'm trying to add a section that says: May we suggest these complimenting items:" and then have a picture of a particular matching bracelet with a hyperlink to that product. The hyperlink works, but my .jpg images are not displaying. If I substitute images/Logo.gif in place of images/Gold Dangles.jpg, then my logo shows up in that space. I've changed my permissions on my .jpg images to match the permissions on the .gif image, but still nothing.

 

Any help would be appreciated.

 

Thx,

djms

 

 

6-6.5mm Freshwater pearls and sterling silver accent beads float on a sterling silver chain with fancy sterling silver safety clasp.

<br><br>

<b>May we suggest these complimenting items:</b><br><br>

<a href="http://mycompanyname.com/catalog/product_info.php?cPath=27&products_id=30&osCsid=a8c8427eb319c0e311ce9f11eca3fbbe"><img src="images/Gold Dangles.jpg" border="0" alt="Gold Dangles" width="100" height="133.33333333333"> </a>

Link to comment
Share on other sites

Thanks FalseDawn,

 

These are the two lines in configure.php that relate to images. I wouldn't have a clue if they're correct or not. What do you think?

 

My logo.gif and xxx.jpg files are all stored in www/catalog/images. Any idea why .gif would work but .jpg does not?

 

define('DIR_WS_IMAGES', 'images/');

define('DIR_FS_CATALOG_IMAGES', DIR_FS_CATALOG . 'images/');

 

Thanks,

djms

Link to comment
Share on other sites

Well, you missed off the important ones, namely

DIR_WS_CATALOG

and

DIR_WS_CATALOG_IMAGES

 

 

these should be

define('DIR_WS_CATALOG', '/catalog/'); // absolute path required

define('DIR_WS_CATALOG_IMAGES', DIR_WS_CATALOG . 'images/');

Link to comment
Share on other sites

Sorry, I'm truly flying blind...no clue what's important, what's not.

 

I pulled these straight from my configure.php file.

 

define('DIR_WS_CATALOG', '/catalog/'); // absolute path required

define('DIR_WS_CATALOG_IMAGES', DIR_WS_CATALOG . 'images/');

Link to comment
Share on other sites

I'm in the products section of the database as if I were entering new products into the cart. I've typed all of this in the products description field on that page.

 

6-6.5mm Freshwater pearls and sterling silver accent beads float on a sterling silver chain with fancy sterling silver safety clasp.

<br><br>

<b>May we suggest these complimenting items:</b><br><br>

<a href="http://mycompanyname.com/catalog/product_info.php?cPath=27&products_id=30&osCsid=a8c8427eb319c0e311ce9f11eca3fbbe"><img src="images/Gold Dangles.jpg" border="0" alt="Gold Dangles" width="100" height="133.33333333333"> </a>

 

I just tried substituting my logo.gif again for the .jpg file and it works fine. Just .jpg not coming through.

 

Thx,

djms

Link to comment
Share on other sites

Do you mean, have I refreshed that page on my website after saving the code in admin to see if the image shows up? If so, yes. The .gif shows up, the .jpg does not.

Link to comment
Share on other sites

<<Sigh>>...

 

Changing the names for the jpg files and in the image reference didn't work.

 

I appreciate the security info...since I haven't a clue how "dynamically generate" anything in php much less a secure link, I'm just going to scrap the whole idea. This issue is obviously over my head.

 

Thanks for all your help,

djms

Link to comment
Share on other sites

Hey, there's no need to give up so easily.

An X-sell type feature need not be that difficult to code - there are contributions to help you out as well if you are not confident to do it yourself.

 

Look for "Xsell" or "X-sell" or similar.

 

It will involve making a few changes to your database and code, but there should be step-by-step instructions.

Link to comment
Share on other sites

Okay, I'll see what I can find.

 

Actually, you've raised another issue for me...instead of moving my catalog to the root directory, I created an index page in MS Publisher with links to relevant pages in my catalog..."Necklaces" on my index page goes straight to the Necklaces page in the catalog. So basically, the 1st page in the catalog never shows. I'm sure there's nothing dynamic about any such links which is probably another security no-no. Am I interpreting your info correctly?

 

:( djms

Link to comment
Share on other sites

No, the problem was in your hard-coding of the sessionID, which could cause both user's sessions to be dropped suddenly, and (worse), more than 1 user on the same session so their data could (potentially) be seen by other users.

 

I would advise dropping the catalog directory altogether - there are several threads explaining how to do this - it's really just a matter of backing up your site, copying the whole lot into the root and changing a few lines in your configure.php files.

Link to comment
Share on other sites

Although if you are using straight HTML links, then you will not be able to preserve sessions, so a user with something in their cart clicking on one of these links will have their cart emptied (if they don't accept cookies)

 

For all links, you really need to be using the tep_href_link() function.

Link to comment
Share on other sites

I think I'm definitely going to have the same problem due to the way I created the link on the index page.

 

I'll find the thread and work out changing the catalog to the root directory. I'm looking at an x-sell contrib now...which, due to my limited coding knowledge, raises a whole slew of other questions. I think I'm going to have to find someone to help me finish this up.

 

I appreciate all your help,

djms

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...