TBT_Enhancedgrid - Version 1.3.4.4

Version Notes

Download this release

Release Info

Developer Jay El-Kaake
Extension TBT_Enhancedgrid
Version 1.3.4.4
Comparing to
See all releases


Code changes from version 1.3.4.3 to 1.3.4.4

app/code/community/TBT/Enhancedgrid/Block/Catalog/Product/Grid.php CHANGED
@@ -574,6 +574,9 @@ class TBT_Enhancedgrid_Block_Catalog_Product_Grid extends Mage_Adminhtml_Block_W
574
  '_current' => true,
575
  )),
576
  ));
 
 
 
577
 
578
  // Divider
579
  $this->getMassactionBlock()->addItem('imagesDivider', $this->getMADivider('Images'));
@@ -612,11 +615,35 @@ class TBT_Enhancedgrid_Block_Catalog_Product_Grid extends Mage_Adminhtml_Block_W
612
  $this->getMassactionBlock()->addItem('refreshProducts',
613
  array(
614
  'label' => $this->__('Refresh Products'),
615
- 'url' => $this->getUrl('enhancedgrid/*/massRefreshProducts', array(
616
  '_current' => true,
617
  )),
618
  ));
619
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
620
  // $this->getMassactionBlock()->addItem('saveEditables', array(
621
  // 'label' => $this->__('SAVE EDITABLES'),
622
  // 'url' => $this->getUrl('*/*/saveEditables', array('_current'=>true)),
574
  '_current' => true,
575
  )),
576
  ));
577
+
578
+ // enable other modules to add mass action
579
+ Mage::dispatchEvent('adminhtml_catalog_product_grid_prepare_massaction', array('block' => $this));
580
 
581
  // Divider
582
  $this->getMassactionBlock()->addItem('imagesDivider', $this->getMADivider('Images'));
615
  $this->getMassactionBlock()->addItem('refreshProducts',
616
  array(
617
  'label' => $this->__('Refresh Products'),
618
+ 'url' => $this->getUrl('*/*/massRefreshProducts', array(
619
  '_current' => true,
620
  )),
621
  ));
622
+
623
+ // massAttributeSet...
624
+
625
+ $sets = Mage::getResourceModel('eav/entity_attribute_set_collection')
626
+ ->setEntityTypeFilter(Mage::getModel('catalog/product')->getResource()->getTypeId())
627
+ ->load()
628
+ ->toOptionHash();
629
+ $this->getMassactionBlock()->addItem(
630
+ 'changeattributeset',
631
+ array(
632
+ 'label' => Mage::helper('catalog')->__('Change Attribute Set'),
633
+ 'url' => $this->getUrl('*/*/changeAttributeSet', array('_current' => true)),
634
+ 'additional' => array(
635
+ 'visibility' => array(
636
+ 'name' => 'attribute_set',
637
+ 'type' => 'select',
638
+ 'class' => 'required-entry',
639
+ 'label' => Mage::helper('catalog')->__('Attribute Set'),
640
+ 'values' => $sets,
641
+ ),
642
+ ),
643
+ )
644
+ );
645
+
646
+
647
  // $this->getMassactionBlock()->addItem('saveEditables', array(
648
  // 'label' => $this->__('SAVE EDITABLES'),
649
  // 'url' => $this->getUrl('*/*/saveEditables', array('_current'=>true)),
app/code/community/TBT/Enhancedgrid/Block/Widget/Grid/Column/Renderer/Image.php CHANGED
@@ -86,7 +86,7 @@ class TBT_Enhancedgrid_Block_Widget_Grid_Column_Renderer_Image extends Mage_Admi
86
  $dored = true;
87
  $val .= '[!]';
88
  }
89
- if (strpos($val, 'placeholder/')) {
90
  $dored = true;
91
  }
92
 
86
  $dored = true;
87
  $val .= '[!]';
88
  }
89
+ if (strpos($val, 'placeholder/') !== false) {
90
  $dored = true;
91
  }
92
 
