Guest Posted May 31, 2009 Share Posted May 31, 2009 If i go to my account history logged in as a customer, it does show there what the options are, but not anywhre in the admin panel. Quote Link to comment Share on other sites More sharing options...
Guest Posted May 31, 2009 Share Posted May 31, 2009 thanks, but that still didn't fix it. i can see all the notes from the customer side only, nowhere in admin. Quote Link to comment Share on other sites More sharing options...
Guest Posted May 31, 2009 Share Posted May 31, 2009 I sended you a PM to add me to msn for further assistence  i dont use msn, im just gonna try to figure it out and scrap it if i cant. thanks for the help Quote Link to comment Share on other sites More sharing options...
Jack_mcs Posted May 31, 2009 Share Posted May 31, 2009 i dont use msn, im just gonna try to figure it out and scrap it if i cant. thanks for the help To be clear, are using version 1.35? If so, remove any "fixes" for it and see if it still fails. If the attributes are showing up in the customers account then they are recorded in the database. That means that you've made a mistake in the admin changes since that is just displaying what is in the database. Try replacing your admin/orders.php file with the one from the contribution to see if they show up. If they do, then you can compare your file to that one to find the problem. Â Jack Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
Guest Posted May 31, 2009 Share Posted May 31, 2009 To be clear, are using version 1.35? If so, remove any "fixes" for it and see if it still fails. If the attributes are showing up in the customers account then they are recorded in the database. That means that you've made a mistake in the admin changes since that is just displaying what is in the database. Try replacing your admin/orders.php file with the one from the contribution to see if they show up. If they do, then you can compare your file to that one to find the problem. Jack  I already scrapped it. I may try again later, but it was only for a few products that can wait. I really need an option to add comments to an item rather than entire order, know anything? I'm searching right now but not coming up with anything. Quote Link to comment Share on other sites More sharing options...
Jack_mcs Posted June 1, 2009 Share Posted June 1, 2009 This contribution isn't meant for adding comments so it won't work as you want. Plus, an option to add a comment is already in the code. If it is not showing up in your shop, then it must have been removed. Â Jack Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
Guest Posted June 1, 2009 Share Posted June 1, 2009 This contribution isn't meant for adding comments so it won't work as you want. Plus, an option to add a comment is already in the code. If it is not showing up in your shop, then it must have been removed. Jack  This would work, maybe I'll try again at a later time. I was just looking for something simpler, one textbox labeled 'item comment'  I have comments at checkout, but I need one for certain items. Quote Link to comment Share on other sites More sharing options...
Jack_mcs Posted June 1, 2009 Share Posted June 1, 2009 If you want a place to enter text for individual products, then this will work for you. Â Jack Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
sevRogers Posted June 10, 2009 Share Posted June 10, 2009 Hello,  I've been losing my mind trying to get an item with a custom string working.  I only have a single product available. I wish to have customers have their name engraved on the product, and buy more than one item with different engravings as part of the same order.  To illustrate - I need to have the following available-- any help would do more than make my day!  Mike goes to my website and wants to order two products.  Mike clicks on Buy Now!  Under Available Options: Mike selects the font and color. Mike is also presented with 3 fields to fill out.  line 1: Mike Anderson line 2: Henry's Wholesome Foods line 3: Sales  He clicks add to cart, continue shopping, and orders another one, this time for his colleague.  Then he can check out and receive 2 statues, one with his name on it, and one with his friends.   Thanks, Sev Quote Link to comment Share on other sites More sharing options...
Jack_mcs Posted June 10, 2009 Share Posted June 10, 2009 Hello, I've been losing my mind trying to get an item with a custom string working.  I only have a single product available. I wish to have customers have their name engraved on the product, and buy more than one item with different engravings as part of the same order.  To illustrate - I need to have the following available-- any help would do more than make my day!  Mike goes to my website and wants to order two products.  Mike clicks on Buy Now!  Under Available Options: Mike selects the font and color. Mike is also presented with 3 fields to fill out.  line 1: Mike Anderson line 2: Henry's Wholesome Foods line 3: Sales  He clicks add to cart, continue shopping, and orders another one, this time for his colleague.  Then he can check out and receive 2 statues, one with his name on it, and one with his friends.   Thanks, Sev This is a known problem with this contribution. It will only allow the one product to be added. You can change the quantity and text fields but there will only be one product. I plan on fixing this but since it isn't mine, it takes a lower priority so it might be some time before I can get to it. Your only choices are to provide extra fields, say ten boxes where multiple names can be entered or to install the option type contribution. Jack Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
sevRogers Posted June 10, 2009 Share Posted June 10, 2009 thanks for the quick response. Â are you aware of any other contribution/add-on? Â I first tried to do this with wordpress/wp e-commerce, and their software has the exact same issue. Â I'm up against the wall, and I've been unable to find any sort of solution with any CMS/Shopping cart. Quote Link to comment Share on other sites More sharing options...
Jack_mcs Posted June 10, 2009 Share Posted June 10, 2009 Not besides the one I already mentioned. Â Jack Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
rosemaryann Posted June 12, 2009 Share Posted June 12, 2009 Would love to get this to work but I'm getting a syntax error on the product_info.php page.  Parse error: syntax error, unexpected $end in ....catalog/store/product_info.php on line 306  It's also throwing up all kinds of error saying that there are tags that are coming up in my php editor saying "Unexpected end to file" and the </form> on (approx) line 298 is saying that there is no start tag. I have another contribution Attributes Sets Plus installed which removed the following line of code  $products_options_query = tep_db_query("select pov.products_options_values_id, pov.products_options_values_name, pa.options_values_price, pa.price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov where pa.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pa.options_id = '" . (int)$products_options_name['products_options_id'] . "' and pa.options_values_id = pov.products_options_values_id and pov.language_id = '" . (int)$languages_id . "'");  from original products_info.php page but I'm not sure if that's the problem seeing as it's the form tags and the end of file syntax that's shooting up the error.  Please advise! Quote Link to comment Share on other sites More sharing options...
Jack_mcs Posted June 13, 2009 Share Posted June 13, 2009 Line numbers are specific to your file so they don't help any without posting te code there too. But the problem has to do with the edits made. The unexpected end means the end of the code was reached when it shouldn't have. That is usually because some bracket ( } ) was missed. You shoudld restore your original file and make sure it still works then make the edits one at a time to see where the problem comes in. Â Jack Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
rosemaryann Posted June 15, 2009 Share Posted June 15, 2009 Thanks Jack! Yeah I think I just installed quickly and missed something. Because re-editing the file it worked just fine. Quote Link to comment Share on other sites More sharing options...
rosemaryann Posted June 16, 2009 Share Posted June 16, 2009 (edited) Ok now I'm getting another syntax error.  1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'and pta.products_text_attributes_id = ota.products_text_attributes_id' at line 1 select ota.*, pta.products_text_attributes_name from orders_text_attributes as ota, products_text_attributes as pta where ota.orders_id = 1 and ota.products_id = and pta.products_text_attributes_id = ota.products_text_attributes_id  on /catalog/admin/orders.php file. Below is a copy and paste of what I have. I tried replacing the file completely with the contributions version but it still is showing up. The weird thing is that really gets me is that my local version works fine and I'm using Firefox for browsing my local server version. But when I push it to our live web servers and check it through IE, it gives me the syntax error. It's also happening on all orders, not just ones with the Imprint text. I've made no other changes to this file except this contrib. The error is showing up also on the packingslip.php and invoice.php files in admin directory. I'm terrible with Mysql queries and syntax. So any help would be much appreciated. Any thoughts?  Thanks for your help!   (Full file for admin/orders.php) <?php /* $Id: orders.php 1739 2007-12-20 00:52:16Z hpdl $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2003 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'); ?> <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN"> <html <?php echo HTML_PARAMS; ?>> <head> <meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>"> <title><?php echo TITLE; ?></title> <link rel="stylesheet" type="text/css" href="includes/stylesheet.css"> <script language="javascript" src="includes/general.js"></script> </head> <body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" bgcolor="#FFFFFF"> <!-- header //--> <?php require(DIR_WS_INCLUDES . 'header.php'); ?> <!-- header_eof //--> <!-- body //--> <table border="0" width="100%" cellspacing="2" cellpadding="2"> <tr> <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="1" cellpadding="1" class="columnLeft"> <!-- left_navigation //--> <?php require(DIR_WS_INCLUDES . 'column_left.php'); ?> <!-- left_navigation_eof //--> </table></td> <!-- body_text //--> <td width="100%" valign="top"><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> <td class="pageHeading" align="right"><?php echo '<a href="' . tep_href_link(FILENAME_ORDERS, tep_get_all_get_params(array('action'))) . '">' . tep_image_button('button_back.gif', IMAGE_BACK) . '</a>'; ?></td> </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"><b><?php echo ENTRY_CUSTOMER; ?></b></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"><b><?php echo ENTRY_TELEPHONE_NUMBER; ?></b></td> <td class="main"><?php echo $order->customer['telephone']; ?></td> </tr> <tr> <td class="main"><b><?php echo ENTRY_EMAIL_ADDRESS; ?></b></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"><b><?php echo ENTRY_SHIPPING_ADDRESS; ?></b></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"><b><?php echo ENTRY_BILLING_ADDRESS; ?></b></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"><b><?php echo ENTRY_PAYMENT_METHOD; ?></b></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>'; } } // denuz text attr // $pid = @mysql_result(tep_db_query("select products_id from products_description where products_name='" . tep_db_input($order->products[$i]['name']) . "'"), 0, "products_id"); $pid_query = tep_db_query("select products_id from " . TABLE_PRODUCTS . " where products_model LIKE '" . tep_db_input($order->products[$i]['model']) . "'"); $pid = tep_db_fetch_array($pid_query); $attr_q = tep_db_query("select ota.*, pta.products_text_attributes_name from orders_text_attributes as ota, products_text_attributes as pta where ota.orders_id = " . $HTTP_GET_VARS['oID'] . " and ota.products_id = " . $pid['products_id'] . " and pta.products_text_attributes_id = ota.products_text_attributes_id"); while ($attr = tep_db_fetch_array($attr_q)) { echo '<br><nobr><small> <i> - ' . $attr['products_text_attributes_name'] . ': ' . stripslashes($attr['products_text_attributes_text']); echo '</i></small></nobr>'; } // eof denuz text attr 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"><b>' . $currencies->format($order->products[$i]['final_price'], true, $order->info['currency'], $order->info['currency_value']) . '</b></td>' . "\n" . ' <td class="dataTableContent" align="right" valign="top"><b>' . $currencies->format(tep_add_tax($order->products[$i]['final_price'], $order->products[$i]['tax'], true), true, $order->info['currency'], $order->info['currency_value']) . '</b></td>' . "\n" . ' <td class="dataTableContent" align="right" valign="top"><b>' . $currencies->format($order->products[$i]['final_price'] * $order->products[$i]['qty'], true, $order->info['currency'], $order->info['currency_value']) . '</b></td>' . "\n" . ' <td class="dataTableContent" align="right" valign="top"><b>' . $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']) . '</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="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"><b><?php echo TABLE_HEADING_DATE_ADDED; ?></b></td> <td class="smallText" align="center"><b><?php echo TABLE_HEADING_CUSTOMER_NOTIFIED; ?></b></td> <td class="smallText" align="center"><b><?php echo TABLE_HEADING_STATUS; ?></b></td> <td class="smallText" align="center"><b><?php echo TABLE_HEADING_COMMENTS; ?></b></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><b><?php echo TABLE_HEADING_COMMENTS; ?></b></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"><b><?php echo ENTRY_STATUS; ?></b> <?php echo tep_draw_pull_down_menu('status', $orders_statuses, $order->info['orders_status']); ?></td> </tr> <tr> <td class="main"><b><?php echo ENTRY_NOTIFY_CUSTOMER; ?></b> <?php echo tep_draw_checkbox_field('notify', '', true); ?></td> <td class="main"><b><?php echo ENTRY_NOTIFY_COMMENTS; ?></b> <?php echo tep_draw_checkbox_field('notify_comments', '', true); ?></td> </tr> </table></td> <td valign="top"><?php echo tep_image_submit('button_update.gif', IMAGE_UPDATE); ?></td> </tr> </table></td> </form></tr> <tr> <td colspan="2" align="right"><?php echo '<a href="' . tep_href_link(FILENAME_ORDERS_INVOICE, 'oID=' . $HTTP_GET_VARS['oID']) . '" TARGET="_blank">' . tep_image_button('button_invoice.gif', IMAGE_ORDERS_INVOICE) . '</a> <a href="' . tep_href_link(FILENAME_ORDERS_PACKINGSLIP, 'oID=' . $HTTP_GET_VARS['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> </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' => '<b>' . TEXT_INFO_HEADING_DELETE_ORDER . '</b>'); $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><b>' . $cInfo->customers_firstname . ' ' . $cInfo->customers_lastname . '</b>'); $contents[] = array('text' => '<br>' . tep_draw_checkbox_field('restock') . ' ' . TEXT_INFO_RESTOCK_PRODUCT_QUANTITY); $contents[] = array('align' => 'center', 'text' => '<br>' . tep_image_submit('button_delete.gif', IMAGE_DELETE) . ' <a href="' . tep_href_link(FILENAME_ORDERS, tep_get_all_get_params(array('oID', 'action')) . 'oID=' . $oInfo->orders_id) . '">' . tep_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>'); break; default: if (isset($oInfo) && is_object($oInfo)) { $heading[] = array('text' => '<b>[' . $oInfo->orders_id . ']  ' . tep_datetime_short($oInfo->date_purchased) . '</b>'); $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_edit.gif', IMAGE_EDIT) . '</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>'); $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>'); $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></td> <!-- body_text_eof //--> </tr> </table> <!-- body_eof //--> <!-- footer //--> <?php require(DIR_WS_INCLUDES . 'footer.php'); ?> <!-- footer_eof //--> <br> </body> </html> <?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?> Edited June 16, 2009 by rosemaryann Quote Link to comment Share on other sites More sharing options...
Jack_mcs Posted June 16, 2009 Share Posted June 16, 2009 Ok now I'm getting another syntax error.  1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'and pta.products_text_attributes_id = ota.products_text_attributes_id' at line 1 select ota.*, pta.products_text_attributes_name from orders_text_attributes as ota, products_text_attributes as pta where ota.orders_id = 1 and ota.products_id = and pta.products_text_attributes_id = ota.products_text_attributes_id  on /catalog/admin/orders.php file. Below is a copy and paste of what I have. I tried replacing the file completely with the contributions version but it still is showing up. The weird thing is that really gets me is that my local version works fine and I'm using Firefox for browsing my local server version. But when I push it to our live web servers and check it through IE, it gives me the syntax error. It's also happening on all orders, not just ones with the Imprint text. I've made no other changes to this file except this contrib. The error is showing up also on the packingslip.php and invoice.php files in admin directory. I'm terrible with Mysql queries and syntax. So any help would be much appreciated. Any thoughts? Try looking at the orders with FF for the site on the server and IE with the site on your computer. If they both work on your computer and both fail on the server, then it is probably a php/mysql compatibility problem. In either case, you should replace the orders file with an original to make sure it works. if it doesn't, you've got some other problem. If it does, then make the changes to that file one at a time until it fails to isolate the problem.  Jack Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
♥geoffreywalton Posted June 16, 2009 Share Posted June 16, 2009 A product model is not being found  ota.products_id = and  Seems to be this code   $pid_query = tep_db_query("select products_id from " . TABLE_PRODUCTS . " where products_model LIKE '" . tep_db_input($order->products[$i]['model']) . "'"); $pid = tep_db_fetch_array($pid_query); $attr_q = tep_db_query("select ota.*, pta.products_text_attributes_name from orders_text_attributes as ota, products_text_attributes as pta where ota.orders_id = " . $HTTP_GET_VARS['oID'] . " and ota.products_id = " . $pid['products_id'] . " and pta.products_text_attributes_id = ota.products_text_attributes_id"); Quote Need help installing add ons/contributions, cleaning a hacked site or a bespoke development, check my profile  Virus Threat Scanner My Contributions Basic install answers. Click here for Contributions / Add Ons. UK your site. Site Move. Basic design info.  For links mentioned in old answers that are no longer here follow this link Useful Threads.  If this post was useful, click the Like This button over there ======>>>>>. Link to comment Share on other sites More sharing options...
rosemaryann Posted June 17, 2009 Share Posted June 17, 2009 Thanks Geoffrey! Yeah actually I found that last night when I was scowering through MySQL manual. :) For anyone having this problem, it happened to me because I deleted some products that were previously on the orders.. So to fix it, I changed the following line on admin/orders.php, admin/packingslip.php and admin/invoice.php  orignal line: $attr_q = tep_db_query("select ota.*, pta.products_text_attributes_name from orders_text_attributes as ota, products_text_attributes as pta where ota.orders_id = " . $HTTP_GET_VARS['oID'] . " and ota.products_id = " . $pid['products_id'] . " and pta.products_text_attributes_id = ota.products_text_attributes_id");  change to: $attr_q = tep_db_query("select ota.*, pta.products_text_attributes_name from orders_text_attributes as ota, products_text_attributes as pta where ota.orders_id = " . $HTTP_GET_VARS['oID'] . " and ota.products_id = " . (int)$pid['products_id'] . " and pta.products_text_attributes_id = ota.products_text_attributes_id"); Quote Link to comment Share on other sites More sharing options...
Daddyslipdisk Posted July 2, 2009 Share Posted July 2, 2009 Ok, I am SOO glad that this topic exists for this contribution. I have installed the contribution for a client of mine that is using a modified template at theknottedrainbow.com. All of the files existed and the lines of code where I manually placed all of the "denuz" code were there also, so placement was relatively easy. So it is all installed and working in the backend, but not the front side. I went into the admin area, checkmarked the default "Name" and "Date" fields for the text attribute fields in the product editing area, previewed it (but it wasn't showing there) and clicked Update. Â In the Admin area, the Text Attributes menu selection IS there and you can add/edit/delete fields. When you go to edit a product, the fields are there with the checkmark boxes and you CAN checkmark them. HOWEVER, when you view the product on the site, the product description is there, but the fields are not. If you add the product to your cart, it shows in the shopping cart with "Name" and "Date" shown below the product name. And those fields carry over to the invoice, receipts, etc fine. But again, there's no way for the customer to actually put something in those fields NOR do they even see those fields when viewing the product. I verified that the code is in the product_info page and it is, so there obviously is just something broken or not right. The only modification (after the fact) I made to the code on that page was to remove the table tags (i.e. - td, tr) since that did not match up with the modified template, so I just removed those thinking that maybe that was the issue was that those rows and columns were conflicting with the layout and the fields were displaying off page or something bizarre, but removing the table tags didn't fix the issue either. Â Any help would be appreciated. The products where the text attributes were activated are at http://www.theknottedrainbow.com/product_i.../products_id/44 and also http://www.theknottedrainbow.com/product_i...products_id/177. Any thoughts? Quote Link to comment Share on other sites More sharing options...
rosemaryann Posted July 2, 2009 Share Posted July 2, 2009 Any help would be appreciated. The products where the text attributes were activated are at http://www.theknottedrainbow.com/product_i.../products_id/44 and also http://www.theknottedrainbow.com/product_i...products_id/177. Any thoughts? Â I've noticed that if you ONLY have the Imprint text options they don't show up. Try adding another product option maybe and see if they show up. I'm not sure if that will fix it. Â The other option would to be to double check your product_info.php page b/c that's where the code for the items is. Quote Link to comment Share on other sites More sharing options...
Daddyslipdisk Posted July 2, 2009 Share Posted July 2, 2009 I've noticed that if you ONLY have the Imprint text options they don't show up. Try adding another product option maybe and see if they show up. I'm not sure if that will fix it. Â The other option would to be to double check your product_info.php page b/c that's where the code for the items is. Â Added a "personalization" field to the Text Attributes area, added to to both http://www.theknottedrainbow.com/product_i...products_id/170 and http://www.theknottedrainbow.com/product_i...products_id/177 and it still isn't displaying those fields. I also checked the products_info.php file and verified the denuz code block was there. Re-entered it. Still nothing. Quote Link to comment Share on other sites More sharing options...
Jack_mcs Posted July 3, 2009 Share Posted July 3, 2009 Added a "personalization" field to the Text Attributes area, added to to both http://www.theknottedrainbow.com/product_i...products_id/170 and http://www.theknottedrainbow.com/product_i...products_id/177 and it still isn't displaying those fields. I also checked the products_info.php file and verified the denuz code block was there. Re-entered it. Still nothing. Try uploading the included product_info.php file for a quick test. If the options show up, then you've made a mistake in that file. If they don't show up, the problem is in the database or admin. Â Jack Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
Daddyslipdisk Posted July 10, 2009 Share Posted July 10, 2009 Try uploading the included product_info.php file for a quick test. If the options show up, then you've made a mistake in that file. If they don't show up, the problem is in the database or admin. Jack  Yep, that puts those fields in there, but obviously it's all squinched up because the template doesn't match. Which means in essence that there's more to just plopping that code in place on the product_info.php. Now I'll need to look it over line by line to see what's really different about these two files besides the block of code I'm supposed to drop in. Quote Link to comment Share on other sites More sharing options...
Daddyslipdisk Posted July 10, 2009 Share Posted July 10, 2009 so maybe someone can help me here so I don't kill myself trying to find this. If the product_info.php appears to work okay with the template with this contribution BUT the product info area is like half as wide as it should be, where is that setting. The template is staying in place fine, but just that area of the page where the description is is 50% narrower than it should be. Where does that get fixed to widen that to double what it is now? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.