【问题标题】:Confusion about store_id in Magento 2 databaseMagento 2 数据库中关于 store_id 的混淆
【发布时间】:2017-01-21 18:40:05
【问题描述】:

我正在运行 Magento 2.1 并从 Magento 1.9.x 安装迁移数据。一切顺利。

我的 Magento 2.1 安装有一个辅助存储(默认存储并没有真正使用),“存储”数据库表中的值如下所示:

store_id = 0, code = admin, website_id = 0
store_id = 1, code = default, website_id = 1
store_id = 4, code = mysecondstore_english, website_id = 3

“store_website”数据库表中的值如下所示:

website_id = 0, code = admin, name = "Admin"
website_id = 1, code = base, name = "Main Website"
website_id = 3, code = mysecondstore, name = "My Second Store"

我浏览了目录中的所有项目,并进行了各种更改以标准化事物、加强 SEO 和其他小调整。编辑项目时,在“网站中的产品”部分我有两个复选框:主网站和我的第二个商店。默认情况下,主网站框被选中,所以我取消选中它并选中了我的第二个商店。

基本上这样做是在许多“catalog_product_entity_xxxxxxxxx”数据库属性表中创建重复条目,其中 store_id 为 4,除了 store_id 为 0 的现有条目。

现在,当我编辑项目时,更改不会显示在商店中,因为默认情况下它将编辑 store_id = 0 数据库属性。我必须在数据库中手动进行更改。

我想要做的是摆脱重复的条目,但在做了一些测试之后,我有点困惑应该使用哪个 store_id 以及我需要更改哪些表(除了“catalog_product_entity_xxxxxxxx”属性表)。我原以为 store_id = 4 会是一个选择,但随后该项目似乎从商店中消失了。

如果有任何建议,我一定会很感激的!

【问题讨论】:

    标签: magento


    【解决方案1】:

    我建议再次安装 magento 2 而不会出错。这是最简单的方法。

    【讨论】:

      猜你喜欢
      • 2015-02-21
      • 2015-02-09
      • 1970-01-01
      • 2019-07-15
      • 1970-01-01
      • 2021-10-02
      • 2015-01-05
      • 1970-01-01
      • 2012-12-17
      相关资源
      最近更新 更多