本文整理汇总了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>
示例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>