Mage_Checkout_Block_Onepage_Success Class Reference

Inheritance diagram for Mage_Checkout_Block_Onepage_Success:

Mage_Core_Block_Template Mage_Core_Block_Abstract Varien_Object Mage_Downloadable_Block_Checkout_Success

List of all members.

Public Member Functions

 getOrderId ()
 canPrint ()
 getPrintUrl ()
 getViewOrderUrl ()
 isOrderVisible ()


Detailed Description

Definition at line 34 of file Success.php.


Member Function Documentation

canPrint (  ) 

Check order print availability

Returns:
bool

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

Returns:
string

Definition at line 43 of file Success.php.

00044     {
00045         return Mage::getSingleton('checkout/session')->getLastRealOrderId();
00046     }

getPrintUrl (  ) 

Get url for order detale print

Returns:
string

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

Returns:
string

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

Returns:
bool

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     }


The documentation for this class was generated from the following file:

Generated on Sat Jul 4 17:23:51 2009 for Magento by  doxygen 1.5.8