Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

help adding pics to shopping cart page


JenRed

Recommended Posts

I have been trying to add a product image to the Shopping Cart page and I'm nearly there but now I am stuck!

 

In includes/modules/order_details.php I have added this bit of code:

 

// Image
   if (strstr($PHP_SELF, FILENAME_SHOPPING_CART)) {
     echo ' <td align="left"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products[$i]['id']) . '">' . tep_image(DIR_WS_CATALOG . DIR_WS_IMAGES . $products[$i]['image'] , $products[$i]['name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a></td>';
   }

 

and it gives me the right sized box but with an "X" in it - ie. broken image. When I View Source it shows the image directory as "/images/" so that is where the problem is. I thought that this:

 

DIR_WS_CATALOG . DIR_WS_IMAGES . $products[$i]['image']

 

should tell it where to find the images but it seems not!

 

Please can someone tell me the correct syntax here. Thanks heaps!

 

 

Jen

I haven't lost my mind - I have it backed up on disk somewhere.

Link to comment
Share on other sites

  • 1 month later...

I have this exact problem too but I'm haven't modified any code (aside from adding three modules: discount coupons, gift voucher and CanadaPost shipping).

 

I get the weird broken images and path problem as well.

 

You can see the cart here: http://www.minisaurus.com

 

When you view the cart it shows broken images for the items (you have to add something first).

Link to comment
Share on other sites

  • 1 month later...

Archived

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

×
×
  • Create New...