DigitalPianism_CustomReports - Version 0.1.3

Version Notes

- Fix bug on the No Upsells report
- Fix bug on the Signed Up But Never Order report
- Fix bug on the Wishlist report
- PHPDoc

Download this release

Release Info

Developer Digital Pianism
Extension DigitalPianism_CustomReports
Version 0.1.3
Comparing to
See all releases


Code changes from version 0.1.2 to 0.1.3

Files changed (28) hide show
  1. app/code/community/DigitalPianism/CustomReports/Block/Bestsellersbycategory.php +10 -0
  2. app/code/community/DigitalPianism/CustomReports/Block/Bestsellersbycategory/Grid.php +26 -7
  3. app/code/community/DigitalPianism/CustomReports/Block/Customreport.php +14 -4
  4. app/code/community/DigitalPianism/CustomReports/Block/Lifetimesales.php +1 -1
  5. app/code/community/DigitalPianism/CustomReports/Block/Lifetimesales/Grid.php +1 -1
  6. app/code/community/DigitalPianism/CustomReports/Block/Noupsells.php +10 -0
  7. app/code/community/DigitalPianism/CustomReports/Block/Noupsells/Grid.php +1 -1
  8. app/code/community/DigitalPianism/CustomReports/Block/Shoppedonce.php +1 -1
  9. app/code/community/DigitalPianism/CustomReports/Block/Shoppedonce/Grid.php +1 -1
  10. app/code/community/DigitalPianism/CustomReports/Block/Signedupnoorder.php +10 -0
  11. app/code/community/DigitalPianism/CustomReports/Block/Signedupnoorder/Grid.php +1 -1
  12. app/code/community/DigitalPianism/CustomReports/Block/Wishlist.php +10 -0
  13. app/code/community/DigitalPianism/CustomReports/Block/Wishlist/Grid.php +1 -1
  14. app/code/community/DigitalPianism/CustomReports/Block/Worstsellers.php +10 -0
  15. app/code/community/DigitalPianism/CustomReports/Block/Worstsellers/Grid.php +27 -5
  16. app/code/community/DigitalPianism/CustomReports/Block/Worstsellersbycategory.php +10 -0
  17. app/code/community/DigitalPianism/CustomReports/Block/Worstsellersbycategory/Grid.php +28 -5
  18. app/code/community/DigitalPianism/CustomReports/Model/Reports/Resource/Product/Collection.php +4 -1
  19. app/code/community/DigitalPianism/CustomReports/controllers/BestsellersbycategoryController.php +4 -0
  20. app/code/community/DigitalPianism/CustomReports/controllers/LifetimesalesController.php +4 -0
  21. app/code/community/DigitalPianism/CustomReports/controllers/NoupsellsController.php +4 -0
  22. app/code/community/DigitalPianism/CustomReports/controllers/ShoppedonceController.php +4 -0
  23. app/code/community/DigitalPianism/CustomReports/controllers/SignedupnoorderController.php +4 -0
  24. app/code/community/DigitalPianism/CustomReports/controllers/WishlistController.php +4 -0
  25. app/code/community/DigitalPianism/CustomReports/controllers/WorstsellersController.php +4 -0
  26. app/code/community/DigitalPianism/CustomReports/controllers/WorstsellersbycategoryController.php +4 -0
  27. app/code/community/DigitalPianism/CustomReports/etc/config.xml +1 -1
  28. package.xml +8 -6
app/code/community/DigitalPianism/CustomReports/Block/Bestsellersbycategory.php CHANGED
@@ -1,6 +1,13 @@
1
  <?php
 
 
 
 
2
  class DigitalPianism_CustomReports_Block_Bestsellersbycategory extends DigitalPianism_CustomReports_Block_Customreport
3
  {
 
 
 
4
  public function __construct()
5
  {
6
  parent::__construct();
@@ -15,6 +22,9 @@ class DigitalPianism_CustomReports_Block_Bestsellersbycategory extends DigitalPi
15
  $this->setFormAction(Mage::getUrl('*/*/index'));
16
  }
17
 
 
 
 
18
  public function _beforeToHtml()
19
  {
20
  $this->setChild('grid', $this->getLayout()->createBlock('customreports/bestsellersbycategory_grid', 'customreports.grid'));
1
  <?php
2
+
3
+ /**
4
+ * Class DigitalPianism_CustomReports_Block_Bestsellersbycategory
5
+ */
6
  class DigitalPianism_CustomReports_Block_Bestsellersbycategory extends DigitalPianism_CustomReports_Block_Customreport
7
  {
8
+ /**
9
+ *
10
+ */
11
  public function __construct()
12
  {
13
  parent::__construct();
22
  $this->setFormAction(Mage::getUrl('*/*/index'));
23
  }
24
 
25
+ /**
26
+ * @return $this
27
+ */
28
  public function _beforeToHtml()
29
  {
30
  $this->setChild('grid', $this->getLayout()->createBlock('customreports/bestsellersbycategory_grid', 'customreports.grid'));
app/code/community/DigitalPianism/CustomReports/Block/Bestsellersbycategory/Grid.php CHANGED
@@ -1,17 +1,28 @@
1
  <?php
 
 
 
 
2
  class DigitalPianism_CustomReports_Block_Bestsellersbycategory_Grid extends Mage_Adminhtml_Block_Widget_Grid
3
  {
4
  protected $arrayBestSellers = array();
5
-
6
- public function __construct()
 
 
 
7
  {
8
  parent::__construct();
9
  $this->setPagerVisibility(false);
10
  $this->setFilterVisibility(false);
11
  $this->setId('bestsellersbycategoryReportGrid');
12
  }
13
-
14
- public function fillBestsellersArray($args)
 
 
 
 
15
  {
16
  // Get Product ID
17
  $id = $args['row']['entity_id'];
@@ -77,8 +88,12 @@ class DigitalPianism_CustomReports_Block_Bestsellersbycategory_Grid extends Mage
77
  }
78
  }
79
  }
80
-
81
- protected function _prepareCollection()
 
 
 
 
82
  {
83
  // Get the session
84
  $session = Mage::getSingleton('core/session');
@@ -158,7 +173,11 @@ class DigitalPianism_CustomReports_Block_Bestsellersbycategory_Grid extends Mage
158
  return $this;
159
  }
160
 
161
- protected function _prepareColumns()
 
 
 
 
162
  {
163
  $this->addColumn('name', array(
164
  'header' => Mage::helper('reports')->__('Category Name'),
1
  <?php
2
+
3
+ /**
4
+ * Class DigitalPianism_CustomReports_Block_Bestsellersbycategory_Grid
5
+ */
6
  class DigitalPianism_CustomReports_Block_Bestsellersbycategory_Grid extends Mage_Adminhtml_Block_Widget_Grid
7
  {
8
  protected $arrayBestSellers = array();
9
+
10
+ /**
11
+ *
12
+ */
13
+ public function __construct()
14
  {
15
  parent::__construct();
16
  $this->setPagerVisibility(false);
17
  $this->setFilterVisibility(false);
18
  $this->setId('bestsellersbycategoryReportGrid');
19
  }
20
+
21
+ /**
22
+ * @param $args
23
+ * @throws Mage_Core_Exception
24
+ */
25
+ public function fillBestsellersArray($args)
26
  {
27
  // Get Product ID
28
  $id = $args['row']['entity_id'];
88
  }
89
  }
90
  }
91
+
92
+ /**
93
+ * @return $this
94
+ * @throws Exception
95
+ */
96
+ protected function _prepareCollection()
97
  {
98
  // Get the session
99
  $session = Mage::getSingleton('core/session');
173
  return $this;
174
  }
175
 
176
+ /**
177
+ * @return $this
178
+ * @throws Exception
179
+ */
180
+ protected function _prepareColumns()
181
  {
182
  $this->addColumn('name', array(
183
  'header' => Mage::helper('reports')->__('Category Name'),
app/code/community/DigitalPianism/CustomReports/Block/Customreport.php CHANGED
@@ -1,14 +1,24 @@
1
  <?php
 
 
 
 
2
  class DigitalPianism_CustomReports_Block_Customreport extends Mage_Adminhtml_Block_Template
3
  {
4
  protected $_sideNote = null;
5
-
6
- public function setSideNote($nb)
 
 
 
7
  {
8
  $this->_sideNote = $nb;
9
  }
10
-
11
- public function getSideNote()
 
 
 
12
  {
13
  return $this->_sideNote;
14
  }
1
  <?php
2
+
3
+ /**
4
+ * Class DigitalPianism_CustomReports_Block_Customreport
5
+ */
6
  class DigitalPianism_CustomReports_Block_Customreport extends Mage_Adminhtml_Block_Template
7
  {
8
  protected $_sideNote = null;
9
+
10
+ /**
11
+ * @param $nb
12
+ */
13
+ public function setSideNote($nb)
14
  {
15
  $this->_sideNote = $nb;
16
  }
17
+
18
+ /**
19
+ * @return null
20
+ */
21
+ public function getSideNote()
22
  {
23
  return $this->_sideNote;
24
  }
app/code/community/DigitalPianism/CustomReports/Block/Lifetimesales.php CHANGED
@@ -1 +1 @@
1
- <?php
2
  public function __construct()
3
  {
4
  parent::__construct();
5
  $this->setTemplate('digitalpianism/customreports/advancedgrid.phtml');
6
  }
7
  public function _beforeToHtml()
8
  {
9
  $this->setChild('grid', $this->getLayout()->createBlock('customreports/lifetimesales_grid', 'customreports.grid'));
10
  return $this;
11
  }
 
12
  * Class DigitalPianism_CustomReports_Block_Lifetimesales
13
  */
14
  /**
15
  *
16
  */
17
  public function __construct()
18
  {
19
  parent::__construct();
20
  $this->setTemplate('digitalpianism/customreports/advancedgrid.phtml');
21
  }
22
  /**
23
  * @return $this
24
  */
25
  public function _beforeToHtml()
26
  {
27
  $this->setChild('grid', $this->getLayout()->createBlock('customreports/lifetimesales_grid', 'customreports.grid'));
28
  return $this;
29
  }
 
1
  public function __construct()
2
  {
3
  parent::__construct();
4
  $this->setTemplate('digitalpianism/customreports/advancedgrid.phtml');
5
  }
6
  public function _beforeToHtml()
7
  {
8
  $this->setChild('grid', $this->getLayout()->createBlock('customreports/lifetimesales_grid', 'customreports.grid'));
9
  return $this;
10
  }
11
+ <?php
12
  * Class DigitalPianism_CustomReports_Block_Lifetimesales
13
  */
14
  /**
15
  *
16
  */
17
  public function __construct()
18
  {
19
  parent::__construct();
20
  $this->setTemplate('digitalpianism/customreports/advancedgrid.phtml');
21
  }
22
  /**
23
  * @return $this
24
  */
25
  public function _beforeToHtml()
26
  {
27
  $this->setChild('grid', $this->getLayout()->createBlock('customreports/lifetimesales_grid', 'customreports.grid'));
28
  return $this;
29
  }
app/code/community/DigitalPianism/CustomReports/Block/Lifetimesales/Grid.php CHANGED
@@ -1 +1 @@
1
- <?php
2
  public function __construct()
3
  {
4
  parent::__construct();
5
  $this->setId('lifetimesalesReportGrid');
6
  $this->setDefaultSort('orders_sum_amount');
7
  $this->setDefaultDir('desc');
8
  }
9
  protected function _prepareCollection()
10
  {
11
  else
12
  else
13
  $end = new Zend_Date($eDate);
14
  $collection = Mage::getResourceModel('reports/customer_collection')
15
  ->joinAttribute('billing_country_id', 'customer_address/country_id', 'default_billing', null, 'left');;
16
  $this->setCollection($collection);
17
  parent::_prepareCollection();
18
  return $this;
19
  }
20
  protected function _prepareColumns()
21
  {
22
  $this->addColumn('entity_id', array(
23
  'header' => Mage::helper('reports')->__('Customer ID'),
24
  'index' => 'entity_id'
25
  ));
26
  'header' => Mage::helper('reports')->__('Name'),
27
  'index' => 'name'
28
  ));
29
  $this->addColumn('email', array(
30
  'header' => Mage::helper('reports')->__('Email'),
31
  'width' => '150',
32
  'index' => 'email'
33
  ));
34
  $this->addColumn('billing_country_id', array(
35
  'header' => Mage::helper('reports')->__('Country'),
36
  'width' => '100',
37
  'type' => 'country',
38
  'index' => 'billing_country_id',
39
  ));
40
  $this->addColumn('billing_region', array(
41
  'header' => Mage::helper('reports')->__('State/Province'),
42
  'width' => '150',
43
  'index' => 'billing_region',
44
  ));
45
  'header' => Mage::helper('reports')->__('Number of Orders'),
46
  'width' => '100px',
47
  'sortable' => false,
48
  'index' => 'orders_count',
49
  'total' => 'sum',
50
  'type' => 'number'
51
  ));
52
  'header' => Mage::helper('reports')->__('Average Order Amount'),
53
  'width' => '200px',
54
  'align' => 'right',
55
  'sortable' => false,
56
  'type' => 'number',
57
  'index' => 'orders_avg_amount',
58
  'total' => 'orders_sum_amount/orders_count'
59
  ));
60
  'header' => Mage::helper('reports')->__('Orders Sum Amount'),
61
  'width' => '100',
62
  'index' => 'orders_sum_amount',
63
  ));
64
  array(
65
  'header' => Mage::helper('reports')->__('Action'),
66
  'width' => '100',
67
  'type' => 'action',
68
  'getter' => 'getEntityId',
69
  'actions' => array(
70
  array(
71
  'caption' => Mage::helper('reports')->__('Edit Customer'),
72
  'url' => array('base'=> 'adminhtml/customer/edit'),
73
  'field' => 'id'
74
  )
75
  ),
76
  'filter' => false,
77
  'sortable' => false,
78
  'index' => 'stores',
79
  'is_system' => true,
80
  ));
81
  $this->addExportType('*/*/exportLifetimesalesCsv', Mage::helper('reports')->__('CSV'));
82
  $this->addExportType('*/*/exportLifetimesalesExcel', Mage::helper('reports')->__('Excel'));
83
  return parent::_prepareColumns();
84
  }
 
85
  * Class DigitalPianism_CustomReports_Block_Lifetimesales_Grid
86
  */
87
  /**
88
  *
89
  */
90
  public function __construct()
91
  {
92
  parent::__construct();
93
  $this->setId('lifetimesalesReportGrid');
94
  $this->setDefaultSort('orders_sum_amount');
95
  $this->setDefaultDir('desc');
96
  }
97
  /**
98
  * @return $this
99
  * @throws Mage_Core_Exception
100
  * @throws Zend_Date_Exception
101
  */
102
  protected function _prepareCollection()
103
  {
104
  else
105
  else
106
  $end = new Zend_Date($eDate);
107
  $collection = Mage::getResourceModel('reports/customer_collection')
108
  ->joinAttribute('billing_country_id', 'customer_address/country_id', 'default_billing', null, 'left');;
109
  $this->setCollection($collection);
110
  parent::_prepareCollection();
111
  return $this;
112
  }
113
  /**
114
  * @return $this
115
  * @throws Exception
116
  */
117
  protected function _prepareColumns()
118
  {
119
  $this->addColumn('entity_id', array(
120
  'header' => Mage::helper('reports')->__('Customer ID'),
121
  'index' => 'entity_id'
122
  ));
123
  'header' => Mage::helper('reports')->__('Name'),
124
  'index' => 'name'
125
  ));
126
  $this->addColumn('email', array(
127
  'header' => Mage::helper('reports')->__('Email'),
128
  'width' => '150',
129
  'index' => 'email'
130
  ));
131
  $this->addColumn('billing_country_id', array(
132
  'header' => Mage::helper('reports')->__('Country'),
133
  'width' => '100',
134
  'type' => 'country',
135
  'index' => 'billing_country_id',
136
  ));
137
  $this->addColumn('billing_region', array(
138
  'header' => Mage::helper('reports')->__('State/Province'),
139
  'width' => '150',
140
  'index' => 'billing_region',
141
  ));
142
  'header' => Mage::helper('reports')->__('Number of Orders'),
143
  'width' => '100px',
144
  'sortable' => false,
145
  'index' => 'orders_count',
146
  'total' => 'sum',
147
  'type' => 'number'
148
  ));
149
  'header' => Mage::helper('reports')->__('Average Order Amount'),
150
  'width' => '200px',
151
  'align' => 'right',
152
  'sortable' => false,
153
  'type' => 'number',
154
  'index' => 'orders_avg_amount',
155
  'total' => 'orders_sum_amount/orders_count'
156
  ));
157
  'header' => Mage::helper('reports')->__('Orders Sum Amount'),
158
  'width' => '100',
159
  'index' => 'orders_sum_amount',
160
  ));
161
  array(
162
  'header' => Mage::helper('reports')->__('Action'),
163
  'width' => '100',
164
  'type' => 'action',
165
  'getter' => 'getEntityId',
166
  'actions' => array(
167
  array(
168
  'caption' => Mage::helper('reports')->__('Edit Customer'),
169
  'url' => array('base'=> 'adminhtml/customer/edit'),
170
  'field' => 'id'
171
  )
172
  ),
173
  'filter' => false,
174
  'sortable' => false,
175
  'index' => 'stores',
176
  'is_system' => true,
177
  ));
178
  $this->addExportType('*/*/exportLifetimesalesCsv', Mage::helper('reports')->__('CSV'));
179
  $this->addExportType('*/*/exportLifetimesalesExcel', Mage::helper('reports')->__('Excel'));
180
  return parent::_prepareColumns();
181
  }
 
1
  public function __construct()
2
  {
3
  parent::__construct();
4
  $this->setId('lifetimesalesReportGrid');
5
  $this->setDefaultSort('orders_sum_amount');
6
  $this->setDefaultDir('desc');
7
  }
8
  protected function _prepareCollection()
9
  {
10
  else
11
  else
12
  $end = new Zend_Date($eDate);
13
  $collection = Mage::getResourceModel('reports/customer_collection')
14
  ->joinAttribute('billing_country_id', 'customer_address/country_id', 'default_billing', null, 'left');;
15
  $this->setCollection($collection);
16
  parent::_prepareCollection();
17
  return $this;
18
  }
19
  protected function _prepareColumns()
20
  {
21
  $this->addColumn('entity_id', array(
22
  'header' => Mage::helper('reports')->__('Customer ID'),
23
  'index' => 'entity_id'
24
  ));
25
  'header' => Mage::helper('reports')->__('Name'),
26
  'index' => 'name'
27
  ));
28
  $this->addColumn('email', array(
29
  'header' => Mage::helper('reports')->__('Email'),
30
  'width' => '150',
31
  'index' => 'email'
32
  ));
33
  $this->addColumn('billing_country_id', array(
34
  'header' => Mage::helper('reports')->__('Country'),
35
  'width' => '100',
36
  'type' => 'country',
37
  'index' => 'billing_country_id',
38
  ));
39
  $this->addColumn('billing_region', array(
40
  'header' => Mage::helper('reports')->__('State/Province'),
41
  'width' => '150',
42
  'index' => 'billing_region',
43
  ));
44
  'header' => Mage::helper('reports')->__('Number of Orders'),
45
  'width' => '100px',
46
  'sortable' => false,
47
  'index' => 'orders_count',
48
  'total' => 'sum',
49
  'type' => 'number'
50
  ));
51
  'header' => Mage::helper('reports')->__('Average Order Amount'),
52
  'width' => '200px',
53
  'align' => 'right',
54
  'sortable' => false,
55
  'type' => 'number',
56
  'index' => 'orders_avg_amount',
57
  'total' => 'orders_sum_amount/orders_count'
58
  ));
59
  'header' => Mage::helper('reports')->__('Orders Sum Amount'),
60
  'width' => '100',
61
  'index' => 'orders_sum_amount',
62
  ));
63
  array(
64
  'header' => Mage::helper('reports')->__('Action'),
65
  'width' => '100',
66
  'type' => 'action',
67
  'getter' => 'getEntityId',
68
  'actions' => array(
69
  array(
70
  'caption' => Mage::helper('reports')->__('Edit Customer'),
71
  'url' => array('base'=> 'adminhtml/customer/edit'),
72
  'field' => 'id'
73
  )
74
  ),
75
  'filter' => false,
76
  'sortable' => false,
77
  'index' => 'stores',
78
  'is_system' => true,
79
  ));
80
  $this->addExportType('*/*/exportLifetimesalesCsv', Mage::helper('reports')->__('CSV'));
81
  $this->addExportType('*/*/exportLifetimesalesExcel', Mage::helper('reports')->__('Excel'));
82
  return parent::_prepareColumns();
83
  }
84
+ <?php
85
  * Class DigitalPianism_CustomReports_Block_Lifetimesales_Grid
86
  */
87
  /**
88
  *
89
  */
90
  public function __construct()
91
  {
92
  parent::__construct();
93
  $this->setId('lifetimesalesReportGrid');
94
  $this->setDefaultSort('orders_sum_amount');
95
  $this->setDefaultDir('desc');
96
  }
97
  /**
98
  * @return $this
99
  * @throws Mage_Core_Exception
100
  * @throws Zend_Date_Exception
101
  */
102
  protected function _prepareCollection()
103
  {
104
  else
105
  else
106
  $end = new Zend_Date($eDate);
107
  $collection = Mage::getResourceModel('reports/customer_collection')
108
  ->joinAttribute('billing_country_id', 'customer_address/country_id', 'default_billing', null, 'left');;
109
  $this->setCollection($collection);
110
  parent::_prepareCollection();
111
  return $this;
112
  }
113
  /**
114
  * @return $this
115
  * @throws Exception
116
  */
117
  protected function _prepareColumns()
118
  {
119
  $this->addColumn('entity_id', array(
120
  'header' => Mage::helper('reports')->__('Customer ID'),
121
  'index' => 'entity_id'
122
  ));
123
  'header' => Mage::helper('reports')->__('Name'),
124
  'index' => 'name'
125
  ));
126
  $this->addColumn('email', array(
127
  'header' => Mage::helper('reports')->__('Email'),
128
  'width' => '150',
129
  'index' => 'email'
130
  ));
131
  $this->addColumn('billing_country_id', array(
132
  'header' => Mage::helper('reports')->__('Country'),
133
  'width' => '100',
134
  'type' => 'country',
135
  'index' => 'billing_country_id',
136
  ));
137
  $this->addColumn('billing_region', array(
138
  'header' => Mage::helper('reports')->__('State/Province'),
139
  'width' => '150',
140
  'index' => 'billing_region',
141
  ));
142
  'header' => Mage::helper('reports')->__('Number of Orders'),
143
  'width' => '100px',
144
  'sortable' => false,
145
  'index' => 'orders_count',
146
  'total' => 'sum',
147
  'type' => 'number'
148
  ));
149
  'header' => Mage::helper('reports')->__('Average Order Amount'),
150
  'width' => '200px',
151
  'align' => 'right',
152
  'sortable' => false,
153
  'type' => 'number',
154
  'index' => 'orders_avg_amount',
155
  'total' => 'orders_sum_amount/orders_count'
156
  ));
157
  'header' => Mage::helper('reports')->__('Orders Sum Amount'),
158
  'width' => '100',
159
  'index' => 'orders_sum_amount',
160
  ));
161
  array(
162
  'header' => Mage::helper('reports')->__('Action'),
163
  'width' => '100',
164
  'type' => 'action',
165
  'getter' => 'getEntityId',
166
  'actions' => array(
167
  array(
168
  'caption' => Mage::helper('reports')->__('Edit Customer'),
169
  'url' => array('base'=> 'adminhtml/customer/edit'),
170
  'field' => 'id'
171
  )
172
  ),
173
  'filter' => false,
174
  'sortable' => false,
175
  'index' => 'stores',
176
  'is_system' => true,
177
  ));
178
  $this->addExportType('*/*/exportLifetimesalesCsv', Mage::helper('reports')->__('CSV'));
179
  $this->addExportType('*/*/exportLifetimesalesExcel', Mage::helper('reports')->__('Excel'));
180
  return parent::_prepareColumns();
181
  }
app/code/community/DigitalPianism/CustomReports/Block/Noupsells.php CHANGED
@@ -1,6 +1,13 @@
1
  <?php
 
 
 
 
2
  class DigitalPianism_CustomReports_Block_Noupsells extends DigitalPianism_CustomReports_Block_Customreport
3
  {
 
 
 
4
  public function __construct()
5
  {
6
  parent::__construct();
@@ -8,6 +15,9 @@ class DigitalPianism_CustomReports_Block_Noupsells extends DigitalPianism_Custom
8
  $this->setTitle('Custom Products With No Upsells Report');
9
  }
10
 
 
 
 
11
  public function _beforeToHtml()
12
  {
13
  $this->setChild('grid', $this->getLayout()->createBlock('customreports/noupsells_grid', 'customreports.grid'));
1
  <?php
2
+
3
+ /**
4
+ * Class DigitalPianism_CustomReports_Block_Noupsells
5
+ */
6
  class DigitalPianism_CustomReports_Block_Noupsells extends DigitalPianism_CustomReports_Block_Customreport
7
  {
8
+ /**
9
+ *
10
+ */
11
  public function __construct()
12
  {
13
  parent::__construct();
15
  $this->setTitle('Custom Products With No Upsells Report');
16
  }
17
 
18
+ /**
19
+ * @return $this
20
+ */
21
  public function _beforeToHtml()
22
  {
23
  $this->setChild('grid', $this->getLayout()->createBlock('customreports/noupsells_grid', 'customreports.grid'));
app/code/community/DigitalPianism/CustomReports/Block/Noupsells/Grid.php CHANGED
@@ -1 +1 @@
1
- <?php
2
  protected $filterArray = array();
3
  public function __construct()
4
  {
5
  parent::__construct();
6
  $this->setId('noupsellsReportGrid');
7
  $this->setDefaultSort('entity_id');
8
  $this->setDefaultDir('desc');
9
  }
10
  {
11
  return $filterArray;
12
  }
13
  protected function _prepareCollection()
14
  {
15
  $collection = Mage::getResourceModel('catalog/product_collection')
16
  $this->setCollection($collection);
17
  parent::_prepareCollection();
18
  return $this;
19
  }
20
  protected function _prepareColumns()
21
  {
22
  $this->addColumn('entity_id', array(
23
  'header' =>Mage::helper('reports')->__('Product ID'),
24
  'width' =>'50px',
25
  'index' =>'entity_id'
26
  ));
27
  $this->addColumn('name', array(
28
  'header' =>Mage::helper('reports')->__('Product Name'),
29
  'index' =>'name'
30
  ));
31
  'header' =>Mage::helper('reports')->__('Sku'),
32
  'index' =>'sku'
33
  ));
34
  array(
35
  'header'=> Mage::helper('catalog')->__('Visibility'),
36
  'width' => '70px',
37
  'index' => 'visibility',
38
  'type' => 'options',
39
  'options' => Mage::getModel('catalog/product_visibility')->getOptionArray(),
40
  ));
41
  $this->addColumn('status',
42
  array(
43
  'header'=> Mage::helper('catalog')->__('Status'),
44
  'width' => '70px',
45
  'index' => 'status',
46
  'type' => 'options',
47
  'options' => Mage::getSingleton('catalog/product_status')->getOptionArray(),
48
  ));
49
  array(
50
  'header' => Mage::helper('reports')->__('Action'),
51
  'width' => '100',
52
  'type' => 'action',
53
  'getter' => 'getId',
54
  'actions' => array(
55
  array(
56
  'caption' => Mage::helper('reports')->__('Edit Product'),
57
  'url' => array('base'=> 'adminhtml/catalog_product/edit'),
58
  'field' => 'id'
59
  )
60
  ),
61
  'filter' => false,
62
  'sortable' => false,
63
  'index' => 'stores',
64
  'is_system' => true,
65
  ));
66
  $this->addExportType('*/*/exportNoupsellsCsv', Mage::helper('reports')->__('CSV'));
67
  $this->addExportType('*/*/exportNoupsellsExcel', Mage::helper('reports')->__('Excel'));
68
  return parent::_prepareColumns();
69
  }
 
70
  * Class DigitalPianism_CustomReports_Block_Noupsells_Grid
71
  */
72
  protected $filterArray = array();
73
  /**
74
  *
75
  */
76
  public function __construct()
77
  {
78
  parent::__construct();
79
  $this->setId('noupsellsReportGrid');
80
  $this->setDefaultSort('entity_id');
81
  $this->setDefaultDir('desc');
82
  }
83
  /**
84
  * @param $args
85
  */
86
  public function fillArray($args)
87
  {
88
  return $this->filterArray;
89
  }
90
  /**
91
  * @return $this
92
  */
93
  protected function _prepareCollection()
94
  {
95
  $collection = Mage::getResourceModel('catalog/product_collection')
96
  $this->setCollection($collection);
97
  parent::_prepareCollection();
98
  return $this;
99
  }
100
  /**
101
  * @return $this
102
  * @throws Exception
103
  */
104
  protected function _prepareColumns()
105
  {
106
  $this->addColumn('entity_id', array(
107
  'header' =>Mage::helper('reports')->__('Product ID'),
108
  'width' =>'50px',
109
  'index' =>'entity_id'
110
  ));
111
  $this->addColumn('name', array(
112
  'header' =>Mage::helper('reports')->__('Product Name'),
113
  'index' =>'name'
114
  ));
115
  'header' =>Mage::helper('reports')->__('Sku'),
116
  'index' =>'sku'
117
  ));
118
  array(
119
  'header'=> Mage::helper('catalog')->__('Visibility'),
120
  'width' => '70px',
121
  'index' => 'visibility',
122
  'type' => 'options',
123
  'options' => Mage::getModel('catalog/product_visibility')->getOptionArray(),
124
  ));
125
  $this->addColumn('status',
126
  array(
127
  'header'=> Mage::helper('catalog')->__('Status'),
128
  'width' => '70px',
129
  'index' => 'status',
130
  'type' => 'options',
131
  'options' => Mage::getSingleton('catalog/product_status')->getOptionArray(),
132
  ));
133
  array(
134
  'header' => Mage::helper('reports')->__('Action'),
135
  'width' => '100',
136
  'type' => 'action',
137
  'getter' => 'getId',
138
  'actions' => array(
139
  array(
140
  'caption' => Mage::helper('reports')->__('Edit Product'),
141
  'url' => array('base'=> 'adminhtml/catalog_product/edit'),
142
  'field' => 'id'
143
  )
144
  ),
145
  'filter' => false,
146
  'sortable' => false,
147
  'index' => 'stores',
148
  'is_system' => true,
149
  ));
150
  $this->addExportType('*/*/exportNoupsellsCsv', Mage::helper('reports')->__('CSV'));
151
  $this->addExportType('*/*/exportNoupsellsExcel', Mage::helper('reports')->__('Excel'));
152
  return parent::_prepareColumns();
153
  }
 
1
  protected $filterArray = array();
2
  public function __construct()
3
  {
4
  parent::__construct();
5
  $this->setId('noupsellsReportGrid');
6
  $this->setDefaultSort('entity_id');
7
  $this->setDefaultDir('desc');
8
  }
9
  {
10
  return $filterArray;
11
  }
12
  protected function _prepareCollection()
13
  {
14
  $collection = Mage::getResourceModel('catalog/product_collection')
15
  $this->setCollection($collection);
16
  parent::_prepareCollection();
17
  return $this;
18
  }
19
  protected function _prepareColumns()
20
  {
21
  $this->addColumn('entity_id', array(
22
  'header' =>Mage::helper('reports')->__('Product ID'),
23
  'width' =>'50px',
24
  'index' =>'entity_id'
25
  ));
26
  $this->addColumn('name', array(
27
  'header' =>Mage::helper('reports')->__('Product Name'),
28
  'index' =>'name'
29
  ));
30
  'header' =>Mage::helper('reports')->__('Sku'),
31
  'index' =>'sku'
32
  ));
33
  array(
34
  'header'=> Mage::helper('catalog')->__('Visibility'),
35
  'width' => '70px',
36
  'index' => 'visibility',
37
  'type' => 'options',
38
  'options' => Mage::getModel('catalog/product_visibility')->getOptionArray(),
39
  ));
40
  $this->addColumn('status',
41
  array(
42
  'header'=> Mage::helper('catalog')->__('Status'),
43
  'width' => '70px',
44
  'index' => 'status',
45
  'type' => 'options',
46
  'options' => Mage::getSingleton('catalog/product_status')->getOptionArray(),
47
  ));
48
  array(
49
  'header' => Mage::helper('reports')->__('Action'),
50
  'width' => '100',
51
  'type' => 'action',
52
  'getter' => 'getId',
53
  'actions' => array(
54
  array(
55
  'caption' => Mage::helper('reports')->__('Edit Product'),
56
  'url' => array('base'=> 'adminhtml/catalog_product/edit'),
57
  'field' => 'id'
58
  )
59
  ),
60
  'filter' => false,
61
  'sortable' => false,
62
  'index' => 'stores',
63
  'is_system' => true,
64
  ));
65
  $this->addExportType('*/*/exportNoupsellsCsv', Mage::helper('reports')->__('CSV'));
66
  $this->addExportType('*/*/exportNoupsellsExcel', Mage::helper('reports')->__('Excel'));
67
  return parent::_prepareColumns();
68
  }
69
+ <?php
70
  * Class DigitalPianism_CustomReports_Block_Noupsells_Grid
71
  */
72
  protected $filterArray = array();
73
  /**
74
  *
75
  */
76
  public function __construct()
77
  {
78
  parent::__construct();
79
  $this->setId('noupsellsReportGrid');
80
  $this->setDefaultSort('entity_id');
81
  $this->setDefaultDir('desc');
82
  }
83
  /**
84
  * @param $args
85
  */
86
  public function fillArray($args)
87
  {
88
  return $this->filterArray;
89
  }
90
  /**
91
  * @return $this
92
  */
93
  protected function _prepareCollection()
94
  {
95
  $collection = Mage::getResourceModel('catalog/product_collection')
96
  $this->setCollection($collection);
97
  parent::_prepareCollection();
98
  return $this;
99
  }
100
  /**
101
  * @return $this
102
  * @throws Exception
103
  */
104
  protected function _prepareColumns()
105
  {
106
  $this->addColumn('entity_id', array(
107
  'header' =>Mage::helper('reports')->__('Product ID'),
108
  'width' =>'50px',
109
  'index' =>'entity_id'
110
  ));
111
  $this->addColumn('name', array(
112
  'header' =>Mage::helper('reports')->__('Product Name'),
113
  'index' =>'name'
114
  ));
115
  'header' =>Mage::helper('reports')->__('Sku'),
116
  'index' =>'sku'
117
  ));
118
  array(
119
  'header'=> Mage::helper('catalog')->__('Visibility'),
120
  'width' => '70px',
121
  'index' => 'visibility',
122
  'type' => 'options',
123
  'options' => Mage::getModel('catalog/product_visibility')->getOptionArray(),
124
  ));
125
  $this->addColumn('status',
126
  array(
127
  'header'=> Mage::helper('catalog')->__('Status'),
128
  'width' => '70px',
129
  'index' => 'status',
130
  'type' => 'options',
131
  'options' => Mage::getSingleton('catalog/product_status')->getOptionArray(),
132
  ));
