Hot answers tagged

19 votes

How to use Quotation mark in translation CSV Magento 2

you have to double the quotes in your language file. "Check ""Remember Me"" to access","Check ""Remember Me"" to access" | \| \| | | | | | | |...
Marius's user avatar
  • 198k
19 votes
Accepted

Read input csv file and convert it to array

In your controller file that $postUrl points to: protected $csv; public function __construct( \Magento\Framework\File\Csv $csv ) { $this->csv = $csv; } //The function name should match ...
PY Yick's user avatar
  • 2,695
11 votes
Accepted

Admin Grid - Remove columns from export

Got it, if set is_system true for a column, it will not be exported.So $this->addColumn('customer_name', array( 'header' => Mage::helper('sales')->__('Customer'), 'index' ...
Abdul Ghaffar's user avatar
11 votes
Accepted

Magento 2: Import multiple select attribute values using CSV

You can do this by just add multiple values by any separator and add that separator in Multiple value separator field. like this val1|val2|val3 check this screenshot. https://prnt.sc/ics5ur if you ...
Rakesh Varma's user avatar
  • 2,196
8 votes
Accepted

Product custom attribute import with CSV Magento 2

Upload from the default CSV generated by Magento Yes, you need to fill all your custom attributes into the single-column named additional_attributes_code. Just simply put all your custom attributes ...
Abhishek Tripathi's user avatar
8 votes
Accepted

Magento 2 Write to CSV within Controller

Try Following way, <?php protected $filesystem; protected $directoryList; protected $csvProcessor; public function __construct( \Magento\Framework\File\Csv $csvProcessor, \Magento\...
Rakesh Donga's user avatar
  • 5,324
7 votes
Accepted

Can i use dataflow import to update products

Here's the steps I follow when running updates through Dataflow: Export all products via 'Export All Products' Dataflow profile. System -> Import/Export -> Dataflow - Profiles -> 'Export All ...
Muzza's user avatar
  • 525
7 votes

CSV Import: How can I import related products in Magento 2?

We've experienced the same issue, it seems import module has some kind of bug with related products We've solved it by writing a new console command which expects a 2 columns (parent sku & ...
Raul Sanchez's user avatar
  • 3,174
7 votes
Accepted

How to use Quotation mark in translation CSV Magento 2

Did a little bit of digging for this found it here: vendor/magento/module-persistent/i18n/en_US.csv The line states: "Check &quot;Remember Me&quot; to access your shopping cart on this ...
Atish Goswami's user avatar
6 votes
Accepted

magento 2: 'i18n:collect-phrases' command creates different csv files

The CSV with 4 columns is the global CSV for all modules. That's why it contains 3rd column as module and 4th column as Module_Name.This file should be placed in i18n folder parallel to app. The CSV ...
Gulshan's user avatar
  • 569
6 votes
Accepted

Magento 2: Create downloadable CSV

You should try with \Magento\Framework\App\Response\Http\FileFactory::create(). Take a look import export module you can see how it works: vendor/magento/module-import-export/Controller/Adminhtml/...
Khoa TruongDinh's user avatar
6 votes

Magento 2: Create downloadable CSV

This is not a new answer this is just addition to Khoa TruongDinh answers which helps me lot to solve my issue. when we use above syntax second parameter would be data which we want to put in a csv. ...
Ashish Madankar M2 Professiona's user avatar
6 votes
Accepted

Magento 2 : Priority of translation, proper way

Currently, language pack translations have priority over theme translations. This is going to be fixed in Magento 2.2, see https://github.com/magento/magento2/pull/7142
Fabian Schmengler's user avatar
6 votes

magento 2 / can't set addImageToMediaGallery path

In Magento 2, the root folder is not by default accessible. You need to put your testimg folder in pub/media to make it work. Move your folder to pub/media and update your code like below. Here you ...
Jaimin Sutariya's user avatar
6 votes
Accepted

Import Product Dimensions (Length, Width, Height) in Magento 2

I found the correct headings to use by searching the attributes table of the database. Here are the headings to use, in case you find this searching like I was: ts_dimensions_length ...
iJeep's user avatar
  • 621
5 votes
Accepted

Import of product via CSV (need to update, not replace, not append)

You should use the "append" mode, but exclude everything from your CSV file which is already in the shop, i.e. the images. Only include the data you want to update and the SKU.
Andreas von Studnitz's user avatar
5 votes

Remove var Translator = new Translate from <head> section

I have to agree with you that this is minimally not 'good' for SEO. Magento has to make sure that inline JS is made to a bare minimun. That this is inline JS is just lazy programming. We put this JS ...
Wouter Steenmeijer's user avatar
5 votes

Magento 2.1.2 - Importing multiselect attribute values from CSV

It is not currently natively supported by Magento. I found a workaround to manage it. I add multi-select new options dynamically during CSV validation. It works for manual import and Schedule EE ...
Franck Garnier's user avatar
5 votes
Accepted

Magento :Write form data to csv file

Set Dir path $path = Mage::getBaseDir('var') . DS . 'export' . DS; $name = 'yourFileName'; $file = $path . DS . $name . '.csv'; and save it $var_csv->saveData($file, $data_row); so it will be ...
Priyank's user avatar
  • 7,602
5 votes

Product custom attribute import with CSV Magento 2

I have made one more test case and tried to upload with the name of attribute in csv. Instead of "additional_attributes" I have directly added name of a column and tried to upload value of a custom ...
Dhaval Solanki's user avatar
5 votes

Read input csv file and convert it to array

This it the controller file to save/read imported CSV data: <?php namespace VendorName\ModuleName\Controller\Adminhtml\Pincode\Import; use Magento\Framework\App\Filesystem\DirectoryList; class ...
Ronak Chauhan's user avatar
5 votes
Accepted

How to Create a excel file in custom module?

In Magento 2 Native, One php class \Magento\Framework\App\Response\Http\FileFactory is used for create csv and download CSV by magento way. create() function in FileFactory.php is used for create CSV ...
Shafeel Sha's user avatar
  • 1,375
5 votes
Accepted

How to get particular column data from the CSV?

Please try following way so you get email column data <?php $file = fopen('example.csv', 'r'); $c = 0; while (($line = fgetcsv($file)) !== FALSE) { //$line is an array of the csv elements $c++...
Chirag Gondaliya's user avatar
4 votes
Accepted

How to import not confirmed customers via CSV import?

After debugging the import I found out that there is a function addSystemHiddenFilterWithPasswordHash() which is called in the _initAttributes() method of ...
Anna Völkl's user avatar
  • 17.3k
4 votes
Accepted

magento can't upload large csv file

It's not Magento but PHP/server settings that are the issue. By default PHP has a much smaller max file and post size. Check out this article on uploading large files. Via your htaccess you can ...
Sander Mangel's user avatar
4 votes

.csv tax file only uses the *last* line of the file for tax rates

Only the last line of the file is importing because you are using the same 'code' for 2 different tax rates. In the tax rates table 'code' is a unique field (like 'sky' is to a product) and therefore ...
JohnHughes1984's user avatar
4 votes

Adding images with CSV import

You must have to specify the _media_attribute_id and _media_image attribute. Without using these two attributes, you cannot import images properly. So the right CSV format for images import is as ...
Muhammad Saeed Khan's user avatar
4 votes
Accepted

Import & Export all categories using csv file (without extension)

Not using any extensions is limiting you, but you could use Import/Export with products because missing categories will be created when you import products. Afterwards, delete the created products. ...
Fabian Schmengler's user avatar
4 votes

Import & Export all categories using csv file (without extension)

If you want to import all categories and products to your website,just follow the following instructions. Create all categories and create one product in your website, After this, export that data ...
Teja Bhagavan Kollepara's user avatar
4 votes

Mass password reset after Importing customers via CSV

You can write a script that gets all the newly imported customers and then it generates a new password and sends an email to your customers try this: $customers = Mage::getModel('customer/customer') ...
lloiacono's user avatar
  • 3,386

Only top scored, non community-wiki answers of a minimum length are eligible