/** * Retrieve label for scope * * @param Mage_Backend_Model_Config_Structure_Element_Field $field * @return string */ public function getScopeLabel(Mage_Backend_Model_Config_Structure_Element_Field $field) { $showInStore = $field->showInStore(); $showInWebsite = $field->showInWebsite(); if ($showInStore == 1) { return $this->_scopeLabels[self::SCOPE_STORES]; } elseif ($showInWebsite == 1) { return $this->_scopeLabels[self::SCOPE_WEBSITES]; } return $this->_scopeLabels[self::SCOPE_DEFAULT]; }
public function testShowInStore() { $this->assertFalse($this->_model->showInStore()); $this->_model->setData(array('showInStore' => 1), 'scope'); $this->assertTrue($this->_model->showInStore()); }