此文件 (frontend/base/default/template/catalog/product/list.phtml) 已编辑,现在没有显示正确的价格, http: //www.personalproducts4u.co.uk/hotel-toiletries/au-lait
我在上面的文件中更改了第三个表标签(只有第三个表标签),价格显示都一样(折扣价)有什么想法吗?
这是我更改的代码:(将其粘贴在列表文件的第三个表标记上)
<table border="1" cellpadding="0" cellspacing="0">
<tr>
<th class="buy_heading">Buy</th>
<td class="buy_pay_content">1</td>
<?php
/*foreach($tierPrices as $key=>$value)
{
echo "<td class='buy_pay_content'>".number_format($tierPrices[$key]['price_qty'],0)."</td>";
} */
?>
<?php
if(count($tierPrices)):
foreach($tierPrices as $key=>$value)
{
echo "<td class='buy_pay_content'>";
echo number_format($tierPrices[$key]['price_qty'],0);
if($key == $count-1)
{
echo "+";
}
echo "</td>";
}
else:
echo '<td class="buy_pay_content">5</td>
<td class="buy_pay_content">10+</td>';
endif;
?>
<td class="buy_pay_content">Quantity</td>
</tr>
<tr>
<th class="pay_heading">Pay</th>
<td class="buy_pay_content"><?php echo $this->getPriceHtml($_product) ?><?php //echo Mage::helper('core')->currency($_product->getPrice()) ; ?>
<?php //echo Mage::helper('core')->currency($_product->getPrice()) ; ?> <?php //echo $this->getPriceHtml($_product, true)
?>
</td>
<?php
$specialprices = Mage::getModel('catalog/product')->load($_product->getId())->getSpecialPrice();
if($specialprices)
{
$specialprice =$specialprices;
}
else
{
$specialprice = 0;
}
if(count($tierPrices)):
foreach($tierPrices as $key=>$value)
{
if($specialprice < $tierPrices[$key]['price'] && $specialprice != '0'):
//echo 'special less'.$specialprice;
?>
<td class='buy_pay_content'><div class="price-box">
<p class="old-price"><span id="old-price-182" class="price"> <?php echo Mage::helper('core')->currency($tierPrices[$key]['price']) ?> </span> </p>
<p class="special-price"> <span id="product-price-182" class="price"><?php echo Mage::helper('core')->currency($specialprice) ?></span></p>
</div></td>
<?php
else:
?>
<td class='buy_pay_content'><?php echo Mage::helper('core')->currency($tierPrices[$key]['price']) ?></td>
<?php
endif;
?>
<?php }
else:
echo "<td class='buy_pay_content'>".$this->getPriceHtml($_product, true)."</td>";
echo "<td class='buy_pay_content'>".$this->getPriceHtml($_product, true)."</td>";
endif;
?>
<td class="buy_pay_content"><input type="text" class="input-text qty" title="Qty" value="" maxlength="12" id="qty" name="qty"></td>
</tr>
</table>