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 
00039     protected $_iViewIndexState = VIEW_INDEXSTATE_NOINDEXNOFOLLOW;
00040 
00051     public function render()
00052     {
00053         $this->_aViewData['anid']     = $this->getProductId();
00054         $this->_aViewData['actpicid'] = $this->getActPictureId();
00055         $this->_aViewData['ArtPics']  = $this->getArtZoomPics();
00056         $this->_aViewData['product']  = $this->getProduct();
00057 
00058         parent::render();
00059 
00060         return $this->_sThisTemplate;
00061     }
00062 
00068     public function getProductId()
00069     {
00070         if ( $this->_sProductId === null ) {
00071             $this->_sProductId = $this->getProduct()->getId();
00072         }
00073         return $this->_sProductId;
00074     }
00075 
00081     public function getActPictureId()
00082     {
00083         if ( $this->_sActPicId === null ) {
00084             $this->_sActPicId = false;
00085             $aPicGallery = $this->getProduct()->getPictureGallery();
00086 
00087             if ( $aPicGallery['ZoomPic'] ) {
00088                 $sActPicId = oxConfig::getParameter( 'actpicid' );
00089                 $this->_sActPicId = $sActPicId ? $sActPicId : 1;
00090             }
00091         }
00092         return $this->_sActPicId;
00093     }
00094 
00100     public function getArtZoomPics()
00101     {
00102         if ( $this->_aArtZoomPics === null ) {
00103             $this->_aArtZoomPics = false;
00104             //Get picture gallery
00105             $aPicGallery = $this->getProduct()->getPictureGallery();
00106             $blArtPic = $aPicGallery['ZoomPic'];
00107             $aArtPics = $aPicGallery['ZoomPics'];
00108 
00109             if ( $blArtPic ) {
00110                 $this->_aArtZoomPics = $aArtPics;
00111             }
00112         }
00113         return $this->_aArtZoomPics;
00114     }
00115 
00121     public function getProduct()
00122     {
00123         if ( $this->_oProduct === null ) {
00124             $this->_oProduct = oxNewArticle( oxConfig::getParameter( 'anid' ) );
00125         }
00126         return $this->_oProduct;
00127     }
00128 }