0

I am unable to get the correct Customer Group ID from the Order View page. This is part of a helper, which calls

Mage::getSingleton('adminhtml/sales_order_create')->getQuote()->getCustomerGroupId();

and it works fine if it is during the "Create Order" process, but I can't determine how to load the Customer Group on the Order View page after order creation.

What can I load to get the customer's group id from the order after the order is already created?

1 Answer 1

3

As already order create that why you can not use session quote object

Mage::getSingleton('adminhtml/sales_order_create')->getQuote()->getCustomerGroupId();

use Mage::registry('sales_order')

Try this

if(Mage::registry('sales_order') &&(Mage::registry('sales_order')->getId())):
Mage::registry('sales_order')->getCustomerGroupId();
else:
//During creation of an  order
Mage::getSingleton('adminhtml/sales_order_create')->getQuote()->getCustomerGroupId();
endif;

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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