Skip to main content

Magento : Catalog Price Rules "Apply Rules" programmaticallyProgrammatically

i'm create one Catalog Price Rules Programmatically it's work fine.

so myThe issue is, iI need to do login with admin and need click button of "Apply Rules" other wise discount is not apply in magento store, so i. So I need "Apply Rules" programmatically and iI try thisbellow code but its not work.

try{
  $catalogPriceRule = Mage::getModel('catalogrule/rule');
  $catalogPriceRule->applyAll();
} catch (Exception $e) {
  echo $e;
}

enter image description here

Any help or suggestion will be appreciated.

Catalog Price Rules "Apply Rules" programmatically

i'm create one Catalog Price Rules Programmatically it's work fine.

so my issue is, i need to do login with admin and need click button of "Apply Rules" other wise discount is not apply in magento store, so i need "Apply Rules" programmatically and i try this code but its not work.

try{
  $catalogPriceRule = Mage::getModel('catalogrule/rule');
  $catalogPriceRule->applyAll();
} catch (Exception $e) {
  echo $e;
}

enter image description here

Any help or suggestion will be appreciated.

Magento : Catalog Price Rules "Apply Rules" Programmatically

i'm create Catalog Price Rules Programmatically it's work fine.

The issue is, I need to login with admin and click button "Apply Rules" other wise discount is not apply in magento store. So I need "Apply Rules" programmatically and I try bellow code but its not work.

try{
  $catalogPriceRule = Mage::getModel('catalogrule/rule');
  $catalogPriceRule->applyAll();
} catch (Exception $e) {
  echo $e;
}

enter image description here

Any help or suggestion will be appreciated.

Source Link

Catalog Price Rules "Apply Rules" programmatically

i'm create one Catalog Price Rules Programmatically it's work fine.

so my issue is, i need to do login with admin and need click button of "Apply Rules" other wise discount is not apply in magento store, so i need "Apply Rules" programmatically and i try this code but its not work.

try{
  $catalogPriceRule = Mage::getModel('catalogrule/rule');
  $catalogPriceRule->applyAll();
} catch (Exception $e) {
  echo $e;
}

enter image description here

Any help or suggestion will be appreciated.