【问题标题】:Remove attributes from a configurable product in Magento从 Magento 中的可配置产品中删除属性
【发布时间】:2012-09-22 03:29:26
【问题描述】:

是否有任何方法可以在可配置产品创建后删除该属性?我试图从属性集中删除一个属性,但如果它已经分配给一个产品,Magento 将不允许你这样做。我见过的从产品中删除属性的唯一方法是直接在数据库中(catalog_product_super_attribute 表)。

【问题讨论】:

    标签: magento configuration attributes admin product


    【解决方案1】:

    您可以使用此模型获取 catalog_product_super_attribute 属性的集合并继续删除记录。

    Mage::getResourceModel('catalog/product_type_configurable_attribute_collection')

    注意,在 Mage_Catalog_Model_Product_Type_Configurable_Attribute 上有一个 _afterSave 方法试图将标签保存到另一个表上,这会在删除时导致异常。

    【讨论】:

      猜你喜欢
      • 2011-06-25
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多