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


PHP format::dollar方法代码示例

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


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

示例1: sendConfirmation

 public function sendConfirmation($orderId)
 {
     $order = ORM::factory('order', $orderId);
     $db = new Database();
     $res = $db->query('SELECT oa.* FROM orders_addresses oa JOIN orders o ON (oa.id = o.orders_address_id) WHERE o.id="' . $orderId . '"');
     // call autoresponder handlers
     $shippingInfo = $res[0]->shipping_first_name . ' ' . $res[0]->shipping_last_name . '<br/>' . $res[0]->shipping_address1 . '<br/>' . $res[0]->shipping_address2 . '<br/>' . $res[0]->shipping_city . ' ' . $res[0]->shipping_state . '<br/>' . $res[0]->shipping_zip . '<br/>' . $res[0]->shipping_country;
     $billingInfo = $res[0]->billing_first_name . ' ' . $res[0]->billing_last_name . '<br/>' . $res[0]->billing_address1 . '<br/>' . $res[0]->billing_address2 . '<br/>' . $res[0]->billing_city . ' ' . $res[0]->billing_state . '<br/>' . $res[0]->billing_zip . '<br/>' . $res[0]->billing_country;
     $dateTime = date('Y-m-d H:i:s');
     $res = $db->query('SELECT p.name, ob.qty, ob.subtotal FROM products p JOIN orders_baskets ob ON (ob.product_id=p.id) WHERE ob.order_id="' . $orderId . '"');
     $order_basket = new Orders_basket_Model();
     $description = '';
     $subtotal = 0;
     foreach ($res as $item) {
         $description .= $item->name . '  ' . $item->qty . ' x ' . format::dollar($item->subtotal) . '<br/>';
         $subtotal += $item->subtotal;
     }
     if (!empty($order->comment)) {
         $description .= 'Comment:' . $order->comment . '<br/>';
     }
     $total = 'Subtotal: ' . format::dollar($subtotal) . '<br/>Shipping:' . format::dollar($order->shipping_total);
     $total .= '<br/>Total:' . format::dollar($order->payment_total);
     Autoresponder::sendEmail('order.confirmation', $order->email, $order, array('shipping_info' => $shippingInfo, 'billing_info' => $billingInfo, 'date_time' => $dateTime, 'description' => $description, 'total' => $total));
 }
开发者ID:VinceOmega,项目名称:mcb-nov-build,代码行数:24,代码来源:Order.php

示例2:

				
				<tr>
					<td colspan="2"><strong>Taxes:</strong></td>
					<td align="right">TBD</td>
				</tr>

										
				<tr>
					<td colspan="2"><strong>Shipping Cost:</strong></td>
					<td align="right">TBD</td>
				</tr>
				
				<tr>
					<td colspan="2"><strong>Order Total:</strong></td>
					<td align="right"><?php 
    echo format::dollar($cart->subtotal() - $amount['total']);
    ?>
 </td>
				</tr>
				
				
				<tr>
					<td colspan="3" class="button"><a href="/cart"><img src="/env/images/back_to_order.jpg" alt="" /></a></td>
				</tr>
			</table>

			<?php 
}
?>
	
	</div>
开发者ID:VinceOmega,项目名称:mcb-nov-build,代码行数:30,代码来源:address.php

示例3:

</td>
				</tr>
				<?php 
/*if (($discount = $order_subtotal + $order->shipping_total - $order->order_total) > 0){
		?>
			<tr>
				<td colspan="4" align="right">Discount: </td>
				<td align="right"><?php echo format::dollar($discount) ?></td>
			</tr>				
		<?php
			}*/
?>
				<tr>
					<td colspan="4" align="right">Total: </td>
					<td align="right"><?php 
echo format::dollar($_order->order_total);
?>
</td>
				</tr>		   
			</table>
		 </div>   <!-- div id="tab_products" -->

		
			

		 <div id="tab_shipping_address">
			<table class="form">	
				<tr>
					<td>First Name:</td>
					<td id='shipping_firstname'><?php 
echo $shipping->firstname;
开发者ID:VinceOmega,项目名称:mcb-nov-build,代码行数:31,代码来源:order_content.php

示例4: test

 public function test()
 {
     $id = $this->uri->segment(3);
     $order = ORM::factory('order')->find($id);
     // call autoresponder handler
     $order_address = ORM::factory('orders_address')->find($order->orders_address_id);
     $shippingInfo = $order_address->shipping_first_name . ' ' . $order_address->shipping_last_name . '<br/>' . $order_address->shipping_address1 . '<br/>' . $order_address->shipping_city . ' ' . $order_address->shipping_state . '<br/>' . $order_address->shipping_zip . '<br/>' . $order_address->shipping_country;
     $billingInfo = $order_address->billing_first_name . ' ' . $order_address->billing_last_name . '<br/>' . $order_address->billing_address1 . '<br/>' . $order_address->billing_city . ' ' . $order_address->billing_state . '<br/>' . $order_address->billing_zip . '<br/>' . $order_address->billing_country;
     $dateTime = date('Y-m-d H:i:s');
     $db = new Database();
     $res = $db->query('SELECT p.name, ob.qty FROM products p JOIN orders_baskets ob ON (ob.product_id=p.id) WHERE ob.order_id="' . $order->id . '"');
     $order_basket = new Orders_basket_Model();
     $description = '';
     foreach ($res as $item) {
         $description .= $item->name . ' x ' . $item->qty . '<br/>';
     }
     Autoresponder::sendEmail('order.status.changed', 'erlan@polardesign.com', $order, array('shipping_info' => $shippingInfo, 'billing_info' => $billingInfo, 'date_time' => $dateTime, 'description' => $description, 'total' => format::dollar($order->payment_total)));
 }
开发者ID:VinceOmega,项目名称:mcb-nov-build,代码行数:18,代码来源:orders.php


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