<?php
if (!defined('DIAFAN')) {
$path = __FILE__;
$i = 0;
while (!file_exists($path . '/includes/404.php')) {
if ($i == 10)
exit;
$i++;
$path = dirname($path);
}
include $path . '/includes/404.php';
}
$b5 = 0;
$b4 = 0;
$b1 = $result["cart_delivery"];
$b4 = $result["summ"];
//$b5 = settype($result["summ"], "integer");
$b6 = +($result["summ"]);
$b5 = $b6;
if ($b1 <> 2) {
$b2 = $b4;
}
else {
$b2 = $b5;
//echo gettype($b5);
}
$b3 = $b2;
echo '<div class="order-result">'
. $this->diafan->_('Итогo с доставкой') . ' <i><span id="order_summ">' . $b3 . '</span> ' . $result['currency'] . '</i>';
// общая скидка от объема
if (!empty($result["discount_total"]) || !empty($result["discount_next"])) {
echo '<div class="discount-result">';
if (!empty($result["discount_next"])) {
echo $this->diafan->_('До скидки %s осталось <i>%s</i>', true, $result["discount_next"]["discount"], $result["discount_next"]["summ"]);
}
if (!empty($result["discount_total"])) {
echo $this->diafan->_('Скидка') . ' ' . $result["discount_total"]["discount"];
}
echo '</div>';
}
if (!empty($result["delivery"])) {
foreach ($result["delivery"] as $row) {
if($row["id"] == $result["cart_delivery"]) {
echo '<div class="delivery-result">'.$this->diafan->_('Доставка <i>%s</i>',true,$row["price"] . ' ' . $result['currency']).'</div>';
break;
}
}
}
echo '</div>';