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


PHP osc_format_price函数代码示例

本文整理汇总了PHP中osc_format_price函数的典型用法代码示例。如果您正苦于以下问题:PHP osc_format_price函数的具体用法?PHP osc_format_price怎么用?PHP osc_format_price使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: processData

 private function processData($products)
 {
     if (!empty($products)) {
         $total = 0;
         foreach ($products as $aRow) {
             $row = array();
             $row['id'] = $aRow['id'];
             $row['description'] = $aRow['description'];
             $row['amount'] = osc_format_price(1000000 * $aRow['amount'], osc_get_preference('currency', 'payment_pro'));
             $row['quantity'] = $aRow['quantity'];
             $row['total'] = osc_format_price(1000000 * $aRow['amount'] * $aRow['quantity'], osc_get_preference('currency', 'payment_pro'));
             $row['delete'] = '<a href="' . osc_route_url('payment-pro-cart-delete', array('id' => $aRow['id'])) . '" >' . __('Delete', 'payment_pro') . '</a>';
             $row = osc_apply_filter('payment_pro_processing_row', $row, $aRow);
             $this->addRow($row);
             $this->rawRows[] = $aRow;
             $total += $aRow['amount'] * $aRow['quantity'];
         }
         $row = array();
         $row['id'] = '';
         $row['description'] = '';
         $row['amount'] = '';
         $row['quantity'] = '<b>' . __('Total', 'payment_pro') . '</b>';
         $row['total'] = '<b>' . osc_format_price(1000000 * $total, osc_get_preference('currency', 'payment_pro')) . '</b>';
         $row['delete'] = '';
         $this->addRow($row);
         //$this->rawRows[] = $row;
     }
 }
开发者ID:michaelxizhou,项目名称:myeden69-original-backup,代码行数:28,代码来源:CheckoutDataTable.php

示例2: button

 public static function button($products, $extra = null)
 {
     if (count($products) == 1) {
         $p = current($products);
         $amount = $p['amount'] * $p['quantity'];
         $description = $p['description'];
         $product_id = $p['id'];
         //$ids = array(array('id' => $product_id));
     } else {
         $amount = 0;
         //$ids = array();
         foreach ($products as $p) {
             $amount += $p['amount'] * $p['quantity'];
             //$ids[] = array('id' => $p['id']);
         }
         $description = sprintf(__('%d products', 'payment_pro'), count($products));
         $product_id = 'SVR_PRD';
     }
     $r = rand(0, 1000);
     $extra['random'] = $r;
     //$extra['ids'] = $ids;
     $extra['items'] = $products;
     $extra['amount'] = $amount;
     $extra = payment_pro_set_custom($extra);
     echo '<li class="payment authorize-btn"><a href="javascript:authorize_pay(\'' . osc_format_price($amount * 1000000) . '\',\'' . $description . '\',\'' . $product_id . '\',\'' . $extra . '\');" ><img src="' . PAYMENT_PRO_URL . 'payments/authorize/button.gif" ></a></li>';
 }
开发者ID:michaelxizhou,项目名称:myeden69-original-backup,代码行数:26,代码来源:AuthorizePayment.php

示例3: _invoiceRows

 private function _invoiceRows($id, $currency)
 {
     $items = ModelPaymentPro::newInstance()->itemsByInvoice($id);
     $rows = '';
     foreach ($items as $item) {
         $rows .= '<li>' . osc_format_price($item['i_amount'], $currency) . ' - ' . $item['i_product_type'] . ' - ' . $item['s_concept'] . '</li>';
     }
     return '<ul>' . $rows . '</ul>';
 }
开发者ID:michaelxizhou,项目名称:myeden69-original-backup,代码行数:9,代码来源:CheckoutInvoicesDataTable.php

示例4: osc_item_contact_name

        } else {
            echo osc_item_contact_name();
        }
        ?>
</p>
                                    <p class="description"><?php 
        echo osc_highlight(strip_tags(osc_item_description()), 110);
        ?>
