Sunday, February 10, 2013

How to Migrate Magento Products into K2 Items (Joomla)

Whenever we need to transfer any database from one program to another program, we just need to study the Targeted program Tables (schema) then we have to transform our data according to targeted tables (schema) by following this approach we can transfer any data into any program as I have done with
Magento to K2 joomla transfer.


How to Migrate Magento Products into to K2 Items (Joomla)
-------------------------------------------------------------------

1..Go into joomla database from phpmyadmin and open k2_items table and see how many field are there.
 
2..Make an excel file and type all field name into columns.

3..paste at least one record for all fields from phpmyadmin (so you will be able to examine the   

recording format.)

4..you may have to make extra filed in K2 to match you data fields in magento.
  
3..Export all Product from Magento back-end panel from Export.
   (if your database is too big so you can partially export products then
    import all in excel)

4..sort all your magento product in excel by using filter and delete unnecessary columns.

5..Now we need to prepare our k2_items tables.
(MS Excel filter is the best tool for transforming data that I use mostly)


(in K2_items records you will see that extra fields records are enter in "one" field with code

[{"id":"16","value":""},{"id":"17","value":"1"},{"id":"19","value":"3137 Lorna Rd"},

{"id":"20","value":"Birmingham"},{"id":"21","value":"35216"},{"id":"22","value":"1"},

{"id":"23","value":"(205) 822 8224"},{"id":"24","value":""},{"id":"25","value":""}]    


the above mention code filed name are as below for example: (your field name will be different)

Contact Person: [{"id":"16","value":"Rameez"},
State:         {"id":"17","value":"29"},            (this is drop down list 29 is for Hawaii)
Address :    {"id":"19","value":"230 Highway 34"},
City:        {"id":"20","value":"Aberdeen"},
Zip Code:    {"id":"21","value":"07747"},
Country:    {"id":"22","value":"1"},
Phone1:        {"id":"23","value":"732-290-1900"},
Phone2:     {"id":"24","value":"732-290-1901"},
Email:        {"id":"25","value":"rameez@aol.com"}]
(you can see the IDs and name of extra field from the record easily by K2 Items in backed)


So you will have to make this code by using excel merge columns technique as follows)

    Merge columns of data without spaces between the data: =A1&B1&C1&…
    Merge columns of data with spaces between the data: =A1&" "&B1&" "&C1&…

see following link for a better understanding
http://www.extendoffice.com/documents/excel/510-merge-columns-keep-data.html


6..copy and paste all Magento product filed into corresponding filed of K2 accordingly.

7..copy and paste all others default values of k2 into k2_items columns in each record.

8..save as this excel file into csv format.


9..Now import this file into a k2_items table by using phpmyadmin panel.


Troubleshooting:
--------------------
If you found any error importing csv file into phpmyadmin
THEN save excel file into sql format AND import it again.


the above mention approach is applicable for all manually transfer of databases
From any program to any program.

No comments:

Post a Comment