Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 252

Hybrid View

  1. #1
    Join Date
    Feb 2008
    Location
    Orange County, CA
    Posts
    25
    Plugin Contributions
    1

    Default Re: OsCommerce Data Importer - Errors

    Jeremy,

    I'll admit... I can't make heads or tails of your code, and I'm not sure what you're trying to do, so I can't really see the vision. It appears as if you're declaring individual tables, but clearing a specific table (orders). Either way, there are no fields used.

    Can you please try to explain what you were trying to do?

    Maybe my instructions weren't clear enough on the original, the way the scripts are intended to be used is that at the beginning of working on your new site, you can make a copy of your current OSC database using all 3 import scripts (products, customers, orders), but people often want to change the products information during the time of the migration to reflect new content, meta tags, pricing, descriptions whatever, so I split out the customers and orders into separate files. When you go live with your new site, you can re-run the customers and orders script to get the most up to the second information after you bring your Zen site up.

    I would appreciate you explaining what the current script is deficient in the migration so that it can be improved upon.

    Since the scripts can be run in seconds (rather than minutes or hours), you can be up and running with your new Zen site nearly instantly after copying the site files up.

    In the end, test, test, test. I went through probably 50 iterations before I felt that I could comfortably release the code that I did. I don't yet get the sense that this has been tested, can you confirm?

    Best wishes,
    Albert
    Quote Originally Posted by JeremyToaster View Post
    Hey Albert,
    Yes definitely makes sense not needing the sessions_info table.

    I may have just over looked the orders_products table, I'll check again and see if it is there. I'm sure it is, as my installation is very standard with only Visual customization.

    So do you think the queries I wrote are correct other than the two issues mentioned?
    This is my first time to write SQL queries.
    If they are correct, would you want to integrate them into the script you published?

    jeremy

  2. #2
    Join Date
    May 2008
    Posts
    52
    Plugin Contributions
    0

    Default Re: OsCommerce Data Importer - Errors

    Albert, All

    Thank you for creating this download, it makes life a lot easier when your migrating from OSC to Zen

    I have successfully used Albert's latest iteration of the contribution and am now trying to add in manufacturers and also the meta tags for categories and products.

    Both pieces of code complain about the same error. Taking the manufacturers code;

    importing manufacturersYou have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 6
    I have banged this about for several hours and cannot see what I am doing wrong. It is probably a minor item but...

    I would be very grateful for any suggestions as to where to take this

    Below is the code for taking the data out of OSC

    Code:
    $query_manufacturers = "SELECT * FROM " . $source_db_table_prefix . "manufacturers";
    $manufacturers = mysql_query($query_manufacturers);
    $i = 0;
    echo 'exporting manufacturers';
    while ($export_record = mysql_fetch_assoc($manufacturers)) {
    	$import_manufacturers[$i]['manufacturers_id'] =  mysql_real_escape_string($export_record['manufacturers_id']);
    	$import_manufacturers[$i]['manufacturers_name'] =  mysql_real_escape_string($export_record['manufacturers_name']);
    	$import_manufacturers[$i]['manufacturers_image'] =  mysql_real_escape_string($export_record['manufacturers_image']);
    	$import_manufacturers[$i]['date_added'] =  mysql_real_escape_string($export_record['date_added']);
    	$import_manufacturers[$i]['last_modified'] =  mysql_real_escape_string($export_record['last_modified']);
    	$i++;
    	echo '.';
    }
    mysql_free_result($manufacturers);
    And this is the code for putting into Zen

    Code:
    echo 'importing manufacturers';
    mysql_query("TRUNCATE `" . $target_db_table_prefix . "manufacturers`");
    while (list($i, ) = each($import_manufacturers)) {
    	$insert_manufacturers = "INSERT INTO " . $target_db_table_prefix . "manufacturers SET
    	manufacturers_id = '" . $import_customer[$i]['manufacturers_id'] . "', 
    	manufacturers_name = '" . $import_customer[$i]['manufacturers_name'] . "', 
     	manufacturers_image = '" . $import_customer[$i]['manufacturers_image'] . "', 
     	date_added = '" . $import_customer[$i]['date_added'] . "', 
     	last_modified = '" . $import_customer[$i]['last_modified'] . "', 
     	";
    	$success = mysql_query($insert_manufacturers);
    	if (!$success) { echo mysql_error(); exit;}
    	echo '.';
    }
    Thank you

    A very perplexed Centec2b

  3. #3
    Join Date
    Jun 2009
    Posts
    29
    Plugin Contributions
    0

    Default Re: OsCommerce Data Importer - Errors

    Hi
    I am looking to import just some products from a OsCommerce webshop to my zen-cart webshop, is it possible to do that?

  4. #4
    Join Date
    Apr 2005
    Location
    BC, Canada
    Posts
    22
    Plugin Contributions
    0

    Default Re: OsCommerce Data Importer - Errors

    Does anyone know if this mod can be altered to also import product weight & dimensions (for the Canada Post shipping module)?

    Thanks!

  5. #5
    Join Date
    Mar 2011
    Posts
    364
    Plugin Contributions
    0

    Default Re: OsCommerce Data Importer - Errors

    Would it be possible to split these?

    Orders
    Orders Products
    Orders Products Attributes
    Orders Products Download
    Orders Status
    Orders Status History
    Orders Total
    Currencies

    and have them do it all each separatey? Then I can find out which scection is timing out.

    I'm sure it is orders status or orders status history. It's about 15K orders.

  6. #6
    Join Date
    Mar 2011
    Posts
    8
    Plugin Contributions
    0

    Default Re: OsCommerce Data Importer - Errors

    Hi, I'm upgrading from osCommerce MS2.2 to Zen Cart 1.39h. I've used the osCommerce Data Importer, and it works for the most part ok, but I've got problems displaying the order history under My Account in the front-end. It only displays orders placed after the data import. In admin all of the history is shown. I've tried with both my own template and the classic one, but with the same result. Any hints on where to look ?
    The only add-ons installed are:
    Ez-Pages Footer Columns
    Column Layout Grid for Product Listing 1.3.8
    Single List Template

  7. #7
    Join Date
    Nov 2008
    Posts
    12
    Plugin Contributions
    0

    Default Handling UTF8 charactered Database

    Hello, all,

    I tried to apply this OsCommerce Data Importer but meet difficulties of characteres cannot be copied to the new database.

    My Database includes UTF8 characters, and it seems to be typical "UTF8 in ADODB" problem.

    Normally, use set names query like this once when firstly connect to DB to solve this problem, but I have no skill to write script.

    ---- sample -----

    somewhat and somewhere need to write something like this:
    ================================================== ==========
    $db->Connect( $dbhost, $dbuser, $dbpasswd, $dbname );
    // Make sure any results we retrieve or commands we send use the same charset and collation as the database:
    $db_charset = $db->Execute( "SHOW VARIABLES LIKE 'character_set_database'" );
    $db->Execute( "SET NAMES '" . $db_charset->fields['Value'] . "'" )
    $db_charset->Close(); // Optional
    ================================================== ==========
    Resources:
    http://phplens.com/lens/lensforum/topics.php?id=4
    http://adviesenzo.nl/examples/php_mysql_charset_fix/

    note: this was copied from PAP suport forum, but the nature is the same. This error is quite a lot for scripts from "Lain1" countries...

    Is it possible to rewrite some code to apply this???

    Or is there anyone who can show me where to change in the OSC data importer???

    Thank you!

  8. #8
    Join Date
    Jun 2008
    Location
    Washington, DC
    Posts
    789
    Plugin Contributions
    7

    Default Re: OsCommerce Data Importer - Errors

    gisco

    This mod is not using ADODB it is using traditional mysql.
    So the script would look like this.
    Code:
    mysql_query("set names 'utf8'",$con);
    Find the connect sql lines .
    Code:
    $connected = mysql_connect($target_db_host, $target_db_username, $target_db_password);
    And change to this.
    Code:
    $connected = mysql_connect($target_db_host, $target_db_username, $target_db_password);
    mysql_query("set names 'utf8'",$con);
    I have not tested let us know if this worked.
    • 446F63746F722057686F •

  9. #9
    Join Date
    Nov 2008
    Posts
    12
    Plugin Contributions
    0

    Default Re: OsCommerce Data Importer - Errors

    Quote Originally Posted by skipwater View Post
    gisco

    This mod is not using ADODB it is using traditional mysql.
    So the script would look like this.
    Code:
    mysql_query("set names 'utf8'",$con);
    Find the connect sql lines .
    Code:
    $connected = mysql_connect($target_db_host, $target_db_username, $target_db_password);
    And change to this.
    Code:
    $connected = mysql_connect($target_db_host, $target_db_username, $target_db_password);
    mysql_query("set names 'utf8'",$con);
    I have not tested let us know if this worked.

    Hello, thank you for the info. I have been working on this code but still not get desired result. I will try also changing some configuration of mysql.

    Need more time to report the result...

  10. #10
    Join Date
    Jun 2008
    Location
    Washington, DC
    Posts
    789
    Plugin Contributions
    7

    Default Re: OsCommerce Data Importer - Errors

    My Database includes UTF8 characters, and it seems to be typical "UTF8 in ADODB" problem.
    gisco
    Here is a fix for storing data in mysql with the utf8 Character Set.

    Find the following two lines that start with. (there are more then one set in each script fix all of them)
    Code:
    	$connected = mysql_connect( 
    	$dataopened = mysql_select_db(
    Add this line below them
    Code:
    	mysql_set_charset('utf8',$connected);
    I should look like this:
    Code:
    	$connected = mysql_connect(
    	$dataopened = mysql_select_db(
    	mysql_set_charset('utf8',$connected);
    If you need other then utf8 character coding just replace utf8 with the required character code.

    Skip
    • 446F63746F722057686F •

 

 
Page 2 of 3 FirstFirst 123 LastLast

Similar Threads

  1. CRE Loaded to Zen Cart Data Importer [support thread]
    By skipwater in forum All Other Contributions/Addons
    Replies: 44
    Last Post: 7 Oct 2010, 10:04 PM
  2. oscommerce data
    By nezah.net in forum General Questions
    Replies: 3
    Last Post: 13 Feb 2008, 07:22 AM
  3. Problems following data import from OScommerce
    By wdkstudio in forum General Questions
    Replies: 4
    Last Post: 24 Nov 2007, 09:04 AM
  4. Scripts to migrate data from osCommerce?
    By marke in forum Installing on a Linux/Unix Server
    Replies: 4
    Last Post: 19 Apr 2007, 01:37 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg