Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

extend ProductProcessor to import products with variants #265

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 19 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ fos_sylius_import_export:
* customer (csv, excel, json)
* product (csv)

## Example import files
### Example import files

See the fixtures in the Behat tests: `tests/Behat/Resources/fixtures`

Expand Down Expand Up @@ -144,6 +144,24 @@ admin overview panel using the event hook system, ie. `admin/tax-categories/`.

$ bin/console sylius:export-to-message-queue country

### Product (and variants) import

The `tests/Behat/Resources/fixtures/products_and_variants.csv` file shows an example on how products and its variants
can be managed in the CSV file.

The product options need to exist already, they won't be created automatically.

The main idea is using the `Parent_Code` column which makes the connection from a product variant to its main product.
If no `Parent_Code` is set, it simply creates a new product entry.

Product variants rows don't need to repeat the common main product data such as `Name`, `Description` or the product attributes
because they will be taken from the main product.

To create the different product variants by defining the product options,
you need to add a column with the prefix `Product_Option_[PRODUCT_OPTION_CODE]` and fill in the correct option values.

Optionally, you can also set the corresponding tax category code in the `tax_category_code` column.

## Development

### Adding new importer types
Expand Down
1 change: 0 additions & 1 deletion node_modules

This file was deleted.

Loading