Jump to content

theoiks

Members
  • Content count

    33
  • Joined

  • Last visited

Profile Information

  • Real Name
    Johan and Hannah Oik
  1. theoiks

    NEW! Complete Order Editing Tool!

    Hi, yea I gotcha, I'm just saying, in a high volume shop, it's an opportunity for your 'trusted employee' to pass items and it would be hard for you to realize without having to pull up all your cc receipts..and that's WHEN you realize your inventory is out of whack. It would be a cool feature to generate a simple report of price differences to orders when adding/removing items...maybe with a cron option to email the owner or something... It does seem 5.0.7 should work with osc 2.3.1..I'm assuming people are having trouble with the edits to admin/order.php (the rest are all basic osc edits)...I'll attach mine below. I've somewhat figured out my problem from above which is the result of a fix I found here: http://forums.oscommerce.com/index.php?showtopic=54032&view=findpost&p=1524897 The fix is in regards to this discount coupon related error, when you try to add an item in OE to an order where a coupon has been applied... Warning: in_array() [function.in-array]: Wrong datatype for second argument in /home/mysite/public_html/admin/edit_orders.php on line 463 Warning: in_array() [function.in-array]: Wrong datatype for second argument in /home/mysite/public_html/admin/edit_orders.php on line 463 Warning: Cannot modify header information - headers already sent by (output started at /home/mysite/public_html/admin/edit_orders.php:463) in /home/mysite/public_html/admin/includes/functions/general.php on line 34 but I don't think the contributor realized that. If anyone has a fix to this, I'd love to hear it, otherwise I'll be trying to figure it out. But, again, this is just a problem I'm having because of discount coupon, a normal installation seemingly should work fine on 2.3.1...here's my admin/order.php for those having troublez... <?php /* $Id$ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2010 osCommerce Released under the GNU General Public License */ require('includes/application_top.php'); require(DIR_WS_CLASSES . 'currencies.php'); $currencies = new currencies(); $orders_statuses = array(); $orders_status_array = array(); $orders_status_query = tep_db_query("select orders_status_id, orders_status_name from " . TABLE_ORDERS_STATUS . " where language_id = '" . (int)$languages_id . "'"); while ($orders_status = tep_db_fetch_array($orders_status_query)) { $orders_statuses[] = array('id' => $orders_status['orders_status_id'], 'text' => $orders_status['orders_status_name']); $orders_status_array[$orders_status['orders_status_id']] = $orders_status['orders_status_name']; } $action = (isset($HTTP_GET_VARS['action']) ? $HTTP_GET_VARS['action'] : ''); if (tep_not_null($action)) { switch ($action) { case 'update_order': $oID = tep_db_prepare_input($HTTP_GET_VARS['oID']); $status = tep_db_prepare_input($HTTP_POST_VARS['status']); $comments = tep_db_prepare_input($HTTP_POST_VARS['comments']); $order_updated = false; $check_status_query = tep_db_query("select customers_name, customers_email_address, orders_status, date_purchased from " . TABLE_ORDERS . " where orders_id = '" . (int)$oID . "'"); $check_status = tep_db_fetch_array($check_status_query); if ( ($check_status['orders_status'] != $status) || tep_not_null($comments)) { tep_db_query("update " . TABLE_ORDERS . " set orders_status = '" . tep_db_input($status) . "', last_modified = now() where orders_id = '" . (int)$oID . "'"); $customer_notified = '0'; if (isset($HTTP_POST_VARS['notify']) && ($HTTP_POST_VARS['notify'] == 'on')) { $notify_comments = ''; if (isset($HTTP_POST_VARS['notify_comments']) && ($HTTP_POST_VARS['notify_comments'] == 'on')) { $notify_comments = sprintf(EMAIL_TEXT_COMMENTS_UPDATE, $comments) . "\n\n"; } $email = STORE_NAME . "\n" . EMAIL_SEPARATOR . "\n" . EMAIL_TEXT_ORDER_NUMBER . ' ' . $oID . "\n" . EMAIL_TEXT_INVOICE_URL . ' ' . tep_catalog_href_link(FILENAME_CATALOG_ACCOUNT_HISTORY_INFO, 'order_id=' . $oID, 'SSL') . "\n" . EMAIL_TEXT_DATE_ORDERED . ' ' . tep_date_long($check_status['date_purchased']) . "\n\n" . $notify_comments . sprintf(EMAIL_TEXT_STATUS_UPDATE, $orders_status_array[$status]); tep_mail($check_status['customers_name'], $check_status['customers_email_address'], EMAIL_TEXT_SUBJECT, $email, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS); $customer_notified = '1'; } tep_db_query("insert into " . TABLE_ORDERS_STATUS_HISTORY . " (orders_id, orders_status_id, date_added, customer_notified, comments) values ('" . (int)$oID . "', '" . tep_db_input($status) . "', now(), '" . tep_db_input($customer_notified) . "', '" . tep_db_input($comments) . "')"); $order_updated = true; } if ($order_updated == true) { $messageStack->add_session(SUCCESS_ORDER_UPDATED, 'success'); } else { $messageStack->add_session(WARNING_ORDER_NOT_UPDATED, 'warning'); } tep_redirect(tep_href_link(FILENAME_ORDERS, tep_get_all_get_params(array('action')) . 'action=edit')); break; case 'deleteconfirm': $oID = tep_db_prepare_input($HTTP_GET_VARS['oID']); tep_remove_order($oID, $HTTP_POST_VARS['restock']); tep_redirect(tep_href_link(FILENAME_ORDERS, tep_get_all_get_params(array('oID', 'action')))); break; } } if (($action == 'edit') && isset($HTTP_GET_VARS['oID'])) { $oID = tep_db_prepare_input($HTTP_GET_VARS['oID']); $orders_query = tep_db_query("select orders_id from " . TABLE_ORDERS . " where orders_id = '" . (int)$oID . "'"); $order_exists = true; if (!tep_db_num_rows($orders_query)) { $order_exists = false; $messageStack->add(sprintf(ERROR_ORDER_DOES_NOT_EXIST, $oID), 'error'); } } include(DIR_WS_CLASSES . 'order.php'); require(DIR_WS_INCLUDES . 'template_top.php'); ?> <table border="0" width="100%" cellspacing="0" cellpadding="2"> <?php if (($action == 'edit') && ($order_exists == true)) { $order = new order($oID); ?> <tr> <td width="100%"><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td class="pageHeading"><?php echo HEADING_TITLE; ?></td> <td class="pageHeading" align="right"><?php echo tep_draw_separator('pixel_trans.gif', 1, HEADING_IMAGE_HEIGHT); ?></td> <!-- // BOF: Order Editor --> <td class="pageHeading" align="right"><?php echo '<a href="' . tep_href_link(FILENAME_ORDERS_EDIT, 'oID=' . $_GET['oID']) . '">' . tep_image_button('button_edit.gif', IMAGE_EDIT) . '</a> <a href="' . tep_href_link(FILENAME_ORDERS_INVOICE, 'oID=' . $_GET['oID']) . '" TARGET="_blank">' . tep_image_button('button_invoice.gif', IMAGE_ORDERS_INVOICE) . '</a> <a href="' . tep_href_link(FILENAME_ORDERS_PACKINGSLIP, 'oID=' . $_GET['oID']) . '" TARGET="_blank">' . tep_image_button('button_packingslip.gif', IMAGE_ORDERS_PACKINGSLIP) . '</a> <a href="' . tep_href_link(FILENAME_ORDERS, tep_get_all_get_params(array('action'))) . '">' . tep_image_button('button_back.gif', IMAGE_BACK) . '</a> '; ?></td> <!-- // EOF: Order Editor --> </tr> </table></td> </tr> <tr> <td><table width="100%" border="0" cellspacing="0" cellpadding="2"> <tr> <td colspan="3"><?php echo tep_draw_separator(); ?></td> </tr> <tr> <td valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="2"> <tr> <td class="main" valign="top"><strong><?php echo ENTRY_CUSTOMER; ?></strong></td> <td class="main"><?php echo tep_address_format($order->customer['format_id'], $order->customer, 1, '', '<br />'); ?></td> </tr> <tr> <td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '1', '5'); ?></td> </tr> <tr> <td class="main"><strong><?php echo ENTRY_TELEPHONE_NUMBER; ?></strong></td> <td class="main"><?php echo $order->customer['telephone']; ?></td> </tr> <tr> <td class="main"><strong><?php echo ENTRY_EMAIL_ADDRESS; ?></strong></td> <td class="main"><?php echo '<a href="mailto:' . $order->customer['email_address'] . '"><u>' . $order->customer['email_address'] . '</u></a>'; ?></td> </tr> </table></td> <td valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="2"> <tr> <td class="main" valign="top"><strong><?php echo ENTRY_SHIPPING_ADDRESS; ?></strong></td> <td class="main"><?php echo tep_address_format($order->delivery['format_id'], $order->delivery, 1, '', '<br />'); ?></td> </tr> </table></td> <td valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="2"> <tr> <td class="main" valign="top"><strong><?php echo ENTRY_BILLING_ADDRESS; ?></strong></td> <td class="main"><?php echo tep_address_format($order->billing['format_id'], $order->billing, 1, '', '<br />'); ?></td> </tr> </table></td> </tr> </table></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td> </tr> <tr> <td><table border="0" cellspacing="0" cellpadding="2"> <tr> <td class="main"><strong><?php echo ENTRY_PAYMENT_METHOD; ?></strong></td> <td class="main"><?php echo $order->info['payment_method']; ?></td> </tr> <?php if (tep_not_null($order->info['cc_type']) || tep_not_null($order->info['cc_owner']) || tep_not_null($order->info['cc_number'])) { ?> <tr> <td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td> </tr> <tr> <td class="main"><?php echo ENTRY_CREDIT_CARD_TYPE; ?></td> <td class="main"><?php echo $order->info['cc_type']; ?></td> </tr> <tr> <td class="main"><?php echo ENTRY_CREDIT_CARD_OWNER; ?></td> <td class="main"><?php echo $order->info['cc_owner']; ?></td> </tr> <tr> <td class="main"><?php echo ENTRY_CREDIT_CARD_NUMBER; ?></td> <td class="main"><?php echo $order->info['cc_number']; ?></td> </tr> <tr> <td class="main"><?php echo ENTRY_CREDIT_CARD_EXPIRES; ?></td> <td class="main"><?php echo $order->info['cc_expires']; ?></td> </tr> <?php } ?> </table></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td> </tr> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr class="dataTableHeadingRow"> <td class="dataTableHeadingContent" colspan="2"><?php echo TABLE_HEADING_PRODUCTS; ?></td> <td class="dataTableHeadingContent"><?php echo TABLE_HEADING_PRODUCTS_MODEL; ?></td> <td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_TAX; ?></td> <td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_PRICE_EXCLUDING_TAX; ?></td> <td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_PRICE_INCLUDING_TAX; ?></td> <td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_TOTAL_EXCLUDING_TAX; ?></td> <td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_TOTAL_INCLUDING_TAX; ?></td> </tr> <?php for ($i=0, $n=sizeof($order->products); $i<$n; $i++) { 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']) && (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']) . ')'; echo '</i></small></nobr>'; } } echo ' </td>' . "\n" . ' <td class="dataTableContent" valign="top">' . $order->products[$i]['model'] . '</td>' . "\n" . ' <td class="dataTableContent" align="right" valign="top">' . tep_display_tax_value($order->products[$i]['tax']) . '%</td>' . "\n" . ' <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(tep_add_tax($order->products[$i]['final_price'], $order->products[$i]['tax'], true), 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(tep_add_tax($order->products[$i]['final_price'], $order->products[$i]['tax'], true) * $order->products[$i]['qty'], true, $order->info['currency'], $order->info['currency_value']) . '</strong></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="smallText">' . $order->totals[$i]['title'] . '</td>' . "\n" . ' <td align="right" class="smallText">' . $order->totals[$i]['text'] . '</td>' . "\n" . ' </tr>' . "\n"; } ?> </table></td> </tr> </table></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td> </tr> <tr> <td class="main"><table border="1" cellspacing="0" cellpadding="5"> <tr> <td class="smallText" align="center"><strong><?php echo TABLE_HEADING_DATE_ADDED; ?></strong></td> <td class="smallText" align="center"><strong><?php echo TABLE_HEADING_CUSTOMER_NOTIFIED; ?></strong></td> <td class="smallText" align="center"><strong><?php echo TABLE_HEADING_STATUS; ?></strong></td> <td class="smallText" align="center"><strong><?php echo TABLE_HEADING_COMMENTS; ?></strong></td> </tr> <?php $orders_history_query = tep_db_query("select orders_status_id, date_added, customer_notified, comments from " . TABLE_ORDERS_STATUS_HISTORY . " where orders_id = '" . tep_db_input($oID) . "' order by date_added"); if (tep_db_num_rows($orders_history_query)) { while ($orders_history = tep_db_fetch_array($orders_history_query)) { echo ' <tr>' . "\n" . ' <td class="smallText" align="center">' . tep_datetime_short($orders_history['date_added']) . '</td>' . "\n" . ' <td class="smallText" align="center">'; if ($orders_history['customer_notified'] == '1') { echo tep_image(DIR_WS_ICONS . 'tick.gif', ICON_TICK) . "</td>\n"; } else { echo tep_image(DIR_WS_ICONS . 'cross.gif', ICON_CROSS) . "</td>\n"; } echo ' <td class="smallText">' . $orders_status_array[$orders_history['orders_status_id']] . '</td>' . "\n" . ' <td class="smallText">' . nl2br(tep_db_output($orders_history['comments'])) . ' </td>' . "\n" . ' </tr>' . "\n"; } } else { echo ' <tr>' . "\n" . ' <td class="smallText" colspan="5">' . TEXT_NO_ORDER_HISTORY . '</td>' . "\n" . ' </tr>' . "\n"; } ?> </table></td> </tr> <tr> <td class="main"><br /><strong><?php echo TABLE_HEADING_COMMENTS; ?></strong></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '1', '5'); ?></td> </tr> <tr><?php echo tep_draw_form('status', FILENAME_ORDERS, tep_get_all_get_params(array('action')) . 'action=update_order'); ?> <td class="main"><?php echo tep_draw_textarea_field('comments', 'soft', '60', '5'); ?></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td> </tr> <tr> <td><table border="0" cellspacing="0" cellpadding="2"> <tr> <td><table border="0" cellspacing="0" cellpadding="2"> <tr> <td class="main"><strong><?php echo ENTRY_STATUS; ?></strong> <?php echo tep_draw_pull_down_menu('status', $orders_statuses, $order->info['orders_status']); ?></td> </tr> <tr> <td class="main"><strong><?php echo ENTRY_NOTIFY_CUSTOMER; ?></strong> <?php echo tep_draw_checkbox_field('notify', '', true); ?></td> <td class="main"><strong><?php echo ENTRY_NOTIFY_COMMENTS; ?></strong> <?php echo tep_draw_checkbox_field('notify_comments', '', true); ?></td> </tr> </table></td> <td class="smallText" valign="top"><?php echo tep_draw_button(IMAGE_UPDATE, 'disk', null, 'primary'); ?></td> </tr> </table></td> </form></tr> <tr> <!-- // BOF: Order Editor --> <td colspan="2" align="right"><?php echo '<a href="' . tep_href_link(FILENAME_ORDERS_EDIT, 'oID=' . $_GET['oID']) . '">' . tep_image_button('button_edit.gif', IMAGE_EDIT) . '</a> <a href="' . tep_href_link(FILENAME_ORDERS_INVOICE, 'oID=' . $_GET['oID']) . '" TARGET="_blank">' . tep_image_button('button_invoice.gif', IMAGE_ORDERS_INVOICE) . '</a> <a href="' . tep_href_link(FILENAME_ORDERS_PACKINGSLIP, 'oID=' . $_GET['oID']) . '" TARGET="_blank">' . tep_image_button('button_packingslip.gif', IMAGE_ORDERS_PACKINGSLIP) . '</a> <a href="' . tep_href_link(FILENAME_ORDERS, tep_get_all_get_params(array('action'))) . '">' . tep_image_button('button_back.gif', IMAGE_BACK) . '</a> '; ?></td> <!-- // EOF: Order Editor --> </tr> <?php } else { ?> <tr> <td width="100%"><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td class="pageHeading"><?php echo HEADING_TITLE; ?></td> <td class="pageHeading" align="right"><?php echo tep_draw_separator('pixel_trans.gif', 1, HEADING_IMAGE_HEIGHT); ?></td> <td align="right"><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr><?php echo tep_draw_form('orders', FILENAME_ORDERS, '', 'get'); ?> <td class="smallText" align="right"><?php echo HEADING_TITLE_SEARCH . ' ' . tep_draw_input_field('oID', '', 'size="12"') . tep_draw_hidden_field('action', 'edit'); ?></td> <?php echo tep_hide_session_id(); ?></form></tr> <tr><?php echo tep_draw_form('status', FILENAME_ORDERS, '', 'get'); ?> <td class="smallText" align="right"><?php echo HEADING_TITLE_STATUS . ' ' . tep_draw_pull_down_menu('status', array_merge(array(array('id' => '', 'text' => TEXT_ALL_ORDERS)), $orders_statuses), '', 'onchange="this.form.submit();"'); ?></td> <?php echo tep_hide_session_id(); ?></form></tr> </table></td> </tr> </table></td> </tr> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr class="dataTableHeadingRow"> <td class="dataTableHeadingContent"><?php echo TABLE_HEADING_CUSTOMERS; ?></td> <td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_ORDER_TOTAL; ?></td> <td class="dataTableHeadingContent" align="center"><?php echo TABLE_HEADING_DATE_PURCHASED; ?></td> <td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_STATUS; ?></td> <td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_ACTION; ?> </td> </tr> <?php if (isset($HTTP_GET_VARS['cID'])) { $cID = tep_db_prepare_input($HTTP_GET_VARS['cID']); $orders_query_raw = "select o.orders_id, o.customers_name, o.customers_id, o.payment_method, o.date_purchased, o.last_modified, o.currency, o.currency_value, s.orders_status_name, ot.text as order_total from " . TABLE_ORDERS . " o left join " . TABLE_ORDERS_TOTAL . " ot on (o.orders_id = ot.orders_id), " . TABLE_ORDERS_STATUS . " s where o.customers_id = '" . (int)$cID . "' and o.orders_status = s.orders_status_id and s.language_id = '" . (int)$languages_id . "' and ot.class = 'ot_total' order by orders_id DESC"; } elseif (isset($HTTP_GET_VARS['status']) && is_numeric($HTTP_GET_VARS['status']) && ($HTTP_GET_VARS['status'] > 0)) { $status = tep_db_prepare_input($HTTP_GET_VARS['status']); $orders_query_raw = "select o.orders_id, o.customers_name, o.payment_method, o.date_purchased, o.last_modified, o.currency, o.currency_value, s.orders_status_name, ot.text as order_total from " . TABLE_ORDERS . " o left join " . TABLE_ORDERS_TOTAL . " ot on (o.orders_id = ot.orders_id), " . TABLE_ORDERS_STATUS . " s where o.orders_status = s.orders_status_id and s.language_id = '" . (int)$languages_id . "' and s.orders_status_id = '" . (int)$status . "' and ot.class = 'ot_total' order by o.orders_id DESC"; } else { $orders_query_raw = "select o.orders_id, o.customers_name, o.payment_method, o.date_purchased, o.last_modified, o.currency, o.currency_value, s.orders_status_name, ot.text as order_total from " . TABLE_ORDERS . " o left join " . TABLE_ORDERS_TOTAL . " ot on (o.orders_id = ot.orders_id), " . TABLE_ORDERS_STATUS . " s where o.orders_status = s.orders_status_id and s.language_id = '" . (int)$languages_id . "' and ot.class = 'ot_total' order by o.orders_id DESC"; } $orders_split = new splitPageResults($HTTP_GET_VARS['page'], MAX_DISPLAY_SEARCH_RESULTS, $orders_query_raw, $orders_query_numrows); $orders_query = tep_db_query($orders_query_raw); while ($orders = tep_db_fetch_array($orders_query)) { if ((!isset($HTTP_GET_VARS['oID']) || (isset($HTTP_GET_VARS['oID']) && ($HTTP_GET_VARS['oID'] == $orders['orders_id']))) && !isset($oInfo)) { $oInfo = new objectInfo($orders); } if (isset($oInfo) && is_object($oInfo) && ($orders['orders_id'] == $oInfo->orders_id)) { echo ' <tr id="defaultSelected" class="dataTableRowSelected" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . tep_href_link(FILENAME_ORDERS, tep_get_all_get_params(array('oID', 'action')) . 'oID=' . $oInfo->orders_id . '&action=edit') . '\'">' . "\n"; } else { echo ' <tr class="dataTableRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . tep_href_link(FILENAME_ORDERS, tep_get_all_get_params(array('oID')) . 'oID=' . $orders['orders_id']) . '\'">' . "\n"; } ?> <td class="dataTableContent"><?php echo '<a href="' . tep_href_link(FILENAME_ORDERS, tep_get_all_get_params(array('oID', 'action')) . 'oID=' . $orders['orders_id'] . '&action=edit') . '">' . tep_image(DIR_WS_ICONS . 'preview.gif', ICON_PREVIEW) . '</a> ' . $orders['customers_name']; ?></td> <td class="dataTableContent" align="right"><?php echo strip_tags($orders['order_total']); ?></td> <td class="dataTableContent" align="center"><?php echo tep_datetime_short($orders['date_purchased']); ?></td> <td class="dataTableContent" align="right"><?php echo $orders['orders_status_name']; ?></td> <td class="dataTableContent" align="right"><?php if (isset($oInfo) && is_object($oInfo) && ($orders['orders_id'] == $oInfo->orders_id)) { echo tep_image(DIR_WS_IMAGES . 'icon_arrow_right.gif', ''); } else { echo '<a href="' . tep_href_link(FILENAME_ORDERS, tep_get_all_get_params(array('oID')) . 'oID=' . $orders['orders_id']) . '">' . tep_image(DIR_WS_IMAGES . 'icon_info.gif', IMAGE_ICON_INFO) . '</a>'; } ?> </td> </tr> <?php } ?> <tr> <td colspan="5"><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td class="smallText" valign="top"><?php echo $orders_split->display_count($orders_query_numrows, MAX_DISPLAY_SEARCH_RESULTS, $HTTP_GET_VARS['page'], TEXT_DISPLAY_NUMBER_OF_ORDERS); ?></td> <td class="smallText" align="right"><?php echo $orders_split->display_links($orders_query_numrows, MAX_DISPLAY_SEARCH_RESULTS, MAX_DISPLAY_PAGE_LINKS, $HTTP_GET_VARS['page'], tep_get_all_get_params(array('page', 'oID', 'action'))); ?></td> </tr> </table></td> </tr> </table></td> <?php $heading = array(); $contents = array(); switch ($action) { case 'delete': $heading[] = array('text' => '<strong>' . TEXT_INFO_HEADING_DELETE_ORDER . '</strong>'); $contents = array('form' => tep_draw_form('orders', FILENAME_ORDERS, tep_get_all_get_params(array('oID', 'action')) . 'oID=' . $oInfo->orders_id . '&action=deleteconfirm')); $contents[] = array('text' => TEXT_INFO_DELETE_INTRO . '<br /><br /><strong>' . $cInfo->customers_firstname . ' ' . $cInfo->customers_lastname . '</strong>'); $contents[] = array('text' => '<br />' . tep_draw_checkbox_field('restock') . ' ' . TEXT_INFO_RESTOCK_PRODUCT_QUANTITY); $contents[] = array('align' => 'center', 'text' => '<br />' . tep_draw_button(IMAGE_DELETE, 'trash', null, 'primary') . tep_draw_button(IMAGE_CANCEL, 'close', tep_href_link(FILENAME_ORDERS, tep_get_all_get_params(array('oID', 'action')) . 'oID=' . $oInfo->orders_id))); break; default: if (isset($oInfo) && is_object($oInfo)) { $heading[] = array('text' => '<b>[' . $oInfo->orders_id . '] ' . tep_datetime_short($oInfo->date_purchased) . '</b>'); // BOF: Order Editor, CHANGED: tep_image_button('button_edit.gif', IMAGE_EDIT) TO: tep_image_button('button_details.gif', IMAGE_DETAILS) $contents[] = array('align' => 'center', 'text' => '<a href="' . tep_href_link(FILENAME_ORDERS, tep_get_all_get_params(array('oID', 'action')) . 'oID=' . $oInfo->orders_id . '&action=edit') . '">' . tep_image_button('button_details.gif', IMAGE_DETAILS) . '</a> <a href="' . tep_href_link(FILENAME_ORDERS, tep_get_all_get_params(array('oID', 'action')) . 'oID=' . $oInfo->orders_id . '&action=delete') . '">' . tep_image_button('button_delete.gif', IMAGE_DELETE) . '</a>'); // BOF: Order Editor, ADDED: <a href="' . tep_href_link(FILENAME_ORDERS_EDIT, 'oID=' . $oInfo->orders_id) . '">' . tep_image_button('button_edit.gif', IMAGE_EDIT) . '</a> $contents[] = array('align' => 'center', 'text' => '<a href="' . tep_href_link(FILENAME_ORDERS_INVOICE, 'oID=' . $oInfo->orders_id) . '" TARGET="_blank">' . tep_image_button('button_invoice.gif', IMAGE_ORDERS_INVOICE) . '</a> <a href="' . tep_href_link(FILENAME_ORDERS_PACKINGSLIP, 'oID=' . $oInfo->orders_id) . '" TARGET="_blank">' . tep_image_button('button_packingslip.gif', IMAGE_ORDERS_PACKINGSLIP) . '</a> <a href="' . tep_href_link(FILENAME_ORDERS_EDIT, 'oID=' . $oInfo->orders_id) . '">' . tep_image_button('button_edit.gif', IMAGE_EDIT) . '</a>'); // EOF: Order Editor $contents[] = array('text' => '<br>' . TEXT_DATE_ORDER_CREATED . ' ' . tep_date_short($oInfo->date_purchased)); if (tep_not_null($oInfo->last_modified)) $contents[] = array('text' => TEXT_DATE_ORDER_LAST_MODIFIED . ' ' . tep_date_short($oInfo->last_modified)); $contents[] = array('text' => '<br />' . TEXT_INFO_PAYMENT_METHOD . ' ' . $oInfo->payment_method); } break; } if ( (tep_not_null($heading)) && (tep_not_null($contents)) ) { echo ' <td width="25%" valign="top">' . "\n"; $box = new box; echo $box->infoBox($heading, $contents); echo ' </td>' . "\n"; } ?> </tr> </table></td> </tr> <?php } ?> </table> <?php require(DIR_WS_INCLUDES . 'template_bottom.php'); require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>
  2. theoiks

    Article Manager v1.0

    It works correctly in a standard shop so either you made a mistake in the file changes or the code in your shop has been altered and is causing a problem. Use the included files to test and compare with. Hi Folks, I swung by this thread because I was having the same problem as Gvido with IE8...if I inserted the article box in the right column, it would line up underneath the left column. I then noticed the manufacturers dropdown box was protruding outside of the column border (as well as the author dropdown box from this contribution). For me, the fix was to go into catalog/includes/modules/boxes/bm-manufactures.php, find this tidbit around line 66: style="width: 100%" and change to style="width: 90%" It seems you would have to do the same for any infobox that has a dropdown in it, including the authors infobox from this contribution. Jack, this also seems to have fixed my problem with the 'submit an article' jumping over the right column. Two other notes....I was having a problem in IE8 where the entire store would align left (not center) if the article infobox was enabled (either left or right column). I removed the css which seems to be a workaround.... In catalog/includes/modules/boxes/bm-articles.php, remove: ?> <style type="text/css"> .separatorArticle { height: 1px; color: #FF0000; } .separatorBlogArticle { height: 1px; color: #FF0000; } .separatorNewArticle { height: 1px; color: #FF0000; } .separatorTopic { height: 1px; color: #FF0000; } </style> <?php I didn't notice any change in the appearance of the infobox...looks fine, HOWEVER I did notice that separatorArticle and separatorBlogArticle properties are called to further down the file...don't know if that will cause problems in other browsers?? perhaps add these to one of the main css pages if so? Other thing, in the readme for the 2.3.1 shop, there's instruction for adding lines to column_left.php and column_right.php which don't exist anymore. Odios Amigos!
  3. theoiks

    NEW! Complete Order Editing Tool!

    Sorry to double post but it's been a while and my curiosity besieged me into installing this contribution. As I don't have QT Pro or the other pluggins, I have heeded RusNN's many warnings and installed v5.0.7 on my 2.3.1 shop. What I don't understand is the purpose of being able to add items to somebody's already completed order if (in the process) you are not sending it back to the shopping cart for more payment? Are we just adding these items to their order for free or am I missing something here? Although I seem to have avoided errors during the install, I am encountering some odd behavior. I will illustrate this through imagery.... If I add an item to the order, the order seems to morph into 2 orders in 1....the first has the previous total, the second adds both items together and disregards the coupon..which I do have discount coupons installed and set to 10%. (^^Also where can I go about fixing the left column when OE is open?) and here is from the catalog side in the customer's account history: and check this out.... and so on and so forth. So has this problem already been dealt with (I pray) or have I invented it?
  4. theoiks

    NEW! Complete Order Editing Tool!

    Hi Russ, I'm an IT tech who gets paid for my service by the hour. I'd like for my clients to have the option to pay online...particularly if I'm on the road at their location. I was thinking I can set up a product (1 service hour) and use this contribution on a per customer basis. Does this sound doable? If so, you suggest using 5.0.7 + your updates and will they work with osc 2.3+? Thanks (btw I do sell other material items too, hence the need for osc)
  5. theoiks

    Article Manager v1.0

    ahh yes, sorry, new install, didn't set up the email yet. here's what's happening with my declared blog articles: ^^Good^^^ ...but then... Unless I'm missing something in the configuration maybe?? also here is what my sumbit article looks like: just if you have an idea on these, cool..these aren't major issues for me and can work around them.. thanks
  6. theoiks

    Article Manager v1.0

    Sorry for double post, but OK, I've figured a few things out. I AM getting the comment/blog section. I'm not sure if this is by design, but the user only gets the ability to comment IF, on the infobox, they choose the article title directly. Otherwise, if they get to the article by going through "All Blog Articles", "All Articles", "All Topics", or even through the RSS feed, then they get a version of the article where they can only add a review or print, but cannot comment. Is this correct? Overall this contribution is and works great. Here are some notes I've been taking: -on cat/articles_submit.php, was getting an error claiming unneeded '}' on line 332 (there is no 332)..there was some white space after last ?>..deleted whitespace and worked. Under Submit Article... a) input fields jump over the right column (doesn't seem to affect abilities) b-) single pics (either author or article image) do not show up either in admin or published article, and multiple pics (author/article image) don't allow submission (<<probably not going to use on my site anyway, but hey thought I'd mention) The only request I can think of is some sort of notification that an article and/or comment has been submitted...either by email or bold print in the admin. If I find anything else will let you know. Thanks Again for your hard work on this!
  7. theoiks

    Article Manager v1.0

    Hi, Just wanted to follow up. I had a problem in my admin/includes/column_left.php. to make a long story short, I installed header tags after article manager..so I wound up with the same edit twice, include(DIR_WS_BOXES . 'header_tags_seo.php'); with the one I added before the last ?> . (the first being around line 24) As soon as I deleted it, the option to install modules appeared on the top right of the admin, which in turn opened up a whole new world on my index page :D I haven't figured out the blogging issue yet, but will scan over my edits again and post if I find anything either today or tomorrow. Thanks
  8. theoiks

    Article Manager v1.0

    Thanks for the quick reply. Sorry, I'm running osc 2.3.1. I think I'm going to have to add them in manually as I don't see anything under modules/boxes in the admin...no biggie, I'm going to have to play around with the boxes anyway. On the blogging, yea, I was referring to the catalog side...I don't see anything underneath the article except 'Write Review, Review, and Print'. Reviews work well :thumbsup: Thanks Johan
  9. theoiks

    Article Manager v1.0

    Hi Jack, I have installed 1.57_6 (and Header Tags SEO 3.2.5)and all seems to have gone well in terms of not getting any errors, however I do think I may have overlooked some things. I have made a test author/article but do not see anything on my sites index page that would indicate that articles exists. Am I correct in thinking there should be an infobox or some other form of linkage? I CAN get to the test article by going directly to www.mysite/articles.php. Also, on the test article I created, I enabled blogging but I don't see an obvious place or link to leave a comment (with a signed-in user) on the article itself. In the Topics/Articles section of the admin, where you select the individual article, the little green light is on to indicate that blogging is allowed on the article...however when I edit the article, the blog selector is reverted back to 'no'. If I go to to www.mysite/article_blog.php i get the message 'Sorry, but the article you requested is not available in this site.' I'm sure these are probably some small mistakes I made..was just wondering i you can give me a heads up on which files to look at... thanks!
  10. theoiks

    Google XML Sitemap SEO

    Jack, just to follow up, my apologies; LOL, I had been awake for nearly 3 days straight making the website/adding contributions and didn't think to look inside the googlesitmaps folder..I was just going by the readme and didn't read step 5 correctly. Works Great! Thank you for your replies and putting this contribution together. Terrific.
  11. theoiks

    Google XML Sitemap SEO

    What are the results of the test? Hi Jack, Hmm, in my ineptness I totally overlooked the gss.xsl file this morning. If this is what you're talking about the results are: This XML file does not appear to have any style information associated with it. The document tree is shown below. − <!-- Google Sitmaps Stylesheets (GSStylesheets) Project Home: http://sourceforge.net/projects/gstoolbox Copyright (c) 2005 Baccou Bonneville SARL (http://www.baccoubonneville.com) License http://www.gnu.org/copyleft/lesser.html GNU/LGPL Created by Serge Baccou 1.0 / 20 Aug 2005 Changes by Johannes Müller (http://GSiteCrawler.com) 1.1 / 20 Aug 2005 - sorting by clicking on column headers - open urls in new window/tab - some stylesheet/CSS cleanup 1.5a/ 31 Aug 2005 - added version number in footer - removed images (don't allow tracking on other servers) Changes by Tobias Kluge (http://enarion.net) 1.2 / 22 Aug 2005 - moved sitemap file and sitemap index file into one file gss.xsl 1.5 / 27 Aug 2005 - added js and css into xslt stylesheet; only gss.xsl is needed now Changes by Serge Baccou 1.3 / 23 Aug 2005 - some XSLT cleanup 1.4 / 24 Aug 2005 - sourceForge and LGPL links and logos - sorting is working for siteindex (see gss.js) --> − <xsl:stylesheet version="2.0"> <xsl:output method="html" version="1.0" encoding="iso-8859-1" indent="yes"/> <!-- Root template --> − <xsl:template match="/"> − <html> − <head> <title>Google Sitemap File</title> <link href="http://www.google.com/webmasters/sitemaps/docs/sitemaps.css" type="text/css" rel="stylesheet"/> − <style type="text/css"> <!-- h1 { font-weight:bold; font-size:1.5em; margin-bottom:0; margin-top:1px; } h2 { font-weight:bold; font-size:1.2em; margin-bottom:0; color:#707070; margin-top:1px; } #gssTitle { background: url(http://www.baccoubonneville.com/gss.jpg) no-repeat; line-height: 70px; text-indent: 70px; } p.sml { font-size:0.8em; margin-top:0; } .sortup { background-position: right center; background-image: url(http://www.google.com/webmasters/sitemaps/images/sortup.gif); background-repeat: no-repeat; font-style:italic; white-space:pre; } .sortdown { background-position: right center; background-image: url(http://www.google.com/webmasters/sitemaps/images/sortdown.gif); background-repeat: no-repeat; font-style:italic; white-space:pre; } table.copyright { width:100%; border-top:1px solid #ddad08; margin-top:1em; text-align:center; padding-top:1em; vertical-align:top; } --> </style> − <script language="JavaScript"> var selectedColor = "blue"; var defaultColor = "black"; var hdrRows = 1; var numeric = '..'; var desc = '..'; var html = '..'; var freq = '..'; function initXsl(tabName,fileType) { hdrRows = 1; if(fileType=="sitemap") { numeric = ".3."; desc = ".1."; html = ".0."; freq = ".2."; initTable(tabName); setSort(tabName, 3, 1); } else { desc = ".1."; html = ".0."; initTable(tabName); setSort(tabName, 1, 1); } var theURL = document.getElementById("head1"); theURL.innerHTML += ' ' + location; document.title += ': ' + location; } function initTable(tabName) { var theTab = document.getElementById(tabName); for(r=0;r<hdrRows;r++) for(c=0;c<theTab.rows[r].cells.length;c++) if((r+theTab.rows[r].cells[c].rowSpan)>hdrRows) hdrRows=r+theTab.rows[r].cells[c].rowSpan; for(r=0;r<hdrRows; r++){ colNum = 0; for(c=0;c<theTab.rows[r].cells.length;c++, colNum++){ if(theTab.rows[r].cells[c].colSpan<2){ theCell = theTab.rows[r].cells[c]; rTitle = theCell.innerHTML.replace(/<[^>]+>| /g,''); if(rTitle>""){ theCell.title = "Change sort order for " + rTitle; theCell.onmouseover = function(){setCursor(this, "selected")}; theCell.onmouseout = function(){setCursor(this, "default")}; var sortParams = 15; // bitmapped: numeric|desc|html|freq if(numeric.indexOf("."+colNum+".")>-1) sortParams -= 1; if(desc.indexOf("."+colNum+".")>-1) sortParams -= 2; if(html.indexOf("."+colNum+".")>-1) sortParams -= 4; if(freq.indexOf("."+colNum+".")>-1) sortParams -= 8; theCell.onclick = new Function("sortTable(this,"+(colNum+r)+","+hdrRows+","+sortParams+")"); } } else { colNum = colNum+theTab.rows[r].cells[c].colSpan-1; } } } } function setSort(tabName, colNum, sortDir) { var theTab = document.getElementById(tabName); theTab.rows[0].sCol = colNum; theTab.rows[0].sDir = sortDir; if (sortDir) theTab.rows[0].cells[colNum].className='sortdown' else theTab.rows[0].cells[colNum].className='sortup'; } function setCursor(theCell, mode){ rTitle = theCell.innerHTML.replace(/<[^>]+>| |\W/g,''); if(mode=="selected"){ if(theCell.style.color!=selectedColor) defaultColor = theCell.style.color; theCell.style.color = selectedColor; theCell.style.cursor = "hand"; window.status = "Click to sort by '"+rTitle+"'"; } else { theCell.style.color = defaultColor; theCell.style.cursor = ""; window.status = ""; } } function sortTable(theCell, colNum, hdrRows, sortParams){ var typnum = !(sortParams & 1); sDir = !(sortParams & 2); var typhtml = !(sortParams & 4); var typfreq = !(sortParams & 8); var tBody = theCell.parentNode; while(tBody.nodeName!="TBODY"){ tBody = tBody.parentNode; } var tabOrd = new Array(); if(tBody.rows[0].sCol==colNum) sDir = !tBody.rows[0].sDir; if (tBody.rows[0].sCol>=0) tBody.rows[0].cells[tBody.rows[0].sCol].className=''; tBody.rows[0].sCol = colNum; tBody.rows[0].sDir = sDir; if (sDir) tBody.rows[0].cells[colNum].className='sortdown' else tBody.rows[0].cells[colNum].className='sortup'; for(i=0,r=hdrRows;r<tBody.rows.length;i++,r++){ colCont = tBody.rows[r].cells[colNum].innerHTML; if(typhtml) colCont = colCont.replace(/<[^>]+>/g,''); if(typnum) { colCont*=1; if(isNaN(colCont)) colCont = 0; } if(typfreq) { switch(colCont.toLowerCase()) { case "always": { colCont=0; break; } case "hourly": { colCont=1; break; } case "daily": { colCont=2; break; } case "weekly": { colCont=3; break; } case "monthly": { colCont=4; break; } case "yearly": { colCont=5; break; } case "never": { colCont=6; break; } } } tabOrd[i] = [r, tBody.rows[r], colCont]; } tabOrd.sort(compRows); for(i=0,r=hdrRows;r<tBody.rows.length;i++,r++){ tBody.insertBefore(tabOrd[i][1],tBody.rows[r]); } window.status = ""; } function compRows(a, B){ if(sDir){ if(a[2]>b[2]) return -1; if(a[2]<b[2]) return 1; } else { if(a[2]>b[2]) return 1; if(a[2]<b[2]) return -1; } return 0; } </script> </head> − <!-- Store in $fileType if we are in a sitemap or in a siteindex --> − <xsl:variable name="fileType"> − <xsl:choose> <xsl:when test="//sitemap:url">sitemap</xsl:when> <xsl:otherwise>siteindex</xsl:otherwise> </xsl:choose> </xsl:variable> <!-- Body --> − <body onLoad="initXsl('table0','{$fileType}');"> <!-- Text and table --> <h1 id="head1">Google Sitemap</h1> − <xsl:choose> − <xsl:when test="$fileType='sitemap'"> <xsl:call-template name="sitemapTable"/> </xsl:when> − <xsl:otherwise> <xsl:call-template name="siteindexTable"/> </xsl:otherwise> </xsl:choose> </body> </html> </xsl:template> <!-- siteindexTable template --> − <xsl:template name="siteindexTable"> − <h2> Number of sitemaps in this Google sitemap index: <xsl:value-of select="count(sitemap:sitemapindex/sitemap:sitemap)"/> </h2> <p class="sml">Click on the table headers to change sorting.</p> − <table border="1" width="100%" class="data" id="table0"> − <tr class="header"> <td>Sitemap URL</td> <td>Last modification date</td> </tr> − <xsl:apply-templates select="sitemap:sitemapindex/sitemap:sitemap"> <xsl:sort select="sitemap:lastmod" order="descending"/> </xsl:apply-templates> </table> </xsl:template> <!-- sitemapTable template --> − <xsl:template name="sitemapTable"> − <h2> Number of URLs in this Google Sitemap: <xsl:value-of select="count(sitemap:urlset/sitemap:url)"/> </h2> <p class="sml">Click on the table headers to change sorting.</p> − <table border="1" width="100%" class="data" id="table0"> − <tr class="header"> <td>Sitemap URL</td> <td>Last modification date</td> <td>Change freq.</td> <td>Priority</td> </tr> − <xsl:apply-templates select="sitemap:urlset/sitemap:url"> <xsl:sort select="sitemap:priority" order="descending"/> </xsl:apply-templates> </table> </xsl:template> <!-- sitemap:url template --> − <xsl:template match="sitemap:url"> − <tr> − <td> − <xsl:variable name="sitemapURL"> <xsl:value-of select="sitemap:loc"/> </xsl:variable> − <a href="{$sitemapURL}" target="_blank" ref="nofollow"> <xsl:value-of select="$sitemapURL"/> </a> </td> − <td> <xsl:value-of select="sitemap:lastmod"/> </td> − <td> <xsl:value-of select="sitemap:changefreq"/> </td> − <td> <xsl:value-of select="sitemap:priority"/> </td> </tr> </xsl:template> <!-- sitemap:sitemap template --> − <xsl:template match="sitemap:sitemap"> − <tr> − <td> − <xsl:variable name="sitemapURL"> <xsl:value-of select="sitemap:loc"/> </xsl:variable> − <a href="{$sitemapURL}"> <xsl:value-of select="$sitemapURL"/> </a> </td> − <td> <xsl:value-of select="sitemap:lastmod"/> </td> </tr> </xsl:template> </xsl:stylesheet> If not, tell me how to run the test. Thanks man.
  12. theoiks

    Google XML Sitemap SEO

    Hello There, Quick question, I'm running my site on a webhosting addon slot (in other words the site is stored in a secondary folder in the root, with the domain pointing towards that folder), I'm keep getting: XML Parsing Error: no element found Location: http://www.mysite.com/sitemapindex.xml Line Number 1, Column 1: I've tried doing the 'alternative' configuration and running the diagnostic output, but nothing changes. The directions are pretty straight forward so I don't think I messed anything up...gave all the included files 777 and the sql seems to have gone fine. Any ideas? I'm running OSC2.2rc2a...mods I'm using are ultimate seo urls, fancy lightbox, sts, ckeditor. Any idea? Thanks in advance.
  13. theoiks

    [contribution] Simple Template System (sts)

    Hi, I'd like to know if it's possible with STS to have the the contents (name, description, price, attributes, buy button) of multiple items on one page? Thanks, Johan EDIT: WOAH, SORRY FOR TRIPLE POST, I GOT AN 'INTERNAL SERVER ERROR 500'...I didn't think it went through because of the error and I hit the submit button twice more..
  14. theoiks

    [contribution] Simple Template System (sts)

    Hi, I'd like to know if it's possible with STS to have the the contents (name, description, price, attributes, buy button) of multiple items on one page? Thanks, Johan
  15. theoiks

    [contribution] Simple Template System (sts)

    Hi, I'd like to know if it's possible with STS to have the the contents (name, description, price, attributes, buy button) of multiple items on one page? Thanks, Johan
×