HOT and SALE label show the same icon

Hi,

I’m wondering why the HOT and SALE label display the same background icon (both times red).
If I look into the CSS, style.css, there is not explicit definition for Sale-label. I’ve also tried to change the CSS to sales-label to sale-label but this is also not working..

<span class="Sale-label label">Sale</span>

Code:

.products-grid .product-image .label {
  position: absolute;
  width: 42px;
  height: 40px;
  line-height: 55px;
  background: url(../images/icon_hot.png) no-repeat right top;
  top:0;
  right: 0;
  color: #fff
  text-align: center;
  text-transform: uppercase;
  font-weight: bold;
  font-size: 12px;
  font-size:'Passion One',cursive;
  letter-spacing:-1px;
}

.products-grid .product-image .sales-label {
  background-image: url(../images/icon_sale.png);
  color:#000;
}

The icons exists
http://playground.oneinsixbillion.de…/icon_sale.png
http://playground.oneinsixbillion.de…s/icon_hot.png

Any ideas?

Thanks
Daniel

8 answers

Profile photo of Sherlock 0.00 $tone September 26, 2013
Public

okay Daniel, I think those Hot and Sale Labels have the same background, if you want you can change the icons accordingly for example you can replace the sale icon by replacing this icon image skin/frontend/default/jm_siotis/images/icon_sale.png

#3
Profile photo of Sherlock 0.00 $tone October 3, 2013
Public

Okay daniell, you can open the file of skin/frontend/default/jm_siotis/css/styles.css you look for this css rule

HTML Code:

.products-grid .product-image .sales-label {
  background-image: url("../images/icon_sale.png");
  color: [URL=http://www.joomlart.com/forums/usertag.php?do=list&action=hash&hash=000000]#000000[/URL]
}

change it to

HTML Code:

.products-grid .product-image .Sales-label {
  background-image: url("../images/icon_sale.png");
  color: [URL=http://www.joomlart.com/forums/usertag.php?do=list&action=hash&hash=000000]#000000[/URL]
}

the problem here are the S capital in .Sales-label

#5
Profile photo of Daniel Glueck 0.00 $tone October 6, 2013
Public

Hi Sherlock,

another question in this context

If you go to this page
http://playground.oneinsixbillion.de…/type/featured

The first four products are displayed with the "HOT" label. But not all of them have the label hot configured.

The same problem here
http://playground.oneinsixbillion.de…-t-shirts.html

The Deadhead Shirts are on sale, but also the Free Your Soul shirt is displayed with the Sale label.

Any idea what’s going wrong?

Thanks
Daniel

#7
Profile photo of Sherlock 0.00 $tone October 14, 2013
Public

Okay Daniel, I just fixed this issue for you those file get modifies are app/design/frontend/default/jm_siotis/template/joomlart/jmproducts/viewall.phtml and app/design/frontend/default/jm_siotis/template/catalog/product/list.phtml , i opened those file and change this block of code

PHP Code:

  <?php 
                            $_rowCount 
ceil($_collectionSize/$_columnCount);
                            if (
$i%$_columnCount==0) : $j++; endif;
                            if (
$i++%$_columnCount==0): 
                            
$width 100;
                            if (
$_columnCount$width 100/$_columnCount;
                            
$width "style=\"width:{$width}%;\"";    
                            
$return false;
                            
$product Mage::getModel('catalog/product')->load($_product->getId());
                            
$attribute $product->getResource()->getAttribute('label');
                            if(
is_object($attribute)){
                             
                                
$_options$attribute->getSource()->getAllOptions(truetrue);
                                foreach(
$_options as $option){
                                      if (
$option['value'] == $product->getData("label")){
                                        
$class =  $option['label'];
                                      }
                                 }         
                                 
$attdefaultvalue $attribute->getDefaultValue();
                                 
$attributeValue Mage::getModel('catalog/product')->load($_product->getId())->getlabel();
                                 
$attributeValueName Mage::getModel('catalog/product')->load($_product->getId())->getAttributeText('label');
                                     if(
strlen($attributeValue) &&  ($attdefaultvalue !== $attributeValue)) { 
                                         
$labeltype $class;   
                                         
$labelname $attributeValueName;     
                                         } 
                                         else {
                                         
$labeltype "";
                                 } 
                            }
                
?>


To

PHP Code:

 <?php 
               $product 
Mage::getModel('catalog/product')->load($_product->getId());
                            
$attribute $product->getResource()->getAttribute('label');
                            if(
is_object($attribute)){
                             
                                
$_options$attribute->getSource()->getAllOptions(truetrue);
                                foreach(
$_options as $option){
                                      if (
$option['value'] == $product->getData("label")){
                                        
$class =  $option['label'];
                                      }
                                 }         
                                 
$attdefaultvalue $attribute->getDefaultValue();
                                 
$attributeValue Mage::getModel('catalog/product')->load($_product->getId())->getlabel();
                                 
$attributeValueName Mage::getModel('catalog/product')->load($_product->getId())->getAttributeText('label');
                                     if(
strlen($attributeValue) &&  ($attdefaultvalue !== $attributeValue)) { 
                                         
$labeltype $class;   
                                         
$labelname $attributeValueName;     
                                         } 
                                         else {
                                         
$labeltype "";
                                 } 
                            }
                            
                            
$_rowCount ceil($_collectionSize/$_columnCount);
                            if (
$i%$_columnCount==0) : $j++; endif;
                            if (
$i++%$_columnCount==0): 
                            
$width 100;
                            if (
$_columnCount$width 100/$_columnCount;
                            
$width "style=\"width:{$width}%;\"";    
                            
$return false;
                           
                
?>

#8

Please login or Register to Submit Answer

Written By

Comments