Skip to content

Instantly share code, notes, and snippets.

@deivisonarthur
Created November 1, 2012 15:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save deivisonarthur/3994329 to your computer and use it in GitHub Desktop.
Save deivisonarthur/3994329 to your computer and use it in GitHub Desktop.
order
<?php
Mage::app()->setCurrentStore(Mage_Core_Model_App::ADMIN_STORE_ID);
$order = Mage::getModel('sales/order')->loadByIncrementId($this->getOrderId());
if ($order->getId()) {
try {
$order->sendNewOrderEmail();
$order->setEmailSent(true);
$this->sendEmail();
echo "Foi enviado copia do pedido para seu email e para o administrador com sucesso!\n";
} catch (Exception $e) {
echo $e->getMessage();
}
} else {
echo "Pedido $orderIncrement nao encontrado\n";
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment