Posts

Showing posts from April 15, 2019

How to import CSV file programatically from another directory?

Image
0 I am trying to import CSV file programmatically for orders. My files are located on another location of the same server... How to achieve this? orders import csv magento2.2.6 share asked 8 mins ago rohan.katkar rohan.katkar 108 5 add a comment  |  0 I am

Assay, Indre-et-Loire

Image
An Assay amo in usa ka komyun ha departamento han Indre-et-Loire ngan ha Rehiyon Sentro ha nasod han Fransya. k h l Mga komyun ha departamento han Indre-et-Loire Abilly  · Ambillou  · Amboise  · Anché  · Antogny-le-Tillac  · Artannes-sur-Indre  · Assay  · Athée-sur-Cher  · Autrèche  · Auzouer-en-Touraine  · Avoine  · Avon-les-Roches  · Avrillé-les-Ponceaux  · Azay-le-Rideau  · Azay-sur-Cher  · Azay-sur-Indre  · Ballan-Miré  · Barrou  · Beaulieu-lès-Loches  · Beaumont-en-Véron  · Beaumont-la-Ronce  · Beaumont-Village  · Benais  · Berthenay  · Betz-le-Château  · Bléré  · Bossay-sur-Claise  · Bossée  · Le Boulay  · Bourgueil  · Bournan  · Boussay  · Braslou  · Braye-sous-Faye  · Braye-sur-Maulne  · Brèches  · Bréhémont  · Bridoré  · Brizay  · Bueil-en-Touraine  · Candes-Saint-Martin  · Cangey  · La Celle-Guenand  · La Celle-Saint-Avant  · Céré-la-Ronde  · Cerelles  · Chambon  · C

Magento 2 Write to CSV within Controller

Image
0 I have the following code: protected $_fileSystem; protected $_directoryList; public function __construct( MagentoFrameworkFilesystem $fileSystem, MagentoFrameworkAppFilesystemDirectoryList $directoryList ) { $this->_fileSystem = $fileSystem; $this->_directoryList = $directoryList; parent::__construct($context); } public function execute(){ $this->writeToCSV(); } private function writeToCSV(){ try{ $media = $this->_fileSystem->getDirectoryWrite($this->_directoryList::MEDIA); $media->writeFile('text.txt', 'test'); } catch(Exception $e){ echo($e->getMessage()); } } However, this doesn't seem to be writing anything to the text file that exists within the same folder as the contro