Version Notes
- Remove pagination and filter from worstsellers, category bestsellers and category worstsellers report.
- Remove useless code
Download this release
Release Info
Developer | Digital Pianism |
Extension | DigitalPianism_CustomReports |
Version | 0.1.2 |
Comparing to | |
See all releases |
Code changes from version 0.1.1 to 0.1.2
- app/code/community/DigitalPianism/CustomReports/Block/Bestsellersbycategory/Grid.php +6 -13
- app/code/community/DigitalPianism/CustomReports/Block/Worstsellers/Grid.php +2 -0
- app/code/community/DigitalPianism/CustomReports/Block/Worstsellersbycategory/Grid.php +6 -13
- app/code/community/DigitalPianism/CustomReports/etc/config.xml +1 -1
- package.xml +6 -5
app/code/community/DigitalPianism/CustomReports/Block/Bestsellersbycategory/Grid.php
CHANGED
@@ -5,7 +5,9 @@ class DigitalPianism_CustomReports_Block_Bestsellersbycategory_Grid extends Mage
|
|
5 |
|
6 |
public function __construct()
|
7 |
{
|
8 |
-
|
|
|
|
|
9 |
$this->setId('bestsellersbycategoryReportGrid');
|
10 |
}
|
11 |
|
@@ -65,16 +67,7 @@ class DigitalPianism_CustomReports_Block_Bestsellersbycategory_Grid extends Mage
|
|
65 |
$this->arrayBestSellers[$categoryID]['ordered_total'] += $sumTotal;
|
66 |
}
|
67 |
else
|
68 |
-
{
|
69 |
-
// For the categories called 'ALL' we need to add the parent category name
|
70 |
-
if (strtolower($categoryName)=='all')
|
71 |
-
{
|
72 |
-
// Get the parent category Name
|
73 |
-
$parentCategoryName = Mage::getModel('catalog/category')->load($category['parent_id'])->getName();
|
74 |
-
// Add the parent category name
|
75 |
-
$categoryName = $parentCategoryName . " > " . $categoryName;
|
76 |
-
}
|
77 |
-
|
78 |
// Else we create a new entry with the data
|
79 |
$this->arrayBestSellers[$categoryID] = array(
|
80 |
'name' => $categoryName,
|
@@ -160,7 +153,7 @@ class DigitalPianism_CustomReports_Block_Bestsellersbycategory_Grid extends Mage
|
|
160 |
|
161 |
$this->setCollection($collection);
|
162 |
|
163 |
-
|
164 |
|
165 |
return $this;
|
166 |
}
|
@@ -188,6 +181,6 @@ class DigitalPianism_CustomReports_Block_Bestsellersbycategory_Grid extends Mage
|
|
188 |
$this->addExportType('*/*/exportBestsellersbycategoryCsv', Mage::helper('reports')->__('CSV'));
|
189 |
$this->addExportType('*/*/exportBestsellersbycategoryExcel', Mage::helper('reports')->__('Excel'));
|
190 |
|
191 |
-
return
|
192 |
}
|
193 |
}
|
5 |
|
6 |
public function __construct()
|
7 |
{
|
8 |
+
parent::__construct();
|
9 |
+
$this->setPagerVisibility(false);
|
10 |
+
$this->setFilterVisibility(false);
|
11 |
$this->setId('bestsellersbycategoryReportGrid');
|
12 |
}
|
13 |
|
67 |
$this->arrayBestSellers[$categoryID]['ordered_total'] += $sumTotal;
|
68 |
}
|
69 |
else
|
70 |
+
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
71 |
// Else we create a new entry with the data
|
72 |
$this->arrayBestSellers[$categoryID] = array(
|
73 |
'name' => $categoryName,
|
153 |
|
154 |
$this->setCollection($collection);
|
155 |
|
156 |
+
parent::_prepareCollection();
|
157 |
|
158 |
return $this;
|
159 |
}
|
181 |
$this->addExportType('*/*/exportBestsellersbycategoryCsv', Mage::helper('reports')->__('CSV'));
|
182 |
$this->addExportType('*/*/exportBestsellersbycategoryExcel', Mage::helper('reports')->__('Excel'));
|
183 |
|
184 |
+
return parent::_prepareColumns();
|
185 |
}
|
186 |
}
|
app/code/community/DigitalPianism/CustomReports/Block/Worstsellers/Grid.php
CHANGED
@@ -6,6 +6,8 @@ class DigitalPianism_CustomReports_Block_Worstsellers_Grid extends Mage_Adminhtm
|
|
6 |
public function __construct()
|
7 |
{
|
8 |
parent::__construct();
|
|
|
|
|
9 |
$this->setId('worstsellersReportGrid');
|
10 |
}
|
11 |
|
6 |
public function __construct()
|
7 |
{
|
8 |
parent::__construct();
|
9 |
+
$this->setPagerVisibility(false);
|
10 |
+
$this->setFilterVisibility(false);
|
11 |
$this->setId('worstsellersReportGrid');
|
12 |
}
|
13 |
|
app/code/community/DigitalPianism/CustomReports/Block/Worstsellersbycategory/Grid.php
CHANGED
@@ -5,7 +5,9 @@ class DigitalPianism_CustomReports_Block_Worstsellersbycategory_Grid extends Mag
|
|
5 |
|
6 |
public function __construct()
|
7 |
{
|
8 |
-
|
|
|
|
|
9 |
$this->setId('worstsellersbycategoryReportGrid');
|
10 |
}
|
11 |
|
@@ -173,16 +175,7 @@ class DigitalPianism_CustomReports_Block_Worstsellersbycategory_Grid extends Mag
|
|
173 |
$arrayWorstSellers[$categoryID]['views'] += $views;
|
174 |
}
|
175 |
else
|
176 |
-
{
|
177 |
-
// For the categories called 'ALL' we need to add the parent category name
|
178 |
-
if (strtolower($categoryName)=='all')
|
179 |
-
{
|
180 |
-
// Get the parent category Name
|
181 |
-
$parentCategoryName = Mage::getModel('catalog/category')->load($category['parent_id'])->getName();
|
182 |
-
// Add the parent category name
|
183 |
-
$categoryName = $parentCategoryName . " > " . $categoryName;
|
184 |
-
}
|
185 |
-
|
186 |
// Else we create a new entry with the data
|
187 |
$arrayWorstSellers[$categoryID] = array(
|
188 |
'name' => $categoryName,
|
@@ -215,7 +208,7 @@ class DigitalPianism_CustomReports_Block_Worstsellersbycategory_Grid extends Mag
|
|
215 |
|
216 |
$this->setCollection($collection);
|
217 |
|
218 |
-
|
219 |
|
220 |
return $this;
|
221 |
}
|
@@ -243,7 +236,7 @@ class DigitalPianism_CustomReports_Block_Worstsellersbycategory_Grid extends Mag
|
|
243 |
$this->addExportType('*/*/exportWorstsellersbycategoryCsv', Mage::helper('reports')->__('CSV'));
|
244 |
$this->addExportType('*/*/exportWorstsellersbycategoryExcel', Mage::helper('reports')->__('Excel'));
|
245 |
|
246 |
-
return
|
247 |
}
|
248 |
|
249 |
}
|
5 |
|
6 |
public function __construct()
|
7 |
{
|
8 |
+
parent::__construct();
|
9 |
+
$this->setPagerVisibility(false);
|
10 |
+
$this->setFilterVisibility(false);
|
11 |
$this->setId('worstsellersbycategoryReportGrid');
|
12 |
}
|
13 |
|
175 |
$arrayWorstSellers[$categoryID]['views'] += $views;
|
176 |
}
|
177 |
else
|
178 |
+
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
179 |
// Else we create a new entry with the data
|
180 |
$arrayWorstSellers[$categoryID] = array(
|
181 |
'name' => $categoryName,
|
208 |
|
209 |
$this->setCollection($collection);
|
210 |
|
211 |
+
parent::_prepareCollection();
|
212 |
|
213 |
return $this;
|
214 |
}
|
236 |
$this->addExportType('*/*/exportWorstsellersbycategoryCsv', Mage::helper('reports')->__('CSV'));
|
237 |
$this->addExportType('*/*/exportWorstsellersbycategoryExcel', Mage::helper('reports')->__('Excel'));
|
238 |
|
239 |
+
return parent::_prepareColumns();
|
240 |
}
|
241 |
|
242 |
}
|
app/code/community/DigitalPianism/CustomReports/etc/config.xml
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
<config>
|
3 |
<modules>
|
4 |
<DigitalPianism_CustomReports>
|
5 |
-
<version>0.1.
|
6 |
</DigitalPianism_CustomReports>
|
7 |
</modules>
|
8 |
|
2 |
<config>
|
3 |
<modules>
|
4 |
<DigitalPianism_CustomReports>
|
5 |
+
<version>0.1.2</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.
|
5 |
<stability>stable</stability>
|
6 |
<license>Open GPL</license>
|
7 |
<channel>community</channel>
|
@@ -48,11 +48,12 @@ 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>-
|
|
|
52 |
<authors><author><name>Digital Pianism</name><user>digitalpianism</user><email>contact@digital-pianism.com</email></author></authors>
|
53 |
-
<date>2014-09-
|
54 |
-
<time>
|
55 |
-
<contents><target name="magecommunity"><dir name="DigitalPianism"><dir name="CustomReports"><dir name="Block"><dir name="Bestsellersbycategory"><file name="Grid.php" hash="
|
56 |
<compatible/>
|
57 |
<dependencies><required><php><min>4.1.0</min><max>6.0.0</max></php></required></dependencies>
|
58 |
</package>
|
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 |
</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>- Remove pagination and filter from worstsellers, category bestsellers and category worstsellers report.
|
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>
|