Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Script co copy data from 2.2 to 2.3.4 database


piernas

Recommended Posts

I've written a script to migrate data from my old shop to a new one. I'm using a modified 2.2RC1 database with some custom fields and More Pics addon, so I've added a way to create new fields in the 2.3.4 database (search for add_custom_field in the code) and adding extra images to the product_images table (just uncomment // mopics_import(); line).

 

You will need to fill data from your database servers at the top of the file. It takes 20 seconds to load on my databases, so maybe if the database to translate is too big it won't work.

 

Obviously, BACKUP before using. I hope it will be useful for someone. If you want to convert to a proper addon please feel free to modify it an upload again.

<?php
    error_reporting(E_ALL);
    ini_set("display_errors", 1); 

// PLEASE FILL IN DATA FROM YOUR OWN DATABASES
	
	define('SOURCE_SERVER', 'localhost');
	define('SOURCE_USER', 'user1');
	define('SOURCE_PASS', 'pass1');
	define('SOURCE_DB', 'source_db');
	define('DESTINATION_SERVER', 'localhost');
	define('DESTINATION_USER', 'user2');
	define('DESTINATION_PASS', 'pass2');
	define('DESTINATION_DB', 'dest_db');

$time_start = microtime(true);
ini_set('max_execution_time', 1000);

echo <<<EOD
<!DOCTYPE html>
<html>
<head>
<title>Oscommerce data importer</title>
</head>

<body>
<h1>TABLE import for Oscommerce 2.2 - > 2.3.4</h1>
<p>You will have to manually clean sec_directory_whitelist table for removing sample data. </p>
<ul>
EOD;

// ****** Tuncate tables ******
// Tables with sample data:
do_empty_table ("categories");
do_empty_table ("categories_description");
do_empty_table ("manufacturers");
do_empty_table ("manufacturers_info");
do_empty_table ("products");
do_empty_table ("products_attributes");
do_empty_table ("products_attributes_download");
do_empty_table ("products_description");
do_empty_table ("products_images");
do_empty_table ("products_options");
do_empty_table ("products_options_values");
do_empty_table ("products_options_values_to_products_options");
do_empty_table ("products_to_categories");
do_empty_table ("reviews");
do_empty_table ("reviews_description");
do_empty_table ("specials");

// Countries, zones, taxes and languages.
// Comment these lines if you have not modified them on original setup
do_empty_table ("languages");  // custom
do_empty_table ("countries");
do_empty_table ("geo_zones");
do_empty_table ("tax_class");
do_empty_table ("tax_rates");
do_empty_table ("zones");
do_empty_table ("zones_to_geo_zones");

// These should be empty; we'll drop data for caution:
do_empty_table ("address_book");
do_empty_table ("cache");
do_empty_table ("customers");
do_empty_table ("customers_info");
do_empty_table ("products_notifications");
do_empty_table ("orders");
do_empty_table ("orders_products");
do_empty_table ("orders_products_attributes");
do_empty_table ("orders_status"); // custom
do_empty_table ("orders_status_history");
do_empty_table ("orders_total");

// Comment if we don't have custom data on original database, otherwise leave as is:
do_empty_table ("address_format");
do_empty_table ("orders_status");

echo "</ul>";

// EJEMPLO:
//  ** standard fields from oscommerce: **
//	$mytable_fields = array("dato1","dato2","dato3","dato4","dato5","dato6");
//
//  Put here extra fields to add. Put here your custom fields i.e. if you have an alias field on customers table:
//	$mytable_fields[]="customers_alias";
//	echo add_custom_field ("customers", "customers_alias", "varchar(30)");
//  [...]
//	echo migrate ("customers", $mytable_fields);

// TABLE CATEGORIAS
	$mytable_fields = array("categories_id","categories_image","parent_id","sort_order","date_added","last_modified");
	echo migrate ("categories", $mytable_fields);
	
// TABLE CATEGORIAS - DESCRIPCIONES
	$mytable_fields = array("categories_id","language_id","categories_name");
	echo migrate ("categories_description", $mytable_fields);

// TABLE FABRICANTES
	$mytable_fields = array("manufacturers_id","manufacturers_name","manufacturers_image","date_added","last_modified");
	echo migrate ("manufacturers", $mytable_fields);

// TABLE FABRICANTES - INFORMACION
	$mytable_fields = array("manufacturers_id","languages_id","manufacturers_url","url_clicked","date_last_click");
	echo migrate ("manufacturers_info", $mytable_fields);

// TABLE PRODUCTOS
	$mytable_fields = array("products_id","products_quantity","products_model","products_image","products_price","products_date_added","products_last_modified","products_date_available","products_weight","products_status","products_tax_class_id","manufacturers_id","products_ordered");
	echo migrate ("products", $mytable_fields);

// TABLE PRODUCTOS - ATRIBUTOS
	$mytable_fields = array("products_attributes_id","products_id","options_id","options_values_id","options_values_price","price_prefix");
	echo migrate ("products_attributes", $mytable_fields);

// TABLE PRODUCTOS DE DESCARGA - ATRIBUTOS
	$mytable_fields = array("orders_products_download_id","orders_id","orders_products_id","orders_products_filename","download_maxdays","download_count");
	echo migrate ("orders_products_download", $mytable_fields);

// TABLE DESCRIPCION DE PRODUCTOS
	$mytable_fields = array("products_id","language_id","products_name","products_description","products_url","products_viewed");
	echo migrate ("products_description", $mytable_fields);

// TABLE NOTIFICACIONES DE PRODUCTOS
	$mytable_fields = array("products_id","customers_id","date_added");
	echo migrate ("products_notifications", $mytable_fields);

// TABLE OPCIONES DE PRODUCTOS
	$mytable_fields = array("products_options_id","language_id","products_options_name");
	echo migrate ("products_options", $mytable_fields);

// TABLE VALORES DE LAS OPCIONES DE PRODUCTOS
	$mytable_fields = array("products_options_values_id","language_id","products_options_values_name");
	echo migrate ("products_options_values", $mytable_fields);

// TABLE VALORES DE LAS OPCIONES A OPCIONES DE PRODUCTOS
	$mytable_fields = array("products_options_values_to_products_options_id","products_options_id","products_options_values_id");
	echo migrate ("products_options_values_to_products_options", $mytable_fields);	

//  TABLE PRODUCTOS A CATEGORIAS
	$mytable_fields = array("products_id","categories_id");
	echo migrate ("products_to_categories", $mytable_fields);

//  TABLE COMENTARIOS
	$mytable_fields = array("reviews_id","products_id","customers_id","customers_name","reviews_rating","date_added","last_modified","reviews_status","reviews_read");
	echo migrate ("reviews", $mytable_fields);

//  TABLE DESCRIPCIONES DE COMENTARIOS
	$mytable_fields = array("reviews_id","languages_id","reviews_text");
	echo migrate ("reviews_description", $mytable_fields);

//  TABLE OFERTAS ESPECIALES
	$mytable_fields = array("specials_id","products_id","specials_new_products_price","specials_date_added","specials_last_modified","expires_date","date_status_change","status");
	echo migrate ("specials", $mytable_fields);

