예제 #1
0
 function main()
 {
     if (!$this->lastArgument()) {
         echo 'vfmagento importvehicles <filename>' . "\n";
         exit;
     }
     $file = $this->lastArgument();
     $writer = new Zend_Log_Writer_Stream('vehicles-list-import.csv.log');
     $log = new Zend_Log($writer);
     $importer = new VF_Import_VehiclesList_CSV_Import($file);
     $importer->setLog($log);
     $importer->import();
 }
<?php

/**
 * Vehicle Fits
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Open Software License (OSL 3.0)
 * that is bundled with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * http://opensource.org/licenses/osl-3.0.php
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to sales@vehiclefits.com so we can send you a copy immediately.
 *
 * DISCLAIMER
 *
 * Do not edit or add to this file if you wish to upgrade Vehicle Fits to newer
 * versions in the future. If you wish to customize Vehicle Fits for your
 * needs please refer to http://www.vehiclefits.com for more information.
 * @copyright  Copyright (c) 2013 Vehicle Fits, llc
 * @license    http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
 */
require_once 'config.php';
$file = 'vehicles-list-import.csv';
$writer = new Zend_Log_Writer_Stream('vehicles-list-import.csv.log');
$log = new Zend_Log($writer);
$importer = new VF_Import_VehiclesList_CSV_Import($file);
$importer->setLog($log);
$importer->import();