From d01db1bb7ed8f793c1fa947b9a0e88d874c22eac Mon Sep 17 00:00:00 2001 From: Vova Yatsyuk Date: Tue, 14 Oct 2014 10:49:37 +0300 Subject: [PATCH] Third-party checkout extensions compatibility Onepage checkout extensions may render review section when payment are not selected/available. In this case `$payment->getMethodInstance()` will throw an exception when `$payment->getMethod()` is empty. --- app/code/community/Bitpay/Bitcoins/Block/Iframe.php | 1 + 1 file changed, 1 insertion(+) diff --git a/app/code/community/Bitpay/Bitcoins/Block/Iframe.php b/app/code/community/Bitpay/Bitcoins/Block/Iframe.php index d17016b..cf1f31f 100644 --- a/app/code/community/Bitpay/Bitcoins/Block/Iframe.php +++ b/app/code/community/Bitpay/Bitcoins/Block/Iframe.php @@ -57,6 +57,7 @@ class Bitpay_Bitcoins_Block_Iframe extends Mage_Checkout_Block_Onepage_Payment // @todo refactor this if (!($quote = Mage::getSingleton('checkout/session')->getQuote()) or !($payment = $quote->getPayment()) + or !$payment->getMethod() or !($instance = $payment->getMethodInstance()) or ($instance->getCode() != 'Bitcoins')) {