// IDIOMAS,  PAISES, ZONAS E IMPUESTOS
//  TABLE IDIOMAS
	$mytable_fields = array("languages_id","name","code","image","directory","sort_order");
	echo migrate ("languages", $mytable_fields);	

//  TABLE PAISES
	$mytable_fields = array("countries_id","countries_name","countries_iso_code_2","countries_iso_code_3","address_format_id");
	echo migrate ("countries", $mytable_fields);	

//  TABLE GEOZONAS
	$mytable_fields = array("geo_zone_id","geo_zone_name","geo_zone_description","last_modified","date_added");
	echo migrate ("geo_zones", $mytable_fields);		

//  TABLE ZONAS
	$mytable_fields = array("zone_id","zone_country_id","zone_code","zone_name");
	echo migrate ("zones", $mytable_fields);		
	
//  TABLE ZONAS A GEOZONAS
	$mytable_fields = array("association_id","zone_country_id","zone_id","geo_zone_id","last_modified","date_added");
	echo migrate ("zones_to_geo_zones", $mytable_fields);
	
//  TABLE TIPOS DE IMPUESTOS
	$mytable_fields = array("tax_class_id","tax_class_title","tax_class_description","last_modified","date_added");
	echo migrate ("tax_class", $mytable_fields);
	
//  TABLE IMPUESTOS
	$mytable_fields = array("tax_rates_id","tax_zone_id","tax_class_id","tax_priority","tax_rate","tax_description","last_modified","date_added");
	echo migrate ("tax_rates", $mytable_fields);


// CLIENTES Y PEDIDOS
//  DIRECCIONES
	$mytable_fields = array("address_book_id","customers_id","entry_gender","entry_company","entry_firstname","entry_lastname","entry_street_address","entry_suburb","entry_postcode","entry_city","entry_state","entry_country_id","entry_zone_id");
	echo migrate ("address_book", $mytable_fields); 

//  FORMATOS DE DIRECCIONES
	$mytable_fields = array("address_format_id","address_format","address_summary");
	echo migrate ("address_format", $mytable_fields); 

// TABLE CLIENTES
	$mytable_fields = array("customers_id","customers_gender","customers_firstname","customers_lastname","customers_dob","customers_email_address","customers_default_address_id","customers_telephone","customers_fax","customers_password","customers_newsletter");
	// extra fields to add. Put here your custom fields:
	echo migrate ("customers", $mytable_fields);

// TABLE INFO DE CLIENTES
	$mytable_fields = array("customers_info_id","customers_info_date_of_last_logon","customers_info_number_of_logons","customers_info_date_account_created","customers_info_date_account_last_modified","global_product_notifications");
// Uncomment next two lines if you're importing from 2.3.2 onwards
//	$customers_info_fields[]="password_reset_key"; // 2.3.2 onwards
//	$customers_info_fields[]="password_reset_date"; // 2.3.2 onwards
	echo migrate ("customers_info", $mytable_fields);

//  NOTIFICACIONES
	$mytable_fields = array("products_id","customers_id","date_added");
	echo migrate ("products_notifications", $mytable_fields); 

//  PEDIDOS
	$mytable_fields = array("orders_id","customers_id","customers_name","customers_company","customers_street_address","customers_suburb","customers_city","customers_postcode","customers_state","customers_country","customers_telephone","customers_email_address","customers_address_format_id","delivery_name","delivery_company","delivery_street_address","delivery_suburb","delivery_city","delivery_postcode","delivery_state","delivery_country","delivery_address_format_id","billing_name","billing_company","billing_street_address","billing_suburb","billing_city","billing_postcode","billing_state","billing_country","billing_address_format_id","payment_method","cc_type","cc_owner","cc_number","cc_expires","last_modified","date_purchased","orders_status","orders_date_finished","currency","currency_value");
	echo migrate ("orders", $mytable_fields); 
	
//  PRODUCTOS DE UN PEDIDO
	$mytable_fields = array("orders_products_id","orders_id","products_id","products_model","products_name","products_price","final_price","products_tax","products_quantity");
	echo migrate ("orders_products", $mytable_fields); 
	
//  ATRIBUTOS DE PRODUCTOS DE UN PEDIDO
	$mytable_fields = array("orders_products_attributes_id","orders_id","orders_products_id","products_options","products_options_values","options_values_price","price_prefix");
	echo migrate ("orders_products_attributes", $mytable_fields);
	
//  HISTORIAL DE ESTADOS DE UN PEDIDO
	$mytable_fields = array("orders_status_history_id","orders_id","orders_status_id","date_added","customer_notified","comments");
	echo migrate ("orders_status_history", $mytable_fields); 

//  TOTALES DE UN PEDIDO
	$mytable_fields = array("orders_total_id","orders_id","title","text","value","class","sort_order");
	echo migrate ("orders_total", $mytable_fields); 

//  RELACION DE ESTADOS DE UN PEDIDO
	$mytable_fields = array("orders_status_id","language_id","orders_status_name","public_flag","downloads_flag");
	echo migrate ("orders_status", $mytable_fields);

// FOR More pics users:
// mopics_import();

	$time_end = microtime(true);
	$time = $time_end - $time_start;

echo "<br>Execution time: $time seconds.";


function migrate ($TABLE, $campos) {

	$sql_insert  = "INSERT INTO " . $TABLE;
	$sql_insert .= " (".implode(", ", $campos).") ";
	
 // Abre dos conexiones a las bases de datos de origen y destino
	$conn = new mysqli(DESTINATION_SERVER, DESTINATION_USER, DESTINATION_PASS, DESTINATION_DB); // destino
//	$conn->set_charset("utf8");
	$conn2 = new mysqli(SOURCE_SERVER, SOURCE_USER, SOURCE_PASS, SOURCE_DB); // origen
//	mysqli_set_charset ($conn2,"utf8");
//	echo "charset: " . mysqli_character_set_name($conn2) . ": ";

	$customers_query = "SELECT * from " . $TABLE;
	$origen = $conn2->query($customers_query);

	$contador =0;

	if ($origen->num_rows > 0) {

		while($row = $origen->fetch_assoc()) {
		$sql="";
		$sql_values ="";
		$sql_values .= " VALUES (";

		foreach ($campos as $valor) {
//			$valor = mb_convert_encoding($valor, "ISO-8859-1", "UTF-8");
			$sql_values .= "'" . addslashes ($row[strval($valor)]). "'," ;
		}

		$sql_values = rtrim($sql_values, ',');
		$sql_values .= ")";
		$sql = $sql_insert . $sql_values;

		if ($conn->query($sql) === TRUE) {
			$contador++;
		} else {
			echo "<font color='red'><b>Error: " . $conn->error . "<br>";
		}
	}
	echo '<b>TABLE: <font color="blue">' . $TABLE . ': </font>' .  $contador . ' rows copied<br>' . "\n";
	}
	$conn->close();
	$conn2->close();
}
function do_empty_table ($TABLE) {
	$conn = new mysqli(DESTINATION_SERVER, DESTINATION_USER, DESTINATION_PASS, DESTINATION_DB); // destino
	$sql = "TRUNCATE TABLE " . $TABLE;
	$result = $conn -> query($sql);
	$conn->close();
	echo "<li>TRUNCATE TABLE " . $TABLE . "</li>" . "\n";
}

