article_crossselling.php

Go to the documentation of this file.
00001 <?php
00002 
00009 class Article_Crossselling extends oxAdminDetails
00010 {
00011 
00019     public function render()
00020     {
00021         parent::render();
00022 
00023         $this->_aViewData['edit'] = $oArticle = oxNew('oxarticle');
00024 
00025         // crossselling
00026         $this->_createCategoryTree("artcattree");
00027 
00028         // accessoires
00029         $this->_createCategoryTree("artcattree2");
00030 
00031         $soxId = $this->getEditObjectId();
00032         if ($soxId != "-1" && isset($soxId)) {
00033             // load object
00034             $oArticle->load($soxId);
00035 
00036             if ($oArticle->isDerived()) {
00037                 $this->_aViewData['readonly'] = true;
00038             }
00039         }
00040 
00041         $iAoc = oxRegistry::getConfig()->getRequestParameter("aoc");
00042         if ($iAoc == 1) {
00043             $oArticleCrossellingAjax = oxNew('article_crossselling_ajax');
00044             $this->_aViewData['oxajax'] = $oArticleCrossellingAjax->getColumns();
00045 
00046             return "popups/article_crossselling.tpl";
00047         } elseif ($iAoc == 2) {
00048             $oArticleAccessoriesAjax = oxNew('article_accessories_ajax');
00049             $this->_aViewData['oxajax'] = $oArticleAccessoriesAjax->getColumns();
00050 
00051             return "popups/article_accessories.tpl";
00052         }
00053 
00054         return "article_crossselling.tpl";
00055     }
00056 }