예제 #1
0
 public function refillAction($currencyId = 0)
 {
     $currency = null;
     if (!empty($_POST['currency_id'])) {
         $currency = Money\Currency::get((int) $_POST['currency_id']);
     }
     if ($currency && !empty($_POST['amount'])) {
         $pay = new Money\Pay(['data' => '', 'user_id' => \Users\User::$cur->id, 'currency_id' => $currency->id, 'sum' => (double) str_replace(',', '.', $_POST['amount']), 'type' => 'refill', 'description' => 'Пополнение баланса ' . $currency->name(), 'callback_module' => 'Money', 'callback_method' => 'refillPayRecive']);
         $pay->save();
         Tools::redirect('/money/merchants/pay/' . $pay->id);
     } else {
         $currencies = Money\Currency::getList(['where' => ['refill', 1], 'forSelect' => true]);
         $this->view->setTitle('Пополнение счета');
         $this->view->page(['data' => compact('currencies')]);
     }
 }
예제 #2
0
echo $delCurrency ? $delCurrency->acronym() : ' руб.';
?>
</td>
        <td></td>
      </tr>
      <tr>
        <td colspan="2"></td>
        <td class="text-right"><b>Итого</b></td>
        <td class="text-right"><?php 
foreach ($sums as $currency_id => $sum) {
    if (!$sum) {
        continue;
    }
    echo number_format($sum, 2, '.', ' ');
    if (App::$cur->money) {
        $currency = Money\Currency::get($currency_id);
        if ($currency) {
            echo '&nbsp;' . $currency->acronym();
        } else {
            echo '&nbsp;руб.';
        }
    } else {
        echo '&nbsp;руб.';
    }
    echo '<br />';
}
?>
</td>
        <td></td>
      </tr>
    </tfoot>
예제 #3
0
파일: index.php 프로젝트: krvd/cms-Inji
                    <thead>
                      <tr>
                        <td colspan="2">Название товара</td>
                        <td style="width:1%;min-width:150px;">Количество</td>
                        <td>Цена</td>
                        <?php 
    echo $cart->hasDiscount() ? '<td>Скидка</td>' : '';
    ?>
                        <td>Итого</td>
                        <td style="width:1%"></td>
                      </tr>
                    </thead>
                    <tbody>
                      <?php 
    if (class_exists('Money\\Currency')) {
        $defaultCurrency = Money\Currency::get(\App::$cur->ecommerce->config['defaultCurrency']);
    } else {
        $defaultCurrency = '';
    }
    foreach ($cart->cartItems as $cartItem) {
        $path = $cartItem->item->image ? $cartItem->item->image->path : '/static/system/images/no-image.png';
        ?>
                          <tr class="cart_item_id<?php 
        echo $cartItem->id;
        ?>
 item" data-cart_item_id = '<?php 
        echo $cartItem->id;
        ?>
' data-priceam = '<?php 
        echo $cartItem->price->price;
        ?>