app/code/community/TBT/Enhancedgrid/Model/Product/Collection/Category/Decorator.php CHANGED
@@ -39,6 +39,12 @@ class TBT_Enhancedgrid_Model_Product_Collection_Category_Decorator extends TBT_E
39
  $collection = $this->getCollection();
40
 
41
  $alias_prefix = $this->_getAliasPrefix();
 
 
 
 
 
 
42
 
43
  $collection->joinField('category_id', 'catalog/category_product', 'category_id', 'product_id=entity_id', null, 'left');
44
 
@@ -47,11 +53,11 @@ class TBT_Enhancedgrid_Model_Product_Collection_Category_Decorator extends TBT_E
47
  //@nelkaake -m 13/11/10: Added support for tables with prefixes
48
  $ccev_t = Mage::getConfig()->getTablePrefix().'catalog_category_entity_varchar';
49
 
50
- $collection->joinField('categories', $ccev_t, "GROUP_CONCAT({$alias_prefix}categories.value)", 'entity_id=category_id',
51
- "{$alias_prefix}categories.attribute_id={$category_name_attribute_id}", 'left');
52
 
53
  $collection->joinField('category', $ccev_t, 'value', 'entity_id=category_id',
54
- "{$alias_prefix}category.attribute_id={$category_name_attribute_id}", 'left');
55
 
56
  $collection->groupByAttribute('entity_id');
57
 
39
  $collection = $this->getCollection();
40
 
41
  $alias_prefix = $this->_getAliasPrefix();
42
+
43
+ $storeId = Mage::app()->getRequest()->getParam('store');
44
+
45
+ if(!$storeId){
46
+ $storeId = 0;
47
+ }
48
 
49
  $collection->joinField('category_id', 'catalog/category_product', 'category_id', 'product_id=entity_id', null, 'left');
50
 
53
  //@nelkaake -m 13/11/10: Added support for tables with prefixes
54
  $ccev_t = Mage::getConfig()->getTablePrefix().'catalog_category_entity_varchar';
55
 
56
+ $collection->joinField('categories', $ccev_t, "GROUP_CONCAT(DISTINCT {$alias_prefix}categories.value)", 'entity_id=category_id',
57
+ "{$alias_prefix}categories.attribute_id={$category_name_attribute_id} and {$alias_prefix}categories.store_id = {$storeId}", 'left');
58
 
59
  $collection->joinField('category', $ccev_t, 'value', 'entity_id=category_id',
60
+ "{$alias_prefix}category.attribute_id={$category_name_attribute_id} and {$alias_prefix}categories.store_id = {$storeId}", 'left');
61
 
62
  $collection->groupByAttribute('entity_id');
63
 
app/code/community/TBT/Enhancedgrid/controllers/Catalog/ProductController.php CHANGED
@@ -105,7 +105,6 @@ class TBT_Enhancedgrid_Catalog_ProductController extends Mage_Adminhtml_Catalog_
105
  $response->setHeader('Content-type', $contentType);
106
  $response->setBody($content);
107
  $response->sendResponse();
108
- die;
109
  }
110
 
111
  ///////////////////////////////////////////////////////////////////////////////////////////////
@@ -142,7 +141,7 @@ class TBT_Enhancedgrid_Catalog_ProductController extends Mage_Adminhtml_Catalog_
142
  }
143
 
144
  // Added by Tegan Snyder.
145
- public function changeattributesetAction()
146
  {
147
  $productIds = $this->getRequest()->getParam('product');
148
  $storeId = (int) $this->getRequest()->getParam('store', 0);
105
  $response->setHeader('Content-type', $contentType);
106
  $response->setBody($content);
107
  $response->sendResponse();
 
108
  }
109
 
110
  ///////////////////////////////////////////////////////////////////////////////////////////////
141
  }
142
 
143
  // Added by Tegan Snyder.
