1

I think this is an incredibly simple question (but I maybe wrong) so I apologise if it is.

We have a module with this code in it

public function getCustomerGroup()
{
    $groupId = Mage::getSingleton('customer/session')->getCustomerGroupId();
    return Mage::getModel('customer/group')->load($groupId)->getCode();
}

Instead of its current value, I would like it just to return another value (I shall call this value 'value') for everything / everyone, what do I need to replace the

Mage::getSingleton('customer/session')->getCustomerGroupId();
    return Mage::getModel('customer/group')->load($groupId)->getCode();

To get this value to show?

2
  • 1
    as far i understand it just replace return Mage::getModel('customer/group')->load($groupId)->getCode(); with return 'your desired value'; Commented Feb 8, 2016 at 11:17
  • Thankyou for the swift reply that has fixed the issue.
    – Peter
    Commented Feb 8, 2016 at 11:37

1 Answer 1

2

just replace return

Mage::getModel('customer/group')->load($groupId)->getCode();

with

return 'your desired value';

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.