0

i have just cloned my website and then updated the cloned website. Everything works perfec except the images for my sub categories isnt showing up, my product images are just not the sub category images.

My code for looks like this:

<div class="subcategory-products">

<ul class="products-grid two_columns_5">
<?php
$_categories=$this->getCurrentChildCategories();
if($_categories->count()):
$categorycount = 0;
foreach ($_categories as $_category):
if($_category->getIsActive()):
$cur_category=Mage::getModel('catalog/category')->load($_category->getId());
$layer = Mage::getSingleton('catalog/layer');
$layer->setCurrentCategory($cur_category);
$catName = $this->getCurrentCategory()->getName();
if ($categorycount == 0){
$class = "first";
}
elseif ($categorycount == 3){
$class = "last";
}
else{
$class = "";
}
?>
<li class="item <?=$class?>">
<a href="<?php echo $_category->getURL() ?>" 
title="<?php echo $this->htmlEscape($_category->getName()) ?>">
<img class="pic_size_subcat" src="<?php echo $_category->getImageUrl() ?>" width="100" alt="
<?php echo $this->htmlEscape($_category->getName()) ?>" /></a>
<h2><a href="<?php echo $_category->getURL() ?>" title="<?php echo $this->htmlEscape($_category->getName()) ?>"><?php echo $this->htmlEscape($_category->getName()) ?></a></h2>
</li>
<?php
endif;
if($categorycount == 3){
$categorycount = 0;
echo "</ul>\n\n<ul class=\"products-grid two_columns_5\">";
}
else{
$categorycount++;
}
endforeach;
endif;
?>
</ul>
</div>

but when i inspect the element in my web browser it shows this -

<img class="pic_size_subcat" src="" width="100" alt="
"> 

so all i can tell is that it is reading in the code correctly but it isnt getting the img src. Does anybody know why? it worked before i cloned the website

1

In my experience, this is nearly always a file permission issue. Make sure that the webserver has write permissions on the media and var directory. If you set the permissions, make sure you set them recursively.

2
  • Both permissions are set to 0777 and still not working ? – Adam Allen Jun 2 '14 at 10:49
  • The problem was i had edited a core file and then when i upgraded it reset so i made a sub file and used that instead thank you for your suggestion though – Adam Allen Jun 2 '14 at 14:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.