0

I am using

    $order = Mage::getModel('sales/order');
    $order->loadByIncrementId($orderId);
    $order->setState(Mage_Sales_Model_Order::STATE_PROCESSING, true, 'Gateway has authorized the payment.');

    $order->sendNewOrderEmail();
    $order->setEmailSent(true);

in my success method, but in Enterprise store the method is not working. I am not receiving mail for new order.

Can anyone please guide me for this. I am stucked debugging the issue from last two days. Any help will be appreciated.

1

Your code seems fine, configure cron on Magento.

Now order emails are sent using cron.

  • Thanks for the answer RiccardoT.. Can you guide me how to configure cron on Magento? I have seen in forums that crons needs to be set, but not getting a working solution. – Anup Tarone Mar 3 '16 at 11:17
  • The fastest way IMHO is to install a module named AOE_Scheduler and follow its instructions. It is easy to do. – Phoenix128_RiccardoT Mar 3 '16 at 13:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.