Comments (2)
@Morgy93 I'll check this, but in general, it's much more complicated for most of our users/customers to create CSV files using that more or less complex data format you're requesting. For most of them, it's much easier to create a CSV file with additional columns or rows. But I'll check it and see if there is any possibility, therefore.
from import-cli-simple.
Really? For me that has always been some pretty weird practice.
For PHP and especially with Magento (collections and so on) I think it's rather stressful to have to build csv data like this.
Easy:
foreach ($products as $product) {
fputcsv($handle, [
$product->getSku(),
$product->getName(),
implode('|', $product->getCategoryIds()),
...
]);
}
Just one weird example which should at least show that it can get pretty complicated real quick 😁 :
foreach ($products as $product) {
$categories = $product->getCategoryIds();
fputcsv($handle, [
$product->getSku(),
$product->getName(),
$categories[0],
...
]);
if (count($categories) > 1) {
foreach ($categories as $category) {
fputcsv($handle, [
'',
'',
$category,
...
]);
}
}
}
(After writing this I found out that it wouldn't even work like this with multiple array data .. but that should just make it even clearer 🤷♂ )
Just my two cents~
from import-cli-simple.
Related Issues (20)
- Still trying to parse composer,json for Magento edition, even we have a configuration file HOT 7
- Composer updates to wrong version HOT 3
- Integrity constraint violation: 1062 Duplicate entry for key 'URL_REWRITE_REQUEST_PATH_STORE_ID' HOT 6
- Integrity constraint violation: 1048 Column 'sku' cannot be null HOT 2
- Not mapped entity ID for SKU in variants_ HOT 5
- Make console output colorful HOT 7
- Extension Libraries configuration is not parsing HOT 3
- Events on Subjects not working
- GraphNavigator Error on Database Configuration HOT 2
- Magento 2.3.3 - Can't use product import with MSI modules disabled HOT 2
- logger/system.WARNING: Directory var/importexport/media/catalog/product doesn't exist HOT 1
- Call to a member function getSystemLogger() on null HOT 2
- Not importing sample data, ok file creation succeeded (Move file issue) HOT 1
- Product Custom Option Import is not working. HOT 2
- Can't use import:create:configuration-file
- Class "TechDivision\Import\Cli\Utils\DependencyInjectionKeys" not found HOT 2
- Fatal error: Uncaught Error: Call to undefined method Doctrine\Common\Annotations\AnnotationRegistry::registerLoader() HOT 1
- MSI Import does not update quantities in stock HOT 5
- Import path isn't set to magento root directory
- Product price is not validated
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from import-cli-simple.