本文整理汇总了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'];
?>
示例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\"> </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\"> </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;
}