Beispiel #1
0
 protected function setPosition()
 {
     return $this->attribute->getPosition();
 }
 /**
  * Comparison method to sort the product attributes
  * by their position.
  *
  * @param Mage_Catalog_Model_Resource_Eav_Attribute $o1
  * @param Mage_Catalog_Model_Resource_Eav_Attribute $o2
  * @return int 0 if the position is equal, +1 if position of $o1 is greater, else -1
  */
 protected function _cmp($o1, $o2)
 {
     // load an compare the positions
     $a = $o1->getPosition();
     $b = $o2->getPosition();
     if ($a == $b) {
         return 0;
     }
     return $a > $b ? +1 : -1;
 }