使用Magento进行前端开发时,我想在有多次打开模板/块提示时进行单页加载。我不’t,必须等待Magento管理员加载系统> Configuration >开发人员页面,切换到网站视图,然后打开模板/路径提示。我已经写了几个mysql片段,允许我使用一个查询启用/禁用暗示。
我写了脚本,以便为清洁Magento安装,它们将在Core_config_data表中插入必要的记录。对于已启用/禁用的提示的Magento安装,记录将存在于配置表中,因此脚本将仅更新该记录。
1 2 3 4 5 6 |
- 使能够 模板 暗示 放 @ template_hints. = 1; 插入 进入 ` core_config_data. ` ( ` 范围 `, ` scope_id. `, ` 小路 `, ` 价值 `) 价值 ( '网站' ,'1','dev / debug / template_hints', @ template_hints. ) 上 复制 钥匙 更新 ` 价值 `=@ template_hints. ; - 使能够 堵塞 暗示 放 @ template_hints. _blocks. = 1; 插入 进入 ` core_config_data. ` ( ` 范围 `, ` scope_id. `, ` 小路 `, ` 价值 `) 价值 ( '网站' ,'1','dev / debug / template_hints_blocks.', @ template_hints. _blocks.) 上 复制 钥匙 更新 ` 价值 `=@ template_hints. _blocks.; |
1 2 3 4 5 6 |
- 使能够 模板 暗示 放 @ template_hints. = 0; 插入 进入 ` core_config_data. ` ( ` 范围 `, ` scope_id. `, ` 小路 `, ` 价值 `) 价值 ( '网站' ,'1','dev / debug / template_hints', @ template_hints. ) 上 复制 钥匙 更新 ` 价值 `=@ template_hints. ; - 使能够 堵塞 暗示 放 @ template_hints. _blocks. = 0; 插入 进入 ` core_config_data. ` ( ` 范围 `, ` scope_id. `, ` 小路 `, ` 价值 `) 价值 ( '网站' ,'1','dev / debug / template_hints_blocks.', @ template_hints. _blocks.) 上 复制 钥匙 更新 ` 价值 `=@ template_hints. _blocks.; |
当我覆盖 这个帖子 ,可以在全局级别开启提示,该级别激活所有网站和管理面板的提示。如果你是有用的’重新为管理员面板进行自定义,或者您是否有多个网站’重新希望同时激活/取消激活提示。以下两种代码段在全球级别修改提示:
1 2 3 4 5 6 |
- 使能够 模板 暗示 放 @ template_hints. = 1; 插入 进入 ` core_config_data. ` ( ` 范围 `, ` scope_id. `, ` 小路 `, ` 价值 `) 价值 ( '默认' ,'0','dev / debug / template_hints', @ template_hints. ) 上 复制 钥匙 更新 ` 价值 `=@ template_hints. ; - 使能够 堵塞 暗示 放 @ template_hints. _blocks. = 1; 插入 进入 ` core_config_data. ` ( ` 范围 `, ` scope_id. `, ` 小路 `, ` 价值 `) 价值 ( '默认' ,'0','dev / debug / template_hints_blocks.', @ template_hints. _blocks.) 上 复制 钥匙 更新 ` 价值 `=@ template_hints. _blocks.; |
1 2 3 4 5 6 |
- 使能够 模板 暗示 放 @ template_hints. = 0; 插入 进入 ` core_config_data. ` ( ` 范围 `, ` scope_id. `, ` 小路 `, ` 价值 `) 价值 ( '默认' ,'0','dev / debug / template_hints', @ template_hints. ) 上 复制 钥匙 更新 ` 价值 `=@ template_hints. ; - 使能够 堵塞 暗示 放 @ template_hints. _blocks. = 0; 插入 进入 ` core_config_data. ` ( ` 范围 `, ` scope_id. `, ` 小路 `, ` 价值 `) 价值 ( '默认' ,'0','dev / debug / template_hints_blocks.', @ template_hints. _blocks.) 上 复制 钥匙 更新 ` 价值 `=@ template_hints. _blocks.; |
*如果您有多个网站,您’ll需要更新‘1’为网站字段设置值以反映您网站的ID。如果您有多个网站,则可以使用最后两个SQL片段全局打开全局的提示。