prestashop - Prestashop 1.7:从上下文中获取 Shop Group ID?
问题描述
\Context::getContext()->shop->id
允许我们从上下文中获取 Shop ID。
我一直在寻找\Context::getContext()->shop->group_id
或\Context::getContext()->group_shop->id
在课堂上和谷歌中,但没有找到任何相关的东西。
如何从上下文中获取 Shop Group ID?
解决方案
尝试Context::getContext()->shop->getContextShopGroupID();
推荐阅读
- javascript - 我如何获取用户 ID 服务器端?
- php - 将“Ymd H:i:s”转换为“dmY H:i:s”
- jwt - 为什么使用 Auth0 的 CouchDB JWT 身份验证对我不起作用?
- python - Python 应用程序看不到 PSQL 更改
- octave - 在 Octave 返回错误中以 ' 作为版权符号的矩阵的转置
- java - 生命周期感知 LiveEvent 中的上下文为空
- python - 如何查看字符串中是否有任何ip
- python - 无法为大型数据集运行选择性 pandas 分析
- javascript - 我可以通过简单的基于 JavaScript 的 Web 应用程序修改 MS Word 文档吗?
- xamarin.forms - 依赖服务和媒体播放器