当前位置: 首页>>代码示例>>PHP>>正文


PHP MG::numberFormat方法代码示例

本文整理汇总了PHP中MG::numberFormat方法的典型用法代码示例。如果您正苦于以下问题:PHP MG::numberFormat方法的具体用法?PHP MG::numberFormat怎么用?PHP MG::numberFormat使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在MG的用法示例。


在下文中一共展示了MG::numberFormat方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1:

</span></li>
                        <?php 
                $totSumm = $order['summ'] + $order['delivery_cost'];
                ?>
                        <?php 
                if ($order['delivery_cost']) {
                    ?>
<li>Стоимость доставки : <span><?php 
                    echo MG::numberFormat($order['delivery_cost']) . '  ' . $perCurrencyShort;
                    ?>
</span></li>
                        <?php 
                }
                ?>
                      <li>Всего к оплате: <span><?php 
                echo MG::numberFormat($totSumm) . '  ' . $perCurrencyShort;
                ?>
</span></li>
                    </ul>
                  </div>
                  <div class="clear"></div>
                    <?php 
                if (!empty($order['comment'])) {
                    ?>
                    <div class="manager-information">
                      <div class="manager-information-head">Комментарий менеджера</div>
                      <div class="manager-information-comm"><?php 
                    echo $order['comment'];
                    ?>
 </div>
                    </div>
开发者ID:WinGood,项目名称:24karcher,代码行数:31,代码来源:personal.php

示例2:

        echo $order['user_email'];
        ?>
</td>
                                <td > <?php 
        echo $assocDelivery[$order['delivery_id']];
        ?>
</td>
                                <td ><span class="icon-payment-<?php 
        echo $order['payment_id'];
        ?>
"></span> <?php 
        echo $assocPay[$order['payment_id']];
        ?>
</td>
                                <td > <?php 
        echo MG::numberFormat($order['summ'] * 1 + $order['delivery_cost'] * 1);
        ?>
 <?php 
        echo MG::getSetting('currency');
        ?>
</td>
                                <td class="statusId id_<?php 
        echo $order['status_id'];
        ?>
">
                                    <span class="<?php 
        echo $assocStatusClass[$order['status_id']];
        ?>
">
                                        <?php 
        echo $lang[$assocStatus[$order['status_id']]];
开发者ID:nellka,项目名称:mebel,代码行数:31,代码来源:orders.php

示例3: calcPrice

 /**
  * Обновление состояния корзины.
  */
 public function calcPrice()
 {
     $product = $this->getProduct($_POST['inCartProductId']);
     $currencyRate = MG::getSetting('currencyRate');
     $currencyShopIso = MG::getSetting('currencyShopIso');
     if (isset($_POST['variant'])) {
         $variants = $this->getVariants($_POST['inCartProductId']);
         $variant = $variants[$_POST['variant']];
         $product['price'] = $variant['price'];
         $product['code'] = $variant['code'];
         $product['count'] = $variant['count'];
         $product['old_price'] = $variant['old_price'];
         $product['weight'] = $variant['weight'];
         $product['price_course'] = $variant['price_course'];
     }
     $cart = new Models_Cart();
     $property = $cart->createProperty($_POST);
     //var_dump($property);
     $product['currency_iso'] = $product['currency_iso'] ? $product['currency_iso'] : $currencyShopIso;
     $product['price'] = $product['price_course'];
     $product['price'] = SmalCart::plusPropertyMargin($product['price'], $property['propertyReal'], $currencyRate[$product['currency_iso']]);
     $product['real_price'] = $product['price'];
     $product['old_price'] *= $currencyRate[$product['currency_iso']];
     $response = array('status' => 'success', 'data' => array('title' => $product['title'], 'price' => MG::numberFormat($product['price']) . ' ' . MG::getSetting('currency'), 'old_price' => MG::numberFormat($product['old_price']) . ' ' . MG::getSetting('currency'), 'code' => $product['code'], 'count' => $product['count'], 'price_wc' => $product['price'], 'real_price' => $product['real_price'], 'weight' => $product['weight']));
     echo json_encode($response);
     exit;
 }
开发者ID:nellka,项目名称:mebel,代码行数:30,代码来源:product.php

示例4: getPaymentByDeliveryId

 /**
  * Используется при AJAX запросе, 
  * возвращает html список способов оплаты в зависимости от 
  * выбранного способа доставки.
  */
 public function getPaymentByDeliveryId($deliveryId = null, $customer = null, $nojson = false, $countDeliv = null)
 {
     if (!$deliveryId) {
         $deliveryId = $_POST['deliveryId'];
     }
     if (!$customer) {
         $customer = $_POST['customer'];
     }
     if ($countDeliv === 1) {
         $seletFirst = true;
     }
     $countPaymentMethod = 0;
     //колическтво активных методов оплаты
     $paymentTable = '';
     foreach ($this->getPayment() as $payment) {
         $delivArray = json_decode($payment['deliveryMethod'], true);
         if ($customer == "yur" && $payment['id'] != "7") {
             continue;
         }
         if (!$delivArray[$deliveryId] || !$payment['activity']) {
             continue;
         }
         $paymentTable .= '
     <li class="noneactive">
       <label>
       <input type="radio" name="payment" rel value=' . $payment['id'] . '>' . $payment['name'] . '</label>
       <span class="icon-payment-' . $payment['id'] . '"></span>
     </li>';
         $countPaymentMethod++;
         if ($payment['id'] === $_POST['payment']) {
             $paymentTable = str_replace('class="noneactive"', 'class="active"', $paymentTable);
             $paymentTable = str_replace('rel', 'checked', $paymentTable);
         }
     }
     if (1 == $countPaymentMethod) {
         $paymentTable = str_replace('class="noneactive"', 'class="active"', $paymentTable);
         $paymentTable = str_replace('rel', 'checked', $paymentTable);
     }
     if ($nojson) {
         return $paymentTable;
     }
     $summDelivery = 0;
     $deliveryArray = $this->getDelivery();
     foreach ($deliveryArray as $delivery) {
         if ($delivery['id'] == $deliveryId && $delivery['cost'] != 0) {
             $summDelivery = MG::numberFormat($delivery['cost']) . ' ' . MG::getSetting('currency');
         }
     }
     $result = array('status' => true, 'paymentTable' => $paymentTable, 'summDelivery' => $summDelivery);
     echo json_encode($result);
     MG::disableTemplate();
     exit;
 }
开发者ID:kostiukoleg,项目名称:all4web.loc,代码行数:58,代码来源:order.php

示例5: isset

        echo isset($data['category_url']) ? $data['category_url'] : 'catalog/';
        echo $data['product_url'];
        ?>
"  target="_blank" ><img src="<?php 
        echo SITE;
        ?>
/mg-admin/design/images/icons/link.png" alt="" /></a></td>
                <?php 
        $printPrice = false;
        ?>
   
                <td class="price">
                  <table class="variant-row-table">
                    
                  <?php 
        if ($data['price'] != MG::numberFormat($data['real_price']) && empty($data['variants'])) {
            ?>
   
                    <?php 
            $printPrice = true;
            ?>
   
                    <tr>
                      <td colspan="3">
                        <span class="view-price tool-tip-bottom"  data-productId="<?php 
            echo $data['id'];
            ?>
" style="color: <?php 
            echo $data['price'] > $data['real_price'] ? '#1C9221' : '#B42020';
            ?>
;" title="с учетом скидки/наценки"><?php 
开发者ID:WinGood,项目名称:24karcher,代码行数:31,代码来源:catalog.php

示例6:

?>
</span> кг. </li>
        </ul>
        <!--Кнопка, кототорая меняет свое значение с "В корзину" на "Подробнее"-->
        <?php 
echo $data['propertyForm'];
?>
        <div class="product-price mobile">
          <ul class="product-status-list">
            <li>
              <div class="old-price" <?php 
echo !$data['old_price'] ? 'style="display:none"' : 'style="display:block"';
?>
>
                <span class="old"><?php 
echo MG::numberFormat($data['old_price'], '1 234,56') . " " . $data['currency'];
?>
</span>
              </div>
            </li>
            <li>
              <div class="normal-price">
                <span class="price"><?php 
echo $data['price'];
?>
 <?php 
echo $data['currency'];
?>
</span>
              </div>
            </li>
开发者ID:WinGood,项目名称:24karcher,代码行数:31,代码来源:product.php

示例7:

              <td><input type="password" name="pass2"></td>
            </tr>
          </table>
          <input type = "submit" class="enter-btn ie7-fix" name="chengePass" value = "Сохранить" />
        </form>
        <?php 
            }
            break;
        case 4:
            ?>

      <h1 class="new-products-title">Оплатите заказ № <?php 
            echo $data['orderNumber'];
            ?>
 на сумму <?php 
            echo MG::numberFormat($data['summ']);
            ?>
 <?php 
            echo $data['currency'];
            ?>
</h1>

      <?php 
            if ($data['payMentView']) {
                include $data['payMentView'];
            } else {
                ?>
        <span>  Ваш способ не предусматривает оплату электронными деньгами</span><br><span> Вы должны оплатить заказ в соответствии с указанным способом оплаты! </span>
        <?php 
            }
    }
