Version Notes
- Add a new report: products ordered by customer groups
Download this release
Release Info
Developer | Digital Pianism |
Extension | DigitalPianism_CustomReports |
Version | 0.2.0 |
Comparing to | |
See all releases |
Code changes from version 0.1.6 to 0.2.0
- app/code/community/DigitalPianism/CustomReports/Block/Orderedbycustomergroups.php +29 -0
- app/code/community/DigitalPianism/CustomReports/Block/Orderedbycustomergroups/Grid.php +221 -0
- app/code/community/DigitalPianism/CustomReports/Helper/Data.php +9 -0
- app/code/community/DigitalPianism/CustomReports/controllers/Adminhtml/OrderedbycustomergroupsController.php +62 -0
- app/code/community/DigitalPianism/CustomReports/etc/adminhtml.xml +31 -24
- app/code/community/DigitalPianism/CustomReports/etc/config.xml +7 -1
- package.xml +6 -6
app/code/community/DigitalPianism/CustomReports/Block/Orderedbycustomergroups.php
ADDED
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Class DigitalPianism_CustomReports_Block_Orderedbycustomergroups
|
5 |
+
*/
|
6 |
+
class DigitalPianism_CustomReports_Block_Orderedbycustomergroups extends DigitalPianism_CustomReports_Block_Customreport
|
7 |
+
{
|
8 |
+
/**
|
9 |
+
*
|
10 |
+
*/
|
11 |
+
public function __construct()
|
12 |
+
{
|
13 |
+
parent::__construct();
|
14 |
+
$this->setTemplate('digitalpianism/customreports/advancedgrid.phtml');
|
15 |
+
$this->setTitle('Products Ordered By Customer Groups');
|
16 |
+
// Set the right URL for the form which handles the dates
|
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/orderedbycustomergroups_grid', 'customreports.grid'));
|
26 |
+
return $this;
|
27 |
+
}
|
28 |
+
|
29 |
+
}
|
app/code/community/DigitalPianism/CustomReports/Block/Orderedbycustomergroups/Grid.php
ADDED
@@ -0,0 +1,221 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Class DigitalPianism_CustomReports_Block_Orderedbycustomergroups_Grid
|
5 |
+
*/
|
6 |
+
class DigitalPianism_CustomReports_Block_Orderedbycustomergroups_Grid extends Mage_Adminhtml_Block_Widget_Grid
|
7 |
+
{
|
8 |
+
|
9 |
+
protected $arrayCollection = [];
|
10 |
+
|
11 |
+
/**
|
12 |
+
*
|
13 |
+
*/
|
14 |
+
public function __construct()
|
15 |
+
{
|
16 |
+
parent::__construct();
|
17 |
+
$this->setId('orderedbycustomergroupsReportGrid');
|
18 |
+
}
|
19 |
+
|
20 |
+
/**
|
21 |
+
* @param $args
|
22 |
+
*/
|
23 |
+
public function fillCollection($args)
|
24 |
+
{
|
25 |
+
// Get Sku and Name
|
26 |
+
$sku = array_key_exists('sku',$args['row']) ? $args['row']['sku'] : $args['row']['catalog_product.sku'];
|
27 |
+
$name = array_key_exists('name',$args['row']) ? $args['row']['name'] : $args['row']['order_items_name'];
|
28 |
+
|
29 |
+
// If the sku is not set
|
30 |
+
if (!$sku)
|
31 |
+
{
|
32 |
+
// We get the sku
|
33 |
+
$collection = Mage::getResourceModel('catalog/product_collection')
|
34 |
+
->addFieldToFilter('entity_id', [$args['row']['entity_id']])
|
35 |
+
->addAttributeToSelect(['sku'])
|
36 |
+
->setPageSize(1);
|
37 |
+
|
38 |
+
$sku = $collection->getFirstItem()->getSku();
|
39 |
+
|
40 |
+
// If there's still no sku
|
41 |
+
if (!$sku)
|
42 |
+
{
|
43 |
+
// That means the product has been deleted
|
44 |
+
$sku = "UNKNOWN";
|
45 |
+
}
|
46 |
+
}
|
47 |
+
// If the name is not set
|
48 |
+
if (!$name)
|
49 |
+
{
|
50 |
+
// We get the name
|
51 |
+
$collection = Mage::getResourceModel('catalog/product_collection')
|
52 |
+
->addFieldToFilter('entity_id', [$args['row']['entity_id']])
|
53 |
+
->addAttributeToSelect(['name'])
|
54 |
+
->setPageSize(1);
|
55 |
+
|
56 |
+
$name = $collection->getFirstItem()->getName();
|
57 |
+
|
58 |
+
// If there's still no name
|
59 |
+
if (!$name)
|
60 |
+
{
|
61 |
+
// That means the product has been deleted
|
62 |
+
$name = "PRODUCT NO LONGER EXISTS";
|
63 |
+
}
|
64 |
+
}
|
65 |
+
|
66 |
+
// We fill the array with the data
|
67 |
+
$this->arrayCollection[$args['row']['entity_id']."_".$args['row']['customer_group_id']] = [
|
68 |
+
'sku' => $sku,
|
69 |
+
'name' => $name,
|
70 |
+
'ordered_qty' => $args['row']['ordered_qty'],
|
71 |
+
'customer_group_id' => $args['row']['customer_group_id'],
|
72 |
+
'product_id' => $args['row']['entity_id']
|
73 |
+
];
|
74 |
+
}
|
75 |
+
|
76 |
+
/**
|
77 |
+
* @return $this
|
78 |
+
* @throws Exception
|
79 |
+
* @throws Zend_Date_Exception
|
80 |
+
*/
|
81 |
+
protected function _prepareCollection()
|
82 |
+
{
|
83 |
+
|
84 |
+
// Get the session
|
85 |
+
$session = Mage::getSingleton('core/session');
|
86 |
+
|
87 |
+
// Dates for one week
|
88 |
+
$store = Mage_Core_Model_App::ADMIN_STORE_ID;
|
89 |
+
$timezone = Mage::app()->getStore($store)->getConfig(Mage_Core_Model_Locale::XML_PATH_DEFAULT_TIMEZONE);
|
90 |
+
date_default_timezone_set($timezone);
|
91 |
+
|
92 |
+
// Automatic -30 days if no dates provided
|
93 |
+
if ($session->getOrderedbycustomergroupsFrom())
|
94 |
+
{
|
95 |
+
$sDate = $session->getOrderedbycustomergroupsFrom();
|
96 |
+
}
|
97 |
+
else
|
98 |
+
{
|
99 |
+
$sDate = date('Y-m-d 00:00:00',
|
100 |
+
Mage::getModel('core/date')->timestamp(strtotime('-30 days'))
|
101 |
+
);
|
102 |
+
}
|
103 |
+
if ($session->getOrderedbycustomergroupsTo())
|
104 |
+
{
|
105 |
+
$eDate = $session->getOrderedbycustomergroupsTo();
|
106 |
+
}
|
107 |
+
else
|
108 |
+
{
|
109 |
+
$eDate = date('Y-m-d 23:59:59',
|
110 |
+
Mage::getModel('core/date')->timestamp(time())
|
111 |
+
);
|
112 |
+
}
|
113 |
+
|
114 |
+
###############################################################################
|
115 |
+
|
116 |
+
$start = new Zend_Date($sDate);
|
117 |
+
$start->setTimeZone("UTC");
|
118 |
+
|
119 |
+
$end = new Zend_Date($eDate);
|
120 |
+
$end->setTimeZone("UTC");
|
121 |
+
|
122 |
+
###############################################################################
|
123 |
+
|
124 |
+
$from = $start->toString("Y-MM-dd HH:mm:ss");
|
125 |
+
$to = $end->toString("Y-MM-dd HH:mm:ss");
|
126 |
+
|
127 |
+
|
128 |
+
// Get the products with their ordered quantity
|
129 |
+
$collection = Mage::getResourceModel('reports/product_collection')
|
130 |
+
->addAttributeToSelect('*')
|
131 |
+
->addOrderedQty($from, $to)
|
132 |
+
->setOrder('ordered_qty');
|
133 |
+
|
134 |
+
$collection->getSelect()->reset(Zend_Db_Select::GROUP);
|
135 |
+
|
136 |
+
$collection->getSelect()->columns('order.customer_group_id');
|
137 |
+
$collection->getSelect()->group(array('order_items.product_id','order.customer_group_id'));
|
138 |
+
|
139 |
+
// Call iterator walk method with collection query string and callback method as parameters
|
140 |
+
// Has to be used to handle massive collection instead of foreach
|
141 |
+
Mage::getSingleton('core/resource_iterator')->walk($collection->getSelect(), array(array($this, 'fillCollection')));
|
142 |
+
|
143 |
+
// Convert the array to a collection
|
144 |
+
$finalCollection = new Varien_Data_Collection();
|
145 |
+
foreach($this->arrayCollection as $entry){
|
146 |
+
$rowObj = new Varien_Object();
|
147 |
+
$rowObj->setData($entry);
|
148 |
+
$finalCollection->addItem($rowObj);
|
149 |
+
}
|
150 |
+
|
151 |
+
$this->setCollection($finalCollection);
|
152 |
+
|
153 |
+
parent::_prepareCollection();
|
154 |
+
|
155 |
+
return $this;
|
156 |
+
}
|
157 |
+
|
158 |
+
/**
|
159 |
+
* @return $this
|
160 |
+
* @throws Exception
|
161 |
+
*/
|
162 |
+
protected function _prepareColumns()
|
163 |
+
{
|
164 |
+
$this->addColumn('sku', array(
|
165 |
+
'header' => Mage::helper('reports')->__('Product SKU'),
|
166 |
+
'width' => '50',
|
167 |
+
'index' => 'sku'
|
168 |
+
));
|
169 |
+
|
170 |
+
$customerGroups = Mage::getResourceModel('customer/group_collection');
|
171 |
+
$custOptions = [];
|
172 |
+
foreach ($customerGroups as $customerGroup) {
|
173 |
+
$custOptions[$customerGroup->getCustomerGroupId()] = $customerGroup->getCustomerGroupCode();
|
174 |
+
}
|
175 |
+
|
176 |
+
$this->addColumn('customer_group_id', array(
|
177 |
+
'header' => Mage::helper('reports')->__('Customer Group'),
|
178 |
+
'width' => '50',
|
179 |
+
'index' => 'customer_group_id',
|
180 |
+
'type' => 'options',
|
181 |
+
'options' => $custOptions
|
182 |
+
));
|
183 |
+
|
184 |
+
$this->addColumn('name', array(
|
185 |
+
'header' => Mage::helper('reports')->__('Product Name'),
|
186 |
+
'width' => '300',
|
187 |
+
'index' => 'name'
|
188 |
+
));
|
189 |
+
|
190 |
+
$this->addColumn('ordered_qty', array(
|
191 |
+
'header' => Mage::helper('reports')->__('Ordered Quantity'),
|
192 |
+
'width' => '150',
|
193 |
+
'index' => 'ordered_qty',
|
194 |
+
));
|
195 |
+
|
196 |
+
$this->addColumn('action',
|
197 |
+
array(
|
198 |
+
'header' => Mage::helper('reports')->__('Action'),
|
199 |
+
'width' => '100',
|
200 |
+
'type' => 'action',
|
201 |
+
'getter' => 'getProductId',
|
202 |
+
'actions' => array(
|
203 |
+
array(
|
204 |
+
'caption' => Mage::helper('reports')->__('Edit Product'),
|
205 |
+
'url' => array('base'=> 'adminhtml/catalog_product/edit/'),
|
206 |
+
'field' => 'id'
|
207 |
+
)
|
208 |
+
),
|
209 |
+
'filter' => false,
|
210 |
+
'sortable' => false,
|
211 |
+
'index' => 'stores',
|
212 |
+
'is_system' => true,
|
213 |
+
));
|
214 |
+
|
215 |
+
$this->addExportType('*/*/exportOrderbycustomergroupsCsv', Mage::helper('reports')->__('CSV'));
|
216 |
+
$this->addExportType('*/*/exportOrderbycustomergroupsExcel', Mage::helper('reports')->__('Excel'));
|
217 |
+
|
218 |
+
return parent::_prepareColumns();
|
219 |
+
}
|
220 |
+
|
221 |
+
}
|
app/code/community/DigitalPianism/CustomReports/Helper/Data.php
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Class DigitalPianism_CustomReports_Helper_Data
|
5 |
+
*/
|
6 |
+
class DigitalPianism_CustomReports_Helper_Data extends Mage_Core_Helper_Abstract
|
7 |
+
{
|
8 |
+
|
9 |
+
}
|
app/code/community/DigitalPianism/CustomReports/controllers/Adminhtml/OrderedbycustomergroupsController.php
ADDED
@@ -0,0 +1,62 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Class DigitalPianism_CustomReports_OrderedbycustomergroupsController
|
5 |
+
*/
|
6 |
+
class DigitalPianism_CustomReports_OrderedbycustomergroupsController extends Mage_Adminhtml_Controller_Action
|
7 |
+
{
|
8 |
+
/**
|
9 |
+
* @return mixed
|
10 |
+
*/
|
11 |
+
protected function _isAllowed()
|
12 |
+
{
|
13 |
+
return Mage::getSingleton('admin/session')->isAllowed('report/products/orderedbycustomergroups');
|
14 |
+
}
|
15 |
+
|
16 |
+
/**
|
17 |
+
*
|
18 |
+
*/
|
19 |
+
public function indexAction()
|
20 |
+
{
|
21 |
+
// Get the session
|
22 |
+
$session = Mage::getSingleton('core/session');
|
23 |
+
|
24 |
+
// Get the dates
|
25 |
+
$_from = $this->getRequest()->getParam('from');
|
26 |
+
$_to = $this->getRequest()->getParam('to');
|
27 |
+
|
28 |
+
// Use the session to manage the dates
|
29 |
+
if ($_from != "") $session->setOrderedbycustomergroupsFrom($_from);
|
30 |
+
if ($_to != "") $session->setOrderedbycustomergroupsTo($_to);
|
31 |
+
|
32 |
+
$this->loadLayout()
|
33 |
+
->_setActiveMenu('customreports/orderedbycustomergroups')
|
34 |
+
->_addBreadcrumb(Mage::helper('adminhtml')->__('Products Ordered by Customer Groups Report'), Mage::helper('adminhtml')->__('Products Ordered by Customer Groups Report'))
|
35 |
+
->_addContent( $this->getLayout()->createBlock('customreports/orderedbycustomergroups') )
|
36 |
+
->renderLayout();
|
37 |
+
}
|
38 |
+
|
39 |
+
/**
|
40 |
+
* Export worstsellers report grid to CSV format
|
41 |
+
*/
|
42 |
+
public function exportOrderedbycustomergroupsCsvAction()
|
43 |
+
{
|
44 |
+
$fileName = 'orderedbycustomergroups.csv';
|
45 |
+
$content = $this->getLayout()->createBlock('customreports/orderedbycustomergroups_grid')
|
46 |
+
->getCsvFile();
|
47 |
+
|
48 |
+
$this->_prepareDownloadResponse($fileName, $content);
|
49 |
+
}
|
50 |
+
|
51 |
+
/**
|
52 |
+
* Export worstsellers report to Excel XML format
|
53 |
+
*/
|
54 |
+
public function exportOrderedbycustomergroupsExcelAction()
|
55 |
+
{
|
56 |
+
$fileName = 'orderedbycustomergroups.xml';
|
57 |
+
$content = $this->getLayout()->createBlock('customreports/orderedbycustomergroups_grid')
|
58 |
+
->getExcelFile($fileName);
|
59 |
+
|
60 |
+
$this->_prepareDownloadResponse($fileName, $content);
|
61 |
+
}
|
62 |
+
}
|
app/code/community/DigitalPianism/CustomReports/etc/adminhtml.xml
CHANGED
@@ -1,55 +1,59 @@
|
|
1 |
<?xml version="1.0" ?>
|
2 |
<config>
|
3 |
<menu>
|
4 |
-
<report translate="title" module="
|
5 |
<title>Reports</title>
|
6 |
<sort_order>80</sort_order>
|
7 |
<children>
|
8 |
-
<categories translate="
|
9 |
<title>Categories</title>
|
10 |
<sort_order>25</sort_order>
|
11 |
<children>
|
12 |
-
<bestsellersbycategory translate="title" module="
|
13 |
<title>Bestsellers</title>
|
14 |
<action>adminhtml/bestsellersbycategory</action>
|
15 |
</bestsellersbycategory>
|
16 |
-
<worstsellersbycategory translate="title" module="
|
17 |
<title>Worstsellers</title>
|
18 |
<action>adminhtml/worstsellersbycategory</action>
|
19 |
</worstsellersbycategory>
|
20 |
</children>
|
21 |
</categories>
|
22 |
-
<products translate="title" module="
|
23 |
<title>Products</title>
|
24 |
<children>
|
25 |
-
<noupsells translate="title" module="
|
26 |
<title>No Upsells</title>
|
27 |
<action>adminhtml/noupsells</action>
|
28 |
</noupsells>
|
29 |
-
<worstsellers translate="title" module="
|
30 |
<title>Worstsellers</title>
|
31 |
<action>adminhtml/worstsellers</action>
|
32 |
</worstsellers>
|
|
|
|
|
|
|
|
|
33 |
</children>
|
34 |
</products>
|
35 |
-
<customers translate="title" module="
|
36 |
<title>Customers</title>
|
37 |
<children>
|
38 |
-
<lifetimesales translate="title" module="
|
39 |
<title>Lifetime Sales</title>
|
40 |
<action>adminhtml/lifetimesales</action>
|
41 |
</lifetimesales>
|
42 |
-
<shoppedonce translate="title" module="
|
43 |
<title>Shopped Once And Never Again</title>
|
44 |
<action>adminhtml/shoppedonce</action>
|
45 |
</shoppedonce>
|
46 |
-
<signedupnoorder translate="title" module="
|
47 |
<title>Signed Up And Never Order</title>
|
48 |
<action>adminhtml/signedupnoorder</action>
|
49 |
</signedupnoorder>
|
50 |
</children>
|
51 |
</customers>
|
52 |
-
<wishlist translate="title" module="
|
53 |
<title>Wishlist</title>
|
54 |
<action>adminhtml/wishlist</action>
|
55 |
</wishlist>
|
@@ -63,46 +67,49 @@
|
|
63 |
</all>
|
64 |
<admin>
|
65 |
<children>
|
66 |
-
<report translate="title" module="
|
67 |
<title>Reports</title>
|
68 |
<children>
|
69 |
-
<categories translate="
|
70 |
<title>Categories</title>
|
71 |
<children>
|
72 |
-
<bestsellersbycategory translate="title" module="
|
73 |
<title>Bestsellers</title>
|
74 |
</bestsellersbycategory>
|
75 |
-
<worstsellersbycategory translate="title" module="
|
76 |
<title>Worstsellers</title>
|
77 |
</worstsellersbycategory>
|
78 |
</children>
|
79 |
</categories>
|
80 |
-
<products translate="title" module="
|
81 |
<title>Products</title>
|
82 |
<children>
|
83 |
-
<noupsells translate="title" module="
|
84 |
<title>No Upsells</title>
|
85 |
</noupsells>
|
86 |
-
<worstsellers translate="title" module="
|
87 |
<title>Worst Sellers</title>
|
88 |
</worstsellers>
|
|
|
|
|
|
|
89 |
</children>
|
90 |
</products>
|
91 |
-
<customers translate="title" module="
|
92 |
<title>Customers</title>
|
93 |
<children>
|
94 |
-
<lifetimesales translate="title" module="
|
95 |
<title>Lifetime Sales</title>
|
96 |
</lifetimesales>
|
97 |
-
<shoppedonce translate="title" module="
|
98 |
<title>Shopped Once And Never Again</title>
|
99 |
</shoppedonce>
|
100 |
-
<signedupnoorder translate="title" module="
|
101 |
<title>Signed Up And Never Order</title>
|
102 |
</signedupnoorder>
|
103 |
</children>
|
104 |
</customers>
|
105 |
-
<wishlist translate="title" module="
|
106 |
<title>Wishlist</title>
|
107 |
</wishlist>
|
108 |
</children>
|
1 |
<?xml version="1.0" ?>
|
2 |
<config>
|
3 |
<menu>
|
4 |
+
<report translate="title" module="customreports">
|
5 |
<title>Reports</title>
|
6 |
<sort_order>80</sort_order>
|
7 |
<children>
|
8 |
+
<categories translate="title" module="customreports">
|
9 |
<title>Categories</title>
|
10 |
<sort_order>25</sort_order>
|
11 |
<children>
|
12 |
+
<bestsellersbycategory translate="title" module="customreports">
|
13 |
<title>Bestsellers</title>
|
14 |
<action>adminhtml/bestsellersbycategory</action>
|
15 |
</bestsellersbycategory>
|
16 |
+
<worstsellersbycategory translate="title" module="customreports">
|
17 |
<title>Worstsellers</title>
|
18 |
<action>adminhtml/worstsellersbycategory</action>
|
19 |
</worstsellersbycategory>
|
20 |
</children>
|
21 |
</categories>
|
22 |
+
<products translate="title" module="customreports">
|
23 |
<title>Products</title>
|
24 |
<children>
|
25 |
+
<noupsells translate="title" module="customreports">
|
26 |
<title>No Upsells</title>
|
27 |
<action>adminhtml/noupsells</action>
|
28 |
</noupsells>
|
29 |
+
<worstsellers translate="title" module="customreports">
|
30 |
<title>Worstsellers</title>
|
31 |
<action>adminhtml/worstsellers</action>
|
32 |
</worstsellers>
|
33 |
+
<customergroups translate="title" module="customreports">
|
34 |
+
<title>Products Ordered by Customer Groups</title>
|
35 |
+
<action>adminhtml/orderedbycustomergroups</action>
|
36 |
+
</customergroups>
|
37 |
</children>
|
38 |
</products>
|
39 |
+
<customers translate="title" module="customreports">
|
40 |
<title>Customers</title>
|
41 |
<children>
|
42 |
+
<lifetimesales translate="title" module="customreports">
|
43 |
<title>Lifetime Sales</title>
|
44 |
<action>adminhtml/lifetimesales</action>
|
45 |
</lifetimesales>
|
46 |
+
<shoppedonce translate="title" module="customreports">
|
47 |
<title>Shopped Once And Never Again</title>
|
48 |
<action>adminhtml/shoppedonce</action>
|
49 |
</shoppedonce>
|
50 |
+
<signedupnoorder translate="title" module="customreports">
|
51 |
<title>Signed Up And Never Order</title>
|
52 |
<action>adminhtml/signedupnoorder</action>
|
53 |
</signedupnoorder>
|
54 |
</children>
|
55 |
</customers>
|
56 |
+
<wishlist translate="title" module="customreports">
|
57 |
<title>Wishlist</title>
|
58 |
<action>adminhtml/wishlist</action>
|
59 |
</wishlist>
|
67 |
</all>
|
68 |
<admin>
|
69 |
<children>
|
70 |
+
<report translate="title" module="customreports">
|
71 |
<title>Reports</title>
|
72 |
<children>
|
73 |
+
<categories translate="title" module="customreports">
|
74 |
<title>Categories</title>
|
75 |
<children>
|
76 |
+
<bestsellersbycategory translate="title" module="customreports">
|
77 |
<title>Bestsellers</title>
|
78 |
</bestsellersbycategory>
|
79 |
+
<worstsellersbycategory translate="title" module="customreports">
|
80 |
<title>Worstsellers</title>
|
81 |
</worstsellersbycategory>
|
82 |
</children>
|
83 |
</categories>
|
84 |
+
<products translate="title" module="customreports">
|
85 |
<title>Products</title>
|
86 |
<children>
|
87 |
+
<noupsells translate="title" module="customreports">
|
88 |
<title>No Upsells</title>
|
89 |
</noupsells>
|
90 |
+
<worstsellers translate="title" module="customreports">
|
91 |
<title>Worst Sellers</title>
|
92 |
</worstsellers>
|
93 |
+
<customergroups translate="title" module="customreports">
|
94 |
+
<title>Products Ordered by Customer Groups</title>
|
95 |
+
</customergroups>
|
96 |
</children>
|
97 |
</products>
|
98 |
+
<customers translate="title" module="customreports">
|
99 |
<title>Customers</title>
|
100 |
<children>
|
101 |
+
<lifetimesales translate="title" module="customreports">
|
102 |
<title>Lifetime Sales</title>
|
103 |
</lifetimesales>
|
104 |
+
<shoppedonce translate="title" module="customreports">
|
105 |
<title>Shopped Once And Never Again</title>
|
106 |
</shoppedonce>
|
107 |
+
<signedupnoorder translate="title" module="customreports">
|
108 |
<title>Signed Up And Never Order</title>
|
109 |
</signedupnoorder>
|
110 |
</children>
|
111 |
</customers>
|
112 |
+
<wishlist translate="title" module="customreports">
|
113 |
<title>Wishlist</title>
|
114 |
</wishlist>
|
115 |
</children>
|
app/code/community/DigitalPianism/CustomReports/etc/config.xml
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
<config>
|
3 |
<modules>
|
4 |
<DigitalPianism_CustomReports>
|
5 |
-
<version>0.
|
6 |
</DigitalPianism_CustomReports>
|
7 |
</modules>
|
8 |
|
@@ -47,6 +47,12 @@
|
|
47 |
<class>DigitalPianism_CustomReports_Block</class>
|
48 |
</customreports>
|
49 |
</blocks>
|
|
|
|
|
|
|
|
|
|
|
|
|
50 |
</global>
|
51 |
|
52 |
<admin>
|
2 |
<config>
|
3 |
<modules>
|
4 |
<DigitalPianism_CustomReports>
|
5 |
+
<version>0.2.0</version>
|
6 |
</DigitalPianism_CustomReports>
|
7 |
</modules>
|
8 |
|
47 |
<class>DigitalPianism_CustomReports_Block</class>
|
48 |
</customreports>
|
49 |
</blocks>
|
50 |
+
|
51 |
+
<helpers>
|
52 |
+
<customreports>
|
53 |
+
<class>DigitalPianism_CustomReports_Helper</class>
|
54 |
+
</customreports>
|
55 |
+
</helpers>
|
56 |
</global>
|
57 |
|
58 |
<admin>
|
package.xml
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>DigitalPianism_CustomReports</name>
|
4 |
-
<version>0.
|
5 |
<stability>stable</stability>
|
6 |
<license>Open GPL</license>
|
7 |
<channel>community</channel>
|
@@ -48,11 +48,11 @@ This module includes the following reports to Magento:
|
|
48 |
</ul>
|
49 |

