Esempio n. 1
0
 public function getCanPrintOrder()
 {
     $h = Mage::helper('gomage_checkout');
     if ($h->getConfigData('general/order_summary') && $h->getConfigData('general/enabled')) {
         return true;
     } else {
         parent::getCanPrintOrder();
     }
 }
Esempio n. 2
0
 protected function _construct()
 {
     parent::_construct();
     $this->setPaymentMethod();
     $this->isIdeasaMethod = Mage::helper('base')->isIdeasaPaymentMethod($this->paymentMethod);
     if ($this->isIdeasaMethod) {
         $this->setTemplate('ideasa/' . $this->paymentMethod . '/checkout/success-details.phtml');
     }
 }
Esempio n. 3
0
 public function getUrl($route = '', $params = array())
 {
     if (empty($route) && empty($params)) {
         $next_url = Mage::getSingleton('customer/session')->getNextUrl();
         if (!empty($next_url)) {
             return $next_url;
         }
     }
     return parent::getUrl($route, $params);
 }
Esempio n. 4
0
 protected function _toHtml()
 {
     $order = Mage::getSingleton('sales/order')->loadByIncrementId($this->getOrderId());
     if ($order->getPayment()->getMethodInstance()->getCode() == 'gofpay') {
         $this->setTemplate('gofpay/success.phtml');
     } else {
         if ($order->getPayment()->getMethodInstance()->getCode() == 'tenpay') {
             $this->setTemplate('tenpay/success.phtml');
         }
     }
     return parent::_toHtml();
 }
Esempio n. 5
0
 /**
  * 通过重写父类中的 _toHtml()函数,在这个函数中添加上新的 template的指向,就可以了。
  * (non-PHPdoc)
  * @see Mage_Core_Block_Template::_toHtml()
  */
 protected function _toHtml()
 {
     //还要在这里判断订单是不是支付宝的,如果是支付宝的,就加载他的success文件,如果不是,则加载原来的。支付宝和财付通的插件中都写上这个才比较好
     $order = Mage::getSingleton('sales/order')->loadByIncrementId($this->getOrderId());
     if ($order->getPayment()->getMethodInstance()->getCode() == 'alipay') {
         $this->setTemplate('alipay/success.phtml');
     } else {
         if ($order->getPayment()->getMethodInstance()->getCode() == 'tenpay') {
             $this->setTemplate('tenpay/success.phtml');
         }
     }
     return parent::_toHtml();
 }
Esempio n. 6
0
 /**
  * Get last order ID from session, fetch it and check whether it can be viewed, printed etc
  */
 protected function _prepareLastOrder()
 {
     if (!Mage::getStoreConfig('pdfpro/config/enabled') || !Mage::getStoreConfig('pdfpro/config/allow_customer_print') || !Mage::helper('pdfpro')->getDefaultApiKey()) {
         return parent::_prepareLastOrder();
     }
     $orderId = Mage::getSingleton('checkout/session')->getLastOrderId();
     if ($orderId) {
         $order = Mage::getModel('sales/order')->load($orderId);
         if ($order->getId()) {
             $isVisible = !in_array($order->getState(), Mage::getSingleton('sales/order_config')->getInvisibleOnFrontStates());
             $this->addData(array('is_order_visible' => $isVisible, 'view_order_id' => $this->getUrl('sales/order/view/', array('order_id' => $orderId)), 'print_url' => $this->getUrl('pdfpro/print/order', array('order_id' => $orderId)), 'can_print_order' => $isVisible, 'can_view_order' => Mage::getSingleton('customer/session')->isLoggedIn() && $isVisible, 'order_id' => $order->getIncrementId()));
         }
     }
 }
 public function __construct()
 {
     parent::__construct();
     $this->setTemplate('wallet/checkout/success.phtml');
 }
Esempio n. 8
0
 public function __construct()
 {
     parent::__construct();
 }
 protected function _construct()
 {
     parent::_construct();
     $this->setTemplate('pnsofortueberweisung/sofortvorkassesuccess.phtml');
     $this->params = $this->getRequest()->getParams();
 }