144
+ public function changeAttributeSetAction()
145
  {
146
  $productIds = $this->getRequest()->getParam('product');
147
  $storeId = (int) $this->getRequest()->getParam('store', 0);
app/code/community/TBT/Enhancedgrid/etc/config.xml CHANGED
@@ -2,7 +2,7 @@
2
  <config>
3
  <modules>
4
  <TBT_Enhancedgrid>
5
- <version>1.3.4.3</version>
6
  </TBT_Enhancedgrid>
7
  </modules>
8
  <admin>
2
  <config>
3
  <modules>
4
  <TBT_Enhancedgrid>
5
+ <version>1.3.4.4</version>
6
  </TBT_Enhancedgrid>
7
  </modules>
8
  <admin>
js/tbt/enhancedgrid/enhancedgrid.js CHANGED
@@ -209,9 +209,10 @@ varienGridMassaction.prototype.initialize = function(containerId, grid, checkedV
209
  this.setOldCallback('init_row', grid.initRowCallback);
210
  this.setOldCallback('pre_init', grid.preInitCallback);
211
 
212
- this.useAjax = false;
213
- this.grid = grid;
214
- this.containerId = containerId;
 
215
  this.initMassactionElements();
216
 
217
  this.checkedString = checkedValues;
@@ -388,4 +389,4 @@ varienGrid.prototype.resetFilter = function() {
388
  }
389
  this.addVarToUrl(this.filterVar, '')
390
  this.reload();
391
- }
209
  this.setOldCallback('init_row', grid.initRowCallback);
210
  this.setOldCallback('pre_init', grid.preInitCallback);
211
 
212
+ this.useAjax = false;
213
+ this.grid = grid;
214
+ this.grid.massaction = this;
215
+ this.containerId = containerId;
216
  this.initMassactionElements();
217
 
218
  this.checkedString = checkedValues;
389
  }
390
  this.addVarToUrl(this.filterVar, '')
391
  this.reload();
392
+ }
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>TBT_Enhancedgrid</name>
4
- <version>1.3.4.3</version>
5
  <stability>stable</stability>
6
  <license uri="http://www.gnu.org/licenses/gpl-3.0.html"></license>
7
  <channel>community</channel>
@@ -10,9 +10,9 @@
10
  <description>Improves the existing Magento admin product management grid. It adds some useful, customizable features to the admin product management grid including new columns and tools.</description>
11
  <notes></notes>
12
  <authors><author><name>Jay El-Kaake</name><user>jay</user><email>jay@sweettoothhq.com</email></author></authors>