function add_custom_field ($TABLE, $campo, $valores) {
	$conn = new mysqli(DESTINATION_SERVER, DESTINATION_USER, DESTINATION_PASS, DESTINATION_DB); // destino
	$sql1 = "ALTER TABLE ". $TABLE . " ADD " . $campo . " " . $valores;
	if ($conn->query($sql1) === TRUE) {
		echo '<b>' . $campo . " agregado a la TABLA " . $TABLE ."</b><br>";
	} else {
		echo '<font color="red"><b>Error:</b></font> ' . $conn->error . ' on table ' . $TABLE ."<br>";
	}
	$conn->close();
}

function mopics_import () {
// Lee las imágenes de cada producto
	$conn = new mysqli(DESTINATION_SERVER, DESTINATION_USER, DESTINATION_PASS, DESTINATION_DB); // destino
	$conn2 = new mysqli(SOURCE_SERVER, SOURCE_USER, SOURCE_PASS, SOURCE_DB); // origen

	$products_query ="select products_id, products_image, products_subimage1, products_subimage2, products_subimage3, products_subimage4, products_subimage5, products_subimage6 from products order by products_id";
	
	$origen = $conn2->query($products_query);
	
	$contador =0;
	if ($origen->num_rows > 0) {
		while ($prod = $origen->fetch_assoc()) {

		// lee imagen principal -> 1
			$insert = "INSERT INTO products_images
					   SET products_id = '".$prod['products_id']."',
					   image = '".$prod['products_image']."',
					   sort_order = 1";
			if ($conn->query($insert) === TRUE) {
				$contador++;
			} else {
				echo "<font color='red'><b>Error: " . $conn->error . "<br>";
			}

			// lee imagenes 1 a 6 -> 2 a 7
			for ($i = 1; $i <= 6; $i++) {
			if ($prod['products_subimage'.$i]) {
				$insert = "INSERT INTO products_images
						   SET products_id = '".$prod['products_id']."',
						   image = '".$prod['products_subimage'.$i]."',
						   sort_order = '".($i+1)."'";
						   
				if ($conn->query($insert) === TRUE) {
					$contador++;
					echo "<br><b>$contador:</b> products_id ".$prod['products_id'] . " - " . $prod['products_subimage'.$i]; 
				} else {
					echo "<font color='red'><b>Error: " . $conn->error . "<br>";
				}
				
			}
		}
	}
  }
	$conn->close();
	$conn2->close();
}
?>
Link to comment
Share on other sites

I'm not sure what your goals were in doing this, but did you consider using your hosting MySQL database system to copy over the old database to a new (copy), and then apply the various add-ons (SQL files) to migrate the database schema from 2.2RC1 to 2.3.4? You should check the SQL commands used, but I think they would preserve your new fields (which would have to be manually updated/converted to UTF-8, etc.).

 

If this DB transfer is something you're going to do frequently, a script might be good, but if it's a one-off job, you probably wasted a lot of effort.

Link to comment
Share on other sites

@@MrPhil Yes I've done a lot of times to test new versions, check an addon with a fresh install, replicate data on my local test server... especially last few months with all the bootrstap stuff coming out, so after a lot of manual migrations I made this script to save time; I hate repetitive work, lost an afternoon but I'm sure I will save much more than that.

 

Doing it manually is a pain (writing individual SQL commands for each table), also takes a lot of time and effort, and this script does the job in seconds. It also creates custom fields and adds secondary images for mopics contrib, that can be easily adapted for other V2.2 image addons.

 

I hope it will be useful for others, as I've seen a lot of questions on how to do this on the forums, and not everyone has the knowledge to use phpmyadmin. In fact I think a similar tool should be added to oscommerce install.

Link to comment
Share on other sites

I like the approach, :rose:

 

have not used it, but scanned through it and noticed little error in the customer_info section in the commented out lines as it is referencing the wrong (not generic) array

KEEP CALM AND CARRY ON

I do not use the responsive bootstrap version since i coded my responsive version earlier, but i have bought every 28d of code package to support burts effort and keep this forum alive (albeit more like on life support).

So if you are still here ? What are you waiting for ?!

 

Find the most frequent unique errors to fix:

grep "PHP" php_error_log.txt | sed "s/^.* PHP/PHP/g" |grep "line" |sort | uniq -c | sort -r > counterrors.txt

Link to comment
Share on other sites

Hi all,

 

I have just tried MySQL Workbrench for syncronizing old v2.2 database and my new installed and modded BS shop database.

 

I try to write a step by step help for everybody.

 

1. Install WorkBrench and MySQL server to you local machine

2. Download the old v2.2 shop mysql data schema without any data only the table create script into file named old.sql

3. Do the same with the new modded shop data sql script schema into new.sql

 

4. Import into workbrench as old schema from old.sql content

5. Import into workbrench as new schema from new.sql content

 

(I have a Local Instance Tab with wampmysqld64 text in workbrench and in left menu I selected Data/Import Restore)

 

6. After imports I made a refresh on the schema menu in the left window and after it on new schema right click and select Set As Default Schema

 

so we had the new as selected schema. Select Database menu on the top -> Reverse enginier and did a model and saved as new.mwb

 

7. Select agan from the left menu the old schema and set as Set As Default Schema with right click
(so we have to see old database as default schema and new model tabs in workbrench)

 

8. Select the Model Tab on the top! and select Database->Syncronize With Any Source..

 

9. Step forward on form wizzard.
  - On Select Database To Take Updates form select Source for Model Schema (old) and the Destination is Live Database Server (new)
  -
  - Select on the Schemata to be Syncronized form: check only new as Source Schema and select from the Override target schema to be syncronized with dropdown list the old -> and press Override Target button

 -

 -

at the end you will get the the table upgrade mysql script.

10. Save the upgrade script and do next

 

11. Dump the old and the new databases from live server into backup files. Save the old and the new codebase into your local machine.

 

12. migrate the old database under the the new shop or move the new shop to the live site.

13. run the upgrade script on the old database.

 

14. dump from new database the configuration and configuration_group table with full records and replace in the old with the new configs.
 

This is not as complicated as I thought.

 

 

 

 

