article_crossselling.php

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