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


PHP Widgets::receiptLogo方法代码示例

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


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

示例1:

if ($ok == TRUE) {
    ?>
         <div class="receipt-main-wrap">
         <h3><?php 
    echo Yii::t("default", "Thank You");
    ?>
</h3>
         <p><?php 
    echo Yii::t("default", "Your order has been placed.");
    ?>
</p>
         
	     <div class="receipt-wrap order-list-wrap">
	     	   
	       <?php 
    echo Widgets::receiptLogo();
    ?>
	     
	       
	       <h4><?php 
    echo Yii::t("default", "Order Details");
    ?>
</h4>
	       <div class="input-block">
	         <div class="label"><?php 
    echo Yii::t("default", "Customer Name");
    ?>
 :</div>
	         <div class="value"><?php 
    echo $data['full_name'];
    ?>
开发者ID:ashishvazirani,项目名称:food,代码行数:31,代码来源:receipt.php

示例2: salesReceipt

    public static function salesReceipt($data = '', $item_details = '')
    {
        $tr = "";
        if (is_array($data) && count($data) >= 1) {
            foreach ($data as $val) {
                $tr .= "<tr>";
                $tr .= "<td>" . $val['label'] . "</td>";
                $tr .= "<td>" . $val['value'] . "</td>";
                $tr .= "</tr>";
            }
        }
        $mid = isset($item_details['total']['mid']) ? $item_details['total']['mid'] : '';
        //dump($mid);
        $tr .= "<tr>";
        $tr .= "<td colspan=\"2\">&nbsp;</td>";
        $tr .= "</tr>";
        if (isset($item_details['item'])) {
            if (is_array($item_details['item']) && count($item_details['item']) >= 1) {
                foreach ($item_details['item'] as $item) {
                    //dump($item);
                    $notes = '';
                    $item_total = $item['qty'] * $item['discounted_price'];
                    if (!empty($item['order_notes'])) {
                        $notes = "<p>" . $item['order_notes'] . "</p>";
                    }
                    $cookref = '';
                    if (!empty($item['cooking_ref'])) {
                        $cookref = "<p>" . $item['cooking_ref'] . "</p>";
                    }
                    $size = '';
                    if (!empty($item['size_words'])) {
                        $size = "<p>" . $item['size_words'] . "</p>";
                    }
                    $tr .= "<tr>";
                    $tr .= "<td>" . $item['qty'] . " " . $item['item_name'] . $size . $notes . $cookref . "</td>";
                    $tr .= "<td>" . prettyFormat($item_total, $mid) . "</td>";
                    $tr .= "</tr>";
                    if (isset($item['sub_item'])) {
                        foreach ($item['sub_item'] as $itemsub) {
                            $subitem_total = $itemsub['addon_qty'] * $itemsub['addon_price'];
                            $tr .= "<tr>";
                            $tr .= "<td style=\"text-indent:10px;\">" . $itemsub['addon_name'] . "</td>";
                            $tr .= "<td>" . prettyFormat($subitem_total, $mid) . "</td>";
                            $tr .= "</tr>";
                        }
                    }
                }
            }
        }
        $tr .= "<tr>";
        $tr .= "<td colspan=\"2\">&nbsp;</td>";
        $tr .= "</tr>";
        //dump($item_details['total']);
        if (isset($item_details['total'])) {
            $tr .= "<tr>";
            $tr .= "<td>" . Yii::t("default", "Subtotal") . ":</td>";
            $tr .= "<td>" . prettyFormat($item_details['total']['subtotal'], $mid) . "</td>";
            $tr .= "</tr>";
            if (!empty($item_details['total']['delivery_charges'])) {
                $tr .= "<tr>";
                $tr .= "<td>" . Yii::t("default", "Delivery Fee") . ":</td>";
                $tr .= "<td>" . prettyFormat($item_details['total']['delivery_charges'], $mid) . "</td>";
                $tr .= "</tr>";
            }
            $tr .= "<tr>";
            $tr .= "<td>" . Yii::t("default", "Tax") . " " . $item_details['total']['tax_amt'] . "%</td>";
            $tr .= "<td>" . prettyFormat($item_details['total']['taxable_total'], $mid) . "</td>";
            $tr .= "</tr>";
            $tr .= "<tr>";
            $tr .= "<td>" . Yii::t("default", "Total") . ":</td>";
            $tr .= "<td>" . $item_details['total']['curr'] . prettyFormat($item_details['total']['total'], $mid) . "</td>";
            $tr .= "</tr>";
        }
        ob_start();
        ?>
		<div style="display: block;max-height: 70px;max-width: 200px;">
		<?php 
        echo Widgets::receiptLogo();
        ?>
		</div>
		<h3><?php 
        echo Yii::t("default", "Order Details");
        ?>
</h3>		
		<table border="0">
		<?php 
        echo $tr;
        ?>
		
		</table>
		<?php 
        $receipt = ob_get_contents();
        ob_end_clean();
        return $receipt;
    }
开发者ID:ashishvazirani,项目名称:food,代码行数:95,代码来源:EmailTPL.php


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