• Blog
  • How to create task to import additional n images for products based on nopCommerce Sync Plugin

How to create task to import additional n images for products based on nopCommerce Sync Plugin

  • 12:47:37 PM
  • Friday, July 24, 2020

Case: only first image imported from Excel file. How can i add additional images?

1. Please create additional Product picture tasks to import Picture2, Picture3 and so on in your config file


{
  "Name": "Import ProductPicture2",
  "NopKeyGroup": "Product_Picture_Mapping",
  "DtoSystemName": "DTOProductPicture",
  "Timeout": 6000,
  "DataSource": "ProductPicture",
  "SqlScriptPath": "~/Plugins/DevPartner.Sync/SqlScripts/Catalog/DP_MergeProductPictureScript.sql",
  "MappingFields": [
    {
      "SourceField": "Sku",
      "EntityField": "ProductExtId",
      "ConversionName": "VendorConvertion"
    },
    {
      "SourceField": "Picture2",
      "EntityField": "PictureExtId",
      "ConversionName": "Picture"
    }
  ]
},
{
  "Name": "Import ProductPicture3",
  "NopKeyGroup": "Product_Picture_Mapping",
  "DtoSystemName": "DTOProductPicture",
  "Timeout": 6000,
  "DataSource": "ProductPicture",
  "SqlScriptPath": "~/Plugins/DevPartner.Sync/SqlScripts/Catalog/DP_MergeProductPictureScript.sql",
  "MappingFields": [
    {
      "SourceField": "Sku",
      "EntityField": "ProductExtId",
      "ConversionName": "VendorConvertion"
    },
    {
      "SourceField": "Picture3",
      "EntityField": "PictureExtId",
      "ConversionName": "Picture"
    }
  ]
},

2. Add additional tasks to your import task "DevCommerce.Sync" -> "ScheduleTasks"


"ScheduleTasks": [
  {
    "Name": "Sync schedule task",
    "Tasks": [
      "Import products",
      "Import ProductPicture",
      "Import ProductPicture2",
      "Import ProductPicture3",
      "Import product tags",
      "Import product categories"
    ]