批量更新 Magento 字段以“使用默认值”
有没有一种方法可以将特定商店视图的一堆magento产品重置回“使用默认值”似乎一旦您设置了商店特定数据,就没有简单的方法可以取消设置以便它接收默认数据。这导致我必须进行多次导入。
Is there a way that I can reset a bunch of magento products for a particular store view back to "Use Default Value" It seems once you set the store specific data there is no easy way to unset so that it receives the default data. This is causing me to have to do multiple imports.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我知道你想改变“一堆产品”......
仅针对有人想要摆脱所有产品的商店视图特定值的用例:
只需将属性的范围从“Store View”循环到“Global”,然后再次返回“Store View”即可。
I know you want to change "a bunch of products" ...
Just for the usecase someone want to get rid of the store-view-specific values for ALL products:
Just cycle the scope of the attribute from 'Store View' to 'Global' an back to 'Store View' again.
只需从product_entity_[attirubte_type]中删除product_id、attribute_id和store_id的记录即可。
Just remove record from product_entity_[attirubte_type] for the product_id, attribute_id and store_id.
您可以使用:
core_block_abstract_to_html_before
adminhtml
事件为管理员批量更新表单中的每个属性添加所需的复选框;catalog_product_attribute_update_before
事件从特定商店视图的EAV
表中删除值,仅适用于那些具有您之前通过core_block_abstract_to_html_before
设置为选中状态。原始答案:https://magento.stackexchange.com/a/45229/16724
You can use:
core_block_abstract_to_html_before
adminhtml
event to add the required checkboxes for every attribute in admin mass update form;catalog_product_attribute_update_before
event to delete the values from theEAV
tables for a specific store view, only for those attributes that have the checkbox you injected earlier withcore_block_abstract_to_html_before
set as checked.Original answer: https://magento.stackexchange.com/a/45229/16724