Hi,
ich versuche mich mal ins kalte Wasser zu stoßen und zum basteln ein eigenes Modul zu erstellen. Das Modul soll nichts anderes machen, als alle Produkte aufzulisten. Ich komme irgendwie nicht so recht voran und die Tutorials helfen mir nicht so recht.
Ich bin mir nicht sicher ob die Files an den richtigen Orten liegen, alles korrekt miteinander verbunden ist und vor allem wie ich es aufrufe. Über Hilfe bin ich sehr dankbar.
Was habe ich bisher:
metadata.php
<?php
/**
* Module information
*/
$aModule = array(
'id' => 'liste',
'title' => 'liste',
'description' => 'Lists all articles',
'version' => '0.1',
'author' => 'Uwe Heldt',
'email' => '[email protected]',
'extend' => array(
'liste' => 'liste/liste.php',
),
'templates' => array('liste.tpl' => 'liste/out/tpl/liste.tpl')
);
liste.php
<?php
class liste extends oxUBase {
protected $_sThisTemplate = 'out/tpl/liste.tpl';
public function getArticleList(){
$sQuery = "SELECT * FROM oxv_oxarticles";
$aArticleList = oxNew('oxarticlelist');
$aArticleList->selectString($sqQuery);
return $aArticleList->getArray();
}
public function render(){
return parent::render();
}
?>
out/tpl/liste.tpl
[{oxscript add="$('a.js-external').attr('target', '_blank');"}]
[{oxscript include="js/widgets/oxarticlebox.js" priority=10 }]
[{oxscript add="$( '#content' ).oxArticleBox();"}]
[{capture append="oxidBlock_content"}]
[{if $oView->getArticleList()|@count > 0}]
<h1 class="pageHead">[{$oView->getTitle()}]</h1>
<div class="listRefine clear bottomRound">
[{include file="widget/locator/listlocator.tpl" locator=$oView->getPageNavigationLimitedTop() attributes=$oView->getAttributes() listDisplayType=true itemsPerPage=true sort=false }]
</div>
[{* List types: grid|line|infogrid *}]
[{include file="widget/product/list.tpl" type=$oView->getListDisplayType() listId="productList" products=$oView->getNewestArticleList()}]
[{include file="widget/locator/listlocator.tpl" locator=$oView->getPageNavigationLimitedBottom() place="bottom"}]
[{/if}]
[{insert name="oxid_tracker"}]
[{/capture}]
[{include file="layout/page.tpl" sidebar="Left"}]
Danke und Grüße,
Uwe