function importVehicleBolts($stringData)
 {
     $csvFile = TEMP_PATH . '/bolt-definitions.csv';
     file_put_contents($csvFile, $stringData);
     $importer = new Elite_Vafwheel_Model_Importer_Definitions_Bolts($csvFile);
     $importer->import();
 }
 function import($data)
 {
     $this->csvData = $data;
     $this->csvFile = TEMP_PATH . '/bolt-definitions-range.csv';
     file_put_contents($this->csvFile, $this->csvData);
     $importer = new Elite_Vafwheel_Model_Importer_Definitions_Bolts($this->csvFile);
     $importer->import();
 }
 function __construct()
 {
     parent::__construct();
     if (isset($_FILES['file']['error']) && $_FILES['file']['error'] === 0) {
         $importer = new Elite_Vafwheel_Model_Importer_Definitions_Bolts($_FILES['file']['tmp_name']);
         $importer->import();
         $this->messages = 'done';
     }
     $this->setTemplate('vf/vaf/boltpatterns.phtml');
 }
    function doSetUp()
    {
        $this->switchSchema('make,model,option,year');
        $this->csvData = 'make, model, option, year_start, year_end, bolt_pattern
honda, civic, EL, 2000, 2002, 4x114.3
acura, integra, base, 2000, 2003, 5x114.3';
        $this->csvFile = TEMP_PATH . '/bolt-definitions-range-MMOY.csv';
        file_put_contents($this->csvFile, $this->csvData);
        $importer = new Elite_Vafwheel_Model_Importer_Definitions_Bolts($this->csvFile);
        $importer->import();
    }
Пример #5
0
    function doSetUp()
    {
        $this->switchSchema('year,make,model');
        $this->csvData = '"make","model","year_start","year_end","bolt pattern"
honda, civic, 2000, 2002, 1x114.3
acura, integra, 2000, 2003, 2x114.3';
        $this->csvFile = TEMP_PATH . '/bolt-definitions-range.csv';
        file_put_contents($this->csvFile, $this->csvData);
        $importer = new Elite_Vafwheel_Model_Importer_Definitions_Bolts($this->csvFile);
        $importer->import();
    }