133
  array(
134
  'header' => Mage::helper('reports')->__('Action'),
135
  'width' => '100',
136
  'type' => 'action',
137
  'getter' => 'getId',
138
  'actions' => array(
139
  array(
140
  'caption' => Mage::helper('reports')->__('Edit Product'),
141
  'url' => array('base'=> 'adminhtml/catalog_product/edit'),
142
  'field' => 'id'
143
  )
144
  ),
145
  'filter' => false,
146
  'sortable' => false,
147
  'index' => 'stores',
148
  'is_system' => true,
149
  ));
150
  $this->addExportType('*/*/exportNoupsellsCsv', Mage::helper('reports')->__('CSV'));
151
  $this->addExportType('*/*/exportNoupsellsExcel', Mage::helper('reports')->__('Excel'));
152
  return parent::_prepareColumns();
153
  }
app/code/community/DigitalPianism/CustomReports/Block/Shoppedonce.php CHANGED
@@ -1 +1 @@
1
- <?php
2
  public function __construct()
3
  {
4
  parent::__construct();
5
  $this->setTemplate('digitalpianism/customreports/grid.phtml');
6
  }
7
  public function _beforeToHtml()
8
  {
9
  $this->setChild('grid', $this->getLayout()->createBlock('customreports/shoppedonce_grid', 'customreports.grid'));
10
  return $this;
11
  }
 
12
  * Class DigitalPianism_CustomReports_Block_Shoppedonce
13
  */
14
  /**
15
  *
16
  */
17
  public function __construct()
18
  {
19
  parent::__construct();
20
  $this->setTemplate('digitalpianism/customreports/grid.phtml');
21
  }
22
  /**
23
  * @return $this
24
  */
25
  public function _beforeToHtml()
26
  {
27
  $this->setChild('grid', $this->getLayout()->createBlock('customreports/shoppedonce_grid', 'customreports.grid'));
28
  return $this;
29
  }
 
1
  public function __construct()
2
  {
3
  parent::__construct();
4
  $this->setTemplate('digitalpianism/customreports/grid.phtml');
5
  }
6
  public function _beforeToHtml()
7
  {
8
  $this->setChild('grid', $this->getLayout()->createBlock('customreports/shoppedonce_grid', 'customreports.grid'));
9
  return $this;
10
  }
11
+ <?php
12
  * Class DigitalPianism_CustomReports_Block_Shoppedonce
13
  */
14
  /**
15
  *
16
  */
17
  public function __construct()
18
  {
19
  parent::__construct();
20
  $this->setTemplate('digitalpianism/customreports/grid.phtml');
21
  }
22
  /**
23
  * @return $this
24
  */
25
  public function _beforeToHtml()
26
  {
27
  $this->setChild('grid', $this->getLayout()->createBlock('customreports/shoppedonce_grid', 'customreports.grid'));
28
  return $this;
29
  }
app/code/community/DigitalPianism/CustomReports/Block/Shoppedonce/Grid.php CHANGED
@@ -1 +1 @@
1
- <?php
2
  public function __construct()
3
  {
4
  parent::__construct();
5
  $this->setId('shoppedonceReportGrid');
6
  $this->setDefaultSort('created_at');
7
  $this->setDefaultDir('desc');
8
  }
9
  protected function _prepareCollection()
10
  {
11
  $collection = Mage::getResourceModel('reports/order_collection')
12
  $this->setCollection($collection);
13
  parent::_prepareCollection();
14
  return $this;
15
  }
16
  protected function _prepareColumns()
17
  {
18
  $this->addColumn('entity_id', array(
19
  'header' => Mage::helper('reports')->__('Order ID'),
20
  'index' => 'entity_id'
21
  ));
22
  $this->addColumn('customer_email', array(
23
  'header' => Mage::helper('reports')->__('Customer Email'),
24
  'width' => '300',
25
  'index' => 'customer_email'
26
  ));
27
  $this->addColumn('customer_firstname', array(
28
  'header' => Mage::helper('reports')->__('First Name'),
29
  'width' => '300',
30
  'index' => 'customer_firstname',
31
  ));
32
  $this->addColumn('customer_lastname', array(
33
  'header' => Mage::helper('reports')->__('Last Name'),
34
  'width' => '300',
35
  'index' => 'customer_lastname',
36
  ));
37
  'header' =>Mage::helper('reports')->__('Sale Date'),
38
  'align' =>'right',
39
  'index' =>'created_at'
40
  ));
41
  array(
42
  'header' => Mage::helper('reports')->__('Action'),
43
  'width' => '100',
44
  'type' => 'action',
45
  'getter' => 'getEntityId',
46
  'actions' => array(
47
  array(
48
  'caption' => Mage::helper('reports')->__('Edit Order'),
49
  'url' => array('base'=> 'adminhtml/sales_order/view/'),
50
  'field' => 'order_id'
51
  )
52
  ),
53
  'filter' => false,
54
  'sortable' => false,
55
  'index' => 'stores',
56
  'is_system' => true,
57
  ));
58
  $this->addExportType('*/*/exportShoppedonceCsv', Mage::helper('reports')->__('CSV'));
59
  $this->addExportType('*/*/exportShoppedonceExcel', Mage::helper('reports')->__('Excel'));
60
  return parent::_prepareColumns();
61
  }
 
62
  * Class DigitalPianism_CustomReports_Block_Shoppedonce_Grid
63
  */
64
  /**
65
  *
66
  */
67
  public function __construct()
68
  {
69
  parent::__construct();
70
  $this->setId('shoppedonceReportGrid');
71
  $this->setDefaultSort('created_at');
72
  $this->setDefaultDir('desc');
73
  }
74
  /**
75
  * @return $this
76
  */
77
  protected function _prepareCollection()
78
  {
79
  $collection = Mage::getResourceModel('reports/order_collection')
80
  $this->setCollection($collection);
81
  parent::_prepareCollection();
82
  return $this;
83
  }
84
  /**
85
  * @return $this
86
  * @throws Exception
87
  */
88
  protected function _prepareColumns()
89
  {
90
  $this->addColumn('entity_id', array(
91
  'header' => Mage::helper('reports')->__('Order ID'),
92
  'index' => 'entity_id'
93
  ));
94
  $this->addColumn('customer_email', array(
95
  'header' => Mage::helper('reports')->__('Customer Email'),
96
  'width' => '300',
97
  'index' => 'customer_email'
98
  ));
99
  $this->addColumn('customer_firstname', array(
100
  'header' => Mage::helper('reports')->__('First Name'),
101
  'width' => '300',
102
  'index' => 'customer_firstname',
103
  ));
104
  $this->addColumn('customer_lastname', array(
105
  'header' => Mage::helper('reports')->__('Last Name'),
106
  'width' => '300',
107
  'index' => 'customer_lastname',
108
  ));
109
  'header' =>Mage::helper('reports')->__('Sale Date'),
110
  'align' =>'right',
111
  'index' =>'created_at'
112
  ));
113
  array(
114
  'header' => Mage::helper('reports')->__('Action'),
115
  'width' => '100',
116
  'type' => 'action',
117
  'getter' => 'getEntityId',
118
  'actions' => array(
119
  array(
120
  'caption' => Mage::helper('reports')->__('Edit Order'),
121
  'url' => array('base'=> 'adminhtml/sales_order/view/'),
122
  'field' => 'order_id'
123
  )
124
  ),
125
  'filter' => false,
126
  'sortable' => false,
127
  'index' => 'stores',
128
  'is_system' => true,
129
  ));
130
  $this->addExportType('*/*/exportShoppedonceCsv', Mage::helper('reports')->__('CSV'));
131
  $this->addExportType('*/*/exportShoppedonceExcel', Mage::helper('reports')->__('Excel'));
132
  return parent::_prepareColumns();
133
  }
 
1
  public function __construct()
2
  {
3
  parent::__construct();
4
  $this->setId('shoppedonceReportGrid');
5
  $this->setDefaultSort('created_at');
6
  $this->setDefaultDir('desc');
7
  }
8
  protected function _prepareCollection()
9
  {
10
  $collection = Mage::getResourceModel('reports/order_collection')
11
  $this->setCollection($collection);
12
  parent::_prepareCollection();
13
  return $this;
14
  }
15
  protected function _prepareColumns()
16
  {
17
  $this->addColumn('entity_id', array(
18
  'header' => Mage::helper('reports')->__('Order ID'),
19
  'index' => 'entity_id'
20
  ));
21
  $this->addColumn('customer_email', array(
22
  'header' => Mage::helper('reports')->__('Customer Email'),
23
  'width' => '300',
24
  'index' => 'customer_email'
25
  ));
26
  $this->addColumn('customer_firstname', array(
27
  'header' => Mage::helper('reports')->__('First Name'),
28
  'width' => '300',
29
  'index' => 'customer_firstname',
30
  ));
31
  $this->addColumn('customer_lastname', array(
32
  'header' => Mage::helper('reports')->__('Last Name'),
33
  'width' => '300',
34
  'index' => 'customer_lastname',
35
  ));
36
  'header' =>Mage::helper('reports')->__('Sale Date'),
37
  'align' =>'right',
38
  'index' =>'created_at'
39
  ));
40
  array(
41
  'header' => Mage::helper('reports')->__('Action'),
42
  'width' => '100',
43
  'type' => 'action',
44
  'getter' => 'getEntityId',
45
  'actions' => array(
46
  array(
47
  'caption' => Mage::helper('reports')->__('Edit Order'),
48
  'url' => array('base'=> 'adminhtml/sales_order/view/'),
49
  'field' => 'order_id'
50
  )
51
  ),
52
  'filter' => false,
53
  'sortable' => false,
54
  'index' => 'stores',
55
  'is_system' => true,
56
  ));
57
  $this->addExportType('*/*/exportShoppedonceCsv', Mage::helper('reports')->__('CSV'));
58
  $this->addExportType('*/*/exportShoppedonceExcel', Mage::helper('reports')->__('Excel'));
59
  return parent::_prepareColumns();
60
  }
61
+ <?php
62
  * Class DigitalPianism_CustomReports_Block_Shoppedonce_Grid
63
  */
64
  /**
65
  *
66
  */
67
  public function __construct()
68
  {
69
  parent::__construct();
70
  $this->setId('shoppedonceReportGrid');
71
  $this->setDefaultSort('created_at');
72
  $this->setDefaultDir('desc');
73
  }
74
  /**
75
  * @return $this
76
  */
77
  protected function _prepareCollection()
78
  {
79
  $collection = Mage::getResourceModel('reports/order_collection')
80
  $this->setCollection($collection);
81
  parent::_prepareCollection();
82
  return $this;
83
  }
84
  /**
85
  * @return $this
86
  * @throws Exception
87
  */
88
  protected function _prepareColumns()
89
  {
90
  $this->addColumn('entity_id', array(
91
  'header' => Mage::helper('reports')->__('Order ID'),
92
  'index' => 'entity_id'
93
  ));
94
  $this->addColumn('customer_email', array(
95
  'header' => Mage::helper('reports')->__('Customer Email'),
96
  'width' => '300',
97
  'index' => 'customer_email'
98
  ));
99
  $this->addColumn('customer_firstname', array(
100
  'header' => Mage::helper('reports')->__('First Name'),
101
  'width' => '300',
102
  'index' => 'customer_firstname',
103
  ));
104
  $this->addColumn('customer_lastname', array(
105
  'header' => Mage::helper('reports')->__('Last Name'),
106
  'width' => '300',
107
  'index' => 'customer_lastname',
108
  ));
109
  'header' =>Mage::helper('reports')->__('Sale Date'),
110
  'align' =>'right',
111
  'index' =>'created_at'
112
  ));
113
  array(
114
  'header' => Mage::helper('reports')->__('Action'),
115
  'width' => '100',
116
  'type' => 'action',
117
  'getter' => 'getEntityId',
118
  'actions' => array(
119
  array(
120
  'caption' => Mage::helper('reports')->__('Edit Order'),
121
  'url' => array('base'=> 'adminhtml/sales_order/view/'),
122
  'field' => 'order_id'
123
  )
124
  ),
125
  'filter' => false,
126
  'sortable' => false,
127
  'index' => 'stores',
128
  'is_system' => true,
129
  ));
