[英]How to get all available customer group from magento
I want to fetch all the customer group which is used in the tier price eg All Group, Not Logged In, Wholesaler,General etc. 我想获取所有用于分级价格的客户组,例如所有组,未登录,批发商,一般等。
I have code on my extended controller and its path is company\\TierPriceImport\\Model\\Convert\\Adapter\\product.php 我在扩展控制器上有代码,其路径为company \\ TierPriceImport \\ Model \\ Convert \\ Adapter \\ product.php
Here is my code: 这是我的代码:
foreach ($this->_group_list as $group)
{
if (strtolower($group['label']))
{
echo $group['label']
break;
}
}
it only shows me General and Wholesale. 它只向我显示一般和批发。 However, i need to display complete list of group name which are available in magneto instead of just two.
但是,我需要显示组名的完整列表,这些组名可用磁贴而不是两个。
Please help me to get this done. 请帮助我完成此任务。
Thanks 谢谢
$this->_group_list = Mage::getModel('customer/group')->getCollection();
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.