Jump to content

Archived

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

fresco

Moving osCommerce 2.2-MS2 to New site with fresh 2.3.3.4

Recommended Posts

I am partially duplicating my old shop running 2.2-MS2 to a new server. I will leave the old shop running as it was for the time being - old version of php.

 

On a new server I will be running 2.3.3.4 (theme I want to use is set on that release - I will upgrade when author confirms compatibility). 

 

I only need to import Products (50), Customers (preferred), Orders (optional) from the old shop.

I am not sure at all how to do that - my MySQL skills are not even basic - can follow step-by-step instructions that's about it.

 

I have modded, customized and installed a bunch of ad-ons to the old shop, that still runs perfectly myself, but that was 11 years ago :)

Share this post


Link to post
Share on other sites

I suppose I did not ask the question - no replies

 

Can someone help with steps on exporting products, just the contents to sql or exel?, and then importing it to the new database?

 

what tables and what setting in phpMy Admin i need to use?

Share this post


Link to post
Share on other sites

Thanks De Dokta!

 

I actually have downloaded the adon to convert 2.2 to 2.3 http://addons.oscommerce.com/info/8731

 

The problem is, I need to duplicate/move products and customers only, my old site is heavily modded with a lot of running addons, like articles, affiliates and other stuff that I do not have/need on a new site and don't think moving tables that will immediately become "dead tables" is a right thing to do. I am sort of starting from scratch with new template and new addons. I just wanted to save time on not manually entering about 60 products and, if possibly customers about 600, I don't even need order history although I might conceder doing the orders also if it is simple.

As a minimum if I could only products I would be a happy camper :)

Share this post


Link to post
Share on other sites

Easiest way is to clone your old database and also make a brand new 2.3.4 database

 

example: compare the Table: customers old_CLONED database  and Table: customers new database a standard 2.3.4 install with no addons as 11 rows  go to your old cloned database (Table: customers old) compare the rows if they match fine if you have extra rows because of an addon drop the extra rows until the database match then export the table make sure your new Table: customers database is empty and import the old customer using the SQL field you do not need the bit at the start

-- phpMyAdmin SQL Dump
-- version 4.1.8
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Jul 27, 2014 at 09:51 PM
-- Server version: 5.5.36-cll
-- PHP Version: 5.4.23

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";


/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;

--
-- Database: xxxxx_old`
--

-- --------------------------------------------------------

--
-- Table structure for table `customers`
--

CREATE TABLE IF NOT EXISTS `customers` (
  `customers_id` int(11) NOT NULL AUTO_INCREMENT,
  `customers_gender` char(1) DEFAULT NULL,
  `customers_firstname` varchar(255) NOT NULL,
  `customers_lastname` varchar(255) NOT NULL,
  `customers_dob` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `customers_email_address` varchar(255) NOT NULL,
  `customers_default_address_id` int(11) DEFAULT NULL,
  `customers_telephone` varchar(255) NOT NULL,
  `customers_fax` varchar(255) DEFAULT NULL,
  `customers_password` varchar(60) NOT NULL,
  `customers_newsletter` char(1) DEFAULT NULL,
  `customers_pricelist_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`customers_id`),
  KEY `idx_customers_email_address` (`customers_email_address`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=43 ;

--
-- Dumping data for table `customers`
--

you do not need this bit at the end if it is there

/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;

just the bit starting with

INSERT INTO `customers` (`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`, `customers_pricelist_id`) VALUES
 

and ending with an ;  last customer

(42, NULL, 'xxx', 'xxxx', '0000-00-00 00:00:00', 'xxxxx@hotmail.com', 46, '123456', '', '$P$D.5kHmJDzrHslBXSwz4Wyv6vLViTPo.', '', NULL);

 

 

**********************************************************

 

Do the same with all the data you would like to save category products etc  and don't forget Table: products_to_categories  towards the end many people do :D

 

Regards

Joli


To improve is to change; to be perfect is to change often.

 

Share this post


Link to post
Share on other sites

Or a little bit more comfortable: Run the above mentioned add-on on a COPY of your old database, install a new oscommerce with new database. And then copy the tables you want/need (address_book, customers, customers_xxx, products. products_xxx) to your new database using a tool like mysqldumper.

 

J.J.

Share this post


Link to post
Share on other sites

Hi Fresco -

 

I just made a little guide to help you out, geared for "dummies" like me.  I am a complete hack and need things spoon fed as if I know absolutely nothing so it's aimed at people like me.  I'm assuming you have phpMyAdmin.  If you don't then download it and install it, especially if you're an SQL noob.  It has saved my life more times than I can count, and it's a great way to learn mySql since most of the stuff it does it shows you the mySql while it does it. 

 

Here's my tutorial: http://goo.gl/cP08Ds

 

Share this post


Link to post
Share on other sites

×