本文整理汇总了PHP中Tax::searchTax方法的典型用法代码示例。如果您正苦于以下问题:PHP Tax::searchTax方法的具体用法?PHP Tax::searchTax怎么用?PHP Tax::searchTax使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Tax
的用法示例。
在下文中一共展示了Tax::searchTax方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: actionUpdate
//.........这里部分代码省略.........
<div class="cart-info">';
} else {
$output .= '<h1 class="heading1"><span class="maintext"> Shopping Cart</span><span class="subtext"> All items in your Shopping Cart</span></h1>
<div class="cart-info" >';
}
$output .= '
<table class="table table-striped table-bordered" >
<tr>
<th class="image">Image</th>
<th class="name">Product Name</th>
<th class="quantity">Qty</th>
<th class="price">Unit Price</th>
<th class="total">Total</th>
</tr>';
if (count($_SESSION['items']) > 0) {
// get the product ids
$ids = "";
foreach ($_SESSION['items'] as $key => $data) {
$price = $data['price'];
$id = $data['id'];
$title = $data['title'];
$img = $data['image'];
$quantity = $data['quantity'];
$total_price = $data['price'] * $data['quantity'];
$subTotal += $total_price;
$total_price_final = number_format((double) $total_price, 2, '.', '');
$output .= '<tr>
<td class="image"><a href="' . Yii::app()->request->baseUrl . '/index.php?r=reward/view&id=' . $id . '"><img title="product" alt="product" src="' . Yii::app()->request->baseUrl . '/images/reward/' . $id . '/' . $img . '" height="50" width="50"></a></td>
<td class="name"><a href="' . Yii::app()->request->baseUrl . '/index.php?r=reward/view&id=' . $id . '">' . $title . '</a></td>
<td class="quantity">
<div id="flash' . $id . '"></div>
<input type="text" size="1" value="' . $quantity . '" name="quantity' . $id . '" id="quantity' . $id . '" class="span1"><br/>
<input type="submit" value="Update" class="quantity_submit" id="' . $id . '"> | <input type="submit" value="Delete" class="delete_submit" id="' . $id . '">
</td> <td class="price">' . $getCurrency . '' . $price . '</td>
<td class="total">' . $getCurrency . '' . $total_price_final . '</td>
</tr>';
}
} else {
$output .= '<tr><td colspan="5" ><p align="center">Shopping cart is empty.</p></td></tr>';
}
$output .= '</table>';
$output .= '</div>';
if (count($_SESSION['items']) > 0) {
$subTotalFinal = number_format((double) $subTotal, 2, '.', '');
/*$tax = $taxModel->searchTax();
$findTaxAmt = ($subTotalFinal*($tax/100));
$findTaxAmtFinal = number_format((float)$findTaxAmt, 2, '.', '');
$vat = $taxModel->searchVat();
$findVatAmt = ($subTotalFinal*($vat/100));
$findVatAmtFinal =number_format((float)$findVatAmt, 2, '.', '');*/
$grandTotal = $subTotalFinal;
$grandTotalFinal = number_format((double) $grandTotal, 2, '.', '');
$_SESSION['grandTotalFinal'] = $grandTotalFinal;
if ($chkPage == 'checkout') {
$output .= '<div class="row">';
} else {
$output .= '<div class="container">';
}
$output .= '<div class="pull-right">
<div class="span4 pull-right">
<table class="table table-striped table-bordered ">
<tr>
<td><span class="extra bold">Sub-Total :</span></td>
<td><span class="bold">' . $getCurrency . '' . $subTotalFinal . '</span></td>
</tr>
<!-- <tr>
<td><span class="extra bold">Eco Tax (' . $taxModel->searchTax() . '%) :</span></td>
<td><span class="bold">' . $getCurrency . '' . $findTaxAmtFinal . '</span></td>
</tr>
<tr>
<td><span class="extra bold">VAT (' . $taxModel->searchVat() . '%) :</span></td>
<td><span class="bold">' . $getCurrency . '' . $findVatAmtFinal . '</span></td>
</tr> -->
<tr>
<td><span class="extra bold totalamout">Total :</span></td>
<td><span class="bold totalamout">' . $getCurrency . '' . $grandTotalFinal . '</span></td>
</tr>
</table>';
if ($chkPage == 'checkout') {
$output .= ' <input type="submit" onclick="window.location.href=\'index.php?r=shoppingCart/thank\'" value="Place Order" class="btn btn-orange pull-right">';
} else {
$output .= ' <input type="submit" onclick="window.location.href=\'index.php?r=shoppingCart/checkout\'" value="Checkout" class="btn btn-orange pull-right" data-toggle="modal" data-target="#myModal">
';
}
$output .= ' <input type="submit" value="Continue Shopping" class="btn btn-orange pull-right mr10">
</div>
</div>
</div>';
}
echo $output;
}