在 Magento 中,有没有办法在创建后从可配置产品中删除属性?
在 Magento 中,我已经创建了一堆可配置产品,现在有一个客户改变了主意并想要删除其中一个属性。我很难弄清楚如何执行此操作,因为我不断收到一条错误消息:
该属性用于可配置的 产品。您无法将其从中删除 属性集。
我尝试进入该属性并将用于创建可配置产品从“是”更改为“否”,但在尝试从现有产品中删除属性时似乎没有任何作用
In Magento, I have have a bunch of configurable products already created and now have a client that has changed their mind and wants to remove one of the attributes. I'm having a hard time figuring out how to do this b/c I keep getting an error message saying:
This attribute is used in configurable
products. You cannot remove it from
the attribute set.
I have tried going into the attribute and changing Use to Create Configurable Product from "yes" to "no", but that didn't seem to do anything when trying to remove attribute from existing products
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(6)
要从所有可配置产品中删除一个超级产品属性(如它们的名称),您可以在数据库中执行以下 SQL 查询:
表
catalog_product_super_attribute
将产品链接到超级产品属性。您可以在其中添加和删除已创建的可配置产品的属性。To remove one super product attribute (as they are called) from all configurable products, you could execute this SQL query in the database:
The table
catalog_product_super_attribute
links products to super product attributes. You can add and remove attributes to created configurable products there.您似乎首先尝试从属性集中删除该属性,但您需要从可配置产品中删除它,然后再从属性集中删除。打开每个可配置产品,转到“关联产品”选项卡并删除不需要的属性(和链接的产品)。保存每个产品,然后尝试从集合中删除该属性。
It seems like you're trying to remove the attribute from the attribute set first, but you need to remove it from the configurable products, then the attribute set. Open each configurable product, go to the Associated Products tab and remove the attribute (and linked products) that is not required. Save each product and then try removing the attribute from the set.
只需使用 phpmyadmin 并连接到您的数据库。
查找 eav_attribute 表。
删除你想要的属性。
Simply use phpmyadmin and connect to your database.
Look for the eav_attribute table.
Delete the attribute you want.
基于 Christian Davén 的答案,您可以使用以下命令根据
attribute_code
名称而不是attribute_id
本身进行删除,只是为了确保您引用了正确的 ID:Building on Christian Davén's answer, you could use the following to delete based on the
attribute_code
name instead of theattribute_id
itself, just to be sure that you are referencing the right ID:也许这可以帮助:
http://www.magentocommerce.com/boards/viewthread/6059/#t327478
may be this could help:
http://www.magentocommerce.com/boards/viewthread/6059/#t327478
不幸的是,这在标准 Magento 后端是不可能的。
因此,您必须查看 SQL 解决方案(我对这些不熟悉)。
Unfortunately, this is not possible from the standard Magento backend.
As such, you have to look at SQL solutions (I'm not familair with these).