+--------------------------------------------+
| Catalog Diff Report                        |
+--------------------------------------------+
Table `old`.`wirecard_checkout_page_transaction` was dropped
Table `old`.`visitor` was dropped
Table `old`.`subscribers_update` was dropped
Table `old`.`subscribers_infos` was dropped
Table `old`.`subscribers_default` was dropped
Table `old`.`subscribers` was dropped
Table `old`.`star_product` was dropped
Table `old`.`sitemap_exclude` was dropped
Table `old`.`search_queries` was dropped
Table `old`.`ratings` was dropped
Table `old`.`products_yearly_sales` was dropped
Table `old`.`products_xsell` was dropped
Table `old`.`products_text_attributes_enabled` was dropped
Table `old`.`products_text_attributes` was dropped
Table `old`.`pi_paymill_logging` was dropped
Table `old`.`pi_paymill_fastcheckout` was dropped
Table `old`.`orders_text_attributes` was dropped
Table `old`.`mm_templates` was dropped
Table `old`.`mm_responsemail_reset` was dropped
Table `old`.`mm_responsemail_backup` was dropped
Table `old`.`mm_responsemail` was dropped
Table `old`.`mm_newsletters` was dropped
Table `old`.`mm_bulkmail` was dropped
Table `old`.`headertags_default` was dropped
Table `old`.`headertags` was dropped
Table `old`.`feedmachine` was dropped
Table `old`.`featured` was dropped
Table `old`.`extra_cat_info` was dropped
Table `old`.`edit_invoice` was dropped
Table `old`.`discount_codes` was dropped
Table `old`.`database_optimizer` was dropped
Table `old`.`customers_to_discount_codes` was dropped
Table `old`.`customers_temp` was dropped
Table `old`.`customers_searches` was dropped
Table `old`.`customers_basket_text_attributes` was dropped
Table `old`.`counter_history` was dropped
Table `old`.`counter` was dropped
Table `old`.`contest` was dropped
Table `old`.`cache` was dropped
Table `old`.`availability` was dropped
Table `old`.`admin_comments` was dropped
Table `old`.`action_recorder` was created
  columns:
  - id of type INT
  - module of type VARCHAR
  - user_id of type INT
  - user_name of type VARCHAR
  - identifier of type VARCHAR
  - success of type CHAR
  - date_added of type DATETIME
  __
  indices:
  - PRIMARY with columns: id
  - idx_action_recorder_module with columns: module
  - idx_action_recorder_user_id with columns: user_id
  - idx_action_recorder_identifier with columns: identifier
  - idx_action_recorder_date_added with columns: date_added
  __
  attributes:
  - engine: MyISAM
  - next auto increment: 106
  - default character set: utf8
  - default collate: utf8_unicode_ci
  __
Table `old`.`gallery` was created
  columns:
  - gallery_id of type INT
  - gallery_image of type VARCHAR
  - date_added of type DATETIME
  - last_modified of type DATETIME
  - gallery_status of type TINYINT
  - gallery_featured of type INT
  - sort_order of type INT
  __
  indices:
  - PRIMARY with columns: gallery_id
  __
  attributes:
  - engine: MyISAM
  - next auto increment: 2
  - default character set: utf8
  - default collate: utf8_general_ci
  __
Table `old`.`gallery_info` was created
  columns:
  - gallery_id of type INT
  - gallery_name of type VARCHAR
  - language_id of type INT
  __
  attributes:
  - engine: MyISAM
  - default character set: utf8
  - default collate: utf8_general_ci
  __
Table `old`.`mailbeez_notifications` was created
  columns:
  - id of type INT
  - title of type VARCHAR
  - notification_summary of type VARCHAR
  - notification of type TEXT
  - link of type TEXT
  - ref of type INT
  - iteration of type INT
  - module of type VARCHAR
  - customers_id of type INT
  - channel_id of type INT
  - severity of type INT
  - status of type INT
  - date_added of type DATETIME
  - last_modified of type DATETIME
  - icon_style of type VARCHAR
  - link_type of type VARCHAR
  - panel_click_action of type VARCHAR
  - notification_only of type VARCHAR
  __
  indices:
  - PRIMARY with columns: id
  - ref with columns: ref, customers_id, iteration, module
  __
  attributes:
  - engine: MyISAM
  - next auto increment: 12
  - default character set: utf8
  - default collate: utf8_general_ci
  __
Table `old`.`oscom_app_paypal_log` was created
  columns:
  - id of type INT
  - customers_id of type INT
  - module of type VARCHAR
  - action of type VARCHAR
  - result of type TINYINT
  - server of type TINYINT
  - request of type TEXT
  - response of type TEXT
  - ip_address of type INT
  - date_added of type DATETIME
  __
  indices:
  - PRIMARY with columns: id
  - idx_oapl_module with columns: module
  __
  attributes:
  - engine: MyISAM
  - default character set: utf8
  - default collate: utf8_unicode_ci
  __
Table `old`.`products_images` was created
  columns:
  - id of type INT
  - products_id of type INT
  - image of type VARCHAR
  - htmlcontent of type TEXT
  - sort_order of type INT
  __
  indices:
  - PRIMARY with columns: id
  - products_images_prodid with columns: products_id
  __
  attributes:
  - engine: MyISAM
  - next auto increment: 13
  - default character set: utf8
  - default collate: utf8_unicode_ci
  __
Table `old`.`sec_directory_whitelist` was created
  columns:
  - id of type INT
  - directory of type VARCHAR
  __
  indices:
  - PRIMARY with columns: id
  __
  attributes:
  - engine: MyISAM
  - next auto increment: 14
  - default character set: utf8
  - default collate: utf8_unicode_ci
  __
Table `old`.`url_redirects` was created
  columns:
  - redirects_id of type INT
  - old_url of type VARCHAR
  - new_url of type VARCHAR
  - date_added of type DATETIME
  - latest_hit of type DATETIME
  - last_modified of type DATETIME
  - error_code of type CHAR
  - priority of type SMALLINT
  - counter of type INT
  - url_redirects_mode of type CHAR
  - url_redirects_status of type TINYINT
  __
  indices:
  - PRIMARY with columns: redirects_id
  - unique_url with columns: redirects_id, old_url
  __
  attributes:
  - engine: MyISAM
  - next auto increment: 24
  - default character set: latin1
  - default collate: latin1_swedish_ci
  __
Table `old`.`usu_cache` was created
  columns:
  - cache_name of type VARCHAR
  - cache_data of type MEDIUMTEXT
  - cache_date of type DATETIME
  __
  indices:
  - cache_name with columns: cache_name
  __
  attributes:
  - engine: MyISAM
  - default character set: utf8
  - default collate: utf8_general_ci
  __
Table `old`.`address_book` was modified
  columns:
  - added column customers_guest of type INT(1)
  - modified column customers_id
  - modified column entry_gender
  - modified column entry_company
  - modified column entry_firstname
  - modified column entry_lastname
  - modified column entry_street_address
  - modified column entry_suburb
  - modified column entry_postcode
  - modified column entry_city
  - modified column entry_state
  __
  attributes:
  - default character set: utf8 --> utf8
  - default collate: utf8_unicode_ci --> utf8_unicode_ci
  __
Table `old`.`address_format` was modified
  columns:
  - modified column address_format
  - modified column address_summary
  __
  attributes:
  - default character set: utf8 --> utf8
  - default collate: utf8_unicode_ci --> utf8_unicode_ci
  __
Table `old`.`administrators` was modified
  columns:
  - added column level of type TINYINT(4)
  - added column admin_files of type TEXT
  - modified column user_name
  - modified column user_password
  __
  attributes:
  - default character set: utf8 --> utf8
  - default collate: utf8_unicode_ci --> utf8_unicode_ci
  __
Table `old`.`am_attributes_to_templates` was modified
  columns:
  - added column weight_prefix of type CHAR(1)
  - added column options_values_weight of type DECIMAL(6,3)
  __
  attributes:
  - default character set: utf8 --> utf8
  - default collate: utf8_general_ci --> utf8_general_ci
  __
Table `old`.`am_templates` was modified
  attributes:
  - default character set: utf8 --> utf8
  - default collate: utf8_general_ci --> utf8_general_ci
  __
