【问题标题】:Add created_at field on admin side of product information page in magento在 magento 的产品信息页面的管理端添加 created_at 字段
【发布时间】:2014-07-04 10:23:23
【问题描述】:

我想在 Catalog -> Manage product -> General 选项卡的管理端添加 created_at 字段。

应该更新了。请帮帮我。

提前致谢。

【问题讨论】:

    标签: magento admin catalog


    【解决方案1】:

    您不能在 Catalog -> Manage Product -> General 上添加 created_at,因为它是 magento 默认产品属性。您可以选择显示不同的属性名称,它将显示在常规选项卡上。

    【讨论】:

      【解决方案2】:

      在模块的安装文件中创建自己的属性。并使用模型 Mage_Eav_Model_Entity_Attribute_Backend_Time_Created。在这种情况下,您的属性将使用 create_at 属性的数据。

      试试这个代码:

      $installer->addAttribute(
          Mage_Catalog_Model_Product::ENTITY,
          'go_live_date',
          array(
              'type'       => 'datetime',
              'input'      => 'datetime',
              'label'      => 'Date of Creation',
              'sort_order' => 1000,
              'required'   => false,
              'global'     => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_STORE,
              'backend'    => 'eav/entity_attribute_backend_time_created'
          )
      );
      

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2016-04-08
        • 1970-01-01
        • 2013-06-27
        • 2017-09-18
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多