13
- <date>2015-11-25</date>
14
- <time>18:07:05</time>
15
- <contents><target name="magecommunity"><dir name="TBT"><dir name="Enhancedgrid"><dir name="Block"><dir name="Catalog"><dir name="Product"><dir name="Grid"><file name="Columns.php" hash="ce407ff5715c837d02b1aba7975bf512"/></dir><file name="Grid.php" hash="031bab0c15554ea1f7d332f7d35b612d"/></dir><file name="Product.php" hash="8e09794fe183ea3c3aeaa1f35962ce1d"/></dir><dir name="System"><file name="Html.php" hash="562392e86f9af01823bbd70c293fc21a"/></dir><dir name="Widget"><dir name="Grid"><dir name="Column"><dir name="Filter"><file name="Category.php" hash="0527c1d7ebdf57b934f714240ac5709a"/><file name="Image.php" hash="a8f34ac1a6734f351ef3654c48b0ac8e"/></dir><dir name="Renderer"><file name="Action.php" hash="f4986db21849c7413061e2906414fd37"/><file name="Category.php" hash="fe638de59898f21a6e4f60f81a03b050"/><file name="Image.php" hash="04662f3ad0b553c88fed6428e10673ec"/></dir></dir><file name="Column.php" hash="4b32c0942170f7b4028c7210de7da6aa"/></dir><file name="Loyalty.php" hash="550c3cc5822abc1d2ea67f69adc3893a"/></dir></dir><dir name="Helper"><file name="Data.php" hash="d0c2fb1491c4de5e1fc686f98ca8b632"/><file name="Version.php" hash="6300cd38e05192ca25cc72492f4060ea"/></dir><dir name="Model"><dir name="Collection"><dir name="Decorator"><file name="Abstract.php" hash="6222cd8d27550353ca7da2b5292d3c03"/></dir></dir><dir name="Product"><dir name="Collection"><dir name="Category"><file name="Decorator.php" hash="4fd5bfec3c35664329877e319d4516c5"/></dir></dir><dir name="Grid"><dir name="Settings"><file name="Columns.php" hash="52ab0edb646f9ccfd7ff4627faf28bce"/></dir></dir></dir><dir name="Resource"><dir name="Eav"><dir name="Mysql4"><dir name="Product"><file name="Collection.php" hash="167d3a637aee53e9ee65cd31ee638b7e"/></dir></dir></dir></dir><dir name="System"><dir name="Config"><dir name="Source"><dir name="Columns"><file name="Show.php" hash="b6fa3ef200816786cf03a856986d509a"/></dir><dir name="Sort"><file name="Direction.php" hash="a1e597d932df920bf86a437c5f74de83"/></dir></dir></dir></dir></dir><dir name="controllers"><dir name="Catalog"><file name="ProductController.php" hash="5470da467d5e0fb369bc814066f5d4ea"/></dir></dir><dir name="etc"><file name="config.xml" hash="68e9eba03af198a4e2cc8e7edacf802d"/><file name="system.xml" hash="2d9d79616916912106a710c9237c0c9c"/></dir><dir name="sql"><dir name="enhancedgrid_setup"><file name="mysql4-install-1.0.0.0.php" hash="491b395307ec3951309a78262336e228"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="TBT_Enhancedgrid.xml" hash="0654733936d12ab0c7532fcb5492a2dd"/></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="tbt_enhancedgrid.xml" hash="9a52b17e99764d9ab8336f5155eabf59"/></dir><dir name="template"><dir name="tbt"><dir name="enhancedgrid"><dir name="catalog"><dir name="product"><file name="grid.phtml" hash="8e39bb3abd59ef4ba12fdf4d725dda90"/></dir><file name="product.phtml" hash="70be6a474d09784b4b652f1dc2acac49"/></dir></dir></dir></dir></dir></dir></dir></target><target name="mageweb"><dir name="js"><dir name="tbt"><dir name="enhancedgrid"><dir name="customfunctions"><file name="catalog_products.js" hash="d3079b19aa4382e674f68412c6150a6d"/></dir><file name="egsupplemental.js" hash="52e609cbc614051b0d00a97e54b12ca4"/><file name="enhancedgrid.js" hash="aca8060c0fcc1648763a510e80bb5376"/><dir name="resources"><dir name="css"><file name="enhancedgrid.css" hash="a219b0e656329f2407835dbe346f81d3"/></dir></dir></dir></dir></dir></target></contents>
16
  <compatible/>
17
- <dependencies><required><php><min>5.3.0</min><max>5.6.13</max></php></required></dependencies>
18
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>TBT_Enhancedgrid</name>
4
+ <version>1.3.4.4</version>
5
  <stability>stable</stability>
6
  <license uri="http://www.gnu.org/licenses/gpl-3.0.html"></license>
7
  <channel>community</channel>
10
  <description>Improves the existing Magento admin product management grid. It adds some useful, customizable features to the admin product management grid including new columns and tools.</description>
11
  <notes></notes>
12
  <authors><author><name>Jay El-Kaake</name><user>jay</user><email>jay@sweettoothhq.com</email></author></authors>
