Add code

Showing posts with label email. Show all posts
Showing posts with label email. Show all posts

Thursday 8 October 2020

New order confirmation email is not being sent on Magento website

We have 2 methods to send the confirmation emails from our Magento 1 website.

  1. Using Cron
  2. Avoiding Cron

If you want to avoid the Cron :

Open the file order.php file from the following path:

app/code/core/Mage/Sales/Model/Order.php

Line#1356,1450

Change the following

    //$mailer->setQueue($emailQueue)->send(); 

to the following:

    $mailer-> send();

In the following path `app/design/frontend/base/default/template/checkout/success.phtml`:

add the following line Top success page for sending mail direct

    $order = Mage::getModel('sales/order');

    $incrementId = Mage::getSingleton('checkout/session')->getLastRealOrderId(); 

    $order->loadByIncrementId($incrementId);

    try{ 

    $order->sendNewOrderEmail();

    } catch (Exception $ex) { 

    echo "Email Not Sent..."; 

    }

    $customer = Mage::getSingleton('customer/session')->getCustomer();

    $email = $customer->getEmail();

    //End Email Sending

Magento : 404 error is showing admin page

Hello, Sometimes we may get the error on admin page once done with the Magento installation. In that scenario, we have to do the following: ...