Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Recommended Posts

Posted

I have 4 different "no image available" images I'd like to use for products that don't have images (being alot of stock on the site will be older, images may not be available for these items)

 

is it possible to insert a script someplace that would randomly call these 4 images so at least something would be there, on my old site I had a script in php that said this:

 

$image = $row->image;

if ($image == 'noimage.png')

{

$noimagepictures = array('images/nopreview.jpg', 'images/nopreview2.jpg', 'images/nopreview3.jpg', 'images/nopreview4.jpg', 'images/nopreview4b.jpeg');

$index = rand(0,count($noimagepictures)-1);

$image = $noimagepictures[$index];

}

 

and everytime a page loaded without a set image ONE of the 5 images above were called from /images directory

 

noimage.png was set as the default image in the mysql db

 

can i get the same effect using osc ms2?

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

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