TBT_Enhancedgrid - Version 1.3.1.3

Version Notes

Fixes some issues with the Magento compiler and improves display of some core components.

Download this release

Release Info

Developer Magento Core Team
Extension TBT_Enhancedgrid
Version 1.3.1.3
Comparing to
See all releases


Code changes from version 1.3.1.2 to 1.3.1.3

app/code/community/TBT/Enhancedgrid/Block/System/Html.php CHANGED
@@ -39,15 +39,9 @@ class TBT_Enhancedgrid_Block_System_Html
39
$html .= "
40
<div style=\" margin-bottom: 12px; width: 430px;\">
41
Enhanced Grid v". Mage::getConfig()->getNode('modules/TBT_Enhancedgrid/version') .". <a href='http://www.magentocommerce.com/magento-connect/WDCA/extension/748/enhanced-product-grid' target='_blank'>Click here for updates.</a><BR />
42
-
43
- <iframe src=\"http://www.wdca.ca/m/?a=enhancedgrid&v=".
44
- Mage::getConfig()->getNode('modules/TBT_Enhancedgrid/version') ."&m=".
45
- Mage::getVersion() ."&p=".
46
- urlencode($this->getBaseUrl()) ."&ap=".
47
- urlencode($this->getAction()->getFullActionName()) ."\" marginwidth=\"0\" marginheight=\"0\"
48
- hspace=\"0\" align=\"middle\" frameborder=\"0\"
49
- scrolling=\"no\" style=\"width: 500px; float: left; height: 22px;\">
50
- </iframe>
51
</div>
52
";
53
$html .= "";//$this->_getFooterHtml($element);
@@ -86,7 +80,7 @@ class TBT_Enhancedgrid_Block_System_Html
86
if($ver){
87
$field = $fieldset->addField($moduleName, 'label',
88
array(
89
- 'name' => 'ssssss',
90
'label' => $moduleName,
91
'value' => $ver
92
))->setRenderer($this->_getFieldRenderer());
39
$html .= "
40
<div style=\" margin-bottom: 12px; width: 430px;\">
41
Enhanced Grid v". Mage::getConfig()->getNode('modules/TBT_Enhancedgrid/version') .". <a href='http://www.magentocommerce.com/magento-connect/WDCA/extension/748/enhanced-product-grid' target='_blank'>Click here for updates.</a><BR />
42
+ ";
43
+ $html .= Mage::getBlockSingleton('enhancedgrid/widget_loyalty')->toHtml();
44
+ $html .= "
45
</div>
46
";
47
$html .= "";//$this->_getFooterHtml($element);
80
if($ver){
81
$field = $fieldset->addField($moduleName, 'label',
82
array(
83
+ 'name' => 'unused',
84
'label' => $moduleName,
85
'value' => $ver
86
))->setRenderer($this->_getFieldRenderer());
app/code/community/TBT/Enhancedgrid/Block/Widget/Loyalty.php ADDED
@@ -0,0 +1,61 @@
1
+ <?php
2
+ /**
3
+ * This class passes information about current version of Enhancedgrid being run to the WDCA server.
4
+ * All information is confidential and never distributed to any third priorities.
5
+ *
6
+ * @category TBT
7
+ * @package TBT_Enhancedgrid
8
+ * @author WDCA Team <contact@wdca.ca>
9
+ */
10
+ class TBT_Enhancedgrid_Block_Widget_Loyalty extends Mage_Adminhtml_Block_Template {
11
+ public function _toHtml() {
12
+ $html = <<<FEED
13
+ <!-- Visit http://www.wdca.ca/m for information about this frame. You can remove it if you want. -->
14
+ <iframe src="{$this->_getLoyaltyUrl()}" marginwidth="0" marginheight="0"
15
+ align="middle" frameborder="0"
16
+ scrolling="no" style="width: 500px; float: left; height: 22px;">
17
+ </iframe>
18
+ FEED;
19
+
20
+ return $html;
21
+ }
22
+
23
+ protected function _getLoyaltyUrl() {
24
+ $url = $this->_getBaseLoyaltyUrl();
25
+
26
+ $url_data = array();
27
+ $url_data["a"] = "enhancedgrid";
28
+ $url_data["v"] = (string) Mage::getConfig()->getNode('modules/TBT_Enhancedgrid/version');
29
+ $url_data["m"] = Mage::getVersion();
30
+ $url_data["p"] = urlencode($this->getBaseUrl());
31
+ $url_data["ap"] = urlencode($this->getAction()->getFullActionName());
32
+ //$url_data["license"] = Mage::helper('rewards/loyalty_checker')->getLicenseKey();
33
+
34
+ $url_data_json = json_encode($url_data);
35
+
36
+ $salt = "welovewdca12345!!";
37
+
38
+ $url_data_json_hex = bin2hex($url_data_json . $salt);
39
+
40
+ $url = $url . "?data=" . $url_data_json_hex;
41
+
42
+ return $url;
43
+ }
44
+
45
+ protected function _getBaseLoyaltyUrl() {
46
+
47
+ $url = "https://www.wdca.ca/m/";
48
+
49
+ //@nelkaake: If the page is supposed to be HTTPS and the AJAX call is not HTTPS, add HTTPS
50
+ // if it's HTTP and the url returned HTTPS, remove HTTPS
51
+ if( isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] && strpos(strtolower($url), 'https') !== 0) {
52
+ $url = str_replace('http', 'https', $url);
53
+ } elseif(!isset($_SERVER['HTTPS']) || !$_SERVER['HTTPS'] && strpos(strtolower($url), 'https') === 0) {
54
+ $url = str_replace('https', 'http', $url);
55
+ } else {
56
+ // the url is fine and we can continue because it's using the correct encryption
57
+ }
58
+
59
+ return $url;
60
+ }
61
+ }
app/code/community/TBT/Enhancedgrid/etc/config.xml CHANGED
@@ -3,7 +3,7 @@
3
<config>
4
<modules>
5
<TBT_Enhancedgrid>
6
- <version>1.3.1.2</version>
7
</TBT_Enhancedgrid>
8
</modules>
9
<admin>
@@ -40,6 +40,12 @@
40
</adminhtml>
41
</blocks>
42
43
<rewrite>
44
<!-- @nelkaake -a 13/11/10: Added for Magento 1.4 compatibility -->
45
<tbt_enhancedgrid_catalog_product_export_csv>
3
<config>
4
<modules>
5
<TBT_Enhancedgrid>
6
+ <version>1.3.1.3</version>
7
</TBT_Enhancedgrid>
8
</modules>
9
<admin>
40
</adminhtml>
41
</blocks>
42
43
+ <models>
44
+ <enhancedgrid>
45
+ <class>TBT_Enhancedgrid_Model</class>
46
+ </enhancedgrid>
47
+ </models>
48
+
49
<rewrite>
50
<!-- @nelkaake -a 13/11/10: Added for Magento 1.4 compatibility -->
51
<tbt_enhancedgrid_catalog_product_export_csv>
app/code/community/TBT/Enhancedgrid/etc/system.xml CHANGED
@@ -4,7 +4,7 @@
4
<tabs>
5
<tbtall translate="label" module="enhancedgrid">
6
<label>WDCA Extensions</label>
7
- <sort_order>100</sort_order>
8
</tbtall>
9
</tabs>
10
<sections>
@@ -43,7 +43,7 @@
43
<showcolumns translate="label">
44
<label>Show Columns</label>
45
<frontend_type>multiselect</frontend_type>
46
- <source_model>TBT_Enhancedgrid_Model_system_config_source_columns_show</source_model>
47
<sort_order>20</sort_order>
48
<show_in_default>1</show_in_default>
49
<show_in_website>1</show_in_website>
@@ -129,7 +129,7 @@
129
<label>Sort Column</label>
130
<comment>The selected column must be also selected above if it's not already there</comment>
131
<frontend_type>select</frontend_type>
132
- <source_model>TBT_Enhancedgrid_Model_system_config_source_columns_show</source_model>
133
<sort_order>10</sort_order>
134
<show_in_default>1</show_in_default>
135
<show_in_website>1</show_in_website>
@@ -137,7 +137,7 @@
137
<dir translate="label">
138
<label>Sort Column Direction</label>
139
<frontend_type>select</frontend_type>
140
- <source_model>TBT_Enhancedgrid_Model_system_config_source_sort_direction</source_model>
141
<sort_order>10</sort_order>
142
<show_in_default>1</show_in_default>
143
<show_in_website>1</show_in_website>
4
<tabs>
5
<tbtall translate="label" module="enhancedgrid">
6
<label>WDCA Extensions</label>
7
+ <sort_order>900</sort_order>
8
</tbtall>
9
</tabs>
10
<sections>
43
<showcolumns translate="label">
44
<label>Show Columns</label>
45
<frontend_type>multiselect</frontend_type>
46
+ <source_model>TBT_Enhancedgrid_Model_System_Config_Source_Columns_Show</source_model>
47
<sort_order>20</sort_order>
48
<show_in_default>1</show_in_default>
49
<show_in_website>1</show_in_website>
129
<label>Sort Column</label>
130
<comment>The selected column must be also selected above if it's not already there</comment>
131
<frontend_type>select</frontend_type>
132
+ <source_model>TBT_Enhancedgrid_Model_System_Config_Source_Columns_Show</source_model>
133
<sort_order>10</sort_order>
134
<show_in_default>1</show_in_default>
135
<show_in_website>1</show_in_website>
137
<dir translate="label">
138
<label>Sort Column Direction</label>
139
<frontend_type>select</frontend_type>
140
+ <source_model>TBT_Enhancedgrid_Model_System_Config_Source_Sort_Direction</source_model>
141
<sort_order>10</sort_order>
142
<show_in_default>1</show_in_default>
143
<show_in_website>1</show_in_website>
app/design/adminhtml/default/default/template/tbt/enhancedgrid/catalog/product.phtml CHANGED
@@ -29,14 +29,7 @@
29
<tr>
30
<td style="width:50%;"><h3 class="icon-head head-products"><?php echo $this->_headerText ?></h3></td>
31
<td class="a-right">
32
- <iframe src="http://www.wdca.ca/m/?a=enhancedgrid&v=<?php
33
- echo Mage::getConfig()->getNode('modules/TBT_Enhancedgrid/version'); ?>&m=<?php
34
- echo Mage::getVersion(); ?>&p=<?php
35
- echo urlencode($this->getBaseUrl()); ?>&ap=<?php
36
- echo urlencode($this->getAction()->getFullActionName()); ?>" marginwidth="0" marginheight="0"
37
- hspace="0" align="middle" frameborder="0"
38
- scrolling="no" style="width: 500px; float: left; height: 22px;">
39
- </iframe>
40
<?php echo $this->getAddNewButtonHtml() ?>
41
</td>
42
</tr>
29
<tr>
30
<td style="width:50%;"><h3 class="icon-head head-products"><?php echo $this->_headerText ?></h3></td>
31
<td class="a-right">
32
+ <?php echo Mage::getBlockSingleton('enhancedgrid/widget_loyalty')->toHtml(); ?>
33
<?php echo $this->getAddNewButtonHtml() ?>
34
</td>
35
</tr>
package.xml CHANGED
@@ -1,18 +1,18 @@
1
<?xml version="1.0"?>
2
<package>
3
<name>TBT_Enhancedgrid</name>
4
- <version>1.3.1.2</version>
5
<stability>stable</stability>
6
<license>OSL 3.0</license>
7
<channel>community</channel>
8
<extends/>
9
- <summary>Adds some useful, customizable features to the admin product management grid including new columns and tools.</summary>
10
- <description>Adds some useful, customizable features to the admin product management grid including new columns and tools.</description>
11
- <notes>Now compatible with Magento 1.4.2</notes>
12
- <authors><author><name>Jay</name><user>auto-converted</user><email>najibkaake@gmail.com</email></author></authors>
13
- <date>2010-12-23</date>
14
- <time>21:45:07</time>
15
- <contents><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="tbt_enhancedgrid.xml" hash="d0dd492f38558072d5c0dad53703a6c6"/></dir><dir name="template"><dir name="tbt"><dir name="enhancedgrid"><dir name="catalog"><file name="product.phtml" hash="8a37fe5f620c22fd3f3e81291d55eaff"/><dir name="product"><file name="grid.phtml" hash="8e39bb3abd59ef4ba12fdf4d725dda90"/></dir></dir></dir></dir></dir></dir></dir></dir></target><target name="mage"><dir name="js"><dir name="tbt"><dir name="enhancedgrid"><file name="egsupplemental.js" hash="da3aa882d47a41c4d2f7d0c48233ae1e"/><file name="enhancedgrid.js" hash="fcbbe08d942719a668d3536246664628"/><dir name="customfunctions"><file name="catalog_products.js" hash="db00553aa26aa6851f92f84447f3cd14"/></dir><dir name="resources"><dir name="css"><file name="enhancedgrid.css" hash="a219b0e656329f2407835dbe346f81d3"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="TBT_Enhancedgrid.xml" hash="85a6ca652ec3777aa244a78c1c4fdac4"/></dir></target><target name="magecommunity"><dir name="TBT"><dir name="Enhancedgrid"><dir name="Block"><dir name="Catalog"><file name="Product.php" hash="68048313967635cce72082d36afb1ac4"/><dir name="Product"><file name="Grid.php" hash="95648279026a015e674fb1f8c0a1f387"/></dir></dir><dir name="System"><file name="Html.php" hash="1b286954f3b741741577c68d2d9e77dd"/></dir><dir name="Widget"><dir name="Grid"><file name="Column.php" hash="b360986bb6f20cb2f7af22bb383c909e"/><dir name="Column"><dir name="Filter"><file name="Category.php" hash="8eb68d6bdb28d08e4aa831f2609be421"/><file name="Image.php" hash="b1e25d3e8d03a0869e1c2edf5fcdd761"/></dir><dir name="Renderer"><file name="Action.php" hash="32c3917ad4c07942e9f0d003c6854b2b"/><file name="Category.php" hash="42eff0eac536ef4b511600b2bd1d2ceb"/><file name="Image.php" hash="ddac5ed4cc015c4dd256f172c802e9cf"/></dir></dir></dir></dir></dir><dir name="controllers"><dir name="Catalog"><file name="ProductController.php" hash="39ab9a7719710e1454d7f8b1ede4a104"/></dir></dir><dir name="etc"><file name="config.xml" hash="582989f58c54ebbb289c9b4cff8a3952"/><file name="system.xml" hash="8701ce4222932d3ba031168ef4681c95"/></dir><dir name="Helper"><file name="Data.php" hash="236773d2fc20ccc12702af8a41c5fe96"/></dir><dir name="Model"><dir name="Resource"><dir name="Eav"><dir name="Mysql4"><dir name="Product"><file name="Collection.php" hash="8dd3763283b393d0f3efef5556234fa2"/></dir></dir></dir></dir><dir name="System"><dir name="Config"><dir name="Source"><dir name="Columns"><file name="Show.php" hash="ef68984f5d56d6c60907e06850a47821"/></dir><dir name="Sort"><file name="Direction.php" hash="23cb37d1af2dd75c3c9537adf90c1bc8"/></dir></dir></dir></dir></dir></dir></dir></target></contents>
16
<compatible/>
17
<dependencies/>
18
</package>
1
<?xml version="1.0"?>
2
<package>
3
<name>TBT_Enhancedgrid</name>
4
+ <version>1.3.1.3</version>
5
<stability>stable</stability>
6
<license>OSL 3.0</license>
7
<channel>community</channel>
8
<extends/>
9
+ <summary>Fixes some issues with the Magento compiler and improves display of some core components.</summary>
10
+ <description>Fixes some issues with the Magento compiler and improves display of some core components.</description>
11
+ <notes>Fixes some issues with the Magento compiler and improves display of some core components.</notes>
12
+ <authors><author><name>Jay</name><user>auto-converted</user><email>contact@wdca.ca</email></author><author><name>Jay</name><user>auto-converted</user><email>nelkaake@wdca.ca</email></author></authors>
13
+ <date>2011-07-01</date>
14
+ <time>01:03:26</time>
15
+ <contents><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="tbt_enhancedgrid.xml" hash="d0dd492f38558072d5c0dad53703a6c6"/></dir><dir name="template"><dir name="tbt"><dir name="enhancedgrid"><dir name="catalog"><file name="product.phtml" hash="449dec037392f3910b9269a24b99e24a"/><dir name="product"><file name="grid.phtml" hash="8e39bb3abd59ef4ba12fdf4d725dda90"/></dir></dir></dir></dir></dir></dir></dir></dir></target><target name="mage"><dir name="js"><dir name="tbt"><dir name="enhancedgrid"><file name="egsupplemental.js" hash="da3aa882d47a41c4d2f7d0c48233ae1e"/><file name="enhancedgrid.js" hash="fcbbe08d942719a668d3536246664628"/><dir name="customfunctions"><file name="catalog_products.js" hash="db00553aa26aa6851f92f84447f3cd14"/></dir><dir name="resources"><dir name="css"><file name="enhancedgrid.css" hash="a219b0e656329f2407835dbe346f81d3"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="TBT_Enhancedgrid.xml" hash="85a6ca652ec3777aa244a78c1c4fdac4"/></dir></target><target name="magecommunity"><dir name="TBT"><dir name="Enhancedgrid"><dir name="Block"><dir name="Catalog"><file name="Product.php" hash="68048313967635cce72082d36afb1ac4"/><dir name="Product"><file name="Grid.php" hash="95648279026a015e674fb1f8c0a1f387"/></dir></dir><dir name="System"><file name="Html.php" hash="ae18224ae9a7e450e03ccf22612e3dde"/></dir><dir name="Widget"><file name="Loyalty.php" hash="d1f6919e6bda3e5c201e2b9cd2fb25f1"/><dir name="Grid"><file name="Column.php" hash="b360986bb6f20cb2f7af22bb383c909e"/><dir name="Column"><dir name="Filter"><file name="Category.php" hash="8eb68d6bdb28d08e4aa831f2609be421"/><file name="Image.php" hash="b1e25d3e8d03a0869e1c2edf5fcdd761"/></dir><dir name="Renderer"><file name="Action.php" hash="32c3917ad4c07942e9f0d003c6854b2b"/><file name="Category.php" hash="42eff0eac536ef4b511600b2bd1d2ceb"/><file name="Image.php" hash="ddac5ed4cc015c4dd256f172c802e9cf"/></dir></dir></dir></dir></dir><dir name="controllers"><dir name="Catalog"><file name="ProductController.php" hash="39ab9a7719710e1454d7f8b1ede4a104"/></dir></dir><dir name="etc"><file name="config.xml" hash="eecb1cc472a616c41eac6e2230b31387"/><file name="system.xml" hash="5e18079f506dae5dc6627f41f1d7336c"/></dir><dir name="Helper"><file name="Data.php" hash="236773d2fc20ccc12702af8a41c5fe96"/></dir><dir name="Model"><dir name="Resource"><dir name="Eav"><dir name="Mysql4"><dir name="Product"><file name="Collection.php" hash="8dd3763283b393d0f3efef5556234fa2"/></dir></dir></dir></dir><dir name="System"><dir name="Config"><dir name="Source"><dir name="Columns"><file name="Show.php" hash="ef68984f5d56d6c60907e06850a47821"/></dir><dir name="Sort"><file name="Direction.php" hash="23cb37d1af2dd75c3c9537adf90c1bc8"/></dir></dir></dir></dir></dir></dir></dir></target></contents>
16
<compatible/>
17
<dependencies/>
18
</package>