产品详细页面的review 是通过js控制的,要丛别的页面直接跳过来没这么简单,看起来像从别的页面带入参数跳到review的位置,并执行js,修改主要如下.
找到summary.phtml文件 修改如下<?php if ($this->getReviewsCount()): ?> <div class="ratings"> <?php if ($this->getRatingSummary()):?> <div class="rating-box"> <div class="rating" style="width:<?php echo $this->getRatingSummary() ?>%"></div> </div> <?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> <span onclick="javascript:expandcontent('sc7',document.getElementById('asc7'));"> <a rel="nofollow" class="bj7" href="#customer-reviews" ><?php echo $this->__('Add Your Review') ?> </a> </span> <!--<a href="<?php echo $this->getReviewsUrl() ?>#review-form"><?php echo $this->__('Add Your Review') ?></a> --> </p> </div>
我主要添加了一个js 和一个锚点,在view.phtml文件添加相应的js函数代码.