embitel / csvimport
A reusable Pimcore bundle for custom features
Requires
- php: >=8.1
- pimcore/pimcore: ^10.5 || ^11.0
README
The CSV Import bundle helps you import product data (including names, SKUs, prices, categories) from a CSV file into Pimcore objects. Upload CSV via user panel
Features
- Upload CSV via user panel
- Import via console command
- Map CSV columns to object fields
- Validation for required field
Getting started
Please check the updated version here https://packagist.org/packages/embitel/csvimport sudo composer require embitel/csvimport
Edit the project root/composer.json file and register the bundle namespace in the "autoload: psr-4" section
Add this in composer.json
"autoload": {
"psr-4": {
"Embitel\\ImportProductCsvBundle\\": "vendor/embitel/csvimport/src"
}
}
Execute this command composer dump-autoload
We need to registered bundle in config/bundles.php
Embitel\ImportProductCsvBundle\EmbitelImportProductCsvBundle::class => ['all' => true]
$ sudo php bin/console pimcore:bundle:list $ sudo php bin/console cache:clear
Configuration:
We should select all required attributes along with optional attribute from this configuration.
Create one multiselect option and use embitel option provider.
csv file format:
sku name price color category quantity specialPrice hsnCode thumbnail imagegallery P1001 Red Shirt 19.99 red jerseys 12 11 121 https://contents.mediadecathlon.com/p2154164/73698deddacfd12d401b7b8262b0b948/p2154164.jpg https://contents.mediadecathlon.com/p2154164/73698deddacfd12d401b7b8262b0b948/p2154164.jpg,https://contents.mediadecathlon.com/p2379979/k$9b10d2a96659fb03dfa9a243913e38c7/size-4-football-sunny-300-green.jpg,https://contents.mediadecathlon.com/p2880247/k$30f31f4876fbb4a4ca4b53e0ef7d6c9c/mini-football-sunny-300.jpg P1002 Blue Jeans 49.95 red jerseys 12 11 111 https://contents.mediadecathlon.com/p2379979/k$9b10d2a96659fb03dfa9a243913e38c7/size-4-football-sunny-300-green.jpg P1003 White Sneakers 89 red jerseys 12 11 343 https://contents.mediadecathlon.com/p2880247/k$30f31f4876fbb4a4ca4b53e0ef7d6c9c/mini-football-sunny-300.jpg