jamesm489 Posted June 16, 2009 Share Posted June 16, 2009 I am currently tring to add in alt img tags for an existing website running the interspire shopping cart platform, I have gotten pretty close I bleieve, but i cannot seem to get it right. Any help would be grealty appreciated. // Is there a thumbnail image we can show? $thumb = $GLOBALS['ISC_CLASS_PRODUCT']->GetThumb(); $alttext = $GLOBALS['ISC_CLASS_PRODUCT']->GetProductName(); if($thumb == '' && GetConfig('DefaultProductImage') != '') { if(GetConfig('DefaultProductImage') == 'template') { $thumb = GetConfig('ShopPath').'/templates/'.GetConfig('template').'/images/ProductDefault.gif'; } else { $thumb = GetConfig('ShopPath').'/'.GetConfig('DefaultProductImage'); } $thumbImage = '<img src="'.$thumb.'" alt="'.$GLOBALS['ISC_CLASS_PRODUCT']->GetProductName().'" />'; } else if($thumb != '') { $thumbImage = '<img src="'.GetConfig('ShopPath').'/'.GetConfig('ImageDirectory').'/'.$thumb.'" alt="'.$alttext.'" />'; } Quote Link to comment https://forums.phpfreaks.com/topic/162418-adding-alt-img-tags-to-an-existing-php-website/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.