</p>
                                    <div class="row">
                                        <div class="col-md-5 col-sm-5 col-xs-5 price">
                                            <?php 
        if (osc_price_enabled_at_items()) {
            ?>
<span><?php 
            echo osc_format_price(osc_item_price());
            ?>
</span><?php 
        }
        ?>
                                        </div>
                                        <div class="col-md-7 col-sm-7 col-xs-7 location">
                                            <i class="glyphicon glyphicon-map-marker"></i><?php 
        if (osc_item_region()) {
            ?>
 <?php 
            echo osc_item_region();
        } else {
            ?>
 <?php 
            echo osc_item_country();
开发者ID:abhi143u11,项目名称:ads,代码行数:31,代码来源:main.php

示例5: osc_premium_formated_price

/**
 * Gets formated price of current premium
 *
 * @return string
 */
function osc_premium_formated_price()
{
    return (string) osc_format_price(osc_premium_field("i_price"));
}
开发者ID:acharei,项目名称:OSClass,代码行数:9,代码来源:hPremium.php

示例6: osc_premium_region

if (osc_premium_region() != '') {
    ?>
(<?php 
    echo osc_premium_region();
    ?>
)<?php 
}
?>
</span> <span class="g-hide">-</span> <?php 
echo osc_format_date(osc_premium_pub_date());
?>
                        <?php 
if (osc_price_enabled_at_items()) {
    ?>
<span class="currency-value"><?php 
    echo osc_format_price(osc_premium_price());
    ?>
</span><?php 
}
?>
                    </div>
                    <p><?php 
echo osc_highlight(osc_premium_description(), 250);
?>
</p>
                </div>
                <?php 
if ($admin) {
    ?>
                    <span class="admin-options">
                        <a href="<?php 
开发者ID:mylastof,项目名称:os-class,代码行数:31,代码来源:loop-single-premium.php

示例7: osc_premium_region

            (<?php 
            echo osc_premium_region();
            ?>
)
            <?php 
        }
        ?>
            </span> <span class="date"> <i class="fa fa-clock-o"></i> <?php 
        echo osc_format_date(osc_premium_pub_date());
        ?>
 </span> </article>
          <?php 
        if (osc_price_enabled_at_items()) {
            ?>
          <span class="currency-value"><?php 
            echo osc_format_price(osc_premium_price(), osc_premium_currency_symbol());
            ?>
</span>
          <?php 
        }
        ?>
          <?php 
        $admin = false;
        ?>
          <?php 
        if ($admin) {
            ?>
          <span class="admin-options"> <a href="<?php 
            echo osc_premium_edit_url();
            ?>
" rel="nofollow">
开发者ID:syedfiraat4,项目名称:bikade.com,代码行数:31,代码来源:main.php

示例8: fn_email_item_validation_non_register_user

    function fn_email_item_validation_non_register_user($item) {
        View::newInstance()->_exportVariableToView('item', $item);

        $mPages = new Page();
        $aPage = $mPages->findByInternalName('email_item_validation_non_register_user');
        $locale = osc_current_user_locale();

        if(isset($aPage['locale'][$locale]['s_title'])) {
            $content = $aPage['locale'][$locale];
        } else {
            $content = current($aPage['locale']);
        }

        $item_url = osc_item_url();
        $item_url = '<a href="'.$item_url.'" >'.$item_url.'</a>';
        $edit_url = osc_item_edit_url( $item['s_secret'], $item['pk_i_id'] );
        $delete_url = osc_item_delete_url( $item['s_secret'],  $item['pk_i_id'] );

        $all = '';

        if (isset($item['locale'])) {
            foreach ($item['locale'] as $locale => $data) {
                $locale_name = OSCLocale::newInstance()->findByCode($locale);
                $all .= '<br/>';
                if (isset($locale_name[0]) && isset($locale_name[0]['s_name'])) {
                    $all .= __('Language') . ': ' . $locale_name[0]['s_name'] . '<br/>';
                } else {
                    $all .= __('Language') . ': ' . $locale . '<br/>';
                }
                $all .= __('Title') . ': ' . $data['s_title'] . '<br/>';
                $all .= __('Description') . ': ' . $data['s_description'] . '<br/>';
                $all .= '<br/>';
            }
        } else {
            $all .= __('Title') . ': ' . $item['s_title'] . '<br/>';
            $all .= __('Description') . ': ' . $item['s_description'] . '<br/>';
        }

        // Format activation URL
        $validation_url = osc_item_activate_url( $item['s_secret'], $item['pk_i_id'] );

        $words   = array();
        $words[] = array(
            '{ITEM_DESCRIPTION_ALL_LANGUAGES}',
            '{ITEM_DESCRIPTION}',
            '{ITEM_COUNTRY}',
            '{ITEM_PRICE}',
            '{ITEM_REGION}',
            '{ITEM_CITY}',
            '{ITEM_ID}',
            '{USER_NAME}',
            '{USER_EMAIL}',
            '{ITEM_TITLE}',
            '{ITEM_URL}',
            '{VALIDATION_LINK}',
            '{VALIDATION_URL}',
            '{EDIT_LINK}',
            '{EDIT_URL}',
            '{DELETE_LINK}',
            '{DELETE_URL}'
        );
        $words[] = array(
            $all,
            $item['s_description'],
            $item['s_country'],
            osc_format_price($item['i_price']),
            $item['s_region'],
            $item['s_city'],
            $item['pk_i_id'],
            $item['s_contact_name'],
            $item['s_contact_email'],
            $item['s_title'],
            $item_url,
            '<a href="' . $validation_url . '" >' . $validation_url . '</a>',
            $validation_url,
            '<a href="' . $edit_url . '">' . $edit_url . '</a>',
            $edit_url,
            '<a href="' . $delete_url . '">' . $delete_url . '</a>',
            $delete_url
        );
        $title = osc_apply_filter('email_item_validation_non_register_user_title_after', osc_mailBeauty(osc_apply_filter('email_title', osc_apply_filter('email_item_validation_non_register_user_title', $content['s_title'], $item)), $words), $item);
        $body = osc_apply_filter('email_item_validation_non_register_user_description_after', osc_mailBeauty(osc_apply_filter('email_description', osc_apply_filter('email_item_validation_non_register_user_description', $content['s_text'], $item)), $words), $item);

        $emailParams = array(
            'subject'  => $title,
            'from'     => _osc_from_email_aux(),
            'to'       => $item['s_contact_email'],
            'to_name'  => $item['s_contact_name'],
            'body'     => $body,
            'alt_body' => $body
        );

        osc_sendMail($emailParams);
    }
开发者ID:pombredanne,项目名称:ArcherSys,代码行数:94,代码来源:emails.php

示例9: osc_item_formated_price

function osc_item_formated_price()
{
    return osc_format_price(osc_item_field("f_price"));
}
开发者ID:hashemgamal,项目名称:OSClass,代码行数:4,代码来源:hItems.php

示例10: osc_item_formated_price

/**
 * Gets formated price of current item
 *
 * @return string
 */
function osc_item_formated_price()
{
    return (string) osc_format_price(osc_item_price());
}
开发者ID:mylastof,项目名称:os-class,代码行数:9,代码来源:hItems.php

示例11: _e

<h2><?php 
_e('Publish options', 'payment_pro');
?>
</h2>
<div class="control-group">
    <?php 
if ($payment_pro_premium_fee > 0) {
    ?>
        <div class="controls checkbox">
            <input type="checkbox" name="payment_pro_make_premium" id="payment_pro_make_premium" value="1" checked="yes" /> <label><?php 
    printf(__('Make this ad premium (+%s)', 'payment_pro'), osc_format_price($payment_pro_premium_fee * 1000000, osc_get_preference('currency', 'payment_pro')));
    ?>
</label>
      </div>
    <?php 
}
if ($payment_pro_publish_fee > 0) {
    ?>
    <div class="controls checkbox">
        <label><?php 
    printf(__('Publishing this ad costs %s', 'payment_pro'), osc_format_price($payment_pro_publish_fee * 1000000, osc_get_preference('currency', 'payment_pro')));
    ?>
</label>
    </div>
    <?php 
}
?>
</div>
开发者ID:michaelxizhou,项目名称:myeden69-original-backup,代码行数:28,代码来源:item_edit.php

示例12: osc_premium_formated_price

/**
 * Gets formated price of current premium
 *
 * @return string
 */
function osc_premium_formated_price()
{
    return (string) osc_format_price(osc_premium_field("i_price"), osc_premium_currency_symbol());
}
开发者ID:jmcclenon,项目名称:Osclass,代码行数:9,代码来源:hPremium.php

示例13: osc_get_preference

if (osc_get_preference("pack_price_2", 'payment_pro') != '' && osc_get_preference("pack_price_2", 'payment_pro') != '0') {
    $packs[] = osc_get_preference("pack_price_2", 'payment_pro');
}
if (osc_get_preference("pack_price_3", 'payment_pro') != '' && osc_get_preference("pack_price_3", 'payment_pro') != '0') {
    $packs[] = osc_get_preference("pack_price_3", 'payment_pro');
}
@($user = User::newInstance()->findByPrimaryKey(osc_logged_user_id()));
$wallet = ModelPaymentPro::newInstance()->getWallet(osc_logged_user_id());
if (osc_get_preference('currency', 'payment_pro') == 'BTC') {
    $amount = isset($wallet['formatted_amount']) ? $wallet['formatted_amount'] : 0;
    $formatted_amount = payment_pro_format_btc($amount);
    $credit_msg = sprintf(__('Credit packs. Your current credit is %s', 'payment_pro'), $formatted_amount);
} else {
    $amount = isset($wallet['i_amount']) ? $wallet['i_amount'] : 0;
    if ($amount != 0) {
        $formatted_amount = osc_format_price($amount / 1000000, osc_get_preference('currency', 'payment_pro'));
        $credit_msg = sprintf(__('Credit packs. Your current credit is %s', 'payment_pro'), $formatted_amount);
    } else {
        $credit_msg = __('Your wallet is empty. Buy some credits.', 'payment_pro');
    }
}
?>

<h2><?php 
echo $credit_msg;
?>
</h2>
<?php 
$pack_n = 0;
foreach ($packs as $pack) {
    $pack_n++;
开发者ID:michaelxizhou,项目名称:myeden69-original-backup,代码行数:31,代码来源:pack.php

示例14: osc_item_formated_price

/**
 * Gets formated price of current item
 *
 * @return string
 */
function osc_item_formated_price()
{
    return (string) osc_format_price(osc_item_field("s_price"));
}
开发者ID:nsswaga,项目名称:OSClass,代码行数:9,代码来源:hItems.php


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