를 다음 템플릿
magento/app/design/frontend/default/your_theme/template/catalog/product/view/tierprices.phtml
당신이 할 수있는 루프 $_tierPrices
배열을 수정하고 생성 HTML 테이블 요소 수 내 tierprices.phtml에 대해 다음 템플릿을 만들었습니다.
는 참고로 나는 젠토에 1.8.x를
<?php
$_product = $this->getProduct();
$_tierPrices = $this->getTierPrices();
if (count($_tierPrices) > 0):
$_data = array();
$_prevQty = 0;
$_counter = 0;
$_tierPrices = array_reverse($_tierPrices);
foreach ($_tierPrices as $_index => $_price){
$_counter++;
if($_price['price_qty']>$_prevQty){
if($_counter == 1){
$label = $_price['price_qty'] . '+';
} else {
$label = $this->__('%d or less',$_price['price_qty']);
}
$_data[] = array('prev'=>$_prevQty,'next'=>$_price['price_qty'],'label'=>$label,'price'=>$_price['formated_price']);
$_prevQty = $_price['price_qty'];
} else {
$label = $_price['price_qty'] . '-' . $_prevQty;
$_data[] = array('prev'=>$_prevQty,'next'=>$_price['price_qty'],'label'=>$label,'price'=>$_price['formated_price']);
$_prevQty = $_price['price_qty'];
}
}
$_data = array_reverse($_data);
?>
<table class="tiered-pricing">
<tbody>
<tr>
<th>Quantity</th>
<th>Price</th>
</tr>
<?php foreach ($_data as $_row): ?>
<tr>
<td><?php echo $_row['label']; ?></td>
<td><?php echo $_row['price']; ?></td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
<?php
endif;
?>
을하고 있는데 그것은 계층 가격 데이터의 테이블 버전을합니다.