Created
September 4, 2012 21:15
-
-
Save deivisonarthur/3626600 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| //require_once MAGE_BASE_DIR . 'app/Mage.php'; | |
| $orderId = Mage::getSingleton('checkout/session')->getLastRealOrderId(); | |
| Mage::app()->setCurrentStore(Mage_Core_Model_App::ADMIN_STORE_ID); | |
| $order = Mage::getModel('sales/order')->loadByIncrementId($orderId); | |
| if ($order->getId()) { | |
| try { | |
| $order->sendNewOrderEmail(); | |
| echo "\n\nEnvio de email do pedido com sucesso!\n"; | |
| } catch (Exception $e) { | |
| echo $e->getMessage(); | |
| } | |
| } else { | |
| echo "Pedido $orderId nao encontrado\n"; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment