I'm in the process of cleaning up my existing magento install by moving the DB and using a new install so I can do away with all the unnecessary extensions taking up space.
Everything seems to have been setup fine, however some product attributes are not showing up in the admin, but doing a save brings the values back. However I have over 7000 products and cant save them individually. All the products are simple products.
So I've used this script from this article.
<?php
require 'app/Mage.php';
Mage::app();
Mage::app()->setCurrentStore(Mage_Core_Model_App::ADMIN_STORE_ID);
$products = Mage::getModel('catalog/product')->getCollection()->addAttributeToSelect('*');
foreach ($products as $product) {
$product->load();
echo 'Product: ' . $product->getId() . ' - ' . $product->getName() . "\xA";
$product->setShortDescription('N/A');
$product->save();
}
?>
But I need to run this script via the browser and if the internet cuts out, I have to start again going over the ones that were already saved.
Instead, how can I convert this to a shell script and run if via SSH?
Also I have one store that doesn't have the same values as the default (all store views) how/where do I specify that the script run for only that store?
Thanks in advance.