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


PHP Purchase::getCustomerPurchases方法代码示例

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


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

示例1: Customer

</script>
<div class="container">
<div class="page-header">
<h2>Profile <small>Group by customers</small></h2>
</div>
<?php 
include_once "api/customer.php";
$Customer = new Customer();
if ($id) {
    include_once "api/purchase.php";
    include_once "api/payment.php";
    $Purchase = new Purchase();
    $Payment = new Payment();
    $profile = $Customer->getCustomer($id);
    if (count($profile)) {
        $getPurchases = $Purchase->getCustomerPurchases($id);
        $getPayments = $Payment->getCustomerPayments($id);
        $credit_limit = $profile->credit_limit == 0 ? 'Unlimited' : $profile->credit_limit;
        ?>

	<div class="row">
		<div class="col-md-12">
			<div class="well well-sm">
				<h2><?php 
        echo $profile->first_name . " " . $profile->last_name;
        ?>
</h2>
				<div><?php 
        echo $profile->address;
        ?>
</div>
开发者ID:moli-php,项目名称:dev-moli,代码行数:31,代码来源:profile.php

示例2: Customer






<?php 
} else {
    // id not set, show all customers and there purchases
    include_once "api/customer.php";
    $Customer = new Customer();
    $getCustomers = $Customer->getCustomers();
    // $getCustomers = $Customer->getCustomers();
    if (count($getCustomers)) {
        echo "<div id='accordion' class='panel-group'>";
        foreach ($getCustomers as $val) {
            $getPurchases = $Purchase->getCustomerPurchases($val->id);
            echo "<div class='panel panel-success'>\n\t\t\t\t<div class='panel-heading'>\n\t\t\t\t\t<h4>\n\t\t\t\t\t\t<a href='#section{$val->id}' data-parent='#accordion' data-toggle='collapse' class='collapsed'>\n\t\t\t\t\t\t{$val->first_name} {$val->last_name}\n\t\t\t\t\t\t</a>\n\t\t\t\t\t</h4>\n\t\t\t\t</div>\n\t\t\t\t<div class='panel-collapse collapse' id='section{$val->id}'>\n\t\t\t<div class='panel-body'>";
            ?>
			<table class="table table-condensed ">
					<thead>
						<tr>
							<th>#</th>
							<th>Product</th>
							<th>Price</th>
							<th>Quantity</th>	
							<th>Total</th>
							<th>Balance</th>
							<th >Date</th>
							<th>Action</th>
							
						</tr>
开发者ID:moli-php,项目名称:dev-moli,代码行数:26,代码来源:custpayment.php


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