|
50 |
<p>Thus, if a product is in several categories, it will be counted as a sale for all of these categories.</p></description>
|
51 |
-
<notes>- Add
|
52 |
<authors><author><name>Digital Pianism</name><user>digitalpianism</user><email>contact@digital-pianism.com</email></author></authors>
|
53 |
-
<date>
|
54 |
-
<time>
|
55 |
-
<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="4acdcc6742ad53120a3e907b09727e9e"/></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="0dde433a9bb53f759ec8c21af509d953"/></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"><dir name="Adminhtml"><file name="BestsellersbycategoryController.php" hash="44c28d7f6987c67ccc434be7847ddc4a"/><file name="LifetimesalesController.php" hash="66d5215c45be488839aafa9be07c5f9f"/><file name="NoupsellsController.php" hash="deea247924726caa56cd04bed578d7d8"/><file name="ShoppedonceController.php" hash="d35f0c366ab7b8b087c1cda2707c9784"/><file name="SignedupnoorderController.php" hash="127bf229c6bf8ef8a3c37b375285b9de"/><file name="WishlistController.php" hash="6f54870c276f3547377a55a0911a0775"/><file name="WorstsellersController.php" hash="8f9c233d4bc0b868eebf1a2767d90288"/><file name="WorstsellersbycategoryController.php" hash="1010003544df4469f4e958541ca9b357"/></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="
|
56 |
<compatible/>
|
57 |
-
<dependencies><required><php><min>4.1.0</min><max>
|
58 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>DigitalPianism_CustomReports</name>
|
4 |
+
<version>0.2.0</version>
|
5 |
<stability>stable</stability>
|
6 |
<license>Open GPL</license>
|
7 |
<channel>community</channel>
|
48 |
</ul>
|
49 |