Table `old`.`banners` was modified
  columns:
  - removed column language_id
  - modified column banners_title
  - modified column banners_url
  - modified column banners_image
  - modified column banners_group
  - modified column banners_html_text
  __
  indices:
  - added index idx_banners_group with columns: banners_group
  __
  attributes:
  - default character set: utf8 --> utf8
  - default collate: utf8_unicode_ci --> utf8_unicode_ci
  __
Table `old`.`banners_history` was modified
  columns:
  - modified column banners_id
  __
  indices:
  - added index idx_banners_history_banners_id with columns: banners_id
  __
  attributes:
  - default character set: utf8 --> utf8
  - default collate: utf8_unicode_ci --> utf8_unicode_ci
  __
Table `old`.`categories` was modified
  columns:
  - modified column categories_image
  __
  attributes:
  - default character set: utf8 --> utf8
  - default collate: utf8_unicode_ci --> utf8_unicode_ci
  __
Table `old`.`categories_description` was modified
  columns:
  - removed column categories_seo_url
  - removed column keywords_tag
  - removed column desc_tag
  - removed column title_tag
  - modified column categories_name
  __
  attributes:
  - default character set: utf8 --> utf8
  - default collate: utf8_unicode_ci --> utf8_unicode_ci
  __
Table `old`.`configuration` was modified
  columns:
  - modified column configuration_title
  - modified column configuration_key
  - modified column configuration_value
  - modified column configuration_description
  - modified column configuration_group_id
  - modified column use_function
  - modified column set_function
  __
  attributes:
  - default character set: utf8 --> utf8
  - default collate: utf8_unicode_ci --> utf8_unicode_ci
  __
Table `old`.`configuration_group` was modified
  columns:
  - modified column configuration_group_title
  - modified column configuration_group_description
  __
  attributes:
  - default character set: utf8 --> utf8
  - default collate: utf8_unicode_ci --> utf8_unicode_ci
  __
Table `old`.`countries` was modified
  columns:
  - modified column countries_name
  - modified column countries_iso_code_2
  - modified column countries_iso_code_3
  - modified column address_format_id
  __
  attributes:
  - default character set: utf8 --> utf8
  - default collate: utf8_unicode_ci --> utf8_unicode_ci
  __
Table `old`.`currencies` was modified
  columns:
  - modified column title
  - modified column code
  - modified column symbol_left
  - modified column symbol_right
  - modified column decimal_point
  - modified column thousands_point
  - modified column decimal_places
  __
  indices:
  - added index idx_currencies_code with columns: code
  __
  attributes:
  - default character set: utf8 --> utf8
  - default collate: utf8_unicode_ci --> utf8_unicode_ci
  __
Table `old`.`customers` was modified
  columns:
  - added column customers_guest of type INT(1)
  - removed column guest_account
  - removed column mmstatus
  - removed column customers_invoice
  - modified column customers_gender
  - modified column customers_firstname
  - modified column customers_lastname
  - modified column customers_email_address
  - modified column customers_telephone
  - modified column customers_fax
  - modified column customers_password
  - modified column customers_newsletter
  __
  indices:
  - added index idx_customers_email_address with columns: customers_email_address
  - added index customers_newsletter with columns: customers_newsletter
  __
  attributes:
  - default character set: utf8 --> utf8
  - default collate: utf8_unicode_ci --> utf8_unicode_ci
  __
Table `old`.`customers_basket` was modified
  columns:
  - modified column customers_id
  - modified column products_id
  - modified column customers_basket_quantity
  - modified column customers_basket_date_added
  __
  indices:
  - added index idx_customers_basket_customers_id with columns: customers_id
  __
  attributes:
  - default character set: utf8 --> utf8
  - default collate: utf8_unicode_ci --> utf8_unicode_ci
  __
Table `old`.`customers_basket_attributes` was modified
  columns:
  - modified column customers_id
  - modified column products_id
  - modified column products_options_id
  - modified column products_options_value_id
  - modified column products_options_value_text
  __
  indices:
  - added index idx_customers_basket_att_customers_id with columns: customers_id
  __
  attributes:
  - default character set: utf8 --> utf8
  - default collate: utf8_unicode_ci --> utf8_unicode_ci
  __
Table `old`.`customers_info` was modified
  columns:
  - added column password_reset_key of type CHAR(40)
  - added column password_reset_date of type DATETIME
  - modified column customers_info_id
  __
  attributes:
  - default character set: utf8 --> utf8
  - default collate: utf8_unicode_ci --> utf8_unicode_ci
  __
Table `old`.`discount_coupons` was modified
  columns:
  - modified column coupons_discount_amount
  - modified column coupons_discount_type
  - modified column coupons_min_order_type
  __
Table `old`.`discount_coupons_to_categories` was modified
  columns:
  - modified column coupons_id
  - modified column categories_id
  __
  - removed index PRIMARY
Table `old`.`discount_coupons_to_customers` was modified
  columns:
  - modified column coupons_id
  - modified column customers_id
  __
  - removed index PRIMARY
Table `old`.`discount_coupons_to_manufacturers` was modified
  columns:
  - modified column coupons_id
  - modified column manufacturers_id
  __
  - removed index PRIMARY
Table `old`.`discount_coupons_to_orders` was modified
  columns:
  - added column discount_coupons_to_orders_id of type INT(11)
  - modified column coupons_id
  - modified column orders_id
  __
  indices:
  - added index PRIMARY with columns: discount_coupons_to_orders_id
  - added index coupons_id with columns: coupons_id
  - removed index PRIMARY
  __
Table `old`.`discount_coupons_to_products` was modified
  columns:
  - modified column coupons_id
  - modified column products_id
  __
  - removed index PRIMARY
Table `old`.`discount_coupons_to_zones` was modified
  columns:
  - added column discount_coupons_to_zones_id of type INT(11)
  - modified column coupons_id
  - modified column geo_zone_id
  __
  indices:
  - added index PRIMARY with columns: discount_coupons_to_zones_id
  - added index discount_coupons_to_zones_id with columns: discount_coupons_to_zones_id
  - removed index PRIMARY
  __
Table `old`.`files_uploaded` was modified
  attributes:
  - default character set: utf8 --> utf8
  - default collate: utf8_general_ci --> utf8_general_ci
  - comment: Must always have either a sesskey or customers_id --> Must always have either a sesskey or customers_id
  __
Table `old`.`geo_zones` was modified
  columns:
  - modified column geo_zone_name
  - modified column geo_zone_description
  __
  attributes:
  - default character set: utf8 --> utf8
  - default collate: utf8_unicode_ci --> utf8_unicode_ci
  __
Table `old`.`languages` was modified
  columns:
  - modified column name
  - modified column code
  - modified column image
  - modified column directory
  __
  attributes:
  - default character set: utf8 --> utf8
  - default collate: utf8_unicode_ci --> utf8_unicode_ci
  __
Table `old`.`mailbeez_block` was modified
  attributes:
  - default character set: utf8 --> utf8
  - default collate: utf8_general_ci --> utf8_general_ci
  __