130
  $this->addExportType('*/*/exportShoppedonceCsv', Mage::helper('reports')->__('CSV'));
131
  $this->addExportType('*/*/exportShoppedonceExcel', Mage::helper('reports')->__('Excel'));
132
  return parent::_prepareColumns();
133
  }
app/code/community/DigitalPianism/CustomReports/Block/Signedupnoorder.php CHANGED
@@ -1,6 +1,13 @@
1
  <?php
 
 
 
 
2
  class DigitalPianism_CustomReports_Block_Signedupnoorder extends DigitalPianism_CustomReports_Block_Customreport
3
  {
 
 
 
4
  public function __construct()
5
  {
6
  parent::__construct();
@@ -8,6 +15,9 @@ class DigitalPianism_CustomReports_Block_Signedupnoorder extends DigitalPianism_
8
  $this->setTitle('Custom Signed Up But Never Shopped Report');
9
  }
10
 
 
 
 
11
  public function _beforeToHtml()
12
  {
13
  $this->setChild('grid', $this->getLayout()->createBlock('customreports/signedupnoorder_grid', 'customreports.grid'));
1
  <?php
2
+
3
+ /**
4
+ * Class DigitalPianism_CustomReports_Block_Signedupnoorder
5
+ */
6
  class DigitalPianism_CustomReports_Block_Signedupnoorder extends DigitalPianism_CustomReports_Block_Customreport
7
  {
8
+ /**
9
+ *
10
+ */
11
  public function __construct()
12
  {
13
  parent::__construct();
15
  $this->setTitle('Custom Signed Up But Never Shopped Report');
16
  }
17
 
18
+ /**
19
+ * @return $this
20
+ */
21
  public function _beforeToHtml()
22
  {
23
  $this->setChild('grid', $this->getLayout()->createBlock('customreports/signedupnoorder_grid', 'customreports.grid'));
app/code/community/DigitalPianism/CustomReports/Block/Signedupnoorder/Grid.php CHANGED
@@ -1 +1 @@
1
- <?php
2
  public function __construct()
3
  {
4
  parent::__construct();
5
  $this->setId('signedupnoorderReportGrid');
6
  $this->setDefaultSort('subscriber_subscriptiondate');
7
  $this->setDefaultDir('desc');
8
  }
9
  protected function _prepareCollection()
10
  {
11
  $collection = Mage::getModel('newsletter/subscriber')->getCollection()
12
  $this->setCollection($collection);
13
  parent::_prepareCollection();
14
  return $this;
15
  }
16
  protected function _prepareColumns()
17
  {
18
  $this->addColumn('subscriber_id', array(
19
  'header' => Mage::helper('reports')->__('Subscriber ID'),
20
  'index' => 'subscriber_id'
21
  ));
22
  $this->addColumn('subscriber_email', array(
23
  'header' => Mage::helper('reports')->__('Subscriber Email'),
24
  'width' => '300',
25
  'index' => 'subscriber_email'
26
  ));
27
  $this->addColumn('subscriber_status', array(
28
  'header' => Mage::helper('reports')->__('Status'),
29
  'width' => '300',
30
  'index' => 'subscriber_status',
31
  ));
32
  $this->addExportType('*/*/exportSignedupnoorderCsv', Mage::helper('reports')->__('CSV'));
33
  $this->addExportType('*/*/exportSignedupnoorderExcel', Mage::helper('reports')->__('Excel'));
34
  return parent::_prepareColumns();
35
  }
 
36
  * Class DigitalPianism_CustomReports_Block_Signedupnoorder_Grid
37
  */
38
  /**
39
  *
40
  */
41
  public function __construct()
42
  {
43
  parent::__construct();
44
  $this->setId('signedupnoorderReportGrid');
45
  $this->setDefaultSort('subscriber_subscriptiondate');
46
  $this->setDefaultDir('desc');
47
  }
48
  /**
49
  * @param $args
50
  */
51
  public function fillArray($args)
52
  /**
53
  * @return $this
54
  */
55
  protected function _prepareCollection()
56
  {
57
  $collection = Mage::getModel('newsletter/subscriber')->getCollection()
58
  $this->setCollection($collection);
59
  parent::_prepareCollection();
60
  return $this;
61
  }
62
  /**
63
  * @return $this
64
  * @throws Exception
65
  */
66
  protected function _prepareColumns()
67
  {
68
  $this->addColumn('subscriber_id', array(
69
  'header' => Mage::helper('reports')->__('Subscriber ID'),
70
  'index' => 'subscriber_id'
71
  ));
72
  $this->addColumn('subscriber_email', array(
73
  'header' => Mage::helper('reports')->__('Subscriber Email'),
74
  'width' => '300',
75
  'index' => 'subscriber_email'
76
  ));
77
  $this->addColumn('subscriber_status', array(
78
  'header' => Mage::helper('reports')->__('Status'),
79
  'width' => '300',
80
  'index' => 'subscriber_status',
81
  ));
82
  $this->addExportType('*/*/exportSignedupnoorderCsv', Mage::helper('reports')->__('CSV'));
83
  $this->addExportType('*/*/exportSignedupnoorderExcel', Mage::helper('reports')->__('Excel'));
84
  return parent::_prepareColumns();
85
  }
 
1
  public function __construct()
2
  {
3
  parent::__construct();
4
  $this->setId('signedupnoorderReportGrid');
5
  $this->setDefaultSort('subscriber_subscriptiondate');
6
  $this->setDefaultDir('desc');
7
  }
8
  protected function _prepareCollection()
9
  {
10
  $collection = Mage::getModel('newsletter/subscriber')->getCollection()
11
  $this->setCollection($collection);
12
  parent::_prepareCollection();
13
  return $this;
14
  }
15
  protected function _prepareColumns()
16
  {
17
  $this->addColumn('subscriber_id', array(
18
  'header' => Mage::helper('reports')->__('Subscriber ID'),
19
  'index' => 'subscriber_id'
20
  ));
21
  $this->addColumn('subscriber_email', array(
22
  'header' => Mage::helper('reports')->__('Subscriber Email'),
23
  'width' => '300',
24
  'index' => 'subscriber_email'
25
  ));
26
  $this->addColumn('subscriber_status', array(
27
  'header' => Mage::helper('reports')->__('Status'),
28
  'width' => '300',
29
  'index' => 'subscriber_status',
30
  ));
31
  $this->addExportType('*/*/exportSignedupnoorderCsv', Mage::helper('reports')->__('CSV'));
32
  $this->addExportType('*/*/exportSignedupnoorderExcel', Mage::helper('reports')->__('Excel'));
33
  return parent::_prepareColumns();
34
  }
35
+ <?php
36
  * Class DigitalPianism_CustomReports_Block_Signedupnoorder_Grid
37
  */
38
  /**
39
  *
40
  */
41
  public function __construct()
42
  {
43
  parent::__construct();
44
  $this->setId('signedupnoorderReportGrid');
45
  $this->setDefaultSort('subscriber_subscriptiondate');
46
  $this->setDefaultDir('desc');
47
  }
48
  /**
49
  * @param $args
50
  */
51
  public function fillArray($args)
52
  /**
53
  * @return $this
54
  */
55
  protected function _prepareCollection()
56
  {
57
  $collection = Mage::getModel('newsletter/subscriber')->getCollection()
58
  $this->setCollection($collection);
59
  parent::_prepareCollection();
60
  return $this;
61
  }
62
  /**
63
  * @return $this
64
  * @throws Exception
65
  */
66
  protected function _prepareColumns()
67
  {
68
  $this->addColumn('subscriber_id', array(
69
  'header' => Mage::helper('reports')->__('Subscriber ID'),
70
  'index' => 'subscriber_id'
71
  ));
72
  $this->addColumn('subscriber_email', array(
73
  'header' => Mage::helper('reports')->__('Subscriber Email'),
74
  'width' => '300',
75
  'index' => 'subscriber_email'
76
  ));
77
  $this->addColumn('subscriber_status', array(
78
  'header' => Mage::helper('reports')->__('Status'),
79
  'width' => '300',
80
  'index' => 'subscriber_status',
81
  ));
82
  $this->addExportType('*/*/exportSignedupnoorderCsv', Mage::helper('reports')->__('CSV'));
83
  $this->addExportType('*/*/exportSignedupnoorderExcel', Mage::helper('reports')->__('Excel'));
84
  return parent::_prepareColumns();
85
  }
app/code/community/DigitalPianism/CustomReports/Block/Wishlist.php CHANGED
@@ -1,6 +1,13 @@
1
  <?php
 
 
 
 
2
  class DigitalPianism_CustomReports_Block_Wishlist extends DigitalPianism_CustomReports_Block_Customreport
3
  {
 
 
 
4
  public function __construct()
5
  {
6
  parent::__construct();
@@ -10,6 +17,9 @@ class DigitalPianism_CustomReports_Block_Wishlist extends DigitalPianism_CustomR
10
  $this->setFormAction(Mage::getUrl('*/*/index'));
11
  }
12
 
 
 
 
13
  public function _beforeToHtml()
14
  {
15
  $this->setChild('grid', $this->getLayout()->createBlock('customreports/wishlist_grid', 'customreports.grid'));
1
  <?php
2
+
3
+ /**
4
+ * Class DigitalPianism_CustomReports_Block_Wishlist
5
+ */
6
  class DigitalPianism_CustomReports_Block_Wishlist extends DigitalPianism_CustomReports_Block_Customreport
7
  {
8
+ /**
9
+ *
10
+ */
11
  public function __construct()
12
  {
13
  parent::__construct();
17
  $this->setFormAction(Mage::getUrl('*/*/index'));
18
  }
19
 
20
+ /**
21
+ * @return $this
22
+ */
23
  public function _beforeToHtml()
24
  {
25
  $this->setChild('grid', $this->getLayout()->createBlock('customreports/wishlist_grid', 'customreports.grid'));
app/code/community/DigitalPianism/CustomReports/Block/Wishlist/Grid.php CHANGED
@@ -1 +1 @@
1
- <?php
2
  protected $filterArray = array();
3
  public function __construct()
4
  {
5
  parent::__construct();
6
  $this->setId('wishlistReportGrid');
7
  $this->setDefaultSort('updated_at');
8
  $this->setDefaultDir('desc');
9
  }
10
  {
11
  return $filterArray;
12
  }
13
  protected function _prepareCollection()
14
  {
15
  else
16
  else
17
  $end = new Zend_Date($eDate);
18
  $collection = Mage::getModel('wishlist/wishlist')
19
  $this->setCollection($collection);
20
  parent::_prepareCollection();
21
  return $this;
22
  }
23
  protected function _prepareColumns()
24
  {
25
  $this->addColumn('wishlist_id', array(
26
  'header' =>Mage::helper('reports')->__('Wishlist ID'),
27
  'width' =>'50px',
28
  'index' =>'wishlist_id'
29
  ));
30
  $this->addColumn('customer_id', array(
31
  'header' =>Mage::helper('reports')->__('Customer ID'),
32
  'index' =>'customer_id'
33
  ));
34
  'header' =>Mage::helper('reports')->__('Customer Email'),
35
  'index' =>'email'
36
  ));
37
  'header' =>Mage::helper('reports')->__('Has Been Shared ?'),
38
  'index' =>'shared',
39
  'options' => array(
40
  0 => Mage::helper('reports')->__('No'),
41
  1 => Mage::helper('reports')->__('Yes')
42
  )
43
  ));
44
  $this->addColumn('updated_at', array(
45
  'header' =>Mage::helper('reports')->__('Updated At'),
46
  'align' =>'right',
47
  'index' =>'updated_at',
48
  'filter_index' =>'main_table.updated_at'
49
  ));
50
  array(
51
  'header' => Mage::helper('reports')->__('Action'),
52
  'width' => '100',
53
  'type' => 'action',
54
  'getter' => 'getCustomerId',
55
  'actions' => array(
56
  array(
57
  'caption' => Mage::helper('reports')->__('Edit Customer'),
58
  'url' => array('base'=> 'adminhtml/customer/edit'),
59
  'field' => 'id'
60
  )
61
  ),
62
  'filter' => false,
63
  'sortable' => false,
64
  'index' => 'stores',
65
  'is_system' => true,
66
  ));
67
  $this->addExportType('*/*/exportWishlistCsv', Mage::helper('reports')->__('CSV'));
68
  $this->addExportType('*/*/exportWishlistExcel', Mage::helper('reports')->__('Excel'));
69
  return parent::_prepareColumns();
70
  }
 
71
  * Class DigitalPianism_CustomReports_Block_Wishlist_Grid
72
  */
73
  protected $filterArray = array();
74
  /**
75
  *
76
  */
77
  public function __construct()
78
  {
79
  parent::__construct();
80
  $this->setId('wishlistReportGrid');
81
  $this->setDefaultSort('updated_at');
82
  $this->setDefaultDir('desc');
83
  }
84
  /**
85
  * @param $args
86
  */
87
  public function fillArray($args)
88
  {
89
  return $this->filterArray;
90
  }
91
  /**
92
  * @return $this
93
  * @throws Zend_Date_Exception
94
  */
95
  protected function _prepareCollection()
96
  {
97
  else
98
  else
99
  $end = new Zend_Date($eDate);
100
  $collection = Mage::getModel('wishlist/wishlist')
101
  $this->setCollection($collection);
102
  parent::_prepareCollection();
103
  return $this;
104
  }
105
  /**
106
  * @return $this
107
  * @throws Exception
108
  */
109
  protected function _prepareColumns()
110
  {
111
  $this->addColumn('wishlist_id', array(
112
  'header' =>Mage::helper('reports')->__('Wishlist ID'),
113
  'width' =>'50px',
114
  'index' =>'wishlist_id'
115
  ));
116
  $this->addColumn('customer_id', array(
117
  'header' =>Mage::helper('reports')->__('Customer ID'),
118
  'index' =>'customer_id'
119
  ));
120
  'header' =>Mage::helper('reports')->__('Customer Email'),
121
  'index' =>'email'
122
  ));
123
  'header' =>Mage::helper('reports')->__('Has Been Shared ?'),
124
  'index' =>'shared',
125
  'options' => array(
126
  0 => Mage::helper('reports')->__('No'),
127
  1 => Mage::helper('reports')->__('Yes')
128
  )
129
  ));
