Skip to content

Instantly share code, notes, and snippets.

@deivisonarthur
Created July 21, 2012 17:43
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/3156527 to your computer and use it in GitHub Desktop.
Save deivisonarthur/3156527 to your computer and use it in GitHub Desktop.
Boleto Magento cód 04
<?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->getPayment()->getMethod() == "boleto_bancario"): /*caso tenha cido escolhido boleto como meio de pagamento exibe o botão abaixo*/
?>
<center>
<button class="button" title="Clique aqui para imprimir o Boleto" onclick="window.open('<?=$this->getUrl('boleto/standard/view/order_id/'.$order->getId())?>','_blank')" type="button"><span><span>Clique aqui para imprimir o Boleto</span></span></button>
</center>
<?php endif; ?>
<!-- Deivison -->
Adicionando o link do boleto na tela de sucesso do cliente
6º – Abra o arquivo /app/design/frontend/BASE/default/template/checkout/success.phtml
Obs: As vezes o arquivos de sucesso se encontra na sua theme ao inves da theme BASE
Coloque logo abaixo de <p><?php echo $this->__(‘You will receive an order confirmation email with details of your order and a link to track its progress.’) ?></p> linha 39 :
Coloque aqui o cód acima BoletoMagento03.php
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment