Jump to content

"//" in src path for thumbnail image


Recommended Posts


in content.category.php is producing a "//" in the src URL like:


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?

Link to comment
Share on other sites

In your skin's config.xml file there is a <styles> section. It looks something like this (copied from Mican):


<style images="true" default="true">



<description><![CDATA[blue style]]></description>

<default />


<style images="true">



<description><![CDATA[Pink style]]></description>


<style images="true">



<description><![CDATA[black style]]></description>



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.

Link to comment
Share on other sites

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)

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

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.

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