Magento-查找当前用户是卖家还是不使用If条件


Magento - find the current user is seller or not using If condition

我正在建立一个基于Magento的电子商务商店。我需要使它的用户登录功能是双重的;一个给买家,一个给卖家。

如果他/她是卖家,那么我想设置一些特殊功能,否则买家不需要。

我使用的是Magento CE1.7.0.2

有什么想法吗?

Magento提供客户群功能。

因此,您创建了两个客户组(卖家和买家),因此根据登录的客户设置if条件并显示结果表单。

希望这对你有帮助。

有关customer's entity id, website id, email, etc。您可以使用getCustomer函数。以下代码显示了您可以从中获得的内容:-

echo "<pre>"; print_r(Mage::helper('customer')->getCustomer()->getData()); echo "</pre>";