There is a special customer group named A which has it's own special catalog rules and group prices. I am going to display final price of another customer group named B for A users. How can I get final price of another customer group which is not for the current user?
$now = Mage::getSingleton('core/date')->timestamp(time()); $websiteId = Mage::app()->getStore()->getWebsiteId(); $customerGroup = 4; $new = Mage::getResourceModel('catalogrule/rule')->getRulePrice( $now, $websiteId, $customerGroup, $_productId); var_dump($new);
$product = Mage::getModel('catalog/product')->load($id); $group = Mage::getModel('customer/group')->load($code, 'customer_group_code'); //get group price $product->setCustomerGroupId($group->getId()); $price = $product->getGroupPrice(); //get main price $product->setCustomerGroupId(null); $price = $product->getPrice();