问题描述:

Because it's for a textbox, I'm not sure how the array is supposed to work.

This fails.

public function getDefault_dailymatches()

{

return array(

array('value' => 0, 'label' => Mage::helper()->__('First item')),

array('value' => 1, 'label' => Mage::helper()->__('Second item')),

array('value' => 2, 'label' => Mage::helper()->__('third item')),

// and so on...

);

}

This also fails.

public function getDefault_dailymatches()

{

$default = 100;

return $default;

}

网友答案:

I found the answer out myself by searching Magento.zip for the evident default textbox variables.

Add this to config.xml inbetween the <config></config> tags.

<default>
    <showdown> <!-- section -->
        <dagroup> <!-- group -->
            <dailymatches>1</dailymatches>
            <maxmatchvotes>100</maxmatchvotes>
            <field>default value</field>
            <!-- <blah><![CDATA[<strong>html tags</strong>]]></blah>
            <blah2><![CDATA[[email protected]]]></blah2> -->
        </dagroup>
    </showdown>        
</default>
相关阅读:
Top