2012-10-22 115 views
2

我刚刚接触谷歌问为什么富人snipets没有显示他们的结果,他们回答以下丰富网页摘要无法显示,因为隐藏Schema.org标记

URL: http://www.theprinterdepo.com/hp-color-laser-4700dn-printer-q7493a-r 
Markup Type: Product, Reviews 

    Hidden content: <span itemprop="reviewCount">6</span> 

我在IE开发者工具检查和确实的它的隐藏,但它不隐藏在我的HTML,任何想法我做错了什么?

<?php if ($this->getReviewsCount()): ?> 
    <div class="ratings"> 
     <?php if ($this->getRatingSummary()):?> 
      <span itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating"> 
      <div class="rating-box"> 

       <div class="rating" style="width:<?php echo $this->getRatingSummary() ?>%"><meta itemprop="ratingValue" content="<?php echo $this->getRatingSummary()/10 ?>"/></div> 
       <span itemprop="reviewCount"><?php echo $this->getReviewsCount() ?></span> 
      </div> 
      </span> 
     <?php endif;?> 
     <p class="rating-links"> 
      <a href="<?php echo $this->getReviewsUrl() ?>"><?php echo $this->__('%d Review(s)', $this->getReviewsCount()) ?></a> 
      <!--<span class="separator">|</span>--> 
      <!--<a href="<?php echo $this->getReviewsUrl() ?>#review-form"><?php echo $this->__('Add Your Review') ?></a>--> 
     </p> 
    </div> 
<?php elseif ($this->getDisplayIfEmpty()): ?> 
    <p class="no-rating"><a href="<?php echo $this->getReviewsUrl() ?>#review-form"><?php echo $this->__('Be the first to review this product') ?></a></p> 
<?php endif; ?> 
+0

@Tim URL被在所述第一代码段[http://www.theprinterdepo.com/hp-color-laser-4700dn-printer-q7493a-r](http://www.theprinterdepo所示.com/hp-color-laser-4700dn-printer-q7493a-r) – CCBlackburn

回答

3

当你读到这个,你会对自己很有趣。

你的问题是与你的CSS。转到/skin/frontend/default/MAG060062/css/styles.css上线人数529问题的文件与您.rating盒类。

.rating-box { 
    background: url("../images/bkg_rating.gif") repeat-x scroll 0 0 transparent; 
    font-size: 0; 
    height: 10px; 
    line-height: 0; 
    text-indent: -999em; 
    width: 50px; 
} 

替换它如下

.rating-box { 
    background: url("../images/bkg_rating.gif") repeat-x scroll 0 0 transparent; 
    height: 10px; 
    width: 50px; 
} 

变化删除

  • 字体大小:0;
  • line-height:0;
  • text-indent:-999em;

萤火虫截图

enter image description here

IE的开发工具

enter image description here

睁开眼睛始终。洛尔:)

+0

lol。 thx thxthx –

+0

@LuisEValencia:欢迎奖励界限:) – Gowri

+0

@Tim:可能,但更加清楚OP。最后,OP了解问题所在! – Gowri

相关问题