magento 如何创建助手数据?

how-to-create-helper-data

在您的模块中D:\www\lollicupStore2\app\code\local\Lollicupstore\Payment\etc\config.xml,在<global>标签内添加下面代码

 <global>
        <helpers>
            <lollicupstore_payment>
                <class>Lollicupstore_Payment_Helper</class>
            </lollicupstore_payment>
        </helpers>
    </global>

然后创建该文件 D:\www\lollicupStore2\app\code\local\Lollicupstore\Payment\Helper\Data.php

<?php
/**
 * Created by PhpStorm.
 * User: lollicup
 * Date: 2019/5/17
 * Time: 14:40
 */
class Lollicupstore_Payment_Helper_Data extends  Mage_Core_Helper_Abstract{

}

然后调用该模块,您将使用

$helper = Mage::helper('payment');

Leave a comment

您的电子邮箱地址不会被公开。 必填项已用*标注