Hornblower Posted February 16, 2012 Share Posted February 16, 2012 $product.thumbnail in content.category.php is producing a "//" in the src URL like: ..../skins/charisma/images//noimage_thumbnail.png I have started reskinning from an existing skin that had mutiple colour options and this looks like a hangover from this, in that it is looking for a relevant subfolder, then having not found one (correctly) still puts in a trailing forward slash. Can't find where it is set any pointers please? Quote Link to comment Share on other sites More sharing options...
Guest Viola Posted February 17, 2012 Share Posted February 17, 2012 In your skin's config.xml file there is a <styles> section. It looks something like this (copied from Mican): <styles> <style images="true" default="true"> <directory>blue</directory> <name><![CDATA[blue]]></name> <description><![CDATA[blue style]]></description> <default /> </style> <style images="true"> <directory>pink</directory> <name><![CDATA[Pink]]></name> <description><![CDATA[Pink style]]></description> </style> <style images="true"> <directory>black</directory> <name><![CDATA[black]]></name> <description><![CDATA[black style]]></description> </style> </styles> Delete it. You might also need to go to Store Settings > Layout and click Save, just to make sure Cubecart knows there aren't any styles. And if you have caching enabled, clear the cache. Quote Link to comment Share on other sites More sharing options...
Hornblower Posted February 17, 2012 Author Share Posted February 17, 2012 Thanks Viola. Removing the styles section of the XML file was one of the very first thigs I did. Sorting images into correct folders was next along with making sure that all the deafult images were included. I have cleared the cache many times. The images are being displayed - just that the source code for <img src="path"> gets the path malformed when it is using the deault image - there is a '//'. All I was wondering was is this a sign of other underlying problems? But I can't find the template were this path is set to see if I have messed with it or it is a template problem. (Much like the image path for the store logo is wrong throughout the shopping basket, and was wrong in the original before I started messing) Quote Link to comment Share on other sites More sharing options...
Guest Viola Posted February 17, 2012 Share Posted February 17, 2012 You could try switching to one of the stock skins and see if you still get the //. That might narrow down the problem. Only other thing I can think of at this point is to check check Store Settings > SSL and make sure you don't have a trailing / where there shouldn't be one. Quote Link to comment Share on other sites More sharing options...
Hornblower Posted February 18, 2012 Author Share Posted February 18, 2012 It happens in all the flavours I have tried without colour varient sub-folders. bsmither suggests that it is the way that getProductImage method in gui.class.php that doing it. Ithink he is right! Specifically this bit of code: if (isset($this->_skin_data['images'][$mode])) { $default = $this->_skin_data['images'][$mode]['default']; if (($files = glob('skins'.CC_DS.$this->_skin.CC_DS.'{images,styleImages}'.CC_DS.'{common,'.$this->_style.'}'.CC_DS.$default , GLOB_BRACE)) !== false) { return $GLOBALS['storeURL'].'/'.str_replace(CC_DS, '/', $files[0]); } } The fix is create a sub folder for deafault images called 'common' in either the main images folder or skins images folder. 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.