CSV Import/Export Add-On
Bulk manage pricing data via CSV files (import + export).
Overview
The CSV Import/Export add-on provides:
- CLI commands to import/export data per price type
- Magento Import/Export entities (System > Data Transfer > Import)
- CSV downloads on the My Prices page are provided by the base price-type modules (see My Prices)
This is a per-module add-on: install it only for the price types you use.
Installation
Install the add-on for each module you need:
composer config bearer.repo.softwaresilo.io composer config repositories.softwaresilo composer https://repo.softwaresilo.io/ composer require mageb2b/pricesystem-customerprice-importexport:* composer require mageb2b/pricesystem-categoryprice-importexport:* composer require mageb2b/pricesystem-pricelist-importexport:* composer require mageb2b/pricesystem-productcustomermatrix-importexport:* php bin/magento setup:upgrade php bin/magento cache:flush Import/Export In Admin (Magento ImportExport)
You can import via Magento's built-in importer:
- Go to System >Data Transfer > Import
- Choose one of the entity types below
- Upload a CSV and run the import
Entity types (as they appear in Magento):
- Pricesystem Customerprice
- Pricesystem Categoryprice
- Pricesystem Categoryprice Customergroup
- Pricesystem Pricelist
- PricesystemProductCustomerMatrix
Tip: If you are unsure about the exact column names for your version, do an export first and use the exported CSV as your template.
Import/Export Via CLI
php bin/magento pricesystem:import-customerprice /path/to/customerprice.csv php bin/magento pricesystem:export-customerprice php bin/magento pricesystem:import-categoryprice /path/to/categoryprice.csv php bin/magento pricesystem:export-categoryprice php bin/magento pricesystem:import-categoryprice-customergroup /path/to/categoryprice_customergroup.csv php bin/magento pricesystem:export-categoryprice-customergroup php bin/magento pricesystem:import-pricelist /path/to/pricelist.csv php bin/magento pricesystem:export-pricelist php bin/magento pricesystem:import-productcustomermatrix /path/to/productcustomermatrix.csv php bin/magento pricesystem:export-productcustomermatrixUseful CLI Options
Imports support common ImportExport flags (example):
php bin/magento pricesystem:import-customerprice /path/to/customerprice.csv \ --behavior=add_update \ --field_separator=, \ --fields_enclosure='"'Exports support output path + CSV formatting (example):
php bin/magento pricesystem:export-customerprice \ --export_path=var/export/customerprice.csv \ --field_separator=, \ --fields_enclosure='"'Customer CSV Download (My Prices)
If enabled, customers can download their prices from My Account >My Prices.
CSV formatting for downloads is configured per price type:
- delimiter:
pricesystem/(note the spelling)/csv_delimeter - enclosure:
pricesystem//csv_encloser
Best Practices
- Validate before import: Run Magento's import validation (System > Data Transfer > Import) before you import into production
- Backup existing data: Export before bulk updates
- Use staging: Test imports in staging environment
- Small batches: For large imports, split into batches
- UTF-8 encoding: Always save CSV as UTF-8
