0 ) {
$col_cnt = $col_cnt+1;
}
if ( $product_info['products_discount2'] > 0 ) {
$col_cnt = $col_cnt+1;
}
if ( $product_info['products_discount3'] > 0 ) {
$col_cnt = $col_cnt+1;
}
if ( $product_info['products_discount4'] > 0 ) {
$col_cnt = $col_cnt+1;
}
$discount_table = 120*$col_cnt;
if ( $max_product_discount != 0 ) {
$td0 = '' . $oCurrencies->display_price($product_info['products_price'], oos_get_tax_rate($product_info['products_tax_class_id'])) . '
-' . number_format($max_product_discount, 2) . '%
' . $oCurrencies->display_price($product_info['products_price']*(100-$max_product_discount)/100, oos_get_tax_rate($product_info['products_tax_class_id'])) . '';
$td1 = '' . $oCurrencies->display_price($product_info['products_discount1'], oos_get_tax_rate($product_info['products_tax_class_id'])) . '
-' . number_format($max_product_discount, 2) . '%
' . $oCurrencies->display_price($product_info['products_discount1']*(100-$max_product_discount)/100, oos_get_tax_rate($product_info['products_tax_class_id'])) . '';
$td2 = '' . $oCurrencies->display_price($product_info['products_discount2'], oos_get_tax_rate($product_info['products_tax_class_id'])) . '
-' . number_format($max_product_discount, 2) . '%
' . $oCurrencies->display_price($product_info['products_discount2']*(100-$max_product_discount)/100, oos_get_tax_rate($product_info['products_tax_class_id'])) . '';
$td3 = '' . $oCurrencies->display_price($product_info['products_discount3'], oos_get_tax_rate($product_info['products_tax_class_id'])) . '
-' . number_format($max_product_discount, 2) . '%
' . $oCurrencies->display_price($product_info['products_discount3']*(100-$max_product_discount)/100, oos_get_tax_rate($product_info['products_tax_class_id'])) . '';
$td4 = '' . $oCurrencies->display_price($product_info['products_discount4'], oos_get_tax_rate($product_info['products_tax_class_id'])) . '
-' . number_format($max_product_discount, 2) . '%
' . $oCurrencies->display_price($product_info['products_discount4']*(100-$max_product_discount)/100, oos_get_tax_rate($product_info['products_tax_class_id'])) . '';
} else {
$td0 = $oCurrencies->display_price($product_info['products_price'], oos_get_tax_rate($product_info['products_tax_class_id']));
$td1 = $oCurrencies->display_price($product_info['products_discount1'], oos_get_tax_rate($product_info['products_tax_class_id']));
$td2 = $oCurrencies->display_price($product_info['products_discount2'], oos_get_tax_rate($product_info['products_tax_class_id']));
$td3 = $oCurrencies->display_price($product_info['products_discount3'], oos_get_tax_rate($product_info['products_tax_class_id']));
$td4 = $oCurrencies->display_price($product_info['products_discount4'], oos_get_tax_rate($product_info['products_tax_class_id']));
}
$col0 = (($q1-1) > $q0 ? $q0 . '-' . ($q1-1) : $q0);
$col1 = ($q2 > 0 ? (($q2-1) > $q1 ? $q1 . '-' . ($q2-1) : $q1) : $q1 . '+');
$col2 = ($q3 > 0 ? (($q3-1) > $q2 ? $q2 . '-' . ($q3-1) : $q2) : $q2 . '+');
$col3 = ($q4 > 0 ? (($q4-1) > $q3 ? $q3 . '-' . ($q4-1) : $q3) : $q3 . '+');
$col4 = ($q4 > 0 ? $q4 . '+' : '');
$smarty->assign(array('discount_table' => $discount_table,
'colspan' => $col_cnt,
'q0' => $q0,
'q1' => $q1,
'q2' => $q2,
'q3' => $q3,
'q4' => $q4,
'col0' => $col0,
'col1' => $col1,
'col2' => $col2,
'col3' => $col3,
'col4' => $col4,
'td0' => $td0,
'td1' => $td1,
'td2' => $td2,
'td3' => $td3,
'td4' => $td4,
'td5' => $td5));