Public Member Functions | |
getOrderId () | |
canPrint () | |
getPrintUrl () | |
getViewOrderUrl () | |
isOrderVisible () |
Definition at line 34 of file Success.php.
canPrint | ( | ) |
Check order print availability
Definition at line 53 of file Success.php.
00054 { 00055 return Mage::getSingleton('customer/session')->isLoggedIn() && $this->isOrderVisible(); 00056 }
getOrderId | ( | ) |
Retrieve identifier of created order
Definition at line 43 of file Success.php.
00044 { 00045 return Mage::getSingleton('checkout/session')->getLastRealOrderId(); 00046 }
getPrintUrl | ( | ) |
Get url for order detale print
Definition at line 63 of file Success.php.
00064 { 00065 /*if (Mage::getSingleton('customer/session')->isLoggedIn()) { 00066 return $this->getUrl('sales/order/print', array('order_id'=>Mage::getSingleton('checkout/session')->getLastOrderId())); 00067 } 00068 return $this->getUrl('sales/guest/printOrder', array('order_id'=>Mage::getSingleton('checkout/session')->getLastOrderId()));*/ 00069 return $this->getUrl('sales/order/print', array('order_id'=>Mage::getSingleton('checkout/session')->getLastOrderId())); 00070 }
getViewOrderUrl | ( | ) |
Get url for view order details
Definition at line 77 of file Success.php.
00078 { 00079 return $this->getUrl('sales/order/view/', array('order_id'=>Mage::getSingleton('checkout/session')->getLastOrderId(), '_secure' => true)); 00080 }
isOrderVisible | ( | ) |
See if the order has state, visible on frontend
Definition at line 87 of file Success.php.
00088 { 00089 if (!$this->_order) { 00090 $this->_order = Mage::getModel('sales/order')->load(Mage::getSingleton('checkout/session')->getLastOrderId()); 00091 } 00092 if (!$this->_order) { 00093 return false; 00094 } 00095 return !in_array($this->_order->getState(), Mage::getSingleton('sales/order_config')->getInvisibleOnFrontStates()); 00096 }