Mort-lemur Posted February 5, 2012 Share Posted February 5, 2012 Gives the ability to create new customer accounts from the admin area. The Customer then receives an e-mail with randomly created password Gives the ability to manually create an order for a customer via admin. Invaluable for entering telephone orders onto your OSC Site. From 2 seperate 2.2 contributions - all credit to the original authors. Needs Order Editor to be installed for this to work, Download at: http://addons.oscommerce.com/info/7844/v,23 Yhe code could do with cleaning up to comply with 2.3.1 standards - but it works on my site, I wrote the install after I had actually installed, apologies if it contains errors. Download from: http://addons.oscommerce.com/info/8334 Thanks Quote Now running on a fully modded, Mobile Friendly 2.3.4 Store with the Excellent MTS installed - See my profile for the mods installed ..... So much thanks for all the help given along the way by forum members. Link to comment Share on other sites More sharing options...
ce7 Posted January 11, 2013 Share Posted January 11, 2013 (edited) @ Mort-lemur Hi Heather, thank you for your addon. I installed it and it works ok now. I just have a question that I had enter test orders, but how can I delete it? there is no button to delete the order, so it always show pending there. Many thanks in advance. Lyn Edited January 11, 2013 by ce7 Quote Link to comment Share on other sites More sharing options...
ce7 Posted January 11, 2013 Share Posted January 11, 2013 @ Mort-lemur Hi Heather, thank you for your addon. I installed it and it works ok now. I just have a question that I had enter test orders, but how can I delete it? there is no button to delete the order, so it always show pending there. Many thanks in advance. Lyn Heather, I found that solution by refer http://phpxref.com/xref/oscommerce/nav.html?_functions/index.html thanks anyway! Lyn Quote Link to comment Share on other sites More sharing options...
Mort-lemur Posted January 13, 2013 Author Share Posted January 13, 2013 @@ce7 Hi sorry missed your post - cant you just delete the order as per any other order from your admin panel? Quote Now running on a fully modded, Mobile Friendly 2.3.4 Store with the Excellent MTS installed - See my profile for the mods installed ..... So much thanks for all the help given along the way by forum members. Link to comment Share on other sites More sharing options...
BazilH Posted March 7, 2013 Share Posted March 7, 2013 (edited) Very nice add on, but I can't get it to work, I installed order editor then installed your add on. When I click Create Customer the page goes blank besides a header "Create an new Customer Account". If you could give me some advice it would be much appreciated. Thank You Edited March 7, 2013 by BazilH Quote I hate everything about web programming, give me C++ and MFC any day. Strangely enough, I love OSc. Link to comment Share on other sites More sharing options...
Mort-lemur Posted March 7, 2013 Author Share Posted March 7, 2013 (edited) @@BazilH Check the install, a blank page usually means that some code has been changed wrongly Edited March 7, 2013 by Mort-lemur Quote Now running on a fully modded, Mobile Friendly 2.3.4 Store with the Excellent MTS installed - See my profile for the mods installed ..... So much thanks for all the help given along the way by forum members. Link to comment Share on other sites More sharing options...
dculley Posted March 22, 2013 Share Posted March 22, 2013 Hi and I to would like thank you for this add on. I just would like to know how to use "discount code" with this? When the customer calls in and they would like to use their retuning customer discount code there is no place for us to inter it. (like on the website side). Thanks Quote Link to comment Share on other sites More sharing options...
Mort-lemur Posted March 22, 2013 Author Share Posted March 22, 2013 That would need the code to be modified - beyond the scope of this mod - what I do is take the order and the code on the phone, then adjust the discount voucher manually through admin - long winded but it seems to work. Quote Now running on a fully modded, Mobile Friendly 2.3.4 Store with the Excellent MTS installed - See my profile for the mods installed ..... So much thanks for all the help given along the way by forum members. Link to comment Share on other sites More sharing options...
dculley Posted March 23, 2013 Share Posted March 23, 2013 I'm basically the same thing now. I'm just editing the prices. Maybe someone will add this to this great add on. Thanks. Quote Link to comment Share on other sites More sharing options...
richcduk Posted August 27, 2013 Share Posted August 27, 2013 Help !!! This is driving me mad !!! The sort order of order total modules is correct when starting a manual order. as soon as you add a product, the sort order goes wrong. specifically the tax. it moves from above the total to position 2. the code below is the code in question. Anyone help ? //this is where we call the order total modules require( 'order_editor/order_total.php'); $order_total_modules = new order_total(); $order_totals = $order_total_modules->process(); $current_ot_totals_array = array(); $current_ot_titles_array = array(); $current_ot_totals_query = tep_db_query("select class, title,sort_order from " . TABLE_ORDERS_TOTAL . " where orders_id = '" . (int)$oID . "' order by sort_order"); while ($current_ot_totals = tep_db_fetch_array($current_ot_totals_query)) { $current_ot_totals_array[] = $current_ot_totals['class']; $current_ot_titles_array[] = $current_ot_totals['title']; } tep_db_query("DELETE FROM " . TABLE_ORDERS_TOTAL . " WHERE orders_id = '" . (int)$oID . "'"); $j=1; //giving something a sort order of 0 ain't my bag baby $new_order_totals = array(); if (is_array($_POST['update_totals'])) { //1 foreach($_POST['update_totals'] as $total_index => $total_details) { //2 extract($total_details, EXTR_PREFIX_ALL, "ot"); if (!strstr($ot_class, 'ot_custom')) { //3 for ($i=0, $n=sizeof($order_totals); $i<$n; $i++) { //4 if ($order_totals[$i]['code'] == 'ot_tax') { //5 $new_ot_total = ((in_array($order_totals[$i]['title'], $current_ot_titles_array)) ? false : true); } else { //within 5 $new_ot_total = ((in_array($order_totals[$i]['code'], $current_ot_totals_array)) ? false : true); } //end 5 if ($order_totals[$i]['code'] == 'ot_tax') if ( ( ($order_totals[$i]['code'] == 'ot_tax') && ($order_totals[$i]['code'] == $ot_class) && ($order_totals[$i]['title'] == $ot_title) ) || ( ($order_totals[$i]['code'] != 'ot_tax') && ($order_totals[$i]['code'] == $ot_class) ) ) { //6 //only good for components that show up in the $order_totals array if ($ot_title != '') { //7 $new_order_totals[] = array('title' => $ot_title, 'text' => (($ot_class != 'ot_total') ? $order_totals[$i]['text'] : '<b>' . $currencies->format($order->info['total'], true, $order->info['currency'], $order->info['currency_value']) . '</b>'), 'value' => (($order_totals[$i]['code'] != 'ot_total') ? $order_totals[$i]['value'] : $order->info['total']), 'code' => $order_totals[$i]['code'], 'sort_order' => $j); $written_ot_totals_array[] = $ot_class; $written_ot_titles_array[] = $ot_title; $j++; } else { //within 7 $order->info['total'] += ($ot_value*(-1)); $written_ot_totals_array[] = $ot_class; $written_ot_titles_array[] = $ot_title; } //end 7 } elseif ( ($new_ot_total) && (!in_array($order_totals[$i]['title'], $current_ot_titles_array)) ) { //within 6 $new_order_totals[] = array('title' => $order_totals[$i]['title'], 'text' => $order_totals[$i]['text'], 'value' => $order_totals[$i]['value'], 'code' => $order_totals[$i]['code'], 'sort_order' => $j); $current_ot_totals_array[] = $order_totals[$i]['code']; $current_ot_titles_array[] = $order_totals[$i]['title']; $written_ot_totals_array[] = $ot_class; $written_ot_titles_array[] = $ot_title; $j++; //echo $order_totals[$i]['code'] . "<br>"; for debugging- use of this results in errors } elseif ($new_ot_total) { //also within 6 $order->info['total'] += ($order_totals[$i]['value']*(-1)); $current_ot_totals_array[] = $order_totals[$i]['code']; $written_ot_totals_array[] = $ot_class; $written_ot_titles_array[] = $ot_title; }//end 6 }//end 4 } elseif ( (tep_not_null($ot_value)) && (tep_not_null($ot_title)) ) { // this modifies if (!strstr($ot_class, 'ot_custom')) { //3 $new_order_totals[] = array('title' => $ot_title, 'text' => $currencies->format($ot_value, true, $order->info['currency'], $order->info['currency_value']), 'value' => $ot_value, 'code' => 'ot_custom_' . $j, 'sort_order' => $j); $order->info['total'] += $ot_value; $written_ot_totals_array[] = $ot_class; $written_ot_titles_array[] = $ot_title; $j++; } //end 3 //save ot_skippy from certain annihilation if ( (!in_array($ot_class, $written_ot_totals_array)) && (!in_array($ot_title, $written_ot_titles_array)) && (tep_not_null($ot_value)) && (tep_not_null($ot_title)) && ($ot_class != 'ot_tax') && ($ot_class != 'ot_loworderfee') ) { //7 //this is supposed to catch the oddball components that don't show up in $order_totals $new_order_totals[] = array( 'title' => $ot_title, 'text' => $currencies->format($ot_value, true, $order->info['currency'], $order->info['currency_value']), 'value' => $ot_value, 'code' => $ot_class, 'sort_order' => $j); //$current_ot_totals_array[] = $order_totals[$i]['code']; //$current_ot_titles_array[] = $order_totals[$i]['title']; $written_ot_totals_array[] = $ot_class; $written_ot_titles_array[] = $ot_title; $j++; } //end 7 } //end 2 } else {//within 1 // $_POST['update_totals'] is not an array => write in all order total components that have been generated by the sundry modules for ($i=0, $n=sizeof($order_totals); $i<$n; $i++) { //8 $new_order_totals[] = array('title' => $order_totals[$i]['title'], 'text' => $order_totals[$i]['text'], 'value' => $order_totals[$i]['value'], 'code' => $order_totals[$i]['code'], 'sort_order' => $j); $j++; } //end 8 } //end if (is_array($_POST['update_totals'])) { //1 for ($i=0, $n=sizeof($new_order_totals); $i<$n; $i++) { $sql_data_array = array('orders_id' => $oID, 'title' => $new_order_totals[$i]['title'], 'text' => $new_order_totals[$i]['text'], 'value' => $new_order_totals[$i]['value'], 'class' => $new_order_totals[$i]['code'], 'sort_order' => $new_order_totals[$i]['sort_order']); tep_db_perform(TABLE_ORDERS_TOTAL, $sql_data_array); } Rich Quote Link to comment Share on other sites More sharing options...
♥Tsimi Posted January 8, 2014 Share Posted January 8, 2014 (edited) i installed this add-on AFTER installing Order Editor v1.3 and followed the install instructions to the T. When i click "create customer" i get the following error. Parse error: syntax error, unexpected end of file in D:\xampp\htdocs\XXX\XXX\includes\modules\account_details.php on line 484 i think that is because the account_details.php file ends with </table> instead of ?> as most file do. is there any solution for this? if i click "create order" everything works just fine. i can create an order with existing account, without account and if i choose new account the state drop down selector won't appear but i could live with that since i can change the customer data later. Edited January 8, 2014 by Tsimi Quote Link to comment Share on other sites More sharing options...
♥Tsimi Posted January 8, 2014 Share Posted January 8, 2014 @@Mort-lemur may i have a look at your account_details.php file? thank you. Quote Link to comment Share on other sites More sharing options...
Mort-lemur Posted January 8, 2014 Author Share Posted January 8, 2014 @@Tsimi as below: <?php /* $Id: account_details.php,v 1 2003/08/24 23:22:27 frankl Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2002 osCommerce Released under the GNU General Public License Admin Create Account */ $newsletter_array = array(array('id' => '1', 'text' => ENTRY_NEWSLETTER_YES), array('id' => '0', 'text' => ENTRY_NEWSLETTER_NO)); function sbs_get_zone_name($country_id, $zone_id) { $zone_query = tep_db_query("select zone_name from " . TABLE_ZONES . " where zone_country_id = '" . $country_id . "' and zone_id = '" . $zone_id . "'"); if (tep_db_num_rows($zone_query)) { $zone = tep_db_fetch_array($zone_query); return $zone['zone_name']; } else { return $default_zone; } } // Returns an array with countries // TABLES: countries function sbs_get_countries($countries_id = '', $with_iso_codes = false) { $countries_array = array(); if ($countries_id) { if ($with_iso_codes) { $countries = tep_db_query("select countries_name, countries_iso_code_2, countries_iso_code_3 from " . TABLE_COUNTRIES . " where countries_id = '" . $countries_id . "' order by countries_name"); $countries_values = tep_db_fetch_array($countries); $countries_array = array('countries_name' => $countries_values['countries_name'], 'countries_iso_code_2' => $countries_values['countries_iso_code_2'], 'countries_iso_code_3' => $countries_values['countries_iso_code_3']); } else { $countries = tep_db_query("select countries_name from " . TABLE_COUNTRIES . " where countries_id = '" . $countries_id . "'"); $countries_values = tep_db_fetch_array($countries); $countries_array = array('countries_name' => $countries_values['countries_name']); } } else { $countries = tep_db_query("select countries_id, countries_name from " . TABLE_COUNTRIES . " order by countries_name"); while ($countries_values = tep_db_fetch_array($countries)) { $countries_array[] = array('countries_id' => $countries_values['countries_id'], 'countries_name' => $countries_values['countries_name']); } } return $countries_array; } //// function sbs_get_country_list($name, $selected = '', $parameters = '') { $countries_array = array(array('id' => '', 'text' => PULL_DOWN_DEFAULT)); $countries = sbs_get_countries(); $size = sizeof($countries); for ($i=0; $i<$size; $i++) { $countries_array[] = array('id' => $countries[$i]['countries_id'], 'text' => $countries[$i]['countries_name']); } return tep_draw_pull_down_menu($name, $countries_array, $selected, $parameters); } //// // Alias function to tep_get_countries, which also returns the countries iso codes /* function tep_get_countries_with_iso_codes($countries_id) { return tep_get_countries($countries_id, true); }*/ ?> <table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td class="formAreaTitle"><?php echo CATEGORY_PERSONAL; ?></td> </tr> <tr> <td class="main"><table border="0" width="100%" cellspacing="0" cellpadding="2" class="formArea"> <tr> <td class="main"><table border="0" cellspacing="0" cellpadding="2"> <?php if (ACCOUNT_GENDER == 'true') { $male = ($account['customers_gender'] == 'm') ? true : false; $female = ($account['customers_gender'] == 'f') ? true : false; ?> <tr> <td class="main"> <?php echo ENTRY_GENDER; ?></td> <td class="main"> <?php if ($is_read_only) { echo ($account['customers_gender'] == 'm') ? MALE : FEMALE; } elseif ($error) { if ($entry_gender_error) { echo tep_draw_radio_field('gender', 'm', $male) . ' ' . MALE . ' ' . tep_draw_radio_field('gender', 'f', $female) . ' ' . FEMALE . ' ' . ENTRY_GENDER_ERROR; } else { echo ($gender == 'm') ? MALE : FEMALE; echo tep_draw_hidden_field('gender'); } } else { echo tep_draw_radio_field('gender', 'm', $male) . ' ' . MALE . ' ' . tep_draw_radio_field('gender', 'f', $female) . ' ' . FEMALE . ' ' ; } ?></td> </tr> <?php } ?> <tr> <td class="main"> <?php echo ENTRY_FIRST_NAME; ?></td> <td class="main"> <?php if ($is_read_only) { echo $account['customers_firstname']; } elseif ($error) { if ($entry_firstname_error) { echo tep_draw_input_field('firstname') . ' ' . ENTRY_FIRST_NAME_ERROR; } else { echo $firstname . tep_draw_hidden_field('firstname'); } } else { echo tep_draw_input_field('firstname', $account['customers_firstname']) . ' ' ; } ?></td> </tr> <tr> <td class="main"> <?php echo ENTRY_LAST_NAME; ?></td> <td class="main"> <?php if ($is_read_only) { echo $account['customers_lastname']; } elseif ($error) { if ($entry_lastname_error) { echo tep_draw_input_field('lastname') . ' ' . ENTRY_LAST_NAME_ERROR; } else { echo $lastname . tep_draw_hidden_field('lastname'); } } else { echo tep_draw_input_field('lastname', $account['customers_lastname']) . ' ' ; } ?></td> </tr> <?php if (ACCOUNT_DOB == 'true') { ?> <tr> <td class="main"> <?php echo ENTRY_DATE_OF_BIRTH; ?></td> <td class="main"> <?php if ($is_read_only) { echo tep_date_short($account['customers_dob']); } elseif ($error) { if ($entry_date_of_birth_error) { echo tep_draw_input_field('dob') . ' ' . ENTRY_DATE_OF_BIRTH_ERROR; } else { echo $dob . tep_draw_hidden_field('dob'); } } else { echo tep_draw_input_field('dob', tep_date_short($account['customers_dob'])) . ' ' ; } ?></td> </tr> <?php } ?> <tr> <td class="main"> <?php echo ENTRY_EMAIL_ADDRESS; ?></td> <td class="main"> <?php if ($is_read_only) { echo $account['customers_email_address']; } elseif ($error) { if ($entry_email_address_error) { echo tep_draw_input_field('email_address') . ' ' . ENTRY_EMAIL_ADDRESS_ERROR; } elseif ($entry_email_address_check_error) { echo tep_draw_input_field('email_address') . ' ' . ENTRY_EMAIL_ADDRESS_CHECK_ERROR; } elseif ($entry_email_address_exists) { echo tep_draw_input_field('email_address') . ' ' . ENTRY_EMAIL_ADDRESS_ERROR_EXISTS; } else { echo $email_address . tep_draw_hidden_field('email_address'); } } else { echo tep_draw_input_field('email_address', $account['customers_email_address']) . ' ' ; } ?></td> </tr> </table></td> </tr> </table></td> </tr> <?php if (ACCOUNT_COMPANY == 'true') { ?> <tr> <td class="formAreaTitle"><br><?php echo CATEGORY_COMPANY; ?></td> </tr> <tr> <td class="main"><table border="0" width="100%" cellspacing="0" cellpadding="2" class="formArea"> <tr> <td class="main"><table border="0" cellspacing="0" cellpadding="2"> <tr> <td class="main"> <?php echo ENTRY_COMPANY; ?></td> <td class="main"> <?php if ($is_read_only) { echo $account['entry_company']; } elseif ($error) { if ($entry_company_error) { echo tep_draw_input_field('company') . ' ' . ENTRY_COMPANY_ERROR; } else { echo $company . tep_draw_hidden_field('company'); } } else { echo tep_draw_input_field('company', $account['entry_company']) . ' ' ; } ?></td> </tr> </table></td> </tr> </table></td> </tr> <?php } ?> <tr> <td class="formAreaTitle"><br><?php echo CATEGORY_ADDRESS; ?></td> </tr> <tr> <td class="main"><table border="0" width="100%" cellspacing="0" cellpadding="2" class="formArea"> <tr> <td class="main"><table border="0" cellspacing="0" cellpadding="2"> <tr> <td class="main"> <?php echo ENTRY_STREET_ADDRESS; ?></td> <td class="main"> <?php if ($is_read_only) { echo $account['entry_street_address']; } elseif ($error) { if ($entry_street_address_error) { echo tep_draw_input_field('street_address') . ' ' . ENTRY_STREET_ADDRESS_ERROR; } else { echo $street_address . tep_draw_hidden_field('street_address'); } } else { echo tep_draw_input_field('street_address', $account['entry_street_address']) . ' ' ; } ?></td> </tr> <?php if (ACCOUNT_SUBURB == 'true') { ?> <tr> <td class="main"> <?php echo ENTRY_SUBURB; ?></td> <td class="main"> <?php if ($is_read_only) { echo $account['entry_suburb']; } elseif ($error) { if ($entry_suburb_error) { echo tep_draw_input_field('suburb') . ' ' . ENTRY_SUBURB_ERROR; } else { echo $suburb . tep_draw_hidden_field('suburb'); } } else { echo tep_draw_input_field('suburb', $account['entry_suburb']) . ' ' ; } ?></td> </tr> <?php } ?> <tr> <td class="main"> <?php echo ENTRY_POST_CODE; ?></td> <td class="main"> <?php if ($is_read_only) { echo $account['entry_postcode']; } elseif ($error) { if ($entry_post_code_error) { echo tep_draw_input_field('postcode') . ' ' . ENTRY_POST_CODE_ERROR; } else { echo $postcode . tep_draw_hidden_field('postcode'); } } else { echo tep_draw_input_field('postcode', $account['entry_postcode']) . ' ' ; } ?></td> </tr> <tr> <td class="main"> <?php echo ENTRY_CITY; ?></td> <td class="main"> <?php if ($is_read_only) { echo $account['entry_city']; } elseif ($error) { if ($entry_city_error) { echo tep_draw_input_field('city') . ' ' . ENTRY_CITY_ERROR; } else { echo $city . tep_draw_hidden_field('city'); } } else { echo tep_draw_input_field('city', $account['entry_city']) . ' ' ; } ?></td> </tr> <?php if (ACCOUNT_STATE == 'true') { ?> <tr> <td class="main"> <?php echo ENTRY_STATE; ?></td> <td class="main"> <?php $state = sbs_get_zone_name($country, $zone_id); if ($is_read_only) { echo sbs_get_zone_name($account['entry_country_id'], $account['entry_zone_id']); } elseif ($error) { if ($entry_state_error) { if ($entry_state_has_zones) { $zones_array = array(); $zones_query = tep_db_query("select zone_name from " . TABLE_ZONES . " where zone_country_id = '" . tep_db_input($country) . "' order by zone_name"); while ($zones_values = tep_db_fetch_array($zones_query)) { $zones_array[] = array('id' => $zones_values['zone_name'], 'text' => $zones_values['zone_name']); } echo tep_draw_pull_down_menu('state', $zones_array) . ' ' . ENTRY_STATE_ERROR; } else { echo tep_draw_input_field('state') . ' ' . ENTRY_STATE_ERROR; } } else { echo $state . tep_draw_hidden_field('zone_id') . tep_draw_hidden_field('state'); } } else { echo tep_draw_input_field('state', sbs_get_zone_name($account['entry_country_id'], $account['entry_zone_id'], $account['entry_state'])) . ' ' ; } ?></td> </tr> <?php } ?> <tr> <td class="main"> <?php echo ENTRY_COUNTRY; ?></td> <td class="main"> <?php $account['entry_country_id'] = STORE_COUNTRY; if ($is_read_only) { echo tep_get_country_name($account['entry_country_id']); } elseif ($error) { if ($entry_country_error) { echo sbs_get_country_list('country') . ' ' . ENTRY_COUNTRY_ERROR; } else { echo tep_get_country_name($country) . tep_draw_hidden_field('country'); } } else { echo sbs_get_country_list('country', $account['entry_country_id']) . ' ' ; } ?></td> </tr> </table></td> </tr> </table></td> </tr> <tr> <td class="formAreaTitle"><br><?php echo CATEGORY_CONTACT; ?></td> </tr> <tr> <td class="main"><table border="0" width="100%" cellspacing="0" cellpadding="2" class="formArea"> <tr> <td class="main"><table border="0" cellspacing="0" cellpadding="2"> <tr> <td class="main"> <?php echo ENTRY_TELEPHONE_NUMBER; ?></td> <td class="main"> <?php if ($is_read_only) { echo $account['customers_telephone']; } elseif ($error) { if ($entry_telephone_error) { echo tep_draw_input_field('telephone') . ' ' . ENTRY_TELEPHONE_NUMBER_ERROR; } else { echo $telephone . tep_draw_hidden_field('telephone'); } } else { echo tep_draw_input_field('telephone', $account['customers_telephone']) . ' ' ; } ?></td> </tr> <tr> <td class="main"> <?php echo ENTRY_FAX_NUMBER; ?></td> <td class="main"> <?php if ($is_read_only) { echo $account['customers_fax']; } elseif ($processed) { echo $fax . tep_draw_hidden_field('fax'); } else { echo tep_draw_input_field('fax', $account['customers_fax']) . ' ' ; } ?></td> </tr> </table></td> </tr> </table></td> </tr> <tr> <td class="formAreaTitle"><br><?php echo CATEGORY_OPTIONS; ?></td> </tr> <tr> <td class="main"><table border="0" width="100%" cellspacing="0" cellpadding="2" class="formArea"> <tr> <td class="main"><table border="0" cellspacing="0" cellpadding="2"> <tr> <td class="main"> <?php echo ENTRY_NEWSLETTER; ?></td> <td class="main"> <?php if ($is_read_only) { if ($account['customers_newsletter'] == '1') { echo ENTRY_NEWSLETTER_YES; } else { echo ENTRY_NEWSLETTER_NO; } } elseif ($processed) { if ($newsletter == '1') { echo ENTRY_NEWSLETTER_YES; } else { echo ENTRY_NEWSLETTER_NO; } echo tep_draw_hidden_field('newsletter'); } else { echo tep_draw_pull_down_menu('newsletter', $newsletter_array, $account['customers_newsletter']) . ' ' ; } ?></td> </tr> </table></td> </tr> </table></td> </tr> <?php/* <?php if (!$is_read_only) { ?> <tr> <td class="formAreaTitle"><br><?php echo CATEGORY_PASSWORD; ?></td> </tr> <tr> <td class="main"><table border="0" width="100%" cellspacing="0" cellpadding="2" class="formArea"> <tr> <td class="main"><table border="0" cellspacing="0" cellpadding="2"> <tr> <td class="main"> <?php echo ENTRY_PASSWORD; ?></td> <td class="main"> <?php if ($error) { if ($entry_password_error) { echo tep_draw_password_field('password') . ' ' . ENTRY_PASSWORD_ERROR; } else { echo PASSWORD_HIDDEN . tep_draw_hidden_field('password') . tep_draw_hidden_field('confirmation'); } } else { echo tep_draw_password_field('password') . ' ' . ENTRY_PASSWORD_TEXT; } ?></td> </tr> <?php if ( (!$error) || ($entry_password_error) ) { ?> <tr> <td class="main"> <?php echo ENTRY_PASSWORD_CONFIRMATION; ?></td> <td class="main"> <?php echo tep_draw_password_field('confirmation') . ' ' . ENTRY_PASSWORD_CONFIRMATION_TEXT; ?></td> </tr> <?php } ?> </table></td> </tr> </table></td> </tr> */ ?> <?php // } ?> </table> Quote Now running on a fully modded, Mobile Friendly 2.3.4 Store with the Excellent MTS installed - See my profile for the mods installed ..... So much thanks for all the help given along the way by forum members. Link to comment Share on other sites More sharing options...
Mort-lemur Posted January 8, 2014 Author Share Posted January 8, 2014 @@Tsimi It works for me with the /table as the end - without any error logs. On the drop down state - when I add a customer I clear that box, then when I press enter I get an error and the drop down box appears - its the way I live with it and it works :) Quote Now running on a fully modded, Mobile Friendly 2.3.4 Store with the Excellent MTS installed - See my profile for the mods installed ..... So much thanks for all the help given along the way by forum members. Link to comment Share on other sites More sharing options...
♥Tsimi Posted January 8, 2014 Share Posted January 8, 2014 (edited) @@Mort-lemur thank you heather. i'm compairing the files now with winmerge but till now i don't see any big difference, but i'll keep looking. i'll probably end up re-installing everything again just to make sure. regarding the state thing; a clean osC 2.3.3.4 install has the same let's call it bug. when creating an account, you have to get an error first before a drop down appears to choose the state. to avoid that i installed fimbles add-on solution. i also did a bug fix mentioned here http://www.oscommerce.com/forums/topic/386228-dhtml-state-selection-found-a-bug/ and fimble did a small mistake with a class definition inside the code. he used class="fieldkey" instead of class="fieldKey". i updated (applied bugfix & added correct class) fimbles install manual and attached it. maybe it would be possible to implement that fix inside the manual order add-on, haven't tried that yet. Edited January 8, 2014 by Tsimi Quote Link to comment Share on other sites More sharing options...
♥Tsimi Posted January 8, 2014 Share Posted January 8, 2014 @@Mort-lemur just re-installed everything again and i get the same error even took your account_details.php file this time, but no luck. Parse error: syntax error, unexpected end of file in xxxxxxxxxx\includes\modules\account_details.php on line 475 Quote Link to comment Share on other sites More sharing options...
Mort-lemur Posted January 8, 2014 Author Share Posted January 8, 2014 (edited) Silly question but have you tried removing the </table> from the end of the file - I just tried and it makes no difference - but it may cure your error.... Just did a quick count up - and that /table is one too many - so you can safely delete it Edited January 8, 2014 by Mort-lemur Quote Now running on a fully modded, Mobile Friendly 2.3.4 Store with the Excellent MTS installed - See my profile for the mods installed ..... So much thanks for all the help given along the way by forum members. Link to comment Share on other sites More sharing options...
♥Tsimi Posted January 9, 2014 Share Posted January 9, 2014 (edited) @@Mort-lemur Silly question but have you tried removing the </table> from the end of the file - I just tried and it makes no difference - but it may cure your error.... that was the first thing i did when i got this error. but no worries anymore i got it! after reading kymation topic regarding converting 2.2 ad-ons to 2.3 i got struck by lightning. (w00t) maybe there is a code that shouldn't be between the first <?php and ?> tag. i moved the 3 functions code "after" the first ?> tag inside their own <?php ?> tag. and since then i can nicely add new customers. i checked the database just to make sure that everything is there, like new customer_id, address etc...and everything looks fine so far. i did some cosmetic corrections like tep_draw_button instead of tep_image_button and other minor changes. also updated your install manual and all the files inside it. and with your permission i would like to attach this repack of your add-on here in this topic. Edited January 9, 2014 by Tsimi Quote Link to comment Share on other sites More sharing options...
Mort-lemur Posted January 9, 2014 Author Share Posted January 9, 2014 @@Tsimi Of Course I dont mind - upload a new version to the contribution section Many Thanks Quote Now running on a fully modded, Mobile Friendly 2.3.4 Store with the Excellent MTS installed - See my profile for the mods installed ..... So much thanks for all the help given along the way by forum members. Link to comment Share on other sites More sharing options...
♥Tsimi Posted January 9, 2014 Share Posted January 9, 2014 (edited) thank you! i'm not confident enough to release something inside the add-ons section. plus i can't guarantee "regular support" for this. so i attach the package here. all credits to the original authors and heather. for people that have already installed this add-on and only want a fix for the following error message Parse error: syntax error, unexpected end of file in xxxxxxxxxx\includes\modules\account_details.php on line 475 just unzip the package take and replace the account_details.php inside catalog/admin/includes/modules/ Edited January 9, 2014 by Tsimi Quote Link to comment Share on other sites More sharing options...
♥Tsimi Posted January 9, 2014 Share Posted January 9, 2014 (edited) double post fix, sorry. Edited January 9, 2014 by Tsimi Quote Link to comment Share on other sites More sharing options...
satinwoods Posted August 18, 2014 Share Posted August 18, 2014 Does this add on work with QTPro? Quote Link to comment Share on other sites More sharing options...
discxpress Posted September 26, 2015 Share Posted September 26, 2015 @@Tsimi Hello did you erase the package that you attached? Many thanks Quote Link to comment Share on other sites More sharing options...
♥Tsimi Posted September 26, 2015 Share Posted September 26, 2015 @@discxpress Hi I am sorry but I cannot recall. I might have deleted it when I reached my Attachment limit a while back. I don't really remember what was going on that time. But if you have problems just ask and we might be able to help you out. Meanwhile I will look for the package maybe I find it on some USB stick that I use for backups. Quote Link to comment Share on other sites More sharing options...
lupole Posted September 26, 2015 Share Posted September 26, 2015 Hello. This a great addon but I am getting the infamous white page when I go to admin/orders.php. I have been over this install 3 times. Here is my /orders page. Maybe someone could see something I am unable to see. All else seems to be working. <?php/* $Id$ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright © 2010 osCommerce Released under the GNU General Public License Changes for order editor 2.3 v1.2 9/24/15 Changes for create customer account and manual order maker 9/26/15*/ 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> <!-- BOF Order Maker --> <td class="pageHeading"><?php echo HEADING_TITLE . '<a href="' . tep_href_link(FILENAME_CREATE_ORDER) . '"> Create order </a>'; ?></td> <td class="pageHeading" align="right"><?php echo tep_draw_separator('pixel_trans.gif', 1, HEADING_IMAGE_HEIGHT); ?></td> <!-- EOF Order Maker --><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> </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><?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 { // ### BEGIN ORDER MAKER ### added customer_service_id $orders_query_raw = "select o.orders_id, o.customers_name, o.payment_method, o.date_purchased, o.last_modified, o.currency, o.currency_value, o.customer_service_id, 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"; // ### END ORDER MAKER ### added customer_service_id } $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' => '<strong>[' . $oInfo->orders_id . '] ' . tep_datetime_short($oInfo->date_purchased) . '</strong>'); // BOF Order Maker $contents[] = array('align' => 'center', 'text' => tep_draw_button(IMAGE_ORDERS_INVOICE,'document',tep_href_link(FILENAME_ORDERS_INVOICE, 'oID=' . $oInfo->orders_id), null, array('newwindow' => true)) .tep_draw_button(IMAGE_ORDERS_PACKINGSLIP,'document', tep_href_link(FILENAME_ORDERS_PACKINGSLIP, 'oID=' . $oInfo->orders_id), null, array('newwindow' => true))); $contents[] = array('align' => 'center', 'text' => tep_draw_button(IMAGE_EDIT,'document',tep_href_link(FILENAME_ORDERS_EDIT, 'oID=' . $oInfo->orders_id)) . tep_draw_button(IMAGE_CREATE_ORDER,'document',tep_href_link(FILENAME_CREATE_ORDER))); // EOF Order Maker $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); // ### BEGIN ORDER MAKER ### $contents[] = array('text' => '<br>' . TEXT_INFO_CUSTOMER_SERVICE_ID . ' ' . $oInfo->customer_service_id); // ### END ORDER MAKER ### } 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');?> 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.