本文整理汇总了PHP中zen_display_tax_value函数的典型用法代码示例。如果您正苦于以下问题:PHP zen_display_tax_value函数的具体用法?PHP zen_display_tax_value怎么用?PHP zen_display_tax_value使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了zen_display_tax_value函数的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: nl2br
}
echo ' <tr class="dataTableRow">' . "\n" . ' <td class="dataTableContent" valign="top" align="right">' . $order->products[$i]['qty'] . ' x</td>' . "\n" . ' <td class="dataTableContent" valign="top">' . $order->products[$i]['name'];
if (isset($order->products[$i]['attributes']) && ($k = sizeof($order->products[$i]['attributes'])) > 0) {
for ($j = 0; $j < $k; $j++) {
echo '<br><nobr><small> <i> - ' . $order->products[$i]['attributes'][$j]['option'] . ': ' . nl2br(zen_output_string_protected($order->products[$i]['attributes'][$j]['value']));
if ($order->products[$i]['attributes'][$j]['price'] != '0') {
echo ' (' . $order->products[$i]['attributes'][$j]['prefix'] . $currencies->format($order->products[$i]['attributes'][$j]['price'] * $order->products[$i]['qty'], true, $order->info['currency'], $order->info['currency_value']) . ')';
}
if ($order->products[$i]['attributes'][$j]['product_attribute_is_free'] == '1' and $order->products[$i]['product_is_free'] == '1') {
echo TEXT_INFO_ATTRIBUTE_FREE;
}
echo '</i></small></nobr>';
}
}
echo ' </td>' . "\n" . ' <td class="dataTableContent" valign="top">' . $order->products[$i]['model'] . '</td>' . "\n";
echo ' <td class="dataTableContent" align="right" valign="top">' . zen_display_tax_value($order->products[$i]['tax']) . '%</td>' . "\n" . ' <td class="dataTableContent" align="right" valign="top"><b>' . $currencies->format($order->products[$i]['final_price'], true, $order->info['currency'], $order->info['currency_value']) . ($order->products[$i]['onetime_charges'] != 0 ? '<br />' . $currencies->format($order->products[$i]['onetime_charges'], true, $order->info['currency'], $order->info['currency_value']) : '') . '</b></td>' . "\n" . ' <td class="dataTableContent" align="right" valign="top"><b>' . $currencies->format(zen_add_tax($order->products[$i]['final_price'], $order->products[$i]['tax']), true, $order->info['currency'], $order->info['currency_value']) . ($order->products[$i]['onetime_charges'] != 0 ? '<br />' . $currencies->format(zen_add_tax($order->products[$i]['onetime_charges'], $order->products[$i]['tax']), true, $order->info['currency'], $order->info['currency_value']) : '') . '</b></td>' . "\n" . ' <td class="dataTableContent" align="right" valign="top"><b>' . $currencies->format(zen_round($order->products[$i]['final_price'], $decimals) * $order->products[$i]['qty'], true, $order->info['currency'], $order->info['currency_value']) . ($order->products[$i]['onetime_charges'] != 0 ? '<br />' . $currencies->format($order->products[$i]['onetime_charges'], true, $order->info['currency'], $order->info['currency_value']) : '') . '</b></td>' . "\n" . ' <td class="dataTableContent" align="right" valign="top"><b>' . $priceIncTax . ($order->products[$i]['onetime_charges'] != 0 ? '<br />' . $currencies->format(zen_add_tax($order->products[$i]['onetime_charges'], $order->products[$i]['tax']), true, $order->info['currency'], $order->info['currency_value']) : '') . '</b></td>' . "\n";
echo ' </tr>' . "\n";
}
?>
<tr>
<td align="right" colspan="8"><table border="0" cellspacing="0" cellpadding="2">
<?php
for ($i = 0, $n = sizeof($order->totals); $i < $n; $i++) {
echo ' <tr>' . "\n" . ' <td align="right" class="' . str_replace('_', '-', $order->totals[$i]['class']) . '-Text">' . $order->totals[$i]['title'] . '</td>' . "\n" . ' <td align="right" class="' . str_replace('_', '-', $order->totals[$i]['class']) . '-Amount">' . $order->totals[$i]['text'] . '</td>' . "\n" . ' </tr>' . "\n";
}
?>
</table></td>
</tr>
</table></td>
</tr>
示例2: nl2br
if (isset($order->products[$i]['attributes']) && ($k = sizeof($order->products[$i]['attributes'])) > 0) {
for ($j = 0; $j < $k; $j++) {
echo '<br><nobr><small> <i> - ' . $order->products[$i]['attributes'][$j]['option'] . ': ' . nl2br(zen_output_string_protected($order->products[$i]['attributes'][$j]['value']));
if ($order->products[$i]['attributes'][$j]['price'] != '0') {
echo ' (' . $order->products[$i]['attributes'][$j]['prefix'] . $currencies->format($order->products[$i]['attributes'][$j]['price'] * $order->products[$i]['qty'], true, $order->info['currency'], $order->info['currency_value']) . ')';
}
if ($order->products[$i]['attributes'][$j]['product_attribute_is_free'] == '1' and $order->products[$i]['product_is_free'] == '1') {
echo TEXT_INFO_ATTRIBUTE_FREE;
}
echo '</i></small></nobr>';
}
}
echo ' </td>' . "\n" . ' <td class="dataTableContent" valign="top">' . $order->products[$i]['model'] . '</td>' . "\n";
echo ' <td class="dataTableContent" valign="top">';
if ($display_tax) {
echo zen_display_tax_value($order->products[$i]['tax']) . '%';
} else {
echo ENTRY_NO_TAX;
}
echo '</td>' . "\n";
if ($display_tax) {
echo ' <td class="dataTableContent" align="right" valign="top"><strong>' . $currencies->format($order->products[$i]['final_price'], true, $order->info['currency'], $order->info['currency_value']) . '</strong></td>' . "\n" . ' <td class="dataTableContent" align="right" valign="top"><strong>' . $currencies->format(zen_add_tax($order->products[$i]['final_price'], $order->products[$i]['tax']), true, $order->info['currency'], $order->info['currency_value']) . '</strong></td>' . "\n" . ' <td class="dataTableContent" align="right" valign="top"><strong>' . $currencies->format($order->products[$i]['final_price'] * $order->products[$i]['qty'], true, $order->info['currency'], $order->info['currency_value']) . '</strong></td>' . "\n" . ' <td class="dataTableContent" align="right" valign="top"><strong>' . $currencies->format(zen_add_tax($order->products[$i]['final_price'], $order->products[$i]['tax']) * $order->products[$i]['qty'], true, $order->info['currency'], $order->info['currency_value']) . '</strong></td>' . "\n";
echo ' </tr>' . "\n";
} else {
echo ' <td class="dataTableContent" align="right" valign="top"><strong>' . $currencies->format($order->products[$i]['final_price'], true, $order->info['currency'], $order->info['currency_value']) . '</strong></td>' . "\n" . ' <td class="dataTableContent" align="right" valign="top"><strong>' . $currencies->format($order->products[$i]['final_price'] * $order->products[$i]['qty'], true, $order->info['currency'], $order->info['currency_value']) . '</strong></td>' . "\n" . ' </tr>' . "\n";
}
}
?>
<tr>
<td colspan="8" align="right"><table border="0" cellpadding="2" cellspacing="0">
示例3: zen_draw_checkbox_field
echo ' <td class="dataTableContent" valign="top" width="10">' . zen_draw_checkbox_field('incl_product_' . $i, 'yes') . '</td>' . "\n";
}
echo ' <td class="dataTableContent" valign="middle" align="left">' . $order->products[$i]['qty'] . ' x ' . $order->products[$i]['name'];
if (isset($order->products[$i]['attributes']) && sizeof($order->products[$i]['attributes']) > 0) {
for ($j = 0, $k = sizeof($order->products[$i]['attributes']); $j < $k; $j++) {
echo '<br /><nobr><small> <i> - ' . $order->products[$i]['attributes'][$j]['option'] . ': ' . $order->products[$i]['attributes'][$j]['value'];
if ($order->products[$i]['attributes'][$j]['price'] != '0') {
echo ' (' . $order->products[$i]['attributes'][$j]['prefix'] . $currencies->format($order->products[$i]['attributes'][$j]['price'] * $order->products[$i]['qty'], true, $order->info['currency'], $order->info['currency_value']) . ')';
}
if ($order->products[$i]['attributes'][$j]['product_attribute_is_free'] == '1' and $order->products[$i]['product_is_free'] == '1') {
echo TEXT_INFO_ATTRIBUTE_FREE;
}
echo '</i></small></nobr>';
}
}
echo ' </td>' . "\n" . ' <td class="dataTableContent" valign="middle">' . $order->products[$i]['model'] . '</td>' . "\n" . ' <td class="dataTableContent" align="right" valign="middle">' . zen_display_tax_value($order->products[$i]['tax']) . '%</td>' . "\n" . ' <td class="dataTableContent" align="right" valign="middle"><strong>' . $currencies->format($order->products[$i]['final_price'], true, $order->info['currency'], $order->info['currency_value']) . ($order->products[$i]['onetime_charges'] != 0 ? '<br />' . $currencies->format($order->products[$i]['onetime_charges'], true, $order->info['currency'], $order->info['currency_value']) : '') . '</strong></td>' . "\n" . ' <td class="dataTableContent" align="right" valign="middle"><strong>' . $currencies->format(zen_add_tax($order->products[$i]['final_price'], $order->products[$i]['tax']), true, $order->info['currency'], $order->info['currency_value']) . ($order->products[$i]['onetime_charges'] != 0 ? '<br />' . $currencies->format(zen_add_tax($order->products[$i]['onetime_charges'], $order->products[$i]['tax']), true, $order->info['currency'], $order->info['currency_value']) : '') . '</strong></td>' . "\n" . ' <td class="dataTableContent" align="right" valign="middle"><strong>' . $currencies->format($order->products[$i]['final_price'] * $order->products[$i]['qty'], true, $order->info['currency'], $order->info['currency_value']) . ($order->products[$i]['onetime_charges'] != 0 ? '<br />' . $currencies->format($order->products[$i]['onetime_charges'], true, $order->info['currency'], $order->info['currency_value']) : '') . '</strong></td>' . "\n" . ' <td class="dataTableContent" align="right" valign="middle"><strong>' . $currencies->format(zen_add_tax($order->products[$i]['final_price'], $order->products[$i]['tax']) * $order->products[$i]['qty'], true, $order->info['currency'], $order->info['currency_value']) . ($order->products[$i]['onetime_charges'] != 0 ? '<br />' . $currencies->format(zen_add_tax($order->products[$i]['onetime_charges'], $order->products[$i]['tax']), true, $order->info['currency'], $order->info['currency_value']) : '') . '</strong></td>' . "\n";
echo ' </tr>' . "\n";
}
?>
<tr>
<?php
if (sizeof($order->products) > 1) {
?>
<td valign="top" colspan="2"><table border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="top"> <?php
echo zen_image(DIR_WS_IMAGES . 'arrow_south_east.gif');
?>
</td>
<td valign="bottom" class="main"><input type="submit" value="<?php
echo BUTTON_SPLIT;
示例4: draw_packing_slip_order
//.........这里部分代码省略.........
$pdf->Cell(25, 14, $order->products[$i]['qty'], 'LRT', 0, '', 1);
/* BEGIN update (Loose Chicken Software Development, david@loosechicken.com 01-07-2011) */
/*
* Changed Cell to MultiCell for the test wrapping.
* Because MultiCell doesn't leave the cursor in the right place:
* Retrived cursor before drawing cell, and placed it afterward base on origal location and cell width
*/
$y = $pdf->getY();
$x = $pdf->getX();
$pdf->MultiCell(120, 14, $prod_name, 'LRT', 'L', 1);
$max_y = $pdf->getY();
$pdf->setXY($x + 120, $y);
$y = $pdf->getY();
$x = $pdf->getX();
$pdf->MultiCell(120, 14, $order->products[$i]['model'], 'LRT', 'L', 1);
$max_y = $pdf->getY() > $max_y ? $pdf->getY() : $max_y;
$pdf->setXY($x + 120, $y);
/* END update (Loose Chicken Software Development, david@loosechicken.com 01-07-2011) */
/*$pdf->Cell(40, 14, zen_display_tax_value($order->products[$i]['tax']) . '%', 'LRT', 0, 'R', 1);
$pdf->Cell(68, 14, $currencies->format($order->products[$i]['final_price'], true, $order->info['currency'], $order->info['currency_value']), 'LRT', 0, 'R', 1);
$pdf->Cell(68, 14, $currencies->format(zen_add_tax($order->products[$i]['final_price'], $order->products[$i]['tax']), true, $order->info['currency'], $order->info['currency_value']), 'LRT', 0, 'R', 1);
$pdf->Cell(68, 14, $currencies->format($order->products[$i]['final_price'] * $order->products[$i]['qty'], true, $order->info['currency'], $order->info['currency_value']), 'LRT', 0, 'R', 1);
$pdf->MultiCell(68, 14, $currencies->format(zen_add_tax($order->products[$i]['final_price'], $order->products[$i]['tax']) * $order->products[$i]['qty'], true, $order->info['currency'], $order->info['currency_value']), 'LRT', 'R', 1);
*/
$pdf->Cell(40, 14, html_entity_decode(zen_display_tax_value($order->products[$i]['tax']) . '%', ENT_QUOTES, "ISO-8859-15"), 'LRT', 0, 'R', 1);
if ($order->info['currency'] == 'EUR') {
$f1 = str_replace('€', '€', $currencies->format($order->products[$i]['final_price'], true, $order->info['currency'], $order->info['currency_value']));
$pdf->Cell(68, 14, html_entity_decode($f1), 'LRT', 'R', 1);
} else {
$pdf->Cell(68, 14, html_entity_decode($currencies->format($order->products[$i]['final_price'], true, $order->info['currency'], $order->info['currency_value']), ENT_QUOTES, "ISO-8859-15"), 'LRT', 0, 'R', 1);
}
if ($order->info['currency'] == 'EUR') {
$f2 = str_replace('€', '€', $currencies->format(zen_add_tax($order->products[$i]['final_price'], $order->products[$i]['tax']), true, $order->info['currency'], $order->info['currency_value']));
$pdf->Cell(68, 14, html_entity_decode($f2), 'LRT', 'R', 1);
} else {
$pdf->Cell(68, 14, html_entity_decode($currencies->format(zen_add_tax($order->products[$i]['final_price'], $order->products[$i]['tax']), true, $order->info['currency'], $order->info['currency_value']), ENT_QUOTES, "ISO-8859-15"), 'LRT', 0, 'R', 1);
}
if ($order->info['currency'] == 'EUR') {
$f3 = str_replace('€', '€', $currencies->format($order->products[$i]['final_price'] * $order->products[$i]['qty'], true, $order->info['currency'], $order->info['currency_value']));
$pdf->Cell(68, 14, html_entity_decode($f3), 'LRT', 'R', 1);
} else {
$pdf->Cell(68, 14, html_entity_decode($currencies->format($order->products[$i]['final_price'] * $order->products[$i]['qty'], true, $order->info['currency'], $order->info['currency_value']), ENT_QUOTES, "ISO-8859-15"), 'LRT', 0, 'R', 1);
}
if ($order->info['currency'] == 'EUR') {
$f = str_replace('€', '€', $currencies->format(zen_add_tax($order->products[$i]['final_price'], $order->products[$i]['tax']) * $order->products[$i]['qty'], true, $order->info['currency'], $order->info['currency_value']));
$pdf->MultiCell(68, 14, html_entity_decode($f), 'LRT', 'R', 1);
} else {
$pdf->MultiCell(68, 14, html_entity_decode($currencies->format(zen_add_tax($order->products[$i]['final_price'], $order->products[$i]['tax']) * $order->products[$i]['qty'], true, $order->info['currency'], $order->info['currency_value']), ENT_QUOTES, "ISO-8859-15"), 'LRT', 'R', 1);
}
/* BEGIN add (Loose Chicken Software Development, david@loosechicken.com 01-07-2011) */
/*
* Draw cell borders in case model or product name wrapped and thus would leave blank
* spaces on the other cells. (This must be transparent so the cells are not overritten)
*/
$x = $pdf->GetX();
$y = $pdf->GetY();
if ($max_y > $y) {
示例5: zen_display_tax_value
}
?>
<td class="dataTableContent"><?php
echo $rates->fields['tax_priority'];
?>
</td>
<td class="dataTableContent"><?php
echo $rates->fields['tax_class_title'];
?>
</td>
<td class="dataTableContent"><?php
echo $rates->fields['geo_zone_name'];
?>
</td>
<td class="dataTableContent"><?php
echo zen_display_tax_value($rates->fields['tax_rate']);
?>
%</td>
<td class="dataTableContent" align="right"><?php
if (isset($trInfo) && is_object($trInfo) && $rates->fields['tax_rates_id'] == $trInfo->tax_rates_id) {
echo zen_image(DIR_WS_IMAGES . 'icon_arrow_right.gif', '');
} else {
echo '<a href="' . zen_href_link_admin(FILENAME_TAX_RATES, 'page=' . $_GET['page'] . '&tID=' . $rates->fields['tax_rates_id']) . '">' . zen_image(DIR_WS_IMAGES . 'icon_info.gif', IMAGE_ICON_INFO) . '</a>';
}
?>
</td>
</tr>
<?php
$rates->MoveNext();
}
?>
示例6: str_replace
$OptionOption = str_replace("option value='" . $order->products[$i]['attributes'][$j]['options_values_id'] . "'", "option value='" . $order->products[$i]['attributes'][$j]['options_values_id'] . "' selected", $OptionOption);
if (in_array($order->products[$i]['attributes'][$j]['options_id'], $OptionsThatAreText)) {
$OptionOption = str_replace("<input type='text' size='15' name='" . $sendoptionon . "tv'>", "<input type='text' size='15' name='" . $sendoptionon . "tv' value='" . $order->products[$i]['attributes'][$j]['value'] . "'>", $OptionOption);
}
if ($_GET[advancedoptions] == 'yes') {
echo '<br><nobr><small> <i> ' . TEXT_ATTRIBUTES_PRODUCT_OPTION . ' ' . "<input name='update_products[{$orders_products_id}][attributes][{$orders_products_attributes_id}][option]' size='25' value='" . $order->products[$i]['attributes'][$j]['option'] . "'>" . ': ' . "<input name='update_products[{$orders_products_id}][attributes][{$orders_products_attributes_id}][value]' size='20' value='" . $order->products[$i]['attributes'][$j]['value'] . "'>";
echo '</i></small></nobr>';
echo '<br><nobr><small> <i> ' . TEXT_ATTRIBUTES_OPTION_PRICE_CHANGE . ' ' . "<input name='update_products[{$orders_products_id}][attributes][{$orders_products_attributes_id}][prefix]' size='4' value='" . $order->products[$i]['attributes'][$j]['prefix'] . "'>" . ' ' . "<input name='update_products[{$orders_products_id}][attributes][{$orders_products_attributes_id}][price]' size='8' value='" . $order->products[$i]['attributes'][$j]['price'] . "'>";
echo '</i></small></nobr>';
}
}
if ($_GET[advancedoptions] != 'yes') {
echo $OptionOption;
}
}
echo ' </td>' . "\n" . ' <td class="' . $RowStyle . '" valign="top">' . "<input name='update_products[{$orders_products_id}][model]' size='55' value='" . $order->products[$i]['model'] . "'>" . '</td>' . "\n" . ' <td class="' . $RowStyle . '" align="right" valign="top">' . "<input class='amount' name='update_products[{$orders_products_id}][tax]' size='3' value='" . zen_display_tax_value($order->products[$i]['tax']) . "'>" . ' %</td>' . "\n" . ' <td class="' . $RowStyle . '" align="right" valign="top">' . "<input class='amount' name='update_products[{$orders_products_id}][final_price]' size='5' value='" . number_format($order->products[$i]['final_price'], 2, '.', '') . "'>" . '</td>' . "\n" . ' <td class="' . $RowStyle . '" align="right" valign="top">' . $currencies->format($order->products[$i]['final_price'] * $order->products[$i]['qty'], true, $order->info['currency'], $order->info['currency_value']) . '</td>' . "\n" . ' </tr>' . "\n";
}
?>
<!-- End Products Listings Block -->
<!-- Begin Order Total Block -->
<tr>
<td align="right" colspan="6">
<table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr>
<td valign='top'>
<br>
<?php
echo '<a href="' . zen_href_link(FILENAME_ORDER_EDIT, zen_get_all_get_params(array('oID', 'action')) . 'oID=' . $oID . '&action=add_prdct', 'NONSSL') . '">' . zen_image_button('button_add_product.gif', TEXT_ADD_NEW_PRODUCT) . '</a>';
?>
</td>
示例7: nl2br
{
$priceIncTax = $currencies->format(zen_add_tax($order->products[$i]['final_price'], $order->products[$i]['tax']) * $order->products[$i]['qty'], true, $order->info['currency'], $order->info['currency_value']);
}
echo ' <tr class="dataTableRow">' . "\n";
echo ' <td class="dataTableContent" valign="middle" align="left">' . $order->products[$i]['qty'] . ' x ' . $order->products[$i]['name'];
if (isset($order->products[$i]['attributes']) && (sizeof($order->products[$i]['attributes']) > 0)) {
for ($j = 0, $k = sizeof($order->products[$i]['attributes']); $j < $k; $j++) {
echo '<br /><nobr><small> <i> - ' . $order->products[$i]['attributes'][$j]['option'] . ': ' . nl2br(zen_output_string_protected($order->products[$i]['attributes'][$j]['value']));
if ($order->products[$i]['attributes'][$j]['price'] != '0') echo ' (' . $order->products[$i]['attributes'][$j]['prefix'] . $currencies->format($order->products[$i]['attributes'][$j]['price'] * $order->products[$i]['qty'], true, $order->info['currency'], $order->info['currency_value']) . ')';
if ($order->products[$i]['attributes'][$j]['product_attribute_is_free'] == '1' and $order->products[$i]['product_is_free'] == '1') echo TEXT_INFO_ATTRIBUTE_FREE;
echo '</i></small></nobr>';
}
}
echo ' </td>' . "\n" .
' <td class="dataTableContent" valign="middle">' . $order->products[$i]['model'] . '</td>' . "\n" .
' <td class="dataTableContent" align="right" valign="middle">' . zen_display_tax_value($order->products[$i]['tax']) . '%</td>' . "\n" .
' <td class="dataTableContent" align="right" valign="middle"><strong>' .
$currencies->format($order->products[$i]['final_price'], true, $order->info['currency'], $order->info['currency_value']) .
// (Formating modified for Super Orders)
($order->products[$i]['onetime_charges'] != 0 ? '<br />' . $currencies->format($order->products[$i]['onetime_charges'], true, $order->info['currency'], $order->info['currency_value']) : '') .
'</strong></td>' . "\n" .
' <td class="dataTableContent" align="right" valign="middle"><strong>' .
$currencies->format(zen_add_tax($order->products[$i]['final_price'], $order->products[$i]['tax']), true, $order->info['currency'], $order->info['currency_value']) .
($order->products[$i]['onetime_charges'] != 0 ? '<br />' . $currencies->format(zen_add_tax($order->products[$i]['onetime_charges'], $order->products[$i]['tax']), true, $order->info['currency'], $order->info['currency_value']) : '') .
'</strong></td>' . "\n" .
' <td class="dataTableContent" align="right" valign="middle"><strong>' .
$currencies->format(zen_round($order->products[$i]['final_price'], $currencies->get_decimal_places($order->info['currency'])) * $order->products[$i]['qty'], true, $order->info['currency'], $order->info['currency_value']) .
($order->products[$i]['onetime_charges'] != 0 ? '<br />' . $currencies->format($order->products[$i]['onetime_charges'], true, $order->info['currency'], $order->info['currency_value']) : '') .
'</strong></td>' . "\n" .
' <td class="dataTableContent" align="right" valign="middle"><strong>' .
$priceIncTax .
示例8: zen_display_tax_value
echo HEADING_PRODUCTS;
?>
</strong></td>
</tr>
<?php
}
for ($i = 0, $n = sizeof($order->products); $i < $n; $i++) {
echo ' <tr>' . "\n" . ' <td class="main" align="right" valign="top" width="30">' . $order->products[$i]['qty'] . ' x</td>' . "\n" . ' <td class="main" valign="top">' . $order->products[$i]['name'];
if (isset($order->products[$i]['attributes']) && sizeof($order->products[$i]['attributes']) > 0) {
for ($j = 0, $n2 = sizeof($order->products[$i]['attributes']); $j < $n2; $j++) {
echo '<br /><nobr><small> <i> - ' . $order->products[$i]['attributes'][$j]['option'] . ': ' . $order->products[$i]['attributes'][$j]['value'] . '</i></small></nobr>';
}
}
echo ' </td>' . "\n";
if (sizeof($order->info['tax_groups']) > 1) {
echo ' <td class="main" valign="top" align="right">' . zen_display_tax_value($order->products[$i]['tax']) . '%</td>' . "\n";
}
echo ' <td class="main" align="right" valign="top">' . $currencies->format(zen_add_tax($order->products[$i]['final_price'], $order->products[$i]['tax']) * $order->products[$i]['qty'], true, $order->info['currency'], $order->info['currency_value']) . ($order->products[$i]['onetime_charges'] != 0 ? '<br />' . $currencies->format(zen_add_tax($order->products[$i]['onetime_charges'], $order->products[$i]['tax']), true, $order->info['currency'], $order->info['currency_value']) : '') . '</td>' . "\n" . ' </tr>' . "\n";
}
?>
</table>
<table border="0" width="100%" cellspacing="0" cellpadding="2">
<?php
for ($i = 0, $n = sizeof($order->totals); $i < $n; $i++) {
echo ' <tr>' . "\n" . ' <td class="' . str_replace('_', '-', $order->totals[$i]['class']) . '-Text" align="right" width="100%">' . $order->totals[$i]['title'] . '</td>' . "\n" . ' <td class="' . str_replace('_', '-', $order->totals[$i]['class']) . '-Amount" align="right" nowrap="nowrap">' . $order->totals[$i]['text'] . '</td>' . "\n" . ' </tr>' . "\n";
}
?>
</table>
</td>
</tr>
<tr>
示例9: eo_get_product_taxes
function eo_get_product_taxes($product, $shown_price = -1, $add = true)
{
global $db, $currencies, $order;
if (DISPLAY_PRICE_WITH_TAX == 'true') {
$shown_price = (zen_round($product['final_price'], $currencies->get_decimal_places($_SESSION['currency'])) + zen_calculate_tax($product['final_price'], $product['tax'])) * $product['qty'];
$shown_price += zen_round($product['onetime_charges'], $currencies->get_decimal_places($_SESSION['currency'])) + zen_calculate_tax($product['onetime_charges'], $product['tax']);
} else {
$shown_price = $product['final_price'] * $product['qty'];
$shown_price += $product['onetime_charges'];
}
// Not standard Zen Cart - but clears up some math issues later
$shown_price = zen_round($shown_price, $currencies->get_decimal_places($_SESSION['currency']));
if (array_key_exists('tax_description', $product)) {
$products_tax_description = $product['tax_description'];
} else {
$query = $db->Execute('SELECT `products_tax_class_id` ' . 'FROM `' . TABLE_PRODUCTS . '` WHERE `products_id`=\'' . (int) $product['id'] . '\' ');
if (!$query->EOF) {
$products_tax_description = zen_get_tax_description($query->fields['products_tax_class_id']);
} else {
if (array_key_exists('tax', $product)) {
$products_tax_description = TEXT_UNKNOWN_TAX_RATE . ' (' . zen_display_tax_value($product['tax']) . '%)';
}
}
}
$totalTaxAdd = 0;
if (zen_not_null($products_tax_description)) {
$taxAdd = 0;
// Done this way to ensure we calculate
if (DISPLAY_PRICE_WITH_TAX == 'true') {
$taxAdd = $shown_price - $shown_price / ($product['tax'] < 10 ? "1.0" . str_replace('.', '', $product['tax']) : "1." . str_replace('.', '', $product['tax']));
} else {
$taxAdd = zen_calculate_tax($shown_price, $product['tax']);
}
if (isset($order->info['tax_groups'][$products_tax_description])) {
if ($add) {
$order->info['tax_groups'][$products_tax_description] += $taxAdd;
} else {
$order->info['tax_groups'][$products_tax_description] -= $taxAdd;
}
} else {
if ($add) {
$order->info['tax_groups'][$products_tax_description] = $taxAdd;
}
}
$totalTaxAdd += $taxAdd;
unset($taxAdd);
}
return $totalTaxAdd;
}
示例10: zen_draw_checkbox_field
echo ' <td class="dataTableContent smalltext" valign="top" align="center">' . zen_draw_checkbox_field('split_products[' . $i . ']', $orders_products_id) . NL;
}
echo ' <td class="dataTableContent smalltext" valign="top" align="left">' . $order->products[$i]['qty'] . ' x ' . $order->products[$i]['name'];
if (isset($order->products[$i]['attributes']) && (sizeof($order->products[$i]['attributes']) > 0)) {
for ($j = 0, $k = sizeof($order->products[$i]['attributes']); $j < $k; $j++) {
echo '<br><nobr><small> <i> - ' . $order->products[$i]['attributes'][$j]['option'] . ': ' . $order->products[$i]['attributes'][$j]['value'];
if ($order->products[$i]['attributes'][$j]['price'] != '0') echo ' (' . $order->products[$i]['attributes'][$j]['prefix'] . $currencies->format($order->products[$i]['attributes'][$j]['price'] * $order->products[$i]['qty'], true, $order->info['currency'], $order->info['currency_value']) . ')';
if ($order->products[$i]['attributes'][$j]['product_attribute_is_free'] == '1' and $order->products[$i]['product_is_free'] == '1') echo TEXT_INFO_ATTRIBUTE_FREE;
echo '</i></small></nobr>';
}
}
echo ' </td>' . NL .
' <td class="dataTableContent smalltext" valign="top">' . $order->products[$i]['model'] . '</td>' . NL .
' <td class="dataTableContent smalltext" align="right" valign="top">' . zen_display_tax_value($order->products[$i]['tax']) . '%</td>' . NL .
' <td class="dataTableContent smalltext" align="right" valign="top">' .
$currencies->format($order->products[$i]['final_price'], true, $order->info['currency'], $order->info['currency_value']) .
($order->products[$i]['onetime_charges'] != 0 ? '<br>' . $currencies->format($order->products[$i]['onetime_charges'], true, $order->info['currency'], $order->info['currency_value']) : '') .
'</td>' . NL .
' <td class="dataTableContent smalltext" align="right" valign="top">' .
$currencies->format(zen_add_tax($order->products[$i]['final_price'], $order->products[$i]['tax']), true, $order->info['currency'], $order->info['currency_value']) .
($order->products[$i]['onetime_charges'] != 0 ? '<br>' . $currencies->format(zen_add_tax($order->products[$i]['onetime_charges'], $order->products[$i]['tax']), true, $order->info['currency'], $order->info['currency_value']) : '') .
'</td>' . NL .
' <td class="dataTableContent smalltext" align="right" valign="top">' .
$currencies->format($order->products[$i]['final_price'] * $order->products[$i]['qty'], true, $order->info['currency'], $order->info['currency_value']) .
($order->products[$i]['onetime_charges'] != 0 ? '<br>' . $currencies->format($order->products[$i]['onetime_charges'], true, $order->info['currency'], $order->info['currency_value']) : '') .
'</td>' . NL .
' <td class="dataTableContent smalltext" align="right" valign="top">' .
$currencies->format(zen_add_tax($order->products[$i]['final_price'], $order->products[$i]['tax']) * $order->products[$i]['qty'], true, $order->info['currency'], $order->info['currency_value']) .
($order->products[$i]['onetime_charges'] != 0 ? '<br>' . $currencies->format(zen_add_tax($order->products[$i]['onetime_charges'], $order->products[$i]['tax']), true, $order->info['currency'], $order->info['currency_value']) : '') .