|
50 |
<p>Thus, if a product is in several categories, it will be counted as a sale for all of these categories.</p></description>
|
51 |
+
<notes>- Add a new report: products ordered by customer groups</notes>
|
52 |
<authors><author><name>Digital Pianism</name><user>digitalpianism</user><email>contact@digital-pianism.com</email></author></authors>
|
53 |
+
<date>2016-05-20</date>
|
54 |
+
<time>14:30:10</time>
|
55 |
+
<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="4acdcc6742ad53120a3e907b09727e9e"/></dir><file name="Noupsells.php" hash="961b611b3b1a8f7b1ea57bdc4dbb27a6"/><dir name="Orderedbycustomergroups"><file name="Grid.php" hash="d327e6adaf30ebc8238e4d81dbfa3ddc"/></dir><file name="Orderedbycustomergroups.php" hash="9f90a9dce1e57931376a4eef87fe79ee"/><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="0dde433a9bb53f759ec8c21af509d953"/></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="Helper"><file name="Data.php" hash="05c4fbcabd3b169b8e7adf0969a4558a"/></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"><dir name="Adminhtml"><file name="BestsellersbycategoryController.php" hash="44c28d7f6987c67ccc434be7847ddc4a"/><file name="LifetimesalesController.php" hash="66d5215c45be488839aafa9be07c5f9f"/><file name="NoupsellsController.php" hash="deea247924726caa56cd04bed578d7d8"/><file name="OrderedbycustomergroupsController.php" hash="5040d6ab33abcc3f828ce5283ed3fa33"/><file name="ShoppedonceController.php" hash="d35f0c366ab7b8b087c1cda2707c9784"/><file name="SignedupnoorderController.php" hash="127bf229c6bf8ef8a3c37b375285b9de"/><file name="WishlistController.php" hash="6f54870c276f3547377a55a0911a0775"/><file name="WorstsellersController.php" hash="8f9c233d4bc0b868eebf1a2767d90288"/><file name="WorstsellersbycategoryController.php" hash="1010003544df4469f4e958541ca9b357"/></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="87519a6cb8682a738cde7c2c44db3c1e"/><file name="config.xml" hash="ee03c5a7ae7a2d57ddd3398dea07bfbc"/></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>
|
56 |
<compatible/>
|
57 |
+
<dependencies><required><php><min>4.1.0</min><max>7.0.6</max></php></required></dependencies>
|
58 |
</package>
|