Alle Artikel einer Kategorie

Gute Nabend, ich möchte alle Artikel einer Kategorie einer Variable übergeben. Zurzeit tu ich dies mit : $data = Shopware()-\>Modules()-\>Articles()-\>sGetArticlesByCategory($catID); Das Problem ist das die Anzahl der Artikel == sPerPage Variable(Default:12) ist. Auschnitt von sGetArticlesByCategory : $sLimitStart = ($sPage - 1) \* $this-\>sSYSTEM-\>sCONFIG['sARTICLESPERPAGE']; $sLimitEnd = $this-\>sSYSTEM-\>\_GET['sPerPage'] ? $this-\>sSYSTEM-\>\_GET['sPerPage'] : $this-\>sSYSTEM-\>sCONFIG['sARTICLESPERPAGE']; SQL - Abfrage : LIMIT $sLimitStart, $sLimitEnd Vielen Dank für eure Hilfe :slight_smile:

Lösung : Hook erstellen $hook = $this-\>createHook( 'sArticles', 'sGetArticlesByCategory', 'onArticle', Enlight\_Hook\_HookHandler::TypeBefore, 0 ); $this-\>subscribeHook($hook); static function onArticle(Enlight\_Hook\_HookArgs $args) { $sPerPage = 500; // Oder mehr Shopware()-\>System()-\>\_GET['sPerPage'] = $sPerPage; unset(Shopware()-\>System()-\>\_SESSION['sPerPage']); }