本文整理汇总了PHP中Price::current方法的典型用法代码示例。如果您正苦于以下问题:PHP Price::current方法的具体用法?PHP Price::current怎么用?PHP Price::current使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Price
的用法示例。
在下文中一共展示了Price::current方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: estimatePrice
public function estimatePrice($opts = array())
{
extract($opts);
$info = $this->info();
if (!isset($material)) {
$material = reset(json_decode($info['material']));
}
$price = $info['weight'] * (1 + Setting::get('wear_tear')) * Price::current($material) * ($material === 'PT950' ? Setting::get('weight_ratio') : 1) + Setting::get('labor_expense') + $info['small_stone'] * (Setting::get('st_expense') + Setting::get('st_price'));
return round($price, 2);
}
示例2: exit
<?php
!defined('IN_PTF') && exit('ILLEGAL EXECUTION');
?>
<div class="small-wrap">
<div class="gold-price">
<span class="lbl">今日金价</span>
<span class="info">PT950: <?php
echo fp(Price::current('PT950'));
?>
元/克</span>
<span class="info">AU750: <?php
echo fp(Price::current('AU750'));
?>
元/克</span>
</div>
<div class="account">
<?php
if ($has_login) {
?>
<?php
if ($user_type === 'Customer') {
?>
<span class="welcom">你好,<?php
echo htmlentities($user->name);
?>
</span>
<?php
if ($user_type === 'Customer') {
?>
<a class="cart" href="<?php
示例3: submit
public function submit()
{
$this->info = $this->info();
// why here?
$material = $this->info['material'];
$product = $this->product();
$info = array('small_stone' => $product->small_stone, 'gold_price' => Price::current($material), 'labor_expense' => Setting::get('labor_expense'), 'wear_tear' => Setting::get('wear_tear'), 'st_price' => Setting::get('st_price'), 'st_expense' => Setting::get('st_expense'), 'st_weight' => $product->st_weight, 'model_expense' => 0, 'risk_expense' => Setting::get('risk_expense'));
$factory_price = PriceData::create($info);
$customer_price = PriceData::create($info);
Pdb::update(array('state' => 'ToBeConfirmed', 'submit_time=NOW()' => null, 'factory_price' => $factory_price->id, 'customer_price' => $customer_price->id, 'real_price' => $this->info['estimate_price'], 'weight_ratio' => $material === 'PT950' ? Setting::get('weight_ratio') : 1), self::$table, $this->selfCond());
$customer = $this->customer();
Pdb::insert(array('subject' => $customer->id, 'action' => 'SubmitOrder', 'target' => $this->id, 'time=NOW()' => null, 'info' => $customer->user()->realname . ' 提交订单'), UserLog::$table);
}