开发者ID:WinGood,项目名称:24karcher,代码行数:31,代码来源:order.php

示例8:

    </tr>
    <tr>
      <td colspan="6" class="colspan4">
        <strong>Всего к оплате:</strong>
      </td>
      <td><strong><?php 
echo MG::numberFormat($totalsumm) . '  ' . $data['currency'];
?>
</strong></td>
    </tr>
  </table>
  <p>Всего наименований <?php 
echo $i - 1;
?>
 шт., на сумму <?php 
echo MG::numberFormat($totalsumm) . '  ' . $data['currency'];
?>
</p>

  <?php 
include 'int2str.php';
$sumToWord = new int2str($totalsumm, true);
$sumToWord->ucfirst($sumToWord->rub);
?>

  <p><strong style="font-size: 18px;"><?php 
echo $sumToWord->ucfirst($sumToWord->rub);
?>
</strong></p>    
  <div class="clear">&nbsp;</div>
</div>
开发者ID:WinGood,项目名称:24karcher,代码行数:31,代码来源:print_order.php

示例9:

[]" value = "<?php 
    echo $product['countInCart'];
    ?>
"/>
              <input type="hidden"  name="property_<?php 
    echo $product['id'];
    ?>
[]" value = "<?php 
    echo $product['property'];
    ?>
