문제

I'm trying to set the default value as "Yes" for the Is Active field on New Category. The default value is no, and the store owner gets annoyed when the category doesn't show on the frontend. I've tried using function $attribute->getDataSetDefault('default_value',1); on app\code\core\Mage\Adminhtml\Block\Catalog\Category\Tabs.php, but it didn't work.

The div content on design/adminhtml/default/default/catalog/category/edit/form.phtml is generated dinamically on Tabs.php, on this call:

$block = $this->getLayout()->createBlock($this->getAttributeTabBlock(), '')
            ->setGroup($group)
            ->setAttributes($attributes)
            ->setAddHiddenFields($active)
            ->toHtml();

I tried to debug, but after a while I had an overflow on debug memory, and it crashed. I'm still trying this.

I also tried to look at configuration files to find where the attribute is created to see if a default value is set, but I haven't find it yet.

New Category Form

올바른 솔루션이 없습니다

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 magento.stackexchange
scroll top