Hi, ich habe das mal für einen Kunden gemacht. Dafür müsstest du die Funktion “sGetPromotions” in der Datei “/engine/core/class/sArticles.php / ca. Zeile 4002” anpassen (ACHTUNG Updatefähigkeit / getestet nur unter 3.5.6). Die angepasste Funktion sähe so aus: /\*\* \* Get list of all promotions from a certain category \* @param int $category category id \* @access public \* @return array \*/ public function sGetPromotions($category){ $category = intval($category); $sToday = date("Y-m-d"); /\*$sql = " SELECT category,mode, TRIM(ordernumber) as ordernumber, link, description, link\_target, img, liveshoppingID FROM s\_emarketing\_promotions WHERE category=$category AND ((TO\_DAYS(valid\_from) \<= TO\_DAYS('$sToday') AND TO\_DAYS(valid\_to) \>= TO\_DAYS('$sToday')) OR (valid\_from='0000-00-00' AND valid\_to='0000-00-00')) ORDER BY position ASC ";\*/ /\* Site Concept 13.06.2012 \*/ $sql = " SELECT description as promotiontitle,category,mode, TRIM(ordernumber) as ordernumber, link, description, link\_target, img, liveshoppingID FROM s\_emarketing\_promotions WHERE category=$category AND ((TO\_DAYS(valid\_from) \<= TO\_DAYS('$sToday') AND TO\_DAYS(valid\_to) \>= TO\_DAYS('$sToday')) OR (valid\_from='0000-00-00' AND valid\_to='0000-00-00')) ORDER BY position ASC "; $sql = Enlight()-\>Events()-\>filter('Shopware\_Modules\_Articles\_GetPromotions\_FilterSQL', $sql, array('subject'=\>$this,'category'=\>$category)); $getAffectedPromitions = $this-\>sSYSTEM-\>sDB\_CONNECTION-\>GetAll($sql); // Clearing cache unset($this-\>sCachePromotions); if (count($getAffectedPromitions)){ $counter = 0; /\* Site Concept 13.06.2012 \*/ foreach ($getAffectedPromitions as $promotion){ $promotionTitle = $promotion['promotiontitle']; /\* Site Concept 13.06.2012 \*/ switch ($promotion["mode"]){ case "random": $promotion = $this-\>sGetPromotionById ("random",$category); if (count($promotion)\>1) $promote[$counter] = $promotion; break; case "fix": $promotion = $this-\>sGetPromotionById ("fix",$category,$promotion["ordernumber"]); if (count($promotion)\>1) $promote[$counter] = $promotion; break; case "new": $promotion = $this-\>sGetPromotionById ("new",$category); if (count($promotion)\>1) $promote[$counter] = $promotion; break; case "top": $promotion = $this-\>sGetPromotionById ("top",$category); if (count($promotion)\>1) $promote[$counter] = $promotion; break; case "gfx": $promotion = $this-\>sGetPromotionById ("gfx",$category,$promotion); if (count($promotion)\>1) $promote[$counter] = $promotion; break; case "livefix": $promotion = $this-\>sGetLiveShopping('fix', 0, $promotion, true); $promotion['liveshoppingData'] = $promotion['liveshoppingData'][0]; if (count($promotion)\>1 && !empty($promotion['liveshoppingData'])) $promote[$counter] = $promotion; break; case "liverand": $cacheSQL = null; if (!empty($this-\>sCachePromotions)){ $cacheSQL = 'AND lv.articleID NOT IN ('.implode(', ',$this-\>sCachePromotions).')'; } $promotion = $this-\>sGetLiveShopping('random', 0, $promotion, true, $cacheSQL); if (!empty($promotion['liveshoppingData'][0])) { $promotion['liveshoppingData'] = $promotion['liveshoppingData'][0]; $promote[$counter] = $promotion; } break; case "liverandcat": $cacheSQL = null; if (!empty($this-\>sCachePromotions)){ $cacheSQL = 'AND lv.articleID NOT IN ('.implode(', ',$this-\>sCachePromotions).')'; } $promotion = $this-\>sGetLiveShopping('random', $category, $promotion, true, $cacheSQL); if (!empty($promotion['liveshoppingData'][0])) { $promotion['liveshoppingData'] = $promotion['liveshoppingData'][0]; $promote[$counter] = $promotion; } break; } // end switch $promote[$counter]['promotiontitle'] = $promotionTitle; /\* Site Concept 13.06.2012 \*/ $counter++; /\* Site Concept 13.06.2012 \*/ } // end foreach $promote = Enlight()-\>Events()-\>filter('Shopware\_Modules\_Articles\_GetPromotions\_FilterResult', $promote, array('subject'=\>$this,'category'=\>$category)); return $promote; } // end if } // end function
Danach kannst du in dem Titel der Promotions deine Keywords unterbringen. Im Template hast du dann eine neue Variable, z. B. alt="{$sArticle.promotiontitle}" title="{$sArticle.promotiontitle}"