Public Member Functions | |
__construct () | |
getPagerHtml () | |
getViewUrl ($order) | |
getTrackUrl ($order) | |
getReorderUrl ($order) | |
getBackUrl () | |
Protected Member Functions | |
_prepareLayout () |
Definition at line 35 of file History.php.
__construct | ( | ) |
Constructor
By default is looking for first argument as array and assignes it as object attributes This behaviour may change in child classes
Reimplemented from Varien_Object.
Definition at line 38 of file History.php.
00039 { 00040 parent::__construct(); 00041 $this->setTemplate('sales/order/history.phtml'); 00042 00043 //TODO: add full name logic 00044 $orders = Mage::getResourceModel('sales/order_collection') 00045 ->addAttributeToSelect('*') 00046 ->joinAttribute('shipping_firstname', 'order_address/firstname', 'shipping_address_id', null, 'left') 00047 ->joinAttribute('shipping_lastname', 'order_address/lastname', 'shipping_address_id', null, 'left') 00048 ->addAttributeToFilter('customer_id', Mage::getSingleton('customer/session')->getCustomer()->getId()) 00049 ->addAttributeToFilter('state', array('in' => Mage::getSingleton('sales/order_config')->getVisibleOnFrontStates())) 00050 ->addAttributeToSort('created_at', 'desc') 00051 ; 00052 00053 $this->setOrders($orders); 00054 00055 Mage::app()->getFrontController()->getAction()->getLayout()->getBlock('root')->setHeaderTitle(Mage::helper('sales')->__('My Orders')); 00056 }
_prepareLayout | ( | ) | [protected] |
Preparing global layout
You can redefine this method in child classes for changin layout
Reimplemented from Mage_Core_Block_Abstract.
Definition at line 58 of file History.php.
00059 { 00060 parent::_prepareLayout(); 00061 00062 $pager = $this->getLayout()->createBlock('page/html_pager', 'sales.order.history.pager') 00063 ->setCollection($this->getOrders()); 00064 $this->setChild('pager', $pager); 00065 $this->getOrders()->load(); 00066 return $this; 00067 }
getBackUrl | ( | ) |
Definition at line 89 of file History.php.
00090 { 00091 return $this->getUrl('customer/account/'); 00092 }
getPagerHtml | ( | ) |
Definition at line 69 of file History.php.
00070 { 00071 return $this->getChildHtml('pager'); 00072 }
getReorderUrl | ( | $ | order | ) |
getTrackUrl | ( | $ | order | ) |
getViewUrl | ( | $ | order | ) |