0

I have created a profile to Import products in magento 1.9 When I run the profile after selecting my file then a new window opens and products are imported with some messages. enter image description here

Clicking on the button in the image "Run Profile in Popup" a new window opens and import starts. This is the url of the new window

https://www.magento.com/index.php/backoffice/system_convert_gui/run/id/3/key/497b31d4cb355b1376c6cee986deaad8/files/import-20191009092705-1_export_stage.csv/

I am trying to understand how the code runs for this URL. So according to above URL and keeping in mind magento MVC structure, we need to go to GuiController and runAction. Opening the class

class Mage_Adminhtml_System_Convert_GuiController extends Mage_Adminhtml_System_Convert_ProfileController

I find runAction in the parent class ie :

class Mage_Adminhtml_System_Convert_ProfileController

public function runAction()
{
    $this->_initProfile();
    $this->loadLayout();
    $this->renderLayout();
}

Then there is _initProfile() function in the same class :

protected function _initProfile($idFieldName = 'id')
{
    $this->_title($this->__('System'))
         ->_title($this->__('Import and Export'))
         ->_title($this->__('Profiles'));

    $profileId = (int) $this->getRequest()->getParam($idFieldName);
    $profile = Mage::getModel('dataflow/profile');

    if ($profileId) {
        $profile->load($profileId);
        if (!$profile->getId()) {
            Mage::getSingleton('adminhtml/session')->addError(
                $this->__('The profile you are trying to save no longer exists'));
            $this->_redirect('*/*');
            return false;
        }
    }

    Mage::register('current_convert_profile', $profile);

    return $this;
}

In this part of code now I am stuck. I could not find where this line Mage::register('current_convert_profile', $profile); is leading to. Could some one help me locate the code after this line or any instructions on How I can do it myself?

Your Answer

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

Browse other questions tagged or ask your own question.