8
0

add remarketing article list for start page

Dieser Commit ist enthalten in:
Daniel Seifert 2017-03-09 09:05:51 +00:00
Ursprung 294961da40
Commit 5d493cca2b
2 geänderte Dateien mit 72 neuen und 0 gelöschten Zeilen

Datei anzeigen

@ -20,6 +20,42 @@ class d3_google_remarketing_articlelister
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
*

Datei anzeigen

@ -18,6 +18,42 @@ class d3_google_trustedstore_articlelister
{
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
*