for ($j = 0, $k = sizeof($order->products[$i]['attributes']); $j < $k; $j++) { $model = xtc_get_attributes_model($order->products[$i]['id'], $order->products[$i]['attributes'][$j]['value'], $order->products[$i]['attributes'][$j]['option']); if ($model != '') { echo $model . '<br />'; } else { echo '<br />'; } } } //BOF - DokuMan - 2010-07-13 - Error while editing orders with quantity with zero //echo ' </td>'."\n".' <td class="dataTableContent" align="right" valign="top">'.format_price($order->products[$i]['final_price'] / $order->products[$i]['qty'], 1, $order->info['currency'], $order->products[$i]['allow_tax'], $order->products[$i]['tax']).'</td>'."\n"; echo ' </td>' . "\n" . ' <td class="dataTableContent" align="right" valign="top">' . format_price($order->products[$i]['price'], 1, $order->info['currency'], $order->products[$i]['allow_tax'], $order->products[$i]['tax']) . '</td>' . "\n"; //EOF - DokuMan - 2010-07-13 - Error while editing orders with quantity with zero if ($order->products[$i]['allow_tax'] == 1) { echo '<td class="dataTableContent" align="right" valign="top">'; echo xtc_display_tax_value($order->products[$i]['tax']) . '%'; echo '</td>' . "\n"; echo '<td class="dataTableContent" align="right" valign="top"><b>'; //BOF - DokuMan - 2010-07-13 - Error while editing orders with quantity with zero //echo format_price($order->products[$i]['final_price'] / $order->products[$i]['qty'], 1, $order->info['currency'], 0, 0); echo format_price($order->products[$i]['price'], 1, $order->info['currency'], 0, 0); //EOF - DokuMan - 2010-07-13 - Error while editing orders with quantity with zero echo '</b></td>' . "\n"; } echo ' <td class="dataTableContent" align="right" valign="top"><b>' . format_price($order->products[$i]['final_price'], 1, $order->info['currency'], 0, 0) . '</b></td>' . "\n"; echo ' </tr>' . "\n"; } ?> <tr> <td align="right" colspan="10"><table border="0" cellspacing="0" cellpadding="2"> <?php
echo MODULE_PAYMENT_BILLSAFE_2_PRICE_INC; ?> </td> <td class="dataTableHeadingContent" align="center"><?php echo MODULE_PAYMENT_BILLSAFE_2_CHECK; ?> </td> </tr><?php $countOrder = xtc_db_fetch_array(xtc_db_query('SELECT COUNT(articlenumber) AS quantity FROM billsafe_orders_details_2 WHERE ordernumber = "' . xtc_db_input($order_id) . '"')); $countUsed = xtc_db_fetch_array(xtc_db_query('SELECT COUNT(articlenumber) AS quantity FROM billsafe_orders_details_2 WHERE ordernumber = "' . xtc_db_input($order_id) . '" AND (shipped = 1 OR storno = 1)')); $countShipped = xtc_db_fetch_array(xtc_db_query('SELECT COUNT(articlenumber) AS quantity FROM billsafe_orders_details_2 WHERE ordernumber = "' . xtc_db_input($order_id) . '" AND shipped = 1')); $countRetoure = xtc_db_fetch_array(xtc_db_query('SELECT COUNT(articlenumber) AS quantity FROM billsafe_orders_details_2 WHERE ordernumber = "' . xtc_db_input($order_id) . '" AND (shipped = 1 AND retoure = 1)')); $countNotRetoure = xtc_db_fetch_array(xtc_db_query('SELECT COUNT(articlenumber) AS quantity FROM billsafe_orders_details_2 WHERE ordernumber = "' . xtc_db_input($order_id) . '" AND (shipped = 1 AND retoure = 0)')); $orderQuery = xtc_db_query('SELECT * FROM billsafe_orders_details_2 WHERE ordernumber = "' . xtc_db_input($order_id) . '"'); while ($orderData = xtc_db_fetch_array($orderQuery)) { echo '<tr class="dataTableRow"><td class="dataTableContent" valign="top">' . $orderData['articlename'] . '</td><td class="dataTableContent" valign="top">' . $orderData['articlenumber'] . '</td><td class="dataTableContent" align="right" valign="top">' . xtc_display_tax_value($orderData['articletax']) . '%</td><td class="dataTableContent" align="right" valign="top"><strong>' . format_price($orderData['articleprice'], 1, $order->info['currency'], 0, 0) . '</strong></td><td class="dataTableContent" valign="top" align="center">'; if ($orderData['shipped'] == 1 || $orderData['storno'] == 1) { echo '<input type="checkbox" name="shipped[]" value=' . $orderData['id'] . ' checked="checked" disabled="disabled" /> </td>'; } else { echo '<input type="checkbox" name="shipped[]" value=' . $orderData['id'] . ' /> </td>'; } echo '</tr>'; } ?> </table> </div> <div class="col-xs-12 text-right"> <?php if ($countOrder['quantity'] == $countUsed['quantity']) { ?> <input type="submit" name="reportShipmentFull" value="<?php
} ?> <td class="dataTableContent"><?php echo $rates['tax_priority']; ?> </td> <td class="dataTableContent"><?php echo $rates['tax_class_title']; ?> </td> <td class="dataTableContent hidden-xs"><?php echo $rates['geo_zone_name']; ?> </td> <td class="dataTableContent hidden-xs"><?php echo xtc_display_tax_value($rates['tax_rate']); ?> %</td> <!-- BOF - Tomcraft - 2009-06-10 - added some missing alternative text on admin icons --> <!-- <td class="dataTableContent" align="right"><?php if (is_object($trInfo) && $rates['tax_rates_id'] == $trInfo->tax_rates_id) { echo xtc_image(DIR_WS_IMAGES . 'icon_arrow_right.gif', ''); } else { echo '<a href="' . xtc_href_link(FILENAME_TAX_RATES, 'page=' . $_GET['page'] . '&tID=' . $rates['tax_rates_id']) . '#edit-box">' . xtc_image(DIR_WS_IMAGES . 'icon_info.gif', IMAGE_ICON_INFO) . '</a>'; } ?> </td> --> <td class="dataTableContent" align="right"><?php if (is_object($trInfo) && $rates['tax_rates_id'] == $trInfo->tax_rates_id) {
} echo ' </td>' . PHP_EOL; echo ' <td class="dataTableContent" valign="top">'; echo $order->products[$i]['model'] != '' ? $order->products[$i]['model'] : '<br />'; // attribute models if (isset($order->products[$i]['attributes']) && sizeof($order->products[$i]['attributes']) > 0) { for ($j = 0, $k = sizeof($order->products[$i]['attributes']); $j < $k; $j++) { $model = xtc_get_attributes_model($order->products[$i]['id'], $order->products[$i]['attributes'][$j]['value'], $order->products[$i]['attributes'][$j]['option'], $lang); //web28 Fix attribute model language problem echo !empty($model) ? $model . '<br />' : '<br />'; } } echo ' </td>' . PHP_EOL; echo ' <td class="dataTableContent" align="right" valign="top">' . format_price($order->products[$i]['price'], 1, $order->info['currency'], $order->products[$i]['allow_tax'], $order->products[$i]['tax']) . '</td>' . PHP_EOL; if ($order->products[$i]['allow_tax'] == 1) { echo ' <td class="dataTableContent" align="right" valign="top">' . xtc_display_tax_value($order->products[$i]['tax']) . '%</td>' . PHP_EOL; echo ' <td class="dataTableContent" align="right" valign="top"><b>' . format_price($order->products[$i]['price'], 1, $order->info['currency'], 0, 0) . '</b></td>' . PHP_EOL; } echo ' <td class="dataTableContent" align="right" valign="top"><b>' . format_price($order->products[$i]['final_price'], 1, $order->info['currency'], 0, 0) . '</b></td>' . PHP_EOL; echo ' </tr>' . PHP_EOL; } ?> <tr> <td align="right" colspan="10"> <table border="0" cellspacing="0" cellpadding="2"> <?php for ($i = 0, $n = sizeof($order->totals); $i < $n; $i++) { echo ' <tr>' . PHP_EOL . ' <td align="right" class="smallText">' . $order->totals[$i]['title'] . '</td>' . PHP_EOL; echo ' <td align="right" class="smallText">' . $order->totals[$i]['text'] . '</td>' . PHP_EOL; echo ' </tr>' . PHP_EOL; }
$t_products_attributes_item = array('option' => $order->products[$i]['attributes'][$j]['option'], 'value' => $order->products[$i]['attributes'][$j]['value']); $data_products .= '<tr> <td align="left" valign="top"> <nobr> - ' . $t_products_attributes_item['option'] . ': ' . $t_products_attributes_item['value'] . ' <nobr></td> <td align="right" valign="top"> </td></tr>'; $t_products_attributes[] = $t_products_attributes_item; } // BOF GM_MOD GX-Customizer: include DIR_FS_CATALOG . 'gm/modules/gm_gprint_checkout_confirmation.php'; $t_products_item['attributes'] = $t_products_attributes; } $data_products .= '' . "\n"; if ($_SESSION['customers_status']['customers_status_show_price_tax'] == 0 && $_SESSION['customers_status']['customers_status_add_tax_ot'] == 1) { if (sizeof($order->info['tax_groups']) > 1) { $data_products .= ' <td valign="top" align="right">' . xtc_display_tax_value($order->products[$i]['tax']) . '%</td>' . "\n"; } } $data_products .= '</tr><tr><td class="table_products_space"></td></tr>' . "\n"; $t_products_array[] = $t_products_item; } $t_products_array[sizeof($t_products_array) - 1]['flag_last_item'] = true; $data_products .= '</table>'; $smarty->assign('PRODUCTS_BLOCK', $data_products); # products table part $coo_content_view = new ContentView(); $coo_content_view->set_content_template('module/checkout_confirmation_products.html'); $coo_content_view->set_content_data('products_data', $t_products_array); $t_products_table_part = $coo_content_view->get_html(); $smarty->assign('PRODUCTS_TABLE_PART', $t_products_table_part); // EOF GM_MOD
function shopDisplayTaxValue($value) { return xtc_display_tax_value($value); }
while ($order_data_values = xtc_db_fetch_array($order_query)) { $attributes_query = xtc_db_query("\n\t\t\t\t\t\t\t\t\t\tSELECT\n\t\t\t\t\t\t\t\t\t\t\tproducts_options,\n\t\t\t\t\t\t\t\t\t\t\tproducts_options_values,\n\t\t\t\t\t\t\t\t\t\t\tprice_prefix,\n\t\t\t\t\t\t\t\t\t\t\toptions_values_price\n\t\t\t\t\t\t\t\t\t\tFROM " . TABLE_ORDERS_PRODUCTS_ATTRIBUTES . "\n\t\t\t\t\t\t\t\t\t\tWHERE \n\t\t\t\t\t\t\t\t\t\t\torders_products_id='" . $order_data_values['orders_products_id'] . "'\n\t\t\t\t\t\t\t\t\t\t\tAND orders_id='" . (int) $_GET['oID'] . "'\n\t\t\t\t\t\t\t\t\t"); $attributes_data = array(); $attributes_model = ''; while ($attributes_data_values = xtc_db_fetch_array($attributes_query)) { $attributes_data[] = array(xtc_get_attributes_model($order_data_values['products_id'], $attributes_data_values['products_options_values'], $attributes_data_values['products_options']), $attributes_data_values['products_options'] . ': ' . $attributes_data_values['products_options_values']); } // BOF GM_MOD GX-Customizer: require DIR_FS_CATALOG . 'gm/modules/gm_gprint_admin_gm_pdf_order.php'; # properties BOF $t_properties_query = xtc_db_query("SELECT\n\t\t\t\t\t\t\t\t\t\t\t\tproperties_name,\n\t\t\t\t\t\t\t\t\t\t\t\tvalues_name\n\t\t\t\t\t\t\t\t\t\t\tFROM orders_products_properties\n\t\t\t\t\t\t\t\t\t\t\tWHERE orders_products_id='" . $order_data_values['orders_products_id'] . "'"); while ($t_properties_array = xtc_db_fetch_array($t_properties_query)) { $attributes_data[] = array('', $t_properties_array['properties_name'] . ': ' . $t_properties_array['values_name']); } # properties EOF $order_data[] = array('PRODUCTS_MODEL' => $order_data_values['products_model'], 'PRODUCTS_NAME' => $order_data_values['products_name'], 'PRODUCTS_QTY' => gm_prepare_number($order_data_values['products_quantity']), 'PRODUCTS_UNIT' => $order_data_values['unit_name'], 'PRODUCTS_TAX' => xtc_display_tax_value($order_data_values['products_tax']) . "%", 'PRODUCTS_PRICE_SINGLE' => xtc_format_price_order($order_data_values['final_price'] / $order_data_values['products_quantity'], 1, $order->info['currency']), 'PRODUCTS_PRICE' => xtc_format_price_order($order_data_values['final_price'], 1, $order->info['currency']), 'PRODUCTS_ATTRIBUTES' => $attributes_data); } // handling article no $gm_use_products_model = false; if (gm_get_conf('GM_PDF_USE_PRODUCTS_MODEL') == 1) { $gm_use_products_model = true; } $oder_total_query = xtc_db_query("\n\t\t\t\t\t\t\t\t\tSELECT\n\t\t\t\t\t\t\t\t\t\t title,\n\t\t\t\t\t\t\t\t\t\t text,\n\t\t\t\t\t\t\t\t\t\t class,\n\t\t\t\t\t\t\t\t\t\t value,\n\t\t\t\t\t\t\t\t\t\t sort_order\n\t\t\t\t\t\t\t\t\tFROM " . TABLE_ORDERS_TOTAL . "\n\t\t\t\t\t\t\t\t\tWHERE \n\t\t\t\t\t\t\t\t\t\torders_id='" . (int) $_GET['oID'] . "'\n\t\t\t\t\t\t\t\t\tORDER BY \n\t\t\t\t\t\t\t\t\t\tsort_order ASC\n\t\t\t\t\t\t\t\t\t"); /* * -> order total data */ $order_total = array(); while ($oder_total_values = xtc_db_fetch_array($oder_total_query)) { $order_total[] = array('TITLE' => html_entity_decode($oder_total_values['title']), 'TEXT' => $oder_total_values['text']); if ($oder_total_values['class'] == 'ot_total') { $total = $oder_total_values['value'];