"/>
              <button type="submit" name="refresh" class="refresh" title="Пересчитать" value="Пересчитать">Пересчитать</button>
            </td>
            <td class="price-cell">
              <?php 
    echo MG::numberFormat($product['countInCart'] * $product['price']);
    ?>
  <?php 
    echo $data['currency'];
    ?>
              <a class="deleteItemFromCart delete-btn" href="<?php 
    echo SITE;
    ?>
/cart" data-delete-item-id="<?php 
    echo $product['id'];
    ?>
" data-property="<?php 
    echo $product['property'];
    ?>
" data-variant="<?php 
    echo $product['variantId'];
开发者ID:nellka,项目名称:mebel,代码行数:31,代码来源:cart.php

示例10:

        echo $delivery['name'];
        ?>
</td>
                    <td id="deliveryCost"><span class="costValue"><?php 
        echo MG::numberFormat($delivery['cost']);
        ?>
</span> <span class="currency"><span class="currency"><?php 
        echo MG::getSetting('currency');
        ?>
</span></span> </td>
                    <td id="deliveryDescription"><?php 
        echo $delivery['description'];
        ?>
</td>
                    <td class="free"><span class="costFree"><?php 
        echo MG::numberFormat($delivery['free']);
        ?>
</span> <span class="currency"><?php 
        echo MG::getSetting('currency');
        ?>
</span></td>
                  <td id="activity"  data-delivery-date ="<?php 
        echo $delivery['date'];
        ?>
" data-delivery-ymarket ="<?php 
        echo $delivery['ymarket'];
        ?>
" status="<?php 
        echo $delivery['activity'];
        ?>
">
开发者ID:kostiukoleg,项目名称:all4web.loc,代码行数:31,代码来源:settings.php

示例11:

          <tr>
            <td colspan="3" align="right" style="padding:2px 9px;font-size: 13px;">
              доставка                    </td>
            <td align="right" style="padding:2px 9px;font-size: 13px;font-weight:bold;">
              <span><?php 
echo MG::numberFormat($data['deliveryCost']) . ' ' . $data['currency'];
?>
</span>                    </td>
          </tr>
          <tr>
            <td colspan="3" align="right" style="padding:2px 9px 5px 9px; font-size: 13px;font-weight:bold;">
              <strong>полная стоимость</strong>
            </td>
            <td align="right" style="padding:2px 9px 5px 9px; color: #BA0A0A;font-size: 13px;font-weight:bold;">
              <strong><span><?php 
echo MG::numberFormat($data['total']) . ' ' . $data['currency'];
?>
</span></strong>
            </td>
          </tr>

        </table>

        <p style="font-size:12px;margin:0 0 10px 0">

        </p>
      </td>
    </tr>
    <tr>
      <td bgcolor="#EAEAEA" align="center" style="background:#EAEAEA;text-align:center;">
  <center>
开发者ID:nellka,项目名称:mebel,代码行数:31,代码来源:email_order.php


注:本文中的MG::numberFormat方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。