Onlineshop xt:commerce CE (Startedition Veyton) – Übersicht der Produkte mehrspaltig

Als Beispiel hier ein drei-spaltiges Layout. Rot markiertes hinzufügen. Bei einer anderen Spaltenanzahl die entsprechenden Definitionen in beiden Dateien anpassen.

Datei: templates/TEMPLATE/xtCore/pages/product_listing/product_listing_v1.html

<div>
{foreach name=aussen item=module_data from=$product_listing}
    <div>
        ...
    </div>
{if (($smarty.foreach.aussen.index + 1) is div by 3)}
</div>
<div>
{/if}
{/foreach}
</div>

Datei templates/TEMPLATE/css/stylesheet.css

.my-wrapper {
    position:relative;
    clear:both;
}
.newProductPreview {
    float: left;
    margin-bottom: 30px;
    padding: 0px;
    width: 33% //width of product box;
}

Schreibe einen Kommentar