Transfer product data from opencart to magento

I have a cart site based on opencart.

Now I would like to convert it to a magento site.

I did a new magenta setting. Now I need to transfer the data from my opencart database to the new magento database.

So can someone give me table names and tell me what should I do for a successful migration?

thank

+5
source share
2 answers

Primarily

Rate what you want to import into Magento. The clearer the answer to the qestion question, the easier it will be to evaluate your options.

( ), script ( script ), SQL ( , SQL) ( ).


, csv , / opencart CSV, - . ( ).

, , , , . XLS, CSV , .

script

, script Magento. , :

<?php
//place this file in the Magento root, e.g. ./import.php, "." being you Magento root
//load the magento app with the admin store 
require_once('app/Mage.php');
Mage::app()->setCurrentStore(Mage_Core_Model_App::ADMIN_STORE_ID);

//data import, I assume you can write some sort of input for this $data like reading a zip file or some other format, i here, I assume, this $data array holds arrays of products ($new_product) containing information on a product from open cart
$data = ...

// loop over the data and create the Magento models, these can include products, customers, etc. - for simplicity this is done for products, but can be done for every other data object in magento
foreach ($data as $new_product) {
    //load an empty Magento product model
    $product = Mage::getModel('catalog/product');

    //set the attributes you want
    $product->setData('sku', $new_product['sku']);
    $product->setData('name', $new_product['name']);

    .
    .
    . 
    //save it
    try {
        $product->save();
    }
    catch(Exception $e) {
        Mage::logException($e);
        continue;
    }
}

Mage_Catalog_Model_Product, Mage_Sales_Model_Order Mage_Customer_Model_Customer . Magento :

  • Mage_Catalog_Model_Product Mage::getModel('catalog/product')
  • Mage_Catalog_Model_Category Mage::getModel('catalog/category')
  • Mage_Customer_Model_Customer Mage::getModel('customer/customer')
  • Mage_Sales_Model_Order Mage::getModel('sales/order')

- Magento.

, ./app/code/core/Mage/ Model, , . Mage_Catalog_Model_Product ./app/code/core/Mage/Catalog/Model/Product.php.

init, _construct ( PHP __construct!), , Mage::getModel().

. Magento.

, Magento. , .

The're - Magento. , Magento, .

SQL

SQL Magento.

. SQL Magento, script, Magento.

, , script, , . , , Magento Connect. , , .

.

script, Magento. , .

- , :)

+10
0

All Articles