I'm looking for a way to load a template (.phtml) per group. In this case i want to show all options to a logged in user for a bundle product. Other users should be able to see the options but they can not order.

At this moment i am using this code to detect the user group. A user with groupId == 2 will be shown the normal template. But how do i replace the 'Get a different template' text with an actual template? At this moment i am just showing text instead off a template.

            $login = Mage::getSingleton( 'customer/session' )->isLoggedIn(); //Check if User is Logged In
                $groupId = Mage::getSingleton('customer/session')->getCustomerGroupId(); //Get Customers Group ID
                if($groupId == 2) //2
                echo $this->getChildHtml('', true, true);

            else {
                echo ('Get a different template with name options-new.phtml');

FYI: I placed this code in the wrapper.phtml and i am trying to show bundled options.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.