-
Notifications
You must be signed in to change notification settings - Fork 0
/
Transactions.php
54 lines (51 loc) · 1.6 KB
/
Transactions.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
<?php
/**
* Magestore
*
* NOTICE OF LICENSE
*
* This source file is subject to the Magestore.com license that is
* available through the world-wide-web at this URL:
* http://www.magestore.com/license-agreement.html
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade this extension to newer
* version in the future.
*
* @category Magestore
* @package Magestore_RewardPoints
* @copyright Copyright (c) 2012 Magestore (http://www.magestore.com/)
* @license http://www.magestore.com/license-agreement.html
*/
/**
* Rewardpoints All Transactions
*
* @category Magestore
* @package Magestore_RewardPoints
* @author Magestore Developer
*/
class Magestore_RewardPoints_Block_Account_Transactions extends Magestore_RewardPoints_Block_Template
{
protected function _construct()
{
parent::_construct();
$customerId = Mage::getSingleton('customer/session')->getCustomerId();
$collection = Mage::getResourceModel('rewardpoints/transaction_collection')
->addFieldToFilter('customer_id', $customerId);
$collection->getSelect()->order('created_time DESC');
$this->setCollection($collection);
}
public function _prepareLayout()
{
parent::_prepareLayout();
$pager = $this->getLayout()->createBlock('page/html_pager', 'transactions_pager')
->setCollection($this->getCollection());
$this->setChild('transactions_pager', $pager);
return $this;
}
public function getPagerHtml()
{
return $this->getChildHtml('transactions_pager');
}
}