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


PHP Format::price方法代码示例

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


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

示例1: foreach

		<h3>Заказы клиента</h3>
		<?php 
// Create table body
$table_body = [];
foreach ($orders as $o) {
    $table_body[] = [$o->id, HTML::anchor(Route::url('b_shop', ['controller' => 'orders', 'action' => 'edit', 'id' => $o->id]), '№' . $o->number, ['data-toggle' => 'tooltip', 'data-original-title' => 'Редактировать заказ']), Format::price($o->total), Date::format($o->created, Date::FULL), $o->status->get_title(), TB::act($request->routename, ['controller' => $request->controller, 'action' => 'edit', 'id' => $o->id]) . TB::act($request->routename, ['controller' => $request->controller, 'action' => 'delete', 'id' => $o->id])];
}
// Create table
echo TB_Table::open();
echo TB_Table::colgroup([50, 100, 0, 0, 0]);
echo TB_Table::headers_sorter(['id' => ['string', __('#ID')], 'number' => ['string', __('Номер')], 'total' => ['string', __('Сумма')], 'created' => ['string', __('Дата заказа')], '_status' => ['none', __('Статус')], '_action' => ['none', __('settings.actions')]]);
echo TB_Table::body($table_body);
echo TB_Table::close();
?>

		<span class="badge badge-info">
			Заказов: <?php 
echo $total_items;
?>
		</span>
		<br>
		<span class="badge badge-info">
			Cумма заказов: <?php 
echo Format::price($total_sum);
?>
		</span>

	</div>
</div>
开发者ID:eok8177,项目名称:shopCMS,代码行数:29,代码来源:v_view.php

示例2:

        $i++;
        ?>
			<?php 
    }
    ?>
			<tr>
				<td> </td>
				<td>
					<button type="submit" class="btn btn-default">
						<i class="fa fa-refresh fa-fw"></i>
						Пересчитать
					</button>
				</td>
				<td class="text-right"><h4>Итого:</h4></td>
				<td class="text-right"><h4><?php 
    echo Format::price($cart->total());
    ?>
</h4></td>
				<td> </td>
			</tr>
			<tr>
				<td class="text-right" colspan="5">
					<a href="<?php 
    echo Route::url('f_cart', ['action' => 'checkout']);
    ?>
" class="btn btn-success btn-lg">
						Оформление заказа
					</a>
				</td>
			</tr>
		</table>
开发者ID:eok8177,项目名称:shopCMS,代码行数:31,代码来源:v_cart_index.php

示例3: defined

<?php

defined('SYSPATH') or die('No direct script access.');
if ($total_items > 0) {
    // Create table body
    $table_body = [];
    foreach ($obj as $o) {
        $table_body[] = [HTML::anchor(Route::url('b_shop', ['controller' => 'orders', 'action' => 'edit', 'id' => $o->id]), '№' . $o->number, ['data-toggle' => 'tooltip', 'data-original-title' => 'Редактировать заказ']), Format::price($o->total), Date::format($o->created, Date::FULL), $o->status->get_title(), HTML::anchor(Route::url('b_shop', ['controller' => 'customers', 'action' => 'view', 'id' => $o->customer->id]), $o->customer->fio, ['data-toggle' => 'tooltip', 'data-original-title' => 'Профиль и заказы клиента']), Format::mobile($o->customer->phone), TB::act($request->routename, ['controller' => $request->controller, 'action' => 'edit', 'id' => $o->id]) . TB::act($request->routename, ['controller' => $request->controller, 'action' => 'delete', 'id' => $o->id])];
    }
    // Create table
    echo TB_Table::open();
    echo TB_Table::colgroup([100, 0, 0, 0, 0, 0, 0]);
    echo TB_Table::headers_sorter(['number' => ['string', __('Номер')], 'total' => ['string', __('Сумма')], 'created' => ['string', __('Дата заказа')], '_status' => ['none', __('Статус')], '_fio' => ['none', __('Клиент')], '_phone' => ['none', __('Телефон')], '_action' => ['none', __('settings.actions')]]);
    echo TB_Table::body($table_body);
    echo TB_Table::close();
    echo '<span class="badge badge-info">Всего заказов: ' . $total_items . '</span>';
    if (isset($pg)) {
        echo $pg;
    }
} else {
    ?>

	<div class="alert alert-block alert-info">
		<button type="button" class="close" data-dismiss="alert">&times;</button>
		Заказов нет.
	</div>

<?php 
}
开发者ID:eok8177,项目名称:shopCMS,代码行数:29,代码来源:v_list.php

示例4:

					</td>
					<td><?php 
    echo $product->qty;
    ?>
</td>
					<td><?php 
    echo Format::price($product->price);
    ?>
</td>
					<td><?php 
    echo Format::price($product->subtotal);
    ?>
</td>
				</tr>
			<?php 
}
?>
			<tr>
				<td>&nbsp;</td>
				<td>&nbsp;</td>
				<td style="white-space: nowrap;"><h4>Сумма заказа</h4></td>
				<td><h4><?php 
echo Format::price($obj->total);
?>
</h4></td>
			</tr>
		</table>

	</div>
</div>
开发者ID:eok8177,项目名称:shopCMS,代码行数:30,代码来源:v_form.php

示例5: foreach

			<th>Статус</th>
			<th>Клиент</th>
			<th>Телефон</th>
			<th>Действия</th>
		</tr>
		<?php 
    foreach ($obj_orders as $order) {
        ?>
			<tr>
				<td>
					<?php 
        echo HTML::anchor(Route::url('b_shop', ['controller' => 'orders', 'action' => 'edit', 'id' => $order->id]), '№' . $order->number, ['data-toggle' => 'tooltip', 'data-original-title' => 'Редактировать заказ']);
        ?>
				</td>
				<td><?php 
        echo Format::price($order->total);
        ?>
</td>
				<td><?php 
        echo Date::format($order->created, Date::FULL);
        ?>
</td>
				<td><?php 
        echo $order->status->get_title();
        ?>
</td>
				<td>
					<?php 
        echo HTML::anchor(Route::url('b_shop', ['controller' => 'customers', 'action' => 'view', 'id' => $order->customer->id]), $order->customer->fio, ['data-toggle' => 'tooltip', 'data-original-title' => 'Профиль и заказы клиента']);
        ?>
				</td>
开发者ID:eok8177,项目名称:shopCMS,代码行数:31,代码来源:v_index.php


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