本文整理汇总了PHP中formatqty函数的典型用法代码示例。如果您正苦于以下问题:PHP formatqty函数的具体用法?PHP formatqty怎么用?PHP formatqty使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了formatqty函数的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: formatqty
: <?php
print $prod->delivery_time;
?>
</div>
<?php
}
?>
</td>
<td><?php
if ($this->config->show_product_code_in_order) {
print $prod->product_ean;
}
?>
</td>
<td><?php
print formatqty($prod->product_quantity);
print $prod->_qty_unit;
?>
</td>
<td>
<?php
print formatprice($prod->product_item_price, $order->currency_code);
?>
<?php
print $prod->_ext_price_html;
?>
<?php
if ($this->config->show_tax_product_in_cart && $prod->product_tax > 0) {
?>
<div class="taxinfo"><?php
print productTaxInfo($prod->product_tax, $order->display_price);
开发者ID:olegverstka,项目名称:monax.dev,代码行数:31,代码来源:orderemail.php
示例2: generatePDF
function generatePDF($order)
{
$jshopConfig = JSFactory::getConfig();
$vendorinfo = $order->getVendorInfo();
$pdf = new JorderPDF();
JPluginHelper::importPlugin('jshoppingorder');
$dispatcher = JDispatcher::getInstance();
$dispatcher->trigger('onBeforeCreatePdfOrder', array(&$order, &$vendorinfo, &$pdf));
$pdf->_vendorinfo = $vendorinfo;
$pdf->SetFont('freesans', '', 8);
$pdf->setPrintHeader(false);
$pdf->setPrintFooter(false);
$pdf->SetMargins(0, 0, 0);
$pdf->addNewPage();
$pdf->SetXY(20, 55);
$pdf->setfontsize(6);
$pdf->SetTextColor($pdf->pdfcolors[0][0], $pdf->pdfcolors[0][1], $pdf->pdfcolors[0][2]);
$pdf->MultiCell(80, 3, $vendorinfo->company_name . ", " . $vendorinfo->adress . ", " . $vendorinfo->zip . " " . $vendorinfo->city, 0, 'L');
$pdf->SetXY(110, 55);
$pdf->SetFont('freesansb', '', 11);
$pdf->SetTextColor($pdf->pdfcolors[0][0], $pdf->pdfcolors[0][1], $pdf->pdfcolors[0][2]);
$pdf->MultiCell(80, 3, _JSHOP_EMAIL_BILL, 0, 'R');
$pdf->SetFont('freesans', '', 11);
$pdf->SetXY(20, 60);
$pdf->MultiCell(80, 4.5, $order->firma_name . "\n" . $order->f_name . " " . $order->l_name . " " . $order->m_name . "\n" . $order->street . " " . $order->home . " " . $order->apartment . "\n" . $order->zip . " " . $order->city . "\n" . $order->country, 0, 'L');
$pdf->SetFont('freesansi', '', 11);
$pdf->SetXY(110, 65);
$pdf->MultiCell(80, 4.5, _JSHOP_ORDER_SHORT_NR . " " . $order->order_number . "\n" . _JSHOP_ORDER_FROM . " " . $order->order_date, 0, 'R');
if ($jshopConfig->date_invoice_in_invoice) {
$pdf->SetXY(110, 77);
$pdf->MultiCell(80, 4.5, _JSHOP_INVOICE_DATE . " " . strftime($jshopConfig->store_date_format, strtotime($order->invoice_date)), 0, 'R');
}
$pdf->SetDrawColor($pdf->pdfcolors[0][0], $pdf->pdfcolors[0][1], $pdf->pdfcolors[0][2]);
$pdf->SetFont('freesans', '', 7);
if ($vendorinfo->identification_number) {
$pdf->SetXY(115, 102);
$pdf->MultiCell(35, 4, _JSHOP_IDENTIFICATION_NUMBER, 1, 'L');
$pdf->SetXY(150, 102);
$pdf->MultiCell(40, 4, $vendorinfo->identification_number, 1, 'R');
}
if ($vendorinfo->tax_number) {
$pdf->SetXY(115, 106);
$pdf->MultiCell(35, 4, _JSHOP_TAX_NUMBER, 1, 'L');
$pdf->SetXY(150, 106);
$pdf->MultiCell(40, 4, $vendorinfo->tax_number, 1, 'R');
}
$width_filename = 65;
if (!$jshopConfig->show_product_code_in_order) {
$width_filename = 87;
}
$pdf->setfillcolor($pdf->pdfcolors[1][0], $pdf->pdfcolors[1][1], $pdf->pdfcolors[1][2]);
$pdf->Rect(20, 116, 170, 4, 'F');
$pdf->SetFont('freesansb', '', 7.5);
$pdf->SetXY(20, 116);
$pdf->MultiCell($width_filename, 4, _JSHOP_NAME_PRODUCT, 1, 'L');
if ($jshopConfig->show_product_code_in_order) {
$pdf->SetXY(85, 116);
$pdf->MultiCell(22, 4, _JSHOP_EAN_PRODUCT, 1, 'L');
}
$pdf->SetXY(107, 116);
$pdf->MultiCell(18, 4, _JSHOP_QUANTITY, 1, 'L');
$pdf->SetXY(125, 116);
$pdf->MultiCell(25, 4, _JSHOP_SINGLEPRICE, 1, 'L');
$pdf->SetXY(150, 116);
$pdf->MultiCell(40, 4, _JSHOP_TOTAL, 1, 'R');
$y = 120;
foreach ($order->products as $prod) {
$pdf->SetFont('freesans', '', 7);
$pdf->SetXY(20, $y + 2);
$pdf->MultiCell($width_filename, 4, $prod->product_name, 0, 'L');
if ($prod->manufacturer != '') {
$pdf->SetXY(20, $pdf->getY());
$pdf->MultiCell($width_filename, 4, _JSHOP_MANUFACTURER . ": " . $prod->manufacturer, 0, 'L');
}
if ($prod->product_attributes != "" || $prod->product_freeattributes != "" || $prod->delivery_time || $prod->extra_fields != '') {
if ($prod->delivery_time) {
$pdt = _JSHOP_DELIVERY_TIME . ": " . $prod->delivery_time;
} else {
$pdt = "";
}
$pdf->SetXY(23, $pdf->getY());
$pdf->SetFont('freesans', '', 6);
$attribute = sprintAtributeInOrder($prod->product_attributes, "pdf");
$attribute .= sprintFreeAtributeInOrder($prod->product_freeattributes, "pdf");
$attribute .= sprintExtraFiledsInOrder($prod->extra_fields, "pdf");
$attribute .= $prod->_ext_attribute;
$attribute .= $pdt;
$pdf->MultiCell(62, 4, $attribute, 0, 'L');
$pdf->SetFont('freesans', '', 7);
}
$y2 = $pdf->getY() + 2;
if ($jshopConfig->show_product_code_in_order) {
$pdf->SetXY(85, $y + 2);
$pdf->MultiCell(22, 4, $prod->product_ean, 0, 'L');
$y3 = $pdf->getY() + 2;
} else {
$y3 = $pdf->getY();
}
$pdf->SetXY(107, $y + 2);
$pdf->MultiCell(18, 4, formatqty($prod->product_quantity) . $prod->_qty_unit, 0, 'L');
//.........这里部分代码省略.........
开发者ID:ngogiangthanh,项目名称:damtvnewversion,代码行数:101,代码来源:generete_pdf_order.php
示例3: onBeforeCreatePdfOrderEnd
//.........这里部分代码省略.........
$pdf->MultiCell($width_filename, 4, $prod->product_name, 0, 'L');
if ($prod->manufacturer != '') {
$pdf->SetXY(23, $pdf->getY());
$pdf->MultiCell($width_filename, 4, _JSHOP_MANUFACTURER . ": " . $prod->manufacturer, 0, 'L');
}
if ($prod->product_attributes != "" || $prod->product_freeattributes != "" || $prod->delivery_time || $prod->extra_fields != '') {
if ($prod->delivery_time) {
$pdt = _JSHOP_DELIVERY_TIME . ": " . $prod->delivery_time;
} else {
$pdt = "";
}
$pdf->SetXY(26, $pdf->getY());
$pdf->SetFont('freesans', '', 8);
$attribute = sprintAtributeInOrder($prod->product_attributes, "pdf");
$attribute .= sprintFreeAtributeInOrder($prod->product_freeattributes, "pdf");
$attribute .= sprintExtraFiledsInOrder($prod->extra_fields, "pdf");
$attribute .= $prod->_ext_attribute;
$attribute .= $pdt;
$pdf->MultiCell(62, 4, $attribute, 0, 'L');
$pdf->SetFont('freesans', '', 8);
}
//$y2 = $pdf->getY() + 1;
$y2 = $pdf->getY();
if ($jshopConfig->show_product_code_in_order && 0) {
$pdf->SetXY(85, $y + 1);
$pdf->MultiCell(22, 4, $prod->product_ean, 0, 'L');
$y3 = $pdf->getY() + 1;
} else {
$y3 = $pdf->getY();
}
$pdf->SetXY(102, $y + 1);
$pdf->MultiCell(20, 1, _JSHOP_ADDON_RUS_INVOICES_PAYMENT_CHT, 0, 'C');
$pdf->SetXY(122, $y + 1);
$pdf->MultiCell(16, 4, formatqty($prod->product_quantity) . $prod->_qty_unit, 0, 'R');
//$y4 = $pdf->getY() + 1;
$y4 = $pdf->getY();
$pdf->SetXY(140, $y + 1);
//$pdf->MultiCell(25, 4, formatprice($prod->product_item_price, $order->currency_code), 0 , 'L');
$pdf->MultiCell(23, 4, $this->formatprice($prod->product_item_price), 0, 'R');
if ($prod->_ext_price) {
$pdf->SetXY(150, $pdf->getY());
$pdf->MultiCell(40, 4, $prod->_ext_price, 0, 'R');
}
if ($jshopConfig->show_tax_product_in_cart && $prod->product_tax > 0) {
$pdf->SetXY(125, $pdf->getY());
$pdf->SetFont('freesans', '', 6);
$text = productTaxInfo($prod->product_tax, $order->display_price);
$pdf->MultiCell(25, 4, $text, 0, 'L');
}
//$y5 = $pdf->getY() + 1;
$y5 = $pdf->getY();
$pdf->SetFont('freesans', '', 8);
$pdf->SetXY(165, $y + 1);
//$pdf->MultiCell(40, 4, formatprice($prod->product_quantity * $prod->product_item_price, $order->currency_code), 0 , 'R');
$pdf->MultiCell(28, 4, $this->formatprice($prod->product_quantity * $prod->product_item_price, 0), 0, 'R');
if ($prod->_ext_price_total) {
$pdf->SetXY(150, $pdf->getY());
$pdf->MultiCell(40, 4, $prod->_ext_price_total, 0, 'R');
}
if ($jshopConfig->show_tax_product_in_cart && $prod->product_tax > 0) {
$pdf->SetXY(150, $pdf->getY());
$pdf->SetFont('freesans', '', 6);
$text = productTaxInfo($prod->product_tax, $order->display_price);
$pdf->MultiCell(40, 4, $text, 0, 'R');
}
//$y6 = $pdf->getY() + 1;
开发者ID:panickylemon,项目名称:joomlastayn,代码行数:67,代码来源:addon_rus_invoices_for_payment.php
示例4: formatprice
?>
</td>
<?php
}
?>
<td>
<?php
echo formatprice($item->product_item_price, $order->currency_code);
?>
<?php
print $item->_ext_price_html;
?>
</td>
<td>
<?php
echo formatqty($item->product_quantity);
print $item->_qty_unit;
?>
</td>
<td>
<?php
echo formatprice($item->product_quantity * $item->product_item_price, $order->currency_code);
?>
<?php
print $item->_ext_price_total_html;
?>
</td>
</tr>
<?php
}
?>
开发者ID:arkane0906,项目名称:lasercut-bootstrap,代码行数:31,代码来源:show.php
示例5: sprintBasicPrice
if ($this->config->cart_basic_price_show && $prod->basicprice > 0) {
?>
<div class="basic_price"><?php
print _JSHOP_BASIC_PRICE;
?>
: <span><?php
print sprintBasicPrice($prod);
?>
</span></div>
<?php
}
?>
</td>
<td class="qty" headers="number">
<?php
echo formatqty($prod->product_quantity);
echo $prod->_qty_unit;
?>
</td>
<td class="price" headers="price_total">
<?php
echo formatprice($prod->product_item_price * $prod->product_quantity, $order->currency_code);
?>
<?php
echo $prod->_ext_price_total_html;
?>
<?php
if ($this->config->show_tax_product_in_cart && $prod->product_tax > 0) {
?>
<span class="taxinfo"><?php
echo productTaxInfo($prod->product_tax, $order->display_price);
开发者ID:ngogiangthanh,项目名称:damtvnewversion,代码行数:31,代码来源:order.php
示例6: nl2br
<?php
print $order_name;
?>
</div>
<div>
<?php
print nl2br($order->item->product_freeattributes);
?>
</div>
<p><?php
print _JSHOP_NIGHTS_QTY;
?>
: <?php
print formatqty($order->item->product_quantity);
?>
</p>
<?/*
<div>
<b><?php
print _JSHOP_EMAIL_BILL_TO;
?>
:</b>
<span><?php
print $order->f_name;
?>
<?php
print $order->l_name;
?>
开发者ID:aldegtyarev,项目名称:vip-kvartira,代码行数:31,代码来源:listorder.php
示例7: generatePDF
//.........这里部分代码省略.........
$prodtot = 0;
foreach ($order->products as $prod) {
$pdf->SetFont('freesans', '', 7);
$pdf->SetXY(20, $y + 2);
$pdf->MultiCell($width_filename, 4, $prod->product_name, 0, 'L');
if ($prod->manufacturer != '') {
$pdf->SetXY(20, $pdf->getY());
$pdf->MultiCell($width_filename, 4, _JSHOP_MANUFACTURER . ": " . $prod->manufacturer, 0, 'L');
}
if ($prod->product_attributes != "" || $prod->product_freeattributes != "" || $prod->delivery_time || $prod->extra_fields != '') {
if ($prod->delivery_time) {
$pdt = _JSHOP_DELIVERY_TIME . ": " . $prod->delivery_time;
} else {
$pdt = "";
}
$pdf->SetXY(23, $pdf->getY());
$pdf->SetFont('freesans', '', 6);
$attribute = sprintAtributeInOrder($prod->product_attributes, "pdf");
$attribute .= sprintFreeAtributeInOrder($prod->product_freeattributes, "pdf");
$attribute .= sprintExtraFiledsInOrder($prod->extra_fields, "pdf");
$attribute .= $pdt;
$pdf->MultiCell(62, 4, $attribute, 0, 'L');
$pdf->SetFont('freesans', '', 7);
}
$y2 = $pdf->getY() + 2;
if ($jshopConfig->show_product_code_in_order) {
$pdf->SetXY(85, $y + 2);
$pdf->MultiCell(22, 4, $prod->product_ean, 0, 'L');
$y3 = $pdf->getY() + 2;
} else {
$y3 = $pdf->getY();
}
$pdf->SetXY(107, $y + 2);
$pdf->MultiCell(18, 4, formatqty($prod->product_quantity) . ' ' . $prod->product_qty_unit, 0, 'L');
$y4 = $pdf->getY() + 2;
$pdf->SetXY(125, $y + 2);
$pdf->MultiCell(25, 4, formatprice($prod->product_item_price, $order->currency_code), 0, 'L');
if ($jshopConfig->show_tax_product_in_cart && $prod->product_tax > 0) {
$pdf->SetXY(125, $y + 6);
$pdf->SetFont('freesans', '', 6);
$text = productTaxInfo($prod->product_tax, $order->display_price);
$pdf->MultiCell(25, 4, $text, 0, 'L');
}
$y5 = $pdf->getY() + 2;
$pdf->SetFont('freesans', '', 7);
$pdf->SetXY(150, $y + 2);
$pdf->MultiCell(40, 4, formatprice($prod->product_quantity * $prod->product_item_price, $order->currency_code), 0, 'R');
if ($jshopConfig->show_tax_product_in_cart && $prod->product_tax > 0) {
$pdf->SetXY(150, $y + 6);
$pdf->SetFont('freesans', '', 6);
$text = productTaxInfo($prod->product_tax, $order->display_price);
$pdf->MultiCell(40, 4, $text, 0, 'R');
}
$y6 = $pdf->getY() + 2;
$yn = max($y2, $y3, $y4, $y5, $y6);
$pdf->Rect(20, $y, 170, $yn - $y);
$pdf->Rect(20, $y, 130, $yn - $y);
if ($jshopConfig->show_product_code_in_order) {
$pdf->line(85, $y, 85, $yn);
}
$pdf->line(107, $y, 107, $yn);
$pdf->line(125, $y, 125, $yn);
$y = $yn;
if ($y > 260) {
$pdf->addNewPage();
$y = 60;
开发者ID:arkane0906,项目名称:lasercut-bootstrap,代码行数:67,代码来源:generete_pdf_order.php
注:本文中的formatqty函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论