русские индусы. файл category.tpl
<?php if ($product['price']) { ?>
<?php
// начало
/*
$discounts = $this->model_catalog_product->getProductDiscounts($product['product_id']);
$this->data['discounts'] = array();
foreach ($discounts as $discount) {
$this->data['discounts'][] = array(
'quantity' => $discount['quantity'],
'product_id' => $discount['product_id'],
'price' => $this->currency->format($this->tax->calculate($discount['price'], $result['tax_class_id'], $this->config->get('config_tax')))
);
}
if ($discount['quantity']==9994)
{
$podkl='
<div class="podkl">Цена при подключении '.$discount['price'].'</div>
';
}
*/
// ===начало===
$q1='SELECT price,quantity FROM `oc_product_discount` where product_id="'.(int)$product['product_id'].'" and quantity="9999"';
$q2='SELECT price,quantity FROM `oc_product_discount` where product_id="'.(int)$product['product_id'].'"';
// echo $q2;
$res=mysql_query($q1);
if (mysql_num_rows($res) > 0)
{
$disc = mysql_result($res, 0, 1);
$podkl_1 = mysql_result($res, 0, 0);
$podkl = $this->currency->format($this->tax->calculate($podkl_1, $this->config->get('config_tax')));
// (int)$podkl;
// if ($disc<>'') {echo (int)$podkl.' -полно- '.$disc;} else {echo'пусто';}
}
// ===конец===
?>