PDF-Rechnung: Positionen sortieren

Wir möchten die Positionen der in PDF-Rechnung gerne alphabetisch von A bis Z sortieren. Normalerweise generiert Oxid die Rechnung anhand der Reihenfolge, wie Artikel vom User in den Warenkorb gelegt wurden.

Die Änderung wäre vermutlich in der myorder.php nötig. Leider haben wir keinen Ansatz :frowning:

Kann uns jemand helfen?

myorder.php

public function getOrderArticles( $blStorno = false )
    {
        if ( $this->_oArticles == null ) {
            // order articles
            $this->_oArticles = oxNew( 'oxlist' );
            $this->_oArticles->init( 'oxorderarticle' );

            $sSelect = 'select oxorderarticles.* from oxorderarticles where oxorderarticles.oxorderid="'.$this->getId().'"';
            if ( $blStorno ) {
                $sSelect.= ' and oxstorno = 0';
            }
//HIER IST DIE ÄNDERUNG
            $sSelect.= ' order by oxorderarticles.oxtitle asc';
//HIER IST DIE ÄNDERUNG
            $this->_oArticles->selectString( $sSelect );
        }

        return $this->_oArticles;
    }

:wink:

Super danke (der komplette Block fehlte in unserer myorder.php, warum auch immer)!