On magento 1.7 I created a promotional price rule of 20% discount for "special members" customer group.
I'd like to display both prices. I thought there would be something like
$_product->getPriceByCustomerGroup( $groupId );
Goal
(not logged in):
(member logged in):
Fished my own wish after hacking on it for a while
$now = Mage::getSingleton('core/date')->timestamp( time() );
$websiteId = Mage::app()->getStore()->getWebsiteId();
$customerGroup = 4;
Mage::getResourceModel('catalogrule/rule')->getRulePrice( $now, $websiteId, $customerGroup, $_productId);
shouldn't
Mage::('catalogrule/rule')
instead beMage::getModel('catalogrule/rule')
?No, it should be Mage::getResourceModel. getModel is not the right one.
Wow. This actually works. I never knew the catalogrule module had that method for getting a price. Thank you!