Magento:从没有产品的属性集中获取属性
我在我的 Magento 商店中设置了一个属性集,其中有几个二进制属性。
对于下拉列表,我需要此属性集中所有属性的列表,包括它们的内部名称和标签。由于此下拉列表应该出现在不一定选择产品的地方,因此我不能走“获取产品属性”的通常路线。
我如何获取集合中所有属性的列表?
I have set an attribute set in my Magento shop which has several binary attributes.
For a pulldown I need a list of ALL the attributes inside this one attribute set, including their internal name and their label. Since this pulldown should appear in places that not necessarily have a product selected I can't go the usual route of "getting the attributes of a product".
How do I go about of getting a list of all the attributes inside my set?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
好吧,我意识到我错过了您想要整套属性,而不仅仅是单个属性。试试这个:
然后,您需要迭代返回的数组,其中包含以下内容:
抱歉错过了原始点,希望这有帮助!
干杯,
京东
OK, I realised that I missed that you want the whole set of attributes, not just an individual one. Try this:
You'll then need to iterate through the array that is returned with something like:
Sorry for missing the original point, hope this helps!
Cheers,
JD
为了获取属性集中的所有属性,可以使用 as:
Cheers!!
In order to get all the attributes in an attribute set, you can use as:
Cheers!!
尝试这个片段,它应该给你你需要的,除了多选属性。
希望这有帮助,
京东
try this snippet, it should give you want you need, except for multi-select attributes.
Hope this helps,
JD