Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我需要从文章变体的主要文章中获取一些属性。一个例子:
用户选择了文章 SW1234.4。商店应该显示来自主文章 SW1234 而不是变体 SW1234.4 的属性“测试”。
我正在考虑一些聪明的变种,{$sArticle.mainnumber.attr4} 这怎么可能?
{$sArticle.mainnumber.attr4}
你应该首先尝试“{debug}”。(启用弹出窗口!)现在您可以看到您可以访问哪些变量,也许您正在寻找的信息已经存储在 smarty 变量中。
另一种方法是自定义插件,它在您的文章表上进行选择并获取您可以分配给您的视图的所需信息。
例如
$this->View()->assign($varname, $value);
我知道我的回复有点晚了,但作为贡献者,我是这个网站的新手。
哪个商店软件版本?你在使用响应式主题吗?请提供更多信息。:)