133 lignes
3.2 KiB
PHP
133 lignes
3.2 KiB
PHP
<?php
|
|
/**
|
|
* This Software is the property of Data Development and is protected
|
|
* by copyright law - it is NOT Freeware.
|
|
*
|
|
* Any unauthorized use of this software without a valid license
|
|
* is a violation of the license agreement and will be prosecuted by
|
|
* civil and criminal law.
|
|
*
|
|
* http://www.shopmodule.com
|
|
*
|
|
* @copyright © D³ Data Development, Thomas Dartsch
|
|
* @author D³ Data Development - Daniel Seifert <support@shopmodule.com>
|
|
* @link http://www.oxidmodule.com
|
|
*/
|
|
|
|
class d3_google_trustedstore_articlelister
|
|
{
|
|
private $_sModId = 'd3_googleanalytics';
|
|
|
|
/**
|
|
* @param details $oView
|
|
*
|
|
* @return array
|
|
*/
|
|
public function getDetailsProdList($oView)
|
|
{
|
|
$aArticleList = array();
|
|
$aArticleList[] = $oView->getProduct();
|
|
return $this->_getProductList($aArticleList);
|
|
}
|
|
|
|
/**
|
|
* @param alist $oView
|
|
*
|
|
* @return array
|
|
*/
|
|
public function getAlistProdList($oView)
|
|
{
|
|
$oArticleList = $oView->getArticleList();
|
|
return $this->_getProductList($oArticleList);
|
|
}
|
|
|
|
/**
|
|
* @param search $oView
|
|
*
|
|
* @return array
|
|
*/
|
|
public function getSearchProdList($oView)
|
|
{
|
|
$oArticleList = $oView->getArticleList();
|
|
return $this->_getProductList($oArticleList);
|
|
}
|
|
|
|
/**
|
|
* @param vendorlist $oView
|
|
*
|
|
* @return array
|
|
*/
|
|
public function getVendorlistProdList($oView)
|
|
{
|
|
$oArticleList = $oView->getArticleList();
|
|
return $this->_getProductList($oArticleList);
|
|
}
|
|
|
|
/**
|
|
* @param manufacturerlist $oView
|
|
*
|
|
* @return array
|
|
*/
|
|
public function getManufacturerlistProdList($oView)
|
|
{
|
|
$oArticleList = $oView->getArticleList();
|
|
return $this->_getProductList($oArticleList);
|
|
}
|
|
|
|
/**
|
|
* @param compare $oView
|
|
*
|
|
* @return array
|
|
*/
|
|
public function getCompareProdList($oView)
|
|
{
|
|
$aArticleList = $oView->getCompArtList();
|
|
return $this->_getProductList($aArticleList);
|
|
}
|
|
|
|
/**
|
|
* don't change method name, it was dynamically generated
|
|
* @param account_noticelist $oView
|
|
*
|
|
* @return array
|
|
*/
|
|
public function getAccount_noticelistProdList($oView)
|
|
{
|
|
$aArticleList = $oView->getNoticeProductList();
|
|
return $this->_getProductList($aArticleList);
|
|
}
|
|
|
|
/**
|
|
* don't change method name, it was dynamically generated
|
|
* @param account_wishlist $oView
|
|
*
|
|
* @return array
|
|
*/
|
|
public function getAccount_wishlistProdList($oView)
|
|
{
|
|
$aArticleList = $oView->getWishProductList();
|
|
return $this->_getProductList($aArticleList);
|
|
}
|
|
|
|
/**
|
|
* @param $aArticleList
|
|
*
|
|
* @return array
|
|
*/
|
|
protected function _getProductList($aArticleList)
|
|
{
|
|
$aArticleIds = array();
|
|
|
|
/** @var oxarticle $oArticle */
|
|
if (isset($aArticleList)) {
|
|
foreach ($aArticleList as $oArticle) {
|
|
$aArticleIds[] = $oArticle->getFieldData(
|
|
d3_cfg_mod::get($this->_sModId)->getValue('sD3GATSShoppingArtId')
|
|
);
|
|
}
|
|
}
|
|
|
|
return array('aArtIdList' => $aArticleIds);
|
|
}
|
|
}
|