Big Spender Posted September 30, 2012 Share Posted September 30, 2012 <image reference="subcategory" maximum="80" quality="100" default="noImageSubCategory.png" /> from config.xml, on the front end it's linking to /skins/skinname/images//noImageSubCategory.png - 2 slashes. Still displays the image but where to fix? Quote Link to comment Share on other sites More sharing options...
bsmither Posted September 30, 2012 Share Posted September 30, 2012 The double slashes really do not cause a problem. The bug report #134 says it was fixed in CC509. But this problem was only fixed for product images, not category images. The fix, as seen in CC514, is: gui.class.php, near line 406 (may be different for your version of CC5): public function getProductImage About 14 lines down, find: if (($files = glob('skins'....... The next line should read: return $GLOBALS['storeURL'].'/'.str_replace(array(CC_DS.CC_DS,CC_DS), '/', $files[0]); Also in catalogue.class.php, near line 721: public function imagePath About 18 lines down, find: if ($files) { The next line needs to read: $default_image = str_replace(array(CC_DS.CC_DS,CC_DS), '/', $GLOBALS['storeURL'].'/'.$files[0]); Quote Link to comment Share on other sites More sharing options...
Big Spender Posted October 21, 2012 Author Share Posted October 21, 2012 Hi Brian, just went to apply this and the resulting URL for the image becomes: - <img src="http:/www.domain.co.uk/skins/default/images/noImageSubCategory.png"> Note the http:/ rather than http:// What needs changing on the catalogue.class.php code to fix? Quote Link to comment Share on other sites More sharing options...
bsmither Posted October 21, 2012 Share Posted October 21, 2012 I can't believe I was that sloppy! Here's the original statment in CC514 (line 739): $default_image = str_replace(CC_DS, '/', $GLOBALS['storeURL'].'/'.$files[0]); Here's the new and improved version: $default_image = $GLOBALS['storeURL'].'/'.str_replace(array(CC_DS.CC_DS,CC_DS), '/', $files[0]); Quote Link to comment Share on other sites More sharing options...
Big Spender Posted October 21, 2012 Author Share Posted October 21, 2012 Thanks works perfect now, not sure how you mark as resolved on here. Quote Link to comment 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.