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


PHP Tax::searchTax方法代码示例

本文整理汇总了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;
    }
开发者ID:Gameonn,项目名称:JS_API,代码行数:101,代码来源:ShoppingCartController-29thoct.php


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