Suppose you accidentally deleted a bunch of products, but the images are still in the media / catalog / product folder. For example, this can happen if you accidentally delete a set of attributes because it takes products with you. Suppose you want to export these products from your intermediate environment and return to production. You go to the data stream during production, export, and then during the production process, temporarily change this file:
code / kernel /Mage/Catalog/Model/Convert/adapter/product.php
Change line 775 to
$ arrayToMassAdd, Mage :: getBaseDir ('media'). DS./ Product Catalog / ',
When you're done, change it to
$ arrayToMassAdd, Mage :: getBaseDir ('media'). DS. 'Import',
What this will do is import the product images from where they were. The csv that you export from your staging environment will reference the image in / l / a / etc etc., so it will work.
Do not forget the '/' at the end of the catalog / product
source share