Are you creating a module for this? If you do this, you must use the cron Magento system and call the user model method:
<config> <crontab> <jobs> <company_test> <schedule> <cron_expr>0,15,30,45 * * * *</cron_expr> </schedule> <run> <model>test/testmodel::testMethod</model> </run> </company_module> </jobs> </crontab> </config>
When this is done, you can update the option of a specific product using the Mage_Catalog_Model_Product_Option model. I donβt know how CSV is created, but the algorithm could be something like this:
// foreach option /** @var $opt Mage_Catalog_Model_Product_Option */ $opt = Mage::getModel('catalog/product_option'); $opt->setProduct($product); $optionArray = array( 'is_delete' => 0, 'title' => 'Blabla', 'previous_group' => '', 'previous_type' => '', 'type' => 'field', //can be radio, drop_down, file, area... 'is_require' => 0, 'sort_order' => 42, 'values' => array() ); $opt->addOption($optionArray); $opt->saveOptions(); // end foreach
Also check out this link: http://subesh.com.np/2009/12/adding-custom-options-product-magento/
Simon lx
source share