Thank you for using the Cube Cart Converter.


This is not an Offical Oscommerce Script.

This is the Work of the Development team from Osprey Business Services
It is Released Free of Charge and with out any warranty or condition of support under the GNU GPL lic. see www.gnu.org for more info
Your Conversion will start Below automatically, if you recieve errors please check your configuration in the top lines of the Script.
Enjoy!!!!
Michael
Osprey Business Services
Project Development Manager

Connected successfully

'; } //here we select the CUBE cart customer database mysql_select_db($dname, $connect) or die ("Unable to select database"); //here we check for ver r_start if (isset($_GET['r_start'])) { $start = $_GET['r_start']; }else{ $start = $record_start; } // Function from Zend Code Libary function build_insert( $dbname, $table_name, $array ) { $res = mysql_query("DESCRIBE ".$dbname.".".$table_name); $q = "INSERT INTO ".$dbname.".".$table_name." ("; $q2 = "("; while( $row = mysql_fetch_array($res) ) { $q .= $row['Field'] . ","; $q2 .= "'" . $array["{$row['Field']}"] . "'" . ","; } $q = substr($q, 0, -1); $q .= ")"; $q .= " VALUES "; $q2 = substr($q2, 0, -1); $q2 .= ")"; $q .= $q2; return $q; } /* Note ==== $q is the query returned. $q2 is temporary, used for building the values list. $array must be associative, with the index key and the table field sharing the same name. ex: table MyTable has three fields, field1, field2, field3 $array must be structured this way : array( 'field1' => 'val1', 'field2' => 'val2', 'field3' => 'val3' ); Change Log ========== 1.1 added single quotes to value list. */ //create a task switch for the 3 table conversions switch ($do){ case 'address': //Start Address Conversion //here we start the queury for CUBE Cart Customers Table $numrows_query = mysql_query('SELECT * FROM '. $cc_cus .''); $cc_query = mysql_query('SELECT * FROM '. $cc_cus .' Limit ' . $start.',' . $parse_limit . ''); $numrows = mysql_num_rows($numrows_query); while ($row = mysql_fetch_array($cc_query)){ //Build Data Conversion Array $data_array = array('address_book_id' => $row['customer_id'], 'customers_id' => $row['customer_id'], 'entry_gender' => '', 'entry_company' => '', 'entry_firstname' => $row['name'], 'entry_lastname' => '', 'entry_street_address' => $row['add_1'], 'entry_suburb' => $row['add_2'], 'entry_postcode' => $row['postode'], 'entry_city' => $row['town'], 'entry_state' => $row['county'], 'entry_country_id' => $contry_id, 'entry_Zone_id' => '' ); //build the Query $query = build_insert( $dname , $osc_address, $data_array ); //Run the Query if ($debug = 1){ mysql_query($query); } // Print the Query echo ('
'); echo $query; echo('
'); //print a line break echo ('


'); } //Start Next Query and Check Proceedures $start_math = $r_start + $parse_limit ; $check_math = $numrows - $start_math; if ($debug = 1){ echo ('

Check Math=' . $check_math . ' This is For Debugging Use.'); } if ($check_math > 0 ){ //Print out Links for Next Item echo ('

Run Next Starting with Record' . $start_math . '' ); }else{ echo ('