Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

products without images...


gambitdis

Recommended Posts

Posted

I'd like to have products without images show up with some kind of default image. Does anyone know if a contribution is available for this?

 

Thanks.

--derek

Posted

I just use this, but you can use anything you want and then just use that picture for the image of all the products that have no image. When you set-up the product just add/upload your default image instead of the product image.

no_picture.gif

Posted

If you are feeling lazier than that, you can modify the following code from includes/functions/html_output.php to insert the image for you:

  function tep_image($src, $alt = '', $width = '', $height = '', $parameters = '') {

   if ( (empty($src) || ($src == DIR_WS_IMAGES)) && (IMAGE_REQUIRED == 'false') ) {

     return false;

   }

would become

  function tep_image($src, $alt = '', $width = '', $height = '', $parameters = '') {

   if (empty($src) || ($src == DIR_WS_IMAGES)) {

     $src = DIR_WS_IMAGES . DEFAULT_IMAGE;

   }

which would probably work. It would be better to point it to an image in the buttons directory for the appropriate language, but this should be enough for your own store.

 

No testing has been done. Use at your own risk.

 

Good luck,

Matt

  • 11 months later...
Posted

Thank You! All the contrabutions wouldnt work for those pictures already submited, this fixed everything!

Archived

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

×
×
  • Create New...