I have developed the online store on magento platform. Everything works fine except the Catalog price rule for sale. I have created the simple rule that applies 15% discount
I used a shell script instead of the (huge) AOE page @Lakshin Karunaratne suggested.
require_once 'abstract.php';
class X043_Shell_PriceRuleSetter extends Mage_Shell_Abstract
{
public function run()
{
// stuff and thingies
umask(0);
Mage::app()->setCurrentStore(Mage_Core_Model_App::ADMIN_STORE_ID);
setlocale(LC_ALL, 'en_US.UTF-8');
try {
Mage::getModel('catalogrule/rule')->applyAll();
Mage::getModel('catalogrule/flag')->loadSelf()
->setState(0)
->save();
} catch (Mage_Core_Exception $e) {
Mage::logException($e);
} catch (Exception $e) {
Mage::logException($e);
}
return $this;
}
}
$shell = new X043_Shell_PriceRuleSetter();
$shell->run();