A little while back I had to automate product importing from external CSV source for a client of ours. We used Magmi to do so. Magmi is awesome and you can do so much with it. However, there was one thing I needed to write my own plugin for.
In our case the clients catalog must only contain the products from the CSV source, which means that products imported at a certain date could possible be removed from the CSV in a later stage. But, using Magmi this products, that are no more existing in the CSV source, will still exist in my Magento store.
So, I made this real simple and tiny plugin (actually 2 plugins) with which you can delete or disable product from your Magento store when they do not exist anymore in the CSV source.
So, how to use these plugin`s:
- Download the plugin files here.
- Extract the ZIP
- There are two folders inside the zip, each of them is a plugin
- Upload the two folders to your server in the Magmi dir: /magmi/plugins/base/itemprocessors/
- Now go to your Magmi web interface (probably: websiteurl/magmi/web/magmi.php)
- In the list of plugins you will find 2 new plugins: ‘Missing products disabler’ & ‘Missing products deleter’
- Enable whichever you like, read the notes when enabling.
- That`s it, your all set. Importing should now delete missing products.
PS 1: I have put e-mail reporting in the plugins, read the instructions when enabling the plugin to add your own mailadres to the recipents. You will then be notified whenever products are deleted or disabled.
PS 2: I have put this code up for free, and you are free to use and share. However, it would be very much appreciated if you`d share the code via our site (this post). Thanks!
PS 3: If you encounter any problems with these plugins, please do contact us and we will fix it asap. Thanks!