Jump to content

asiabound

Members
  • Content count

    87
  • Joined

  • Last visited

Profile Information

  1. asiabound

    MVS PIPC

    Now I need to know which version of Oscommerce that you are using then I will be able to work from there
  2. asiabound

    MVS PIPC

    could you please give me the contibutions links and i will look at it
  3. I have uploaded the file to addon but waitng for approval since the fileis more than 300K
  4. I will be packing up the files and uploading to the contributions section when i get done so the admin access will be compatible with 2.2RCA I have upgrade my store as new oscommerce versions have come out and changed the code of the contributions for my store. My oscommerce 2.2RCA is heavly modified so i will need to pull out the code and files and install on a fresh oscommerce 2.2RCA to clean out the bugs if there is any I will be uploading in the next few days so be patient.
  5. Since I couldn't post the file being the text was to large I uploaded to the contributions the download text is marked by // systemsmanager begin downloads // systemsmanager end downloads
  6. looks like will take 2 posts to add the full file <?php /* $Id: easypopulate.php,v 2.76f 2007/01/20 22:50:52 surfalot Exp $ Designed for osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2007 Todd Holforty mtholforty(at)surfalot(dot)com Released under the GNU General Public License */ // Current EP Version define ('EP_CURRENT_VERSION', '2.76f-MS2'); require('includes/application_top.php'); require_once('includes/database_tables.php'); require('easypopulate_functions.php'); // //******************************* //******************************* // C O N F I G U R A T I O N // V A R I A B L E S //******************************* //******************************* ////////////////////////////////////////////////////// // *** Show all these settings on EP main page *** // use this to debug your settings. Copy the settings // to your post on the forum if you need help. ////////////////////////////////////////////////////// define ('EP_SHOW_EP_SETTINGS', true); // default is: false // **** Temp directory **** /* //////////////////////////////////////////////////////////////////////// // // *IF* you changed your directory structure from stock and do not // have /catalog/temp/, then you'll need to change this accordingly. // // *IF* your shop is in the default /catalog/ installation directory // on your website, skip this Temp Directory settings info. // /////////////////////////////////////////////////////////////////////////// CREATING THE TEMP DIRECTORY If your shop is in the root of your public site ( /home/myaccount/public_html/index.php ), you should create a folder called temp from the root of your web space so that the full path looks like this: /home/myaccount/public_html/temp/ Then you must set the permissions to 777. If you don't know how, ask your host. THE DIR_FS_DOCUMENT_ROOT SETTING DIR_FS_DOCUMENT_ROOT is set in your /catalog/admin/includes/configure.php You should look at the setting DIR_FS_DOCUMENT_ROOT setting. if it looks like this (recommended, but doesn't always work): define ('DIR_FS_DOCUMENT_ROOT', $DOCUMENT_ROOT); then leave it alone. If it looks like this: define ('DIR_FS_DOCUMENT_ROOT', '/home/myaccount/public_html'); ask your host if the "/home/myaccount/public_html" portion points to your public web space and is correct. Whether you add the trailing slash on the path or not doesn't matter to this contrib, as long as you make the right choice on the following setting. The best thing is to leave it alone as long as your host can confirm it is correct and everything else is working fine. Having said that, NO trailing slash is technically correct. THE DIR_WS_CATALOG & DIR_FS_CATALOG SETTINGS DIR_WS_CATALOG & DIR_FS_CATALOG are set in your /catalog/admin/includes/configure.php They may look like this if your shop is in the root of your web space. If you have something different, don't just change it to this. There is probably a good reason. I'm providing this as a reference to you-all. The DIR_FS_DOCUMENT_ROOT, the DIR_WS_CATALOG, and the DIR_FS_CATALOG settings all combine to create the temp location below. define('DIR_WS_CATALOG', '/'); define('DIR_FS_CATALOG', DIR_FS_DOCUMENT_ROOT . DIR_WS_CATALOG); THIS EP_TEMP_DIRECTORY SETTING Next, the following setting should set so that the DIR_FS_CATALOG setting plus this following setting makes a correct full path to your temporary location, like this: /home/myaccount/public_html/temp/ if /home/myaccount/public_html/temp/ is the correct full path to your temp location, then: define ('EP_TEMP_DIRECTORY', DIR_FS_CATALOG . 'temp/'); is the correct setting here. Wow, I really hope this stops the forum traffic about this !! ////////////////////////////////////////////////////////////////////////// */ // **** Temp directory **** define ('EP_TEMP_DIRECTORY', DIR_FS_CATALOG . 'shop/temp/'); //**** File Splitting Configuration **** // we attempt to set the timeout limit longer for this script to avoid having to split the files // NOTE: If your server is running in safe mode, this setting cannot override the timeout set in php.ini // uncomment this if you are not on a safe mode server and you are getting timeouts // set_time_limit(330); // if you are splitting files, this will set the maximum number of records to put in each file. // if you set your php.ini to a long time, you can make this number bigger define ('EP_SPLIT_MAX_RECORDS', 300); // default, seems to work for most people. Reduce if you hit timeouts //define ('EP_SPLIT_MAX_RECORDS', 4); // for testing //**** Image Defaulting **** // set them to your own default "We don't have any picture" gif //define ('EP_DEFAULT_IMAGE_MANUFACTURER', 'no_image_manufacturer.gif'); //define ('EP_DEFAULT_IMAGE_PRODUCT', 'no_image_product.gif'); //define ('EP_DEFAULT_IMAGE_CATEGORY', 'no_image_category.gif'); // or let them get set to nothing define ('EP_DEFAULT_IMAGE_MANUFACTURER', ''); define ('EP_DEFAULT_IMAGE_PRODUCT', ''); define ('EP_DEFAULT_IMAGE_CATEGORY', ''); //**** Status Field Setting **** // Set the v_status field to "Inactive" if you want the status=0 in the system define ('EP_TEXT_ACTIVE', 'Active'); define ('EP_TEXT_INACTIVE', 'Inactive'); // Set the v_status field to "Delete" if you want to remove the item from the system define ('EP_DELETE_IT', 'Delete'); // If zero_qty_inactive is true, then items with zero qty will automatically be inactive in the store. define ('EP_INACTIVATE_ZERO_QUANTITIES', false); // default is false //**** Size of products_model in products table **** // set this to the size of your model number field in the db. We check to make // sure all models are no longer than this value. this prevents the database from // getting fubared. Just making this number bigger won't help your database! They must match! // If you increase the Model Number size, you must increase the size of the field // in the database. Use a SQL tool like phpMyAdmin (see your host) and change the // "products_model" field of the "products" table in your osCommerce Database. define ('EP_MODEL_NUMBER_SIZE', 12); // default is 12 //**** Price includes tax? **** // Set the EP_PRICE_WITH_TAX to // false if you want the price that is exported to be the same value as stored in the database (no tax added). // true if you want the tax to be added to the export price and subtracted from the import price. define ('EP_PRICE_WITH_TAX', false); // default is false //**** Price calculation precision **** // US Currency uses 2 digits behind the decimal place, so for the US this should be 2 // NOTE: when entering into the database all prices will be converted to 4 decimal places. define ('EP_PRECISION', 2); // default is 2 // **** Quote -> Escape character conversion **** // If you have extensive html in your descriptions and it's getting mangled on upload, turn this off // set to true = replace quotes with escape characters // set to false = no quote replacement define ('EP_REPLACE_QUOTES', true); // default is false // **** Field Separator **** // change this if you can't use the default of tabs // Tab is the default, comma and semicolon are commonly supported by various progs // Remember, if your descriptions contain this character, you will confuse EP! // if EP_EXCEL_SAFE_OUTPUT if false (below) you must make EP_PRESERVE_TABS_CR_LF false also. $ep_separator = "\t"; // tab is default //$ep_separator = ','; // comma //$ep_separator = ';'; // semi-colon //$ep_separator = '~'; // tilde //$ep_separator = '*'; // splat // define ('EP_SEPARATOR', ); // *** Excel safe output *** // this setting will supersede the previous $ep_separator setting and create a file // that excel will import without spanning cells from embedded commas or tabs in your products. // if EP_EXCEL_SAFE_OUTPUT if false (below) you must make EP_PRESERVE_TABS_CR_LF false also. define ('EP_EXCEL_SAFE_OUTPUT', true); // default is: true if (EP_EXCEL_SAFE_OUTPUT == true) { if ($language == 'english') { $ep_separator = ','; // comma } elseif ($language == 'german') { $ep_separator = ';'; // semi-colon } else { $ep_separator = ','; // comma // default for all others. } } // *** Preserve Tabs, Carriage returns and Line feeds *** // this setting will preserve the special chars that can cause problems in // a text based output. When used with EP_EXCEL_SAFE_OUTPUT, it will safely // preserve these elements in the export and import. define ('EP_PRESERVE_TABS_CR_LF', false); // default is: false // **** Max Category Levels **** // change this if you need more or fewer categories. // set this to the maximum depth of your categories. define ('EP_MAX_CATEGORIES', 7); // default is 7 // VJ product attributes begin // **** Product Attributes **** // change this to false, if do not want to download product attributes define ('EP_PRODUCTS_WITH_ATTRIBUTES', true); // default is true // change this to true, if you use QTYpro and want to set attributes stock with EP. define ('EP_PRODUCTS_ATTRIBUTES_STOCK', false); // default is false // change this if you want to download only selected product options (attributes). // If you have a lot of product options, and your output file exceeds 256 columns, // which is the max. limit MS Excel is able to handle, then load-up this array with // attributes to skip when generating the export. $attribute_options_select = ''; // $attribute_options_select = array('Size', 'Model'); // uncomment and fill with product options name you wish to download // comment this line, if you wish to download all product options // VJ product attributes end // **************************************** // Froogle configuration variables // Here are some links regarding Bulk uploads // http://www.google.com/base/attributes.html // http://www.google.com/base/help/custom-attributes.html // **************************************** // **** Froogle product info page path **** // We can't use the tep functions to create the link, because the links will point to the // admin, since that's where we're at. So put the entire path to your product_info.php page here define ('EP_FROOGLE_PRODUCT_INFO_PATH', HTTP_CATALOG_SERVER . DIR_WS_CATALOG . "product_info.php"); // **** Froogle product image path **** // Set this to the path to your images directory define ('EP_FROOGLE_IMAGE_PATH', HTTP_CATALOG_SERVER . DIR_WS_CATALOG_IMAGES); // **** Froogle - search engine friendly setting // if your store has SEARCH ENGINE FRIENDLY URLS set, then turn this to true // I did it this way because I'm having trouble with the code seeing the constants // that are defined in other places. define ('EP_FROOGLE_SEF_URLS', true); // default is false // **** Froogle Currency Setting define ('EP_FROOGLE_CURRENCY', 'USD'); // default is 'USD' // **************************************** // End: Froogle configuration variables // // *********************************** // *** Other Contributions Support *** // *********************************** // More Pics 6 v1.3 define ('EP_MORE_PICS_6_SUPPORT', false); // default is false // // Header Tags Controller Support v2.0 define ('EP_HTC_SUPPORT', true); // default is false // // Separate Pricing Per Customer (SPPC) define ('EP_SPPC_SUPPORT', false); // default is false // /////////////////////////////////////////////////////////////////////////////// // The following items are not complete and untested. Experiment at your own risk. // /////////////////////////////////////////////////////////////////////////////// // // Extra Fields Contribution (***UNTESTED AND MAY NOT BE FUNCTIONAL***) define ('EP_EXTRA_FIELDS_SUPPORT', true); // default is false // // Unknown Image Contrib (***UNTESTED AND MAY NOT BE FUNCTIONAL***) define ('EP_UNKNOWN_ADD_IMAGES_SUPPORT', false); // default is false //******************************* //******************************* // E N D // C O N F I G U R A T I O N // V A R I A B L E S //******************************* //******************************* //******************************* //******************************* // S T A R T // INITIALIZATION //******************************* //******************************* // modify tableBlock for use here. class epbox extends tableBlock { // constructor function epbox($contents, $direct_ouput = true) { $this->table_width = ''; if (!empty($contents) && $direct_ouput == true) { echo $this->tableBlock($contents); } } // only member function function output($contents) { return $this->tableBlock($contents); } } if (!empty($languages_id) && !empty($language)) { define ('EP_DEFAULT_LANGUAGE_ID', $languages_id); define ('EP_DEFAULT_LANGUAGE_NAME', $language); } else { //elari check default language_id from configuration table DEFAULT_LANGUAGE $epdlanguage_query = tep_db_query("select languages_id, name from " . TABLE_LANGUAGES . " where code = '" . DEFAULT_LANGUAGE . "'"); if (tep_db_num_rows($epdlanguage_query) > 0) { $epdlanguage = tep_db_fetch_array($epdlanguage_query); define ('EP_DEFAULT_LANGUAGE_ID', $epdlanguage['languages_id']); define ('EP_DEFAULT_LANGUAGE_NAME', $epdlanguage['name']); } else { echo 'Strange but there is no default language to work... That may not happen, just in case... '; } } $languages = tep_get_languages(); // VJ product attributes begin $attribute_options_array = array(); if (EP_PRODUCTS_WITH_ATTRIBUTES == true) { if (is_array($attribute_options_select) && (count($attribute_options_select) > 0)) { foreach ($attribute_options_select as $value) { $attribute_options_query = "select distinct products_options_id from " . TABLE_PRODUCTS_OPTIONS . " where products_options_name = '" . $value . "'"; $attribute_options_values = tep_db_query($attribute_options_query); if ($attribute_options = tep_db_fetch_array($attribute_options_values)){ $attribute_options_array[] = array('products_options_id' => $attribute_options['products_options_id']); } } } else { $attribute_options_query = "select distinct products_options_id from " . TABLE_PRODUCTS_OPTIONS . " order by products_options_id"; $attribute_options_values = tep_db_query($attribute_options_query); while ($attribute_options = tep_db_fetch_array($attribute_options_values)){ $attribute_options_array[] = array('products_options_id' => $attribute_options['products_options_id']); } } } // VJ product attributes end // these are the fields that will be defaulted to the current values in // the database if they are not found in the incoming file $default_these = array(); foreach ($languages as $key => $lang){ $default_these[] = 'v_products_name_' . $lang['id']; $default_these[] = 'v_products_description_' . $lang['id']; $default_these[] = 'v_products_url_' . $lang['id']; if (EP_HTC_SUPPORT == true) { $default_these[] = 'v_products_head_title_tag_' . $lang['id']; $default_these[] = 'v_products_head_desc_tag_' . $lang['id']; $default_these[] = 'v_products_head_keywords_tag_' . $lang['id']; } } $default_these[] = 'v_products_image'; if (EP_MORE_PICS_6_SUPPORT == true) { $default_these[] = 'v_products_subimage1'; $default_these[] = 'v_products_subimage2'; $default_these[] = 'v_products_subimage3'; $default_these[] = 'v_products_subimage4'; $default_these[] = 'v_products_subimage5'; $default_these[] = 'v_products_subimage6'; } if (EP_UNKNOWN_ADD_IMAGES_SUPPORT == true) { $default_these[] = 'v_products_mimage'; $default_these[] = 'v_products_bimage'; $default_these[] = 'v_products_subimage1'; $default_these[] = 'v_products_bsubimage1'; $default_these[] = 'v_products_subimage2'; $default_these[] = 'v_products_bsubimage2'; $default_these[] = 'v_products_subimage3'; $default_these[] = 'v_products_bsubimage3'; } $default_these[] = 'v_categories_id'; $default_these[] = 'v_products_price'; $default_these[] = 'v_products_quantity'; $default_these[] = 'v_products_weight'; $default_these[] = 'v_status_current'; $default_these[] = 'v_date_avail'; $default_these[] = 'v_date_added'; $default_these[] = 'v_tax_class_title'; $default_these[] = 'v_manufacturers_name'; $default_these[] = 'v_manufacturers_id'; $filelayout = ''; $filelayout_count = ''; $filelayout_sql = ''; $fileheaders = ''; if ( !empty($dltype) ){ // if dltype is set, then create the filelayout. Otherwise it gets read from the uploaded file list($filelayout, $filelayout_count, $filelayout_sql, $fileheaders) = ep_create_filelayout($dltype, $attribute_options_array, $languages); // get the right filelayout for this download } //******************************* //******************************* // E N D // INITIALIZATION //******************************* //******************************* //******************************* //******************************* // DOWNLOAD FILE (EXPORT) //******************************* //******************************* if ( !empty($_GET['download']) && ($_GET['download'] == 'stream' or $_GET['download'] == 'activestream' or $_GET['download'] == 'tempfile') ){ $filestring = ""; // this holds the csv file we want to download $result = tep_db_query($filelayout_sql); $row = tep_db_fetch_array($result); // $EXPORT_TIME=time(); // start export time when export is started. $EXPORT_TIME = strftime('%Y%b%d-%H%I'); if ($dltype=="froogle"){ $EXPORT_TIME = "FroogleEP" . $EXPORT_TIME; } else { $EXPORT_TIME = "EP" . $EXPORT_TIME; } // Here we need to allow for the mapping of internal field names to external field names // default to all headers named like the internal ones // the field mapping array only needs to cover those fields that need to have their name changed if ( count($fileheaders) != 0 ){ $filelayout_header = $fileheaders; // if they gave us fileheaders for the dl, then use them } else { $filelayout_header = $filelayout; // if no mapping was spec'd use the internal field names for header names } //We prepare the table heading with layout values foreach( $filelayout_header as $key => $value ){ $filestring .= $key . $ep_separator; } // now lop off the trailing tab $filestring = substr($filestring, 0, strlen($filestring)-1); // set the type if ( $dltype == 'froogle' ){ $endofrow = "\n"; } else { // default to normal end of row $endofrow = $ep_separator . 'EOREOR' . "\n"; } $filestring .= $endofrow; if ($download == 'activestream'){ header("Content-type: application/vnd.ms-excel"); header("Content-disposition: attachment; filename=$EXPORT_TIME" . ((EP_EXCEL_SAFE_OUTPUT == true)?".csv":".txt")); // Changed if using SSL, helps prevent program delay/timeout (add to backup.php also) // header("Pragma: no-cache"); if ($request_type== 'NONSSL'){ header("Pragma: no-cache"); } else { header("Pragma: "); } header("Expires: 0"); echo $filestring; } $num_of_langs = count($languages); while ($row){ // if the filelayout says we need a products_name, get it // build the long full froogle image path $row['v_products_fullpath_image'] = EP_FROOGLE_IMAGE_PATH . $row['v_products_image']; // Other froogle defaults go here for now $row['v_froogle_quantitylevel'] = $row['v_products_quantity']; $row['v_froogle_manufacturer_id'] = ''; $row['v_froogle_exp_date'] = date('Y-m-d', strtotime('+30 days')); $row['v_froogle_product_type'] = $row['v_categories_id']; $row['v_froogle_product_id'] = $row['v_products_model']; $row['v_froogle_currency'] = EP_FROOGLE_CURRENCY; // names and descriptions require that we loop thru all languages that are turned on in the store foreach ($languages as $key => $lang){ $lid = $lang['id']; // for each language, get the description and set the vals $sql2 = "SELECT * FROM ".TABLE_PRODUCTS_DESCRIPTION." WHERE products_id = " . $row['v_products_id'] . " AND language_id = '" . $lid . "' "; $result2 = tep_db_query($sql2); $row2 = tep_db_fetch_array($result2); // I'm only doing this for the first language, since right now froogle is US only.. Fix later! // adding url for froogle, but it should be available no matter what if (EP_FROOGLE_SEF_URLS == true){ // if only one language if ($num_of_langs == 1){ $row['v_froogle_products_url_' . $lid] = EP_FROOGLE_PRODUCT_INFO_PATH . '/products_id/' . $row['v_products_id']; } else { $row['v_froogle_products_url_' . $lid] = EP_FROOGLE_PRODUCT_INFO_PATH . '/products_id/' . $row['v_products_id'] . '/language/' . $lid; } } else { if ($num_of_langs == 1){ $row['v_froogle_products_url_' . $lid] = EP_FROOGLE_PRODUCT_INFO_PATH . '?products_id=' . $row['v_products_id']; } else { $row['v_froogle_products_url_' . $lid] = EP_FROOGLE_PRODUCT_INFO_PATH . '?products_id=' . $row['v_products_id'] . '&language=' . $lid; } } $row['v_products_name_' . $lid] = $row2['products_name']; $row['v_products_description_' . $lid] = $row2['products_description']; $row['v_products_url_' . $lid] = $row2['products_url']; // froogle advanced format needs the quotes around the name and desc $row['v_froogle_products_name_' . $lid] = '"' . strip_tags(str_replace('"','""',$row2['products_name'])) . '"'; $row['v_froogle_products_description_' . $lid] = '"' . strip_tags(str_replace('"','""',$row2['products_description'])) . '"'; // support for Linda's Header Controller 2.0 here if(isset($filelayout['v_products_head_title_tag_' . $lid])){ $row['v_products_head_title_tag_' . $lid] = $row2['products_head_title_tag']; $row['v_products_head_desc_tag_' . $lid] = $row2['products_head_desc_tag']; $row['v_products_head_keywords_tag_' . $lid] = $row2['products_head_keywords_tag']; } // end support for Header Controller 2.0 } // for the categories, we need to keep looping until we find the root category // start with v_categories_id // Get the category description // set the appropriate variable name // if parent_id is not null, then follow it up. // we'll populate an aray first, then decide where it goes in the $thecategory_id = $row['v_categories_id']; $fullcategory = ''; // this will have the entire category stack for froogle for( $categorylevel=1; $categorylevel<=EP_MAX_CATEGORIES; $categorylevel++){ if ($thecategory_id){ $sql2 = "SELECT categories_name FROM ".TABLE_CATEGORIES_DESCRIPTION." WHERE categories_id = " . $thecategory_id . " AND language_id = " . EP_DEFAULT_LANGUAGE_ID; $result2 = tep_db_query($sql2); $row2 = tep_db_fetch_array($result2); $sql2 = "SELECT categories_image FROM ".TABLE_CATEGORIES." WHERE categories_id = " . $thecategory_id . ''; $result2 = tep_db_query($sql2); $row2 = array_merge($row2, tep_db_fetch_array($result2)); // only set it if we found something $temprow['v_categories_name_' . $categorylevel] = $row2['categories_name']; $temprow['v_categories_image_' . $categorylevel] = $row2['categories_image']; // now get the parent ID if there was one $sql3 = "SELECT parent_id FROM ".TABLE_CATEGORIES." WHERE categories_id = " . $thecategory_id; $result3 = tep_db_query($sql3); $row3 = tep_db_fetch_array($result3); $theparent_id = $row3['parent_id']; if ($theparent_id != ''){ // there was a parent ID, lets set thecategoryid to get the next level $thecategory_id = $theparent_id; } else { // we have found the top level category for this item, $thecategory_id = false; } //$fullcategory .= " > " . $row2['categories_name']; $fullcategory = $row2['categories_name'] . " > " . $fullcategory; } else { $temprow['v_categories_name_' . $categorylevel] = ''; $temprow['v_categories_image_' . $categorylevel] = ''; } } // now trim off the last ">" from the category stack $row['v_category_fullpath'] = substr($fullcategory,0,strlen($fullcategory)-3); // temprow has the old style low to high level categories. $newlevel = 1; // let's turn them into high to low level categories for( $categorylevel=EP_MAX_CATEGORIES; $categorylevel>0; $categorylevel--){ if ($temprow['v_categories_name_' . $categorylevel] != ''){ $row['v_categories_name_' . $newlevel] = $temprow['v_categories_name_' . $categorylevel]; $row['v_categories_image_' . $newlevel] = $temprow['v_categories_image_' . $categorylevel]; $newlevel++; } } // if the filelayout says we need a manufacturers name, get it if (isset($filelayout['v_manufacturers_name'])){ if ($row['v_manufacturers_id'] != ''){ $sql2 = "SELECT manufacturers_name FROM ".TABLE_MANUFACTURERS." WHERE manufacturers_id = " . $row['v_manufacturers_id'] ; $result2 = tep_db_query($sql2); $row2 = tep_db_fetch_array($result2); $row['v_manufacturers_name'] = $row2['manufacturers_name']; } } // If you have other modules that need to be available, put them here // VJ product attribs begin if (isset($filelayout['v_attribute_options_id_1'])){ $attribute_options_count = 1; foreach ($attribute_options_array as $attribute_options) { $row['v_attribute_options_id_' . $attribute_options_count] = $attribute_options['products_options_id']; for ($i=0, $n=sizeof($languages); $i<$n; $i++) { $lid = $languages[$i]['id']; $attribute_options_languages_query = "select products_options_name from " . TABLE_PRODUCTS_OPTIONS . " where products_options_id = '" . (int)$attribute_options['products_options_id'] . "' and language_id = '" . (int)$lid . "'"; $attribute_options_languages_values = tep_db_query($attribute_options_languages_query); $attribute_options_languages = tep_db_fetch_array($attribute_options_languages_values); $row['v_attribute_options_name_' . $attribute_options_count . '_' . $lid] = $attribute_options_languages['products_options_name']; } $attribute_values_query = "select products_options_values_id from " . TABLE_PRODUCTS_OPTIONS_VALUES_TO_PRODUCTS_OPTIONS . " where products_options_id = '" . (int)$attribute_options['products_options_id'] . "' order by products_options_values_id"; $attribute_values_values = tep_db_query($attribute_values_query); $attribute_values_count = 1; while ($attribute_values = tep_db_fetch_array($attribute_values_values)) { $row['v_attribute_values_id_' . $attribute_options_count . '_' . $attribute_values_count] = $attribute_values['products_options_values_id']; $attribute_values_price_query = "select products_attributes_id, options_values_price, price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES . " where products_id = '" . (int)$row['v_products_id'] . "' and options_id = '" . (int)$attribute_options['products_options_id'] . "' and options_values_id = '" . (int)$attribute_values['products_options_values_id'] . "'"; $attribute_values_price_values = tep_db_query($attribute_values_price_query); $attribute_values_price = tep_db_fetch_array($attribute_values_price_values); $row['v_attribute_values_price_' . $attribute_options_count . '_' . $attribute_values_count] = $attribute_values_price['price_prefix'] . $attribute_values_price['options_values_price']; // systemsmanager begin Downloads $sql = "SELECT * FROM " . TABLE_PRODUCTS_ATTRIBUTES_DOWNLOAD . " WHERE products_attributes_id='" . $attribute_values_price['products_attributes_id'] . "'"; /* if ($row['v_products_id']==18) { // echo "<br>=$sql=<br>"; //print_r($filelayout); } */ $qry = tep_db_query($sql); if (tep_db_num_rows($qry) > 0) { $attrib = tep_db_fetch_array($qry); if ((int)$attrib['products_attributes_filegroup_id'] > 0) { $aux = (int)$attrib['products_attributes_filegroup_id']; //$row['v_attribute_values_filegroup_' . $attribute_options_count . '_' . $attribute_values_count] = (int)$attrib['products_attributes_filegroup_id']; $group = tep_db_fetch_array(tep_db_query("SELECT download_group_name FROM " . TABLE_PRODUCTS_ATTRIBUTES_DOWNLOAD_GROUPS . " WHERE language_id=1 AND download_group_id=" . (int)$attrib['products_attributes_filegroup_id'])); $aux .= "{}" . $group['download_group_name']; $sql = "SELECT a.*, b.* FROM " . TABLE_PRODUCTS_ATTRIBUTES_DOWNLOAD_GROUPS_FILES . " a, " . TABLE_PRODUCTS_ATTRIBUTES_DOWNLOAD_GROUPS_TO_FILES . " b WHERE a.download_group_id=" . (int)$attrib['products_attributes_filegroup_id'] . " AND a.download_groups_file_id=b.download_groups_file_id AND b.language_id=1"; $q = tep_db_query($sql); if (tep_db_num_rows($q)) { while ($r = tep_db_fetch_array($q)) { $aux .= "{}" . $r['download_group_filename'] . "{}" . $r['download_group_file_description']; } } $row['v_attribute_values_filegroup_' . $attribute_options_count . '_' . $attribute_values_count] = $aux; } else { $row['v_attribute_values_download_' . $attribute_options_count . '_' . $attribute_values_count] = $attrib['products_attributes_filename']; } //print_r($row); } // systemsmanager end downloads //// attributes stock add start if ( EP_PRODUCTS_ATTRIBUTES_STOCK == true ) { $stock_attributes = $attribute_options['products_options_id'].'-'.$attribute_values['products_options_values_id']; $stock_quantity_query = tep_db_query("select products_stock_quantity from " . TABLE_PRODUCTS_STOCK . " where products_id = '" . (int)$row['v_products_id'] . "' and products_stock_attributes = '" . $stock_attributes . "'"); $stock_quantity = tep_db_fetch_array($stock_quantity_query); $row['v_attribute_values_stock_' . $attribute_options_count . '_' . $attribute_values_count] = $stock_quantity['products_stock_quantity']; } //// attributes stock add end for ($i=0, $n=sizeof($languages); $i<$n; $i++) { $lid = $languages[$i]['id']; $attribute_values_languages_query = "select products_options_values_name from " . TABLE_PRODUCTS_OPTIONS_VALUES . " where products_options_values_id = '" . (int)$attribute_values['products_options_values_id'] . "' and language_id = '" . (int)$lid . "'"; $attribute_values_languages_values = tep_db_query($attribute_values_languages_query); $attribute_values_languages = tep_db_fetch_array($attribute_values_languages_values); $row['v_attribute_values_name_' . $attribute_options_count . '_' . $attribute_values_count . '_' . $lid] = $attribute_values_languages['products_options_values_name']; } $attribute_values_count++; } $attribute_options_count++; } } // VJ product attribs end // this is for the separate price per customer module if (isset($filelayout['v_customer_price_1'])){ $sql2 = "SELECT customers_group_price, customers_group_id FROM ".TABLE_PRODUCTS_GROUPS." WHERE products_id = " . $row['v_products_id'] . " ORDER BY customers_group_id" ; $result2 = tep_db_query($sql2); $ll = 1; $row2 = tep_db_fetch_array($result2); while( $row2 ){ $row['v_customer_group_id_' . $ll] = $row2['customers_group_id']; $row['v_customer_price_' . $ll] = $row2['customers_group_price']; $row2 = tep_db_fetch_array($result2); $ll++; } } if ($dltype == 'froogle'){ // For froogle, we check the specials prices for any applicable specials, and use that price // by grabbing the specials id descending, we always get the most recently added special price // I'm checking status because I think you can turn off specials $sql2 = "SELECT specials_new_products_price FROM ".TABLE_SPECIALS." WHERE products_id = " . $row['v_products_id'] . " and status = 1 and expires_date < CURRENT_TIMESTAMP ORDER BY specials_id DESC" ; $result2 = tep_db_query($sql2); $ll = 1; $row2 = tep_db_fetch_array($result2); if( $row2 ){ // reset the products price to our special price if there is one for this product $row['v_products_price'] = $row2['specials_new_products_price']; } } //elari - //We check the value of tax class and title instead of the id //Then we add the tax to price if EP_PRICE_WITH_TAX is set to true $row_tax_multiplier = tep_get_tax_class_rate($row['v_tax_class_id']); $row['v_tax_class_title'] = tep_get_tax_class_title($row['v_tax_class_id']); $row['v_products_price'] = $row['v_products_price'] + (EP_PRICE_WITH_TAX == true ? round( ($row['v_products_price'] * $row_tax_multiplier / 100), EP_PRECISION) : 0); // Now set the status to a word the user specd in the config vars if ( $row['v_status'] == '1' ){ $row['v_status'] = EP_TEXT_ACTIVE; } else { $row['v_status'] = EP_TEXT_INACTIVE; } //print_r($row); // remove any bad things in the texts that could confuse EasyPopulate $therow = ''; foreach( $filelayout as $key => $value ){ //echo "The field was $key<br>"; $thetext = $row[$key]; // kill the carriage returns and tabs in the descriptions, they're killing me! if (EP_PRESERVE_TABS_CR_LF == false || $dltype == 'froogle') { $thetext = str_replace("\r",' ',$thetext); $thetext = str_replace("\n",' ',$thetext); $thetext = str_replace("\t",' ',$thetext); } if (EP_EXCEL_SAFE_OUTPUT == true && $dltype != 'froogle') { // use quoted values and escape the embedded quotes for excel safe output. $therow .= '"'.str_replace('"','""',$thetext).'"' . $ep_separator; } else { // and put the text into the output separated by $ep_separator defined above $therow .= $thetext . $ep_separator; } } // lop off the trailing separator, then append the end of row indicator $therow = substr($therow,0,strlen($therow)-1) . $endofrow; if ($download == 'activestream'){ echo $therow; } else { $filestring .= $therow; } // grab the next row from the db $row = tep_db_fetch_array($result); } // now either stream it to them or put it in the temp directory if ($download == 'activestream'){ die(); } elseif ($download == 'stream'){ //******************************* // STREAM FILE //******************************* header("Content-type: application/vnd.ms-excel"); header("Content-disposition: attachment; filename=$EXPORT_TIME" . ((EP_EXCEL_SAFE_OUTPUT == true)?".csv":".txt")); // Changed if using SSL, helps prevent program delay/timeout (add to backup.php also) // header("Pragma: no-cache"); if ($request_type== 'NONSSL'){ header("Pragma: no-cache"); } else { header("Pragma: "); } header("Expires: 0"); echo $filestring; die(); } elseif ($download == 'tempfile') { //******************************* // PUT FILE IN TEMP DIR //******************************* $tmpfname = EP_TEMP_DIRECTORY . "$EXPORT_TIME" . ((EP_EXCEL_SAFE_OUTPUT == true)?".csv":".txt"); //unlink($tmpfname); $fp = fopen( $tmpfname, "w+"); fwrite($fp, $filestring); fclose($fp); echo "You can get your file in the Tools/File Manager here: " . EP_TEMP_DIRECTORY . "EP" . $EXPORT_TIME . ((EP_EXCEL_SAFE_OUTPUT == true)?".csv":".txt"); die(); } } //******************************* //******************************* // S T A R T // PAGE DELIVERY //******************************* //******************************* ?> <!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 type="text/javascript"><!-- function switchForm( field ) { var d = document; var frm = field.form; var tbl = d.getElementById('customtable'); if(d.getElementById) { if(field.options[field.selectedIndex].text == 'Complete' || field.options[field.selectedIndex].text == 'Froogle') { tbl.style.backgroundColor='lightgrey'; for ( var index = 0; index < frm.elements.length; index++ ) { var oElement = frm.elements[ index ]; if ( oElement.type == "checkbox" ) { if ( oElement.checked ) { oElement.checked = false; } oElement.disabled = true; } } } else if(field.options[field.selectedIndex].text == 'Price/Qty' || field.options[field.selectedIndex].text == 'Categories' || field.options[field.selectedIndex].text == 'Attributes' ) { tbl.style.backgroundColor='lightgrey'; for ( var index = 0; index < frm.elements.length; index++ ) { var oElement = frm.elements[ index ]; if ( oElement.type == "checkbox" ) { if ( oElement.checked ) { oElement.checked = false; } if ( (oElement.name == 'epcust_price' || oElement.name == 'epcust_quantity') && field.options[field.selectedIndex].text == 'Price/Qty' ) { oElement.disabled = false; oElement.checked = true; } else if ( oElement.name == 'epcust_category' && field.options[field.selectedIndex].text == 'Categories' ) { oElement.disabled = false; oElement.checked = true; } else if ( oElement.name == 'epcust_attributes' && field.options[field.selectedIndex].text == 'Attributes' ) { oElement.disabled = false; oElement.checked = true; } else { oElement.disabled = true; } } } } else { tbl.style.backgroundColor='white'; for ( var index = 0; index < frm.elements.length; index++ ) { var oElement = frm.elements[ index ]; if ( oElement.type == "checkbox" ) { oElement.disabled = false; } } } } } //--></script> </head> <body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" bgcolor="#FFFFFF"> <?php require(DIR_WS_INCLUDES . 'header.php'); ?> <table border="0" width="100%" cellspacing="2" cellpadding="2"> <tr> <td width="<?php echo BOX_WIDTH; ?>" valign="top" height="27"> <table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="1" cellpadding="1" class="columnLeft"> <?php require(DIR_WS_INCLUDES . 'column_left.php');?> </table></td> <td class="pageHeading" valign="top"><?php echo "Easy Populate ".EP_CURRENT_VERSION." - Default Language : " . EP_DEFAULT_LANGUAGE_NAME . '(' . EP_DEFAULT_LANGUAGE_ID .')'; ?> <p class="smallText"><?php //******************************* //******************************* // UPLOAD AND INSERT FILE //******************************* //******************************* if (!empty($_POST['localfile']) or (isset($_FILES['usrfl']) && isset($_GET['split']) && $_GET['split']==0)) { if (isset($_FILES['usrfl'])){ // move the file to where we can work with it $file = tep_get_uploaded_file('usrfl'); if (is_uploaded_file($file['tmp_name'])) { tep_copy_uploaded_file($file, EP_TEMP_DIRECTORY); } echo "<p class=smallText>"; echo "File uploaded. <br>"; echo "Temporary filename: " . $file['tmp_name'] . "<br>"; echo "User filename: " . $file['name'] . "<br>"; echo "Size: " . $file['size'] . "<br>"; // get the entire file into an array $readed = file(EP_TEMP_DIRECTORY . $file['name']); } if (!empty($_POST['localfile'])){ // move the file to where we can work with it //$file = tep_get_uploaded_file('usrfl'); //$attribute_options_query = "select distinct products_options_id from " . TABLE_PRODUCTS_OPTIONS . " order by products_options_id"; //$attribute_options_values = tep_db_query($attribute_options_query); //$attribute_options_count = 1; //while ($attribute_options = tep_db_fetch_array($attribute_options_values)){ //if (is_uploaded_file($file['tmp_name'])) { // tep_copy_uploaded_file($file, EP_TEMP_DIRECTORY); //} echo "<p class=smallText>"; echo "Filename: " . $_POST['localfile'] . "<br>"; // get the entire file into an array $readed = file(EP_TEMP_DIRECTORY . $_POST['localfile']); } if (EP_EXCEL_SAFE_OUTPUT == true) { // do excel safe input unset($readed); // kill array setup with above code $readed = array(); // start a new one for excel_safe_output $fp = fopen(EP_TEMP_DIRECTORY . (isset($_FILES['usrfl'])?$file['name']:$_POST['localfile']),'r') or die('##Can not open file for reading. Script will terminate.<br />'); // open file $header_line = fgets($fp); if (strpos($header_line,',') !== false) { $ep_separator = ','; } if (strpos($header_line,';') !== false) { $ep_separator = ';'; } if (strpos($header_line,"\t") !== false) { $ep_separator = "\t"; } if (strpos($header_line,'~') !== false) { $ep_separator = '~'; } if (strpos($header_line,'-') !== false) { $ep_separator = '-'; } if (strpos($header_line,'*') !== false) { $ep_separator = '*'; } rewind($fp); while($line = fgetcsv($fp,32768,$ep_separator)) // read new line (max 32K bytes) { unset($line[(sizeof($line)-1)]); // remove EOREOR at the end of the array $readed[] = $line; // add to array we will process later } $theheaders_array = $readed[0]; // pull out header line fclose($fp); // close file } else { // do normal EP input // now we string the entire thing together in case there were carriage returns in the data $newreaded = ""; foreach ($readed as $read){ $newreaded .= $read; } // now newreaded has the entire file together without the carriage returns. // if for some reason excel put qoutes around our EOREOR, remove them then split into rows $newreaded = str_replace('"EOREOR"', 'EOREOR', $newreaded); $readed = explode( $ep_separator . 'EOREOR',$newreaded); // Now we'll populate the filelayout based on the header row. $theheaders_array = explode( $ep_separator, $readed[0] ); // explode the first row, it will be our filelayout } $lll = 0; $filelayout = array(); foreach( $theheaders_array as $header ){ $cleanheader = str_replace( '"', '', $header); // echo "Fileheader was $header<br><br><br>"; $filelayout[ $cleanheader ] = $lll++; // } unset($readed[0]); // we don't want to process the headers with the data // now we've got the array broken into parts by the expicit end-of-row marker. foreach ($readed as $tkey => $readed_row) { process_row($readed_row, $filelayout, $filelayout_count, $default_these, $ep_separator, $languages); // systemsmanager begin downloads reset($filelayout); foreach ($filelayout as $k => $v) { if ($k == 'v_products_model') { $prod = tep_db_fetch_array(tep_db_query("SELECT products_id FROM " . TABLE_PRODUCTS . " WHERE products_model='" . $readed_row[$v] . "'")); $prid = $prod['products_id']; } if (strpos($k, "_download_") > 0 && $readed_row[$v] != '') { list($option_id, $value_id) = sscanf($k, "v_attribute_values_download_%d_%d"); $attributes_clean_query = "select * from " . TABLE_PRODUCTS_ATTRIBUTES . " where products_id = '" . (int)$prid . "' and options_id = '" . (int)$option_id . "' and options_values_id = '" . $value_id . "'"; $q = tep_db_query($attributes_clean_query); $attrib_id = ''; if (tep_db_num_rows($q) > 0) { $r = tep_db_fetch_array($q); $attrib_id = $r['products_attributes_id']; tep_db_query("DELETE FROM " . TABLE_PRODUCTS_ATTRIBUTES_DOWNLOAD . " WHERE products_attributes_id = $attrib_id"); } else { $price = $readed_row[$filelayout['v_attribute_values_price_'.$option_id.'_'.$value_id]]; if (substr($price, 0, 1)=='-') $prefix = '-'; else $prefix = '+'; $price = 0 + $price; $price = abs($price); $sql_array = array( 'products_id' => $prid, 'options_id' => $option_id, 'options_values_id' => $value_id, 'options_values_price' => $price, 'price_prefix' => $prefix ); tep_db_perform(TABLE_PRODUCTS_ATTRIBUTES, $sql_array); $attrib_id = tep_db_insert_id(); } $sql_array = array( 'products_attributes_id' => $attrib_id, 'products_attributes_filename' => $readed_row[$v], 'products_attributes_maxdays' => DOWNLOAD_MAX_DAYS, 'products_attributes_maxcount' => DOWNLOAD_MAX_COUNT ); tep_db_perform(TABLE_PRODUCTS_ATTRIBUTES_DOWNLOAD, $sql_array); } if (strpos($k, "_filegroup_") > 0 && $readed_row[$v] != '') { list($option_id, $value_id) = sscanf($k, "v_attribute_values_filegroup_%d_%d"); $attributes_clean_query = "select * from " . TABLE_PRODUCTS_ATTRIBUTES . " where products_id = '" . (int)$prid . "' and options_id = '" . (int)$option_id . "' and options_values_id = '" . $value_id . "'"; $q = tep_db_query($attributes_clean_query); $attrib_id = ''; if (tep_db_num_rows($q) > 0) { $r = tep_db_fetch_array($q); $attrib_id = $r['products_attributes_id']; tep_db_query("DELETE FROM " . TABLE_PRODUCTS_ATTRIBUTES_DOWNLOAD . " WHERE products_attributes_id = $attrib_id"); } else { $price = $readed_row[$filelayout['v_attribute_values_price_'.$option_id.'_'.$value_id]]; if (substr($price, 0, 1)=='-') $prefix = '-'; else $prefix = '+'; $price = 0 + $price; $price = abs($price); $sql_array = array( 'products_id' => $prid, 'options_id' => $option_id, 'options_values_id' => $value_id, 'options_values_price' => $price, 'price_prefix' => $prefix ); tep_db_perform(TABLE_PRODUCTS_ATTRIBUTES, $sql_array); $attrib_id = tep_db_insert_id(); } $arr = explode("{}", $readed_row[$v]); $sql_array = array( 'products_attributes_id' => $attrib_id, 'products_attributes_filename' => 'Group_Files-' . (int)$arr[0], 'products_attributes_filegroup_id' => (int)$arr[0], 'products_attributes_maxdays' => DOWNLOAD_MAX_DAYS, 'products_attributes_maxcount' => DOWNLOAD_MAX_COUNT ); tep_db_perform(TABLE_PRODUCTS_ATTRIBUTES_DOWNLOAD, $sql_array); tep_db_query("DELETE FROM " . TABLE_PRODUCTS_ATTRIBUTES_DOWNLOAD_GROUPS . " WHERE download_group_id=" . $arr[0]); tep_db_query("DELETE FROM " . TABLE_PRODUCTS_ATTRIBUTES_DOWNLOAD_GROUPS_FILES . " WHERE download_group_id=" . $arr[0]); $sql_array = array( 'download_group_id' => $arr[0], 'download_group_name' => $arr[1], 'language_id' => 1 ); tep_db_perform(TABLE_PRODUCTS_ATTRIBUTES_DOWNLOAD_GROUPS, $sql_array); for ($z=2; $z < count($arr)-1; $z++) { $sql_array = array( 'download_group_id' => $arr[0], 'download_group_filename' => $arr[$z] ); tep_db_perform(TABLE_PRODUCTS_ATTRIBUTES_DOWNLOAD_GROUPS_FILES, $sql_array); $id = tep_db_insert_id(); $sql_array = array( 'download_groups_file_id' => $id, 'language_id' => 1, 'download_group_file_description' => $arr[$z+1] ); tep_db_perform(TABLE_PRODUCTS_ATTRIBUTES_DOWNLOAD_GROUPS_TO_FILES, $sql_array); } } }
  7. This is based on the easy populate 2.76f-MS2 for file downloads to work I did not do this work but hired some one to make the modifications for me. I haven't done a compare on the EP_v2_76f_r1_MS2 for the differnces My shop I use download products with super download shop I was upgradeing an older version of MS2 to the latest and needed a way for the downloads to work instead of having to add them all in by hand. Super Download Shop can be found here http://www.oscommerce.com/community/contributions,4868/ below is the file easypopulate.php continued in next post
  8. asiabound

    Accept eCheck Payments v2.0

    I found the problem i had to add this before the code for it to [/code] <?php { } ?>
  9. asiabound

    Accept eCheck Payments v2.0

    i have a heavy modified orders.php and trying to get the echeck mod installed and having problems with the following code <?php // START - Added for eCheck Payment into database } elseif (tep_not_null($order->info['checknumber']) || tep_not_null($order->info['accountnumber']) || tep_not_null($order->info['routingnumber'])) { // Added this in v2.1 to query the order total amount - Thanks CatDadRick! $order_amt_query= tep_db_query("select text from orders_total where orders_id = '" . (int)$oID . "' and title like '" . "<b>Total:</b>" . "'"); $order_amt= tep_db_fetch_array($order_amt_query); $check_amt= $order_amt['text']; ?> </table></TD> </tr> <tr> <td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td> </tr> <tr> <TD COLSPAN="2" ALIGN="left"> <TABLE BORDER="1" CELLSPACING="0" CELLPADDING="2" BORDERCOLOR="#94621F" BGCOLOR="#F1DEB6"> <TR> <TD WIDTH="100%"> <TABLE WIDTH="600" BORDER="1" CELLSPACING="0" CELLPADDING="0" BORDERCOLOR="#94621F"> <TR> <TD WIDTH="100%"> <TABLE WIDTH="100%" BORDER="0"> <TR> <TD WIDTH="220" ALIGN="left"><span class="smalltext"><?php echo $order->info['accountholder']; ?></span></TD> <TD WIDTH="40"> </TD> <TD ALIGN="left" colspan="2"><span class="smalltext"><?php echo $order->info['bank']; ?></span></TD> <TD ALIGN="right"><span class="smalltext"><STRONG><?php echo $order->info['checknumber']; ?></STRONG> </span></TD> </TR> <TR> <TD ALIGN="left"><span class="smalltext"><?php echo $order->info['address']; ?></span></TD> <TD> </TD> <TD ALIGN="left" colspan="2"><span class="smalltext"><?php echo $order->info['bankcity']; ?></span></TD> <TD> </TD> </TR> <TR> <TD ALIGN="left"><span class="smalltext"><?php echo $order->info['address2']; ?></span></TD> <TD> </TD> <TD ALIGN="left" colspan="2"><span class="smalltext"><?php echo $order->info['bankphone']; ?></span></TD> <TD ALIGN="right"></TD> </TR> <TR> <TD ALIGN="left"><span class="smalltext"><?php echo $order->info['phone']; ?></span></TD> <TD> </TD> <TD ALIGN="left" colspan="2"> </TD> <TD ALIGN="right"></TD> </TR> <TR> <TD HEIGHT="10" COLSPAN="5"> </TD> </TR> <TR> <TD colspan="5"> <TABLE BORDER="0" WIDTH="100%"> <TR> <TD WIDTH="65" ALIGN="left" VALIGN="top"><span class="smalltext"><STRONG><small><small><?php echo MODULE_PAYMENT_ECHECK_TEXT_PAY_TO; ?></small></small></STRONG></span></TD> <TD ALIGN="left" VALIGN="bottom"><span class="smalltext"><?php echo STORE_NAME; ?></span></TD> <TD WIDTH="70" ALIGN="left" VALIGN="bottom"><span class="smalltext"><?php echo $check_amt; ?></span></TD> </TR> </TABLE> <TABLE WIDTH="100%" BORDER="0"> <TR> <TD HEIGHT="1" BGCOLOR="#000000"></TD> <TD WIDTH="5"></TD> <TD WIDTH="70" BGCOLOR="#000000"></TD> </TR> </TABLE> </TD> </TR> <TR> <TD HEIGHT="30" COLSPAN="5"> </TD> </TR> <TR> <TD WIDTH="220" ALIGN="left"><span class="smalltext"><STRONG><?php echo MODULE_PAYMENT_ECHECK_TEXT_MEMO; ?></STRONG><U> Order #<?php echo $oID; ?> </U></span></TD> <TD WIDTH="40"> </TD> <TD> </TD> <TD ALIGN="right" colspan="2"><span class="smalltext"><small><small>No Signature Needed </small></small><BR><STRONG>Signature:</STRONG> <small><U> Authorized by E-mail </U></small></span></TD> </TR> <TR> <TD HEIGHT="9" COLSPAN="5"> </TD> </TR> <TR> <TD ALIGN="right"> <FONT FACE="MICR E13B" SIZE="2">A<?php echo $order->info['routingnumber']; ?>A</FONT></TD> <TD COLSPAN="2" ALIGN="left"> <FONT FACE="MICR E13B" SIZE="2"><?php echo $order->info['accountnumber']; ?>C</FONT></TD> <TD ALIGN="left" colspan="2"><FONT FACE="MICR E13B" SIZE="2"><?php echo $order->info['checknumber']; ?></FONT></TD> </TR> </TABLE> </TD> </TR> </TABLE> </TD> </TR> </TABLE> </td> </tr> <?php } // END - Added for eCheck Payment into database ?> here is my orders.php file i keep getting parse errors and cant seem to find the problem <?php /* $Id: orders.php,v 1.112 2003/06/29 22:50:52 hpdl Exp $ 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 . "' order by orders_status_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); // BOF: WebMakers.com Added: Downloads Controller // always update date and time on order_status // original if ( ($check_status['orders_status'] != $status) || tep_not_null($comments)) { if ( ($check_status['orders_status'] != $status) || $comments != '' || ($status ==DOWNLOADS_ORDERS_STATUS_UPDATED_VALUE) ) { tep_db_query("update " . TABLE_ORDERS . " set orders_status = '" . tep_db_input($status) . "', last_modified = now() where orders_id = '" . (int)$oID . "'"); $check_status_query2 = tep_db_query("select customers_name, customers_email_address, orders_status, date_purchased from " . TABLE_ORDERS . " where orders_id = '" . (int)$oID . "'"); $check_status2 = tep_db_fetch_array($check_status_query2); if ( $check_status2['orders_status']==DOWNLOADS_ORDERS_STATUS_UPDATED_VALUE ) { tep_db_query("update " . TABLE_ORDERS_PRODUCTS_DOWNLOAD . " set download_maxdays = '" . tep_get_configuration_key_value('DOWNLOAD_MAX_DAYS') . "', download_count = '" . tep_get_configuration_key_value('DOWNLOAD_MAX_COUNT') . "' where orders_id = '" . (int)$oID . "'"); } // EOF: WebMakers.com Added: Downloads Controller $customer_notified = '0'; if (isset($HTTP_POST_VARS['notify']) && ($HTTP_POST_VARS['notify'] == 'on')) { $notify_comments = ''; // BOF: WebMakers.com Added: Downloads Controller - Only tell of comments if there are comments if (isset($HTTP_POST_VARS['notify_comments']) && ($HTTP_POST_VARS['notify_comments'] == 'on')) { $notify_comments = sprintf(EMAIL_TEXT_COMMENTS_UPDATE, $comments) . "\n\n"; } // EOF: WebMakers.com Added: Downloads Controller $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'); } } // BOF: WebMakers.com Added: Additional info for Orders // Look up things in orders $the_extra_query= tep_db_query("select * from " . TABLE_ORDERS . " where orders_id = '" . (int)$oID . "'"); $the_extra= tep_db_fetch_array($the_extra_query); $the_customers_id= $the_extra['customers_id']; // Look up things in customers $the_extra_query= tep_db_query("select * from " . TABLE_CUSTOMERS . " where customers_id = '" . $the_customers_id . "'"); $the_extra= tep_db_fetch_array($the_extra_query); $the_customers_fax= $the_extra['customers_fax']; // EOF: WebMakers.com Added: Additional info for Orders 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"> </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> <?php // BOF: WebMakers.com Added: Downloads Controller - Extra order info ?> <tr> <td class="main"><b><?php echo 'FAX #:'; ?></b></td> <td class="main"><?php echo $the_customers_fax; ?></td> </tr> <?php // EOF: WebMakers.com Added: Downloads Controller ?> <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"> <?php // BOF: WebMakers.com Added: Show Order Info ?> <!-- add Order # // --> <tr> <td class="main"><b>Order # </b></td> <td class="main"><?php echo tep_db_input($oID); ?></td> </tr> <!-- add date/time // --> <tr> <td class="main"><b>Order Date & Time</b></td> <td class="main"><?php echo tep_datetime_short($order->info['date_purchased']); ?></td> </tr> <?php // EOF: WebMakers.com Added: Show Order Info ?> <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> </table></TD> </tr> <?php } ?> <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"><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, $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']) * $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 = '" . (int)$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_EDIT, 'oID=' . $HTTP_GET_VARS['oID']) . '" TARGET="_blank">' . tep_image_button('button_edit.gif', IMAGE_EDIT) . '</a> <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> </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> </form></tr> </table></td> </tr> </table></td> </tr> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr class="dataTableHeadingRow"> <?php switch ($listing) { case "orders": $order = "o.orders_id"; break; case "orders": $order = "o.orders_id DESC"; break; case "customers": $order = "o.customers_name, o.orders_id DESC"; break; case "customers-desc": $order = "o.customers_name DESC, o.orders_id DESC"; break; case "order_total": $order = "ot.value"; break; case "order_total-desc": $order = "ot.value DESC"; break; case "date_purchased": $order = "o.date_purchased, o.customers_name"; break; case "date_purchased-desc": $order = "o.date_purchased DESC, o.customers_name"; break; case "order_status": $order = "s.orders_status_id, o.customers_name"; break; case "order_status-desc": $order = "s.orders_status_id DESC, o.customers_name"; break; default: $order = "o.orders_id DESC, o.customers_name"; } ?> <td class="dataTableHeadingContent" align="center"> <table border="0" cellspacing="0" cellpadding="0"> <tr> <td rowspan="1" align="center" class="dataTableHeadingContent"> <?php echo TABLE_HEADING_ORDERS; ?> </td> <td align="right" valign="bottom"> <a href="<?php echo "$PHP_SELF?listing=orders"; ?>"><?php echo tep_image_button('ic_up.gif', 'Sort ' . TABLE_HEADING_ORDERS . ' Ascending', 'hspace="3"'); ?></a><br><a href="<?php echo "$PHP_SELF?listing=orders-desc"; ?>"><?php echo tep_image_button('ic_down.gif', 'Sort ' . TABLE_HEADING_ORDERS . ' Descending', 'hspace="3"'); ?></a> </td> <tr> </table> </td> <td class="dataTableHeadingContent" align="center"> <table border="0" cellspacing="0" cellpadding="0"> <tr> <td rowspan="1" align="left" class="dataTableHeadingContent"> <?php echo TABLE_HEADING_CUSTOMERS; ?> </td> <td align="right" valign="bottom"> <a href="<?php echo "$PHP_SELF?listing=customers"; ?>"><?php echo tep_image_button('ic_up.gif', 'Sort ' . TABLE_HEADING_CUSTOMERS . ' Ascending', 'hspace="3"'); ?></a><br><a href="<?php echo "$PHP_SELF?listing=customers-desc"; ?>"><?php echo tep_image_button('ic_down.gif', 'Sort ' . TABLE_HEADING_CUSTOMERS . ' Descending', 'hspace="3"'); ?></a> </td> <tr> </table> </td> <td class="dataTableHeadingContent" align="center"> <table border="0" cellspacing="0" cellpadding="0"> <tr> <td rowspan="1" align="right" class="dataTableHeadingContent"> <?php echo TABLE_HEADING_ORDER_TOTAL; ?> </td> <td align="right" valign="bottom"> <a href="<?php echo "$PHP_SELF?listing=order_total"; ?>"><?php echo tep_image_button('ic_up.gif', 'Sort ' . TABLE_HEADING_ORDER_TOTAL . ' Ascending', 'hspace="3"'); ?></a><br><a href="<?php echo "$PHP_SELF?listing=order_total-desc"; ?>"><?php echo tep_image_button('ic_down.gif', 'Sort ' . TABLE_HEADING_ORDER_TOTAL . ' Descending', 'hspace="3"'); ?></a> </td> <tr> </table> </td> <td class="dataTableHeadingContent" align="center"> <table border="0" cellspacing="0" cellpadding="0"> <tr> <td rowspan="1" align="center" class="dataTableHeadingContent"> <?php echo TABLE_HEADING_DATE_PURCHASED; ?> </td> <td align="right" valign="bottom"> <a href="<?php echo "$PHP_SELF?listing=date_purchased"; ?>"><?php echo tep_image_button('ic_up.gif', 'Sort ' . TABLE_HEADING_DATE_PURCHASED . ' Ascending', 'hspace="3"'); ?></a><br><a href="<?php echo "$PHP_SELF?listing=date_purchased-desc"; ?>"><?php echo tep_image_button('ic_down.gif', 'Sort ' . TABLE_HEADING_DATE_PURCHASED . ' Descending', 'hspace="3"'); ?></a> </td> <tr> </table> </td> <td class="dataTableHeadingContent" align="center"> <table border="0" cellspacing="0" cellpadding="0"> <tr> <td rowspan="1" align="left" class="dataTableHeadingContent"> <?php echo TABLE_HEADING_STATUS; ?> </td> <td align="right" valign="bottom"> <a href="<?php echo "$PHP_SELF?listing=order_status"; ?>"><?php echo tep_image_button('ic_up.gif', 'Sort ' . TABLE_HEADING_STATUS . ' Ascending', 'hspace="3"'); ?></a><br><a href="<?php echo "$PHP_SELF?listing=order_status-desc"; ?>"><?php echo tep_image_button('ic_down.gif', 'Sort ' . TABLE_HEADING_STATUS . ' Descending', 'hspace="3"'); ?></a> </td> <tr> </table> </td> <td class="dataTableHeadingContent" align="right"> <?php echo TABLE_HEADING_ACTION; ?> </td> <?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, s.orders_status_id, ot.value, 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 $order"; } elseif (isset($HTTP_GET_VARS['status'])) { $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, s.orders_status_id, ot.value, ot.text as order_total from " . TABLE_ORDERS . " o left join " . TABLE_ORDERS_TOTAL
  10. asiabound

    [Contribution] Infobox Skin Manager

    site thema is another contib for stylesheets so you can switch to differnt ones that you make the download is here http://www.oscommerce.com/community/contributions,456 and the forum topic is here http://forums.oscommerce.com/index.php?showtopic=26854
  11. asiabound

    [Contribution] Infobox Skin Manager

    nicely done looking into intergrating with site thema for stylesheets
  12. asiabound

    Live Support Fix

    do you have a url i look at for the admin and catalog
  13. asiabound

    Live Support Fix

    chmod the sound files to 755 or 777 and that should work
×