Table `old`.`mailbeez_bounces` was modified
  attributes:
  - default character set: utf8 --> utf8
  - default collate: utf8_general_ci --> utf8_general_ci
  __
Table `old`.`mailbeez_bounces_msg_log` was modified
  attributes:
  - default character set: utf8 --> utf8
  - default collate: utf8_general_ci --> utf8_general_ci
  __
Table `old`.`mailbeez_event_log` was modified
  attributes:
  - default character set: utf8 --> utf8
  - default collate: utf8_general_ci --> utf8_general_ci
  __
Table `old`.`mailbeez_opens_log` was modified
  attributes:
  - default character set: utf8 --> utf8
  - default collate: utf8_general_ci --> utf8_general_ci
  __
Table `old`.`mailbeez_process` was modified
  attributes:
  - default character set: utf8 --> utf8
  - default collate: utf8_general_ci --> utf8_general_ci
  __
Table `old`.`mailbeez_tracking` was modified
  columns:
  - modified column channel
  __
  indices:
  - added index customers_id with columns: customers_id, iteration, module
  - removed index customers_id
  - removed index module
  __
  attributes:
  - default character set: utf8 --> utf8
  - default collate: utf8_general_ci --> utf8_general_ci
  __
Table `old`.`mailbeez_tracking_clicks` was modified
  attributes:
  - default character set: utf8 --> utf8
  - default collate: utf8_general_ci --> utf8_general_ci
  __
Table `old`.`mailbeez_tracking_orders` was modified
  attributes:
  - default character set: utf8 --> utf8
  - default collate: utf8_general_ci --> utf8_general_ci
  __
Table `old`.`manufacturers` was modified
  columns:
  - modified column manufacturers_name
  - modified column manufacturers_image
  __
  attributes:
  - default character set: utf8 --> utf8
  - default collate: utf8_unicode_ci --> utf8_unicode_ci
  __
Table `old`.`manufacturers_info` was modified
  columns:
  - modified column manufacturers_id
  - modified column languages_id
  - modified column manufacturers_url
  __
  attributes:
  - default character set: utf8 --> utf8
  - default collate: utf8_unicode_ci --> utf8_unicode_ci
  __
Table `old`.`newsletters` was modified
  columns:
  - modified column title
  - modified column content
  - modified column module
  __
  attributes:
  - default character set: utf8 --> utf8
  - default collate: utf8_unicode_ci --> utf8_unicode_ci
  __
Table `old`.`orders` was modified
  columns:
  - added column customers_guest of type INT(1)
  - removed column customer_service_id
  - removed column customers_dummy_account
  - modified column customers_id
  - modified column customers_name
  - modified column customers_company
  - modified column customers_street_address
  - modified column customers_suburb
  - modified column customers_city
  - modified column customers_postcode
  - modified column customers_state
  - modified column customers_country
  - modified column customers_telephone
  - modified column customers_email_address
  - modified column customers_address_format_id
  - modified column delivery_name
  - modified column delivery_company
  - modified column delivery_street_address
  - modified column delivery_suburb
  - modified column delivery_city
  - modified column delivery_postcode
  - modified column delivery_state
  - modified column delivery_country
  - modified column delivery_address_format_id
  - modified column billing_name
  - modified column billing_company
  - modified column billing_street_address
  - modified column billing_suburb
  - modified column billing_city
  - modified column billing_postcode
  - modified column billing_state
  - modified column billing_country
  - modified column billing_address_format_id
  - modified column payment_method
  - modified column cc_type
  - modified column cc_owner
  - modified column cc_number
  - modified column cc_expires
  - modified column orders_status
  - modified column currency
  - modified column shipping_module
  __
  indices:
  - added index idx_orders_customers_id with columns: customers_id
  __
  attributes:
  - default character set: utf8 --> utf8
  - default collate: utf8_unicode_ci --> utf8_unicode_ci
  __
Table `old`.`orders_products` was modified
  columns:
  - modified column orders_id
  - modified column products_id
  - modified column products_model
  - modified column products_name
  - modified column products_price
  - modified column final_price
  - modified column products_tax
  - modified column products_quantity
  __
  indices:
  - added index idx_orders_products_orders_id with columns: orders_id
  - added index idx_orders_products_products_id with columns: products_id
  __
  attributes:
  - default character set: utf8 --> utf8
  - default collate: utf8_unicode_ci --> utf8_unicode_ci
  __
Table `old`.`orders_products_attributes` was modified
  columns:
  - removed column products_options_values_id
  - removed column products_options_id
  - modified column orders_id
  - modified column orders_products_id
  - modified column products_options
  - modified column products_options_values
  - modified column options_values_price
  - modified column price_prefix
  __
  indices:
  - added index idx_orders_products_att_orders_id with columns: orders_id
  __
  attributes:
  - default character set: utf8 --> utf8
  - default collate: utf8_unicode_ci --> utf8_unicode_ci
  __
Table `old`.`orders_products_download` was modified
  columns:
  - modified column orders_products_filename
  __
  indices:
  - added index idx_orders_products_download_orders_id with columns: orders_id
  __
  attributes:
  - default character set: utf8 --> utf8
  - default collate: utf8_unicode_ci --> utf8_unicode_ci
  __
Table `old`.`orders_status` was modified
  columns:
  - added column public_flag of type INT(11)
  - added column downloads_flag of type INT(11)
  - modified column orders_status_name
  __
  attributes:
  - default character set: utf8 --> utf8
  - default collate: utf8_unicode_ci --> utf8_unicode_ci
  __
Table `old`.`orders_status_history` was modified
  columns:
  - modified column orders_id
  - modified column orders_status_id
  - modified column comments
  __
  indices:
  - added index idx_orders_status_history_orders_id with columns: orders_id
  - removed index orders_id
  __
  attributes:
  - default character set: utf8 --> utf8
  - default collate: utf8_unicode_ci --> utf8_unicode_ci
  __
Table `old`.`orders_total` was modified
  columns:
  - modified column orders_id
  - modified column title
  - modified column text
  - modified column value
  - modified column class
  - modified column sort_order
  __
  attributes:
  - default character set: utf8 --> utf8
  - default collate: utf8_unicode_ci --> utf8_unicode_ci
  __
Table `old`.`products` was modified
  columns:
  - removed column availability_id_out_of_stock
  - removed column availability_id_in_stock
  - modified column products_quantity
  - modified column products_model
  - modified column products_image
  - modified column products_price
  - modified column products_weight
  - modified column products_status
  - modified column products_tax_class_id
  __
  indices:
  - added index idx_products_model with columns: products_model
  __
  attributes:
  - default character set: utf8 --> utf8
  - default collate: utf8_unicode_ci --> utf8_unicode_ci
  __
Table `old`.`products_2gether` was modified
  attributes:
  - default character set: utf8 --> utf8
  - default collate: utf8_general_ci --> utf8_general_ci
  __
Table `old`.`products_attributes` was modified
  columns:
  - modified column products_id
  - modified column options_id
  - modified column options_values_id
  - modified column options_values_price
  - modified column price_prefix
  __
  indices:
  - added index idx_products_attributes_products_id with columns: products_id
  __
  attributes:
  - default character set: utf8 --> utf8
  - default collate: utf8_unicode_ci --> utf8_unicode_ci
  __
