moredetails.php

Go to the documentation of this file.
00001 <?php
00002 
00008 class MoreDetails extends oxUBase
00009 {
00014     protected $_sThisTemplate = 'moredetails.tpl';
00015 
00020     protected $_sProductId = null;
00021 
00026     protected $_sActPicId = null;
00027 
00032     protected $_aArtZoomPics = null;
00033 
00040     protected $_iViewIndexState = 1;
00041 
00050     public function init()
00051     {
00052         parent::init();
00053 
00054         // set anid for other pictures
00055         $this->_oProduct = oxNewArticle( oxConfig::getParameter( 'anid' ) );
00056         $this->_sProductId = $this->_oProduct->getId();
00057     }
00058 
00069     public function render()
00070     {
00071         $this->_aViewData['anid'] = $this->getProductId();
00072 
00073         $this->_aViewData['actpicid'] = $this->getActPictureId();
00074         $this->_aViewData['ArtPics']  = $this->getArtZoomPics();
00075 
00076         $this->_aViewData['product'] = $this->getProduct();
00077 
00078         parent::render();
00079 
00080         return $this->_sThisTemplate;
00081     }
00082 
00088     public function getProductId()
00089     {
00090         return $this->_sProductId;
00091     }
00092 
00098     public function getActPictureId()
00099     {
00100         if ( $this->_sActPicId === null ) {
00101             $this->_sActPicId = false;
00102             $aPicGallery = $this->_oProduct->getPictureGallery();
00103 
00104             if ( $aPicGallery['ZoomPic'] ) {
00105                 $sActPicId = oxConfig::getParameter( 'actpicid' );
00106                 $this->_sActPicId = $sActPicId ? $sActPicId : 1;
00107             }
00108         }
00109         return $this->_sActPicId;
00110     }
00111 
00117     public function getArtZoomPics()
00118     {
00119         if ( $this->_aArtZoomPics === null ) {
00120             $this->_aArtZoomPics = false;
00121             //Get picture gallery
00122             $aPicGallery = $this->_oProduct->getPictureGallery();
00123             $blArtPic = $aPicGallery['ZoomPic'];
00124             $aArtPics = $aPicGallery['ZoomPics'];
00125 
00126             if ( $blArtPic ) {
00127                 $this->_aArtZoomPics = $aArtPics;
00128             }
00129         }
00130         return $this->_aArtZoomPics;
00131     }
00132 
00138     public function getProduct()
00139     {
00140         return $this->_oProduct;
00141     }
00142 }

Generated on Thu Dec 4 12:04:57 2008 for OXID eShop CE by  doxygen 1.5.5