Modul Aktionen anzeigen

Hallo Leute da in den Anderen Threads ja tote hose ist mach ich mal nen neuen auf.

Hab mich hier durch die ganzen Threads durchgelesen und versucht ein neues Modul zu erstellen womit man Seine Aktionen auf jeder Seite einfach anzeigen kann nur hänge ich grade fest.

Hier der Code.

metadata

<?php

$sMetadataVersion = '1.1';

/**
 * Module information
 */
$aModule = array(
    'id' => 'FE_Aktionen',
    'title' => 'FE Aktionen',
    'description' => array(
        'de' => 'Aktionen auf jeder Seite anzeigen',
	),
	
    'lang' => 'de',
    'thumbnail' => '',
    'version' => '1.0',
    'author' => '*********',
    'url' => '************',
    'email' => '**********',
    'extend' => array(
        'oxviewconfig' => 'ownbenefits/ownbenefits',
    ),

);

Modul

<?php
class ownbenefits extends ownbenefits_parent { 

    public function getActionArticleList($actionid) 
    { 
	$oArticlelist = oxNew('oxarticlelist');
	
    $oArticlelist->loadAktionArticles($actionid); 
	return $oArticlelist ;
    } 
}  

Start TPL

[{if $oView->getActionArticleList('2d7be4c660e4a1aeb0e4337bcc85abee')}] 
[{include file="widget/product/list.tpl" type=grid products=$oView->getActionArticleList('2d7be4c660e4a1aeb0e4337bcc85abee') showMainLink=true}]
[{/if}]

Fehler im Debuging:

Function 'getActionArticleList' does not exist or is not accessible! (Start)
#0 /var/www/vhosts/s484151671.online.de/httpdocs/Shop/tmp/smarty/ad9625b146def3b3c7f1c45573db12d1^%%40^405^405277AF%%start.tpl.php(61): oxSuperCfg->__call('getActionArticl...', Array)
#1 /var/www/vhosts/s484151671.online.de/httpdocs/Shop/tmp/smarty/ad9625b146def3b3c7f1c45573db12d1^%%40^405^405277AF%%start.tpl.php(61): Start->getActionArticleList('2d7be4c660e4a1a...')
#2 /var/www/vhosts/s484151671.online.de/httpdocs/Shop/core/smarty/Smarty.class.php(1263): include('/var/www/vhosts...')
#3 /var/www/vhosts/s484151671.online.de/httpdocs/Shop/core/oxshopcontrol.php(528): Smarty->fetch('page/shop/start...', 'ox|0|0|1|0')
#4 /var/www/vhosts/s484151671.online.de/httpdocs/Shop/core/oxshopcontrol.php(396): oxShopControl->_render(Object(Start))
#5 /var/www/vhosts/s484151671.online.de/httpdocs/Shop/core/oxshopcontrol.php(156): oxShopControl->_process('start', NULL, NULL, NULL)
#6 /var/www/vhosts/s484151671.online.de/httpdocs/Shop/core/oxid.php(40): oxShopControl->start()
#7 /var/www/vhosts/s484151671.online.de/httpdocs/Shop/index.php(27): Oxid::run()
#8 {main};

cl=exceptionError fnc=displayExceptionError(show/hide)
Memory usage: 16.345 MB (peak: 16.676 MB)
System memory usage: 16.75 MB (peak: 16.75 MB)
Executed: 2013-08-30 12:26:22
Timestamp: 1377858382.2931
Execution time:0.093
----------------------------------------------------------
Profile oxNew:	0.13066s	140.43%	95	*	0.00138s
Profile process:	0.09212s	99.01%	2	*	0.04606s
Profile loadinglists:	0.02253s	24.21%	4	*	0.00563s
Profile oxAutoload:	0.02182s	23.45%	73	*	0.0003s
Profile buildTree:	0.01745s	18.76%	2	*	0.00873s
Profile articleAssign:	0.01424s	15.31%	8	*	0.00178s
Profile smarty_function_oxmultilang:	0.00755s	8.11%	13	*	0.00058s
Profile getDynamicUrl:	0.00671s	7.21%	2	*	0.00336s
Profile executeMaintenanceTasks:	0.00584s	6.28%	2	*	0.00292s
Profile getArticleMainUri:	0.00525s	5.64%	3	*	0.00175s
Profile _getAmountPrice:	0.00487s	5.23%	3	*	0.00162s
Profile _getLangTranslationArray:	0.00352s	3.78%	24	*	0.00015s
Profile seoencoder_loadFromCache:	0.00289s	3.1%	49	*	6.0E-5s
Profile getCategory:	0.00155s	1.66%	1	*	0.00155s
Profile _assignPriceInternal:	0.00079s	0.85%	3	*	0.00026s
Profile seoencoder_saveInCache:	0.0006s	0.64%	5	*	0.00012s
Profile fround:	0.00021s	0.23%	27	*	1.0E-5s
Profile articleAssignParentInternal:	0.00011s	0.12%	8	*	1.0E-5s
Profile _applyVAT:	0.00011s	0.12%	6	*	2.0E-5s
Profile isSearchEngine:	8.0E-5s	0.09%	1	*	8.0E-5s
Profile oxviewconfig::getViewConfigParam:	5.0E-5s	0.05%	7	*	1.0E-5s
Profile oxviewconfig::setViewConfigParam:	3.0E-5s	0.04%	6	*	1.0E-5s

kann mir wer helfen ich bin am kotzen.

So ich geb mir selbst mal ne antwort falls wieder mal jemand auf so einen Fehler trift.

Das Problem lag an:

[{if $oView->getActionArticleList('2d7be4c660e4a1aeb0e4337bcc85abee')}] 
[{include file="widget/product/list.tpl" type=grid products=$oView->getActionArticleList('2d7be4c660e4a1aeb0e4337bcc85abee') showMainLink=true}]
[{/if}]

Dort müssen wir $oView durch $oViewConf ersetzen und tada es geht ^^

Also bei 4.7.7

Ja, da kam ich nun leider zu spät :wink:

Das ist denke ich der aktuellste Thread zu diesem Thema:

Ich habe das Modul + Metadata angelegt und in einer CMS-Seite (Ich nutze CE 4.8)


[{include file="widget/product/list.tpl" type=grid showMainLink=true products=$oViewConf->getActionArticleList('oxnewactions')}]

eingefügt.

Schon einmal vorab: “oxnewactions” ist die richtige ID der Aktion.

Problem ist, dass das Modul nicht aktiviert werden kann:
“Module kann nicht geladen werden”

EDIT:
Sicher dass es bei


    $oArticlelist = oxNew('oxarticlelist');
    $oArticlelist->loadAktionArticles($actionid); 

“loadAktionArticles” statt “loadActionArticles” sein soll?

Der Fehler hat eher mit den angelegten Modul-Ordnern zutun statt mit dem Code. Scheinbar findet oxid nichts. Haste die Sachen mehrmals hochgeladen und umbenannt? Dann lösche mal die Modulpfade.

Du hattest Recht. Danke.
Hab in der Datenbank einiges geleert und nun läuft alles :slight_smile:

und? tote hose wiederbelebt? :wink: