Bewai_AttributeAssigner - Version 0.1.2

Version Notes

Sorts select lists alphabetically

Download this release

Release Info

Developer Benjamin Yayon
Extension Bewai_AttributeAssigner
Version 0.1.2
Comparing to
See all releases


Code changes from version 0.1.1 to 0.1.2

app/code/local/Bewai/AttributeAssigner/Block/Adminhtml/Index/App.php CHANGED
@@ -48,10 +48,20 @@ class Bewai_AttributeAssigner_Block_Adminhtml_Index_App extends Bewai_AttributeA
48
  {
49
  if (!$this->getAttribute()) return array();
50
 
51
- return Mage::getResourceModel('eav/entity_attribute_option_collection')
52
  ->setAttributeFilter($this->getAttribute()->getId())
53
  ->setPositionOrder('desc', true)
54
  ->load();
 
 
 
 
 
 
 
 
 
 
55
  }
56
 
57
  /**
48
  {
49
  if (!$this->getAttribute()) return array();
50
 
51
+ $arr = Mage::getResourceModel('eav/entity_attribute_option_collection')
52
  ->setAttributeFilter($this->getAttribute()->getId())
53
  ->setPositionOrder('desc', true)
54
  ->load();
55
+
56
+ $rtn = array();
57
+
58
+ foreach ($arr as $value) {
59
+ $rtn[$value->getValue()] = $value;
60
+ }
61
+
62
+ ksort($rtn);
63
+
64
+ return $rtn;
65
  }
66
 
67
  /**
app/code/local/Bewai/AttributeAssigner/Helper/Data.php CHANGED
@@ -156,8 +156,9 @@ class Bewai_AttributeAssigner_Helper_Data extends Mage_Core_Helper_Abstract
156
  ->setPositionOrder('desc', true)
157
  ->load();
158
  foreach ($attr as $value) {
159
- $arr[$value->getId()] = $value->getValue();
160
  }
 
161
  return $arr;
162
  }
163
 
156
  ->setPositionOrder('desc', true)
157
  ->load();
158
  foreach ($attr as $value) {
159
+ $arr[(string)$value->getId()] = $value->getValue();
160
  }
161
+ asort($arr);
162
  return $arr;
163
  }
164
 
app/code/local/Bewai/AttributeAssigner/etc/config.xml CHANGED
@@ -24,7 +24,7 @@
24
 
25
  <modules>
26
  <Bewai_AttributeAssigner>
27
- <version>0.1.1</version>
28
  </Bewai_AttributeAssigner>
29
  </modules>
30
 
24
 
25
  <modules>
26
  <Bewai_AttributeAssigner>
27
+ <version>0.1.2</version>
28
  </Bewai_AttributeAssigner>
29
  </modules>
30
 
app/design/adminhtml/default/default/template/bewai/attributeassigner/index/app/breadcrumb/value.phtml CHANGED
@@ -4,7 +4,7 @@
4
  <label for="value"><?php echo Mage::helper('adminhtml')->__('Value:'); ?></label>
5
  <br />
6
 
7
- <select name="value" class="value-select">
8
  <option value=""><?php echo $this->__('Select...'); ?></option>
9
  <?php foreach ($this->getSelectedAttributeValuesList() as $value) : ?>
10
  <option value="<?php echo $value->getId(); ?>"<?php if ($this->isValueSelected($value)) echo ' selected="selected"'; ?>><?php echo $value->getValue(); ?></option>
4
  <label for="value"><?php echo Mage::helper('adminhtml')->__('Value:'); ?></label>
5
  <br />
6
 
7
+ <select name="value" class="value-select"<?php if ($this->_helper()->getCurrentStep() !== 'value') echo ' disabled="disabled"'; ?>>
8
  <option value=""><?php echo $this->__('Select...'); ?></option>
9
  <?php foreach ($this->getSelectedAttributeValuesList() as $value) : ?>
10
  <option value="<?php echo $value->getId(); ?>"<?php if ($this->isValueSelected($value)) echo ' selected="selected"'; ?>><?php echo $value->getValue(); ?></option>
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Bewai_AttributeAssigner</name>
4
- <version>0.1.1</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/osl-3.0.php">Open Software License (OSL)</license>
7
  <channel>community</channel>
@@ -19,12 +19,11 @@ Easy.&#xD;
19
  &#xD;
20
  This works for simple products only. &#xD;
21
  While updating, be aware that these value will change even if the product is part of a configurable product. </description>
22
- <notes>Fixes bug in products grid filter&#xD;
23
- Fixes multiple screen displays at a time</notes>
24
  <authors><author><name>Benjamin Yayon</name><user>bouniflax</user><email>benjamin.yayon@bewai.fr</email></author></authors>
25
  <date>2014-10-01</date>
26
- <time>10:58:38</time>
27
- <contents><target name="magelocal"><dir name="Bewai"><dir name="AttributeAssigner"><dir name="Block"><dir name="Adminhtml"><dir name="Index"><dir name="App"><file name="Breadcrumb.php" hash="be7150192b967e9fa71ee79f2a8b46fb"/><dir name="Screen"><file name="Products.php" hash="8b5033581cc94b07431375254b1594df"/><file name="Summary.php" hash="9d3c66d9e26d3f3be1e5e14d3a29cd62"/></dir></dir><file name="App.php" hash="8cf380fb77f98e4e76b4ee3961069e34"/></dir><file name="Index.php" hash="07591c8786c4fd9721db5c867d48355b"/></dir></dir><dir name="Helper"><file name="Data.php" hash="868fca2c25ddacf905a102571034de88"/></dir><dir name="controllers"><file name="AdminController.php" hash="da70f7f945f2d84d4f0708bd53fe9247"/></dir><dir name="etc"><file name="adminhtml.xml" hash="2007d8b32e798a3048a6666022185dcb"/><file name="config.xml" hash="cb9235138be9d351d27f85a37465ab34"/></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="bewai_attributeassigner.xml" hash="aecd4a211972477f1e39914c49b2f367"/></dir><dir name="template"><dir name="bewai"><dir name="attributeassigner"><dir name="index"><dir name="app"><dir name="breadcrumb"><file name="attribute.phtml" hash="208d10d4c5ed53c07305614aaa54bf37"/><file name="products.phtml" hash="84c870adc755e378aacab2a21f2612d0"/><file name="value.phtml" hash="797f78361c8360eefe6e84744c78a787"/></dir><file name="breadcrumb.phtml" hash="cca39b4155c1d66aeee4f903f74253f3"/><dir name="screen"><file name="instructions.phtml" hash="263abe2988b05914b9daf8002c7d3f53"/><file name="summary.phtml" hash="290d9b52d82252d6f3648fee4e08bb73"/></dir><file name="screen.phtml" hash="7bd643a91c3979da5fc36d68cee1af83"/></dir><file name="app.phtml" hash="b63468c4d613e07d6344037b0cd25154"/><file name="javascript.phtml" hash="ccc27c6a2987488f2a2d36833e915b9f"/></dir><file name="index.phtml" hash="84af54c18e83e57adc21c08b6d6b74d7"/></dir></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Bewai_AttributeAssigner.xml" hash="14a172053dd4542ae577d13225c71ca5"/></dir></target><target name="magelocale"><dir name="en_US"><file name="Bewai_AttributeAssigner.csv" hash="78a634e46e8ef248a177c2aa08bf0d63"/></dir><dir name="fr_FR"><file name="Bewai_AttributeAssigner.csv" hash="beaec95afe43086b962f7ca8e557d513"/></dir></target><target name="mageskin"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="bewai"><dir name="attributeassigner"><file name="adminhtml.css" hash="44dc3b9b17c8b46f7cc1bde22308529e"/></dir></dir></dir></dir></dir></target></contents>
28
  <compatible/>
29
  <dependencies><required><php><min>5.3.0</min><max>5.5.0</max></php></required></dependencies>
30
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Bewai_AttributeAssigner</name>
4
+ <version>0.1.2</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/osl-3.0.php">Open Software License (OSL)</license>
7
  <channel>community</channel>
19
  &#xD;
20
  This works for simple products only. &#xD;
21
  While updating, be aware that these value will change even if the product is part of a configurable product. </description>
22
+ <notes>Sorts select lists alphabetically</notes>
 
23
  <authors><author><name>Benjamin Yayon</name><user>bouniflax</user><email>benjamin.yayon@bewai.fr</email></author></authors>
24
  <date>2014-10-01</date>
25
+ <time>11:08:43</time>
26
+ <contents><target name="magelocal"><dir name="Bewai"><dir name="AttributeAssigner"><dir name="Block"><dir name="Adminhtml"><dir name="Index"><dir name="App"><file name="Breadcrumb.php" hash="be7150192b967e9fa71ee79f2a8b46fb"/><dir name="Screen"><file name="Products.php" hash="8b5033581cc94b07431375254b1594df"/><file name="Summary.php" hash="9d3c66d9e26d3f3be1e5e14d3a29cd62"/></dir></dir><file name="App.php" hash="f618806cc9df4975466d18e552d76dd4"/></dir><file name="Index.php" hash="07591c8786c4fd9721db5c867d48355b"/></dir></dir><dir name="Helper"><file name="Data.php" hash="33163798107edc72fdddbba8226ab7b6"/></dir><dir name="controllers"><file name="AdminController.php" hash="da70f7f945f2d84d4f0708bd53fe9247"/></dir><dir name="etc"><file name="adminhtml.xml" hash="2007d8b32e798a3048a6666022185dcb"/><file name="config.xml" hash="e90b2ce61e247fac45e2c1eebec5bccd"/></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="bewai_attributeassigner.xml" hash="aecd4a211972477f1e39914c49b2f367"/></dir><dir name="template"><dir name="bewai"><dir name="attributeassigner"><dir name="index"><dir name="app"><dir name="breadcrumb"><file name="attribute.phtml" hash="208d10d4c5ed53c07305614aaa54bf37"/><file name="products.phtml" hash="84c870adc755e378aacab2a21f2612d0"/><file name="value.phtml" hash="d59fec1bd3e440c0b2e9859841545ea7"/></dir><file name="breadcrumb.phtml" hash="cca39b4155c1d66aeee4f903f74253f3"/><dir name="screen"><file name="instructions.phtml" hash="263abe2988b05914b9daf8002c7d3f53"/><file name="summary.phtml" hash="290d9b52d82252d6f3648fee4e08bb73"/></dir><file name="screen.phtml" hash="7bd643a91c3979da5fc36d68cee1af83"/></dir><file name="app.phtml" hash="b63468c4d613e07d6344037b0cd25154"/><file name="javascript.phtml" hash="ccc27c6a2987488f2a2d36833e915b9f"/></dir><file name="index.phtml" hash="84af54c18e83e57adc21c08b6d6b74d7"/></dir></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Bewai_AttributeAssigner.xml" hash="14a172053dd4542ae577d13225c71ca5"/></dir></target><target name="magelocale"><dir name="en_US"><file name="Bewai_AttributeAssigner.csv" hash="78a634e46e8ef248a177c2aa08bf0d63"/></dir><dir name="fr_FR"><file name="Bewai_AttributeAssigner.csv" hash="beaec95afe43086b962f7ca8e557d513"/></dir></target><target name="mageskin"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="bewai"><dir name="attributeassigner"><file name="adminhtml.css" hash="44dc3b9b17c8b46f7cc1bde22308529e"/></dir></dir></dir></dir></dir></target></contents>
27
  <compatible/>
28
  <dependencies><required><php><min>5.3.0</min><max>5.5.0</max></php></required></dependencies>
29
  </package>