- install this export library and add this :
# config/services.yaml
services:
sylius.exporter.plugin.resource.orders:
class: CoopTilleuls\SyliusClickNCollectPlugin\Exporter\Plugin\OrderResourcePlugin
arguments:
- "@sylius.repository.order"
- "@property_accessor"
- "@doctrine.orm.entity_manager"
- "@sylius.service.address_concatenation"
- "@sylius.exporter.orm.hydrator.orders"
# config/services.yaml
services:
sylius.exporter.pluginpool.orders:
class: FriendsOfSylius\SyliusImportExportPlugin\Exporter\Plugin\PluginPool
arguments:
- ["@sylius.exporter.plugin.resource.orders"]
- ["Number", "ClickNCollect_Location_Name", "ClickNCollect_Location_Countrycode", "ClickNCollect_Location_Street", "ClickNCollect_Location_City", "ClickNCollect_Location_PostCode", "ClickNCollect_Pin", "ClickNCollect_CollectionTime" ]
# config/services.yaml
services:
sylius.exporter.orders.csv:
class: FriendsOfSylius\SyliusImportExportPlugin\Exporter\ResourceExporter
arguments:
- "@sylius.exporter.csv_writer"
- "@sylius.exporter.pluginpool.orders"
- ["Number", "ClickNCollect_Location_Name", "ClickNCollect_Location_Countrycode", "ClickNCollect_Location_Street", "ClickNCollect_Location_City", "ClickNCollect_Location_PostCode", "ClickNCollect_Pin", "ClickNCollect_CollectionTime" ]
- "@sylius.exporters_transformer_pool"
tags:
- { name: sylius.exporter, type: sylius.order, format: csv }
To finish adding these services will overwrite the services of the same name already present by the import export plugin of sylius
The basic definitions provided by the export plugin is available here :
Here is the list of available fields:
- ClickNCollect_Location_Name
- ClickNCollect_Location_Countrycode
- ClickNCollect_Location_Street
- ClickNCollect_Location_City
- ClickNCollect_Location_PostCode
- ClickNCollect_Pin
- ClickNCollect_CollectionTime