I wrote a script for adding products programatically from a CSV. It's working fine. Now I need to update it to do followings,
- Check if product is already available (using SKU ) and if not, add new product.
- If product is available, then update it with new values from the CSV (not changing the SKU but if there are any changes on name, category or price etc..)
I've successfully implemented the first one. I'm stuck on second.
How can I achieve this? Do I need to read every column for certain item and check whether each values is a match in both magento and CSV? or is there some other way to do so? Please help me.
Reading every column for each item may take very long time. I'm looking for some other option.
I just need to update new values from CSV for products that already imported into magento. (without changing the SKU).