Total Posts: 2
I\’m developing a script that imports product data from a 3rd party. I\’m using Magento 22.214.171.124 and upgrade to the most recent version is not an option right now.
Essentially, everything in the product imports correctly, except the images.
For the images, I\’m running this code:
$product = Mage::getModel('catalog/product')->load($existingProductId);
$product->addImageToMediaGallery ($local_file, array ('image', 'small_image', 'thumbnail'), false, false);
The function does pass correctly, and when inspecting the $product variable, I can confirm my images are there. Also, the images are correctly moved to the /media/catalog folder and rows in the table mage_catalog_product_entity_media_gallery are correctly inserted.
However, when I go into the product in Magento backend, the \"Images\" section does not display them (I checked the other stores and they are not there either). Am I missing something ?
Thanks in advance !!