32 if (!
$myConfig->getConfigParam(
"blAllowRemoteArticleInfo"))
36 $sOutput =
'OXID__Problem : no valid oxid !';
40 $oProduct =
oxNew(
'oxArticle' );
41 $oProduct->load( $sId );
42 } elseif (
$myConfig->getConfigParam(
'bl_perfLoadAktion' ) ) {
43 $oArtList =
oxNew(
'oxarticlelist');
44 $oArtList->loadActionArticles(
'OXAFFILIATE' );
45 $oProduct = $oArtList->current();
52 $aClassVars = get_object_vars( $oProduct );
56 while ( list( $sFieldName, ) = each( $aClassVars ) ) {
57 if ( $oStr->strstr( $sFieldName,
'oxarticles' ) ) {
58 $sName = str_replace(
'oxarticles__',
'', $sFieldName );
59 $aExport[$sName] = $oProduct->$sFieldName->value;
63 $oPrice = $oProduct->getPrice();
65 $aExport[
'vatPercent'] = $oPrice->getVat();
66 $aExport[
'netPrice'] = $myUtils->fRound( $oPrice->getNettoPrice() );
67 $aExport[
'brutPrice'] = $myUtils->fRound( $oPrice->getBruttoPrice() );
68 $aExport[
'vat'] = $oPrice->getVatValue();
69 $aExport[
'fprice'] = $oProduct->getFPrice();
70 $aExport[
'ftprice'] = $oProduct->getFTPrice();
72 $aExport[
'oxdetaillink'] = $oProduct->getLink();
73 $aExport[
'oxmoredetaillink'] = $oProduct->getMoreDetailLink();
74 $aExport[
'tobasketlink'] = $oProduct->getToBasketLink();
75 $aExport[
'thumbnaillink'] =
$myConfig->getPictureUrl(null,
false,
$myConfig->isSsl()) .
"/". $aExport[
'oxthumb'];
76 $sOutput = serialize( $aExport );
80 $myUtils->showMessageAndExit( $sOutput );
94 public function toCompareList( $sProductId = null, $dAmount = null, $aSel = null, $blOverride =
false, $blBundle =
false )
105 if ( ( $blAddCompare || $blRemoveCompare ) && $sProductId ) {
109 if ( $blAddCompare && !isset( $aItems[$sProductId] ) ) {
110 $aItems[$sProductId] =
true;
113 if ( $blRemoveCompare ) {
114 unset( $aItems[$sProductId] );
121 if ( ( $oProduct = $oParentView->getViewProduct() ) ) {
122 if ( isset( $aItems[$oProduct->getId()] ) ) {
123 $oProduct->setOnComparisonList(
true );
125 $oProduct->setOnComparisonList(
false );
129 $aViewProds = $oParentView->getViewProductList();
130 if ( is_array( $aViewProds ) && count( $aViewProds ) ) {
131 foreach ( $aViewProds as $oProduct ) {
132 if ( isset( $aItems[$oProduct->getId()] ) ) {
133 $oProduct->setOnComparisonList(
true );
135 $oProduct->setOnComparisonList(
false );
153 public function toNoticeList( $sProductId = null, $dAmount = null, $aSel = null)
159 $this->
_toList(
'noticelist', $sProductId, $dAmount, $aSel );
172 public function toWishList( $sProductId = null, $dAmount = null, $aSel = null )
180 $this->
_toList(
'wishlist', $sProductId, $dAmount, $aSel );
194 protected function _toList( $sListType, $sProductId, $dAmount, $aSel )
197 if ( $oUser = $this->
getUser() ) {
205 $dAmount = str_replace(
',',
'.', $dAmount );
206 if ( !$this->
getConfig()->getConfigParam(
'blAllowUnevenAmounts' ) ) {
207 $dAmount = round( (
string ) $dAmount );
210 $oBasket = $oUser->getBasket( $sListType );
211 $oBasket->addItemToBasket( $sProductId, abs( $dAmount ), $aSel, ($dAmount == 0) );
214 $oBasket->getItemCount(
true );
231 $oContentList =
oxNew(
'oxcontentlist' );
232 $oContentList->loadMainMenulist();
233 $oParentView->setMenueList( $oContentList );