Description
In this episode, you'll learn how to implement a custom product importer in Sylius, capable of handling complex product data including taxons, channels, translations, images, and variants with pricing, stock levels, and options.
You’ll build a fully functional importing mechanism based on structured DTOs and Symfony Serializer, which deserializes nested JSON data. By the end of this episode, you will know how to:
- Structure product data using DTOs (e.g., ProductDTO, ProductVariantDTO, ProductTranslationDTO)
- Create a custom Denormalizer to parse product JSON into objects
- Use dedicated assigners (TaxonAssigner, ChannelAssigner, ImageAssigner) to separate logic and improve maintainability
- Handle remote image downloading and storage
- Run a Symfony CLI command to import a complete product catalog into your Sylius store
Whether you're migrating from an ERP, integrating an external source, or managing a multichannel store — this approach gives you full control over product creation in Sylius.