Table `old`.`products_attributes_download` was modified
  columns:
  - modified column products_attributes_id
  - modified column products_attributes_filename
  __
  attributes:
  - default character set: utf8 --> utf8
  - default collate: utf8_unicode_ci --> utf8_unicode_ci
  __
Table `old`.`products_description` was modified
  columns:
  - removed column products_seo_url
  - removed column keywords_tag
  - removed column desc_tag
  - removed column title_tag
  - modified column products_name
  - modified column products_description
  - modified column products_url
  __
  attributes:
  - default character set: utf8 --> utf8
  - default collate: utf8_unicode_ci --> utf8_unicode_ci
  __
Table `old`.`products_notifications` was modified
  columns:
  - modified column products_id
  - modified column customers_id
  __
  attributes:
  - default character set: utf8 --> utf8
  - default collate: utf8_unicode_ci --> utf8_unicode_ci
  __
Table `old`.`products_options` was modified
  columns:
  - modified column products_options_images_enabled
  - modified column products_options_name
  - modified column products_options_comment
  - modified column products_options_order
  __
  attributes:
  - default character set: utf8 --> utf8
  - default collate: utf8_unicode_ci --> utf8_unicode_ci
  __
Table `old`.`products_options_values` was modified
  columns:
  - added column products_options_values_url of type VARCHAR(128)
  - modified column products_options_values_name
  - modified column products_options_values_thumbnail
  __
  attributes:
  - default character set: utf8 --> utf8
  - default collate: utf8_unicode_ci --> utf8_unicode_ci
  __
Table `old`.`products_options_values_to_products_options` was modified
  columns:
  - modified column products_options_id
  - modified column products_options_values_id
  __
  attributes:
  - default character set: utf8 --> utf8
  - default collate: utf8_unicode_ci --> utf8_unicode_ci
  __
Table `old`.`products_sets` was modified
  attributes:
  - default character set: utf8 --> utf8
  - default collate: utf8_general_ci --> utf8_general_ci
  __
Table `old`.`products_sets_categories` was modified
  attributes:
  - default character set: utf8 --> utf8
  - default collate: utf8_general_ci --> utf8_general_ci
  __
Table `old`.`products_sets_to_products` was modified
  attributes:
  - default character set: utf8 --> utf8
  - default collate: utf8_general_ci --> utf8_general_ci
  __
Table `old`.`products_to_categories` was modified
  columns:
  - modified column products_id
  - modified column categories_id
  __
  attributes:
  - default character set: utf8 --> utf8
  - default collate: utf8_unicode_ci --> utf8_unicode_ci
  __
Table `old`.`reviews` was modified
  columns:
  - added column reviews_status of type TINYINT(1)
  - removed column approved
  - modified column products_id
  - modified column customers_name
  __
  indices:
  - added index idx_reviews_products_id with columns: products_id
  - added index idx_reviews_customers_id with columns: customers_id
  __
  attributes:
  - default character set: utf8 --> utf8
  - default collate: utf8_unicode_ci --> utf8_unicode_ci
  __
Table `old`.`reviews_description` was modified
  columns:
  - modified column reviews_id
  - modified column languages_id
  - modified column reviews_text
  __
  attributes:
  - default character set: utf8 --> utf8
  - default collate: utf8_unicode_ci --> utf8_unicode_ci
  __
Table `old`.`sessions` was modified
  columns:
  - modified column sesskey
  - modified column expiry
  - modified column value
  __
  attributes:
  - default character set: utf8 --> utf8
  - default collate: utf8_unicode_ci --> utf8_unicode_ci
  __
Table `old`.`specials` was modified
  columns:
  - modified column products_id
  - modified column specials_new_products_price
  __
  indices:
  - added index idx_specials_products_id with columns: products_id
  __
  attributes:
  - default character set: utf8 --> utf8
  - default collate: utf8_unicode_ci --> utf8_unicode_ci
  __
Table `old`.`supertracker` was modified
  columns:
  - added column browser of type VARCHAR(100)
  - added column country_region of type VARCHAR(100)
  - added column country_city of type VARCHAR(100)
  - modified column exit_page
  __
  indices:
  - removed index landing_page
  - removed index landing_page_2
  __
  attributes:
  - default character set: utf8 --> utf8
  - default collate: utf8_general_ci --> utf8_general_ci
  __
Table `old`.`tax_class` was modified
  columns:
  - modified column tax_class_title
  - modified column tax_class_description
  __
  attributes:
  - default character set: utf8 --> utf8
  - default collate: utf8_unicode_ci --> utf8_unicode_ci
  __
Table `old`.`tax_rates` was modified
  columns:
  - modified column tax_zone_id
  - modified column tax_class_id
  - modified column tax_rate
  - modified column tax_description
  __
  attributes:
  - default character set: utf8 --> utf8
  - default collate: utf8_unicode_ci --> utf8_unicode_ci
  __
Table `old`.`whos_online` was modified
  columns:
  - modified column full_name
  - modified column session_id
  - modified column ip_address
  - modified column time_entry
  - modified column time_last_click
  - modified column last_page_url
  __
  indices:
  - added index idx_whos_online_session_id with columns: session_id
  __
  attributes:
  - default character set: utf8 --> utf8
  - default collate: utf8_unicode_ci --> utf8_unicode_ci
  __
Table `old`.`zones` was modified
  columns:
  - modified column zone_country_id
  - modified column zone_code
  - modified column zone_name
  __
  indices:
  - added index idx_zones_country_id with columns: zone_country_id
  __
  attributes:
  - default character set: utf8 --> utf8
  - default collate: utf8_unicode_ci --> utf8_unicode_ci
  __
Table `old`.`zones_to_geo_zones` was modified
  columns:
  - modified column zone_country_id
  __
  indices:
  - added index idx_zones_to_geo_zones_country_id with columns: zone_country_id
  __
  attributes:
  - default character set: utf8 --> utf8
  - default collate: utf8_unicode_ci --> utf8_unicode_ci
  __
----------------------------------------------
End of MySQL Workbench Report
 

:blink:
osCommerce based shop owner with minimal design and focused on background works. When the less is more.
Email managment with tracking pixel, package managment for shipping, stock management, warehouse managment with bar code reader, parcel shops management on 3000 pickup points without local store.

Link to comment
Share on other sites

I like the approach, :rose:

 

have not used it, but scanned through it and noticed little error in the customer_info section in the commented out lines as it is referencing the wrong (not generic) array

 

You mean this line?

	$mytable_fields = array("customers_info_id","customers_info_date_of_last_logon","customers_info_number_of_logons","customers_info_date_account_created","customers_info_date_account_last_modified","global_product_notifications");

I may have left there some custom field. If that's true please let me know what field is giving you an error

Link to comment
Share on other sites

I mean the next 2nd and 3rd line that is commented out

 

// Uncomment next two lines if you're importing from 2.3.2 onwards
//    $customers_info_fields[]="password_reset_key"; // 2.3.2 onwards
//    $customers_info_fields[]="password_reset_date"; // 2.3.2 onwards

if you uncomment, it would not work as it needs to be "$mytable_fields"

 

I have no problem as I haven't used it, but for some noob it might be confusing

