Jump to content

Large 'no image' photo not displaying


Guest benspencer
 Share

Recommended Posts

Guest benspencer

Hi there,

Having problems with the full size 'no image' photo on a site I'm working on. All of the 'no image' thumbnails work fine.

If a product doesn't have an image, the full size 'no image' photo is not displayed. For some reason, the URL of the image is being outputted as /images/uploads/ rather than /skins/skin_name/styleImages/nophoto.gif

I have restored the original viewProd.inc.php from within /includes/content with no success.

I've also copied the nophoto.gif file to the root of the website, and changed this section of code within viewProd.inc.php:

if (!empty($prodArray[0]['image'])) {

	$imgRelPath = imgPath($prodArray[0]['image'], false, 'rel');

		$view_prod->assign("IMG_SRC", $imgRelPath);

			} else {

		$view_prod->assign("IMG_SRC", "skins/". SKIN_FOLDER . "/styleImages/nophoto.gif");

}



to 




if (!empty($prodArray[0]['image'])) {

	$imgRelPath = imgPath($prodArray[0]['image'], false, 'rel');

		$view_prod->assign("IMG_SRC", $imgRelPath);

			} else {

		$view_prod->assign("IMG_SRC", "http://www.websiteurl.com/nophoto.gif");

}

It seems to be ignoring the else statement, as it still outputs the image URL as /images/uploads/

Changing skins has no effect either - same problem.

Any ideas?!

Thanks

Link to comment
Share on other sites

Guest benspencer

me thinks its a cache issue turn off your cache or dump your cache in cubecart admin

(not your browser cache)

see if your code works then

Thanks for the speedy reply. I cleared the cache from the CubeCart admin, and also deleted everything in the cache folder via FTP - still no joy :(

Link to comment
Share on other sites

Guest benspencer

What do you get if you put the full URL into the browser for the no photo image ?

www.yoursite/skins/yourskin/styleImages/nophoto.gif

The image is displayed fine! Really odd.

Link to comment
Share on other sites

Guest benspencer

Well blow me, I've fixed it.

I went to CubeCart admin, and selected 'Database' under 'Maintenance'. I ticked all items and then selected 'Check' from the drop down. CubeCart returned an error on every item, and told me to select 'Repair' from the drop down. I did that, and now the large 'no image' photo is back!

Hope that helps anyone else who comes across this problem.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

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

 Share

×
×
  • Create New...