0

In Magento 2.3, I am importing data from the .xml file. The product name, SKU and product description i can import via cron job but I cannot import the product image. Can you help me?

Thanks in Advance!

  • share the cronjob script you have used to import product details – aravind Jul 16 '19 at 12:32
  • $product->addImageToMediaGallery($filePath, array('image', 'small_image', 'thumbnail'), false, false); $product->save(); – Nilesh Patel Jul 16 '19 at 12:52
  • What is the format of $filePath? – Dominic Xigen Jul 17 '19 at 0:11
  • It's absolute path – Nilesh Patel Jul 17 '19 at 6:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.