|
I am going to give you an overview, but the scope of your request really lies in how OOP works.
You need to include this file in your imprort script. You need to instantiate the class by doing something like:
$product = new Product();
Then you need to cycle through each of your mysql records using a foreach…
Inside the for each set up an array of product attributes
foreach ($result as $item)
{
$data = array(
‘sku’ => $sku,
‘name’ => $name,
‘price’ => $price],
‘weight’ => $item[’weight’],
‘category_ids’ => $categoryIds,
‘style’ => $item[’model’]
);
$product->createSimpleProduct($data);
}
You are going to have to customize the class file to accept any variables that differ from what the class file uses. I contributed my exact use of this class file, but haven’t been able to find the time to make it very generic yet.
Once you learn OOP and database functions using PHP this will seem much easier. Another big hill to climb is learning how to set and get magento product attributes like price, color, etc… Let me know if you need anything else.
|