KEEP CALM AND CARRY ON

I do not use the responsive bootstrap version since i coded my responsive version earlier, but i have bought every 28d of code package to support burts effort and keep this forum alive (albeit more like on life support).

So if you are still here ? What are you waiting for ?!

 

Find the most frequent unique errors to fix:

grep "PHP" php_error_log.txt | sed "s/^.* PHP/PHP/g" |grep "line" |sort | uniq -c | sort -r > counterrors.txt

Link to comment
Share on other sites

  • 6 months later...
  • 2 weeks later...

Just wanted to say thanks for the script. Saved me a lot of time. Just converted my old site 2.2 with lots of mods to the new bootstrap 2.3.4. Did a clean install of 2.3.4 installing new data base. Then exported old database and used the script to import old database into new. Worked perfectly did not have to make any changes or fiddle with any tables. All products, customers and orders came over without any problems. Manually copied over all images and other special files used. New store fully populated and works fine. :) Thanks.

 

Link to comment
Share on other sites

Just a quick update.

The script ran without showing any errors and initially everything looked ok! Store was populated with all the products, old order and customer date. However on closer inspection found a number of categories were not behaving properly. Images were not lining up with the grid system and phantom category names were being duplicated.

Even attempted to move products to new category and delete old one but did not work the bug kept reappearing.    Eventually and to remove database and install shop again from scratch.

I don’t actually need everything from old database as the new shop is just going to be a online catalogue and not a shop. The new install is up and running with fresh install and empty new database. I just need to import product with description and categories over to new database.

I have looked around and not come across any simple way of doing this. They only way I can currently see is to export each table from old database as csv file and then import it to the new one?

Is this really the only option?  Any suggestion welcome.

 

Link to comment
Share on other sites

@@justcatering Image alignment is due to the different image restrictions between oscommerce versions.

 

AFAIK there's no simpler way to do it than using this script. Ghost categories shold not be created unless you have some custom categories (or maybe custom database tables) mod on your old shop. Could this be the reason?

Link to comment
Share on other sites

Sorry your right it’s not script problem. I manually exported and imported the products and categories over making the required changes to both tables and data as required. Store fully loaded with all products and categories. As its only a catalogue I did not need any customer or order data.

Got same problem as before. Products display perfectly like little solders all lined up on the grid. However the category images will not behave. They again line up on some rows but then you get a row where only one image is shown the rest blank.

I think it’s down to this bit of code in the catalogue/index.php,

 

while ($categories = tep_db_fetch_array($categories_query)) {

      $cPath_new = tep_get_path($categories['categories_id']);

      echo '<div class="col-xs-6 col-sm-4">';

      echo '  <div class="text-center">';

      echo '    <a href="' . tep_href_link(FILENAME_DEFAULT, $cPath_new) . '">' . tep_image(DIR_WS_IMAGES . $categories['categories_image'], $categories['categories_name'], SUBCATEGORY_IMAGE_WIDTH, SUBCATEGORY_IMAGE_HEIGHT) . '</a>';

      echo '    <div class="caption text-center">';

      echo '      <h5><a href="' . tep_href_link(FILENAME_DEFAULT, $cPath_new) . '">' . $categories['categories_name'] . '</a></h5>';

      echo '    </div>';

      echo '  </div>';

      echo '</div>';

The images just will not behave. Anyone got any ideas! I have checked and

Enable Grid List javascript

Enable Equal Heights Module

Are both set. I have manually checked the tables and there is nothing obvious wrong.

 

Link to comment
Share on other sites

@@justcatering  A URL would probably help but in any case are the images all the same size and squared up....ie 500 X 500 etc?

 

Dan

Link to comment
Share on other sites

Hi Dan,

Yes images were taken from 2.2 site and are give or take a few pixels the same size. I did try and post a picture but forum kept saying format not accepted to a jpg file and all other formats? Probably me doing something wrong! You can see problem at the store.

 

http://www.justcooking.co.uk/index.php?cPath=102

 

Also the footer for contact us you will see is pink! I’m using  user.css to try out some changes and would like to have this as a simple bar across the screen like the copyright bar below. Struggling find were the height of this part of the footer is set.

 

Zahid

 

Link to comment
Share on other sites

Ok went back and checked image size again! And found a few to be larger! Aspect ratio was still correct? Changed to 100x57 and that looks to fix problem although i will have to check all images to be sure!

Why is 2.3.4 so sensitive to image size on categories? The product images are behaving fine even with different size images. Is it not possible to put the categories in same auto fitting windows?

I am going to have to resize lots of images! In many cases I use a product image for the categories as it reduces the number of images to be maintained.

Surely as long as the ratio is correct image should just auto fit or is there more to this?

 

Link to comment
Share on other sites

Resizing images to 100x57 fixes the display problem but results in a very poor page! Size is just too small to be any good. Resizing is available in admin but appears to break the page if you change it.

As calculate image is active why is this happening?

 

Link to comment
Share on other sites

OK got it sorted! You have to resize every image to match setting in admin so if set to 130x100 then every image must be resized to that or it will not display properly. The calculate image appears to not work for category images.

Now this can be a pain to do if you’re still working out layout and design of template and you may change size depending on layout changes! You will have to resize every time you change image size in admin.

 

Link to comment
Share on other sites

@@justcatering 

 

Zahid...you might be better off squaring up those images and then using a thumbnail program to produce the smaller images. I use 500 X 500 as my main image size and will likely move to something higher in the future.  Otherwise you end up with some pretty small images trying to get the listings to line up....the small images just looked like crap on my site.  You also seem to have many images that have lots of detail which is hard to make out.  

 

Dan

Link to comment
Share on other sites

Problem I have is the new site is just a catalogue of my 2.2 live store as an option for customers who want to look at products on the move. I want to try and keep the work to a minimum hence wanting to just use same images that way as i change live store its just a data base update and copy of image directory nice and simple. I don’t really want to be keeping 2 sets of images.

2.2 handles images just fine! Also the product images are fine and can be any size and still line up in 2.3.4 so what’s different about the cat and sub cat images?

Perhaps I’m missing something obvious? No rush rather take my time and get it right and easy to keep updated.

I do have a back up option which is to standardise all my images on both site but that’s a last resort. More work but not imposable. You can use a neat little free too called Easy Image Modifier which lets you take a folder of images and batch convert them to a standard size of your choice originals can be random sizes. You can find it on my freebie site a work in progress 2.3.4 responsive site.

http://www.trythenbuy.co.uk/product_info.php?products_id=51

 

Link to comment
Share on other sites

@@justcatering 

 

Zahid, I don't recall the details of the issue...you could search the site for threads on equal heights....that should give you an idea of the problem.   Best advice I can give is to square those images up....if you have problems with your old site...php is upgraded or whatever, you'll be happy to have a nice go to site.

 

Dan

Link to comment
Share on other sites

well reducing the size sorted the problem for the PC but same site on a phone shows same problem of images not following grid. Will have to live with it for now as I dont fully under stand how the code is working for the cat images. It all works if and only if size is set to 100x 57 but that makes no sence as the whole point of bootstrap is its ment to be responsive!

I'm clearly missing somthing :( anyone able to explain?

 

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...