64 $this->_sCacheKey =
"simplevariants";
65 $this->
init(
'oxarticles' );
102 if ( $this->_oUser === null ) {
103 $this->_oUser = $this->
getUser();
115 $dPrice = $this->oxarticles__oxprice->value;
117 if ( $oUser->inGroup(
'oxidpricea' ) ) {
118 $dPrice = $this->oxarticles__oxpricea->value;
119 } elseif ( $oUser->inGroup(
'oxidpriceb' ) ) {
120 $dPrice = $this->oxarticles__oxpriceb->value;
121 } elseif ( $oUser->inGroup(
'oxidpricec' ) ) {
122 $dPrice = $this->oxarticles__oxpricec->value;
127 if ( $this->
getConfig()->getConfigParam(
'blOverrideZeroABCPrices' ) && (double) $dPrice == 0 ) {
128 $dPrice = $this->oxarticles__oxprice->value;
144 if ( !
$myConfig->getConfigParam(
'bl_perfLoadPrice' ) ) {
148 if ( $this->_oPrice === null ) {
149 $this->_oPrice =
oxNew(
"oxPrice" );
151 $this->_oPrice->setPrice( $dPrice, $this->_dVat );
157 } elseif ( ( $oParent = $this->
getParent() ) ) {
158 $this->_oPrice = $oParent->getPrice();
176 $oCur = $this->
getConfig()->getActShopCurrencyObject();
191 if ( ( $oParent = $this->
getParent() ) ) {
192 $oParent->applyDiscountsForVariant( $oPrice );
205 if ( ( $oParent = $this->
getParent() ) && !$this->
getConfig()->getConfigParam(
'bl_perfCalcVatOnlyForBasketOrder' ) ) {
206 $oParent->applyVats($oPrice);
219 $this->_oPrice = $oPrice;
230 if ( ( $oPrice = $this->
getPrice() ) ) {
245 $this->_oParent = $oParent;
266 if ( ( $oParent = $this->
getParent() ) ) {
267 $iLinkType = $oParent->getLinkType();
282 if ( ( $oParent = $this->
getParent() ) ) {
283 $blIn = $oParent->inCategory( $sCatNid );
298 if ( ( $oParent = $this->
getParent() ) ) {
299 $blIn = $oParent->inPriceCategory( $sCatNid );
315 if ( !isset( $this->_aBaseStdUrls[$iLang][$iLinkType] ) ) {
316 $oArticle =
oxNew(
"oxArticle" );
317 $oArticle->setId( $this->
getId() );
318 $oArticle->setLinkType( $iLinkType );
319 $this->_aBaseStdUrls[$iLang][$iLinkType] = $oArticle->getBaseStdLink( $iLang, $blAddId, $blFull );
322 return $this->_aBaseStdUrls[$iLang][$iLinkType];
333 public function getStdLink( $iLang = null, $aParams = array() )
335 if ( $iLang === null ) {
340 if ( !isset( $this->_aStdUrls[$iLang][$iLinkType] ) ) {
341 $oArticle =
oxNew(
"oxArticle" );
342 $oArticle->setId( $this->
getId() );
343 $oArticle->setLinkType( $iLinkType );
344 $this->_aStdUrls[$iLang][$iLinkType] = $oArticle->getStdLink( $iLang, $aParams );
347 return $this->_aStdUrls[$iLang][$iLinkType];
359 return oxRegistry::get(
"oxSeoEncoderArticle")->getArticleUrl( $this, $iLang, $iLinkType );
371 if ( $iLang === null ) {
380 if ( !isset( $this->_aSeoUrls[$iLang][$iLinkType] ) ) {
381 $this->_aSeoUrls[$iLang][$iLinkType] = $this->
getBaseSeoLink( $iLang );
383 return $this->_aSeoUrls[$iLang][$iLinkType];