3 replies [Last post]
japerry@drupal.org's picture
Offline
Bug FinderGetting busy with the Ubercode.Not Kulvik
Joined: 08/08/2007
Juice: 248
Was this information Helpful?

Hey guys, so over the weekend I worked on a transactions (txnid) script to convert our ec_system over to ubercart.

Attached is the VERY ALPHA script. Some notes:

1) This is tested on a CLEAN ubercart database -- you should NOT use this script to convert an ec database to ubercart with data already in it!
2) This is tested only on POSTGRES, YMMV with MySQL.
3) It'd be cool to put this conversion script inside the 'import/export' tools in ubercart someday. But right now its a standalone script (like cron.php)
4) Payments from Authorize.net and Purchase Orders are only converted
-- Look in support for the Purchaseorder Patch
5) This is a script for those only who are well versed with PHP and SQL.
6) This script has not been optimized whatsoever -- I imported 2000 txns fine--but I have no clue what will happen with more.

INSTALL NOTES:
1) unzip/tar the script to your DOCROOT
2) make sure you have ubercart version ALPHA7 installed with the Authorize.Net and Credit card payment modules installed (plus all the core modules)
3) execute the script
-- if you have DEBUG=TRUE you will see tables spit out the data from ec and how it should look in uc
4) check your Store Administration utility for your orders--hope they're there!

Comments, patches, or suggestions? let me know

TODO:
Product import? I dunno, the products in Ubercart look way different than in ecommerce so I don't know if this will be possible.

PreviewAttachmentSize
ec_ubercart_convert.tar.gz3.45 KB
Ryan's picture
Offline
Joined: 08/07/2007
Juice: 15438
Re: IMPORT ecommerce txnid to ubercart orders script

Awesome work. You may be able to piggy back on some work Lyle has done to import products from osCommerce. He uses an XML schema to bring them in that I'm sure you could use to export your e-commerce product nodes.

mimetic2's picture
Offline
Joined: 08/07/2007
Juice: 478
Ryan- Is there a script to

Ryan-

Is there a script to convert osCommerce to ubercart?

Lyle's picture
Offline
AdministratoreLiTe!
Joined: 08/07/2007
Juice: 6846
Re: Ryan-

Yes there is. I built this script based solely on the way our osC store had been set up, so you may need to do things differently. There are a couple of lines that need to be changed for each domain. Search the file for "www.example.com" and put your site in. The first occurrence points to the image folder. The second should point to wherever you put this script. I had it in the administration section, so I left that as a suggestion.

I used this script to import all of the products in our coffee maker site and the True equipment in our True parts store.

AttachmentSize
osC-export.php_.txt 8.17 KB