130
  $this->addColumn('updated_at', array(
131
  'header' =>Mage::helper('reports')->__('Updated At'),
132
  'align' =>'right',
133
  'index' =>'updated_at',
134
  'filter_index' =>'main_table.updated_at'
135
  ));
136
  array(
137
  'header' => Mage::helper('reports')->__('Action'),
138
  'width' => '100',
139
  'type' => 'action',
140
  'getter' => 'getCustomerId',
141
  'actions' => array(
142
  array(
143
  'caption' => Mage::helper('reports')->__('Edit Customer'),
144
  'url' => array('base'=> 'adminhtml/customer/edit'),
145
  'field' => 'id'
146
  )
147
  ),
148
  'filter' => false,
149
  'sortable' => false,
150
  'index' => 'stores',
151
  'is_system' => true,
152
  ));
153
  $this->addExportType('*/*/exportWishlistCsv', Mage::helper('reports')->__('CSV'));
154
  $this->addExportType('*/*/exportWishlistExcel', Mage::helper('reports')->__('Excel'));
155
  return parent::_prepareColumns();
156
  }
 
1
  protected $filterArray = array();
2
  public function __construct()
3
  {
4
  parent::__construct();
5
  $this->setId('wishlistReportGrid');
6
  $this->setDefaultSort('updated_at');
7
  $this->setDefaultDir('desc');
8
  }
9
  {
10
  return $filterArray;
11
  }
12
  protected function _prepareCollection()
13
  {
14
  else
15
  else
16
  $end = new Zend_Date($eDate);
17
  $collection = Mage::getModel('wishlist/wishlist')
18
  $this->setCollection($collection);
19
  parent::_prepareCollection();
20
  return $this;
21
  }
22
  protected function _prepareColumns()
23
  {
24
  $this->addColumn('wishlist_id', array(
25
  'header' =>Mage::helper('reports')->__('Wishlist ID'),
26
  'width' =>'50px',
27
  'index' =>'wishlist_id'
28
  ));
29
  $this->addColumn('customer_id', array(
30
  'header' =>Mage::helper('reports')->__('Customer ID'),
31
  'index' =>'customer_id'
32
  ));
33
  'header' =>Mage::helper('reports')->__('Customer Email'),
34
  'index' =>'email'
35
  ));
36
  'header' =>Mage::helper('reports')->__('Has Been Shared ?'),
37
  'index' =>'shared',
38
  'options' => array(
39
  0 => Mage::helper('reports')->__('No'),
40
  1 => Mage::helper('reports')->__('Yes')
41
  )
42
  ));
43
  $this->addColumn('updated_at', array(
44
  'header' =>Mage::helper('reports')->__('Updated At'),
45
  'align' =>'right',
46
  'index' =>'updated_at',
47
  'filter_index' =>'main_table.updated_at'
48
  ));
49
  array(
50
  'header' => Mage::helper('reports')->__('Action'),
51
  'width' => '100',
52
  'type' => 'action',
53
  'getter' => 'getCustomerId',
54
  'actions' => array(
55
  array(
56
  'caption' => Mage::helper('reports')->__('Edit Customer'),
57
  'url' => array('base'=> 'adminhtml/customer/edit'),
58
  'field' => 'id'
59
  )
60
  ),
61
  'filter' => false,
62
  'sortable' => false,
63
  'index' => 'stores',
64
  'is_system' => true,
65
  ));
66
  $this->addExportType('*/*/exportWishlistCsv', Mage::helper('reports')->__('CSV'));
67
  $this->addExportType('*/*/exportWishlistExcel', Mage::helper('reports')->__('Excel'));
68
  return parent::_prepareColumns();
69
  }
70
+ <?php
71
  * Class DigitalPianism_CustomReports_Block_Wishlist_Grid
72
  */
73
  protected $filterArray = array();
74
  /**
75
  *
76
  */
77
  public function __construct()
78
  {
79
  parent::__construct();
80
  $this->setId('wishlistReportGrid');
81
  $this->setDefaultSort('updated_at');
82
  $this->setDefaultDir('desc');
83
  }
84
  /**
85
  * @param $args
86
  */
87
  public function fillArray($args)
88
  {
89
  return $this->filterArray;
90
  }
91
  /**
92
  * @return $this
93
  * @throws Zend_Date_Exception
94
  */
95
  protected function _prepareCollection()
96
  {
97
  else
98
  else
99
  $end = new Zend_Date($eDate);
100
  $collection = Mage::getModel('wishlist/wishlist')
101
  $this->setCollection($collection);
102
  parent::_prepareCollection();
103
  return $this;
104
  }
105
  /**
106
  * @return $this
107
  * @throws Exception
108
  */
109
  protected function _prepareColumns()
110
  {
111
  $this->addColumn('wishlist_id', array(
112
  'header' =>Mage::helper('reports')->__('Wishlist ID'),
113
  'width' =>'50px',
114
  'index' =>'wishlist_id'
115
  ));
116
  $this->addColumn('customer_id', array(
117
  'header' =>Mage::helper('reports')->__('Customer ID'),
118
  'index' =>'customer_id'
119
  ));
120
  'header' =>Mage::helper('reports')->__('Customer Email'),
121
  'index' =>'email'
122
  ));
123
  'header' =>Mage::helper('reports')->__('Has Been Shared ?'),
124
  'index' =>'shared',
125
  'options' => array(
126
  0 => Mage::helper('reports')->__('No'),
127
  1 => Mage::helper('reports')->__('Yes')
128
  )
129
  ));
130
  $this->addColumn('updated_at', array(
131
  'header' =>Mage::helper('reports')->__('Updated At'),
132
  'align' =>'right',
133
  'index' =>'updated_at',
134
  'filter_index' =>'main_table.updated_at'
135
  ));
136
  array(
137
  'header' => Mage::helper('reports')->__('Action'),
138
  'width' => '100',
139
  'type' => 'action',
140
  'getter' => 'getCustomerId',
141
  'actions' => array(
142
  array(
143
  'caption' => Mage::helper('reports')->__('Edit Customer'),
144
  'url' => array('base'=> 'adminhtml/customer/edit'),
145
  'field' => 'id'
146
  )
147
  ),
148
  'filter' => false,
149
  'sortable' => false,
150
  'index' => 'stores',
151
  'is_system' => true,
152
  ));
153
  $this->addExportType('*/*/exportWishlistCsv', Mage::helper('reports')->__('CSV'));
154
  $this->addExportType('*/*/exportWishlistExcel', Mage::helper('reports')->__('Excel'));
155
  return parent::_prepareColumns();
156
  }
app/code/community/DigitalPianism/CustomReports/Block/Worstsellers.php CHANGED
@@ -1,6 +1,13 @@
1
  <?php
 
 
 
 
2
  class DigitalPianism_CustomReports_Block_Worstsellers extends DigitalPianism_CustomReports_Block_Customreport