13
+ <date>2016-09-18</date>
14
+ <time>14:58:32</time>
15
+ <contents><target name="magecommunity"><dir name="TBT"><dir name="Enhancedgrid"><dir name="Block"><dir name="Catalog"><dir name="Product"><dir name="Grid"><file name="Columns.php" hash="ce407ff5715c837d02b1aba7975bf512"/></dir><file name="Grid.php" hash="fdc8d99bb417bf58eb47ce26fd9fd4f8"/></dir><file name="Product.php" hash="8e09794fe183ea3c3aeaa1f35962ce1d"/></dir><dir name="System"><file name="Html.php" hash="562392e86f9af01823bbd70c293fc21a"/></dir><dir name="Widget"><dir name="Grid"><dir name="Column"><dir name="Filter"><file name="Category.php" hash="0527c1d7ebdf57b934f714240ac5709a"/><file name="Image.php" hash="a8f34ac1a6734f351ef3654c48b0ac8e"/></dir><dir name="Renderer"><file name="Action.php" hash="f4986db21849c7413061e2906414fd37"/><file name="Category.php" hash="fe638de59898f21a6e4f60f81a03b050"/><file name="Image.php" hash="28eb98a2c4c259cdfeb628c522067659"/></dir></dir><file name="Column.php" hash="4b32c0942170f7b4028c7210de7da6aa"/></dir><file name="Loyalty.php" hash="550c3cc5822abc1d2ea67f69adc3893a"/></dir></dir><dir name="Helper"><file name="Data.php" hash="d0c2fb1491c4de5e1fc686f98ca8b632"/><file name="Version.php" hash="6300cd38e05192ca25cc72492f4060ea"/></dir><dir name="Model"><dir name="Collection"><dir name="Decorator"><file name="Abstract.php" hash="6222cd8d27550353ca7da2b5292d3c03"/></dir></dir><dir name="Product"><dir name="Collection"><dir name="Category"><file name="Decorator.php" hash="d27aeb65648dcafff1592c3e26cae537"/></dir></dir><dir name="Grid"><dir name="Settings"><file name="Columns.php" hash="52ab0edb646f9ccfd7ff4627faf28bce"/></dir></dir></dir><dir name="Resource"><dir name="Eav"><dir name="Mysql4"><dir name="Product"><file name="Collection.php" hash="167d3a637aee53e9ee65cd31ee638b7e"/></dir></dir></dir></dir><dir name="System"><dir name="Config"><dir name="Source"><dir name="Columns"><file name="Show.php" hash="b6fa3ef200816786cf03a856986d509a"/></dir><dir name="Sort"><file name="Direction.php" hash="a1e597d932df920bf86a437c5f74de83"/></dir></dir></dir></dir></dir><dir name="controllers"><dir name="Catalog"><file name="ProductController.php" hash="6359519cb1912658fbb60d3b23eecb81"/></dir></dir><dir name="etc"><file name="config.xml" hash="665c7afe533cc6c80c9915609e15aa6c"/><file name="system.xml" hash="2d9d79616916912106a710c9237c0c9c"/></dir><dir name="sql"><dir name="enhancedgrid_setup"><file name="mysql4-install-1.0.0.0.php" hash="491b395307ec3951309a78262336e228"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="TBT_Enhancedgrid.xml" hash="0654733936d12ab0c7532fcb5492a2dd"/></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="tbt_enhancedgrid.xml" hash="9a52b17e99764d9ab8336f5155eabf59"/></dir><dir name="template"><dir name="tbt"><dir name="enhancedgrid"><dir name="catalog"><dir name="product"><file name="grid.phtml" hash="8e39bb3abd59ef4ba12fdf4d725dda90"/></dir><file name="product.phtml" hash="70be6a474d09784b4b652f1dc2acac49"/></dir></dir></dir></dir></dir></dir></dir></target><target name="mageweb"><dir name="js"><dir name="tbt"><dir name="enhancedgrid"><dir name="customfunctions"><file name="catalog_products.js" hash="d3079b19aa4382e674f68412c6150a6d"/></dir><file name="egsupplemental.js" hash="52e609cbc614051b0d00a97e54b12ca4"/><file name="enhancedgrid.js" hash="64988c753f555ddb09dfdaeb8afe0c4a"/><dir name="resources"><dir name="css"><file name="enhancedgrid.css" hash="a219b0e656329f2407835dbe346f81d3"/></dir></dir></dir></dir></dir></target></contents>
16
  <compatible/>
17
+ <dependencies><required><php><min>5.3.0</min><max>7.1.0</max></php></required></dependencies>
18
  </package>