00001 <?php
00002
00007 class oxSimpleVariant extends oxI18n
00008 {
00009
00015 protected $_blUseLazyLoading = true;
00016
00022 protected $_dVat = null;
00023
00029 protected $_oPrice = null;
00030
00035 public function __construct()
00036 {
00037 parent::__construct();
00038 $this->_sCacheKey = "simplevariants";
00039 $this->init( 'oxarticles' );
00040 }
00041
00048 public function getSelectLists()
00049 {
00050 return null;
00051 }
00052
00058 public function getPrice()
00059 {
00060 if (!is_null($this->_oPrice)) {
00061 return $this->_oPrice;
00062 }
00063
00064 $this->_oPrice = oxNew("oxPrice");
00065 $this->_oPrice->setPrice($this->oxarticles__oxprice->value, $this->_dVat);
00066 return $this->_oPrice;
00067 }
00068
00074 public function getFPrice()
00075 {
00076 if ( $oPrice = $this->getPrice() ) {
00077 return oxLang::getInstance()->formatCurrency( $oPrice->getBruttoPrice() );
00078 } else {
00079 return null;
00080 }
00081 }
00082
00090 public function setVat($dVat)
00091 {
00092 $this->_dVat = $dVat;
00093 }
00094 }