3
  {
 
 
 
4
  public function __construct()
5
  {
6
  parent::__construct();
@@ -10,6 +17,9 @@ class DigitalPianism_CustomReports_Block_Worstsellers extends DigitalPianism_Cus
10
  $this->setFormAction(Mage::getUrl('*/*/index'));
11
  }
12
 
 
 
 
13
  public function _beforeToHtml()
14
  {
15
  $this->setChild('grid', $this->getLayout()->createBlock('customreports/worstsellers_grid', 'customreports.grid'));
1
  <?php
2
+
3
+ /**
4
+ * Class DigitalPianism_CustomReports_Block_Worstsellers
5
+ */
6
  class DigitalPianism_CustomReports_Block_Worstsellers extends DigitalPianism_CustomReports_Block_Customreport
7
  {
8
+ /**
9
+ *
10
+ */
11
  public function __construct()
12
  {
13
  parent::__construct();
17
  $this->setFormAction(Mage::getUrl('*/*/index'));
18
  }
19
 
20
+ /**
21
+ * @return $this
22
+ */
23
  public function _beforeToHtml()
24
  {
25
  $this->setChild('grid', $this->getLayout()->createBlock('customreports/worstsellers_grid', 'customreports.grid'));
app/code/community/DigitalPianism/CustomReports/Block/Worstsellers/Grid.php CHANGED
@@ -1,8 +1,15 @@
1
  <?php
 
 
 
 
2
  class DigitalPianism_CustomReports_Block_Worstsellers_Grid extends Mage_Adminhtml_Block_Widget_Grid
3
  {
4
  protected $arrayBestSellers = array();
5
 
 
 
 
6
  public function __construct()
7
  {
8
  parent::__construct();
@@ -10,8 +17,11 @@ class DigitalPianism_CustomReports_Block_Worstsellers_Grid extends Mage_Adminhtm
10
  $this->setFilterVisibility(false);
11
  $this->setId('worstsellersReportGrid');
12
  }
13
-
14
- public function fillBestsellersArray($args)
 
 
 
15
  {
16
  // Get Sku and Name
17
  $sku = array_key_exists('sku',$args['row']) ? $args['row']['sku'] : $args['row']['catalog_product.sku'];
@@ -63,8 +73,11 @@ class DigitalPianism_CustomReports_Block_Worstsellers_Grid extends Mage_Adminhtm
63
  'product_id' => $args['row']['entity_id']
64
  );
65
  }
66
-
67
- public function addMostViewedData($args)
 
 
 
68
  {
69
  // If the product has been pushed to the first array
70
  // That means it has been sold
@@ -111,7 +124,12 @@ class DigitalPianism_CustomReports_Block_Worstsellers_Grid extends Mage_Adminhtm
111
  );
112
  }
113
  }
114
-
 
 
 
 
 
115
  protected function _prepareCollection()
116
  {
117
  // Get the session
@@ -215,6 +233,10 @@ class DigitalPianism_CustomReports_Block_Worstsellers_Grid extends Mage_Adminhtm
215
  return $this;
216
  }
217
 
 
 
 
 
218
  protected function _prepareColumns()
219
  {
220
  $this->addColumn('sku', array(
1
  <?php
2
+
3
+ /**
4
+ * Class DigitalPianism_CustomReports_Block_Worstsellers_Grid
5
+ */
6
  class DigitalPianism_CustomReports_Block_Worstsellers_Grid extends Mage_Adminhtml_Block_Widget_Grid
7
  {
8
  protected $arrayBestSellers = array();
9
 
10
+ /**
11
+ *
12
+ */
13
  public function __construct()
14
  {
15
  parent::__construct();
17
  $this->setFilterVisibility(false);
18
  $this->setId('worstsellersReportGrid');
19
  }
20
+
21
+ /**
22
+ * @param $args
23
+ */
24
+ public function fillBestsellersArray($args)
25
  {
26
  // Get Sku and Name
27
  $sku = array_key_exists('sku',$args['row']) ? $args['row']['sku'] : $args['row']['catalog_product.sku'];
73
  'product_id' => $args['row']['entity_id']
74
  );
75
  }
76
+
77
+ /**
78
+ * @param $args
79
+ */
80
+ public function addMostViewedData($args)
81
  {
82
  // If the product has been pushed to the first array
83
  // That means it has been sold
124
  );
125
  }
126
  }
127
+
128
+ /**
129
+ * @return $this
130
+ * @throws Exception
131
+ * @throws Zend_Date_Exception
132
+ */
133
  protected function _prepareCollection()
134
  {
135
  // Get the session
233
  return $this;
234
  }
235
 
236
+ /**
237
+ * @return $this
238
+ * @throws Exception
239
+ */
240
  protected function _prepareColumns()
241
  {
242
  $this->addColumn('sku', array(
app/code/community/DigitalPianism/CustomReports/Block/Worstsellersbycategory.php CHANGED
@@ -1,6 +1,13 @@
1
  <?php
 
 
 
 
2
  class DigitalPianism_CustomReports_Block_Worstsellersbycategory extends DigitalPianism_CustomReports_Block_Customreport
3
  {
 
 
 
4
  public function __construct()
5
  {
6
  parent::__construct();
@@ -15,6 +22,9 @@ class DigitalPianism_CustomReports_Block_Worstsellersbycategory extends DigitalP
15
  $this->setFormAction(Mage::getUrl('*/*/index'));
16
  }
17
 
 
 
 
18
  public function _beforeToHtml()
19
  {
20
  $this->setChild('grid', $this->getLayout()->createBlock('customreports/worstsellersbycategory_grid', 'customreports.grid'));
1
  <?php
2
+
3
+ /**
4
+ * Class DigitalPianism_CustomReports_Block_Worstsellersbycategory
5
+ */
6
  class DigitalPianism_CustomReports_Block_Worstsellersbycategory extends DigitalPianism_CustomReports_Block_Customreport
7
  {
8
+ /**
9
+ *
10
+ */
11
  public function __construct()
12
  {
13
  parent::__construct();
22
  $this->setFormAction(Mage::getUrl('*/*/index'));
23
  }
24
 
25
+ /**
26
+ * @return $this
27
+ */
28
  public function _beforeToHtml()
29
  {
30
  $this->setChild('grid', $this->getLayout()->createBlock('customreports/worstsellersbycategory_grid', 'customreports.grid'));
app/code/community/DigitalPianism/CustomReports/Block/Worstsellersbycategory/Grid.php CHANGED
@@ -1,8 +1,15 @@
1
  <?php
 
 
 
 
2
  class DigitalPianism_CustomReports_Block_Worstsellersbycategory_Grid extends Mage_Adminhtml_Block_Widget_Grid
3
  {
4
  protected $arrayBestSellers = array();
5
 
 
 
 
6
  public function __construct()
7
  {
8
  parent::__construct();
@@ -10,8 +17,11 @@ class DigitalPianism_CustomReports_Block_Worstsellersbycategory_Grid extends Mag
10
  $this->setFilterVisibility(false);
11
  $this->setId('worstsellersbycategoryReportGrid');
12
  }
13
-
14
- public function fillBestsellersArray($args)
 
 
 
15
  {
16
  // We fill the array with the data
17
  $this->arrayBestSellers[$args['row']['entity_id']] = array(
@@ -20,8 +30,11 @@ class DigitalPianism_CustomReports_Block_Worstsellersbycategory_Grid extends Mag
20
  'product_id' => $args['row']['entity_id']
21
  );
22
  }
23
-
24
- public function addMostViewedData($args)
 
 
 
25
  {
26
  // If the product has been pushed to the first array
27
  // That means it has been sold
@@ -41,7 +54,13 @@ class DigitalPianism_CustomReports_Block_Worstsellersbycategory_Grid extends Mag
41
  );
42
  }
43
  }
44
-
 
 
 
 
 
 
45
  protected function _prepareCollection()
46
  {
47
  // Get the session
@@ -213,6 +232,10 @@ class DigitalPianism_CustomReports_Block_Worstsellersbycategory_Grid extends Mag
213
  return $this;
214
  }
215
 
 
 
 
 
216
  protected function _prepareColumns()
217
  {
218
  $this->addColumn('name', array(
1
  <?php
2
+
3
+ /**
4
+ * Class DigitalPianism_CustomReports_Block_Worstsellersbycategory_Grid
5
+ */
6
  class DigitalPianism_CustomReports_Block_Worstsellersbycategory_Grid extends Mage_Adminhtml_Block_Widget_Grid
7
  {
8
  protected $arrayBestSellers = array();
9
 
10
+ /**
11
+ *
12
+ */
13
  public function __construct()
14
  {
15
  parent::__construct();
17
  $this->setFilterVisibility(false);
18
  $this->setId('worstsellersbycategoryReportGrid');
19
  }
20
+
21
+ /**
22
+ * @param $args
23
+ */
24
+ public function fillBestsellersArray($args)
25
  {
26
  // We fill the array with the data
27
  $this->arrayBestSellers[$args['row']['entity_id']] = array(
30
  'product_id' => $args['row']['entity_id']
31
  );
32
  }
33
+
34
+ /**
35
+ * @param $args
36
+ */
37
+ public function addMostViewedData($args)
38
  {
39
  // If the product has been pushed to the first array
40
  // That means it has been sold
54
  );
55
  }
56
  }
57
+
58
+ /**
59
+ * @return $this
60
+ * @throws Exception
61
+ * @throws Mage_Core_Exception
62
+ * @throws Zend_Date_Exception
63
+ */
64
  protected function _prepareCollection()
65
  {
66
  // Get the session
232
  return $this;
233
  }
234
 
235
+ /**
236
+ * @return $this
237
+ * @throws Exception
238
+ */
239
  protected function _prepareColumns()
240
  {
241
  $this->addColumn('name', array(
app/code/community/DigitalPianism/CustomReports/Model/Reports/Resource/Product/Collection.php CHANGED
@@ -2,6 +2,10 @@
2
  /*
3
  * Add a method to retrieve the bestsellers correctly
4
  */
 
 
 
 
5
  class DigitalPianism_CustomReports_Model_Reports_Resource_Product_Collection extends Mage_Reports_Model_Resource_Product_Collection
6
  {
7
  /**
@@ -14,7 +18,6 @@ class DigitalPianism_CustomReports_Model_Reports_Resource_Product_Collection ext
14
  public function addOrderedQtyAndTotal($from = '', $to = '')
15
  {
16
  $adapter = $this->getConnection();
17
- $compositeTypeIds = Mage::getSingleton('catalog/product_type')->getCompositeTypes();
18
  $orderTableAliasName = $adapter->quoteIdentifier('order');
19
 
20
  $orderJoinCondition = array(
2
  /*
3
  * Add a method to retrieve the bestsellers correctly
4
  */
5
+
6
+ /**
7
+ * Class DigitalPianism_CustomReports_Model_Reports_Resource_Product_Collection
8
+ */
9
  class DigitalPianism_CustomReports_Model_Reports_Resource_Product_Collection extends Mage_Reports_Model_Resource_Product_Collection
10
  {
11
  /**
18
  public function addOrderedQtyAndTotal($from = '', $to = '')
19
  {
20
  $adapter = $this->getConnection();
 
21
  $orderTableAliasName = $adapter->quoteIdentifier('order');
22
 
23
  $orderJoinCondition = array(
app/code/community/DigitalPianism/CustomReports/controllers/BestsellersbycategoryController.php CHANGED
@@ -1,4 +1,8 @@
1
  <?php
 
 
 
 
2
  class DigitalPianism_CustomReports_BestsellersbycategoryController extends Mage_Adminhtml_Controller_Action
3
  {
4
  public function indexAction()
1
  <?php
2
+
3
+ /**
4
+ * Class DigitalPianism_CustomReports_BestsellersbycategoryController
5
+ */
6
  class DigitalPianism_CustomReports_BestsellersbycategoryController extends Mage_Adminhtml_Controller_Action
7
  {
8
  public function indexAction()
app/code/community/DigitalPianism/CustomReports/controllers/LifetimesalesController.php CHANGED
@@ -1,4 +1,8 @@
1
  <?php
 
 
 
 
2
  class DigitalPianism_CustomReports_LifetimesalesController extends Mage_Adminhtml_Controller_Action
3
  {
4
  public function indexAction()
1
  <?php
2
+
3
+ /**
4
+ * Class DigitalPianism_CustomReports_LifetimesalesController
5
+ */
6
  class DigitalPianism_CustomReports_LifetimesalesController extends Mage_Adminhtml_Controller_Action
7
  {
8
  public function indexAction()
app/code/community/DigitalPianism/CustomReports/controllers/NoupsellsController.php CHANGED
@@ -1,4 +1,8 @@
1
  <?php
 
 
 
 
2
  class DigitalPianism_CustomReports_NoupsellsController extends Mage_Adminhtml_Controller_Action
3
  {
4
  public function indexAction()
1
  <?php
2
+
3
+ /**
4
+ * Class DigitalPianism_CustomReports_NoupsellsController
5
+ */
6
  class DigitalPianism_CustomReports_NoupsellsController extends Mage_Adminhtml_Controller_Action
7
  {
8
  public function indexAction()
app/code/community/DigitalPianism/CustomReports/controllers/ShoppedonceController.php CHANGED
@@ -1,4 +1,8 @@
1
  <?php
 
 
 
 
2
  class DigitalPianism_CustomReports_ShoppedonceController extends Mage_Adminhtml_Controller_Action
3
  {
4
  public function indexAction()
1
  <?php
2
+
3
+ /**
4
+ * Class DigitalPianism_CustomReports_ShoppedonceController
5
+ */
6
  class DigitalPianism_CustomReports_ShoppedonceController extends Mage_Adminhtml_Controller_Action
7
  {
8
  public function indexAction()
app/code/community/DigitalPianism/CustomReports/controllers/SignedupnoorderController.php CHANGED
@@ -1,4 +1,8 @@
1
  <?php
 
 
 
 
2
  class DigitalPianism_CustomReports_SignedupnoorderController extends Mage_Adminhtml_Controller_Action
3
  {
4
  public function indexAction()
1
  <?php
2
+
3
+ /**
4
+ * Class DigitalPianism_CustomReports_SignedupnoorderController
5
+ */
6
  class DigitalPianism_CustomReports_SignedupnoorderController extends Mage_Adminhtml_Controller_Action
7
  {
8
  public function indexAction()
app/code/community/DigitalPianism/CustomReports/controllers/WishlistController.php CHANGED
@@ -1,4 +1,8 @@
1
  <?php
 
 
 
 
2
  class DigitalPianism_CustomReports_WishlistController extends Mage_Adminhtml_Controller_Action
3
  {
4
  public function indexAction()
1
  <?php
2
+
3
+ /**
4
+ * Class DigitalPianism_CustomReports_WishlistController
5
+ */
6
  class DigitalPianism_CustomReports_WishlistController extends Mage_Adminhtml_Controller_Action
7
  {
8
  public function indexAction()
app/code/community/DigitalPianism/CustomReports/controllers/WorstsellersController.php CHANGED
@@ -1,4 +1,8 @@
1
  <?php
 
 
 
 
2
  class DigitalPianism_CustomReports_WorstsellersController extends Mage_Adminhtml_Controller_Action
3
  {
4
  public function indexAction()
1
  <?php
2
+
3
+ /**
4
+ * Class DigitalPianism_CustomReports_WorstsellersController
5
+ */
6
  class DigitalPianism_CustomReports_WorstsellersController extends Mage_Adminhtml_Controller_Action
7
  {
8
  public function indexAction()
app/code/community/DigitalPianism/CustomReports/controllers/WorstsellersbycategoryController.php CHANGED
@@ -1,4 +1,8 @@
1
  <?php
 
 
 
 
2
  class DigitalPianism_CustomReports_WorstsellersbycategoryController extends Mage_Adminhtml_Controller_Action
3
  {
4
  public function indexAction()
1
  <?php
2
+
3
+ /**
4
+ * Class DigitalPianism_CustomReports_WorstsellersbycategoryController
5
+ */
6
  class DigitalPianism_CustomReports_WorstsellersbycategoryController extends Mage_Adminhtml_Controller_Action
7
  {
8
  public function indexAction()
app/code/community/DigitalPianism/CustomReports/etc/config.xml CHANGED
@@ -2,7 +2,7 @@
2
  <config>
3
  <modules>
4
  <DigitalPianism_CustomReports>
5
- <version>0.1.2</version>
6
  </DigitalPianism_CustomReports>
7
  </modules>
8
 
2
  <config>
3
  <modules>
4
  <DigitalPianism_CustomReports>
5
+ <version>0.1.3</version>
6
  </DigitalPianism_CustomReports>
7
  </modules>
8
 
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>DigitalPianism_CustomReports</name>
4
- <version>0.1.2</version>
5
  <stability>stable</stability>
6
  <license>Open GPL</license>
7
  <channel>community</channel>
@@ -48,12 +48,14 @@ This module includes the following reports to Magento:&#xD;
48
  &lt;/ul&gt;&#xD;
49
  &#xD;
50
  &lt;p&gt;Thus, if a product is in several categories, it will be counted as a sale for all of these categories.&lt;/p&gt;</description>
51
- <notes>- Remove pagination and filter from worstsellers, category bestsellers and category worstsellers report.&#xD;
52
- - Remove useless code</notes>
 
 
53
  <authors><author><name>Digital Pianism</name><user>digitalpianism</user><email>contact@digital-pianism.com</email></author></authors>
54
- <date>2014-09-25</date>
55
- <time>08:57:00</time>
56
- <contents><target name="magecommunity"><dir name="DigitalPianism"><dir name="CustomReports"><dir name="Block"><dir name="Bestsellersbycategory"><file name="Grid.php" hash="6d97d97e7157790535db9828a33aa299"/></dir><file name="Bestsellersbycategory.php" hash="60483ad3e57dc461f5943c805d149c01"/><file name="Customreport.php" hash="e6bbb8a7baf7acc47f39b02e64ccbc94"/><dir name="Lifetimesales"><file name="Grid.php" hash="b36706d8594b934d1d13b236537b39cd"/></dir><file name="Lifetimesales.php" hash="94d685421ecb611a871d99c1c593ac46"/><dir name="Noupsells"><file name="Grid.php" hash="50d635cdc4268bde22ae7d029dfb125b"/></dir><file name="Noupsells.php" hash="bbc28aa60bd78b8c3ccf2fb94f470751"/><dir name="Shoppedonce"><file name="Grid.php" hash="28401d7c968100aec911545a8074dd70"/></dir><file name="Shoppedonce.php" hash="bc3b20a05d2859a710850cde353599d5"/><dir name="Signedupnoorder"><file name="Grid.php" hash="12e5f83a722b58818f0b01e6296eadef"/></dir><file name="Signedupnoorder.php" hash="30d952fcc1fa6e913c98134f195342eb"/><dir name="Wishlist"><file name="Grid.php" hash="1a77ff075cfda65ccee9c63d62725300"/></dir><file name="Wishlist.php" hash="873881855ff4b280b5c7ec84d7082808"/><dir name="Worstsellers"><file name="Grid.php" hash="8af8b059d802983e53d99ba1836c7dbd"/></dir><file name="Worstsellers.php" hash="f31350020ae1d4207a49270a226a6df4"/><dir name="Worstsellersbycategory"><file name="Grid.php" hash="95d3c6369a22d0249f38719d6b767931"/></dir><file name="Worstsellersbycategory.php" hash="4b94e31f8297c38904a073240b7af85e"/></dir><dir name="Model"><dir name="Reports"><dir name="Resource"><dir name="Product"><file name="Collection.php" hash="5e544f160b1916ce3e6c0ace949a8dc9"/></dir></dir></dir></dir><dir name="controllers"><file name="BestsellersbycategoryController.php" hash="bcb8ba02dbfbb37880830c24c88c4791"/><file name="LifetimesalesController.php" hash="36c23ba7464e5b23d7803babdc092097"/><file name="NoupsellsController.php" hash="ccdf273757694494daec860361c0ec52"/><file name="ShoppedonceController.php" hash="0c599676dbb5722feb9bc437cfb985f1"/><file name="SignedupnoorderController.php" hash="0d996537ef4affe736b1aa3437152bc6"/><file name="WishlistController.php" hash="1ee8c24d7ce1ffc28493aedba17505a5"/><file name="WorstsellersController.php" hash="20e935b7f822abd346f76e6a934234da"/><file name="WorstsellersbycategoryController.php" hash="bc37e6b7a41c4ed918018ecdf2042259"/></dir><dir name="etc"><file name="adminhtml.xml" hash="2233874893d9dcc82540d61aa0668328"/><file name="config.xml" hash="32e97cfecbe8d49caebed42f2ee43997"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="DigitalPianism_CustomReports.xml" hash="2244af82c076ed3abf5064672036ef0b"/></dir></target><target name="magelocale"><dir name="en_US"><file name="DigitalPianism_CustomReports.csv" hash="0fcee0228d1044be8c0b76f02079bf55"/></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="digitalpianism"><dir name="customreports"><file name="advancedgrid.phtml" hash="0254a130e6c76bf9c8f7a9b7ce1d27ca"/><file name="grid.phtml" hash="a8d2cbad8327390e2b9cd3b7717c384d"/></dir></dir></dir></dir></dir></dir></target></contents>
57
  <compatible/>
58
  <dependencies><required><php><min>4.1.0</min><max>6.0.0</max></php></required></dependencies>
59
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>DigitalPianism_CustomReports</name>
4
+ <version>0.1.3</version>
5
  <stability>stable</stability>
6
  <license>Open GPL</license>
7
  <channel>community</channel>
48
  &lt;/ul&gt;&#xD;
49
  &#xD;
50
  &lt;p&gt;Thus, if a product is in several categories, it will be counted as a sale for all of these categories.&lt;/p&gt;</description>
51
+ <notes>- Fix bug on the No Upsells report&#xD;
52
+ - Fix bug on the Signed Up But Never Order report&#xD;
53
+ - Fix bug on the Wishlist report&#xD;
54
+ - PHPDoc</notes>
55
  <authors><author><name>Digital Pianism</name><user>digitalpianism</user><email>contact@digital-pianism.com</email></author></authors>
56
+ <date>2014-12-19</date>
57
+ <time>11:31:37</time>
58
+ <contents><target name="magecommunity"><dir name="DigitalPianism"><dir name="CustomReports"><dir name="Block"><dir name="Bestsellersbycategory"><file name="Grid.php" hash="29ced24f2347175f8ddb3976b17a3a2d"/></dir><file name="Bestsellersbycategory.php" hash="c04a80017dc23a469138915bd608fe33"/><file name="Customreport.php" hash="f3158fc88585c8924a5e6911ce7f9ee8"/><dir name="Lifetimesales"><file name="Grid.php" hash="f34c7c9aa442377b1bbd86fe234b7e5b"/></dir><file name="Lifetimesales.php" hash="a1074d45ffcadd8ceb6facda2566fa44"/><dir name="Noupsells"><file name="Grid.php" hash="7b3b65388261407a449ff3612f36781c"/></dir><file name="Noupsells.php" hash="961b611b3b1a8f7b1ea57bdc4dbb27a6"/><dir name="Shoppedonce"><file name="Grid.php" hash="96e410f92fd88d5f4c21a8fd8203df6d"/></dir><file name="Shoppedonce.php" hash="e09510c61d1c0310739a361cb3e7f4e6"/><dir name="Signedupnoorder"><file name="Grid.php" hash="abb824130a4f365ce15789923c40d090"/></dir><file name="Signedupnoorder.php" hash="4f73318c21eb7f358aa4ab126d16cafe"/><dir name="Wishlist"><file name="Grid.php" hash="347ca1133e187fa791f6de6387794651"/></dir><file name="Wishlist.php" hash="376cbd949ea15e8c1c7f8d28fef66be4"/><dir name="Worstsellers"><file name="Grid.php" hash="4ebd28d28581125fa550b30543940847"/></dir><file name="Worstsellers.php" hash="311266f3a9d7ceccef74f05034205252"/><dir name="Worstsellersbycategory"><file name="Grid.php" hash="eea476f4bf7fdeb9ead5b9c90d91bb64"/></dir><file name="Worstsellersbycategory.php" hash="44f6b369080be2521eaa80797fde9740"/></dir><dir name="Model"><dir name="Reports"><dir name="Resource"><dir name="Product"><file name="Collection.php" hash="d31c0ea1728f3fe13e4efa438c653678"/></dir></dir></dir></dir><dir name="controllers"><file name="BestsellersbycategoryController.php" hash="29206edddf8ae9b035b7d090e05a65ba"/><file name="LifetimesalesController.php" hash="c10b299d6c1a9bebd3d5ff2e8de17ea4"/><file name="NoupsellsController.php" hash="347366d0fe998772432b0e89d05f9453"/><file name="ShoppedonceController.php" hash="0ecfbe18895945e95b0505b5920d68fd"/><file name="SignedupnoorderController.php" hash="e47e4c34542b9f8f17a90a35b7133db0"/><file name="WishlistController.php" hash="6e9c503b353d0dd772f4365da7cf8124"/><file name="WorstsellersController.php" hash="ebce18de7ce1aa56045a9aadb4684a81"/><file name="WorstsellersbycategoryController.php" hash="0729cea1793efbe733c90c9de7996453"/></dir><dir name="etc"><file name="adminhtml.xml" hash="2233874893d9dcc82540d61aa0668328"/><file name="config.xml" hash="3c4d84631cc4f367bcbe825cdd545ae0"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="DigitalPianism_CustomReports.xml" hash="2244af82c076ed3abf5064672036ef0b"/></dir></target><target name="magelocale"><dir name="en_US"><file name="DigitalPianism_CustomReports.csv" hash="0fcee0228d1044be8c0b76f02079bf55"/></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="digitalpianism"><dir name="customreports"><file name="advancedgrid.phtml" hash="0254a130e6c76bf9c8f7a9b7ce1d27ca"/><file name="grid.phtml" hash="a8d2cbad8327390e2b9cd3b7717c384d"/></dir></dir></dir></dir></dir></dir></target></contents>
59
  <compatible/>
60
  <dependencies><required><php><min>4.1.0</min><max>6.0.0</max></php></required></dependencies>
61
  </package>