add remarketing article list for start page

Cette révision appartient à :
Daniel Seifert 2017-03-09 09:05:51 +00:00
Parent 294961da40
révision 5d493cca2b
2 fichiers modifiés avec 72 ajouts et 0 suppressions

Voir le fichier

@ -20,6 +20,42 @@ class d3_google_remarketing_articlelister
public $blD3GARemarketingUseBrutto = true; public $blD3GARemarketingUseBrutto = true;
public $aStartListMethodNames = array(
'getArticleList',
'getTopArticleList',
'getNewestArticles',
'getFirstArticle',
'getCatOfferArticleList',
);
/**
* @param start $oView
*
* @return array
*/
public function getStartProdList($oView)
{
/** @var oxArticleList $oArticleList */
$oArticleList = oxNew('oxarticlelist');
if (is_array($this->aStartListMethodNames) && count($this->aStartListMethodNames)) {
foreach ($this->aStartListMethodNames as $sListName) {
/** @var oxArticleList $oList */
$mList = call_user_func(array($oView, $sListName));
if ($mList instanceof oxArticleList) {
if ($mList->count()) {
foreach ($mList->getArray() as $sID => $oArticle) {
$oArticleList->offsetSet($sID, $oArticle);
}
}
}
}
}
return $this->_getProductList($oArticleList);
}
/** /**
* @param details $oView * @param details $oView
* *

Voir le fichier

@ -18,6 +18,42 @@ class d3_google_trustedstore_articlelister
{ {
private $_sModId = 'd3_googleanalytics'; private $_sModId = 'd3_googleanalytics';
public $aStartListMethodNames = array(
'getArticleList',
'getTopArticleList',
'getNewestArticles',
'getFirstArticle',
'getCatOfferArticleList',
);
/**
* @param start $oView
*
* @return array
*/
public function getStartProdList($oView)
{
/** @var oxArticleList $oArticleList */
$oArticleList = oxNew('oxarticlelist');
if (is_array($this->aStartListMethodNames) && count($this->aStartListMethodNames)) {
foreach ($this->aStartListMethodNames as $sListName) {
/** @var oxArticleList $oList */
$mList = call_user_func(array($oView, $sListName));
if ($mList instanceof oxArticleList) {
if ($mList->count()) {
foreach ($mList->getArray() as $sID => $oArticle) {
$oArticleList->offsetSet($sID, $oArticle);
}
}
}
}
}
return $this->_getProductList($oArticleList);
}
/** /**
* @param details $oView * @param details $oView
* *