3

I need to get the 'scope' value from core_config_data table of the current scope that has been selected by the user in the admin-panel. I've tried several methods posted in this site without success, for example:

Mage::app()->getWebsite()->getConfig('.../.../...')  Returns bool(false) 

Mage_Core_Model_Website::getConfig() Returns the same...

I've also tried to get some random 'scope_id' and then get its 'scope' value, but this doesn't work since the same 'scope_id' value can be used for different 'scope' values and can't get the current scope value that i need.

Is there a way i can get the 'scope' value of the current scope selected by the user?.

Thanks

1 Answer 1

2

Solved by getting the current scope value with this:

$scope = Mage::getSingleton('adminhtml/config_data')->getScope();
1
  • put full answer
    – Amit Bera
    Apr 8, 2014 at 19:15

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.