¿Dónde está la ubicación de la función que se llama en este enlace "Admin / Catalog_Category / Tree / Store / 17 / ID / 588 /? ISAJAX= true"

magento.stackexchange https://magento.stackexchange.com//questions/90822

Pregunta

Estoy trabajando en la funcionalidad de Subm. Subm. Multi sitio web. Cuando voy a Gestionar categorías y cambiar entre sitios web, una llamada AJAX está funcionando para el mismo. ¿Qué llame a Lime este enlace

admin/catalog_category/tree/store/17/id/588/?isAjax=true

Quiero llegar donde se escribe la función para esto.

¿Fue útil?

Solución

Esta función está escrita en

app\code\core\Mage\Adminhtml\controllers\Catalog\CategoryController.php

en

public function treeAction()
    {
        $storeId = (int) $this->getRequest()->getParam('store');
        $categoryId = (int) $this->getRequest()->getParam('id');

        if ($storeId) {
            if (!$categoryId) {
                $store = Mage::app()->getStore($storeId);
                $rootId = $store->getRootCategoryId();
                $this->getRequest()->setParam('id', $rootId);
            }
        }

        $category = $this->_initCategory(true);

        $block = $this->getLayout()->createBlock('adminhtml/catalog_category_tree');
        $root  = $block->getRoot();
        $this->getResponse()->setBody(Mage::helper('core')->jsonEncode(array(
            'data' => $block->getTree(),
            'parameters' => array(
                'text'        => $block->buildNodeName($root),
                'draggable'   => false,
                'allowDrop'   => ($root->getIsVisible()) ? true : false,
                'id'          => (int) $root->getId(),
                'expanded'    => (int) $block->getIsWasExpanded(),
                'store_id'    => (int) $block->getStore()->getId(),
                'category_id' => (int) $category->getId(),
                'root_visible'=> (int) $root->getIsVisible()
        ))));
    }

Licenciado bajo: CC-BY-SA con atribución
No afiliado a magento.stackexchange
scroll top